[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/js/dist/ -> editor.js (source)

   1  this["wp"] = this["wp"] || {}; this["wp"]["editor"] =
   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 = 436);
  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 _assertThisInitialized; });
 109  function _assertThisInitialized(self) {
 110    if (self === void 0) {
 111      throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
 112    }
 113  
 114    return self;
 115  }
 116  
 117  /***/ }),
 118  
 119  /***/ 103:
 120  /***/ (function(module, exports, __webpack_require__) {
 121  
 122  "use strict";
 123  
 124  
 125  function flattenIntoMap( map, effects ) {
 126      var i;
 127      if ( Array.isArray( effects ) ) {
 128          for ( i = 0; i < effects.length; i++ ) {
 129              flattenIntoMap( map, effects[ i ] );
 130          }
 131      } else {
 132          for ( i in effects ) {
 133              map[ i ] = ( map[ i ] || [] ).concat( effects[ i ] );
 134          }
 135      }
 136  }
 137  
 138  function refx( effects ) {
 139      var map = {},
 140          middleware;
 141  
 142      flattenIntoMap( map, effects );
 143  
 144      middleware = function( store ) {
 145          return function( next ) {
 146              return function( action ) {
 147                  var handlers = map[ action.type ],
 148                      result = next( action ),
 149                      i, handlerAction;
 150  
 151                  if ( handlers ) {
 152                      for ( i = 0; i < handlers.length; i++ ) {
 153                          handlerAction = handlers[ i ]( action, store );
 154                          if ( handlerAction ) {
 155                              store.dispatch( handlerAction );
 156                          }
 157                      }
 158                  }
 159  
 160                  return result;
 161              };
 162          };
 163      };
 164  
 165      middleware.effects = map;
 166  
 167      return middleware;
 168  }
 169  
 170  module.exports = refx;
 171  
 172  
 173  /***/ }),
 174  
 175  /***/ 11:
 176  /***/ (function(module, exports, __webpack_require__) {
 177  
 178  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
 179    Copyright (c) 2017 Jed Watson.
 180    Licensed under the MIT License (MIT), see
 181    http://jedwatson.github.io/classnames
 182  */
 183  /* global define */
 184  
 185  (function () {
 186      'use strict';
 187  
 188      var hasOwn = {}.hasOwnProperty;
 189  
 190  	function classNames () {
 191          var classes = [];
 192  
 193          for (var i = 0; i < arguments.length; i++) {
 194              var arg = arguments[i];
 195              if (!arg) continue;
 196  
 197              var argType = typeof arg;
 198  
 199              if (argType === 'string' || argType === 'number') {
 200                  classes.push(arg);
 201              } else if (Array.isArray(arg) && arg.length) {
 202                  var inner = classNames.apply(null, arg);
 203                  if (inner) {
 204                      classes.push(inner);
 205                  }
 206              } else if (argType === 'object') {
 207                  for (var key in arg) {
 208                      if (hasOwn.call(arg, key) && arg[key]) {
 209                          classes.push(key);
 210                      }
 211                  }
 212              }
 213          }
 214  
 215          return classes.join(' ');
 216      }
 217  
 218      if ( true && module.exports) {
 219          classNames.default = classNames;
 220          module.exports = classNames;
 221      } else if (true) {
 222          // register as 'classnames', consistent with npm package name
 223          !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
 224              return classNames;
 225          }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
 226                  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
 227      } else {}
 228  }());
 229  
 230  
 231  /***/ }),
 232  
 233  /***/ 12:
 234  /***/ (function(module, exports) {
 235  
 236  (function() { module.exports = this["wp"]["blocks"]; }());
 237  
 238  /***/ }),
 239  
 240  /***/ 129:
 241  /***/ (function(module, exports, __webpack_require__) {
 242  
 243  module.exports = __webpack_require__(419);
 244  
 245  
 246  /***/ }),
 247  
 248  /***/ 13:
 249  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 250  
 251  "use strict";
 252  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; });
 253  function _getPrototypeOf(o) {
 254    _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
 255      return o.__proto__ || Object.getPrototypeOf(o);
 256    };
 257    return _getPrototypeOf(o);
 258  }
 259  
 260  /***/ }),
 261  
 262  /***/ 130:
 263  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 264  
 265  "use strict";
 266  /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
 267  /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14);
 268  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0);
 269  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);
 270  
 271  
 272  
 273  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
 274  
 275  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
 276  
 277  /**
 278   * WordPress dependencies
 279   */
 280   // Disable reason: JSDoc linter doesn't seem to parse the union (`&`) correctly.
 281  
 282  /* eslint-disable jsdoc/valid-types */
 283  
 284  /** @typedef {{icon: JSX.Element, size?: number} & import('react').ComponentPropsWithoutRef<'SVG'>} IconProps */
 285  
 286  /* eslint-enable jsdoc/valid-types */
 287  
 288  /**
 289   * Return an SVG icon.
 290   *
 291   * @param {IconProps} props icon is the SVG component to render
 292   *                          size is a number specifiying the icon size in pixels
 293   *                          Other props will be passed to wrapped SVG component
 294   *
 295   * @return {JSX.Element}  Icon component
 296   */
 297  
 298  function Icon(_ref) {
 299    var icon = _ref.icon,
 300        _ref$size = _ref.size,
 301        size = _ref$size === void 0 ? 24 : _ref$size,
 302        props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_ref, ["icon", "size"]);
 303  
 304    return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["cloneElement"])(icon, _objectSpread({
 305      width: size,
 306      height: size
 307    }, props));
 308  }
 309  
 310  /* harmony default export */ __webpack_exports__["a"] = (Icon);
 311  
 312  
 313  /***/ }),
 314  
 315  /***/ 131:
 316  /***/ (function(module, exports, __webpack_require__) {
 317  
 318  "use strict";
 319  /**
 320   * Copyright (c) 2013-present, Facebook, Inc.
 321   *
 322   * This source code is licensed under the MIT license found in the
 323   * LICENSE file in the root directory of this source tree.
 324   */
 325  
 326  
 327  
 328  var ReactPropTypesSecret = __webpack_require__(132);
 329  
 330  function emptyFunction() {}
 331  function emptyFunctionWithReset() {}
 332  emptyFunctionWithReset.resetWarningCache = emptyFunction;
 333  
 334  module.exports = function() {
 335    function shim(props, propName, componentName, location, propFullName, secret) {
 336      if (secret === ReactPropTypesSecret) {
 337        // It is still safe when called from React.
 338        return;
 339      }
 340      var err = new Error(
 341        'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
 342        'Use PropTypes.checkPropTypes() to call them. ' +
 343        'Read more at http://fb.me/use-check-prop-types'
 344      );
 345      err.name = 'Invariant Violation';
 346      throw err;
 347    };
 348    shim.isRequired = shim;
 349    function getShim() {
 350      return shim;
 351    };
 352    // Important!
 353    // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
 354    var ReactPropTypes = {
 355      array: shim,
 356      bool: shim,
 357      func: shim,
 358      number: shim,
 359      object: shim,
 360      string: shim,
 361      symbol: shim,
 362  
 363      any: shim,
 364      arrayOf: getShim,
 365      element: shim,
 366      elementType: shim,
 367      instanceOf: getShim,
 368      node: shim,
 369      objectOf: getShim,
 370      oneOf: getShim,
 371      oneOfType: getShim,
 372      shape: getShim,
 373      exact: getShim,
 374  
 375      checkPropTypes: emptyFunctionWithReset,
 376      resetWarningCache: emptyFunction
 377    };
 378  
 379    ReactPropTypes.PropTypes = ReactPropTypes;
 380  
 381    return ReactPropTypes;
 382  };
 383  
 384  
 385  /***/ }),
 386  
 387  /***/ 132:
 388  /***/ (function(module, exports, __webpack_require__) {
 389  
 390  "use strict";
 391  /**
 392   * Copyright (c) 2013-present, Facebook, Inc.
 393   *
 394   * This source code is licensed under the MIT license found in the
 395   * LICENSE file in the root directory of this source tree.
 396   */
 397  
 398  
 399  
 400  var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
 401  
 402  module.exports = ReactPropTypesSecret;
 403  
 404  
 405  /***/ }),
 406  
 407  /***/ 133:
 408  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 409  
 410  "use strict";
 411  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
 412  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 413  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
 414  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 415  
 416  
 417  /**
 418   * WordPress dependencies
 419   */
 420  
 421  var close = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 422    xmlns: "http://www.w3.org/2000/svg",
 423    viewBox: "0 0 24 24"
 424  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 425    d: "M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"
 426  }));
 427  /* harmony default export */ __webpack_exports__["a"] = (close);
 428  
 429  
 430  /***/ }),
 431  
 432  /***/ 14:
 433  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 434  
 435  "use strict";
 436  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutProperties; });
 437  /* harmony import */ var _objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(42);
 438  
 439  function _objectWithoutProperties(source, excluded) {
 440    if (source == null) return {};
 441    var target = Object(_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(source, excluded);
 442    var key, i;
 443  
 444    if (Object.getOwnPropertySymbols) {
 445      var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
 446  
 447      for (i = 0; i < sourceSymbolKeys.length; i++) {
 448        key = sourceSymbolKeys[i];
 449        if (excluded.indexOf(key) >= 0) continue;
 450        if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
 451        target[key] = source[key];
 452      }
 453    }
 454  
 455    return target;
 456  }
 457  
 458  /***/ }),
 459  
 460  /***/ 141:
 461  /***/ (function(module, exports) {
 462  
 463  (function() { module.exports = this["wp"]["wordcount"]; }());
 464  
 465  /***/ }),
 466  
 467  /***/ 144:
 468  /***/ (function(module, exports) {
 469  
 470  (function() { module.exports = this["wp"]["mediaUtils"]; }());
 471  
 472  /***/ }),
 473  
 474  /***/ 15:
 475  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 476  
 477  "use strict";
 478  
 479  // EXPORTS
 480  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _slicedToArray; });
 481  
 482  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
 483  var arrayWithHoles = __webpack_require__(38);
 484  
 485  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
 486  function _iterableToArrayLimit(arr, i) {
 487    if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
 488    var _arr = [];
 489    var _n = true;
 490    var _d = false;
 491    var _e = undefined;
 492  
 493    try {
 494      for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
 495        _arr.push(_s.value);
 496  
 497        if (i && _arr.length === i) break;
 498      }
 499    } catch (err) {
 500      _d = true;
 501      _e = err;
 502    } finally {
 503      try {
 504        if (!_n && _i["return"] != null) _i["return"]();
 505      } finally {
 506        if (_d) throw _e;
 507      }
 508    }
 509  
 510    return _arr;
 511  }
 512  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
 513  var unsupportedIterableToArray = __webpack_require__(28);
 514  
 515  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
 516  var nonIterableRest = __webpack_require__(39);
 517  
 518  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
 519  
 520  
 521  
 522  
 523  function _slicedToArray(arr, i) {
 524    return Object(arrayWithHoles["a" /* default */])(arr) || _iterableToArrayLimit(arr, i) || Object(unsupportedIterableToArray["a" /* default */])(arr, i) || Object(nonIterableRest["a" /* default */])();
 525  }
 526  
 527  /***/ }),
 528  
 529  /***/ 16:
 530  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 531  
 532  "use strict";
 533  
 534  // EXPORTS
 535  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; });
 536  
 537  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
 538  var arrayLikeToArray = __webpack_require__(26);
 539  
 540  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
 541  
 542  function _arrayWithoutHoles(arr) {
 543    if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr);
 544  }
 545  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
 546  var iterableToArray = __webpack_require__(35);
 547  
 548  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
 549  var unsupportedIterableToArray = __webpack_require__(28);
 550  
 551  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
 552  function _nonIterableSpread() {
 553    throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
 554  }
 555  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
 556  
 557  
 558  
 559  
 560  function _toConsumableArray(arr) {
 561    return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread();
 562  }
 563  
 564  /***/ }),
 565  
 566  /***/ 164:
 567  /***/ (function(module, exports, __webpack_require__) {
 568  
 569  "use strict";
 570  
 571  var __extends = (this && this.__extends) || (function () {
 572      var extendStatics = Object.setPrototypeOf ||
 573          ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
 574          function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
 575      return function (d, b) {
 576          extendStatics(d, b);
 577          function __() { this.constructor = d; }
 578          d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
 579      };
 580  })();
 581  var __assign = (this && this.__assign) || Object.assign || function(t) {
 582      for (var s, i = 1, n = arguments.length; i < n; i++) {
 583          s = arguments[i];
 584          for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
 585              t[p] = s[p];
 586      }
 587      return t;
 588  };
 589  var __rest = (this && this.__rest) || function (s, e) {
 590      var t = {};
 591      for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
 592          t[p] = s[p];
 593      if (s != null && typeof Object.getOwnPropertySymbols === "function")
 594          for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
 595              t[p[i]] = s[p[i]];
 596      return t;
 597  };
 598  exports.__esModule = true;
 599  var React = __webpack_require__(17);
 600  var PropTypes = __webpack_require__(33);
 601  var autosize = __webpack_require__(165);
 602  var _getLineHeight = __webpack_require__(166);
 603  var getLineHeight = _getLineHeight;
 604  var UPDATE = 'autosize:update';
 605  var DESTROY = 'autosize:destroy';
 606  var RESIZED = 'autosize:resized';
 607  /**
 608   * A light replacement for built-in textarea component
 609   * which automaticaly adjusts its height to match the content
 610   */
 611  var TextareaAutosize = /** @class */ (function (_super) {
 612      __extends(TextareaAutosize, _super);
 613      function TextareaAutosize() {
 614          var _this = _super !== null && _super.apply(this, arguments) || this;
 615          _this.state = {
 616              lineHeight: null
 617          };
 618          _this.dispatchEvent = function (EVENT_TYPE) {
 619              var event = document.createEvent('Event');
 620              event.initEvent(EVENT_TYPE, true, false);
 621              _this.textarea.dispatchEvent(event);
 622          };
 623          _this.updateLineHeight = function () {
 624              _this.setState({
 625                  lineHeight: getLineHeight(_this.textarea)
 626              });
 627          };
 628          _this.onChange = function (e) {
 629              var onChange = _this.props.onChange;
 630              _this.currentValue = e.currentTarget.value;
 631              onChange && onChange(e);
 632          };
 633          _this.saveDOMNodeRef = function (ref) {
 634              var innerRef = _this.props.innerRef;
 635              if (innerRef) {
 636                  innerRef(ref);
 637              }
 638              _this.textarea = ref;
 639          };
 640          _this.getLocals = function () {
 641              var _a = _this, _b = _a.props, onResize = _b.onResize, maxRows = _b.maxRows, onChange = _b.onChange, style = _b.style, innerRef = _b.innerRef, props = __rest(_b, ["onResize", "maxRows", "onChange", "style", "innerRef"]), lineHeight = _a.state.lineHeight, saveDOMNodeRef = _a.saveDOMNodeRef;
 642              var maxHeight = maxRows && lineHeight ? lineHeight * maxRows : null;
 643              return __assign({}, props, { saveDOMNodeRef: saveDOMNodeRef, style: maxHeight ? __assign({}, style, { maxHeight: maxHeight }) : style, onChange: _this.onChange });
 644          };
 645          return _this;
 646      }
 647      TextareaAutosize.prototype.componentDidMount = function () {
 648          var _this = this;
 649          var _a = this.props, onResize = _a.onResize, maxRows = _a.maxRows;
 650          if (typeof maxRows === 'number') {
 651              this.updateLineHeight();
 652          }
 653          /*
 654            the defer is needed to:
 655              - force "autosize" to activate the scrollbar when this.props.maxRows is passed
 656              - support StyledComponents (see #71)
 657          */
 658          setTimeout(function () { return autosize(_this.textarea); });
 659          if (onResize) {
 660              this.textarea.addEventListener(RESIZED, onResize);
 661          }
 662      };
 663      TextareaAutosize.prototype.componentWillUnmount = function () {
 664          var onResize = this.props.onResize;
 665          if (onResize) {
 666              this.textarea.removeEventListener(RESIZED, onResize);
 667          }
 668          this.dispatchEvent(DESTROY);
 669      };
 670      TextareaAutosize.prototype.render = function () {
 671          var _a = this.getLocals(), children = _a.children, saveDOMNodeRef = _a.saveDOMNodeRef, locals = __rest(_a, ["children", "saveDOMNodeRef"]);
 672          return (React.createElement("textarea", __assign({}, locals, { ref: saveDOMNodeRef }), children));
 673      };
 674      TextareaAutosize.prototype.componentDidUpdate = function (prevProps) {
 675          if (this.props.value !== this.currentValue || this.props.rows !== prevProps.rows) {
 676              this.dispatchEvent(UPDATE);
 677          }
 678      };
 679      TextareaAutosize.defaultProps = {
 680          rows: 1
 681      };
 682      TextareaAutosize.propTypes = {
 683          rows: PropTypes.number,
 684          maxRows: PropTypes.number,
 685          onResize: PropTypes.func,
 686          innerRef: PropTypes.func
 687      };
 688      return TextareaAutosize;
 689  }(React.Component));
 690  exports["default"] = TextareaAutosize;
 691  
 692  
 693  /***/ }),
 694  
 695  /***/ 165:
 696  /***/ (function(module, exports, __webpack_require__) {
 697  
 698  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
 699      autosize 4.0.2
 700      license: MIT
 701      http://www.jacklmoore.com/autosize
 702  */
 703  (function (global, factory) {
 704      if (true) {
 705          !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
 706                  __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
 707                  (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
 708                  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
 709      } else { var mod; }
 710  })(this, function (module, exports) {
 711      'use strict';
 712  
 713      var map = typeof Map === "function" ? new Map() : function () {
 714          var keys = [];
 715          var values = [];
 716  
 717          return {
 718              has: function has(key) {
 719                  return keys.indexOf(key) > -1;
 720              },
 721              get: function get(key) {
 722                  return values[keys.indexOf(key)];
 723              },
 724              set: function set(key, value) {
 725                  if (keys.indexOf(key) === -1) {
 726                      keys.push(key);
 727                      values.push(value);
 728                  }
 729              },
 730              delete: function _delete(key) {
 731                  var index = keys.indexOf(key);
 732                  if (index > -1) {
 733                      keys.splice(index, 1);
 734                      values.splice(index, 1);
 735                  }
 736              }
 737          };
 738      }();
 739  
 740      var createEvent = function createEvent(name) {
 741          return new Event(name, { bubbles: true });
 742      };
 743      try {
 744          new Event('test');
 745      } catch (e) {
 746          // IE does not support `new Event()`
 747          createEvent = function createEvent(name) {
 748              var evt = document.createEvent('Event');
 749              evt.initEvent(name, true, false);
 750              return evt;
 751          };
 752      }
 753  
 754  	function assign(ta) {
 755          if (!ta || !ta.nodeName || ta.nodeName !== 'TEXTAREA' || map.has(ta)) return;
 756  
 757          var heightOffset = null;
 758          var clientWidth = null;
 759          var cachedHeight = null;
 760  
 761  		function init() {
 762              var style = window.getComputedStyle(ta, null);
 763  
 764              if (style.resize === 'vertical') {
 765                  ta.style.resize = 'none';
 766              } else if (style.resize === 'both') {
 767                  ta.style.resize = 'horizontal';
 768              }
 769  
 770              if (style.boxSizing === 'content-box') {
 771                  heightOffset = -(parseFloat(style.paddingTop) + parseFloat(style.paddingBottom));
 772              } else {
 773                  heightOffset = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);
 774              }
 775              // Fix when a textarea is not on document body and heightOffset is Not a Number
 776              if (isNaN(heightOffset)) {
 777                  heightOffset = 0;
 778              }
 779  
 780              update();
 781          }
 782  
 783  		function changeOverflow(value) {
 784              {
 785                  // Chrome/Safari-specific fix:
 786                  // When the textarea y-overflow is hidden, Chrome/Safari do not reflow the text to account for the space
 787                  // made available by removing the scrollbar. The following forces the necessary text reflow.
 788                  var width = ta.style.width;
 789                  ta.style.width = '0px';
 790                  // Force reflow:
 791                  /* jshint ignore:start */
 792                  ta.offsetWidth;
 793                  /* jshint ignore:end */
 794                  ta.style.width = width;
 795              }
 796  
 797              ta.style.overflowY = value;
 798          }
 799  
 800  		function getParentOverflows(el) {
 801              var arr = [];
 802  
 803              while (el && el.parentNode && el.parentNode instanceof Element) {
 804                  if (el.parentNode.scrollTop) {
 805                      arr.push({
 806                          node: el.parentNode,
 807                          scrollTop: el.parentNode.scrollTop
 808                      });
 809                  }
 810                  el = el.parentNode;
 811              }
 812  
 813              return arr;
 814          }
 815  
 816  		function resize() {
 817              if (ta.scrollHeight === 0) {
 818                  // If the scrollHeight is 0, then the element probably has display:none or is detached from the DOM.
 819                  return;
 820              }
 821  
 822              var overflows = getParentOverflows(ta);
 823              var docTop = document.documentElement && document.documentElement.scrollTop; // Needed for Mobile IE (ticket #240)
 824  
 825              ta.style.height = '';
 826              ta.style.height = ta.scrollHeight + heightOffset + 'px';
 827  
 828              // used to check if an update is actually necessary on window.resize
 829              clientWidth = ta.clientWidth;
 830  
 831              // prevents scroll-position jumping
 832              overflows.forEach(function (el) {
 833                  el.node.scrollTop = el.scrollTop;
 834              });
 835  
 836              if (docTop) {
 837                  document.documentElement.scrollTop = docTop;
 838              }
 839          }
 840  
 841  		function update() {
 842              resize();
 843  
 844              var styleHeight = Math.round(parseFloat(ta.style.height));
 845              var computed = window.getComputedStyle(ta, null);
 846  
 847              // Using offsetHeight as a replacement for computed.height in IE, because IE does not account use of border-box
 848              var actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(computed.height)) : ta.offsetHeight;
 849  
 850              // The actual height not matching the style height (set via the resize method) indicates that 
 851              // the max-height has been exceeded, in which case the overflow should be allowed.
 852              if (actualHeight < styleHeight) {
 853                  if (computed.overflowY === 'hidden') {
 854                      changeOverflow('scroll');
 855                      resize();
 856                      actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;
 857                  }
 858              } else {
 859                  // Normally keep overflow set to hidden, to avoid flash of scrollbar as the textarea expands.
 860                  if (computed.overflowY !== 'hidden') {
 861                      changeOverflow('hidden');
 862                      resize();
 863                      actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;
 864                  }
 865              }
 866  
 867              if (cachedHeight !== actualHeight) {
 868                  cachedHeight = actualHeight;
 869                  var evt = createEvent('autosize:resized');
 870                  try {
 871                      ta.dispatchEvent(evt);
 872                  } catch (err) {
 873                      // Firefox will throw an error on dispatchEvent for a detached element
 874                      // https://bugzilla.mozilla.org/show_bug.cgi?id=889376
 875                  }
 876              }
 877          }
 878  
 879          var pageResize = function pageResize() {
 880              if (ta.clientWidth !== clientWidth) {
 881                  update();
 882              }
 883          };
 884  
 885          var destroy = function (style) {
 886              window.removeEventListener('resize', pageResize, false);
 887              ta.removeEventListener('input', update, false);
 888              ta.removeEventListener('keyup', update, false);
 889              ta.removeEventListener('autosize:destroy', destroy, false);
 890              ta.removeEventListener('autosize:update', update, false);
 891  
 892              Object.keys(style).forEach(function (key) {
 893                  ta.style[key] = style[key];
 894              });
 895  
 896              map.delete(ta);
 897          }.bind(ta, {
 898              height: ta.style.height,
 899              resize: ta.style.resize,
 900              overflowY: ta.style.overflowY,
 901              overflowX: ta.style.overflowX,
 902              wordWrap: ta.style.wordWrap
 903          });
 904  
 905          ta.addEventListener('autosize:destroy', destroy, false);
 906  
 907          // IE9 does not fire onpropertychange or oninput for deletions,
 908          // so binding to onkeyup to catch most of those events.
 909          // There is no way that I know of to detect something like 'cut' in IE9.
 910          if ('onpropertychange' in ta && 'oninput' in ta) {
 911              ta.addEventListener('keyup', update, false);
 912          }
 913  
 914          window.addEventListener('resize', pageResize, false);
 915          ta.addEventListener('input', update, false);
 916          ta.addEventListener('autosize:update', update, false);
 917          ta.style.overflowX = 'hidden';
 918          ta.style.wordWrap = 'break-word';
 919  
 920          map.set(ta, {
 921              destroy: destroy,
 922              update: update
 923          });
 924  
 925          init();
 926      }
 927  
 928  	function destroy(ta) {
 929          var methods = map.get(ta);
 930          if (methods) {
 931              methods.destroy();
 932          }
 933      }
 934  
 935  	function update(ta) {
 936          var methods = map.get(ta);
 937          if (methods) {
 938              methods.update();
 939          }
 940      }
 941  
 942      var autosize = null;
 943  
 944      // Do nothing in Node.js environment and IE8 (or lower)
 945      if (typeof window === 'undefined' || typeof window.getComputedStyle !== 'function') {
 946          autosize = function autosize(el) {
 947              return el;
 948          };
 949          autosize.destroy = function (el) {
 950              return el;
 951          };
 952          autosize.update = function (el) {
 953              return el;
 954          };
 955      } else {
 956          autosize = function autosize(el, options) {
 957              if (el) {
 958                  Array.prototype.forEach.call(el.length ? el : [el], function (x) {
 959                      return assign(x, options);
 960                  });
 961              }
 962              return el;
 963          };
 964          autosize.destroy = function (el) {
 965              if (el) {
 966                  Array.prototype.forEach.call(el.length ? el : [el], destroy);
 967              }
 968              return el;
 969          };
 970          autosize.update = function (el) {
 971              if (el) {
 972                  Array.prototype.forEach.call(el.length ? el : [el], update);
 973              }
 974              return el;
 975          };
 976      }
 977  
 978      exports.default = autosize;
 979      module.exports = exports['default'];
 980  });
 981  
 982  /***/ }),
 983  
 984  /***/ 166:
 985  /***/ (function(module, exports, __webpack_require__) {
 986  
 987  // Load in dependencies
 988  var computedStyle = __webpack_require__(167);
 989  
 990  /**
 991   * Calculate the `line-height` of a given node
 992   * @param {HTMLElement} node Element to calculate line height of. Must be in the DOM.
 993   * @returns {Number} `line-height` of the element in pixels
 994   */
 995  function lineHeight(node) {
 996    // Grab the line-height via style
 997    var lnHeightStr = computedStyle(node, 'line-height');
 998    var lnHeight = parseFloat(lnHeightStr, 10);
 999  
1000    // If the lineHeight did not contain a unit (i.e. it was numeric), convert it to ems (e.g. '2.3' === '2.3em')
1001    if (lnHeightStr === lnHeight + '') {
1002      // Save the old lineHeight style and update the em unit to the element
1003      var _lnHeightStyle = node.style.lineHeight;
1004      node.style.lineHeight = lnHeightStr + 'em';
1005  
1006      // Calculate the em based height
1007      lnHeightStr = computedStyle(node, 'line-height');
1008      lnHeight = parseFloat(lnHeightStr, 10);
1009  
1010      // Revert the lineHeight style
1011      if (_lnHeightStyle) {
1012        node.style.lineHeight = _lnHeightStyle;
1013      } else {
1014        delete node.style.lineHeight;
1015      }
1016    }
1017  
1018    // If the lineHeight is in `pt`, convert it to pixels (4px for 3pt)
1019    // DEV: `em` units are converted to `pt` in IE6
1020    // Conversion ratio from https://developer.mozilla.org/en-US/docs/Web/CSS/length
1021    if (lnHeightStr.indexOf('pt') !== -1) {
1022      lnHeight *= 4;
1023      lnHeight /= 3;
1024    // Otherwise, if the lineHeight is in `mm`, convert it to pixels (96px for 25.4mm)
1025    } else if (lnHeightStr.indexOf('mm') !== -1) {
1026      lnHeight *= 96;
1027      lnHeight /= 25.4;
1028    // Otherwise, if the lineHeight is in `cm`, convert it to pixels (96px for 2.54cm)
1029    } else if (lnHeightStr.indexOf('cm') !== -1) {
1030      lnHeight *= 96;
1031      lnHeight /= 2.54;
1032    // Otherwise, if the lineHeight is in `in`, convert it to pixels (96px for 1in)
1033    } else if (lnHeightStr.indexOf('in') !== -1) {
1034      lnHeight *= 96;
1035    // Otherwise, if the lineHeight is in `pc`, convert it to pixels (12pt for 1pc)
1036    } else if (lnHeightStr.indexOf('pc') !== -1) {
1037      lnHeight *= 16;
1038    }
1039  
1040    // Continue our computation
1041    lnHeight = Math.round(lnHeight);
1042  
1043    // If the line-height is "normal", calculate by font-size
1044    if (lnHeightStr === 'normal') {
1045      // Create a temporary node
1046      var nodeName = node.nodeName;
1047      var _node = document.createElement(nodeName);
1048      _node.innerHTML = '&nbsp;';
1049  
1050      // If we have a text area, reset it to only 1 row
1051      // https://github.com/twolfson/line-height/issues/4
1052      if (nodeName.toUpperCase() === 'TEXTAREA') {
1053        _node.setAttribute('rows', '1');
1054      }
1055  
1056      // Set the font-size of the element
1057      var fontSizeStr = computedStyle(node, 'font-size');
1058      _node.style.fontSize = fontSizeStr;
1059  
1060      // Remove default padding/border which can affect offset height
1061      // https://github.com/twolfson/line-height/issues/4
1062      // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetHeight
1063      _node.style.padding = '0px';
1064      _node.style.border = '0px';
1065  
1066      // Append it to the body
1067      var body = document.body;
1068      body.appendChild(_node);
1069  
1070      // Assume the line height of the element is the height
1071      var height = _node.offsetHeight;
1072      lnHeight = height;
1073  
1074      // Remove our child from the DOM
1075      body.removeChild(_node);
1076    }
1077  
1078    // Return the calculated height
1079    return lnHeight;
1080  }
1081  
1082  // Export lineHeight
1083  module.exports = lineHeight;
1084  
1085  
1086  /***/ }),
1087  
1088  /***/ 167:
1089  /***/ (function(module, exports) {
1090  
1091  // This code has been refactored for 140 bytes
1092  // You can see the original here: https://github.com/twolfson/computedStyle/blob/04cd1da2e30fa45844f95f5cb1ac898e9b9ef050/lib/computedStyle.js
1093  var computedStyle = function (el, prop, getComputedStyle) {
1094    getComputedStyle = window.getComputedStyle;
1095  
1096    // In one fell swoop
1097    return (
1098      // If we have getComputedStyle
1099      getComputedStyle ?
1100        // Query it
1101        // TODO: From CSS-Query notes, we might need (node, null) for FF
1102        getComputedStyle(el) :
1103  
1104      // Otherwise, we are in IE and use currentStyle
1105        el.currentStyle
1106    )[
1107      // Switch to camelCase for CSSOM
1108      // DEV: Grabbed from jQuery
1109      // https://github.com/jquery/jquery/blob/1.9-stable/src/css.js#L191-L194
1110      // https://github.com/jquery/jquery/blob/1.9-stable/src/core.js#L593-L597
1111      prop.replace(/-(\w)/gi, function (word, letter) {
1112        return letter.toUpperCase();
1113      })
1114    ];
1115  };
1116  
1117  module.exports = computedStyle;
1118  
1119  
1120  /***/ }),
1121  
1122  /***/ 17:
1123  /***/ (function(module, exports) {
1124  
1125  (function() { module.exports = this["React"]; }());
1126  
1127  /***/ }),
1128  
1129  /***/ 171:
1130  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1131  
1132  "use strict";
1133  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1134  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
1135  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
1136  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
1137  
1138  
1139  /**
1140   * WordPress dependencies
1141   */
1142  
1143  var check = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
1144    xmlns: "http://www.w3.org/2000/svg",
1145    viewBox: "0 0 24 24"
1146  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
1147    d: "M9 18.6L3.5 13l1-1L9 16.4l9.5-9.9 1 1z"
1148  }));
1149  /* harmony default export */ __webpack_exports__["a"] = (check);
1150  
1151  
1152  /***/ }),
1153  
1154  /***/ 18:
1155  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1156  
1157  "use strict";
1158  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; });
1159  function _defineProperties(target, props) {
1160    for (var i = 0; i < props.length; i++) {
1161      var descriptor = props[i];
1162      descriptor.enumerable = descriptor.enumerable || false;
1163      descriptor.configurable = true;
1164      if ("value" in descriptor) descriptor.writable = true;
1165      Object.defineProperty(target, descriptor.key, descriptor);
1166    }
1167  }
1168  
1169  function _createClass(Constructor, protoProps, staticProps) {
1170    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
1171    if (staticProps) _defineProperties(Constructor, staticProps);
1172    return Constructor;
1173  }
1174  
1175  /***/ }),
1176  
1177  /***/ 184:
1178  /***/ (function(module, exports) {
1179  
1180  (function() { module.exports = this["wp"]["notices"]; }());
1181  
1182  /***/ }),
1183  
1184  /***/ 19:
1185  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1186  
1187  "use strict";
1188  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; });
1189  function _classCallCheck(instance, Constructor) {
1190    if (!(instance instanceof Constructor)) {
1191      throw new TypeError("Cannot call a class as a function");
1192    }
1193  }
1194  
1195  /***/ }),
1196  
1197  /***/ 195:
1198  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1199  
1200  "use strict";
1201  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1202  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
1203  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
1204  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
1205  
1206  
1207  /**
1208   * WordPress dependencies
1209   */
1210  
1211  var blockDefault = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
1212    xmlns: "http://www.w3.org/2000/svg",
1213    viewBox: "0 0 24 24"
1214  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
1215    d: "M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"
1216  }));
1217  /* harmony default export */ __webpack_exports__["a"] = (blockDefault);
1218  
1219  
1220  /***/ }),
1221  
1222  /***/ 2:
1223  /***/ (function(module, exports) {
1224  
1225  (function() { module.exports = this["lodash"]; }());
1226  
1227  /***/ }),
1228  
1229  /***/ 20:
1230  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1231  
1232  "use strict";
1233  
1234  // EXPORTS
1235  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _inherits; });
1236  
1237  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
1238  function _setPrototypeOf(o, p) {
1239    _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
1240      o.__proto__ = p;
1241      return o;
1242    };
1243  
1244    return _setPrototypeOf(o, p);
1245  }
1246  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
1247  
1248  function _inherits(subClass, superClass) {
1249    if (typeof superClass !== "function" && superClass !== null) {
1250      throw new TypeError("Super expression must either be null or a function");
1251    }
1252  
1253    subClass.prototype = Object.create(superClass && superClass.prototype, {
1254      constructor: {
1255        value: subClass,
1256        writable: true,
1257        configurable: true
1258      }
1259    });
1260    if (superClass) _setPrototypeOf(subClass, superClass);
1261  }
1262  
1263  /***/ }),
1264  
1265  /***/ 21:
1266  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1267  
1268  "use strict";
1269  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _possibleConstructorReturn; });
1270  /* harmony import */ var _helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(40);
1271  /* harmony import */ var _assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10);
1272  
1273  
1274  function _possibleConstructorReturn(self, call) {
1275    if (call && (Object(_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(call) === "object" || typeof call === "function")) {
1276      return call;
1277    }
1278  
1279    return Object(_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(self);
1280  }
1281  
1282  /***/ }),
1283  
1284  /***/ 22:
1285  /***/ (function(module, exports) {
1286  
1287  (function() { module.exports = this["wp"]["keycodes"]; }());
1288  
1289  /***/ }),
1290  
1291  /***/ 23:
1292  /***/ (function(module, exports) {
1293  
1294  (function() { module.exports = this["regeneratorRuntime"]; }());
1295  
1296  /***/ }),
1297  
1298  /***/ 25:
1299  /***/ (function(module, exports) {
1300  
1301  (function() { module.exports = this["wp"]["richText"]; }());
1302  
1303  /***/ }),
1304  
1305  /***/ 26:
1306  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1307  
1308  "use strict";
1309  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; });
1310  function _arrayLikeToArray(arr, len) {
1311    if (len == null || len > arr.length) len = arr.length;
1312  
1313    for (var i = 0, arr2 = new Array(len); i < len; i++) {
1314      arr2[i] = arr[i];
1315    }
1316  
1317    return arr2;
1318  }
1319  
1320  /***/ }),
1321  
1322  /***/ 28:
1323  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1324  
1325  "use strict";
1326  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; });
1327  /* harmony import */ var _arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26);
1328  
1329  function _unsupportedIterableToArray(o, minLen) {
1330    if (!o) return;
1331    if (typeof o === "string") return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
1332    var n = Object.prototype.toString.call(o).slice(8, -1);
1333    if (n === "Object" && o.constructor) n = o.constructor.name;
1334    if (n === "Map" || n === "Set") return Array.from(o);
1335    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
1336  }
1337  
1338  /***/ }),
1339  
1340  /***/ 288:
1341  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1342  
1343  "use strict";
1344  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1345  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
1346  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
1347  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
1348  
1349  
1350  /**
1351   * WordPress dependencies
1352   */
1353  
1354  var layout = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
1355    xmlns: "http://www.w3.org/2000/svg",
1356    viewBox: "-2 -2 24 24"
1357  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
1358    d: "M2 2h5v11H2V2zm6 0h5v5H8V2zm6 0h4v16h-4V2zM8 8h5v5H8V8zm-6 6h11v4H2v-4z"
1359  }));
1360  /* harmony default export */ __webpack_exports__["a"] = (layout);
1361  
1362  
1363  /***/ }),
1364  
1365  /***/ 298:
1366  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1367  
1368  "use strict";
1369  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1370  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
1371  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
1372  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
1373  
1374  
1375  /**
1376   * WordPress dependencies
1377   */
1378  
1379  var grid = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
1380    xmlns: "http://www.w3.org/2000/svg",
1381    viewBox: "-2 -2 24 24"
1382  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
1383    d: "M9 9V3H3v6h6zm8 0V3h-6v6h6zm-8 8v-6H3v6h6zm8 0v-6h-6v6h6z"
1384  }));
1385  /* harmony default export */ __webpack_exports__["a"] = (grid);
1386  
1387  
1388  /***/ }),
1389  
1390  /***/ 3:
1391  /***/ (function(module, exports) {
1392  
1393  (function() { module.exports = this["wp"]["components"]; }());
1394  
1395  /***/ }),
1396  
1397  /***/ 30:
1398  /***/ (function(module, exports) {
1399  
1400  (function() { module.exports = this["wp"]["url"]; }());
1401  
1402  /***/ }),
1403  
1404  /***/ 31:
1405  /***/ (function(module, exports) {
1406  
1407  (function() { module.exports = this["wp"]["hooks"]; }());
1408  
1409  /***/ }),
1410  
1411  /***/ 33:
1412  /***/ (function(module, exports, __webpack_require__) {
1413  
1414  /**
1415   * Copyright (c) 2013-present, Facebook, Inc.
1416   *
1417   * This source code is licensed under the MIT license found in the
1418   * LICENSE file in the root directory of this source tree.
1419   */
1420  
1421  if (false) { var throwOnDirectAccess, ReactIs; } else {
1422    // By explicitly using `prop-types` you are opting into new production behavior.
1423    // http://fb.me/prop-types-in-prod
1424    module.exports = __webpack_require__(131)();
1425  }
1426  
1427  
1428  /***/ }),
1429  
1430  /***/ 35:
1431  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1432  
1433  "use strict";
1434  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
1435  function _iterableToArray(iter) {
1436    if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
1437  }
1438  
1439  /***/ }),
1440  
1441  /***/ 36:
1442  /***/ (function(module, exports) {
1443  
1444  (function() { module.exports = this["wp"]["dataControls"]; }());
1445  
1446  /***/ }),
1447  
1448  /***/ 37:
1449  /***/ (function(module, exports) {
1450  
1451  (function() { module.exports = this["wp"]["deprecated"]; }());
1452  
1453  /***/ }),
1454  
1455  /***/ 38:
1456  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1457  
1458  "use strict";
1459  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayWithHoles; });
1460  function _arrayWithHoles(arr) {
1461    if (Array.isArray(arr)) return arr;
1462  }
1463  
1464  /***/ }),
1465  
1466  /***/ 39:
1467  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1468  
1469  "use strict";
1470  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _nonIterableRest; });
1471  function _nonIterableRest() {
1472    throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1473  }
1474  
1475  /***/ }),
1476  
1477  /***/ 4:
1478  /***/ (function(module, exports) {
1479  
1480  (function() { module.exports = this["wp"]["data"]; }());
1481  
1482  /***/ }),
1483  
1484  /***/ 40:
1485  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1486  
1487  "use strict";
1488  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; });
1489  function _typeof(obj) {
1490    "@babel/helpers - typeof";
1491  
1492    if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
1493      _typeof = function _typeof(obj) {
1494        return typeof obj;
1495      };
1496    } else {
1497      _typeof = function _typeof(obj) {
1498        return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
1499      };
1500    }
1501  
1502    return _typeof(obj);
1503  }
1504  
1505  /***/ }),
1506  
1507  /***/ 41:
1508  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1509  
1510  "use strict";
1511  
1512  
1513  var LEAF_KEY, hasWeakMap;
1514  
1515  /**
1516   * Arbitrary value used as key for referencing cache object in WeakMap tree.
1517   *
1518   * @type {Object}
1519   */
1520  LEAF_KEY = {};
1521  
1522  /**
1523   * Whether environment supports WeakMap.
1524   *
1525   * @type {boolean}
1526   */
1527  hasWeakMap = typeof WeakMap !== 'undefined';
1528  
1529  /**
1530   * Returns the first argument as the sole entry in an array.
1531   *
1532   * @param {*} value Value to return.
1533   *
1534   * @return {Array} Value returned as entry in array.
1535   */
1536  function arrayOf( value ) {
1537      return [ value ];
1538  }
1539  
1540  /**
1541   * Returns true if the value passed is object-like, or false otherwise. A value
1542   * is object-like if it can support property assignment, e.g. object or array.
1543   *
1544   * @param {*} value Value to test.
1545   *
1546   * @return {boolean} Whether value is object-like.
1547   */
1548  function isObjectLike( value ) {
1549      return !! value && 'object' === typeof value;
1550  }
1551  
1552  /**
1553   * Creates and returns a new cache object.
1554   *
1555   * @return {Object} Cache object.
1556   */
1557  function createCache() {
1558      var cache = {
1559          clear: function() {
1560              cache.head = null;
1561          },
1562      };
1563  
1564      return cache;
1565  }
1566  
1567  /**
1568   * Returns true if entries within the two arrays are strictly equal by
1569   * reference from a starting index.
1570   *
1571   * @param {Array}  a         First array.
1572   * @param {Array}  b         Second array.
1573   * @param {number} fromIndex Index from which to start comparison.
1574   *
1575   * @return {boolean} Whether arrays are shallowly equal.
1576   */
1577  function isShallowEqual( a, b, fromIndex ) {
1578      var i;
1579  
1580      if ( a.length !== b.length ) {
1581          return false;
1582      }
1583  
1584      for ( i = fromIndex; i < a.length; i++ ) {
1585          if ( a[ i ] !== b[ i ] ) {
1586              return false;
1587          }
1588      }
1589  
1590      return true;
1591  }
1592  
1593  /**
1594   * Returns a memoized selector function. The getDependants function argument is
1595   * called before the memoized selector and is expected to return an immutable
1596   * reference or array of references on which the selector depends for computing
1597   * its own return value. The memoize cache is preserved only as long as those
1598   * dependant references remain the same. If getDependants returns a different
1599   * reference(s), the cache is cleared and the selector value regenerated.
1600   *
1601   * @param {Function} selector      Selector function.
1602   * @param {Function} getDependants Dependant getter returning an immutable
1603   *                                 reference or array of reference used in
1604   *                                 cache bust consideration.
1605   *
1606   * @return {Function} Memoized selector.
1607   */
1608  /* harmony default export */ __webpack_exports__["a"] = (function( selector, getDependants ) {
1609      var rootCache, getCache;
1610  
1611      // Use object source as dependant if getter not provided
1612      if ( ! getDependants ) {
1613          getDependants = arrayOf;
1614      }
1615  
1616      /**
1617       * Returns the root cache. If WeakMap is supported, this is assigned to the
1618       * root WeakMap cache set, otherwise it is a shared instance of the default
1619       * cache object.
1620       *
1621       * @return {(WeakMap|Object)} Root cache object.
1622       */
1623  	function getRootCache() {
1624          return rootCache;
1625      }
1626  
1627      /**
1628       * Returns the cache for a given dependants array. When possible, a WeakMap
1629       * will be used to create a unique cache for each set of dependants. This
1630       * is feasible due to the nature of WeakMap in allowing garbage collection
1631       * to occur on entries where the key object is no longer referenced. Since
1632       * WeakMap requires the key to be an object, this is only possible when the
1633       * dependant is object-like. The root cache is created as a hierarchy where
1634       * each top-level key is the first entry in a dependants set, the value a
1635       * WeakMap where each key is the next dependant, and so on. This continues
1636       * so long as the dependants are object-like. If no dependants are object-
1637       * like, then the cache is shared across all invocations.
1638       *
1639       * @see isObjectLike
1640       *
1641       * @param {Array} dependants Selector dependants.
1642       *
1643       * @return {Object} Cache object.
1644       */
1645  	function getWeakMapCache( dependants ) {
1646          var caches = rootCache,
1647              isUniqueByDependants = true,
1648              i, dependant, map, cache;
1649  
1650          for ( i = 0; i < dependants.length; i++ ) {
1651              dependant = dependants[ i ];
1652  
1653              // Can only compose WeakMap from object-like key.
1654              if ( ! isObjectLike( dependant ) ) {
1655                  isUniqueByDependants = false;
1656                  break;
1657              }
1658  
1659              // Does current segment of cache already have a WeakMap?
1660              if ( caches.has( dependant ) ) {
1661                  // Traverse into nested WeakMap.
1662                  caches = caches.get( dependant );
1663              } else {
1664                  // Create, set, and traverse into a new one.
1665                  map = new WeakMap();
1666                  caches.set( dependant, map );
1667                  caches = map;
1668              }
1669          }
1670  
1671          // We use an arbitrary (but consistent) object as key for the last item
1672          // in the WeakMap to serve as our running cache.
1673          if ( ! caches.has( LEAF_KEY ) ) {
1674              cache = createCache();
1675              cache.isUniqueByDependants = isUniqueByDependants;
1676              caches.set( LEAF_KEY, cache );
1677          }
1678  
1679          return caches.get( LEAF_KEY );
1680      }
1681  
1682      // Assign cache handler by availability of WeakMap
1683      getCache = hasWeakMap ? getWeakMapCache : getRootCache;
1684  
1685      /**
1686       * Resets root memoization cache.
1687       */
1688  	function clear() {
1689          rootCache = hasWeakMap ? new WeakMap() : createCache();
1690      }
1691  
1692      // eslint-disable-next-line jsdoc/check-param-names
1693      /**
1694       * The augmented selector call, considering first whether dependants have
1695       * changed before passing it to underlying memoize function.
1696       *
1697       * @param {Object} source    Source object for derivation.
1698       * @param {...*}   extraArgs Additional arguments to pass to selector.
1699       *
1700       * @return {*} Selector result.
1701       */
1702  	function callSelector( /* source, ...extraArgs */ ) {
1703          var len = arguments.length,
1704              cache, node, i, args, dependants;
1705  
1706          // Create copy of arguments (avoid leaking deoptimization).
1707          args = new Array( len );
1708          for ( i = 0; i < len; i++ ) {
1709              args[ i ] = arguments[ i ];
1710          }
1711  
1712          dependants = getDependants.apply( null, args );
1713          cache = getCache( dependants );
1714  
1715          // If not guaranteed uniqueness by dependants (primitive type or lack
1716          // of WeakMap support), shallow compare against last dependants and, if
1717          // references have changed, destroy cache to recalculate result.
1718          if ( ! cache.isUniqueByDependants ) {
1719              if ( cache.lastDependants && ! isShallowEqual( dependants, cache.lastDependants, 0 ) ) {
1720                  cache.clear();
1721              }
1722  
1723              cache.lastDependants = dependants;
1724          }
1725  
1726          node = cache.head;
1727          while ( node ) {
1728              // Check whether node arguments match arguments
1729              if ( ! isShallowEqual( node.args, args, 1 ) ) {
1730                  node = node.next;
1731                  continue;
1732              }
1733  
1734              // At this point we can assume we've found a match
1735  
1736              // Surface matched node to head if not already
1737              if ( node !== cache.head ) {
1738                  // Adjust siblings to point to each other.
1739                  node.prev.next = node.next;
1740                  if ( node.next ) {
1741                      node.next.prev = node.prev;
1742                  }
1743  
1744                  node.next = cache.head;
1745                  node.prev = null;
1746                  cache.head.prev = node;
1747                  cache.head = node;
1748              }
1749  
1750              // Return immediately
1751              return node.val;
1752          }
1753  
1754          // No cached value found. Continue to insertion phase:
1755  
1756          node = {
1757              // Generate the result from original function
1758              val: selector.apply( null, args ),
1759          };
1760  
1761          // Avoid including the source object in the cache.
1762          args[ 0 ] = null;
1763          node.args = args;
1764  
1765          // Don't need to check whether node is already head, since it would
1766          // have been returned above already if it was
1767  
1768          // Shift existing head down list
1769          if ( cache.head ) {
1770              cache.head.prev = node;
1771              node.next = cache.head;
1772          }
1773  
1774          cache.head = node;
1775  
1776          return node.val;
1777      }
1778  
1779      callSelector.getDependants = getDependants;
1780      callSelector.clear = clear;
1781      clear();
1782  
1783      return callSelector;
1784  });
1785  
1786  
1787  /***/ }),
1788  
1789  /***/ 417:
1790  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1791  
1792  "use strict";
1793  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1794  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
1795  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
1796  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
1797  
1798  
1799  /**
1800   * WordPress dependencies
1801   */
1802  
1803  var closeSmall = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
1804    xmlns: "http://www.w3.org/2000/svg",
1805    viewBox: "0 0 24 24"
1806  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
1807    d: "M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z"
1808  }));
1809  /* harmony default export */ __webpack_exports__["a"] = (closeSmall);
1810  
1811  
1812  /***/ }),
1813  
1814  /***/ 419:
1815  /***/ (function(module, exports, __webpack_require__) {
1816  
1817  "use strict";
1818  
1819  
1820  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
1821  
1822  function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
1823  
1824  var BEGIN = 'BEGIN';
1825  var COMMIT = 'COMMIT';
1826  var REVERT = 'REVERT';
1827  // Array({transactionID: string or null, beforeState: {object}, action: {object}}
1828  var INITIAL_OPTIMIST = [];
1829  
1830  module.exports = optimist;
1831  module.exports.BEGIN = BEGIN;
1832  module.exports.COMMIT = COMMIT;
1833  module.exports.REVERT = REVERT;
1834  function optimist(fn) {
1835    function beginReducer(state, action) {
1836      var _separateState = separateState(state);
1837  
1838      var optimist = _separateState.optimist;
1839      var innerState = _separateState.innerState;
1840  
1841      optimist = optimist.concat([{ beforeState: innerState, action: action }]);
1842      innerState = fn(innerState, action);
1843      validateState(innerState, action);
1844      return _extends({ optimist: optimist }, innerState);
1845    }
1846    function commitReducer(state, action) {
1847      var _separateState2 = separateState(state);
1848  
1849      var optimist = _separateState2.optimist;
1850      var innerState = _separateState2.innerState;
1851  
1852      var newOptimist = [],
1853          started = false,
1854          committed = false;
1855      optimist.forEach(function (entry) {
1856        if (started) {
1857          if (entry.beforeState && matchesTransaction(entry.action, action.optimist.id)) {
1858            committed = true;
1859            newOptimist.push({ action: entry.action });
1860          } else {
1861            newOptimist.push(entry);
1862          }
1863        } else if (entry.beforeState && !matchesTransaction(entry.action, action.optimist.id)) {
1864          started = true;
1865          newOptimist.push(entry);
1866        } else if (entry.beforeState && matchesTransaction(entry.action, action.optimist.id)) {
1867          committed = true;
1868        }
1869      });
1870      if (!committed) {
1871        console.error('Cannot commit transaction with id "' + action.optimist.id + '" because it does not exist');
1872      }
1873      optimist = newOptimist;
1874      return baseReducer(optimist, innerState, action);
1875    }
1876    function revertReducer(state, action) {
1877      var _separateState3 = separateState(state);
1878  
1879      var optimist = _separateState3.optimist;
1880      var innerState = _separateState3.innerState;
1881  
1882      var newOptimist = [],
1883          started = false,
1884          gotInitialState = false,
1885          currentState = innerState;
1886      optimist.forEach(function (entry) {
1887        if (entry.beforeState && matchesTransaction(entry.action, action.optimist.id)) {
1888          currentState = entry.beforeState;
1889          gotInitialState = true;
1890        }
1891        if (!matchesTransaction(entry.action, action.optimist.id)) {
1892          if (entry.beforeState) {
1893            started = true;
1894          }
1895          if (started) {
1896            if (gotInitialState && entry.beforeState) {
1897              newOptimist.push({
1898                beforeState: currentState,
1899                action: entry.action
1900              });
1901            } else {
1902              newOptimist.push(entry);
1903            }
1904          }
1905          if (gotInitialState) {
1906            currentState = fn(currentState, entry.action);
1907            validateState(innerState, action);
1908          }
1909        }
1910      });
1911      if (!gotInitialState) {
1912        console.error('Cannot revert transaction with id "' + action.optimist.id + '" because it does not exist');
1913      }
1914      optimist = newOptimist;
1915      return baseReducer(optimist, currentState, action);
1916    }
1917    function baseReducer(optimist, innerState, action) {
1918      if (optimist.length) {
1919        optimist = optimist.concat([{ action: action }]);
1920      }
1921      innerState = fn(innerState, action);
1922      validateState(innerState, action);
1923      return _extends({ optimist: optimist }, innerState);
1924    }
1925    return function (state, action) {
1926      if (action.optimist) {
1927        switch (action.optimist.type) {
1928          case BEGIN:
1929            return beginReducer(state, action);
1930          case COMMIT:
1931            return commitReducer(state, action);
1932          case REVERT:
1933            return revertReducer(state, action);
1934        }
1935      }
1936  
1937      var _separateState4 = separateState(state);
1938  
1939      var optimist = _separateState4.optimist;
1940      var innerState = _separateState4.innerState;
1941  
1942      if (state && !optimist.length) {
1943        var nextState = fn(innerState, action);
1944        if (nextState === innerState) {
1945          return state;
1946        }
1947        validateState(nextState, action);
1948        return _extends({ optimist: optimist }, nextState);
1949      }
1950      return baseReducer(optimist, innerState, action);
1951    };
1952  }
1953  
1954  function matchesTransaction(action, id) {
1955    return action.optimist && action.optimist.id === id;
1956  }
1957  
1958  function validateState(newState, action) {
1959    if (!newState || typeof newState !== 'object' || Array.isArray(newState)) {
1960      throw new TypeError('Error while handling "' + action.type + '": Optimist requires that state is always a plain object.');
1961    }
1962  }
1963  
1964  function separateState(state) {
1965    if (!state) {
1966      return { optimist: INITIAL_OPTIMIST, innerState: state };
1967    } else {
1968      var _state$optimist = state.optimist;
1969  
1970      var _optimist = _state$optimist === undefined ? INITIAL_OPTIMIST : _state$optimist;
1971  
1972      var innerState = _objectWithoutProperties(state, ['optimist']);
1973  
1974      return { optimist: _optimist, innerState: innerState };
1975    }
1976  }
1977  
1978  /***/ }),
1979  
1980  /***/ 42:
1981  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1982  
1983  "use strict";
1984  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutPropertiesLoose; });
1985  function _objectWithoutPropertiesLoose(source, excluded) {
1986    if (source == null) return {};
1987    var target = {};
1988    var sourceKeys = Object.keys(source);
1989    var key, i;
1990  
1991    for (i = 0; i < sourceKeys.length; i++) {
1992      key = sourceKeys[i];
1993      if (excluded.indexOf(key) >= 0) continue;
1994      target[key] = source[key];
1995    }
1996  
1997    return target;
1998  }
1999  
2000  /***/ }),
2001  
2002  /***/ 436:
2003  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2004  
2005  "use strict";
2006  // ESM COMPAT FLAG
2007  __webpack_require__.r(__webpack_exports__);
2008  
2009  // EXPORTS
2010  __webpack_require__.d(__webpack_exports__, "userAutocompleter", function() { return /* reexport */ autocompleters_user; });
2011  __webpack_require__.d(__webpack_exports__, "AutosaveMonitor", function() { return /* reexport */ autosave_monitor; });
2012  __webpack_require__.d(__webpack_exports__, "DocumentOutline", function() { return /* reexport */ document_outline; });
2013  __webpack_require__.d(__webpack_exports__, "DocumentOutlineCheck", function() { return /* reexport */ check; });
2014  __webpack_require__.d(__webpack_exports__, "VisualEditorGlobalKeyboardShortcuts", function() { return /* reexport */ visual_editor_shortcuts; });
2015  __webpack_require__.d(__webpack_exports__, "EditorGlobalKeyboardShortcuts", function() { return /* reexport */ EditorGlobalKeyboardShortcuts; });
2016  __webpack_require__.d(__webpack_exports__, "TextEditorGlobalKeyboardShortcuts", function() { return /* reexport */ TextEditorGlobalKeyboardShortcuts; });
2017  __webpack_require__.d(__webpack_exports__, "EditorKeyboardShortcutsRegister", function() { return /* reexport */ register_shortcuts; });
2018  __webpack_require__.d(__webpack_exports__, "EditorHistoryRedo", function() { return /* reexport */ editor_history_redo; });
2019  __webpack_require__.d(__webpack_exports__, "EditorHistoryUndo", function() { return /* reexport */ editor_history_undo; });
2020  __webpack_require__.d(__webpack_exports__, "EditorNotices", function() { return /* reexport */ editor_notices; });
2021  __webpack_require__.d(__webpack_exports__, "EntitiesSavedStates", function() { return /* reexport */ EntitiesSavedStates; });
2022  __webpack_require__.d(__webpack_exports__, "ErrorBoundary", function() { return /* reexport */ error_boundary; });
2023  __webpack_require__.d(__webpack_exports__, "LocalAutosaveMonitor", function() { return /* reexport */ local_autosave_monitor; });
2024  __webpack_require__.d(__webpack_exports__, "PageAttributesCheck", function() { return /* reexport */ page_attributes_check; });
2025  __webpack_require__.d(__webpack_exports__, "PageAttributesOrder", function() { return /* reexport */ page_attributes_order; });
2026  __webpack_require__.d(__webpack_exports__, "PageAttributesParent", function() { return /* reexport */ page_attributes_parent; });
2027  __webpack_require__.d(__webpack_exports__, "PageTemplate", function() { return /* reexport */ page_attributes_template; });
2028  __webpack_require__.d(__webpack_exports__, "PostAuthor", function() { return /* reexport */ post_author; });
2029  __webpack_require__.d(__webpack_exports__, "PostAuthorCheck", function() { return /* reexport */ post_author_check; });
2030  __webpack_require__.d(__webpack_exports__, "PostComments", function() { return /* reexport */ post_comments; });
2031  __webpack_require__.d(__webpack_exports__, "PostExcerpt", function() { return /* reexport */ post_excerpt; });
2032  __webpack_require__.d(__webpack_exports__, "PostExcerptCheck", function() { return /* reexport */ post_excerpt_check; });
2033  __webpack_require__.d(__webpack_exports__, "PostFeaturedImage", function() { return /* reexport */ post_featured_image; });
2034  __webpack_require__.d(__webpack_exports__, "PostFeaturedImageCheck", function() { return /* reexport */ post_featured_image_check; });
2035  __webpack_require__.d(__webpack_exports__, "PostFormat", function() { return /* reexport */ post_format; });
2036  __webpack_require__.d(__webpack_exports__, "PostFormatCheck", function() { return /* reexport */ post_format_check; });
2037  __webpack_require__.d(__webpack_exports__, "PostLastRevision", function() { return /* reexport */ post_last_revision; });
2038  __webpack_require__.d(__webpack_exports__, "PostLastRevisionCheck", function() { return /* reexport */ post_last_revision_check; });
2039  __webpack_require__.d(__webpack_exports__, "PostLockedModal", function() { return /* reexport */ post_locked_modal; });
2040  __webpack_require__.d(__webpack_exports__, "PostPendingStatus", function() { return /* reexport */ post_pending_status; });
2041  __webpack_require__.d(__webpack_exports__, "PostPendingStatusCheck", function() { return /* reexport */ post_pending_status_check; });
2042  __webpack_require__.d(__webpack_exports__, "PostPingbacks", function() { return /* reexport */ post_pingbacks; });
2043  __webpack_require__.d(__webpack_exports__, "PostPreviewButton", function() { return /* reexport */ post_preview_button; });
2044  __webpack_require__.d(__webpack_exports__, "PostPublishButton", function() { return /* reexport */ post_publish_button; });
2045  __webpack_require__.d(__webpack_exports__, "PostPublishButtonLabel", function() { return /* reexport */ post_publish_button_label; });
2046  __webpack_require__.d(__webpack_exports__, "PostPublishPanel", function() { return /* reexport */ post_publish_panel; });
2047  __webpack_require__.d(__webpack_exports__, "PostSavedState", function() { return /* reexport */ post_saved_state; });
2048  __webpack_require__.d(__webpack_exports__, "PostSchedule", function() { return /* reexport */ post_schedule; });
2049  __webpack_require__.d(__webpack_exports__, "PostScheduleCheck", function() { return /* reexport */ post_schedule_check; });
2050  __webpack_require__.d(__webpack_exports__, "PostScheduleLabel", function() { return /* reexport */ post_schedule_label; });
2051  __webpack_require__.d(__webpack_exports__, "PostSlug", function() { return /* reexport */ post_slug; });
2052  __webpack_require__.d(__webpack_exports__, "PostSlugCheck", function() { return /* reexport */ PostSlugCheck; });
2053  __webpack_require__.d(__webpack_exports__, "PostSticky", function() { return /* reexport */ post_sticky; });
2054  __webpack_require__.d(__webpack_exports__, "PostStickyCheck", function() { return /* reexport */ post_sticky_check; });
2055  __webpack_require__.d(__webpack_exports__, "PostSwitchToDraftButton", function() { return /* reexport */ post_switch_to_draft_button; });
2056  __webpack_require__.d(__webpack_exports__, "PostTaxonomies", function() { return /* reexport */ post_taxonomies; });
2057  __webpack_require__.d(__webpack_exports__, "PostTaxonomiesCheck", function() { return /* reexport */ post_taxonomies_check; });
2058  __webpack_require__.d(__webpack_exports__, "PostTextEditor", function() { return /* reexport */ post_text_editor; });
2059  __webpack_require__.d(__webpack_exports__, "PostTitle", function() { return /* reexport */ post_title; });
2060  __webpack_require__.d(__webpack_exports__, "PostTrash", function() { return /* reexport */ post_trash; });
2061  __webpack_require__.d(__webpack_exports__, "PostTrashCheck", function() { return /* reexport */ post_trash_check; });
2062  __webpack_require__.d(__webpack_exports__, "PostTypeSupportCheck", function() { return /* reexport */ post_type_support_check; });
2063  __webpack_require__.d(__webpack_exports__, "PostVisibility", function() { return /* reexport */ post_visibility; });
2064  __webpack_require__.d(__webpack_exports__, "PostVisibilityLabel", function() { return /* reexport */ post_visibility_label; });
2065  __webpack_require__.d(__webpack_exports__, "PostVisibilityCheck", function() { return /* reexport */ post_visibility_check; });
2066  __webpack_require__.d(__webpack_exports__, "TableOfContents", function() { return /* reexport */ table_of_contents; });
2067  __webpack_require__.d(__webpack_exports__, "UnsavedChangesWarning", function() { return /* reexport */ unsaved_changes_warning; });
2068  __webpack_require__.d(__webpack_exports__, "WordCount", function() { return /* reexport */ word_count; });
2069  __webpack_require__.d(__webpack_exports__, "EditorProvider", function() { return /* reexport */ provider; });
2070  __webpack_require__.d(__webpack_exports__, "ServerSideRender", function() { return /* reexport */ external_this_wp_serverSideRender_default.a; });
2071  __webpack_require__.d(__webpack_exports__, "RichText", function() { return /* reexport */ RichText; });
2072  __webpack_require__.d(__webpack_exports__, "Autocomplete", function() { return /* reexport */ Autocomplete; });
2073  __webpack_require__.d(__webpack_exports__, "AlignmentToolbar", function() { return /* reexport */ AlignmentToolbar; });
2074  __webpack_require__.d(__webpack_exports__, "BlockAlignmentToolbar", function() { return /* reexport */ BlockAlignmentToolbar; });
2075  __webpack_require__.d(__webpack_exports__, "BlockControls", function() { return /* reexport */ BlockControls; });
2076  __webpack_require__.d(__webpack_exports__, "BlockEdit", function() { return /* reexport */ deprecated_BlockEdit; });
2077  __webpack_require__.d(__webpack_exports__, "BlockEditorKeyboardShortcuts", function() { return /* reexport */ BlockEditorKeyboardShortcuts; });
2078  __webpack_require__.d(__webpack_exports__, "BlockFormatControls", function() { return /* reexport */ BlockFormatControls; });
2079  __webpack_require__.d(__webpack_exports__, "BlockIcon", function() { return /* reexport */ BlockIcon; });
2080  __webpack_require__.d(__webpack_exports__, "BlockInspector", function() { return /* reexport */ BlockInspector; });
2081  __webpack_require__.d(__webpack_exports__, "BlockList", function() { return /* reexport */ BlockList; });
2082  __webpack_require__.d(__webpack_exports__, "BlockMover", function() { return /* reexport */ BlockMover; });
2083  __webpack_require__.d(__webpack_exports__, "BlockNavigationDropdown", function() { return /* reexport */ BlockNavigationDropdown; });
2084  __webpack_require__.d(__webpack_exports__, "BlockSelectionClearer", function() { return /* reexport */ BlockSelectionClearer; });
2085  __webpack_require__.d(__webpack_exports__, "BlockSettingsMenu", function() { return /* reexport */ BlockSettingsMenu; });
2086  __webpack_require__.d(__webpack_exports__, "BlockTitle", function() { return /* reexport */ BlockTitle; });
2087  __webpack_require__.d(__webpack_exports__, "BlockToolbar", function() { return /* reexport */ BlockToolbar; });
2088  __webpack_require__.d(__webpack_exports__, "ColorPalette", function() { return /* reexport */ ColorPalette; });
2089  __webpack_require__.d(__webpack_exports__, "ContrastChecker", function() { return /* reexport */ ContrastChecker; });
2090  __webpack_require__.d(__webpack_exports__, "CopyHandler", function() { return /* reexport */ CopyHandler; });
2091  __webpack_require__.d(__webpack_exports__, "DefaultBlockAppender", function() { return /* reexport */ DefaultBlockAppender; });
2092  __webpack_require__.d(__webpack_exports__, "FontSizePicker", function() { return /* reexport */ FontSizePicker; });
2093  __webpack_require__.d(__webpack_exports__, "Inserter", function() { return /* reexport */ Inserter; });
2094  __webpack_require__.d(__webpack_exports__, "InnerBlocks", function() { return /* reexport */ InnerBlocks; });
2095  __webpack_require__.d(__webpack_exports__, "InspectorAdvancedControls", function() { return /* reexport */ InspectorAdvancedControls; });
2096  __webpack_require__.d(__webpack_exports__, "InspectorControls", function() { return /* reexport */ InspectorControls; });
2097  __webpack_require__.d(__webpack_exports__, "PanelColorSettings", function() { return /* reexport */ PanelColorSettings; });
2098  __webpack_require__.d(__webpack_exports__, "PlainText", function() { return /* reexport */ PlainText; });
2099  __webpack_require__.d(__webpack_exports__, "RichTextShortcut", function() { return /* reexport */ RichTextShortcut; });
2100  __webpack_require__.d(__webpack_exports__, "RichTextToolbarButton", function() { return /* reexport */ RichTextToolbarButton; });
2101  __webpack_require__.d(__webpack_exports__, "__unstableRichTextInputEvent", function() { return /* reexport */ __unstableRichTextInputEvent; });
2102  __webpack_require__.d(__webpack_exports__, "MediaPlaceholder", function() { return /* reexport */ MediaPlaceholder; });
2103  __webpack_require__.d(__webpack_exports__, "MediaUpload", function() { return /* reexport */ MediaUpload; });
2104  __webpack_require__.d(__webpack_exports__, "MediaUploadCheck", function() { return /* reexport */ MediaUploadCheck; });
2105  __webpack_require__.d(__webpack_exports__, "MultiSelectScrollIntoView", function() { return /* reexport */ MultiSelectScrollIntoView; });
2106  __webpack_require__.d(__webpack_exports__, "NavigableToolbar", function() { return /* reexport */ NavigableToolbar; });
2107  __webpack_require__.d(__webpack_exports__, "ObserveTyping", function() { return /* reexport */ ObserveTyping; });
2108  __webpack_require__.d(__webpack_exports__, "PreserveScrollInReorder", function() { return /* reexport */ PreserveScrollInReorder; });
2109  __webpack_require__.d(__webpack_exports__, "SkipToSelectedBlock", function() { return /* reexport */ SkipToSelectedBlock; });
2110  __webpack_require__.d(__webpack_exports__, "URLInput", function() { return /* reexport */ URLInput; });
2111  __webpack_require__.d(__webpack_exports__, "URLInputButton", function() { return /* reexport */ URLInputButton; });
2112  __webpack_require__.d(__webpack_exports__, "URLPopover", function() { return /* reexport */ URLPopover; });
2113  __webpack_require__.d(__webpack_exports__, "Warning", function() { return /* reexport */ Warning; });
2114  __webpack_require__.d(__webpack_exports__, "WritingFlow", function() { return /* reexport */ WritingFlow; });
2115  __webpack_require__.d(__webpack_exports__, "createCustomColorsHOC", function() { return /* reexport */ createCustomColorsHOC; });
2116  __webpack_require__.d(__webpack_exports__, "getColorClassName", function() { return /* reexport */ getColorClassName; });
2117  __webpack_require__.d(__webpack_exports__, "getColorObjectByAttributeValues", function() { return /* reexport */ getColorObjectByAttributeValues; });
2118  __webpack_require__.d(__webpack_exports__, "getColorObjectByColorValue", function() { return /* reexport */ getColorObjectByColorValue; });
2119  __webpack_require__.d(__webpack_exports__, "getFontSize", function() { return /* reexport */ getFontSize; });
2120  __webpack_require__.d(__webpack_exports__, "getFontSizeClass", function() { return /* reexport */ getFontSizeClass; });
2121  __webpack_require__.d(__webpack_exports__, "withColorContext", function() { return /* reexport */ withColorContext; });
2122  __webpack_require__.d(__webpack_exports__, "withColors", function() { return /* reexport */ withColors; });
2123  __webpack_require__.d(__webpack_exports__, "withFontSizes", function() { return /* reexport */ withFontSizes; });
2124  __webpack_require__.d(__webpack_exports__, "mediaUpload", function() { return /* reexport */ mediaUpload; });
2125  __webpack_require__.d(__webpack_exports__, "cleanForSlug", function() { return /* reexport */ cleanForSlug; });
2126  __webpack_require__.d(__webpack_exports__, "storeConfig", function() { return /* reexport */ storeConfig; });
2127  __webpack_require__.d(__webpack_exports__, "transformStyles", function() { return /* reexport */ external_this_wp_blockEditor_["transformStyles"]; });
2128  
2129  // NAMESPACE OBJECT: ./node_modules/@wordpress/editor/build-module/store/actions.js
2130  var actions_namespaceObject = {};
2131  __webpack_require__.r(actions_namespaceObject);
2132  __webpack_require__.d(actions_namespaceObject, "setupEditor", function() { return setupEditor; });
2133  __webpack_require__.d(actions_namespaceObject, "__experimentalTearDownEditor", function() { return __experimentalTearDownEditor; });
2134  __webpack_require__.d(actions_namespaceObject, "resetPost", function() { return resetPost; });
2135  __webpack_require__.d(actions_namespaceObject, "resetAutosave", function() { return resetAutosave; });
2136  __webpack_require__.d(actions_namespaceObject, "__experimentalRequestPostUpdateStart", function() { return __experimentalRequestPostUpdateStart; });
2137  __webpack_require__.d(actions_namespaceObject, "__experimentalRequestPostUpdateFinish", function() { return __experimentalRequestPostUpdateFinish; });
2138  __webpack_require__.d(actions_namespaceObject, "updatePost", function() { return updatePost; });
2139  __webpack_require__.d(actions_namespaceObject, "setupEditorState", function() { return setupEditorState; });
2140  __webpack_require__.d(actions_namespaceObject, "editPost", function() { return actions_editPost; });
2141  __webpack_require__.d(actions_namespaceObject, "__experimentalOptimisticUpdatePost", function() { return __experimentalOptimisticUpdatePost; });
2142  __webpack_require__.d(actions_namespaceObject, "savePost", function() { return actions_savePost; });
2143  __webpack_require__.d(actions_namespaceObject, "refreshPost", function() { return refreshPost; });
2144  __webpack_require__.d(actions_namespaceObject, "trashPost", function() { return trashPost; });
2145  __webpack_require__.d(actions_namespaceObject, "autosave", function() { return actions_autosave; });
2146  __webpack_require__.d(actions_namespaceObject, "__experimentalLocalAutosave", function() { return actions_experimentalLocalAutosave; });
2147  __webpack_require__.d(actions_namespaceObject, "redo", function() { return actions_redo; });
2148  __webpack_require__.d(actions_namespaceObject, "undo", function() { return actions_undo; });
2149  __webpack_require__.d(actions_namespaceObject, "createUndoLevel", function() { return createUndoLevel; });
2150  __webpack_require__.d(actions_namespaceObject, "updatePostLock", function() { return updatePostLock; });
2151  __webpack_require__.d(actions_namespaceObject, "__experimentalFetchReusableBlocks", function() { return actions_experimentalFetchReusableBlocks; });
2152  __webpack_require__.d(actions_namespaceObject, "__experimentalReceiveReusableBlocks", function() { return __experimentalReceiveReusableBlocks; });
2153  __webpack_require__.d(actions_namespaceObject, "__experimentalSaveReusableBlock", function() { return __experimentalSaveReusableBlock; });
2154  __webpack_require__.d(actions_namespaceObject, "__experimentalDeleteReusableBlock", function() { return __experimentalDeleteReusableBlock; });
2155  __webpack_require__.d(actions_namespaceObject, "__experimentalUpdateReusableBlock", function() { return __experimentalUpdateReusableBlock; });
2156  __webpack_require__.d(actions_namespaceObject, "__experimentalConvertBlockToStatic", function() { return __experimentalConvertBlockToStatic; });
2157  __webpack_require__.d(actions_namespaceObject, "__experimentalConvertBlockToReusable", function() { return __experimentalConvertBlockToReusable; });
2158  __webpack_require__.d(actions_namespaceObject, "enablePublishSidebar", function() { return enablePublishSidebar; });
2159  __webpack_require__.d(actions_namespaceObject, "disablePublishSidebar", function() { return disablePublishSidebar; });
2160  __webpack_require__.d(actions_namespaceObject, "lockPostSaving", function() { return lockPostSaving; });
2161  __webpack_require__.d(actions_namespaceObject, "unlockPostSaving", function() { return unlockPostSaving; });
2162  __webpack_require__.d(actions_namespaceObject, "lockPostAutosaving", function() { return lockPostAutosaving; });
2163  __webpack_require__.d(actions_namespaceObject, "unlockPostAutosaving", function() { return unlockPostAutosaving; });
2164  __webpack_require__.d(actions_namespaceObject, "resetEditorBlocks", function() { return actions_resetEditorBlocks; });
2165  __webpack_require__.d(actions_namespaceObject, "updateEditorSettings", function() { return updateEditorSettings; });
2166  __webpack_require__.d(actions_namespaceObject, "resetBlocks", function() { return resetBlocks; });
2167  __webpack_require__.d(actions_namespaceObject, "receiveBlocks", function() { return receiveBlocks; });
2168  __webpack_require__.d(actions_namespaceObject, "updateBlock", function() { return updateBlock; });
2169  __webpack_require__.d(actions_namespaceObject, "updateBlockAttributes", function() { return updateBlockAttributes; });
2170  __webpack_require__.d(actions_namespaceObject, "selectBlock", function() { return actions_selectBlock; });
2171  __webpack_require__.d(actions_namespaceObject, "startMultiSelect", function() { return startMultiSelect; });
2172  __webpack_require__.d(actions_namespaceObject, "stopMultiSelect", function() { return stopMultiSelect; });
2173  __webpack_require__.d(actions_namespaceObject, "multiSelect", function() { return multiSelect; });
2174  __webpack_require__.d(actions_namespaceObject, "clearSelectedBlock", function() { return clearSelectedBlock; });
2175  __webpack_require__.d(actions_namespaceObject, "toggleSelection", function() { return toggleSelection; });
2176  __webpack_require__.d(actions_namespaceObject, "replaceBlocks", function() { return actions_replaceBlocks; });
2177  __webpack_require__.d(actions_namespaceObject, "replaceBlock", function() { return replaceBlock; });
2178  __webpack_require__.d(actions_namespaceObject, "moveBlocksDown", function() { return moveBlocksDown; });
2179  __webpack_require__.d(actions_namespaceObject, "moveBlocksUp", function() { return moveBlocksUp; });
2180  __webpack_require__.d(actions_namespaceObject, "moveBlockToPosition", function() { return moveBlockToPosition; });
2181  __webpack_require__.d(actions_namespaceObject, "insertBlock", function() { return insertBlock; });
2182  __webpack_require__.d(actions_namespaceObject, "insertBlocks", function() { return insertBlocks; });
2183  __webpack_require__.d(actions_namespaceObject, "showInsertionPoint", function() { return showInsertionPoint; });
2184  __webpack_require__.d(actions_namespaceObject, "hideInsertionPoint", function() { return hideInsertionPoint; });
2185  __webpack_require__.d(actions_namespaceObject, "setTemplateValidity", function() { return setTemplateValidity; });
2186  __webpack_require__.d(actions_namespaceObject, "synchronizeTemplate", function() { return synchronizeTemplate; });
2187  __webpack_require__.d(actions_namespaceObject, "mergeBlocks", function() { return mergeBlocks; });
2188  __webpack_require__.d(actions_namespaceObject, "removeBlocks", function() { return removeBlocks; });
2189  __webpack_require__.d(actions_namespaceObject, "removeBlock", function() { return removeBlock; });
2190  __webpack_require__.d(actions_namespaceObject, "toggleBlockMode", function() { return toggleBlockMode; });
2191  __webpack_require__.d(actions_namespaceObject, "startTyping", function() { return startTyping; });
2192  __webpack_require__.d(actions_namespaceObject, "stopTyping", function() { return stopTyping; });
2193  __webpack_require__.d(actions_namespaceObject, "enterFormattedText", function() { return enterFormattedText; });
2194  __webpack_require__.d(actions_namespaceObject, "exitFormattedText", function() { return exitFormattedText; });
2195  __webpack_require__.d(actions_namespaceObject, "insertDefaultBlock", function() { return insertDefaultBlock; });
2196  __webpack_require__.d(actions_namespaceObject, "updateBlockListSettings", function() { return updateBlockListSettings; });
2197  
2198  // NAMESPACE OBJECT: ./node_modules/@wordpress/editor/build-module/store/selectors.js
2199  var selectors_namespaceObject = {};
2200  __webpack_require__.r(selectors_namespaceObject);
2201  __webpack_require__.d(selectors_namespaceObject, "hasEditorUndo", function() { return hasEditorUndo; });
2202  __webpack_require__.d(selectors_namespaceObject, "hasEditorRedo", function() { return hasEditorRedo; });
2203  __webpack_require__.d(selectors_namespaceObject, "isEditedPostNew", function() { return isEditedPostNew; });
2204  __webpack_require__.d(selectors_namespaceObject, "hasChangedContent", function() { return hasChangedContent; });
2205  __webpack_require__.d(selectors_namespaceObject, "isEditedPostDirty", function() { return selectors_isEditedPostDirty; });
2206  __webpack_require__.d(selectors_namespaceObject, "hasNonPostEntityChanges", function() { return selectors_hasNonPostEntityChanges; });
2207  __webpack_require__.d(selectors_namespaceObject, "isCleanNewPost", function() { return selectors_isCleanNewPost; });
2208  __webpack_require__.d(selectors_namespaceObject, "getCurrentPost", function() { return selectors_getCurrentPost; });
2209  __webpack_require__.d(selectors_namespaceObject, "getCurrentPostType", function() { return selectors_getCurrentPostType; });
2210  __webpack_require__.d(selectors_namespaceObject, "getCurrentPostId", function() { return selectors_getCurrentPostId; });
2211  __webpack_require__.d(selectors_namespaceObject, "getCurrentPostRevisionsCount", function() { return getCurrentPostRevisionsCount; });
2212  __webpack_require__.d(selectors_namespaceObject, "getCurrentPostLastRevisionId", function() { return getCurrentPostLastRevisionId; });
2213  __webpack_require__.d(selectors_namespaceObject, "getPostEdits", function() { return getPostEdits; });
2214  __webpack_require__.d(selectors_namespaceObject, "getReferenceByDistinctEdits", function() { return getReferenceByDistinctEdits; });
2215  __webpack_require__.d(selectors_namespaceObject, "getCurrentPostAttribute", function() { return selectors_getCurrentPostAttribute; });
2216  __webpack_require__.d(selectors_namespaceObject, "getEditedPostAttribute", function() { return selectors_getEditedPostAttribute; });
2217  __webpack_require__.d(selectors_namespaceObject, "getAutosaveAttribute", function() { return getAutosaveAttribute; });
2218  __webpack_require__.d(selectors_namespaceObject, "getEditedPostVisibility", function() { return selectors_getEditedPostVisibility; });
2219  __webpack_require__.d(selectors_namespaceObject, "isCurrentPostPending", function() { return isCurrentPostPending; });
2220  __webpack_require__.d(selectors_namespaceObject, "isCurrentPostPublished", function() { return selectors_isCurrentPostPublished; });
2221  __webpack_require__.d(selectors_namespaceObject, "isCurrentPostScheduled", function() { return selectors_isCurrentPostScheduled; });
2222  __webpack_require__.d(selectors_namespaceObject, "isEditedPostPublishable", function() { return selectors_isEditedPostPublishable; });
2223  __webpack_require__.d(selectors_namespaceObject, "isEditedPostSaveable", function() { return selectors_isEditedPostSaveable; });
2224  __webpack_require__.d(selectors_namespaceObject, "isEditedPostEmpty", function() { return isEditedPostEmpty; });
2225  __webpack_require__.d(selectors_namespaceObject, "isEditedPostAutosaveable", function() { return selectors_isEditedPostAutosaveable; });
2226  __webpack_require__.d(selectors_namespaceObject, "getAutosave", function() { return getAutosave; });
2227  __webpack_require__.d(selectors_namespaceObject, "hasAutosave", function() { return hasAutosave; });
2228  __webpack_require__.d(selectors_namespaceObject, "isEditedPostBeingScheduled", function() { return selectors_isEditedPostBeingScheduled; });
2229  __webpack_require__.d(selectors_namespaceObject, "isEditedPostDateFloating", function() { return isEditedPostDateFloating; });
2230  __webpack_require__.d(selectors_namespaceObject, "isSavingPost", function() { return selectors_isSavingPost; });
2231  __webpack_require__.d(selectors_namespaceObject, "didPostSaveRequestSucceed", function() { return didPostSaveRequestSucceed; });
2232  __webpack_require__.d(selectors_namespaceObject, "didPostSaveRequestFail", function() { return didPostSaveRequestFail; });
2233  __webpack_require__.d(selectors_namespaceObject, "isAutosavingPost", function() { return selectors_isAutosavingPost; });
2234  __webpack_require__.d(selectors_namespaceObject, "isPreviewingPost", function() { return isPreviewingPost; });
2235  __webpack_require__.d(selectors_namespaceObject, "getEditedPostPreviewLink", function() { return selectors_getEditedPostPreviewLink; });
2236  __webpack_require__.d(selectors_namespaceObject, "getSuggestedPostFormat", function() { return selectors_getSuggestedPostFormat; });
2237  __webpack_require__.d(selectors_namespaceObject, "getBlocksForSerialization", function() { return getBlocksForSerialization; });
2238  __webpack_require__.d(selectors_namespaceObject, "getEditedPostContent", function() { return getEditedPostContent; });
2239  __webpack_require__.d(selectors_namespaceObject, "__experimentalGetReusableBlock", function() { return __experimentalGetReusableBlock; });
2240  __webpack_require__.d(selectors_namespaceObject, "__experimentalIsSavingReusableBlock", function() { return __experimentalIsSavingReusableBlock; });
2241  __webpack_require__.d(selectors_namespaceObject, "__experimentalIsFetchingReusableBlock", function() { return __experimentalIsFetchingReusableBlock; });
2242  __webpack_require__.d(selectors_namespaceObject, "__experimentalGetReusableBlocks", function() { return selectors_experimentalGetReusableBlocks; });
2243  __webpack_require__.d(selectors_namespaceObject, "getStateBeforeOptimisticTransaction", function() { return getStateBeforeOptimisticTransaction; });
2244  __webpack_require__.d(selectors_namespaceObject, "isPublishingPost", function() { return selectors_isPublishingPost; });
2245  __webpack_require__.d(selectors_namespaceObject, "isPermalinkEditable", function() { return isPermalinkEditable; });
2246  __webpack_require__.d(selectors_namespaceObject, "getPermalink", function() { return getPermalink; });
2247  __webpack_require__.d(selectors_namespaceObject, "getEditedPostSlug", function() { return getEditedPostSlug; });
2248  __webpack_require__.d(selectors_namespaceObject, "getPermalinkParts", function() { return getPermalinkParts; });
2249  __webpack_require__.d(selectors_namespaceObject, "inSomeHistory", function() { return inSomeHistory; });
2250  __webpack_require__.d(selectors_namespaceObject, "isPostLocked", function() { return isPostLocked; });
2251  __webpack_require__.d(selectors_namespaceObject, "isPostSavingLocked", function() { return selectors_isPostSavingLocked; });
2252  __webpack_require__.d(selectors_namespaceObject, "isPostAutosavingLocked", function() { return isPostAutosavingLocked; });
2253  __webpack_require__.d(selectors_namespaceObject, "isPostLockTakeover", function() { return isPostLockTakeover; });
2254  __webpack_require__.d(selectors_namespaceObject, "getPostLockUser", function() { return getPostLockUser; });
2255  __webpack_require__.d(selectors_namespaceObject, "getActivePostLock", function() { return getActivePostLock; });
2256  __webpack_require__.d(selectors_namespaceObject, "canUserUseUnfilteredHTML", function() { return selectors_canUserUseUnfilteredHTML; });
2257  __webpack_require__.d(selectors_namespaceObject, "isPublishSidebarEnabled", function() { return selectors_isPublishSidebarEnabled; });
2258  __webpack_require__.d(selectors_namespaceObject, "getEditorBlocks", function() { return selectors_getEditorBlocks; });
2259  __webpack_require__.d(selectors_namespaceObject, "getEditorSelectionStart", function() { return selectors_getEditorSelectionStart; });
2260  __webpack_require__.d(selectors_namespaceObject, "getEditorSelectionEnd", function() { return selectors_getEditorSelectionEnd; });
2261  __webpack_require__.d(selectors_namespaceObject, "__unstableIsEditorReady", function() { return __unstableIsEditorReady; });
2262  __webpack_require__.d(selectors_namespaceObject, "getEditorSettings", function() { return selectors_getEditorSettings; });
2263  __webpack_require__.d(selectors_namespaceObject, "getBlockName", function() { return getBlockName; });
2264  __webpack_require__.d(selectors_namespaceObject, "isBlockValid", function() { return isBlockValid; });
2265  __webpack_require__.d(selectors_namespaceObject, "getBlockAttributes", function() { return getBlockAttributes; });
2266  __webpack_require__.d(selectors_namespaceObject, "getBlock", function() { return selectors_getBlock; });
2267  __webpack_require__.d(selectors_namespaceObject, "getBlocks", function() { return selectors_getBlocks; });
2268  __webpack_require__.d(selectors_namespaceObject, "__unstableGetBlockWithoutInnerBlocks", function() { return __unstableGetBlockWithoutInnerBlocks; });
2269  __webpack_require__.d(selectors_namespaceObject, "getClientIdsOfDescendants", function() { return getClientIdsOfDescendants; });
2270  __webpack_require__.d(selectors_namespaceObject, "getClientIdsWithDescendants", function() { return getClientIdsWithDescendants; });
2271  __webpack_require__.d(selectors_namespaceObject, "getGlobalBlockCount", function() { return getGlobalBlockCount; });
2272  __webpack_require__.d(selectors_namespaceObject, "getBlocksByClientId", function() { return selectors_getBlocksByClientId; });
2273  __webpack_require__.d(selectors_namespaceObject, "getBlockCount", function() { return getBlockCount; });
2274  __webpack_require__.d(selectors_namespaceObject, "getBlockSelectionStart", function() { return getBlockSelectionStart; });
2275  __webpack_require__.d(selectors_namespaceObject, "getBlockSelectionEnd", function() { return getBlockSelectionEnd; });
2276  __webpack_require__.d(selectors_namespaceObject, "getSelectedBlockCount", function() { return getSelectedBlockCount; });
2277  __webpack_require__.d(selectors_namespaceObject, "hasSelectedBlock", function() { return hasSelectedBlock; });
2278  __webpack_require__.d(selectors_namespaceObject, "getSelectedBlockClientId", function() { return getSelectedBlockClientId; });
2279  __webpack_require__.d(selectors_namespaceObject, "getSelectedBlock", function() { return getSelectedBlock; });
2280  __webpack_require__.d(selectors_namespaceObject, "getBlockRootClientId", function() { return getBlockRootClientId; });
2281  __webpack_require__.d(selectors_namespaceObject, "getBlockHierarchyRootClientId", function() { return getBlockHierarchyRootClientId; });
2282  __webpack_require__.d(selectors_namespaceObject, "getAdjacentBlockClientId", function() { return getAdjacentBlockClientId; });
2283  __webpack_require__.d(selectors_namespaceObject, "getPreviousBlockClientId", function() { return getPreviousBlockClientId; });
2284  __webpack_require__.d(selectors_namespaceObject, "getNextBlockClientId", function() { return getNextBlockClientId; });
2285  __webpack_require__.d(selectors_namespaceObject, "getSelectedBlocksInitialCaretPosition", function() { return getSelectedBlocksInitialCaretPosition; });
2286  __webpack_require__.d(selectors_namespaceObject, "getMultiSelectedBlockClientIds", function() { return getMultiSelectedBlockClientIds; });
2287  __webpack_require__.d(selectors_namespaceObject, "getMultiSelectedBlocks", function() { return getMultiSelectedBlocks; });
2288  __webpack_require__.d(selectors_namespaceObject, "getFirstMultiSelectedBlockClientId", function() { return getFirstMultiSelectedBlockClientId; });
2289  __webpack_require__.d(selectors_namespaceObject, "getLastMultiSelectedBlockClientId", function() { return getLastMultiSelectedBlockClientId; });
2290  __webpack_require__.d(selectors_namespaceObject, "isFirstMultiSelectedBlock", function() { return isFirstMultiSelectedBlock; });
2291  __webpack_require__.d(selectors_namespaceObject, "isBlockMultiSelected", function() { return isBlockMultiSelected; });
2292  __webpack_require__.d(selectors_namespaceObject, "isAncestorMultiSelected", function() { return isAncestorMultiSelected; });
2293  __webpack_require__.d(selectors_namespaceObject, "getMultiSelectedBlocksStartClientId", function() { return getMultiSelectedBlocksStartClientId; });
2294  __webpack_require__.d(selectors_namespaceObject, "getMultiSelectedBlocksEndClientId", function() { return getMultiSelectedBlocksEndClientId; });
2295  __webpack_require__.d(selectors_namespaceObject, "getBlockOrder", function() { return getBlockOrder; });
2296  __webpack_require__.d(selectors_namespaceObject, "getBlockIndex", function() { return getBlockIndex; });
2297  __webpack_require__.d(selectors_namespaceObject, "isBlockSelected", function() { return isBlockSelected; });
2298  __webpack_require__.d(selectors_namespaceObject, "hasSelectedInnerBlock", function() { return hasSelectedInnerBlock; });
2299  __webpack_require__.d(selectors_namespaceObject, "isBlockWithinSelection", function() { return isBlockWithinSelection; });
2300  __webpack_require__.d(selectors_namespaceObject, "hasMultiSelection", function() { return hasMultiSelection; });
2301  __webpack_require__.d(selectors_namespaceObject, "isMultiSelecting", function() { return isMultiSelecting; });
2302  __webpack_require__.d(selectors_namespaceObject, "isSelectionEnabled", function() { return isSelectionEnabled; });
2303  __webpack_require__.d(selectors_namespaceObject, "getBlockMode", function() { return getBlockMode; });
2304  __webpack_require__.d(selectors_namespaceObject, "isTyping", function() { return isTyping; });
2305  __webpack_require__.d(selectors_namespaceObject, "isCaretWithinFormattedText", function() { return isCaretWithinFormattedText; });
2306  __webpack_require__.d(selectors_namespaceObject, "getBlockInsertionPoint", function() { return getBlockInsertionPoint; });
2307  __webpack_require__.d(selectors_namespaceObject, "isBlockInsertionPointVisible", function() { return isBlockInsertionPointVisible; });
2308  __webpack_require__.d(selectors_namespaceObject, "isValidTemplate", function() { return isValidTemplate; });
2309  __webpack_require__.d(selectors_namespaceObject, "getTemplate", function() { return getTemplate; });
2310  __webpack_require__.d(selectors_namespaceObject, "getTemplateLock", function() { return getTemplateLock; });
2311  __webpack_require__.d(selectors_namespaceObject, "canInsertBlockType", function() { return selectors_canInsertBlockType; });
2312  __webpack_require__.d(selectors_namespaceObject, "getInserterItems", function() { return getInserterItems; });
2313  __webpack_require__.d(selectors_namespaceObject, "hasInserterItems", function() { return hasInserterItems; });
2314  __webpack_require__.d(selectors_namespaceObject, "getBlockListSettings", function() { return getBlockListSettings; });
2315  
2316  // EXTERNAL MODULE: external {"this":["wp","blockEditor"]}
2317  var external_this_wp_blockEditor_ = __webpack_require__(7);
2318  
2319  // EXTERNAL MODULE: external {"this":["wp","blocks"]}
2320  var external_this_wp_blocks_ = __webpack_require__(12);
2321  
2322  // EXTERNAL MODULE: external {"this":["wp","coreData"]}
2323  var external_this_wp_coreData_ = __webpack_require__(89);
2324  
2325  // EXTERNAL MODULE: external {"this":["wp","keyboardShortcuts"]}
2326  var external_this_wp_keyboardShortcuts_ = __webpack_require__(47);
2327  
2328  // EXTERNAL MODULE: external {"this":["wp","notices"]}
2329  var external_this_wp_notices_ = __webpack_require__(184);
2330  
2331  // EXTERNAL MODULE: external {"this":["wp","richText"]}
2332  var external_this_wp_richText_ = __webpack_require__(25);
2333  
2334  // EXTERNAL MODULE: external {"this":["wp","viewport"]}
2335  var external_this_wp_viewport_ = __webpack_require__(72);
2336  
2337  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
2338  var defineProperty = __webpack_require__(5);
2339  
2340  // EXTERNAL MODULE: external {"this":["wp","data"]}
2341  var external_this_wp_data_ = __webpack_require__(4);
2342  
2343  // EXTERNAL MODULE: external {"this":["wp","dataControls"]}
2344  var external_this_wp_dataControls_ = __webpack_require__(36);
2345  
2346  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
2347  var esm_typeof = __webpack_require__(40);
2348  
2349  // EXTERNAL MODULE: ./node_modules/redux-optimist/index.js
2350  var redux_optimist = __webpack_require__(129);
2351  var redux_optimist_default = /*#__PURE__*/__webpack_require__.n(redux_optimist);
2352  
2353  // EXTERNAL MODULE: external {"this":"lodash"}
2354  var external_this_lodash_ = __webpack_require__(2);
2355  
2356  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/defaults.js
2357  
2358  
2359  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
2360  
2361  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
2362  
2363  /**
2364   * WordPress dependencies
2365   */
2366  
2367  var PREFERENCES_DEFAULTS = {
2368    insertUsage: {},
2369    // Should be kept for backward compatibility, see: https://github.com/WordPress/gutenberg/issues/14580.
2370    isPublishSidebarEnabled: true
2371  };
2372  /**
2373   * The default post editor settings
2374   *
2375   *  allowedBlockTypes  boolean|Array Allowed block types
2376   *  richEditingEnabled boolean       Whether rich editing is enabled or not
2377   *  codeEditingEnabled boolean       Whether code editing is enabled or not
2378   *  enableCustomFields boolean       Whether the WordPress custom fields are enabled or not
2379   *  autosaveInterval   number        Autosave Interval
2380   *  availableTemplates array?        The available post templates
2381   *  disablePostFormats boolean       Whether or not the post formats are disabled
2382   *  allowedMimeTypes   array?        List of allowed mime types and file extensions
2383   *  maxUploadFileSize  number        Maximum upload file size
2384   */
2385  
2386  var EDITOR_SETTINGS_DEFAULTS = _objectSpread({}, external_this_wp_blockEditor_["SETTINGS_DEFAULTS"], {
2387    richEditingEnabled: true,
2388    codeEditingEnabled: true,
2389    enableCustomFields: false
2390  });
2391  
2392  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/reducer.js
2393  
2394  
2395  
2396  function reducer_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
2397  
2398  function reducer_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { reducer_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { reducer_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
2399  
2400  /**
2401   * External dependencies
2402   */
2403  
2404  
2405  /**
2406   * WordPress dependencies
2407   */
2408  
2409  
2410  /**
2411   * Internal dependencies
2412   */
2413  
2414  
2415  /**
2416   * Returns a post attribute value, flattening nested rendered content using its
2417   * raw value in place of its original object form.
2418   *
2419   * @param {*} value Original value.
2420   *
2421   * @return {*} Raw value.
2422   */
2423  
2424  function getPostRawValue(value) {
2425    if (value && 'object' === Object(esm_typeof["a" /* default */])(value) && 'raw' in value) {
2426      return value.raw;
2427    }
2428  
2429    return value;
2430  }
2431  /**
2432   * Returns true if the two object arguments have the same keys, or false
2433   * otherwise.
2434   *
2435   * @param {Object} a First object.
2436   * @param {Object} b Second object.
2437   *
2438   * @return {boolean} Whether the two objects have the same keys.
2439   */
2440  
2441  function hasSameKeys(a, b) {
2442    return Object(external_this_lodash_["isEqual"])(Object(external_this_lodash_["keys"])(a), Object(external_this_lodash_["keys"])(b));
2443  }
2444  /**
2445   * Returns true if, given the currently dispatching action and the previously
2446   * dispatched action, the two actions are editing the same post property, or
2447   * false otherwise.
2448   *
2449   * @param {Object} action         Currently dispatching action.
2450   * @param {Object} previousAction Previously dispatched action.
2451   *
2452   * @return {boolean} Whether actions are updating the same post property.
2453   */
2454  
2455  function isUpdatingSamePostProperty(action, previousAction) {
2456    return action.type === 'EDIT_POST' && hasSameKeys(action.edits, previousAction.edits);
2457  }
2458  /**
2459   * Returns true if, given the currently dispatching action and the previously
2460   * dispatched action, the two actions are modifying the same property such that
2461   * undo history should be batched.
2462   *
2463   * @param {Object} action         Currently dispatching action.
2464   * @param {Object} previousAction Previously dispatched action.
2465   *
2466   * @return {boolean} Whether to overwrite present state.
2467   */
2468  
2469  function shouldOverwriteState(action, previousAction) {
2470    if (action.type === 'RESET_EDITOR_BLOCKS') {
2471      return !action.shouldCreateUndoLevel;
2472    }
2473  
2474    if (!previousAction || action.type !== previousAction.type) {
2475      return false;
2476    }
2477  
2478    return isUpdatingSamePostProperty(action, previousAction);
2479  }
2480  function reducer_postId() {
2481    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
2482    var action = arguments.length > 1 ? arguments[1] : undefined;
2483  
2484    switch (action.type) {
2485      case 'SETUP_EDITOR_STATE':
2486      case 'RESET_POST':
2487      case 'UPDATE_POST':
2488        return action.post.id;
2489    }
2490  
2491    return state;
2492  }
2493  function reducer_postType() {
2494    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
2495    var action = arguments.length > 1 ? arguments[1] : undefined;
2496  
2497    switch (action.type) {
2498      case 'SETUP_EDITOR_STATE':
2499      case 'RESET_POST':
2500      case 'UPDATE_POST':
2501        return action.post.type;
2502    }
2503  
2504    return state;
2505  }
2506  /**
2507   * Reducer returning whether the post blocks match the defined template or not.
2508   *
2509   * @param {Object} state  Current state.
2510   * @param {Object} action Dispatched action.
2511   *
2512   * @return {boolean} Updated state.
2513   */
2514  
2515  function reducer_template() {
2516    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
2517      isValid: true
2518    };
2519    var action = arguments.length > 1 ? arguments[1] : undefined;
2520  
2521    switch (action.type) {
2522      case 'SET_TEMPLATE_VALIDITY':
2523        return reducer_objectSpread({}, state, {
2524          isValid: action.isValid
2525        });
2526    }
2527  
2528    return state;
2529  }
2530  /**
2531   * Reducer returning the user preferences.
2532   *
2533   * @param {Object}  state                 Current state.
2534   * @param {Object}  action                Dispatched action.
2535   *
2536   * @return {string} Updated state.
2537   */
2538  
2539  function preferences() {
2540    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : PREFERENCES_DEFAULTS;
2541    var action = arguments.length > 1 ? arguments[1] : undefined;
2542  
2543    switch (action.type) {
2544      case 'ENABLE_PUBLISH_SIDEBAR':
2545        return reducer_objectSpread({}, state, {
2546          isPublishSidebarEnabled: true
2547        });
2548  
2549      case 'DISABLE_PUBLISH_SIDEBAR':
2550        return reducer_objectSpread({}, state, {
2551          isPublishSidebarEnabled: false
2552        });
2553    }
2554  
2555    return state;
2556  }
2557  /**
2558   * Reducer returning current network request state (whether a request to
2559   * the WP REST API is in progress, successful, or failed).
2560   *
2561   * @param {Object} state  Current state.
2562   * @param {Object} action Dispatched action.
2563   *
2564   * @return {Object} Updated state.
2565   */
2566  
2567  function saving() {
2568    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2569    var action = arguments.length > 1 ? arguments[1] : undefined;
2570  
2571    switch (action.type) {
2572      case 'REQUEST_POST_UPDATE_START':
2573      case 'REQUEST_POST_UPDATE_FINISH':
2574        return {
2575          pending: action.type === 'REQUEST_POST_UPDATE_START',
2576          options: action.options || {}
2577        };
2578    }
2579  
2580    return state;
2581  }
2582  /**
2583   * Post Lock State.
2584   *
2585   * @typedef {Object} PostLockState
2586   *
2587   * @property {boolean} isLocked       Whether the post is locked.
2588   * @property {?boolean} isTakeover     Whether the post editing has been taken over.
2589   * @property {?boolean} activePostLock Active post lock value.
2590   * @property {?Object}  user           User that took over the post.
2591   */
2592  
2593  /**
2594   * Reducer returning the post lock status.
2595   *
2596   * @param {PostLockState} state  Current state.
2597   * @param {Object} action Dispatched action.
2598   *
2599   * @return {PostLockState} Updated state.
2600   */
2601  
2602  function postLock() {
2603    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
2604      isLocked: false
2605    };
2606    var action = arguments.length > 1 ? arguments[1] : undefined;
2607  
2608    switch (action.type) {
2609      case 'UPDATE_POST_LOCK':
2610        return action.lock;
2611    }
2612  
2613    return state;
2614  }
2615  /**
2616   * Post saving lock.
2617   *
2618   * When post saving is locked, the post cannot be published or updated.
2619   *
2620   * @param {PostLockState} state  Current state.
2621   * @param {Object}        action Dispatched action.
2622   *
2623   * @return {PostLockState} Updated state.
2624   */
2625  
2626  function postSavingLock() {
2627    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2628    var action = arguments.length > 1 ? arguments[1] : undefined;
2629  
2630    switch (action.type) {
2631      case 'LOCK_POST_SAVING':
2632        return reducer_objectSpread({}, state, Object(defineProperty["a" /* default */])({}, action.lockName, true));
2633  
2634      case 'UNLOCK_POST_SAVING':
2635        return Object(external_this_lodash_["omit"])(state, action.lockName);
2636    }
2637  
2638    return state;
2639  }
2640  /**
2641   * Post autosaving lock.
2642   *
2643   * When post autosaving is locked, the post will not autosave.
2644   *
2645   * @param {PostLockState} state  Current state.
2646   * @param {Object}        action Dispatched action.
2647   *
2648   * @return {PostLockState} Updated state.
2649   */
2650  
2651  function postAutosavingLock() {
2652    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2653    var action = arguments.length > 1 ? arguments[1] : undefined;
2654  
2655    switch (action.type) {
2656      case 'LOCK_POST_AUTOSAVING':
2657        return reducer_objectSpread({}, state, Object(defineProperty["a" /* default */])({}, action.lockName, true));
2658  
2659      case 'UNLOCK_POST_AUTOSAVING':
2660        return Object(external_this_lodash_["omit"])(state, action.lockName);
2661    }
2662  
2663    return state;
2664  }
2665  var reducer_reusableBlocks = Object(external_this_wp_data_["combineReducers"])({
2666    data: function data() {
2667      var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2668      var action = arguments.length > 1 ? arguments[1] : undefined;
2669  
2670      switch (action.type) {
2671        case 'RECEIVE_REUSABLE_BLOCKS':
2672          {
2673            return reducer_objectSpread({}, state, {}, Object(external_this_lodash_["keyBy"])(action.results, 'id'));
2674          }
2675  
2676        case 'UPDATE_REUSABLE_BLOCK':
2677          {
2678            var id = action.id,
2679                changes = action.changes;
2680            return reducer_objectSpread({}, state, Object(defineProperty["a" /* default */])({}, id, reducer_objectSpread({}, state[id], {}, changes)));
2681          }
2682  
2683        case 'SAVE_REUSABLE_BLOCK_SUCCESS':
2684          {
2685            var _id = action.id,
2686                updatedId = action.updatedId; // If a temporary reusable block is saved, we swap the temporary id with the final one
2687  
2688            if (_id === updatedId) {
2689              return state;
2690            }
2691  
2692            var value = state[_id];
2693            return reducer_objectSpread({}, Object(external_this_lodash_["omit"])(state, _id), Object(defineProperty["a" /* default */])({}, updatedId, reducer_objectSpread({}, value, {
2694              id: updatedId
2695            })));
2696          }
2697  
2698        case 'REMOVE_REUSABLE_BLOCK':
2699          {
2700            var _id2 = action.id;
2701            return Object(external_this_lodash_["omit"])(state, _id2);
2702          }
2703      }
2704  
2705      return state;
2706    },
2707    isFetching: function isFetching() {
2708      var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2709      var action = arguments.length > 1 ? arguments[1] : undefined;
2710  
2711      switch (action.type) {
2712        case 'FETCH_REUSABLE_BLOCKS':
2713          {
2714            var id = action.id;
2715  
2716            if (!id) {
2717              return state;
2718            }
2719  
2720            return reducer_objectSpread({}, state, Object(defineProperty["a" /* default */])({}, id, true));
2721          }
2722  
2723        case 'FETCH_REUSABLE_BLOCKS_SUCCESS':
2724        case 'FETCH_REUSABLE_BLOCKS_FAILURE':
2725          {
2726            var _id3 = action.id;
2727            return Object(external_this_lodash_["omit"])(state, _id3);
2728          }
2729      }
2730  
2731      return state;
2732    },
2733    isSaving: function isSaving() {
2734      var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2735      var action = arguments.length > 1 ? arguments[1] : undefined;
2736  
2737      switch (action.type) {
2738        case 'SAVE_REUSABLE_BLOCK':
2739          return reducer_objectSpread({}, state, Object(defineProperty["a" /* default */])({}, action.id, true));
2740  
2741        case 'SAVE_REUSABLE_BLOCK_SUCCESS':
2742        case 'SAVE_REUSABLE_BLOCK_FAILURE':
2743          {
2744            var id = action.id;
2745            return Object(external_this_lodash_["omit"])(state, id);
2746          }
2747      }
2748  
2749      return state;
2750    }
2751  });
2752  /**
2753   * Reducer returning whether the editor is ready to be rendered.
2754   * The editor is considered ready to be rendered once
2755   * the post object is loaded properly and the initial blocks parsed.
2756   *
2757   * @param {boolean} state
2758   * @param {Object} action
2759   *
2760   * @return {boolean} Updated state.
2761   */
2762  
2763  function reducer_isReady() {
2764    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
2765    var action = arguments.length > 1 ? arguments[1] : undefined;
2766  
2767    switch (action.type) {
2768      case 'SETUP_EDITOR_STATE':
2769        return true;
2770  
2771      case 'TEAR_DOWN_EDITOR':
2772        return false;
2773    }
2774  
2775    return state;
2776  }
2777  /**
2778   * Reducer returning the post editor setting.
2779   *
2780   * @param {Object} state  Current state.
2781   * @param {Object} action Dispatched action.
2782   *
2783   * @return {Object} Updated state.
2784   */
2785  
2786  function reducer_editorSettings() {
2787    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : EDITOR_SETTINGS_DEFAULTS;
2788    var action = arguments.length > 1 ? arguments[1] : undefined;
2789  
2790    switch (action.type) {
2791      case 'UPDATE_EDITOR_SETTINGS':
2792        return reducer_objectSpread({}, state, {}, action.settings);
2793    }
2794  
2795    return state;
2796  }
2797  /* harmony default export */ var reducer = (redux_optimist_default()(Object(external_this_wp_data_["combineReducers"])({
2798    postId: reducer_postId,
2799    postType: reducer_postType,
2800    preferences: preferences,
2801    saving: saving,
2802    postLock: postLock,
2803    reusableBlocks: reducer_reusableBlocks,
2804    template: reducer_template,
2805    postSavingLock: postSavingLock,
2806    isReady: reducer_isReady,
2807    editorSettings: reducer_editorSettings,
2808    postAutosavingLock: postAutosavingLock
2809  })));
2810  
2811  // EXTERNAL MODULE: ./node_modules/refx/refx.js
2812  var refx = __webpack_require__(103);
2813  var refx_default = /*#__PURE__*/__webpack_require__.n(refx);
2814  
2815  // EXTERNAL MODULE: external {"this":"regeneratorRuntime"}
2816  var external_this_regeneratorRuntime_ = __webpack_require__(23);
2817  var external_this_regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(external_this_regeneratorRuntime_);
2818  
2819  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
2820  var asyncToGenerator = __webpack_require__(46);
2821  
2822  // EXTERNAL MODULE: external {"this":["wp","apiFetch"]}
2823  var external_this_wp_apiFetch_ = __webpack_require__(45);
2824  var external_this_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_apiFetch_);
2825  
2826  // EXTERNAL MODULE: external {"this":["wp","i18n"]}
2827  var external_this_wp_i18n_ = __webpack_require__(1);
2828  
2829  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
2830  var toConsumableArray = __webpack_require__(16);
2831  
2832  // EXTERNAL MODULE: external {"this":["wp","deprecated"]}
2833  var external_this_wp_deprecated_ = __webpack_require__(37);
2834  var external_this_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_deprecated_);
2835  
2836  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/constants.js
2837  /**
2838   * Set of post properties for which edits should assume a merging behavior,
2839   * assuming an object value.
2840   *
2841   * @type {Set}
2842   */
2843  var EDIT_MERGE_PROPERTIES = new Set(['meta']);
2844  /**
2845   * Constant for the store module (or reducer) key.
2846   *
2847   * @type {string}
2848   */
2849  
2850  var STORE_KEY = 'core/editor';
2851  var POST_UPDATE_TRANSACTION_ID = 'post-update';
2852  var SAVE_POST_NOTICE_ID = 'SAVE_POST_NOTICE_ID';
2853  var TRASH_POST_NOTICE_ID = 'TRASH_POST_NOTICE_ID';
2854  var PERMALINK_POSTNAME_REGEX = /%(?:postname|pagename)%/;
2855  var ONE_MINUTE_IN_MS = 60 * 1000;
2856  var AUTOSAVE_PROPERTIES = ['title', 'excerpt', 'content'];
2857  
2858  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/utils/notice-builder.js
2859  /**
2860   * WordPress dependencies
2861   */
2862  
2863  /**
2864   * Internal dependencies
2865   */
2866  
2867  
2868  /**
2869   * External dependencies
2870   */
2871  
2872  
2873  /**
2874   * Builds the arguments for a success notification dispatch.
2875   *
2876   * @param {Object} data Incoming data to build the arguments from.
2877   *
2878   * @return {Array} Arguments for dispatch. An empty array signals no
2879   *                 notification should be sent.
2880   */
2881  
2882  function getNotificationArgumentsForSaveSuccess(data) {
2883    var previousPost = data.previousPost,
2884        post = data.post,
2885        postType = data.postType; // Autosaves are neither shown a notice nor redirected.
2886  
2887    if (Object(external_this_lodash_["get"])(data.options, ['isAutosave'])) {
2888      return [];
2889    }
2890  
2891    var publishStatus = ['publish', 'private', 'future'];
2892    var isPublished = Object(external_this_lodash_["includes"])(publishStatus, previousPost.status);
2893    var willPublish = Object(external_this_lodash_["includes"])(publishStatus, post.status);
2894    var noticeMessage;
2895    var shouldShowLink = Object(external_this_lodash_["get"])(postType, ['viewable'], false);
2896  
2897    if (!isPublished && !willPublish) {
2898      // If saving a non-published post, don't show notice.
2899      noticeMessage = null;
2900    } else if (isPublished && !willPublish) {
2901      // If undoing publish status, show specific notice
2902      noticeMessage = postType.labels.item_reverted_to_draft;
2903      shouldShowLink = false;
2904    } else if (!isPublished && willPublish) {
2905      // If publishing or scheduling a post, show the corresponding
2906      // publish message
2907      noticeMessage = {
2908        publish: postType.labels.item_published,
2909        private: postType.labels.item_published_privately,
2910        future: postType.labels.item_scheduled
2911      }[post.status];
2912    } else {
2913      // Generic fallback notice
2914      noticeMessage = postType.labels.item_updated;
2915    }
2916  
2917    if (noticeMessage) {
2918      var actions = [];
2919  
2920      if (shouldShowLink) {
2921        actions.push({
2922          label: postType.labels.view_item,
2923          url: post.link
2924        });
2925      }
2926  
2927      return [noticeMessage, {
2928        id: SAVE_POST_NOTICE_ID,
2929        type: 'snackbar',
2930        actions: actions
2931      }];
2932    }
2933  
2934    return [];
2935  }
2936  /**
2937   * Builds the fail notification arguments for dispatch.
2938   *
2939   * @param {Object} data Incoming data to build the arguments with.
2940   *
2941   * @return {Array} Arguments for dispatch. An empty array signals no
2942   *                 notification should be sent.
2943   */
2944  
2945  function getNotificationArgumentsForSaveFail(data) {
2946    var post = data.post,
2947        edits = data.edits,
2948        error = data.error;
2949  
2950    if (error && 'rest_autosave_no_changes' === error.code) {
2951      // Autosave requested a new autosave, but there were no changes. This shouldn't
2952      // result in an error notice for the user.
2953      return [];
2954    }
2955  
2956    var publishStatus = ['publish', 'private', 'future'];
2957    var isPublished = publishStatus.indexOf(post.status) !== -1; // If the post was being published, we show the corresponding publish error message
2958    // Unless we publish an "updating failed" message
2959  
2960    var messages = {
2961      publish: Object(external_this_wp_i18n_["__"])('Publishing failed.'),
2962      private: Object(external_this_wp_i18n_["__"])('Publishing failed.'),
2963      future: Object(external_this_wp_i18n_["__"])('Scheduling failed.')
2964    };
2965    var noticeMessage = !isPublished && publishStatus.indexOf(edits.status) !== -1 ? messages[edits.status] : Object(external_this_wp_i18n_["__"])('Updating failed.'); // Check if message string contains HTML. Notice text is currently only
2966    // supported as plaintext, and stripping the tags may muddle the meaning.
2967  
2968    if (error.message && !/<\/?[^>]*>/.test(error.message)) {
2969      noticeMessage = [noticeMessage, error.message].join(' ');
2970    }
2971  
2972    return [noticeMessage, {
2973      id: SAVE_POST_NOTICE_ID
2974    }];
2975  }
2976  /**
2977   * Builds the trash fail notification arguments for dispatch.
2978   *
2979   * @param {Object} data
2980   *
2981   * @return {Array} Arguments for dispatch.
2982   */
2983  
2984  function getNotificationArgumentsForTrashFail(data) {
2985    return [data.error.message && data.error.code !== 'unknown_error' ? data.error.message : Object(external_this_wp_i18n_["__"])('Trashing failed'), {
2986      id: TRASH_POST_NOTICE_ID
2987    }];
2988  }
2989  
2990  // EXTERNAL MODULE: ./node_modules/memize/index.js
2991  var memize = __webpack_require__(50);
2992  var memize_default = /*#__PURE__*/__webpack_require__.n(memize);
2993  
2994  // EXTERNAL MODULE: external {"this":["wp","autop"]}
2995  var external_this_wp_autop_ = __webpack_require__(94);
2996  
2997  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/utils/serialize-blocks.js
2998  /**
2999   * External dependencies
3000   */
3001  
3002  /**
3003   * WordPress dependencies
3004   */
3005  
3006  
3007  
3008  /**
3009   * Serializes blocks following backwards compatibility conventions.
3010   *
3011   * @param {Array} blocksForSerialization The blocks to serialize.
3012   *
3013   * @return {string} The blocks serialization.
3014   */
3015  
3016  var serializeBlocks = memize_default()(function (blocksForSerialization) {
3017    // A single unmodified default block is assumed to
3018    // be equivalent to an empty post.
3019    if (blocksForSerialization.length === 1 && Object(external_this_wp_blocks_["isUnmodifiedDefaultBlock"])(blocksForSerialization[0])) {
3020      blocksForSerialization = [];
3021    }
3022  
3023    var content = Object(external_this_wp_blocks_["serialize"])(blocksForSerialization); // For compatibility, treat a post consisting of a
3024    // single freeform block as legacy content and apply
3025    // pre-block-editor removep'd content formatting.
3026  
3027    if (blocksForSerialization.length === 1 && blocksForSerialization[0].name === Object(external_this_wp_blocks_["getFreeformContentHandlerName"])()) {
3028      content = Object(external_this_wp_autop_["removep"])(content);
3029    }
3030  
3031    return content;
3032  }, {
3033    maxSize: 1
3034  });
3035  /* harmony default export */ var serialize_blocks = (serializeBlocks);
3036  
3037  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/actions.js
3038  
3039  
3040  
3041  
3042  function actions_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
3043  
3044  function actions_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { actions_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { actions_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
3045  
3046  var _marked = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(setupEditor),
3047      _marked2 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(resetAutosave),
3048      _marked3 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(actions_editPost),
3049      _marked4 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(actions_savePost),
3050      _marked5 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(refreshPost),
3051      _marked6 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(trashPost),
3052      _marked7 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(actions_autosave),
3053      _marked8 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(actions_experimentalLocalAutosave),
3054      _marked9 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(actions_redo),
3055      _marked10 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(actions_undo),
3056      _marked11 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(actions_resetEditorBlocks);
3057  
3058  /**
3059   * External dependencies
3060   */
3061  
3062  /**
3063   * WordPress dependencies
3064   */
3065  
3066  
3067  
3068  
3069  /**
3070   * Internal dependencies
3071   */
3072  
3073  
3074  
3075  
3076  /**
3077   * Returns an action generator used in signalling that editor has initialized with
3078   * the specified post object and editor settings.
3079   *
3080   * @param {Object} post      Post object.
3081   * @param {Object} edits     Initial edited attributes object.
3082   * @param {Array?} template  Block Template.
3083   */
3084  
3085  function setupEditor(post, edits, template) {
3086    var content, blocks, isNewPost;
3087    return external_this_regeneratorRuntime_default.a.wrap(function setupEditor$(_context) {
3088      while (1) {
3089        switch (_context.prev = _context.next) {
3090          case 0:
3091            // In order to ensure maximum of a single parse during setup, edits are
3092            // included as part of editor setup action. Assume edited content as
3093            // canonical if provided, falling back to post.
3094            if (Object(external_this_lodash_["has"])(edits, ['content'])) {
3095              content = edits.content;
3096            } else {
3097              content = post.content.raw;
3098            }
3099  
3100            blocks = Object(external_this_wp_blocks_["parse"])(content); // Apply a template for new posts only, if exists.
3101  
3102            isNewPost = post.status === 'auto-draft';
3103  
3104            if (isNewPost && template) {
3105              blocks = Object(external_this_wp_blocks_["synchronizeBlocksWithTemplate"])(blocks, template);
3106            }
3107  
3108            _context.next = 6;
3109            return resetPost(post);
3110  
3111          case 6:
3112            _context.next = 8;
3113            return {
3114              type: 'SETUP_EDITOR',
3115              post: post,
3116              edits: edits,
3117              template: template
3118            };
3119  
3120          case 8:
3121            _context.next = 10;
3122            return actions_resetEditorBlocks(blocks, {
3123              __unstableShouldCreateUndoLevel: false
3124            });
3125  
3126          case 10:
3127            _context.next = 12;
3128            return setupEditorState(post);
3129  
3130          case 12:
3131            if (!(edits && Object.keys(edits).some(function (key) {
3132              return edits[key] !== (Object(external_this_lodash_["has"])(post, [key, 'raw']) ? post[key].raw : post[key]);
3133            }))) {
3134              _context.next = 15;
3135              break;
3136            }
3137  
3138            _context.next = 15;
3139            return actions_editPost(edits);
3140  
3141          case 15:
3142          case "end":
3143            return _context.stop();
3144        }
3145      }
3146    }, _marked);
3147  }
3148  /**
3149   * Returns an action object signalling that the editor is being destroyed and
3150   * that any necessary state or side-effect cleanup should occur.
3151   *
3152   * @return {Object} Action object.
3153   */
3154  
3155  function __experimentalTearDownEditor() {
3156    return {
3157      type: 'TEAR_DOWN_EDITOR'
3158    };
3159  }
3160  /**
3161   * Returns an action object used in signalling that the latest version of the
3162   * post has been received, either by initialization or save.
3163   *
3164   * @param {Object} post Post object.
3165   *
3166   * @return {Object} Action object.
3167   */
3168  
3169  function resetPost(post) {
3170    return {
3171      type: 'RESET_POST',
3172      post: post
3173    };
3174  }
3175  /**
3176   * Returns an action object used in signalling that the latest autosave of the
3177   * post has been received, by initialization or autosave.
3178   *
3179   * @deprecated since 5.6. Callers should use the `receiveAutosaves( postId, autosave )`
3180   *                selector from the '@wordpress/core-data' package.
3181   *
3182   * @param {Object} newAutosave Autosave post object.
3183   *
3184   * @return {Object} Action object.
3185   */
3186  
3187  function resetAutosave(newAutosave) {
3188    var postId;
3189    return external_this_regeneratorRuntime_default.a.wrap(function resetAutosave$(_context2) {
3190      while (1) {
3191        switch (_context2.prev = _context2.next) {
3192          case 0:
3193            external_this_wp_deprecated_default()('resetAutosave action (`core/editor` store)', {
3194              alternative: 'receiveAutosaves action (`core` store)',
3195              plugin: 'Gutenberg'
3196            });
3197            _context2.next = 3;
3198            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getCurrentPostId');
3199  
3200          case 3:
3201            postId = _context2.sent;
3202            _context2.next = 6;
3203            return Object(external_this_wp_dataControls_["dispatch"])('core', 'receiveAutosaves', postId, newAutosave);
3204  
3205          case 6:
3206            return _context2.abrupt("return", {
3207              type: '__INERT__'
3208            });
3209  
3210          case 7:
3211          case "end":
3212            return _context2.stop();
3213        }
3214      }
3215    }, _marked2);
3216  }
3217  /**
3218   * Action for dispatching that a post update request has started.
3219   *
3220   * @param {Object} options
3221   *
3222   * @return {Object} An action object
3223   */
3224  
3225  function __experimentalRequestPostUpdateStart() {
3226    var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3227    return {
3228      type: 'REQUEST_POST_UPDATE_START',
3229      options: options
3230    };
3231  }
3232  /**
3233   * Action for dispatching that a post update request has finished.
3234   *
3235   * @param {Object} options
3236   *
3237   * @return {Object} An action object
3238   */
3239  
3240  function __experimentalRequestPostUpdateFinish() {
3241    var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3242    return {
3243      type: 'REQUEST_POST_UPDATE_FINISH',
3244      options: options
3245    };
3246  }
3247  /**
3248   * Returns an action object used in signalling that a patch of updates for the
3249   * latest version of the post have been received.
3250   *
3251   * @param {Object} edits Updated post fields.
3252   *
3253   * @return {Object} Action object.
3254   */
3255  
3256  function updatePost(edits) {
3257    return {
3258      type: 'UPDATE_POST',
3259      edits: edits
3260    };
3261  }
3262  /**
3263   * Returns an action object used to setup the editor state when first opening
3264   * an editor.
3265   *
3266   * @param {Object} post   Post object.
3267   *
3268   * @return {Object} Action object.
3269   */
3270  
3271  function setupEditorState(post) {
3272    return {
3273      type: 'SETUP_EDITOR_STATE',
3274      post: post
3275    };
3276  }
3277  /**
3278   * Returns an action object used in signalling that attributes of the post have
3279   * been edited.
3280   *
3281   * @param {Object} edits   Post attributes to edit.
3282   * @param {Object} options Options for the edit.
3283   *
3284   * @yield {Object} Action object or control.
3285   */
3286  
3287  function actions_editPost(edits, options) {
3288    var _yield$select, id, type;
3289  
3290    return external_this_regeneratorRuntime_default.a.wrap(function editPost$(_context3) {
3291      while (1) {
3292        switch (_context3.prev = _context3.next) {
3293          case 0:
3294            _context3.next = 2;
3295            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getCurrentPost');
3296  
3297          case 2:
3298            _yield$select = _context3.sent;
3299            id = _yield$select.id;
3300            type = _yield$select.type;
3301            _context3.next = 7;
3302            return Object(external_this_wp_dataControls_["dispatch"])('core', 'editEntityRecord', 'postType', type, id, edits, options);
3303  
3304          case 7:
3305          case "end":
3306            return _context3.stop();
3307        }
3308      }
3309    }, _marked3);
3310  }
3311  /**
3312   * Returns action object produced by the updatePost creator augmented by
3313   * an optimist option that signals optimistically applying updates.
3314   *
3315   * @param {Object} edits  Updated post fields.
3316   *
3317   * @return {Object} Action object.
3318   */
3319  
3320  function __experimentalOptimisticUpdatePost(edits) {
3321    return actions_objectSpread({}, updatePost(edits), {
3322      optimist: {
3323        id: POST_UPDATE_TRANSACTION_ID
3324      }
3325    });
3326  }
3327  /**
3328   * Action generator for saving the current post in the editor.
3329   *
3330   * @param {Object} options
3331   */
3332  
3333  function actions_savePost() {
3334    var options,
3335        edits,
3336        previousRecord,
3337        error,
3338        args,
3339        updatedRecord,
3340        _args4,
3341        _args5 = arguments;
3342  
3343    return external_this_regeneratorRuntime_default.a.wrap(function savePost$(_context4) {
3344      while (1) {
3345        switch (_context4.prev = _context4.next) {
3346          case 0:
3347            options = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
3348            _context4.next = 3;
3349            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'isEditedPostSaveable');
3350  
3351          case 3:
3352            if (_context4.sent) {
3353              _context4.next = 5;
3354              break;
3355            }
3356  
3357            return _context4.abrupt("return");
3358  
3359          case 5:
3360            _context4.next = 7;
3361            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getEditedPostContent');
3362  
3363          case 7:
3364            _context4.t0 = _context4.sent;
3365            edits = {
3366              content: _context4.t0
3367            };
3368  
3369            if (options.isAutosave) {
3370              _context4.next = 12;
3371              break;
3372            }
3373  
3374            _context4.next = 12;
3375            return Object(external_this_wp_dataControls_["dispatch"])(STORE_KEY, 'editPost', edits, {
3376              undoIgnore: true
3377            });
3378  
3379          case 12:
3380            _context4.next = 14;
3381            return __experimentalRequestPostUpdateStart(options);
3382  
3383          case 14:
3384            _context4.next = 16;
3385            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getCurrentPost');
3386  
3387          case 16:
3388            previousRecord = _context4.sent;
3389            _context4.t1 = actions_objectSpread;
3390            _context4.t2 = {
3391              id: previousRecord.id
3392            };
3393            _context4.next = 21;
3394            return Object(external_this_wp_dataControls_["select"])('core', 'getEntityRecordNonTransientEdits', 'postType', previousRecord.type, previousRecord.id);
3395  
3396          case 21:
3397            _context4.t3 = _context4.sent;
3398            _context4.t4 = {};
3399            _context4.t5 = edits;
3400            edits = (0, _context4.t1)(_context4.t2, _context4.t3, _context4.t4, _context4.t5);
3401            _context4.next = 27;
3402            return Object(external_this_wp_dataControls_["dispatch"])('core', 'saveEntityRecord', 'postType', previousRecord.type, edits, options);
3403  
3404          case 27:
3405            _context4.next = 29;
3406            return __experimentalRequestPostUpdateFinish(options);
3407  
3408          case 29:
3409            _context4.next = 31;
3410            return Object(external_this_wp_dataControls_["select"])('core', 'getLastEntitySaveError', 'postType', previousRecord.type, previousRecord.id);
3411  
3412          case 31:
3413            error = _context4.sent;
3414  
3415            if (!error) {
3416              _context4.next = 39;
3417              break;
3418            }
3419  
3420            args = getNotificationArgumentsForSaveFail({
3421              post: previousRecord,
3422              edits: edits,
3423              error: error
3424            });
3425  
3426            if (!args.length) {
3427              _context4.next = 37;
3428              break;
3429            }
3430  
3431            _context4.next = 37;
3432            return external_this_wp_dataControls_["dispatch"].apply(void 0, ['core/notices', 'createErrorNotice'].concat(Object(toConsumableArray["a" /* default */])(args)));
3433  
3434          case 37:
3435            _context4.next = 57;
3436            break;
3437  
3438          case 39:
3439            _context4.next = 41;
3440            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getCurrentPost');
3441  
3442          case 41:
3443            updatedRecord = _context4.sent;
3444            _context4.t6 = getNotificationArgumentsForSaveSuccess;
3445            _context4.t7 = previousRecord;
3446            _context4.t8 = updatedRecord;
3447            _context4.next = 47;
3448            return Object(external_this_wp_dataControls_["select"])('core', 'getPostType', updatedRecord.type);
3449  
3450          case 47:
3451            _context4.t9 = _context4.sent;
3452            _context4.t10 = options;
3453            _context4.t11 = {
3454              previousPost: _context4.t7,
3455              post: _context4.t8,
3456              postType: _context4.t9,
3457              options: _context4.t10
3458            };
3459            _args4 = (0, _context4.t6)(_context4.t11);
3460  
3461            if (!_args4.length) {
3462              _context4.next = 54;
3463              break;
3464            }
3465  
3466            _context4.next = 54;
3467            return external_this_wp_dataControls_["dispatch"].apply(void 0, ['core/notices', 'createSuccessNotice'].concat(Object(toConsumableArray["a" /* default */])(_args4)));
3468  
3469          case 54:
3470            if (options.isAutosave) {
3471              _context4.next = 57;
3472              break;
3473            }
3474  
3475            _context4.next = 57;
3476            return Object(external_this_wp_dataControls_["dispatch"])('core/block-editor', '__unstableMarkLastChangeAsPersistent');
3477  
3478          case 57:
3479          case "end":
3480            return _context4.stop();
3481        }
3482      }
3483    }, _marked4);
3484  }
3485  /**
3486   * Action generator for handling refreshing the current post.
3487   */
3488  
3489  function refreshPost() {
3490    var post, postTypeSlug, postType, newPost;
3491    return external_this_regeneratorRuntime_default.a.wrap(function refreshPost$(_context5) {
3492      while (1) {
3493        switch (_context5.prev = _context5.next) {
3494          case 0:
3495            _context5.next = 2;
3496            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getCurrentPost');
3497  
3498          case 2:
3499            post = _context5.sent;
3500            _context5.next = 5;
3501            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getCurrentPostType');
3502  
3503          case 5:
3504            postTypeSlug = _context5.sent;
3505            _context5.next = 8;
3506            return Object(external_this_wp_dataControls_["select"])('core', 'getPostType', postTypeSlug);
3507  
3508          case 8:
3509            postType = _context5.sent;
3510            _context5.next = 11;
3511            return Object(external_this_wp_dataControls_["apiFetch"])({
3512              // Timestamp arg allows caller to bypass browser caching, which is
3513              // expected for this specific function.
3514              path: "/wp/v2/".concat(postType.rest_base, "/").concat(post.id) + "?context=edit&_timestamp=".concat(Date.now())
3515            });
3516  
3517          case 11:
3518            newPost = _context5.sent;
3519            _context5.next = 14;
3520            return Object(external_this_wp_dataControls_["dispatch"])(STORE_KEY, 'resetPost', newPost);
3521  
3522          case 14:
3523          case "end":
3524            return _context5.stop();
3525        }
3526      }
3527    }, _marked5);
3528  }
3529  /**
3530   * Action generator for trashing the current post in the editor.
3531   */
3532  
3533  function trashPost() {
3534    var postTypeSlug, postType, post;
3535    return external_this_regeneratorRuntime_default.a.wrap(function trashPost$(_context6) {
3536      while (1) {
3537        switch (_context6.prev = _context6.next) {
3538          case 0:
3539            _context6.next = 2;
3540            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getCurrentPostType');
3541  
3542          case 2:
3543            postTypeSlug = _context6.sent;
3544            _context6.next = 5;
3545            return Object(external_this_wp_dataControls_["select"])('core', 'getPostType', postTypeSlug);
3546  
3547          case 5:
3548            postType = _context6.sent;
3549            _context6.next = 8;
3550            return Object(external_this_wp_dataControls_["dispatch"])('core/notices', 'removeNotice', TRASH_POST_NOTICE_ID);
3551  
3552          case 8:
3553            _context6.prev = 8;
3554            _context6.next = 11;
3555            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getCurrentPost');
3556  
3557          case 11:
3558            post = _context6.sent;
3559            _context6.next = 14;
3560            return Object(external_this_wp_dataControls_["apiFetch"])({
3561              path: "/wp/v2/".concat(postType.rest_base, "/").concat(post.id),
3562              method: 'DELETE'
3563            });
3564  
3565          case 14:
3566            _context6.next = 16;
3567            return Object(external_this_wp_dataControls_["dispatch"])(STORE_KEY, 'savePost');
3568  
3569          case 16:
3570            _context6.next = 22;
3571            break;
3572  
3573          case 18:
3574            _context6.prev = 18;
3575            _context6.t0 = _context6["catch"](8);
3576            _context6.next = 22;
3577            return external_this_wp_dataControls_["dispatch"].apply(void 0, ['core/notices', 'createErrorNotice'].concat(Object(toConsumableArray["a" /* default */])(getNotificationArgumentsForTrashFail({
3578              error: _context6.t0
3579            }))));
3580  
3581          case 22:
3582          case "end":
3583            return _context6.stop();
3584        }
3585      }
3586    }, _marked6, null, [[8, 18]]);
3587  }
3588  /**
3589   * Action generator used in signalling that the post should autosave.
3590   *
3591   * @param {Object?} options Extra flags to identify the autosave.
3592   */
3593  
3594  function actions_autosave(options) {
3595    return external_this_regeneratorRuntime_default.a.wrap(function autosave$(_context7) {
3596      while (1) {
3597        switch (_context7.prev = _context7.next) {
3598          case 0:
3599            _context7.next = 2;
3600            return Object(external_this_wp_dataControls_["dispatch"])(STORE_KEY, 'savePost', actions_objectSpread({
3601              isAutosave: true
3602            }, options));
3603  
3604          case 2:
3605          case "end":
3606            return _context7.stop();
3607        }
3608      }
3609    }, _marked7);
3610  }
3611  function actions_experimentalLocalAutosave() {
3612    var post, title, content, excerpt;
3613    return external_this_regeneratorRuntime_default.a.wrap(function __experimentalLocalAutosave$(_context8) {
3614      while (1) {
3615        switch (_context8.prev = _context8.next) {
3616          case 0:
3617            _context8.next = 2;
3618            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getCurrentPost');
3619  
3620          case 2:
3621            post = _context8.sent;
3622            _context8.next = 5;
3623            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getEditedPostAttribute', 'title');
3624  
3625          case 5:
3626            title = _context8.sent;
3627            _context8.next = 8;
3628            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getEditedPostAttribute', 'content');
3629  
3630          case 8:
3631            content = _context8.sent;
3632            _context8.next = 11;
3633            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getEditedPostAttribute', 'excerpt');
3634  
3635          case 11:
3636            excerpt = _context8.sent;
3637            _context8.next = 14;
3638            return {
3639              type: 'LOCAL_AUTOSAVE_SET',
3640              postId: post.id,
3641              title: title,
3642              content: content,
3643              excerpt: excerpt
3644            };
3645  
3646          case 14:
3647          case "end":
3648            return _context8.stop();
3649        }
3650      }
3651    }, _marked8);
3652  }
3653  /**
3654   * Returns an action object used in signalling that undo history should
3655   * restore last popped state.
3656   *
3657   * @yield {Object} Action object.
3658   */
3659  
3660  function actions_redo() {
3661    return external_this_regeneratorRuntime_default.a.wrap(function redo$(_context9) {
3662      while (1) {
3663        switch (_context9.prev = _context9.next) {
3664          case 0:
3665            _context9.next = 2;
3666            return Object(external_this_wp_dataControls_["dispatch"])('core', 'redo');
3667  
3668          case 2:
3669          case "end":
3670            return _context9.stop();
3671        }
3672      }
3673    }, _marked9);
3674  }
3675  /**
3676   * Returns an action object used in signalling that undo history should pop.
3677   *
3678   * @yield {Object} Action object.
3679   */
3680  
3681  function actions_undo() {
3682    return external_this_regeneratorRuntime_default.a.wrap(function undo$(_context10) {
3683      while (1) {
3684        switch (_context10.prev = _context10.next) {
3685          case 0:
3686            _context10.next = 2;
3687            return Object(external_this_wp_dataControls_["dispatch"])('core', 'undo');
3688  
3689          case 2:
3690          case "end":
3691            return _context10.stop();
3692        }
3693      }
3694    }, _marked10);
3695  }
3696  /**
3697   * Returns an action object used in signalling that undo history record should
3698   * be created.
3699   *
3700   * @return {Object} Action object.
3701   */
3702  
3703  function createUndoLevel() {
3704    return {
3705      type: 'CREATE_UNDO_LEVEL'
3706    };
3707  }
3708  /**
3709   * Returns an action object used to lock the editor.
3710   *
3711   * @param {Object}  lock Details about the post lock status, user, and nonce.
3712   *
3713   * @return {Object} Action object.
3714   */
3715  
3716  function updatePostLock(lock) {
3717    return {
3718      type: 'UPDATE_POST_LOCK',
3719      lock: lock
3720    };
3721  }
3722  /**
3723   * Returns an action object used to fetch a single reusable block or all
3724   * reusable blocks from the REST API into the store.
3725   *
3726   * @param {?string} id If given, only a single reusable block with this ID will
3727   *                     be fetched.
3728   *
3729   * @return {Object} Action object.
3730   */
3731  
3732  function actions_experimentalFetchReusableBlocks(id) {
3733    return {
3734      type: 'FETCH_REUSABLE_BLOCKS',
3735      id: id
3736    };
3737  }
3738  /**
3739   * Returns an action object used in signalling that reusable blocks have been
3740   * received. `results` is an array of objects containing:
3741   *  - `reusableBlock` - Details about how the reusable block is persisted.
3742   *  - `parsedBlock` - The original block.
3743   *
3744   * @param {Object[]} results Reusable blocks received.
3745   *
3746   * @return {Object} Action object.
3747   */
3748  
3749  function __experimentalReceiveReusableBlocks(results) {
3750    return {
3751      type: 'RECEIVE_REUSABLE_BLOCKS',
3752      results: results
3753    };
3754  }
3755  /**
3756   * Returns an action object used to save a reusable block that's in the store to
3757   * the REST API.
3758   *
3759   * @param {Object} id The ID of the reusable block to save.
3760   *
3761   * @return {Object} Action object.
3762   */
3763  
3764  function __experimentalSaveReusableBlock(id) {
3765    return {
3766      type: 'SAVE_REUSABLE_BLOCK',
3767      id: id
3768    };
3769  }
3770  /**
3771   * Returns an action object used to delete a reusable block via the REST API.
3772   *
3773   * @param {number} id The ID of the reusable block to delete.
3774   *
3775   * @return {Object} Action object.
3776   */
3777  
3778  function __experimentalDeleteReusableBlock(id) {
3779    return {
3780      type: 'DELETE_REUSABLE_BLOCK',
3781      id: id
3782    };
3783  }
3784  /**
3785   * Returns an action object used in signalling that a reusable block is
3786   * to be updated.
3787   *
3788   * @param {number} id      The ID of the reusable block to update.
3789   * @param {Object} changes The changes to apply.
3790   *
3791   * @return {Object} Action object.
3792   */
3793  
3794  function __experimentalUpdateReusableBlock(id, changes) {
3795    return {
3796      type: 'UPDATE_REUSABLE_BLOCK',
3797      id: id,
3798      changes: changes
3799    };
3800  }
3801  /**
3802   * Returns an action object used to convert a reusable block into a static
3803   * block.
3804   *
3805   * @param {string} clientId The client ID of the block to attach.
3806   *
3807   * @return {Object} Action object.
3808   */
3809  
3810  function __experimentalConvertBlockToStatic(clientId) {
3811    return {
3812      type: 'CONVERT_BLOCK_TO_STATIC',
3813      clientId: clientId
3814    };
3815  }
3816  /**
3817   * Returns an action object used to convert a static block into a reusable
3818   * block.
3819   *
3820   * @param {string} clientIds The client IDs of the block to detach.
3821   *
3822   * @return {Object} Action object.
3823   */
3824  
3825  function __experimentalConvertBlockToReusable(clientIds) {
3826    return {
3827      type: 'CONVERT_BLOCK_TO_REUSABLE',
3828      clientIds: Object(external_this_lodash_["castArray"])(clientIds)
3829    };
3830  }
3831  /**
3832   * Returns an action object used in signalling that the user has enabled the
3833   * publish sidebar.
3834   *
3835   * @return {Object} Action object
3836   */
3837  
3838  function enablePublishSidebar() {
3839    return {
3840      type: 'ENABLE_PUBLISH_SIDEBAR'
3841    };
3842  }
3843  /**
3844   * Returns an action object used in signalling that the user has disabled the
3845   * publish sidebar.
3846   *
3847   * @return {Object} Action object
3848   */
3849  
3850  function disablePublishSidebar() {
3851    return {
3852      type: 'DISABLE_PUBLISH_SIDEBAR'
3853    };
3854  }
3855  /**
3856   * Returns an action object used to signal that post saving is locked.
3857   *
3858   * @param  {string} lockName The lock name.
3859   *
3860   * @example
3861   * ```
3862   * const { subscribe } = wp.data;
3863   *
3864   * const initialPostStatus = wp.data.select( 'core/editor' ).getEditedPostAttribute( 'status' );
3865   *
3866   * // Only allow publishing posts that are set to a future date.
3867   * if ( 'publish' !== initialPostStatus ) {
3868   *
3869   *     // Track locking.
3870   *     let locked = false;
3871   *
3872   *     // Watch for the publish event.
3873   *     let unssubscribe = subscribe( () => {
3874   *         const currentPostStatus = wp.data.select( 'core/editor' ).getEditedPostAttribute( 'status' );
3875   *         if ( 'publish' !== currentPostStatus ) {
3876   *
3877   *             // Compare the post date to the current date, lock the post if the date isn't in the future.
3878   *             const postDate = new Date( wp.data.select( 'core/editor' ).getEditedPostAttribute( 'date' ) );
3879   *             const currentDate = new Date();
3880   *             if ( postDate.getTime() <= currentDate.getTime() ) {
3881   *                 if ( ! locked ) {
3882   *                     locked = true;
3883   *                     wp.data.dispatch( 'core/editor' ).lockPostSaving( 'futurelock' );
3884   *                 }
3885   *             } else {
3886   *                 if ( locked ) {
3887   *                     locked = false;
3888   *                     wp.data.dispatch( 'core/editor' ).unlockPostSaving( 'futurelock' );
3889   *                 }
3890   *             }
3891   *         }
3892   *     } );
3893   * }
3894   * ```
3895   *
3896   * @return {Object} Action object
3897   */
3898  
3899  function lockPostSaving(lockName) {
3900    return {
3901      type: 'LOCK_POST_SAVING',
3902      lockName: lockName
3903    };
3904  }
3905  /**
3906   * Returns an action object used to signal that post saving is unlocked.
3907   *
3908   * @param  {string} lockName The lock name.
3909   *
3910   * @example
3911   * ```
3912   * // Unlock post saving with the lock key `mylock`:
3913   * wp.data.dispatch( 'core/editor' ).unlockPostSaving( 'mylock' );
3914   * ```
3915   *
3916   * @return {Object} Action object
3917   */
3918  
3919  function unlockPostSaving(lockName) {
3920    return {
3921      type: 'UNLOCK_POST_SAVING',
3922      lockName: lockName
3923    };
3924  }
3925  /**
3926   * Returns an action object used to signal that post autosaving is locked.
3927   *
3928   * @param  {string} lockName The lock name.
3929   *
3930   * @example
3931   * ```
3932   * // Lock post autosaving with the lock key `mylock`:
3933   * wp.data.dispatch( 'core/editor' ).lockPostAutosaving( 'mylock' );
3934   * ```
3935   *
3936   * @return {Object} Action object
3937   */
3938  
3939  function lockPostAutosaving(lockName) {
3940    return {
3941      type: 'LOCK_POST_AUTOSAVING',
3942      lockName: lockName
3943    };
3944  }
3945  /**
3946   * Returns an action object used to signal that post autosaving is unlocked.
3947   *
3948   * @param  {string} lockName The lock name.
3949   *
3950   * @example
3951   * ```
3952   * // Unlock post saving with the lock key `mylock`:
3953   * wp.data.dispatch( 'core/editor' ).unlockPostAutosaving( 'mylock' );
3954   * ```
3955   *
3956   * @return {Object} Action object
3957   */
3958  
3959  function unlockPostAutosaving(lockName) {
3960    return {
3961      type: 'UNLOCK_POST_AUTOSAVING',
3962      lockName: lockName
3963    };
3964  }
3965  /**
3966   * Returns an action object used to signal that the blocks have been updated.
3967   *
3968   * @param {Array}   blocks  Block Array.
3969   * @param {?Object} options Optional options.
3970   *
3971   * @yield {Object} Action object
3972   */
3973  
3974  function actions_resetEditorBlocks(blocks) {
3975    var options,
3976        __unstableShouldCreateUndoLevel,
3977        selectionStart,
3978        selectionEnd,
3979        edits,
3980        _yield$select2,
3981        id,
3982        type,
3983        noChange,
3984        _args12 = arguments;
3985  
3986    return external_this_regeneratorRuntime_default.a.wrap(function resetEditorBlocks$(_context11) {
3987      while (1) {
3988        switch (_context11.prev = _context11.next) {
3989          case 0:
3990            options = _args12.length > 1 && _args12[1] !== undefined ? _args12[1] : {};
3991            __unstableShouldCreateUndoLevel = options.__unstableShouldCreateUndoLevel, selectionStart = options.selectionStart, selectionEnd = options.selectionEnd;
3992            edits = {
3993              blocks: blocks,
3994              selectionStart: selectionStart,
3995              selectionEnd: selectionEnd
3996            };
3997  
3998            if (!(__unstableShouldCreateUndoLevel !== false)) {
3999              _context11.next = 19;
4000              break;
4001            }
4002  
4003            _context11.next = 6;
4004            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getCurrentPost');
4005  
4006          case 6:
4007            _yield$select2 = _context11.sent;
4008            id = _yield$select2.id;
4009            type = _yield$select2.type;
4010            _context11.next = 11;
4011            return Object(external_this_wp_dataControls_["__unstableSyncSelect"])('core', 'getEditedEntityRecord', 'postType', type, id);
4012  
4013          case 11:
4014            _context11.t0 = _context11.sent.blocks;
4015            _context11.t1 = edits.blocks;
4016            noChange = _context11.t0 === _context11.t1;
4017  
4018            if (!noChange) {
4019              _context11.next = 18;
4020              break;
4021            }
4022  
4023            _context11.next = 17;
4024            return Object(external_this_wp_dataControls_["dispatch"])('core', '__unstableCreateUndoLevel', 'postType', type, id);
4025  
4026          case 17:
4027            return _context11.abrupt("return", _context11.sent);
4028  
4029          case 18:
4030            // We create a new function here on every persistent edit
4031            // to make sure the edit makes the post dirty and creates
4032            // a new undo level.
4033            edits.content = function (_ref) {
4034              var _ref$blocks = _ref.blocks,
4035                  blocksForSerialization = _ref$blocks === void 0 ? [] : _ref$blocks;
4036              return serialize_blocks(blocksForSerialization);
4037            };
4038  
4039          case 19:
4040            return _context11.delegateYield(actions_editPost(edits), "t2", 20);
4041  
4042          case 20:
4043          case "end":
4044            return _context11.stop();
4045        }
4046      }
4047    }, _marked11);
4048  }
4049  /*
4050   * Returns an action object used in signalling that the post editor settings have been updated.
4051   *
4052   * @param {Object} settings Updated settings
4053   *
4054   * @return {Object} Action object
4055   */
4056  
4057  function updateEditorSettings(settings) {
4058    return {
4059      type: 'UPDATE_EDITOR_SETTINGS',
4060      settings: settings
4061    };
4062  }
4063  /**
4064   * Backward compatibility
4065   */
4066  
4067  var actions_getBlockEditorAction = function getBlockEditorAction(name) {
4068    return /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(function _callee() {
4069      var _len,
4070          args,
4071          _key,
4072          _args13 = arguments;
4073  
4074      return external_this_regeneratorRuntime_default.a.wrap(function _callee$(_context12) {
4075        while (1) {
4076          switch (_context12.prev = _context12.next) {
4077            case 0:
4078              external_this_wp_deprecated_default()("`wp.data.dispatch( 'core/editor' )." + name + '`', {
4079                alternative: "`wp.data.dispatch( 'core/block-editor' )." + name + '`'
4080              });
4081  
4082              for (_len = _args13.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
4083                args[_key] = _args13[_key];
4084              }
4085  
4086              _context12.next = 4;
4087              return external_this_wp_dataControls_["dispatch"].apply(void 0, ['core/block-editor', name].concat(args));
4088  
4089            case 4:
4090            case "end":
4091              return _context12.stop();
4092          }
4093        }
4094      }, _callee);
4095    });
4096  };
4097  /**
4098   * @see resetBlocks in core/block-editor store.
4099   */
4100  
4101  
4102  var resetBlocks = actions_getBlockEditorAction('resetBlocks');
4103  /**
4104   * @see receiveBlocks in core/block-editor store.
4105   */
4106  
4107  var receiveBlocks = actions_getBlockEditorAction('receiveBlocks');
4108  /**
4109   * @see updateBlock in core/block-editor store.
4110   */
4111  
4112  var updateBlock = actions_getBlockEditorAction('updateBlock');
4113  /**
4114   * @see updateBlockAttributes in core/block-editor store.
4115   */
4116  
4117  var updateBlockAttributes = actions_getBlockEditorAction('updateBlockAttributes');
4118  /**
4119   * @see selectBlock in core/block-editor store.
4120   */
4121  
4122  var actions_selectBlock = actions_getBlockEditorAction('selectBlock');
4123  /**
4124   * @see startMultiSelect in core/block-editor store.
4125   */
4126  
4127  var startMultiSelect = actions_getBlockEditorAction('startMultiSelect');
4128  /**
4129   * @see stopMultiSelect in core/block-editor store.
4130   */
4131  
4132  var stopMultiSelect = actions_getBlockEditorAction('stopMultiSelect');
4133  /**
4134   * @see multiSelect in core/block-editor store.
4135   */
4136  
4137  var multiSelect = actions_getBlockEditorAction('multiSelect');
4138  /**
4139   * @see clearSelectedBlock in core/block-editor store.
4140   */
4141  
4142  var clearSelectedBlock = actions_getBlockEditorAction('clearSelectedBlock');
4143  /**
4144   * @see toggleSelection in core/block-editor store.
4145   */
4146  
4147  var toggleSelection = actions_getBlockEditorAction('toggleSelection');
4148  /**
4149   * @see replaceBlocks in core/block-editor store.
4150   */
4151  
4152  var actions_replaceBlocks = actions_getBlockEditorAction('replaceBlocks');
4153  /**
4154   * @see replaceBlock in core/block-editor store.
4155   */
4156  
4157  var replaceBlock = actions_getBlockEditorAction('replaceBlock');
4158  /**
4159   * @see moveBlocksDown in core/block-editor store.
4160   */
4161  
4162  var moveBlocksDown = actions_getBlockEditorAction('moveBlocksDown');
4163  /**
4164   * @see moveBlocksUp in core/block-editor store.
4165   */
4166  
4167  var moveBlocksUp = actions_getBlockEditorAction('moveBlocksUp');
4168  /**
4169   * @see moveBlockToPosition in core/block-editor store.
4170   */
4171  
4172  var moveBlockToPosition = actions_getBlockEditorAction('moveBlockToPosition');
4173  /**
4174   * @see insertBlock in core/block-editor store.
4175   */
4176  
4177  var insertBlock = actions_getBlockEditorAction('insertBlock');
4178  /**
4179   * @see insertBlocks in core/block-editor store.
4180   */
4181  
4182  var insertBlocks = actions_getBlockEditorAction('insertBlocks');
4183  /**
4184   * @see showInsertionPoint in core/block-editor store.
4185   */
4186  
4187  var showInsertionPoint = actions_getBlockEditorAction('showInsertionPoint');
4188  /**
4189   * @see hideInsertionPoint in core/block-editor store.
4190   */
4191  
4192  var hideInsertionPoint = actions_getBlockEditorAction('hideInsertionPoint');
4193  /**
4194   * @see setTemplateValidity in core/block-editor store.
4195   */
4196  
4197  var setTemplateValidity = actions_getBlockEditorAction('setTemplateValidity');
4198  /**
4199   * @see synchronizeTemplate in core/block-editor store.
4200   */
4201  
4202  var synchronizeTemplate = actions_getBlockEditorAction('synchronizeTemplate');
4203  /**
4204   * @see mergeBlocks in core/block-editor store.
4205   */
4206  
4207  var mergeBlocks = actions_getBlockEditorAction('mergeBlocks');
4208  /**
4209   * @see removeBlocks in core/block-editor store.
4210   */
4211  
4212  var removeBlocks = actions_getBlockEditorAction('removeBlocks');
4213  /**
4214   * @see removeBlock in core/block-editor store.
4215   */
4216  
4217  var removeBlock = actions_getBlockEditorAction('removeBlock');
4218  /**
4219   * @see toggleBlockMode in core/block-editor store.
4220   */
4221  
4222  var toggleBlockMode = actions_getBlockEditorAction('toggleBlockMode');
4223  /**
4224   * @see startTyping in core/block-editor store.
4225   */
4226  
4227  var startTyping = actions_getBlockEditorAction('startTyping');
4228  /**
4229   * @see stopTyping in core/block-editor store.
4230   */
4231  
4232  var stopTyping = actions_getBlockEditorAction('stopTyping');
4233  /**
4234   * @see enterFormattedText in core/block-editor store.
4235   */
4236  
4237  var enterFormattedText = actions_getBlockEditorAction('enterFormattedText');
4238  /**
4239   * @see exitFormattedText in core/block-editor store.
4240   */
4241  
4242  var exitFormattedText = actions_getBlockEditorAction('exitFormattedText');
4243  /**
4244   * @see insertDefaultBlock in core/block-editor store.
4245   */
4246  
4247  var insertDefaultBlock = actions_getBlockEditorAction('insertDefaultBlock');
4248  /**
4249   * @see updateBlockListSettings in core/block-editor store.
4250   */
4251  
4252  var updateBlockListSettings = actions_getBlockEditorAction('updateBlockListSettings');
4253  
4254  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
4255  var slicedToArray = __webpack_require__(15);
4256  
4257  // EXTERNAL MODULE: ./node_modules/rememo/es/rememo.js
4258  var rememo = __webpack_require__(41);
4259  
4260  // EXTERNAL MODULE: external {"this":["wp","date"]}
4261  var external_this_wp_date_ = __webpack_require__(68);
4262  
4263  // EXTERNAL MODULE: external {"this":["wp","url"]}
4264  var external_this_wp_url_ = __webpack_require__(30);
4265  
4266  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/utils/url.js
4267  /**
4268   * External dependencies
4269   */
4270  
4271  /**
4272   * WordPress dependencies
4273   */
4274  
4275  
4276  /**
4277   * Returns the URL of a WPAdmin Page.
4278   *
4279   * TODO: This should be moved to a module less specific to the editor.
4280   *
4281   * @param {string} page  Page to navigate to.
4282   * @param {Object} query Query Args.
4283   *
4284   * @return {string} WPAdmin URL.
4285   */
4286  
4287  function getWPAdminURL(page, query) {
4288    return Object(external_this_wp_url_["addQueryArgs"])(page, query);
4289  }
4290  /**
4291   * Performs some basic cleanup of a string for use as a post slug
4292   *
4293   * This replicates some of what sanitize_title() does in WordPress core, but
4294   * is only designed to approximate what the slug will be.
4295   *
4296   * Converts Latin-1 Supplement and Latin Extended-A letters to basic Latin
4297   * letters. Removes combining diacritical marks. Converts whitespace, periods,
4298   * and forward slashes to hyphens. Removes any remaining non-word characters
4299   * except hyphens. Converts remaining string to lowercase. It does not account
4300   * for octets, HTML entities, or other encoded characters.
4301   *
4302   * @param {string} string Title or slug to be processed
4303   *
4304   * @return {string} Processed string
4305   */
4306  
4307  function cleanForSlug(string) {
4308    if (!string) {
4309      return '';
4310    }
4311  
4312    return Object(external_this_lodash_["trim"])(Object(external_this_lodash_["deburr"])(string).replace(/[\s\./]+/g, '-').replace(/[^\w-]+/g, '').toLowerCase(), '-');
4313  }
4314  
4315  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/selectors.js
4316  
4317  
4318  
4319  function selectors_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
4320  
4321  function selectors_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { selectors_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { selectors_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
4322  
4323  /**
4324   * External dependencies
4325   */
4326  
4327  
4328  /**
4329   * WordPress dependencies
4330   */
4331  
4332  
4333  
4334  
4335  
4336  
4337  /**
4338   * Internal dependencies
4339   */
4340  
4341  
4342  
4343  
4344  
4345  
4346  /**
4347   * Shared reference to an empty object for cases where it is important to avoid
4348   * returning a new object reference on every invocation, as in a connected or
4349   * other pure component which performs `shouldComponentUpdate` check on props.
4350   * This should be used as a last resort, since the normalized data should be
4351   * maintained by the reducer result in state.
4352   */
4353  
4354  var EMPTY_OBJECT = {};
4355  /**
4356   * Shared reference to an empty array for cases where it is important to avoid
4357   * returning a new array reference on every invocation, as in a connected or
4358   * other pure component which performs `shouldComponentUpdate` check on props.
4359   * This should be used as a last resort, since the normalized data should be
4360   * maintained by the reducer result in state.
4361   */
4362  
4363  var EMPTY_ARRAY = [];
4364  /**
4365   * Returns true if any past editor history snapshots exist, or false otherwise.
4366   *
4367   * @param {Object} state Global application state.
4368   *
4369   * @return {boolean} Whether undo history exists.
4370   */
4371  
4372  var hasEditorUndo = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4373    return function () {
4374      return select('core').hasUndo();
4375    };
4376  });
4377  /**
4378   * Returns true if any future editor history snapshots exist, or false
4379   * otherwise.
4380   *
4381   * @param {Object} state Global application state.
4382   *
4383   * @return {boolean} Whether redo history exists.
4384   */
4385  
4386  var hasEditorRedo = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4387    return function () {
4388      return select('core').hasRedo();
4389    };
4390  });
4391  /**
4392   * Returns true if the currently edited post is yet to be saved, or false if
4393   * the post has been saved.
4394   *
4395   * @param {Object} state Global application state.
4396   *
4397   * @return {boolean} Whether the post is new.
4398   */
4399  
4400  function isEditedPostNew(state) {
4401    return selectors_getCurrentPost(state).status === 'auto-draft';
4402  }
4403  /**
4404   * Returns true if content includes unsaved changes, or false otherwise.
4405   *
4406   * @param {Object} state Editor state.
4407   *
4408   * @return {boolean} Whether content includes unsaved changes.
4409   */
4410  
4411  function hasChangedContent(state) {
4412    var edits = getPostEdits(state);
4413    return 'blocks' in edits || // `edits` is intended to contain only values which are different from
4414    // the saved post, so the mere presence of a property is an indicator
4415    // that the value is different than what is known to be saved. While
4416    // content in Visual mode is represented by the blocks state, in Text
4417    // mode it is tracked by `edits.content`.
4418    'content' in edits;
4419  }
4420  /**
4421   * Returns true if there are unsaved values for the current edit session, or
4422   * false if the editing state matches the saved or new post.
4423   *
4424   * @param {Object} state Global application state.
4425   *
4426   * @return {boolean} Whether unsaved values exist.
4427   */
4428  
4429  var selectors_isEditedPostDirty = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4430    return function (state) {
4431      // Edits should contain only fields which differ from the saved post (reset
4432      // at initial load and save complete). Thus, a non-empty edits state can be
4433      // inferred to contain unsaved values.
4434      var postType = selectors_getCurrentPostType(state);
4435      var postId = selectors_getCurrentPostId(state);
4436  
4437      if (select('core').hasEditsForEntityRecord('postType', postType, postId)) {
4438        return true;
4439      }
4440  
4441      return false;
4442    };
4443  });
4444  /**
4445   * Returns true if there are unsaved edits for entities other than
4446   * the editor's post, and false otherwise.
4447   *
4448   * @param {Object} state Global application state.
4449   *
4450   * @return {boolean} Whether there are edits or not.
4451   */
4452  
4453  var selectors_hasNonPostEntityChanges = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4454    return function (state) {
4455      var enableFullSiteEditing = selectors_getEditorSettings(state).__experimentalEnableFullSiteEditing;
4456  
4457      if (!enableFullSiteEditing) {
4458        return false;
4459      }
4460  
4461      var dirtyEntityRecords = select('core').__experimentalGetDirtyEntityRecords();
4462  
4463      var _getCurrentPost = selectors_getCurrentPost(state),
4464          type = _getCurrentPost.type,
4465          id = _getCurrentPost.id;
4466  
4467      return Object(external_this_lodash_["some"])(dirtyEntityRecords, function (entityRecord) {
4468        return entityRecord.kind !== 'postType' || entityRecord.name !== type || entityRecord.key !== id;
4469      });
4470    };
4471  });
4472  /**
4473   * Returns true if there are no unsaved values for the current edit session and
4474   * if the currently edited post is new (has never been saved before).
4475   *
4476   * @param {Object} state Global application state.
4477   *
4478   * @return {boolean} Whether new post and unsaved values exist.
4479   */
4480  
4481  function selectors_isCleanNewPost(state) {
4482    return !selectors_isEditedPostDirty(state) && isEditedPostNew(state);
4483  }
4484  /**
4485   * Returns the post currently being edited in its last known saved state, not
4486   * including unsaved edits. Returns an object containing relevant default post
4487   * values if the post has not yet been saved.
4488   *
4489   * @param {Object} state Global application state.
4490   *
4491   * @return {Object} Post object.
4492   */
4493  
4494  var selectors_getCurrentPost = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4495    return function (state) {
4496      var postId = selectors_getCurrentPostId(state);
4497      var postType = selectors_getCurrentPostType(state);
4498      var post = select('core').getRawEntityRecord('postType', postType, postId);
4499  
4500      if (post) {
4501        return post;
4502      } // This exists for compatibility with the previous selector behavior
4503      // which would guarantee an object return based on the editor reducer's
4504      // default empty object state.
4505  
4506  
4507      return EMPTY_OBJECT;
4508    };
4509  });
4510  /**
4511   * Returns the post type of the post currently being edited.
4512   *
4513   * @param {Object} state Global application state.
4514   *
4515   * @return {string} Post type.
4516   */
4517  
4518  function selectors_getCurrentPostType(state) {
4519    return state.postType;
4520  }
4521  /**
4522   * Returns the ID of the post currently being edited, or null if the post has
4523   * not yet been saved.
4524   *
4525   * @param {Object} state Global application state.
4526   *
4527   * @return {?number} ID of current post.
4528   */
4529  
4530  function selectors_getCurrentPostId(state) {
4531    return state.postId;
4532  }
4533  /**
4534   * Returns the number of revisions of the post currently being edited.
4535   *
4536   * @param {Object} state Global application state.
4537   *
4538   * @return {number} Number of revisions.
4539   */
4540  
4541  function getCurrentPostRevisionsCount(state) {
4542    return Object(external_this_lodash_["get"])(selectors_getCurrentPost(state), ['_links', 'version-history', 0, 'count'], 0);
4543  }
4544  /**
4545   * Returns the last revision ID of the post currently being edited,
4546   * or null if the post has no revisions.
4547   *
4548   * @param {Object} state Global application state.
4549   *
4550   * @return {?number} ID of the last revision.
4551   */
4552  
4553  function getCurrentPostLastRevisionId(state) {
4554    return Object(external_this_lodash_["get"])(selectors_getCurrentPost(state), ['_links', 'predecessor-version', 0, 'id'], null);
4555  }
4556  /**
4557   * Returns any post values which have been changed in the editor but not yet
4558   * been saved.
4559   *
4560   * @param {Object} state Global application state.
4561   *
4562   * @return {Object} Object of key value pairs comprising unsaved edits.
4563   */
4564  
4565  var getPostEdits = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4566    return function (state) {
4567      var postType = selectors_getCurrentPostType(state);
4568      var postId = selectors_getCurrentPostId(state);
4569      return select('core').getEntityRecordEdits('postType', postType, postId) || EMPTY_OBJECT;
4570    };
4571  });
4572  /**
4573   * Returns a new reference when edited values have changed. This is useful in
4574   * inferring where an edit has been made between states by comparison of the
4575   * return values using strict equality.
4576   *
4577   * @deprecated since Gutenberg 6.5.0.
4578   *
4579   * @example
4580   *
4581   * ```
4582   * const hasEditOccurred = (
4583   *    getReferenceByDistinctEdits( beforeState ) !==
4584   *    getReferenceByDistinctEdits( afterState )
4585   * );
4586   * ```
4587   *
4588   * @param {Object} state Editor state.
4589   *
4590   * @return {*} A value whose reference will change only when an edit occurs.
4591   */
4592  
4593  var getReferenceByDistinctEdits = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4594    return function ()
4595    /* state */
4596    {
4597      external_this_wp_deprecated_default()("`wp.data.select( 'core/editor' ).getReferenceByDistinctEdits`", {
4598        alternative: "`wp.data.select( 'core' ).getReferenceByDistinctEdits`"
4599      });
4600      return select('core').getReferenceByDistinctEdits();
4601    };
4602  });
4603  /**
4604   * Returns an attribute value of the saved post.
4605   *
4606   * @param {Object} state         Global application state.
4607   * @param {string} attributeName Post attribute name.
4608   *
4609   * @return {*} Post attribute value.
4610   */
4611  
4612  function selectors_getCurrentPostAttribute(state, attributeName) {
4613    switch (attributeName) {
4614      case 'type':
4615        return selectors_getCurrentPostType(state);
4616  
4617      case 'id':
4618        return selectors_getCurrentPostId(state);
4619  
4620      default:
4621        var post = selectors_getCurrentPost(state);
4622  
4623        if (!post.hasOwnProperty(attributeName)) {
4624          break;
4625        }
4626  
4627        return getPostRawValue(post[attributeName]);
4628    }
4629  }
4630  /**
4631   * Returns a single attribute of the post being edited, preferring the unsaved
4632   * edit if one exists, but merging with the attribute value for the last known
4633   * saved state of the post (this is needed for some nested attributes like meta).
4634   *
4635   * @param {Object} state         Global application state.
4636   * @param {string} attributeName Post attribute name.
4637   *
4638   * @return {*} Post attribute value.
4639   */
4640  
4641  var getNestedEditedPostProperty = function getNestedEditedPostProperty(state, attributeName) {
4642    var edits = getPostEdits(state);
4643  
4644    if (!edits.hasOwnProperty(attributeName)) {
4645      return selectors_getCurrentPostAttribute(state, attributeName);
4646    }
4647  
4648    return selectors_objectSpread({}, selectors_getCurrentPostAttribute(state, attributeName), {}, edits[attributeName]);
4649  };
4650  /**
4651   * Returns a single attribute of the post being edited, preferring the unsaved
4652   * edit if one exists, but falling back to the attribute for the last known
4653   * saved state of the post.
4654   *
4655   * @param {Object} state         Global application state.
4656   * @param {string} attributeName Post attribute name.
4657   *
4658   * @return {*} Post attribute value.
4659   */
4660  
4661  
4662  function selectors_getEditedPostAttribute(state, attributeName) {
4663    // Special cases
4664    switch (attributeName) {
4665      case 'content':
4666        return getEditedPostContent(state);
4667    } // Fall back to saved post value if not edited.
4668  
4669  
4670    var edits = getPostEdits(state);
4671  
4672    if (!edits.hasOwnProperty(attributeName)) {
4673      return selectors_getCurrentPostAttribute(state, attributeName);
4674    } // Merge properties are objects which contain only the patch edit in state,
4675    // and thus must be merged with the current post attribute.
4676  
4677  
4678    if (EDIT_MERGE_PROPERTIES.has(attributeName)) {
4679      return getNestedEditedPostProperty(state, attributeName);
4680    }
4681  
4682    return edits[attributeName];
4683  }
4684  /**
4685   * Returns an attribute value of the current autosave revision for a post, or
4686   * null if there is no autosave for the post.
4687   *
4688   * @deprecated since 5.6. Callers should use the `getAutosave( postType, postId, userId )` selector
4689   *                from the '@wordpress/core-data' package and access properties on the returned
4690   *                autosave object using getPostRawValue.
4691   *
4692   * @param {Object} state         Global application state.
4693   * @param {string} attributeName Autosave attribute name.
4694   *
4695   * @return {*} Autosave attribute value.
4696   */
4697  
4698  var getAutosaveAttribute = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4699    return function (state, attributeName) {
4700      if (!Object(external_this_lodash_["includes"])(AUTOSAVE_PROPERTIES, attributeName) && attributeName !== 'preview_link') {
4701        return;
4702      }
4703  
4704      var postType = selectors_getCurrentPostType(state);
4705      var postId = selectors_getCurrentPostId(state);
4706      var currentUserId = Object(external_this_lodash_["get"])(select('core').getCurrentUser(), ['id']);
4707      var autosave = select('core').getAutosave(postType, postId, currentUserId);
4708  
4709      if (autosave) {
4710        return getPostRawValue(autosave[attributeName]);
4711      }
4712    };
4713  });
4714  /**
4715   * Returns the current visibility of the post being edited, preferring the
4716   * unsaved value if different than the saved post. The return value is one of
4717   * "private", "password", or "public".
4718   *
4719   * @param {Object} state Global application state.
4720   *
4721   * @return {string} Post visibility.
4722   */
4723  
4724  function selectors_getEditedPostVisibility(state) {
4725    var status = selectors_getEditedPostAttribute(state, 'status');
4726  
4727    if (status === 'private') {
4728      return 'private';
4729    }
4730  
4731    var password = selectors_getEditedPostAttribute(state, 'password');
4732  
4733    if (password) {
4734      return 'password';
4735    }
4736  
4737    return 'public';
4738  }
4739  /**
4740   * Returns true if post is pending review.
4741   *
4742   * @param {Object} state Global application state.
4743   *
4744   * @return {boolean} Whether current post is pending review.
4745   */
4746  
4747  function isCurrentPostPending(state) {
4748    return selectors_getCurrentPost(state).status === 'pending';
4749  }
4750  /**
4751   * Return true if the current post has already been published.
4752   *
4753   * @param {Object}  state       Global application state.
4754   * @param {Object?} currentPost Explicit current post for bypassing registry selector.
4755   *
4756   * @return {boolean} Whether the post has been published.
4757   */
4758  
4759  function selectors_isCurrentPostPublished(state, currentPost) {
4760    var post = currentPost || selectors_getCurrentPost(state);
4761    return ['publish', 'private'].indexOf(post.status) !== -1 || post.status === 'future' && !Object(external_this_wp_date_["isInTheFuture"])(new Date(Number(Object(external_this_wp_date_["getDate"])(post.date)) - ONE_MINUTE_IN_MS));
4762  }
4763  /**
4764   * Returns true if post is already scheduled.
4765   *
4766   * @param {Object} state Global application state.
4767   *
4768   * @return {boolean} Whether current post is scheduled to be posted.
4769   */
4770  
4771  function selectors_isCurrentPostScheduled(state) {
4772    return selectors_getCurrentPost(state).status === 'future' && !selectors_isCurrentPostPublished(state);
4773  }
4774  /**
4775   * Return true if the post being edited can be published.
4776   *
4777   * @param {Object} state Global application state.
4778   *
4779   * @return {boolean} Whether the post can been published.
4780   */
4781  
4782  function selectors_isEditedPostPublishable(state) {
4783    var post = selectors_getCurrentPost(state); // TODO: Post being publishable should be superset of condition of post
4784    // being saveable. Currently this restriction is imposed at UI.
4785    //
4786    //  See: <PostPublishButton /> (`isButtonEnabled` assigned by `isSaveable`)
4787  
4788    return selectors_isEditedPostDirty(state) || ['publish', 'private', 'future'].indexOf(post.status) === -1;
4789  }
4790  /**
4791   * Returns true if the post can be saved, or false otherwise. A post must
4792   * contain a title, an excerpt, or non-empty content to be valid for save.
4793   *
4794   * @param {Object} state Global application state.
4795   *
4796   * @return {boolean} Whether the post can be saved.
4797   */
4798  
4799  function selectors_isEditedPostSaveable(state) {
4800    if (selectors_isSavingPost(state)) {
4801      return false;
4802    } // TODO: Post should not be saveable if not dirty. Cannot be added here at
4803    // this time since posts where meta boxes are present can be saved even if
4804    // the post is not dirty. Currently this restriction is imposed at UI, but
4805    // should be moved here.
4806    //
4807    //  See: `isEditedPostPublishable` (includes `isEditedPostDirty` condition)
4808    //  See: <PostSavedState /> (`forceIsDirty` prop)
4809    //  See: <PostPublishButton /> (`forceIsDirty` prop)
4810    //  See: https://github.com/WordPress/gutenberg/pull/4184
4811  
4812  
4813    return !!selectors_getEditedPostAttribute(state, 'title') || !!selectors_getEditedPostAttribute(state, 'excerpt') || !isEditedPostEmpty(state);
4814  }
4815  /**
4816   * Returns true if the edited post has content. A post has content if it has at
4817   * least one saveable block or otherwise has a non-empty content property
4818   * assigned.
4819   *
4820   * @param {Object} state Global application state.
4821   *
4822   * @return {boolean} Whether post has content.
4823   */
4824  
4825  function isEditedPostEmpty(state) {
4826    // While the condition of truthy content string is sufficient to determine
4827    // emptiness, testing saveable blocks length is a trivial operation. Since
4828    // this function can be called frequently, optimize for the fast case as a
4829    // condition of the mere existence of blocks. Note that the value of edited
4830    // content takes precedent over block content, and must fall through to the
4831    // default logic.
4832    var blocks = selectors_getEditorBlocks(state);
4833  
4834    if (blocks.length) {
4835      // Pierce the abstraction of the serializer in knowing that blocks are
4836      // joined with with newlines such that even if every individual block
4837      // produces an empty save result, the serialized content is non-empty.
4838      if (blocks.length > 1) {
4839        return false;
4840      } // There are two conditions under which the optimization cannot be
4841      // assumed, and a fallthrough to getEditedPostContent must occur:
4842      //
4843      // 1. getBlocksForSerialization has special treatment in omitting a
4844      //    single unmodified default block.
4845      // 2. Comment delimiters are omitted for a freeform or unregistered
4846      //    block in its serialization. The freeform block specifically may
4847      //    produce an empty string in its saved output.
4848      //
4849      // For all other content, the single block is assumed to make a post
4850      // non-empty, if only by virtue of its own comment delimiters.
4851  
4852  
4853      var blockName = blocks[0].name;
4854  
4855      if (blockName !== Object(external_this_wp_blocks_["getDefaultBlockName"])() && blockName !== Object(external_this_wp_blocks_["getFreeformContentHandlerName"])()) {
4856        return false;
4857      }
4858    }
4859  
4860    return !getEditedPostContent(state);
4861  }
4862  /**
4863   * Returns true if the post can be autosaved, or false otherwise.
4864   *
4865   * @param {Object} state    Global application state.
4866   * @param {Object} autosave A raw autosave object from the REST API.
4867   *
4868   * @return {boolean} Whether the post can be autosaved.
4869   */
4870  
4871  var selectors_isEditedPostAutosaveable = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4872    return function (state) {
4873      // A post must contain a title, an excerpt, or non-empty content to be valid for autosaving.
4874      if (!selectors_isEditedPostSaveable(state)) {
4875        return false;
4876      } // A post is not autosavable when there is a post autosave lock.
4877  
4878  
4879      if (isPostAutosavingLocked(state)) {
4880        return false;
4881      }
4882  
4883      var postType = selectors_getCurrentPostType(state);
4884      var postId = selectors_getCurrentPostId(state);
4885      var hasFetchedAutosave = select('core').hasFetchedAutosaves(postType, postId);
4886      var currentUserId = Object(external_this_lodash_["get"])(select('core').getCurrentUser(), ['id']); // Disable reason - this line causes the side-effect of fetching the autosave
4887      // via a resolver, moving below the return would result in the autosave never
4888      // being fetched.
4889      // eslint-disable-next-line @wordpress/no-unused-vars-before-return
4890  
4891      var autosave = select('core').getAutosave(postType, postId, currentUserId); // If any existing autosaves have not yet been fetched, this function is
4892      // unable to determine if the post is autosaveable, so return false.
4893  
4894      if (!hasFetchedAutosave) {
4895        return false;
4896      } // If we don't already have an autosave, the post is autosaveable.
4897  
4898  
4899      if (!autosave) {
4900        return true;
4901      } // To avoid an expensive content serialization, use the content dirtiness
4902      // flag in place of content field comparison against the known autosave.
4903      // This is not strictly accurate, and relies on a tolerance toward autosave
4904      // request failures for unnecessary saves.
4905  
4906  
4907      if (hasChangedContent(state)) {
4908        return true;
4909      } // If the title or excerpt has changed, the post is autosaveable.
4910  
4911  
4912      return ['title', 'excerpt'].some(function (field) {
4913        return getPostRawValue(autosave[field]) !== selectors_getEditedPostAttribute(state, field);
4914      });
4915    };
4916  });
4917  /**
4918   * Returns the current autosave, or null if one is not set (i.e. if the post
4919   * has yet to be autosaved, or has been saved or published since the last
4920   * autosave).
4921   *
4922   * @deprecated since 5.6. Callers should use the `getAutosave( postType, postId, userId )`
4923   *                selector from the '@wordpress/core-data' package.
4924   *
4925   * @param {Object} state Editor state.
4926   *
4927   * @return {?Object} Current autosave, if exists.
4928   */
4929  
4930  var getAutosave = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4931    return function (state) {
4932      external_this_wp_deprecated_default()("`wp.data.select( 'core/editor' ).getAutosave()`", {
4933        alternative: "`wp.data.select( 'core' ).getAutosave( postType, postId, userId )`",
4934        plugin: 'Gutenberg'
4935      });
4936      var postType = selectors_getCurrentPostType(state);
4937      var postId = selectors_getCurrentPostId(state);
4938      var currentUserId = Object(external_this_lodash_["get"])(select('core').getCurrentUser(), ['id']);
4939      var autosave = select('core').getAutosave(postType, postId, currentUserId);
4940      return Object(external_this_lodash_["mapValues"])(Object(external_this_lodash_["pick"])(autosave, AUTOSAVE_PROPERTIES), getPostRawValue);
4941    };
4942  });
4943  /**
4944   * Returns the true if there is an existing autosave, otherwise false.
4945   *
4946   * @deprecated since 5.6. Callers should use the `getAutosave( postType, postId, userId )` selector
4947   *             from the '@wordpress/core-data' package and check for a truthy value.
4948   *
4949   * @param {Object} state Global application state.
4950   *
4951   * @return {boolean} Whether there is an existing autosave.
4952   */
4953  
4954  var hasAutosave = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4955    return function (state) {
4956      external_this_wp_deprecated_default()("`wp.data.select( 'core/editor' ).hasAutosave()`", {
4957        alternative: "`!! wp.data.select( 'core' ).getAutosave( postType, postId, userId )`",
4958        plugin: 'Gutenberg'
4959      });
4960      var postType = selectors_getCurrentPostType(state);
4961      var postId = selectors_getCurrentPostId(state);
4962      var currentUserId = Object(external_this_lodash_["get"])(select('core').getCurrentUser(), ['id']);
4963      return !!select('core').getAutosave(postType, postId, currentUserId);
4964    };
4965  });
4966  /**
4967   * Return true if the post being edited is being scheduled. Preferring the
4968   * unsaved status values.
4969   *
4970   * @param {Object} state Global application state.
4971   *
4972   * @return {boolean} Whether the post has been published.
4973   */
4974  
4975  function selectors_isEditedPostBeingScheduled(state) {
4976    var date = selectors_getEditedPostAttribute(state, 'date'); // Offset the date by one minute (network latency)
4977  
4978    var checkedDate = new Date(Number(Object(external_this_wp_date_["getDate"])(date)) - ONE_MINUTE_IN_MS);
4979    return Object(external_this_wp_date_["isInTheFuture"])(checkedDate);
4980  }
4981  /**
4982   * Returns whether the current post should be considered to have a "floating"
4983   * date (i.e. that it would publish "Immediately" rather than at a set time).
4984   *
4985   * Unlike in the PHP backend, the REST API returns a full date string for posts
4986   * where the 0000-00-00T00:00:00 placeholder is present in the database. To
4987   * infer that a post is set to publish "Immediately" we check whether the date
4988   * and modified date are the same.
4989   *
4990   * @param {Object} state Editor state.
4991   *
4992   * @return {boolean} Whether the edited post has a floating date value.
4993   */
4994  
4995  function isEditedPostDateFloating(state) {
4996    var date = selectors_getEditedPostAttribute(state, 'date');
4997    var modified = selectors_getEditedPostAttribute(state, 'modified');
4998    var status = selectors_getEditedPostAttribute(state, 'status');
4999  
5000    if (status === 'draft' || status === 'auto-draft' || status === 'pending') {
5001      return date === modified || date === null;
5002    }
5003  
5004    return false;
5005  }
5006  /**
5007   * Returns true if the post is currently being saved, or false otherwise.
5008   *
5009   * @param {Object} state Global application state.
5010   *
5011   * @return {boolean} Whether post is being saved.
5012   */
5013  
5014  var selectors_isSavingPost = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
5015    return function (state) {
5016      var postType = selectors_getCurrentPostType(state);
5017      var postId = selectors_getCurrentPostId(state);
5018      return select('core').isSavingEntityRecord('postType', postType, postId);
5019    };
5020  });
5021  /**
5022   * Returns true if a previous post save was attempted successfully, or false
5023   * otherwise.
5024   *
5025   * @param {Object} state Global application state.
5026   *
5027   * @return {boolean} Whether the post was saved successfully.
5028   */
5029  
5030  var didPostSaveRequestSucceed = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
5031    return function (state) {
5032      var postType = selectors_getCurrentPostType(state);
5033      var postId = selectors_getCurrentPostId(state);
5034      return !select('core').getLastEntitySaveError('postType', postType, postId);
5035    };
5036  });
5037  /**
5038   * Returns true if a previous post save was attempted but failed, or false
5039   * otherwise.
5040   *
5041   * @param {Object} state Global application state.
5042   *
5043   * @return {boolean} Whether the post save failed.
5044   */
5045  
5046  var didPostSaveRequestFail = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
5047    return function (state) {
5048      var postType = selectors_getCurrentPostType(state);
5049      var postId = selectors_getCurrentPostId(state);
5050      return !!select('core').getLastEntitySaveError('postType', postType, postId);
5051    };
5052  });
5053  /**
5054   * Returns true if the post is autosaving, or false otherwise.
5055   *
5056   * @param {Object} state Global application state.
5057   *
5058   * @return {boolean} Whether the post is autosaving.
5059   */
5060  
5061  function selectors_isAutosavingPost(state) {
5062    if (!selectors_isSavingPost(state)) {
5063      return false;
5064    }
5065  
5066    return !!Object(external_this_lodash_["get"])(state.saving, ['options', 'isAutosave']);
5067  }
5068  /**
5069   * Returns true if the post is being previewed, or false otherwise.
5070   *
5071   * @param {Object} state Global application state.
5072   *
5073   * @return {boolean} Whether the post is being previewed.
5074   */
5075  
5076  function isPreviewingPost(state) {
5077    if (!selectors_isSavingPost(state)) {
5078      return false;
5079    }
5080  
5081    return !!state.saving.options.isPreview;
5082  }
5083  /**
5084   * Returns the post preview link
5085   *
5086   * @param {Object} state Global application state.
5087   *
5088   * @return {string?} Preview Link.
5089   */
5090  
5091  function selectors_getEditedPostPreviewLink(state) {
5092    if (state.saving.pending || selectors_isSavingPost(state)) {
5093      return;
5094    }
5095  
5096    var previewLink = getAutosaveAttribute(state, 'preview_link');
5097  
5098    if (!previewLink) {
5099      previewLink = selectors_getEditedPostAttribute(state, 'link');
5100  
5101      if (previewLink) {
5102        previewLink = Object(external_this_wp_url_["addQueryArgs"])(previewLink, {
5103          preview: true
5104        });
5105      }
5106    }
5107  
5108    var featuredImageId = selectors_getEditedPostAttribute(state, 'featured_media');
5109  
5110    if (previewLink && featuredImageId) {
5111      return Object(external_this_wp_url_["addQueryArgs"])(previewLink, {
5112        _thumbnail_id: featuredImageId
5113      });
5114    }
5115  
5116    return previewLink;
5117  }
5118  /**
5119   * Returns a suggested post format for the current post, inferred only if there
5120   * is a single block within the post and it is of a type known to match a
5121   * default post format. Returns null if the format cannot be determined.
5122   *
5123   * @param {Object} state Global application state.
5124   *
5125   * @return {?string} Suggested post format.
5126   */
5127  
5128  function selectors_getSuggestedPostFormat(state) {
5129    var blocks = selectors_getEditorBlocks(state);
5130    var name; // If there is only one block in the content of the post grab its name
5131    // so we can derive a suitable post format from it.
5132  
5133    if (blocks.length === 1) {
5134      name = blocks[0].name;
5135    } // If there are two blocks in the content and the last one is a text blocks
5136    // grab the name of the first one to also suggest a post format from it.
5137  
5138  
5139    if (blocks.length === 2) {
5140      if (blocks[1].name === 'core/paragraph') {
5141        name = blocks[0].name;
5142      }
5143    } // We only convert to default post formats in core.
5144  
5145  
5146    switch (name) {
5147      case 'core/image':
5148        return 'image';
5149  
5150      case 'core/quote':
5151      case 'core/pullquote':
5152        return 'quote';
5153  
5154      case 'core/gallery':
5155        return 'gallery';
5156  
5157      case 'core/video':
5158      case 'core-embed/youtube':
5159      case 'core-embed/vimeo':
5160        return 'video';
5161  
5162      case 'core/audio':
5163      case 'core-embed/spotify':
5164      case 'core-embed/soundcloud':
5165        return 'audio';
5166    }
5167  
5168    return null;
5169  }
5170  /**
5171   * Returns a set of blocks which are to be used in consideration of the post's
5172   * generated save content.
5173   *
5174   * @deprecated since Gutenberg 6.2.0.
5175   *
5176   * @param {Object} state Editor state.
5177   *
5178   * @return {WPBlock[]} Filtered set of blocks for save.
5179   */
5180  
5181  function getBlocksForSerialization(state) {
5182    external_this_wp_deprecated_default()('`core/editor` getBlocksForSerialization selector', {
5183      plugin: 'Gutenberg',
5184      alternative: 'getEditorBlocks',
5185      hint: 'Blocks serialization pre-processing occurs at save time'
5186    });
5187    var blocks = state.editor.present.blocks.value; // WARNING: Any changes to the logic of this function should be verified
5188    // against the implementation of isEditedPostEmpty, which bypasses this
5189    // function for performance' sake, in an assumption of this current logic
5190    // being irrelevant to the optimized condition of emptiness.
5191    // A single unmodified default block is assumed to be equivalent to an
5192    // empty post.
5193  
5194    var isSingleUnmodifiedDefaultBlock = blocks.length === 1 && Object(external_this_wp_blocks_["isUnmodifiedDefaultBlock"])(blocks[0]);
5195  
5196    if (isSingleUnmodifiedDefaultBlock) {
5197      return [];
5198    }
5199  
5200    return blocks;
5201  }
5202  /**
5203   * Returns the content of the post being edited.
5204   *
5205   * @param {Object} state Global application state.
5206   *
5207   * @return {string} Post content.
5208   */
5209  
5210  var getEditedPostContent = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
5211    return function (state) {
5212      var postId = selectors_getCurrentPostId(state);
5213      var postType = selectors_getCurrentPostType(state);
5214      var record = select('core').getEditedEntityRecord('postType', postType, postId);
5215  
5216      if (record) {
5217        if (typeof record.content === 'function') {
5218          return record.content(record);
5219        } else if (record.blocks) {
5220          return serialize_blocks(record.blocks);
5221        } else if (record.content) {
5222          return record.content;
5223        }
5224      }
5225  
5226      return '';
5227    };
5228  });
5229  /**
5230   * Returns the reusable block with the given ID.
5231   *
5232   * @param {Object}        state Global application state.
5233   * @param {number|string} ref   The reusable block's ID.
5234   *
5235   * @return {Object} The reusable block, or null if none exists.
5236   */
5237  
5238  var __experimentalGetReusableBlock = Object(rememo["a" /* default */])(function (state, ref) {
5239    var block = state.reusableBlocks.data[ref];
5240  
5241    if (!block) {
5242      return null;
5243    }
5244  
5245    var isTemporary = isNaN(parseInt(ref));
5246    return selectors_objectSpread({}, block, {
5247      id: isTemporary ? ref : +ref,
5248      isTemporary: isTemporary
5249    });
5250  }, function (state, ref) {
5251    return [state.reusableBlocks.data[ref]];
5252  });
5253  /**
5254   * Returns whether or not the reusable block with the given ID is being saved.
5255   *
5256   * @param {Object} state Global application state.
5257   * @param {string} ref   The reusable block's ID.
5258   *
5259   * @return {boolean} Whether or not the reusable block is being saved.
5260   */
5261  
5262  function __experimentalIsSavingReusableBlock(state, ref) {
5263    return state.reusableBlocks.isSaving[ref] || false;
5264  }
5265  /**
5266   * Returns true if the reusable block with the given ID is being fetched, or
5267   * false otherwise.
5268   *
5269   * @param {Object} state Global application state.
5270   * @param {string} ref   The reusable block's ID.
5271   *
5272   * @return {boolean} Whether the reusable block is being fetched.
5273   */
5274  
5275  function __experimentalIsFetchingReusableBlock(state, ref) {
5276    return !!state.reusableBlocks.isFetching[ref];
5277  }
5278  /**
5279   * Returns an array of all reusable blocks.
5280   *
5281   * @param {Object} state Global application state.
5282   *
5283   * @return {Array} An array of all reusable blocks.
5284   */
5285  
5286  var selectors_experimentalGetReusableBlocks = Object(rememo["a" /* default */])(function (state) {
5287    return Object(external_this_lodash_["map"])(state.reusableBlocks.data, function (value, ref) {
5288      return __experimentalGetReusableBlock(state, ref);
5289    });
5290  }, function (state) {
5291    return [state.reusableBlocks.data];
5292  });
5293  /**
5294   * Returns state object prior to a specified optimist transaction ID, or `null`
5295   * if the transaction corresponding to the given ID cannot be found.
5296   *
5297   * @param {Object} state         Current global application state.
5298   * @param {Object} transactionId Optimist transaction ID.
5299   *
5300   * @return {Object} Global application state prior to transaction.
5301   */
5302  
5303  function getStateBeforeOptimisticTransaction(state, transactionId) {
5304    var transaction = Object(external_this_lodash_["find"])(state.optimist, function (entry) {
5305      return entry.beforeState && Object(external_this_lodash_["get"])(entry.action, ['optimist', 'id']) === transactionId;
5306    });
5307    return transaction ? transaction.beforeState : null;
5308  }
5309  /**
5310   * Returns true if the post is being published, or false otherwise.
5311   *
5312   * @param {Object} state Global application state.
5313   *
5314   * @return {boolean} Whether post is being published.
5315   */
5316  
5317  function selectors_isPublishingPost(state) {
5318    if (!selectors_isSavingPost(state)) {
5319      return false;
5320    } // Saving is optimistic, so assume that current post would be marked as
5321    // published if publishing
5322  
5323  
5324    if (!selectors_isCurrentPostPublished(state)) {
5325      return false;
5326    } // Use post update transaction ID to retrieve the state prior to the
5327    // optimistic transaction
5328  
5329  
5330    var stateBeforeRequest = getStateBeforeOptimisticTransaction(state, POST_UPDATE_TRANSACTION_ID); // Consider as publishing when current post prior to request was not
5331    // considered published
5332  
5333    return !!stateBeforeRequest && !selectors_isCurrentPostPublished(null, stateBeforeRequest.currentPost);
5334  }
5335  /**
5336   * Returns whether the permalink is editable or not.
5337   *
5338   * @param {Object} state Editor state.
5339   *
5340   * @return {boolean} Whether or not the permalink is editable.
5341   */
5342  
5343  function isPermalinkEditable(state) {
5344    var permalinkTemplate = selectors_getEditedPostAttribute(state, 'permalink_template');
5345    return PERMALINK_POSTNAME_REGEX.test(permalinkTemplate);
5346  }
5347  /**
5348   * Returns the permalink for the post.
5349   *
5350   * @param {Object} state Editor state.
5351   *
5352   * @return {?string} The permalink, or null if the post is not viewable.
5353   */
5354  
5355  function getPermalink(state) {
5356    var permalinkParts = getPermalinkParts(state);
5357  
5358    if (!permalinkParts) {
5359      return null;
5360    }
5361  
5362    var prefix = permalinkParts.prefix,
5363        postName = permalinkParts.postName,
5364        suffix = permalinkParts.suffix;
5365  
5366    if (isPermalinkEditable(state)) {
5367      return prefix + postName + suffix;
5368    }
5369  
5370    return prefix;
5371  }
5372  /**
5373   * Returns the slug for the post being edited, preferring a manually edited
5374   * value if one exists, then a sanitized version of the current post title, and
5375   * finally the post ID.
5376   *
5377   * @param {Object} state Editor state.
5378   *
5379   * @return {string} The current slug to be displayed in the editor
5380   */
5381  
5382  function getEditedPostSlug(state) {
5383    return selectors_getEditedPostAttribute(state, 'slug') || cleanForSlug(selectors_getEditedPostAttribute(state, 'title')) || selectors_getCurrentPostId(state);
5384  }
5385  /**
5386   * Returns the permalink for a post, split into it's three parts: the prefix,
5387   * the postName, and the suffix.
5388   *
5389   * @param {Object} state Editor state.
5390   *
5391   * @return {Object} An object containing the prefix, postName, and suffix for
5392   *                  the permalink, or null if the post is not viewable.
5393   */
5394  
5395  function getPermalinkParts(state) {
5396    var permalinkTemplate = selectors_getEditedPostAttribute(state, 'permalink_template');
5397  
5398    if (!permalinkTemplate) {
5399      return null;
5400    }
5401  
5402    var postName = selectors_getEditedPostAttribute(state, 'slug') || selectors_getEditedPostAttribute(state, 'generated_slug');
5403  
5404    var _permalinkTemplate$sp = permalinkTemplate.split(PERMALINK_POSTNAME_REGEX),
5405        _permalinkTemplate$sp2 = Object(slicedToArray["a" /* default */])(_permalinkTemplate$sp, 2),
5406        prefix = _permalinkTemplate$sp2[0],
5407        suffix = _permalinkTemplate$sp2[1];
5408  
5409    return {
5410      prefix: prefix,
5411      postName: postName,
5412      suffix: suffix
5413    };
5414  }
5415  /**
5416   * Returns true if an optimistic transaction is pending commit, for which the
5417   * before state satisfies the given predicate function.
5418   *
5419   * @param {Object}   state     Editor state.
5420   * @param {Function} predicate Function given state, returning true if match.
5421   *
5422   * @return {boolean} Whether predicate matches for some history.
5423   */
5424  
5425  function inSomeHistory(state, predicate) {
5426    var optimist = state.optimist; // In recursion, optimist state won't exist. Assume exhausted options.
5427  
5428    if (!optimist) {
5429      return false;
5430    }
5431  
5432    return optimist.some(function (_ref) {
5433      var beforeState = _ref.beforeState;
5434      return beforeState && predicate(beforeState);
5435    });
5436  }
5437  /**
5438   * Returns whether the post is locked.
5439   *
5440   * @param {Object} state Global application state.
5441   *
5442   * @return {boolean} Is locked.
5443   */
5444  
5445  function isPostLocked(state) {
5446    return state.postLock.isLocked;
5447  }
5448  /**
5449   * Returns whether post saving is locked.
5450   *
5451   * @param {Object} state Global application state.
5452   *
5453   * @return {boolean} Is locked.
5454   */
5455  
5456  function selectors_isPostSavingLocked(state) {
5457    return Object.keys(state.postSavingLock).length > 0;
5458  }
5459  /**
5460   * Returns whether post autosaving is locked.
5461   *
5462   * @param {Object} state Global application state.
5463   *
5464   * @return {boolean} Is locked.
5465   */
5466  
5467  function isPostAutosavingLocked(state) {
5468    return Object.keys(state.postAutosavingLock).length > 0;
5469  }
5470  /**
5471   * Returns whether the edition of the post has been taken over.
5472   *
5473   * @param {Object} state Global application state.
5474   *
5475   * @return {boolean} Is post lock takeover.
5476   */
5477  
5478  function isPostLockTakeover(state) {
5479    return state.postLock.isTakeover;
5480  }
5481  /**
5482   * Returns details about the post lock user.
5483   *
5484   * @param {Object} state Global application state.
5485   *
5486   * @return {Object} A user object.
5487   */
5488  
5489  function getPostLockUser(state) {
5490    return state.postLock.user;
5491  }
5492  /**
5493   * Returns the active post lock.
5494   *
5495   * @param {Object} state Global application state.
5496   *
5497   * @return {Object} The lock object.
5498   */
5499  
5500  function getActivePostLock(state) {
5501    return state.postLock.activePostLock;
5502  }
5503  /**
5504   * Returns whether or not the user has the unfiltered_html capability.
5505   *
5506   * @param {Object} state Editor state.
5507   *
5508   * @return {boolean} Whether the user can or can't post unfiltered HTML.
5509   */
5510  
5511  function selectors_canUserUseUnfilteredHTML(state) {
5512    return Object(external_this_lodash_["has"])(selectors_getCurrentPost(state), ['_links', 'wp:action-unfiltered-html']);
5513  }
5514  /**
5515   * Returns whether the pre-publish panel should be shown
5516   * or skipped when the user clicks the "publish" button.
5517   *
5518   * @param {Object} state Global application state.
5519   *
5520   * @return {boolean} Whether the pre-publish panel should be shown or not.
5521   */
5522  
5523  function selectors_isPublishSidebarEnabled(state) {
5524    if (state.preferences.hasOwnProperty('isPublishSidebarEnabled')) {
5525      return state.preferences.isPublishSidebarEnabled;
5526    }
5527  
5528    return PREFERENCES_DEFAULTS.isPublishSidebarEnabled;
5529  }
5530  /**
5531   * Return the current block list.
5532   *
5533   * @param {Object} state
5534   * @return {Array} Block list.
5535   */
5536  
5537  function selectors_getEditorBlocks(state) {
5538    return selectors_getEditedPostAttribute(state, 'blocks') || EMPTY_ARRAY;
5539  }
5540  /**
5541   * A block selection object.
5542   *
5543   * @typedef {Object} WPBlockSelection
5544   *
5545   * @property {string} clientId     A block client ID.
5546   * @property {string} attributeKey A block attribute key.
5547   * @property {number} offset       An attribute value offset, based on the rich
5548   *                                 text value. See `wp.richText.create`.
5549   */
5550  
5551  /**
5552   * Returns the current selection start.
5553   *
5554   * @param {Object} state
5555   * @return {WPBlockSelection} The selection start.
5556   */
5557  
5558  function selectors_getEditorSelectionStart(state) {
5559    return selectors_getEditedPostAttribute(state, 'selectionStart');
5560  }
5561  /**
5562   * Returns the current selection end.
5563   *
5564   * @param {Object} state
5565   * @return {WPBlockSelection} The selection end.
5566   */
5567  
5568  function selectors_getEditorSelectionEnd(state) {
5569    return selectors_getEditedPostAttribute(state, 'selectionEnd');
5570  }
5571  /**
5572   * Is the editor ready
5573   *
5574   * @param {Object} state
5575   * @return {boolean} is Ready.
5576   */
5577  
5578  function __unstableIsEditorReady(state) {
5579    return state.isReady;
5580  }
5581  /**
5582   * Returns the post editor settings.
5583   *
5584   * @param {Object} state Editor state.
5585   *
5586   * @return {Object} The editor settings object.
5587   */
5588  
5589  function selectors_getEditorSettings(state) {
5590    return state.editorSettings;
5591  }
5592  /*
5593   * Backward compatibility
5594   */
5595  
5596  function getBlockEditorSelector(name) {
5597    return Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
5598      return function (state) {
5599        var _select;
5600  
5601        external_this_wp_deprecated_default()("`wp.data.select( 'core/editor' )." + name + '`', {
5602          alternative: "`wp.data.select( 'core/block-editor' )." + name + '`'
5603        });
5604  
5605        for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
5606          args[_key - 1] = arguments[_key];
5607        }
5608  
5609        return (_select = select('core/block-editor'))[name].apply(_select, args);
5610      };
5611    });
5612  }
5613  /**
5614   * @see getBlockName in core/block-editor store.
5615   */
5616  
5617  
5618  var getBlockName = getBlockEditorSelector('getBlockName');
5619  /**
5620   * @see isBlockValid in core/block-editor store.
5621   */
5622  
5623  var isBlockValid = getBlockEditorSelector('isBlockValid');
5624  /**
5625   * @see getBlockAttributes in core/block-editor store.
5626   */
5627  
5628  var getBlockAttributes = getBlockEditorSelector('getBlockAttributes');
5629  /**
5630   * @see getBlock in core/block-editor store.
5631   */
5632  
5633  var selectors_getBlock = getBlockEditorSelector('getBlock');
5634  /**
5635   * @see getBlocks in core/block-editor store.
5636   */
5637  
5638  var selectors_getBlocks = getBlockEditorSelector('getBlocks');
5639  /**
5640   * @see __unstableGetBlockWithoutInnerBlocks in core/block-editor store.
5641   */
5642  
5643  var __unstableGetBlockWithoutInnerBlocks = getBlockEditorSelector('__unstableGetBlockWithoutInnerBlocks');
5644  /**
5645   * @see getClientIdsOfDescendants in core/block-editor store.
5646   */
5647  
5648  var getClientIdsOfDescendants = getBlockEditorSelector('getClientIdsOfDescendants');
5649  /**
5650   * @see getClientIdsWithDescendants in core/block-editor store.
5651   */
5652  
5653  var getClientIdsWithDescendants = getBlockEditorSelector('getClientIdsWithDescendants');
5654  /**
5655   * @see getGlobalBlockCount in core/block-editor store.
5656   */
5657  
5658  var getGlobalBlockCount = getBlockEditorSelector('getGlobalBlockCount');
5659  /**
5660   * @see getBlocksByClientId in core/block-editor store.
5661   */
5662  
5663  var selectors_getBlocksByClientId = getBlockEditorSelector('getBlocksByClientId');
5664  /**
5665   * @see getBlockCount in core/block-editor store.
5666   */
5667  
5668  var getBlockCount = getBlockEditorSelector('getBlockCount');
5669  /**
5670   * @see getBlockSelectionStart in core/block-editor store.
5671   */
5672  
5673  var getBlockSelectionStart = getBlockEditorSelector('getBlockSelectionStart');
5674  /**
5675   * @see getBlockSelectionEnd in core/block-editor store.
5676   */
5677  
5678  var getBlockSelectionEnd = getBlockEditorSelector('getBlockSelectionEnd');
5679  /**
5680   * @see getSelectedBlockCount in core/block-editor store.
5681   */
5682  
5683  var getSelectedBlockCount = getBlockEditorSelector('getSelectedBlockCount');
5684  /**
5685   * @see hasSelectedBlock in core/block-editor store.
5686   */
5687  
5688  var hasSelectedBlock = getBlockEditorSelector('hasSelectedBlock');
5689  /**
5690   * @see getSelectedBlockClientId in core/block-editor store.
5691   */
5692  
5693  var getSelectedBlockClientId = getBlockEditorSelector('getSelectedBlockClientId');
5694  /**
5695   * @see getSelectedBlock in core/block-editor store.
5696   */
5697  
5698  var getSelectedBlock = getBlockEditorSelector('getSelectedBlock');
5699  /**
5700   * @see getBlockRootClientId in core/block-editor store.
5701   */
5702  
5703  var getBlockRootClientId = getBlockEditorSelector('getBlockRootClientId');
5704  /**
5705   * @see getBlockHierarchyRootClientId in core/block-editor store.
5706   */
5707  
5708  var getBlockHierarchyRootClientId = getBlockEditorSelector('getBlockHierarchyRootClientId');
5709  /**
5710   * @see getAdjacentBlockClientId in core/block-editor store.
5711   */
5712  
5713  var getAdjacentBlockClientId = getBlockEditorSelector('getAdjacentBlockClientId');
5714  /**
5715   * @see getPreviousBlockClientId in core/block-editor store.
5716   */
5717  
5718  var getPreviousBlockClientId = getBlockEditorSelector('getPreviousBlockClientId');
5719  /**
5720   * @see getNextBlockClientId in core/block-editor store.
5721   */
5722  
5723  var getNextBlockClientId = getBlockEditorSelector('getNextBlockClientId');
5724  /**
5725   * @see getSelectedBlocksInitialCaretPosition in core/block-editor store.
5726   */
5727  
5728  var getSelectedBlocksInitialCaretPosition = getBlockEditorSelector('getSelectedBlocksInitialCaretPosition');
5729  /**
5730   * @see getMultiSelectedBlockClientIds in core/block-editor store.
5731   */
5732  
5733  var getMultiSelectedBlockClientIds = getBlockEditorSelector('getMultiSelectedBlockClientIds');
5734  /**
5735   * @see getMultiSelectedBlocks in core/block-editor store.
5736   */
5737  
5738  var getMultiSelectedBlocks = getBlockEditorSelector('getMultiSelectedBlocks');
5739  /**
5740   * @see getFirstMultiSelectedBlockClientId in core/block-editor store.
5741   */
5742  
5743  var getFirstMultiSelectedBlockClientId = getBlockEditorSelector('getFirstMultiSelectedBlockClientId');
5744  /**
5745   * @see getLastMultiSelectedBlockClientId in core/block-editor store.
5746   */
5747  
5748  var getLastMultiSelectedBlockClientId = getBlockEditorSelector('getLastMultiSelectedBlockClientId');
5749  /**
5750   * @see isFirstMultiSelectedBlock in core/block-editor store.
5751   */
5752  
5753  var isFirstMultiSelectedBlock = getBlockEditorSelector('isFirstMultiSelectedBlock');
5754  /**
5755   * @see isBlockMultiSelected in core/block-editor store.
5756   */
5757  
5758  var isBlockMultiSelected = getBlockEditorSelector('isBlockMultiSelected');
5759  /**
5760   * @see isAncestorMultiSelected in core/block-editor store.
5761   */
5762  
5763  var isAncestorMultiSelected = getBlockEditorSelector('isAncestorMultiSelected');
5764  /**
5765   * @see getMultiSelectedBlocksStartClientId in core/block-editor store.
5766   */
5767  
5768  var getMultiSelectedBlocksStartClientId = getBlockEditorSelector('getMultiSelectedBlocksStartClientId');
5769  /**
5770   * @see getMultiSelectedBlocksEndClientId in core/block-editor store.
5771   */
5772  
5773  var getMultiSelectedBlocksEndClientId = getBlockEditorSelector('getMultiSelectedBlocksEndClientId');
5774  /**
5775   * @see getBlockOrder in core/block-editor store.
5776   */
5777  
5778  var getBlockOrder = getBlockEditorSelector('getBlockOrder');
5779  /**
5780   * @see getBlockIndex in core/block-editor store.
5781   */
5782  
5783  var getBlockIndex = getBlockEditorSelector('getBlockIndex');
5784  /**
5785   * @see isBlockSelected in core/block-editor store.
5786   */
5787  
5788  var isBlockSelected = getBlockEditorSelector('isBlockSelected');
5789  /**
5790   * @see hasSelectedInnerBlock in core/block-editor store.
5791   */
5792  
5793  var hasSelectedInnerBlock = getBlockEditorSelector('hasSelectedInnerBlock');
5794  /**
5795   * @see isBlockWithinSelection in core/block-editor store.
5796   */
5797  
5798  var isBlockWithinSelection = getBlockEditorSelector('isBlockWithinSelection');
5799  /**
5800   * @see hasMultiSelection in core/block-editor store.
5801   */
5802  
5803  var hasMultiSelection = getBlockEditorSelector('hasMultiSelection');
5804  /**
5805   * @see isMultiSelecting in core/block-editor store.
5806   */
5807  
5808  var isMultiSelecting = getBlockEditorSelector('isMultiSelecting');
5809  /**
5810   * @see isSelectionEnabled in core/block-editor store.
5811   */
5812  
5813  var isSelectionEnabled = getBlockEditorSelector('isSelectionEnabled');
5814  /**
5815   * @see getBlockMode in core/block-editor store.
5816   */
5817  
5818  var getBlockMode = getBlockEditorSelector('getBlockMode');
5819  /**
5820   * @see isTyping in core/block-editor store.
5821   */
5822  
5823  var isTyping = getBlockEditorSelector('isTyping');
5824  /**
5825   * @see isCaretWithinFormattedText in core/block-editor store.
5826   */
5827  
5828  var isCaretWithinFormattedText = getBlockEditorSelector('isCaretWithinFormattedText');
5829  /**
5830   * @see getBlockInsertionPoint in core/block-editor store.
5831   */
5832  
5833  var getBlockInsertionPoint = getBlockEditorSelector('getBlockInsertionPoint');
5834  /**
5835   * @see isBlockInsertionPointVisible in core/block-editor store.
5836   */
5837  
5838  var isBlockInsertionPointVisible = getBlockEditorSelector('isBlockInsertionPointVisible');
5839  /**
5840   * @see isValidTemplate in core/block-editor store.
5841   */
5842  
5843  var isValidTemplate = getBlockEditorSelector('isValidTemplate');
5844  /**
5845   * @see getTemplate in core/block-editor store.
5846   */
5847  
5848  var getTemplate = getBlockEditorSelector('getTemplate');
5849  /**
5850   * @see getTemplateLock in core/block-editor store.
5851   */
5852  
5853  var getTemplateLock = getBlockEditorSelector('getTemplateLock');
5854  /**
5855   * @see canInsertBlockType in core/block-editor store.
5856   */
5857  
5858  var selectors_canInsertBlockType = getBlockEditorSelector('canInsertBlockType');
5859  /**
5860   * @see getInserterItems in core/block-editor store.
5861   */
5862  
5863  var getInserterItems = getBlockEditorSelector('getInserterItems');
5864  /**
5865   * @see hasInserterItems in core/block-editor store.
5866   */
5867  
5868  var hasInserterItems = getBlockEditorSelector('hasInserterItems');
5869  /**
5870   * @see getBlockListSettings in core/block-editor store.
5871   */
5872  
5873  var getBlockListSettings = getBlockEditorSelector('getBlockListSettings');
5874  
5875  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/effects/reusable-blocks.js
5876  
5877  
5878  
5879  
5880  function reusable_blocks_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
5881  
5882  function reusable_blocks_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { reusable_blocks_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { reusable_blocks_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
5883  
5884  /**
5885   * External dependencies
5886   */
5887  
5888  
5889  /**
5890   * WordPress dependencies
5891   */
5892  
5893  
5894  
5895   // TODO: Ideally this would be the only dispatch in scope. This requires either
5896  // refactoring editor actions to yielded controls, or replacing direct dispatch
5897  // on the editor store with action creators (e.g. `REMOVE_REUSABLE_BLOCK`).
5898  
5899  
5900  /**
5901   * Internal dependencies
5902   */
5903  
5904  
5905  
5906  /**
5907   * Module Constants
5908   */
5909  
5910  var REUSABLE_BLOCK_NOTICE_ID = 'REUSABLE_BLOCK_NOTICE_ID';
5911  /**
5912   * Fetch Reusable blocks Effect Handler.
5913   *
5914   * @param {Object} action  action object.
5915   * @param {Object} store   Redux Store.
5916   */
5917  
5918  var fetchReusableBlocks = /*#__PURE__*/function () {
5919    var _ref = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(function _callee(action, store) {
5920      var id, dispatch, postType, posts, results;
5921      return external_this_regeneratorRuntime_default.a.wrap(function _callee$(_context) {
5922        while (1) {
5923          switch (_context.prev = _context.next) {
5924            case 0:
5925              id = action.id;
5926              dispatch = store.dispatch; // TODO: these are potentially undefined, this fix is in place
5927              // until there is a filter to not use reusable blocks if undefined
5928  
5929              _context.next = 4;
5930              return external_this_wp_apiFetch_default()({
5931                path: '/wp/v2/types/wp_block'
5932              });
5933  
5934            case 4:
5935              postType = _context.sent;
5936  
5937              if (postType) {
5938                _context.next = 7;
5939                break;
5940              }
5941  
5942              return _context.abrupt("return");
5943  
5944            case 7:
5945              _context.prev = 7;
5946  
5947              if (!id) {
5948                _context.next = 15;
5949                break;
5950              }
5951  
5952              _context.next = 11;
5953              return external_this_wp_apiFetch_default()({
5954                path: "/wp/v2/".concat(postType.rest_base, "/").concat(id)
5955              });
5956  
5957            case 11:
5958              _context.t0 = _context.sent;
5959              posts = [_context.t0];
5960              _context.next = 18;
5961              break;
5962  
5963            case 15:
5964              _context.next = 17;
5965              return external_this_wp_apiFetch_default()({
5966                path: "/wp/v2/".concat(postType.rest_base, "?per_page=-1")
5967              });
5968  
5969            case 17:
5970              posts = _context.sent;
5971  
5972            case 18:
5973              results = Object(external_this_lodash_["compact"])(Object(external_this_lodash_["map"])(posts, function (post) {
5974                if (post.status !== 'publish' || post.content.protected) {
5975                  return null;
5976                }
5977  
5978                return reusable_blocks_objectSpread({}, post, {
5979                  content: post.content.raw,
5980                  title: post.title.raw
5981                });
5982              }));
5983  
5984              if (results.length) {
5985                dispatch(__experimentalReceiveReusableBlocks(results));
5986              }
5987  
5988              dispatch({
5989                type: 'FETCH_REUSABLE_BLOCKS_SUCCESS',
5990                id: id
5991              });
5992              _context.next = 26;
5993              break;
5994  
5995            case 23:
5996              _context.prev = 23;
5997              _context.t1 = _context["catch"](7);
5998              dispatch({
5999                type: 'FETCH_REUSABLE_BLOCKS_FAILURE',
6000                id: id,
6001                error: _context.t1
6002              });
6003  
6004            case 26:
6005            case "end":
6006              return _context.stop();
6007          }
6008        }
6009      }, _callee, null, [[7, 23]]);
6010    }));
6011  
6012    return function fetchReusableBlocks(_x, _x2) {
6013      return _ref.apply(this, arguments);
6014    };
6015  }();
6016  /**
6017   * Save Reusable blocks Effect Handler.
6018   *
6019   * @param {Object} action  action object.
6020   * @param {Object} store   Redux Store.
6021   */
6022  
6023  var saveReusableBlocks = /*#__PURE__*/function () {
6024    var _ref2 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(function _callee2(action, store) {
6025      var postType, id, dispatch, state, _getReusableBlock, title, content, isTemporary, data, path, method, updatedReusableBlock, message;
6026  
6027      return external_this_regeneratorRuntime_default.a.wrap(function _callee2$(_context2) {
6028        while (1) {
6029          switch (_context2.prev = _context2.next) {
6030            case 0:
6031              _context2.next = 2;
6032              return external_this_wp_apiFetch_default()({
6033                path: '/wp/v2/types/wp_block'
6034              });
6035  
6036            case 2:
6037              postType = _context2.sent;
6038  
6039              if (postType) {
6040                _context2.next = 5;
6041                break;
6042              }
6043  
6044              return _context2.abrupt("return");
6045  
6046            case 5:
6047              id = action.id;
6048              dispatch = store.dispatch;
6049              state = store.getState();
6050              _getReusableBlock = __experimentalGetReusableBlock(state, id), title = _getReusableBlock.title, content = _getReusableBlock.content, isTemporary = _getReusableBlock.isTemporary;
6051              data = isTemporary ? {
6052                title: title,
6053                content: content,
6054                status: 'publish'
6055              } : {
6056                id: id,
6057                title: title,
6058                content: content,
6059                status: 'publish'
6060              };
6061              path = isTemporary ? "/wp/v2/".concat(postType.rest_base) : "/wp/v2/".concat(postType.rest_base, "/").concat(id);
6062              method = isTemporary ? 'POST' : 'PUT';
6063              _context2.prev = 12;
6064              _context2.next = 15;
6065              return external_this_wp_apiFetch_default()({
6066                path: path,
6067                data: data,
6068                method: method
6069              });
6070  
6071            case 15:
6072              updatedReusableBlock = _context2.sent;
6073              dispatch({
6074                type: 'SAVE_REUSABLE_BLOCK_SUCCESS',
6075                updatedId: updatedReusableBlock.id,
6076                id: id
6077              });
6078              message = isTemporary ? Object(external_this_wp_i18n_["__"])('Block created.') : Object(external_this_wp_i18n_["__"])('Block updated.');
6079              Object(external_this_wp_data_["dispatch"])('core/notices').createSuccessNotice(message, {
6080                id: REUSABLE_BLOCK_NOTICE_ID,
6081                type: 'snackbar'
6082              });
6083  
6084              Object(external_this_wp_data_["dispatch"])('core/block-editor').__unstableSaveReusableBlock(id, updatedReusableBlock.id);
6085  
6086              _context2.next = 26;
6087              break;
6088  
6089            case 22:
6090              _context2.prev = 22;
6091              _context2.t0 = _context2["catch"](12);
6092              dispatch({
6093                type: 'SAVE_REUSABLE_BLOCK_FAILURE',
6094                id: id
6095              });
6096              Object(external_this_wp_data_["dispatch"])('core/notices').createErrorNotice(_context2.t0.message, {
6097                id: REUSABLE_BLOCK_NOTICE_ID
6098              });
6099  
6100            case 26:
6101            case "end":
6102              return _context2.stop();
6103          }
6104        }
6105      }, _callee2, null, [[12, 22]]);
6106    }));
6107  
6108    return function saveReusableBlocks(_x3, _x4) {
6109      return _ref2.apply(this, arguments);
6110    };
6111  }();
6112  /**
6113   * Delete Reusable blocks Effect Handler.
6114   *
6115   * @param {Object} action  action object.
6116   * @param {Object} store   Redux Store.
6117   */
6118  
6119  var deleteReusableBlocks = /*#__PURE__*/function () {
6120    var _ref3 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(function _callee3(action, store) {
6121      var postType, id, getState, dispatch, reusableBlock, allBlocks, associatedBlocks, associatedBlockClientIds, transactionId, message;
6122      return external_this_regeneratorRuntime_default.a.wrap(function _callee3$(_context3) {
6123        while (1) {
6124          switch (_context3.prev = _context3.next) {
6125            case 0:
6126              _context3.next = 2;
6127              return external_this_wp_apiFetch_default()({
6128                path: '/wp/v2/types/wp_block'
6129              });
6130  
6131            case 2:
6132              postType = _context3.sent;
6133  
6134              if (postType) {
6135                _context3.next = 5;
6136                break;
6137              }
6138  
6139              return _context3.abrupt("return");
6140  
6141            case 5:
6142              id = action.id;
6143              getState = store.getState, dispatch = store.dispatch; // Don't allow a reusable block with a temporary ID to be deleted
6144  
6145              reusableBlock = __experimentalGetReusableBlock(getState(), id);
6146  
6147              if (!(!reusableBlock || reusableBlock.isTemporary)) {
6148                _context3.next = 10;
6149                break;
6150              }
6151  
6152              return _context3.abrupt("return");
6153  
6154            case 10:
6155              // Remove any other blocks that reference this reusable block
6156              allBlocks = Object(external_this_wp_data_["select"])('core/block-editor').getBlocks();
6157              associatedBlocks = allBlocks.filter(function (block) {
6158                return Object(external_this_wp_blocks_["isReusableBlock"])(block) && block.attributes.ref === id;
6159              });
6160              associatedBlockClientIds = associatedBlocks.map(function (block) {
6161                return block.clientId;
6162              });
6163              transactionId = Object(external_this_lodash_["uniqueId"])();
6164              dispatch({
6165                type: 'REMOVE_REUSABLE_BLOCK',
6166                id: id,
6167                optimist: {
6168                  type: redux_optimist["BEGIN"],
6169                  id: transactionId
6170                }
6171              }); // Remove the parsed block.
6172  
6173              if (associatedBlockClientIds.length) {
6174                Object(external_this_wp_data_["dispatch"])('core/block-editor').removeBlocks(associatedBlockClientIds);
6175              }
6176  
6177              _context3.prev = 16;
6178              _context3.next = 19;
6179              return external_this_wp_apiFetch_default()({
6180                path: "/wp/v2/".concat(postType.rest_base, "/").concat(id),
6181                method: 'DELETE'
6182              });
6183  
6184            case 19:
6185              dispatch({
6186                type: 'DELETE_REUSABLE_BLOCK_SUCCESS',
6187                id: id,
6188                optimist: {
6189                  type: redux_optimist["COMMIT"],
6190                  id: transactionId
6191                }
6192              });
6193              message = Object(external_this_wp_i18n_["__"])('Block deleted.');
6194              Object(external_this_wp_data_["dispatch"])('core/notices').createSuccessNotice(message, {
6195                id: REUSABLE_BLOCK_NOTICE_ID,
6196                type: 'snackbar'
6197              });
6198              _context3.next = 28;
6199              break;
6200  
6201            case 24:
6202              _context3.prev = 24;
6203              _context3.t0 = _context3["catch"](16);
6204              dispatch({
6205                type: 'DELETE_REUSABLE_BLOCK_FAILURE',
6206                id: id,
6207                optimist: {
6208                  type: redux_optimist["REVERT"],
6209                  id: transactionId
6210                }
6211              });
6212              Object(external_this_wp_data_["dispatch"])('core/notices').createErrorNotice(_context3.t0.message, {
6213                id: REUSABLE_BLOCK_NOTICE_ID
6214              });
6215  
6216            case 28:
6217            case "end":
6218              return _context3.stop();
6219          }
6220        }
6221      }, _callee3, null, [[16, 24]]);
6222    }));
6223  
6224    return function deleteReusableBlocks(_x5, _x6) {
6225      return _ref3.apply(this, arguments);
6226    };
6227  }();
6228  /**
6229   * Convert a reusable block to a static block effect handler
6230   *
6231   * @param {Object} action  action object.
6232   * @param {Object} store   Redux Store.
6233   */
6234  
6235  var reusable_blocks_convertBlockToStatic = function convertBlockToStatic(action, store) {
6236    var state = store.getState();
6237    var oldBlock = Object(external_this_wp_data_["select"])('core/block-editor').getBlock(action.clientId);
6238    var reusableBlock = __experimentalGetReusableBlock(state, oldBlock.attributes.ref);
6239    var newBlocks = Object(external_this_wp_blocks_["parse"])(reusableBlock.content);
6240    Object(external_this_wp_data_["dispatch"])('core/block-editor').replaceBlocks(oldBlock.clientId, newBlocks);
6241  };
6242  /**
6243   * Convert a static block to a reusable block effect handler
6244   *
6245   * @param {Object} action  action object.
6246   * @param {Object} store   Redux Store.
6247   */
6248  
6249  var reusable_blocks_convertBlockToReusable = function convertBlockToReusable(action, store) {
6250    var dispatch = store.dispatch;
6251    var reusableBlock = {
6252      id: Object(external_this_lodash_["uniqueId"])('reusable'),
6253      title: Object(external_this_wp_i18n_["__"])('Untitled Reusable Block'),
6254      content: Object(external_this_wp_blocks_["serialize"])(Object(external_this_wp_data_["select"])('core/block-editor').getBlocksByClientId(action.clientIds))
6255    };
6256    dispatch(__experimentalReceiveReusableBlocks([reusableBlock]));
6257    dispatch(__experimentalSaveReusableBlock(reusableBlock.id));
6258    Object(external_this_wp_data_["dispatch"])('core/block-editor').replaceBlocks(action.clientIds, Object(external_this_wp_blocks_["createBlock"])('core/block', {
6259      ref: reusableBlock.id
6260    }));
6261  };
6262  
6263  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/effects.js
6264  /**
6265   * Internal dependencies
6266   */
6267  
6268  /* harmony default export */ var effects = ({
6269    FETCH_REUSABLE_BLOCKS: function FETCH_REUSABLE_BLOCKS(action, store) {
6270      fetchReusableBlocks(action, store);
6271    },
6272    SAVE_REUSABLE_BLOCK: function SAVE_REUSABLE_BLOCK(action, store) {
6273      saveReusableBlocks(action, store);
6274    },
6275    DELETE_REUSABLE_BLOCK: function DELETE_REUSABLE_BLOCK(action, store) {
6276      deleteReusableBlocks(action, store);
6277    },
6278    CONVERT_BLOCK_TO_STATIC: reusable_blocks_convertBlockToStatic,
6279    CONVERT_BLOCK_TO_REUSABLE: reusable_blocks_convertBlockToReusable
6280  });
6281  
6282  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/middlewares.js
6283  /**
6284   * External dependencies
6285   */
6286  
6287  /**
6288   * Internal dependencies
6289   */
6290  
6291  
6292  /**
6293   * Applies the custom middlewares used specifically in the editor module.
6294   *
6295   * @param {Object} store Store Object.
6296   *
6297   * @return {Object} Update Store Object.
6298   */
6299  
6300  function applyMiddlewares(store) {
6301    var enhancedDispatch = function enhancedDispatch() {
6302      throw new Error('Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.');
6303    };
6304  
6305    var middlewareAPI = {
6306      getState: store.getState,
6307      dispatch: function dispatch() {
6308        return enhancedDispatch.apply(void 0, arguments);
6309      }
6310    };
6311    enhancedDispatch = refx_default()(effects)(middlewareAPI)(store.dispatch);
6312    store.dispatch = enhancedDispatch;
6313    return store;
6314  }
6315  
6316  /* harmony default export */ var middlewares = (applyMiddlewares);
6317  
6318  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/controls.js
6319  /**
6320   * WordPress dependencies
6321   */
6322  
6323  /**
6324   * Returns a control descriptor signalling to subscribe to the registry and
6325   * resolve the control promise only when the next state change occurs.
6326   *
6327   * @return {Object} Control descriptor.
6328   */
6329  
6330  function awaitNextStateChange() {
6331    return {
6332      type: 'AWAIT_NEXT_STATE_CHANGE'
6333    };
6334  }
6335  /**
6336   * Returns a control descriptor signalling to resolve with the current data
6337   * registry.
6338   *
6339   * @return {Object} Control descriptor.
6340   */
6341  
6342  function getRegistry() {
6343    return {
6344      type: 'GET_REGISTRY'
6345    };
6346  }
6347  /**
6348   * Function returning a sessionStorage key to set or retrieve a given post's
6349   * automatic session backup.
6350   *
6351   * Keys are crucially prefixed with 'wp-autosave-' so that wp-login.php's
6352   * `loggedout` handler can clear sessionStorage of any user-private content.
6353   *
6354   * @see https://github.com/WordPress/wordpress-develop/blob/6dad32d2aed47e6c0cf2aee8410645f6d7aba6bd/src/wp-login.php#L103
6355   *
6356   * @param {string} postId  Post ID.
6357   * @return {string}        sessionStorage key
6358   */
6359  
6360  function postKey(postId) {
6361    return "wp-autosave-block-editor-post-".concat(postId);
6362  }
6363  
6364  function localAutosaveGet(postId) {
6365    return window.sessionStorage.getItem(postKey(postId));
6366  }
6367  function localAutosaveSet(postId, title, content, excerpt) {
6368    window.sessionStorage.setItem(postKey(postId), JSON.stringify({
6369      post_title: title,
6370      content: content,
6371      excerpt: excerpt
6372    }));
6373  }
6374  function localAutosaveClear(postId) {
6375    window.sessionStorage.removeItem(postKey(postId));
6376  }
6377  var controls = {
6378    AWAIT_NEXT_STATE_CHANGE: Object(external_this_wp_data_["createRegistryControl"])(function (registry) {
6379      return function () {
6380        return new Promise(function (resolve) {
6381          var unsubscribe = registry.subscribe(function () {
6382            unsubscribe();
6383            resolve();
6384          });
6385        });
6386      };
6387    }),
6388    GET_REGISTRY: Object(external_this_wp_data_["createRegistryControl"])(function (registry) {
6389      return function () {
6390        return registry;
6391      };
6392    }),
6393    LOCAL_AUTOSAVE_SET: function LOCAL_AUTOSAVE_SET(_ref) {
6394      var postId = _ref.postId,
6395          title = _ref.title,
6396          content = _ref.content,
6397          excerpt = _ref.excerpt;
6398      localAutosaveSet(postId, title, content, excerpt);
6399    }
6400  };
6401  /* harmony default export */ var store_controls = (controls);
6402  
6403  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/index.js
6404  
6405  
6406  function store_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
6407  
6408  function store_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { store_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { store_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
6409  
6410  /**
6411   * WordPress dependencies
6412   */
6413  
6414  
6415  /**
6416   * Internal dependencies
6417   */
6418  
6419  
6420  
6421  
6422  
6423  
6424  
6425  /**
6426   * Post editor data store configuration.
6427   *
6428   * @see https://github.com/WordPress/gutenberg/blob/master/packages/data/README.md#registerStore
6429   *
6430   * @type {Object}
6431   */
6432  
6433  var storeConfig = {
6434    reducer: reducer,
6435    selectors: selectors_namespaceObject,
6436    actions: actions_namespaceObject,
6437    controls: store_objectSpread({}, external_this_wp_dataControls_["controls"], {}, store_controls)
6438  };
6439  var store_store = Object(external_this_wp_data_["registerStore"])(STORE_KEY, store_objectSpread({}, storeConfig, {
6440    persist: ['preferences']
6441  }));
6442  middlewares(store_store);
6443  /* harmony default export */ var build_module_store = (store_store);
6444  
6445  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
6446  var esm_extends = __webpack_require__(8);
6447  
6448  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
6449  var objectWithoutProperties = __webpack_require__(14);
6450  
6451  // EXTERNAL MODULE: external {"this":["wp","element"]}
6452  var external_this_wp_element_ = __webpack_require__(0);
6453  
6454  // EXTERNAL MODULE: external {"this":["wp","compose"]}
6455  var external_this_wp_compose_ = __webpack_require__(9);
6456  
6457  // EXTERNAL MODULE: external {"this":["wp","hooks"]}
6458  var external_this_wp_hooks_ = __webpack_require__(31);
6459  
6460  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/hooks/custom-sources-backwards-compatibility.js
6461  
6462  
6463  
6464  
6465  
6466  
6467  function custom_sources_backwards_compatibility_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
6468  
6469  function custom_sources_backwards_compatibility_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { custom_sources_backwards_compatibility_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { custom_sources_backwards_compatibility_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
6470  
6471  /**
6472   * External dependencies
6473   */
6474  
6475  /**
6476   * WordPress dependencies
6477   */
6478  
6479  
6480  
6481  
6482  
6483  
6484  /** @typedef {import('@wordpress/compose').WPHigherOrderComponent} WPHigherOrderComponent */
6485  
6486  /** @typedef {import('@wordpress/blocks').WPBlockSettings} WPBlockSettings */
6487  
6488  /**
6489   * Object whose keys are the names of block attributes, where each value
6490   * represents the meta key to which the block attribute is intended to save.
6491   *
6492   * @see https://developer.wordpress.org/reference/functions/register_meta/
6493   *
6494   * @typedef {Object<string,string>} WPMetaAttributeMapping
6495   */
6496  
6497  /**
6498   * Given a mapping of attribute names (meta source attributes) to their
6499   * associated meta key, returns a higher order component that overrides its
6500   * `attributes` and `setAttributes` props to sync any changes with the edited
6501   * post's meta keys.
6502   *
6503   * @param {WPMetaAttributeMapping} metaAttributes Meta attribute mapping.
6504   *
6505   * @return {WPHigherOrderComponent} Higher-order component.
6506   */
6507  
6508  var custom_sources_backwards_compatibility_createWithMetaAttributeSource = function createWithMetaAttributeSource(metaAttributes) {
6509    return Object(external_this_wp_compose_["createHigherOrderComponent"])(function (BlockEdit) {
6510      return function (_ref) {
6511        var attributes = _ref.attributes,
6512            _setAttributes = _ref.setAttributes,
6513            props = Object(objectWithoutProperties["a" /* default */])(_ref, ["attributes", "setAttributes"]);
6514  
6515        var postType = Object(external_this_wp_data_["useSelect"])(function (select) {
6516          return select('core/editor').getCurrentPostType();
6517        }, []);
6518  
6519        var _useEntityProp = Object(external_this_wp_coreData_["useEntityProp"])('postType', postType, 'meta'),
6520            _useEntityProp2 = Object(slicedToArray["a" /* default */])(_useEntityProp, 2),
6521            meta = _useEntityProp2[0],
6522            setMeta = _useEntityProp2[1];
6523  
6524        var mergedAttributes = Object(external_this_wp_element_["useMemo"])(function () {
6525          return custom_sources_backwards_compatibility_objectSpread({}, attributes, {}, Object(external_this_lodash_["mapValues"])(metaAttributes, function (metaKey) {
6526            return meta[metaKey];
6527          }));
6528        }, [attributes, meta]);
6529        return Object(external_this_wp_element_["createElement"])(BlockEdit, Object(esm_extends["a" /* default */])({
6530          attributes: mergedAttributes,
6531          setAttributes: function setAttributes(nextAttributes) {
6532            var nextMeta = Object(external_this_lodash_["mapKeys"])( // Filter to intersection of keys between the updated
6533            // attributes and those with an associated meta key.
6534            Object(external_this_lodash_["pickBy"])(nextAttributes, function (value, key) {
6535              return metaAttributes[key];
6536            }), // Rename the keys to the expected meta key name.
6537            function (value, attributeKey) {
6538              return metaAttributes[attributeKey];
6539            });
6540  
6541            if (!Object(external_this_lodash_["isEmpty"])(nextMeta)) {
6542              setMeta(nextMeta);
6543            }
6544  
6545            _setAttributes(nextAttributes);
6546          }
6547        }, props));
6548      };
6549    }, 'withMetaAttributeSource');
6550  };
6551  /**
6552   * Filters a registered block's settings to enhance a block's `edit` component
6553   * to upgrade meta-sourced attributes to use the post's meta entity property.
6554   *
6555   * @param {WPBlockSettings} settings Registered block settings.
6556   *
6557   * @return {WPBlockSettings} Filtered block settings.
6558   */
6559  
6560  
6561  function shimAttributeSource(settings) {
6562    /** @type {WPMetaAttributeMapping} */
6563    var metaAttributes = Object(external_this_lodash_["mapValues"])(Object(external_this_lodash_["pickBy"])(settings.attributes, {
6564      source: 'meta'
6565    }), 'meta');
6566  
6567    if (!Object(external_this_lodash_["isEmpty"])(metaAttributes)) {
6568      settings.edit = custom_sources_backwards_compatibility_createWithMetaAttributeSource(metaAttributes)(settings.edit);
6569    }
6570  
6571    return settings;
6572  }
6573  
6574  Object(external_this_wp_hooks_["addFilter"])('blocks.registerBlockType', 'core/editor/custom-sources-backwards-compatibility/shim-attribute-source', shimAttributeSource); // The above filter will only capture blocks registered after the filter was
6575  // added. There may already be blocks registered by this point, and those must
6576  // be updated to apply the shim.
6577  //
6578  // The following implementation achieves this, albeit with a couple caveats:
6579  // - Only blocks registered on the global store will be modified.
6580  // - The block settings are directly mutated, since there is currently no
6581  //   mechanism to update an existing block registration. This is the reason for
6582  //   `getBlockType` separate from `getBlockTypes`, since the latter returns a
6583  //   _copy_ of the block registration (i.e. the mutation would not affect the
6584  //   actual registered block settings).
6585  //
6586  // `getBlockTypes` or `getBlockType` implementation could change in the future
6587  // in regards to creating settings clones, but the corresponding end-to-end
6588  // tests for meta blocks should cover against any potential regressions.
6589  //
6590  // In the future, we could support updating block settings, at which point this
6591  // implementation could use that mechanism instead.
6592  
6593  Object(external_this_wp_data_["select"])('core/blocks').getBlockTypes().map(function (_ref2) {
6594    var name = _ref2.name;
6595    return Object(external_this_wp_data_["select"])('core/blocks').getBlockType(name);
6596  }).forEach(shimAttributeSource);
6597  
6598  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/autocompleters/user.js
6599  
6600  
6601  /**
6602   * WordPress dependencies
6603   */
6604  
6605  /** @typedef {import('@wordpress/components').WPCompleter} WPCompleter */
6606  
6607  /**
6608   * A user mentions completer.
6609   *
6610   * @type {WPCompleter}
6611   */
6612  
6613  /* harmony default export */ var autocompleters_user = ({
6614    name: 'users',
6615    className: 'editor-autocompleters__user',
6616    triggerPrefix: '@',
6617    options: function options(search) {
6618      var payload = '';
6619  
6620      if (search) {
6621        payload = '?search=' + encodeURIComponent(search);
6622      }
6623  
6624      return external_this_wp_apiFetch_default()({
6625        path: '/wp/v2/users' + payload
6626      });
6627    },
6628    isDebounced: true,
6629    getOptionKeywords: function getOptionKeywords(user) {
6630      return [user.slug, user.name];
6631    },
6632    getOptionLabel: function getOptionLabel(user) {
6633      var avatar = user.avatar_urls && user.avatar_urls[24] ? Object(external_this_wp_element_["createElement"])("img", {
6634        key: "avatar",
6635        className: "editor-autocompleters__user-avatar",
6636        alt: "",
6637        src: user.avatar_urls[24]
6638      }) : Object(external_this_wp_element_["createElement"])("span", {
6639        className: "editor-autocompleters__no-avatar"
6640      });
6641      return [avatar, Object(external_this_wp_element_["createElement"])("span", {
6642        key: "name",
6643        className: "editor-autocompleters__user-name"
6644      }, user.name), Object(external_this_wp_element_["createElement"])("span", {
6645        key: "slug",
6646        className: "editor-autocompleters__user-slug"
6647      }, user.slug)];
6648    },
6649    getOptionCompletion: function getOptionCompletion(user) {
6650      return "@".concat(user.slug);
6651    }
6652  });
6653  
6654  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/hooks/default-autocompleters.js
6655  /**
6656   * External dependencies
6657   */
6658  
6659  /**
6660   * WordPress dependencies
6661   */
6662  
6663  
6664  /**
6665   * Internal dependencies
6666   */
6667  
6668  
6669  
6670  function setDefaultCompleters() {
6671    var completers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
6672    // Provide copies so filters may directly modify them.
6673    completers.push(Object(external_this_lodash_["clone"])(autocompleters_user));
6674    return completers;
6675  }
6676  
6677  Object(external_this_wp_hooks_["addFilter"])('editor.Autocomplete.completers', 'editor/autocompleters/set-default-completers', setDefaultCompleters);
6678  
6679  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/hooks/index.js
6680  /**
6681   * Internal dependencies
6682   */
6683  
6684  
6685  
6686  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/autocompleters/index.js
6687  
6688  
6689  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
6690  var classCallCheck = __webpack_require__(19);
6691  
6692  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
6693  var createClass = __webpack_require__(18);
6694  
6695  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
6696  var possibleConstructorReturn = __webpack_require__(21);
6697  
6698  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
6699  var getPrototypeOf = __webpack_require__(13);
6700  
6701  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules
6702  var inherits = __webpack_require__(20);
6703  
6704  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/autosave-monitor/index.js
6705  
6706  
6707  
6708  
6709  
6710  
6711  function _createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; }
6712  
6713  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
6714  
6715  /**
6716   * WordPress dependencies
6717   */
6718  
6719  
6720  
6721  var autosave_monitor_AutosaveMonitor = /*#__PURE__*/function (_Component) {
6722    Object(inherits["a" /* default */])(AutosaveMonitor, _Component);
6723  
6724    var _super = _createSuper(AutosaveMonitor);
6725  
6726    function AutosaveMonitor() {
6727      Object(classCallCheck["a" /* default */])(this, AutosaveMonitor);
6728  
6729      return _super.apply(this, arguments);
6730    }
6731  
6732    Object(createClass["a" /* default */])(AutosaveMonitor, [{
6733      key: "componentDidUpdate",
6734      value: function componentDidUpdate(prevProps) {
6735        var _this$props = this.props,
6736            isDirty = _this$props.isDirty,
6737            editsReference = _this$props.editsReference,
6738            isAutosaveable = _this$props.isAutosaveable,
6739            isAutosaving = _this$props.isAutosaving; // The edits reference is held for comparison to avoid scheduling an
6740        // autosave if an edit has not been made since the last autosave
6741        // completion. This is assigned when the autosave completes, and reset
6742        // when an edit occurs.
6743        //
6744        // See: https://github.com/WordPress/gutenberg/issues/12318
6745  
6746        if (editsReference !== prevProps.editsReference) {
6747          this.didAutosaveForEditsReference = false;
6748        }
6749  
6750        if (!isAutosaving && prevProps.isAutosaving) {
6751          this.didAutosaveForEditsReference = true;
6752        }
6753  
6754        if (prevProps.isDirty !== isDirty || prevProps.isAutosaveable !== isAutosaveable || prevProps.editsReference !== editsReference) {
6755          this.toggleTimer(isDirty && isAutosaveable && !this.didAutosaveForEditsReference);
6756        }
6757      }
6758    }, {
6759      key: "componentWillUnmount",
6760      value: function componentWillUnmount() {
6761        this.toggleTimer(false);
6762      }
6763    }, {
6764      key: "toggleTimer",
6765      value: function toggleTimer(isPendingSave) {
6766        var _this = this;
6767  
6768        var _this$props2 = this.props,
6769            interval = _this$props2.interval,
6770            _this$props2$shouldTh = _this$props2.shouldThrottle,
6771            shouldThrottle = _this$props2$shouldTh === void 0 ? false : _this$props2$shouldTh; // By default, AutosaveMonitor will wait for a pause in editing before
6772        // autosaving. In other words, its action is "debounced".
6773        //
6774        // The `shouldThrottle` props allows overriding this behaviour, thus
6775        // making the autosave action "throttled".
6776  
6777        if (!shouldThrottle && this.pendingSave) {
6778          clearTimeout(this.pendingSave);
6779          delete this.pendingSave;
6780        }
6781  
6782        if (isPendingSave && !(shouldThrottle && this.pendingSave)) {
6783          this.pendingSave = setTimeout(function () {
6784            _this.props.autosave();
6785  
6786            delete _this.pendingSave;
6787          }, interval * 1000);
6788        }
6789      }
6790    }, {
6791      key: "render",
6792      value: function render() {
6793        return null;
6794      }
6795    }]);
6796  
6797    return AutosaveMonitor;
6798  }(external_this_wp_element_["Component"]);
6799  /* harmony default export */ var autosave_monitor = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select, ownProps) {
6800    var _select = select('core'),
6801        getReferenceByDistinctEdits = _select.getReferenceByDistinctEdits;
6802  
6803    var _select2 = select('core/editor'),
6804        isEditedPostDirty = _select2.isEditedPostDirty,
6805        isEditedPostAutosaveable = _select2.isEditedPostAutosaveable,
6806        isAutosavingPost = _select2.isAutosavingPost,
6807        getEditorSettings = _select2.getEditorSettings;
6808  
6809    var _ownProps$interval = ownProps.interval,
6810        interval = _ownProps$interval === void 0 ? getEditorSettings().autosaveInterval : _ownProps$interval;
6811    return {
6812      isDirty: isEditedPostDirty(),
6813      isAutosaveable: isEditedPostAutosaveable(),
6814      editsReference: getReferenceByDistinctEdits(),
6815      isAutosaving: isAutosavingPost(),
6816      interval: interval
6817    };
6818  }), Object(external_this_wp_data_["withDispatch"])(function (dispatch, ownProps) {
6819    return {
6820      autosave: function autosave() {
6821        var _ownProps$autosave = ownProps.autosave,
6822            autosave = _ownProps$autosave === void 0 ? dispatch('core/editor').autosave : _ownProps$autosave;
6823        autosave();
6824      }
6825    };
6826  })])(autosave_monitor_AutosaveMonitor));
6827  
6828  // EXTERNAL MODULE: ./node_modules/classnames/index.js
6829  var classnames = __webpack_require__(11);
6830  var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
6831  
6832  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/document-outline/item.js
6833  
6834  
6835  /**
6836   * External dependencies
6837   */
6838  
6839  /**
6840   * WordPress dependencies
6841   */
6842  
6843  
6844  
6845  var item_TableOfContentsItem = function TableOfContentsItem(_ref) {
6846    var children = _ref.children,
6847        isValid = _ref.isValid,
6848        level = _ref.level,
6849        _ref$path = _ref.path,
6850        path = _ref$path === void 0 ? [] : _ref$path,
6851        href = _ref.href,
6852        onSelect = _ref.onSelect;
6853    return Object(external_this_wp_element_["createElement"])("li", {
6854      className: classnames_default()('document-outline__item', "is-".concat(level.toLowerCase()), {
6855        'is-invalid': !isValid
6856      })
6857    }, Object(external_this_wp_element_["createElement"])("a", {
6858      href: href,
6859      className: "document-outline__button",
6860      onClick: onSelect
6861    }, Object(external_this_wp_element_["createElement"])("span", {
6862      className: "document-outline__emdash",
6863      "aria-hidden": "true"
6864    }), // path is an array of nodes that are ancestors of the heading starting in the top level node.
6865    // This mapping renders each ancestor to make it easier for the user to know where the headings are nested.
6866    path.map(function (_ref2, index) {
6867      var clientId = _ref2.clientId;
6868      return Object(external_this_wp_element_["createElement"])("strong", {
6869        key: index,
6870        className: "document-outline__level"
6871      }, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockTitle"], {
6872        clientId: clientId
6873      }));
6874    }), Object(external_this_wp_element_["createElement"])("strong", {
6875      className: "document-outline__level"
6876    }, level), Object(external_this_wp_element_["createElement"])("span", {
6877      className: "document-outline__item-content"
6878    }, children)));
6879  };
6880  
6881  /* harmony default export */ var document_outline_item = (item_TableOfContentsItem);
6882  
6883  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/document-outline/index.js
6884  
6885  
6886  
6887  
6888  function document_outline_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
6889  
6890  function document_outline_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { document_outline_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { document_outline_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
6891  
6892  /**
6893   * External dependencies
6894   */
6895  
6896  /**
6897   * WordPress dependencies
6898   */
6899  
6900  
6901  
6902  
6903  
6904  /**
6905   * Internal dependencies
6906   */
6907  
6908  
6909  /**
6910   * Module constants
6911   */
6912  
6913  var emptyHeadingContent = Object(external_this_wp_element_["createElement"])("em", null, Object(external_this_wp_i18n_["__"])('(Empty heading)'));
6914  var incorrectLevelContent = [Object(external_this_wp_element_["createElement"])("br", {
6915    key: "incorrect-break"
6916  }), Object(external_this_wp_element_["createElement"])("em", {
6917    key: "incorrect-message"
6918  }, Object(external_this_wp_i18n_["__"])('(Incorrect heading level)'))];
6919  var singleH1Headings = [Object(external_this_wp_element_["createElement"])("br", {
6920    key: "incorrect-break-h1"
6921  }), Object(external_this_wp_element_["createElement"])("em", {
6922    key: "incorrect-message-h1"
6923  }, Object(external_this_wp_i18n_["__"])('(Your theme may already use a H1 for the post title)'))];
6924  var multipleH1Headings = [Object(external_this_wp_element_["createElement"])("br", {
6925    key: "incorrect-break-multiple-h1"
6926  }), Object(external_this_wp_element_["createElement"])("em", {
6927    key: "incorrect-message-multiple-h1"
6928  }, Object(external_this_wp_i18n_["__"])('(Multiple H1 headings are not recommended)'))];
6929  /**
6930   * Returns an array of heading blocks enhanced with the following properties:
6931   * path    - An array of blocks that are ancestors of the heading starting from a top-level node.
6932   *           Can be an empty array if the heading is a top-level node (is not nested inside another block).
6933   * level   - An integer with the heading level.
6934   * isEmpty - Flag indicating if the heading has no content.
6935   *
6936   * @param {?Array} blocks An array of blocks.
6937   * @param {?Array} path   An array of blocks that are ancestors of the blocks passed as blocks.
6938   *
6939   * @return {Array} An array of heading blocks enhanced with the properties described above.
6940   */
6941  
6942  var document_outline_computeOutlineHeadings = function computeOutlineHeadings() {
6943    var blocks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
6944    var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
6945    return Object(external_this_lodash_["flatMap"])(blocks, function () {
6946      var block = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
6947  
6948      if (block.name === 'core/heading') {
6949        return document_outline_objectSpread({}, block, {
6950          path: path,
6951          level: block.attributes.level,
6952          isEmpty: isEmptyHeading(block)
6953        });
6954      }
6955  
6956      return computeOutlineHeadings(block.innerBlocks, [].concat(Object(toConsumableArray["a" /* default */])(path), [block]));
6957    });
6958  };
6959  
6960  var isEmptyHeading = function isEmptyHeading(heading) {
6961    return !heading.attributes.content || heading.attributes.content.length === 0;
6962  };
6963  
6964  var document_outline_DocumentOutline = function DocumentOutline(_ref) {
6965    var _ref$blocks = _ref.blocks,
6966        blocks = _ref$blocks === void 0 ? [] : _ref$blocks,
6967        title = _ref.title,
6968        onSelect = _ref.onSelect,
6969        isTitleSupported = _ref.isTitleSupported,
6970        hasOutlineItemsDisabled = _ref.hasOutlineItemsDisabled;
6971    var headings = document_outline_computeOutlineHeadings(blocks);
6972  
6973    if (headings.length < 1) {
6974      return null;
6975    }
6976  
6977    var prevHeadingLevel = 1; // Not great but it's the simplest way to locate the title right now.
6978  
6979    var titleNode = document.querySelector('.editor-post-title__input');
6980    var hasTitle = isTitleSupported && title && titleNode;
6981    var countByLevel = Object(external_this_lodash_["countBy"])(headings, 'level');
6982    var hasMultipleH1 = countByLevel[1] > 1;
6983    return Object(external_this_wp_element_["createElement"])("div", {
6984      className: "document-outline"
6985    }, Object(external_this_wp_element_["createElement"])("ul", null, hasTitle && Object(external_this_wp_element_["createElement"])(document_outline_item, {
6986      level: Object(external_this_wp_i18n_["__"])('Title'),
6987      isValid: true,
6988      onSelect: onSelect,
6989      href: "#".concat(titleNode.id),
6990      isDisabled: hasOutlineItemsDisabled
6991    }, title), headings.map(function (item, index) {
6992      // Headings remain the same, go up by one, or down by any amount.
6993      // Otherwise there are missing levels.
6994      var isIncorrectLevel = item.level > prevHeadingLevel + 1;
6995      var isValid = !item.isEmpty && !isIncorrectLevel && !!item.level && (item.level !== 1 || !hasMultipleH1 && !hasTitle);
6996      prevHeadingLevel = item.level;
6997      return Object(external_this_wp_element_["createElement"])(document_outline_item, {
6998        key: index,
6999        level: "H".concat(item.level),
7000        isValid: isValid,
7001        path: item.path,
7002        isDisabled: hasOutlineItemsDisabled,
7003        href: "#block-".concat(item.clientId),
7004        onSelect: onSelect
7005      }, item.isEmpty ? emptyHeadingContent : Object(external_this_wp_richText_["getTextContent"])(Object(external_this_wp_richText_["create"])({
7006        html: item.attributes.content
7007      })), isIncorrectLevel && incorrectLevelContent, item.level === 1 && hasMultipleH1 && multipleH1Headings, hasTitle && item.level === 1 && !hasMultipleH1 && singleH1Headings);
7008    })));
7009  };
7010  /* harmony default export */ var document_outline = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select) {
7011    var _select = select('core/block-editor'),
7012        getBlocks = _select.getBlocks;
7013  
7014    var _select2 = select('core/editor'),
7015        getEditedPostAttribute = _select2.getEditedPostAttribute;
7016  
7017    var _select3 = select('core'),
7018        getPostType = _select3.getPostType;
7019  
7020    var postType = getPostType(getEditedPostAttribute('type'));
7021    return {
7022      title: getEditedPostAttribute('title'),
7023      blocks: getBlocks(),
7024      isTitleSupported: Object(external_this_lodash_["get"])(postType, ['supports', 'title'], false)
7025    };
7026  }))(document_outline_DocumentOutline));
7027  
7028  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/document-outline/check.js
7029  /**
7030   * External dependencies
7031   */
7032  
7033  /**
7034   * WordPress dependencies
7035   */
7036  
7037  
7038  
7039  function DocumentOutlineCheck(_ref) {
7040    var blocks = _ref.blocks,
7041        children = _ref.children;
7042    var headings = Object(external_this_lodash_["filter"])(blocks, function (block) {
7043      return block.name === 'core/heading';
7044    });
7045  
7046    if (headings.length < 1) {
7047      return null;
7048    }
7049  
7050    return children;
7051  }
7052  
7053  /* harmony default export */ var check = (Object(external_this_wp_data_["withSelect"])(function (select) {
7054    return {
7055      blocks: select('core/block-editor').getBlocks()
7056    };
7057  })(DocumentOutlineCheck));
7058  
7059  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/global-keyboard-shortcuts/save-shortcut.js
7060  /**
7061   * WordPress dependencies
7062   */
7063  
7064  
7065  
7066  function SaveShortcut() {
7067    var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/editor'),
7068        savePost = _useDispatch.savePost;
7069  
7070    var isEditedPostDirty = Object(external_this_wp_data_["useSelect"])(function (select) {
7071      return select('core/editor').isEditedPostDirty;
7072    }, []);
7073    Object(external_this_wp_keyboardShortcuts_["useShortcut"])('core/editor/save', function (event) {
7074      event.preventDefault(); // TODO: This should be handled in the `savePost` effect in
7075      // considering `isSaveable`. See note on `isEditedPostSaveable`
7076      // selector about dirtiness and meta-boxes.
7077      //
7078      // See: `isEditedPostSaveable`
7079  
7080      if (!isEditedPostDirty()) {
7081        return;
7082      }
7083  
7084      savePost();
7085    }, {
7086      bindGlobal: true
7087    });
7088    return null;
7089  }
7090  
7091  /* harmony default export */ var save_shortcut = (SaveShortcut);
7092  
7093  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/global-keyboard-shortcuts/visual-editor-shortcuts.js
7094  
7095  
7096  /**
7097   * WordPress dependencies
7098   */
7099  
7100  
7101  
7102  
7103  /**
7104   * Internal dependencies
7105   */
7106  
7107  
7108  
7109  function VisualEditorGlobalKeyboardShortcuts() {
7110    var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/editor'),
7111        redo = _useDispatch.redo,
7112        undo = _useDispatch.undo,
7113        savePost = _useDispatch.savePost;
7114  
7115    var isEditedPostDirty = Object(external_this_wp_data_["useSelect"])(function (select) {
7116      return select('core/editor').isEditedPostDirty;
7117    }, []);
7118    Object(external_this_wp_keyboardShortcuts_["useShortcut"])('core/editor/undo', function (event) {
7119      undo();
7120      event.preventDefault();
7121    }, {
7122      bindGlobal: true
7123    });
7124    Object(external_this_wp_keyboardShortcuts_["useShortcut"])('core/editor/redo', function (event) {
7125      redo();
7126      event.preventDefault();
7127    }, {
7128      bindGlobal: true
7129    });
7130    Object(external_this_wp_keyboardShortcuts_["useShortcut"])('core/editor/save', function (event) {
7131      event.preventDefault(); // TODO: This should be handled in the `savePost` effect in
7132      // considering `isSaveable`. See note on `isEditedPostSaveable`
7133      // selector about dirtiness and meta-boxes.
7134      //
7135      // See: `isEditedPostSaveable`
7136  
7137      if (!isEditedPostDirty()) {
7138        return;
7139      }
7140  
7141      savePost();
7142    }, {
7143      bindGlobal: true
7144    });
7145    return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockEditorKeyboardShortcuts"], null), Object(external_this_wp_element_["createElement"])(save_shortcut, null));
7146  }
7147  
7148  /* harmony default export */ var visual_editor_shortcuts = (VisualEditorGlobalKeyboardShortcuts);
7149  function EditorGlobalKeyboardShortcuts() {
7150    external_this_wp_deprecated_default()('EditorGlobalKeyboardShortcuts', {
7151      alternative: 'VisualEditorGlobalKeyboardShortcuts',
7152      plugin: 'Gutenberg'
7153    });
7154    return Object(external_this_wp_element_["createElement"])(VisualEditorGlobalKeyboardShortcuts, null);
7155  }
7156  
7157  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/global-keyboard-shortcuts/text-editor-shortcuts.js
7158  
7159  
7160  /**
7161   * Internal dependencies
7162   */
7163  
7164  function TextEditorGlobalKeyboardShortcuts() {
7165    return Object(external_this_wp_element_["createElement"])(save_shortcut, null);
7166  }
7167  
7168  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/global-keyboard-shortcuts/register-shortcuts.js
7169  
7170  
7171  /**
7172   * WordPress dependencies
7173   */
7174  
7175  
7176  
7177  
7178  
7179  function EditorKeyboardShortcutsRegister() {
7180    // Registering the shortcuts
7181    var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/keyboard-shortcuts'),
7182        registerShortcut = _useDispatch.registerShortcut;
7183  
7184    Object(external_this_wp_element_["useEffect"])(function () {
7185      registerShortcut({
7186        name: 'core/editor/save',
7187        category: 'global',
7188        description: Object(external_this_wp_i18n_["__"])('Save your changes.'),
7189        keyCombination: {
7190          modifier: 'primary',
7191          character: 's'
7192        }
7193      });
7194      registerShortcut({
7195        name: 'core/editor/undo',
7196        category: 'global',
7197        description: Object(external_this_wp_i18n_["__"])('Undo your last changes.'),
7198        keyCombination: {
7199          modifier: 'primary',
7200          character: 'z'
7201        }
7202      });
7203      registerShortcut({
7204        name: 'core/editor/redo',
7205        category: 'global',
7206        description: Object(external_this_wp_i18n_["__"])('Redo your last undo.'),
7207        keyCombination: {
7208          modifier: 'primaryShift',
7209          character: 'z'
7210        }
7211      });
7212    }, [registerShortcut]);
7213    return Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockEditorKeyboardShortcuts"].Register, null);
7214  }
7215  
7216  /* harmony default export */ var register_shortcuts = (EditorKeyboardShortcutsRegister);
7217  
7218  // EXTERNAL MODULE: external {"this":["wp","components"]}
7219  var external_this_wp_components_ = __webpack_require__(3);
7220  
7221  // EXTERNAL MODULE: external {"this":["wp","keycodes"]}
7222  var external_this_wp_keycodes_ = __webpack_require__(22);
7223  
7224  // EXTERNAL MODULE: external {"this":["wp","primitives"]}
7225  var external_this_wp_primitives_ = __webpack_require__(6);
7226  
7227  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/redo.js
7228  
7229  
7230  /**
7231   * WordPress dependencies
7232   */
7233  
7234  var redo_redo = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
7235    xmlns: "http://www.w3.org/2000/svg",
7236    viewBox: "0 0 24 24"
7237  }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
7238    d: "M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"
7239  }));
7240  /* harmony default export */ var library_redo = (redo_redo);
7241  
7242  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/editor-history/redo.js
7243  
7244  
7245  
7246  /**
7247   * WordPress dependencies
7248   */
7249  
7250  
7251  
7252  
7253  
7254  
7255  
7256  function EditorHistoryRedo(props, ref) {
7257    var hasRedo = Object(external_this_wp_data_["useSelect"])(function (select) {
7258      return select('core/editor').hasEditorRedo();
7259    }, []);
7260  
7261    var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/editor'),
7262        redo = _useDispatch.redo;
7263  
7264    return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], Object(esm_extends["a" /* default */])({}, props, {
7265      ref: ref,
7266      icon: library_redo,
7267      label: Object(external_this_wp_i18n_["__"])('Redo'),
7268      shortcut: external_this_wp_keycodes_["displayShortcut"].primaryShift('z') // If there are no redo levels we don't want to actually disable this
7269      // button, because it will remove focus for keyboard users.
7270      // See: https://github.com/WordPress/gutenberg/issues/3486
7271      ,
7272      "aria-disabled": !hasRedo,
7273      onClick: hasRedo ? redo : undefined,
7274      className: "editor-history__redo"
7275    }));
7276  }
7277  
7278  /* harmony default export */ var editor_history_redo = (Object(external_this_wp_element_["forwardRef"])(EditorHistoryRedo));
7279  
7280  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/undo.js
7281  
7282  
7283  /**
7284   * WordPress dependencies
7285   */
7286  
7287  var undo_undo = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
7288    xmlns: "http://www.w3.org/2000/svg",
7289    viewBox: "0 0 24 24"
7290  }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
7291    d: "M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"
7292  }));
7293  /* harmony default export */ var library_undo = (undo_undo);
7294  
7295  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/editor-history/undo.js
7296  
7297  
7298  
7299  /**
7300   * WordPress dependencies
7301   */
7302  
7303  
7304  
7305  
7306  
7307  
7308  
7309  function EditorHistoryUndo(props, ref) {
7310    var hasUndo = Object(external_this_wp_data_["useSelect"])(function (select) {
7311      return select('core/editor').hasEditorUndo();
7312    }, []);
7313  
7314    var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/editor'),
7315        undo = _useDispatch.undo;
7316  
7317    return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], Object(esm_extends["a" /* default */])({}, props, {
7318      ref: ref,
7319      icon: library_undo,
7320      label: Object(external_this_wp_i18n_["__"])('Undo'),
7321      shortcut: external_this_wp_keycodes_["displayShortcut"].primary('z') // If there are no undo levels we don't want to actually disable this
7322      // button, because it will remove focus for keyboard users.
7323      // See: https://github.com/WordPress/gutenberg/issues/3486
7324      ,
7325      "aria-disabled": !hasUndo,
7326      onClick: hasUndo ? undo : undefined,
7327      className: "editor-history__undo"
7328    }));
7329  }
7330  
7331  /* harmony default export */ var editor_history_undo = (Object(external_this_wp_element_["forwardRef"])(EditorHistoryUndo));
7332  
7333  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/template-validation-notice/index.js
7334  
7335  
7336  
7337  /**
7338   * WordPress dependencies
7339   */
7340  
7341  
7342  
7343  
7344  
7345  function TemplateValidationNotice(_ref) {
7346    var isValid = _ref.isValid,
7347        props = Object(objectWithoutProperties["a" /* default */])(_ref, ["isValid"]);
7348  
7349    if (isValid) {
7350      return null;
7351    }
7352  
7353    var confirmSynchronization = function confirmSynchronization() {
7354      if ( // eslint-disable-next-line no-alert
7355      window.confirm(Object(external_this_wp_i18n_["__"])('Resetting the template may result in loss of content, do you want to continue?'))) {
7356        props.synchronizeTemplate();
7357      }
7358    };
7359  
7360    return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Notice"], {
7361      className: "editor-template-validation-notice",
7362      isDismissible: false,
7363      status: "warning",
7364      actions: [{
7365        label: Object(external_this_wp_i18n_["__"])('Keep it as is'),
7366        onClick: props.resetTemplateValidity
7367      }, {
7368        label: Object(external_this_wp_i18n_["__"])('Reset the template'),
7369        onClick: confirmSynchronization,
7370        isPrimary: true
7371      }]
7372    }, Object(external_this_wp_i18n_["__"])('The content of your post doesn’t match the template assigned to your post type.'));
7373  }
7374  
7375  /* harmony default export */ var template_validation_notice = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
7376    return {
7377      isValid: select('core/block-editor').isValidTemplate()
7378    };
7379  }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
7380    var _dispatch = dispatch('core/block-editor'),
7381        setTemplateValidity = _dispatch.setTemplateValidity,
7382        synchronizeTemplate = _dispatch.synchronizeTemplate;
7383  
7384    return {
7385      resetTemplateValidity: function resetTemplateValidity() {
7386        return setTemplateValidity(true);
7387      },
7388      synchronizeTemplate: synchronizeTemplate
7389    };
7390  })])(TemplateValidationNotice));
7391  
7392  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/editor-notices/index.js
7393  
7394  
7395  /**
7396   * External dependencies
7397   */
7398  
7399  /**
7400   * WordPress dependencies
7401   */
7402  
7403  
7404  
7405  
7406  /**
7407   * Internal dependencies
7408   */
7409  
7410  
7411  function EditorNotices(_ref) {
7412    var notices = _ref.notices,
7413        onRemove = _ref.onRemove;
7414    var dismissibleNotices = Object(external_this_lodash_["filter"])(notices, {
7415      isDismissible: true,
7416      type: 'default'
7417    });
7418    var nonDismissibleNotices = Object(external_this_lodash_["filter"])(notices, {
7419      isDismissible: false,
7420      type: 'default'
7421    });
7422    var snackbarNotices = Object(external_this_lodash_["filter"])(notices, {
7423      type: 'snackbar'
7424    });
7425    return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["NoticeList"], {
7426      notices: nonDismissibleNotices,
7427      className: "components-editor-notices__pinned"
7428    }), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["NoticeList"], {
7429      notices: dismissibleNotices,
7430      className: "components-editor-notices__dismissible",
7431      onRemove: onRemove
7432    }, Object(external_this_wp_element_["createElement"])(template_validation_notice, null)), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["SnackbarList"], {
7433      notices: snackbarNotices,
7434      className: "components-editor-notices__snackbar",
7435      onRemove: onRemove
7436    }));
7437  }
7438  /* harmony default export */ var editor_notices = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
7439    return {
7440      notices: select('core/notices').getNotices()
7441    };
7442  }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
7443    return {
7444      onRemove: dispatch('core/notices').removeNotice
7445    };
7446  })])(EditorNotices));
7447  
7448  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close.js
7449  var library_close = __webpack_require__(133);
7450  
7451  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/layout.js
7452  var layout = __webpack_require__(288);
7453  
7454  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/page.js
7455  
7456  
7457  /**
7458   * WordPress dependencies
7459   */
7460  
7461  var page_page = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
7462    xmlns: "http://www.w3.org/2000/svg",
7463    viewBox: "0 0 24 24"
7464  }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
7465    d: "M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"
7466  }));
7467  /* harmony default export */ var library_page = (page_page);
7468  
7469  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/grid.js
7470  var grid = __webpack_require__(298);
7471  
7472  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/block-default.js
7473  var block_default = __webpack_require__(195);
7474  
7475  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/entities-saved-states/entity-record-item.js
7476  
7477  
7478  /**
7479   * WordPress dependencies
7480   */
7481  
7482  
7483  
7484  
7485  function EntityRecordItem(_ref) {
7486    var record = _ref.record,
7487        checked = _ref.checked,
7488        onChange = _ref.onChange,
7489        closePanel = _ref.closePanel;
7490    var name = record.name,
7491        kind = record.kind,
7492        title = record.title,
7493        key = record.key;
7494    var parentBlockId = Object(external_this_wp_data_["useSelect"])(function (select) {
7495      var _blocks$;
7496  
7497      // Get entity's blocks.
7498      var _select$getEditedEnti = select('core').getEditedEntityRecord(kind, name, key),
7499          _select$getEditedEnti2 = _select$getEditedEnti.blocks,
7500          blocks = _select$getEditedEnti2 === void 0 ? [] : _select$getEditedEnti2; // Get parents of the entity's first block.
7501  
7502  
7503      var parents = select('core/block-editor').getBlockParents((_blocks$ = blocks[0]) === null || _blocks$ === void 0 ? void 0 : _blocks$.clientId); // Return closest parent block's clientId.
7504  
7505      return parents[parents.length - 1];
7506    }, []);
7507    var isSelected = Object(external_this_wp_data_["useSelect"])(function (select) {
7508      var selectedBlockId = select('core/block-editor').getSelectedBlockClientId();
7509      return selectedBlockId === parentBlockId;
7510    }, [parentBlockId]);
7511    var isSelectedText = isSelected ? Object(external_this_wp_i18n_["__"])('Selected') : Object(external_this_wp_i18n_["__"])('Select');
7512  
7513    var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
7514        selectBlock = _useDispatch.selectBlock;
7515  
7516    var selectParentBlock = Object(external_this_wp_element_["useCallback"])(function () {
7517      return selectBlock(parentBlockId);
7518    }, [parentBlockId]);
7519    var selectAndDismiss = Object(external_this_wp_element_["useCallback"])(function () {
7520      selectBlock(parentBlockId);
7521      closePanel();
7522    }, [parentBlockId]);
7523    return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["PanelRow"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["CheckboxControl"], {
7524      label: Object(external_this_wp_element_["createElement"])("strong", null, title || Object(external_this_wp_i18n_["__"])('Untitled')),
7525      checked: checked,
7526      onChange: onChange
7527    }), parentBlockId ? Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
7528      onClick: selectParentBlock,
7529      className: "entities-saved-states__find-entity",
7530      disabled: isSelected
7531    }, isSelectedText), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
7532      onClick: selectAndDismiss,
7533      className: "entities-saved-states__find-entity-small",
7534      disabled: isSelected
7535    }, isSelectedText)) : null);
7536  }
7537  
7538  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/entities-saved-states/entity-type-list.js
7539  
7540  
7541  /**
7542   * External dependencies
7543   */
7544  
7545  /**
7546   * WordPress dependencies
7547   */
7548  
7549  
7550  
7551  
7552  /**
7553   * Internal dependencies
7554   */
7555  
7556  
7557  var ENTITY_NAME_ICONS = {
7558    site: layout["a" /* default */],
7559    page: library_page,
7560    post: grid["a" /* default */],
7561    wp_template: grid["a" /* default */]
7562  };
7563  function EntityTypeList(_ref) {
7564    var list = _ref.list,
7565        unselectedEntities = _ref.unselectedEntities,
7566        setUnselectedEntities = _ref.setUnselectedEntities,
7567        closePanel = _ref.closePanel;
7568    var firstRecord = list[0];
7569    var entity = Object(external_this_wp_data_["useSelect"])(function (select) {
7570      return select('core').getEntity(firstRecord.kind, firstRecord.name);
7571    }, [firstRecord.kind, firstRecord.name]); // Set icon based on type of entity.
7572  
7573    var name = firstRecord.name;
7574    var icon = ENTITY_NAME_ICONS[name] || block_default["a" /* default */];
7575    return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["PanelBody"], {
7576      title: entity.label,
7577      initialOpen: true,
7578      icon: icon
7579    }, list.map(function (record) {
7580      return Object(external_this_wp_element_["createElement"])(EntityRecordItem, {
7581        key: record.key || 'site',
7582        record: record,
7583        checked: !Object(external_this_lodash_["some"])(unselectedEntities, function (elt) {
7584          return elt.kind === record.kind && elt.name === record.name && elt.key === record.key;
7585        }),
7586        onChange: function onChange(value) {
7587          return setUnselectedEntities(record, value);
7588        },
7589        closePanel: closePanel
7590      });
7591    }));
7592  }
7593  
7594  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/entities-saved-states/index.js
7595  
7596  
7597  
7598  
7599  /**
7600   * External dependencies
7601   */
7602  
7603  /**
7604   * WordPress dependencies
7605   */
7606  
7607  
7608  
7609  
7610  
7611  
7612  /**
7613   * Internal dependencies
7614   */
7615  
7616  
7617  var ENTITY_NAMES = {
7618    wp_template_part: function wp_template_part(number) {
7619      return Object(external_this_wp_i18n_["_n"])('template part', 'template parts', number);
7620    },
7621    wp_template: function wp_template(number) {
7622      return Object(external_this_wp_i18n_["_n"])('template', 'templates', number);
7623    },
7624    post: function post(number) {
7625      return Object(external_this_wp_i18n_["_n"])('post', 'posts', number);
7626    },
7627    page: function page(number) {
7628      return Object(external_this_wp_i18n_["_n"])('page', 'pages', number);
7629    },
7630    site: function site(number) {
7631      return Object(external_this_wp_i18n_["_n"])('site', 'sites', number);
7632    }
7633  };
7634  var PLACEHOLDER_PHRASES = {
7635    // 0 is a back up, but should never be observed.
7636    0: Object(external_this_wp_i18n_["__"])('There are no changes.'),
7637  
7638    /* translators: placeholders represent pre-translated singular/plural entity names (page, post, template, site, etc.) */
7639    1: Object(external_this_wp_i18n_["__"])('Changes have been made to your %s.'),
7640  
7641    /* translators: placeholders represent pre-translated singular/plural entity names (page, post, template, site, etc.) */
7642    2: Object(external_this_wp_i18n_["__"])('Changes have been made to your %1$s and %2$s.'),
7643  
7644    /* translators: placeholders represent pre-translated singular/plural entity names (page, post, template, site, etc.) */
7645    3: Object(external_this_wp_i18n_["__"])('Changes have been made to your %1$s, %2$s, and %3$s.'),
7646  
7647    /* translators: placeholders represent pre-translated singular/plural entity names (page, post, template, site, etc.) */
7648    4: Object(external_this_wp_i18n_["__"])('Changes have been made to your %1$s, %2$s, %3$s, and %4$s.'),
7649  
7650    /* translators: placeholders represent pre-translated singular/plural entity names (page, post, template, site, etc.) */
7651    5: Object(external_this_wp_i18n_["__"])('Changes have been made to your %1$s, %2$s, %3$s, %4$s, and %5$s.')
7652  };
7653  function EntitiesSavedStates(_ref) {
7654    var isOpen = _ref.isOpen,
7655        close = _ref.close;
7656  
7657    var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
7658      return {
7659        dirtyEntityRecords: select('core').__experimentalGetDirtyEntityRecords()
7660      };
7661    }, []),
7662        dirtyEntityRecords = _useSelect.dirtyEntityRecords;
7663  
7664    var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core'),
7665        saveEditedEntityRecord = _useDispatch.saveEditedEntityRecord; // To group entities by type.
7666  
7667  
7668    var partitionedSavables = Object.values(Object(external_this_lodash_["groupBy"])(dirtyEntityRecords, 'name')); // Get labels for text-prompt phrase.
7669  
7670    var entityNamesForPrompt = [];
7671    partitionedSavables.forEach(function (list) {
7672      if (ENTITY_NAMES[list[0].name]) {
7673        entityNamesForPrompt.push(ENTITY_NAMES[list[0].name](list.length));
7674      }
7675    }); // Get text-prompt phrase based on number of entity types changed.
7676  
7677    var placeholderPhrase = PLACEHOLDER_PHRASES[entityNamesForPrompt.length] || // Fallback for edge case that should not be observed (more than 5 entity types edited).
7678    Object(external_this_wp_i18n_["__"])('Changes have been made to multiple entity types.'); // eslint-disable-next-line @wordpress/valid-sprintf
7679  
7680  
7681    var promptPhrase = external_this_wp_i18n_["sprintf"].apply(void 0, [placeholderPhrase].concat(entityNamesForPrompt)); // Unchecked entities to be ignored by save function.
7682  
7683    var _useState = Object(external_this_wp_element_["useState"])([]),
7684        _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
7685        unselectedEntities = _useState2[0],
7686        _setUnselectedEntities = _useState2[1];
7687  
7688    var setUnselectedEntities = function setUnselectedEntities(_ref2, checked) {
7689      var kind = _ref2.kind,
7690          name = _ref2.name,
7691          key = _ref2.key;
7692  
7693      if (checked) {
7694        _setUnselectedEntities(unselectedEntities.filter(function (elt) {
7695          return elt.kind !== kind || elt.name !== name || elt.key !== key;
7696        }));
7697      } else {
7698        _setUnselectedEntities([].concat(Object(toConsumableArray["a" /* default */])(unselectedEntities), [{
7699          kind: kind,
7700          name: name,
7701          key: key
7702        }]));
7703      }
7704    };
7705  
7706    var saveCheckedEntities = function saveCheckedEntities() {
7707      var entitiesToSave = dirtyEntityRecords.filter(function (_ref3) {
7708        var kind = _ref3.kind,
7709            name = _ref3.name,
7710            key = _ref3.key;
7711        return !Object(external_this_lodash_["some"])(unselectedEntities, function (elt) {
7712          return elt.kind === kind && elt.name === name && elt.key === key;
7713        });
7714      });
7715      close(entitiesToSave);
7716      entitiesToSave.forEach(function (_ref4) {
7717        var kind = _ref4.kind,
7718            name = _ref4.name,
7719            key = _ref4.key;
7720        saveEditedEntityRecord(kind, name, key);
7721      });
7722    };
7723  
7724    var _useState3 = Object(external_this_wp_element_["useState"])(false),
7725        _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2),
7726        isReviewing = _useState4[0],
7727        setIsReviewing = _useState4[1];
7728  
7729    var toggleIsReviewing = function toggleIsReviewing() {
7730      return setIsReviewing(function (value) {
7731        return !value;
7732      });
7733    }; // Explicitly define this with no argument passed.  Using `close` on
7734    // its own will use the event object in place of the expected saved entities.
7735  
7736  
7737    var dismissPanel = Object(external_this_wp_element_["useCallback"])(function () {
7738      return close();
7739    }, [close]);
7740    return isOpen ? Object(external_this_wp_element_["createElement"])("div", {
7741      className: "entities-saved-states__panel"
7742    }, Object(external_this_wp_element_["createElement"])("div", {
7743      className: "entities-saved-states__panel-header"
7744    }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
7745      isPrimary: true,
7746      disabled: dirtyEntityRecords.length - unselectedEntities.length === 0,
7747      onClick: saveCheckedEntities,
7748      className: "editor-entities-saved-states__save-button"
7749    }, Object(external_this_wp_i18n_["__"])('Save')), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
7750      onClick: dismissPanel,
7751      icon: library_close["a" /* default */],
7752      label: Object(external_this_wp_i18n_["__"])('Close panel')
7753    })), Object(external_this_wp_element_["createElement"])("div", {
7754      className: "entities-saved-states__text-prompt"
7755    }, Object(external_this_wp_element_["createElement"])("strong", null, Object(external_this_wp_i18n_["__"])('Are you ready to save?')), Object(external_this_wp_element_["createElement"])("p", null, promptPhrase), Object(external_this_wp_element_["createElement"])("p", null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
7756      onClick: toggleIsReviewing,
7757      isLink: true,
7758      className: "entities-saved-states__review-changes-button"
7759    }, isReviewing ? Object(external_this_wp_i18n_["__"])('Hide changes.') : Object(external_this_wp_i18n_["__"])('Review changes.')))), isReviewing && partitionedSavables.map(function (list) {
7760      return Object(external_this_wp_element_["createElement"])(EntityTypeList, {
7761        key: list[0].name,
7762        list: list,
7763        closePanel: dismissPanel,
7764        unselectedEntities: unselectedEntities,
7765        setUnselectedEntities: setUnselectedEntities
7766      });
7767    })) : null;
7768  }
7769  
7770  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
7771  var assertThisInitialized = __webpack_require__(10);
7772  
7773  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/error-boundary/index.js
7774  
7775  
7776  
7777  
7778  
7779  
7780  
7781  
7782  function error_boundary_createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (error_boundary_isNativeReflectConstruct()) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; }
7783  
7784  function error_boundary_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
7785  
7786  /**
7787   * WordPress dependencies
7788   */
7789  
7790  
7791  
7792  
7793  
7794  
7795  var error_boundary_ErrorBoundary = /*#__PURE__*/function (_Component) {
7796    Object(inherits["a" /* default */])(ErrorBoundary, _Component);
7797  
7798    var _super = error_boundary_createSuper(ErrorBoundary);
7799  
7800    function ErrorBoundary() {
7801      var _this;
7802  
7803      Object(classCallCheck["a" /* default */])(this, ErrorBoundary);
7804  
7805      _this = _super.apply(this, arguments);
7806      _this.reboot = _this.reboot.bind(Object(assertThisInitialized["a" /* default */])(_this));
7807      _this.getContent = _this.getContent.bind(Object(assertThisInitialized["a" /* default */])(_this));
7808      _this.state = {
7809        error: null
7810      };
7811      return _this;
7812    }
7813  
7814    Object(createClass["a" /* default */])(ErrorBoundary, [{
7815      key: "componentDidCatch",
7816      value: function componentDidCatch(error) {
7817        this.setState({
7818          error: error
7819        });
7820      }
7821    }, {
7822      key: "reboot",
7823      value: function reboot() {
7824        this.props.onError();
7825      }
7826    }, {
7827      key: "getContent",
7828      value: function getContent() {
7829        try {
7830          // While `select` in a component is generally discouraged, it is
7831          // used here because it (a) reduces the chance of data loss in the
7832          // case of additional errors by performing a direct retrieval and
7833          // (b) avoids the performance cost associated with unnecessary
7834          // content serialization throughout the lifetime of a non-erroring
7835          // application.
7836          return Object(external_this_wp_data_["select"])('core/editor').getEditedPostContent();
7837        } catch (error) {}
7838      }
7839    }, {
7840      key: "render",
7841      value: function render() {
7842        var error = this.state.error;
7843  
7844        if (!error) {
7845          return this.props.children;
7846        }
7847  
7848        return Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["Warning"], {
7849          className: "editor-error-boundary",
7850          actions: [Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
7851            key: "recovery",
7852            onClick: this.reboot,
7853            isSecondary: true
7854          }, Object(external_this_wp_i18n_["__"])('Attempt Recovery')), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ClipboardButton"], {
7855            key: "copy-post",
7856            text: this.getContent,
7857            isSecondary: true
7858          }, Object(external_this_wp_i18n_["__"])('Copy Post Text')), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ClipboardButton"], {
7859            key: "copy-error",
7860            text: error.stack,
7861            isSecondary: true
7862          }, Object(external_this_wp_i18n_["__"])('Copy Error'))]
7863        }, Object(external_this_wp_i18n_["__"])('The editor has encountered an unexpected error.'));
7864      }
7865    }]);
7866  
7867    return ErrorBoundary;
7868  }(external_this_wp_element_["Component"]);
7869  
7870  /* harmony default export */ var error_boundary = (error_boundary_ErrorBoundary);
7871  
7872  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/local-autosave-monitor/index.js
7873  
7874  
7875  /**
7876   * External dependencies
7877   */
7878  
7879  /**
7880   * WordPress dependencies
7881   */
7882  
7883  
7884  
7885  
7886  
7887  
7888  /**
7889   * Internal dependencies
7890   */
7891  
7892  
7893  
7894  var requestIdleCallback = window.requestIdleCallback ? window.requestIdleCallback : window.requestAnimationFrame;
7895  /**
7896   * Function which returns true if the current environment supports browser
7897   * sessionStorage, or false otherwise. The result of this function is cached and
7898   * reused in subsequent invocations.
7899   */
7900  
7901  var hasSessionStorageSupport = Object(external_this_lodash_["once"])(function () {
7902    try {
7903      // Private Browsing in Safari 10 and earlier will throw an error when
7904      // attempting to set into sessionStorage. The test here is intentional in
7905      // causing a thrown error as condition bailing from local autosave.
7906      window.sessionStorage.setItem('__wpEditorTestSessionStorage', '');
7907      window.sessionStorage.removeItem('__wpEditorTestSessionStorage');
7908      return true;
7909    } catch (error) {
7910      return false;
7911    }
7912  });
7913  /**
7914   * Custom hook which manages the creation of a notice prompting the user to
7915   * restore a local autosave, if one exists.
7916   */
7917  
7918  function useAutosaveNotice() {
7919    var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
7920      return {
7921        postId: select('core/editor').getCurrentPostId(),
7922        getEditedPostAttribute: select('core/editor').getEditedPostAttribute,
7923        hasRemoteAutosave: !!select('core/editor').getEditorSettings().autosave
7924      };
7925    }, []),
7926        postId = _useSelect.postId,
7927        getEditedPostAttribute = _useSelect.getEditedPostAttribute,
7928        hasRemoteAutosave = _useSelect.hasRemoteAutosave;
7929  
7930    var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/notices'),
7931        createWarningNotice = _useDispatch.createWarningNotice,
7932        removeNotice = _useDispatch.removeNotice;
7933  
7934    var _useDispatch2 = Object(external_this_wp_data_["useDispatch"])('core/editor'),
7935        editPost = _useDispatch2.editPost,
7936        resetEditorBlocks = _useDispatch2.resetEditorBlocks;
7937  
7938    Object(external_this_wp_element_["useEffect"])(function () {
7939      var localAutosave = localAutosaveGet(postId);
7940  
7941      if (!localAutosave) {
7942        return;
7943      }
7944  
7945      try {
7946        localAutosave = JSON.parse(localAutosave);
7947      } catch (error) {
7948        // Not usable if it can't be parsed.
7949        return;
7950      }
7951  
7952      var _localAutosave = localAutosave,
7953          title = _localAutosave.post_title,
7954          content = _localAutosave.content,
7955          excerpt = _localAutosave.excerpt;
7956      var edits = {
7957        title: title,
7958        content: content,
7959        excerpt: excerpt
7960      };
7961      {
7962        // Only display a notice if there is a difference between what has been
7963        // saved and that which is stored in sessionStorage.
7964        var hasDifference = Object.keys(edits).some(function (key) {
7965          return edits[key] !== getEditedPostAttribute(key);
7966        });
7967  
7968        if (!hasDifference) {
7969          // If there is no difference, it can be safely ejected from storage.
7970          localAutosaveClear(postId);
7971          return;
7972        }
7973      }
7974  
7975      if (hasRemoteAutosave) {
7976        return;
7977      }
7978  
7979      var noticeId = Object(external_this_lodash_["uniqueId"])('wpEditorAutosaveRestore');
7980      createWarningNotice(Object(external_this_wp_i18n_["__"])('The backup of this post in your browser is different from the version below.'), {
7981        id: noticeId,
7982        actions: [{
7983          label: Object(external_this_wp_i18n_["__"])('Restore the backup'),
7984          onClick: function onClick() {
7985            editPost(Object(external_this_lodash_["omit"])(edits, ['content']));
7986            resetEditorBlocks(Object(external_this_wp_blocks_["parse"])(edits.content));
7987            removeNotice(noticeId);
7988          }
7989        }]
7990      });
7991    }, [postId]);
7992  }
7993  /**
7994   * Custom hook which ejects a local autosave after a successful save occurs.
7995   */
7996  
7997  
7998  function useAutosavePurge() {
7999    var _useSelect2 = Object(external_this_wp_data_["useSelect"])(function (select) {
8000      return {
8001        postId: select('core/editor').getCurrentPostId(),
8002        isDirty: select('core/editor').isEditedPostDirty(),
8003        isAutosaving: select('core/editor').isAutosavingPost(),
8004        didError: select('core/editor').didPostSaveRequestFail()
8005      };
8006    }, []),
8007        postId = _useSelect2.postId,
8008        isDirty = _useSelect2.isDirty,
8009        isAutosaving = _useSelect2.isAutosaving,
8010        didError = _useSelect2.didError;
8011  
8012    var lastIsDirty = Object(external_this_wp_element_["useRef"])(isDirty);
8013    var lastIsAutosaving = Object(external_this_wp_element_["useRef"])(isAutosaving);
8014    Object(external_this_wp_element_["useEffect"])(function () {
8015      if (!didError && (lastIsAutosaving.current && !isAutosaving || lastIsDirty.current && !isDirty)) {
8016        localAutosaveClear(postId);
8017      }
8018  
8019      lastIsDirty.current = isDirty;
8020      lastIsAutosaving.current = isAutosaving;
8021    }, [isDirty, isAutosaving, didError]);
8022  }
8023  
8024  function LocalAutosaveMonitor() {
8025    var _useDispatch3 = Object(external_this_wp_data_["useDispatch"])('core/editor'),
8026        __experimentalLocalAutosave = _useDispatch3.__experimentalLocalAutosave;
8027  
8028    var autosave = Object(external_this_wp_element_["useCallback"])(function () {
<