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,cAAc,EACd,UAAU,IACsB,mBAAvB,KAAK,QAAQ,QAAwB,KAAK,OAAO,OAAO,IAC9D,KAAK,QAAU,CAAC,EACnB,MAAO,KAAK,QACV,OAAuC,mBAAvB,KAAK,QAAQ,QAAwB,KAAK,OAAO,OAAO,KAAK,QAAU,CAAC,GAAI,KAAK,SAAU,EAAI,eAAe,uBAAuB,MAAO,KAClK,CAMA,SAAI,GACF,MAAM,EAAQ,KAAK,OAAO,KAAM,EAAI,eAAe,uBAAuB,OAAQ,EAAI,sBAAsB,sBAAsB,MAClI,OAAO,OAAO,eAAe,KAAM,QAAS,CAC1C,MAAO,EACP,cAAc,EACd,UAAU,IACR,CACN,CAIA,WAAI,GACF,OAAO,KAAK,eACd,GAEF,IAAI,OAAS","file":"/npm/elysia@1.4.27/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/elysia@1.4.27/dist/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n  for (var name in all)\n    __defProp(target, name, { get: all[name], enumerable: !0 });\n}, __copyProps = (to, from, except, desc) => {\n  if (from && typeof from == \"object\" || typeof from == \"function\")\n    for (let key of __getOwnPropNames(from))\n      !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n  return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n  // If the importer is in node compatibility mode or this is not an ESM\n  // file that has been converted to a CommonJS file using a Babel-\n  // compatible transform (i.e. \"__esModule\" has not been set), then set\n  // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n  isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: !0 }) : target,\n  mod\n)), __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: !0 }), mod);\nvar index_exports = {};\n__export(index_exports, {\n  Cookie: () => import_cookies.Cookie,\n  ELYSIA_FORM_DATA: () => import_utils4.ELYSIA_FORM_DATA,\n  ELYSIA_REQUEST_ID: () => import_utils4.ELYSIA_REQUEST_ID,\n  ELYSIA_TRACE: () => import_trace2.ELYSIA_TRACE,\n  ERROR_CODE: () => import_error2.ERROR_CODE,\n  Elysia: () => Elysia,\n  ElysiaCustomStatusResponse: () => import_error2.ElysiaCustomStatusResponse,\n  ElysiaFile: () => import_file.ElysiaFile,\n  ElysiaStatus: () => import_error2.ElysiaStatus,\n  InternalServerError: () => import_error2.InternalServerError,\n  InvalidCookieSignature: () => import_error2.InvalidCookieSignature,\n  InvalidFileType: () => import_error2.InvalidFileType,\n  InvertedStatusMap: () => import_utils4.InvertedStatusMap,\n  NotFoundError: () => import_error2.NotFoundError,\n  ParseError: () => import_error2.ParseError,\n  StatusMap: () => import_utils4.StatusMap,\n  TypeSystemPolicy: () => import_system.TypeSystemPolicy,\n  ValidationError: () => import_error2.ValidationError,\n  checksum: () => import_utils4.checksum,\n  cloneInference: () => import_utils4.cloneInference,\n  deduplicateChecksum: () => import_utils4.deduplicateChecksum,\n  default: () => Elysia,\n  env: () => import_env2.env,\n  file: () => import_file.file,\n  fileType: () => import_utils3.fileType,\n  form: () => import_utils4.form,\n  getResponseSchemaValidator: () => import_schema2.getResponseSchemaValidator,\n  getSchemaValidator: () => import_schema2.getSchemaValidator,\n  mapValueError: () => import_error2.mapValueError,\n  mergeHook: () => import_utils4.mergeHook,\n  mergeObjectArray: () => import_utils4.mergeObjectArray,\n  redirect: () => import_utils4.redirect,\n  replaceSchemaType: () => import_replace_schema2.replaceSchemaTypeFromManyOptions,\n  replaceUrlPath: () => import_utils4.replaceUrlPath,\n  serializeCookie: () => import_cookies.serializeCookie,\n  sse: () => import_utils4.sse,\n  status: () => import_error2.status,\n  t: () => import_type_system2.t,\n  validationDetail: () => import_utils3.validationDetail\n});\nmodule.exports = __toCommonJS(index_exports);\nvar import_memoirist = require(\"memoirist\"), import_typebox = require(\"@sinclair/typebox\"), import_fast_decode_uri_component = __toESM(require(\"fast-decode-uri-component\")), import_type_system = require('./type-system/index.js'), import_sucrose = require('./sucrose.js'), import_bun = require('./adapter/bun/index.js'), import_web_standard = require('./adapter/web-standard/index.js'), import_env = require('./universal/env.js'), import_utils = require('./utils.js'), import_schema = require('./schema.js'), import_compose = require('./compose.js'), import_trace = require('./trace.js'), import_utils2 = require('./utils.js'), import_dynamic_handle = require('./dynamic-handle.js'), import_error = require('./error.js'), import_replace_schema = require('./replace-schema.js'), import_type_system2 = require('./type-system/index.js'), import_utils3 = require('./type-system/utils.js'), import_cookies = require('./cookies.js'), import_trace2 = require('./trace.js'), import_schema2 = require('./schema.js'), import_replace_schema2 = require('./replace-schema.js'), import_utils4 = require('./utils.js'), import_error2 = require('./error.js'), import_env2 = require('./universal/env.js'), import_file = require('./universal/file.js'), import_system = require(\"@sinclair/typebox/system\"), _a;\n_a = Symbol.dispose;\nconst _Elysia = class _Elysia {\n  constructor(config = {}) {\n    this.server = null;\n    this.dependencies = {};\n    this[\"~Prefix\"] = \"\";\n    this[\"~Singleton\"] = null;\n    this[\"~Definitions\"] = null;\n    this[\"~Metadata\"] = null;\n    this[\"~Ephemeral\"] = null;\n    this[\"~Volatile\"] = null;\n    this[\"~Routes\"] = null;\n    this.singleton = {\n      decorator: {},\n      store: {},\n      derive: {},\n      resolve: {}\n    };\n    this.definitions = {\n      typebox: import_type_system.t.Module({}),\n      type: {},\n      error: {}\n    };\n    this.extender = {\n      macro: {},\n      higherOrderFunctions: []\n    };\n    this.validator = {\n      global: null,\n      scoped: null,\n      local: null,\n      getCandidate() {\n        return !this.global && !this.scoped && !this.local ? {\n          body: void 0,\n          headers: void 0,\n          params: void 0,\n          query: void 0,\n          cookie: void 0,\n          response: void 0\n        } : (0, import_utils.mergeSchemaValidator)(\n          (0, import_utils.mergeSchemaValidator)(this.global, this.scoped),\n          this.local\n        );\n      }\n    };\n    this.standaloneValidator = {\n      global: null,\n      scoped: null,\n      local: null\n    };\n    this.event = {};\n    this.router = {\n      \"~http\": void 0,\n      get http() {\n        return this[\"~http\"] || (this[\"~http\"] = new import_memoirist.Memoirist({\n          lazy: !0,\n          onParam: import_fast_decode_uri_component.default\n        })), this[\"~http\"];\n      },\n      \"~dynamic\": void 0,\n      // Use in non-AOT mode\n      get dynamic() {\n        return this[\"~dynamic\"] || (this[\"~dynamic\"] = new import_memoirist.Memoirist({\n          onParam: import_fast_decode_uri_component.default\n        })), this[\"~dynamic\"];\n      },\n      // Static Router\n      static: {},\n      // Native Static Response\n      response: {},\n      history: []\n    };\n    this.routeTree = {};\n    this.inference = {\n      body: !1,\n      cookie: !1,\n      headers: !1,\n      query: !1,\n      set: !1,\n      server: !1,\n      path: !1,\n      route: !1,\n      url: !1\n    };\n    this[\"~parser\"] = {};\n    this.handle = async (request) => this.fetch(request);\n    this.handleError = async (context, error) => (this.handleError = this.config.aot ? (0, import_compose.composeErrorHandler)(this) : (0, import_dynamic_handle.createDynamicErrorHandler)(this))(context, error);\n    /**\n     * ### listen\n     * Assign current instance to port and start serving\n     *\n     * ---\n     * @example\n     * ```typescript\n     * new Elysia()\n     *     .get(\"/\", () => 'hi')\n     *     .listen(3000)\n     * ```\n     */\n    this.listen = (options, callback) => (this[\"~adapter\"].listen(this)(options, callback), this);\n    /**\n     * ### stop\n     * Stop server from serving\n     *\n     * ---\n     * @example\n     * ```typescript\n     * const app = new Elysia()\n     *     .get(\"/\", () => 'hi')\n     *     .listen(3000)\n     *\n     * // Sometime later\n     * app.stop()\n     * ```\n     *\n     * @example\n     * ```typescript\n     * const app = new Elysia()\n     *     .get(\"/\", () => 'hi')\n     *     .listen(3000)\n     *\n     * app.stop(true) // Abruptly any requests inflight\n     * ```\n     */\n    this.stop = async (closeActiveConnections) => (await this[\"~adapter\"].stop?.(this, closeActiveConnections), this);\n    this[_a] = () => {\n      this.server && this.stop();\n    };\n    config.tags && (config.detail ? config.detail.tags = config.tags : config.detail = {\n      tags: config.tags\n    }), this.config = {\n      aot: import_env.env.ELYSIA_AOT !== \"false\",\n      nativeStaticResponse: !0,\n      encodeSchema: !0,\n      normalize: !0,\n      ...config,\n      prefix: config.prefix ? config.prefix.charCodeAt(0) === 47 ? config.prefix : `/${config.prefix}` : void 0,\n      cookie: {\n        path: \"/\",\n        ...config?.cookie\n      },\n      experimental: config?.experimental ?? {},\n      seed: config?.seed === void 0 ? \"\" : config?.seed\n    }, this[\"~adapter\"] = config.adapter ?? (typeof Bun < \"u\" ? import_bun.BunAdapter : import_web_standard.WebStandardAdapter), config?.analytic && (config?.name || config?.seed !== void 0) && (this.telemetry = {\n      stack: new Error().stack\n    });\n  }\n  get store() {\n    return this.singleton.store;\n  }\n  get decorator() {\n    return this.singleton.decorator;\n  }\n  get routes() {\n    return this.router.history;\n  }\n  getGlobalRoutes() {\n    return this.router.history;\n  }\n  getGlobalDefinitions() {\n    return this.definitions;\n  }\n  getServer() {\n    return this.server;\n  }\n  getParent() {\n    return null;\n  }\n  get promisedModules() {\n    return this._promisedModules || (this._promisedModules = new import_utils.PromiseGroup(console.error, () => {\n    })), this._promisedModules;\n  }\n  env(model, _env = import_env.env) {\n    if ((0, import_schema.getSchemaValidator)(model, {\n      modules: this.definitions.typebox,\n      dynamic: !0,\n      additionalProperties: !0,\n      coerce: !0,\n      sanitize: () => this.config.sanitize\n    }).Check(_env) === !1) {\n      const error = new import_error.ValidationError(\"env\", model, _env);\n      throw new Error(error.all.map((x) => x.summary).join(`\n`));\n    }\n    return this;\n  }\n  /**\n   * @private DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n   * @version 1.1.0\n   *\n   * ! Do not use unless you know exactly what you are doing\n   * ? Add Higher order function to Elysia.fetch\n   */\n  wrap(fn) {\n    return this.extender.higherOrderFunctions.push({\n      checksum: (0, import_utils2.checksum)(\n        JSON.stringify({\n          name: this.config.name,\n          seed: this.config.seed,\n          content: fn.toString()\n        })\n      ),\n      fn\n    }), this;\n  }\n  get models() {\n    const models = {};\n    for (const name of Object.keys(this.definitions.type))\n      models[name] = (0, import_schema.getSchemaValidator)(\n        this.definitions.typebox.Import(name),\n        {\n          models: this.definitions.type\n        }\n      );\n    return models.modules = this.definitions.typebox, models;\n  }\n  add(method, path, handle, localHook, options) {\n    const skipPrefix = options?.skipPrefix ?? !1, allowMeta = options?.allowMeta ?? !1;\n    localHook ??= {}, this.applyMacro(localHook);\n    let standaloneValidators = [];\n    if (localHook.standaloneValidator && (standaloneValidators = standaloneValidators.concat(\n      localHook.standaloneValidator\n    )), this.standaloneValidator.local && (standaloneValidators = standaloneValidators.concat(\n      this.standaloneValidator.local\n    )), this.standaloneValidator.scoped && (standaloneValidators = standaloneValidators.concat(\n      this.standaloneValidator.scoped\n    )), this.standaloneValidator.global && (standaloneValidators = standaloneValidators.concat(\n      this.standaloneValidator.global\n    )), path !== \"\" && path.charCodeAt(0) !== 47 && (path = \"/\" + path), this.config.prefix && !skipPrefix && (path = this.config.prefix + path), localHook?.type)\n      switch (localHook.type) {\n        case \"text\":\n          localHook.type = \"text/plain\";\n          break;\n        case \"json\":\n          localHook.type = \"application/json\";\n          break;\n        case \"formdata\":\n          localHook.type = \"multipart/form-data\";\n          break;\n        case \"urlencoded\":\n          localHook.type = \"application/x-www-form-urlencoded\";\n          break;\n        case \"arrayBuffer\":\n          localHook.type = \"application/octet-stream\";\n          break;\n        default:\n          break;\n      }\n    const instanceValidator = this.validator.getCandidate(), cloned = {\n      body: localHook?.body ?? instanceValidator?.body,\n      headers: localHook?.headers ?? instanceValidator?.headers,\n      params: localHook?.params ?? instanceValidator?.params,\n      query: localHook?.query ?? instanceValidator?.query,\n      cookie: localHook?.cookie ?? instanceValidator?.cookie,\n      response: localHook?.response ?? instanceValidator?.response\n    }, shouldPrecompile = this.config.precompile === !0 || typeof this.config.precompile == \"object\" && this.config.precompile.compose === !0, createValidator = () => {\n      const models = this.definitions.type, dynamic = !this.config.aot, normalize = this.config.normalize, modules = this.definitions.typebox, sanitize = () => this.config.sanitize, cookieValidator = () => {\n        if (cloned.cookie || standaloneValidators.find((x) => x.cookie))\n          return (0, import_schema.getCookieValidator)({\n            modules,\n            validator: cloned.cookie,\n            defaultConfig: this.config.cookie,\n            normalize,\n            config: cloned.cookie?.config ?? {},\n            dynamic,\n            models,\n            validators: standaloneValidators.map((x) => x.cookie),\n            sanitize\n          });\n      };\n      return shouldPrecompile ? {\n        body: (0, import_schema.getSchemaValidator)(cloned.body, {\n          modules,\n          dynamic,\n          models,\n          normalize,\n          additionalCoerce: (() => {\n            const resolved = (0, import_schema.resolveSchema)(\n              cloned.body,\n              models,\n              modules\n            );\n            return resolved && import_typebox.Kind in resolved && ((0, import_schema.hasType)(\"File\", resolved) || (0, import_schema.hasType)(\"Files\", resolved)) ? (0, import_replace_schema.coerceFormData)() : (0, import_replace_schema.coercePrimitiveRoot)();\n          })(),\n          validators: standaloneValidators.map((x) => x.body),\n          sanitize\n        }),\n        headers: (0, import_schema.getSchemaValidator)(cloned.headers, {\n          modules,\n          dynamic,\n          models,\n          additionalProperties: !0,\n          coerce: !0,\n          additionalCoerce: (0, import_replace_schema.stringToStructureCoercions)(),\n          validators: standaloneValidators.map(\n            (x) => x.headers\n          ),\n          sanitize\n        }),\n        params: (0, import_schema.getSchemaValidator)(cloned.params, {\n          modules,\n          dynamic,\n          models,\n          coerce: !0,\n          additionalCoerce: (0, import_replace_schema.stringToStructureCoercions)(),\n          validators: standaloneValidators.map(\n            (x) => x.params\n          ),\n          sanitize\n        }),\n        query: (0, import_schema.getSchemaValidator)(cloned.query, {\n          modules,\n          dynamic,\n          models,\n          normalize,\n          coerce: !0,\n          additionalCoerce: (0, import_replace_schema.queryCoercions)(),\n          validators: standaloneValidators.map(\n            (x) => x.query\n          ),\n          sanitize\n        }),\n        cookie: cookieValidator(),\n        response: (0, import_schema.getResponseSchemaValidator)(cloned.response, {\n          modules,\n          dynamic,\n          models,\n          normalize,\n          validators: standaloneValidators.map(\n            (x) => x.response\n          ),\n          sanitize\n        })\n      } : {\n        createBody() {\n          return this.body ? this.body : this.body = (0, import_schema.getSchemaValidator)(\n            cloned.body,\n            {\n              modules,\n              dynamic,\n              models,\n              normalize,\n              additionalCoerce: (() => {\n                const resolved = (0, import_schema.resolveSchema)(\n                  cloned.body,\n                  models,\n                  modules\n                );\n                return resolved && import_typebox.Kind in resolved && ((0, import_schema.hasType)(\"File\", resolved) || (0, import_schema.hasType)(\"Files\", resolved)) ? (0, import_replace_schema.coerceFormData)() : (0, import_replace_schema.coercePrimitiveRoot)();\n              })(),\n              validators: standaloneValidators.map(\n                (x) => x.body\n              ),\n              sanitize\n            }\n          );\n        },\n        createHeaders() {\n          return this.headers ? this.headers : this.headers = (0, import_schema.getSchemaValidator)(\n            cloned.headers,\n            {\n              modules,\n              dynamic,\n              models,\n              normalize,\n              additionalProperties: !normalize,\n              coerce: !0,\n              additionalCoerce: (0, import_replace_schema.stringToStructureCoercions)(),\n              validators: standaloneValidators.map(\n                (x) => x.headers\n              ),\n              sanitize\n            }\n          );\n        },\n        createParams() {\n          return this.params ? this.params : this.params = (0, import_schema.getSchemaValidator)(\n            cloned.params,\n            {\n              modules,\n              dynamic,\n              models,\n              normalize,\n              coerce: !0,\n              additionalCoerce: (0, import_replace_schema.stringToStructureCoercions)(),\n              validators: standaloneValidators.map(\n                (x) => x.params\n              ),\n              sanitize\n            }\n          );\n        },\n        createQuery() {\n          return this.query ? this.query : this.query = (0, import_schema.getSchemaValidator)(\n            cloned.query,\n            {\n              modules,\n              dynamic,\n              models,\n              normalize,\n              coerce: !0,\n              additionalCoerce: (0, import_replace_schema.queryCoercions)(),\n              validators: standaloneValidators.map(\n                (x) => x.query\n              ),\n              sanitize\n            }\n          );\n        },\n        createCookie() {\n          return this.cookie ? this.cookie : this.cookie = cookieValidator();\n        },\n        createResponse() {\n          return this.response ? this.response : this.response = (0, import_schema.getResponseSchemaValidator)(\n            cloned.response,\n            {\n              modules,\n              dynamic,\n              models,\n              normalize,\n              validators: standaloneValidators.map(\n                (x) => x.response\n              ),\n              sanitize\n            }\n          );\n        }\n      };\n    };\n    (instanceValidator.body || instanceValidator.cookie || instanceValidator.headers || instanceValidator.params || instanceValidator.query || instanceValidator.response) && (localHook = (0, import_utils2.mergeHook)(localHook, instanceValidator)), localHook.tags && (localHook.detail ? localHook.detail.tags = localHook.tags : localHook.detail = {\n      tags: localHook.tags\n    }), (0, import_utils.isNotEmpty)(this.config.detail) && (localHook.detail = (0, import_utils.mergeDeep)(\n      Object.assign({}, this.config.detail),\n      localHook.detail\n    ));\n    const hooks = (0, import_utils.isNotEmpty)(this.event) ? (0, import_utils2.mergeHook)(this.event, (0, import_utils.localHookToLifeCycleStore)(localHook)) : { ...(0, import_utils.lifeCycleToArray)((0, import_utils.localHookToLifeCycleStore)(localHook)) };\n    if (standaloneValidators.length && Object.assign(hooks, {\n      standaloneValidator: standaloneValidators\n    }), this.config.aot === !1) {\n      const validator = createValidator();\n      this.router.dynamic.add(method, path, {\n        validator,\n        hooks,\n        content: localHook?.type,\n        handle,\n        route: path\n      });\n      const encoded = (0, import_utils.encodePath)(path, { dynamic: !0 });\n      if (path !== encoded && this.router.dynamic.add(method, encoded, {\n        validator,\n        hooks,\n        content: localHook?.type,\n        handle,\n        route: path\n      }), !this.config.strictPath) {\n        const loosePath = (0, import_utils.getLoosePath)(path);\n        this.router.dynamic.add(method, loosePath, {\n          validator,\n          hooks,\n          content: localHook?.type,\n          handle,\n          route: path\n        });\n        const encoded2 = (0, import_utils.encodePath)(loosePath);\n        loosePath !== encoded2 && this.router.dynamic.add(method, loosePath, {\n          validator,\n          hooks,\n          content: localHook?.type,\n          handle,\n          route: path\n        });\n      }\n      this.router.history.push({\n        method,\n        path,\n        composed: null,\n        handler: handle,\n        compile: void 0,\n        hooks\n      });\n      return;\n    }\n    const adapter = this[\"~adapter\"].handler, nativeStaticHandler = typeof handle != \"function\" ? () => {\n      const context = {\n        redirect: import_utils.redirect,\n        request: this[\"~adapter\"].isWebStandard ? new Request(`http://ely.sia${path}`, {\n          method\n        }) : void 0,\n        server: null,\n        set: {\n          headers: Object.assign({}, this.setHeaders)\n        },\n        status: import_error.status,\n        store: this.store\n      };\n      try {\n        this.event.request?.map((x) => {\n          if (typeof x.fn == \"function\")\n            return x.fn(context);\n          if (typeof x == \"function\") return x(context);\n        });\n      } catch (error) {\n        let res;\n        context.error = error, this.event.error?.some((x) => {\n          if (typeof x.fn == \"function\")\n            return res = x.fn(context);\n          if (typeof x == \"function\")\n            return res = x(context);\n        }), res !== void 0 && (handle = res);\n      }\n      const fn = adapter.createNativeStaticHandler?.(\n        handle,\n        hooks,\n        context.set\n      );\n      return fn instanceof Promise ? fn.then((fn2) => {\n        if (fn2) return fn2;\n      }) : fn?.();\n    } : void 0, useNativeStaticResponse = this.config.nativeStaticResponse === !0, addResponsePath = (path2) => {\n      !useNativeStaticResponse || !nativeStaticHandler || (import_utils.supportPerMethodInlineHandler ? this.router.response[path2] ? this.router.response[path2][method] = nativeStaticHandler() : this.router.response[path2] = {\n        [method]: nativeStaticHandler()\n      } : this.router.response[path2] = nativeStaticHandler());\n    };\n    addResponsePath(path);\n    let _compiled;\n    const compile = () => {\n      if (_compiled) return _compiled;\n      const compiled = (0, import_compose.composeHandler)({\n        app: this,\n        path,\n        method,\n        hooks,\n        validator: createValidator(),\n        handler: typeof handle != \"function\" && typeof adapter.createStaticHandler != \"function\" ? () => handle : handle,\n        allowMeta,\n        inference: this.inference\n      });\n      return this.router.history[index] && (_compiled = this.router.history[index].composed = compiled), compiled;\n    };\n    let oldIndex;\n    if (`${method}_${path}` in this.routeTree)\n      for (let i = 0; i < this.router.history.length; i++) {\n        const route2 = this.router.history[i];\n        if (route2.path === path && route2.method === method) {\n          oldIndex = i;\n          break;\n        }\n      }\n    else this.routeTree[`${method}_${path}`] = this.router.history.length;\n    const index = oldIndex ?? this.router.history.length, route = this.router.history, mainHandler = shouldPrecompile ? compile() : (ctx) => _compiled ? _compiled(ctx) : (route[index].composed = compile())(ctx);\n    oldIndex !== void 0 ? this.router.history[oldIndex] = Object.assign(\n      {\n        method,\n        path,\n        composed: mainHandler,\n        compile,\n        handler: handle,\n        hooks\n      },\n      standaloneValidators.length ? {\n        standaloneValidators\n      } : void 0,\n      localHook.webSocket ? { websocket: localHook.websocket } : void 0\n    ) : this.router.history.push(\n      Object.assign(\n        {\n          method,\n          path,\n          composed: mainHandler,\n          compile,\n          handler: handle,\n          hooks\n        },\n        localHook.webSocket ? { websocket: localHook.websocket } : void 0\n      )\n    );\n    const handler = {\n      handler: shouldPrecompile ? route[index].composed : void 0,\n      compile() {\n        return this.handler = compile();\n      }\n    }, staticRouter = this.router.static, isStaticPath = path.indexOf(\":\") === -1 && path.indexOf(\"*\") === -1;\n    if (method === \"WS\") {\n      if (isStaticPath) {\n        path in staticRouter ? staticRouter[path][method] = index : staticRouter[path] = {\n          [method]: index\n        };\n        return;\n      }\n      this.router.http.add(\"WS\", path, handler), this.config.strictPath || this.router.http.add(\"WS\", (0, import_utils.getLoosePath)(path), handler);\n      const encoded = (0, import_utils.encodePath)(path, { dynamic: !0 });\n      path !== encoded && this.router.http.add(\"WS\", encoded, handler);\n      return;\n    }\n    if (isStaticPath)\n      path in staticRouter ? staticRouter[path][method] = index : staticRouter[path] = {\n        [method]: index\n      }, this.config.strictPath || addResponsePath((0, import_utils.getLoosePath)(path));\n    else {\n      if (this.router.http.add(method, path, handler), !this.config.strictPath) {\n        const loosePath = (0, import_utils.getLoosePath)(path);\n        addResponsePath(loosePath), this.router.http.add(method, loosePath, handler);\n      }\n      const encoded = (0, import_utils.encodePath)(path, { dynamic: !0 });\n      path !== encoded && (this.router.http.add(method, encoded, handler), addResponsePath(encoded));\n    }\n  }\n  headers(header) {\n    return header ? (this.setHeaders || (this.setHeaders = {}), this.setHeaders = (0, import_utils.mergeDeep)(this.setHeaders, header), this) : this;\n  }\n  /**\n   * ### start | Life cycle event\n   * Called after server is ready for serving\n   *\n   * ---\n   * @example\n   * ```typescript\n   * new Elysia()\n   *     .onStart(({ server }) => {\n   *         console.log(\"Running at ${server?.url}:${server?.port}\")\n   *     })\n   *     .listen(3000)\n   * ```\n   */\n  onStart(handler) {\n    return this.on(\"start\", handler), this;\n  }\n  onRequest(handler) {\n    return this.on(\"request\", handler), this;\n  }\n  onParse(options, handler) {\n    return handler ? this.on(\n      options,\n      \"parse\",\n      handler\n    ) : typeof options == \"string\" ? this.on(\"parse\", this[\"~parser\"][options]) : this.on(\"parse\", options);\n  }\n  /**\n   * ### parse | Life cycle event\n   * Callback function to handle body parsing\n   *\n   * If truthy value is returned, will be assigned to `context.body`\n   * Otherwise will skip the callback and look for the next one.\n   *\n   * Equivalent to Express's body parser\n   *\n   * ---\n   * @example\n   * ```typescript\n   * new Elysia()\n   *     .onParse((request, contentType) => {\n   *         if(contentType === \"application/json\")\n   *             return request.json()\n   *     })\n   * ```\n   */\n  parser(name, parser) {\n    return this[\"~parser\"][name] = parser, this;\n  }\n  onTransform(options, handler) {\n    return handler ? this.on(\n      options,\n      \"transform\",\n      handler\n    ) : this.on(\"transform\", options);\n  }\n  resolve(optionsOrResolve, resolve) {\n    resolve || (resolve = optionsOrResolve, optionsOrResolve = { as: \"local\" });\n    const hook = {\n      subType: \"resolve\",\n      fn: resolve\n    };\n    return this.onBeforeHandle(optionsOrResolve, hook);\n  }\n  mapResolve(optionsOrResolve, mapper) {\n    mapper || (mapper = optionsOrResolve, optionsOrResolve = { as: \"local\" });\n    const hook = {\n      subType: \"mapResolve\",\n      fn: mapper\n    };\n    return this.onBeforeHandle(optionsOrResolve, hook);\n  }\n  onBeforeHandle(options, handler) {\n    return handler ? this.on(\n      options,\n      \"beforeHandle\",\n      handler\n    ) : this.on(\"beforeHandle\", options);\n  }\n  onAfterHandle(options, handler) {\n    return handler ? this.on(\n      options,\n      \"afterHandle\",\n      handler\n    ) : this.on(\"afterHandle\", options);\n  }\n  mapResponse(options, handler) {\n    return handler ? this.on(\n      options,\n      \"mapResponse\",\n      handler\n    ) : this.on(\"mapResponse\", options);\n  }\n  onAfterResponse(options, handler) {\n    return handler ? this.on(\n      options,\n      \"afterResponse\",\n      handler\n    ) : this.on(\"afterResponse\", options);\n  }\n  /**\n   * ### After Handle | Life cycle event\n   * Intercept request **after** main handler is called.\n   *\n   * If truthy value is returned, will be assigned as `Response`\n   *\n   * ---\n   * @example\n   * ```typescript\n   * new Elysia()\n   *     .onAfterHandle((context, response) => {\n   *         if(typeof response === \"object\")\n   *             return JSON.stringify(response)\n   *     })\n   * ```\n   */\n  trace(options, handler) {\n    handler || (handler = options, options = { as: \"local\" }), Array.isArray(handler) || (handler = [handler]);\n    for (const fn of handler)\n      this.on(\n        options,\n        \"trace\",\n        (0, import_trace.createTracer)(fn)\n      );\n    return this;\n  }\n  error(name, error) {\n    switch (typeof name) {\n      case \"string\":\n        return error.prototype[import_error.ERROR_CODE] = name, this.definitions.error[name] = error, this;\n      case \"function\":\n        return this.definitions.error = name(this.definitions.error), this;\n    }\n    for (const [code, error2] of Object.entries(name))\n      error2.prototype[import_error.ERROR_CODE] = code, this.definitions.error[code] = error2;\n    return this;\n  }\n  /**\n   * ### Error | Life cycle event\n   * Called when error is thrown during processing request\n   *\n   * ---\n   * @example\n   * ```typescript\n   * new Elysia()\n   *     .onError(({ code }) => {\n   *         if(code === \"NOT_FOUND\")\n   *             return \"Path not found :(\"\n   *     })\n   * ```\n   */\n  onError(options, handler) {\n    return handler ? this.on(\n      options,\n      \"error\",\n      handler\n    ) : this.on(\"error\", options);\n  }\n  /**\n   * ### stop | Life cycle event\n   * Called after server stop serving request\n   *\n   * ---\n   * @example\n   * ```typescript\n   * new Elysia()\n   *     .onStop((app) => {\n   *         cleanup()\n   *     })\n   * ```\n   */\n  onStop(handler) {\n    return this.on(\"stop\", handler), this;\n  }\n  on(optionsOrType, typeOrHandlers, handlers) {\n    let type;\n    switch (typeof optionsOrType) {\n      case \"string\":\n        type = optionsOrType, handlers = typeOrHandlers;\n        break;\n      case \"object\":\n        type = typeOrHandlers, !Array.isArray(typeOrHandlers) && typeof typeOrHandlers == \"object\" && (handlers = typeOrHandlers);\n        break;\n    }\n    Array.isArray(handlers) ? handlers = (0, import_utils.fnToContainer)(handlers) : typeof handlers == \"function\" ? handlers = [\n      {\n        fn: handlers\n      }\n    ] : handlers = [handlers];\n    const handles = handlers;\n    for (const handle of handles)\n      handle.scope = typeof optionsOrType == \"string\" ? \"local\" : optionsOrType?.as ?? \"local\", (type === \"resolve\" || type === \"derive\") && (handle.subType = type);\n    type !== \"trace\" && (this.inference = (0, import_sucrose.sucrose)(\n      {\n        [type]: handles.map((x) => x.fn)\n      },\n      this.inference,\n      this.config.sucrose\n    ));\n    for (const handle of handles) {\n      const fn = (0, import_utils2.asHookType)(handle, \"global\", { skipIfHasType: !0 });\n      switch ((this.config.name || this.config.seed) && (fn.checksum = (0, import_utils2.checksum)(\n        this.config.name + JSON.stringify(this.config.seed)\n      )), type) {\n        case \"start\":\n          this.event.start ??= [], this.event.start.push(fn);\n          break;\n        case \"request\":\n          this.event.request ??= [], this.event.request.push(fn);\n          break;\n        case \"parse\":\n          this.event.parse ??= [], this.event.parse.push(fn);\n          break;\n        case \"transform\":\n          this.event.transform ??= [], this.event.transform.push(fn);\n          break;\n        // @ts-expect-error\n        case \"derive\":\n          this.event.transform ??= [], this.event.transform.push(\n            (0, import_utils.fnToContainer)(fn, \"derive\")\n          );\n          break;\n        case \"beforeHandle\":\n          this.event.beforeHandle ??= [], this.event.beforeHandle.push(fn);\n          break;\n        // @ts-expect-error\n        // eslint-disable-next-line sonarjs/no-duplicated-branches\n        case \"resolve\":\n          this.event.beforeHandle ??= [], this.event.beforeHandle.push(\n            (0, import_utils.fnToContainer)(fn, \"resolve\")\n          );\n          break;\n        case \"afterHandle\":\n          this.event.afterHandle ??= [], this.event.afterHandle.push(fn);\n          break;\n        case \"mapResponse\":\n          this.event.mapResponse ??= [], this.event.mapResponse.push(fn);\n          break;\n        case \"afterResponse\":\n          this.event.afterResponse ??= [], this.event.afterResponse.push(fn);\n          break;\n        case \"trace\":\n          this.event.trace ??= [], this.event.trace.push(fn);\n          break;\n        case \"error\":\n          this.event.error ??= [], this.event.error.push(fn);\n          break;\n        case \"stop\":\n          this.event.stop ??= [], this.event.stop.push(fn);\n          break;\n      }\n    }\n    return this;\n  }\n  as(type) {\n    return (0, import_utils.promoteEvent)(this.event.parse, type), (0, import_utils.promoteEvent)(this.event.transform, type), (0, import_utils.promoteEvent)(this.event.beforeHandle, type), (0, import_utils.promoteEvent)(this.event.afterHandle, type), (0, import_utils.promoteEvent)(this.event.mapResponse, type), (0, import_utils.promoteEvent)(this.event.afterResponse, type), (0, import_utils.promoteEvent)(this.event.trace, type), (0, import_utils.promoteEvent)(this.event.error, type), type === \"scoped\" ? (this.validator.scoped = (0, import_utils.mergeSchemaValidator)(\n      this.validator.scoped,\n      this.validator.local\n    ), this.validator.local = null, this.standaloneValidator.local !== null && (this.standaloneValidator.scoped ||= [], this.standaloneValidator.scoped.push(\n      ...this.standaloneValidator.local\n    ), this.standaloneValidator.local = null)) : type === \"global\" && (this.validator.global = (0, import_utils.mergeSchemaValidator)(\n      this.validator.global,\n      (0, import_utils.mergeSchemaValidator)(\n        this.validator.scoped,\n        this.validator.local\n      )\n    ), this.validator.scoped = null, this.validator.local = null, this.standaloneValidator.local !== null && (this.standaloneValidator.scoped ||= [], this.standaloneValidator.scoped.push(\n      ...this.standaloneValidator.local\n    ), this.standaloneValidator.local = null), this.standaloneValidator.scoped !== null && (this.standaloneValidator.global ||= [], this.standaloneValidator.global.push(\n      ...this.standaloneValidator.scoped\n    ), this.standaloneValidator.scoped = null)), this;\n  }\n  /**\n   * ### group\n   * Encapsulate and group path with prefix\n   *\n   * ---\n   * @example\n   * ```typescript\n   * new Elysia()\n   *     .group('/v1', app => app\n   *         .get('/', () => 'Hi')\n   *         .get('/name', () => 'Elysia')\n   *     })\n   * ```\n   */\n  group(prefix, schemaOrRun, run) {\n    const instance = new _Elysia({\n      ...this.config,\n      prefix: \"\"\n    });\n    instance.singleton = { ...this.singleton }, instance.definitions = { ...this.definitions }, instance.getServer = () => this.getServer(), instance.inference = (0, import_utils.cloneInference)(this.inference), instance.extender = { ...this.extender }, instance[\"~parser\"] = this[\"~parser\"], instance.standaloneValidator = {\n      local: [...this.standaloneValidator.local ?? []],\n      scoped: [...this.standaloneValidator.scoped ?? []],\n      global: [...this.standaloneValidator.global ?? []]\n    };\n    const isSchema = typeof schemaOrRun == \"object\", sandbox = (isSchema ? run : schemaOrRun)(instance);\n    return this.singleton = (0, import_utils.mergeDeep)(this.singleton, instance.singleton), this.definitions = (0, import_utils.mergeDeep)(this.definitions, instance.definitions), sandbox.event.request?.length && (this.event.request = [\n      ...this.event.request || [],\n      ...sandbox.event.request || []\n    ]), sandbox.event.mapResponse?.length && (this.event.mapResponse = [\n      ...this.event.mapResponse || [],\n      ...sandbox.event.mapResponse || []\n    ]), this.model(sandbox.definitions.type), Object.values(instance.router.history).forEach(\n      ({ method, path, handler, hooks }) => {\n        if (path = (isSchema ? \"\" : this.config.prefix ?? \"\") + prefix + path, isSchema) {\n          const {\n            body,\n            headers,\n            query,\n            params,\n            cookie,\n            response,\n            ...hook\n          } = schemaOrRun, localHook = hooks;\n          this.applyMacro(hook);\n          const hasStandaloneSchema = body || headers || query || params || cookie || response;\n          this.add(\n            method,\n            path,\n            handler,\n            (0, import_utils2.mergeHook)(hook, {\n              ...localHook || {},\n              error: localHook.error ? Array.isArray(localHook.error) ? [\n                ...localHook.error ?? [],\n                ...sandbox.event.error ?? []\n              ] : [\n                localHook.error,\n                ...sandbox.event.error ?? []\n              ] : sandbox.event.error,\n              // Merge macro's standaloneValidator with local and group schema\n              standaloneValidator: hook.standaloneValidator || localHook.standaloneValidator || hasStandaloneSchema ? [\n                ...hook.standaloneValidator ?? [],\n                ...localHook.standaloneValidator ?? [],\n                ...hasStandaloneSchema ? [\n                  {\n                    body,\n                    headers,\n                    query,\n                    params,\n                    cookie,\n                    response\n                  }\n                ] : []\n              ] : void 0\n            }),\n            void 0\n          );\n        } else\n          this.add(\n            method,\n            path,\n            handler,\n            (0, import_utils2.mergeHook)(hooks, {\n              error: sandbox.event.error\n            }),\n            {\n              skipPrefix: !0\n            }\n          );\n      }\n    ), this;\n  }\n  /**\n   * ### guard\n   * Encapsulate and pass hook into all child handler\n   *\n   * ---\n   * @example\n   * ```typescript\n   * import { t } from 'elysia'\n   *\n   * new Elysia()\n   *     .guard({\n   *          body: t.Object({\n   *              username: t.String(),\n   *              password: t.String()\n   *          })\n   *     }, app => app\n   *         .get(\"/\", () => 'Hi')\n   *         .get(\"/name\", () => 'Elysia')\n   *     })\n   * ```\n   */\n  guard(hook, run) {\n    if (!run) {\n      if (typeof hook == \"object\") {\n        this.applyMacro(hook), hook.detail && (this.config.detail ? this.config.detail = (0, import_utils.mergeDeep)(\n          Object.assign({}, this.config.detail),\n          hook.detail\n        ) : this.config.detail = hook.detail), hook.tags && (this.config.detail ? this.config.detail.tags = hook.tags : this.config.detail = {\n          tags: hook.tags\n        });\n        const type = hook.as ?? \"local\";\n        if (hook.schema === \"standalone\") {\n          this.standaloneValidator[type] || (this.standaloneValidator[type] = []);\n          const response = hook?.response ? typeof hook.response == \"string\" || import_typebox.Kind in hook.response || \"~standard\" in hook.response ? {\n            200: hook.response\n          } : hook?.response : void 0;\n          this.standaloneValidator[type].push({\n            body: hook.body,\n            headers: hook.headers,\n            params: hook.params,\n            query: hook.query,\n            response,\n            cookie: hook.cookie\n          });\n        } else\n          this.validator[type] = {\n            body: hook.body ?? this.validator[type]?.body,\n            headers: hook.headers ?? this.validator[type]?.headers,\n            params: hook.params ?? this.validator[type]?.params,\n            query: hook.query ?? this.validator[type]?.query,\n            response: hook.response ?? this.validator[type]?.response,\n            cookie: hook.cookie ?? this.validator[type]?.cookie\n          };\n        return hook.parse && this.on({ as: type }, \"parse\", hook.parse), hook.transform && this.on({ as: type }, \"transform\", hook.transform), hook.derive && this.on({ as: type }, \"derive\", hook.derive), hook.beforeHandle && this.on({ as: type }, \"beforeHandle\", hook.beforeHandle), hook.resolve && this.on({ as: type }, \"resolve\", hook.resolve), hook.afterHandle && this.on({ as: type }, \"afterHandle\", hook.afterHandle), hook.mapResponse && this.on({ as: type }, \"mapResponse\", hook.mapResponse), hook.afterResponse && this.on({ as: type }, \"afterResponse\", hook.afterResponse), hook.error && this.on({ as: type }, \"error\", hook.error), this;\n      }\n      return this.guard({}, hook);\n    }\n    const instance = new _Elysia({\n      ...this.config,\n      prefix: \"\"\n    });\n    instance.singleton = { ...this.singleton }, instance.definitions = { ...this.definitions }, instance.inference = (0, import_utils.cloneInference)(this.inference), instance.extender = { ...this.extender }, instance.getServer = () => this.getServer();\n    const sandbox = run(instance);\n    return this.singleton = (0, import_utils.mergeDeep)(this.singleton, instance.singleton), this.definitions = (0, import_utils.mergeDeep)(this.definitions, instance.definitions), sandbox.getServer = () => this.server, sandbox.event.request?.length && (this.event.request = [\n      ...this.event.request || [],\n      ...sandbox.event.request || []\n    ]), sandbox.event.mapResponse?.length && (this.event.mapResponse = [\n      ...this.event.mapResponse || [],\n      ...sandbox.event.mapResponse || []\n    ]), this.model(sandbox.definitions.type), Object.values(instance.router.history).forEach(\n      ({ method, path, handler, hooks: localHook }) => {\n        const {\n          body,\n          headers,\n          query,\n          params,\n          cookie,\n          response,\n          ...guardHook\n        } = hook, hasStandaloneSchema = body || headers || query || params || cookie || response;\n        this.add(\n          method,\n          path,\n          handler,\n          (0, import_utils2.mergeHook)(guardHook, {\n            ...localHook || {},\n            error: localHook.error ? Array.isArray(localHook.error) ? [\n              ...localHook.error ?? [],\n              ...sandbox.event.error ?? []\n            ] : [\n              localHook.error,\n              ...sandbox.event.error ?? []\n            ] : sandbox.event.error,\n            standaloneValidator: hasStandaloneSchema ? [\n              ...localHook.standaloneValidator ?? [],\n              {\n                body,\n                headers,\n                query,\n                params,\n                cookie,\n                response\n              }\n            ] : localHook.standaloneValidator\n          })\n        );\n      }\n    ), this;\n  }\n  /**\n   * ### use\n   * Merge separate logic of Elysia with current\n   *\n   * ---\n   * @example\n   * ```typescript\n   * const plugin = (app: Elysia) => app\n   *     .get('/plugin', () => 'hi')\n   *\n   * new Elysia()\n   *     .use(plugin)\n   * ```\n   */\n  use(plugin) {\n    if (!plugin) return this;\n    if (Array.isArray(plugin)) {\n      let app = this;\n      for (const p of plugin) app = app.use(p);\n      return app;\n    }\n    return plugin instanceof Promise ? (this.promisedModules.add(\n      plugin.then((plugin2) => {\n        if (typeof plugin2 == \"function\") return plugin2(this);\n        if (plugin2 instanceof _Elysia)\n          return this._use(plugin2).compile();\n        if (plugin2.constructor?.name === \"Elysia\")\n          return this._use(\n            plugin2\n          ).compile();\n        if (typeof plugin2.default == \"function\")\n          return plugin2.default(this);\n        if (plugin2.default instanceof _Elysia)\n          return this._use(plugin2.default);\n        if (plugin2.constructor?.name === \"Elysia\")\n          return this._use(plugin2.default);\n        if (plugin2.constructor?.name === \"_Elysia\")\n          return this._use(plugin2.default);\n        try {\n          return this._use(plugin2.default);\n        } catch (error) {\n          throw console.error(\n            'Invalid plugin type. Expected Elysia instance, function, or module with \"default\" as Elysia instance or function that returns Elysia instance.'\n          ), error;\n        }\n      }).then((v) => (v && typeof v.compile == \"function\" && v.compile(), v))\n    ), this) : this._use(plugin);\n  }\n  propagatePromiseModules(plugin) {\n    if (plugin.promisedModules.size <= 0) return this;\n    for (const promise of plugin.promisedModules.promises)\n      this.promisedModules.add(\n        promise.then((v) => {\n          if (!v) return;\n          const t3 = this._use(v);\n          return t3 instanceof Promise ? t3.then((v2) => {\n            v2 ? v2.compile() : v.compile();\n          }) : v.compile();\n        })\n      );\n    return this;\n  }\n  _use(plugin) {\n    if (typeof plugin == \"function\") {\n      const instance = plugin(this);\n      return instance instanceof Promise ? (this.promisedModules.add(\n        instance.then((plugin2) => {\n          if (plugin2 instanceof _Elysia) {\n            plugin2.getServer = () => this.getServer(), plugin2.getGlobalRoutes = () => this.getGlobalRoutes(), plugin2.getGlobalDefinitions = () => this.getGlobalDefinitions(), plugin2.model(this.definitions.type), plugin2.error(this.definitions.error);\n            for (const {\n              method,\n              path,\n              handler,\n              hooks\n            } of Object.values(plugin2.router.history))\n              this.add(\n                method,\n                path,\n                handler,\n                hooks,\n                void 0\n              );\n            return plugin2 === this ? void 0 : (this.propagatePromiseModules(plugin2), plugin2);\n          }\n          return typeof plugin2 == \"function\" ? plugin2(\n            this\n          ) : typeof plugin2.default == \"function\" ? plugin2.default(\n            this\n          ) : this._use(plugin2);\n        }).then((v) => (v && typeof v.compile == \"function\" && v.compile(), v))\n      ), this) : instance;\n    }\n    this.propagatePromiseModules(plugin);\n    const name = plugin.config.name, seed = plugin.config.seed;\n    if (plugin.getParent = () => this, plugin.getServer = () => this.getServer(), plugin.getGlobalRoutes = () => this.getGlobalRoutes(), plugin.getGlobalDefinitions = () => this.getGlobalDefinitions(), plugin.standaloneValidator?.scoped && (this.standaloneValidator.local ? this.standaloneValidator.local = this.standaloneValidator.local.concat(\n      plugin.standaloneValidator.scoped\n    ) : this.standaloneValidator.local = plugin.standaloneValidator.scoped), plugin.standaloneValidator?.global && (this.standaloneValidator.global ? this.standaloneValidator.global = this.standaloneValidator.global.concat(\n      plugin.standaloneValidator.global\n    ) : this.standaloneValidator.global = plugin.standaloneValidator.global), (0, import_utils.isNotEmpty)(plugin[\"~parser\"]) && (this[\"~parser\"] = {\n      ...plugin[\"~parser\"],\n      ...this[\"~parser\"]\n    }), plugin.setHeaders && this.headers(plugin.setHeaders), name) {\n      name in this.dependencies || (this.dependencies[name] = []);\n      const current = seed !== void 0 ? (0, import_utils2.checksum)(name + JSON.stringify(seed)) : 0;\n      this.dependencies[name].some(\n        ({ checksum: checksum3 }) => current === checksum3\n      ) || (this.extender.macro = {\n        ...this.extender.macro,\n        ...plugin.extender.macro\n      }, this.extender.higherOrderFunctions = this.extender.higherOrderFunctions.concat(\n        plugin.extender.higherOrderFunctions\n      ));\n    } else\n      (0, import_utils.isNotEmpty)(plugin.extender.macro) && (this.extender.macro = {\n        ...this.extender.macro,\n        ...plugin.extender.macro\n      }), plugin.extender.higherOrderFunctions.length && (this.extender.higherOrderFunctions = this.extender.higherOrderFunctions.concat(\n        plugin.extender.higherOrderFunctions\n      ));\n    if (plugin.extender.higherOrderFunctions.length) {\n      (0, import_utils.deduplicateChecksum)(this.extender.higherOrderFunctions);\n      const hofHashes = [];\n      for (let i = 0; i < this.extender.higherOrderFunctions.length; i++) {\n        const hof = this.extender.higherOrderFunctions[i];\n        hof.checksum && (hofHashes.includes(hof.checksum) && (this.extender.higherOrderFunctions.splice(i, 1), i--), hofHashes.push(hof.checksum));\n      }\n      hofHashes.length = 0;\n    }\n    this.inference = (0, import_sucrose.mergeInference)(this.inference, plugin.inference), (0, import_utils.isNotEmpty)(plugin.singleton.decorator) && this.decorate(plugin.singleton.decorator), (0, import_utils.isNotEmpty)(plugin.singleton.store) && this.state(plugin.singleton.store), (0, import_utils.isNotEmpty)(plugin.definitions.type) && this.model(plugin.definitions.type), (0, import_utils.isNotEmpty)(plugin.definitions.error) && this.error(plugin.definitions.error), (0, import_utils.isNotEmpty)(plugin.extender.macro) && (this.extender.macro = {\n      ...this.extender.macro,\n      ...plugin.extender.macro\n    });\n    for (const { method, path, handler, hooks } of Object.values(\n      plugin.router.history\n    ))\n      this.add(method, path, handler, hooks);\n    if (name) {\n      name in this.dependencies || (this.dependencies[name] = []);\n      const current = seed !== void 0 ? (0, import_utils2.checksum)(name + JSON.stringify(seed)) : 0;\n      if (this.dependencies[name].some(\n        ({ checksum: checksum3 }) => current === checksum3\n      ))\n        return this;\n      this.dependencies[name].push(\n        this.config?.analytic ? {\n          name: plugin.config.name,\n          seed: plugin.config.seed,\n          checksum: current,\n          dependencies: plugin.dependencies,\n          stack: plugin.telemetry?.stack,\n          routes: plugin.router.history,\n          decorators: plugin.singleton,\n          store: plugin.singleton.store,\n          error: plugin.definitions.error,\n          derive: plugin.event.transform?.filter((x) => x?.subType === \"derive\").map((x) => ({\n            fn: x.toString(),\n            stack: new Error().stack ?? \"\"\n          })),\n          resolve: plugin.event.transform?.filter((x) => x?.subType === \"resolve\").map((x) => ({\n            fn: x.toString(),\n            stack: new Error().stack ?? \"\"\n          }))\n        } : {\n          name: plugin.config.name,\n          seed: plugin.config.seed,\n          checksum: current,\n          dependencies: plugin.dependencies\n        }\n      ), (0, import_utils.isNotEmpty)(plugin.event) && (this.event = (0, import_utils2.mergeLifeCycle)(\n        this.event,\n        (0, import_utils2.filterGlobalHook)(plugin.event),\n        current\n      ));\n    } else\n      (0, import_utils.isNotEmpty)(plugin.event) && (this.event = (0, import_utils2.mergeLifeCycle)(\n        this.event,\n        (0, import_utils2.filterGlobalHook)(plugin.event)\n      ));\n    return plugin.validator.global && (this.validator.global = (0, import_utils2.mergeHook)(this.validator.global, {\n      ...plugin.validator.global\n    })), plugin.validator.scoped && (this.validator.local = (0, import_utils2.mergeHook)(this.validator.local, {\n      ...plugin.validator.scoped\n    })), this;\n  }\n  macro(macroOrName, macro) {\n    if (typeof macroOrName == \"string\" && !macro)\n      throw new Error(\"Macro function is required\");\n    return typeof macroOrName == \"string\" ? this.extender.macro[macroOrName] = macro : this.extender.macro = {\n      ...this.extender.macro,\n      ...macroOrName\n    }, this;\n  }\n  applyMacro(localHook, appliable = localHook, {\n    iteration = 0,\n    applied = {}\n  } = {}) {\n    if (iteration >= 16) return;\n    const macro = this.extender.macro;\n    for (let [key, value] of Object.entries(appliable)) {\n      if (!(key in macro)) continue;\n      const macroHook = typeof macro[key] == \"function\" ? macro[key](value) : macro[key];\n      if (!macroHook || typeof macro[key] == \"object\" && value === !1)\n        return;\n      const seed = (0, import_utils2.checksum)(key + JSON.stringify(macroHook.seed ?? value));\n      if (!(seed in applied)) {\n        applied[seed] = !0;\n        for (let [k, value2] of Object.entries(macroHook))\n          if (k !== \"seed\") {\n            if (k in import_utils.emptySchema) {\n              (0, import_utils.insertStandaloneValidator)(\n                localHook,\n                k,\n                value2\n              ), delete localHook[key];\n              continue;\n            }\n            if (k === \"introspect\") {\n              value2?.(localHook), delete localHook[key];\n              continue;\n            }\n            if (k === \"detail\") {\n              localHook.detail || (localHook.detail = {}), localHook.detail = (0, import_utils.mergeDeep)(localHook.detail, value2, {\n                mergeArray: !0\n              }), delete localHook[key];\n              continue;\n            }\n            if (k in macro) {\n              this.applyMacro(\n                localHook,\n                { [k]: value2 },\n                { applied, iteration: iteration + 1 }\n              ), delete localHook[key];\n              continue;\n            }\n            switch ((k === \"derive\" || k === \"resolve\") && typeof value2 == \"function\" && (value2 = {\n              fn: value2,\n              subType: k\n            }), typeof localHook[k]) {\n              case \"function\":\n                localHook[k] = [localHook[k], value2];\n                break;\n              case \"object\":\n                Array.isArray(localHook[k]) ? localHook[k].push(value2) : localHook[k] = [localHook[k], value2];\n                break;\n              case \"undefined\":\n                localHook[k] = value2;\n                break;\n            }\n            delete localHook[key];\n          }\n      }\n    }\n  }\n  mount(path, handleOrConfig, config) {\n    if (path instanceof _Elysia || typeof path == \"function\" || path.length === 0 || path === \"/\") {\n      const run = typeof path == \"function\" ? path : path instanceof _Elysia ? path.compile().fetch : handleOrConfig instanceof _Elysia ? handleOrConfig.compile().fetch : typeof handleOrConfig == \"function\" ? handleOrConfig : (() => {\n        throw new Error(\"Invalid handler\");\n      })(), handler2 = ({ request, path: path2 }) => run(new Request((0, import_utils2.replaceUrlPath)(request.url, path2), request));\n      return this.route(\"ALL\", \"/*\", handler2, {\n        parse: \"none\",\n        ...config,\n        detail: {\n          ...config?.detail,\n          hide: !0\n        },\n        config: {\n          mount: run\n        }\n      }), this;\n    }\n    const handle = handleOrConfig instanceof _Elysia ? handleOrConfig.compile().fetch : typeof handleOrConfig == \"function\" ? handleOrConfig : (() => {\n      throw new Error(\"Invalid handler\");\n    })(), length = (typeof path == \"string\" && this.config.prefix ? this.config.prefix + path : path).length - (path.endsWith(\"*\") ? 1 : 0), handler = ({ request, path: path2 }) => handle(\n      new Request(\n        (0, import_utils2.replaceUrlPath)(request.url, path2.slice(length) || \"/\"),\n        request\n      )\n    );\n    return this.route(\"ALL\", path, handler, {\n      parse: \"none\",\n      ...config,\n      detail: {\n        ...config?.detail,\n        hide: !0\n      },\n      config: {\n        mount: handle\n      }\n    }), this.route(\n      \"ALL\",\n      path + (path.endsWith(\"/\") ? \"*\" : \"/*\"),\n      handler,\n      {\n        parse: \"none\",\n        ...config,\n        detail: {\n          ...config?.detail,\n          hide: !0\n        },\n        config: {\n          mount: handle\n        }\n      }\n    ), this;\n  }\n  /**\n   * ### get\n   * Register handler for path with method [GET]\n   *\n   * ---\n   * @example\n   * ```typescript\n   * import { Elysia, t } from 'elysia'\n   *\n   * new Elysia()\n   *     .get('/', () => 'hi')\n   *     .get('/with-hook', () => 'hi', {\n   *         response: t.String()\n   *     })\n   * ```\n   */\n  get(path, handler, hook) {\n    return this.add(\"GET\", path, handler, hook), this;\n  }\n  /**\n   * ### post\n   * Register handler for path with method [POST]\n   *\n   * ---\n   * @example\n   * ```typescript\n   * import { Elysia, t } from 'elysia'\n   *\n   * new Elysia()\n   *     .post('/', () => 'hi')\n   *     .post('/with-hook', () => 'hi', {\n   *         response: t.String()\n   *     })\n   * ```\n   */\n  post(path, handler, hook) {\n    return this.add(\"POST\", path, handler, hook), this;\n  }\n  /**\n   * ### put\n   * Register handler for path with method [PUT]\n   *\n   * ---\n   * @example\n   * ```typescript\n   * import { Elysia, t } from 'elysia'\n   *\n   * new Elysia()\n   *     .put('/', () => 'hi')\n   *     .put('/with-hook', () => 'hi', {\n   *         response: t.String()\n   *     })\n   * ```\n   */\n  put(path, handler, hook) {\n    return this.add(\"PUT\", path, handler, hook), this;\n  }\n  /**\n   * ### patch\n   * Register handler for path with method [PATCH]\n   *\n   * ---\n   * @example\n   * ```typescript\n   * import { Elysia, t } from 'elysia'\n   *\n   * new Elysia()\n   *     .patch('/', () => 'hi')\n   *     .patch('/with-hook', () => 'hi', {\n   *         response: t.String()\n   *     })\n   * ```\n   */\n  patch(path, handler, hook) {\n    return this.add(\"PATCH\", path, handler, hook), this;\n  }\n  /**\n   * ### delete\n   * Register handler for path with method [DELETE]\n   *\n   * ---\n   * @example\n   * ```typescript\n   * import { Elysia, t } from 'elysia'\n   *\n   * new Elysia()\n   *     .delete('/', () => 'hi')\n   *     .delete('/with-hook', () => 'hi', {\n   *         response: t.String()\n   *     })\n   * ```\n   */\n  delete(path, handler, hook) {\n    return this.add(\"DELETE\", path, handler, hook), this;\n  }\n  /**\n   * ### options\n   * Register handler for path with method [POST]\n   *\n   * ---\n   * @example\n   * ```typescript\n   * import { Elysia, t } from 'elysia'\n   *\n   * new Elysia()\n   *     .options('/', () => 'hi')\n   *     .options('/with-hook', () => 'hi', {\n   *         response: t.String()\n   *     })\n   * ```\n   */\n  options(path, handler, hook) {\n    return this.add(\"OPTIONS\", path, handler, hook), this;\n  }\n  /**\n   * ### all\n   * Register handler for path with method [ALL]\n   *\n   * ---\n   * @example\n   * ```typescript\n   * import { Elysia, t } from 'elysia'\n   *\n   * new Elysia()\n   *     .all('/', () => 'hi')\n   *     .all('/with-hook', () => 'hi', {\n   *         response: t.String()\n   *     })\n   * ```\n   */\n  all(path, handler, hook) {\n    return this.add(\"ALL\", path, handler, hook), this;\n  }\n  /**\n   * ### head\n   * Register handler for path with method [HEAD]\n   *\n   * ---\n   * @example\n   * ```typescript\n   * import { Elysia, t } from 'elysia'\n   *\n   * new Elysia()\n   *     .head('/', () => 'hi')\n   *     .head('/with-hook', () => 'hi', {\n   *         response: t.String()\n   *     })\n   * ```\n   */\n  head(path, handler, hook) {\n    return this.add(\"HEAD\", path, handler, hook), this;\n  }\n  /**\n   * ### connect\n   * Register handler for path with method [CONNECT]\n   *\n   * ---\n   * @example\n   * ```typescript\n   * import { Elysia, t } from 'elysia'\n   *\n   * new Elysia()\n   *     .connect('/', () => 'hi')\n   *     .connect('/with-hook', () => 'hi', {\n   *         response: t.String()\n   *     })\n   * ```\n   */\n  connect(path, handler, hook) {\n    return this.add(\"CONNECT\", path, handler, hook), this;\n  }\n  /**\n   * ### route\n   * Register handler for path with method [ROUTE]\n   *\n   * ---\n   * @example\n   * ```typescript\n   * import { Elysia, t } from 'elysia'\n   *\n   * new Elysia()\n   *     .route('/', () => 'hi')\n   *     .route('/with-hook', () => 'hi', {\n   *         response: t.String()\n   *     })\n   * ```\n   */\n  route(method, path, handler, hook) {\n    return this.add(method.toUpperCase(), path, handler, hook, hook?.config), this;\n  }\n  /**\n   * ### ws\n   * Register handler for path with method [ws]\n   *\n   * ---\n   * @example\n   * ```typescript\n   * import { Elysia, t } from 'elysia'\n   *\n   * new Elysia()\n   *     .ws('/', {\n   *         message(ws, message) {\n   *             ws.send(message)\n   *         }\n   *     })\n   * ```\n   */\n  ws(path, options) {\n    return this[\"~adapter\"].ws ? this[\"~adapter\"].ws(this, path, options) : console.warn(\"Current adapter doesn't support WebSocket\"), this;\n  }\n  /**\n   * ### state\n   * Assign global mutatable state accessible for all handler\n   *\n   * ---\n   * @example\n   * ```typescript\n   * new Elysia()\n   *     .state('counter', 0)\n   *     .get('/', (({ counter }) => ++counter)\n   * ```\n   */\n  state(options, name, value) {\n    name === void 0 ? (value = options, options = { as: \"append\" }, name = \"\") : value === void 0 && (typeof options == \"string\" ? (value = name, name = options, options = { as: \"append\" }) : typeof options == \"object\" && (value = name, name = \"\"));\n    const { as } = options;\n    if (typeof name != \"string\") return this;\n    switch (typeof value) {\n      case \"object\":\n        return !value || !(0, import_utils.isNotEmpty)(value) ? this : name ? (name in this.singleton.store ? this.singleton.store[name] = (0, import_utils.mergeDeep)(\n          this.singleton.store[name],\n          value,\n          {\n            override: as === \"override\"\n          }\n        ) : this.singleton.store[name] = value, this) : value === null ? this : (this.singleton.store = (0, import_utils.mergeDeep)(this.singleton.store, value, {\n          override: as === \"override\"\n        }), this);\n      case \"function\":\n        return name ? (as === \"override\" || !(name in this.singleton.store)) && (this.singleton.store[name] = value) : this.singleton.store = value(this.singleton.store), this;\n      default:\n        return (as === \"override\" || !(name in this.singleton.store)) && (this.singleton.store[name] = value), this;\n    }\n  }\n  /**\n   * ### decorate\n   * Define custom method to `Context` accessible for all handler\n   *\n   * ---\n   * @example\n   * ```typescript\n   * new Elysia()\n   *     .decorate('getDate', () => Date.now())\n   *     .get('/', (({ getDate }) => getDate())\n   * ```\n   */\n  decorate(options, name, value) {\n    name === void 0 ? (value = options, options = { as: \"append\" }, name = \"\") : value === void 0 && (typeof options == \"string\" ? (value = name, name = options, options = { as: \"append\" }) : typeof options == \"object\" && (value = name, name = \"\"));\n    const { as } = options;\n    if (typeof name != \"string\") return this;\n    switch (typeof value) {\n      case \"object\":\n        return name ? (name in this.singleton.decorator ? this.singleton.decorator[name] = (0, import_utils.mergeDeep)(\n          this.singleton.decorator[name],\n          value,\n          {\n            override: as === \"override\"\n          }\n        ) : this.singleton.decorator[name] = value, this) : value === null ? this : (this.singleton.decorator = (0, import_utils.mergeDeep)(\n          this.singleton.decorator,\n          value,\n          {\n            override: as === \"override\"\n          }\n        ), this);\n      case \"function\":\n        return name ? (as === \"override\" || !(name in this.singleton.decorator)) && (this.singleton.decorator[name] = value) : this.singleton.decorator = value(this.singleton.decorator), this;\n      default:\n        return (as === \"override\" || !(name in this.singleton.decorator)) && (this.singleton.decorator[name] = value), this;\n    }\n  }\n  derive(optionsOrTransform, transform) {\n    transform || (transform = optionsOrTransform, optionsOrTransform = { as: \"local\" });\n    const hook = {\n      subType: \"derive\",\n      fn: transform\n    };\n    return this.onTransform(optionsOrTransform, hook);\n  }\n  model(name, model) {\n    const onlyTypebox = (a) => {\n      const res = {};\n      for (const key in a) \"~standard\" in a[key] || (res[key] = a[key]);\n      return res;\n    };\n    switch (typeof name) {\n      case \"object\":\n        const parsedTypebox = {}, kvs = Object.entries(name);\n        if (!kvs.length) return this;\n        for (const [key, value] of kvs)\n          key in this.definitions.type || (\"~standard\" in value ? this.definitions.type[key] = value : (parsedTypebox[key] = this.definitions.type[key] = value, parsedTypebox[key].$id ??= `#/components/schemas/${key}`));\n        return this.definitions.typebox = import_type_system.t.Module({\n          ...this.definitions.typebox.$defs,\n          ...parsedTypebox\n        }), this;\n      case \"function\":\n        const result = name(this.definitions.type);\n        return this.definitions.type = result, this.definitions.typebox = import_type_system.t.Module(onlyTypebox(result)), this;\n      case \"string\":\n        if (!model) break;\n        if (this.definitions.type[name] = model, \"~standard\" in model) return this;\n        const newModel = {\n          ...model,\n          id: model.$id ?? `#/components/schemas/${name}`\n        };\n        return this.definitions.typebox = import_type_system.t.Module({\n          ...this.definitions.typebox.$defs,\n          ...newModel\n        }), this;\n    }\n    return model ? (this.definitions.type[name] = model, \"~standard\" in model ? this : (this.definitions.typebox = import_type_system.t.Module({\n      ...this.definitions.typebox.$defs,\n      [name]: model\n    }), this)) : this;\n  }\n  Ref(key) {\n    return import_type_system.t.Ref(key);\n  }\n  mapDerive(optionsOrDerive, mapper) {\n    mapper || (mapper = optionsOrDerive, optionsOrDerive = { as: \"local\" });\n    const hook = {\n      subType: \"mapDerive\",\n      fn: mapper\n    };\n    return this.onTransform(optionsOrDerive, hook);\n  }\n  affix(base, type, word) {\n    if (word === \"\") return this;\n    const delimieter = [\"_\", \"-\", \" \"], capitalize = (word2) => word2[0].toUpperCase() + word2.slice(1), joinKey = base === \"prefix\" ? (prefix, word2) => delimieter.includes(prefix.at(-1) ?? \"\") ? prefix + word2 : prefix + capitalize(word2) : delimieter.includes(word.at(-1) ?? \"\") ? (suffix, word2) => word2 + suffix : (suffix, word2) => word2 + capitalize(suffix), remap = (type2) => {\n      const store = {};\n      switch (type2) {\n        case \"decorator\":\n          for (const key in this.singleton.decorator)\n            store[joinKey(word, key)] = this.singleton.decorator[key];\n          this.singleton.decorator = store;\n          break;\n        case \"state\":\n          for (const key in this.singleton.store)\n            store[joinKey(word, key)] = this.singleton.store[key];\n          this.singleton.store = store;\n          break;\n        case \"model\":\n          for (const key in this.definitions.type)\n            store[joinKey(word, key)] = this.definitions.type[key];\n          this.definitions.type = store;\n          break;\n        case \"error\":\n          for (const key in this.definitions.error)\n            store[joinKey(word, key)] = this.definitions.error[key];\n          this.definitions.error = store;\n          break;\n      }\n    }, types = Array.isArray(type) ? type : [type];\n    for (const type2 of types.some((x) => x === \"all\") ? [\"decorator\", \"state\", \"model\", \"error\"] : types)\n      remap(type2);\n    return this;\n  }\n  prefix(type, word) {\n    return this.affix(\"prefix\", type, word);\n  }\n  suffix(type, word) {\n    return this.affix(\"suffix\", type, word);\n  }\n  compile() {\n    return this[\"~adapter\"].beforeCompile?.(this), this[\"~adapter\"].isWebStandard ? (this._handle = this.config.aot ? (0, import_compose.composeGeneralHandler)(this) : (0, import_dynamic_handle.createDynamicHandler)(this), Object.defineProperty(this, \"fetch\", {\n      value: this._handle,\n      configurable: !0,\n      writable: !0\n    }), typeof this.server?.reload == \"function\" && this.server.reload({\n      ...this.server || {},\n      fetch: this.fetch\n    }), this) : (typeof this.server?.reload == \"function\" && this.server.reload(this.server || {}), this._handle = (0, import_compose.composeGeneralHandler)(this), this);\n  }\n  /**\n   * Use handle can be either sync or async to save performance.\n   *\n   * Beside benchmark purpose, please use 'handle' instead.\n   */\n  get fetch() {\n    const fetch = this.config.aot ? (0, import_compose.composeGeneralHandler)(this) : (0, import_dynamic_handle.createDynamicHandler)(this);\n    return Object.defineProperty(this, \"fetch\", {\n      value: fetch,\n      configurable: !0,\n      writable: !0\n    }), fetch;\n  }\n  /**\n   * Wait until all lazy loaded modules all load is fully\n   */\n  get modules() {\n    return this.promisedModules;\n  }\n};\nlet Elysia = _Elysia;\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n  Cookie,\n  ELYSIA_FORM_DATA,\n  ELYSIA_REQUEST_ID,\n  ELYSIA_TRACE,\n  ERROR_CODE,\n  Elysia,\n  ElysiaCustomStatusResponse,\n  ElysiaFile,\n  ElysiaStatus,\n  InternalServerError,\n  InvalidCookieSignature,\n  InvalidFileType,\n  InvertedStatusMap,\n  NotFoundError,\n  ParseError,\n  StatusMap,\n  TypeSystemPolicy,\n  ValidationError,\n  checksum,\n  cloneInference,\n  deduplicateChecksum,\n  env,\n  file,\n  fileType,\n  form,\n  getResponseSchemaValidator,\n  getSchemaValidator,\n  mapValueError,\n  mergeHook,\n  mergeObjectArray,\n  redirect,\n  replaceSchemaType,\n  replaceUrlPath,\n  serializeCookie,\n  sse,\n  status,\n  t,\n  validationDetail\n});\n"]}