{"version":3,"sources":["jsdelivr-header.js","/npm/@churchill/transport@1.0.0/transport.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACLA,MAAM,aAAe,QAAQ,WACvB,MAAE,OAAU,QAAQ,oBAEpB,kBAAoB,mEAM1B,MAAM,kBAAkB,aAOtB,WAAA,CAAY,EAAU,CAAC,GACrB,QACA,KAAK,QAAU,CACjB,CAKA,WAAA,GACE,OAAO,KAAK,QAAQ,QACtB,CAQA,MAAA,CAAO,EAAM,EAAQ,GACnB,MAAM,OAAE,GAAW,KAAK,QACxB,OAAO,MAAM,GAAU,EAAO,EAAM,EAAQ,GAAU,CACxD,CAQA,GAAA,CAAI,EAAM,EAAQ,GAChB,KAAK,KAAK,QAAS,IAAI,MAAM,mBAC/B,EAGF,OAAO,QAAU","file":"/npm/@churchill/transport@1.0.0/transport.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@churchill/transport@1.0.0/transport.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/* eslint-disable no-unused-vars */\nconst EventEmitter = require(\"events\");\nconst { isset } = require(\"@churchill/utils\");\n\nconst E_NOT_IMPLEMENTED = \"log(info, output, logger) must be implemented by the child class\";\n\n/**\n * @typedef {import('@churchill/core')} Logger\n */\n\nclass Transport extends EventEmitter {\n  /**\n   * Create a Transport\n   * @param {Object} [options] Options\n   * @param {Function} [options.format] Formatting function\n   * @param {String} [options.maxLevel] Max logging level\n   */\n  constructor(options = {}) {\n    super();\n    this.options = options;\n  }\n\n  /**\n   * Return the max log level\n   */\n  getMaxLevel() {\n    return this.options.maxLevel;\n  }\n\n  /**\n   * Format the log message\n   * @param {Object} info Info\n   * @param {*} [output] Formatted info by global formatter\n   * @param {Logger} logger Logger\n   */\n  format(info, output, logger) {\n    const { format } = this.options;\n    return isset(format) ? format(info, output, logger) : output;\n  }\n\n  /**\n   * Log a message\n   * @param {Object} info Info\n   * @param {*} [output] Formatted info by global formatter\n   * @param {Logger} logger Logger\n   */\n  log(info, output, logger) {\n    this.emit(\"error\", new Error(E_NOT_IMPLEMENTED));\n  }\n}\n\nmodule.exports = Transport;\n"]}