[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/js/dist/ -> list-reusable-blocks.js (source)

   1  this["wp"] = this["wp"] || {}; this["wp"]["listReusableBlocks"] =
   2  /******/ (function(modules) { // webpackBootstrap
   3  /******/     // The module cache
   4  /******/     var installedModules = {};
   5  /******/
   6  /******/     // The require function
   7  /******/ 	function __webpack_require__(moduleId) {
   8  /******/
   9  /******/         // Check if module is in cache
  10  /******/         if(installedModules[moduleId]) {
  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 = 359);
  86  /******/ })
  87  /************************************************************************/
  88  /******/ ({
  89  
  90  /***/ 0:
  91  /***/ (function(module, exports) {
  92  
  93  (function() { module.exports = this["wp"]["element"]; }());
  94  
  95  /***/ }),
  96  
  97  /***/ 1:
  98  /***/ (function(module, exports) {
  99  
 100  (function() { module.exports = this["wp"]["i18n"]; }());
 101  
 102  /***/ }),
 103  
 104  /***/ 10:
 105  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 106  
 107  "use strict";
 108  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; });
 109  function _classCallCheck(instance, Constructor) {
 110    if (!(instance instanceof Constructor)) {
 111      throw new TypeError("Cannot call a class as a function");
 112    }
 113  }
 114  
 115  /***/ }),
 116  
 117  /***/ 11:
 118  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 119  
 120  "use strict";
 121  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _possibleConstructorReturn; });
 122  /* harmony import */ var _helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(32);
 123  /* harmony import */ var _assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
 124  
 125  
 126  function _possibleConstructorReturn(self, call) {
 127    if (call && (Object(_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(call) === "object" || typeof call === "function")) {
 128      return call;
 129    }
 130  
 131    return Object(_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(self);
 132  }
 133  
 134  /***/ }),
 135  
 136  /***/ 12:
 137  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 138  
 139  "use strict";
 140  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; });
 141  function _getPrototypeOf(o) {
 142    _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
 143      return o.__proto__ || Object.getPrototypeOf(o);
 144    };
 145    return _getPrototypeOf(o);
 146  }
 147  
 148  /***/ }),
 149  
 150  /***/ 13:
 151  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 152  
 153  "use strict";
 154  
 155  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
 156  function _setPrototypeOf(o, p) {
 157    _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
 158      o.__proto__ = p;
 159      return o;
 160    };
 161  
 162    return _setPrototypeOf(o, p);
 163  }
 164  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
 165  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _inherits; });
 166  
 167  function _inherits(subClass, superClass) {
 168    if (typeof superClass !== "function" && superClass !== null) {
 169      throw new TypeError("Super expression must either be null or a function");
 170    }
 171  
 172    subClass.prototype = Object.create(superClass && superClass.prototype, {
 173      constructor: {
 174        value: subClass,
 175        writable: true,
 176        configurable: true
 177      }
 178    });
 179    if (superClass) _setPrototypeOf(subClass, superClass);
 180  }
 181  
 182  /***/ }),
 183  
 184  /***/ 2:
 185  /***/ (function(module, exports) {
 186  
 187  (function() { module.exports = this["lodash"]; }());
 188  
 189  /***/ }),
 190  
 191  /***/ 23:
 192  /***/ (function(module, exports, __webpack_require__) {
 193  
 194  module.exports = __webpack_require__(54);
 195  
 196  
 197  /***/ }),
 198  
 199  /***/ 3:
 200  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 201  
 202  "use strict";
 203  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; });
 204  function _assertThisInitialized(self) {
 205    if (self === void 0) {
 206      throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
 207    }
 208  
 209    return self;
 210  }
 211  
 212  /***/ }),
 213  
 214  /***/ 32:
 215  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 216  
 217  "use strict";
 218  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; });
 219  function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); }
 220  
 221  function _typeof(obj) {
 222    if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") {
 223      _typeof = function _typeof(obj) {
 224        return _typeof2(obj);
 225      };
 226    } else {
 227      _typeof = function _typeof(obj) {
 228        return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
 229      };
 230    }
 231  
 232    return _typeof(obj);
 233  }
 234  
 235  /***/ }),
 236  
 237  /***/ 33:
 238  /***/ (function(module, exports) {
 239  
 240  (function() { module.exports = this["wp"]["apiFetch"]; }());
 241  
 242  /***/ }),
 243  
 244  /***/ 359:
 245  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 246  
 247  "use strict";
 248  __webpack_require__.r(__webpack_exports__);
 249  
 250  // EXTERNAL MODULE: external {"this":["wp","element"]}
 251  var external_this_wp_element_ = __webpack_require__(0);
 252  
 253  // EXTERNAL MODULE: external {"this":["wp","i18n"]}
 254  var external_this_wp_i18n_ = __webpack_require__(1);
 255  
 256  // EXTERNAL MODULE: ./node_modules/@babel/runtime/regenerator/index.js
 257  var regenerator = __webpack_require__(23);
 258  var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
 259  
 260  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
 261  var asyncToGenerator = __webpack_require__(44);
 262  
 263  // EXTERNAL MODULE: external "lodash"
 264  var external_lodash_ = __webpack_require__(2);
 265  
 266  // EXTERNAL MODULE: external {"this":["wp","apiFetch"]}
 267  var external_this_wp_apiFetch_ = __webpack_require__(33);
 268  var external_this_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_apiFetch_);
 269  
 270  // CONCATENATED MODULE: ./node_modules/@wordpress/list-reusable-blocks/build-module/utils/file.js
 271  /**
 272   * Downloads a file.
 273   *
 274   * @param {string} fileName    File Name.
 275   * @param {string} content     File Content.
 276   * @param {string} contentType File mime type.
 277   */
 278  function download(fileName, content, contentType) {
 279    var file = new window.Blob([content], {
 280      type: contentType
 281    }); // IE11 can't use the click to download technique
 282    // we use a specific IE11 technique instead.
 283  
 284    if (window.navigator.msSaveOrOpenBlob) {
 285      window.navigator.msSaveOrOpenBlob(file, fileName);
 286    } else {
 287      var a = document.createElement('a');
 288      a.href = URL.createObjectURL(file);
 289      a.download = fileName;
 290      a.style.display = 'none';
 291      document.body.appendChild(a);
 292      a.click();
 293      document.body.removeChild(a);
 294    }
 295  }
 296  /**
 297   * Reads the textual content of the given file.
 298   *
 299   * @param  {File} file        File.
 300   * @return {Promise<string>}  Content of the file.
 301   */
 302  
 303  function readTextFile(file) {
 304    var reader = new window.FileReader();
 305    return new Promise(function (resolve) {
 306      reader.onload = function () {
 307        resolve(reader.result);
 308      };
 309  
 310      reader.readAsText(file);
 311    });
 312  }
 313  
 314  // CONCATENATED MODULE: ./node_modules/@wordpress/list-reusable-blocks/build-module/utils/export.js
 315  
 316  
 317  
 318  /**
 319   * External dependencies
 320   */
 321  
 322  /**
 323   * WordPress dependencies
 324   */
 325  
 326  
 327  /**
 328   * Internal dependencies
 329   */
 330  
 331  
 332  /**
 333   * Export a reusable block as a JSON file.
 334   *
 335   * @param {number} id
 336   */
 337  
 338  function exportReusableBlock(_x) {
 339    return _exportReusableBlock.apply(this, arguments);
 340  }
 341  
 342  function _exportReusableBlock() {
 343    _exportReusableBlock = Object(asyncToGenerator["a" /* default */])(
 344    /*#__PURE__*/
 345    regenerator_default.a.mark(function _callee(id) {
 346      var postType, post, title, content, fileContent, fileName;
 347      return regenerator_default.a.wrap(function _callee$(_context) {
 348        while (1) {
 349          switch (_context.prev = _context.next) {
 350            case 0:
 351              _context.next = 2;
 352              return external_this_wp_apiFetch_default()({
 353                path: "/wp/v2/types/wp_block"
 354              });
 355  
 356            case 2:
 357              postType = _context.sent;
 358              _context.next = 5;
 359              return external_this_wp_apiFetch_default()({
 360                path: "/wp/v2/".concat(postType.rest_base, "/").concat(id, "?context=edit")
 361              });
 362  
 363            case 5:
 364              post = _context.sent;
 365              title = post.title.raw;
 366              content = post.content.raw;
 367              fileContent = JSON.stringify({
 368                __file: 'wp_block',
 369                title: title,
 370                content: content
 371              }, null, 2);
 372              fileName = Object(external_lodash_["kebabCase"])(title) + '.json';
 373              download(fileName, fileContent, 'application/json');
 374  
 375            case 11:
 376            case "end":
 377              return _context.stop();
 378          }
 379        }
 380      }, _callee, this);
 381    }));
 382    return _exportReusableBlock.apply(this, arguments);
 383  }
 384  
 385  /* harmony default export */ var utils_export = (exportReusableBlock);
 386  
 387  // EXTERNAL MODULE: external {"this":["wp","components"]}
 388  var external_this_wp_components_ = __webpack_require__(4);
 389  
 390  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
 391  var classCallCheck = __webpack_require__(10);
 392  
 393  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
 394  var createClass = __webpack_require__(9);
 395  
 396  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
 397  var possibleConstructorReturn = __webpack_require__(11);
 398  
 399  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
 400  var getPrototypeOf = __webpack_require__(12);
 401  
 402  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules
 403  var inherits = __webpack_require__(13);
 404  
 405  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
 406  var assertThisInitialized = __webpack_require__(3);
 407  
 408  // EXTERNAL MODULE: external {"this":["wp","compose"]}
 409  var external_this_wp_compose_ = __webpack_require__(6);
 410  
 411  // CONCATENATED MODULE: ./node_modules/@wordpress/list-reusable-blocks/build-module/utils/import.js
 412  
 413  
 414  
 415  /**
 416   * External dependencies
 417   */
 418  
 419  /**
 420   * WordPress dependencies
 421   */
 422  
 423  
 424  /**
 425   * Internal dependencies
 426   */
 427  
 428  
 429  /**
 430   * Import a reusable block from a JSON file.
 431   *
 432   * @param {File}     file File.
 433   * @return {Promise} Promise returning the imported reusable block.
 434   */
 435  
 436  function importReusableBlock(_x) {
 437    return _importReusableBlock.apply(this, arguments);
 438  }
 439  
 440  function _importReusableBlock() {
 441    _importReusableBlock = Object(asyncToGenerator["a" /* default */])(
 442    /*#__PURE__*/
 443    regenerator_default.a.mark(function _callee(file) {
 444      var fileContent, parsedContent, postType, reusableBlock;
 445      return regenerator_default.a.wrap(function _callee$(_context) {
 446        while (1) {
 447          switch (_context.prev = _context.next) {
 448            case 0:
 449              _context.next = 2;
 450              return readTextFile(file);
 451  
 452            case 2:
 453              fileContent = _context.sent;
 454              _context.prev = 3;
 455              parsedContent = JSON.parse(fileContent);
 456              _context.next = 10;
 457              break;
 458  
 459            case 7:
 460              _context.prev = 7;
 461              _context.t0 = _context["catch"](3);
 462              throw new Error('Invalid JSON file');
 463  
 464            case 10:
 465              if (!(parsedContent.__file !== 'wp_block' || !parsedContent.title || !parsedContent.content || !Object(external_lodash_["isString"])(parsedContent.title) || !Object(external_lodash_["isString"])(parsedContent.content))) {
 466                _context.next = 12;
 467                break;
 468              }
 469  
 470              throw new Error('Invalid Reusable Block JSON file');
 471  
 472            case 12:
 473              _context.next = 14;
 474              return external_this_wp_apiFetch_default()({
 475                path: "/wp/v2/types/wp_block"
 476              });
 477  
 478            case 14:
 479              postType = _context.sent;
 480              _context.next = 17;
 481              return external_this_wp_apiFetch_default()({
 482                path: "/wp/v2/".concat(postType.rest_base),
 483                data: {
 484                  title: parsedContent.title,
 485                  content: parsedContent.content,
 486                  status: 'publish'
 487                },
 488                method: 'POST'
 489              });
 490  
 491            case 17:
 492              reusableBlock = _context.sent;
 493              return _context.abrupt("return", reusableBlock);
 494  
 495            case 19:
 496            case "end":
 497              return _context.stop();
 498          }
 499        }
 500      }, _callee, this, [[3, 7]]);
 501    }));
 502    return _importReusableBlock.apply(this, arguments);
 503  }
 504  
 505  /* harmony default export */ var utils_import = (importReusableBlock);
 506  
 507  // CONCATENATED MODULE: ./node_modules/@wordpress/list-reusable-blocks/build-module/components/import-form/index.js
 508  
 509  
 510  
 511  
 512  
 513  
 514  
 515  
 516  /**
 517   * WordPress dependencies
 518   */
 519  
 520  
 521  
 522  
 523  /**
 524   * Internal dependencies
 525   */
 526  
 527  
 528  
 529  var import_form_ImportForm =
 530  /*#__PURE__*/
 531  function (_Component) {
 532    Object(inherits["a" /* default */])(ImportForm, _Component);
 533  
 534    function ImportForm() {
 535      var _this;
 536  
 537      Object(classCallCheck["a" /* default */])(this, ImportForm);
 538  
 539      _this = Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(ImportForm).apply(this, arguments));
 540      _this.state = {
 541        isLoading: false,
 542        error: null,
 543        file: null
 544      };
 545      _this.isStillMounted = true;
 546      _this.onChangeFile = _this.onChangeFile.bind(Object(assertThisInitialized["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this)));
 547      _this.onSubmit = _this.onSubmit.bind(Object(assertThisInitialized["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this)));
 548      return _this;
 549    }
 550  
 551    Object(createClass["a" /* default */])(ImportForm, [{
 552      key: "componentWillUnmount",
 553      value: function componentWillUnmount() {
 554        this.isStillMounted = false;
 555      }
 556    }, {
 557      key: "onChangeFile",
 558      value: function onChangeFile(event) {
 559        this.setState({
 560          file: event.target.files[0]
 561        });
 562      }
 563    }, {
 564      key: "onSubmit",
 565      value: function onSubmit(event) {
 566        var _this2 = this;
 567  
 568        event.preventDefault();
 569        var file = this.state.file;
 570        var onUpload = this.props.onUpload;
 571  
 572        if (!file) {
 573          return;
 574        }
 575  
 576        this.setState({
 577          isLoading: true
 578        });
 579        utils_import(file).then(function (reusableBlock) {
 580          if (!_this2.isStillMounted) {
 581            return;
 582          }
 583  
 584          _this2.setState({
 585            isLoading: false
 586          });
 587  
 588          onUpload(reusableBlock);
 589        }).catch(function (error) {
 590          if (!_this2.isStillMounted) {
 591            return;
 592          }
 593  
 594          var uiMessage;
 595  
 596          switch (error.message) {
 597            case 'Invalid JSON file':
 598              uiMessage = Object(external_this_wp_i18n_["__"])('Invalid JSON file');
 599              break;
 600  
 601            case 'Invalid Reusable Block JSON file':
 602              uiMessage = Object(external_this_wp_i18n_["__"])('Invalid Reusable Block JSON file');
 603              break;
 604  
 605            default:
 606              uiMessage = Object(external_this_wp_i18n_["__"])('Unknown error');
 607          }
 608  
 609          _this2.setState({
 610            isLoading: false,
 611            error: uiMessage
 612          });
 613        });
 614      }
 615    }, {
 616      key: "render",
 617      value: function render() {
 618        var instanceId = this.props.instanceId;
 619        var _this$state = this.state,
 620            file = _this$state.file,
 621            isLoading = _this$state.isLoading,
 622            error = _this$state.error;
 623        var inputId = 'list-reusable-blocks-import-form-' + instanceId;
 624        return Object(external_this_wp_element_["createElement"])("form", {
 625          className: "list-reusable-blocks-import-form",
 626          onSubmit: this.onSubmit
 627        }, error && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Notice"], {
 628          status: "error"
 629        }, error), Object(external_this_wp_element_["createElement"])("label", {
 630          htmlFor: inputId,
 631          className: "list-reusable-blocks-import-form__label"
 632        }, Object(external_this_wp_i18n_["__"])('File')), Object(external_this_wp_element_["createElement"])("input", {
 633          id: inputId,
 634          type: "file",
 635          onChange: this.onChangeFile
 636        }), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
 637          type: "submit",
 638          isBusy: isLoading,
 639          disabled: !file || isLoading,
 640          isDefault: true,
 641          className: "list-reusable-blocks-import-form__button"
 642        }, Object(external_this_wp_i18n_["_x"])('Import', 'button label')));
 643      }
 644    }]);
 645  
 646    return ImportForm;
 647  }(external_this_wp_element_["Component"]);
 648  
 649  /* harmony default export */ var import_form = (Object(external_this_wp_compose_["withInstanceId"])(import_form_ImportForm));
 650  
 651  // CONCATENATED MODULE: ./node_modules/@wordpress/list-reusable-blocks/build-module/components/import-dropdown/index.js
 652  
 653  
 654  /**
 655   * External dependencies
 656   */
 657  
 658  /**
 659   * WordPress dependencies
 660   */
 661  
 662  
 663  
 664  /**
 665   * Internal dependencies
 666   */
 667  
 668  
 669  
 670  function ImportDropdown(_ref) {
 671    var onUpload = _ref.onUpload;
 672    return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Dropdown"], {
 673      position: "bottom right",
 674      contentClassName: "list-reusable-blocks-import-dropdown__content",
 675      renderToggle: function renderToggle(_ref2) {
 676        var isOpen = _ref2.isOpen,
 677            onToggle = _ref2.onToggle;
 678        return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
 679          type: "button",
 680          "aria-expanded": isOpen,
 681          onClick: onToggle,
 682          isPrimary: true
 683        }, Object(external_this_wp_i18n_["__"])('Import from JSON'));
 684      },
 685      renderContent: function renderContent(_ref3) {
 686        var onClose = _ref3.onClose;
 687        return Object(external_this_wp_element_["createElement"])(import_form, {
 688          onUpload: Object(external_lodash_["flow"])(onClose, onUpload)
 689        });
 690      }
 691    });
 692  }
 693  
 694  /* harmony default export */ var import_dropdown = (ImportDropdown);
 695  
 696  // CONCATENATED MODULE: ./node_modules/@wordpress/list-reusable-blocks/build-module/index.js
 697  
 698  
 699  /**
 700   * WordPress dependencies
 701   */
 702  
 703  
 704  /**
 705   * Internal dependencies
 706   */
 707  
 708  
 709   // Setup Export Links
 710  
 711  document.body.addEventListener('click', function (event) {
 712    if (!event.target.classList.contains('wp-list-reusable-blocks__export')) {
 713      return;
 714    }
 715  
 716    event.preventDefault();
 717    utils_export(event.target.dataset.id);
 718  }); // Setup Import Form
 719  
 720  document.addEventListener('DOMContentLoaded', function () {
 721    var button = document.querySelector('.page-title-action');
 722  
 723    if (!button) {
 724      return;
 725    }
 726  
 727    var showNotice = function showNotice() {
 728      var notice = document.createElement('div');
 729      notice.className = 'notice notice-success is-dismissible';
 730      notice.innerHTML = "<p>".concat(Object(external_this_wp_i18n_["__"])('Reusable block imported successfully!'), "</p>");
 731      var headerEnd = document.querySelector('.wp-header-end');
 732  
 733      if (!headerEnd) {
 734        return;
 735      }
 736  
 737      headerEnd.parentNode.insertBefore(notice, headerEnd);
 738    };
 739  
 740    var container = document.createElement('div');
 741    container.className = 'list-reusable-blocks__container';
 742    button.parentNode.insertBefore(container, button);
 743    Object(external_this_wp_element_["render"])(Object(external_this_wp_element_["createElement"])(import_dropdown, {
 744      onUpload: showNotice
 745    }), container);
 746  });
 747  
 748  
 749  /***/ }),
 750  
 751  /***/ 4:
 752  /***/ (function(module, exports) {
 753  
 754  (function() { module.exports = this["wp"]["components"]; }());
 755  
 756  /***/ }),
 757  
 758  /***/ 44:
 759  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 760  
 761  "use strict";
 762  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _asyncToGenerator; });
 763  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
 764    try {
 765      var info = gen[key](arg);
 766      var value = info.value;
 767    } catch (error) {
 768      reject(error);
 769      return;
 770    }
 771  
 772    if (info.done) {
 773      resolve(value);
 774    } else {
 775      Promise.resolve(value).then(_next, _throw);
 776    }
 777  }
 778  
 779  function _asyncToGenerator(fn) {
 780    return function () {
 781      var self = this,
 782          args = arguments;
 783      return new Promise(function (resolve, reject) {
 784        var gen = fn.apply(self, args);
 785  
 786        function _next(value) {
 787          asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
 788        }
 789  
 790        function _throw(err) {
 791          asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
 792        }
 793  
 794        _next(undefined);
 795      });
 796    };
 797  }
 798  
 799  /***/ }),
 800  
 801  /***/ 54:
 802  /***/ (function(module, exports, __webpack_require__) {
 803  
 804  /**
 805   * Copyright (c) 2014-present, Facebook, Inc.
 806   *
 807   * This source code is licensed under the MIT license found in the
 808   * LICENSE file in the root directory of this source tree.
 809   */
 810  
 811  var runtime = (function (exports) {
 812    "use strict";
 813  
 814    var Op = Object.prototype;
 815    var hasOwn = Op.hasOwnProperty;
 816    var undefined; // More compressible than void 0.
 817    var $Symbol = typeof Symbol === "function" ? Symbol : {};
 818    var iteratorSymbol = $Symbol.iterator || "@@iterator";
 819    var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
 820    var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
 821  
 822    function wrap(innerFn, outerFn, self, tryLocsList) {
 823      // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
 824      var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
 825      var generator = Object.create(protoGenerator.prototype);
 826      var context = new Context(tryLocsList || []);
 827  
 828      // The ._invoke method unifies the implementations of the .next,
 829      // .throw, and .return methods.
 830      generator._invoke = makeInvokeMethod(innerFn, self, context);
 831  
 832      return generator;
 833    }
 834    exports.wrap = wrap;
 835  
 836    // Try/catch helper to minimize deoptimizations. Returns a completion
 837    // record like context.tryEntries[i].completion. This interface could
 838    // have been (and was previously) designed to take a closure to be
 839    // invoked without arguments, but in all the cases we care about we
 840    // already have an existing method we want to call, so there's no need
 841    // to create a new function object. We can even get away with assuming
 842    // the method takes exactly one argument, since that happens to be true
 843    // in every case, so we don't have to touch the arguments object. The
 844    // only additional allocation required is the completion record, which
 845    // has a stable shape and so hopefully should be cheap to allocate.
 846    function tryCatch(fn, obj, arg) {
 847      try {
 848        return { type: "normal", arg: fn.call(obj, arg) };
 849      } catch (err) {
 850        return { type: "throw", arg: err };
 851      }
 852    }
 853  
 854    var GenStateSuspendedStart = "suspendedStart";
 855    var GenStateSuspendedYield = "suspendedYield";
 856    var GenStateExecuting = "executing";
 857    var GenStateCompleted = "completed";
 858  
 859    // Returning this object from the innerFn has the same effect as
 860    // breaking out of the dispatch switch statement.
 861    var ContinueSentinel = {};
 862  
 863    // Dummy constructor functions that we use as the .constructor and
 864    // .constructor.prototype properties for functions that return Generator
 865    // objects. For full spec compliance, you may wish to configure your
 866    // minifier not to mangle the names of these two functions.
 867    function Generator() {}
 868    function GeneratorFunction() {}
 869    function GeneratorFunctionPrototype() {}
 870  
 871    // This is a polyfill for %IteratorPrototype% for environments that
 872    // don't natively support it.
 873    var IteratorPrototype = {};
 874    IteratorPrototype[iteratorSymbol] = function () {
 875      return this;
 876    };
 877  
 878    var getProto = Object.getPrototypeOf;
 879    var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
 880    if (NativeIteratorPrototype &&
 881        NativeIteratorPrototype !== Op &&
 882        hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
 883      // This environment has a native %IteratorPrototype%; use it instead
 884      // of the polyfill.
 885      IteratorPrototype = NativeIteratorPrototype;
 886    }
 887  
 888    var Gp = GeneratorFunctionPrototype.prototype =
 889      Generator.prototype = Object.create(IteratorPrototype);
 890    GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
 891    GeneratorFunctionPrototype.constructor = GeneratorFunction;
 892    GeneratorFunctionPrototype[toStringTagSymbol] =
 893      GeneratorFunction.displayName = "GeneratorFunction";
 894  
 895    // Helper for defining the .next, .throw, and .return methods of the
 896    // Iterator interface in terms of a single ._invoke method.
 897    function defineIteratorMethods(prototype) {
 898      ["next", "throw", "return"].forEach(function(method) {
 899        prototype[method] = function(arg) {
 900          return this._invoke(method, arg);
 901        };
 902      });
 903    }
 904  
 905    exports.isGeneratorFunction = function(genFun) {
 906      var ctor = typeof genFun === "function" && genFun.constructor;
 907      return ctor
 908        ? ctor === GeneratorFunction ||
 909          // For the native GeneratorFunction constructor, the best we can
 910          // do is to check its .name property.
 911          (ctor.displayName || ctor.name) === "GeneratorFunction"
 912        : false;
 913    };
 914  
 915    exports.mark = function(genFun) {
 916      if (Object.setPrototypeOf) {
 917        Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
 918      } else {
 919        genFun.__proto__ = GeneratorFunctionPrototype;
 920        if (!(toStringTagSymbol in genFun)) {
 921          genFun[toStringTagSymbol] = "GeneratorFunction";
 922        }
 923      }
 924      genFun.prototype = Object.create(Gp);
 925      return genFun;
 926    };
 927  
 928    // Within the body of any async function, `await x` is transformed to
 929    // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
 930    // `hasOwn.call(value, "__await")` to determine if the yielded value is
 931    // meant to be awaited.
 932    exports.awrap = function(arg) {
 933      return { __await: arg };
 934    };
 935  
 936    function AsyncIterator(generator) {
 937      function invoke(method, arg, resolve, reject) {
 938        var record = tryCatch(generator[method], generator, arg);
 939        if (record.type === "throw") {
 940          reject(record.arg);
 941        } else {
 942          var result = record.arg;
 943          var value = result.value;
 944          if (value &&
 945              typeof value === "object" &&
 946              hasOwn.call(value, "__await")) {
 947            return Promise.resolve(value.__await).then(function(value) {
 948              invoke("next", value, resolve, reject);
 949            }, function(err) {
 950              invoke("throw", err, resolve, reject);
 951            });
 952          }
 953  
 954          return Promise.resolve(value).then(function(unwrapped) {
 955            // When a yielded Promise is resolved, its final value becomes
 956            // the .value of the Promise<{value,done}> result for the
 957            // current iteration.
 958            result.value = unwrapped;
 959            resolve(result);
 960          }, function(error) {
 961            // If a rejected Promise was yielded, throw the rejection back
 962            // into the async generator function so it can be handled there.
 963            return invoke("throw", error, resolve, reject);
 964          });
 965        }
 966      }
 967  
 968      var previousPromise;
 969  
 970      function enqueue(method, arg) {
 971        function callInvokeWithMethodAndArg() {
 972          return new Promise(function(resolve, reject) {
 973            invoke(method, arg, resolve, reject);
 974          });
 975        }
 976  
 977        return previousPromise =
 978          // If enqueue has been called before, then we want to wait until
 979          // all previous Promises have been resolved before calling invoke,
 980          // so that results are always delivered in the correct order. If
 981          // enqueue has not been called before, then it is important to
 982          // call invoke immediately, without waiting on a callback to fire,
 983          // so that the async generator function has the opportunity to do
 984          // any necessary setup in a predictable way. This predictability
 985          // is why the Promise constructor synchronously invokes its
 986          // executor callback, and why async functions synchronously
 987          // execute code before the first await. Since we implement simple
 988          // async functions in terms of async generators, it is especially
 989          // important to get this right, even though it requires care.
 990          previousPromise ? previousPromise.then(
 991            callInvokeWithMethodAndArg,
 992            // Avoid propagating failures to Promises returned by later
 993            // invocations of the iterator.
 994            callInvokeWithMethodAndArg
 995          ) : callInvokeWithMethodAndArg();
 996      }
 997  
 998      // Define the unified helper method that is used to implement .next,
 999      // .throw, and .return (see defineIteratorMethods).
1000      this._invoke = enqueue;
1001    }
1002  
1003    defineIteratorMethods(AsyncIterator.prototype);
1004    AsyncIterator.prototype[asyncIteratorSymbol] = function () {
1005      return this;
1006    };
1007    exports.AsyncIterator = AsyncIterator;
1008  
1009    // Note that simple async functions are implemented on top of
1010    // AsyncIterator objects; they just return a Promise for the value of
1011    // the final result produced by the iterator.
1012    exports.async = function(innerFn, outerFn, self, tryLocsList) {
1013      var iter = new AsyncIterator(
1014        wrap(innerFn, outerFn, self, tryLocsList)
1015      );
1016  
1017      return exports.isGeneratorFunction(outerFn)
1018        ? iter // If outerFn is a generator, return the full iterator.
1019        : iter.next().then(function(result) {
1020            return result.done ? result.value : iter.next();
1021          });
1022    };
1023  
1024    function makeInvokeMethod(innerFn, self, context) {
1025      var state = GenStateSuspendedStart;
1026  
1027      return function invoke(method, arg) {
1028        if (state === GenStateExecuting) {
1029          throw new Error("Generator is already running");
1030        }
1031  
1032        if (state === GenStateCompleted) {
1033          if (method === "throw") {
1034            throw arg;
1035          }
1036  
1037          // Be forgiving, per 25.3.3.3.3 of the spec:
1038          // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
1039          return doneResult();
1040        }
1041  
1042        context.method = method;
1043        context.arg = arg;
1044  
1045        while (true) {
1046          var delegate = context.delegate;
1047          if (delegate) {
1048            var delegateResult = maybeInvokeDelegate(delegate, context);
1049            if (delegateResult) {
1050              if (delegateResult === ContinueSentinel) continue;
1051              return delegateResult;
1052            }
1053          }
1054  
1055          if (context.method === "next") {
1056            // Setting context._sent for legacy support of Babel's
1057            // function.sent implementation.
1058            context.sent = context._sent = context.arg;
1059  
1060          } else if (context.method === "throw") {
1061            if (state === GenStateSuspendedStart) {
1062              state = GenStateCompleted;
1063              throw context.arg;
1064            }
1065  
1066            context.dispatchException(context.arg);
1067  
1068          } else if (context.method === "return") {
1069            context.abrupt("return", context.arg);
1070          }
1071  
1072          state = GenStateExecuting;
1073  
1074          var record = tryCatch(innerFn, self, context);
1075          if (record.type === "normal") {
1076            // If an exception is thrown from innerFn, we leave state ===
1077            // GenStateExecuting and loop back for another invocation.
1078            state = context.done
1079              ? GenStateCompleted
1080              : GenStateSuspendedYield;
1081  
1082            if (record.arg === ContinueSentinel) {
1083              continue;
1084            }
1085  
1086            return {
1087              value: record.arg,
1088              done: context.done
1089            };
1090  
1091          } else if (record.type === "throw") {
1092            state = GenStateCompleted;
1093            // Dispatch the exception by looping back around to the
1094            // context.dispatchException(context.arg) call above.
1095            context.method = "throw";
1096            context.arg = record.arg;
1097          }
1098        }
1099      };
1100    }
1101  
1102    // Call delegate.iterator[context.method](context.arg) and handle the
1103    // result, either by returning a { value, done } result from the
1104    // delegate iterator, or by modifying context.method and context.arg,
1105    // setting context.delegate to null, and returning the ContinueSentinel.
1106    function maybeInvokeDelegate(delegate, context) {
1107      var method = delegate.iterator[context.method];
1108      if (method === undefined) {
1109        // A .throw or .return when the delegate iterator has no .throw
1110        // method always terminates the yield* loop.
1111        context.delegate = null;
1112  
1113        if (context.method === "throw") {
1114          // Note: ["return"] must be used for ES3 parsing compatibility.
1115          if (delegate.iterator["return"]) {
1116            // If the delegate iterator has a return method, give it a
1117            // chance to clean up.
1118            context.method = "return";
1119            context.arg = undefined;
1120            maybeInvokeDelegate(delegate, context);
1121  
1122            if (context.method === "throw") {
1123              // If maybeInvokeDelegate(context) changed context.method from
1124              // "return" to "throw", let that override the TypeError below.
1125              return ContinueSentinel;
1126            }
1127          }
1128  
1129          context.method = "throw";
1130          context.arg = new TypeError(
1131            "The iterator does not provide a 'throw' method");
1132        }
1133  
1134        return ContinueSentinel;
1135      }
1136  
1137      var record = tryCatch(method, delegate.iterator, context.arg);
1138  
1139      if (record.type === "throw") {
1140        context.method = "throw";
1141        context.arg = record.arg;
1142        context.delegate = null;
1143        return ContinueSentinel;
1144      }
1145  
1146      var info = record.arg;
1147  
1148      if (! info) {
1149        context.method = "throw";
1150        context.arg = new TypeError("iterator result is not an object");
1151        context.delegate = null;
1152        return ContinueSentinel;
1153      }
1154  
1155      if (info.done) {
1156        // Assign the result of the finished delegate to the temporary
1157        // variable specified by delegate.resultName (see delegateYield).
1158        context[delegate.resultName] = info.value;
1159  
1160        // Resume execution at the desired location (see delegateYield).
1161        context.next = delegate.nextLoc;
1162  
1163        // If context.method was "throw" but the delegate handled the
1164        // exception, let the outer generator proceed normally. If
1165        // context.method was "next", forget context.arg since it has been
1166        // "consumed" by the delegate iterator. If context.method was
1167        // "return", allow the original .return call to continue in the
1168        // outer generator.
1169        if (context.method !== "return") {
1170          context.method = "next";
1171          context.arg = undefined;
1172        }
1173  
1174      } else {
1175        // Re-yield the result returned by the delegate method.
1176        return info;
1177      }
1178  
1179      // The delegate iterator is finished, so forget it and continue with
1180      // the outer generator.
1181      context.delegate = null;
1182      return ContinueSentinel;
1183    }
1184  
1185    // Define Generator.prototype.{next,throw,return} in terms of the
1186    // unified ._invoke helper method.
1187    defineIteratorMethods(Gp);
1188  
1189    Gp[toStringTagSymbol] = "Generator";
1190  
1191    // A Generator should always return itself as the iterator object when the
1192    // @@iterator function is called on it. Some browsers' implementations of the
1193    // iterator prototype chain incorrectly implement this, causing the Generator
1194    // object to not be returned from this call. This ensures that doesn't happen.
1195    // See https://github.com/facebook/regenerator/issues/274 for more details.
1196    Gp[iteratorSymbol] = function() {
1197      return this;
1198    };
1199  
1200    Gp.toString = function() {
1201      return "[object Generator]";
1202    };
1203  
1204    function pushTryEntry(locs) {
1205      var entry = { tryLoc: locs[0] };
1206  
1207      if (1 in locs) {
1208        entry.catchLoc = locs[1];
1209      }
1210  
1211      if (2 in locs) {
1212        entry.finallyLoc = locs[2];
1213        entry.afterLoc = locs[3];
1214      }
1215  
1216      this.tryEntries.push(entry);
1217    }
1218  
1219    function resetTryEntry(entry) {
1220      var record = entry.completion || {};
1221      record.type = "normal";
1222      delete record.arg;
1223      entry.completion = record;
1224    }
1225  
1226    function Context(tryLocsList) {
1227      // The root entry object (effectively a try statement without a catch
1228      // or a finally block) gives us a place to store values thrown from
1229      // locations where there is no enclosing try statement.
1230      this.tryEntries = [{ tryLoc: "root" }];
1231      tryLocsList.forEach(pushTryEntry, this);
1232      this.reset(true);
1233    }
1234  
1235    exports.keys = function(object) {
1236      var keys = [];
1237      for (var key in object) {
1238        keys.push(key);
1239      }
1240      keys.reverse();
1241  
1242      // Rather than returning an object with a next method, we keep
1243      // things simple and return the next function itself.
1244      return function next() {
1245        while (keys.length) {
1246          var key = keys.pop();
1247          if (key in object) {
1248            next.value = key;
1249            next.done = false;
1250            return next;
1251          }
1252        }
1253  
1254        // To avoid creating an additional object, we just hang the .value
1255        // and .done properties off the next function object itself. This
1256        // also ensures that the minifier will not anonymize the function.
1257        next.done = true;
1258        return next;
1259      };
1260    };
1261  
1262    function values(iterable) {
1263      if (iterable) {
1264        var iteratorMethod = iterable[iteratorSymbol];
1265        if (iteratorMethod) {
1266          return iteratorMethod.call(iterable);
1267        }
1268  
1269        if (typeof iterable.next === "function") {
1270          return iterable;
1271        }
1272  
1273        if (!isNaN(iterable.length)) {
1274          var i = -1, next = function next() {
1275            while (++i < iterable.length) {
1276              if (hasOwn.call(iterable, i)) {
1277                next.value = iterable[i];
1278                next.done = false;
1279                return next;
1280              }
1281            }
1282  
1283            next.value = undefined;
1284            next.done = true;
1285  
1286            return next;
1287          };
1288  
1289          return next.next = next;
1290        }
1291      }
1292  
1293      // Return an iterator with no values.
1294      return { next: doneResult };
1295    }
1296    exports.values = values;
1297  
1298    function doneResult() {
1299      return { value: undefined, done: true };
1300    }
1301  
1302    Context.prototype = {
1303      constructor: Context,
1304  
1305      reset: function(skipTempReset) {
1306        this.prev = 0;
1307        this.next = 0;
1308        // Resetting context._sent for legacy support of Babel's
1309        // function.sent implementation.
1310        this.sent = this._sent = undefined;
1311        this.done = false;
1312        this.delegate = null;
1313  
1314        this.method = "next";
1315        this.arg = undefined;
1316  
1317        this.tryEntries.forEach(resetTryEntry);
1318  
1319        if (!skipTempReset) {
1320          for (var name in this) {
1321            // Not sure about the optimal order of these conditions:
1322            if (name.charAt(0) === "t" &&
1323                hasOwn.call(this, name) &&
1324                !isNaN(+name.slice(1))) {
1325              this[name] = undefined;
1326            }
1327          }
1328        }
1329      },
1330  
1331      stop: function() {
1332        this.done = true;
1333  
1334        var rootEntry = this.tryEntries[0];
1335        var rootRecord = rootEntry.completion;
1336        if (rootRecord.type === "throw") {
1337          throw rootRecord.arg;
1338        }
1339  
1340        return this.rval;
1341      },
1342  
1343      dispatchException: function(exception) {
1344        if (this.done) {
1345          throw exception;
1346        }
1347  
1348        var context = this;
1349        function handle(loc, caught) {
1350          record.type = "throw";
1351          record.arg = exception;
1352          context.next = loc;
1353  
1354          if (caught) {
1355            // If the dispatched exception was caught by a catch block,
1356            // then let that catch block handle the exception normally.
1357            context.method = "next";
1358            context.arg = undefined;
1359          }
1360  
1361          return !! caught;
1362        }
1363  
1364        for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1365          var entry = this.tryEntries[i];
1366          var record = entry.completion;
1367  
1368          if (entry.tryLoc === "root") {
1369            // Exception thrown outside of any try block that could handle
1370            // it, so set the completion value of the entire function to
1371            // throw the exception.
1372            return handle("end");
1373          }
1374  
1375          if (entry.tryLoc <= this.prev) {
1376            var hasCatch = hasOwn.call(entry, "catchLoc");
1377            var hasFinally = hasOwn.call(entry, "finallyLoc");
1378  
1379            if (hasCatch && hasFinally) {
1380              if (this.prev < entry.catchLoc) {
1381                return handle(entry.catchLoc, true);
1382              } else if (this.prev < entry.finallyLoc) {
1383                return handle(entry.finallyLoc);
1384              }
1385  
1386            } else if (hasCatch) {
1387              if (this.prev < entry.catchLoc) {
1388                return handle(entry.catchLoc, true);
1389              }
1390  
1391            } else if (hasFinally) {
1392              if (this.prev < entry.finallyLoc) {
1393                return handle(entry.finallyLoc);
1394              }
1395  
1396            } else {
1397              throw new Error("try statement without catch or finally");
1398            }
1399          }
1400        }
1401      },
1402  
1403      abrupt: function(type, arg) {
1404        for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1405          var entry = this.tryEntries[i];
1406          if (entry.tryLoc <= this.prev &&
1407              hasOwn.call(entry, "finallyLoc") &&
1408              this.prev < entry.finallyLoc) {
1409            var finallyEntry = entry;
1410            break;
1411          }
1412        }
1413  
1414        if (finallyEntry &&
1415            (type === "break" ||
1416             type === "continue") &&
1417            finallyEntry.tryLoc <= arg &&
1418            arg <= finallyEntry.finallyLoc) {
1419          // Ignore the finally entry if control is not jumping to a
1420          // location outside the try/catch block.
1421          finallyEntry = null;
1422        }
1423  
1424        var record = finallyEntry ? finallyEntry.completion : {};
1425        record.type = type;
1426        record.arg = arg;
1427  
1428        if (finallyEntry) {
1429          this.method = "next";
1430          this.next = finallyEntry.finallyLoc;
1431          return ContinueSentinel;
1432        }
1433  
1434        return this.complete(record);
1435      },
1436  
1437      complete: function(record, afterLoc) {
1438        if (record.type === "throw") {
1439          throw record.arg;
1440        }
1441  
1442        if (record.type === "break" ||
1443            record.type === "continue") {
1444          this.next = record.arg;
1445        } else if (record.type === "return") {
1446          this.rval = this.arg = record.arg;
1447          this.method = "return";
1448          this.next = "end";
1449        } else if (record.type === "normal" && afterLoc) {
1450          this.next = afterLoc;
1451        }
1452  
1453        return ContinueSentinel;
1454      },
1455  
1456      finish: function(finallyLoc) {
1457        for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1458          var entry = this.tryEntries[i];
1459          if (entry.finallyLoc === finallyLoc) {
1460            this.complete(entry.completion, entry.afterLoc);
1461            resetTryEntry(entry);
1462            return ContinueSentinel;
1463          }
1464        }
1465      },
1466  
1467      "catch": function(tryLoc) {
1468        for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1469          var entry = this.tryEntries[i];
1470          if (entry.tryLoc === tryLoc) {
1471            var record = entry.completion;
1472            if (record.type === "throw") {
1473              var thrown = record.arg;
1474              resetTryEntry(entry);
1475            }
1476            return thrown;
1477          }
1478        }
1479  
1480        // The context.catch method must only be called with a location
1481        // argument that corresponds to a known catch block.
1482        throw new Error("illegal catch attempt");
1483      },
1484  
1485      delegateYield: function(iterable, resultName, nextLoc) {
1486        this.delegate = {
1487          iterator: values(iterable),
1488          resultName: resultName,
1489          nextLoc: nextLoc
1490        };
1491  
1492        if (this.method === "next") {
1493          // Deliberately forget the last sent value so that we don't
1494          // accidentally pass it on to the delegate.
1495          this.arg = undefined;
1496        }
1497  
1498        return ContinueSentinel;
1499      }
1500    };
1501  
1502    // Regardless of whether this script is executing as a CommonJS module
1503    // or not, return the runtime object so that we can declare the variable
1504    // regeneratorRuntime in the outer scope, which allows this module to be
1505    // injected easily by `bin/regenerator --include-runtime script.js`.
1506    return exports;
1507  
1508  }(
1509    // If this script is executing as a CommonJS module, use module.exports
1510    // as the regeneratorRuntime namespace. Otherwise create a new empty
1511    // object. Either way, the resulting object will be used to initialize
1512    // the regeneratorRuntime variable at the top of this file.
1513     true ? module.exports : undefined
1514  ));
1515  
1516  try {
1517    regeneratorRuntime = runtime;
1518  } catch (accidentalStrictMode) {
1519    // This module should not be running in strict mode, so the above
1520    // assignment should always work unless something is misconfigured. Just
1521    // in case runtime.js accidentally runs in strict mode, we can escape
1522    // strict mode using a global Function call. This could conceivably fail
1523    // if a Content Security Policy forbids using Function, but in that case
1524    // the proper solution is to fix the accidental strict mode problem. If
1525    // you've misconfigured your bundler to force strict mode and applied a
1526    // CSP to forbid Function, and you're not willing to fix either of those
1527    // problems, please detail your unique predicament in a GitHub issue.
1528    Function("r", "regeneratorRuntime = r")(runtime);
1529  }
1530  
1531  
1532  /***/ }),
1533  
1534  /***/ 6:
1535  /***/ (function(module, exports) {
1536  
1537  (function() { module.exports = this["wp"]["compose"]; }());
1538  
1539  /***/ }),
1540  
1541  /***/ 9:
1542  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1543  
1544  "use strict";
1545  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; });
1546  function _defineProperties(target, props) {
1547    for (var i = 0; i < props.length; i++) {
1548      var descriptor = props[i];
1549      descriptor.enumerable = descriptor.enumerable || false;
1550      descriptor.configurable = true;
1551      if ("value" in descriptor) descriptor.writable = true;
1552      Object.defineProperty(target, descriptor.key, descriptor);
1553    }
1554  }
1555  
1556  function _createClass(Constructor, protoProps, staticProps) {
1557    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
1558    if (staticProps) _defineProperties(Constructor, staticProps);
1559    return Constructor;
1560  }
1561  
1562  /***/ })
1563  
1564  /******/ });


Generated: Wed Sep 18 01:00:03 2019 Cross-referenced by PHPXref 0.7.1