123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- var _Promise = require("@babel/runtime-corejs3/core-js/promise");
- var _Symbol = require("@babel/runtime-corejs3/core-js/symbol");
- var _Symbol$iterator = require("@babel/runtime-corejs3/core-js/symbol/iterator");
- function _asyncGeneratorDelegate(inner, awaitWrap) {
- var iter = {},
- waiting = false;
- function pump(key, value) {
- waiting = true;
- value = new _Promise(function (resolve) {
- resolve(inner[key](value));
- });
- return {
- done: false,
- value: awaitWrap(value)
- };
- }
- ;
- iter[typeof _Symbol !== "undefined" && _Symbol$iterator || "@@iterator"] = function () {
- return this;
- };
- iter.next = function (value) {
- if (waiting) {
- waiting = false;
- return value;
- }
- return pump("next", value);
- };
- if (typeof inner["throw"] === "function") {
- iter["throw"] = function (value) {
- if (waiting) {
- waiting = false;
- throw value;
- }
- return pump("throw", value);
- };
- }
- if (typeof inner["return"] === "function") {
- iter["return"] = function (value) {
- if (waiting) {
- waiting = false;
- return value;
- }
- return pump("return", value);
- };
- }
- return iter;
- }
- module.exports = _asyncGeneratorDelegate;
- module.exports["default"] = module.exports, module.exports.__esModule = true;
|