{"version":3,"sources":["jsdelivr-header.js","/npm/gulp-mejs@0.5.0/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aAMA,IAAI,MAAQ,QAAQ,aAChB,QAAU,QAAQ,YAClB,YAAc,QAAQ,QACtB,YAAc,QAAQ,kBAAkB,KA+B5C,SAAS,YAAa,EAAM,EAAU,GACpC,OAAI,EAAK,SAAiB,IACtB,EAAK,WAAmB,EAAK,IAAI,MAAM,YAAY,YAAa,6BAC/D,KAAK,cACL,KAAK,cAAc,KAAK,GADJ,KAAK,cAAgB,CAAC,QAE/C,IACF,CAnCA,OAAO,QAAU,SAAU,GACzB,OAAO,QAAQ,IAAI,aAAa,SAAU,GACxC,IAAK,KAAK,cAAe,OAAO,EAAS,IAAI,MAAM,YAAY,YAAa,kBAC5E,IAAI,EAAW,YAAY,WAAW,KAAK,cAAe,GAC1D,KAAK,KAAK,IAAI,MAAM,KAAK,IACzB,GACF,GACF,EAEA,OAAO,QAAQ,OAAS,SAAU,EAAU,EAAQ,GAClD,OAAO,QAAQ,IAAI,aAAa,SAAU,GACxC,IAAK,KAAK,cAAe,OAAO,EAAS,IAAI,MAAM,YAAY,YAAa,kBAC5E,IAAI,EAAS,KACT,EAAO,YAAY,SAAS,YAAY,WAAW,KAAK,cAAe,GAAU,GAErF,GADK,MAAM,QAAQ,KAAW,EAAW,CAAC,IACpB,mBAAX,EAAuB,CAChC,IAAI,EAAO,EACX,EAAS,WAAc,OAAO,CAAK,CACrC,CACA,EAAS,SAAQ,SAAU,GACzB,EAAO,KAAK,IAAI,MAAM,KAAK,CACzB,KAAM,EAAU,QAChB,SAAU,IAAI,OAAO,EAAK,SAAS,EAAS,EAAO,OAEvD,IACA,GACF,GACF","file":"/npm/gulp-mejs@0.5.0/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/gulp-mejs@0.5.0/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'\n/*\n * https://github.com/teambition/gulp-mejs\n *\n * Licensed under the MIT license.\n */\nvar gutil = require('gulp-util')\nvar through = require('through2')\nvar mejsCompile = require('mejs')\nvar packageName = require('./package.json').name\n\nmodule.exports = function (options) {\n  return through.obj(gatherFiles, function (callback) {\n    if (!this.gatheredFiles) return callback(new gutil.PluginError(packageName, 'no file exist'))\n    var mejsFile = mejsCompile.precompile(this.gatheredFiles, options)\n    this.push(new gutil.File(mejsFile))\n    callback()\n  })\n}\n\nmodule.exports.render = function (tplNames, dataFn, options) {\n  return through.obj(gatherFiles, function (callback) {\n    if (!this.gatheredFiles) return callback(new gutil.PluginError(packageName, 'no file exist'))\n    var stream = this\n    var mejs = mejsCompile.initMejs(mejsCompile.precompile(this.gatheredFiles, options), options)\n    if (!Array.isArray(tplNames)) tplNames = [tplNames]\n    if (typeof dataFn !== 'function') {\n      var data = dataFn\n      dataFn = function () { return data }\n    }\n    tplNames.forEach(function (tplName) {\n      stream.push(new gutil.File({\n        path: tplName + '.html',\n        contents: new Buffer(mejs.renderEx(tplName, dataFn(tplName)))\n      }))\n    })\n    callback()\n  })\n}\n\nfunction gatherFiles (file, encoding, next) {\n  if (file.isNull()) return next()\n  if (file.isStream()) return next(new gutil.PluginError(packageName, 'Streaming not supported'))\n  if (!this.gatheredFiles) this.gatheredFiles = [file]\n  else this.gatheredFiles.push(file)\n  next()\n}\n"]}