{"version":3,"sources":["jsdelivr-header.js","/npm/maestro-express-async-errors@1.3.0/dist/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aACA,IAAI,UAAY,OAAO,eACnB,iBAAmB,OAAO,yBAC1B,kBAAoB,OAAO,oBAC3B,aAAe,OAAO,UAAU,eAChC,SAAW,CAAC,EAAQ,KACtB,IAAK,IAAI,KAAQ,EACf,UAAU,EAAQ,EAAM,CAAE,IAAK,EAAK,GAAO,YAAY,GAAO,EAE9D,YAAc,CAAC,EAAI,EAAO,EAAQ,KACpC,GAAI,GAA0B,iBAAV,GAAuC,mBAAV,EAC/C,IAAK,IAAI,KAAO,kBAAkB,GAC3B,aAAa,KAAK,EAAI,IAAQ,IAAQ,GACzC,UAAU,EAAI,EAAK,CAAE,IAAK,IAAM,EAAM,GAAM,aAAc,EAAO,iBAAiB,EAAO,KAAS,EAAK,aAE7G,OAAO,CAAE,EAEP,aAAgB,GAAQ,YAAY,UAAU,CAAC,EAAG,aAAc,CAAE,OAAO,IAAS,GAGlF,qCAAuC,CAAC,EAC5C,SAAS,qCAAsC,CAC7C,QAAS,IAAM,UAEjB,OAAO,QAAU,aAAa,sCAC9B,IAAI,QAAU,SAAe,GAC3B,OAAO,kBAA4B,GACjC,MAAM,EAAW,KAAc,GACzB,EAAO,EAAK,EAAK,OAAS,GAChC,GAAoB,mBAAT,EACT,MAAM,IAAI,UAAU,0BAEtB,OAAO,QAAQ,QAAQ,GAAU,MAAM,EACzC,CACF,EACA,QAAQ,KAAO,SAAc,EAAa,GACxC,OAAO,SAAsB,EAAK,EAAK,EAAK,GACpC,aAAe,EAIrB,EAAW,EAAK,EAAK,EAAK,GAHxB,EAAK,EAIT,CACF,EACA,QAAQ,IAAM,SAAa,GACzB,OAAO,EAAU,IAAI,QACvB,EACA,OAAO,OAAO,SACd,OAAO,OAAO,QAAQ,MACtB,OAAO,OAAO,QAAQ","file":"/npm/maestro-express-async-errors@1.3.0/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/maestro-express-async-errors@1.3.0/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 __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all2) => {\n  for (var name in all2)\n    __defProp(target, name, { get: all2[name], enumerable: true });\n};\nvar __copyProps = (to, from2, except, desc) => {\n  if (from2 && typeof from2 === \"object\" || typeof from2 === \"function\") {\n    for (let key of __getOwnPropNames(from2))\n      if (!__hasOwnProp.call(to, key) && key !== except)\n        __defProp(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc(from2, key)) || desc.enumerable });\n  }\n  return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// index.ts\nvar maestro_express_async_errors_exports = {};\n__export(maestro_express_async_errors_exports, {\n  maestro: () => maestro\n});\nmodule.exports = __toCommonJS(maestro_express_async_errors_exports);\nvar maestro = function opera(middleware) {\n  return async function orchestra(...args) {\n    const fnReturn = middleware(...args);\n    const next = args[args.length - 1];\n    if (typeof next !== \"function\") {\n      throw new TypeError(\"Next is not a function\");\n    }\n    return Promise.resolve(fnReturn).catch(next);\n  };\n};\nmaestro.from = function from(constructor, middleware) {\n  return function errorHandler(err, req, res, next) {\n    if (!(err instanceof constructor)) {\n      next(err);\n      return;\n    }\n    middleware(err, req, res, next);\n  };\n};\nmaestro.all = function all(callbacks) {\n  return callbacks.map(maestro);\n};\nObject.freeze(maestro);\nObject.freeze(maestro.from);\nObject.freeze(maestro.all);\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n  maestro\n});\n"]}