'use strict'; const compiler_esbabel_compiler = require('./compiler/esbabel.compiler.cjs'); const compiler_essucrase_compiler = require('./compiler/essucrase.compiler.cjs'); const putout = require('@putout/bundle'); require('./shared/core.c841d3a3.cjs'); require('./plugins/index.cjs'); require('./utils.cjs'); function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; } const putout__default = /*#__PURE__*/_interopDefaultCompat(putout); function compile(code, options = { from: "esjs", to: "js", compiler: "essucrase" }) { if (!options.from) { options.from = "esjs"; } if (!options.to) { options.to = "js"; } if (!options.compiler) { options.compiler = "essucrase"; } const compiler = options?.compiler === "essucrase" ? new compiler_essucrase_compiler.EssucraseCompiler(putout__default) : new compiler_esbabel_compiler.EsbabelCompiler(); return compiler.compile(code, options); } exports.compile = compile; exports.transpile = compile;