wp/wp-includes/js/dist/redux-routine.js
changeset 19 3d72ae0968f4
parent 18 be944660c56a
child 21 48c4eec2b7e6
equal deleted inserted replaced
18:be944660c56a 19:3d72ae0968f4
     1 this["wp"] = this["wp"] || {}; this["wp"]["reduxRoutine"] =
     1 /******/ (function() { // webpackBootstrap
     2 /******/ (function(modules) { // webpackBootstrap
     2 /******/ 	"use strict";
     3 /******/ 	// The module cache
     3 /******/ 	var __webpack_modules__ = ({
     4 /******/ 	var installedModules = {};
     4 
     5 /******/
     5 /***/ 9025:
     6 /******/ 	// The require function
     6 /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
     7 /******/ 	function __webpack_require__(moduleId) {
     7 
     8 /******/
     8 
     9 /******/ 		// Check if module is in cache
     9 
    10 /******/ 		if(installedModules[moduleId]) {
    10 Object.defineProperty(exports, "__esModule", ({
    11 /******/ 			return installedModules[moduleId].exports;
       
    12 /******/ 		}
       
    13 /******/ 		// Create a new module (and put it into the cache)
       
    14 /******/ 		var module = installedModules[moduleId] = {
       
    15 /******/ 			i: moduleId,
       
    16 /******/ 			l: false,
       
    17 /******/ 			exports: {}
       
    18 /******/ 		};
       
    19 /******/
       
    20 /******/ 		// Execute the module function
       
    21 /******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
       
    22 /******/
       
    23 /******/ 		// Flag the module as loaded
       
    24 /******/ 		module.l = true;
       
    25 /******/
       
    26 /******/ 		// Return the exports of the module
       
    27 /******/ 		return module.exports;
       
    28 /******/ 	}
       
    29 /******/
       
    30 /******/
       
    31 /******/ 	// expose the modules object (__webpack_modules__)
       
    32 /******/ 	__webpack_require__.m = modules;
       
    33 /******/
       
    34 /******/ 	// expose the module cache
       
    35 /******/ 	__webpack_require__.c = installedModules;
       
    36 /******/
       
    37 /******/ 	// define getter function for harmony exports
       
    38 /******/ 	__webpack_require__.d = function(exports, name, getter) {
       
    39 /******/ 		if(!__webpack_require__.o(exports, name)) {
       
    40 /******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
       
    41 /******/ 		}
       
    42 /******/ 	};
       
    43 /******/
       
    44 /******/ 	// define __esModule on exports
       
    45 /******/ 	__webpack_require__.r = function(exports) {
       
    46 /******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
       
    47 /******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
       
    48 /******/ 		}
       
    49 /******/ 		Object.defineProperty(exports, '__esModule', { value: true });
       
    50 /******/ 	};
       
    51 /******/
       
    52 /******/ 	// create a fake namespace object
       
    53 /******/ 	// mode & 1: value is a module id, require it
       
    54 /******/ 	// mode & 2: merge all properties of value into the ns
       
    55 /******/ 	// mode & 4: return value when already ns object
       
    56 /******/ 	// mode & 8|1: behave like require
       
    57 /******/ 	__webpack_require__.t = function(value, mode) {
       
    58 /******/ 		if(mode & 1) value = __webpack_require__(value);
       
    59 /******/ 		if(mode & 8) return value;
       
    60 /******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
       
    61 /******/ 		var ns = Object.create(null);
       
    62 /******/ 		__webpack_require__.r(ns);
       
    63 /******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
       
    64 /******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
       
    65 /******/ 		return ns;
       
    66 /******/ 	};
       
    67 /******/
       
    68 /******/ 	// getDefaultExport function for compatibility with non-harmony modules
       
    69 /******/ 	__webpack_require__.n = function(module) {
       
    70 /******/ 		var getter = module && module.__esModule ?
       
    71 /******/ 			function getDefault() { return module['default']; } :
       
    72 /******/ 			function getModuleExports() { return module; };
       
    73 /******/ 		__webpack_require__.d(getter, 'a', getter);
       
    74 /******/ 		return getter;
       
    75 /******/ 	};
       
    76 /******/
       
    77 /******/ 	// Object.prototype.hasOwnProperty.call
       
    78 /******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
       
    79 /******/
       
    80 /******/ 	// __webpack_public_path__
       
    81 /******/ 	__webpack_require__.p = "";
       
    82 /******/
       
    83 /******/
       
    84 /******/ 	// Load entry module and return exports
       
    85 /******/ 	return __webpack_require__(__webpack_require__.s = "+ekt");
       
    86 /******/ })
       
    87 /************************************************************************/
       
    88 /******/ ({
       
    89 
       
    90 /***/ "+ekt":
       
    91 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
    92 
       
    93 "use strict";
       
    94 // ESM COMPAT FLAG
       
    95 __webpack_require__.r(__webpack_exports__);
       
    96 
       
    97 // EXPORTS
       
    98 __webpack_require__.d(__webpack_exports__, "default", function() { return /* binding */ createMiddleware; });
       
    99 
       
   100 // CONCATENATED MODULE: ./node_modules/@wordpress/redux-routine/build-module/is-generator.js
       
   101 /**
       
   102  * Returns true if the given object is a generator, or false otherwise.
       
   103  *
       
   104  * @see https://www.ecma-international.org/ecma-262/6.0/#sec-generator-objects
       
   105  *
       
   106  * @param {*} object Object to test.
       
   107  *
       
   108  * @return {boolean} Whether object is a generator.
       
   109  */
       
   110 function isGenerator(object) {
       
   111   // Check that iterator (next) and iterable (Symbol.iterator) interfaces are satisfied.
       
   112   // These checks seem to be compatible with several generator helpers as well as the native implementation.
       
   113   return !!object && typeof object[Symbol.iterator] === 'function' && typeof object.next === 'function';
       
   114 }
       
   115 
       
   116 // EXTERNAL MODULE: ./node_modules/rungen/dist/index.js
       
   117 var dist = __webpack_require__("hnoU");
       
   118 
       
   119 // EXTERNAL MODULE: external "lodash"
       
   120 var external_lodash_ = __webpack_require__("YLtl");
       
   121 
       
   122 // EXTERNAL MODULE: ./node_modules/is-promise/index.js
       
   123 var is_promise = __webpack_require__("JlUD");
       
   124 var is_promise_default = /*#__PURE__*/__webpack_require__.n(is_promise);
       
   125 
       
   126 // CONCATENATED MODULE: ./node_modules/@wordpress/redux-routine/build-module/is-action.js
       
   127 /**
       
   128  * External dependencies
       
   129  */
       
   130 
       
   131 /**
       
   132  * Returns true if the given object quacks like an action.
       
   133  *
       
   134  * @param {*} object Object to test
       
   135  *
       
   136  * @return {boolean}  Whether object is an action.
       
   137  */
       
   138 
       
   139 function isAction(object) {
       
   140   return Object(external_lodash_["isPlainObject"])(object) && Object(external_lodash_["isString"])(object.type);
       
   141 }
       
   142 /**
       
   143  * Returns true if the given object quacks like an action and has a specific
       
   144  * action type
       
   145  *
       
   146  * @param {*}      object       Object to test
       
   147  * @param {string} expectedType The expected type for the action.
       
   148  *
       
   149  * @return {boolean} Whether object is an action and is of specific type.
       
   150  */
       
   151 
       
   152 function isActionOfType(object, expectedType) {
       
   153   return isAction(object) && object.type === expectedType;
       
   154 }
       
   155 
       
   156 // CONCATENATED MODULE: ./node_modules/@wordpress/redux-routine/build-module/runtime.js
       
   157 /**
       
   158  * External dependencies
       
   159  */
       
   160 
       
   161 
       
   162 
       
   163 /**
       
   164  * Internal dependencies
       
   165  */
       
   166 
       
   167 
       
   168 /**
       
   169  * Create a co-routine runtime.
       
   170  *
       
   171  * @param {Object}    controls Object of control handlers.
       
   172  * @param {Function}  dispatch Unhandled action dispatch.
       
   173  *
       
   174  * @return {Function} co-routine runtime
       
   175  */
       
   176 
       
   177 function createRuntime(controls = {}, dispatch) {
       
   178   const rungenControls = Object(external_lodash_["map"])(controls, (control, actionType) => (value, next, iterate, yieldNext, yieldError) => {
       
   179     if (!isActionOfType(value, actionType)) {
       
   180       return false;
       
   181     }
       
   182 
       
   183     const routine = control(value);
       
   184 
       
   185     if (is_promise_default()(routine)) {
       
   186       // Async control routine awaits resolution.
       
   187       routine.then(yieldNext, yieldError);
       
   188     } else {
       
   189       yieldNext(routine);
       
   190     }
       
   191 
       
   192     return true;
       
   193   });
       
   194 
       
   195   const unhandledActionControl = (value, next) => {
       
   196     if (!isAction(value)) {
       
   197       return false;
       
   198     }
       
   199 
       
   200     dispatch(value);
       
   201     next();
       
   202     return true;
       
   203   };
       
   204 
       
   205   rungenControls.push(unhandledActionControl);
       
   206   const rungenRuntime = Object(dist["create"])(rungenControls);
       
   207   return action => new Promise((resolve, reject) => rungenRuntime(action, result => {
       
   208     if (isAction(result)) {
       
   209       dispatch(result);
       
   210     }
       
   211 
       
   212     resolve(result);
       
   213   }, reject));
       
   214 }
       
   215 
       
   216 // CONCATENATED MODULE: ./node_modules/@wordpress/redux-routine/build-module/index.js
       
   217 /**
       
   218  * Internal dependencies
       
   219  */
       
   220 
       
   221 
       
   222 /**
       
   223  * Creates a Redux middleware, given an object of controls where each key is an
       
   224  * action type for which to act upon, the value a function which returns either
       
   225  * a promise which is to resolve when evaluation of the action should continue,
       
   226  * or a value. The value or resolved promise value is assigned on the return
       
   227  * value of the yield assignment. If the control handler returns undefined, the
       
   228  * execution is not continued.
       
   229  *
       
   230  * @param {Object} controls Object of control handlers.
       
   231  *
       
   232  * @return {Function} Co-routine runtime
       
   233  */
       
   234 
       
   235 function createMiddleware(controls = {}) {
       
   236   return store => {
       
   237     const runtime = createRuntime(controls, store.dispatch);
       
   238     return next => action => {
       
   239       if (!isGenerator(action)) {
       
   240         return next(action);
       
   241       }
       
   242 
       
   243       return runtime(action);
       
   244     };
       
   245   };
       
   246 }
       
   247 
       
   248 
       
   249 /***/ }),
       
   250 
       
   251 /***/ "Hkfj":
       
   252 /***/ (function(module, exports, __webpack_require__) {
       
   253 
       
   254 "use strict";
       
   255 
       
   256 
       
   257 Object.defineProperty(exports, "__esModule", {
       
   258   value: true
    11   value: true
   259 });
    12 }));
   260 var createDispatcher = function createDispatcher() {
    13 exports.race = exports.join = exports.fork = exports.promise = undefined;
   261   var listeners = [];
    14 
   262 
    15 var _is = __webpack_require__(9681);
   263   return {
       
   264     subscribe: function subscribe(listener) {
       
   265       listeners.push(listener);
       
   266       return function () {
       
   267         listeners = listeners.filter(function (l) {
       
   268           return l !== listener;
       
   269         });
       
   270       };
       
   271     },
       
   272     dispatch: function dispatch(action) {
       
   273       listeners.slice().forEach(function (listener) {
       
   274         return listener(action);
       
   275       });
       
   276     }
       
   277   };
       
   278 };
       
   279 
       
   280 exports.default = createDispatcher;
       
   281 
       
   282 /***/ }),
       
   283 
       
   284 /***/ "JlUD":
       
   285 /***/ (function(module, exports) {
       
   286 
       
   287 module.exports = isPromise;
       
   288 module.exports.default = isPromise;
       
   289 
       
   290 function isPromise(obj) {
       
   291   return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
       
   292 }
       
   293 
       
   294 
       
   295 /***/ }),
       
   296 
       
   297 /***/ "PERq":
       
   298 /***/ (function(module, exports, __webpack_require__) {
       
   299 
       
   300 "use strict";
       
   301 
       
   302 
       
   303 Object.defineProperty(exports, "__esModule", {
       
   304   value: true
       
   305 });
       
   306 exports.cps = exports.call = undefined;
       
   307 
       
   308 var _is = __webpack_require__("qmpp");
       
   309 
    16 
   310 var _is2 = _interopRequireDefault(_is);
    17 var _is2 = _interopRequireDefault(_is);
   311 
    18 
   312 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    19 var _helpers = __webpack_require__(7783);
   313 
    20 
   314 function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
    21 var _dispatcher = __webpack_require__(2451);
   315 
       
   316 var call = exports.call = function call(value, next, rungen, yieldNext, raiseNext) {
       
   317   if (!_is2.default.call(value)) return false;
       
   318   try {
       
   319     next(value.func.apply(value.context, value.args));
       
   320   } catch (err) {
       
   321     raiseNext(err);
       
   322   }
       
   323   return true;
       
   324 };
       
   325 
       
   326 var cps = exports.cps = function cps(value, next, rungen, yieldNext, raiseNext) {
       
   327   var _value$func;
       
   328 
       
   329   if (!_is2.default.cps(value)) return false;
       
   330   (_value$func = value.func).call.apply(_value$func, [null].concat(_toConsumableArray(value.args), [function (err, result) {
       
   331     if (err) raiseNext(err);else next(result);
       
   332   }]));
       
   333   return true;
       
   334 };
       
   335 
       
   336 exports.default = [call, cps];
       
   337 
       
   338 /***/ }),
       
   339 
       
   340 /***/ "YLtl":
       
   341 /***/ (function(module, exports) {
       
   342 
       
   343 (function() { module.exports = window["lodash"]; }());
       
   344 
       
   345 /***/ }),
       
   346 
       
   347 /***/ "e6BM":
       
   348 /***/ (function(module, exports, __webpack_require__) {
       
   349 
       
   350 "use strict";
       
   351 
       
   352 
       
   353 Object.defineProperty(exports, "__esModule", {
       
   354   value: true
       
   355 });
       
   356 exports.createChannel = exports.subscribe = exports.cps = exports.apply = exports.call = exports.invoke = exports.delay = exports.race = exports.join = exports.fork = exports.error = exports.all = undefined;
       
   357 
       
   358 var _keys = __webpack_require__("tGEh");
       
   359 
       
   360 var _keys2 = _interopRequireDefault(_keys);
       
   361 
       
   362 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
       
   363 
       
   364 var all = exports.all = function all(value) {
       
   365   return {
       
   366     type: _keys2.default.all,
       
   367     value: value
       
   368   };
       
   369 };
       
   370 
       
   371 var error = exports.error = function error(err) {
       
   372   return {
       
   373     type: _keys2.default.error,
       
   374     error: err
       
   375   };
       
   376 };
       
   377 
       
   378 var fork = exports.fork = function fork(iterator) {
       
   379   for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
       
   380     args[_key - 1] = arguments[_key];
       
   381   }
       
   382 
       
   383   return {
       
   384     type: _keys2.default.fork,
       
   385     iterator: iterator,
       
   386     args: args
       
   387   };
       
   388 };
       
   389 
       
   390 var join = exports.join = function join(task) {
       
   391   return {
       
   392     type: _keys2.default.join,
       
   393     task: task
       
   394   };
       
   395 };
       
   396 
       
   397 var race = exports.race = function race(competitors) {
       
   398   return {
       
   399     type: _keys2.default.race,
       
   400     competitors: competitors
       
   401   };
       
   402 };
       
   403 
       
   404 var delay = exports.delay = function delay(timeout) {
       
   405   return new Promise(function (resolve) {
       
   406     setTimeout(function () {
       
   407       return resolve(true);
       
   408     }, timeout);
       
   409   });
       
   410 };
       
   411 
       
   412 var invoke = exports.invoke = function invoke(func) {
       
   413   for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
       
   414     args[_key2 - 1] = arguments[_key2];
       
   415   }
       
   416 
       
   417   return {
       
   418     type: _keys2.default.call,
       
   419     func: func,
       
   420     context: null,
       
   421     args: args
       
   422   };
       
   423 };
       
   424 
       
   425 var call = exports.call = function call(func, context) {
       
   426   for (var _len3 = arguments.length, args = Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
       
   427     args[_key3 - 2] = arguments[_key3];
       
   428   }
       
   429 
       
   430   return {
       
   431     type: _keys2.default.call,
       
   432     func: func,
       
   433     context: context,
       
   434     args: args
       
   435   };
       
   436 };
       
   437 
       
   438 var apply = exports.apply = function apply(func, context, args) {
       
   439   return {
       
   440     type: _keys2.default.call,
       
   441     func: func,
       
   442     context: context,
       
   443     args: args
       
   444   };
       
   445 };
       
   446 
       
   447 var cps = exports.cps = function cps(func) {
       
   448   for (var _len4 = arguments.length, args = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
       
   449     args[_key4 - 1] = arguments[_key4];
       
   450   }
       
   451 
       
   452   return {
       
   453     type: _keys2.default.cps,
       
   454     func: func,
       
   455     args: args
       
   456   };
       
   457 };
       
   458 
       
   459 var subscribe = exports.subscribe = function subscribe(channel) {
       
   460   return {
       
   461     type: _keys2.default.subscribe,
       
   462     channel: channel
       
   463   };
       
   464 };
       
   465 
       
   466 var createChannel = exports.createChannel = function createChannel(callback) {
       
   467   var listeners = [];
       
   468   var subscribe = function subscribe(l) {
       
   469     listeners.push(l);
       
   470     return function () {
       
   471       return listeners.splice(listeners.indexOf(l), 1);
       
   472     };
       
   473   };
       
   474   var next = function next(val) {
       
   475     return listeners.forEach(function (l) {
       
   476       return l(val);
       
   477     });
       
   478   };
       
   479   callback(next);
       
   480 
       
   481   return {
       
   482     subscribe: subscribe
       
   483   };
       
   484 };
       
   485 
       
   486 /***/ }),
       
   487 
       
   488 /***/ "hecb":
       
   489 /***/ (function(module, exports, __webpack_require__) {
       
   490 
       
   491 "use strict";
       
   492 
       
   493 
       
   494 Object.defineProperty(exports, "__esModule", {
       
   495   value: true
       
   496 });
       
   497 exports.race = exports.join = exports.fork = exports.promise = undefined;
       
   498 
       
   499 var _is = __webpack_require__("qmpp");
       
   500 
       
   501 var _is2 = _interopRequireDefault(_is);
       
   502 
       
   503 var _helpers = __webpack_require__("e6BM");
       
   504 
       
   505 var _dispatcher = __webpack_require__("Hkfj");
       
   506 
    22 
   507 var _dispatcher2 = _interopRequireDefault(_dispatcher);
    23 var _dispatcher2 = _interopRequireDefault(_dispatcher);
   508 
    24 
   509 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    25 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
   510 
    26 
   601   });
   117   });
   602 
   118 
   603   return true;
   119   return true;
   604 };
   120 };
   605 
   121 
   606 exports.default = [promise, fork, join, race, subscribe];
   122 exports["default"] = [promise, fork, join, race, subscribe];
   607 
   123 
   608 /***/ }),
   124 /***/ }),
   609 
   125 
   610 /***/ "hnoU":
   126 /***/ 7961:
   611 /***/ (function(module, exports, __webpack_require__) {
   127 /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
   612 
   128 
   613 "use strict";
   129 
   614 
   130 
   615 
   131 Object.defineProperty(exports, "__esModule", ({
   616 Object.defineProperty(exports, "__esModule", {
       
   617   value: true
   132   value: true
   618 });
   133 }));
   619 exports.wrapControls = exports.asyncControls = exports.create = undefined;
       
   620 
       
   621 var _helpers = __webpack_require__("e6BM");
       
   622 
       
   623 Object.keys(_helpers).forEach(function (key) {
       
   624   if (key === "default") return;
       
   625   Object.defineProperty(exports, key, {
       
   626     enumerable: true,
       
   627     get: function get() {
       
   628       return _helpers[key];
       
   629     }
       
   630   });
       
   631 });
       
   632 
       
   633 var _create = __webpack_require__("vsQm");
       
   634 
       
   635 var _create2 = _interopRequireDefault(_create);
       
   636 
       
   637 var _async = __webpack_require__("hecb");
       
   638 
       
   639 var _async2 = _interopRequireDefault(_async);
       
   640 
       
   641 var _wrap = __webpack_require__("PERq");
       
   642 
       
   643 var _wrap2 = _interopRequireDefault(_wrap);
       
   644 
       
   645 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
       
   646 
       
   647 exports.create = _create2.default;
       
   648 exports.asyncControls = _async2.default;
       
   649 exports.wrapControls = _wrap2.default;
       
   650 
       
   651 /***/ }),
       
   652 
       
   653 /***/ "k4FQ":
       
   654 /***/ (function(module, exports, __webpack_require__) {
       
   655 
       
   656 "use strict";
       
   657 
       
   658 
       
   659 Object.defineProperty(exports, "__esModule", {
       
   660   value: true
       
   661 });
       
   662 exports.iterator = exports.array = exports.object = exports.error = exports.any = undefined;
   134 exports.iterator = exports.array = exports.object = exports.error = exports.any = undefined;
   663 
   135 
   664 var _is = __webpack_require__("qmpp");
   136 var _is = __webpack_require__(9681);
   665 
   137 
   666 var _is2 = _interopRequireDefault(_is);
   138 var _is2 = _interopRequireDefault(_is);
   667 
   139 
   668 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
   140 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
   669 
   141 
   745   if (!_is2.default.iterator(value)) return false;
   217   if (!_is2.default.iterator(value)) return false;
   746   rungen(value, next, raiseNext);
   218   rungen(value, next, raiseNext);
   747   return true;
   219   return true;
   748 };
   220 };
   749 
   221 
   750 exports.default = [error, iterator, array, object, any];
   222 exports["default"] = [error, iterator, array, object, any];
   751 
   223 
   752 /***/ }),
   224 /***/ }),
   753 
   225 
   754 /***/ "qmpp":
   226 /***/ 2165:
   755 /***/ (function(module, exports, __webpack_require__) {
   227 /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
   756 
   228 
   757 "use strict";
   229 
   758 
   230 
   759 
   231 Object.defineProperty(exports, "__esModule", ({
   760 Object.defineProperty(exports, "__esModule", {
       
   761   value: true
   232   value: true
       
   233 }));
       
   234 exports.cps = exports.call = undefined;
       
   235 
       
   236 var _is = __webpack_require__(9681);
       
   237 
       
   238 var _is2 = _interopRequireDefault(_is);
       
   239 
       
   240 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
       
   241 
       
   242 function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
       
   243 
       
   244 var call = exports.call = function call(value, next, rungen, yieldNext, raiseNext) {
       
   245   if (!_is2.default.call(value)) return false;
       
   246   try {
       
   247     next(value.func.apply(value.context, value.args));
       
   248   } catch (err) {
       
   249     raiseNext(err);
       
   250   }
       
   251   return true;
       
   252 };
       
   253 
       
   254 var cps = exports.cps = function cps(value, next, rungen, yieldNext, raiseNext) {
       
   255   var _value$func;
       
   256 
       
   257   if (!_is2.default.cps(value)) return false;
       
   258   (_value$func = value.func).call.apply(_value$func, [null].concat(_toConsumableArray(value.args), [function (err, result) {
       
   259     if (err) raiseNext(err);else next(result);
       
   260   }]));
       
   261   return true;
       
   262 };
       
   263 
       
   264 exports["default"] = [call, cps];
       
   265 
       
   266 /***/ }),
       
   267 
       
   268 /***/ 6288:
       
   269 /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
       
   270 
       
   271 
       
   272 
       
   273 Object.defineProperty(exports, "__esModule", ({
       
   274   value: true
       
   275 }));
       
   276 
       
   277 var _builtin = __webpack_require__(7961);
       
   278 
       
   279 var _builtin2 = _interopRequireDefault(_builtin);
       
   280 
       
   281 var _is = __webpack_require__(9681);
       
   282 
       
   283 var _is2 = _interopRequireDefault(_is);
       
   284 
       
   285 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
       
   286 
       
   287 function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
       
   288 
       
   289 var create = function create() {
       
   290   var userControls = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0];
       
   291 
       
   292   var controls = [].concat(_toConsumableArray(userControls), _toConsumableArray(_builtin2.default));
       
   293 
       
   294   var runtime = function runtime(input) {
       
   295     var success = arguments.length <= 1 || arguments[1] === undefined ? function () {} : arguments[1];
       
   296     var error = arguments.length <= 2 || arguments[2] === undefined ? function () {} : arguments[2];
       
   297 
       
   298     var iterate = function iterate(gen) {
       
   299       var yieldValue = function yieldValue(isError) {
       
   300         return function (ret) {
       
   301           try {
       
   302             var _ref = isError ? gen.throw(ret) : gen.next(ret);
       
   303 
       
   304             var value = _ref.value;
       
   305             var done = _ref.done;
       
   306 
       
   307             if (done) return success(value);
       
   308             next(value);
       
   309           } catch (e) {
       
   310             return error(e);
       
   311           }
       
   312         };
       
   313       };
       
   314 
       
   315       var next = function next(ret) {
       
   316         controls.some(function (control) {
       
   317           return control(ret, next, runtime, yieldValue(false), yieldValue(true));
       
   318         });
       
   319       };
       
   320 
       
   321       yieldValue(false)();
       
   322     };
       
   323 
       
   324     var iterator = _is2.default.iterator(input) ? input : regeneratorRuntime.mark(function _callee() {
       
   325       return regeneratorRuntime.wrap(function _callee$(_context) {
       
   326         while (1) {
       
   327           switch (_context.prev = _context.next) {
       
   328             case 0:
       
   329               _context.next = 2;
       
   330               return input;
       
   331 
       
   332             case 2:
       
   333               return _context.abrupt('return', _context.sent);
       
   334 
       
   335             case 3:
       
   336             case 'end':
       
   337               return _context.stop();
       
   338           }
       
   339         }
       
   340       }, _callee, this);
       
   341     })();
       
   342 
       
   343     iterate(iterator, success, error);
       
   344   };
       
   345 
       
   346   return runtime;
       
   347 };
       
   348 
       
   349 exports["default"] = create;
       
   350 
       
   351 /***/ }),
       
   352 
       
   353 /***/ 2290:
       
   354 /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
       
   355 
       
   356 
       
   357 
       
   358 Object.defineProperty(exports, "__esModule", ({
       
   359   value: true
       
   360 }));
       
   361 exports.wrapControls = exports.asyncControls = exports.create = undefined;
       
   362 
       
   363 var _helpers = __webpack_require__(7783);
       
   364 
       
   365 Object.keys(_helpers).forEach(function (key) {
       
   366   if (key === "default") return;
       
   367   Object.defineProperty(exports, key, {
       
   368     enumerable: true,
       
   369     get: function get() {
       
   370       return _helpers[key];
       
   371     }
       
   372   });
   762 });
   373 });
   763 
   374 
       
   375 var _create = __webpack_require__(6288);
       
   376 
       
   377 var _create2 = _interopRequireDefault(_create);
       
   378 
       
   379 var _async = __webpack_require__(9025);
       
   380 
       
   381 var _async2 = _interopRequireDefault(_async);
       
   382 
       
   383 var _wrap = __webpack_require__(2165);
       
   384 
       
   385 var _wrap2 = _interopRequireDefault(_wrap);
       
   386 
       
   387 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
       
   388 
       
   389 exports.create = _create2.default;
       
   390 exports.asyncControls = _async2.default;
       
   391 exports.wrapControls = _wrap2.default;
       
   392 
       
   393 /***/ }),
       
   394 
       
   395 /***/ 2451:
       
   396 /***/ (function(__unused_webpack_module, exports) {
       
   397 
       
   398 
       
   399 
       
   400 Object.defineProperty(exports, "__esModule", ({
       
   401   value: true
       
   402 }));
       
   403 var createDispatcher = function createDispatcher() {
       
   404   var listeners = [];
       
   405 
       
   406   return {
       
   407     subscribe: function subscribe(listener) {
       
   408       listeners.push(listener);
       
   409       return function () {
       
   410         listeners = listeners.filter(function (l) {
       
   411           return l !== listener;
       
   412         });
       
   413       };
       
   414     },
       
   415     dispatch: function dispatch(action) {
       
   416       listeners.slice().forEach(function (listener) {
       
   417         return listener(action);
       
   418       });
       
   419     }
       
   420   };
       
   421 };
       
   422 
       
   423 exports["default"] = createDispatcher;
       
   424 
       
   425 /***/ }),
       
   426 
       
   427 /***/ 7783:
       
   428 /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
       
   429 
       
   430 
       
   431 
       
   432 Object.defineProperty(exports, "__esModule", ({
       
   433   value: true
       
   434 }));
       
   435 exports.createChannel = exports.subscribe = exports.cps = exports.apply = exports.call = exports.invoke = exports.delay = exports.race = exports.join = exports.fork = exports.error = exports.all = undefined;
       
   436 
       
   437 var _keys = __webpack_require__(9851);
       
   438 
       
   439 var _keys2 = _interopRequireDefault(_keys);
       
   440 
       
   441 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
       
   442 
       
   443 var all = exports.all = function all(value) {
       
   444   return {
       
   445     type: _keys2.default.all,
       
   446     value: value
       
   447   };
       
   448 };
       
   449 
       
   450 var error = exports.error = function error(err) {
       
   451   return {
       
   452     type: _keys2.default.error,
       
   453     error: err
       
   454   };
       
   455 };
       
   456 
       
   457 var fork = exports.fork = function fork(iterator) {
       
   458   for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
       
   459     args[_key - 1] = arguments[_key];
       
   460   }
       
   461 
       
   462   return {
       
   463     type: _keys2.default.fork,
       
   464     iterator: iterator,
       
   465     args: args
       
   466   };
       
   467 };
       
   468 
       
   469 var join = exports.join = function join(task) {
       
   470   return {
       
   471     type: _keys2.default.join,
       
   472     task: task
       
   473   };
       
   474 };
       
   475 
       
   476 var race = exports.race = function race(competitors) {
       
   477   return {
       
   478     type: _keys2.default.race,
       
   479     competitors: competitors
       
   480   };
       
   481 };
       
   482 
       
   483 var delay = exports.delay = function delay(timeout) {
       
   484   return new Promise(function (resolve) {
       
   485     setTimeout(function () {
       
   486       return resolve(true);
       
   487     }, timeout);
       
   488   });
       
   489 };
       
   490 
       
   491 var invoke = exports.invoke = function invoke(func) {
       
   492   for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
       
   493     args[_key2 - 1] = arguments[_key2];
       
   494   }
       
   495 
       
   496   return {
       
   497     type: _keys2.default.call,
       
   498     func: func,
       
   499     context: null,
       
   500     args: args
       
   501   };
       
   502 };
       
   503 
       
   504 var call = exports.call = function call(func, context) {
       
   505   for (var _len3 = arguments.length, args = Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
       
   506     args[_key3 - 2] = arguments[_key3];
       
   507   }
       
   508 
       
   509   return {
       
   510     type: _keys2.default.call,
       
   511     func: func,
       
   512     context: context,
       
   513     args: args
       
   514   };
       
   515 };
       
   516 
       
   517 var apply = exports.apply = function apply(func, context, args) {
       
   518   return {
       
   519     type: _keys2.default.call,
       
   520     func: func,
       
   521     context: context,
       
   522     args: args
       
   523   };
       
   524 };
       
   525 
       
   526 var cps = exports.cps = function cps(func) {
       
   527   for (var _len4 = arguments.length, args = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
       
   528     args[_key4 - 1] = arguments[_key4];
       
   529   }
       
   530 
       
   531   return {
       
   532     type: _keys2.default.cps,
       
   533     func: func,
       
   534     args: args
       
   535   };
       
   536 };
       
   537 
       
   538 var subscribe = exports.subscribe = function subscribe(channel) {
       
   539   return {
       
   540     type: _keys2.default.subscribe,
       
   541     channel: channel
       
   542   };
       
   543 };
       
   544 
       
   545 var createChannel = exports.createChannel = function createChannel(callback) {
       
   546   var listeners = [];
       
   547   var subscribe = function subscribe(l) {
       
   548     listeners.push(l);
       
   549     return function () {
       
   550       return listeners.splice(listeners.indexOf(l), 1);
       
   551     };
       
   552   };
       
   553   var next = function next(val) {
       
   554     return listeners.forEach(function (l) {
       
   555       return l(val);
       
   556     });
       
   557   };
       
   558   callback(next);
       
   559 
       
   560   return {
       
   561     subscribe: subscribe
       
   562   };
       
   563 };
       
   564 
       
   565 /***/ }),
       
   566 
       
   567 /***/ 9681:
       
   568 /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
       
   569 
       
   570 
       
   571 
       
   572 Object.defineProperty(exports, "__esModule", ({
       
   573   value: true
       
   574 }));
       
   575 
   764 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
   576 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
   765 
   577 
   766 var _keys = __webpack_require__("tGEh");
   578 var _keys = __webpack_require__(9851);
   767 
   579 
   768 var _keys2 = _interopRequireDefault(_keys);
   580 var _keys2 = _interopRequireDefault(_keys);
   769 
   581 
   770 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
   582 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
   771 
   583 
   810   channel: function channel(value) {
   622   channel: function channel(value) {
   811     return is.obj(value) && is.func(value.subscribe);
   623     return is.obj(value) && is.func(value.subscribe);
   812   }
   624   }
   813 };
   625 };
   814 
   626 
   815 exports.default = is;
   627 exports["default"] = is;
   816 
   628 
   817 /***/ }),
   629 /***/ }),
   818 
   630 
   819 /***/ "tGEh":
   631 /***/ 9851:
   820 /***/ (function(module, exports, __webpack_require__) {
   632 /***/ (function(__unused_webpack_module, exports) {
   821 
   633 
   822 "use strict";
   634 
   823 
   635 
   824 
   636 Object.defineProperty(exports, "__esModule", ({
   825 Object.defineProperty(exports, "__esModule", {
       
   826   value: true
   637   value: true
   827 });
   638 }));
   828 var keys = {
   639 var keys = {
   829   all: Symbol('all'),
   640   all: Symbol('all'),
   830   error: Symbol('error'),
   641   error: Symbol('error'),
   831   fork: Symbol('fork'),
   642   fork: Symbol('fork'),
   832   join: Symbol('join'),
   643   join: Symbol('join'),
   834   call: Symbol('call'),
   645   call: Symbol('call'),
   835   cps: Symbol('cps'),
   646   cps: Symbol('cps'),
   836   subscribe: Symbol('subscribe')
   647   subscribe: Symbol('subscribe')
   837 };
   648 };
   838 
   649 
   839 exports.default = keys;
   650 exports["default"] = keys;
   840 
   651 
   841 /***/ }),
   652 /***/ })
   842 
   653 
   843 /***/ "vsQm":
   654 /******/ 	});
   844 /***/ (function(module, exports, __webpack_require__) {
   655 /************************************************************************/
   845 
   656 /******/ 	// The module cache
   846 "use strict";
   657 /******/ 	var __webpack_module_cache__ = {};
   847 
   658 /******/ 	
   848 
   659 /******/ 	// The require function
   849 Object.defineProperty(exports, "__esModule", {
   660 /******/ 	function __webpack_require__(moduleId) {
   850   value: true
   661 /******/ 		// Check if module is in cache
       
   662 /******/ 		var cachedModule = __webpack_module_cache__[moduleId];
       
   663 /******/ 		if (cachedModule !== undefined) {
       
   664 /******/ 			return cachedModule.exports;
       
   665 /******/ 		}
       
   666 /******/ 		// Create a new module (and put it into the cache)
       
   667 /******/ 		var module = __webpack_module_cache__[moduleId] = {
       
   668 /******/ 			// no module.id needed
       
   669 /******/ 			// no module.loaded needed
       
   670 /******/ 			exports: {}
       
   671 /******/ 		};
       
   672 /******/ 	
       
   673 /******/ 		// Execute the module function
       
   674 /******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
       
   675 /******/ 	
       
   676 /******/ 		// Return the exports of the module
       
   677 /******/ 		return module.exports;
       
   678 /******/ 	}
       
   679 /******/ 	
       
   680 /************************************************************************/
       
   681 /******/ 	/* webpack/runtime/define property getters */
       
   682 /******/ 	!function() {
       
   683 /******/ 		// define getter functions for harmony exports
       
   684 /******/ 		__webpack_require__.d = function(exports, definition) {
       
   685 /******/ 			for(var key in definition) {
       
   686 /******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
       
   687 /******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
       
   688 /******/ 				}
       
   689 /******/ 			}
       
   690 /******/ 		};
       
   691 /******/ 	}();
       
   692 /******/ 	
       
   693 /******/ 	/* webpack/runtime/hasOwnProperty shorthand */
       
   694 /******/ 	!function() {
       
   695 /******/ 		__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
       
   696 /******/ 	}();
       
   697 /******/ 	
       
   698 /************************************************************************/
       
   699 var __webpack_exports__ = {};
       
   700 // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
       
   701 !function() {
       
   702 
       
   703 // EXPORTS
       
   704 __webpack_require__.d(__webpack_exports__, {
       
   705   "default": function() { return /* binding */ createMiddleware; }
   851 });
   706 });
   852 
   707 
   853 var _builtin = __webpack_require__("k4FQ");
   708 ;// CONCATENATED MODULE: ./node_modules/@wordpress/redux-routine/build-module/is-generator.js
   854 
   709 /* eslint-disable jsdoc/valid-types */
   855 var _builtin2 = _interopRequireDefault(_builtin);
   710 
   856 
   711 /**
   857 var _is = __webpack_require__("qmpp");
   712  * Returns true if the given object is a generator, or false otherwise.
   858 
   713  *
   859 var _is2 = _interopRequireDefault(_is);
   714  * @see https://www.ecma-international.org/ecma-262/6.0/#sec-generator-objects
   860 
   715  *
   861 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
   716  * @param {any} object Object to test.
   862 
   717  *
   863 function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
   718  * @return {object is Generator} Whether object is a generator.
   864 
   719  */
   865 var create = function create() {
   720 function isGenerator(object) {
   866   var userControls = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0];
   721   /* eslint-enable jsdoc/valid-types */
   867 
   722   // Check that iterator (next) and iterable (Symbol.iterator) interfaces are satisfied.
   868   var controls = [].concat(_toConsumableArray(userControls), _toConsumableArray(_builtin2.default));
   723   // These checks seem to be compatible with several generator helpers as well as the native implementation.
   869 
   724   return !!object && typeof object[Symbol.iterator] === 'function' && typeof object.next === 'function';
   870   var runtime = function runtime(input) {
   725 }
   871     var success = arguments.length <= 1 || arguments[1] === undefined ? function () {} : arguments[1];
   726 
   872     var error = arguments.length <= 2 || arguments[2] === undefined ? function () {} : arguments[2];
   727 // EXTERNAL MODULE: ./node_modules/rungen/dist/index.js
   873 
   728 var dist = __webpack_require__(2290);
   874     var iterate = function iterate(gen) {
   729 ;// CONCATENATED MODULE: external "lodash"
   875       var yieldValue = function yieldValue(isError) {
   730 var external_lodash_namespaceObject = window["lodash"];
   876         return function (ret) {
   731 ;// CONCATENATED MODULE: ./node_modules/is-promise/index.mjs
   877           try {
   732 function isPromise(obj) {
   878             var _ref = isError ? gen.throw(ret) : gen.next(ret);
   733   return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
   879 
   734 }
   880             var value = _ref.value;
   735 
   881             var done = _ref.done;
   736 ;// CONCATENATED MODULE: ./node_modules/@wordpress/redux-routine/build-module/is-action.js
   882 
   737 /**
   883             if (done) return success(value);
   738  * External dependencies
   884             next(value);
   739  */
   885           } catch (e) {
   740 
   886             return error(e);
   741 /* eslint-disable jsdoc/valid-types */
   887           }
   742 
   888         };
   743 /**
   889       };
   744  * Returns true if the given object quacks like an action.
   890 
   745  *
   891       var next = function next(ret) {
   746  * @param {any} object Object to test
   892         controls.some(function (control) {
   747  *
   893           return control(ret, next, runtime, yieldValue(false), yieldValue(true));
   748  * @return {object is import('redux').AnyAction}  Whether object is an action.
   894         });
   749  */
   895       };
   750 
   896 
   751 function isAction(object) {
   897       yieldValue(false)();
   752   return (0,external_lodash_namespaceObject.isPlainObject)(object) && (0,external_lodash_namespaceObject.isString)(object.type);
       
   753 }
       
   754 /**
       
   755  * Returns true if the given object quacks like an action and has a specific
       
   756  * action type
       
   757  *
       
   758  * @param {unknown} object       Object to test
       
   759  * @param {string}  expectedType The expected type for the action.
       
   760  *
       
   761  * @return {object is import('redux').AnyAction} Whether object is an action and is of specific type.
       
   762  */
       
   763 
       
   764 function isActionOfType(object, expectedType) {
       
   765   /* eslint-enable jsdoc/valid-types */
       
   766   return isAction(object) && object.type === expectedType;
       
   767 }
       
   768 
       
   769 ;// CONCATENATED MODULE: ./node_modules/@wordpress/redux-routine/build-module/runtime.js
       
   770 /**
       
   771  * External dependencies
       
   772  */
       
   773 
       
   774 
       
   775 
       
   776 
       
   777 /**
       
   778  * Internal dependencies
       
   779  */
       
   780 
       
   781 /**
       
   782  * Create a co-routine runtime.
       
   783  *
       
   784  * @param  controls Object of control handlers.
       
   785  * @param  dispatch Unhandled action dispatch.
       
   786  */
       
   787 
       
   788 function createRuntime() {
       
   789   let controls = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
       
   790   let dispatch = arguments.length > 1 ? arguments[1] : undefined;
       
   791   const rungenControls = (0,external_lodash_namespaceObject.map)(controls, (control, actionType) => (value, next, iterate, yieldNext, yieldError) => {
       
   792     if (!isActionOfType(value, actionType)) {
       
   793       return false;
       
   794     }
       
   795 
       
   796     const routine = control(value);
       
   797 
       
   798     if (isPromise(routine)) {
       
   799       // Async control routine awaits resolution.
       
   800       routine.then(yieldNext, yieldError);
       
   801     } else {
       
   802       yieldNext(routine);
       
   803     }
       
   804 
       
   805     return true;
       
   806   });
       
   807 
       
   808   const unhandledActionControl = (value, next) => {
       
   809     if (!isAction(value)) {
       
   810       return false;
       
   811     }
       
   812 
       
   813     dispatch(value);
       
   814     next();
       
   815     return true;
       
   816   };
       
   817 
       
   818   rungenControls.push(unhandledActionControl);
       
   819   const rungenRuntime = (0,dist.create)(rungenControls);
       
   820   return action => new Promise((resolve, reject) => rungenRuntime(action, result => {
       
   821     if (isAction(result)) {
       
   822       dispatch(result);
       
   823     }
       
   824 
       
   825     resolve(result);
       
   826   }, reject));
       
   827 }
       
   828 
       
   829 ;// CONCATENATED MODULE: ./node_modules/@wordpress/redux-routine/build-module/index.js
       
   830 /**
       
   831  * Internal dependencies
       
   832  */
       
   833 
       
   834 
       
   835 /**
       
   836  * Creates a Redux middleware, given an object of controls where each key is an
       
   837  * action type for which to act upon, the value a function which returns either
       
   838  * a promise which is to resolve when evaluation of the action should continue,
       
   839  * or a value. The value or resolved promise value is assigned on the return
       
   840  * value of the yield assignment. If the control handler returns undefined, the
       
   841  * execution is not continued.
       
   842  *
       
   843  * @param {Record<string, (value: import('redux').AnyAction) => Promise<boolean> | boolean>} controls Object of control handlers.
       
   844  *
       
   845  * @return {import('redux').Middleware} Co-routine runtime
       
   846  */
       
   847 
       
   848 function createMiddleware() {
       
   849   let controls = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
       
   850   return store => {
       
   851     const runtime = createRuntime(controls, store.dispatch);
       
   852     return next => action => {
       
   853       if (!isGenerator(action)) {
       
   854         return next(action);
       
   855       }
       
   856 
       
   857       return runtime(action);
   898     };
   858     };
   899 
   859   };
   900     var iterator = _is2.default.iterator(input) ? input : regeneratorRuntime.mark(function _callee() {
   860 }
   901       return regeneratorRuntime.wrap(function _callee$(_context) {
   861 
   902         while (1) {
   862 }();
   903           switch (_context.prev = _context.next) {
   863 (window.wp = window.wp || {}).reduxRoutine = __webpack_exports__["default"];
   904             case 0:
   864 /******/ })()
   905               _context.next = 2;
   865 ;
   906               return input;
       
   907 
       
   908             case 2:
       
   909               return _context.abrupt('return', _context.sent);
       
   910 
       
   911             case 3:
       
   912             case 'end':
       
   913               return _context.stop();
       
   914           }
       
   915         }
       
   916       }, _callee, this);
       
   917     })();
       
   918 
       
   919     iterate(iterator, success, error);
       
   920   };
       
   921 
       
   922   return runtime;
       
   923 };
       
   924 
       
   925 exports.default = create;
       
   926 
       
   927 /***/ })
       
   928 
       
   929 /******/ })["default"];