[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

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