@netlify/plugin-nextjs 4.41.3 → 5.0.0-beta.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.
- package/README.md +61 -17
- package/dist/build/cache.js +15 -0
- package/dist/build/content/prerendered.js +16 -0
- package/dist/build/content/server.js +18 -0
- package/dist/build/content/static.js +20 -0
- package/dist/build/functions/edge.js +14 -0
- package/dist/build/functions/server.js +16 -0
- package/dist/build/plugin-context.js +17 -0
- package/dist/esm-chunks/chunk-4AJYXTWN.js +17 -0
- package/dist/esm-chunks/chunk-62KDS27E.js +77 -0
- package/dist/esm-chunks/chunk-AVWFCGVE.js +5536 -0
- package/dist/esm-chunks/chunk-B6QMRLBH.js +255 -0
- package/dist/esm-chunks/chunk-G2VRYWGL.js +107 -0
- package/dist/esm-chunks/chunk-G3GM7JNF.js +92 -0
- package/dist/esm-chunks/chunk-GGHAQM5D.js +28 -0
- package/dist/esm-chunks/chunk-HPGTYMVD.js +113 -0
- package/dist/esm-chunks/chunk-PEBUKFKH.js +89 -0
- package/dist/esm-chunks/chunk-R4NHZWGU.js +32 -0
- package/dist/esm-chunks/chunk-RSKIKBZH.js +44 -0
- package/dist/esm-chunks/chunk-XD5TSLZO.js +85 -0
- package/dist/esm-chunks/chunk-ZBX3SNQG.js +561 -0
- package/dist/index.js +66 -0
- package/dist/run/config.js +18 -0
- package/dist/run/constants.js +15 -0
- package/dist/run/handlers/cache.cjs +849 -0
- package/dist/run/handlers/server.js +3289 -0
- package/dist/run/headers.js +19 -0
- package/dist/run/next.cjs +1055 -0
- package/dist/run/revalidate.js +13 -0
- package/edge-runtime/README.md +29 -0
- package/edge-runtime/lib/headers.ts +26 -0
- package/edge-runtime/lib/middleware.ts +60 -0
- package/edge-runtime/lib/next-request.ts +59 -0
- package/edge-runtime/lib/response.ts +145 -0
- package/edge-runtime/lib/util.ts +26 -0
- package/edge-runtime/middleware.ts +40 -0
- package/edge-runtime/shim/index.js +8 -0
- package/{src/templates → edge-runtime}/vendor/deno.land/x/html_rewriter@v0.1.0-pre.17/index.ts +1 -1
- package/edge-runtime/vendor/import_map.json +13 -0
- package/edge-runtime/vendor.ts +18 -0
- package/manifest.yml +1 -1
- package/package.json +23 -60
- package/index.js +0 -1
- package/lib/constants.js +0 -56
- package/lib/helpers/analysis.js +0 -115
- package/lib/helpers/cache.js +0 -46
- package/lib/helpers/compiler.js +0 -119
- package/lib/helpers/config.js +0 -192
- package/lib/helpers/dev.js +0 -20
- package/lib/helpers/edge.js +0 -328
- package/lib/helpers/files.js +0 -335
- package/lib/helpers/flags.js +0 -46
- package/lib/helpers/functions.js +0 -437
- package/lib/helpers/functionsMetaData.js +0 -46
- package/lib/helpers/matchers.js +0 -41
- package/lib/helpers/middlewareWatcher.js +0 -12
- package/lib/helpers/pack.js +0 -41
- package/lib/helpers/redirects.js +0 -246
- package/lib/helpers/types.js +0 -2
- package/lib/helpers/utils.js +0 -226
- package/lib/helpers/verification.js +0 -182
- package/lib/index.js +0 -194
- package/lib/templates/blobStorage.js +0 -30
- package/lib/templates/getApiHandler.js +0 -120
- package/lib/templates/getHandler.js +0 -201
- package/lib/templates/getPageResolver.js +0 -54
- package/lib/templates/handlerUtils.js +0 -268
- package/lib/templates/ipx.js +0 -13
- package/lib/templates/requireHooks.js +0 -105
- package/lib/templates/server.js +0 -159
- package/lib/templates/vendor.js +0 -20
- package/src/templates/edge/bundle.js +0 -8
- package/src/templates/edge/function-runtime.ts +0 -24
- package/src/templates/edge/imageconfig.json +0 -3
- package/src/templates/edge/ipx.ts +0 -5
- package/src/templates/edge/matchers.json +0 -1
- package/src/templates/edge/middleware-runtime.ts +0 -62
- package/src/templates/edge/next-dev.js +0 -104
- package/src/templates/edge/rsc-data.ts +0 -5
- package/src/templates/edge/shims.js +0 -77
- package/src/templates/edge-shared/next-utils.ts +0 -407
- package/src/templates/edge-shared/nextConfig.json +0 -3
- package/src/templates/edge-shared/prerender-manifest.json +0 -7
- package/src/templates/edge-shared/rsc-data.ts +0 -78
- package/src/templates/edge-shared/utils.test.ts +0 -114
- package/src/templates/edge-shared/utils.ts +0 -315
- package/src/templates/vendor/import_map.json +0 -13
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.134.0/fmt/colors.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.134.0/testing/_diff.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.134.0/testing/asserts.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/_util/asserts.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/_util/os.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/async/abortable.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/async/deadline.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/async/debounce.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/async/deferred.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/async/delay.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/async/mod.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/async/mux_async_iterator.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/async/pool.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/async/retry.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/async/tee.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/bytes/index_of_needle.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/crypto/timing_safe_equal.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/datetime/to_imf.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/encoding/base64.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/encoding/base64url.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/flags/mod.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/fmt/colors.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/fmt/printf.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/http/cookie.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/_core.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/_events.d.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/_events.mjs +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/_global.d.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/_next_tick.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/_process/exiting.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/_process/process.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/_process/stdio.mjs +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/_process/streams.mjs +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/_stream.d.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/_stream.mjs +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/_util/_util_callbackify.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/_utils.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/assert.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/assertion_error.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/async_hooks.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/buffer.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/events.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/buffer.d.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/buffer.mjs +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/crypto/_keys.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/crypto/constants.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/error_codes.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/errors.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/fixed_queue.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/hide_stack_frames.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/net.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/normalize_encoding.mjs +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/options.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/primordials.mjs +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/process/per_thread.mjs +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/readline/callbacks.mjs +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/readline/utils.mjs +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/streams/destroy.mjs +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/streams/end-of-stream.mjs +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/streams/utils.mjs +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/util/comparisons.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/util/debuglog.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/util/inspect.mjs +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/util/types.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/util.mjs +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal/validators.mjs +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/_libuv_winerror.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/_listen.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/_node.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/_timingSafeEqual.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/_utils.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/_winerror.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/ares.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/async_wrap.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/buffer.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/cares_wrap.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/config.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/connection_wrap.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/constants.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/contextify.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/credentials.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/crypto.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/errors.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/fs.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/fs_dir.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/fs_event_wrap.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/handle_wrap.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/heap_utils.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/http_parser.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/icu.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/inspector.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/js_stream.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/messaging.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/mod.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/module_wrap.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/native_module.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/natives.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/node_file.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/node_options.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/options.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/os.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/performance.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/pipe_wrap.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/process_methods.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/report.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/serdes.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/signal_wrap.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/spawn_sync.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/stream_wrap.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/string_decoder.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/symbols.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/task_queue.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/tcp_wrap.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/timers.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/tls_wrap.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/trace_events.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/tty_wrap.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/types.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/udp_wrap.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/url.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/util.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/uv.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/v8.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/worker.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/internal_binding/zlib.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/process.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/stream.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/string_decoder.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/util/types.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/node/util.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/path/_constants.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/path/_interface.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/path/_util.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/path/common.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/path/glob.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/path/mod.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/path/posix.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/path/separator.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/path/win32.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/streams/write_all.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/testing/_diff.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/testing/_format.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/testing/asserts.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/std@0.175.0/types.d.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/x/html_rewriter@v0.1.0-pre.17/vendor/asyncify.js +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/x/html_rewriter@v0.1.0-pre.17/vendor/html_rewriter.d.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/x/html_rewriter@v0.1.0-pre.17/vendor/html_rewriter.js +0 -0
- /package/{src/templates → edge-runtime}/vendor/deno.land/x/path_to_regexp@v6.2.1/index.ts +0 -0
- /package/{src/templates → edge-runtime}/vendor/esm.sh/v91/next@12.2.5/deno/dist/compiled/cookie.js +0 -0
- /package/{src/templates → edge-runtime}/vendor/esm.sh/v91/next@12.2.5/deno/dist/server/web/spec-extension/request.js +0 -0
- /package/{src/templates → edge-runtime}/vendor/esm.sh/v91/next@12.2.5/deno/dist/server/web/spec-extension/response.js +0 -0
- /package/{src/templates → edge-runtime}/vendor/raw.githubusercontent.com/worker-tools/resolvable-promise/master/index.ts +0 -0
|
@@ -0,0 +1,3289 @@
|
|
|
1
|
+
|
|
2
|
+
const require = await (async () => {
|
|
3
|
+
const { createRequire } = await import("node:module");
|
|
4
|
+
return createRequire(import.meta.url);
|
|
5
|
+
})();
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
getTagsManifest
|
|
9
|
+
} from "../../esm-chunks/chunk-R4NHZWGU.js";
|
|
10
|
+
import "../../esm-chunks/chunk-4AJYXTWN.js";
|
|
11
|
+
import {
|
|
12
|
+
adjustDateHeader,
|
|
13
|
+
setCacheControlHeaders,
|
|
14
|
+
setCacheTagsHeaders,
|
|
15
|
+
setVaryHeaders
|
|
16
|
+
} from "../../esm-chunks/chunk-ZBX3SNQG.js";
|
|
17
|
+
import {
|
|
18
|
+
nextResponseProxy
|
|
19
|
+
} from "../../esm-chunks/chunk-B6QMRLBH.js";
|
|
20
|
+
import {
|
|
21
|
+
__commonJS,
|
|
22
|
+
__toESM
|
|
23
|
+
} from "../../esm-chunks/chunk-RSKIKBZH.js";
|
|
24
|
+
|
|
25
|
+
// node_modules/node-inspect-extracted/dist/inspect.js
|
|
26
|
+
var require_inspect = __commonJS({
|
|
27
|
+
"node_modules/node-inspect-extracted/dist/inspect.js"(exports, module) {
|
|
28
|
+
!function(t, e) {
|
|
29
|
+
"object" == typeof exports && "object" == typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define([], e) : "object" == typeof exports ? exports.util = e() : t.util = e();
|
|
30
|
+
}(exports, function() {
|
|
31
|
+
return (() => {
|
|
32
|
+
"use strict";
|
|
33
|
+
var t = { 794: (t2, e2) => {
|
|
34
|
+
function r2(t3, e3) {
|
|
35
|
+
for (var r3 = 0; r3 < e3.length; r3++) {
|
|
36
|
+
var n2 = e3[r3];
|
|
37
|
+
n2.enumerable = n2.enumerable || false, n2.configurable = true, "value" in n2 && (n2.writable = true), Object.defineProperty(t3, n2.key, n2);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
var n = function() {
|
|
41
|
+
function t3() {
|
|
42
|
+
!function(t4, e4) {
|
|
43
|
+
if (!(t4 instanceof e4))
|
|
44
|
+
throw new TypeError("Cannot call a class as a function");
|
|
45
|
+
}(this, t3);
|
|
46
|
+
}
|
|
47
|
+
var e3, n2;
|
|
48
|
+
return e3 = t3, n2 = [{ key: "hexSlice", value: function() {
|
|
49
|
+
var t4 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0, e4 = arguments.length > 1 ? arguments[1] : void 0;
|
|
50
|
+
return Array.prototype.map.call(this.slice(t4, e4), function(t5) {
|
|
51
|
+
return ("00" + t5.toString(16)).slice(-2);
|
|
52
|
+
}).join("");
|
|
53
|
+
} }], n2 && r2(e3.prototype, n2), Object.defineProperty(e3, "prototype", { writable: false }), t3;
|
|
54
|
+
}();
|
|
55
|
+
e2.l = n;
|
|
56
|
+
}, 618: (t2, e2, r2) => {
|
|
57
|
+
function n(t3) {
|
|
58
|
+
return function(t4) {
|
|
59
|
+
if (Array.isArray(t4))
|
|
60
|
+
return c(t4);
|
|
61
|
+
}(t3) || function(t4) {
|
|
62
|
+
if ("undefined" != typeof Symbol && null != t4[Symbol.iterator] || null != t4["@@iterator"])
|
|
63
|
+
return Array.from(t4);
|
|
64
|
+
}(t3) || a(t3) || function() {
|
|
65
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
66
|
+
}();
|
|
67
|
+
}
|
|
68
|
+
function o(t3) {
|
|
69
|
+
return o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
|
|
70
|
+
return typeof t4;
|
|
71
|
+
} : function(t4) {
|
|
72
|
+
return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
|
|
73
|
+
}, o(t3);
|
|
74
|
+
}
|
|
75
|
+
function i(t3, e3) {
|
|
76
|
+
var r3 = "undefined" != typeof Symbol && t3[Symbol.iterator] || t3["@@iterator"];
|
|
77
|
+
if (!r3) {
|
|
78
|
+
if (Array.isArray(t3) || (r3 = a(t3)) || e3 && t3 && "number" == typeof t3.length) {
|
|
79
|
+
r3 && (t3 = r3);
|
|
80
|
+
var n2 = 0, o2 = function() {
|
|
81
|
+
};
|
|
82
|
+
return { s: o2, n: function() {
|
|
83
|
+
return n2 >= t3.length ? { done: true } : { done: false, value: t3[n2++] };
|
|
84
|
+
}, e: function(t4) {
|
|
85
|
+
throw t4;
|
|
86
|
+
}, f: o2 };
|
|
87
|
+
}
|
|
88
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
89
|
+
}
|
|
90
|
+
var i2, c2 = true, l2 = false;
|
|
91
|
+
return { s: function() {
|
|
92
|
+
r3 = r3.call(t3);
|
|
93
|
+
}, n: function() {
|
|
94
|
+
var t4 = r3.next();
|
|
95
|
+
return c2 = t4.done, t4;
|
|
96
|
+
}, e: function(t4) {
|
|
97
|
+
l2 = true, i2 = t4;
|
|
98
|
+
}, f: function() {
|
|
99
|
+
try {
|
|
100
|
+
c2 || null == r3.return || r3.return();
|
|
101
|
+
} finally {
|
|
102
|
+
if (l2)
|
|
103
|
+
throw i2;
|
|
104
|
+
}
|
|
105
|
+
} };
|
|
106
|
+
}
|
|
107
|
+
function a(t3, e3) {
|
|
108
|
+
if (t3) {
|
|
109
|
+
if ("string" == typeof t3)
|
|
110
|
+
return c(t3, e3);
|
|
111
|
+
var r3 = Object.prototype.toString.call(t3).slice(8, -1);
|
|
112
|
+
return "Object" === r3 && t3.constructor && (r3 = t3.constructor.name), "Map" === r3 || "Set" === r3 ? Array.from(t3) : "Arguments" === r3 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r3) ? c(t3, e3) : void 0;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
function c(t3, e3) {
|
|
116
|
+
(null == e3 || e3 > t3.length) && (e3 = t3.length);
|
|
117
|
+
for (var r3 = 0, n2 = new Array(e3); r3 < e3; r3++)
|
|
118
|
+
n2[r3] = t3[r3];
|
|
119
|
+
return n2;
|
|
120
|
+
}
|
|
121
|
+
function l(t3, e3) {
|
|
122
|
+
var r3 = Object.keys(t3);
|
|
123
|
+
if (Object.getOwnPropertySymbols) {
|
|
124
|
+
var n2 = Object.getOwnPropertySymbols(t3);
|
|
125
|
+
e3 && (n2 = n2.filter(function(e4) {
|
|
126
|
+
return Object.getOwnPropertyDescriptor(t3, e4).enumerable;
|
|
127
|
+
})), r3.push.apply(r3, n2);
|
|
128
|
+
}
|
|
129
|
+
return r3;
|
|
130
|
+
}
|
|
131
|
+
function u(t3) {
|
|
132
|
+
for (var e3 = 1; e3 < arguments.length; e3++) {
|
|
133
|
+
var r3 = null != arguments[e3] ? arguments[e3] : {};
|
|
134
|
+
e3 % 2 ? l(Object(r3), true).forEach(function(e4) {
|
|
135
|
+
f(t3, e4, r3[e4]);
|
|
136
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t3, Object.getOwnPropertyDescriptors(r3)) : l(Object(r3)).forEach(function(e4) {
|
|
137
|
+
Object.defineProperty(t3, e4, Object.getOwnPropertyDescriptor(r3, e4));
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
return t3;
|
|
141
|
+
}
|
|
142
|
+
function f(t3, e3, r3) {
|
|
143
|
+
return e3 in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
|
|
144
|
+
}
|
|
145
|
+
var p, s, y = r2(459), g = y.internalBinding, d = y.Array, b = y.ArrayIsArray, h = y.ArrayPrototypeFilter, v = y.ArrayPrototypeForEach, m = y.ArrayPrototypePop, S = y.ArrayPrototypePush, P = y.ArrayPrototypePushApply, O = y.ArrayPrototypeSort, x = y.ArrayPrototypeUnshift, w = y.BigIntPrototypeValueOf, A = y.BooleanPrototypeValueOf, j = y.DatePrototypeGetTime, E = y.DatePrototypeToISOString, L = y.DatePrototypeToString, F = y.ErrorPrototypeToString, I = y.FunctionPrototypeCall, T = y.FunctionPrototypeToString, k = y.JSONStringify, R = y.MapPrototypeGetSize, _ = y.MapPrototypeEntries, z = y.MathFloor, M = y.MathMax, N = y.MathMin, B = y.MathRound, D = y.MathSqrt, C = y.MathTrunc, G = y.Number, W = y.NumberIsFinite, H = y.NumberIsNaN, V = y.NumberParseFloat, U = y.NumberParseInt, $ = y.NumberPrototypeValueOf, Z = y.Object, Y = y.ObjectAssign, K = y.ObjectCreate, q = y.ObjectDefineProperty, J = y.ObjectGetOwnPropertyDescriptor, Q = y.ObjectGetOwnPropertyNames, X = y.ObjectGetOwnPropertySymbols, tt = y.ObjectGetPrototypeOf, et = y.ObjectIs, rt = y.ObjectKeys, nt = y.ObjectPrototypeHasOwnProperty, ot = y.ObjectPrototypePropertyIsEnumerable, it = y.ObjectSeal, at = y.ObjectSetPrototypeOf, ct = y.ReflectOwnKeys, lt = y.RegExp, ut = y.RegExpPrototypeTest, ft = y.RegExpPrototypeToString, pt = y.SafeStringIterator, st = y.SafeMap, yt = y.SafeSet, gt = y.SetPrototypeGetSize, dt = y.SetPrototypeValues, bt = y.String, ht = y.StringPrototypeCharCodeAt, vt = y.StringPrototypeCodePointAt, mt = y.StringPrototypeIncludes, St = y.StringPrototypeNormalize, Pt = y.StringPrototypePadEnd, Ot = y.StringPrototypePadStart, xt = y.StringPrototypeRepeat, wt = y.StringPrototypeReplace, At = y.StringPrototypeSlice, jt = y.StringPrototypeSplit, Et = y.StringPrototypeToLowerCase, Lt = y.StringPrototypeTrim, Ft = y.StringPrototypeValueOf, It = y.SymbolPrototypeToString, Tt = y.SymbolPrototypeValueOf, kt = y.SymbolIterator, Rt = y.SymbolToStringTag, _t = y.TypedArrayPrototypeGetLength, zt = y.TypedArrayPrototypeGetSymbolToStringTag, Mt = y.Uint8Array, Nt = y.globalThis, Bt = y.uncurryThis, Dt = r2(493), Ct = Dt.getOwnNonIndexProperties, Gt = Dt.getPromiseDetails, Wt = Dt.getProxyDetails, Ht = Dt.kPending, Vt = Dt.kRejected, Ut = Dt.previewEntries, $t = Dt.getConstructorName, Zt = Dt.getExternalValue, Yt = Dt.propertyFilter, Kt = Yt.ALL_PROPERTIES, qt = Yt.ONLY_ENUMERABLE, Jt = Dt.Proxy, Qt = r2(719), Xt = Qt.customInspectSymbol, te = Qt.isError, ee = Qt.join, re = Qt.removeColors, ne = r2(962), oe = ne.codes.ERR_INVALID_ARG_TYPE, ie = ne.isStackOverflowError, ae = r2(715), ce = ae.isAsyncFunction, le = ae.isGeneratorFunction, ue = ae.isAnyArrayBuffer, fe = ae.isArrayBuffer, pe = ae.isArgumentsObject, se = ae.isBoxedPrimitive, ye = ae.isDataView, ge = ae.isExternal, de = ae.isMap, be = ae.isMapIterator, he = ae.isModuleNamespaceObject, ve = ae.isNativeError, me = ae.isPromise, Se = ae.isSet, Pe = ae.isSetIterator, Oe = ae.isWeakMap, xe = ae.isWeakSet, we = ae.isRegExp, Ae = ae.isDate, je = ae.isTypedArray, Ee = ae.isStringObject, Le = ae.isNumberObject, Fe = ae.isBooleanObject, Ie = ae.isBigIntObject, Te = r2(915), ke = r2(875).NativeModule, Re = r2(753), _e2 = Re.validateObject, ze = Re.validateString, Me = new yt(h(Q(Nt), function(t3) {
|
|
146
|
+
return ut(/^[A-Z][a-zA-Z0-9]+$/, t3);
|
|
147
|
+
})), Ne = function(t3) {
|
|
148
|
+
return void 0 === t3 && void 0 !== t3;
|
|
149
|
+
}, Be = it({ showHidden: false, depth: 2, colors: false, customInspect: true, showProxy: false, maxArrayLength: 100, maxStringLength: 1e4, breakLength: 80, compact: 3, sorted: false, getters: false, numericSeparator: false }), De = /[\x00-\x1f\x27\x5c\x7f-\x9f]|[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/, Ce = /[\x00-\x1f\x27\x5c\x7f-\x9f]|[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/g, Ge = /[\x00-\x1f\x5c\x7f-\x9f]|[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/, We = /[\x00-\x1f\x5c\x7f-\x9f]|[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/g, He = /^[a-zA-Z_][a-zA-Z_0-9]*$/, Ve = /^(0|[1-9][0-9]*)$/, Ue = /^ {4}at (?:[^/\\(]+ \(|)node:(.+):\d+:\d+\)?$/, $e = /[/\\]node_modules[/\\](.+?)(?=[/\\])/g, Ze = /^(\s+[^(]*?)\s*{/, Ye = /(\/\/.*?\n)|(\/\*(.|\n)*?\*\/)/g, Ke = ["\\x00", "\\x01", "\\x02", "\\x03", "\\x04", "\\x05", "\\x06", "\\x07", "\\b", "\\t", "\\n", "\\x0B", "\\f", "\\r", "\\x0E", "\\x0F", "\\x10", "\\x11", "\\x12", "\\x13", "\\x14", "\\x15", "\\x16", "\\x17", "\\x18", "\\x19", "\\x1A", "\\x1B", "\\x1C", "\\x1D", "\\x1E", "\\x1F", "", "", "", "", "", "", "", "\\'", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "\\\\", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "\\x7F", "\\x80", "\\x81", "\\x82", "\\x83", "\\x84", "\\x85", "\\x86", "\\x87", "\\x88", "\\x89", "\\x8A", "\\x8B", "\\x8C", "\\x8D", "\\x8E", "\\x8F", "\\x90", "\\x91", "\\x92", "\\x93", "\\x94", "\\x95", "\\x96", "\\x97", "\\x98", "\\x99", "\\x9A", "\\x9B", "\\x9C", "\\x9D", "\\x9E", "\\x9F"], qe = new lt("[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))", "g");
|
|
150
|
+
function Je(t3, e3) {
|
|
151
|
+
var r3 = { budget: {}, indentationLvl: 0, seen: [], currentDepth: 0, stylize: ir, showHidden: Be.showHidden, depth: Be.depth, colors: Be.colors, customInspect: Be.customInspect, showProxy: Be.showProxy, maxArrayLength: Be.maxArrayLength, maxStringLength: Be.maxStringLength, breakLength: Be.breakLength, compact: Be.compact, sorted: Be.sorted, getters: Be.getters, numericSeparator: Be.numericSeparator };
|
|
152
|
+
if (arguments.length > 1) {
|
|
153
|
+
if (arguments.length > 2 && (void 0 !== arguments[2] && (r3.depth = arguments[2]), arguments.length > 3 && void 0 !== arguments[3] && (r3.colors = arguments[3])), "boolean" == typeof e3)
|
|
154
|
+
r3.showHidden = e3;
|
|
155
|
+
else if (e3)
|
|
156
|
+
for (var n2 = rt(e3), o2 = 0; o2 < n2.length; ++o2) {
|
|
157
|
+
var i2 = n2[o2];
|
|
158
|
+
nt(Be, i2) || "stylize" === i2 ? r3[i2] = e3[i2] : void 0 === r3.userOptions && (r3.userOptions = e3);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return r3.colors && (r3.stylize = or), null === r3.maxArrayLength && (r3.maxArrayLength = 1 / 0), null === r3.maxStringLength && (r3.maxStringLength = 1 / 0), yr(r3, t3, 0);
|
|
162
|
+
}
|
|
163
|
+
Je.custom = Xt, q(Je, "defaultOptions", { get: function() {
|
|
164
|
+
return Be;
|
|
165
|
+
}, set: function(t3) {
|
|
166
|
+
return _e2(t3, "options"), Y(Be, t3);
|
|
167
|
+
} });
|
|
168
|
+
var Qe = 39, Xe = 49;
|
|
169
|
+
function tr(t3, e3) {
|
|
170
|
+
q(Je.colors, e3, { get: function() {
|
|
171
|
+
return this[t3];
|
|
172
|
+
}, set: function(e4) {
|
|
173
|
+
this[t3] = e4;
|
|
174
|
+
}, configurable: true, enumerable: false });
|
|
175
|
+
}
|
|
176
|
+
function er(t3, e3) {
|
|
177
|
+
return -1 === e3 ? '"'.concat(t3, '"') : -2 === e3 ? "`".concat(t3, "`") : "'".concat(t3, "'");
|
|
178
|
+
}
|
|
179
|
+
function rr(t3) {
|
|
180
|
+
var e3 = ht(t3);
|
|
181
|
+
return Ke.length > e3 ? Ke[e3] : "\\u".concat(e3.toString(16));
|
|
182
|
+
}
|
|
183
|
+
function nr(t3) {
|
|
184
|
+
var e3 = De, r3 = Ce, n2 = 39;
|
|
185
|
+
if (mt(t3, "'") && (mt(t3, '"') ? mt(t3, "`") || mt(t3, "${") || (n2 = -2) : n2 = -1, 39 !== n2 && (e3 = Ge, r3 = We)), t3.length < 5e3 && !ut(e3, t3))
|
|
186
|
+
return er(t3, n2);
|
|
187
|
+
if (t3.length > 100)
|
|
188
|
+
return er(t3 = wt(t3, r3, rr), n2);
|
|
189
|
+
for (var o2 = "", i2 = 0, a2 = 0; a2 < t3.length; a2++) {
|
|
190
|
+
var c2 = ht(t3, a2);
|
|
191
|
+
if (c2 === n2 || 92 === c2 || c2 < 32 || c2 > 126 && c2 < 160)
|
|
192
|
+
o2 += i2 === a2 ? Ke[c2] : "".concat(At(t3, i2, a2)).concat(Ke[c2]), i2 = a2 + 1;
|
|
193
|
+
else if (c2 >= 55296 && c2 <= 57343) {
|
|
194
|
+
if (c2 <= 56319 && a2 + 1 < t3.length) {
|
|
195
|
+
var l2 = ht(t3, a2 + 1);
|
|
196
|
+
if (l2 >= 56320 && l2 <= 57343) {
|
|
197
|
+
a2++;
|
|
198
|
+
continue;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
o2 += "".concat(At(t3, i2, a2), "\\u".concat(c2.toString(16))), i2 = a2 + 1;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
return i2 !== t3.length && (o2 += At(t3, i2)), er(o2, n2);
|
|
205
|
+
}
|
|
206
|
+
function or(t3, e3) {
|
|
207
|
+
var r3 = Je.styles[e3];
|
|
208
|
+
if (void 0 !== r3) {
|
|
209
|
+
var n2 = Je.colors[r3];
|
|
210
|
+
if (void 0 !== n2)
|
|
211
|
+
return "\x1B[".concat(n2[0], "m").concat(t3, "\x1B[").concat(n2[1], "m");
|
|
212
|
+
}
|
|
213
|
+
return t3;
|
|
214
|
+
}
|
|
215
|
+
function ir(t3) {
|
|
216
|
+
return t3;
|
|
217
|
+
}
|
|
218
|
+
function ar() {
|
|
219
|
+
return [];
|
|
220
|
+
}
|
|
221
|
+
function cr(t3, e3) {
|
|
222
|
+
try {
|
|
223
|
+
return t3 instanceof e3;
|
|
224
|
+
} catch (t4) {
|
|
225
|
+
return false;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
function lr(t3, e3, r3, n2) {
|
|
229
|
+
for (var o2, i2 = t3; t3 || Ne(t3); ) {
|
|
230
|
+
var a2 = J(t3, "constructor");
|
|
231
|
+
if (void 0 !== a2 && "function" == typeof a2.value && "" !== a2.value.name && cr(i2, a2.value))
|
|
232
|
+
return void 0 === n2 || o2 === t3 && Me.has(a2.value.name) || ur(e3, i2, o2 || i2, r3, n2), a2.value.name;
|
|
233
|
+
t3 = tt(t3), void 0 === o2 && (o2 = t3);
|
|
234
|
+
}
|
|
235
|
+
if (null === o2)
|
|
236
|
+
return null;
|
|
237
|
+
var c2 = $t(i2);
|
|
238
|
+
if (r3 > e3.depth && null !== e3.depth)
|
|
239
|
+
return "".concat(c2, " <Complex prototype>");
|
|
240
|
+
var l2 = lr(o2, e3, r3 + 1, n2);
|
|
241
|
+
return null === l2 ? "".concat(c2, " <").concat(Je(o2, u(u({}, e3), {}, { customInspect: false, depth: -1 })), ">") : "".concat(c2, " <").concat(l2, ">");
|
|
242
|
+
}
|
|
243
|
+
function ur(t3, e3, r3, n2, o2) {
|
|
244
|
+
var a2, c2, l2 = 0;
|
|
245
|
+
do {
|
|
246
|
+
if (0 !== l2 || e3 === r3) {
|
|
247
|
+
if (null === (r3 = tt(r3)))
|
|
248
|
+
return;
|
|
249
|
+
var u2 = J(r3, "constructor");
|
|
250
|
+
if (void 0 !== u2 && "function" == typeof u2.value && Me.has(u2.value.name))
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
0 === l2 ? c2 = new yt() : v(a2, function(t4) {
|
|
254
|
+
return c2.add(t4);
|
|
255
|
+
}), a2 = ct(r3), S(t3.seen, e3);
|
|
256
|
+
var f2, p2 = i(a2);
|
|
257
|
+
try {
|
|
258
|
+
for (p2.s(); !(f2 = p2.n()).done; ) {
|
|
259
|
+
var s2 = f2.value;
|
|
260
|
+
if (!("constructor" === s2 || nt(e3, s2) || 0 !== l2 && c2.has(s2))) {
|
|
261
|
+
var y2 = J(r3, s2);
|
|
262
|
+
if ("function" != typeof y2.value) {
|
|
263
|
+
var g2 = _r(t3, r3, n2, s2, 0, y2, e3);
|
|
264
|
+
t3.colors ? S(o2, "\x1B[2m".concat(g2, "\x1B[22m")) : S(o2, g2);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
} catch (t4) {
|
|
269
|
+
p2.e(t4);
|
|
270
|
+
} finally {
|
|
271
|
+
p2.f();
|
|
272
|
+
}
|
|
273
|
+
m(t3.seen);
|
|
274
|
+
} while (3 != ++l2);
|
|
275
|
+
}
|
|
276
|
+
function fr(t3, e3, r3) {
|
|
277
|
+
var n2 = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : "";
|
|
278
|
+
return null === t3 ? "" !== e3 && r3 !== e3 ? "[".concat(r3).concat(n2, ": null prototype] [").concat(e3, "] ") : "[".concat(r3).concat(n2, ": null prototype] ") : "" !== e3 && t3 !== e3 ? "".concat(t3).concat(n2, " [").concat(e3, "] ") : "".concat(t3).concat(n2, " ");
|
|
279
|
+
}
|
|
280
|
+
function pr(t3, e3) {
|
|
281
|
+
var r3, n2 = X(t3);
|
|
282
|
+
if (e3)
|
|
283
|
+
r3 = Q(t3), 0 !== n2.length && P(r3, n2);
|
|
284
|
+
else {
|
|
285
|
+
try {
|
|
286
|
+
r3 = rt(t3);
|
|
287
|
+
} catch (e4) {
|
|
288
|
+
Te(ve(e4) && "ReferenceError" === e4.name && he(t3)), r3 = Q(t3);
|
|
289
|
+
}
|
|
290
|
+
0 !== n2.length && P(r3, h(n2, function(e4) {
|
|
291
|
+
return ot(t3, e4);
|
|
292
|
+
}));
|
|
293
|
+
}
|
|
294
|
+
return r3;
|
|
295
|
+
}
|
|
296
|
+
function sr(t3, e3, r3) {
|
|
297
|
+
var n2 = "";
|
|
298
|
+
return null === e3 && (n2 = $t(t3)) === r3 && (n2 = "Object"), fr(e3, r3, n2);
|
|
299
|
+
}
|
|
300
|
+
function yr(t3, e3, r3, a2) {
|
|
301
|
+
if ("object" !== o(e3) && "function" != typeof e3 && !Ne(e3))
|
|
302
|
+
return mr(t3.stylize, e3, t3);
|
|
303
|
+
if (null === e3)
|
|
304
|
+
return t3.stylize("null", "null");
|
|
305
|
+
var c2 = e3, l2 = Wt(e3, !!t3.showProxy);
|
|
306
|
+
if (void 0 !== l2) {
|
|
307
|
+
if (t3.showProxy)
|
|
308
|
+
return function(t4, e4, r4) {
|
|
309
|
+
if (r4 > t4.depth && null !== t4.depth)
|
|
310
|
+
return t4.stylize("Proxy [Array]", "special");
|
|
311
|
+
r4 += 1, t4.indentationLvl += 2;
|
|
312
|
+
var n2 = [yr(t4, e4[0], r4), yr(t4, e4[1], r4)];
|
|
313
|
+
return t4.indentationLvl -= 2, Mr(t4, n2, "", ["Proxy [", "]"], 2, r4);
|
|
314
|
+
}(t3, l2, r3);
|
|
315
|
+
e3 = l2;
|
|
316
|
+
}
|
|
317
|
+
if (t3.customInspect) {
|
|
318
|
+
var f2 = e3[Xt];
|
|
319
|
+
if ("function" == typeof f2 && f2 !== Je && (!e3.constructor || e3.constructor.prototype !== e3)) {
|
|
320
|
+
var p2 = null === t3.depth ? null : t3.depth - r3, s2 = I(f2, c2, p2, function(t4, e4) {
|
|
321
|
+
var r4 = u({ stylize: t4.stylize, showHidden: t4.showHidden, depth: t4.depth, colors: t4.colors, customInspect: t4.customInspect, showProxy: t4.showProxy, maxArrayLength: t4.maxArrayLength, maxStringLength: t4.maxStringLength, breakLength: t4.breakLength, compact: t4.compact, sorted: t4.sorted, getters: t4.getters, numericSeparator: t4.numericSeparator }, t4.userOptions);
|
|
322
|
+
if (e4) {
|
|
323
|
+
at(r4, null);
|
|
324
|
+
var n2, a3 = i(rt(r4));
|
|
325
|
+
try {
|
|
326
|
+
for (a3.s(); !(n2 = a3.n()).done; ) {
|
|
327
|
+
var c3 = n2.value;
|
|
328
|
+
"object" !== o(r4[c3]) && "function" != typeof r4[c3] || null === r4[c3] || delete r4[c3];
|
|
329
|
+
}
|
|
330
|
+
} catch (t5) {
|
|
331
|
+
a3.e(t5);
|
|
332
|
+
} finally {
|
|
333
|
+
a3.f();
|
|
334
|
+
}
|
|
335
|
+
r4.stylize = at(function(e5, r5) {
|
|
336
|
+
var n3;
|
|
337
|
+
try {
|
|
338
|
+
n3 = "".concat(t4.stylize(e5, r5));
|
|
339
|
+
} catch (t5) {
|
|
340
|
+
}
|
|
341
|
+
return "string" != typeof n3 ? e5 : n3;
|
|
342
|
+
}, null);
|
|
343
|
+
}
|
|
344
|
+
return r4;
|
|
345
|
+
}(t3, void 0 !== l2 || !(c2 instanceof Z)), Je);
|
|
346
|
+
if (s2 !== c2)
|
|
347
|
+
return "string" != typeof s2 ? yr(t3, s2, r3) : s2.replace(/\n/g, "\n".concat(" ".repeat(t3.indentationLvl)));
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
if (t3.seen.includes(e3)) {
|
|
351
|
+
var g2 = 1;
|
|
352
|
+
return void 0 === t3.circular ? (t3.circular = new st(), t3.circular.set(e3, g2)) : void 0 === (g2 = t3.circular.get(e3)) && (g2 = t3.circular.size + 1, t3.circular.set(e3, g2)), t3.stylize("[Circular *".concat(g2, "]"), "special");
|
|
353
|
+
}
|
|
354
|
+
return function(t4, e4, r4, o2) {
|
|
355
|
+
var a3, c3;
|
|
356
|
+
t4.showHidden && (r4 <= t4.depth || null === t4.depth) && (c3 = []);
|
|
357
|
+
var l3 = lr(e4, t4, r4, c3);
|
|
358
|
+
void 0 !== c3 && 0 === c3.length && (c3 = void 0);
|
|
359
|
+
var u2 = e4[Rt];
|
|
360
|
+
("string" != typeof u2 || "" !== u2 && (t4.showHidden ? nt : ot)(e4, Rt)) && (u2 = "");
|
|
361
|
+
var f3, p3, s3 = "", g3 = ar, d2 = true, h2 = 0, v2 = t4.showHidden ? Kt : qt, m2 = 0;
|
|
362
|
+
if (e4[kt] || null === l3)
|
|
363
|
+
if (d2 = false, b(e4)) {
|
|
364
|
+
var S2 = "Array" !== l3 || "" !== u2 ? fr(l3, u2, "Array", "(".concat(e4.length, ")")) : "";
|
|
365
|
+
if (a3 = Ct(e4, v2), f3 = ["".concat(S2, "["), "]"], 0 === e4.length && 0 === a3.length && void 0 === c3)
|
|
366
|
+
return "".concat(f3[0], "]");
|
|
367
|
+
m2 = 2, g3 = xr;
|
|
368
|
+
} else if (Se(e4)) {
|
|
369
|
+
var P2 = gt(e4), O2 = fr(l3, u2, "Set", "(".concat(P2, ")"));
|
|
370
|
+
if (a3 = pr(e4, t4.showHidden), g3 = null !== l3 ? Ar.bind(null, e4) : Ar.bind(null, dt(e4)), 0 === P2 && 0 === a3.length && void 0 === c3)
|
|
371
|
+
return "".concat(O2, "{}");
|
|
372
|
+
f3 = ["".concat(O2, "{"), "}"];
|
|
373
|
+
} else if (de(e4)) {
|
|
374
|
+
var F2 = R(e4), I2 = fr(l3, u2, "Map", "(".concat(F2, ")"));
|
|
375
|
+
if (a3 = pr(e4, t4.showHidden), g3 = null !== l3 ? jr.bind(null, e4) : jr.bind(null, _(e4)), 0 === F2 && 0 === a3.length && void 0 === c3)
|
|
376
|
+
return "".concat(I2, "{}");
|
|
377
|
+
f3 = ["".concat(I2, "{"), "}"];
|
|
378
|
+
} else if (je(e4)) {
|
|
379
|
+
a3 = Ct(e4, v2);
|
|
380
|
+
var k2 = e4, z2 = "";
|
|
381
|
+
null === l3 && (z2 = zt(e4), k2 = new y[z2](e4));
|
|
382
|
+
var M2 = _t(e4), B2 = fr(l3, u2, z2, "(".concat(M2, ")"));
|
|
383
|
+
if (f3 = ["".concat(B2, "["), "]"], 0 === e4.length && 0 === a3.length && !t4.showHidden)
|
|
384
|
+
return "".concat(f3[0], "]");
|
|
385
|
+
g3 = wr.bind(null, k2, M2), m2 = 2;
|
|
386
|
+
} else
|
|
387
|
+
be(e4) ? (a3 = pr(e4, t4.showHidden), f3 = gr("Map", u2), g3 = kr.bind(null, f3)) : Pe(e4) ? (a3 = pr(e4, t4.showHidden), f3 = gr("Set", u2), g3 = kr.bind(null, f3)) : d2 = true;
|
|
388
|
+
if (d2)
|
|
389
|
+
if (a3 = pr(e4, t4.showHidden), f3 = ["{", "}"], "Object" === l3) {
|
|
390
|
+
if (pe(e4) ? f3[0] = "[Arguments] {" : "" !== u2 && (f3[0] = "".concat(fr(l3, u2, "Object"), "{")), 0 === a3.length && void 0 === c3)
|
|
391
|
+
return "".concat(f3[0], "}");
|
|
392
|
+
} else if ("function" == typeof e4) {
|
|
393
|
+
if (s3 = function(t5, e5, r5) {
|
|
394
|
+
var n2 = T(t5);
|
|
395
|
+
if (n2.startsWith("class") && n2.endsWith("}")) {
|
|
396
|
+
var o3 = n2.slice(5, -1), i2 = o3.indexOf("{");
|
|
397
|
+
if (-1 !== i2 && (!o3.slice(0, i2).includes("(") || Ze.test(o3.replace(Ye))))
|
|
398
|
+
return function(t6, e6, r6) {
|
|
399
|
+
var n3 = nt(t6, "name") && t6.name || "(anonymous)", o4 = "class ".concat(n3);
|
|
400
|
+
if ("Function" !== e6 && null !== e6 && (o4 += " [".concat(e6, "]")), "" !== r6 && e6 !== r6 && (o4 += " [".concat(r6, "]")), null !== e6) {
|
|
401
|
+
var i3 = tt(t6).name;
|
|
402
|
+
i3 && (o4 += " extends ".concat(i3));
|
|
403
|
+
} else
|
|
404
|
+
o4 += " extends [null prototype]";
|
|
405
|
+
return "[".concat(o4, "]");
|
|
406
|
+
}(t5, e5, r5);
|
|
407
|
+
}
|
|
408
|
+
var a4 = "Function";
|
|
409
|
+
le(t5) && (a4 = "Generator".concat(a4)), ce(t5) && (a4 = "Async".concat(a4));
|
|
410
|
+
var c4 = "[".concat(a4);
|
|
411
|
+
return null === e5 && (c4 += " (null prototype)"), "" === t5.name ? c4 += " (anonymous)" : c4 += ": ".concat(t5.name), c4 += "]", e5 !== a4 && null !== e5 && (c4 += " ".concat(e5)), "" !== r5 && e5 !== r5 && (c4 += " [".concat(r5, "]")), c4;
|
|
412
|
+
}(e4, l3, u2), 0 === a3.length && void 0 === c3)
|
|
413
|
+
return t4.stylize(s3, "special");
|
|
414
|
+
} else if (we(e4)) {
|
|
415
|
+
s3 = ft(null !== l3 ? e4 : new lt(e4));
|
|
416
|
+
var D2 = fr(l3, u2, "RegExp");
|
|
417
|
+
if ("RegExp " !== D2 && (s3 = "".concat(D2).concat(s3)), 0 === a3.length && void 0 === c3 || r4 > t4.depth && null !== t4.depth)
|
|
418
|
+
return t4.stylize(s3, "regexp");
|
|
419
|
+
} else if (Ae(e4)) {
|
|
420
|
+
s3 = H(j(e4)) ? L(e4) : E(e4);
|
|
421
|
+
var C2 = fr(l3, u2, "Date");
|
|
422
|
+
if ("Date " !== C2 && (s3 = "".concat(C2).concat(s3)), 0 === a3.length && void 0 === c3)
|
|
423
|
+
return t4.stylize(s3, "date");
|
|
424
|
+
} else if (te(e4)) {
|
|
425
|
+
if (s3 = function(t5, e5, r5, n2, o3) {
|
|
426
|
+
var a4 = null != t5.name ? bt(t5.name) : "Error", c4 = dr(t5);
|
|
427
|
+
(function(t6, e6, r6, n3) {
|
|
428
|
+
if (!t6.showHidden && 0 !== e6.length)
|
|
429
|
+
for (var o4 = 0, i2 = ["name", "message", "stack"]; o4 < i2.length; o4++) {
|
|
430
|
+
var a5 = i2[o4], c5 = e6.indexOf(a5);
|
|
431
|
+
-1 !== c5 && n3.includes(r6[a5]) && e6.splice(c5, 1);
|
|
432
|
+
}
|
|
433
|
+
})(n2, o3, t5, c4), !("cause" in t5) || 0 !== o3.length && o3.includes("cause") || o3.push("cause"), c4 = function(t6, e6, r6, n3) {
|
|
434
|
+
var o4 = r6.length;
|
|
435
|
+
if (null === e6 || r6.endsWith("Error") && t6.startsWith(r6) && (t6.length === o4 || ":" === t6[o4] || "\n" === t6[o4])) {
|
|
436
|
+
var i2 = "Error";
|
|
437
|
+
if (null === e6) {
|
|
438
|
+
var a5 = t6.match(/^([A-Z][a-z_ A-Z0-9[\]()-]+)(?::|\n {4}at)/) || t6.match(/^([a-z_A-Z0-9-]*Error)$/);
|
|
439
|
+
o4 = (i2 = a5 && a5[1] || "").length, i2 = i2 || "Error";
|
|
440
|
+
}
|
|
441
|
+
var c5 = fr(e6, n3, i2).slice(0, -1);
|
|
442
|
+
r6 !== c5 && (t6 = c5.includes(r6) ? 0 === o4 ? "".concat(c5, ": ").concat(t6) : "".concat(c5).concat(t6.slice(o4)) : "".concat(c5, " [").concat(r6, "]").concat(t6.slice(o4)));
|
|
443
|
+
}
|
|
444
|
+
return t6;
|
|
445
|
+
}(c4, e5, a4, r5);
|
|
446
|
+
var l4 = t5.message && c4.indexOf(t5.message) || -1;
|
|
447
|
+
-1 !== l4 && (l4 += t5.message.length);
|
|
448
|
+
var u3 = c4.indexOf("\n at", l4);
|
|
449
|
+
if (-1 === u3)
|
|
450
|
+
c4 = "[".concat(c4, "]");
|
|
451
|
+
else {
|
|
452
|
+
var f4 = c4.slice(0, u3), p4 = function(t6, e6, r6) {
|
|
453
|
+
var n3 = r6.split("\n");
|
|
454
|
+
if (e6.cause && te(e6.cause)) {
|
|
455
|
+
var o4 = dr(e6.cause), i2 = o4.indexOf("\n at");
|
|
456
|
+
if (-1 !== i2) {
|
|
457
|
+
var a5 = function(t7, e7) {
|
|
458
|
+
for (var r7 = 0; r7 < t7.length - 3; r7++) {
|
|
459
|
+
var n4 = e7.indexOf(t7[r7]);
|
|
460
|
+
if (-1 !== n4) {
|
|
461
|
+
var o5 = e7.length - n4;
|
|
462
|
+
if (o5 > 3) {
|
|
463
|
+
for (var i3 = 1, a6 = N(t7.length - r7, o5); a6 > i3 && t7[r7 + i3] === e7[n4 + i3]; )
|
|
464
|
+
i3++;
|
|
465
|
+
if (i3 > 3)
|
|
466
|
+
return { len: i3, offset: r7 };
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
return { len: 0, offset: 0 };
|
|
471
|
+
}(n3, o4.slice(i2 + 1).split("\n")), c5 = a5.len, l5 = a5.offset;
|
|
472
|
+
if (c5 > 0) {
|
|
473
|
+
var u4 = c5 - 2, f5 = " ... ".concat(u4, " lines matching cause stack trace ...");
|
|
474
|
+
n3.splice(l5 + 1, u4, t6.stylize(f5, "undefined"));
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
return n3;
|
|
479
|
+
}(n2, t5, c4.slice(u3 + 1));
|
|
480
|
+
if (n2.colors) {
|
|
481
|
+
var s4, y2 = i(p4);
|
|
482
|
+
try {
|
|
483
|
+
for (y2.s(); !(s4 = y2.n()).done; ) {
|
|
484
|
+
var g4 = s4.value, d3 = g4.match(Ue);
|
|
485
|
+
if (null !== d3 && ke.exists(d3[1]))
|
|
486
|
+
f4 += "\n".concat(n2.stylize(g4, "undefined"));
|
|
487
|
+
else {
|
|
488
|
+
var b2 = void 0;
|
|
489
|
+
f4 += "\n";
|
|
490
|
+
for (var h3 = 0; null !== (b2 = $e.exec(g4)); )
|
|
491
|
+
f4 += g4.slice(h3, b2.index + 14), f4 += n2.stylize(b2[1], "module"), h3 = b2.index + b2[0].length;
|
|
492
|
+
f4 += 0 === h3 ? g4 : g4.slice(h3);
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
} catch (t6) {
|
|
496
|
+
y2.e(t6);
|
|
497
|
+
} finally {
|
|
498
|
+
y2.f();
|
|
499
|
+
}
|
|
500
|
+
} else
|
|
501
|
+
f4 += "\n".concat(p4.join("\n"));
|
|
502
|
+
c4 = f4;
|
|
503
|
+
}
|
|
504
|
+
if (0 !== n2.indentationLvl) {
|
|
505
|
+
var v3 = " ".repeat(n2.indentationLvl);
|
|
506
|
+
c4 = c4.replace(/\n/g, "\n".concat(v3));
|
|
507
|
+
}
|
|
508
|
+
return c4;
|
|
509
|
+
}(e4, l3, u2, t4, a3), 0 === a3.length && void 0 === c3)
|
|
510
|
+
return s3;
|
|
511
|
+
} else if (ue(e4)) {
|
|
512
|
+
var G2 = fr(l3, u2, fe(e4) ? "ArrayBuffer" : "SharedArrayBuffer");
|
|
513
|
+
if (void 0 === o2)
|
|
514
|
+
g3 = Or;
|
|
515
|
+
else if (0 === a3.length && void 0 === c3)
|
|
516
|
+
return G2 + "{ byteLength: ".concat(hr(t4.stylize, e4.byteLength, false), " }");
|
|
517
|
+
f3[0] = "".concat(G2, "{"), x(a3, "byteLength");
|
|
518
|
+
} else if (ye(e4))
|
|
519
|
+
f3[0] = "".concat(fr(l3, u2, "DataView"), "{"), x(a3, "byteLength", "byteOffset", "buffer");
|
|
520
|
+
else if (me(e4))
|
|
521
|
+
f3[0] = "".concat(fr(l3, u2, "Promise"), "{"), g3 = Rr;
|
|
522
|
+
else if (xe(e4))
|
|
523
|
+
f3[0] = "".concat(fr(l3, u2, "WeakSet"), "{"), g3 = t4.showHidden ? Ir : Fr;
|
|
524
|
+
else if (Oe(e4))
|
|
525
|
+
f3[0] = "".concat(fr(l3, u2, "WeakMap"), "{"), g3 = t4.showHidden ? Tr : Fr;
|
|
526
|
+
else if (he(e4))
|
|
527
|
+
f3[0] = "".concat(fr(l3, u2, "Module"), "{"), g3 = Sr.bind(null, a3);
|
|
528
|
+
else if (se(e4)) {
|
|
529
|
+
if (s3 = function(t5, e5, r5, n2, o3) {
|
|
530
|
+
var i2, a4;
|
|
531
|
+
Le(t5) ? (i2 = $, a4 = "Number") : Ee(t5) ? (i2 = Ft, a4 = "String", r5.splice(0, t5.length)) : Fe(t5) ? (i2 = A, a4 = "Boolean") : Ie(t5) ? (i2 = w, a4 = "BigInt") : (i2 = Tt, a4 = "Symbol");
|
|
532
|
+
var c4 = "[".concat(a4);
|
|
533
|
+
return a4 !== n2 && (c4 += null === n2 ? " (null prototype)" : " (".concat(n2, ")")), c4 += ": ".concat(mr(ir, i2(t5), e5), "]"), "" !== o3 && o3 !== n2 && (c4 += " [".concat(o3, "]")), 0 !== r5.length || e5.stylize === ir ? c4 : e5.stylize(c4, Et(a4));
|
|
534
|
+
}(e4, t4, a3, l3, u2), 0 === a3.length && void 0 === c3)
|
|
535
|
+
return s3;
|
|
536
|
+
} else {
|
|
537
|
+
if (0 === a3.length && void 0 === c3) {
|
|
538
|
+
if (ge(e4)) {
|
|
539
|
+
var W2 = Zt(e4).toString(16);
|
|
540
|
+
return t4.stylize("[External: ".concat(W2, "]"), "special");
|
|
541
|
+
}
|
|
542
|
+
return "".concat(sr(e4, l3, u2), "{}");
|
|
543
|
+
}
|
|
544
|
+
f3[0] = "".concat(sr(e4, l3, u2), "{");
|
|
545
|
+
}
|
|
546
|
+
if (r4 > t4.depth && null !== t4.depth) {
|
|
547
|
+
var V2 = sr(e4, l3, u2).slice(0, -1);
|
|
548
|
+
return null !== l3 && (V2 = "[".concat(V2, "]")), t4.stylize(V2, "special");
|
|
549
|
+
}
|
|
550
|
+
r4 += 1, t4.seen.push(e4), t4.currentDepth = r4;
|
|
551
|
+
var U2 = t4.indentationLvl;
|
|
552
|
+
try {
|
|
553
|
+
for (p3 = g3(t4, e4, r4), h2 = 0; h2 < a3.length; h2++)
|
|
554
|
+
p3.push(_r(t4, e4, r4, a3[h2], m2));
|
|
555
|
+
var Z2;
|
|
556
|
+
void 0 !== c3 && (Z2 = p3).push.apply(Z2, n(c3));
|
|
557
|
+
} catch (r5) {
|
|
558
|
+
return function(t5, e5, r6, n2) {
|
|
559
|
+
if (ie(e5))
|
|
560
|
+
return t5.seen.pop(), t5.indentationLvl = n2, t5.stylize("[".concat(r6, ": Inspection interrupted ") + "prematurely. Maximum call stack size exceeded.]", "special");
|
|
561
|
+
Te.fail(e5.stack);
|
|
562
|
+
}(t4, r5, sr(e4, l3, u2).slice(0, -1), U2);
|
|
563
|
+
}
|
|
564
|
+
if (void 0 !== t4.circular) {
|
|
565
|
+
var Y2 = t4.circular.get(e4);
|
|
566
|
+
if (void 0 !== Y2) {
|
|
567
|
+
var K2 = t4.stylize("<ref *".concat(Y2, ">"), "special");
|
|
568
|
+
true !== t4.compact ? s3 = "" === s3 ? K2 : "".concat(K2, " ").concat(s3) : f3[0] = "".concat(K2, " ").concat(f3[0]);
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
if (t4.seen.pop(), t4.sorted) {
|
|
572
|
+
var q2 = true === t4.sorted ? void 0 : t4.sorted;
|
|
573
|
+
if (0 === m2)
|
|
574
|
+
p3 = p3.sort(q2);
|
|
575
|
+
else if (a3.length > 1) {
|
|
576
|
+
var J2, Q2 = p3.slice(p3.length - a3.length).sort(q2);
|
|
577
|
+
(J2 = p3).splice.apply(J2, [p3.length - a3.length, a3.length].concat(n(Q2)));
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
var X2 = Mr(t4, p3, s3, f3, m2, r4, e4), et2 = (t4.budget[t4.indentationLvl] || 0) + X2.length;
|
|
581
|
+
return t4.budget[t4.indentationLvl] = et2, et2 > Math.pow(2, 27) && (t4.depth = -1), X2;
|
|
582
|
+
}(t3, e3, r3, a2);
|
|
583
|
+
}
|
|
584
|
+
function gr(t3, e3) {
|
|
585
|
+
return e3 !== "".concat(t3, " Iterator") && ("" !== e3 && (e3 += "] ["), e3 += "".concat(t3, " Iterator")), ["[".concat(e3, "] {"), "}"];
|
|
586
|
+
}
|
|
587
|
+
function dr(t3) {
|
|
588
|
+
return t3.stack ? bt(t3.stack) : F(t3);
|
|
589
|
+
}
|
|
590
|
+
function br(t3) {
|
|
591
|
+
for (var e3 = "", r3 = t3.length, n2 = t3.startsWith("-") ? 1 : 0; r3 >= n2 + 4; r3 -= 3)
|
|
592
|
+
e3 = "_".concat(t3.slice(r3 - 3, r3)).concat(e3);
|
|
593
|
+
return r3 === t3.length ? t3 : "".concat(t3.slice(0, r3)).concat(e3);
|
|
594
|
+
}
|
|
595
|
+
function hr(t3, e3, r3) {
|
|
596
|
+
if (!r3)
|
|
597
|
+
return et(e3, -0) ? t3("-0", "number") : t3("".concat(e3), "number");
|
|
598
|
+
var n2 = C(e3), o2 = bt(n2);
|
|
599
|
+
return n2 === e3 ? !W(e3) || o2.includes("e") ? t3(o2, "number") : t3("".concat(br(o2)), "number") : H(e3) ? t3(o2, "number") : t3("".concat(br(o2), ".").concat(function(t4) {
|
|
600
|
+
for (var e4 = "", r4 = 0; r4 < t4.length - 3; r4 += 3)
|
|
601
|
+
e4 += "".concat(t4.slice(r4, r4 + 3), "_");
|
|
602
|
+
return 0 === r4 ? t4 : "".concat(e4).concat(t4.slice(r4));
|
|
603
|
+
}(bt(e3).slice(o2.length + 1))), "number");
|
|
604
|
+
}
|
|
605
|
+
function vr(t3, e3, r3) {
|
|
606
|
+
var n2 = bt(e3);
|
|
607
|
+
return t3("".concat(r3 ? br(n2) : n2, "n"), "bigint");
|
|
608
|
+
}
|
|
609
|
+
function mr(t3, e3, r3) {
|
|
610
|
+
if ("string" == typeof e3) {
|
|
611
|
+
var n2 = "";
|
|
612
|
+
if (e3.length > r3.maxStringLength) {
|
|
613
|
+
var o2 = e3.length - r3.maxStringLength;
|
|
614
|
+
e3 = e3.slice(0, r3.maxStringLength), n2 = "... ".concat(o2, " more character").concat(o2 > 1 ? "s" : "");
|
|
615
|
+
}
|
|
616
|
+
return true !== r3.compact && e3.length > 16 && e3.length > r3.breakLength - r3.indentationLvl - 4 ? e3.split(/\n/).map(function(e4, r4, n3) {
|
|
617
|
+
return t3(nr(e4 + (r4 === n3.length - 1 ? "" : "\n")), "string");
|
|
618
|
+
}).join(" +\n".concat(" ".repeat(r3.indentationLvl + 2))) + n2 : t3(nr(e3), "string") + n2;
|
|
619
|
+
}
|
|
620
|
+
return "number" == typeof e3 ? hr(t3, e3, r3.numericSeparator) : "bigint" == typeof e3 ? vr(t3, e3, r3.numericSeparator) : "boolean" == typeof e3 ? t3("".concat(e3), "boolean") : void 0 === e3 ? t3("undefined", "undefined") : t3(It(e3), "symbol");
|
|
621
|
+
}
|
|
622
|
+
function Sr(t3, e3, r3, n2) {
|
|
623
|
+
for (var o2 = new d(t3.length), i2 = 0; i2 < t3.length; i2++)
|
|
624
|
+
try {
|
|
625
|
+
o2[i2] = _r(e3, r3, n2, t3[i2], 0);
|
|
626
|
+
} catch (r4) {
|
|
627
|
+
Te(ve(r4) && "ReferenceError" === r4.name);
|
|
628
|
+
var a2 = f({}, t3[i2], "");
|
|
629
|
+
o2[i2] = _r(e3, a2, n2, t3[i2], 0);
|
|
630
|
+
var c2 = o2[i2].lastIndexOf(" ");
|
|
631
|
+
o2[i2] = o2[i2].slice(0, c2 + 1) + e3.stylize("<uninitialized>", "special");
|
|
632
|
+
}
|
|
633
|
+
return t3.length = 0, o2;
|
|
634
|
+
}
|
|
635
|
+
function Pr(t3, e3, r3, n2, o2, i2) {
|
|
636
|
+
for (var a2 = rt(e3), c2 = i2; i2 < a2.length && o2.length < n2; i2++) {
|
|
637
|
+
var l2 = a2[i2], u2 = +l2;
|
|
638
|
+
if (u2 > Math.pow(2, 32) - 2)
|
|
639
|
+
break;
|
|
640
|
+
if ("".concat(c2) !== l2) {
|
|
641
|
+
if (!Ve.test(l2))
|
|
642
|
+
break;
|
|
643
|
+
var f2 = u2 - c2, p2 = f2 > 1 ? "s" : "", s2 = "<".concat(f2, " empty item").concat(p2, ">");
|
|
644
|
+
if (o2.push(t3.stylize(s2, "undefined")), c2 = u2, o2.length === n2)
|
|
645
|
+
break;
|
|
646
|
+
}
|
|
647
|
+
o2.push(_r(t3, e3, r3, l2, 1)), c2++;
|
|
648
|
+
}
|
|
649
|
+
var y2 = e3.length - c2;
|
|
650
|
+
if (o2.length !== n2) {
|
|
651
|
+
if (y2 > 0) {
|
|
652
|
+
var g2 = y2 > 1 ? "s" : "", d2 = "<".concat(y2, " empty item").concat(g2, ">");
|
|
653
|
+
o2.push(t3.stylize(d2, "undefined"));
|
|
654
|
+
}
|
|
655
|
+
} else
|
|
656
|
+
y2 > 0 && o2.push("... ".concat(y2, " more item").concat(y2 > 1 ? "s" : ""));
|
|
657
|
+
return o2;
|
|
658
|
+
}
|
|
659
|
+
function Or(t3, e3) {
|
|
660
|
+
var n2;
|
|
661
|
+
try {
|
|
662
|
+
n2 = new Mt(e3);
|
|
663
|
+
} catch (e4) {
|
|
664
|
+
return [t3.stylize("(detached)", "special")];
|
|
665
|
+
}
|
|
666
|
+
void 0 === p && (p = Bt(r2(794).l.prototype.hexSlice));
|
|
667
|
+
var o2 = Lt(wt(p(n2, 0, N(t3.maxArrayLength, n2.length)), /(.{2})/g, "$1 ")), i2 = n2.length - t3.maxArrayLength;
|
|
668
|
+
return i2 > 0 && (o2 += " ... ".concat(i2, " more byte").concat(i2 > 1 ? "s" : "")), ["".concat(t3.stylize("[Uint8Contents]", "special"), ": <").concat(o2, ">")];
|
|
669
|
+
}
|
|
670
|
+
function xr(t3, e3, r3) {
|
|
671
|
+
for (var n2 = e3.length, o2 = N(M(0, t3.maxArrayLength), n2), i2 = n2 - o2, a2 = [], c2 = 0; c2 < o2; c2++) {
|
|
672
|
+
if (!nt(e3, c2))
|
|
673
|
+
return Pr(t3, e3, r3, o2, a2, c2);
|
|
674
|
+
a2.push(_r(t3, e3, r3, c2, 1));
|
|
675
|
+
}
|
|
676
|
+
return i2 > 0 && a2.push("... ".concat(i2, " more item").concat(i2 > 1 ? "s" : "")), a2;
|
|
677
|
+
}
|
|
678
|
+
function wr(t3, e3, r3, n2, o2) {
|
|
679
|
+
for (var i2 = N(M(0, r3.maxArrayLength), e3), a2 = t3.length - i2, c2 = new d(i2), l2 = t3.length > 0 && "number" == typeof t3[0] ? hr : vr, u2 = 0; u2 < i2; ++u2)
|
|
680
|
+
c2[u2] = l2(r3.stylize, t3[u2], r3.numericSeparator);
|
|
681
|
+
if (a2 > 0 && (c2[i2] = "... ".concat(a2, " more item").concat(a2 > 1 ? "s" : "")), r3.showHidden) {
|
|
682
|
+
r3.indentationLvl += 2;
|
|
683
|
+
for (var f2 = 0, p2 = ["BYTES_PER_ELEMENT", "length", "byteLength", "byteOffset", "buffer"]; f2 < p2.length; f2++) {
|
|
684
|
+
var s2 = p2[f2], y2 = yr(r3, t3[s2], o2, true);
|
|
685
|
+
S(c2, "[".concat(s2, "]: ").concat(y2));
|
|
686
|
+
}
|
|
687
|
+
r3.indentationLvl -= 2;
|
|
688
|
+
}
|
|
689
|
+
return c2;
|
|
690
|
+
}
|
|
691
|
+
function Ar(t3, e3, r3, n2) {
|
|
692
|
+
var o2 = [];
|
|
693
|
+
e3.indentationLvl += 2;
|
|
694
|
+
var a2, c2 = i(t3);
|
|
695
|
+
try {
|
|
696
|
+
for (c2.s(); !(a2 = c2.n()).done; ) {
|
|
697
|
+
var l2 = a2.value;
|
|
698
|
+
S(o2, yr(e3, l2, n2));
|
|
699
|
+
}
|
|
700
|
+
} catch (t4) {
|
|
701
|
+
c2.e(t4);
|
|
702
|
+
} finally {
|
|
703
|
+
c2.f();
|
|
704
|
+
}
|
|
705
|
+
return e3.indentationLvl -= 2, o2;
|
|
706
|
+
}
|
|
707
|
+
function jr(t3, e3, r3, n2) {
|
|
708
|
+
var o2 = [];
|
|
709
|
+
e3.indentationLvl += 2;
|
|
710
|
+
var a2, c2 = i(t3);
|
|
711
|
+
try {
|
|
712
|
+
for (c2.s(); !(a2 = c2.n()).done; ) {
|
|
713
|
+
var l2 = a2.value, u2 = l2[0], f2 = l2[1];
|
|
714
|
+
o2.push("".concat(yr(e3, u2, n2), " => ").concat(yr(e3, f2, n2)));
|
|
715
|
+
}
|
|
716
|
+
} catch (t4) {
|
|
717
|
+
c2.e(t4);
|
|
718
|
+
} finally {
|
|
719
|
+
c2.f();
|
|
720
|
+
}
|
|
721
|
+
return e3.indentationLvl -= 2, o2;
|
|
722
|
+
}
|
|
723
|
+
function Er(t3, e3, r3, n2) {
|
|
724
|
+
var o2 = M(t3.maxArrayLength, 0), i2 = N(o2, r3.length), a2 = new d(i2);
|
|
725
|
+
t3.indentationLvl += 2;
|
|
726
|
+
for (var c2 = 0; c2 < i2; c2++)
|
|
727
|
+
a2[c2] = yr(t3, r3[c2], e3);
|
|
728
|
+
t3.indentationLvl -= 2, 0 !== n2 || t3.sorted || O(a2);
|
|
729
|
+
var l2 = r3.length - i2;
|
|
730
|
+
return l2 > 0 && S(a2, "... ".concat(l2, " more item").concat(l2 > 1 ? "s" : "")), a2;
|
|
731
|
+
}
|
|
732
|
+
function Lr(t3, e3, r3, n2) {
|
|
733
|
+
var o2 = M(t3.maxArrayLength, 0), i2 = r3.length / 2, a2 = i2 - o2, c2 = N(o2, i2), l2 = new d(c2), u2 = 0;
|
|
734
|
+
if (t3.indentationLvl += 2, 0 === n2) {
|
|
735
|
+
for (; u2 < c2; u2++) {
|
|
736
|
+
var f2 = 2 * u2;
|
|
737
|
+
l2[u2] = "".concat(yr(t3, r3[f2], e3), " => ").concat(yr(t3, r3[f2 + 1], e3));
|
|
738
|
+
}
|
|
739
|
+
t3.sorted || (l2 = l2.sort());
|
|
740
|
+
} else
|
|
741
|
+
for (; u2 < c2; u2++) {
|
|
742
|
+
var p2 = 2 * u2, s2 = [yr(t3, r3[p2], e3), yr(t3, r3[p2 + 1], e3)];
|
|
743
|
+
l2[u2] = Mr(t3, s2, "", ["[", "]"], 2, e3);
|
|
744
|
+
}
|
|
745
|
+
return t3.indentationLvl -= 2, a2 > 0 && l2.push("... ".concat(a2, " more item").concat(a2 > 1 ? "s" : "")), l2;
|
|
746
|
+
}
|
|
747
|
+
function Fr(t3) {
|
|
748
|
+
return [t3.stylize("<items unknown>", "special")];
|
|
749
|
+
}
|
|
750
|
+
function Ir(t3, e3, r3) {
|
|
751
|
+
return Er(t3, r3, Ut(e3), 0);
|
|
752
|
+
}
|
|
753
|
+
function Tr(t3, e3, r3) {
|
|
754
|
+
return Lr(t3, r3, Ut(e3), 0);
|
|
755
|
+
}
|
|
756
|
+
function kr(t3, e3, r3, n2) {
|
|
757
|
+
var o2 = Ut(r3, true), i2 = o2[0];
|
|
758
|
+
return o2[1] ? (t3[0] = t3[0].replace(/ Iterator] {$/, " Entries] {"), Lr(e3, n2, i2, 2)) : Er(e3, n2, i2, 1);
|
|
759
|
+
}
|
|
760
|
+
function Rr(t3, e3, r3) {
|
|
761
|
+
var n2, o2 = Gt(e3), i2 = o2[0], a2 = o2[1];
|
|
762
|
+
if (i2 === Ht)
|
|
763
|
+
n2 = [t3.stylize("<pending>", "special")];
|
|
764
|
+
else {
|
|
765
|
+
t3.indentationLvl += 2;
|
|
766
|
+
var c2 = yr(t3, a2, r3);
|
|
767
|
+
t3.indentationLvl -= 2, n2 = [i2 === Vt ? "".concat(t3.stylize("<rejected>", "special"), " ").concat(c2) : c2];
|
|
768
|
+
}
|
|
769
|
+
return n2;
|
|
770
|
+
}
|
|
771
|
+
function _r(t3, e3, r3, n2, i2, a2) {
|
|
772
|
+
var c2, l2, u2 = arguments.length > 6 && void 0 !== arguments[6] ? arguments[6] : e3, f2 = " ";
|
|
773
|
+
if (void 0 !== (a2 = a2 || J(e3, n2) || { value: e3[n2], enumerable: true }).value) {
|
|
774
|
+
var p2 = true !== t3.compact || 0 !== i2 ? 2 : 3;
|
|
775
|
+
t3.indentationLvl += p2, l2 = yr(t3, a2.value, r3), 3 === p2 && t3.breakLength < s(l2, t3.colors) && (f2 = "\n".concat(" ".repeat(t3.indentationLvl))), t3.indentationLvl -= p2;
|
|
776
|
+
} else if (void 0 !== a2.get) {
|
|
777
|
+
var y2 = void 0 !== a2.set ? "Getter/Setter" : "Getter", g2 = t3.stylize, d2 = "special";
|
|
778
|
+
if (t3.getters && (true === t3.getters || "get" === t3.getters && void 0 === a2.set || "set" === t3.getters && void 0 !== a2.set))
|
|
779
|
+
try {
|
|
780
|
+
var b2 = I(a2.get, u2);
|
|
781
|
+
if (t3.indentationLvl += 2, null === b2)
|
|
782
|
+
l2 = "".concat(g2("[".concat(y2, ":"), d2), " ").concat(g2("null", "null")).concat(g2("]", d2));
|
|
783
|
+
else if ("object" === o(b2))
|
|
784
|
+
l2 = "".concat(g2("[".concat(y2, "]"), d2), " ").concat(yr(t3, b2, r3));
|
|
785
|
+
else {
|
|
786
|
+
var h2 = mr(g2, b2, t3);
|
|
787
|
+
l2 = "".concat(g2("[".concat(y2, ":"), d2), " ").concat(h2).concat(g2("]", d2));
|
|
788
|
+
}
|
|
789
|
+
t3.indentationLvl -= 2;
|
|
790
|
+
} catch (t4) {
|
|
791
|
+
var v2 = "<Inspection threw (".concat(t4.message, ")>");
|
|
792
|
+
l2 = "".concat(g2("[".concat(y2, ":"), d2), " ").concat(v2).concat(g2("]", d2));
|
|
793
|
+
}
|
|
794
|
+
else
|
|
795
|
+
l2 = t3.stylize("[".concat(y2, "]"), d2);
|
|
796
|
+
} else
|
|
797
|
+
l2 = void 0 !== a2.set ? t3.stylize("[Setter]", "special") : t3.stylize("undefined", "undefined");
|
|
798
|
+
if (1 === i2)
|
|
799
|
+
return l2;
|
|
800
|
+
if ("symbol" === o(n2)) {
|
|
801
|
+
var m2 = wt(It(n2), Ce, rr);
|
|
802
|
+
c2 = "[".concat(t3.stylize(m2, "symbol"), "]");
|
|
803
|
+
} else if ("__proto__" === n2)
|
|
804
|
+
c2 = "['__proto__']";
|
|
805
|
+
else if (false === a2.enumerable) {
|
|
806
|
+
var S2 = wt(n2, Ce, rr);
|
|
807
|
+
c2 = "[".concat(S2, "]");
|
|
808
|
+
} else
|
|
809
|
+
c2 = ut(He, n2) ? t3.stylize(n2, "name") : t3.stylize(nr(n2), "string");
|
|
810
|
+
return "".concat(c2, ":").concat(f2).concat(l2);
|
|
811
|
+
}
|
|
812
|
+
function zr(t3, e3, r3, n2) {
|
|
813
|
+
var o2 = e3.length + r3;
|
|
814
|
+
if (o2 + e3.length > t3.breakLength)
|
|
815
|
+
return false;
|
|
816
|
+
for (var i2 = 0; i2 < e3.length; i2++)
|
|
817
|
+
if (t3.colors ? o2 += re(e3[i2]).length : o2 += e3[i2].length, o2 > t3.breakLength)
|
|
818
|
+
return false;
|
|
819
|
+
return "" === n2 || !mt(n2, "\n");
|
|
820
|
+
}
|
|
821
|
+
function Mr(t3, e3, r3, n2, o2, i2, a2) {
|
|
822
|
+
if (true !== t3.compact) {
|
|
823
|
+
if ("number" == typeof t3.compact && t3.compact >= 1) {
|
|
824
|
+
var c2 = e3.length;
|
|
825
|
+
if (2 === o2 && c2 > 6 && (e3 = function(t4, e4, r4) {
|
|
826
|
+
var n3 = 0, o3 = 0, i3 = 0, a3 = e4.length;
|
|
827
|
+
t4.maxArrayLength < e4.length && a3--;
|
|
828
|
+
for (var c3 = new d(a3); i3 < a3; i3++) {
|
|
829
|
+
var l3 = s(e4[i3], t4.colors);
|
|
830
|
+
c3[i3] = l3, n3 += l3 + 2, o3 < l3 && (o3 = l3);
|
|
831
|
+
}
|
|
832
|
+
var u3 = o3 + 2;
|
|
833
|
+
if (3 * u3 + t4.indentationLvl < t4.breakLength && (n3 / u3 > 5 || o3 <= 6)) {
|
|
834
|
+
var f3 = D(u3 - n3 / e4.length), p3 = M(u3 - 3 - f3, 1), y2 = N(B(D(2.5 * p3 * a3) / p3), z((t4.breakLength - t4.indentationLvl) / u3), 4 * t4.compact, 15);
|
|
835
|
+
if (y2 <= 1)
|
|
836
|
+
return e4;
|
|
837
|
+
for (var g2 = [], b2 = [], h2 = 0; h2 < y2; h2++) {
|
|
838
|
+
for (var v2 = 0, m2 = h2; m2 < e4.length; m2 += y2)
|
|
839
|
+
c3[m2] > v2 && (v2 = c3[m2]);
|
|
840
|
+
v2 += 2, b2[h2] = v2;
|
|
841
|
+
}
|
|
842
|
+
var P2 = Ot;
|
|
843
|
+
if (void 0 !== r4) {
|
|
844
|
+
for (var O2 = 0; O2 < e4.length; O2++)
|
|
845
|
+
if ("number" != typeof r4[O2] && "bigint" != typeof r4[O2]) {
|
|
846
|
+
P2 = Pt;
|
|
847
|
+
break;
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
for (var x2 = 0; x2 < a3; x2 += y2) {
|
|
851
|
+
for (var w2 = N(x2 + y2, a3), A2 = "", j2 = x2; j2 < w2 - 1; j2++) {
|
|
852
|
+
var E2 = b2[j2 - x2] + e4[j2].length - c3[j2];
|
|
853
|
+
A2 += P2("".concat(e4[j2], ", "), E2, " ");
|
|
854
|
+
}
|
|
855
|
+
if (P2 === Ot) {
|
|
856
|
+
var L2 = b2[j2 - x2] + e4[j2].length - c3[j2] - 2;
|
|
857
|
+
A2 += Ot(e4[j2], L2, " ");
|
|
858
|
+
} else
|
|
859
|
+
A2 += e4[j2];
|
|
860
|
+
S(g2, A2);
|
|
861
|
+
}
|
|
862
|
+
t4.maxArrayLength < e4.length && S(g2, e4[a3]), e4 = g2;
|
|
863
|
+
}
|
|
864
|
+
return e4;
|
|
865
|
+
}(t3, e3, a2)), t3.currentDepth - i2 < t3.compact && c2 === e3.length && zr(t3, e3, e3.length + t3.indentationLvl + n2[0].length + r3.length + 10, r3)) {
|
|
866
|
+
var l2 = ee(e3, ", ");
|
|
867
|
+
if (!l2.includes("\n"))
|
|
868
|
+
return "".concat(r3 ? "".concat(r3, " ") : "").concat(n2[0], " ").concat(l2) + " ".concat(n2[1]);
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
var u2 = "\n".concat(xt(" ", t3.indentationLvl));
|
|
872
|
+
return "".concat(r3 ? "".concat(r3, " ") : "").concat(n2[0]).concat(u2, " ") + "".concat(ee(e3, ",".concat(u2, " "))).concat(u2).concat(n2[1]);
|
|
873
|
+
}
|
|
874
|
+
if (zr(t3, e3, 0, r3))
|
|
875
|
+
return "".concat(n2[0]).concat(r3 ? " ".concat(r3) : "", " ").concat(ee(e3, ", "), " ") + n2[1];
|
|
876
|
+
var f2 = xt(" ", t3.indentationLvl), p2 = "" === r3 && 1 === n2[0].length ? " " : "".concat(r3 ? " ".concat(r3) : "", "\n").concat(f2, " ");
|
|
877
|
+
return "".concat(n2[0]).concat(p2).concat(ee(e3, ",\n".concat(f2, " ")), " ").concat(n2[1]);
|
|
878
|
+
}
|
|
879
|
+
function Nr(t3) {
|
|
880
|
+
var e3 = Wt(t3, false);
|
|
881
|
+
if (void 0 !== e3 && (t3 = e3), "function" != typeof t3.toString)
|
|
882
|
+
return true;
|
|
883
|
+
if (nt(t3, "toString"))
|
|
884
|
+
return false;
|
|
885
|
+
var r3 = t3;
|
|
886
|
+
do {
|
|
887
|
+
r3 = tt(r3);
|
|
888
|
+
} while (!nt(r3, "toString"));
|
|
889
|
+
var n2 = J(r3, "constructor");
|
|
890
|
+
return void 0 !== n2 && "function" == typeof n2.value && Me.has(n2.value.name);
|
|
891
|
+
}
|
|
892
|
+
Je.colors = Y(K(null), { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], blink: [5, 25], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29], doubleunderline: [21, 24], black: [30, Qe], red: [31, Qe], green: [32, Qe], yellow: [33, Qe], blue: [34, Qe], magenta: [35, Qe], cyan: [36, Qe], white: [37, Qe], bgBlack: [40, Xe], bgRed: [41, Xe], bgGreen: [42, Xe], bgYellow: [43, Xe], bgBlue: [44, Xe], bgMagenta: [45, Xe], bgCyan: [46, Xe], bgWhite: [47, Xe], framed: [51, 54], overlined: [53, 55], gray: [90, Qe], redBright: [91, Qe], greenBright: [92, Qe], yellowBright: [93, Qe], blueBright: [94, Qe], magentaBright: [95, Qe], cyanBright: [96, Qe], whiteBright: [97, Qe], bgGray: [100, Xe], bgRedBright: [101, Xe], bgGreenBright: [102, Xe], bgYellowBright: [103, Xe], bgBlueBright: [104, Xe], bgMagentaBright: [105, Xe], bgCyanBright: [106, Xe], bgWhiteBright: [107, Xe] }), tr("gray", "grey"), tr("gray", "blackBright"), tr("bgGray", "bgGrey"), tr("bgGray", "bgBlackBright"), tr("dim", "faint"), tr("strikethrough", "crossedout"), tr("strikethrough", "strikeThrough"), tr("strikethrough", "crossedOut"), tr("hidden", "conceal"), tr("inverse", "swapColors"), tr("inverse", "swapcolors"), tr("doubleunderline", "doubleUnderline"), Je.styles = Y(K(null), { special: "cyan", number: "yellow", bigint: "yellow", boolean: "yellow", undefined: "grey", null: "bold", string: "green", symbol: "green", date: "magenta", regexp: "red", module: "underline" });
|
|
893
|
+
var Br, Dr = function(t3) {
|
|
894
|
+
return jt(t3.message, "\n", 1)[0];
|
|
895
|
+
};
|
|
896
|
+
function Cr(t3) {
|
|
897
|
+
try {
|
|
898
|
+
return k(t3);
|
|
899
|
+
} catch (t4) {
|
|
900
|
+
if (!Br)
|
|
901
|
+
try {
|
|
902
|
+
var e3 = {};
|
|
903
|
+
e3.a = e3, k(e3);
|
|
904
|
+
} catch (t5) {
|
|
905
|
+
Br = Dr(t5);
|
|
906
|
+
}
|
|
907
|
+
if ("TypeError" === t4.name && Dr(t4) === Br)
|
|
908
|
+
return "[Circular]";
|
|
909
|
+
throw t4;
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
function Gr(t3, e3) {
|
|
913
|
+
return hr(ir, t3, null != e3 && null != e3.numericSeparator ? e3.numericSeparator : Be.numericSeparator);
|
|
914
|
+
}
|
|
915
|
+
function Wr(t3, e3) {
|
|
916
|
+
return vr(ir, t3, null != e3 && null != e3.numericSeparator ? e3.numericSeparator : Be.numericSeparator);
|
|
917
|
+
}
|
|
918
|
+
function Hr(t3, e3) {
|
|
919
|
+
var r3 = e3[0], n2 = 0, i2 = "", a2 = "";
|
|
920
|
+
if ("string" == typeof r3) {
|
|
921
|
+
if (1 === e3.length)
|
|
922
|
+
return r3;
|
|
923
|
+
for (var c2, l2 = 0, f2 = 0; f2 < r3.length - 1; f2++)
|
|
924
|
+
if (37 === ht(r3, f2)) {
|
|
925
|
+
var p2 = ht(r3, ++f2);
|
|
926
|
+
if (n2 + 1 !== e3.length) {
|
|
927
|
+
switch (p2) {
|
|
928
|
+
case 115:
|
|
929
|
+
var s2 = e3[++n2];
|
|
930
|
+
c2 = "number" == typeof s2 ? Gr(s2, t3) : "bigint" == typeof s2 ? Wr(s2, t3) : "object" === o(s2) && null !== s2 && Nr(s2) ? Je(s2, u(u({}, t3), {}, { compact: 3, colors: false, depth: 0 })) : bt(s2);
|
|
931
|
+
break;
|
|
932
|
+
case 106:
|
|
933
|
+
c2 = Cr(e3[++n2]);
|
|
934
|
+
break;
|
|
935
|
+
case 100:
|
|
936
|
+
var y2 = e3[++n2];
|
|
937
|
+
c2 = "bigint" == typeof y2 ? Wr(y2, t3) : "symbol" === o(y2) ? "NaN" : Gr(G(y2), t3);
|
|
938
|
+
break;
|
|
939
|
+
case 79:
|
|
940
|
+
c2 = Je(e3[++n2], t3);
|
|
941
|
+
break;
|
|
942
|
+
case 111:
|
|
943
|
+
c2 = Je(e3[++n2], u(u({}, t3), {}, { showHidden: true, showProxy: true, depth: 4 }));
|
|
944
|
+
break;
|
|
945
|
+
case 105:
|
|
946
|
+
var g2 = e3[++n2];
|
|
947
|
+
c2 = "bigint" == typeof g2 ? Wr(g2, t3) : "symbol" === o(g2) ? "NaN" : Gr(U(g2), t3);
|
|
948
|
+
break;
|
|
949
|
+
case 102:
|
|
950
|
+
var d2 = e3[++n2];
|
|
951
|
+
c2 = "symbol" === o(d2) ? "NaN" : Gr(V(d2), t3);
|
|
952
|
+
break;
|
|
953
|
+
case 99:
|
|
954
|
+
n2 += 1, c2 = "";
|
|
955
|
+
break;
|
|
956
|
+
case 37:
|
|
957
|
+
i2 += At(r3, l2, f2), l2 = f2 + 1;
|
|
958
|
+
continue;
|
|
959
|
+
default:
|
|
960
|
+
continue;
|
|
961
|
+
}
|
|
962
|
+
l2 !== f2 - 1 && (i2 += At(r3, l2, f2 - 1)), i2 += c2, l2 = f2 + 1;
|
|
963
|
+
} else
|
|
964
|
+
37 === p2 && (i2 += At(r3, l2, f2), l2 = f2 + 1);
|
|
965
|
+
}
|
|
966
|
+
0 !== l2 && (n2++, a2 = " ", l2 < r3.length && (i2 += At(r3, l2)));
|
|
967
|
+
}
|
|
968
|
+
for (; n2 < e3.length; ) {
|
|
969
|
+
var b2 = e3[n2];
|
|
970
|
+
i2 += a2, i2 += "string" != typeof b2 ? Je(b2, t3) : b2, a2 = " ", n2++;
|
|
971
|
+
}
|
|
972
|
+
return i2;
|
|
973
|
+
}
|
|
974
|
+
if (g("config").hasIntl) {
|
|
975
|
+
var Vr = g("icu");
|
|
976
|
+
s = function(t3) {
|
|
977
|
+
var e3 = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1], r3 = 0;
|
|
978
|
+
e3 && (t3 = Zr(t3));
|
|
979
|
+
for (var n2 = 0; n2 < t3.length; n2++) {
|
|
980
|
+
var o2 = t3.charCodeAt(n2);
|
|
981
|
+
if (o2 >= 127) {
|
|
982
|
+
r3 += Vr.getStringWidth(t3.slice(n2).normalize("NFC"));
|
|
983
|
+
break;
|
|
984
|
+
}
|
|
985
|
+
r3 += o2 >= 32 ? 1 : 0;
|
|
986
|
+
}
|
|
987
|
+
return r3;
|
|
988
|
+
};
|
|
989
|
+
} else {
|
|
990
|
+
s = function(t3) {
|
|
991
|
+
var e3 = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1], r3 = 0;
|
|
992
|
+
e3 && (t3 = Zr(t3)), t3 = St(t3, "NFC");
|
|
993
|
+
var n2, o2 = i(new pt(t3));
|
|
994
|
+
try {
|
|
995
|
+
for (o2.s(); !(n2 = o2.n()).done; ) {
|
|
996
|
+
var a2 = n2.value, c2 = vt(a2, 0);
|
|
997
|
+
Ur(c2) ? r3 += 2 : $r(c2) || r3++;
|
|
998
|
+
}
|
|
999
|
+
} catch (t4) {
|
|
1000
|
+
o2.e(t4);
|
|
1001
|
+
} finally {
|
|
1002
|
+
o2.f();
|
|
1003
|
+
}
|
|
1004
|
+
return r3;
|
|
1005
|
+
};
|
|
1006
|
+
var Ur = function(t3) {
|
|
1007
|
+
return t3 >= 4352 && (t3 <= 4447 || 9001 === t3 || 9002 === t3 || t3 >= 11904 && t3 <= 12871 && 12351 !== t3 || t3 >= 12880 && t3 <= 19903 || t3 >= 19968 && t3 <= 42182 || t3 >= 43360 && t3 <= 43388 || t3 >= 44032 && t3 <= 55203 || t3 >= 63744 && t3 <= 64255 || t3 >= 65040 && t3 <= 65049 || t3 >= 65072 && t3 <= 65131 || t3 >= 65281 && t3 <= 65376 || t3 >= 65504 && t3 <= 65510 || t3 >= 110592 && t3 <= 110593 || t3 >= 127488 && t3 <= 127569 || t3 >= 127744 && t3 <= 128591 || t3 >= 131072 && t3 <= 262141);
|
|
1008
|
+
}, $r = function(t3) {
|
|
1009
|
+
return t3 <= 31 || t3 >= 127 && t3 <= 159 || t3 >= 768 && t3 <= 879 || t3 >= 8203 && t3 <= 8207 || t3 >= 8400 && t3 <= 8447 || t3 >= 65024 && t3 <= 65039 || t3 >= 65056 && t3 <= 65071 || t3 >= 917760 && t3 <= 917999;
|
|
1010
|
+
};
|
|
1011
|
+
}
|
|
1012
|
+
function Zr(t3) {
|
|
1013
|
+
return ze(t3, "str"), t3.replace(qe, "");
|
|
1014
|
+
}
|
|
1015
|
+
t2.exports = { inspect: Je, format: function() {
|
|
1016
|
+
for (var t3 = arguments.length, e3 = new Array(t3), r3 = 0; r3 < t3; r3++)
|
|
1017
|
+
e3[r3] = arguments[r3];
|
|
1018
|
+
return Hr(void 0, e3);
|
|
1019
|
+
}, formatWithOptions: function(t3) {
|
|
1020
|
+
if ("object" !== o(t3) || null === t3)
|
|
1021
|
+
throw new oe("inspectOptions", "object", t3);
|
|
1022
|
+
for (var e3 = arguments.length, r3 = new Array(e3 > 1 ? e3 - 1 : 0), n2 = 1; n2 < e3; n2++)
|
|
1023
|
+
r3[n2 - 1] = arguments[n2];
|
|
1024
|
+
return Hr(t3, r3);
|
|
1025
|
+
}, getStringWidth: s, inspectDefaultOptions: Be, stripVTControlCharacters: Zr, stylizeWithColor: or, stylizeWithHTML: function(t3, e3) {
|
|
1026
|
+
var r3 = Je.styles[e3];
|
|
1027
|
+
return void 0 !== r3 ? '<span style="color:'.concat(r3, ';">').concat(t3, "</span>") : t3;
|
|
1028
|
+
}, Proxy: Jt };
|
|
1029
|
+
}, 915: (t2) => {
|
|
1030
|
+
t2.exports = function(t3) {
|
|
1031
|
+
if (!t3)
|
|
1032
|
+
throw new Error("Assertion failed");
|
|
1033
|
+
};
|
|
1034
|
+
}, 875: (t2, e2) => {
|
|
1035
|
+
e2.NativeModule = { exists: function(t3) {
|
|
1036
|
+
return !t3.startsWith("/");
|
|
1037
|
+
} };
|
|
1038
|
+
}, 962: (t2, e2, r2) => {
|
|
1039
|
+
function n(t3) {
|
|
1040
|
+
return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
|
|
1041
|
+
return typeof t4;
|
|
1042
|
+
} : function(t4) {
|
|
1043
|
+
return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
|
|
1044
|
+
}, n(t3);
|
|
1045
|
+
}
|
|
1046
|
+
function o(t3, e3) {
|
|
1047
|
+
(null == e3 || e3 > t3.length) && (e3 = t3.length);
|
|
1048
|
+
for (var r3 = 0, n2 = new Array(e3); r3 < e3; r3++)
|
|
1049
|
+
n2[r3] = t3[r3];
|
|
1050
|
+
return n2;
|
|
1051
|
+
}
|
|
1052
|
+
var i, a, c = r2(459), l = c.ArrayIsArray, u = c.ArrayPrototypeIncludes, f = c.ArrayPrototypeIndexOf, p = c.ArrayPrototypeJoin, s = c.ArrayPrototypePop, y = c.ArrayPrototypePush, g = c.ArrayPrototypeSplice, d = c.ErrorCaptureStackTrace, b = c.ObjectDefineProperty, h = c.ReflectApply, v = c.RegExpPrototypeTest, m = c.SafeMap, S = c.StringPrototypeEndsWith, P = c.StringPrototypeIncludes, O = c.StringPrototypeSlice, x = c.StringPrototypeToLowerCase, w = new m(), A = {}, j = /^([A-Z][a-z0-9]*)+$/, E = ["string", "function", "number", "object", "Function", "Object", "boolean", "bigint", "symbol"], L = null;
|
|
1053
|
+
function F() {
|
|
1054
|
+
return L || (L = r2(618)), L;
|
|
1055
|
+
}
|
|
1056
|
+
var I = T(function(t3, e3, r3) {
|
|
1057
|
+
(t3 = C(t3)).name = "".concat(e3, " [").concat(r3, "]"), t3.stack, delete t3.name;
|
|
1058
|
+
});
|
|
1059
|
+
function T(t3) {
|
|
1060
|
+
var e3 = "__node_internal_" + t3.name;
|
|
1061
|
+
return b(t3, "name", { value: e3 }), t3;
|
|
1062
|
+
}
|
|
1063
|
+
function k(t3, e3, n2) {
|
|
1064
|
+
var o2 = w.get(t3);
|
|
1065
|
+
return void 0 === a && (a = r2(915)), a("function" == typeof o2), a(o2.length <= e3.length, "Code: ".concat(t3, "; The provided arguments length (").concat(e3.length, ") does not ") + "match the required ones (".concat(o2.length, ").")), h(o2, n2, e3);
|
|
1066
|
+
}
|
|
1067
|
+
var R, _, z, M, N, B, D, C = T(function(t3) {
|
|
1068
|
+
return i = Error.stackTraceLimit, Error.stackTraceLimit = 1 / 0, d(t3), Error.stackTraceLimit = i, t3;
|
|
1069
|
+
});
|
|
1070
|
+
t2.exports = { codes: A, hideStackFrames: T, isStackOverflowError: function(t3) {
|
|
1071
|
+
if (void 0 === _)
|
|
1072
|
+
try {
|
|
1073
|
+
!function t4() {
|
|
1074
|
+
t4();
|
|
1075
|
+
}();
|
|
1076
|
+
} catch (t4) {
|
|
1077
|
+
_ = t4.message, R = t4.name;
|
|
1078
|
+
}
|
|
1079
|
+
return t3 && t3.name === R && t3.message === _;
|
|
1080
|
+
} }, z = "ERR_INVALID_ARG_TYPE", M = function(t3, e3, r3) {
|
|
1081
|
+
a("string" == typeof t3, "'name' must be a string"), l(e3) || (e3 = [e3]);
|
|
1082
|
+
var i2 = "The ";
|
|
1083
|
+
if (S(t3, " argument"))
|
|
1084
|
+
i2 += "".concat(t3, " ");
|
|
1085
|
+
else {
|
|
1086
|
+
var c2 = P(t3, ".") ? "property" : "argument";
|
|
1087
|
+
i2 += '"'.concat(t3, '" ').concat(c2, " ");
|
|
1088
|
+
}
|
|
1089
|
+
i2 += "must be ";
|
|
1090
|
+
var d2, b2 = [], h2 = [], m2 = [], w2 = function(t4, e4) {
|
|
1091
|
+
var r4 = "undefined" != typeof Symbol && t4[Symbol.iterator] || t4["@@iterator"];
|
|
1092
|
+
if (!r4) {
|
|
1093
|
+
if (Array.isArray(t4) || (r4 = function(t5, e5) {
|
|
1094
|
+
if (t5) {
|
|
1095
|
+
if ("string" == typeof t5)
|
|
1096
|
+
return o(t5, e5);
|
|
1097
|
+
var r5 = Object.prototype.toString.call(t5).slice(8, -1);
|
|
1098
|
+
return "Object" === r5 && t5.constructor && (r5 = t5.constructor.name), "Map" === r5 || "Set" === r5 ? Array.from(t5) : "Arguments" === r5 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r5) ? o(t5, e5) : void 0;
|
|
1099
|
+
}
|
|
1100
|
+
}(t4)) || e4 && t4 && "number" == typeof t4.length) {
|
|
1101
|
+
r4 && (t4 = r4);
|
|
1102
|
+
var n2 = 0, i3 = function() {
|
|
1103
|
+
};
|
|
1104
|
+
return { s: i3, n: function() {
|
|
1105
|
+
return n2 >= t4.length ? { done: true } : { done: false, value: t4[n2++] };
|
|
1106
|
+
}, e: function(t5) {
|
|
1107
|
+
throw t5;
|
|
1108
|
+
}, f: i3 };
|
|
1109
|
+
}
|
|
1110
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1111
|
+
}
|
|
1112
|
+
var a2, c3 = true, l2 = false;
|
|
1113
|
+
return { s: function() {
|
|
1114
|
+
r4 = r4.call(t4);
|
|
1115
|
+
}, n: function() {
|
|
1116
|
+
var t5 = r4.next();
|
|
1117
|
+
return c3 = t5.done, t5;
|
|
1118
|
+
}, e: function(t5) {
|
|
1119
|
+
l2 = true, a2 = t5;
|
|
1120
|
+
}, f: function() {
|
|
1121
|
+
try {
|
|
1122
|
+
c3 || null == r4.return || r4.return();
|
|
1123
|
+
} finally {
|
|
1124
|
+
if (l2)
|
|
1125
|
+
throw a2;
|
|
1126
|
+
}
|
|
1127
|
+
} };
|
|
1128
|
+
}(e3);
|
|
1129
|
+
try {
|
|
1130
|
+
for (w2.s(); !(d2 = w2.n()).done; ) {
|
|
1131
|
+
var A2 = d2.value;
|
|
1132
|
+
a("string" == typeof A2, "All expected entries have to be of type string"), u(E, A2) ? y(b2, x(A2)) : v(j, A2) ? y(h2, A2) : (a("object" !== A2, 'The value "object" should be written as "Object"'), y(m2, A2));
|
|
1133
|
+
}
|
|
1134
|
+
} catch (t4) {
|
|
1135
|
+
w2.e(t4);
|
|
1136
|
+
} finally {
|
|
1137
|
+
w2.f();
|
|
1138
|
+
}
|
|
1139
|
+
if (h2.length > 0) {
|
|
1140
|
+
var L2 = f(b2, "object");
|
|
1141
|
+
-1 !== L2 && (g(b2, L2, 1), y(h2, "Object"));
|
|
1142
|
+
}
|
|
1143
|
+
if (b2.length > 0) {
|
|
1144
|
+
if (b2.length > 2) {
|
|
1145
|
+
var I2 = s(b2);
|
|
1146
|
+
i2 += "one of type ".concat(p(b2, ", "), ", or ").concat(I2);
|
|
1147
|
+
} else
|
|
1148
|
+
i2 += 2 === b2.length ? "one of type ".concat(b2[0], " or ").concat(b2[1]) : "of type ".concat(b2[0]);
|
|
1149
|
+
(h2.length > 0 || m2.length > 0) && (i2 += " or ");
|
|
1150
|
+
}
|
|
1151
|
+
if (h2.length > 0) {
|
|
1152
|
+
if (h2.length > 2) {
|
|
1153
|
+
var T2 = s(h2);
|
|
1154
|
+
i2 += "an instance of ".concat(p(h2, ", "), ", or ").concat(T2);
|
|
1155
|
+
} else
|
|
1156
|
+
i2 += "an instance of ".concat(h2[0]), 2 === h2.length && (i2 += " or ".concat(h2[1]));
|
|
1157
|
+
m2.length > 0 && (i2 += " or ");
|
|
1158
|
+
}
|
|
1159
|
+
if (m2.length > 0)
|
|
1160
|
+
if (m2.length > 2) {
|
|
1161
|
+
var k2 = s(m2);
|
|
1162
|
+
i2 += "one of ".concat(p(m2, ", "), ", or ").concat(k2);
|
|
1163
|
+
} else
|
|
1164
|
+
2 === m2.length ? i2 += "one of ".concat(m2[0], " or ").concat(m2[1]) : (x(m2[0]) !== m2[0] && (i2 += "an "), i2 += "".concat(m2[0]));
|
|
1165
|
+
if (null == r3)
|
|
1166
|
+
i2 += ". Received ".concat(r3);
|
|
1167
|
+
else if ("function" == typeof r3 && r3.name)
|
|
1168
|
+
i2 += ". Received function ".concat(r3.name);
|
|
1169
|
+
else if ("object" === n(r3))
|
|
1170
|
+
if (r3.constructor && r3.constructor.name)
|
|
1171
|
+
i2 += ". Received an instance of ".concat(r3.constructor.name);
|
|
1172
|
+
else {
|
|
1173
|
+
var R2 = F().inspect(r3, { depth: -1 });
|
|
1174
|
+
i2 += ". Received ".concat(R2);
|
|
1175
|
+
}
|
|
1176
|
+
else {
|
|
1177
|
+
var _2 = F().inspect(r3, { colors: false });
|
|
1178
|
+
_2.length > 25 && (_2 = "".concat(O(_2, 0, 25), "...")), i2 += ". Received type ".concat(n(r3), " (").concat(_2, ")");
|
|
1179
|
+
}
|
|
1180
|
+
return i2;
|
|
1181
|
+
}, N = TypeError, w.set(z, M), A[z] = (B = N, D = z, function() {
|
|
1182
|
+
var t3 = Error.stackTraceLimit;
|
|
1183
|
+
Error.stackTraceLimit = 0;
|
|
1184
|
+
var e3 = new B();
|
|
1185
|
+
Error.stackTraceLimit = t3;
|
|
1186
|
+
for (var r3 = arguments.length, n2 = new Array(r3), o2 = 0; o2 < r3; o2++)
|
|
1187
|
+
n2[o2] = arguments[o2];
|
|
1188
|
+
var i2 = k(D, n2, e3);
|
|
1189
|
+
return b(e3, "message", { value: i2, enumerable: false, writable: true, configurable: true }), b(e3, "toString", { value: function() {
|
|
1190
|
+
return "".concat(this.name, " [").concat(D, "]: ").concat(this.message);
|
|
1191
|
+
}, enumerable: false, writable: true, configurable: true }), I(e3, B.name, D), e3.code = D, e3;
|
|
1192
|
+
});
|
|
1193
|
+
}, 719: (t2) => {
|
|
1194
|
+
var e2 = /\u001b\[\d\d?m/g;
|
|
1195
|
+
t2.exports = { customInspectSymbol: Symbol.for("nodejs.util.inspect.custom"), isError: function(t3) {
|
|
1196
|
+
return t3 instanceof Error;
|
|
1197
|
+
}, join: Array.prototype.join.call.bind(Array.prototype.join), removeColors: function(t3) {
|
|
1198
|
+
return String.prototype.replace.call(t3, e2, "");
|
|
1199
|
+
} };
|
|
1200
|
+
}, 715: (t2, e2, r2) => {
|
|
1201
|
+
function n(t3) {
|
|
1202
|
+
return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
|
|
1203
|
+
return typeof t4;
|
|
1204
|
+
} : function(t4) {
|
|
1205
|
+
return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
|
|
1206
|
+
}, n(t3);
|
|
1207
|
+
}
|
|
1208
|
+
var o = r2(493).getConstructorName;
|
|
1209
|
+
function i(t3) {
|
|
1210
|
+
for (var e3 = arguments.length, r3 = new Array(e3 > 1 ? e3 - 1 : 0), i2 = 1; i2 < e3; i2++)
|
|
1211
|
+
r3[i2 - 1] = arguments[i2];
|
|
1212
|
+
for (var a2 = 0, c2 = r3; a2 < c2.length; a2++) {
|
|
1213
|
+
var l2 = c2[a2], u2 = globalThis[l2];
|
|
1214
|
+
if (u2 && t3 instanceof u2)
|
|
1215
|
+
return true;
|
|
1216
|
+
}
|
|
1217
|
+
for (; t3; ) {
|
|
1218
|
+
if ("object" !== n(t3))
|
|
1219
|
+
return false;
|
|
1220
|
+
if (r3.indexOf(o(t3)) >= 0)
|
|
1221
|
+
return true;
|
|
1222
|
+
t3 = Object.getPrototypeOf(t3);
|
|
1223
|
+
}
|
|
1224
|
+
return false;
|
|
1225
|
+
}
|
|
1226
|
+
function a(t3) {
|
|
1227
|
+
return function(e3) {
|
|
1228
|
+
if (!i(e3, t3.name))
|
|
1229
|
+
return false;
|
|
1230
|
+
try {
|
|
1231
|
+
t3.prototype.valueOf.call(e3);
|
|
1232
|
+
} catch (t4) {
|
|
1233
|
+
return false;
|
|
1234
|
+
}
|
|
1235
|
+
return true;
|
|
1236
|
+
};
|
|
1237
|
+
}
|
|
1238
|
+
"object" !== ("undefined" == typeof globalThis ? "undefined" : n(globalThis)) && (Object.defineProperty(Object.prototype, "__magic__", { get: function() {
|
|
1239
|
+
return this;
|
|
1240
|
+
}, configurable: true }), __magic__.globalThis = __magic__, delete Object.prototype.__magic__);
|
|
1241
|
+
var c = a(String), l = a(Number), u = a(Boolean), f = a(BigInt), p = a(Symbol);
|
|
1242
|
+
t2.exports = { isAsyncFunction: function(t3) {
|
|
1243
|
+
return "function" == typeof t3 && Function.prototype.toString.call(t3).startsWith("async");
|
|
1244
|
+
}, isGeneratorFunction: function(t3) {
|
|
1245
|
+
return "function" == typeof t3 && Function.prototype.toString.call(t3).match(/^(async\s+)?function *\*/);
|
|
1246
|
+
}, isAnyArrayBuffer: function(t3) {
|
|
1247
|
+
return i(t3, "ArrayBuffer", "SharedArrayBuffer");
|
|
1248
|
+
}, isArrayBuffer: function(t3) {
|
|
1249
|
+
return i(t3, "ArrayBuffer");
|
|
1250
|
+
}, isArgumentsObject: function(t3) {
|
|
1251
|
+
if (null !== t3 && "object" === n(t3) && !Array.isArray(t3) && "number" == typeof t3.length && t3.length === (0 | t3.length) && t3.length >= 0) {
|
|
1252
|
+
var e3 = Object.getOwnPropertyDescriptor(t3, "callee");
|
|
1253
|
+
return e3 && !e3.enumerable;
|
|
1254
|
+
}
|
|
1255
|
+
return false;
|
|
1256
|
+
}, isBoxedPrimitive: function(t3) {
|
|
1257
|
+
return l(t3) || c(t3) || u(t3) || f(t3) || p(t3);
|
|
1258
|
+
}, isDataView: function(t3) {
|
|
1259
|
+
return i(t3, "DataView");
|
|
1260
|
+
}, isExternal: function(t3) {
|
|
1261
|
+
return "object" === n(t3) && Object.isFrozen(t3) && null == Object.getPrototypeOf(t3);
|
|
1262
|
+
}, isMap: function(t3) {
|
|
1263
|
+
if (!i(t3, "Map"))
|
|
1264
|
+
return false;
|
|
1265
|
+
try {
|
|
1266
|
+
t3.has();
|
|
1267
|
+
} catch (t4) {
|
|
1268
|
+
return false;
|
|
1269
|
+
}
|
|
1270
|
+
return true;
|
|
1271
|
+
}, isMapIterator: function(t3) {
|
|
1272
|
+
return "[object Map Iterator]" === Object.prototype.toString.call(Object.getPrototypeOf(t3));
|
|
1273
|
+
}, isModuleNamespaceObject: function(t3) {
|
|
1274
|
+
return t3 && "object" === n(t3) && "Module" === t3[Symbol.toStringTag];
|
|
1275
|
+
}, isNativeError: function(t3) {
|
|
1276
|
+
return t3 instanceof Error && i(t3, "Error", "EvalError", "RangeError", "ReferenceError", "SyntaxError", "TypeError", "URIError", "AggregateError");
|
|
1277
|
+
}, isPromise: function(t3) {
|
|
1278
|
+
return i(t3, "Promise");
|
|
1279
|
+
}, isSet: function(t3) {
|
|
1280
|
+
if (!i(t3, "Set"))
|
|
1281
|
+
return false;
|
|
1282
|
+
try {
|
|
1283
|
+
t3.has();
|
|
1284
|
+
} catch (t4) {
|
|
1285
|
+
return false;
|
|
1286
|
+
}
|
|
1287
|
+
return true;
|
|
1288
|
+
}, isSetIterator: function(t3) {
|
|
1289
|
+
return "[object Set Iterator]" === Object.prototype.toString.call(Object.getPrototypeOf(t3));
|
|
1290
|
+
}, isWeakMap: function(t3) {
|
|
1291
|
+
return i(t3, "WeakMap");
|
|
1292
|
+
}, isWeakSet: function(t3) {
|
|
1293
|
+
return i(t3, "WeakSet");
|
|
1294
|
+
}, isRegExp: function(t3) {
|
|
1295
|
+
return i(t3, "RegExp");
|
|
1296
|
+
}, isDate: function(t3) {
|
|
1297
|
+
if (i(t3, "Date"))
|
|
1298
|
+
try {
|
|
1299
|
+
return Date.prototype.getTime.call(t3), true;
|
|
1300
|
+
} catch (t4) {
|
|
1301
|
+
}
|
|
1302
|
+
return false;
|
|
1303
|
+
}, isTypedArray: function(t3) {
|
|
1304
|
+
return i(t3, "Int8Array", "Uint8Array", "Uint8ClampedArray", "Int16Array", "Uint16Array", "Int32Array", "Uint32Array", "Float32Array", "Float64Array", "BigInt64Array", "BigUint64Array");
|
|
1305
|
+
}, isStringObject: c, isNumberObject: l, isBooleanObject: u, isBigIntObject: f, isSymbolObject: p };
|
|
1306
|
+
}, 753: (t2, e2, r2) => {
|
|
1307
|
+
function n(t3) {
|
|
1308
|
+
return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
|
|
1309
|
+
return typeof t4;
|
|
1310
|
+
} : function(t4) {
|
|
1311
|
+
return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
|
|
1312
|
+
}, n(t3);
|
|
1313
|
+
}
|
|
1314
|
+
var o = r2(459).ArrayIsArray, i = r2(962), a = i.hideStackFrames, c = i.codes.ERR_INVALID_ARG_TYPE, l = a(function(t3, e3, r3) {
|
|
1315
|
+
var i2 = null == r3, a2 = !i2 && r3.allowArray, l2 = !i2 && r3.allowFunction;
|
|
1316
|
+
if ((i2 || !r3.nullable) && null === t3 || !a2 && o(t3) || "object" !== n(t3) && (!l2 || "function" != typeof t3))
|
|
1317
|
+
throw new c(e3, "Object", t3);
|
|
1318
|
+
});
|
|
1319
|
+
t2.exports = { validateObject: l, validateString: function(t3, e3) {
|
|
1320
|
+
if ("string" != typeof t3)
|
|
1321
|
+
throw new c(e3, "string", t3);
|
|
1322
|
+
} };
|
|
1323
|
+
}, 459: (t2, e2, r2) => {
|
|
1324
|
+
function n(t3) {
|
|
1325
|
+
return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
|
|
1326
|
+
return typeof t4;
|
|
1327
|
+
} : function(t4) {
|
|
1328
|
+
return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
|
|
1329
|
+
}, n(t3);
|
|
1330
|
+
}
|
|
1331
|
+
function o(t3, e3) {
|
|
1332
|
+
if ("function" != typeof e3 && null !== e3)
|
|
1333
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
1334
|
+
t3.prototype = Object.create(e3 && e3.prototype, { constructor: { value: t3, writable: true, configurable: true } }), Object.defineProperty(t3, "prototype", { writable: false }), e3 && f(t3, e3);
|
|
1335
|
+
}
|
|
1336
|
+
function i(t3) {
|
|
1337
|
+
var e3 = u();
|
|
1338
|
+
return function() {
|
|
1339
|
+
var r3, n2 = p(t3);
|
|
1340
|
+
if (e3) {
|
|
1341
|
+
var o2 = p(this).constructor;
|
|
1342
|
+
r3 = Reflect.construct(n2, arguments, o2);
|
|
1343
|
+
} else
|
|
1344
|
+
r3 = n2.apply(this, arguments);
|
|
1345
|
+
return a(this, r3);
|
|
1346
|
+
};
|
|
1347
|
+
}
|
|
1348
|
+
function a(t3, e3) {
|
|
1349
|
+
if (e3 && ("object" === n(e3) || "function" == typeof e3))
|
|
1350
|
+
return e3;
|
|
1351
|
+
if (void 0 !== e3)
|
|
1352
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
1353
|
+
return function(t4) {
|
|
1354
|
+
if (void 0 === t4)
|
|
1355
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1356
|
+
return t4;
|
|
1357
|
+
}(t3);
|
|
1358
|
+
}
|
|
1359
|
+
function c(t3) {
|
|
1360
|
+
var e3 = "function" == typeof Map ? /* @__PURE__ */ new Map() : void 0;
|
|
1361
|
+
return c = function(t4) {
|
|
1362
|
+
if (null === t4 || (r3 = t4, -1 === Function.toString.call(r3).indexOf("[native code]")))
|
|
1363
|
+
return t4;
|
|
1364
|
+
var r3;
|
|
1365
|
+
if ("function" != typeof t4)
|
|
1366
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
1367
|
+
if (void 0 !== e3) {
|
|
1368
|
+
if (e3.has(t4))
|
|
1369
|
+
return e3.get(t4);
|
|
1370
|
+
e3.set(t4, n2);
|
|
1371
|
+
}
|
|
1372
|
+
function n2() {
|
|
1373
|
+
return l(t4, arguments, p(this).constructor);
|
|
1374
|
+
}
|
|
1375
|
+
return n2.prototype = Object.create(t4.prototype, { constructor: { value: n2, enumerable: false, writable: true, configurable: true } }), f(n2, t4);
|
|
1376
|
+
}, c(t3);
|
|
1377
|
+
}
|
|
1378
|
+
function l(t3, e3, r3) {
|
|
1379
|
+
return l = u() ? Reflect.construct : function(t4, e4, r4) {
|
|
1380
|
+
var n2 = [null];
|
|
1381
|
+
n2.push.apply(n2, e4);
|
|
1382
|
+
var o2 = new (Function.bind.apply(t4, n2))();
|
|
1383
|
+
return r4 && f(o2, r4.prototype), o2;
|
|
1384
|
+
}, l.apply(null, arguments);
|
|
1385
|
+
}
|
|
1386
|
+
function u() {
|
|
1387
|
+
if ("undefined" == typeof Reflect || !Reflect.construct)
|
|
1388
|
+
return false;
|
|
1389
|
+
if (Reflect.construct.sham)
|
|
1390
|
+
return false;
|
|
1391
|
+
if ("function" == typeof Proxy)
|
|
1392
|
+
return true;
|
|
1393
|
+
try {
|
|
1394
|
+
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
1395
|
+
})), true;
|
|
1396
|
+
} catch (t3) {
|
|
1397
|
+
return false;
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
function f(t3, e3) {
|
|
1401
|
+
return f = Object.setPrototypeOf || function(t4, e4) {
|
|
1402
|
+
return t4.__proto__ = e4, t4;
|
|
1403
|
+
}, f(t3, e3);
|
|
1404
|
+
}
|
|
1405
|
+
function p(t3) {
|
|
1406
|
+
return p = Object.setPrototypeOf ? Object.getPrototypeOf : function(t4) {
|
|
1407
|
+
return t4.__proto__ || Object.getPrototypeOf(t4);
|
|
1408
|
+
}, p(t3);
|
|
1409
|
+
}
|
|
1410
|
+
function s(t3, e3) {
|
|
1411
|
+
if (!(t3 instanceof e3))
|
|
1412
|
+
throw new TypeError("Cannot call a class as a function");
|
|
1413
|
+
}
|
|
1414
|
+
function y(t3, e3) {
|
|
1415
|
+
for (var r3 = 0; r3 < e3.length; r3++) {
|
|
1416
|
+
var n2 = e3[r3];
|
|
1417
|
+
n2.enumerable = n2.enumerable || false, n2.configurable = true, "value" in n2 && (n2.writable = true), Object.defineProperty(t3, n2.key, n2);
|
|
1418
|
+
}
|
|
1419
|
+
}
|
|
1420
|
+
function g(t3, e3, r3) {
|
|
1421
|
+
return e3 && y(t3.prototype, e3), r3 && y(t3, r3), Object.defineProperty(t3, "prototype", { writable: false }), t3;
|
|
1422
|
+
}
|
|
1423
|
+
var d = function(t3, e3) {
|
|
1424
|
+
var r3 = function(r4) {
|
|
1425
|
+
function n2(e4) {
|
|
1426
|
+
s(this, n2), this._iterator = t3(e4);
|
|
1427
|
+
}
|
|
1428
|
+
return g(n2, [{ key: "next", value: function() {
|
|
1429
|
+
return e3(this._iterator);
|
|
1430
|
+
} }, { key: Symbol.iterator, value: function() {
|
|
1431
|
+
return this;
|
|
1432
|
+
} }]), n2;
|
|
1433
|
+
}();
|
|
1434
|
+
return Object.setPrototypeOf(r3.prototype, null), Object.freeze(r3.prototype), Object.freeze(r3), r3;
|
|
1435
|
+
};
|
|
1436
|
+
function b(t3, e3) {
|
|
1437
|
+
return Function.prototype.call.bind(t3.prototype.__lookupGetter__(e3));
|
|
1438
|
+
}
|
|
1439
|
+
function h(t3) {
|
|
1440
|
+
return Function.prototype.call.bind(t3);
|
|
1441
|
+
}
|
|
1442
|
+
var v = function(t3, e3) {
|
|
1443
|
+
Array.prototype.forEach.call(Reflect.ownKeys(t3), function(r3) {
|
|
1444
|
+
Reflect.getOwnPropertyDescriptor(e3, r3) || Reflect.defineProperty(e3, r3, Reflect.getOwnPropertyDescriptor(t3, r3));
|
|
1445
|
+
});
|
|
1446
|
+
}, m = function(t3, e3) {
|
|
1447
|
+
if (Symbol.iterator in t3.prototype) {
|
|
1448
|
+
var r3, n2 = new t3();
|
|
1449
|
+
Array.prototype.forEach.call(Reflect.ownKeys(t3.prototype), function(o2) {
|
|
1450
|
+
if (!Reflect.getOwnPropertyDescriptor(e3.prototype, o2)) {
|
|
1451
|
+
var i2 = Reflect.getOwnPropertyDescriptor(t3.prototype, o2);
|
|
1452
|
+
if ("function" == typeof i2.value && 0 === i2.value.length && Symbol.iterator in (Function.prototype.call.call(i2.value, n2) || {})) {
|
|
1453
|
+
var a2 = h(i2.value);
|
|
1454
|
+
null == r3 && (r3 = h(a2(n2).next));
|
|
1455
|
+
var c2 = d(a2, r3);
|
|
1456
|
+
i2.value = function() {
|
|
1457
|
+
return new c2(this);
|
|
1458
|
+
};
|
|
1459
|
+
}
|
|
1460
|
+
Reflect.defineProperty(e3.prototype, o2, i2);
|
|
1461
|
+
}
|
|
1462
|
+
});
|
|
1463
|
+
} else
|
|
1464
|
+
v(t3.prototype, e3.prototype);
|
|
1465
|
+
return v(t3, e3), Object.setPrototypeOf(e3.prototype, null), Object.freeze(e3.prototype), Object.freeze(e3), e3;
|
|
1466
|
+
}, S = Function.prototype.call.bind(String.prototype[Symbol.iterator]), P = Reflect.getPrototypeOf(S(""));
|
|
1467
|
+
t2.exports = { makeSafe: m, internalBinding: function(t3) {
|
|
1468
|
+
if ("config" === t3)
|
|
1469
|
+
return { hasIntl: false };
|
|
1470
|
+
throw new Error('unknown module: "'.concat(t3, '"'));
|
|
1471
|
+
}, Array, ArrayIsArray: Array.isArray, ArrayPrototypeFilter: Function.prototype.call.bind(Array.prototype.filter), ArrayPrototypeForEach: Function.prototype.call.bind(Array.prototype.forEach), ArrayPrototypeIncludes: Function.prototype.call.bind(Array.prototype.includes), ArrayPrototypeIndexOf: Function.prototype.call.bind(Array.prototype.indexOf), ArrayPrototypeJoin: Function.prototype.call.bind(Array.prototype.join), ArrayPrototypePop: Function.prototype.call.bind(Array.prototype.pop), ArrayPrototypePush: Function.prototype.call.bind(Array.prototype.push), ArrayPrototypePushApply: Function.apply.bind(Array.prototype.push), ArrayPrototypeSort: Function.prototype.call.bind(Array.prototype.sort), ArrayPrototypeSplice: Function.prototype.call.bind(Array.prototype.slice), ArrayPrototypeUnshift: Function.prototype.call.bind(Array.prototype.unshift), BigIntPrototypeValueOf: Function.prototype.call.bind(BigInt.prototype.valueOf), BooleanPrototypeValueOf: Function.prototype.call.bind(Boolean.prototype.valueOf), DatePrototypeGetTime: Function.prototype.call.bind(Date.prototype.getTime), DatePrototypeToISOString: Function.prototype.call.bind(Date.prototype.toISOString), DatePrototypeToString: Function.prototype.call.bind(Date.prototype.toString), ErrorCaptureStackTrace: function(t3) {
|
|
1472
|
+
var e3 = new Error().stack;
|
|
1473
|
+
t3.stack = e3.replace(/.*\n.*/, "$1");
|
|
1474
|
+
}, ErrorPrototypeToString: Function.prototype.call.bind(Error.prototype.toString), FunctionPrototypeCall: Function.prototype.call.bind(Function.prototype.call), FunctionPrototypeToString: Function.prototype.call.bind(Function.prototype.toString), globalThis: "undefined" == typeof globalThis ? r2.g : globalThis, JSONStringify: JSON.stringify, MapPrototypeGetSize: b(Map, "size"), MapPrototypeEntries: Function.prototype.call.bind(Map.prototype.entries), MathFloor: Math.floor, MathMax: Math.max, MathMin: Math.min, MathRound: Math.round, MathSqrt: Math.sqrt, MathTrunc: Math.trunc, Number, NumberIsFinite: Number.isFinite, NumberIsNaN: Number.isNaN, NumberParseFloat: Number.parseFloat, NumberParseInt: Number.parseInt, NumberPrototypeValueOf: Function.prototype.call.bind(Number.prototype.valueOf), Object, ObjectAssign: Object.assign, ObjectCreate: Object.create, ObjectDefineProperty: Object.defineProperty, ObjectGetOwnPropertyDescriptor: Object.getOwnPropertyDescriptor, ObjectGetOwnPropertyNames: Object.getOwnPropertyNames, ObjectGetOwnPropertySymbols: Object.getOwnPropertySymbols, ObjectGetPrototypeOf: Object.getPrototypeOf, ObjectIs: Object.is, ObjectKeys: Object.keys, ObjectPrototypeHasOwnProperty: Function.prototype.call.bind(Object.prototype.hasOwnProperty), ObjectPrototypePropertyIsEnumerable: Function.prototype.call.bind(Object.prototype.propertyIsEnumerable), ObjectSeal: Object.seal, ObjectSetPrototypeOf: Object.setPrototypeOf, ReflectApply: Reflect.apply, ReflectOwnKeys: Reflect.ownKeys, RegExp, RegExpPrototypeTest: Function.prototype.call.bind(RegExp.prototype.test), RegExpPrototypeToString: Function.prototype.call.bind(RegExp.prototype.toString), SafeStringIterator: d(S, Function.prototype.call.bind(P.next)), SafeMap: m(Map, function(t3) {
|
|
1475
|
+
o(r3, t3);
|
|
1476
|
+
var e3 = i(r3);
|
|
1477
|
+
function r3(t4) {
|
|
1478
|
+
return s(this, r3), e3.call(this, t4);
|
|
1479
|
+
}
|
|
1480
|
+
return g(r3);
|
|
1481
|
+
}(c(Map))), SafeSet: m(Set, function(t3) {
|
|
1482
|
+
o(r3, t3);
|
|
1483
|
+
var e3 = i(r3);
|
|
1484
|
+
function r3(t4) {
|
|
1485
|
+
return s(this, r3), e3.call(this, t4);
|
|
1486
|
+
}
|
|
1487
|
+
return g(r3);
|
|
1488
|
+
}(c(Set))), SetPrototypeGetSize: b(Set, "size"), SetPrototypeValues: Function.prototype.call.bind(Set.prototype.values), String, StringPrototypeCharCodeAt: Function.prototype.call.bind(String.prototype.charCodeAt), StringPrototypeCodePointAt: Function.prototype.call.bind(String.prototype.codePointAt), StringPrototypeEndsWith: Function.prototype.call.bind(String.prototype.endsWith), StringPrototypeIncludes: Function.prototype.call.bind(String.prototype.includes), StringPrototypeNormalize: Function.prototype.call.bind(String.prototype.normalize), StringPrototypePadEnd: Function.prototype.call.bind(String.prototype.padEnd), StringPrototypePadStart: Function.prototype.call.bind(String.prototype.padStart), StringPrototypeRepeat: Function.prototype.call.bind(String.prototype.repeat), StringPrototypeReplace: Function.prototype.call.bind(String.prototype.replace), StringPrototypeSlice: Function.prototype.call.bind(String.prototype.slice), StringPrototypeSplit: Function.prototype.call.bind(String.prototype.split), StringPrototypeToLowerCase: Function.prototype.call.bind(String.prototype.toLowerCase), StringPrototypeTrim: Function.prototype.call.bind(String.prototype.trim), StringPrototypeValueOf: Function.prototype.call.bind(String.prototype.valueOf), SymbolPrototypeToString: Function.prototype.call.bind(Symbol.prototype.toString), SymbolPrototypeValueOf: Function.prototype.call.bind(Symbol.prototype.valueOf), SymbolIterator: Symbol.iterator, SymbolFor: Symbol.for, SymbolToStringTag: Symbol.toStringTag, TypedArrayPrototypeGetLength: ("length", function(t3) {
|
|
1489
|
+
return t3.constructor.prototype.__lookupGetter__("length").call(t3);
|
|
1490
|
+
}), Uint8Array, uncurryThis: h };
|
|
1491
|
+
}, 906: (t2) => {
|
|
1492
|
+
function e2(t3, e3) {
|
|
1493
|
+
for (var r3 = 0; r3 < e3.length; r3++) {
|
|
1494
|
+
var n2 = e3[r3];
|
|
1495
|
+
n2.enumerable = n2.enumerable || false, n2.configurable = true, "value" in n2 && (n2.writable = true), Object.defineProperty(t3, n2.key, n2);
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
var r2 = /* @__PURE__ */ new WeakMap(), n = function() {
|
|
1499
|
+
function t3(e3, n3) {
|
|
1500
|
+
!function(t4, e4) {
|
|
1501
|
+
if (!(t4 instanceof e4))
|
|
1502
|
+
throw new TypeError("Cannot call a class as a function");
|
|
1503
|
+
}(this, t3);
|
|
1504
|
+
var o2 = new Proxy(e3, n3);
|
|
1505
|
+
return r2.set(o2, [e3, n3]), o2;
|
|
1506
|
+
}
|
|
1507
|
+
var n2, o;
|
|
1508
|
+
return n2 = t3, o = [{ key: "getProxyDetails", value: function(t4) {
|
|
1509
|
+
var e3 = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1], n3 = r2.get(t4);
|
|
1510
|
+
if (n3)
|
|
1511
|
+
return e3 ? n3 : n3[0];
|
|
1512
|
+
} }], null, o && e2(n2, o), Object.defineProperty(n2, "prototype", { writable: false }), t3;
|
|
1513
|
+
}();
|
|
1514
|
+
t2.exports = { getProxyDetails: n.getProxyDetails.bind(n), Proxy: n };
|
|
1515
|
+
}, 493: (t2, e2, r2) => {
|
|
1516
|
+
function n(t3) {
|
|
1517
|
+
return n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
|
|
1518
|
+
return typeof t4;
|
|
1519
|
+
} : function(t4) {
|
|
1520
|
+
return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
|
|
1521
|
+
}, n(t3);
|
|
1522
|
+
}
|
|
1523
|
+
function o(t3, e3) {
|
|
1524
|
+
var r3 = "undefined" != typeof Symbol && t3[Symbol.iterator] || t3["@@iterator"];
|
|
1525
|
+
if (!r3) {
|
|
1526
|
+
if (Array.isArray(t3) || (r3 = a(t3)) || e3 && t3 && "number" == typeof t3.length) {
|
|
1527
|
+
r3 && (t3 = r3);
|
|
1528
|
+
var n2 = 0, o2 = function() {
|
|
1529
|
+
};
|
|
1530
|
+
return { s: o2, n: function() {
|
|
1531
|
+
return n2 >= t3.length ? { done: true } : { done: false, value: t3[n2++] };
|
|
1532
|
+
}, e: function(t4) {
|
|
1533
|
+
throw t4;
|
|
1534
|
+
}, f: o2 };
|
|
1535
|
+
}
|
|
1536
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1537
|
+
}
|
|
1538
|
+
var i2, c2 = true, l2 = false;
|
|
1539
|
+
return { s: function() {
|
|
1540
|
+
r3 = r3.call(t3);
|
|
1541
|
+
}, n: function() {
|
|
1542
|
+
var t4 = r3.next();
|
|
1543
|
+
return c2 = t4.done, t4;
|
|
1544
|
+
}, e: function(t4) {
|
|
1545
|
+
l2 = true, i2 = t4;
|
|
1546
|
+
}, f: function() {
|
|
1547
|
+
try {
|
|
1548
|
+
c2 || null == r3.return || r3.return();
|
|
1549
|
+
} finally {
|
|
1550
|
+
if (l2)
|
|
1551
|
+
throw i2;
|
|
1552
|
+
}
|
|
1553
|
+
} };
|
|
1554
|
+
}
|
|
1555
|
+
function i(t3, e3) {
|
|
1556
|
+
return function(t4) {
|
|
1557
|
+
if (Array.isArray(t4))
|
|
1558
|
+
return t4;
|
|
1559
|
+
}(t3) || function(t4, e4) {
|
|
1560
|
+
var r3 = null == t4 ? null : "undefined" != typeof Symbol && t4[Symbol.iterator] || t4["@@iterator"];
|
|
1561
|
+
if (null != r3) {
|
|
1562
|
+
var n2, o2, i2 = [], a2 = true, c2 = false;
|
|
1563
|
+
try {
|
|
1564
|
+
for (r3 = r3.call(t4); !(a2 = (n2 = r3.next()).done) && (i2.push(n2.value), !e4 || i2.length !== e4); a2 = true)
|
|
1565
|
+
;
|
|
1566
|
+
} catch (t5) {
|
|
1567
|
+
c2 = true, o2 = t5;
|
|
1568
|
+
} finally {
|
|
1569
|
+
try {
|
|
1570
|
+
a2 || null == r3.return || r3.return();
|
|
1571
|
+
} finally {
|
|
1572
|
+
if (c2)
|
|
1573
|
+
throw o2;
|
|
1574
|
+
}
|
|
1575
|
+
}
|
|
1576
|
+
return i2;
|
|
1577
|
+
}
|
|
1578
|
+
}(t3, e3) || a(t3, e3) || function() {
|
|
1579
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1580
|
+
}();
|
|
1581
|
+
}
|
|
1582
|
+
function a(t3, e3) {
|
|
1583
|
+
if (t3) {
|
|
1584
|
+
if ("string" == typeof t3)
|
|
1585
|
+
return c(t3, e3);
|
|
1586
|
+
var r3 = Object.prototype.toString.call(t3).slice(8, -1);
|
|
1587
|
+
return "Object" === r3 && t3.constructor && (r3 = t3.constructor.name), "Map" === r3 || "Set" === r3 ? Array.from(t3) : "Arguments" === r3 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r3) ? c(t3, e3) : void 0;
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
function c(t3, e3) {
|
|
1591
|
+
(null == e3 || e3 > t3.length) && (e3 = t3.length);
|
|
1592
|
+
for (var r3 = 0, n2 = new Array(e3); r3 < e3; r3++)
|
|
1593
|
+
n2[r3] = t3[r3];
|
|
1594
|
+
return n2;
|
|
1595
|
+
}
|
|
1596
|
+
var l = r2(906), u = Symbol("kPending"), f = Symbol("kRejected");
|
|
1597
|
+
t2.exports = { getOwnNonIndexProperties: function(t3) {
|
|
1598
|
+
for (var e3 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 2, r3 = Object.getOwnPropertyDescriptors(t3), n2 = [], a2 = 0, c2 = Object.entries(r3); a2 < c2.length; a2++) {
|
|
1599
|
+
var l2 = i(c2[a2], 2), u2 = l2[0], f2 = l2[1];
|
|
1600
|
+
if (!/^(0|[1-9][0-9]*)$/.test(u2) || parseInt(u2, 10) >= Math.pow(2, 32) - 1) {
|
|
1601
|
+
if (2 === e3 && !f2.enumerable)
|
|
1602
|
+
continue;
|
|
1603
|
+
n2.push(u2);
|
|
1604
|
+
}
|
|
1605
|
+
}
|
|
1606
|
+
var p, s = o(Object.getOwnPropertySymbols(t3));
|
|
1607
|
+
try {
|
|
1608
|
+
for (s.s(); !(p = s.n()).done; ) {
|
|
1609
|
+
var y = p.value, g = Object.getOwnPropertyDescriptor(t3, y);
|
|
1610
|
+
(2 !== e3 || g.enumerable) && n2.push(y);
|
|
1611
|
+
}
|
|
1612
|
+
} catch (t4) {
|
|
1613
|
+
s.e(t4);
|
|
1614
|
+
} finally {
|
|
1615
|
+
s.f();
|
|
1616
|
+
}
|
|
1617
|
+
return n2;
|
|
1618
|
+
}, getPromiseDetails: function() {
|
|
1619
|
+
return [u, void 0];
|
|
1620
|
+
}, getProxyDetails: l.getProxyDetails, Proxy: l.Proxy, kPending: u, kRejected: f, previewEntries: function(t3) {
|
|
1621
|
+
return [[], false];
|
|
1622
|
+
}, getConstructorName: function(t3) {
|
|
1623
|
+
if (!t3 || "object" !== n(t3))
|
|
1624
|
+
throw new Error("Invalid object");
|
|
1625
|
+
if (t3.constructor && t3.constructor.name)
|
|
1626
|
+
return t3.constructor.name;
|
|
1627
|
+
var e3 = Object.prototype.toString.call(t3).match(/^\[object ([^\]]+)\]/);
|
|
1628
|
+
return e3 ? e3[1] : "Object";
|
|
1629
|
+
}, getExternalValue: function() {
|
|
1630
|
+
return BigInt(0);
|
|
1631
|
+
}, propertyFilter: { ALL_PROPERTIES: 0, ONLY_ENUMERABLE: 2 } };
|
|
1632
|
+
} }, e = {};
|
|
1633
|
+
function r(n) {
|
|
1634
|
+
var o = e[n];
|
|
1635
|
+
if (void 0 !== o)
|
|
1636
|
+
return o.exports;
|
|
1637
|
+
var i = e[n] = { exports: {} };
|
|
1638
|
+
return t[n](i, i.exports, r), i.exports;
|
|
1639
|
+
}
|
|
1640
|
+
return r.g = function() {
|
|
1641
|
+
if ("object" == typeof globalThis)
|
|
1642
|
+
return globalThis;
|
|
1643
|
+
try {
|
|
1644
|
+
return this || new Function("return this")();
|
|
1645
|
+
} catch (t2) {
|
|
1646
|
+
if ("object" == typeof window)
|
|
1647
|
+
return window;
|
|
1648
|
+
}
|
|
1649
|
+
}(), r(618);
|
|
1650
|
+
})();
|
|
1651
|
+
});
|
|
1652
|
+
}
|
|
1653
|
+
});
|
|
1654
|
+
|
|
1655
|
+
// node_modules/@fastly/http-compute-js/dist/http-compute-js/http-incoming.js
|
|
1656
|
+
import { Readable } from "stream";
|
|
1657
|
+
|
|
1658
|
+
// node_modules/node-inspect-extracted/index.mjs
|
|
1659
|
+
var import_inspect = __toESM(require_inspect(), 1);
|
|
1660
|
+
var node_inspect_extracted_default = import_inspect.default;
|
|
1661
|
+
var inspect = import_inspect.default.inspect;
|
|
1662
|
+
var format = import_inspect.default.format;
|
|
1663
|
+
var formatWithOptions = import_inspect.default.formatWithOptions;
|
|
1664
|
+
var getStringWidth = import_inspect.default.getStringWidth;
|
|
1665
|
+
var inspectDefaultOptions = import_inspect.default.inspectDefaultOptions;
|
|
1666
|
+
var stripVTControlCharacters = import_inspect.default.stripVTControlCharacters;
|
|
1667
|
+
var stylizeWithColor = import_inspect.default.stylizeWithColor;
|
|
1668
|
+
var stylizeWithHTML = import_inspect.default.stylizeWithHTML;
|
|
1669
|
+
var Proxy2 = import_inspect.default.Proxy;
|
|
1670
|
+
|
|
1671
|
+
// node_modules/@fastly/http-compute-js/dist/utils/errors.js
|
|
1672
|
+
var classRegExp = /^([A-Z][a-z0-9]*)+$/;
|
|
1673
|
+
var kTypes = [
|
|
1674
|
+
"string",
|
|
1675
|
+
"function",
|
|
1676
|
+
"number",
|
|
1677
|
+
"object",
|
|
1678
|
+
// Accept 'Function' and 'Object' as alternative to the lower cased version.
|
|
1679
|
+
"Function",
|
|
1680
|
+
"Object",
|
|
1681
|
+
"boolean",
|
|
1682
|
+
"bigint",
|
|
1683
|
+
"symbol"
|
|
1684
|
+
];
|
|
1685
|
+
function determineSpecificType(value) {
|
|
1686
|
+
var _a4;
|
|
1687
|
+
if (value == null) {
|
|
1688
|
+
return "" + value;
|
|
1689
|
+
}
|
|
1690
|
+
if (typeof value === "function" && value.name) {
|
|
1691
|
+
return `function ${value.name}`;
|
|
1692
|
+
}
|
|
1693
|
+
if (typeof value === "object") {
|
|
1694
|
+
if ((_a4 = value.constructor) === null || _a4 === void 0 ? void 0 : _a4.name) {
|
|
1695
|
+
return `an instance of ${value.constructor.name}`;
|
|
1696
|
+
}
|
|
1697
|
+
return `${node_inspect_extracted_default.inspect(value, { depth: -1 })}`;
|
|
1698
|
+
}
|
|
1699
|
+
let inspected = node_inspect_extracted_default.inspect(value, { colors: false });
|
|
1700
|
+
if (inspected.length > 28) {
|
|
1701
|
+
inspected = `${inspected.slice(0, 25)}...`;
|
|
1702
|
+
}
|
|
1703
|
+
return `type ${typeof value} (${inspected})`;
|
|
1704
|
+
}
|
|
1705
|
+
var ERR_HTTP_HEADERS_SENT = class extends Error {
|
|
1706
|
+
constructor(arg) {
|
|
1707
|
+
super(`Cannot ${arg} headers after they are sent to the client`);
|
|
1708
|
+
}
|
|
1709
|
+
};
|
|
1710
|
+
var ERR_INVALID_ARG_VALUE = class extends TypeError {
|
|
1711
|
+
constructor(name, value, reason = "is invalid") {
|
|
1712
|
+
let inspected = node_inspect_extracted_default.inspect(value);
|
|
1713
|
+
if (inspected.length > 128) {
|
|
1714
|
+
inspected = `${inspected.slice(0, 128)}...`;
|
|
1715
|
+
}
|
|
1716
|
+
const type = name.includes(".") ? "property" : "argument";
|
|
1717
|
+
super(`The ${type} '${name}' ${reason}. Received ${inspected}`);
|
|
1718
|
+
}
|
|
1719
|
+
};
|
|
1720
|
+
var ERR_INVALID_CHAR = class extends TypeError {
|
|
1721
|
+
constructor(name, field) {
|
|
1722
|
+
let msg = `Invalid character in ${name}`;
|
|
1723
|
+
if (field !== void 0) {
|
|
1724
|
+
msg += ` ["${field}"]`;
|
|
1725
|
+
}
|
|
1726
|
+
super(msg);
|
|
1727
|
+
}
|
|
1728
|
+
};
|
|
1729
|
+
var ERR_HTTP_INVALID_HEADER_VALUE = class extends TypeError {
|
|
1730
|
+
constructor(value, name) {
|
|
1731
|
+
super(`Invalid value "${value}" for header "${name}"`);
|
|
1732
|
+
}
|
|
1733
|
+
};
|
|
1734
|
+
var ERR_HTTP_INVALID_STATUS_CODE = class extends RangeError {
|
|
1735
|
+
constructor(originalStatusCode) {
|
|
1736
|
+
super(`Invalid status code: ${originalStatusCode}`);
|
|
1737
|
+
this.originalStatusCode = originalStatusCode;
|
|
1738
|
+
}
|
|
1739
|
+
};
|
|
1740
|
+
var ERR_HTTP_TRAILER_INVALID = class extends Error {
|
|
1741
|
+
constructor() {
|
|
1742
|
+
super(`Trailers are invalid with this transfer encoding`);
|
|
1743
|
+
}
|
|
1744
|
+
};
|
|
1745
|
+
var ERR_INVALID_ARG_TYPE = class extends TypeError {
|
|
1746
|
+
constructor(name, expected, actual) {
|
|
1747
|
+
if (!Array.isArray(expected)) {
|
|
1748
|
+
expected = [expected];
|
|
1749
|
+
}
|
|
1750
|
+
let msg = "The ";
|
|
1751
|
+
if (name.endsWith(" argument")) {
|
|
1752
|
+
msg += `${name} `;
|
|
1753
|
+
} else {
|
|
1754
|
+
const type = name.includes(".") ? "property" : "argument";
|
|
1755
|
+
msg += `"${name}" ${type} `;
|
|
1756
|
+
}
|
|
1757
|
+
msg += "must be ";
|
|
1758
|
+
const types = [];
|
|
1759
|
+
const instances = [];
|
|
1760
|
+
const other = [];
|
|
1761
|
+
for (const value of expected) {
|
|
1762
|
+
if (kTypes.includes(value)) {
|
|
1763
|
+
types.push(value.toLowerCase());
|
|
1764
|
+
} else if (classRegExp.exec(value) !== null) {
|
|
1765
|
+
instances.push(value);
|
|
1766
|
+
} else {
|
|
1767
|
+
other.push(value);
|
|
1768
|
+
}
|
|
1769
|
+
}
|
|
1770
|
+
if (instances.length > 0) {
|
|
1771
|
+
const pos = types.indexOf("object");
|
|
1772
|
+
if (pos !== -1) {
|
|
1773
|
+
types.splice(pos, 1);
|
|
1774
|
+
instances.push("Object");
|
|
1775
|
+
}
|
|
1776
|
+
}
|
|
1777
|
+
if (types.length > 0) {
|
|
1778
|
+
if (types.length > 2) {
|
|
1779
|
+
const last = types.pop();
|
|
1780
|
+
msg += `one of type ${types.join(", ")}, or ${last}`;
|
|
1781
|
+
} else if (types.length === 2) {
|
|
1782
|
+
msg += `one of type ${types[0]} or ${types[1]}`;
|
|
1783
|
+
} else {
|
|
1784
|
+
msg += `of type ${types[0]}`;
|
|
1785
|
+
}
|
|
1786
|
+
if (instances.length > 0 || other.length > 0)
|
|
1787
|
+
msg += " or ";
|
|
1788
|
+
}
|
|
1789
|
+
if (instances.length > 0) {
|
|
1790
|
+
if (instances.length > 2) {
|
|
1791
|
+
const last = instances.pop();
|
|
1792
|
+
msg += `an instance of ${instances.join(", ")}, or ${last}`;
|
|
1793
|
+
} else {
|
|
1794
|
+
msg += `an instance of ${instances[0]}`;
|
|
1795
|
+
if (instances.length === 2) {
|
|
1796
|
+
msg += ` or ${instances[1]}`;
|
|
1797
|
+
}
|
|
1798
|
+
}
|
|
1799
|
+
if (other.length > 0)
|
|
1800
|
+
msg += " or ";
|
|
1801
|
+
}
|
|
1802
|
+
if (other.length > 0) {
|
|
1803
|
+
if (other.length > 2) {
|
|
1804
|
+
const last = other.pop();
|
|
1805
|
+
msg += `one of ${other.join(", ")}, or ${last}`;
|
|
1806
|
+
} else if (other.length === 2) {
|
|
1807
|
+
msg += `one of ${other[0]} or ${other[1]}`;
|
|
1808
|
+
} else {
|
|
1809
|
+
if (other[0].toLowerCase() !== other[0])
|
|
1810
|
+
msg += "an ";
|
|
1811
|
+
msg += `${other[0]}`;
|
|
1812
|
+
}
|
|
1813
|
+
}
|
|
1814
|
+
msg += `. Received ${determineSpecificType(actual)}`;
|
|
1815
|
+
super(msg);
|
|
1816
|
+
}
|
|
1817
|
+
};
|
|
1818
|
+
var ERR_INVALID_HTTP_TOKEN = class extends TypeError {
|
|
1819
|
+
constructor(name, field) {
|
|
1820
|
+
super(`${name} must be a valid HTTP token ["${field}"]`);
|
|
1821
|
+
}
|
|
1822
|
+
};
|
|
1823
|
+
var ERR_METHOD_NOT_IMPLEMENTED = class extends Error {
|
|
1824
|
+
constructor(methodName) {
|
|
1825
|
+
super(`The ${methodName} method is not implemented`);
|
|
1826
|
+
}
|
|
1827
|
+
};
|
|
1828
|
+
var ERR_STREAM_ALREADY_FINISHED = class extends Error {
|
|
1829
|
+
constructor(methodName) {
|
|
1830
|
+
super(`Cannot call ${methodName} after a stream was finished`);
|
|
1831
|
+
}
|
|
1832
|
+
};
|
|
1833
|
+
var ERR_STREAM_CANNOT_PIPE = class extends Error {
|
|
1834
|
+
constructor() {
|
|
1835
|
+
super(`Cannot pipe, not readable`);
|
|
1836
|
+
}
|
|
1837
|
+
};
|
|
1838
|
+
var ERR_STREAM_DESTROYED = class extends Error {
|
|
1839
|
+
constructor(methodName) {
|
|
1840
|
+
super(`Cannot call ${methodName} after a stream was destroyed`);
|
|
1841
|
+
}
|
|
1842
|
+
};
|
|
1843
|
+
var ERR_STREAM_NULL_VALUES = class extends TypeError {
|
|
1844
|
+
constructor() {
|
|
1845
|
+
super(`May not write null values to stream`);
|
|
1846
|
+
}
|
|
1847
|
+
};
|
|
1848
|
+
var ERR_STREAM_WRITE_AFTER_END = class extends Error {
|
|
1849
|
+
constructor() {
|
|
1850
|
+
super(`write after end`);
|
|
1851
|
+
}
|
|
1852
|
+
};
|
|
1853
|
+
|
|
1854
|
+
// node_modules/@fastly/http-compute-js/dist/http-compute-js/http-incoming.js
|
|
1855
|
+
var _a;
|
|
1856
|
+
var _b;
|
|
1857
|
+
var _c;
|
|
1858
|
+
var _d;
|
|
1859
|
+
var _e;
|
|
1860
|
+
var _f;
|
|
1861
|
+
var kHeaders = Symbol("kHeaders");
|
|
1862
|
+
var kHeadersDistinct = Symbol("kHeadersDistinct");
|
|
1863
|
+
var kHeadersCount = Symbol("kHeadersCount");
|
|
1864
|
+
var kTrailers = Symbol("kTrailers");
|
|
1865
|
+
var kTrailersDistinct = Symbol("kTrailersDistinct");
|
|
1866
|
+
var kTrailersCount = Symbol("kTrailersCount");
|
|
1867
|
+
var ComputeJsIncomingMessage = class extends Readable {
|
|
1868
|
+
constructor() {
|
|
1869
|
+
const streamOptions = {};
|
|
1870
|
+
super(streamOptions);
|
|
1871
|
+
this.complete = false;
|
|
1872
|
+
this[_a] = null;
|
|
1873
|
+
this[_b] = null;
|
|
1874
|
+
this[_c] = 0;
|
|
1875
|
+
this.rawHeaders = [];
|
|
1876
|
+
this[_d] = null;
|
|
1877
|
+
this[_e] = null;
|
|
1878
|
+
this[_f] = 0;
|
|
1879
|
+
this.rawTrailers = [];
|
|
1880
|
+
this.aborted = false;
|
|
1881
|
+
this.upgrade = false;
|
|
1882
|
+
this.url = "";
|
|
1883
|
+
this._stream = null;
|
|
1884
|
+
this._readableState.readingMore = true;
|
|
1885
|
+
this._consuming = false;
|
|
1886
|
+
this._dumped = false;
|
|
1887
|
+
}
|
|
1888
|
+
get socket() {
|
|
1889
|
+
return null;
|
|
1890
|
+
}
|
|
1891
|
+
set socket(_val) {
|
|
1892
|
+
throw new ERR_METHOD_NOT_IMPLEMENTED("socket");
|
|
1893
|
+
}
|
|
1894
|
+
get connection() {
|
|
1895
|
+
return null;
|
|
1896
|
+
}
|
|
1897
|
+
set connection(_socket) {
|
|
1898
|
+
console.error("No support for IncomingMessage.connection");
|
|
1899
|
+
}
|
|
1900
|
+
get headers() {
|
|
1901
|
+
if (!this[kHeaders]) {
|
|
1902
|
+
this[kHeaders] = {};
|
|
1903
|
+
const src = this.rawHeaders;
|
|
1904
|
+
const dst = this[kHeaders];
|
|
1905
|
+
for (let n = 0; n < this[kHeadersCount]; n += 2) {
|
|
1906
|
+
this._addHeaderLine(src[n], src[n + 1], dst);
|
|
1907
|
+
}
|
|
1908
|
+
}
|
|
1909
|
+
return this[kHeaders];
|
|
1910
|
+
}
|
|
1911
|
+
set headers(val) {
|
|
1912
|
+
this[kHeaders] = val;
|
|
1913
|
+
}
|
|
1914
|
+
get headersDistinct() {
|
|
1915
|
+
if (!this[kHeadersDistinct]) {
|
|
1916
|
+
this[kHeadersDistinct] = {};
|
|
1917
|
+
const src = this.rawHeaders;
|
|
1918
|
+
const dst = this[kHeadersDistinct];
|
|
1919
|
+
for (let n = 0; n < this[kHeadersCount]; n += 2) {
|
|
1920
|
+
this._addHeaderLineDistinct(src[n], src[n + 1], dst);
|
|
1921
|
+
}
|
|
1922
|
+
}
|
|
1923
|
+
return this[kHeadersDistinct];
|
|
1924
|
+
}
|
|
1925
|
+
set headersDistinct(val) {
|
|
1926
|
+
this[kHeadersDistinct] = val;
|
|
1927
|
+
}
|
|
1928
|
+
get trailers() {
|
|
1929
|
+
if (!this[kTrailers]) {
|
|
1930
|
+
this[kTrailers] = {};
|
|
1931
|
+
const src = this.rawTrailers;
|
|
1932
|
+
const dst = this[kTrailers];
|
|
1933
|
+
for (let n = 0; n < this[kTrailersCount]; n += 2) {
|
|
1934
|
+
this._addHeaderLine(src[n], src[n + 1], dst);
|
|
1935
|
+
}
|
|
1936
|
+
}
|
|
1937
|
+
return this[kTrailers];
|
|
1938
|
+
}
|
|
1939
|
+
set trailers(val) {
|
|
1940
|
+
this[kTrailers] = val;
|
|
1941
|
+
}
|
|
1942
|
+
get trailersDistinct() {
|
|
1943
|
+
if (!this[kTrailersDistinct]) {
|
|
1944
|
+
this[kTrailersDistinct] = {};
|
|
1945
|
+
const src = this.rawTrailers;
|
|
1946
|
+
const dst = this[kTrailersDistinct];
|
|
1947
|
+
for (let n = 0; n < this[kTrailersCount]; n += 2) {
|
|
1948
|
+
this._addHeaderLineDistinct(src[n], src[n + 1], dst);
|
|
1949
|
+
}
|
|
1950
|
+
}
|
|
1951
|
+
return this[kTrailersDistinct];
|
|
1952
|
+
}
|
|
1953
|
+
set trailersDistinct(val) {
|
|
1954
|
+
this[kTrailersDistinct] = val;
|
|
1955
|
+
}
|
|
1956
|
+
setTimeout(msecs, callback) {
|
|
1957
|
+
return this;
|
|
1958
|
+
}
|
|
1959
|
+
async _read(n) {
|
|
1960
|
+
if (!this._consuming) {
|
|
1961
|
+
this._readableState.readingMore = false;
|
|
1962
|
+
this._consuming = true;
|
|
1963
|
+
}
|
|
1964
|
+
if (this._stream == null) {
|
|
1965
|
+
this.push(null);
|
|
1966
|
+
return;
|
|
1967
|
+
}
|
|
1968
|
+
const reader = this._stream.getReader();
|
|
1969
|
+
try {
|
|
1970
|
+
const data = await reader.read();
|
|
1971
|
+
if (data.done) {
|
|
1972
|
+
this.push(null);
|
|
1973
|
+
} else {
|
|
1974
|
+
this.push(data.value);
|
|
1975
|
+
}
|
|
1976
|
+
} catch (e) {
|
|
1977
|
+
this.destroy(e);
|
|
1978
|
+
} finally {
|
|
1979
|
+
reader.releaseLock();
|
|
1980
|
+
}
|
|
1981
|
+
}
|
|
1982
|
+
_destroy(err, cb) {
|
|
1983
|
+
if (!this.readableEnded || !this.complete) {
|
|
1984
|
+
this.aborted = true;
|
|
1985
|
+
this.emit("aborted");
|
|
1986
|
+
}
|
|
1987
|
+
process.nextTick(onError, this, err, cb);
|
|
1988
|
+
}
|
|
1989
|
+
_addHeaderLines(headers, n) {
|
|
1990
|
+
if (headers && headers.length) {
|
|
1991
|
+
let dest;
|
|
1992
|
+
if (this.complete) {
|
|
1993
|
+
this.rawTrailers = headers;
|
|
1994
|
+
this[kTrailersCount] = n;
|
|
1995
|
+
dest = this[kTrailers];
|
|
1996
|
+
} else {
|
|
1997
|
+
this.rawHeaders = headers;
|
|
1998
|
+
this[kHeadersCount] = n;
|
|
1999
|
+
dest = this[kHeaders];
|
|
2000
|
+
}
|
|
2001
|
+
if (dest) {
|
|
2002
|
+
for (let i = 0; i < n; i += 2) {
|
|
2003
|
+
this._addHeaderLine(headers[i], headers[i + 1], dest);
|
|
2004
|
+
}
|
|
2005
|
+
}
|
|
2006
|
+
}
|
|
2007
|
+
}
|
|
2008
|
+
_addHeaderLine(field, value, dest) {
|
|
2009
|
+
field = matchKnownFields(field);
|
|
2010
|
+
const flag = field.charCodeAt(0);
|
|
2011
|
+
if (flag === 0 || flag === 2) {
|
|
2012
|
+
field = field.slice(1);
|
|
2013
|
+
if (typeof dest[field] === "string") {
|
|
2014
|
+
dest[field] += (flag === 0 ? ", " : "; ") + value;
|
|
2015
|
+
} else {
|
|
2016
|
+
dest[field] = value;
|
|
2017
|
+
}
|
|
2018
|
+
} else if (flag === 1) {
|
|
2019
|
+
if (dest["set-cookie"] !== void 0) {
|
|
2020
|
+
dest["set-cookie"].push(value);
|
|
2021
|
+
} else {
|
|
2022
|
+
dest["set-cookie"] = [value];
|
|
2023
|
+
}
|
|
2024
|
+
} else if (dest[field] === void 0) {
|
|
2025
|
+
dest[field] = value;
|
|
2026
|
+
}
|
|
2027
|
+
}
|
|
2028
|
+
_addHeaderLineDistinct(field, value, dest) {
|
|
2029
|
+
field = field.toLowerCase();
|
|
2030
|
+
if (!dest[field]) {
|
|
2031
|
+
dest[field] = [value];
|
|
2032
|
+
} else {
|
|
2033
|
+
dest[field].push(value);
|
|
2034
|
+
}
|
|
2035
|
+
}
|
|
2036
|
+
};
|
|
2037
|
+
_a = kHeaders, _b = kHeadersDistinct, _c = kHeadersCount, _d = kTrailers, _e = kTrailersDistinct, _f = kTrailersCount;
|
|
2038
|
+
function matchKnownFields(field, lowercased = false) {
|
|
2039
|
+
switch (field.length) {
|
|
2040
|
+
case 3:
|
|
2041
|
+
if (field === "Age" || field === "age")
|
|
2042
|
+
return "age";
|
|
2043
|
+
break;
|
|
2044
|
+
case 4:
|
|
2045
|
+
if (field === "Host" || field === "host")
|
|
2046
|
+
return "host";
|
|
2047
|
+
if (field === "From" || field === "from")
|
|
2048
|
+
return "from";
|
|
2049
|
+
if (field === "ETag" || field === "etag")
|
|
2050
|
+
return "etag";
|
|
2051
|
+
if (field === "Date" || field === "date")
|
|
2052
|
+
return "\0date";
|
|
2053
|
+
if (field === "Vary" || field === "vary")
|
|
2054
|
+
return "\0vary";
|
|
2055
|
+
break;
|
|
2056
|
+
case 6:
|
|
2057
|
+
if (field === "Server" || field === "server")
|
|
2058
|
+
return "server";
|
|
2059
|
+
if (field === "Cookie" || field === "cookie")
|
|
2060
|
+
return "cookie";
|
|
2061
|
+
if (field === "Origin" || field === "origin")
|
|
2062
|
+
return "\0origin";
|
|
2063
|
+
if (field === "Expect" || field === "expect")
|
|
2064
|
+
return "\0expect";
|
|
2065
|
+
if (field === "Accept" || field === "accept")
|
|
2066
|
+
return "\0accept";
|
|
2067
|
+
break;
|
|
2068
|
+
case 7:
|
|
2069
|
+
if (field === "Referer" || field === "referer")
|
|
2070
|
+
return "referer";
|
|
2071
|
+
if (field === "Expires" || field === "expires")
|
|
2072
|
+
return "expires";
|
|
2073
|
+
if (field === "Upgrade" || field === "upgrade")
|
|
2074
|
+
return "\0upgrade";
|
|
2075
|
+
break;
|
|
2076
|
+
case 8:
|
|
2077
|
+
if (field === "Location" || field === "location")
|
|
2078
|
+
return "location";
|
|
2079
|
+
if (field === "If-Match" || field === "if-match")
|
|
2080
|
+
return "\0if-match";
|
|
2081
|
+
break;
|
|
2082
|
+
case 10:
|
|
2083
|
+
if (field === "User-Agent" || field === "user-agent")
|
|
2084
|
+
return "user-agent";
|
|
2085
|
+
if (field === "Set-Cookie" || field === "set-cookie")
|
|
2086
|
+
return "";
|
|
2087
|
+
if (field === "Connection" || field === "connection")
|
|
2088
|
+
return "\0connection";
|
|
2089
|
+
break;
|
|
2090
|
+
case 11:
|
|
2091
|
+
if (field === "Retry-After" || field === "retry-after")
|
|
2092
|
+
return "retry-after";
|
|
2093
|
+
break;
|
|
2094
|
+
case 12:
|
|
2095
|
+
if (field === "Content-Type" || field === "content-type")
|
|
2096
|
+
return "content-type";
|
|
2097
|
+
if (field === "Max-Forwards" || field === "max-forwards")
|
|
2098
|
+
return "max-forwards";
|
|
2099
|
+
break;
|
|
2100
|
+
case 13:
|
|
2101
|
+
if (field === "Authorization" || field === "authorization")
|
|
2102
|
+
return "authorization";
|
|
2103
|
+
if (field === "Last-Modified" || field === "last-modified")
|
|
2104
|
+
return "last-modified";
|
|
2105
|
+
if (field === "Cache-Control" || field === "cache-control")
|
|
2106
|
+
return "\0cache-control";
|
|
2107
|
+
if (field === "If-None-Match" || field === "if-none-match")
|
|
2108
|
+
return "\0if-none-match";
|
|
2109
|
+
break;
|
|
2110
|
+
case 14:
|
|
2111
|
+
if (field === "Content-Length" || field === "content-length")
|
|
2112
|
+
return "content-length";
|
|
2113
|
+
break;
|
|
2114
|
+
case 15:
|
|
2115
|
+
if (field === "Accept-Encoding" || field === "accept-encoding")
|
|
2116
|
+
return "\0accept-encoding";
|
|
2117
|
+
if (field === "Accept-Language" || field === "accept-language")
|
|
2118
|
+
return "\0accept-language";
|
|
2119
|
+
if (field === "X-Forwarded-For" || field === "x-forwarded-for")
|
|
2120
|
+
return "\0x-forwarded-for";
|
|
2121
|
+
break;
|
|
2122
|
+
case 16:
|
|
2123
|
+
if (field === "Content-Encoding" || field === "content-encoding")
|
|
2124
|
+
return "\0content-encoding";
|
|
2125
|
+
if (field === "X-Forwarded-Host" || field === "x-forwarded-host")
|
|
2126
|
+
return "\0x-forwarded-host";
|
|
2127
|
+
break;
|
|
2128
|
+
case 17:
|
|
2129
|
+
if (field === "If-Modified-Since" || field === "if-modified-since")
|
|
2130
|
+
return "if-modified-since";
|
|
2131
|
+
if (field === "Transfer-Encoding" || field === "transfer-encoding")
|
|
2132
|
+
return "\0transfer-encoding";
|
|
2133
|
+
if (field === "X-Forwarded-Proto" || field === "x-forwarded-proto")
|
|
2134
|
+
return "\0x-forwarded-proto";
|
|
2135
|
+
break;
|
|
2136
|
+
case 19:
|
|
2137
|
+
if (field === "Proxy-Authorization" || field === "proxy-authorization")
|
|
2138
|
+
return "proxy-authorization";
|
|
2139
|
+
if (field === "If-Unmodified-Since" || field === "if-unmodified-since")
|
|
2140
|
+
return "if-unmodified-since";
|
|
2141
|
+
break;
|
|
2142
|
+
}
|
|
2143
|
+
if (lowercased) {
|
|
2144
|
+
return "\0" + field;
|
|
2145
|
+
}
|
|
2146
|
+
return matchKnownFields(field.toLowerCase(), true);
|
|
2147
|
+
}
|
|
2148
|
+
function onError(self, error, cb) {
|
|
2149
|
+
if (self.listenerCount("error") === 0) {
|
|
2150
|
+
cb();
|
|
2151
|
+
} else {
|
|
2152
|
+
cb(error);
|
|
2153
|
+
}
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
// node_modules/@fastly/http-compute-js/dist/http-compute-js/http-outgoing.js
|
|
2157
|
+
import { Buffer } from "buffer";
|
|
2158
|
+
import { Writable } from "stream";
|
|
2159
|
+
|
|
2160
|
+
// node_modules/@fastly/http-compute-js/dist/utils/types.js
|
|
2161
|
+
function validateString(value, name) {
|
|
2162
|
+
if (typeof value !== "string")
|
|
2163
|
+
throw new ERR_INVALID_ARG_TYPE(name, "string", value);
|
|
2164
|
+
}
|
|
2165
|
+
function isUint8Array(value) {
|
|
2166
|
+
return value != null && value[Symbol.toStringTag] === "Uint8Array";
|
|
2167
|
+
}
|
|
2168
|
+
|
|
2169
|
+
// node_modules/@fastly/http-compute-js/dist/http-compute-js/internal-http.js
|
|
2170
|
+
var kNeedDrain = Symbol("kNeedDrain");
|
|
2171
|
+
var kOutHeaders = Symbol("kOutHeaders");
|
|
2172
|
+
function utcDate() {
|
|
2173
|
+
return (/* @__PURE__ */ new Date()).toUTCString();
|
|
2174
|
+
}
|
|
2175
|
+
|
|
2176
|
+
// node_modules/@fastly/http-compute-js/dist/http-compute-js/internal-streams-state.js
|
|
2177
|
+
function getDefaultHighWaterMark(objectMode) {
|
|
2178
|
+
return objectMode ? 16 : 16 * 1024;
|
|
2179
|
+
}
|
|
2180
|
+
|
|
2181
|
+
// node_modules/@fastly/http-compute-js/dist/http-compute-js/http-common.js
|
|
2182
|
+
var tokenRegExp = /^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/;
|
|
2183
|
+
function checkIsHttpToken(val) {
|
|
2184
|
+
return tokenRegExp.exec(val) !== null;
|
|
2185
|
+
}
|
|
2186
|
+
var headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/;
|
|
2187
|
+
function checkInvalidHeaderChar(val) {
|
|
2188
|
+
return headerCharRegex.exec(val) !== null;
|
|
2189
|
+
}
|
|
2190
|
+
var chunkExpression = /(?:^|\W)chunked(?:$|\W)/i;
|
|
2191
|
+
|
|
2192
|
+
// node_modules/@fastly/http-compute-js/dist/http-compute-js/http-outgoing.js
|
|
2193
|
+
var _a2;
|
|
2194
|
+
var kCorked = Symbol("corked");
|
|
2195
|
+
var kUniqueHeaders = Symbol("kUniqueHeaders");
|
|
2196
|
+
function debug(format2) {
|
|
2197
|
+
}
|
|
2198
|
+
var nop = () => {
|
|
2199
|
+
};
|
|
2200
|
+
var RE_CONN_CLOSE = /(?:^|\W)close(?:$|\W)/i;
|
|
2201
|
+
var HIGH_WATER_MARK = getDefaultHighWaterMark();
|
|
2202
|
+
function validateHeaderName(name) {
|
|
2203
|
+
if (typeof name !== "string" || !name || !checkIsHttpToken(name)) {
|
|
2204
|
+
throw new ERR_INVALID_HTTP_TOKEN("Header name", name);
|
|
2205
|
+
}
|
|
2206
|
+
}
|
|
2207
|
+
function validateHeaderValue(name, value) {
|
|
2208
|
+
if (value === void 0) {
|
|
2209
|
+
throw new ERR_HTTP_INVALID_HEADER_VALUE(String(value), name);
|
|
2210
|
+
}
|
|
2211
|
+
if (checkInvalidHeaderChar(String(value))) {
|
|
2212
|
+
debug(`Header "${name}" contains invalid characters`);
|
|
2213
|
+
throw new ERR_INVALID_CHAR("header content", name);
|
|
2214
|
+
}
|
|
2215
|
+
}
|
|
2216
|
+
function isCookieField(s) {
|
|
2217
|
+
return s.length === 6 && s.toLowerCase() === "cookie";
|
|
2218
|
+
}
|
|
2219
|
+
var WrittenDataBuffer = class {
|
|
2220
|
+
constructor(params = {}) {
|
|
2221
|
+
this[_a2] = 0;
|
|
2222
|
+
this.entries = [];
|
|
2223
|
+
this.onWrite = params.onWrite;
|
|
2224
|
+
}
|
|
2225
|
+
write(data, encoding, callback) {
|
|
2226
|
+
this.entries.push({
|
|
2227
|
+
data,
|
|
2228
|
+
length: data.length,
|
|
2229
|
+
encoding,
|
|
2230
|
+
callback,
|
|
2231
|
+
written: false
|
|
2232
|
+
});
|
|
2233
|
+
this._flush();
|
|
2234
|
+
return true;
|
|
2235
|
+
}
|
|
2236
|
+
cork() {
|
|
2237
|
+
this[kCorked]++;
|
|
2238
|
+
}
|
|
2239
|
+
uncork() {
|
|
2240
|
+
this[kCorked]--;
|
|
2241
|
+
this._flush();
|
|
2242
|
+
}
|
|
2243
|
+
_flush() {
|
|
2244
|
+
if (this[kCorked] <= 0) {
|
|
2245
|
+
for (const [index, entry] of this.entries.entries()) {
|
|
2246
|
+
if (!entry.written) {
|
|
2247
|
+
entry.written = true;
|
|
2248
|
+
if (this.onWrite != null) {
|
|
2249
|
+
this.onWrite(index, entry);
|
|
2250
|
+
}
|
|
2251
|
+
if (entry.callback != null) {
|
|
2252
|
+
entry.callback.call(void 0);
|
|
2253
|
+
}
|
|
2254
|
+
}
|
|
2255
|
+
}
|
|
2256
|
+
}
|
|
2257
|
+
}
|
|
2258
|
+
get writableLength() {
|
|
2259
|
+
return this.entries.reduce((acc, entry) => {
|
|
2260
|
+
return acc + (entry.written && entry.length ? entry.length : 0);
|
|
2261
|
+
}, 0);
|
|
2262
|
+
}
|
|
2263
|
+
get writableHighWaterMark() {
|
|
2264
|
+
return HIGH_WATER_MARK;
|
|
2265
|
+
}
|
|
2266
|
+
get writableCorked() {
|
|
2267
|
+
return this[kCorked];
|
|
2268
|
+
}
|
|
2269
|
+
};
|
|
2270
|
+
_a2 = kCorked;
|
|
2271
|
+
var ComputeJsOutgoingMessage = class extends Writable {
|
|
2272
|
+
constructor(req) {
|
|
2273
|
+
super();
|
|
2274
|
+
this.outputData = [];
|
|
2275
|
+
this.outputSize = 0;
|
|
2276
|
+
this.writtenHeaderBytes = 0;
|
|
2277
|
+
this.chunkedEncoding = false;
|
|
2278
|
+
this.finished = false;
|
|
2279
|
+
this.sendDate = false;
|
|
2280
|
+
this.shouldKeepAlive = true;
|
|
2281
|
+
this.useChunkedEncodingByDefault = false;
|
|
2282
|
+
this._writtenDataBuffer = new WrittenDataBuffer({ onWrite: this._onDataWritten.bind(this) });
|
|
2283
|
+
this.req = req;
|
|
2284
|
+
this._last = false;
|
|
2285
|
+
this.maxRequestsOnConnectionReached = false;
|
|
2286
|
+
this._defaultKeepAlive = true;
|
|
2287
|
+
this._removedConnection = false;
|
|
2288
|
+
this._removedContLen = false;
|
|
2289
|
+
this._removedTE = false;
|
|
2290
|
+
this._contentLength = null;
|
|
2291
|
+
this._hasBody = true;
|
|
2292
|
+
this._trailer = "";
|
|
2293
|
+
this[kNeedDrain] = false;
|
|
2294
|
+
this._headerSent = false;
|
|
2295
|
+
this[kCorked] = 0;
|
|
2296
|
+
this._closed = false;
|
|
2297
|
+
this._header = null;
|
|
2298
|
+
this[kOutHeaders] = null;
|
|
2299
|
+
this._keepAliveTimeout = 0;
|
|
2300
|
+
this._onPendingData = nop;
|
|
2301
|
+
this[kUniqueHeaders] = null;
|
|
2302
|
+
}
|
|
2303
|
+
get _headers() {
|
|
2304
|
+
console.warn("DEP0066: OutgoingMessage.prototype._headers is deprecated");
|
|
2305
|
+
return this.getHeaders();
|
|
2306
|
+
}
|
|
2307
|
+
set _headers(val) {
|
|
2308
|
+
console.warn("DEP0066: OutgoingMessage.prototype._headers is deprecated");
|
|
2309
|
+
if (val == null) {
|
|
2310
|
+
this[kOutHeaders] = null;
|
|
2311
|
+
} else if (typeof val === "object") {
|
|
2312
|
+
const headers = this[kOutHeaders] = /* @__PURE__ */ Object.create(null);
|
|
2313
|
+
const keys = Object.keys(val);
|
|
2314
|
+
for (let i = 0; i < keys.length; ++i) {
|
|
2315
|
+
const name = keys[i];
|
|
2316
|
+
headers[name.toLowerCase()] = [name, val[name]];
|
|
2317
|
+
}
|
|
2318
|
+
}
|
|
2319
|
+
}
|
|
2320
|
+
get connection() {
|
|
2321
|
+
return null;
|
|
2322
|
+
}
|
|
2323
|
+
set connection(_socket) {
|
|
2324
|
+
console.error("No support for OutgoingMessage.connection");
|
|
2325
|
+
}
|
|
2326
|
+
get socket() {
|
|
2327
|
+
return null;
|
|
2328
|
+
}
|
|
2329
|
+
set socket(_socket) {
|
|
2330
|
+
console.error("No support for OutgoingMessage.socket");
|
|
2331
|
+
}
|
|
2332
|
+
get _headerNames() {
|
|
2333
|
+
console.warn("DEP0066: OutgoingMessage.prototype._headerNames is deprecated");
|
|
2334
|
+
const headers = this[kOutHeaders];
|
|
2335
|
+
if (headers !== null) {
|
|
2336
|
+
const out = /* @__PURE__ */ Object.create(null);
|
|
2337
|
+
const keys = Object.keys(headers);
|
|
2338
|
+
for (let i = 0; i < keys.length; ++i) {
|
|
2339
|
+
const key = keys[i];
|
|
2340
|
+
const val = headers[key][0];
|
|
2341
|
+
out[key] = val;
|
|
2342
|
+
}
|
|
2343
|
+
return out;
|
|
2344
|
+
}
|
|
2345
|
+
return null;
|
|
2346
|
+
}
|
|
2347
|
+
set _headerNames(val) {
|
|
2348
|
+
console.warn("DEP0066: OutgoingMessage.prototype._headerNames is deprecated");
|
|
2349
|
+
if (typeof val === "object" && val !== null) {
|
|
2350
|
+
const headers = this[kOutHeaders];
|
|
2351
|
+
if (!headers)
|
|
2352
|
+
return;
|
|
2353
|
+
const keys = Object.keys(val);
|
|
2354
|
+
for (let i = 0; i < keys.length; ++i) {
|
|
2355
|
+
const header = headers[keys[i]];
|
|
2356
|
+
if (header)
|
|
2357
|
+
header[0] = val[keys[i]];
|
|
2358
|
+
}
|
|
2359
|
+
}
|
|
2360
|
+
}
|
|
2361
|
+
_renderHeaders() {
|
|
2362
|
+
if (this._header) {
|
|
2363
|
+
throw new ERR_HTTP_HEADERS_SENT("render");
|
|
2364
|
+
}
|
|
2365
|
+
const headersMap = this[kOutHeaders];
|
|
2366
|
+
const headers = {};
|
|
2367
|
+
if (headersMap !== null) {
|
|
2368
|
+
const keys = Object.keys(headersMap);
|
|
2369
|
+
for (let i = 0, l = keys.length; i < l; i++) {
|
|
2370
|
+
const key = keys[i];
|
|
2371
|
+
headers[headersMap[key][0]] = headersMap[key][1];
|
|
2372
|
+
}
|
|
2373
|
+
}
|
|
2374
|
+
return headers;
|
|
2375
|
+
}
|
|
2376
|
+
cork() {
|
|
2377
|
+
if (this._writtenDataBuffer != null) {
|
|
2378
|
+
this._writtenDataBuffer.cork();
|
|
2379
|
+
} else {
|
|
2380
|
+
this[kCorked]++;
|
|
2381
|
+
}
|
|
2382
|
+
}
|
|
2383
|
+
uncork() {
|
|
2384
|
+
if (this._writtenDataBuffer != null) {
|
|
2385
|
+
this._writtenDataBuffer.uncork();
|
|
2386
|
+
} else {
|
|
2387
|
+
this[kCorked]--;
|
|
2388
|
+
}
|
|
2389
|
+
}
|
|
2390
|
+
setTimeout(msecs, callback) {
|
|
2391
|
+
return this;
|
|
2392
|
+
}
|
|
2393
|
+
destroy(error) {
|
|
2394
|
+
if (this.destroyed) {
|
|
2395
|
+
return this;
|
|
2396
|
+
}
|
|
2397
|
+
this.destroyed = true;
|
|
2398
|
+
return this;
|
|
2399
|
+
}
|
|
2400
|
+
_send(data, encoding, callback) {
|
|
2401
|
+
var _b2;
|
|
2402
|
+
if (!this._headerSent) {
|
|
2403
|
+
const header = this._header;
|
|
2404
|
+
if (typeof data === "string" && (encoding === "utf8" || encoding === "latin1" || !encoding)) {
|
|
2405
|
+
data = header + data;
|
|
2406
|
+
} else {
|
|
2407
|
+
this.outputData.unshift({
|
|
2408
|
+
data: header,
|
|
2409
|
+
encoding: "latin1",
|
|
2410
|
+
callback: void 0
|
|
2411
|
+
});
|
|
2412
|
+
this.outputSize += header.length;
|
|
2413
|
+
this._onPendingData(header.length);
|
|
2414
|
+
}
|
|
2415
|
+
this.writtenHeaderBytes = header.length;
|
|
2416
|
+
const [statusLine, ...headerLines] = this._header.split("\r\n");
|
|
2417
|
+
const STATUS_LINE_REGEXP = /^HTTP\/1\.1 (?<statusCode>\d+) (?<statusMessage>.*)$/;
|
|
2418
|
+
const statusLineResult = STATUS_LINE_REGEXP.exec(statusLine);
|
|
2419
|
+
if (statusLineResult == null) {
|
|
2420
|
+
throw new Error("Unexpected! Status line was " + statusLine);
|
|
2421
|
+
}
|
|
2422
|
+
const { statusCode: statusCodeText, statusMessage } = (_b2 = statusLineResult.groups) !== null && _b2 !== void 0 ? _b2 : {};
|
|
2423
|
+
const statusCode = parseInt(statusCodeText, 10);
|
|
2424
|
+
const headers = {};
|
|
2425
|
+
for (const headerLine of headerLines) {
|
|
2426
|
+
if (headerLine !== "") {
|
|
2427
|
+
const pos = headerLine.indexOf(": ");
|
|
2428
|
+
const k = headerLine.slice(0, pos);
|
|
2429
|
+
const v = headerLine.slice(pos + 2);
|
|
2430
|
+
headers[k] = v;
|
|
2431
|
+
}
|
|
2432
|
+
}
|
|
2433
|
+
this._headerSent = true;
|
|
2434
|
+
const event = {
|
|
2435
|
+
statusCode,
|
|
2436
|
+
statusMessage,
|
|
2437
|
+
headers
|
|
2438
|
+
};
|
|
2439
|
+
this.emit("_headersSent", event);
|
|
2440
|
+
}
|
|
2441
|
+
return this._writeRaw(data, encoding, callback);
|
|
2442
|
+
}
|
|
2443
|
+
_onDataWritten(index, entry) {
|
|
2444
|
+
const event = { index, entry };
|
|
2445
|
+
this.emit("_dataWritten", event);
|
|
2446
|
+
}
|
|
2447
|
+
_writeRaw(data, encoding, callback) {
|
|
2448
|
+
let e;
|
|
2449
|
+
if (typeof encoding === "function") {
|
|
2450
|
+
callback = encoding;
|
|
2451
|
+
e = void 0;
|
|
2452
|
+
} else {
|
|
2453
|
+
e = encoding;
|
|
2454
|
+
}
|
|
2455
|
+
if (this._writtenDataBuffer != null) {
|
|
2456
|
+
if (this.outputData.length) {
|
|
2457
|
+
this._flushOutput(this._writtenDataBuffer);
|
|
2458
|
+
}
|
|
2459
|
+
return this._writtenDataBuffer.write(data, e, callback);
|
|
2460
|
+
}
|
|
2461
|
+
this.outputData.push({ data, encoding: e, callback });
|
|
2462
|
+
this.outputSize += data.length;
|
|
2463
|
+
this._onPendingData(data.length);
|
|
2464
|
+
return this.outputSize < HIGH_WATER_MARK;
|
|
2465
|
+
}
|
|
2466
|
+
_storeHeader(firstLine, headers) {
|
|
2467
|
+
const state = {
|
|
2468
|
+
connection: false,
|
|
2469
|
+
contLen: false,
|
|
2470
|
+
te: false,
|
|
2471
|
+
date: false,
|
|
2472
|
+
expect: false,
|
|
2473
|
+
trailer: false,
|
|
2474
|
+
header: firstLine
|
|
2475
|
+
};
|
|
2476
|
+
if (headers) {
|
|
2477
|
+
if (headers === this[kOutHeaders]) {
|
|
2478
|
+
for (const key in headers) {
|
|
2479
|
+
const entry = headers[key];
|
|
2480
|
+
processHeader(this, state, entry[0], entry[1], false);
|
|
2481
|
+
}
|
|
2482
|
+
} else if (Array.isArray(headers)) {
|
|
2483
|
+
if (headers.length && Array.isArray(headers[0])) {
|
|
2484
|
+
for (let i = 0; i < headers.length; i++) {
|
|
2485
|
+
const entry = headers[i];
|
|
2486
|
+
processHeader(this, state, entry[0], entry[1], true);
|
|
2487
|
+
}
|
|
2488
|
+
} else {
|
|
2489
|
+
if (headers.length % 2 !== 0) {
|
|
2490
|
+
throw new ERR_INVALID_ARG_VALUE("headers", headers);
|
|
2491
|
+
}
|
|
2492
|
+
for (let n = 0; n < headers.length; n += 2) {
|
|
2493
|
+
processHeader(this, state, headers[n], headers[n + 1], true);
|
|
2494
|
+
}
|
|
2495
|
+
}
|
|
2496
|
+
} else {
|
|
2497
|
+
for (const key in headers) {
|
|
2498
|
+
if (headers.hasOwnProperty(key)) {
|
|
2499
|
+
const _headers = headers;
|
|
2500
|
+
processHeader(this, state, key, _headers[key], true);
|
|
2501
|
+
}
|
|
2502
|
+
}
|
|
2503
|
+
}
|
|
2504
|
+
}
|
|
2505
|
+
let { header } = state;
|
|
2506
|
+
if (this.sendDate && !state.date) {
|
|
2507
|
+
header += "Date: " + utcDate() + "\r\n";
|
|
2508
|
+
}
|
|
2509
|
+
if (this.chunkedEncoding && (this.statusCode === 204 || this.statusCode === 304)) {
|
|
2510
|
+
debug(this.statusCode + " response should not use chunked encoding, closing connection.");
|
|
2511
|
+
this.chunkedEncoding = false;
|
|
2512
|
+
this.shouldKeepAlive = false;
|
|
2513
|
+
}
|
|
2514
|
+
if (this._removedConnection) {
|
|
2515
|
+
this._last = true;
|
|
2516
|
+
this.shouldKeepAlive = false;
|
|
2517
|
+
} else if (!state.connection) {
|
|
2518
|
+
const shouldSendKeepAlive = this.shouldKeepAlive && (state.contLen || this.useChunkedEncodingByDefault);
|
|
2519
|
+
if (shouldSendKeepAlive && this.maxRequestsOnConnectionReached) {
|
|
2520
|
+
header += "Connection: close\r\n";
|
|
2521
|
+
} else if (shouldSendKeepAlive) {
|
|
2522
|
+
header += "Connection: keep-alive\r\n";
|
|
2523
|
+
if (this._keepAliveTimeout && this._defaultKeepAlive) {
|
|
2524
|
+
const timeoutSeconds = Math.floor(this._keepAliveTimeout / 1e3);
|
|
2525
|
+
header += `Keep-Alive: timeout=${timeoutSeconds}\r
|
|
2526
|
+
`;
|
|
2527
|
+
}
|
|
2528
|
+
} else {
|
|
2529
|
+
this._last = true;
|
|
2530
|
+
header += "Connection: close\r\n";
|
|
2531
|
+
}
|
|
2532
|
+
}
|
|
2533
|
+
if (!state.contLen && !state.te) {
|
|
2534
|
+
if (!this._hasBody) {
|
|
2535
|
+
this.chunkedEncoding = false;
|
|
2536
|
+
} else if (!this.useChunkedEncodingByDefault) {
|
|
2537
|
+
this._last = true;
|
|
2538
|
+
} else if (!state.trailer && !this._removedContLen && typeof this._contentLength === "number") {
|
|
2539
|
+
header += "Content-Length: " + this._contentLength + "\r\n";
|
|
2540
|
+
} else if (!this._removedTE) {
|
|
2541
|
+
header += "Transfer-Encoding: chunked\r\n";
|
|
2542
|
+
this.chunkedEncoding = true;
|
|
2543
|
+
} else {
|
|
2544
|
+
debug("Both Content-Length and Transfer-Encoding are removed");
|
|
2545
|
+
}
|
|
2546
|
+
}
|
|
2547
|
+
if (this.chunkedEncoding !== true && state.trailer) {
|
|
2548
|
+
throw new ERR_HTTP_TRAILER_INVALID();
|
|
2549
|
+
}
|
|
2550
|
+
this._header = header + "\r\n";
|
|
2551
|
+
this._headerSent = false;
|
|
2552
|
+
if (state.expect) {
|
|
2553
|
+
this._send("");
|
|
2554
|
+
}
|
|
2555
|
+
}
|
|
2556
|
+
setHeader(name, value) {
|
|
2557
|
+
if (this._header) {
|
|
2558
|
+
throw new ERR_HTTP_HEADERS_SENT("set");
|
|
2559
|
+
}
|
|
2560
|
+
validateHeaderName(name);
|
|
2561
|
+
validateHeaderValue(name, value);
|
|
2562
|
+
let headers = this[kOutHeaders];
|
|
2563
|
+
if (headers === null) {
|
|
2564
|
+
this[kOutHeaders] = headers = /* @__PURE__ */ Object.create(null);
|
|
2565
|
+
}
|
|
2566
|
+
headers[name.toLowerCase()] = [name, value];
|
|
2567
|
+
return this;
|
|
2568
|
+
}
|
|
2569
|
+
appendHeader(name, value) {
|
|
2570
|
+
if (this._header) {
|
|
2571
|
+
throw new ERR_HTTP_HEADERS_SENT("append");
|
|
2572
|
+
}
|
|
2573
|
+
validateHeaderName(name);
|
|
2574
|
+
validateHeaderValue(name, value);
|
|
2575
|
+
const field = name.toLowerCase();
|
|
2576
|
+
const headers = this[kOutHeaders];
|
|
2577
|
+
if (headers === null || !headers[field]) {
|
|
2578
|
+
return this.setHeader(name, value);
|
|
2579
|
+
}
|
|
2580
|
+
if (!Array.isArray(headers[field][1])) {
|
|
2581
|
+
headers[field][1] = [headers[field][1]];
|
|
2582
|
+
}
|
|
2583
|
+
const existingValues = headers[field][1];
|
|
2584
|
+
if (Array.isArray(value)) {
|
|
2585
|
+
for (let i = 0, length = value.length; i < length; i++) {
|
|
2586
|
+
existingValues.push(value[i]);
|
|
2587
|
+
}
|
|
2588
|
+
} else {
|
|
2589
|
+
existingValues.push(value);
|
|
2590
|
+
}
|
|
2591
|
+
return this;
|
|
2592
|
+
}
|
|
2593
|
+
getHeader(name) {
|
|
2594
|
+
validateString(name, "name");
|
|
2595
|
+
const headers = this[kOutHeaders];
|
|
2596
|
+
if (headers === null) {
|
|
2597
|
+
return void 0;
|
|
2598
|
+
}
|
|
2599
|
+
const entry = headers[name.toLowerCase()];
|
|
2600
|
+
return entry && entry[1];
|
|
2601
|
+
}
|
|
2602
|
+
getHeaderNames() {
|
|
2603
|
+
return this[kOutHeaders] !== null ? Object.keys(this[kOutHeaders]) : [];
|
|
2604
|
+
}
|
|
2605
|
+
getRawHeaderNames() {
|
|
2606
|
+
const headersMap = this[kOutHeaders];
|
|
2607
|
+
if (headersMap === null)
|
|
2608
|
+
return [];
|
|
2609
|
+
const values = Object.values(headersMap);
|
|
2610
|
+
const headers = Array(values.length);
|
|
2611
|
+
for (let i = 0, l = values.length; i < l; i++) {
|
|
2612
|
+
headers[i] = values[i][0];
|
|
2613
|
+
}
|
|
2614
|
+
return headers;
|
|
2615
|
+
}
|
|
2616
|
+
getHeaders() {
|
|
2617
|
+
const headers = this[kOutHeaders];
|
|
2618
|
+
const ret = /* @__PURE__ */ Object.create(null);
|
|
2619
|
+
if (headers) {
|
|
2620
|
+
const keys = Object.keys(headers);
|
|
2621
|
+
for (let i = 0; i < keys.length; ++i) {
|
|
2622
|
+
const key = keys[i];
|
|
2623
|
+
const val = headers[key][1];
|
|
2624
|
+
ret[key] = val;
|
|
2625
|
+
}
|
|
2626
|
+
}
|
|
2627
|
+
return ret;
|
|
2628
|
+
}
|
|
2629
|
+
hasHeader(name) {
|
|
2630
|
+
validateString(name, "name");
|
|
2631
|
+
return this[kOutHeaders] !== null && !!this[kOutHeaders][name.toLowerCase()];
|
|
2632
|
+
}
|
|
2633
|
+
removeHeader(name) {
|
|
2634
|
+
validateString(name, "name");
|
|
2635
|
+
if (this._header) {
|
|
2636
|
+
throw new ERR_HTTP_HEADERS_SENT("remove");
|
|
2637
|
+
}
|
|
2638
|
+
const key = name.toLowerCase();
|
|
2639
|
+
switch (key) {
|
|
2640
|
+
case "connection":
|
|
2641
|
+
this._removedConnection = true;
|
|
2642
|
+
break;
|
|
2643
|
+
case "content-length":
|
|
2644
|
+
this._removedContLen = true;
|
|
2645
|
+
break;
|
|
2646
|
+
case "transfer-encoding":
|
|
2647
|
+
this._removedTE = true;
|
|
2648
|
+
break;
|
|
2649
|
+
case "date":
|
|
2650
|
+
this.sendDate = false;
|
|
2651
|
+
break;
|
|
2652
|
+
}
|
|
2653
|
+
if (this[kOutHeaders] !== null) {
|
|
2654
|
+
delete this[kOutHeaders][key];
|
|
2655
|
+
}
|
|
2656
|
+
}
|
|
2657
|
+
_implicitHeader() {
|
|
2658
|
+
throw new ERR_METHOD_NOT_IMPLEMENTED("_implicitHeader()");
|
|
2659
|
+
}
|
|
2660
|
+
get headersSent() {
|
|
2661
|
+
return !!this._header;
|
|
2662
|
+
}
|
|
2663
|
+
write(chunk, encoding, callback) {
|
|
2664
|
+
let e;
|
|
2665
|
+
if (typeof encoding === "function") {
|
|
2666
|
+
callback = encoding;
|
|
2667
|
+
e = void 0;
|
|
2668
|
+
} else {
|
|
2669
|
+
e = encoding;
|
|
2670
|
+
}
|
|
2671
|
+
const ret = write_(this, chunk, e, callback, false);
|
|
2672
|
+
if (!ret) {
|
|
2673
|
+
this[kNeedDrain] = true;
|
|
2674
|
+
}
|
|
2675
|
+
return ret;
|
|
2676
|
+
}
|
|
2677
|
+
addTrailers(headers) {
|
|
2678
|
+
this._trailer = "";
|
|
2679
|
+
const isArray = Array.isArray(headers);
|
|
2680
|
+
const keys = isArray ? [...headers.keys()] : Object.keys(headers);
|
|
2681
|
+
for (let i = 0, l = keys.length; i < l; i++) {
|
|
2682
|
+
let field, value;
|
|
2683
|
+
if (isArray) {
|
|
2684
|
+
const _headers = headers;
|
|
2685
|
+
const key = keys[i];
|
|
2686
|
+
field = _headers[key][0];
|
|
2687
|
+
value = _headers[key][1];
|
|
2688
|
+
} else {
|
|
2689
|
+
const _headers = headers;
|
|
2690
|
+
const key = keys[i];
|
|
2691
|
+
field = key;
|
|
2692
|
+
value = _headers[key];
|
|
2693
|
+
}
|
|
2694
|
+
if (!field || !checkIsHttpToken(field)) {
|
|
2695
|
+
throw new ERR_INVALID_HTTP_TOKEN("Trailer name", field);
|
|
2696
|
+
}
|
|
2697
|
+
if (Array.isArray(value) && value.length > 1 && (!this[kUniqueHeaders] || !this[kUniqueHeaders].has(field.toLowerCase()))) {
|
|
2698
|
+
for (let j = 0, l2 = value.length; j < l2; j++) {
|
|
2699
|
+
if (checkInvalidHeaderChar(value[j])) {
|
|
2700
|
+
debug(`Trailer "${field}"[${j}] contains invalid characters`);
|
|
2701
|
+
throw new ERR_INVALID_CHAR("trailer content", field);
|
|
2702
|
+
}
|
|
2703
|
+
this._trailer += field + ": " + value[j] + "\r\n";
|
|
2704
|
+
}
|
|
2705
|
+
} else {
|
|
2706
|
+
if (Array.isArray(value)) {
|
|
2707
|
+
value = value.join("; ");
|
|
2708
|
+
} else {
|
|
2709
|
+
value = String(value);
|
|
2710
|
+
}
|
|
2711
|
+
if (checkInvalidHeaderChar(value)) {
|
|
2712
|
+
debug(`Trailer "${field}" contains invalid characters`);
|
|
2713
|
+
throw new ERR_INVALID_CHAR("trailer content", field);
|
|
2714
|
+
}
|
|
2715
|
+
this._trailer += field + ": " + value + "\r\n";
|
|
2716
|
+
}
|
|
2717
|
+
}
|
|
2718
|
+
}
|
|
2719
|
+
end(chunk, encoding, callback) {
|
|
2720
|
+
let ch;
|
|
2721
|
+
let e;
|
|
2722
|
+
if (typeof chunk === "function") {
|
|
2723
|
+
callback = chunk;
|
|
2724
|
+
ch = void 0;
|
|
2725
|
+
e = void 0;
|
|
2726
|
+
} else if (typeof encoding === "function") {
|
|
2727
|
+
callback = encoding;
|
|
2728
|
+
ch = chunk;
|
|
2729
|
+
e = void 0;
|
|
2730
|
+
} else {
|
|
2731
|
+
ch = chunk;
|
|
2732
|
+
e = encoding;
|
|
2733
|
+
}
|
|
2734
|
+
if (ch) {
|
|
2735
|
+
if (this.finished) {
|
|
2736
|
+
onError2(this, new ERR_STREAM_WRITE_AFTER_END(), typeof callback !== "function" ? nop : callback);
|
|
2737
|
+
return this;
|
|
2738
|
+
}
|
|
2739
|
+
if (this._writtenDataBuffer != null) {
|
|
2740
|
+
this._writtenDataBuffer.cork();
|
|
2741
|
+
}
|
|
2742
|
+
write_(this, ch, e, void 0, true);
|
|
2743
|
+
} else if (this.finished) {
|
|
2744
|
+
if (typeof callback === "function") {
|
|
2745
|
+
if (!this.writableFinished) {
|
|
2746
|
+
this.on("finish", callback);
|
|
2747
|
+
} else {
|
|
2748
|
+
callback(new ERR_STREAM_ALREADY_FINISHED("end"));
|
|
2749
|
+
}
|
|
2750
|
+
}
|
|
2751
|
+
return this;
|
|
2752
|
+
} else if (!this._header) {
|
|
2753
|
+
if (this._writtenDataBuffer != null) {
|
|
2754
|
+
this._writtenDataBuffer.cork();
|
|
2755
|
+
}
|
|
2756
|
+
this._contentLength = 0;
|
|
2757
|
+
this._implicitHeader();
|
|
2758
|
+
}
|
|
2759
|
+
if (typeof callback === "function")
|
|
2760
|
+
this.once("finish", callback);
|
|
2761
|
+
const finish = onFinish.bind(void 0, this);
|
|
2762
|
+
if (this._hasBody && this.chunkedEncoding) {
|
|
2763
|
+
this._send("0\r\n" + this._trailer + "\r\n", "latin1", finish);
|
|
2764
|
+
} else if (!this._headerSent || this.writableLength || ch) {
|
|
2765
|
+
this._send("", "latin1", finish);
|
|
2766
|
+
} else {
|
|
2767
|
+
process.nextTick(finish);
|
|
2768
|
+
}
|
|
2769
|
+
if (this._writtenDataBuffer != null) {
|
|
2770
|
+
this._writtenDataBuffer.uncork();
|
|
2771
|
+
}
|
|
2772
|
+
this[kCorked] = 0;
|
|
2773
|
+
this.finished = true;
|
|
2774
|
+
debug("outgoing message end.");
|
|
2775
|
+
if (this.outputData.length === 0 && this._writtenDataBuffer != null) {
|
|
2776
|
+
this._finish();
|
|
2777
|
+
}
|
|
2778
|
+
return this;
|
|
2779
|
+
}
|
|
2780
|
+
_finish() {
|
|
2781
|
+
this.emit("prefinish");
|
|
2782
|
+
}
|
|
2783
|
+
_flushOutput(dataBuffer) {
|
|
2784
|
+
while (this[kCorked]) {
|
|
2785
|
+
this[kCorked]--;
|
|
2786
|
+
dataBuffer.cork();
|
|
2787
|
+
}
|
|
2788
|
+
const outputLength = this.outputData.length;
|
|
2789
|
+
if (outputLength <= 0)
|
|
2790
|
+
return void 0;
|
|
2791
|
+
const outputData = this.outputData;
|
|
2792
|
+
dataBuffer.cork();
|
|
2793
|
+
let ret;
|
|
2794
|
+
for (let i = 0; i < outputLength; i++) {
|
|
2795
|
+
const { data, encoding, callback } = outputData[i];
|
|
2796
|
+
ret = dataBuffer.write(data, encoding, callback);
|
|
2797
|
+
}
|
|
2798
|
+
dataBuffer.uncork();
|
|
2799
|
+
this.outputData = [];
|
|
2800
|
+
this._onPendingData(-this.outputSize);
|
|
2801
|
+
this.outputSize = 0;
|
|
2802
|
+
return ret;
|
|
2803
|
+
}
|
|
2804
|
+
flushHeaders() {
|
|
2805
|
+
if (!this._header) {
|
|
2806
|
+
this._implicitHeader();
|
|
2807
|
+
}
|
|
2808
|
+
this._send("");
|
|
2809
|
+
}
|
|
2810
|
+
pipe(destination) {
|
|
2811
|
+
this.emit("error", new ERR_STREAM_CANNOT_PIPE());
|
|
2812
|
+
return destination;
|
|
2813
|
+
}
|
|
2814
|
+
};
|
|
2815
|
+
function processHeader(self, state, key, value, validate) {
|
|
2816
|
+
if (validate) {
|
|
2817
|
+
validateHeaderName(key);
|
|
2818
|
+
}
|
|
2819
|
+
if (Array.isArray(value)) {
|
|
2820
|
+
if ((value.length < 2 || !isCookieField(key)) && (!self[kUniqueHeaders] || !self[kUniqueHeaders].has(key.toLowerCase()))) {
|
|
2821
|
+
for (let i = 0; i < value.length; i++) {
|
|
2822
|
+
storeHeader(self, state, key, value[i], validate);
|
|
2823
|
+
}
|
|
2824
|
+
return;
|
|
2825
|
+
}
|
|
2826
|
+
value = value.join("; ");
|
|
2827
|
+
}
|
|
2828
|
+
storeHeader(self, state, key, String(value), validate);
|
|
2829
|
+
}
|
|
2830
|
+
function storeHeader(self, state, key, value, validate) {
|
|
2831
|
+
if (validate) {
|
|
2832
|
+
validateHeaderValue(key, value);
|
|
2833
|
+
}
|
|
2834
|
+
state.header += key + ": " + value + "\r\n";
|
|
2835
|
+
matchHeader(self, state, key, value);
|
|
2836
|
+
}
|
|
2837
|
+
function matchHeader(self, state, field, value) {
|
|
2838
|
+
if (field.length < 4 || field.length > 17)
|
|
2839
|
+
return;
|
|
2840
|
+
field = field.toLowerCase();
|
|
2841
|
+
switch (field) {
|
|
2842
|
+
case "connection":
|
|
2843
|
+
state.connection = true;
|
|
2844
|
+
self._removedConnection = false;
|
|
2845
|
+
if (RE_CONN_CLOSE.exec(value) !== null)
|
|
2846
|
+
self._last = true;
|
|
2847
|
+
else
|
|
2848
|
+
self.shouldKeepAlive = true;
|
|
2849
|
+
break;
|
|
2850
|
+
case "transfer-encoding":
|
|
2851
|
+
state.te = true;
|
|
2852
|
+
self._removedTE = false;
|
|
2853
|
+
if (chunkExpression.exec(value) !== null)
|
|
2854
|
+
self.chunkedEncoding = true;
|
|
2855
|
+
break;
|
|
2856
|
+
case "content-length":
|
|
2857
|
+
state.contLen = true;
|
|
2858
|
+
self._removedContLen = false;
|
|
2859
|
+
break;
|
|
2860
|
+
case "date":
|
|
2861
|
+
case "expect":
|
|
2862
|
+
case "trailer":
|
|
2863
|
+
state[field] = true;
|
|
2864
|
+
break;
|
|
2865
|
+
case "keep-alive":
|
|
2866
|
+
self._defaultKeepAlive = false;
|
|
2867
|
+
break;
|
|
2868
|
+
}
|
|
2869
|
+
}
|
|
2870
|
+
var crlf_buf = Buffer.from("\r\n");
|
|
2871
|
+
function onError2(msg, err, callback) {
|
|
2872
|
+
process.nextTick(emitErrorNt, msg, err, callback);
|
|
2873
|
+
}
|
|
2874
|
+
function emitErrorNt(msg, err, callback) {
|
|
2875
|
+
callback(err);
|
|
2876
|
+
if (typeof msg.emit === "function" && !msg._closed) {
|
|
2877
|
+
msg.emit("error", err);
|
|
2878
|
+
}
|
|
2879
|
+
}
|
|
2880
|
+
function write_(msg, chunk, encoding, callback, fromEnd) {
|
|
2881
|
+
if (typeof callback !== "function") {
|
|
2882
|
+
callback = nop;
|
|
2883
|
+
}
|
|
2884
|
+
let len;
|
|
2885
|
+
if (chunk === null) {
|
|
2886
|
+
throw new ERR_STREAM_NULL_VALUES();
|
|
2887
|
+
} else if (typeof chunk === "string") {
|
|
2888
|
+
len = Buffer.byteLength(chunk, encoding !== null && encoding !== void 0 ? encoding : void 0);
|
|
2889
|
+
} else if (isUint8Array(chunk)) {
|
|
2890
|
+
len = chunk.length;
|
|
2891
|
+
} else {
|
|
2892
|
+
throw new ERR_INVALID_ARG_TYPE("chunk", ["string", "Buffer", "Uint8Array"], chunk);
|
|
2893
|
+
}
|
|
2894
|
+
let err = void 0;
|
|
2895
|
+
if (msg.finished) {
|
|
2896
|
+
err = new ERR_STREAM_WRITE_AFTER_END();
|
|
2897
|
+
} else if (msg.destroyed) {
|
|
2898
|
+
err = new ERR_STREAM_DESTROYED("write");
|
|
2899
|
+
}
|
|
2900
|
+
if (err) {
|
|
2901
|
+
if (!msg.destroyed) {
|
|
2902
|
+
onError2(msg, err, callback);
|
|
2903
|
+
} else {
|
|
2904
|
+
process.nextTick(callback, err);
|
|
2905
|
+
}
|
|
2906
|
+
return false;
|
|
2907
|
+
}
|
|
2908
|
+
if (!msg._header) {
|
|
2909
|
+
if (fromEnd) {
|
|
2910
|
+
msg._contentLength = len;
|
|
2911
|
+
}
|
|
2912
|
+
msg._implicitHeader();
|
|
2913
|
+
}
|
|
2914
|
+
if (!msg._hasBody) {
|
|
2915
|
+
debug("This type of response MUST NOT have a body. Ignoring write() calls.");
|
|
2916
|
+
process.nextTick(callback);
|
|
2917
|
+
return true;
|
|
2918
|
+
}
|
|
2919
|
+
if (!fromEnd && msg._writtenDataBuffer != null && !msg._writtenDataBuffer.writableCorked) {
|
|
2920
|
+
msg._writtenDataBuffer.cork();
|
|
2921
|
+
process.nextTick(connectionCorkNT, msg._writtenDataBuffer);
|
|
2922
|
+
}
|
|
2923
|
+
let ret;
|
|
2924
|
+
if (msg.chunkedEncoding && chunk.length !== 0) {
|
|
2925
|
+
msg._send(len.toString(16), "latin1", void 0);
|
|
2926
|
+
msg._send(crlf_buf, void 0, void 0);
|
|
2927
|
+
msg._send(chunk, encoding, void 0);
|
|
2928
|
+
ret = msg._send(crlf_buf, void 0, callback);
|
|
2929
|
+
} else {
|
|
2930
|
+
ret = msg._send(chunk, encoding, callback);
|
|
2931
|
+
}
|
|
2932
|
+
debug("write ret = " + ret);
|
|
2933
|
+
return ret;
|
|
2934
|
+
}
|
|
2935
|
+
function connectionCorkNT(dataBuffer) {
|
|
2936
|
+
dataBuffer.uncork();
|
|
2937
|
+
}
|
|
2938
|
+
function onFinish(outmsg) {
|
|
2939
|
+
outmsg.emit("finish");
|
|
2940
|
+
}
|
|
2941
|
+
Object.defineProperties(ComputeJsOutgoingMessage.prototype, {
|
|
2942
|
+
writableFinished: {
|
|
2943
|
+
get() {
|
|
2944
|
+
return this.finished && this.outputSize === 0 && (this._writtenDataBuffer == null || this._writtenDataBuffer.writableLength === 0);
|
|
2945
|
+
}
|
|
2946
|
+
},
|
|
2947
|
+
writableObjectMode: {
|
|
2948
|
+
get() {
|
|
2949
|
+
return false;
|
|
2950
|
+
}
|
|
2951
|
+
},
|
|
2952
|
+
writableLength: {
|
|
2953
|
+
get() {
|
|
2954
|
+
return this.outputSize + (this._writtenDataBuffer != null ? this._writtenDataBuffer.writableLength : 0);
|
|
2955
|
+
}
|
|
2956
|
+
},
|
|
2957
|
+
writableHighWaterMark: {
|
|
2958
|
+
get() {
|
|
2959
|
+
return HIGH_WATER_MARK + (this._writtenDataBuffer != null ? this._writtenDataBuffer.writableHighWaterMark : 0);
|
|
2960
|
+
}
|
|
2961
|
+
},
|
|
2962
|
+
writableCorked: {
|
|
2963
|
+
get() {
|
|
2964
|
+
return this[kCorked] + (this._writtenDataBuffer != null ? this._writtenDataBuffer.writableCorked : 0);
|
|
2965
|
+
}
|
|
2966
|
+
},
|
|
2967
|
+
writableEnded: {
|
|
2968
|
+
get() {
|
|
2969
|
+
return this.finished;
|
|
2970
|
+
}
|
|
2971
|
+
},
|
|
2972
|
+
writableNeedDrain: {
|
|
2973
|
+
get() {
|
|
2974
|
+
return !this.destroyed && !this.finished && this[kNeedDrain];
|
|
2975
|
+
}
|
|
2976
|
+
}
|
|
2977
|
+
});
|
|
2978
|
+
|
|
2979
|
+
// node_modules/@fastly/http-compute-js/dist/http-compute-js/http-server.js
|
|
2980
|
+
import { Buffer as Buffer2 } from "buffer";
|
|
2981
|
+
var _a3;
|
|
2982
|
+
var headerCharRegex2 = /[^\t\x20-\x7e\x80-\xff]/;
|
|
2983
|
+
function checkInvalidHeaderChar2(val) {
|
|
2984
|
+
return headerCharRegex2.exec(val) !== null;
|
|
2985
|
+
}
|
|
2986
|
+
var STATUS_CODES = {
|
|
2987
|
+
100: "Continue",
|
|
2988
|
+
101: "Switching Protocols",
|
|
2989
|
+
102: "Processing",
|
|
2990
|
+
103: "Early Hints",
|
|
2991
|
+
200: "OK",
|
|
2992
|
+
201: "Created",
|
|
2993
|
+
202: "Accepted",
|
|
2994
|
+
203: "Non-Authoritative Information",
|
|
2995
|
+
204: "No Content",
|
|
2996
|
+
205: "Reset Content",
|
|
2997
|
+
206: "Partial Content",
|
|
2998
|
+
207: "Multi-Status",
|
|
2999
|
+
208: "Already Reported",
|
|
3000
|
+
226: "IM Used",
|
|
3001
|
+
300: "Multiple Choices",
|
|
3002
|
+
301: "Moved Permanently",
|
|
3003
|
+
302: "Found",
|
|
3004
|
+
303: "See Other",
|
|
3005
|
+
304: "Not Modified",
|
|
3006
|
+
305: "Use Proxy",
|
|
3007
|
+
307: "Temporary Redirect",
|
|
3008
|
+
308: "Permanent Redirect",
|
|
3009
|
+
400: "Bad Request",
|
|
3010
|
+
401: "Unauthorized",
|
|
3011
|
+
402: "Payment Required",
|
|
3012
|
+
403: "Forbidden",
|
|
3013
|
+
404: "Not Found",
|
|
3014
|
+
405: "Method Not Allowed",
|
|
3015
|
+
406: "Not Acceptable",
|
|
3016
|
+
407: "Proxy Authentication Required",
|
|
3017
|
+
408: "Request Timeout",
|
|
3018
|
+
409: "Conflict",
|
|
3019
|
+
410: "Gone",
|
|
3020
|
+
411: "Length Required",
|
|
3021
|
+
412: "Precondition Failed",
|
|
3022
|
+
413: "Payload Too Large",
|
|
3023
|
+
414: "URI Too Long",
|
|
3024
|
+
415: "Unsupported Media Type",
|
|
3025
|
+
416: "Range Not Satisfiable",
|
|
3026
|
+
417: "Expectation Failed",
|
|
3027
|
+
418: "I'm a Teapot",
|
|
3028
|
+
421: "Misdirected Request",
|
|
3029
|
+
422: "Unprocessable Entity",
|
|
3030
|
+
423: "Locked",
|
|
3031
|
+
424: "Failed Dependency",
|
|
3032
|
+
425: "Too Early",
|
|
3033
|
+
426: "Upgrade Required",
|
|
3034
|
+
428: "Precondition Required",
|
|
3035
|
+
429: "Too Many Requests",
|
|
3036
|
+
431: "Request Header Fields Too Large",
|
|
3037
|
+
451: "Unavailable For Legal Reasons",
|
|
3038
|
+
500: "Internal Server Error",
|
|
3039
|
+
501: "Not Implemented",
|
|
3040
|
+
502: "Bad Gateway",
|
|
3041
|
+
503: "Service Unavailable",
|
|
3042
|
+
504: "Gateway Timeout",
|
|
3043
|
+
505: "HTTP Version Not Supported",
|
|
3044
|
+
506: "Variant Also Negotiates",
|
|
3045
|
+
507: "Insufficient Storage",
|
|
3046
|
+
508: "Loop Detected",
|
|
3047
|
+
509: "Bandwidth Limit Exceeded",
|
|
3048
|
+
510: "Not Extended",
|
|
3049
|
+
511: "Network Authentication Required"
|
|
3050
|
+
// RFC 6585 6
|
|
3051
|
+
};
|
|
3052
|
+
var ComputeJsServerResponse = class _ComputeJsServerResponse extends ComputeJsOutgoingMessage {
|
|
3053
|
+
constructor(req) {
|
|
3054
|
+
super(req);
|
|
3055
|
+
this.statusCode = 200;
|
|
3056
|
+
this[_a3] = null;
|
|
3057
|
+
this.writeHeader = this.writeHead;
|
|
3058
|
+
if (req.method === "HEAD") {
|
|
3059
|
+
this._hasBody = false;
|
|
3060
|
+
}
|
|
3061
|
+
this.sendDate = true;
|
|
3062
|
+
this._sent100 = false;
|
|
3063
|
+
this._expect_continue = false;
|
|
3064
|
+
if (req.httpVersionMajor < 1 || req.httpVersionMinor < 1) {
|
|
3065
|
+
this.useChunkedEncodingByDefault = chunkExpression.exec(String(req.headers.te)) !== null;
|
|
3066
|
+
this.shouldKeepAlive = false;
|
|
3067
|
+
}
|
|
3068
|
+
this.computeResponse = new Promise((resolve) => {
|
|
3069
|
+
let finished = false;
|
|
3070
|
+
this.on("finish", () => {
|
|
3071
|
+
finished = true;
|
|
3072
|
+
});
|
|
3073
|
+
const initialDataChunks = [];
|
|
3074
|
+
const initialDataWrittenHandler = (e) => {
|
|
3075
|
+
if (finished) {
|
|
3076
|
+
return;
|
|
3077
|
+
}
|
|
3078
|
+
initialDataChunks[e.index] = this.dataFromDataWrittenEvent(e);
|
|
3079
|
+
};
|
|
3080
|
+
this.on("_dataWritten", initialDataWrittenHandler);
|
|
3081
|
+
this.on("_headersSent", (e) => {
|
|
3082
|
+
this.off("_dataWritten", initialDataWrittenHandler);
|
|
3083
|
+
const { statusCode, statusMessage, headers } = e;
|
|
3084
|
+
resolve(this._toComputeResponse(statusCode, statusMessage, headers, initialDataChunks, finished));
|
|
3085
|
+
});
|
|
3086
|
+
});
|
|
3087
|
+
}
|
|
3088
|
+
dataFromDataWrittenEvent(e) {
|
|
3089
|
+
const { index, entry } = e;
|
|
3090
|
+
let { data, encoding } = entry;
|
|
3091
|
+
if (index === 0) {
|
|
3092
|
+
if (typeof data !== "string") {
|
|
3093
|
+
console.error("First chunk should be string, not sure what happened.");
|
|
3094
|
+
throw new ERR_INVALID_ARG_TYPE("packet.data", ["string", "Buffer", "Uint8Array"], data);
|
|
3095
|
+
}
|
|
3096
|
+
data = data.slice(this.writtenHeaderBytes);
|
|
3097
|
+
}
|
|
3098
|
+
if (typeof data === "string") {
|
|
3099
|
+
if (encoding === void 0 || encoding === "utf8" || encoding === "utf-8") {
|
|
3100
|
+
data = _ComputeJsServerResponse.encoder.encode(data);
|
|
3101
|
+
} else {
|
|
3102
|
+
data = Buffer2.from(data, encoding);
|
|
3103
|
+
}
|
|
3104
|
+
}
|
|
3105
|
+
return data;
|
|
3106
|
+
}
|
|
3107
|
+
_finish() {
|
|
3108
|
+
super._finish();
|
|
3109
|
+
}
|
|
3110
|
+
assignSocket(socket) {
|
|
3111
|
+
throw new ERR_METHOD_NOT_IMPLEMENTED("assignSocket");
|
|
3112
|
+
}
|
|
3113
|
+
detachSocket(socket) {
|
|
3114
|
+
throw new ERR_METHOD_NOT_IMPLEMENTED("detachSocket");
|
|
3115
|
+
}
|
|
3116
|
+
writeContinue(callback) {
|
|
3117
|
+
this._writeRaw("HTTP/1.1 100 Continue\r\n\r\n", "ascii", callback);
|
|
3118
|
+
this._sent100 = true;
|
|
3119
|
+
}
|
|
3120
|
+
writeProcessing(callback) {
|
|
3121
|
+
this._writeRaw("HTTP/1.1 102 Processing\r\n\r\n", "ascii", callback);
|
|
3122
|
+
}
|
|
3123
|
+
_implicitHeader() {
|
|
3124
|
+
this.writeHead(this.statusCode);
|
|
3125
|
+
}
|
|
3126
|
+
writeHead(statusCode, reason, obj) {
|
|
3127
|
+
const originalStatusCode = statusCode;
|
|
3128
|
+
statusCode |= 0;
|
|
3129
|
+
if (statusCode < 100 || statusCode > 999) {
|
|
3130
|
+
throw new ERR_HTTP_INVALID_STATUS_CODE(originalStatusCode);
|
|
3131
|
+
}
|
|
3132
|
+
if (typeof reason === "string") {
|
|
3133
|
+
this.statusMessage = reason;
|
|
3134
|
+
} else {
|
|
3135
|
+
if (!this.statusMessage)
|
|
3136
|
+
this.statusMessage = STATUS_CODES[statusCode] || "unknown";
|
|
3137
|
+
obj = reason;
|
|
3138
|
+
}
|
|
3139
|
+
this.statusCode = statusCode;
|
|
3140
|
+
let headers;
|
|
3141
|
+
if (this[kOutHeaders]) {
|
|
3142
|
+
let k;
|
|
3143
|
+
if (Array.isArray(obj)) {
|
|
3144
|
+
if (obj.length % 2 !== 0) {
|
|
3145
|
+
throw new ERR_INVALID_ARG_VALUE("headers", obj);
|
|
3146
|
+
}
|
|
3147
|
+
for (let n = 0; n < obj.length; n += 2) {
|
|
3148
|
+
k = obj[n];
|
|
3149
|
+
if (k) {
|
|
3150
|
+
this.setHeader(k, obj[n + 1]);
|
|
3151
|
+
}
|
|
3152
|
+
}
|
|
3153
|
+
} else if (obj) {
|
|
3154
|
+
const keys = Object.keys(obj);
|
|
3155
|
+
for (let i = 0; i < keys.length; i++) {
|
|
3156
|
+
k = keys[i];
|
|
3157
|
+
if (k) {
|
|
3158
|
+
this.setHeader(k, obj[k]);
|
|
3159
|
+
}
|
|
3160
|
+
}
|
|
3161
|
+
}
|
|
3162
|
+
if (k === void 0 && this._header) {
|
|
3163
|
+
throw new ERR_HTTP_HEADERS_SENT("render");
|
|
3164
|
+
}
|
|
3165
|
+
headers = this[kOutHeaders];
|
|
3166
|
+
} else {
|
|
3167
|
+
headers = obj;
|
|
3168
|
+
}
|
|
3169
|
+
if (checkInvalidHeaderChar2(this.statusMessage)) {
|
|
3170
|
+
throw new ERR_INVALID_CHAR("statusMessage");
|
|
3171
|
+
}
|
|
3172
|
+
const statusLine = `HTTP/1.1 ${statusCode} ${this.statusMessage}\r
|
|
3173
|
+
`;
|
|
3174
|
+
if (statusCode === 204 || statusCode === 304 || statusCode >= 100 && statusCode <= 199) {
|
|
3175
|
+
this._hasBody = false;
|
|
3176
|
+
}
|
|
3177
|
+
if (this._expect_continue && !this._sent100) {
|
|
3178
|
+
this.shouldKeepAlive = false;
|
|
3179
|
+
}
|
|
3180
|
+
this._storeHeader(statusLine, headers !== null && headers !== void 0 ? headers : null);
|
|
3181
|
+
return this;
|
|
3182
|
+
}
|
|
3183
|
+
_toComputeResponse(status, statusText, sentHeaders, initialDataChunks, finished) {
|
|
3184
|
+
const headers = new Headers();
|
|
3185
|
+
for (const [key, value] of Object.entries(sentHeaders)) {
|
|
3186
|
+
headers.append(key, value);
|
|
3187
|
+
}
|
|
3188
|
+
const _this = this;
|
|
3189
|
+
const body = this._hasBody ? new ReadableStream({
|
|
3190
|
+
start(controller) {
|
|
3191
|
+
for (const dataChunk of initialDataChunks) {
|
|
3192
|
+
controller.enqueue(dataChunk);
|
|
3193
|
+
}
|
|
3194
|
+
if (finished) {
|
|
3195
|
+
controller.close();
|
|
3196
|
+
} else {
|
|
3197
|
+
_this.on("finish", () => {
|
|
3198
|
+
finished = true;
|
|
3199
|
+
controller.close();
|
|
3200
|
+
});
|
|
3201
|
+
_this.on("_dataWritten", (e) => {
|
|
3202
|
+
if (finished) {
|
|
3203
|
+
return;
|
|
3204
|
+
}
|
|
3205
|
+
const data = _this.dataFromDataWrittenEvent(e);
|
|
3206
|
+
controller.enqueue(data);
|
|
3207
|
+
});
|
|
3208
|
+
}
|
|
3209
|
+
}
|
|
3210
|
+
}) : null;
|
|
3211
|
+
return new Response(body, {
|
|
3212
|
+
status,
|
|
3213
|
+
statusText,
|
|
3214
|
+
headers
|
|
3215
|
+
});
|
|
3216
|
+
}
|
|
3217
|
+
};
|
|
3218
|
+
_a3 = kOutHeaders;
|
|
3219
|
+
ComputeJsServerResponse.encoder = new TextEncoder();
|
|
3220
|
+
function toReqRes(req, options) {
|
|
3221
|
+
const { createIncomingMessage = () => new ComputeJsIncomingMessage(), createServerResponse = (incoming2) => new ComputeJsServerResponse(incoming2), ctx } = options !== null && options !== void 0 ? options : {};
|
|
3222
|
+
const incoming = createIncomingMessage(ctx);
|
|
3223
|
+
const serverResponse = createServerResponse(incoming, ctx);
|
|
3224
|
+
const reqUrl = new URL(req.url);
|
|
3225
|
+
const versionMajor = 1;
|
|
3226
|
+
const versionMinor = 1;
|
|
3227
|
+
incoming.httpVersionMajor = versionMajor;
|
|
3228
|
+
incoming.httpVersionMinor = versionMinor;
|
|
3229
|
+
incoming.httpVersion = `${versionMajor}.${versionMinor}`;
|
|
3230
|
+
incoming.url = reqUrl.pathname + reqUrl.search;
|
|
3231
|
+
incoming.upgrade = false;
|
|
3232
|
+
const headers = [];
|
|
3233
|
+
for (const [headerName, headerValue] of req.headers) {
|
|
3234
|
+
headers.push(headerName);
|
|
3235
|
+
headers.push(headerValue);
|
|
3236
|
+
}
|
|
3237
|
+
incoming._addHeaderLines(headers, headers.length);
|
|
3238
|
+
incoming.method = req.method;
|
|
3239
|
+
incoming._stream = req.body;
|
|
3240
|
+
return {
|
|
3241
|
+
req: incoming,
|
|
3242
|
+
res: serverResponse
|
|
3243
|
+
};
|
|
3244
|
+
}
|
|
3245
|
+
function toComputeResponse(res) {
|
|
3246
|
+
if (!(res instanceof ComputeJsServerResponse)) {
|
|
3247
|
+
throw new Error("toComputeResponse must be called on ServerResponse generated by generateRequestResponse");
|
|
3248
|
+
}
|
|
3249
|
+
return res.computeResponse;
|
|
3250
|
+
}
|
|
3251
|
+
|
|
3252
|
+
// src/run/handlers/server.ts
|
|
3253
|
+
var nextHandler;
|
|
3254
|
+
var nextConfig;
|
|
3255
|
+
var tagsManifest;
|
|
3256
|
+
var server_default = async (request) => {
|
|
3257
|
+
if (!nextHandler) {
|
|
3258
|
+
const { getRunConfig, setRunConfig } = await import("../config.js");
|
|
3259
|
+
nextConfig = await getRunConfig();
|
|
3260
|
+
setRunConfig(nextConfig);
|
|
3261
|
+
tagsManifest = await getTagsManifest();
|
|
3262
|
+
const { getMockedRequestHandlers } = await import("../next.cjs");
|
|
3263
|
+
[nextHandler] = await getMockedRequestHandlers({
|
|
3264
|
+
port: 3e3,
|
|
3265
|
+
hostname: "localhost",
|
|
3266
|
+
dir: process.cwd(),
|
|
3267
|
+
isDev: false
|
|
3268
|
+
});
|
|
3269
|
+
}
|
|
3270
|
+
const { req, res } = toReqRes(request);
|
|
3271
|
+
const resProxy = nextResponseProxy(res);
|
|
3272
|
+
delete req.headers["accept-encoding"];
|
|
3273
|
+
try {
|
|
3274
|
+
await nextHandler(req, resProxy);
|
|
3275
|
+
} catch (error) {
|
|
3276
|
+
console.error(error);
|
|
3277
|
+
resProxy.statusCode = 500;
|
|
3278
|
+
resProxy.end("Internal Server Error");
|
|
3279
|
+
}
|
|
3280
|
+
const response = await toComputeResponse(resProxy);
|
|
3281
|
+
await adjustDateHeader(response.headers, request);
|
|
3282
|
+
setCacheControlHeaders(response.headers);
|
|
3283
|
+
setCacheTagsHeaders(response.headers, request, tagsManifest);
|
|
3284
|
+
setVaryHeaders(response.headers, request, nextConfig);
|
|
3285
|
+
return response;
|
|
3286
|
+
};
|
|
3287
|
+
export {
|
|
3288
|
+
server_default as default
|
|
3289
|
+
};
|