text: "use strict";
  
  exports.__esModule = true;
  exports.default = _default;
  
  var _helperRemapAsyncToGenerator = _interopRequireDefault(require("@babel/helper-remap-async-to-generator"));
  
  var _pluginSyntaxAsyncGenerators = _interopRequireDefault(require("@babel/plugin-syntax-async-generators"));
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  
  function _default(_ref) {
    var t = _ref.types;
    var yieldStarVisitor = {
      Function: function Function(path) {
        path.skip();
      },
      YieldExpression: function YieldExpression(_ref2, state) {
        var node = _ref2.node;
        if (!node.delegate) return;
        var callee = state.addHelper("asyncGeneratorDelegate");
        node.argument = t.callExpression(callee, [t.callExpression(state.addHelper("asyncIterator"), [node.argument]), state.addHelper("awaitAsyncGenerator")]);
      }
    };
    return {
      inherits: _pluginSyntaxAsyncGenerators.default,
      visitor: {
        Function: function Function(path, state) {
          if (!path.node.async || !path.node.generator) return;
          path.traverse(yieldStarVisitor, state);
          (0, _helperRemapAsyncToGenerator.default)(path, state.file, {
            wrapAsync: state.addHelper("wrapAsyncGenerator"),
            wrapAwait: state.addHelper("awaitAsyncGenerator")
          });
        }
      }
    };
  }