{"version":3,"sources":["jsdelivr-header.js","/npm/office-converter@1.0.2/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aAEA,IAAI,KAAO,QAAQ,iBAAiB,KAEpC,OAAO,QAAU,WACf,MAAO,CACL,aAQF,SAAsB,EAAU,GAC9B,OAAO,EAAS,EAAU,EAAM,MAClC,EATE,YAGF,SAAsB,EAAU,GAC9B,OAAO,EAAS,EAAU,EAAM,MAClC,GAMA,SAAS,EAAS,EAAU,EAAM,GAChC,KAAK,cAAgB,EAAa,KAAO,EAAU,KAAK,SAAU,EAAO,EAAQ,GAC/E,GAAI,EAAO,OAAO,EAAK,GACvB,IAAI,GAAc,EAAS,YAAY,MAAQ,EAAI,EAAS,UAAU,EAAG,EAAS,YAAY,MAAQ,GAAY,IAAM,EACxH,OAAO,EAAK,KAAM,CAChB,OAAQ,EACR,WAAY,GAEhB,GACF,CACF","file":"/npm/office-converter@1.0.2/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.19.2.\n * Original file: /npm/office-converter@1.0.2/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\nvar exec = require('child_process').exec;\n\nmodule.exports = function() {\n  return {\n    generateHtml: generateHtml,\n    generatePdf: generatePdf\n  };\n\n  function generatePdf (fileName, next) {\n    return generate(fileName, next, 'pdf');\n  }\n\n  function generateHtml(fileName, next) {\n    return generate(fileName, next, 'pdf');\n  }\n\n  function generate(fileName, next, outputType) {\n    exec('unoconv -f ' + outputType + ' \"' + fileName +'\"', function (error, stdout, stderr) {\n      if (error) return next(error);\n      var outputFile = (fileName.lastIndexOf('.') > -1 ? fileName.substring(0, fileName.lastIndexOf('.')) : fileName) + '.' + outputType;\n      return next(null, {\n        status: 0,\n        outputFile: outputFile\n      });\n    });\n  }\n};\n"]}