[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/js/dist/ -> block-library.js (source)

   1  this["wp"] = this["wp"] || {}; this["wp"]["blockLibrary"] =
   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 = 454);
  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, exports) {
 106  
 107  (function() { module.exports = this["wp"]["compose"]; }());
 108  
 109  /***/ }),
 110  
 111  /***/ 101:
 112  /***/ (function(module, exports) {
 113  
 114  (function() { module.exports = this["wp"]["viewport"]; }());
 115  
 116  /***/ }),
 117  
 118  /***/ 105:
 119  /***/ (function(module, exports) {
 120  
 121  (function() { module.exports = this["wp"]["autop"]; }());
 122  
 123  /***/ }),
 124  
 125  /***/ 11:
 126  /***/ (function(module, exports) {
 127  
 128  (function() { module.exports = this["wp"]["blocks"]; }());
 129  
 130  /***/ }),
 131  
 132  /***/ 117:
 133  /***/ (function(module, exports, __webpack_require__) {
 134  
 135  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
 136    Copyright (c) 2017 Jed Watson.
 137    Licensed under the MIT License (MIT), see
 138    http://jedwatson.github.io/classnames
 139  */
 140  /* global define */
 141  
 142  (function () {
 143      'use strict';
 144  
 145      var classNames = (function () {
 146          // don't inherit from Object so we can skip hasOwnProperty check later
 147          // http://stackoverflow.com/questions/15518328/creating-js-object-with-object-createnull#answer-21079232
 148  		function StorageObject() {}
 149          StorageObject.prototype = Object.create(null);
 150  
 151  		function _parseArray (resultSet, array) {
 152              var length = array.length;
 153  
 154              for (var i = 0; i < length; ++i) {
 155                  _parse(resultSet, array[i]);
 156              }
 157          }
 158  
 159          var hasOwn = {}.hasOwnProperty;
 160  
 161  		function _parseNumber (resultSet, num) {
 162              resultSet[num] = true;
 163          }
 164  
 165  		function _parseObject (resultSet, object) {
 166              for (var k in object) {
 167                  if (hasOwn.call(object, k)) {
 168                      // set value to false instead of deleting it to avoid changing object structure
 169                      // https://www.smashingmagazine.com/2012/11/writing-fast-memory-efficient-javascript/#de-referencing-misconceptions
 170                      resultSet[k] = !!object[k];
 171                  }
 172              }
 173          }
 174  
 175          var SPACE = /\s+/;
 176  		function _parseString (resultSet, str) {
 177              var array = str.split(SPACE);
 178              var length = array.length;
 179  
 180              for (var i = 0; i < length; ++i) {
 181                  resultSet[array[i]] = true;
 182              }
 183          }
 184  
 185  		function _parse (resultSet, arg) {
 186              if (!arg) return;
 187              var argType = typeof arg;
 188  
 189              // 'foo bar'
 190              if (argType === 'string') {
 191                  _parseString(resultSet, arg);
 192  
 193              // ['foo', 'bar', ...]
 194              } else if (Array.isArray(arg)) {
 195                  _parseArray(resultSet, arg);
 196  
 197              // { 'foo': true, ... }
 198              } else if (argType === 'object') {
 199                  _parseObject(resultSet, arg);
 200  
 201              // '130'
 202              } else if (argType === 'number') {
 203                  _parseNumber(resultSet, arg);
 204              }
 205          }
 206  
 207  		function _classNames () {
 208              // don't leak arguments
 209              // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
 210              var len = arguments.length;
 211              var args = Array(len);
 212              for (var i = 0; i < len; i++) {
 213                  args[i] = arguments[i];
 214              }
 215  
 216              var classSet = new StorageObject();
 217              _parseArray(classSet, args);
 218  
 219              var list = [];
 220  
 221              for (var k in classSet) {
 222                  if (classSet[k]) {
 223                      list.push(k)
 224                  }
 225              }
 226  
 227              return list.join(' ');
 228          }
 229  
 230          return _classNames;
 231      })();
 232  
 233      if ( true && module.exports) {
 234          classNames.default = classNames;
 235          module.exports = classNames;
 236      } else if (true) {
 237          // register as 'classnames', consistent with npm package name
 238          !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
 239              return classNames;
 240          }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
 241                  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
 242      } else {}
 243  }());
 244  
 245  
 246  /***/ }),
 247  
 248  /***/ 12:
 249  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 250  
 251  "use strict";
 252  
 253  // EXPORTS
 254  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _slicedToArray; });
 255  
 256  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
 257  var arrayWithHoles = __webpack_require__(38);
 258  
 259  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
 260  function _iterableToArrayLimit(arr, i) {
 261    if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
 262    var _arr = [];
 263    var _n = true;
 264    var _d = false;
 265    var _e = undefined;
 266  
 267    try {
 268      for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
 269        _arr.push(_s.value);
 270  
 271        if (i && _arr.length === i) break;
 272      }
 273    } catch (err) {
 274      _d = true;
 275      _e = err;
 276    } finally {
 277      try {
 278        if (!_n && _i["return"] != null) _i["return"]();
 279      } finally {
 280        if (_d) throw _e;
 281      }
 282    }
 283  
 284    return _arr;
 285  }
 286  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
 287  var unsupportedIterableToArray = __webpack_require__(30);
 288  
 289  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
 290  var nonIterableRest = __webpack_require__(39);
 291  
 292  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
 293  
 294  
 295  
 296  
 297  function _slicedToArray(arr, i) {
 298    return Object(arrayWithHoles["a" /* default */])(arr) || _iterableToArrayLimit(arr, i) || Object(unsupportedIterableToArray["a" /* default */])(arr, i) || Object(nonIterableRest["a" /* default */])();
 299  }
 300  
 301  /***/ }),
 302  
 303  /***/ 121:
 304  /***/ (function(module, exports) {
 305  
 306  (function() { module.exports = this["wp"]["reusableBlocks"]; }());
 307  
 308  /***/ }),
 309  
 310  /***/ 13:
 311  /***/ (function(module, exports) {
 312  
 313  (function() { module.exports = this["React"]; }());
 314  
 315  /***/ }),
 316  
 317  /***/ 14:
 318  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 319  
 320  "use strict";
 321  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutProperties; });
 322  /* harmony import */ var _objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(43);
 323  
 324  function _objectWithoutProperties(source, excluded) {
 325    if (source == null) return {};
 326    var target = Object(_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(source, excluded);
 327    var key, i;
 328  
 329    if (Object.getOwnPropertySymbols) {
 330      var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
 331  
 332      for (i = 0; i < sourceSymbolKeys.length; i++) {
 333        key = sourceSymbolKeys[i];
 334        if (excluded.indexOf(key) >= 0) continue;
 335        if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
 336        target[key] = source[key];
 337      }
 338    }
 339  
 340    return target;
 341  }
 342  
 343  /***/ }),
 344  
 345  /***/ 141:
 346  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 347  
 348  "use strict";
 349  /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
 350  /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14);
 351  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0);
 352  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);
 353  
 354  
 355  
 356  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
 357  
 358  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
 359  
 360  /**
 361   * WordPress dependencies
 362   */
 363  
 364  /** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */
 365  
 366  /**
 367   * Return an SVG icon.
 368   *
 369   * @param {IconProps} props icon is the SVG component to render
 370   *                          size is a number specifiying the icon size in pixels
 371   *                          Other props will be passed to wrapped SVG component
 372   *
 373   * @return {JSX.Element}  Icon component
 374   */
 375  
 376  function Icon(_ref) {
 377    var icon = _ref.icon,
 378        _ref$size = _ref.size,
 379        size = _ref$size === void 0 ? 24 : _ref$size,
 380        props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_ref, ["icon", "size"]);
 381  
 382    return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["cloneElement"])(icon, _objectSpread({
 383      width: size,
 384      height: size
 385    }, props));
 386  }
 387  
 388  /* harmony default export */ __webpack_exports__["a"] = (Icon);
 389  
 390  
 391  /***/ }),
 392  
 393  /***/ 159:
 394  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 395  
 396  "use strict";
 397  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
 398  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 399  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
 400  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 401  
 402  
 403  /**
 404   * WordPress dependencies
 405   */
 406  
 407  var closeSmall = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 408    xmlns: "http://www.w3.org/2000/svg",
 409    viewBox: "0 0 24 24"
 410  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 411    d: "M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z"
 412  }));
 413  /* harmony default export */ __webpack_exports__["a"] = (closeSmall);
 414  
 415  
 416  /***/ }),
 417  
 418  /***/ 16:
 419  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 420  
 421  "use strict";
 422  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; });
 423  function _assertThisInitialized(self) {
 424    if (self === void 0) {
 425      throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
 426    }
 427  
 428    return self;
 429  }
 430  
 431  /***/ }),
 432  
 433  /***/ 161:
 434  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 435  
 436  "use strict";
 437  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
 438  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 439  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
 440  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 441  
 442  
 443  /**
 444   * WordPress dependencies
 445   */
 446  
 447  var check = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 448    xmlns: "http://www.w3.org/2000/svg",
 449    viewBox: "0 0 24 24"
 450  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 451    d: "M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"
 452  }));
 453  /* harmony default export */ __webpack_exports__["a"] = (check);
 454  
 455  
 456  /***/ }),
 457  
 458  /***/ 17:
 459  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 460  
 461  "use strict";
 462  
 463  // EXPORTS
 464  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; });
 465  
 466  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
 467  var arrayLikeToArray = __webpack_require__(27);
 468  
 469  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
 470  
 471  function _arrayWithoutHoles(arr) {
 472    if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr);
 473  }
 474  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
 475  var iterableToArray = __webpack_require__(37);
 476  
 477  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
 478  var unsupportedIterableToArray = __webpack_require__(30);
 479  
 480  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
 481  function _nonIterableSpread() {
 482    throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
 483  }
 484  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
 485  
 486  
 487  
 488  
 489  function _toConsumableArray(arr) {
 490    return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread();
 491  }
 492  
 493  /***/ }),
 494  
 495  /***/ 18:
 496  /***/ (function(module, exports) {
 497  
 498  (function() { module.exports = this["wp"]["keycodes"]; }());
 499  
 500  /***/ }),
 501  
 502  /***/ 186:
 503  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 504  
 505  "use strict";
 506  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
 507  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 508  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
 509  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 510  
 511  
 512  /**
 513   * WordPress dependencies
 514   */
 515  
 516  var link = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 517    xmlns: "http://www.w3.org/2000/svg",
 518    viewBox: "0 0 24 24"
 519  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 520    d: "M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"
 521  }));
 522  /* harmony default export */ __webpack_exports__["a"] = (link);
 523  
 524  
 525  /***/ }),
 526  
 527  /***/ 19:
 528  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 529  
 530  "use strict";
 531  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; });
 532  function _getPrototypeOf(o) {
 533    _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
 534      return o.__proto__ || Object.getPrototypeOf(o);
 535    };
 536    return _getPrototypeOf(o);
 537  }
 538  
 539  /***/ }),
 540  
 541  /***/ 2:
 542  /***/ (function(module, exports) {
 543  
 544  (function() { module.exports = this["lodash"]; }());
 545  
 546  /***/ }),
 547  
 548  /***/ 20:
 549  /***/ (function(module, exports) {
 550  
 551  (function() { module.exports = this["regeneratorRuntime"]; }());
 552  
 553  /***/ }),
 554  
 555  /***/ 21:
 556  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 557  
 558  "use strict";
 559  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; });
 560  function _classCallCheck(instance, Constructor) {
 561    if (!(instance instanceof Constructor)) {
 562      throw new TypeError("Cannot call a class as a function");
 563    }
 564  }
 565  
 566  /***/ }),
 567  
 568  /***/ 214:
 569  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 570  
 571  "use strict";
 572  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
 573  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 574  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
 575  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 576  
 577  
 578  /**
 579   * WordPress dependencies
 580   */
 581  
 582  var chevronRight = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 583    xmlns: "http://www.w3.org/2000/svg",
 584    viewBox: "0 0 24 24"
 585  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 586    d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"
 587  }));
 588  /* harmony default export */ __webpack_exports__["a"] = (chevronRight);
 589  
 590  
 591  /***/ }),
 592  
 593  /***/ 215:
 594  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 595  
 596  "use strict";
 597  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
 598  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 599  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
 600  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 601  
 602  
 603  /**
 604   * WordPress dependencies
 605   */
 606  
 607  var chevronLeft = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 608    xmlns: "http://www.w3.org/2000/svg",
 609    viewBox: "0 0 24 24"
 610  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 611    d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"
 612  }));
 613  /* harmony default export */ __webpack_exports__["a"] = (chevronLeft);
 614  
 615  
 616  /***/ }),
 617  
 618  /***/ 216:
 619  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 620  
 621  "use strict";
 622  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
 623  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 624  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
 625  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 626  
 627  
 628  /**
 629   * WordPress dependencies
 630   */
 631  
 632  var keyboardReturn = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 633    xmlns: "http://www.w3.org/2000/svg",
 634    viewBox: "-2 -2 24 24"
 635  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 636    d: "M16 4h2v9H7v3l-5-4 5-4v3h9V4z"
 637  }));
 638  /* harmony default export */ __webpack_exports__["a"] = (keyboardReturn);
 639  
 640  
 641  /***/ }),
 642  
 643  /***/ 217:
 644  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 645  
 646  "use strict";
 647  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
 648  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 649  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
 650  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 651  
 652  
 653  /**
 654   * WordPress dependencies
 655   */
 656  
 657  var upload = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 658    xmlns: "http://www.w3.org/2000/svg",
 659    viewBox: "0 0 24 24"
 660  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 661    d: "M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"
 662  }));
 663  /* harmony default export */ __webpack_exports__["a"] = (upload);
 664  
 665  
 666  /***/ }),
 667  
 668  /***/ 218:
 669  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 670  
 671  "use strict";
 672  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
 673  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 674  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
 675  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 676  
 677  
 678  /**
 679   * WordPress dependencies
 680   */
 681  
 682  var linkOff = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 683    xmlns: "http://www.w3.org/2000/svg",
 684    viewBox: "0 0 24 24"
 685  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 686    d: "M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"
 687  }));
 688  /* harmony default export */ __webpack_exports__["a"] = (linkOff);
 689  
 690  
 691  /***/ }),
 692  
 693  /***/ 22:
 694  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 695  
 696  "use strict";
 697  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; });
 698  function _defineProperties(target, props) {
 699    for (var i = 0; i < props.length; i++) {
 700      var descriptor = props[i];
 701      descriptor.enumerable = descriptor.enumerable || false;
 702      descriptor.configurable = true;
 703      if ("value" in descriptor) descriptor.writable = true;
 704      Object.defineProperty(target, descriptor.key, descriptor);
 705    }
 706  }
 707  
 708  function _createClass(Constructor, protoProps, staticProps) {
 709    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
 710    if (staticProps) _defineProperties(Constructor, staticProps);
 711    return Constructor;
 712  }
 713  
 714  /***/ }),
 715  
 716  /***/ 23:
 717  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 718  
 719  "use strict";
 720  
 721  // EXPORTS
 722  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _inherits; });
 723  
 724  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
 725  function _setPrototypeOf(o, p) {
 726    _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
 727      o.__proto__ = p;
 728      return o;
 729    };
 730  
 731    return _setPrototypeOf(o, p);
 732  }
 733  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
 734  
 735  function _inherits(subClass, superClass) {
 736    if (typeof superClass !== "function" && superClass !== null) {
 737      throw new TypeError("Super expression must either be null or a function");
 738    }
 739  
 740    subClass.prototype = Object.create(superClass && superClass.prototype, {
 741      constructor: {
 742        value: subClass,
 743        writable: true,
 744        configurable: true
 745      }
 746    });
 747    if (superClass) _setPrototypeOf(subClass, superClass);
 748  }
 749  
 750  /***/ }),
 751  
 752  /***/ 24:
 753  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 754  
 755  "use strict";
 756  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _possibleConstructorReturn; });
 757  /* harmony import */ var _helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(40);
 758  /* harmony import */ var _assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16);
 759  
 760  
 761  function _possibleConstructorReturn(self, call) {
 762    if (call && (Object(_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(call) === "object" || typeof call === "function")) {
 763      return call;
 764    }
 765  
 766    return Object(_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(self);
 767  }
 768  
 769  /***/ }),
 770  
 771  /***/ 25:
 772  /***/ (function(module, exports) {
 773  
 774  (function() { module.exports = this["wp"]["richText"]; }());
 775  
 776  /***/ }),
 777  
 778  /***/ 27:
 779  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 780  
 781  "use strict";
 782  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; });
 783  function _arrayLikeToArray(arr, len) {
 784    if (len == null || len > arr.length) len = arr.length;
 785  
 786    for (var i = 0, arr2 = new Array(len); i < len; i++) {
 787      arr2[i] = arr[i];
 788    }
 789  
 790    return arr2;
 791  }
 792  
 793  /***/ }),
 794  
 795  /***/ 274:
 796  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 797  
 798  "use strict";
 799  
 800  // EXTERNAL MODULE: external {"this":["wp","element"]}
 801  var external_this_wp_element_ = __webpack_require__(0);
 802  
 803  // EXTERNAL MODULE: external {"this":["wp","primitives"]}
 804  var external_this_wp_primitives_ = __webpack_require__(7);
 805  
 806  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/pencil.js
 807  
 808  
 809  /**
 810   * WordPress dependencies
 811   */
 812  
 813  var pencil = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
 814    xmlns: "http://www.w3.org/2000/svg",
 815    viewBox: "0 0 24 24"
 816  }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
 817    d: "M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"
 818  }));
 819  /* harmony default export */ var library_pencil = (pencil);
 820  
 821  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/edit.js
 822  /**
 823   * Internal dependencies
 824   */
 825  
 826  /* harmony default export */ var edit = __webpack_exports__["a"] = (library_pencil);
 827  
 828  
 829  /***/ }),
 830  
 831  /***/ 282:
 832  /***/ (function(module, exports, __webpack_require__) {
 833  
 834  /*! Fast Average Color | © 2019 Denis Seleznev | MIT License | https://github.com/hcodes/fast-average-color/ */
 835  (function (global, factory) {
 836       true ? module.exports = factory() :
 837      undefined;
 838  }(this, (function () { 'use strict';
 839  
 840  function _classCallCheck(instance, Constructor) {
 841    if (!(instance instanceof Constructor)) {
 842      throw new TypeError("Cannot call a class as a function");
 843    }
 844  }
 845  
 846  function _defineProperties(target, props) {
 847    for (var i = 0; i < props.length; i++) {
 848      var descriptor = props[i];
 849      descriptor.enumerable = descriptor.enumerable || false;
 850      descriptor.configurable = true;
 851      if ("value" in descriptor) descriptor.writable = true;
 852      Object.defineProperty(target, descriptor.key, descriptor);
 853    }
 854  }
 855  
 856  function _createClass(Constructor, protoProps, staticProps) {
 857    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
 858    if (staticProps) _defineProperties(Constructor, staticProps);
 859    return Constructor;
 860  }
 861  
 862  function _slicedToArray(arr, i) {
 863    return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
 864  }
 865  
 866  function _arrayWithHoles(arr) {
 867    if (Array.isArray(arr)) return arr;
 868  }
 869  
 870  function _iterableToArrayLimit(arr, i) {
 871    var _arr = [];
 872    var _n = true;
 873    var _d = false;
 874    var _e = undefined;
 875  
 876    try {
 877      for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
 878        _arr.push(_s.value);
 879  
 880        if (i && _arr.length === i) break;
 881      }
 882    } catch (err) {
 883      _d = true;
 884      _e = err;
 885    } finally {
 886      try {
 887        if (!_n && _i["return"] != null) _i["return"]();
 888      } finally {
 889        if (_d) throw _e;
 890      }
 891    }
 892  
 893    return _arr;
 894  }
 895  
 896  function _nonIterableRest() {
 897    throw new TypeError("Invalid attempt to destructure non-iterable instance");
 898  }
 899  
 900  var FastAverageColor =
 901  /*#__PURE__*/
 902  function () {
 903    function FastAverageColor() {
 904      _classCallCheck(this, FastAverageColor);
 905    }
 906  
 907    _createClass(FastAverageColor, [{
 908      key: "getColorAsync",
 909  
 910      /**
 911       * Get asynchronously the average color from not loaded image.
 912       *
 913       * @param {HTMLImageElement} resource
 914       * @param {Function} callback
 915       * @param {Object|null} [options]
 916       * @param {Array}  [options.defaultColor=[255, 255, 255, 255]]
 917       * @param {*}      [options.data]
 918       * @param {string} [options.mode="speed"] "precision" or "speed"
 919       * @param {string} [options.algorithm="sqrt"] "simple", "sqrt" or "dominant"
 920       * @param {number} [options.step=1]
 921       * @param {number} [options.left=0]
 922       * @param {number} [options.top=0]
 923       * @param {number} [options.width=width of resource]
 924       * @param {number} [options.height=height of resource]
 925       */
 926      value: function getColorAsync(resource, callback, options) {
 927        if (resource.complete) {
 928          callback.call(resource, this.getColor(resource, options), options && options.data);
 929        } else {
 930          this._bindImageEvents(resource, callback, options);
 931        }
 932      }
 933      /**
 934       * Get the average color from images, videos and canvas.
 935       *
 936       * @param {HTMLImageElement|HTMLVideoElement|HTMLCanvasElement} resource
 937       * @param {Object|null} [options]
 938       * @param {Array}  [options.defaultColor=[255, 255, 255, 255]]
 939       * @param {*}      [options.data]
 940       * @param {string} [options.mode="speed"] "precision" or "speed"
 941       * @param {string} [options.algorithm="sqrt"] "simple", "sqrt" or "dominant"
 942       * @param {number} [options.step=1]
 943       * @param {number} [options.left=0]
 944       * @param {number} [options.top=0]
 945       * @param {number} [options.width=width of resource]
 946       * @param {number} [options.height=height of resource]
 947       *
 948       * @returns {Object}
 949       */
 950  
 951    }, {
 952      key: "getColor",
 953      value: function getColor(resource, options) {
 954        options = options || {};
 955  
 956        var defaultColor = this._getDefaultColor(options),
 957            originalSize = this._getOriginalSize(resource),
 958            size = this._prepareSizeAndPosition(originalSize, options);
 959  
 960        var error = null,
 961            value = defaultColor;
 962  
 963        if (!size.srcWidth || !size.srcHeight || !size.destWidth || !size.destHeight) {
 964          return this._prepareResult(defaultColor, new Error('FastAverageColor: Incorrect sizes.'));
 965        }
 966  
 967        if (!this._ctx) {
 968          this._canvas = this._makeCanvas();
 969          this._ctx = this._canvas.getContext && this._canvas.getContext('2d');
 970  
 971          if (!this._ctx) {
 972            return this._prepareResult(defaultColor, new Error('FastAverageColor: Canvas Context 2D is not supported in this browser.'));
 973          }
 974        }
 975  
 976        this._canvas.width = size.destWidth;
 977        this._canvas.height = size.destHeight;
 978  
 979        try {
 980          this._ctx.clearRect(0, 0, size.destWidth, size.destHeight);
 981  
 982          this._ctx.drawImage(resource, size.srcLeft, size.srcTop, size.srcWidth, size.srcHeight, 0, 0, size.destWidth, size.destHeight);
 983  
 984          var bitmapData = this._ctx.getImageData(0, 0, size.destWidth, size.destHeight).data;
 985  
 986          value = this.getColorFromArray4(bitmapData, options);
 987        } catch (e) {
 988          // Security error, CORS
 989          // https://developer.mozilla.org/en/docs/Web/HTML/CORS_enabled_image
 990          error = e;
 991        }
 992  
 993        return this._prepareResult(value, error);
 994      }
 995      /**
 996       * Get the average color from a array when 1 pixel is 4 bytes.
 997       *
 998       * @param {Array|Uint8Array} arr
 999       * @param {Object} [options]
1000       * @param {string} [options.algorithm="sqrt"] "simple", "sqrt" or "dominant"
1001       * @param {Array}  [options.defaultColor=[255, 255, 255, 255]]
1002       * @param {number} [options.step=1]
1003       *
1004       * @returns {Array} [red (0-255), green (0-255), blue (0-255), alpha (0-255)]
1005       */
1006  
1007    }, {
1008      key: "getColorFromArray4",
1009      value: function getColorFromArray4(arr, options) {
1010        options = options || {};
1011        var bytesPerPixel = 4,
1012            arrLength = arr.length;
1013  
1014        if (arrLength < bytesPerPixel) {
1015          return this._getDefaultColor(options);
1016        }
1017  
1018        var len = arrLength - arrLength % bytesPerPixel,
1019            preparedStep = (options.step || 1) * bytesPerPixel,
1020            algorithm = '_' + (options.algorithm || 'sqrt') + 'Algorithm';
1021  
1022        if (typeof this[algorithm] !== 'function') {
1023          throw new Error("FastAverageColor: ".concat(options.algorithm, " is unknown algorithm."));
1024        }
1025  
1026        return this[algorithm](arr, len, preparedStep);
1027      }
1028      /**
1029       * Destroy the instance.
1030       */
1031  
1032    }, {
1033      key: "destroy",
1034      value: function destroy() {
1035        delete this._canvas;
1036        delete this._ctx;
1037      }
1038    }, {
1039      key: "_getDefaultColor",
1040      value: function _getDefaultColor(options) {
1041        return this._getOption(options, 'defaultColor', [255, 255, 255, 255]);
1042      }
1043    }, {
1044      key: "_getOption",
1045      value: function _getOption(options, name, defaultValue) {
1046        return typeof options[name] === 'undefined' ? defaultValue : options[name];
1047      }
1048    }, {
1049      key: "_prepareSizeAndPosition",
1050      value: function _prepareSizeAndPosition(originalSize, options) {
1051        var srcLeft = this._getOption(options, 'left', 0),
1052            srcTop = this._getOption(options, 'top', 0),
1053            srcWidth = this._getOption(options, 'width', originalSize.width),
1054            srcHeight = this._getOption(options, 'height', originalSize.height),
1055            destWidth = srcWidth,
1056            destHeight = srcHeight;
1057  
1058        if (options.mode === 'precision') {
1059          return {
1060            srcLeft: srcLeft,
1061            srcTop: srcTop,
1062            srcWidth: srcWidth,
1063            srcHeight: srcHeight,
1064            destWidth: destWidth,
1065            destHeight: destHeight
1066          };
1067        }
1068  
1069        var maxSize = 100,
1070            minSize = 10;
1071        var factor;
1072  
1073        if (srcWidth > srcHeight) {
1074          factor = srcWidth / srcHeight;
1075          destWidth = maxSize;
1076          destHeight = Math.round(destWidth / factor);
1077        } else {
1078          factor = srcHeight / srcWidth;
1079          destHeight = maxSize;
1080          destWidth = Math.round(destHeight / factor);
1081        }
1082  
1083        if (destWidth > srcWidth || destHeight > srcHeight || destWidth < minSize || destHeight < minSize) {
1084          destWidth = srcWidth;
1085          destHeight = srcHeight;
1086        }
1087  
1088        return {
1089          srcLeft: srcLeft,
1090          srcTop: srcTop,
1091          srcWidth: srcWidth,
1092          srcHeight: srcHeight,
1093          destWidth: destWidth,
1094          destHeight: destHeight
1095        };
1096      }
1097    }, {
1098      key: "_simpleAlgorithm",
1099      value: function _simpleAlgorithm(arr, len, preparedStep) {
1100        var redTotal = 0,
1101            greenTotal = 0,
1102            blueTotal = 0,
1103            alphaTotal = 0,
1104            count = 0;
1105  
1106        for (var i = 0; i < len; i += preparedStep) {
1107          var alpha = arr[i + 3],
1108              red = arr[i] * alpha,
1109              green = arr[i + 1] * alpha,
1110              blue = arr[i + 2] * alpha;
1111          redTotal += red;
1112          greenTotal += green;
1113          blueTotal += blue;
1114          alphaTotal += alpha;
1115          count++;
1116        }
1117  
1118        return alphaTotal ? [Math.round(redTotal / alphaTotal), Math.round(greenTotal / alphaTotal), Math.round(blueTotal / alphaTotal), Math.round(alphaTotal / count)] : [0, 0, 0, 0];
1119      }
1120    }, {
1121      key: "_sqrtAlgorithm",
1122      value: function _sqrtAlgorithm(arr, len, preparedStep) {
1123        var redTotal = 0,
1124            greenTotal = 0,
1125            blueTotal = 0,
1126            alphaTotal = 0,
1127            count = 0;
1128  
1129        for (var i = 0; i < len; i += preparedStep) {
1130          var red = arr[i],
1131              green = arr[i + 1],
1132              blue = arr[i + 2],
1133              alpha = arr[i + 3];
1134          redTotal += red * red * alpha;
1135          greenTotal += green * green * alpha;
1136          blueTotal += blue * blue * alpha;
1137          alphaTotal += alpha;
1138          count++;
1139        }
1140  
1141        return alphaTotal ? [Math.round(Math.sqrt(redTotal / alphaTotal)), Math.round(Math.sqrt(greenTotal / alphaTotal)), Math.round(Math.sqrt(blueTotal / alphaTotal)), Math.round(alphaTotal / count)] : [0, 0, 0, 0];
1142      }
1143    }, {
1144      key: "_dominantAlgorithm",
1145      value: function _dominantAlgorithm(arr, len, preparedStep) {
1146        var colorHash = {},
1147            divider = 24;
1148  
1149        for (var i = 0; i < len; i += preparedStep) {
1150          var red = arr[i],
1151              green = arr[i + 1],
1152              blue = arr[i + 2],
1153              alpha = arr[i + 3],
1154              key = Math.round(red / divider) + ',' + Math.round(green / divider) + ',' + Math.round(blue / divider);
1155  
1156          if (colorHash[key]) {
1157            colorHash[key] = [colorHash[key][0] + red * alpha, colorHash[key][1] + green * alpha, colorHash[key][2] + blue * alpha, colorHash[key][3] + alpha, colorHash[key][4] + 1];
1158          } else {
1159            colorHash[key] = [red * alpha, green * alpha, blue * alpha, alpha, 1];
1160          }
1161        }
1162  
1163        var buffer = Object.keys(colorHash).map(function (key) {
1164          return colorHash[key];
1165        }).sort(function (a, b) {
1166          var countA = a[4],
1167              countB = b[4];
1168          return countA > countB ? -1 : countA === countB ? 0 : 1;
1169        });
1170  
1171        var _buffer$ = _slicedToArray(buffer[0], 5),
1172            redTotal = _buffer$[0],
1173            greenTotal = _buffer$[1],
1174            blueTotal = _buffer$[2],
1175            alphaTotal = _buffer$[3],
1176            count = _buffer$[4];
1177  
1178        return alphaTotal ? [Math.round(redTotal / alphaTotal), Math.round(greenTotal / alphaTotal), Math.round(blueTotal / alphaTotal), Math.round(alphaTotal / count)] : [0, 0, 0, 0];
1179      }
1180    }, {
1181      key: "_bindImageEvents",
1182      value: function _bindImageEvents(resource, callback, options) {
1183        var _this = this;
1184  
1185        options = options || {};
1186  
1187        var data = options && options.data,
1188            defaultColor = this._getDefaultColor(options),
1189            onload = function onload() {
1190          unbindEvents();
1191          callback.call(resource, _this.getColor(resource, options), data);
1192        },
1193            onerror = function onerror() {
1194          unbindEvents();
1195          callback.call(resource, _this._prepareResult(defaultColor, new Error('Image error')), data);
1196        },
1197            onabort = function onabort() {
1198          unbindEvents();
1199          callback.call(resource, _this._prepareResult(defaultColor, new Error('Image abort')), data);
1200        },
1201            unbindEvents = function unbindEvents() {
1202          resource.removeEventListener('load', onload);
1203          resource.removeEventListener('error', onerror);
1204          resource.removeEventListener('abort', onabort);
1205        };
1206  
1207        resource.addEventListener('load', onload);
1208        resource.addEventListener('error', onerror);
1209        resource.addEventListener('abort', onabort);
1210      }
1211    }, {
1212      key: "_prepareResult",
1213      value: function _prepareResult(value, error) {
1214        var rgb = value.slice(0, 3),
1215            rgba = [].concat(rgb, value[3] / 255),
1216            isDark = this._isDark(value);
1217  
1218        return {
1219          error: error,
1220          value: value,
1221          rgb: 'rgb(' + rgb.join(',') + ')',
1222          rgba: 'rgba(' + rgba.join(',') + ')',
1223          hex: this._arrayToHex(rgb),
1224          hexa: this._arrayToHex(value),
1225          isDark: isDark,
1226          isLight: !isDark
1227        };
1228      }
1229    }, {
1230      key: "_getOriginalSize",
1231      value: function _getOriginalSize(resource) {
1232        if (resource instanceof HTMLImageElement) {
1233          return {
1234            width: resource.naturalWidth,
1235            height: resource.naturalHeight
1236          };
1237        }
1238  
1239        if (resource instanceof HTMLVideoElement) {
1240          return {
1241            width: resource.videoWidth,
1242            height: resource.videoHeight
1243          };
1244        }
1245  
1246        return {
1247          width: resource.width,
1248          height: resource.height
1249        };
1250      }
1251    }, {
1252      key: "_toHex",
1253      value: function _toHex(num) {
1254        var str = num.toString(16);
1255        return str.length === 1 ? '0' + str : str;
1256      }
1257    }, {
1258      key: "_arrayToHex",
1259      value: function _arrayToHex(arr) {
1260        return '#' + arr.map(this._toHex).join('');
1261      }
1262    }, {
1263      key: "_isDark",
1264      value: function _isDark(color) {
1265        // http://www.w3.org/TR/AERT#color-contrast
1266        var result = (color[0] * 299 + color[1] * 587 + color[2] * 114) / 1000;
1267        return result < 128;
1268      }
1269    }, {
1270      key: "_makeCanvas",
1271      value: function _makeCanvas() {
1272        return typeof window === 'undefined' ? new OffscreenCanvas(1, 1) : document.createElement('canvas');
1273      }
1274    }]);
1275  
1276    return FastAverageColor;
1277  }();
1278  
1279  return FastAverageColor;
1280  
1281  })));
1282  
1283  
1284  /***/ }),
1285  
1286  /***/ 3:
1287  /***/ (function(module, exports) {
1288  
1289  (function() { module.exports = this["wp"]["components"]; }());
1290  
1291  /***/ }),
1292  
1293  /***/ 30:
1294  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1295  
1296  "use strict";
1297  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; });
1298  /* harmony import */ var _arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27);
1299  
1300  function _unsupportedIterableToArray(o, minLen) {
1301    if (!o) return;
1302    if (typeof o === "string") return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
1303    var n = Object.prototype.toString.call(o).slice(8, -1);
1304    if (n === "Object" && o.constructor) n = o.constructor.name;
1305    if (n === "Map" || n === "Set") return Array.from(o);
1306    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
1307  }
1308  
1309  /***/ }),
1310  
1311  /***/ 303:
1312  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1313  
1314  "use strict";
1315  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1316  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
1317  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
1318  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
1319  
1320  
1321  /**
1322   * WordPress dependencies
1323   */
1324  
1325  var alignLeft = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
1326    xmlns: "http://www.w3.org/2000/svg",
1327    viewBox: "0 0 24 24"
1328  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
1329    d: "M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"
1330  }));
1331  /* harmony default export */ __webpack_exports__["a"] = (alignLeft);
1332  
1333  
1334  /***/ }),
1335  
1336  /***/ 304:
1337  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1338  
1339  "use strict";
1340  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1341  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
1342  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
1343  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
1344  
1345  
1346  /**
1347   * WordPress dependencies
1348   */
1349  
1350  var alignCenter = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
1351    xmlns: "http://www.w3.org/2000/svg",
1352    viewBox: "0 0 24 24"
1353  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
1354    d: "M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"
1355  }));
1356  /* harmony default export */ __webpack_exports__["a"] = (alignCenter);
1357  
1358  
1359  /***/ }),
1360  
1361  /***/ 305:
1362  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1363  
1364  "use strict";
1365  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1366  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
1367  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
1368  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
1369  
1370  
1371  /**
1372   * WordPress dependencies
1373   */
1374  
1375  var alignRight = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
1376    xmlns: "http://www.w3.org/2000/svg",
1377    viewBox: "0 0 24 24"
1378  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
1379    d: "M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"
1380  }));
1381  /* harmony default export */ __webpack_exports__["a"] = (alignRight);
1382  
1383  
1384  /***/ }),
1385  
1386  /***/ 306:
1387  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1388  
1389  "use strict";
1390  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1391  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
1392  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
1393  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
1394  
1395  
1396  /**
1397   * WordPress dependencies
1398   */
1399  
1400  var search = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
1401    xmlns: "http://www.w3.org/2000/svg",
1402    viewBox: "0 0 24 24"
1403  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
1404    d: "M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"
1405  }));
1406  /* harmony default export */ __webpack_exports__["a"] = (search);
1407  
1408  
1409  /***/ }),
1410  
1411  /***/ 31:
1412  /***/ (function(module, exports) {
1413  
1414  (function() { module.exports = this["wp"]["url"]; }());
1415  
1416  /***/ }),
1417  
1418  /***/ 319:
1419  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1420  
1421  "use strict";
1422  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1423  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
1424  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
1425  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
1426  
1427  
1428  /**
1429   * WordPress dependencies
1430   */
1431  
1432  var media = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
1433    xmlns: "http://www.w3.org/2000/svg",
1434    viewBox: "0 0 24 24"
1435  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
1436    d: "M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"
1437  }));
1438  /* harmony default export */ __webpack_exports__["a"] = (media);
1439  
1440  
1441  /***/ }),
1442  
1443  /***/ 320:
1444  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1445  
1446  "use strict";
1447  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1448  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
1449  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
1450  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
1451  
1452  
1453  /**
1454   * WordPress dependencies
1455   */
1456  
1457  var code = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
1458    viewBox: "0 0 24 24",
1459    xmlns: "http://www.w3.org/2000/svg"
1460  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
1461    d: "M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"
1462  }));
1463  /* harmony default export */ __webpack_exports__["a"] = (code);
1464  
1465  
1466  /***/ }),
1467  
1468  /***/ 36:
1469  /***/ (function(module, exports) {
1470  
1471  (function() { module.exports = this["wp"]["deprecated"]; }());
1472  
1473  /***/ }),
1474  
1475  /***/ 37:
1476  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1477  
1478  "use strict";
1479  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
1480  function _iterableToArray(iter) {
1481    if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
1482  }
1483  
1484  /***/ }),
1485  
1486  /***/ 38:
1487  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1488  
1489  "use strict";
1490  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayWithHoles; });
1491  function _arrayWithHoles(arr) {
1492    if (Array.isArray(arr)) return arr;
1493  }
1494  
1495  /***/ }),
1496  
1497  /***/ 39:
1498  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1499  
1500  "use strict";
1501  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _nonIterableRest; });
1502  function _nonIterableRest() {
1503    throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1504  }
1505  
1506  /***/ }),
1507  
1508  /***/ 4:
1509  /***/ (function(module, exports) {
1510  
1511  (function() { module.exports = this["wp"]["data"]; }());
1512  
1513  /***/ }),
1514  
1515  /***/ 40:
1516  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1517  
1518  "use strict";
1519  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; });
1520  function _typeof(obj) {
1521    "@babel/helpers - typeof";
1522  
1523    if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
1524      _typeof = function _typeof(obj) {
1525        return typeof obj;
1526      };
1527    } else {
1528      _typeof = function _typeof(obj) {
1529        return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
1530      };
1531    }
1532  
1533    return _typeof(obj);
1534  }
1535  
1536  /***/ }),
1537  
1538  /***/ 41:
1539  /***/ (function(module, exports) {
1540  
1541  (function() { module.exports = this["wp"]["blob"]; }());
1542  
1543  /***/ }),
1544  
1545  /***/ 43:
1546  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1547  
1548  "use strict";
1549  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutPropertiesLoose; });
1550  function _objectWithoutPropertiesLoose(source, excluded) {
1551    if (source == null) return {};
1552    var target = {};
1553    var sourceKeys = Object.keys(source);
1554    var key, i;
1555  
1556    for (i = 0; i < sourceKeys.length; i++) {
1557      key = sourceKeys[i];
1558      if (excluded.indexOf(key) >= 0) continue;
1559      target[key] = source[key];
1560    }
1561  
1562    return target;
1563  }
1564  
1565  /***/ }),
1566  
1567  /***/ 44:
1568  /***/ (function(module, exports) {
1569  
1570  (function() { module.exports = this["moment"]; }());
1571  
1572  /***/ }),
1573  
1574  /***/ 45:
1575  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1576  
1577  "use strict";
1578  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _asyncToGenerator; });
1579  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
1580    try {
1581      var info = gen[key](arg);
1582      var value = info.value;
1583    } catch (error) {
1584      reject(error);
1585      return;
1586    }
1587  
1588    if (info.done) {
1589      resolve(value);
1590    } else {
1591      Promise.resolve(value).then(_next, _throw);
1592    }
1593  }
1594  
1595  function _asyncToGenerator(fn) {
1596    return function () {
1597      var self = this,
1598          args = arguments;
1599      return new Promise(function (resolve, reject) {
1600        var gen = fn.apply(self, args);
1601  
1602        function _next(value) {
1603          asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
1604        }
1605  
1606        function _throw(err) {
1607          asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
1608        }
1609  
1610        _next(undefined);
1611      });
1612    };
1613  }
1614  
1615  /***/ }),
1616  
1617  /***/ 454:
1618  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1619  
1620  "use strict";
1621  // ESM COMPAT FLAG
1622  __webpack_require__.r(__webpack_exports__);
1623  
1624  // EXPORTS
1625  __webpack_require__.d(__webpack_exports__, "__experimentalGetCoreBlocks", function() { return /* binding */ build_module_experimentalGetCoreBlocks; });
1626  __webpack_require__.d(__webpack_exports__, "registerCoreBlocks", function() { return /* binding */ build_module_registerCoreBlocks; });
1627  __webpack_require__.d(__webpack_exports__, "__experimentalRegisterExperimentalCoreBlocks", function() { return /* binding */ __experimentalRegisterExperimentalCoreBlocks; });
1628  
1629  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/paragraph/index.js
1630  var build_module_paragraph_namespaceObject = {};
1631  __webpack_require__.r(build_module_paragraph_namespaceObject);
1632  __webpack_require__.d(build_module_paragraph_namespaceObject, "metadata", function() { return paragraph_metadata; });
1633  __webpack_require__.d(build_module_paragraph_namespaceObject, "name", function() { return paragraph_name; });
1634  __webpack_require__.d(build_module_paragraph_namespaceObject, "settings", function() { return paragraph_settings; });
1635  
1636  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/image/index.js
1637  var build_module_image_namespaceObject = {};
1638  __webpack_require__.r(build_module_image_namespaceObject);
1639  __webpack_require__.d(build_module_image_namespaceObject, "metadata", function() { return image_metadata; });
1640  __webpack_require__.d(build_module_image_namespaceObject, "name", function() { return image_name; });
1641  __webpack_require__.d(build_module_image_namespaceObject, "settings", function() { return image_settings; });
1642  
1643  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/heading/index.js
1644  var build_module_heading_namespaceObject = {};
1645  __webpack_require__.r(build_module_heading_namespaceObject);
1646  __webpack_require__.d(build_module_heading_namespaceObject, "metadata", function() { return heading_metadata; });
1647  __webpack_require__.d(build_module_heading_namespaceObject, "name", function() { return heading_name; });
1648  __webpack_require__.d(build_module_heading_namespaceObject, "settings", function() { return heading_settings; });
1649  
1650  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/quote/index.js
1651  var build_module_quote_namespaceObject = {};
1652  __webpack_require__.r(build_module_quote_namespaceObject);
1653  __webpack_require__.d(build_module_quote_namespaceObject, "metadata", function() { return quote_metadata; });
1654  __webpack_require__.d(build_module_quote_namespaceObject, "name", function() { return quote_name; });
1655  __webpack_require__.d(build_module_quote_namespaceObject, "settings", function() { return quote_settings; });
1656  
1657  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/gallery/index.js
1658  var build_module_gallery_namespaceObject = {};
1659  __webpack_require__.r(build_module_gallery_namespaceObject);
1660  __webpack_require__.d(build_module_gallery_namespaceObject, "metadata", function() { return gallery_metadata; });
1661  __webpack_require__.d(build_module_gallery_namespaceObject, "name", function() { return gallery_name; });
1662  __webpack_require__.d(build_module_gallery_namespaceObject, "settings", function() { return gallery_settings; });
1663  
1664  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/archives/index.js
1665  var archives_namespaceObject = {};
1666  __webpack_require__.r(archives_namespaceObject);
1667  __webpack_require__.d(archives_namespaceObject, "metadata", function() { return archives_metadata; });
1668  __webpack_require__.d(archives_namespaceObject, "name", function() { return archives_name; });
1669  __webpack_require__.d(archives_namespaceObject, "settings", function() { return archives_settings; });
1670  
1671  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/audio/index.js
1672  var build_module_audio_namespaceObject = {};
1673  __webpack_require__.r(build_module_audio_namespaceObject);
1674  __webpack_require__.d(build_module_audio_namespaceObject, "metadata", function() { return audio_metadata; });
1675  __webpack_require__.d(build_module_audio_namespaceObject, "name", function() { return audio_name; });
1676  __webpack_require__.d(build_module_audio_namespaceObject, "settings", function() { return audio_settings; });
1677  
1678  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/button/index.js
1679  var build_module_button_namespaceObject = {};
1680  __webpack_require__.r(build_module_button_namespaceObject);
1681  __webpack_require__.d(build_module_button_namespaceObject, "metadata", function() { return button_metadata; });
1682  __webpack_require__.d(build_module_button_namespaceObject, "name", function() { return button_name; });
1683  __webpack_require__.d(build_module_button_namespaceObject, "settings", function() { return button_settings; });
1684  
1685  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/buttons/index.js
1686  var buttons_namespaceObject = {};
1687  __webpack_require__.r(buttons_namespaceObject);
1688  __webpack_require__.d(buttons_namespaceObject, "metadata", function() { return buttons_metadata; });
1689  __webpack_require__.d(buttons_namespaceObject, "name", function() { return buttons_name; });
1690  __webpack_require__.d(buttons_namespaceObject, "settings", function() { return buttons_settings; });
1691  
1692  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/calendar/index.js
1693  var build_module_calendar_namespaceObject = {};
1694  __webpack_require__.r(build_module_calendar_namespaceObject);
1695  __webpack_require__.d(build_module_calendar_namespaceObject, "metadata", function() { return calendar_metadata; });
1696  __webpack_require__.d(build_module_calendar_namespaceObject, "name", function() { return calendar_name; });
1697  __webpack_require__.d(build_module_calendar_namespaceObject, "settings", function() { return calendar_settings; });
1698  
1699  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/categories/index.js
1700  var categories_namespaceObject = {};
1701  __webpack_require__.r(categories_namespaceObject);
1702  __webpack_require__.d(categories_namespaceObject, "metadata", function() { return categories_metadata; });
1703  __webpack_require__.d(categories_namespaceObject, "name", function() { return categories_name; });
1704  __webpack_require__.d(categories_namespaceObject, "settings", function() { return categories_settings; });
1705  
1706  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/code/index.js
1707  var code_namespaceObject = {};
1708  __webpack_require__.r(code_namespaceObject);
1709  __webpack_require__.d(code_namespaceObject, "metadata", function() { return code_metadata; });
1710  __webpack_require__.d(code_namespaceObject, "name", function() { return code_name; });
1711  __webpack_require__.d(code_namespaceObject, "settings", function() { return code_settings; });
1712  
1713  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/columns/index.js
1714  var build_module_columns_namespaceObject = {};
1715  __webpack_require__.r(build_module_columns_namespaceObject);
1716  __webpack_require__.d(build_module_columns_namespaceObject, "metadata", function() { return columns_metadata; });
1717  __webpack_require__.d(build_module_columns_namespaceObject, "name", function() { return columns_name; });
1718  __webpack_require__.d(build_module_columns_namespaceObject, "settings", function() { return columns_settings; });
1719  
1720  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/column/index.js
1721  var build_module_column_namespaceObject = {};
1722  __webpack_require__.r(build_module_column_namespaceObject);
1723  __webpack_require__.d(build_module_column_namespaceObject, "metadata", function() { return column_metadata; });
1724  __webpack_require__.d(build_module_column_namespaceObject, "name", function() { return column_name; });
1725  __webpack_require__.d(build_module_column_namespaceObject, "settings", function() { return column_settings; });
1726  
1727  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/cover/index.js
1728  var build_module_cover_namespaceObject = {};
1729  __webpack_require__.r(build_module_cover_namespaceObject);
1730  __webpack_require__.d(build_module_cover_namespaceObject, "metadata", function() { return cover_metadata; });
1731  __webpack_require__.d(build_module_cover_namespaceObject, "name", function() { return cover_name; });
1732  __webpack_require__.d(build_module_cover_namespaceObject, "settings", function() { return cover_settings; });
1733  
1734  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/embed/index.js
1735  var embed_namespaceObject = {};
1736  __webpack_require__.r(embed_namespaceObject);
1737  __webpack_require__.d(embed_namespaceObject, "metadata", function() { return embed_metadata; });
1738  __webpack_require__.d(embed_namespaceObject, "name", function() { return embed_name; });
1739  __webpack_require__.d(embed_namespaceObject, "settings", function() { return embed_settings; });
1740  
1741  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/file/index.js
1742  var build_module_file_namespaceObject = {};
1743  __webpack_require__.r(build_module_file_namespaceObject);
1744  __webpack_require__.d(build_module_file_namespaceObject, "metadata", function() { return file_metadata; });
1745  __webpack_require__.d(build_module_file_namespaceObject, "name", function() { return file_name; });
1746  __webpack_require__.d(build_module_file_namespaceObject, "settings", function() { return file_settings; });
1747  
1748  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/html/index.js
1749  var build_module_html_namespaceObject = {};
1750  __webpack_require__.r(build_module_html_namespaceObject);
1751  __webpack_require__.d(build_module_html_namespaceObject, "metadata", function() { return html_metadata; });
1752  __webpack_require__.d(build_module_html_namespaceObject, "name", function() { return html_name; });
1753  __webpack_require__.d(build_module_html_namespaceObject, "settings", function() { return html_settings; });
1754  
1755  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/media-text/index.js
1756  var media_text_namespaceObject = {};
1757  __webpack_require__.r(media_text_namespaceObject);
1758  __webpack_require__.d(media_text_namespaceObject, "metadata", function() { return media_text_metadata; });
1759  __webpack_require__.d(media_text_namespaceObject, "name", function() { return media_text_name; });
1760  __webpack_require__.d(media_text_namespaceObject, "settings", function() { return media_text_settings; });
1761  
1762  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/latest-comments/index.js
1763  var latest_comments_namespaceObject = {};
1764  __webpack_require__.r(latest_comments_namespaceObject);
1765  __webpack_require__.d(latest_comments_namespaceObject, "metadata", function() { return latest_comments_metadata; });
1766  __webpack_require__.d(latest_comments_namespaceObject, "name", function() { return latest_comments_name; });
1767  __webpack_require__.d(latest_comments_namespaceObject, "settings", function() { return latest_comments_settings; });
1768  
1769  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/latest-posts/index.js
1770  var latest_posts_namespaceObject = {};
1771  __webpack_require__.r(latest_posts_namespaceObject);
1772  __webpack_require__.d(latest_posts_namespaceObject, "metadata", function() { return latest_posts_metadata; });
1773  __webpack_require__.d(latest_posts_namespaceObject, "name", function() { return latest_posts_name; });
1774  __webpack_require__.d(latest_posts_namespaceObject, "settings", function() { return latest_posts_settings; });
1775  
1776  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/list/index.js
1777  var build_module_list_namespaceObject = {};
1778  __webpack_require__.r(build_module_list_namespaceObject);
1779  __webpack_require__.d(build_module_list_namespaceObject, "metadata", function() { return list_metadata; });
1780  __webpack_require__.d(build_module_list_namespaceObject, "name", function() { return list_name; });
1781  __webpack_require__.d(build_module_list_namespaceObject, "settings", function() { return list_settings; });
1782  
1783  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/missing/index.js
1784  var missing_namespaceObject = {};
1785  __webpack_require__.r(missing_namespaceObject);
1786  __webpack_require__.d(missing_namespaceObject, "metadata", function() { return missing_metadata; });
1787  __webpack_require__.d(missing_namespaceObject, "name", function() { return missing_name; });
1788  __webpack_require__.d(missing_namespaceObject, "settings", function() { return missing_settings; });
1789  
1790  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/more/index.js
1791  var build_module_more_namespaceObject = {};
1792  __webpack_require__.r(build_module_more_namespaceObject);
1793  __webpack_require__.d(build_module_more_namespaceObject, "metadata", function() { return more_metadata; });
1794  __webpack_require__.d(build_module_more_namespaceObject, "name", function() { return more_name; });
1795  __webpack_require__.d(build_module_more_namespaceObject, "settings", function() { return more_settings; });
1796  
1797  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/nextpage/index.js
1798  var nextpage_namespaceObject = {};
1799  __webpack_require__.r(nextpage_namespaceObject);
1800  __webpack_require__.d(nextpage_namespaceObject, "metadata", function() { return nextpage_metadata; });
1801  __webpack_require__.d(nextpage_namespaceObject, "name", function() { return nextpage_name; });
1802  __webpack_require__.d(nextpage_namespaceObject, "settings", function() { return nextpage_settings; });
1803  
1804  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/preformatted/index.js
1805  var build_module_preformatted_namespaceObject = {};
1806  __webpack_require__.r(build_module_preformatted_namespaceObject);
1807  __webpack_require__.d(build_module_preformatted_namespaceObject, "metadata", function() { return preformatted_metadata; });
1808  __webpack_require__.d(build_module_preformatted_namespaceObject, "name", function() { return preformatted_name; });
1809  __webpack_require__.d(build_module_preformatted_namespaceObject, "settings", function() { return preformatted_settings; });
1810  
1811  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/pullquote/index.js
1812  var build_module_pullquote_namespaceObject = {};
1813  __webpack_require__.r(build_module_pullquote_namespaceObject);
1814  __webpack_require__.d(build_module_pullquote_namespaceObject, "metadata", function() { return pullquote_metadata; });
1815  __webpack_require__.d(build_module_pullquote_namespaceObject, "name", function() { return pullquote_name; });
1816  __webpack_require__.d(build_module_pullquote_namespaceObject, "settings", function() { return pullquote_settings; });
1817  
1818  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/block/index.js
1819  var block_namespaceObject = {};
1820  __webpack_require__.r(block_namespaceObject);
1821  __webpack_require__.d(block_namespaceObject, "metadata", function() { return block_metadata; });
1822  __webpack_require__.d(block_namespaceObject, "name", function() { return block_name; });
1823  __webpack_require__.d(block_namespaceObject, "settings", function() { return block_settings; });
1824  
1825  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/rss/index.js
1826  var build_module_rss_namespaceObject = {};
1827  __webpack_require__.r(build_module_rss_namespaceObject);
1828  __webpack_require__.d(build_module_rss_namespaceObject, "metadata", function() { return rss_metadata; });
1829  __webpack_require__.d(build_module_rss_namespaceObject, "name", function() { return rss_name; });
1830  __webpack_require__.d(build_module_rss_namespaceObject, "settings", function() { return rss_settings; });
1831  
1832  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/search/index.js
1833  var search_namespaceObject = {};
1834  __webpack_require__.r(search_namespaceObject);
1835  __webpack_require__.d(search_namespaceObject, "metadata", function() { return search_metadata; });
1836  __webpack_require__.d(search_namespaceObject, "name", function() { return search_name; });
1837  __webpack_require__.d(search_namespaceObject, "settings", function() { return search_settings; });
1838  
1839  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/group/index.js
1840  var build_module_group_namespaceObject = {};
1841  __webpack_require__.r(build_module_group_namespaceObject);
1842  __webpack_require__.d(build_module_group_namespaceObject, "metadata", function() { return group_metadata; });
1843  __webpack_require__.d(build_module_group_namespaceObject, "name", function() { return group_name; });
1844  __webpack_require__.d(build_module_group_namespaceObject, "settings", function() { return group_settings; });
1845  
1846  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/separator/index.js
1847  var build_module_separator_namespaceObject = {};
1848  __webpack_require__.r(build_module_separator_namespaceObject);
1849  __webpack_require__.d(build_module_separator_namespaceObject, "metadata", function() { return separator_metadata; });
1850  __webpack_require__.d(build_module_separator_namespaceObject, "name", function() { return separator_name; });
1851  __webpack_require__.d(build_module_separator_namespaceObject, "settings", function() { return build_module_separator_settings; });
1852  
1853  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/shortcode/index.js
1854  var build_module_shortcode_namespaceObject = {};
1855  __webpack_require__.r(build_module_shortcode_namespaceObject);
1856  __webpack_require__.d(build_module_shortcode_namespaceObject, "metadata", function() { return shortcode_metadata; });
1857  __webpack_require__.d(build_module_shortcode_namespaceObject, "name", function() { return shortcode_name; });
1858  __webpack_require__.d(build_module_shortcode_namespaceObject, "settings", function() { return shortcode_settings; });
1859  
1860  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/spacer/index.js
1861  var spacer_namespaceObject = {};
1862  __webpack_require__.r(spacer_namespaceObject);
1863  __webpack_require__.d(spacer_namespaceObject, "metadata", function() { return spacer_metadata; });
1864  __webpack_require__.d(spacer_namespaceObject, "name", function() { return spacer_name; });
1865  __webpack_require__.d(spacer_namespaceObject, "settings", function() { return spacer_settings; });
1866  
1867  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/subhead/index.js
1868  var subhead_namespaceObject = {};
1869  __webpack_require__.r(subhead_namespaceObject);
1870  __webpack_require__.d(subhead_namespaceObject, "metadata", function() { return subhead_metadata; });
1871  __webpack_require__.d(subhead_namespaceObject, "name", function() { return subhead_name; });
1872  __webpack_require__.d(subhead_namespaceObject, "settings", function() { return subhead_settings; });
1873  
1874  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/table/index.js
1875  var build_module_table_namespaceObject = {};
1876  __webpack_require__.r(build_module_table_namespaceObject);
1877  __webpack_require__.d(build_module_table_namespaceObject, "metadata", function() { return table_metadata; });
1878  __webpack_require__.d(build_module_table_namespaceObject, "name", function() { return table_name; });
1879  __webpack_require__.d(build_module_table_namespaceObject, "settings", function() { return table_settings; });
1880  
1881  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/text-columns/index.js
1882  var text_columns_namespaceObject = {};
1883  __webpack_require__.r(text_columns_namespaceObject);
1884  __webpack_require__.d(text_columns_namespaceObject, "metadata", function() { return text_columns_metadata; });
1885  __webpack_require__.d(text_columns_namespaceObject, "name", function() { return text_columns_name; });
1886  __webpack_require__.d(text_columns_namespaceObject, "settings", function() { return text_columns_settings; });
1887  
1888  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/verse/index.js
1889  var build_module_verse_namespaceObject = {};
1890  __webpack_require__.r(build_module_verse_namespaceObject);
1891  __webpack_require__.d(build_module_verse_namespaceObject, "metadata", function() { return verse_metadata; });
1892  __webpack_require__.d(build_module_verse_namespaceObject, "name", function() { return verse_name; });
1893  __webpack_require__.d(build_module_verse_namespaceObject, "settings", function() { return verse_settings; });
1894  
1895  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/video/index.js
1896  var build_module_video_namespaceObject = {};
1897  __webpack_require__.r(build_module_video_namespaceObject);
1898  __webpack_require__.d(build_module_video_namespaceObject, "metadata", function() { return video_metadata; });
1899  __webpack_require__.d(build_module_video_namespaceObject, "name", function() { return video_name; });
1900  __webpack_require__.d(build_module_video_namespaceObject, "settings", function() { return video_settings; });
1901  
1902  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/tag-cloud/index.js
1903  var tag_cloud_namespaceObject = {};
1904  __webpack_require__.r(tag_cloud_namespaceObject);
1905  __webpack_require__.d(tag_cloud_namespaceObject, "metadata", function() { return tag_cloud_metadata; });
1906  __webpack_require__.d(tag_cloud_namespaceObject, "name", function() { return tag_cloud_name; });
1907  __webpack_require__.d(tag_cloud_namespaceObject, "settings", function() { return tag_cloud_settings; });
1908  
1909  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/classic/index.js
1910  var build_module_classic_namespaceObject = {};
1911  __webpack_require__.r(build_module_classic_namespaceObject);
1912  __webpack_require__.d(build_module_classic_namespaceObject, "metadata", function() { return classic_metadata; });
1913  __webpack_require__.d(build_module_classic_namespaceObject, "name", function() { return classic_name; });
1914  __webpack_require__.d(build_module_classic_namespaceObject, "settings", function() { return classic_settings; });
1915  
1916  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/social-links/index.js
1917  var social_links_namespaceObject = {};
1918  __webpack_require__.r(social_links_namespaceObject);
1919  __webpack_require__.d(social_links_namespaceObject, "metadata", function() { return social_links_metadata; });
1920  __webpack_require__.d(social_links_namespaceObject, "name", function() { return social_links_name; });
1921  __webpack_require__.d(social_links_namespaceObject, "settings", function() { return social_links_settings; });
1922  
1923  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/social-link/index.js
1924  var social_link_namespaceObject = {};
1925  __webpack_require__.r(social_link_namespaceObject);
1926  __webpack_require__.d(social_link_namespaceObject, "metadata", function() { return social_link_metadata; });
1927  __webpack_require__.d(social_link_namespaceObject, "name", function() { return social_link_name; });
1928  __webpack_require__.d(social_link_namespaceObject, "settings", function() { return social_link_settings; });
1929  
1930  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
1931  var toConsumableArray = __webpack_require__(17);
1932  
1933  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
1934  var defineProperty = __webpack_require__(5);
1935  
1936  // EXTERNAL MODULE: external {"this":["wp","coreData"]}
1937  var external_this_wp_coreData_ = __webpack_require__(83);
1938  
1939  // EXTERNAL MODULE: external {"this":["wp","notices"]}
1940  var external_this_wp_notices_ = __webpack_require__(92);
1941  
1942  // EXTERNAL MODULE: external {"this":["wp","blockEditor"]}
1943  var external_this_wp_blockEditor_ = __webpack_require__(6);
1944  
1945  // EXTERNAL MODULE: external {"this":["wp","reusableBlocks"]}
1946  var external_this_wp_reusableBlocks_ = __webpack_require__(121);
1947  
1948  // EXTERNAL MODULE: external {"this":["wp","blocks"]}
1949  var external_this_wp_blocks_ = __webpack_require__(11);
1950  
1951  // EXTERNAL MODULE: external {"this":"lodash"}
1952  var external_this_lodash_ = __webpack_require__(2);
1953  
1954  // EXTERNAL MODULE: external {"this":["wp","i18n"]}
1955  var external_this_wp_i18n_ = __webpack_require__(1);
1956  
1957  // EXTERNAL MODULE: external {"this":["wp","element"]}
1958  var external_this_wp_element_ = __webpack_require__(0);
1959  
1960  // EXTERNAL MODULE: external {"this":["wp","primitives"]}
1961  var external_this_wp_primitives_ = __webpack_require__(7);
1962  
1963  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/paragraph.js
1964  
1965  
1966  /**
1967   * WordPress dependencies
1968   */
1969  
1970  var paragraph = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
1971    xmlns: "http://www.w3.org/2000/svg",
1972    viewBox: "0 0 24 24"
1973  }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
1974    d: "M18.3 4H9.9v-.1l-.9.2c-2.3.4-4 2.4-4 4.8s1.7 4.4 4 4.8l.7.1V20h1.5V5.5h2.9V20h1.5V5.5h2.7V4z"
1975  }));
1976  /* harmony default export */ var library_paragraph = (paragraph);
1977  
1978  // EXTERNAL MODULE: ./node_modules/classnames/index.js
1979  var classnames = __webpack_require__(9);
1980  var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
1981  
1982  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/deprecated.js
1983  
1984  
1985  
1986  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
1987  
1988  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
1989  
1990  /**
1991   * External dependencies
1992   */
1993  
1994  
1995  /**
1996   * WordPress dependencies
1997   */
1998  
1999  
2000  
2001  var supports = {
2002    className: false
2003  };
2004  var deprecated_blockAttributes = {
2005    align: {
2006      type: 'string'
2007    },
2008    content: {
2009      type: 'string',
2010      source: 'html',
2011      selector: 'p',
2012      default: ''
2013    },
2014    dropCap: {
2015      type: 'boolean',
2016      default: false
2017    },
2018    placeholder: {
2019      type: 'string'
2020    },
2021    textColor: {
2022      type: 'string'
2023    },
2024    backgroundColor: {
2025      type: 'string'
2026    },
2027    fontSize: {
2028      type: 'string'
2029    },
2030    direction: {
2031      type: 'string',
2032      enum: ['ltr', 'rtl']
2033    },
2034    style: {
2035      type: 'object'
2036    }
2037  };
2038  
2039  var deprecated_migrateCustomColorsAndFontSizes = function migrateCustomColorsAndFontSizes(attributes) {
2040    if (!attributes.customTextColor && !attributes.customBackgroundColor && !attributes.customFontSize) {
2041      return attributes;
2042    }
2043  
2044    var style = {};
2045  
2046    if (attributes.customTextColor || attributes.customBackgroundColor) {
2047      style.color = {};
2048    }
2049  
2050    if (attributes.customTextColor) {
2051      style.color.text = attributes.customTextColor;
2052    }
2053  
2054    if (attributes.customBackgroundColor) {
2055      style.color.background = attributes.customBackgroundColor;
2056    }
2057  
2058    if (attributes.customFontSize) {
2059      style.typography = {
2060        fontSize: attributes.customFontSize
2061      };
2062    }
2063  
2064    return _objectSpread(_objectSpread({}, Object(external_this_lodash_["omit"])(attributes, ['customTextColor', 'customBackgroundColor', 'customFontSize'])), {}, {
2065      style: style
2066    });
2067  };
2068  
2069  var deprecated = [{
2070    supports: supports,
2071    attributes: _objectSpread(_objectSpread({}, Object(external_this_lodash_["omit"])(deprecated_blockAttributes, ['style'])), {}, {
2072      customTextColor: {
2073        type: 'string'
2074      },
2075      customBackgroundColor: {
2076        type: 'string'
2077      },
2078      customFontSize: {
2079        type: 'number'
2080      }
2081    }),
2082    migrate: deprecated_migrateCustomColorsAndFontSizes,
2083    save: function save(_ref) {
2084      var _classnames;
2085  
2086      var attributes = _ref.attributes;
2087      var align = attributes.align,
2088          content = attributes.content,
2089          dropCap = attributes.dropCap,
2090          backgroundColor = attributes.backgroundColor,
2091          textColor = attributes.textColor,
2092          customBackgroundColor = attributes.customBackgroundColor,
2093          customTextColor = attributes.customTextColor,
2094          fontSize = attributes.fontSize,
2095          customFontSize = attributes.customFontSize,
2096          direction = attributes.direction;
2097      var textClass = Object(external_this_wp_blockEditor_["getColorClassName"])('color', textColor);
2098      var backgroundClass = Object(external_this_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor);
2099      var fontSizeClass = Object(external_this_wp_blockEditor_["getFontSizeClass"])(fontSize);
2100      var className = classnames_default()((_classnames = {
2101        'has-text-color': textColor || customTextColor,
2102        'has-background': backgroundColor || customBackgroundColor,
2103        'has-drop-cap': dropCap
2104      }, Object(defineProperty["a" /* default */])(_classnames, "has-text-align-".concat(align), align), Object(defineProperty["a" /* default */])(_classnames, fontSizeClass, fontSizeClass), Object(defineProperty["a" /* default */])(_classnames, textClass, textClass), Object(defineProperty["a" /* default */])(_classnames, backgroundClass, backgroundClass), _classnames));
2105      var styles = {
2106        backgroundColor: backgroundClass ? undefined : customBackgroundColor,
2107        color: textClass ? undefined : customTextColor,
2108        fontSize: fontSizeClass ? undefined : customFontSize
2109      };
2110      return Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
2111        tagName: "p",
2112        style: styles,
2113        className: className ? className : undefined,
2114        value: content,
2115        dir: direction
2116      });
2117    }
2118  }, {
2119    supports: supports,
2120    attributes: _objectSpread(_objectSpread({}, Object(external_this_lodash_["omit"])(deprecated_blockAttributes, ['style'])), {}, {
2121      customTextColor: {
2122        type: 'string'
2123      },
2124      customBackgroundColor: {
2125        type: 'string'
2126      },
2127      customFontSize: {
2128        type: 'number'
2129      }
2130    }),
2131    migrate: deprecated_migrateCustomColorsAndFontSizes,
2132    save: function save(_ref2) {
2133      var _classnames2;
2134  
2135      var attributes = _ref2.attributes;
2136      var align = attributes.align,
2137          content = attributes.content,
2138          dropCap = attributes.dropCap,
2139          backgroundColor = attributes.backgroundColor,
2140          textColor = attributes.textColor,
2141          customBackgroundColor = attributes.customBackgroundColor,
2142          customTextColor = attributes.customTextColor,
2143          fontSize = attributes.fontSize,
2144          customFontSize = attributes.customFontSize,
2145          direction = attributes.direction;
2146      var textClass = Object(external_this_wp_blockEditor_["getColorClassName"])('color', textColor);
2147      var backgroundClass = Object(external_this_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor);
2148      var fontSizeClass = Object(external_this_wp_blockEditor_["getFontSizeClass"])(fontSize);
2149      var className = classnames_default()((_classnames2 = {
2150        'has-text-color': textColor || customTextColor,
2151        'has-background': backgroundColor || customBackgroundColor,
2152        'has-drop-cap': dropCap
2153      }, Object(defineProperty["a" /* default */])(_classnames2, fontSizeClass, fontSizeClass), Object(defineProperty["a" /* default */])(_classnames2, textClass, textClass), Object(defineProperty["a" /* default */])(_classnames2, backgroundClass, backgroundClass), _classnames2));
2154      var styles = {
2155        backgroundColor: backgroundClass ? undefined : customBackgroundColor,
2156        color: textClass ? undefined : customTextColor,
2157        fontSize: fontSizeClass ? undefined : customFontSize,
2158        textAlign: align
2159      };
2160      return Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
2161        tagName: "p",
2162        style: styles,
2163        className: className ? className : undefined,
2164        value: content,
2165        dir: direction
2166      });
2167    }
2168  }, {
2169    supports: supports,
2170    attributes: _objectSpread(_objectSpread({}, Object(external_this_lodash_["omit"])(deprecated_blockAttributes, ['style'])), {}, {
2171      customTextColor: {
2172        type: 'string'
2173      },
2174      customBackgroundColor: {
2175        type: 'string'
2176      },
2177      customFontSize: {
2178        type: 'number'
2179      },
2180      width: {
2181        type: 'string'
2182      }
2183    }),
2184    migrate: deprecated_migrateCustomColorsAndFontSizes,
2185    save: function save(_ref3) {
2186      var _classnames3;
2187  
2188      var attributes = _ref3.attributes;
2189      var width = attributes.width,
2190          align = attributes.align,
2191          content = attributes.content,
2192          dropCap = attributes.dropCap,
2193          backgroundColor = attributes.backgroundColor,
2194          textColor = attributes.textColor,
2195          customBackgroundColor = attributes.customBackgroundColor,
2196          customTextColor = attributes.customTextColor,
2197          fontSize = attributes.fontSize,
2198          customFontSize = attributes.customFontSize;
2199      var textClass = Object(external_this_wp_blockEditor_["getColorClassName"])('color', textColor);
2200      var backgroundClass = Object(external_this_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor);
2201      var fontSizeClass = fontSize && "is-".concat(fontSize, "-text");
2202      var className = classnames_default()((_classnames3 = {}, Object(defineProperty["a" /* default */])(_classnames3, "align".concat(width), width), Object(defineProperty["a" /* default */])(_classnames3, 'has-background', backgroundColor || customBackgroundColor), Object(defineProperty["a" /* default */])(_classnames3, 'has-drop-cap', dropCap), Object(defineProperty["a" /* default */])(_classnames3, fontSizeClass, fontSizeClass), Object(defineProperty["a" /* default */])(_classnames3, textClass, textClass), Object(defineProperty["a" /* default */])(_classnames3, backgroundClass, backgroundClass), _classnames3));
2203      var styles = {
2204        backgroundColor: backgroundClass ? undefined : customBackgroundColor,
2205        color: textClass ? undefined : customTextColor,
2206        fontSize: fontSizeClass ? undefined : customFontSize,
2207        textAlign: align
2208      };
2209      return Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
2210        tagName: "p",
2211        style: styles,
2212        className: className ? className : undefined,
2213        value: content
2214      });
2215    }
2216  }, {
2217    supports: supports,
2218    attributes: Object(external_this_lodash_["omit"])(_objectSpread(_objectSpread({}, deprecated_blockAttributes), {}, {
2219      fontSize: {
2220        type: 'number'
2221      }
2222    }), ['style']),
2223    save: function save(_ref4) {
2224      var _classnames4;
2225  
2226      var attributes = _ref4.attributes;
2227      var width = attributes.width,
2228          align = attributes.align,
2229          content = attributes.content,
2230          dropCap = attributes.dropCap,
2231          backgroundColor = attributes.backgroundColor,
2232          textColor = attributes.textColor,
2233          fontSize = attributes.fontSize;
2234      var className = classnames_default()((_classnames4 = {}, Object(defineProperty["a" /* default */])(_classnames4, "align".concat(width), width), Object(defineProperty["a" /* default */])(_classnames4, 'has-background', backgroundColor), Object(defineProperty["a" /* default */])(_classnames4, 'has-drop-cap', dropCap), _classnames4));
2235      var styles = {
2236        backgroundColor: backgroundColor,
2237        color: textColor,
2238        fontSize: fontSize,
2239        textAlign: align
2240      };
2241      return Object(external_this_wp_element_["createElement"])("p", {
2242        style: styles,
2243        className: className ? className : undefined
2244      }, content);
2245    },
2246    migrate: function migrate(attributes) {
2247      return deprecated_migrateCustomColorsAndFontSizes(Object(external_this_lodash_["omit"])(_objectSpread(_objectSpread({}, attributes), {}, {
2248        customFontSize: Object(external_this_lodash_["isFinite"])(attributes.fontSize) ? attributes.fontSize : undefined,
2249        customTextColor: attributes.textColor && '#' === attributes.textColor[0] ? attributes.textColor : undefined,
2250        customBackgroundColor: attributes.backgroundColor && '#' === attributes.backgroundColor[0] ? attributes.backgroundColor : undefined
2251      })), ['fontSize', 'textColor', 'backgroundColor', 'style']);
2252    }
2253  }, {
2254    supports: supports,
2255    attributes: _objectSpread(_objectSpread({}, deprecated_blockAttributes), {}, {
2256      content: {
2257        type: 'string',
2258        source: 'html',
2259        default: ''
2260      }
2261    }),
2262    save: function save(_ref5) {
2263      var attributes = _ref5.attributes;
2264      return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["RawHTML"], null, attributes.content);
2265    },
2266    migrate: function migrate(attributes) {
2267      return attributes;
2268    }
2269  }];
2270  /* harmony default export */ var paragraph_deprecated = (deprecated);
2271  
2272  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
2273  var esm_extends = __webpack_require__(8);
2274  
2275  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
2276  var slicedToArray = __webpack_require__(12);
2277  
2278  // EXTERNAL MODULE: external {"this":["wp","components"]}
2279  var external_this_wp_components_ = __webpack_require__(3);
2280  
2281  // EXTERNAL MODULE: external {"this":["wp","data"]}
2282  var external_this_wp_data_ = __webpack_require__(4);
2283  
2284  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-ltr.js
2285  
2286  
2287  /**
2288   * WordPress dependencies
2289   */
2290  
2291  var formatLtr = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
2292    xmlns: "http://www.w3.org/2000/svg",
2293    viewBox: "-2 -2 24 24"
2294  }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
2295    d: "M5.52 2h7.43c.55 0 1 .45 1 1s-.45 1-1 1h-1v13c0 .55-.45 1-1 1s-1-.45-1-1V5c0-.55-.45-1-1-1s-1 .45-1 1v12c0 .55-.45 1-1 1s-1-.45-1-1v-5.96h-.43C3.02 11.04 1 9.02 1 6.52S3.02 2 5.52 2zM14 14l5-4-5-4v8z"
2296  }));
2297  /* harmony default export */ var format_ltr = (formatLtr);
2298  
2299  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/edit.js
2300  
2301  
2302  
2303  
2304  
2305  
2306  function edit_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
2307  
2308  function edit_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { edit_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { edit_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
2309  
2310  /**
2311   * External dependencies
2312   */
2313  
2314  /**
2315   * WordPress dependencies
2316   */
2317  
2318  
2319  
2320  
2321  
2322  
2323  
2324  
2325  
2326  function getComputedStyle(node, pseudo) {
2327    return node.ownerDocument.defaultView.getComputedStyle(node, pseudo);
2328  }
2329  
2330  var edit_name = 'core/paragraph';
2331  
2332  function ParagraphRTLToolbar(_ref) {
2333    var direction = _ref.direction,
2334        setDirection = _ref.setDirection;
2335    var isRTL = Object(external_this_wp_data_["useSelect"])(function (select) {
2336      return !!select('core/block-editor').getSettings().isRTL;
2337    }, []);
2338    return isRTL && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarGroup"], {
2339      controls: [{
2340        icon: format_ltr,
2341        title: Object(external_this_wp_i18n_["_x"])('Left to right', 'editor button'),
2342        isActive: direction === 'ltr',
2343        onClick: function onClick() {
2344          setDirection(direction === 'ltr' ? undefined : 'ltr');
2345        }
2346      }]
2347    });
2348  }
2349  
2350  function useDropCapMinHeight(ref, isDisabled, dependencies) {
2351    var _useState = Object(external_this_wp_element_["useState"])(),
2352        _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
2353        minHeight = _useState2[0],
2354        setMinHeight = _useState2[1];
2355  
2356    Object(external_this_wp_element_["useEffect"])(function () {
2357      if (isDisabled) {
2358        setMinHeight();
2359        return;
2360      }
2361  
2362      setMinHeight(getComputedStyle(ref.current, 'first-letter').lineHeight);
2363    }, [isDisabled].concat(Object(toConsumableArray["a" /* default */])(dependencies)));
2364    return minHeight;
2365  }
2366  
2367  function ParagraphBlock(_ref2) {
2368    var attributes = _ref2.attributes,
2369        mergeBlocks = _ref2.mergeBlocks,
2370        onReplace = _ref2.onReplace,
2371        onRemove = _ref2.onRemove,
2372        setAttributes = _ref2.setAttributes;
2373    var align = attributes.align,
2374        content = attributes.content,
2375        direction = attributes.direction,
2376        dropCap = attributes.dropCap,
2377        placeholder = attributes.placeholder,
2378        fontSize = attributes.fontSize,
2379        style = attributes.style;
2380    var isDropCapFeatureEnabled = Object(external_this_wp_blockEditor_["__experimentalUseEditorFeature"])('typography.dropCap');
2381    var ref = Object(external_this_wp_element_["useRef"])();
2382    var inlineFontSize = style === null || style === void 0 ? void 0 : style.fontSize;
2383    var size = Object(external_this_wp_data_["useSelect"])(function (select) {
2384      var _select$getSettings = select('core/block-editor').getSettings(),
2385          fontSizes = _select$getSettings.fontSizes;
2386  
2387      return Object(external_this_wp_blockEditor_["getFontSize"])(fontSizes, fontSize, inlineFontSize).size;
2388    }, [fontSize, inlineFontSize]);
2389    var hasDropCap = isDropCapFeatureEnabled && dropCap;
2390    var minHeight = useDropCapMinHeight(ref, !hasDropCap, [size]);
2391    var blockProps = Object(external_this_wp_blockEditor_["useBlockProps"])({
2392      ref: ref,
2393      className: classnames_default()(Object(defineProperty["a" /* default */])({
2394        'has-drop-cap': dropCap
2395      }, "has-text-align-".concat(align), align)),
2396      style: {
2397        direction: direction,
2398        minHeight: minHeight
2399      }
2400    });
2401    return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockControls"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["AlignmentToolbar"], {
2402      value: align,
2403      onChange: function onChange(newAlign) {
2404        return setAttributes({
2405          align: newAlign
2406        });
2407      }
2408    }), Object(external_this_wp_element_["createElement"])(ParagraphRTLToolbar, {
2409      direction: direction,
2410      setDirection: function setDirection(newDirection) {
2411        return setAttributes({
2412          direction: newDirection
2413        });
2414      }
2415    })), isDropCapFeatureEnabled && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["InspectorControls"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["PanelBody"], {
2416      title: Object(external_this_wp_i18n_["__"])('Text settings')
2417    }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToggleControl"], {
2418      label: Object(external_this_wp_i18n_["__"])('Drop cap'),
2419      checked: !!dropCap,
2420      onChange: function onChange() {
2421        return setAttributes({
2422          dropCap: !dropCap
2423        });
2424      },
2425      help: dropCap ? Object(external_this_wp_i18n_["__"])('Showing large initial letter.') : Object(external_this_wp_i18n_["__"])('Toggle to show a large initial letter.')
2426    }))), Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"], Object(esm_extends["a" /* default */])({
2427      identifier: "content",
2428      tagName: "p"
2429    }, blockProps, {
2430      value: content,
2431      onChange: function onChange(newContent) {
2432        return setAttributes({
2433          content: newContent
2434        });
2435      },
2436      onSplit: function onSplit(value) {
2437        if (!value) {
2438          return Object(external_this_wp_blocks_["createBlock"])(edit_name);
2439        }
2440  
2441        return Object(external_this_wp_blocks_["createBlock"])(edit_name, edit_objectSpread(edit_objectSpread({}, attributes), {}, {
2442          content: value
2443        }));
2444      },
2445      onMerge: mergeBlocks,
2446      onReplace: onReplace,
2447      onRemove: onRemove,
2448      "aria-label": content ? Object(external_this_wp_i18n_["__"])('Paragraph block') : Object(external_this_wp_i18n_["__"])('Empty block; start writing or type forward slash to choose a block'),
2449      placeholder: placeholder || Object(external_this_wp_i18n_["__"])('Start writing or type / to choose a block'),
2450      __unstableEmbedURLOnPaste: true,
2451      __unstableAllowPrefixTransformations: true
2452    })));
2453  }
2454  
2455  /* harmony default export */ var edit = (ParagraphBlock);
2456  
2457  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/save.js
2458  
2459  
2460  
2461  /**
2462   * External dependencies
2463   */
2464  
2465  /**
2466   * WordPress dependencies
2467   */
2468  
2469  
2470  function save_save(_ref) {
2471    var attributes = _ref.attributes;
2472    var align = attributes.align,
2473        content = attributes.content,
2474        dropCap = attributes.dropCap,
2475        direction = attributes.direction;
2476    var className = classnames_default()(Object(defineProperty["a" /* default */])({
2477      'has-drop-cap': dropCap
2478    }, "has-text-align-".concat(align), align));
2479    return Object(external_this_wp_element_["createElement"])("p", external_this_wp_blockEditor_["useBlockProps"].save({
2480      className: className,
2481      dir: direction
2482    }), Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
2483      value: content
2484    }));
2485  }
2486  
2487  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/transforms.js
2488  /**
2489   * WordPress dependencies
2490   */
2491  
2492  /**
2493   * Internal dependencies
2494   */
2495  
2496  var _apiVersion$name$cate = {
2497    apiVersion: 2,
2498    name: "core/paragraph",
2499    category: "text",
2500    attributes: {
2501      align: {
2502        type: "string"
2503      },
2504      content: {
2505        type: "string",
2506        source: "html",
2507        selector: "p",
2508        "default": ""
2509      },
2510      dropCap: {
2511        type: "boolean",
2512        "default": false
2513      },
2514      placeholder: {
2515        type: "string"
2516      },
2517      direction: {
2518        type: "string",
2519        "enum": ["ltr", "rtl"]
2520      }
2521    },
2522    supports: {
2523      anchor: true,
2524      className: false,
2525      color: {
2526        link: true
2527      },
2528      fontSize: true,
2529      lineHeight: true,
2530      __experimentalSelector: "p",
2531      __unstablePasteTextInline: true
2532    }
2533  },
2534      transforms_name = _apiVersion$name$cate.name;
2535  var transforms = {
2536    from: [{
2537      type: 'raw',
2538      // Paragraph is a fallback and should be matched last.
2539      priority: 20,
2540      selector: 'p',
2541      schema: function schema(_ref) {
2542        var phrasingContentSchema = _ref.phrasingContentSchema,
2543            isPaste = _ref.isPaste;
2544        return {
2545          p: {
2546            children: phrasingContentSchema,
2547            attributes: isPaste ? [] : ['style', 'id']
2548          }
2549        };
2550      },
2551      transform: function transform(node) {
2552        var attributes = Object(external_this_wp_blocks_["getBlockAttributes"])(transforms_name, node.outerHTML);
2553  
2554        var _ref2 = node.style || {},
2555            textAlign = _ref2.textAlign;
2556  
2557        if (textAlign === 'left' || textAlign === 'center' || textAlign === 'right') {
2558          attributes.align = textAlign;
2559        }
2560  
2561        return Object(external_this_wp_blocks_["createBlock"])(transforms_name, attributes);
2562      }
2563    }]
2564  };
2565  /* harmony default export */ var paragraph_transforms = (transforms);
2566  
2567  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/index.js
2568  /**
2569   * External dependencies
2570   */
2571  
2572  /**
2573   * WordPress dependencies
2574   */
2575  
2576  
2577  
2578  /**
2579   * Internal dependencies
2580   */
2581  
2582  
2583  
2584  var paragraph_metadata = {
2585    apiVersion: 2,
2586    name: "core/paragraph",
2587    category: "text",
2588    attributes: {
2589      align: {
2590        type: "string"
2591      },
2592      content: {
2593        type: "string",
2594        source: "html",
2595        selector: "p",
2596        "default": ""
2597      },
2598      dropCap: {
2599        type: "boolean",
2600        "default": false
2601      },
2602      placeholder: {
2603        type: "string"
2604      },
2605      direction: {
2606        type: "string",
2607        "enum": ["ltr", "rtl"]
2608      }
2609    },
2610    supports: {
2611      anchor: true,
2612      className: false,
2613      color: {
2614        link: true
2615      },
2616      fontSize: true,
2617      lineHeight: true,
2618      __experimentalSelector: "p",
2619      __unstablePasteTextInline: true
2620    }
2621  };
2622  
2623  
2624  var paragraph_name = paragraph_metadata.name;
2625  
2626  var paragraph_settings = {
2627    title: Object(external_this_wp_i18n_["__"])('Paragraph'),
2628    description: Object(external_this_wp_i18n_["__"])('Start with the building block of all narrative.'),
2629    icon: library_paragraph,
2630    keywords: [Object(external_this_wp_i18n_["__"])('text')],
2631    example: {
2632      attributes: {
2633        content: Object(external_this_wp_i18n_["__"])('In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.'),
2634        style: {
2635          typography: {
2636            fontSize: 28
2637          }
2638        },
2639        dropCap: true
2640      }
2641    },
2642    __experimentalLabel: function __experimentalLabel(attributes, _ref) {
2643      var context = _ref.context;
2644  
2645      if (context === 'accessibility') {
2646        var content = attributes.content;
2647        return Object(external_this_lodash_["isEmpty"])(content) ? Object(external_this_wp_i18n_["__"])('Empty') : content;
2648      }
2649    },
2650    transforms: paragraph_transforms,
2651    deprecated: paragraph_deprecated,
2652    merge: function merge(attributes, attributesToMerge) {
2653      return {
2654        content: (attributes.content || '') + (attributesToMerge.content || '')
2655      };
2656    },
2657    edit: edit,
2658    save: save_save
2659  };
2660  
2661  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/image.js
2662  
2663  
2664  /**
2665   * WordPress dependencies
2666   */
2667  
2668  var image_image = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
2669    viewBox: "0 0 24 24",
2670    xmlns: "http://www.w3.org/2000/svg"
2671  }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
2672    d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"
2673  }));
2674  /* harmony default export */ var library_image = (image_image);
2675  
2676  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/deprecated.js
2677  
2678  
2679  
2680  
2681  /**
2682   * External dependencies
2683   */
2684  
2685  /**
2686   * WordPress dependencies
2687   */
2688  
2689  
2690  var image_deprecated_blockAttributes = {
2691    align: {
2692      type: 'string'
2693    },
2694    url: {
2695      type: 'string',
2696      source: 'attribute',
2697      selector: 'img',
2698      attribute: 'src'
2699    },
2700    alt: {
2701      type: 'string',
2702      source: 'attribute',
2703      selector: 'img',
2704      attribute: 'alt',
2705      default: ''
2706    },
2707    caption: {
2708      type: 'string',
2709      source: 'html',
2710      selector: 'figcaption'
2711    },
2712    href: {
2713      type: 'string',
2714      source: 'attribute',
2715      selector: 'figure > a',
2716      attribute: 'href'
2717    },
2718    rel: {
2719      type: 'string',
2720      source: 'attribute',
2721      selector: 'figure > a',
2722      attribute: 'rel'
2723    },
2724    linkClass: {
2725      type: 'string',
2726      source: 'attribute',
2727      selector: 'figure > a',
2728      attribute: 'class'
2729    },
2730    id: {
2731      type: 'number'
2732    },
2733    width: {
2734      type: 'number'
2735    },
2736    height: {
2737      type: 'number'
2738    },
2739    linkDestination: {
2740      type: 'string'
2741    },
2742    linkTarget: {
2743      type: 'string',
2744      source: 'attribute',
2745      selector: 'figure > a',
2746      attribute: 'target'
2747    }
2748  };
2749  var deprecated_deprecated = [{
2750    attributes: image_deprecated_blockAttributes,
2751    save: function save(_ref) {
2752      var _classnames;
2753  
2754      var attributes = _ref.attributes;
2755      var url = attributes.url,
2756          alt = attributes.alt,
2757          caption = attributes.caption,
2758          align = attributes.align,
2759          href = attributes.href,
2760          width = attributes.width,
2761          height = attributes.height,
2762          id = attributes.id;
2763      var classes = classnames_default()((_classnames = {}, Object(defineProperty["a" /* default */])(_classnames, "align".concat(align), align), Object(defineProperty["a" /* default */])(_classnames, 'is-resized', width || height), _classnames));
2764      var image = Object(external_this_wp_element_["createElement"])("img", {
2765        src: url,
2766        alt: alt,
2767        className: id ? "wp-image-".concat(id) : null,
2768        width: width,
2769        height: height
2770      });
2771      return Object(external_this_wp_element_["createElement"])("figure", {
2772        className: classes
2773      }, href ? Object(external_this_wp_element_["createElement"])("a", {
2774        href: href
2775      }, image) : image, !external_this_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
2776        tagName: "figcaption",
2777        value: caption
2778      }));
2779    }
2780  }, {
2781    attributes: image_deprecated_blockAttributes,
2782    save: function save(_ref2) {
2783      var attributes = _ref2.attributes;
2784      var url = attributes.url,
2785          alt = attributes.alt,
2786          caption = attributes.caption,
2787          align = attributes.align,
2788          href = attributes.href,
2789          width = attributes.width,
2790          height = attributes.height,
2791          id = attributes.id;
2792      var image = Object(external_this_wp_element_["createElement"])("img", {
2793        src: url,
2794        alt: alt,
2795        className: id ? "wp-image-".concat(id) : null,
2796        width: width,
2797        height: height
2798      });
2799      return Object(external_this_wp_element_["createElement"])("figure", {
2800        className: align ? "align".concat(align) : null
2801      }, href ? Object(external_this_wp_element_["createElement"])("a", {
2802        href: href
2803      }, image) : image, !external_this_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
2804        tagName: "figcaption",
2805        value: caption
2806      }));
2807    }
2808  }, {
2809    attributes: image_deprecated_blockAttributes,
2810    save: function save(_ref3) {
2811      var attributes = _ref3.attributes;
2812      var url = attributes.url,
2813          alt = attributes.alt,
2814          caption = attributes.caption,
2815          align = attributes.align,
2816          href = attributes.href,
2817          width = attributes.width,
2818          height = attributes.height;
2819      var extraImageProps = width || height ? {
2820        width: width,
2821        height: height
2822      } : {};
2823      var image = Object(external_this_wp_element_["createElement"])("img", Object(esm_extends["a" /* default */])({
2824        src: url,
2825        alt: alt
2826      }, extraImageProps));
2827      var figureStyle = {};
2828  
2829      if (width) {
2830        figureStyle = {
2831          width: width
2832        };
2833      } else if (align === 'left' || align === 'right') {
2834        figureStyle = {
2835          maxWidth: '50%'
2836        };
2837      }
2838  
2839      return Object(external_this_wp_element_["createElement"])("figure", {
2840        className: align ? "align".concat(align) : null,
2841        style: figureStyle
2842      }, href ? Object(external_this_wp_element_["createElement"])("a", {
2843        href: href
2844      }, image) : image, !external_this_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
2845        tagName: "figcaption",
2846        value: caption
2847      }));
2848    }
2849  }];
2850  /* harmony default export */ var image_deprecated = (deprecated_deprecated);
2851  
2852  // EXTERNAL MODULE: external {"this":["wp","blob"]}
2853  var external_this_wp_blob_ = __webpack_require__(41);
2854  
2855  // EXTERNAL MODULE: external {"this":["wp","compose"]}
2856  var external_this_wp_compose_ = __webpack_require__(10);
2857  
2858  // EXTERNAL MODULE: external {"this":["wp","url"]}
2859  var external_this_wp_url_ = __webpack_require__(31);
2860  
2861  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/crop.js
2862  
2863  
2864  /**
2865   * WordPress dependencies
2866   */
2867  
2868  var crop_crop = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
2869    xmlns: "http://www.w3.org/2000/svg",
2870    viewBox: "0 0 24 24"
2871  }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
2872    d: "M17.5 7v8H19V7c0-1.1-.9-2-2-2H9v1.5h8c.3 0 .5.2.5.5zM7 17.5c-.3 0-.5-.2-.5-.5V1H5v4H1v1.5h4V17c0 1.1.9 2 2 2h10.5v4H19v-4h4v-1.5H7z"
2873  }));
2874  /* harmony default export */ var library_crop = (crop_crop);
2875  
2876  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/upload.js
2877  var upload = __webpack_require__(217);
2878  
2879  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/constants.js
2880  var ASPECT_RATIOS = [// Common video resolutions.
2881  {
2882    ratio: '2.33',
2883    className: 'wp-embed-aspect-21-9'
2884  }, {
2885    ratio: '2.00',
2886    className: 'wp-embed-aspect-18-9'
2887  }, {
2888    ratio: '1.78',
2889    className: 'wp-embed-aspect-16-9'
2890  }, {
2891    ratio: '1.33',
2892    className: 'wp-embed-aspect-4-3'
2893  }, // Vertical video and instagram square video support.
2894  {
2895    ratio: '1.00',
2896    className: 'wp-embed-aspect-1-1'
2897  }, {
2898    ratio: '0.56',
2899    className: 'wp-embed-aspect-9-16'
2900  }, {
2901    ratio: '0.50',
2902    className: 'wp-embed-aspect-1-2'
2903  }];
2904  var WP_EMBED_TYPE = 'wp-embed';
2905  
2906  // EXTERNAL MODULE: ./node_modules/classnames/dedupe.js
2907  var dedupe = __webpack_require__(117);
2908  var dedupe_default = /*#__PURE__*/__webpack_require__.n(dedupe);
2909  
2910  // EXTERNAL MODULE: ./node_modules/memize/index.js
2911  var memize = __webpack_require__(60);
2912  var memize_default = /*#__PURE__*/__webpack_require__.n(memize);
2913  
2914  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/util.js
2915  
2916  
2917  
2918  function util_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
2919  
2920  function util_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { util_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { util_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
2921  
2922  /**
2923   * Internal dependencies
2924   */
2925  
2926  /**
2927   * External dependencies
2928   */
2929  
2930  
2931  
2932  
2933  /**
2934   * WordPress dependencies
2935   */
2936  
2937  
2938  
2939  /**
2940   * Internal dependencies
2941   */
2942  
2943  var util_metadata = {
2944    apiVersion: 2,
2945    name: "core/embed",
2946    category: "embed",
2947    attributes: {
2948      url: {
2949        type: "string"
2950      },
2951      caption: {
2952        type: "string",
2953        source: "html",
2954        selector: "figcaption"
2955      },
2956      type: {
2957        type: "string"
2958      },
2959      providerNameSlug: {
2960        type: "string"
2961      },
2962      allowResponsive: {
2963        type: "boolean",
2964        "default": true
2965      },
2966      responsive: {
2967        type: "boolean",
2968        "default": false
2969      },
2970      previewable: {
2971        type: "boolean",
2972        "default": true
2973      }
2974    },
2975    supports: {
2976      align: true,
2977      reusable: false,
2978      html: false
2979    }
2980  };
2981  var DEFAULT_EMBED_BLOCK = util_metadata.name;
2982  /** @typedef {import('@wordpress/blocks').WPBlockVariation} WPBlockVariation */
2983  
2984  /**
2985   * Returns the embed block's information by matching the provided service provider
2986   *
2987   * @param {string} provider The embed block's provider
2988   * @return {WPBlockVariation} The embed block's information
2989   */
2990  
2991  var util_getEmbedInfoByProvider = function getEmbedInfoByProvider(provider) {
2992    var _getBlockVariations;
2993  
2994    return (_getBlockVariations = Object(external_this_wp_blocks_["getBlockVariations"])(DEFAULT_EMBED_BLOCK)) === null || _getBlockVariations === void 0 ? void 0 : _getBlockVariations.find(function (_ref) {
2995      var name = _ref.name;
2996      return name === provider;
2997    });
2998  };
2999  /**
3000   * Returns true if any of the regular expressions match the URL.
3001   *
3002   * @param {string}   url      The URL to test.
3003   * @param {Array}    patterns The list of regular expressions to test agains.
3004   * @return {boolean} True if any of the regular expressions match the URL.
3005   */
3006  
3007  var matchesPatterns = function matchesPatterns(url) {
3008    var patterns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
3009    return patterns.some(function (pattern) {
3010      return url.match(pattern);
3011    });
3012  };
3013  /**
3014   * Finds the block variation that should be used for the URL,
3015   * based on the provided URL and the variation's patterns.
3016   *
3017   * @param {string}  url The URL to test.
3018   * @return {WPBlockVariation} The block variation that should be used for this URL
3019   */
3020  
3021  var util_findMoreSuitableBlock = function findMoreSuitableBlock(url) {
3022    var _getBlockVariations2;
3023  
3024    return (_getBlockVariations2 = Object(external_this_wp_blocks_["getBlockVariations"])(DEFAULT_EMBED_BLOCK)) === null || _getBlockVariations2 === void 0 ? void 0 : _getBlockVariations2.find(function (_ref2) {
3025      var patterns = _ref2.patterns;
3026      return matchesPatterns(url, patterns);
3027    });
3028  };
3029  var isFromWordPress = function isFromWordPress(html) {
3030    return html && html.includes('class="wp-embedded-content"');
3031  };
3032  var util_getPhotoHtml = function getPhotoHtml(photo) {
3033    // 100% width for the preview so it fits nicely into the document, some "thumbnails" are
3034    // actually the full size photo. If thumbnails not found, use full image.
3035    var imageUrl = photo.thumbnail_url || photo.url;
3036    var photoPreview = Object(external_this_wp_element_["createElement"])("p", null, Object(external_this_wp_element_["createElement"])("img", {
3037      src: imageUrl,
3038      alt: photo.title,
3039      width: "100%"
3040    }));
3041    return Object(external_this_wp_element_["renderToString"])(photoPreview);
3042  };
3043  /**
3044   * Creates a more suitable embed block based on the passed in props
3045   * and attributes generated from an embed block's preview.
3046   *
3047   * We require `attributesFromPreview` to be generated from the latest attributes
3048   * and preview, and because of the way the react lifecycle operates, we can't
3049   * guarantee that the attributes contained in the block's props are the latest
3050   * versions, so we require that these are generated separately.
3051   * See `getAttributesFromPreview` in the generated embed edit component.
3052   *
3053   * @param {Object} props                  The block's props.
3054   * @param {Object} [attributesFromPreview]  Attributes generated from the block's most up to date preview.
3055   * @return {Object|undefined} A more suitable embed block if one exists.
3056   */
3057  
3058  var util_createUpgradedEmbedBlock = function createUpgradedEmbedBlock(props) {
3059    var _getBlockVariations3;
3060  
3061    var attributesFromPreview = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
3062    var preview = props.preview,
3063        _props$attributes = props.attributes;
3064    _props$attributes = _props$attributes === void 0 ? {} : _props$attributes;
3065    var url = _props$attributes.url,
3066        providerNameSlug = _props$attributes.providerNameSlug,
3067        type = _props$attributes.type;
3068    if (!url || !Object(external_this_wp_blocks_["getBlockType"])(DEFAULT_EMBED_BLOCK)) return;
3069    var matchedBlock = util_findMoreSuitableBlock(url); // WordPress blocks can work on multiple sites, and so don't have patterns,
3070    // so if we're in a WordPress block, assume the user has chosen it for a WordPress URL.
3071  
3072    var isCurrentBlockWP = providerNameSlug === 'wordpress' || type === WP_EMBED_TYPE; // if current block is not WordPress and a more suitable block found
3073    // that is different from the current one, create the new matched block
3074  
3075    var shouldCreateNewBlock = !isCurrentBlockWP && matchedBlock && (matchedBlock.attributes.providerNameSlug !== providerNameSlug || !providerNameSlug);
3076  
3077    if (shouldCreateNewBlock) {
3078      return Object(external_this_wp_blocks_["createBlock"])(DEFAULT_EMBED_BLOCK, util_objectSpread({
3079        url: url
3080      }, matchedBlock.attributes));
3081    }
3082  
3083    var wpVariation = (_getBlockVariations3 = Object(external_this_wp_blocks_["getBlockVariations"])(DEFAULT_EMBED_BLOCK)) === null || _getBlockVariations3 === void 0 ? void 0 : _getBlockVariations3.find(function (_ref3) {
3084      var name = _ref3.name;
3085      return name === 'wordpress';
3086    }); // We can't match the URL for WordPress embeds, we have to check the HTML instead.
3087  
3088    if (!wpVariation || !preview || !isFromWordPress(preview.html) || isCurrentBlockWP) {
3089      return;
3090    } // This is not the WordPress embed block so transform it into one.
3091  
3092  
3093    return Object(external_this_wp_blocks_["createBlock"])(DEFAULT_EMBED_BLOCK, util_objectSpread(util_objectSpread({
3094      url: url
3095    }, wpVariation.attributes), attributesFromPreview));
3096  };
3097  /**
3098   * Removes all previously set aspect ratio related classes and return the rest
3099   * existing class names.
3100   *
3101   * @param {string} existingClassNames Any existing class names.
3102   * @return {string} The class names without any aspect ratio related class.
3103   */
3104  
3105  var util_removeAspectRatioClasses = function removeAspectRatioClasses(existingClassNames) {
3106    var aspectRatioClassNames = ASPECT_RATIOS.reduce(function (accumulator, _ref4) {
3107      var className = _ref4.className;
3108      accumulator[className] = false;
3109      return accumulator;
3110    }, {
3111      'wp-has-aspect-ratio': false
3112    });
3113    return dedupe_default()(existingClassNames, aspectRatioClassNames);
3114  };
3115  /**
3116   * Returns class names with any relevant responsive aspect ratio names.
3117   *
3118   * @param {string}  html               The preview HTML that possibly contains an iframe with width and height set.
3119   * @param {string}  existingClassNames Any existing class names.
3120   * @param {boolean} allowResponsive    If the responsive class names should be added, or removed.
3121   * @return {string} Deduped class names.
3122   */
3123  
3124  function getClassNames(html) {
3125    var existingClassNames = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
3126    var allowResponsive = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
3127  
3128    if (!allowResponsive) {
3129      return util_removeAspectRatioClasses(existingClassNames);
3130    }
3131  
3132    var previewDocument = document.implementation.createHTMLDocument('');
3133    previewDocument.body.innerHTML = html;
3134    var iframe = previewDocument.body.querySelector('iframe'); // If we have a fixed aspect iframe, and it's a responsive embed block.
3135  
3136    if (iframe && iframe.height && iframe.width) {
3137      var aspectRatio = (iframe.width / iframe.height).toFixed(2); // Given the actual aspect ratio, find the widest ratio to support it.
3138  
3139      for (var ratioIndex = 0; ratioIndex < ASPECT_RATIOS.length; ratioIndex++) {
3140        var potentialRatio = ASPECT_RATIOS[ratioIndex];
3141  
3142        if (aspectRatio >= potentialRatio.ratio) {
3143          return dedupe_default()(util_removeAspectRatioClasses(existingClassNames), potentialRatio.className, 'wp-has-aspect-ratio');
3144        }
3145      }
3146    }
3147  
3148    return existingClassNames;
3149  }
3150  /**
3151   * Fallback behaviour for unembeddable URLs.
3152   * Creates a paragraph block containing a link to the URL, and calls `onReplace`.
3153   *
3154   * @param {string}   url       The URL that could not be embedded.
3155   * @param {Function} onReplace Function to call with the created fallback block.
3156   */
3157  
3158  function util_fallback(url, onReplace) {
3159    var link = Object(external_this_wp_element_["createElement"])("a", {
3160      href: url
3161    }, url);
3162    onReplace(Object(external_this_wp_blocks_["createBlock"])('core/paragraph', {
3163      content: Object(external_this_wp_element_["renderToString"])(link)
3164    }));
3165  }
3166  /***
3167   * Gets block attributes based on the preview and responsive state.
3168   *
3169   * @param {Object} preview The preview data.
3170   * @param {string} title The block's title, e.g. Twitter.
3171   * @param {Object} currentClassNames The block's current class names.
3172   * @param {boolean} isResponsive Boolean indicating if the block supports responsive content.
3173   * @param {boolean} allowResponsive Apply responsive classes to fixed size content.
3174   * @return {Object} Attributes and values.
3175   */
3176  
3177  var getAttributesFromPreview = memize_default()(function (preview, title, currentClassNames, isResponsive) {
3178    var allowResponsive = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
3179  
3180    if (!preview) {
3181      return {};
3182    }
3183  
3184    var attributes = {}; // Some plugins only return HTML with no type info, so default this to 'rich'.
3185  
3186    var _preview$type = preview.type,
3187        type = _preview$type === void 0 ? 'rich' : _preview$type; // If we got a provider name from the API, use it for the slug, otherwise we use the title,
3188    // because not all embed code gives us a provider name.
3189  
3190    var html = preview.html,
3191        providerName = preview.provider_name;
3192    var providerNameSlug = Object(external_this_lodash_["kebabCase"])((providerName || title).toLowerCase());
3193  
3194    if (isFromWordPress(html)) {
3195      type = WP_EMBED_TYPE;
3196    }
3197  
3198    if (html || 'photo' === type) {
3199      attributes.type = type;
3200      attributes.providerNameSlug = providerNameSlug;
3201    }
3202  
3203    attributes.className = getClassNames(html, currentClassNames, isResponsive && allowResponsive);
3204    return attributes;
3205  });
3206  
3207  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/use-client-width.js
3208  
3209  
3210  /**
3211   * WordPress dependencies
3212   */
3213  
3214  function useClientWidth(ref, dependencies) {
3215    var _useState = Object(external_this_wp_element_["useState"])(),
3216        _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
3217        clientWidth = _useState2[0],
3218        setClientWidth = _useState2[1];
3219  
3220    function calculateClientWidth() {
3221      setClientWidth(ref.current.clientWidth);
3222    }
3223  
3224    Object(external_this_wp_element_["useEffect"])(calculateClientWidth, dependencies);
3225    Object(external_this_wp_element_["useEffect"])(function () {
3226      var defaultView = ref.current.ownerDocument.defaultView;
3227      defaultView.addEventListener('resize', calculateClientWidth);
3228      return function () {
3229        defaultView.removeEventListener('resize', calculateClientWidth);
3230      };
3231    }, []);
3232    return clientWidth;
3233  }
3234  
3235  // CONCATENATED MODULE: ./node_modules/react-easy-crop/node_modules/tslib/tslib.es6.js
3236  /*! *****************************************************************************

3237  Copyright (c) Microsoft Corporation.

3238  

3239  Permission to use, copy, modify, and/or distribute this software for any

3240  purpose with or without fee is hereby granted.

3241  

3242  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH

3243  REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY

3244  AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,

3245  INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM

3246  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR

3247  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR

3248  PERFORMANCE OF THIS SOFTWARE.

3249  ***************************************************************************** */
3250  /* global Reflect, Promise */

3251  
3252  var extendStatics = function(d, b) {
3253      extendStatics = Object.setPrototypeOf ||
3254          ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
3255          function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
3256      return extendStatics(d, b);
3257  };
3258  
3259  function __extends(d, b) {
3260      extendStatics(d, b);
3261      function __() { this.constructor = d; }
3262      d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3263  }
3264  
3265  var __assign = function() {
3266      __assign = Object.assign || function __assign(t) {
3267          for (var s, i = 1, n = arguments.length; i < n; i++) {
3268              s = arguments[i];
3269              for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
3270          }
3271          return t;
3272      }
3273      return __assign.apply(this, arguments);
3274  }
3275  
3276  function __rest(s, e) {
3277      var t = {};
3278      for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
3279          t[p] = s[p];
3280      if (s != null && typeof Object.getOwnPropertySymbols === "function")
3281          for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
3282              if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
3283                  t[p[i]] = s[p[i]];
3284          }
3285      return t;
3286  }
3287  
3288  function __decorate(decorators, target, key, desc) {
3289      var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3290      if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
3291      else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
3292      return c > 3 && r && Object.defineProperty(target, key, r), r;
3293  }
3294  
3295  function __param(paramIndex, decorator) {
3296      return function (target, key) { decorator(target, key, paramIndex); }
3297  }
3298  
3299  function __metadata(metadataKey, metadataValue) {
3300      if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
3301  }
3302  
3303  function __awaiter(thisArg, _arguments, P, generator) {
3304      function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3305      return new (P || (P = Promise))(function (resolve, reject) {
3306          function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
3307          function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
3308          function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
3309          step((generator = generator.apply(thisArg, _arguments || [])).next());
3310      });
3311  }
3312  
3313  function __generator(thisArg, body) {
3314      var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
3315      return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
3316      function verb(n) { return function (v) { return step([n, v]); }; }
3317      function step(op) {
3318          if (f) throw new TypeError("Generator is already executing.");
3319          while (_) try {
3320              if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
3321              if (y = 0, t) op = [op[0] & 2, t.value];
3322              switch (op[0]) {
3323                  case 0: case 1: t = op; break;
3324                  case 4: _.label++; return { value: op[1], done: false };
3325                  case 5: _.label++; y = op[1]; op = [0]; continue;
3326                  case 7: op = _.ops.pop(); _.trys.pop(); continue;
3327                  default:
3328                      if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
3329                      if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
3330                      if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
3331                      if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
3332                      if (t[2]) _.ops.pop();
3333                      _.trys.pop(); continue;
3334              }
3335              op = body.call(thisArg, _);
3336          } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
3337          if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
3338      }
3339  }
3340  
3341  var __createBinding = Object.create ? (function(o, m, k, k2) {
3342      if (k2 === undefined) k2 = k;
3343      Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
3344  }) : (function(o, m, k, k2) {
3345      if (k2 === undefined) k2 = k;
3346      o[k2] = m[k];
3347  });
3348  
3349  function __exportStar(m, o) {
3350      for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
3351  }
3352  
3353  function __values(o) {
3354      var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
3355      if (m) return m.call(o);
3356      if (o && typeof o.length === "number") return {
3357          next: function () {
3358              if (o && i >= o.length) o = void 0;
3359              return { value: o && o[i++], done: !o };
3360          }
3361      };
3362      throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
3363  }
3364  
3365  function __read(o, n) {
3366      var m = typeof Symbol === "function" && o[Symbol.iterator];
3367      if (!m) return o;
3368      var i = m.call(o), r, ar = [], e;
3369      try {
3370          while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
3371      }
3372      catch (error) { e = { error: error }; }
3373      finally {
3374          try {
3375              if (r && !r.done && (m = i["return"])) m.call(i);
3376          }
3377          finally { if (e) throw e.error; }
3378      }
3379      return ar;
3380  }
3381  
3382  function __spread() {
3383      for (var ar = [], i = 0; i < arguments.length; i++)
3384          ar = ar.concat(__read(arguments[i]));
3385      return ar;
3386  }
3387  
3388  function __spreadArrays() {
3389      for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
3390      for (var r = Array(s), k = 0, i = 0; i < il; i++)
3391          for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
3392              r[k] = a[j];
3393      return r;
3394  };
3395  
3396  function __await(v) {
3397      return this instanceof __await ? (this.v = v, this) : new __await(v);
3398  }
3399  
3400  function __asyncGenerator(thisArg, _arguments, generator) {
3401      if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
3402      var g = generator.apply(thisArg, _arguments || []), i, q = [];
3403      return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
3404      function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
3405      function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
3406      function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
3407      function fulfill(value) { resume("next", value); }
3408      function reject(value) { resume("throw", value); }
3409      function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
3410  }
3411  
3412  function __asyncDelegator(o) {
3413      var i, p;
3414      return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
3415      function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
3416  }
3417  
3418  function __asyncValues(o) {
3419      if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
3420      var m = o[Symbol.asyncIterator], i;
3421      return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
3422      function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
3423      function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
3424  }
3425  
3426  function __makeTemplateObject(cooked, raw) {
3427      if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3428      return cooked;
3429  };
3430  
3431  var __setModuleDefault = Object.create ? (function(o, v) {
3432      Object.defineProperty(o, "default", { enumerable: true, value: v });
3433  }) : function(o, v) {
3434      o["default"] = v;
3435  };
3436  
3437  function __importStar(mod) {
3438      if (mod && mod.__esModule) return mod;
3439      var result = {};
3440      if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
3441      __setModuleDefault(result, mod);
3442      return result;
3443  }
3444  
3445  function __importDefault(mod) {
3446      return (mod && mod.__esModule) ? mod : { default: mod };
3447  }
3448  
3449  function __classPrivateFieldGet(receiver, privateMap) {
3450      if (!privateMap.has(receiver)) {
3451          throw new TypeError("attempted to get private field on non-instance");
3452      }
3453      return privateMap.get(receiver);
3454  }
3455  
3456  function __classPrivateFieldSet(receiver, privateMap, value) {
3457      if (!privateMap.has(receiver)) {
3458          throw new TypeError("attempted to set private field on non-instance");
3459      }
3460      privateMap.set(receiver, value);
3461      return value;
3462  }
3463  
3464  // EXTERNAL MODULE: external {"this":"React"}
3465  var external_this_React_ = __webpack_require__(13);
3466  var external_this_React_default = /*#__PURE__*/__webpack_require__.n(external_this_React_);
3467  
3468  // CONCATENATED MODULE: ./node_modules/react-easy-crop/index.module.js
3469  
3470  
3471  
3472  /**

3473   * Compute the dimension of the crop area based on media size,

3474   * aspect ratio and optionally rotation

3475   */
3476  
3477  function getCropSize(mediaWidth, mediaHeight, containerWidth, containerHeight, aspect, rotation) {
3478    if (rotation === void 0) {
3479      rotation = 0;
3480    }
3481  
3482    var _a = translateSize(mediaWidth, mediaHeight, rotation),
3483        width = _a.width,
3484        height = _a.height;
3485  
3486    var fittingWidth = Math.min(width, containerWidth);
3487    var fittingHeight = Math.min(height, containerHeight);
3488  
3489    if (fittingWidth > fittingHeight * aspect) {
3490      return {
3491        width: fittingHeight * aspect,
3492        height: fittingHeight
3493      };
3494    }
3495  
3496    return {
3497      width: fittingWidth,
3498      height: fittingWidth / aspect
3499    };
3500  }
3501  /**

3502   * Ensure a new media position stays in the crop area.

3503   */
3504  
3505  function index_module_restrictPosition(position, mediaSize, cropSize, zoom, rotation) {
3506    if (rotation === void 0) {
3507      rotation = 0;
3508    }
3509  
3510    var _a = translateSize(mediaSize.width, mediaSize.height, rotation),
3511        width = _a.width,
3512        height = _a.height;
3513  
3514    return {
3515      x: restrictPositionCoord(position.x, width, cropSize.width, zoom),
3516      y: restrictPositionCoord(position.y, height, cropSize.height, zoom)
3517    };
3518  }
3519  
3520  function restrictPositionCoord(position, mediaSize, cropSize, zoom) {
3521    var maxPosition = mediaSize * zoom / 2 - cropSize / 2;
3522    return Math.min(maxPosition, Math.max(position, -maxPosition));
3523  }
3524  
3525  function getDistanceBetweenPoints(pointA, pointB) {
3526    return Math.sqrt(Math.pow(pointA.y - pointB.y, 2) + Math.pow(pointA.x - pointB.x, 2));
3527  }
3528  function getRotationBetweenPoints(pointA, pointB) {
3529    return Math.atan2(pointB.y - pointA.y, pointB.x - pointA.x) * 180 / Math.PI;
3530  }
3531  /**

3532   * Compute the output cropped area of the media in percentages and pixels.

3533   * x/y are the top-left coordinates on the src media

3534   */
3535  
3536  function computeCroppedArea(crop, mediaSize, cropSize, aspect, zoom, rotation, restrictPosition) {
3537    if (rotation === void 0) {
3538      rotation = 0;
3539    }
3540  
3541    if (restrictPosition === void 0) {
3542      restrictPosition = true;
3543    } // if the media is rotated by the user, we cannot limit the position anymore
3544    // as it might need to be negative.
3545  
3546  
3547    var limitAreaFn = restrictPosition && rotation === 0 ? limitArea : noOp;
3548    var croppedAreaPercentages = {
3549      x: limitAreaFn(100, ((mediaSize.width - cropSize.width / zoom) / 2 - crop.x / zoom) / mediaSize.width * 100),
3550      y: limitAreaFn(100, ((mediaSize.height - cropSize.height / zoom) / 2 - crop.y / zoom) / mediaSize.height * 100),
3551      width: limitAreaFn(100, cropSize.width / mediaSize.width * 100 / zoom),
3552      height: limitAreaFn(100, cropSize.height / mediaSize.height * 100 / zoom)
3553    }; // we compute the pixels size naively
3554  
3555    var widthInPixels = Math.round(limitAreaFn(mediaSize.naturalWidth, croppedAreaPercentages.width * mediaSize.naturalWidth / 100));
3556    var heightInPixels = Math.round(limitAreaFn(mediaSize.naturalHeight, croppedAreaPercentages.height * mediaSize.naturalHeight / 100));
3557    var isImgWiderThanHigh = mediaSize.naturalWidth >= mediaSize.naturalHeight * aspect; // then we ensure the width and height exactly match the aspect (to avoid rounding approximations)
3558    // if the media is wider than high, when zoom is 0, the crop height will be equals to iamge height
3559    // thus we want to compute the width from the height and aspect for accuracy.
3560    // Otherwise, we compute the height from width and aspect.
3561  
3562    var sizePixels = isImgWiderThanHigh ? {
3563      width: Math.round(heightInPixels * aspect),
3564      height: heightInPixels
3565    } : {
3566      width: widthInPixels,
3567      height: Math.round(widthInPixels / aspect)
3568    };
3569  
3570    var croppedAreaPixels = __assign(__assign({}, sizePixels), {
3571      x: Math.round(limitAreaFn(mediaSize.naturalWidth - sizePixels.width, croppedAreaPercentages.x * mediaSize.naturalWidth / 100)),
3572      y: Math.round(limitAreaFn(mediaSize.naturalHeight - sizePixels.height, croppedAreaPercentages.y * mediaSize.naturalHeight / 100))
3573    });
3574  
3575    return {
3576      croppedAreaPercentages: croppedAreaPercentages,
3577      croppedAreaPixels: croppedAreaPixels
3578    };
3579  }
3580  /**

3581   * Ensure the returned value is between 0 and max

3582   */
3583  
3584  function limitArea(max, value) {
3585    return Math.min(max, Math.max(0, value));
3586  }
3587  
3588  function noOp(_max, value) {
3589    return value;
3590  }
3591  /**

3592   * Compute the crop and zoom from the croppedAreaPixels

3593   */
3594  
3595  
3596  function getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize) {
3597    var mediaZoom = mediaSize.width / mediaSize.naturalWidth;
3598  
3599    if (cropSize) {
3600      var isHeightMaxSize_1 = cropSize.height > cropSize.width;
3601      return isHeightMaxSize_1 ? cropSize.height / mediaZoom / croppedAreaPixels.height : cropSize.width / mediaZoom / croppedAreaPixels.width;
3602    }
3603  
3604    var aspect = croppedAreaPixels.width / croppedAreaPixels.height;
3605    var isHeightMaxSize = mediaSize.naturalWidth >= mediaSize.naturalHeight * aspect;
3606    return isHeightMaxSize ? mediaSize.naturalHeight / croppedAreaPixels.height : mediaSize.naturalWidth / croppedAreaPixels.width;
3607  }
3608  /**

3609   * Compute the crop and zoom from the croppedAreaPixels

3610   */
3611  
3612  
3613  function getInitialCropFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize) {
3614    var mediaZoom = mediaSize.width / mediaSize.naturalWidth;
3615    var zoom = getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize);
3616    var cropZoom = mediaZoom * zoom;
3617    var crop = {
3618      x: ((mediaSize.naturalWidth - croppedAreaPixels.width) / 2 - croppedAreaPixels.x) * cropZoom,
3619      y: ((mediaSize.naturalHeight - croppedAreaPixels.height) / 2 - croppedAreaPixels.y) * cropZoom
3620    };
3621    return {
3622      crop: crop,
3623      zoom: zoom
3624    };
3625  }
3626  /**

3627   * Return the point that is the center of point a and b

3628   */
3629  
3630  function getCenter(a, b) {
3631    return {
3632      x: (b.x + a.x) / 2,
3633      y: (b.y + a.y) / 2
3634    };
3635  }
3636  /**

3637   *

3638   * Returns an x,y point once rotated around xMid,yMid

3639   */
3640  
3641  function rotateAroundMidPoint(x, y, xMid, yMid, degrees) {
3642    var cos = Math.cos;
3643    var sin = Math.sin;
3644    var radian = degrees * Math.PI / 180; // Convert to radians
3645    // Subtract midpoints, so that midpoint is translated to origin
3646    // and add it in the end again
3647  
3648    var xr = (x - xMid) * cos(radian) - (y - yMid) * sin(radian) + xMid;
3649    var yr = (x - xMid) * sin(radian) + (y - yMid) * cos(radian) + yMid;
3650    return [xr, yr];
3651  }
3652  /**

3653   * Returns the new bounding area of a rotated rectangle.

3654   */
3655  
3656  function translateSize(width, height, rotation) {
3657    var centerX = width / 2;
3658    var centerY = height / 2;
3659    var outerBounds = [rotateAroundMidPoint(0, 0, centerX, centerY, rotation), rotateAroundMidPoint(width, 0, centerX, centerY, rotation), rotateAroundMidPoint(width, height, centerX, centerY, rotation), rotateAroundMidPoint(0, height, centerX, centerY, rotation)];
3660    var minX = Math.min.apply(Math, outerBounds.map(function (p) {
3661      return p[0];
3662    }));
3663    var maxX = Math.max.apply(Math, outerBounds.map(function (p) {
3664      return p[0];
3665    }));
3666    var minY = Math.min.apply(Math, outerBounds.map(function (p) {
3667      return p[1];
3668    }));
3669    var maxY = Math.max.apply(Math, outerBounds.map(function (p) {
3670      return p[1];
3671    }));
3672    return {
3673      width: maxX - minX,
3674      height: maxY - minY
3675    };
3676  }
3677  /**

3678   * Combine multiple class names into a single string.

3679   */
3680  
3681  function index_module_classNames() {
3682    var args = [];
3683  
3684    for (var _i = 0; _i < arguments.length; _i++) {
3685      args[_i] = arguments[_i];
3686    }
3687  
3688    return args.filter(function (value) {
3689      if (typeof value === 'string' && value.length > 0) {
3690        return true;
3691      }
3692  
3693      return false;
3694    }).join(' ').trim();
3695  }
3696  
3697  var css_248z = ".reactEasyCrop_Container {\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  overflow: hidden;\n  user-select: none;\n  touch-action: none;\n  cursor: move;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n  max-width: 100%;\n  max-height: 100%;\n  margin: auto;\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  right: 0;\n  will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_CropArea {\n  position: absolute;\n  left: 50%;\n  top: 50%;\n  transform: translate(-50%, -50%);\n  border: 1px solid rgba(255, 255, 255, 0.5);\n  box-sizing: border-box;\n  box-shadow: 0 0 0 9999em;\n  color: rgba(0, 0, 0, 0.5);\n  overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n  border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n  content: ' ';\n  box-sizing: border-box;\n  position: absolute;\n  border: 1px solid rgba(255, 255, 255, 0.5);\n  top: 0;\n  bottom: 0;\n  left: 33.33%;\n  right: 33.33%;\n  border-top: 0;\n  border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n  content: ' ';\n  box-sizing: border-box;\n  position: absolute;\n  border: 1px solid rgba(255, 255, 255, 0.5);\n  top: 33.33%;\n  bottom: 33.33%;\n  left: 0;\n  right: 0;\n  border-left: 0;\n  border-right: 0;\n}\n";
3698  
3699  var MIN_ZOOM = 1;
3700  var MAX_ZOOM = 3;
3701  
3702  var index_module_Cropper =
3703  /** @class */
3704  function (_super) {
3705    __extends(Cropper, _super);
3706  
3707    function Cropper() {
3708      var _this = _super !== null && _super.apply(this, arguments) || this;
3709  
3710      _this.imageRef = null;
3711      _this.videoRef = null;
3712      _this.containerRef = null;
3713      _this.styleRef = null;
3714      _this.containerRect = null;
3715      _this.mediaSize = {
3716        width: 0,
3717        height: 0,
3718        naturalWidth: 0,
3719        naturalHeight: 0
3720      };
3721      _this.dragStartPosition = {
3722        x: 0,
3723        y: 0
3724      };
3725      _this.dragStartCrop = {
3726        x: 0,
3727        y: 0
3728      };
3729      _this.lastPinchDistance = 0;
3730      _this.lastPinchRotation = 0;
3731      _this.rafDragTimeout = null;
3732      _this.rafPinchTimeout = null;
3733      _this.wheelTimer = null;
3734      _this.state = {
3735        cropSize: null,
3736        hasWheelJustStarted: false
3737      }; // this is to prevent Safari on iOS >= 10 to zoom the page
3738  
3739      _this.preventZoomSafari = function (e) {
3740        return e.preventDefault();
3741      };
3742  
3743      _this.cleanEvents = function () {
3744        document.removeEventListener('mousemove', _this.onMouseMove);
3745        document.removeEventListener('mouseup', _this.onDragStopped);
3746        document.removeEventListener('touchmove', _this.onTouchMove);
3747        document.removeEventListener('touchend', _this.onDragStopped);
3748      };
3749  
3750      _this.clearScrollEvent = function () {
3751        if (_this.containerRef) _this.containerRef.removeEventListener('wheel', _this.onWheel);
3752  
3753        if (_this.wheelTimer) {
3754          clearTimeout(_this.wheelTimer);
3755        }
3756      };
3757  
3758      _this.onMediaLoad = function () {
3759        _this.computeSizes();
3760  
3761        _this.emitCropData();
3762  
3763        _this.setInitialCrop();
3764  
3765        if (_this.props.onMediaLoaded) {
3766          _this.props.onMediaLoaded(_this.mediaSize);
3767        }
3768      };
3769  
3770      _this.setInitialCrop = function () {
3771        var _a = _this.props,
3772            initialCroppedAreaPixels = _a.initialCroppedAreaPixels,
3773            cropSize = _a.cropSize;
3774  
3775        if (!initialCroppedAreaPixels) {
3776          return;
3777        }
3778  
3779        var _b = getInitialCropFromCroppedAreaPixels(initialCroppedAreaPixels, _this.mediaSize, cropSize),
3780            crop = _b.crop,
3781            zoom = _b.zoom;
3782  
3783        _this.props.onCropChange(crop);
3784  
3785        _this.props.onZoomChange && _this.props.onZoomChange(zoom);
3786      };
3787  
3788      _this.computeSizes = function () {
3789        var _a, _b, _c, _d, _e, _f;
3790  
3791        var mediaRef = _this.imageRef || _this.videoRef;
3792  
3793        if (mediaRef && _this.containerRef) {
3794          _this.containerRect = _this.containerRef.getBoundingClientRect();
3795          _this.mediaSize = {
3796            width: mediaRef.offsetWidth,
3797            height: mediaRef.offsetHeight,
3798            naturalWidth: ((_a = _this.imageRef) === null || _a === void 0 ? void 0 : _a.naturalWidth) || ((_b = _this.videoRef) === null || _b === void 0 ? void 0 : _b.videoWidth) || 0,
3799            naturalHeight: ((_c = _this.imageRef) === null || _c === void 0 ? void 0 : _c.naturalHeight) || ((_d = _this.videoRef) === null || _d === void 0 ? void 0 : _d.videoHeight) || 0
3800          };
3801          var cropSize = _this.props.cropSize ? _this.props.cropSize : getCropSize(mediaRef.offsetWidth, mediaRef.offsetHeight, _this.containerRect.width, _this.containerRect.height, _this.props.aspect, _this.props.rotation);
3802  
3803          if (((_e = _this.state.cropSize) === null || _e === void 0 ? void 0 : _e.height) !== cropSize.height || ((_f = _this.state.cropSize) === null || _f === void 0 ? void 0 : _f.width) !== cropSize.width) {
3804            _this.props.onCropSizeChange && _this.props.onCropSizeChange(cropSize);
3805          }
3806  
3807          _this.setState({
3808            cropSize: cropSize
3809          }, _this.recomputeCropPosition);
3810        }
3811      };
3812  
3813      _this.onMouseDown = function (e) {
3814        e.preventDefault();
3815        document.addEventListener('mousemove', _this.onMouseMove);
3816        document.addEventListener('mouseup', _this.onDragStopped);
3817  
3818        _this.onDragStart(Cropper.getMousePoint(e));
3819      };
3820  
3821      _this.onMouseMove = function (e) {
3822        return _this.onDrag(Cropper.getMousePoint(e));
3823      };
3824  
3825      _this.onTouchStart = function (e) {
3826        e.preventDefault();
3827        document.addEventListener('touchmove', _this.onTouchMove, {
3828          passive: false
3829        }); // iOS 11 now defaults to passive: true
3830  
3831        document.addEventListener('touchend', _this.onDragStopped);
3832  
3833        if (e.touches.length === 2) {
3834          _this.onPinchStart(e);
3835        } else if (e.touches.length === 1) {
3836          _this.onDragStart(Cropper.getTouchPoint(e.touches[0]));
3837        }
3838      };
3839  
3840      _this.onTouchMove = function (e) {
3841        // Prevent whole page from scrolling on iOS.
3842        e.preventDefault();
3843  
3844        if (e.touches.length === 2) {
3845          _this.onPinchMove(e);
3846        } else if (e.touches.length === 1) {
3847          _this.onDrag(Cropper.getTouchPoint(e.touches[0]));
3848        }
3849      };
3850  
3851      _this.onDragStart = function (_a) {
3852        var _b, _c;
3853  
3854        var x = _a.x,
3855            y = _a.y;
3856        _this.dragStartPosition = {
3857          x: x,
3858          y: y
3859        };
3860        _this.dragStartCrop = __assign({}, _this.props.crop);
3861        (_c = (_b = _this.props).onInteractionStart) === null || _c === void 0 ? void 0 : _c.call(_b);
3862      };
3863  
3864      _this.onDrag = function (_a) {
3865        var x = _a.x,
3866            y = _a.y;
3867        if (_this.rafDragTimeout) window.cancelAnimationFrame(_this.rafDragTimeout);
3868        _this.rafDragTimeout = window.requestAnimationFrame(function () {
3869          if (!_this.state.cropSize) return;
3870          if (x === undefined || y === undefined) return;
3871          var offsetX = x - _this.dragStartPosition.x;
3872          var offsetY = y - _this.dragStartPosition.y;
3873          var requestedPosition = {
3874            x: _this.dragStartCrop.x + offsetX,
3875            y: _this.dragStartCrop.y + offsetY
3876          };
3877          var newPosition = _this.props.restrictPosition ? index_module_restrictPosition(requestedPosition, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : requestedPosition;
3878  
3879          _this.props.onCropChange(newPosition);
3880        });
3881      };
3882  
3883      _this.onDragStopped = function () {
3884        var _a, _b;
3885  
3886        _this.cleanEvents();
3887  
3888        _this.emitCropData();
3889  
3890        (_b = (_a = _this.props).onInteractionEnd) === null || _b === void 0 ? void 0 : _b.call(_a);
3891      };
3892  
3893      _this.onWheel = function (e) {
3894        e.preventDefault();
3895        var point = Cropper.getMousePoint(e);
3896        var newZoom = _this.props.zoom - e.deltaY * _this.props.zoomSpeed / 200;
3897  
3898        _this.setNewZoom(newZoom, point);
3899  
3900        if (!_this.state.hasWheelJustStarted) {
3901          _this.setState({
3902            hasWheelJustStarted: true
3903          }, function () {
3904            var _a, _b;
3905  
3906            return (_b = (_a = _this.props).onInteractionStart) === null || _b === void 0 ? void 0 : _b.call(_a);
3907          });
3908        }
3909  
3910        if (_this.wheelTimer) {
3911          clearTimeout(_this.wheelTimer);
3912        }
3913  
3914        _this.wheelTimer = window.setTimeout(function () {
3915          return _this.setState({
3916            hasWheelJustStarted: false
3917          }, function () {
3918            var _a, _b;
3919  
3920            return (_b = (_a = _this.props).onInteractionEnd) === null || _b === void 0 ? void 0 : _b.call(_a);
3921          });
3922        }, 250);
3923      };
3924  
3925      _this.getPointOnContainer = function (_a) {
3926        var x = _a.x,
3927            y = _a.y;
3928  
3929        if (!_this.containerRect) {
3930          throw new Error('The Cropper is not mounted');
3931        }
3932  
3933        return {
3934          x: _this.containerRect.width / 2 - (x - _this.containerRect.left),
3935          y: _this.containerRect.height / 2 - (y - _this.containerRect.top)
3936        };
3937      };
3938  
3939      _this.getPointOnMedia = function (_a) {
3940        var x = _a.x,
3941            y = _a.y;
3942        var _b = _this.props,
3943            crop = _b.crop,
3944            zoom = _b.zoom;
3945        return {
3946          x: (x + crop.x) / zoom,
3947          y: (y + crop.y) / zoom
3948        };
3949      };
3950  
3951      _this.setNewZoom = function (zoom, point) {
3952        if (!_this.state.cropSize || !_this.props.onZoomChange) return;
3953  
3954        var zoomPoint = _this.getPointOnContainer(point);
3955  
3956        var zoomTarget = _this.getPointOnMedia(zoomPoint);
3957  
3958        var newZoom = Math.min(_this.props.maxZoom, Math.max(zoom, _this.props.minZoom));
3959        var requestedPosition = {
3960          x: zoomTarget.x * newZoom - zoomPoint.x,
3961          y: zoomTarget.y * newZoom - zoomPoint.y
3962        };
3963        var newPosition = _this.props.restrictPosition ? index_module_restrictPosition(requestedPosition, _this.mediaSize, _this.state.cropSize, newZoom, _this.props.rotation) : requestedPosition;
3964  
3965        _this.props.onCropChange(newPosition);
3966  
3967        _this.props.onZoomChange(newZoom);
3968      };
3969  
3970      _this.getCropData = function () {
3971        if (!_this.state.cropSize) {
3972          return null;
3973        } // this is to ensure the crop is correctly restricted after a zoom back (https://github.com/ricardo-ch/react-easy-crop/issues/6)
3974  
3975  
3976        var restrictedPosition = _this.props.restrictPosition ? index_module_restrictPosition(_this.props.crop, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : _this.props.crop;
3977        return computeCroppedArea(restrictedPosition, _this.mediaSize, _this.state.cropSize, _this.getAspect(), _this.props.zoom, _this.props.rotation, _this.props.restrictPosition);
3978      };
3979  
3980      _this.emitCropData = function () {
3981        var cropData = _this.getCropData();
3982  
3983        if (!cropData) return;
3984        var croppedAreaPercentages = cropData.croppedAreaPercentages,
3985            croppedAreaPixels = cropData.croppedAreaPixels;
3986  
3987        if (_this.props.onCropComplete) {
3988          _this.props.onCropComplete(croppedAreaPercentages, croppedAreaPixels);
3989        }
3990  
3991        if (_this.props.onCropAreaChange) {
3992          _this.props.onCropAreaChange(croppedAreaPercentages, croppedAreaPixels);
3993        }
3994      };
3995  
3996      _this.emitCropAreaChange = function () {
3997        var cropData = _this.getCropData();
3998  
3999        if (!cropData) return;
4000        var croppedAreaPercentages = cropData.croppedAreaPercentages,
4001            croppedAreaPixels = cropData.croppedAreaPixels;
4002  
4003        if (_this.props.onCropAreaChange) {
4004          _this.props.onCropAreaChange(croppedAreaPercentages, croppedAreaPixels);
4005        }
4006      };
4007  
4008      _this.recomputeCropPosition = function () {
4009        if (!_this.state.cropSize) return;
4010        var newPosition = _this.props.restrictPosition ? index_module_restrictPosition(_this.props.crop, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : _this.props.crop;
4011  
4012        _this.props.onCropChange(newPosition);
4013  
4014        _this.emitCropData();
4015      };
4016  
4017      return _this;
4018    }
4019  
4020    Cropper.prototype.componentDidMount = function () {
4021      window.addEventListener('resize', this.computeSizes);
4022  
4023      if (this.containerRef) {
4024        this.props.zoomWithScroll && this.containerRef.addEventListener('wheel', this.onWheel, {
4025          passive: false
4026        });
4027        this.containerRef.addEventListener('gesturestart', this.preventZoomSafari);
4028        this.containerRef.addEventListener('gesturechange', this.preventZoomSafari);
4029      }
4030  
4031      if (!this.props.disableAutomaticStylesInjection) {
4032        this.styleRef = document.createElement('style');
4033        this.styleRef.setAttribute('type', 'text/css');
4034        this.styleRef.innerHTML = css_248z;
4035        document.head.appendChild(this.styleRef);
4036      } // when rendered via SSR, the image can already be loaded and its onLoad callback will never be called
4037  
4038  
4039      if (this.imageRef && this.imageRef.complete) {
4040        this.onMediaLoad();
4041      }
4042    };
4043  
4044    Cropper.prototype.componentWillUnmount = function () {
4045      window.removeEventListener('resize', this.computeSizes);
4046  
4047      if (this.containerRef) {
4048        this.containerRef.removeEventListener('gesturestart', this.preventZoomSafari);
4049        this.containerRef.removeEventListener('gesturechange', this.preventZoomSafari);
4050      }
4051  
4052      if (this.styleRef) {
4053        this.styleRef.remove();
4054      }
4055  
4056      this.cleanEvents();
4057      this.props.zoomWithScroll && this.clearScrollEvent();
4058    };
4059  
4060    Cropper.prototype.componentDidUpdate = function (prevProps) {
4061      var _a, _b, _c, _d, _e, _f, _g, _h;
4062  
4063      if (prevProps.rotation !== this.props.rotation) {
4064        this.computeSizes();
4065        this.recomputeCropPosition();
4066      } else if (prevProps.aspect !== this.props.aspect) {
4067        this.computeSizes();
4068      } else if (prevProps.zoom !== this.props.zoom) {
4069        this.recomputeCropPosition();
4070      } else if (((_a = prevProps.cropSize) === null || _a === void 0 ? void 0 : _a.height) !== ((_b = this.props.cropSize) === null || _b === void 0 ? void 0 : _b.height) || ((_c = prevProps.cropSize) === null || _c === void 0 ? void 0 : _c.width) !== ((_d = this.props.cropSize) === null || _d === void 0 ? void 0 : _d.width)) {
4071        this.computeSizes();
4072      } else if (((_e = prevProps.crop) === null || _e === void 0 ? void 0 : _e.x) !== ((_f = this.props.crop) === null || _f === void 0 ? void 0 : _f.x) || ((_g = prevProps.crop) === null || _g === void 0 ? void 0 : _g.y) !== ((_h = this.props.crop) === null || _h === void 0 ? void 0 : _h.y)) {
4073        this.emitCropAreaChange();
4074      }
4075  
4076      if (prevProps.zoomWithScroll !== this.props.zoomWithScroll && this.containerRef) {
4077        this.props.zoomWithScroll ? this.containerRef.addEventListener('wheel', this.onWheel, {
4078          passive: false
4079        }) : this.clearScrollEvent();
4080      }
4081    };
4082  
4083    Cropper.prototype.getAspect = function () {
4084      var _a = this.props,
4085          cropSize = _a.cropSize,
4086          aspect = _a.aspect;
4087  
4088      if (cropSize) {
4089        return cropSize.width / cropSize.height;
4090      }
4091  
4092      return aspect;
4093    };
4094  
4095    Cropper.prototype.onPinchStart = function (e) {
4096      var pointA = Cropper.getTouchPoint(e.touches[0]);
4097      var pointB = Cropper.getTouchPoint(e.touches[1]);
4098      this.lastPinchDistance = getDistanceBetweenPoints(pointA, pointB);
4099      this.lastPinchRotation = getRotationBetweenPoints(pointA, pointB);
4100      this.onDragStart(getCenter(pointA, pointB));
4101    };
4102  
4103    Cropper.prototype.onPinchMove = function (e) {
4104      var _this = this;
4105  
4106      var pointA = Cropper.getTouchPoint(e.touches[0]);
4107      var pointB = Cropper.getTouchPoint(e.touches[1]);
4108      var center = getCenter(pointA, pointB);
4109      this.onDrag(center);
4110      if (this.rafPinchTimeout) window.cancelAnimationFrame(this.rafPinchTimeout);
4111      this.rafPinchTimeout = window.requestAnimationFrame(function () {
4112        var distance = getDistanceBetweenPoints(pointA, pointB);
4113        var newZoom = _this.props.zoom * (distance / _this.lastPinchDistance);
4114  
4115        _this.setNewZoom(newZoom, center);
4116  
4117        _this.lastPinchDistance = distance;
4118        var rotation = getRotationBetweenPoints(pointA, pointB);
4119        var newRotation = _this.props.rotation + (rotation - _this.lastPinchRotation);
4120        _this.props.onRotationChange && _this.props.onRotationChange(newRotation);
4121        _this.lastPinchRotation = rotation;
4122      });
4123    };
4124  
4125    Cropper.prototype.render = function () {
4126      var _this = this;
4127  
4128      var _a = this.props,
4129          image = _a.image,
4130          video = _a.video,
4131          mediaProps = _a.mediaProps,
4132          transform = _a.transform,
4133          _b = _a.crop,
4134          x = _b.x,
4135          y = _b.y,
4136          rotation = _a.rotation,
4137          zoom = _a.zoom,
4138          cropShape = _a.cropShape,
4139          showGrid = _a.showGrid,
4140          _c = _a.style,
4141          containerStyle = _c.containerStyle,
4142          cropAreaStyle = _c.cropAreaStyle,
4143          mediaStyle = _c.mediaStyle,
4144          _d = _a.classes,
4145          containerClassName = _d.containerClassName,
4146          cropAreaClassName = _d.cropAreaClassName,
4147          mediaClassName = _d.mediaClassName;
4148      return /*#__PURE__*/external_this_React_default.a.createElement("div", {
4149        onMouseDown: this.onMouseDown,
4150        onTouchStart: this.onTouchStart,
4151        ref: function ref(el) {
4152          return _this.containerRef = el;
4153        },
4154        "data-testid": "container",
4155        style: containerStyle,
4156        className: index_module_classNames('reactEasyCrop_Container', containerClassName)
4157      }, image ? /*#__PURE__*/external_this_React_default.a.createElement("img", __assign({
4158        alt: "",
4159        className: index_module_classNames('reactEasyCrop_Image', mediaClassName)
4160      }, mediaProps, {
4161        src: image,
4162        ref: function ref(el) {
4163          return _this.imageRef = el;
4164        },
4165        style: __assign(__assign({}, mediaStyle), {
4166          transform: transform || "translate(" + x + "px, " + y + "px) rotate(" + rotation + "deg) scale(" + zoom + ")"
4167        }),
4168        onLoad: this.onMediaLoad
4169      })) : video && /*#__PURE__*/external_this_React_default.a.createElement("video", __assign({
4170        autoPlay: true,
4171        loop: true,
4172        muted: true,
4173        className: index_module_classNames('reactEasyCrop_Video', mediaClassName)
4174      }, mediaProps, {
4175        src: video,
4176        ref: function ref(el) {
4177          return _this.videoRef = el;
4178        },
4179        onLoadedMetadata: this.onMediaLoad,
4180        style: __assign(__assign({}, mediaStyle), {
4181          transform: transform || "translate(" + x + "px, " + y + "px) rotate(" + rotation + "deg) scale(" + zoom + ")"
4182        }),
4183        controls: false
4184      })), this.state.cropSize && /*#__PURE__*/external_this_React_default.a.createElement("div", {
4185        style: __assign(__assign({}, cropAreaStyle), {
4186          width: this.state.cropSize.width,
4187          height: this.state.cropSize.height
4188        }),
4189        "data-testid": "cropper",
4190        className: index_module_classNames('reactEasyCrop_CropArea', cropShape === 'round' && 'reactEasyCrop_CropAreaRound', showGrid && 'reactEasyCrop_CropAreaGrid', cropAreaClassName)
4191      }));
4192    };
4193  
4194    Cropper.defaultProps = {
4195      zoom: 1,
4196      rotation: 0,
4197      aspect: 4 / 3,
4198      maxZoom: MAX_ZOOM,
4199      minZoom: MIN_ZOOM,
4200      cropShape: 'rect',
4201      showGrid: true,
4202      style: {},
4203      classes: {},
4204      mediaProps: {},
4205      zoomSpeed: 1,
4206      restrictPosition: true,
4207      zoomWithScroll: true
4208    };
4209  
4210    Cropper.getMousePoint = function (e) {
4211      return {
4212        x: Number(e.clientX),
4213        y: Number(e.clientY)
4214      };
4215    };
4216  
4217    Cropper.getTouchPoint = function (touch) {
4218      return {
4219        x: Number(touch.clientX),
4220        y: Number(touch.clientY)
4221      };
4222    };
4223  
4224    return Cropper;
4225  }(external_this_React_default.a.Component);
4226  
4227  /* harmony default export */ var index_module = (index_module_Cropper);
4228  
4229  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/check.js
4230  var check = __webpack_require__(161);
4231  
4232  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/aspect-ratio.js
4233  
4234  
4235  /**
4236   * WordPress dependencies
4237   */
4238  
4239  var aspect_ratio_aspectRatio = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
4240    xmlns: "http://www.w3.org/2000/svg",
4241    viewBox: "0 0 24 24"
4242  }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
4243    d: "M18.5 5.5h-13c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5h-13c-.3 0-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5h13c.3 0 .5.2.5.5v9zM6.5 12H8v-2h2V8.5H6.5V12zm9.5 2h-2v1.5h3.5V12H16v2z"
4244  }));
4245  /* harmony default export */ var aspect_ratio = (aspect_ratio_aspectRatio);
4246  
4247  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/search.js
4248  var search = __webpack_require__(306);
4249  
4250  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/rotate-right.js
4251  
4252  
4253  /**
4254   * WordPress dependencies
4255   */
4256  
4257  var rotateRight = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
4258    xmlns: "http://www.w3.org/2000/svg",
4259    viewBox: "0 0 24 24"
4260  }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
4261    d: "M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"
4262  }));
4263  /* harmony default export */ var rotate_right = (rotateRight);
4264  
4265  // EXTERNAL MODULE: external {"this":["wp","apiFetch"]}
4266  var external_this_wp_apiFetch_ = __webpack_require__(47);
4267  var external_this_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_apiFetch_);
4268  
4269  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-editor.js
4270  
4271  
4272  
4273  /**
4274   * External dependencies
4275   */
4276  
4277  
4278  /**
4279   * WordPress dependencies
4280   */
4281  
4282  
4283  
4284  
4285  
4286  
4287  
4288  
4289  var image_editor_MIN_ZOOM = 100;
4290  var image_editor_MAX_ZOOM = 300;
4291  var POPOVER_PROPS = {
4292    position: 'bottom right',
4293    isAlternate: true
4294  };
4295  
4296  function AspectGroup(_ref) {
4297    var aspectRatios = _ref.aspectRatios,
4298        isDisabled = _ref.isDisabled,
4299        label = _ref.label,
4300        _onClick = _ref.onClick,
4301        value = _ref.value;
4302    return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuGroup"], {
4303      label: label
4304    }, aspectRatios.map(function (_ref2) {
4305      var title = _ref2.title,
4306          aspect = _ref2.aspect;
4307      return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuItem"], {
4308        key: aspect,
4309        disabled: isDisabled,
4310        onClick: function onClick() {
4311          _onClick(aspect);
4312        },
4313        role: "menuitemradio",
4314        isSelected: aspect === value,
4315        icon: aspect === value ? check["a" /* default */] : undefined
4316      }, title);
4317    }));
4318  }
4319  
4320  function AspectMenu(_ref3) {
4321    var toggleProps = _ref3.toggleProps,
4322        isDisabled = _ref3.isDisabled,
4323        _onClick2 = _ref3.onClick,
4324        value = _ref3.value,
4325        defaultValue = _ref3.defaultValue;
4326    return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["DropdownMenu"], {
4327      icon: aspect_ratio,
4328      label: Object(external_this_wp_i18n_["__"])('Aspect Ratio'),
4329      popoverProps: POPOVER_PROPS,
4330      toggleProps: toggleProps,
4331      className: "wp-block-image__aspect-ratio"
4332    }, function (_ref4) {
4333      var onClose = _ref4.onClose;
4334      return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(AspectGroup, {
4335        isDisabled: isDisabled,
4336        onClick: function onClick(aspect) {
4337          _onClick2(aspect);
4338  
4339          onClose();
4340        },
4341        value: value,
4342        aspectRatios: [{
4343          title: Object(external_this_wp_i18n_["__"])('Original'),
4344          aspect: defaultValue
4345        }, {
4346          title: Object(external_this_wp_i18n_["__"])('Square'),
4347          aspect: 1
4348        }]
4349      }), Object(external_this_wp_element_["createElement"])(AspectGroup, {
4350        label: Object(external_this_wp_i18n_["__"])('Landscape'),
4351        isDisabled: isDisabled,
4352        onClick: function onClick(aspect) {
4353          _onClick2(aspect);
4354  
4355          onClose();
4356        },
4357        value: value,
4358        aspectRatios: [{
4359          title: Object(external_this_wp_i18n_["__"])('16:10'),
4360          aspect: 16 / 10
4361        }, {
4362          title: Object(external_this_wp_i18n_["__"])('16:9'),
4363          aspect: 16 / 9
4364        }, {
4365          title: Object(external_this_wp_i18n_["__"])('4:3'),
4366          aspect: 4 / 3
4367        }, {
4368          title: Object(external_this_wp_i18n_["__"])('3:2'),
4369          aspect: 3 / 2
4370        }]
4371      }), Object(external_this_wp_element_["createElement"])(AspectGroup, {
4372        label: Object(external_this_wp_i18n_["__"])('Portrait'),
4373        isDisabled: isDisabled,
4374        onClick: function onClick(aspect) {
4375          _onClick2(aspect);
4376  
4377          onClose();
4378        },
4379        value: value,
4380        aspectRatios: [{
4381          title: Object(external_this_wp_i18n_["__"])('10:16'),
4382          aspect: 10 / 16
4383        }, {
4384          title: Object(external_this_wp_i18n_["__"])('9:16'),
4385          aspect: 9 / 16
4386        }, {
4387          title: Object(external_this_wp_i18n_["__"])('3:4'),
4388          aspect: 3 / 4
4389        }, {
4390          title: Object(external_this_wp_i18n_["__"])('2:3'),
4391          aspect: 2 / 3
4392        }]
4393      }));
4394    });
4395  }
4396  
4397  function ImageEditor(_ref5) {
4398    var id = _ref5.id,
4399        url = _ref5.url,
4400        setAttributes = _ref5.setAttributes,
4401        naturalWidth = _ref5.naturalWidth,
4402        naturalHeight = _ref5.naturalHeight,
4403        width = _ref5.width,
4404        height = _ref5.height,
4405        clientWidth = _ref5.clientWidth,
4406        setIsEditingImage = _ref5.setIsEditingImage;
4407  
4408    var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/notices'),
4409        createErrorNotice = _useDispatch.createErrorNotice;
4410  
4411    var _useState = Object(external_this_wp_element_["useState"])(false),
4412        _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
4413        inProgress = _useState2[0],
4414        setIsProgress = _useState2[1];
4415  
4416    var _useState3 = Object(external_this_wp_element_["useState"])(null),
4417        _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2),
4418        crop = _useState4[0],
4419        setCrop = _useState4[1];
4420  
4421    var _useState5 = Object(external_this_wp_element_["useState"])({
4422      x: 0,
4423      y: 0
4424    }),
4425        _useState6 = Object(slicedToArray["a" /* default */])(_useState5, 2),
4426        position = _useState6[0],
4427        setPosition = _useState6[1];
4428  
4429    var _useState7 = Object(external_this_wp_element_["useState"])(100),
4430        _useState8 = Object(slicedToArray["a" /* default */])(_useState7, 2),
4431        zoom = _useState8[0],
4432        setZoom = _useState8[1];
4433  
4434    var _useState9 = Object(external_this_wp_element_["useState"])(naturalWidth / naturalHeight),
4435        _useState10 = Object(slicedToArray["a" /* default */])(_useState9, 2),
4436        aspect = _useState10[0],
4437        setAspect = _useState10[1];
4438  
4439    var _useState11 = Object(external_this_wp_element_["useState"])(0),
4440        _useState12 = Object(slicedToArray["a" /* default */])(_useState11, 2),
4441        rotation = _useState12[0],
4442        setRotation = _useState12[1];
4443  
4444    var _useState13 = Object(external_this_wp_element_["useState"])(),
4445        _useState14 = Object(slicedToArray["a" /* default */])(_useState13, 2),
4446        editedUrl = _useState14[0],
4447        setEditedUrl = _useState14[1];
4448  
4449    var editedWidth = width;
4450    var editedHeight = height || clientWidth * naturalHeight / naturalWidth;
4451    var naturalAspectRatio = naturalWidth / naturalHeight;
4452  
4453    if (rotation % 180 === 90) {
4454      editedHeight = clientWidth * naturalWidth / naturalHeight;
4455      naturalAspectRatio = naturalHeight / naturalWidth;
4456    }
4457  
4458    function apply() {
4459      setIsProgress(true);
4460      var attrs = {}; // The crop script may return some very small, sub-pixel values when the image was not cropped.
4461      // Crop only when the new size has changed by more than 0.1%.
4462  
4463      if (crop.width < 99.9 || crop.height < 99.9) {
4464        attrs = crop;
4465      }
4466  
4467      if (rotation > 0) {
4468        attrs.rotation = rotation;
4469      }
4470  
4471      attrs.src = url;
4472      external_this_wp_apiFetch_default()({
4473        path: "/wp/v2/media/".concat(id, "/edit"),
4474        method: 'POST',
4475        data: attrs
4476      }).then(function (response) {
4477        setAttributes({
4478          id: response.id,
4479          url: response.source_url,
4480          height: height && width ? width / aspect : undefined
4481        });
4482      }).catch(function (error) {
4483        createErrorNotice(Object(external_this_wp_i18n_["sprintf"])(
4484        /* translators: 1. Error message */
4485        Object(external_this_wp_i18n_["__"])('Could not edit image. %s'), error.message), {
4486          id: 'image-editing-error',
4487          type: 'snackbar'
4488        });
4489      }).finally(function () {
4490        setIsProgress(false);
4491        setIsEditingImage(false);
4492      });
4493    }
4494  
4495    function rotate() {
4496      var angle = (rotation + 90) % 360;
4497  
4498      if (angle === 0) {
4499        setEditedUrl();
4500        setRotation(angle);
4501        setAspect(1 / aspect);
4502        setPosition({
4503          x: -(position.y * naturalAspectRatio),
4504          y: position.x * naturalAspectRatio
4505        });
4506        return;
4507      }
4508  
4509      function editImage(event) {
4510        var canvas = document.createElement('canvas');
4511        var translateX = 0;
4512        var translateY = 0;
4513  
4514        if (angle % 180) {
4515          canvas.width = event.target.height;
4516          canvas.height = event.target.width;
4517        } else {
4518          canvas.width = event.target.width;
4519          canvas.height = event.target.height;
4520        }
4521  
4522        if (angle === 90 || angle === 180) {
4523          translateX = canvas.width;
4524        }
4525  
4526        if (angle === 270 || angle === 180) {
4527          translateY = canvas.height;
4528        }
4529  
4530        var context = canvas.getContext('2d');
4531        context.translate(translateX, translateY);
4532        context.rotate(angle * Math.PI / 180);
4533        context.drawImage(event.target, 0, 0);
4534        canvas.toBlob(function (blob) {
4535          setEditedUrl(URL.createObjectURL(blob));
4536          setRotation(angle);
4537          setAspect(1 / aspect);
4538          setPosition({
4539            x: -(position.y * naturalAspectRatio),
4540            y: position.x * naturalAspectRatio
4541          });
4542        });
4543      }
4544  
4545      var el = new window.Image();
4546      el.src = url;
4547      el.onload = editImage;
4548    }
4549  
4550    return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])("div", {
4551      className: classnames_default()('wp-block-image__crop-area', {
4552        'is-applying': inProgress
4553      }),
4554      style: {
4555        width: editedWidth,
4556        height: editedHeight
4557      }
4558    }, Object(external_this_wp_element_["createElement"])(index_module, {
4559      image: editedUrl || url,
4560      disabled: inProgress,
4561      minZoom: image_editor_MIN_ZOOM / 100,
4562      maxZoom: image_editor_MAX_ZOOM / 100,
4563      crop: position,
4564      zoom: zoom / 100,
4565      aspect: aspect,
4566      onCropChange: setPosition,
4567      onCropComplete: function onCropComplete(newCropPercent) {
4568        setCrop(newCropPercent);
4569      },
4570      onZoomChange: function onZoomChange(newZoom) {
4571        setZoom(newZoom * 100);
4572      }
4573    }), inProgress && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Spinner"], null)), Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockControls"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarGroup"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Dropdown"], {
4574      contentClassName: "wp-block-image__zoom",
4575      popoverProps: POPOVER_PROPS,
4576      renderToggle: function renderToggle(_ref6) {
4577        var isOpen = _ref6.isOpen,
4578            onToggle = _ref6.onToggle;
4579        return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarButton"], {
4580          icon: search["a" /* default */],
4581          label: Object(external_this_wp_i18n_["__"])('Zoom'),
4582          onClick: onToggle,
4583          "aria-expanded": isOpen,
4584          disabled: inProgress
4585        });
4586      },
4587      renderContent: function renderContent() {
4588        return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["RangeControl"], {
4589          min: image_editor_MIN_ZOOM,
4590          max: image_editor_MAX_ZOOM,
4591          value: Math.round(zoom),
4592          onChange: setZoom
4593        });
4594      }
4595    }), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarItem"], null, function (toggleProps) {
4596      return Object(external_this_wp_element_["createElement"])(AspectMenu, {
4597        toggleProps: toggleProps,
4598        isDisabled: inProgress,
4599        onClick: setAspect,
4600        value: aspect,
4601        defaultValue: naturalWidth / naturalHeight
4602      });
4603    })), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarGroup"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarButton"], {
4604      icon: rotate_right,
4605      label: Object(external_this_wp_i18n_["__"])('Rotate'),
4606      onClick: rotate,
4607      disabled: inProgress
4608    })), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarGroup"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarButton"], {
4609      onClick: apply,
4610      disabled: inProgress
4611    }, Object(external_this_wp_i18n_["__"])('Apply')), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarButton"], {
4612      onClick: function onClick() {
4613        return setIsEditingImage(false);
4614      }
4615    }, Object(external_this_wp_i18n_["__"])('Cancel')))));
4616  }
4617  
4618  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/constants.js
4619  var MIN_SIZE = 20;
4620  var LINK_DESTINATION_NONE = 'none';
4621  var LINK_DESTINATION_MEDIA = 'media';
4622  var LINK_DESTINATION_ATTACHMENT = 'attachment';
4623  var LINK_DESTINATION_CUSTOM = 'custom';
4624  var NEW_TAB_REL = ['noreferrer', 'noopener'];
4625  var ALLOWED_MEDIA_TYPES = ['image'];
4626  var DEFAULT_SIZE_SLUG = 'large';
4627  
4628  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image.js
4629  
4630  
4631  
4632  /**
4633   * External dependencies
4634   */
4635  
4636  /**
4637   * WordPress dependencies
4638   */
4639  
4640  
4641  
4642  
4643  
4644  
4645  
4646  
4647  
4648  
4649  
4650  /**
4651   * Internal dependencies
4652   */
4653  
4654  
4655  
4656  
4657  
4658  /**
4659   * Module constants
4660   */
4661  
4662  
4663  
4664  function getFilename(url) {
4665    var path = Object(external_this_wp_url_["getPath"])(url);
4666  
4667    if (path) {
4668      return Object(external_this_lodash_["last"])(path.split('/'));
4669    }
4670  }
4671  
4672  function Image(_ref) {
4673    var _ref$attributes = _ref.attributes,
4674        _ref$attributes$url = _ref$attributes.url,
4675        url = _ref$attributes$url === void 0 ? '' : _ref$attributes$url,
4676        alt = _ref$attributes.alt,
4677        caption = _ref$attributes.caption,
4678        align = _ref$attributes.align,
4679        id = _ref$attributes.id,
4680        href = _ref$attributes.href,
4681        rel = _ref$attributes.rel,
4682        linkClass = _ref$attributes.linkClass,
4683        linkDestination = _ref$attributes.linkDestination,
4684        title = _ref$attributes.title,
4685        width = _ref$attributes.width,
4686        height = _ref$attributes.height,
4687        linkTarget = _ref$attributes.linkTarget,
4688        sizeSlug = _ref$attributes.sizeSlug,
4689        setAttributes = _ref.setAttributes,
4690        isSelected = _ref.isSelected,
4691        insertBlocksAfter = _ref.insertBlocksAfter,
4692        onReplace = _ref.onReplace,
4693        onSelectImage = _ref.onSelectImage,
4694        onSelectURL = _ref.onSelectURL,
4695        onUploadError = _ref.onUploadError,
4696        containerRef = _ref.containerRef;
4697    var captionRef = Object(external_this_wp_element_["useRef"])();
4698    var prevUrl = Object(external_this_wp_compose_["usePrevious"])(url);
4699    var image = Object(external_this_wp_data_["useSelect"])(function (select) {
4700      var _select = select('core'),
4701          getMedia = _select.getMedia;
4702  
4703      return id && isSelected ? getMedia(id) : null;
4704    }, [id, isSelected]);
4705  
4706    var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
4707      var _select2 = select('core/block-editor'),
4708          getSettings = _select2.getSettings;
4709  
4710      return Object(external_this_lodash_["pick"])(getSettings(), ['imageEditing', 'imageSizes', 'isRTL', 'maxWidth', 'mediaUpload']);
4711    }),
4712        imageEditing = _useSelect.imageEditing,
4713        imageSizes = _useSelect.imageSizes,
4714        isRTL = _useSelect.isRTL,
4715        maxWidth = _useSelect.maxWidth,
4716        mediaUpload = _useSelect.mediaUpload;
4717  
4718    var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
4719        toggleSelection = _useDispatch.toggleSelection;
4720  
4721    var _useDispatch2 = Object(external_this_wp_data_["useDispatch"])('core/notices'),
4722        createErrorNotice = _useDispatch2.createErrorNotice,
4723        createSuccessNotice = _useDispatch2.createSuccessNotice;
4724  
4725    var isLargeViewport = Object(external_this_wp_compose_["useViewportMatch"])('medium');
4726  
4727    var _useState = Object(external_this_wp_element_["useState"])(false),
4728        _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
4729        captionFocused = _useState2[0],
4730        setCaptionFocused = _useState2[1];
4731  
4732    var isWideAligned = Object(external_this_lodash_["includes"])(['wide', 'full'], align);
4733  
4734    var _useState3 = Object(external_this_wp_element_["useState"])({}),
4735        _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2),
4736        _useState4$ = _useState4[0],
4737        naturalWidth = _useState4$.naturalWidth,
4738        naturalHeight = _useState4$.naturalHeight,
4739        setNaturalSize = _useState4[1];
4740  
4741    var _useState5 = Object(external_this_wp_element_["useState"])(false),
4742        _useState6 = Object(slicedToArray["a" /* default */])(_useState5, 2),
4743        isEditingImage = _useState6[0],
4744        setIsEditingImage = _useState6[1];
4745  
4746    var _useState7 = Object(external_this_wp_element_["useState"])(),
4747        _useState8 = Object(slicedToArray["a" /* default */])(_useState7, 2),
4748        externalBlob = _useState8[0],
4749        setExternalBlob = _useState8[1];
4750  
4751    var clientWidth = useClientWidth(containerRef, [align]);
4752    var isResizable = !isWideAligned && isLargeViewport;
4753    var imageSizeOptions = Object(external_this_lodash_["map"])(Object(external_this_lodash_["filter"])(imageSizes, function (_ref2) {
4754      var slug = _ref2.slug;
4755      return Object(external_this_lodash_["get"])(image, ['media_details', 'sizes', slug, 'source_url']);
4756    }), function (_ref3) {
4757      var name = _ref3.name,
4758          slug = _ref3.slug;
4759      return {
4760        value: slug,
4761        label: name
4762      };
4763    });
4764    Object(external_this_wp_element_["useEffect"])(function () {
4765      if (!isSelected) {
4766        setCaptionFocused(false);
4767      }
4768    }, [isSelected]); // If an image is externally hosted, try to fetch the image data. This may
4769    // fail if the image host doesn't allow CORS with the domain. If it works,
4770    // we can enable a button in the toolbar to upload the image.
4771  
4772    Object(external_this_wp_element_["useEffect"])(function () {
4773      if (!edit_isExternalImage(id, url) || !isSelected || externalBlob) {
4774        return;
4775      }
4776  
4777      window.fetch(url).then(function (response) {
4778        return response.blob();
4779      }).then(function (blob) {
4780        return setExternalBlob(blob);
4781      });
4782    }, [id, url, isSelected, externalBlob]); // Focus the caption after inserting an image from the placeholder. This is
4783    // done to preserve the behaviour of focussing the first tabbable element
4784    // when a block is mounted. Previously, the image block would remount when
4785    // the placeholder is removed. Maybe this behaviour could be removed.
4786  
4787    Object(external_this_wp_element_["useEffect"])(function () {
4788      if (url && !prevUrl && isSelected) {
4789        captionRef.current.focus();
4790      }
4791    }, [url, prevUrl]);
4792  
4793    function onResizeStart() {
4794      toggleSelection(false);
4795    }
4796  
4797    function _onResizeStop() {
4798      toggleSelection(true);
4799    }
4800  
4801    function onImageError() {
4802      // Check if there's an embed block that handles this URL.
4803      var embedBlock = util_createUpgradedEmbedBlock({
4804        attributes: {
4805          url: url
4806        }
4807      });
4808  
4809      if (undefined !== embedBlock) {
4810        onReplace(embedBlock);
4811      }
4812    }
4813  
4814    function onSetHref(props) {
4815      setAttributes(props);
4816    }
4817  
4818    function onSetTitle(value) {
4819      // This is the HTML title attribute, separate from the media object
4820      // title.
4821      setAttributes({
4822        title: value
4823      });
4824    }
4825  
4826    function onFocusCaption() {
4827      if (!captionFocused) {
4828        setCaptionFocused(true);
4829      }
4830    }
4831  
4832    function onImageClick() {
4833      if (captionFocused) {
4834        setCaptionFocused(false);
4835      }
4836    }
4837  
4838    function updateAlt(newAlt) {
4839      setAttributes({
4840        alt: newAlt
4841      });
4842    }
4843  
4844    function updateImage(newSizeSlug) {
4845      var newUrl = Object(external_this_lodash_["get"])(image, ['media_details', 'sizes', newSizeSlug, 'source_url']);
4846  
4847      if (!newUrl) {
4848        return null;
4849      }
4850  
4851      setAttributes({
4852        url: newUrl,
4853        width: undefined,
4854        height: undefined,
4855        sizeSlug: newSizeSlug
4856      });
4857    }
4858  
4859    function uploadExternal() {
4860      mediaUpload({
4861        filesList: [externalBlob],
4862        onFileChange: function onFileChange(_ref4) {
4863          var _ref5 = Object(slicedToArray["a" /* default */])(_ref4, 1),
4864              img = _ref5[0];
4865  
4866          onSelectImage(img);
4867  
4868          if (Object(external_this_wp_blob_["isBlobURL"])(img.url)) {
4869            return;
4870          }
4871  
4872          setExternalBlob();
4873          createSuccessNotice(Object(external_this_wp_i18n_["__"])('Image uploaded.'), {
4874            type: 'snackbar'
4875          });
4876        },
4877        allowedTypes: ALLOWED_MEDIA_TYPES,
4878        onError: function onError(message) {
4879          createErrorNotice(message, {
4880            type: 'snackbar'
4881          });
4882        }
4883      });
4884    }
4885  
4886    Object(external_this_wp_element_["useEffect"])(function () {
4887      if (!isSelected) {
4888        setIsEditingImage(false);
4889      }
4890    }, [isSelected]);
4891    var canEditImage = id && naturalWidth && naturalHeight && imageEditing;
4892    var controls = Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockControls"], null, !isEditingImage && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarGroup"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["__experimentalImageURLInputUI"], {
4893      url: href || '',
4894      onChangeUrl: onSetHref,
4895      linkDestination: linkDestination,
4896      mediaUrl: image && image.source_url || url,
4897      mediaLink: image && image.link,
4898      linkTarget: linkTarget,
4899      linkClass: linkClass,
4900      rel: rel
4901    })), canEditImage && !isEditingImage && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarGroup"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarButton"], {
4902      onClick: function onClick() {
4903        return setIsEditingImage(true);
4904      },
4905      icon: library_crop,
4906      label: Object(external_this_wp_i18n_["__"])('Crop')
4907    })), externalBlob && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarGroup"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarButton"], {
4908      onClick: uploadExternal,
4909      icon: upload["a" /* default */],
4910      label: Object(external_this_wp_i18n_["__"])('Upload external image')
4911    })), !isEditingImage && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["MediaReplaceFlow"], {
4912      mediaId: id,
4913      mediaURL: url,
4914      allowedTypes: ALLOWED_MEDIA_TYPES,
4915      accept: "image/*",
4916      onSelect: onSelectImage,
4917      onSelectURL: onSelectURL,
4918      onError: onUploadError
4919    })), Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["InspectorControls"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["PanelBody"], {
4920      title: Object(external_this_wp_i18n_["__"])('Image settings')
4921    }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["TextareaControl"], {
4922      label: Object(external_this_wp_i18n_["__"])('Alt text (alternative text)'),
4923      value: alt,
4924      onChange: updateAlt,
4925      help: Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ExternalLink"], {
4926        href: "https://www.w3.org/WAI/tutorials/images/decision-tree"
4927      }, Object(external_this_wp_i18n_["__"])('Describe the purpose of the image')), Object(external_this_wp_i18n_["__"])('Leave empty if the image is purely decorative.'))
4928    }), Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["__experimentalImageSizeControl"], {
4929      onChangeImage: updateImage,
4930      onChange: function onChange(value) {
4931        return setAttributes(value);
4932      },
4933      slug: sizeSlug,
4934      width: width,
4935      height: height,
4936      imageSizeOptions: imageSizeOptions,
4937      isResizable: isResizable,
4938      imageWidth: naturalWidth,
4939      imageHeight: naturalHeight
4940    }))), Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["InspectorAdvancedControls"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["TextControl"], {
4941      label: Object(external_this_wp_i18n_["__"])('Title attribute'),
4942      value: title || '',
4943      onChange: onSetTitle,
4944      help: Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_i18n_["__"])('Describe the role of this image on the page.'), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ExternalLink"], {
4945        href: "https://www.w3.org/TR/html52/dom.html#the-title-attribute"
4946      }, Object(external_this_wp_i18n_["__"])('(Note: many devices and browsers do not display this text.)')))
4947    })));
4948    var filename = getFilename(url);
4949    var defaultedAlt;
4950  
4951    if (alt) {
4952      defaultedAlt = alt;
4953    } else if (filename) {
4954      defaultedAlt = Object(external_this_wp_i18n_["sprintf"])(
4955      /* translators: %s: file name */
4956      Object(external_this_wp_i18n_["__"])('This image has an empty alt attribute; its file name is %s'), filename);
4957    } else {
4958      defaultedAlt = Object(external_this_wp_i18n_["__"])('This image has an empty alt attribute');
4959    }
4960  
4961    var img = // Disable reason: Image itself is not meant to be interactive, but
4962    // should direct focus to block.
4963  
4964    /* eslint-disable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */
4965    Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])("img", {
4966      src: url,
4967      alt: defaultedAlt,
4968      onClick: onImageClick,
4969      onError: function onError() {
4970        return onImageError();
4971      },
4972      onLoad: function onLoad(event) {
4973        setNaturalSize(Object(external_this_lodash_["pick"])(event.target, ['naturalWidth', 'naturalHeight']));
4974      }
4975    }), Object(external_this_wp_blob_["isBlobURL"])(url) && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Spinner"], null))
4976    /* eslint-enable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */
4977    ;
4978    var imageWidthWithinContainer;
4979    var imageHeightWithinContainer;
4980  
4981    if (clientWidth && naturalWidth && naturalHeight) {
4982      var exceedMaxWidth = naturalWidth > clientWidth;
4983      var ratio = naturalHeight / naturalWidth;
4984      imageWidthWithinContainer = exceedMaxWidth ? clientWidth : naturalWidth;
4985      imageHeightWithinContainer = exceedMaxWidth ? clientWidth * ratio : naturalHeight;
4986    }
4987  
4988    if (canEditImage && isEditingImage) {
4989      img = Object(external_this_wp_element_["createElement"])(ImageEditor, {
4990        id: id,
4991        url: url,
4992        setAttributes: setAttributes,
4993        naturalWidth: naturalWidth,
4994        naturalHeight: naturalHeight,
4995        width: width,
4996        height: height,
4997        clientWidth: clientWidth,
4998        setIsEditingImage: setIsEditingImage
4999      });
5000    } else if (!isResizable || !imageWidthWithinContainer) {
5001      img = Object(external_this_wp_element_["createElement"])("div", {
5002        style: {
5003          width: width,
5004          height: height
5005        }
5006      }, img);
5007    } else {
5008      var currentWidth = width || imageWidthWithinContainer;
5009      var currentHeight = height || imageHeightWithinContainer;
5010  
5011      var _ratio = naturalWidth / naturalHeight;
5012  
5013      var minWidth = naturalWidth < naturalHeight ? MIN_SIZE : MIN_SIZE * _ratio;
5014      var minHeight = naturalHeight < naturalWidth ? MIN_SIZE : MIN_SIZE / _ratio; // With the current implementation of ResizableBox, an image needs an
5015      // explicit pixel value for the max-width. In absence of being able to
5016      // set the content-width, this max-width is currently dictated by the
5017      // vanilla editor style. The following variable adds a buffer to this
5018      // vanilla style, so 3rd party themes have some wiggleroom. This does,
5019      // in most cases, allow you to scale the image beyond the width of the
5020      // main column, though not infinitely.
5021      // @todo It would be good to revisit this once a content-width variable
5022      // becomes available.
5023  
5024      var maxWidthBuffer = maxWidth * 2.5;
5025      var showRightHandle = false;
5026      var showLeftHandle = false;
5027      /* eslint-disable no-lonely-if */
5028      // See https://github.com/WordPress/gutenberg/issues/7584.
5029  
5030      if (align === 'center') {
5031        // When the image is centered, show both handles.
5032        showRightHandle = true;
5033        showLeftHandle = true;
5034      } else if (isRTL) {
5035        // In RTL mode the image is on the right by default.
5036        // Show the right handle and hide the left handle only when it is
5037        // aligned left. Otherwise always show the left handle.
5038        if (align === 'left') {
5039          showRightHandle = true;
5040        } else {
5041          showLeftHandle = true;
5042        }
5043      } else {
5044        // Show the left handle and hide the right handle only when the
5045        // image is aligned right. Otherwise always show the right handle.
5046        if (align === 'right') {
5047          showLeftHandle = true;
5048        } else {
5049          showRightHandle = true;
5050        }
5051      }
5052      /* eslint-enable no-lonely-if */
5053  
5054  
5055      img = Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ResizableBox"], {
5056        size: {
5057          width: width,
5058          height: height
5059        },
5060        showHandle: isSelected,
5061        minWidth: minWidth,
5062        maxWidth: maxWidthBuffer,
5063        minHeight: minHeight,
5064        maxHeight: maxWidthBuffer / _ratio,
5065        lockAspectRatio: true,
5066        enable: {
5067          top: false,
5068          right: showRightHandle,
5069          bottom: true,
5070          left: showLeftHandle
5071        },
5072        onResizeStart: onResizeStart,
5073        onResizeStop: function onResizeStop(event, direction, elt, delta) {
5074          _onResizeStop();
5075  
5076          setAttributes({
5077            width: parseInt(currentWidth + delta.width, 10),
5078            height: parseInt(currentHeight + delta.height, 10)
5079          });
5080        }
5081      }, img);
5082    }
5083  
5084    return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, controls, img, (!external_this_wp_blockEditor_["RichText"].isEmpty(caption) || isSelected) && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"], {
5085      ref: captionRef,
5086      tagName: "figcaption",
5087      placeholder: Object(external_this_wp_i18n_["__"])('Write caption…'),
5088      value: caption,
5089      unstableOnFocus: onFocusCaption,
5090      onChange: function onChange(value) {
5091        return setAttributes({
5092          caption: value
5093        });
5094      },
5095      isSelected: captionFocused,
5096      inlineToolbar: true,
5097      __unstableOnSplitAtEnd: function __unstableOnSplitAtEnd() {
5098        return insertBlocksAfter(Object(external_this_wp_blocks_["createBlock"])('core/paragraph'));
5099      }
5100    }));
5101  }
5102  
5103  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/edit.js
5104  
5105  
5106  
5107  
5108  function image_edit_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
5109  
5110  function image_edit_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { image_edit_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { image_edit_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
5111  
5112  /**
5113   * External dependencies
5114   */
5115  
5116  
5117  /**
5118   * WordPress dependencies
5119   */
5120  
5121  
5122  
5123  
5124  
5125  
5126  
5127  
5128  /* global wp */
5129  
5130  /**
5131   * Internal dependencies
5132   */
5133  
5134  
5135  /**
5136   * Module constants
5137   */
5138  
5139  
5140  var edit_pickRelevantMediaFiles = function pickRelevantMediaFiles(image) {
5141    var imageProps = Object(external_this_lodash_["pick"])(image, ['alt', 'id', 'link', 'caption']);
5142    imageProps.url = Object(external_this_lodash_["get"])(image, ['sizes', 'large', 'url']) || Object(external_this_lodash_["get"])(image, ['media_details', 'sizes', 'large', 'source_url']) || image.url;
5143    return imageProps;
5144  };
5145  /**
5146   * Is the URL a temporary blob URL? A blob URL is one that is used temporarily
5147   * while the image is being uploaded and will not have an id yet allocated.
5148   *
5149   * @param {number=} id The id of the image.
5150   * @param {string=} url The url of the image.
5151   *
5152   * @return {boolean} Is the URL a Blob URL
5153   */
5154  
5155  var edit_isTemporaryImage = function isTemporaryImage(id, url) {
5156    return !id && Object(external_this_wp_blob_["isBlobURL"])(url);
5157  };
5158  /**
5159   * Is the url for the image hosted externally. An externally hosted image has no
5160   * id and is not a blob url.
5161   *
5162   * @param {number=} id  The id of the image.
5163   * @param {string=} url The url of the image.
5164   *
5165   * @return {boolean} Is the url an externally hosted url?
5166   */
5167  
5168  
5169  var edit_isExternalImage = function isExternalImage(id, url) {
5170    return url && !id && !Object(external_this_wp_blob_["isBlobURL"])(url);
5171  };
5172  function ImageEdit(_ref) {
5173    var attributes = _ref.attributes,
5174        setAttributes = _ref.setAttributes,
5175        isSelected = _ref.isSelected,
5176        className = _ref.className,
5177        noticeUI = _ref.noticeUI,
5178        insertBlocksAfter = _ref.insertBlocksAfter,
5179        noticeOperations = _ref.noticeOperations,
5180        onReplace = _ref.onReplace;
5181    var _attributes$url = attributes.url,
5182        url = _attributes$url === void 0 ? '' : _attributes$url,
5183        alt = attributes.alt,
5184        caption = attributes.caption,
5185        align = attributes.align,
5186        id = attributes.id,
5187        width = attributes.width,
5188        height = attributes.height,
5189        sizeSlug = attributes.sizeSlug;
5190    var altRef = Object(external_this_wp_element_["useRef"])();
5191    Object(external_this_wp_element_["useEffect"])(function () {
5192      altRef.current = alt;
5193    }, [alt]);
5194    var captionRef = Object(external_this_wp_element_["useRef"])();
5195    Object(external_this_wp_element_["useEffect"])(function () {
5196      captionRef.current = caption;
5197    }, [caption]);
5198    var ref = Object(external_this_wp_element_["useRef"])();
5199    var mediaUpload = Object(external_this_wp_data_["useSelect"])(function (select) {
5200      var _select = select('core/block-editor'),
5201          getSettings = _select.getSettings;
5202  
5203      return getSettings().mediaUpload;
5204    });
5205  
5206    function onUploadError(message) {
5207      noticeOperations.removeAllNotices();
5208      noticeOperations.createErrorNotice(message);
5209    }
5210  
5211    function onSelectImage(media) {
5212      var _wp, _wp$media, _wp$media$view, _wp$media$view$settin, _wp$media$view$settin2;
5213  
5214      if (!media || !media.url) {
5215        setAttributes({
5216          url: undefined,
5217          alt: undefined,
5218          id: undefined,
5219          title: undefined,
5220          caption: undefined
5221        });
5222        return;
5223      }
5224  
5225      var mediaAttributes = edit_pickRelevantMediaFiles(media); // If the current image is temporary but an alt text was meanwhile
5226      // written by the user, make sure the text is not overwritten.
5227  
5228      if (edit_isTemporaryImage(id, url)) {
5229        if (altRef.current) {
5230          mediaAttributes = Object(external_this_lodash_["omit"])(mediaAttributes, ['alt']);
5231        }
5232      } // If a caption text was meanwhile written by the user,
5233      // make sure the text is not overwritten by empty captions.
5234  
5235  
5236      if (captionRef.current && !Object(external_this_lodash_["get"])(mediaAttributes, ['caption'])) {
5237        mediaAttributes = Object(external_this_lodash_["omit"])(mediaAttributes, ['caption']);
5238      }
5239  
5240      var additionalAttributes; // Reset the dimension attributes if changing to a different image.
5241  
5242      if (!media.id || media.id !== id) {
5243        additionalAttributes = {
5244          width: undefined,
5245          height: undefined,
5246          sizeSlug: DEFAULT_SIZE_SLUG
5247        };
5248      } else {
5249        // Keep the same url when selecting the same file, so "Image Size"
5250        // option is not changed.
5251        additionalAttributes = {
5252          url: url
5253        };
5254      } // Check if default link setting should be used.
5255  
5256  
5257      var linkDestination = attributes.linkDestination;
5258  
5259      if (!linkDestination) {
5260        // Use the WordPress option to determine the proper default.
5261        // The constants used in Gutenberg do not match WP options so a little more complicated than ideal.
5262        // TODO: fix this in a follow up PR, requires updating media-text and ui component.
5263        switch (((_wp = wp) === null || _wp === void 0 ? void 0 : (_wp$media = _wp.media) === null || _wp$media === void 0 ? void 0 : (_wp$media$view = _wp$media.view) === null || _wp$media$view === void 0 ? void 0 : (_wp$media$view$settin = _wp$media$view.settings) === null || _wp$media$view$settin === void 0 ? void 0 : (_wp$media$view$settin2 = _wp$media$view$settin.defaultProps) === null || _wp$media$view$settin2 === void 0 ? void 0 : _wp$media$view$settin2.link) || LINK_DESTINATION_NONE) {
5264          case 'file':
5265          case LINK_DESTINATION_MEDIA:
5266            linkDestination = LINK_DESTINATION_MEDIA;
5267            break;
5268  
5269          case 'post':
5270          case LINK_DESTINATION_ATTACHMENT:
5271            linkDestination = LINK_DESTINATION_ATTACHMENT;
5272            break;
5273  
5274          case LINK_DESTINATION_CUSTOM:
5275            linkDestination = LINK_DESTINATION_CUSTOM;
5276            break;
5277  
5278          case LINK_DESTINATION_NONE:
5279            linkDestination = LINK_DESTINATION_NONE;
5280            break;
5281        }
5282      } // Check if the image is linked to it's media.
5283  
5284  
5285      var href;
5286  
5287      switch (linkDestination) {
5288        case LINK_DESTINATION_MEDIA:
5289          href = media.url;
5290          break;
5291  
5292        case LINK_DESTINATION_ATTACHMENT:
5293          href = media.link;
5294          break;
5295      }
5296  
5297      mediaAttributes.href = href;
5298      setAttributes(image_edit_objectSpread(image_edit_objectSpread(image_edit_objectSpread({}, mediaAttributes), additionalAttributes), {}, {
5299        linkDestination: linkDestination
5300      }));
5301    }
5302  
5303    function onSelectURL(newURL) {
5304      if (newURL !== url) {
5305        setAttributes({
5306          url: newURL,
5307          id: undefined,
5308          sizeSlug: DEFAULT_SIZE_SLUG
5309        });
5310      }
5311    }
5312  
5313    function updateAlignment(nextAlign) {
5314      var extraUpdatedAttributes = ['wide', 'full'].includes(nextAlign) ? {
5315        width: undefined,
5316        height: undefined
5317      } : {};
5318      setAttributes(image_edit_objectSpread(image_edit_objectSpread({}, extraUpdatedAttributes), {}, {
5319        align: nextAlign
5320      }));
5321    }
5322  
5323    var isTemp = edit_isTemporaryImage(id, url); // Upload a temporary image on mount.
5324  
5325    Object(external_this_wp_element_["useEffect"])(function () {
5326      if (!isTemp) {
5327        return;
5328      }
5329  
5330      var file = Object(external_this_wp_blob_["getBlobByURL"])(url);
5331  
5332      if (file) {
5333        mediaUpload({
5334          filesList: [file],
5335          onFileChange: function onFileChange(_ref2) {
5336            var _ref3 = Object(slicedToArray["a" /* default */])(_ref2, 1),
5337                img = _ref3[0];
5338  
5339            onSelectImage(img);
5340          },
5341          allowedTypes: ALLOWED_MEDIA_TYPES,
5342          onError: function onError(message) {
5343            noticeOperations.createErrorNotice(message);
5344            setAttributes({
5345              src: undefined,
5346              id: undefined,
5347              url: undefined
5348            });
5349          }
5350        });
5351      }
5352    }, []); // If an image is temporary, revoke the Blob url when it is uploaded (and is
5353    // no longer temporary).
5354  
5355    Object(external_this_wp_element_["useEffect"])(function () {
5356      if (!isTemp) {
5357        return;
5358      }
5359  
5360      return function () {
5361        Object(external_this_wp_blob_["revokeBlobURL"])(url);
5362      };
5363    }, [isTemp]);
5364    var isExternal = edit_isExternalImage(id, url);
5365    var controls = Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockControls"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockAlignmentToolbar"], {
5366      value: align,
5367      onChange: updateAlignment
5368    }));
5369    var src = isExternal ? url : undefined;
5370    var mediaPreview = !!url && Object(external_this_wp_element_["createElement"])("img", {
5371      alt: Object(external_this_wp_i18n_["__"])('Edit image'),
5372      title: Object(external_this_wp_i18n_["__"])('Edit image'),
5373      className: 'edit-image-preview',
5374      src: url
5375    });
5376    var mediaPlaceholder = Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["MediaPlaceholder"], {
5377      icon: Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockIcon"], {
5378        icon: library_image
5379      }),
5380      onSelect: onSelectImage,
5381      onSelectURL: onSelectURL,
5382      notices: noticeUI,
5383      onError: onUploadError,
5384      accept: "image/*",
5385      allowedTypes: ALLOWED_MEDIA_TYPES,
5386      value: {
5387        id: id,
5388        src: src
5389      },
5390      mediaPreview: mediaPreview,
5391      disableMediaButtons: url
5392    });
5393    var classes = classnames_default()(className, Object(defineProperty["a" /* default */])({
5394      'is-transient': Object(external_this_wp_blob_["isBlobURL"])(url),
5395      'is-resized': !!width || !!height,
5396      'is-focused': isSelected
5397    }, "size-".concat(sizeSlug), sizeSlug));
5398    var blockProps = Object(external_this_wp_blockEditor_["useBlockProps"])({
5399      ref: ref,
5400      className: classes
5401    });
5402    return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, controls, Object(external_this_wp_element_["createElement"])("figure", blockProps, url && Object(external_this_wp_element_["createElement"])(Image, {
5403      attributes: attributes,
5404      setAttributes: setAttributes,
5405      isSelected: isSelected,
5406      insertBlocksAfter: insertBlocksAfter,
5407      onReplace: onReplace,
5408      onSelectImage: onSelectImage,
5409      onSelectURL: onSelectURL,
5410      onUploadError: onUploadError,
5411      containerRef: ref
5412    }), mediaPlaceholder));
5413  }
5414  /* harmony default export */ var image_edit = (Object(external_this_wp_components_["withNotices"])(ImageEdit));
5415  
5416  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/save.js
5417  
5418  
5419  
5420  /**
5421   * External dependencies
5422   */
5423  
5424  
5425  /**
5426   * WordPress dependencies
5427   */
5428  
5429  
5430  function image_save_save(_ref) {
5431    var _classnames;
5432  
5433    var attributes = _ref.attributes;
5434    var url = attributes.url,
5435        alt = attributes.alt,
5436        caption = attributes.caption,
5437        align = attributes.align,
5438        href = attributes.href,
5439        rel = attributes.rel,
5440        linkClass = attributes.linkClass,
5441        width = attributes.width,
5442        height = attributes.height,
5443        id = attributes.id,
5444        linkTarget = attributes.linkTarget,
5445        sizeSlug = attributes.sizeSlug,
5446        title = attributes.title;
5447    var newRel = Object(external_this_lodash_["isEmpty"])(rel) ? undefined : rel;
5448    var classes = classnames_default()((_classnames = {}, Object(defineProperty["a" /* default */])(_classnames, "align".concat(align), align), Object(defineProperty["a" /* default */])(_classnames, "size-".concat(sizeSlug), sizeSlug), Object(defineProperty["a" /* default */])(_classnames, 'is-resized', width || height), _classnames));
5449    var image = Object(external_this_wp_element_["createElement"])("img", {
5450      src: url,
5451      alt: alt,
5452      className: id ? "wp-image-".concat(id) : null,
5453      width: width,
5454      height: height,
5455      title: title
5456    });
5457    var figure = Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, href ? Object(external_this_wp_element_["createElement"])("a", {
5458      className: linkClass,
5459      href: href,
5460      target: linkTarget,
5461      rel: newRel
5462    }, image) : image, !external_this_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
5463      tagName: "figcaption",
5464      value: caption
5465    }));
5466  
5467    if ('left' === align || 'right' === align || 'center' === align) {
5468      return Object(external_this_wp_element_["createElement"])("div", external_this_wp_blockEditor_["useBlockProps"].save(), Object(external_this_wp_element_["createElement"])("figure", {
5469        className: classes
5470      }, figure));
5471    }
5472  
5473    return Object(external_this_wp_element_["createElement"])("figure", external_this_wp_blockEditor_["useBlockProps"].save({
5474      className: classes
5475    }), figure);
5476  }
5477  
5478  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/transforms.js
5479  
5480  
5481  function transforms_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
5482  
5483  function transforms_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { transforms_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { transforms_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
5484  
5485  /**
5486   * WordPress dependencies
5487   */
5488  
5489  
5490  function stripFirstImage(attributes, _ref) {
5491    var shortcode = _ref.shortcode;
5492  
5493    var _document$implementat = document.implementation.createHTMLDocument(''),
5494        body = _document$implementat.body;
5495  
5496    body.innerHTML = shortcode.content;
5497    var nodeToRemove = body.querySelector('img'); // if an image has parents, find the topmost node to remove
5498  
5499    while (nodeToRemove && nodeToRemove.parentNode && nodeToRemove.parentNode !== body) {
5500      nodeToRemove = nodeToRemove.parentNode;
5501    }
5502  
5503    if (nodeToRemove) {
5504      nodeToRemove.parentNode.removeChild(nodeToRemove);
5505    }
5506  
5507    return body.innerHTML.trim();
5508  }
5509  
5510  function getFirstAnchorAttributeFormHTML(html, attributeName) {
5511    var _document$implementat2 = document.implementation.createHTMLDocument(''),
5512        body = _document$implementat2.body;
5513  
5514    body.innerHTML = html;
5515    var firstElementChild = body.firstElementChild;
5516  
5517    if (firstElementChild && firstElementChild.nodeName === 'A') {
5518      return firstElementChild.getAttribute(attributeName) || undefined;
5519    }
5520  }
5521  
5522  var imageSchema = {
5523    img: {
5524      attributes: ['src', 'alt', 'title'],
5525      classes: ['alignleft', 'aligncenter', 'alignright', 'alignnone', /^wp-image-\d+$/]
5526    }
5527  };
5528  
5529  var schema = function schema(_ref2) {
5530    var phrasingContentSchema = _ref2.phrasingContentSchema;
5531    return {
5532      figure: {
5533        require: ['img'],
5534        children: transforms_objectSpread(transforms_objectSpread({}, imageSchema), {}, {
5535          a: {
5536            attributes: ['href', 'rel', 'target'],
5537            children: imageSchema
5538          },
5539          figcaption: {
5540            children: phrasingContentSchema
5541          }
5542        })
5543      }
5544    };
5545  };
5546  
5547  var transforms_transforms = {
5548    from: [{
5549      type: 'raw',
5550      isMatch: function isMatch(node) {
5551        return node.nodeName === 'FIGURE' && !!node.querySelector('img');
5552      },
5553      schema: schema,
5554      transform: function transform(node) {
5555        // Search both figure and image classes. Alignment could be
5556        // set on either. ID is set on the image.
5557        var className = node.className + ' ' + node.querySelector('img').className;
5558        var alignMatches = /(?:^|\s)align(left|center|right)(?:$|\s)/.exec(className);
5559        var anchor = node.id === '' ? undefined : node.id;
5560        var align = alignMatches ? alignMatches[1] : undefined;
5561        var idMatches = /(?:^|\s)wp-image-(\d+)(?:$|\s)/.exec(className);
5562        var id = idMatches ? Number(idMatches[1]) : undefined;
5563        var anchorElement = node.querySelector('a');
5564        var linkDestination = anchorElement && anchorElement.href ? 'custom' : undefined;
5565        var href = anchorElement && anchorElement.href ? anchorElement.href : undefined;
5566        var rel = anchorElement && anchorElement.rel ? anchorElement.rel : undefined;
5567        var linkClass = anchorElement && anchorElement.className ? anchorElement.className : undefined;
5568        var attributes = Object(external_this_wp_blocks_["getBlockAttributes"])('core/image', node.outerHTML, {
5569          align: align,
5570          id: id,
5571          linkDestination: linkDestination,
5572          href: href,
5573          rel: rel,
5574          linkClass: linkClass,
5575          anchor: anchor
5576        });
5577        return Object(external_this_wp_blocks_["createBlock"])('core/image', attributes);
5578      }
5579    }, {
5580      type: 'files',
5581      isMatch: function isMatch(files) {
5582        return files.length === 1 && files[0].type.indexOf('image/') === 0;
5583      },
5584      transform: function transform(files) {
5585        var file = files[0]; // We don't need to upload the media directly here
5586        // It's already done as part of the `componentDidMount`
5587        // int the image block
5588  
5589        return Object(external_this_wp_blocks_["createBlock"])('core/image', {
5590          url: Object(external_this_wp_blob_["createBlobURL"])(file)
5591        });
5592      }
5593    }, {
5594      type: 'shortcode',
5595      tag: 'caption',
5596      attributes: {
5597        url: {
5598          type: 'string',
5599          source: 'attribute',
5600          attribute: 'src',
5601          selector: 'img'
5602        },
5603        alt: {
5604          type: 'string',
5605          source: 'attribute',
5606          attribute: 'alt',
5607          selector: 'img'
5608        },
5609        caption: {
5610          shortcode: stripFirstImage
5611        },
5612        href: {
5613          shortcode: function shortcode(attributes, _ref3) {
5614            var _shortcode = _ref3.shortcode;
5615            return getFirstAnchorAttributeFormHTML(_shortcode.content, 'href');
5616          }
5617        },
5618        rel: {
5619          shortcode: function shortcode(attributes, _ref4) {
5620            var _shortcode2 = _ref4.shortcode;
5621            return getFirstAnchorAttributeFormHTML(_shortcode2.content, 'rel');
5622          }
5623        },
5624        linkClass: {
5625          shortcode: function shortcode(attributes, _ref5) {
5626            var _shortcode3 = _ref5.shortcode;
5627            return getFirstAnchorAttributeFormHTML(_shortcode3.content, 'class');
5628          }
5629        },
5630        id: {
5631          type: 'number',
5632          shortcode: function shortcode(_ref6) {
5633            var id = _ref6.named.id;
5634  
5635            if (!id) {
5636              return;
5637            }
5638  
5639            return parseInt(id.replace('attachment_', ''), 10);
5640          }
5641        },
5642        align: {
5643          type: 'string',
5644          shortcode: function shortcode(_ref7) {
5645            var _ref7$named$align = _ref7.named.align,
5646                align = _ref7$named$align === void 0 ? 'alignnone' : _ref7$named$align;
5647            return align.replace('align', '');
5648          }
5649        }
5650      }
5651    }]
5652  };
5653  /* harmony default export */ var image_transforms = (transforms_transforms);
5654  
5655  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/index.js
5656  /**
5657   * WordPress dependencies
5658   */
5659  
5660  
5661  /**
5662   * Internal dependencies
5663   */
5664  
5665  
5666  
5667  var image_metadata = {
5668    apiVersion: 2,
5669    name: "core/image",
5670    category: "media",
5671    attributes: {
5672      align: {
5673        type: "string"
5674      },
5675      url: {
5676        type: "string",
5677        source: "attribute",
5678        selector: "img",
5679        attribute: "src"
5680      },
5681      alt: {
5682        type: "string",
5683        source: "attribute",
5684        selector: "img",
5685        attribute: "alt",
5686        "default": ""
5687      },
5688      caption: {
5689        type: "string",
5690        source: "html",
5691        selector: "figcaption"
5692      },
5693      title: {
5694        type: "string",
5695        source: "attribute",
5696        selector: "img",
5697        attribute: "title"
5698      },
5699      href: {
5700        type: "string",
5701        source: "attribute",
5702        selector: "figure > a",
5703        attribute: "href"
5704      },
5705      rel: {
5706        type: "string",
5707        source: "attribute",
5708        selector: "figure > a",
5709        attribute: "rel"
5710      },
5711      linkClass: {
5712        type: "string",
5713        source: "attribute",
5714        selector: "figure > a",
5715        attribute: "class"
5716      },
5717      id: {
5718        type: "number"
5719      },
5720      width: {
5721        type: "number"
5722      },
5723      height: {
5724        type: "number"
5725      },
5726      sizeSlug: {
5727        type: "string"
5728      },
5729      linkDestination: {
5730        type: "string"
5731      },
5732      linkTarget: {
5733        type: "string",
5734        source: "attribute",
5735        selector: "figure > a",
5736        attribute: "target"
5737      }
5738    },
5739    supports: {
5740      anchor: true
5741    }
5742  };
5743  
5744  
5745  var image_name = image_metadata.name;
5746  
5747  var image_settings = {
5748    title: Object(external_this_wp_i18n_["__"])('Image'),
5749    description: Object(external_this_wp_i18n_["__"])('Insert an image to make a visual statement.'),
5750    icon: library_image,
5751    keywords: ['img', // "img" is not translated as it is intended to reflect the HTML <img> tag.
5752    Object(external_this_wp_i18n_["__"])('photo'), Object(external_this_wp_i18n_["__"])('picture')],
5753    example: {
5754      attributes: {
5755        sizeSlug: 'large',
5756        url: 'https://s.w.org/images/core/5.3/MtBlanc1.jpg',
5757        // translators: Caption accompanying an image of the Mont Blanc, which serves as an example for the Image block.
5758        caption: Object(external_this_wp_i18n_["__"])('Mont Blanc appears—still, snowy, and serene.')
5759      }
5760    },
5761    styles: [{
5762      name: 'default',
5763      label: Object(external_this_wp_i18n_["_x"])('Default', 'block style'),
5764      isDefault: true
5765    }, {
5766      name: 'rounded',
5767      label: Object(external_this_wp_i18n_["_x"])('Rounded', 'block style')
5768    }],
5769    __experimentalLabel: function __experimentalLabel(attributes, _ref) {
5770      var context = _ref.context;
5771  
5772      if (context === 'accessibility') {
5773        var caption = attributes.caption,
5774            alt = attributes.alt,
5775            url = attributes.url;
5776  
5777        if (!url) {
5778          return Object(external_this_wp_i18n_["__"])('Empty');
5779        }
5780  
5781        if (!alt) {
5782          return caption || '';
5783        } // This is intended to be read by a screen reader.
5784        // A period simply means a pause, no need to translate it.
5785  
5786  
5787        return alt + (caption ? '. ' + caption : '');
5788      }
5789    },
5790    getEditWrapperProps: function getEditWrapperProps(attributes) {
5791      return {
5792        'data-align': attributes.align
5793      };
5794    },
5795    transforms: image_transforms,
5796    edit: image_edit,
5797    save: image_save_save,
5798    deprecated: image_deprecated
5799  };
5800  
5801  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/heading.js
5802  
5803  
5804  /**
5805   * WordPress dependencies
5806   */
5807  
5808  var heading = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
5809    xmlns: "http://www.w3.org/2000/svg",
5810    viewBox: "0 0 24 24"
5811  }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
5812    d: "M6.2 5.2v13.4l5.8-4.8 5.8 4.8V5.2z"
5813  }));
5814  /* harmony default export */ var library_heading = (heading);
5815  
5816  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
5817  var objectWithoutProperties = __webpack_require__(14);
5818  
5819  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/deprecated.js
5820  
5821  
5822  
5823  
5824  function deprecated_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
5825  
5826  function deprecated_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { deprecated_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { deprecated_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
5827  
5828  /**
5829   * External dependencies
5830   */
5831  
5832  
5833  /**
5834   * WordPress dependencies
5835   */
5836  
5837  
5838  var blockSupports = {
5839    className: false,
5840    anchor: true
5841  };
5842  var heading_deprecated_blockAttributes = {
5843    align: {
5844      type: 'string'
5845    },
5846    content: {
5847      type: 'string',
5848      source: 'html',
5849      selector: 'h1,h2,h3,h4,h5,h6',
5850      default: ''
5851    },
5852    level: {
5853      type: 'number',
5854      default: 2
5855    },
5856    placeholder: {
5857      type: 'string'
5858    }
5859  };
5860  
5861  var deprecated_migrateCustomColors = function migrateCustomColors(attributes) {
5862    if (!attributes.customTextColor) {
5863      return attributes;
5864    }
5865  
5866    var style = {
5867      color: {
5868        text: attributes.customTextColor
5869      }
5870    };
5871    return deprecated_objectSpread(deprecated_objectSpread({}, Object(external_this_lodash_["omit"])(attributes, ['customTextColor'])), {}, {
5872      style: style
5873    });
5874  };
5875  
5876  var TEXT_ALIGN_OPTIONS = ['left', 'right', 'center'];
5877  
5878  var deprecated_migrateTextAlign = function migrateTextAlign(attributes) {
5879    var align = attributes.align,
5880        rest = Object(objectWithoutProperties["a" /* default */])(attributes, ["align"]);
5881  
5882    return TEXT_ALIGN_OPTIONS.includes(align) ? deprecated_objectSpread(deprecated_objectSpread({}, rest), {}, {
5883      textAlign: align
5884    }) : attributes;
5885  };
5886  
5887  var heading_deprecated_deprecated = [{
5888    supports: {
5889      align: ['wide', 'full'],
5890      anchor: true,
5891      className: false,
5892      color: {
5893        link: true
5894      },
5895      fontSize: true,
5896      lineHeight: true,
5897      __experimentalSelector: {
5898        'core/heading/h1': 'h1',
5899        'core/heading/h2': 'h2',
5900        'core/heading/h3': 'h3',
5901        'core/heading/h4': 'h4',
5902        'core/heading/h5': 'h5',
5903        'core/heading/h6': 'h6'
5904      },
5905      __unstablePasteTextInline: true
5906    },
5907    attributes: heading_deprecated_blockAttributes,
5908    isEligible: function isEligible(_ref) {
5909      var align = _ref.align;
5910      return TEXT_ALIGN_OPTIONS.includes(align);
5911    },
5912    migrate: deprecated_migrateTextAlign,
5913    save: function save(_ref2) {
5914      var attributes = _ref2.attributes;
5915      var align = attributes.align,
5916          content = attributes.content,
5917          level = attributes.level;
5918      var TagName = 'h' + level;
5919      var className = classnames_default()(Object(defineProperty["a" /* default */])({}, "has-text-align-".concat(align), align));
5920      return Object(external_this_wp_element_["createElement"])(TagName, external_this_wp_blockEditor_["useBlockProps"].save({
5921        className: className
5922      }), Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
5923        value: content
5924      }));
5925    }
5926  }, {
5927    supports: blockSupports,
5928    attributes: deprecated_objectSpread(deprecated_objectSpread({}, heading_deprecated_blockAttributes), {}, {
5929      customTextColor: {
5930        type: 'string'
5931      },
5932      textColor: {
5933        type: 'string'
5934      }
5935    }),
5936    migrate: function migrate(attributes) {
5937      return deprecated_migrateCustomColors(deprecated_migrateTextAlign(attributes));
5938    },
5939    save: function save(_ref3) {
5940      var _classnames2;
5941  
5942      var attributes = _ref3.attributes;
5943      var align = attributes.align,
5944          content = attributes.content,
5945          customTextColor = attributes.customTextColor,
5946          level = attributes.level,
5947          textColor = attributes.textColor;
5948      var tagName = 'h' + level;
5949      var textClass = Object(external_this_wp_blockEditor_["getColorClassName"])('color', textColor);
5950      var className = classnames_default()((_classnames2 = {}, Object(defineProperty["a" /* default */])(_classnames2, textClass, textClass), Object(defineProperty["a" /* default */])(_classnames2, 'has-text-color', textColor || customTextColor), Object(defineProperty["a" /* default */])(_classnames2, "has-text-align-".concat(align), align), _classnames2));
5951      return Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
5952        className: className ? className : undefined,
5953        tagName: tagName,
5954        style: {
5955          color: textClass ? undefined : customTextColor
5956        },
5957        value: content
5958      });
5959    }
5960  }, {
5961    attributes: deprecated_objectSpread(deprecated_objectSpread({}, heading_deprecated_blockAttributes), {}, {
5962      customTextColor: {
5963        type: 'string'
5964      },
5965      textColor: {
5966        type: 'string'
5967      }
5968    }),
5969    migrate: function migrate(attributes) {
5970      return deprecated_migrateCustomColors(deprecated_migrateTextAlign(attributes));
5971    },
5972    save: function save(_ref4) {
5973      var _classnames3;
5974  
5975      var attributes = _ref4.attributes;
5976      var align = attributes.align,
5977          content = attributes.content,
5978          customTextColor = attributes.customTextColor,
5979          level = attributes.level,
5980          textColor = attributes.textColor;
5981      var tagName = 'h' + level;
5982      var textClass = Object(external_this_wp_blockEditor_["getColorClassName"])('color', textColor);
5983      var className = classnames_default()((_classnames3 = {}, Object(defineProperty["a" /* default */])(_classnames3, textClass, textClass), Object(defineProperty["a" /* default */])(_classnames3, "has-text-align-".concat(align), align), _classnames3));
5984      return Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
5985        className: className ? className : undefined,
5986        tagName: tagName,
5987        style: {
5988          color: textClass ? undefined : customTextColor
5989        },
5990        value: content
5991      });
5992    },
5993    supports: blockSupports
5994  }, {
5995    supports: blockSupports,
5996    attributes: deprecated_objectSpread(deprecated_objectSpread({}, heading_deprecated_blockAttributes), {}, {
5997      customTextColor: {
5998        type: 'string'
5999      },
6000      textColor: {
6001        type: 'string'
6002      }
6003    }),
6004    migrate: function migrate(attributes) {
6005      return deprecated_migrateCustomColors(deprecated_migrateTextAlign(attributes));
6006    },
6007    save: function save(_ref5) {
6008      var attributes = _ref5.attributes;
6009      var align = attributes.align,
6010          level = attributes.level,
6011          content = attributes.content,
6012          textColor = attributes.textColor,
6013          customTextColor = attributes.customTextColor;
6014      var tagName = 'h' + level;
6015      var textClass = Object(external_this_wp_blockEditor_["getColorClassName"])('color', textColor);
6016      var className = classnames_default()(Object(defineProperty["a" /* default */])({}, textClass, textClass));
6017      return Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
6018        className: className ? className : undefined,
6019        tagName: tagName,
6020        style: {
6021          textAlign: align,
6022          color: textClass ? undefined : customTextColor
6023        },
6024        value: content
6025      });
6026    }
6027  }];
6028  /* harmony default export */ var heading_deprecated = (heading_deprecated_deprecated);
6029  
6030  // EXTERNAL MODULE: external {"this":["wp","keycodes"]}
6031  var external_this_wp_keycodes_ = __webpack_require__(18);
6032  
6033  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/heading-level-icon.js
6034  
6035  
6036  /**
6037   * WordPress dependencies
6038   */
6039  
6040  /** @typedef {import('@wordpress/element').WPComponent} WPComponent */
6041  
6042  /**
6043   * HeadingLevelIcon props.
6044   *
6045   * @typedef WPHeadingLevelIconProps
6046   *
6047   * @property {number}   level     The heading level to show an icon for.
6048   * @property {?boolean} isPressed Whether or not the icon should appear pressed; default: false.
6049   */
6050  
6051  /**
6052   * Heading level icon.
6053   *
6054   * @param {WPHeadingLevelIconProps} props Component props.
6055   *
6056   * @return {?WPComponent} The icon.
6057   */
6058  
6059  function HeadingLevelIcon(_ref) {
6060    var level = _ref.level,
6061        _ref$isPressed = _ref.isPressed,
6062        isPressed = _ref$isPressed === void 0 ? false : _ref$isPressed;
6063    var levelToPath = {
6064      1: 'M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z',
6065      2: 'M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z',
6066      3: 'M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z',
6067      4: 'M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z',
6068      5: 'M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z',
6069      6: 'M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z'
6070    };
6071  
6072    if (!levelToPath.hasOwnProperty(level)) {
6073      return null;
6074    }
6075  
6076    return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["SVG"], {
6077      width: "24",
6078      height: "24",
6079      viewBox: "0 0 20 20",
6080      xmlns: "http://www.w3.org/2000/svg",
6081      isPressed: isPressed
6082    }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Path"], {
6083      d: levelToPath[level]
6084    }));
6085  }
6086  
6087  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/heading-level-dropdown.js
6088  
6089  
6090  /**
6091   * WordPress dependencies
6092   */
6093  
6094  
6095  
6096  /**
6097   * Internal dependencies
6098   */
6099  
6100  
6101  var HEADING_LEVELS = [1, 2, 3, 4, 5, 6];
6102  var heading_level_dropdown_POPOVER_PROPS = {
6103    className: 'block-library-heading-level-dropdown',
6104    isAlternate: true
6105  };
6106  /** @typedef {import('@wordpress/element').WPComponent} WPComponent */
6107  
6108  /**
6109   * HeadingLevelDropdown props.
6110   *
6111   * @typedef WPHeadingLevelDropdownProps
6112   *
6113   * @property {number}                 selectedLevel The chosen heading level.
6114   * @property {(newValue:number)=>any} onChange      Callback to run when
6115   *                                                  toolbar value is changed.
6116   */
6117  
6118  /**
6119   * Dropdown for selecting a heading level (1 through 6).
6120   *
6121   * @param {WPHeadingLevelDropdownProps} props Component props.
6122   *
6123   * @return {WPComponent} The toolbar.
6124   */
6125  
6126  function HeadingLevelDropdown(_ref) {
6127    var selectedLevel = _ref.selectedLevel,
6128        onChange = _ref.onChange;
6129    return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Dropdown"], {
6130      popoverProps: heading_level_dropdown_POPOVER_PROPS,
6131      renderToggle: function renderToggle(_ref2) {
6132        var onToggle = _ref2.onToggle,
6133            isOpen = _ref2.isOpen;
6134  
6135        var openOnArrowDown = function openOnArrowDown(event) {
6136          if (!isOpen && event.keyCode === external_this_wp_keycodes_["DOWN"]) {
6137            event.preventDefault();
6138            event.stopPropagation();
6139            onToggle();
6140          }
6141        };
6142  
6143        return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarButton"], {
6144          "aria-expanded": isOpen,
6145          "aria-haspopup": "true",
6146          icon: Object(external_this_wp_element_["createElement"])(HeadingLevelIcon, {
6147            level: selectedLevel
6148          }),
6149          label: Object(external_this_wp_i18n_["__"])('Change heading level'),
6150          onClick: onToggle,
6151          onKeyDown: openOnArrowDown,
6152          showTooltip: true
6153        });
6154      },
6155      renderContent: function renderContent() {
6156        return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Toolbar"], {
6157          className: "block-library-heading-level-toolbar",
6158          label: Object(external_this_wp_i18n_["__"])('Change heading level')
6159        }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarGroup"], {
6160          isCollapsed: false,
6161          controls: HEADING_LEVELS.map(function (targetLevel) {
6162            var isActive = targetLevel === selectedLevel;
6163            return {
6164              icon: Object(external_this_wp_element_["createElement"])(HeadingLevelIcon, {
6165                level: targetLevel,
6166                isPressed: isActive
6167              }),
6168              title: Object(external_this_wp_i18n_["sprintf"])( // translators: %s: heading level e.g: "1", "2", "3"
6169              Object(external_this_wp_i18n_["__"])('Heading %d'), targetLevel),
6170              isActive: isActive,
6171              onClick: function onClick() {
6172                onChange(targetLevel);
6173              }
6174            };
6175          })
6176        }));
6177      }
6178    });
6179  }
6180  
6181  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/edit.js
6182  
6183  
6184  
6185  
6186  function heading_edit_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
6187  
6188  function heading_edit_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { heading_edit_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { heading_edit_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
6189  
6190  /**
6191   * External dependencies
6192   */
6193  
6194  /**
6195   * WordPress dependencies
6196   */
6197  
6198  
6199  
6200  
6201  
6202  /**
6203   * Internal dependencies
6204   */
6205  
6206  
6207  
6208  function HeadingEdit(_ref) {
6209    var attributes = _ref.attributes,
6210        setAttributes = _ref.setAttributes,
6211        mergeBlocks = _ref.mergeBlocks,
6212        onReplace = _ref.onReplace,
6213        mergedStyle = _ref.mergedStyle;
6214    var textAlign = attributes.textAlign,
6215        content = attributes.content,
6216        level = attributes.level,
6217        placeholder = attributes.placeholder;
6218    var tagName = 'h' + level;
6219    var blockProps = Object(external_this_wp_blockEditor_["useBlockProps"])({
6220      className: classnames_default()(Object(defineProperty["a" /* default */])({}, "has-text-align-".concat(textAlign), textAlign)),
6221      style: mergedStyle
6222    });
6223    return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockControls"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarGroup"], null, Object(external_this_wp_element_["createElement"])(HeadingLevelDropdown, {
6224      selectedLevel: level,
6225      onChange: function onChange(newLevel) {
6226        return setAttributes({
6227          level: newLevel
6228        });
6229      }
6230    })), Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["AlignmentToolbar"], {
6231      value: textAlign,
6232      onChange: function onChange(nextAlign) {
6233        setAttributes({
6234          textAlign: nextAlign
6235        });
6236      }
6237    })), Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"], Object(esm_extends["a" /* default */])({
6238      identifier: "content",
6239      tagName: tagName,
6240      value: content,
6241      onChange: function onChange(value) {
6242        return setAttributes({
6243          content: value
6244        });
6245      },
6246      onMerge: mergeBlocks,
6247      onSplit: function onSplit(value) {
6248        if (!value) {
6249          return Object(external_this_wp_blocks_["createBlock"])('core/paragraph');
6250        }
6251  
6252        return Object(external_this_wp_blocks_["createBlock"])('core/heading', heading_edit_objectSpread(heading_edit_objectSpread({}, attributes), {}, {
6253          content: value
6254        }));
6255      },
6256      onReplace: onReplace,
6257      onRemove: function onRemove() {
6258        return onReplace([]);
6259      },
6260      placeholder: placeholder || Object(external_this_wp_i18n_["__"])('Write heading…'),
6261      textAlign: textAlign
6262    }, blockProps)));
6263  }
6264  
6265  /* harmony default export */ var heading_edit = (HeadingEdit);
6266  
6267  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/save.js
6268  
6269  
6270  
6271  /**
6272   * External dependencies
6273   */
6274  
6275  /**
6276   * WordPress dependencies
6277   */
6278  
6279  
6280  function heading_save_save(_ref) {
6281    var attributes = _ref.attributes;
6282    var textAlign = attributes.textAlign,
6283        content = attributes.content,
6284        level = attributes.level;
6285    var TagName = 'h' + level;
6286    var className = classnames_default()(Object(defineProperty["a" /* default */])({}, "has-text-align-".concat(textAlign), textAlign));
6287    return Object(external_this_wp_element_["createElement"])(TagName, external_this_wp_blockEditor_["useBlockProps"].save({
6288      className: className
6289    }), Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
6290      value: content
6291    }));
6292  }
6293  
6294  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/shared.js
6295  /**
6296   * Given a node name string for a heading node, returns its numeric level.
6297   *
6298   * @param {string} nodeName Heading node name.
6299   *
6300   * @return {number} Heading level.
6301   */
6302  function getLevelFromHeadingNodeName(nodeName) {
6303    return Number(nodeName.substr(1));
6304  }
6305  
6306  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/transforms.js
6307  
6308  
6309  /**
6310   * WordPress dependencies
6311   */
6312  
6313  /**
6314   * Internal dependencies
6315   */
6316  
6317  
6318  var transforms_apiVersion$name$cate = {
6319    apiVersion: 2,
6320    name: "core/heading",
6321    category: "text",
6322    attributes: {
6323      textAlign: {
6324        type: "string"
6325      },
6326      content: {
6327        type: "string",
6328        source: "html",
6329        selector: "h1,h2,h3,h4,h5,h6",
6330        "default": ""
6331      },
6332      level: {
6333        type: "number",
6334        "default": 2
6335      },
6336      placeholder: {
6337        type: "string"
6338      }
6339    },
6340    supports: {
6341      align: ["wide", "full"],
6342      anchor: true,
6343      className: false,
6344      color: {
6345        link: true
6346      },
6347      fontSize: true,
6348      lineHeight: true,
6349      __experimentalSelector: {
6350        "core/heading/h1": "h1",
6351        "core/heading/h2": "h2",
6352        "core/heading/h3": "h3",
6353        "core/heading/h4": "h4",
6354        "core/heading/h5": "h5",
6355        "core/heading/h6": "h6"
6356      },
6357      __unstablePasteTextInline: true
6358    }
6359  },
6360      heading_transforms_name = transforms_apiVersion$name$cate.name;
6361  var heading_transforms_transforms = {
6362    from: [{
6363      type: 'block',
6364      isMultiBlock: true,
6365      blocks: ['core/paragraph'],
6366      transform: function transform(attributes) {
6367        return attributes.map(function (_ref) {
6368          var content = _ref.content,
6369              anchor = _ref.anchor;
6370          return Object(external_this_wp_blocks_["createBlock"])(heading_transforms_name, {
6371            content: content,
6372            anchor: anchor
6373          });
6374        });
6375      }
6376    }, {
6377      type: 'raw',
6378      selector: 'h1,h2,h3,h4,h5,h6',
6379      schema: function schema(_ref2) {
6380        var phrasingContentSchema = _ref2.phrasingContentSchema,
6381            isPaste = _ref2.isPaste;
6382        var schema = {
6383          children: phrasingContentSchema,
6384          attributes: isPaste ? [] : ['style', 'id']
6385        };
6386        return {
6387          h1: schema,
6388          h2: schema,
6389          h3: schema,
6390          h4: schema,
6391          h5: schema,
6392          h6: schema
6393        };
6394      },
6395      transform: function transform(node) {
6396        var attributes = Object(external_this_wp_blocks_["getBlockAttributes"])(heading_transforms_name, node.outerHTML);
6397  
6398        var _ref3 = node.style || {},
6399            textAlign = _ref3.textAlign;
6400  
6401        attributes.level = getLevelFromHeadingNodeName(node.nodeName);
6402  
6403        if (textAlign === 'left' || textAlign === 'center' || textAlign === 'right') {
6404          attributes.align = textAlign;
6405        }
6406  
6407        return Object(external_this_wp_blocks_["createBlock"])(heading_transforms_name, attributes);
6408      }
6409    }].concat(Object(toConsumableArray["a" /* default */])([1, 2, 3, 4, 5, 6].map(function (level) {
6410      return {
6411        type: 'prefix',
6412        prefix: Array(level + 1).join('#'),
6413        transform: function transform(content) {
6414          return Object(external_this_wp_blocks_["createBlock"])(heading_transforms_name, {
6415            level: level,
6416            content: content
6417          });
6418        }
6419      };
6420    }))),
6421    to: [{
6422      type: 'block',
6423      isMultiBlock: true,
6424      blocks: ['core/paragraph'],
6425      transform: function transform(attributes) {
6426        return attributes.map(function (_ref4) {
6427          var content = _ref4.content,
6428              anchor = _ref4.anchor;
6429          return Object(external_this_wp_blocks_["createBlock"])('core/paragraph', {
6430            content: content,
6431            anchor: anchor
6432          });
6433        });
6434      }
6435    }]
6436  };
6437  /* harmony default export */ var heading_transforms = (heading_transforms_transforms);
6438  
6439  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/index.js
6440  /**
6441   * External dependencies
6442   */
6443  
6444  /**
6445   * WordPress dependencies
6446   */
6447  
6448  
6449  
6450  /**
6451   * Internal dependencies
6452   */
6453  
6454  
6455  
6456  var heading_metadata = {
6457    apiVersion: 2,
6458    name: "core/heading",
6459    category: "text",
6460    attributes: {
6461      textAlign: {
6462        type: "string"
6463      },
6464      content: {
6465        type: "string",
6466        source: "html",
6467        selector: "h1,h2,h3,h4,h5,h6",
6468        "default": ""
6469      },
6470      level: {
6471        type: "number",
6472        "default": 2
6473      },
6474      placeholder: {
6475        type: "string"
6476      }
6477    },
6478    supports: {
6479      align: ["wide", "full"],
6480      anchor: true,
6481      className: false,
6482      color: {
6483        link: true
6484      },
6485      fontSize: true,
6486      lineHeight: true,
6487      __experimentalSelector: {
6488        "core/heading/h1": "h1",
6489        "core/heading/h2": "h2",
6490        "core/heading/h3": "h3",
6491        "core/heading/h4": "h4",
6492        "core/heading/h5": "h5",
6493        "core/heading/h6": "h6"
6494      },
6495      __unstablePasteTextInline: true
6496    }
6497  };
6498  
6499  
6500  var heading_name = heading_metadata.name;
6501  
6502  var heading_settings = {
6503    title: Object(external_this_wp_i18n_["__"])('Heading'),
6504    description: Object(external_this_wp_i18n_["__"])('Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.'),
6505    icon: library_heading,
6506    keywords: [Object(external_this_wp_i18n_["__"])('title'), Object(external_this_wp_i18n_["__"])('subtitle')],
6507    example: {
6508      attributes: {
6509        content: Object(external_this_wp_i18n_["__"])('Code is Poetry'),
6510        level: 2
6511      }
6512    },
6513    __experimentalLabel: function __experimentalLabel(attributes, _ref) {
6514      var context = _ref.context;
6515  
6516      if (context === 'accessibility') {
6517        var content = attributes.content,
6518            level = attributes.level;
6519        return Object(external_this_lodash_["isEmpty"])(content) ? Object(external_this_wp_i18n_["sprintf"])(
6520        /* translators: accessibility text. %s: heading level. */
6521        Object(external_this_wp_i18n_["__"])('Level %s. Empty.'), level) : Object(external_this_wp_i18n_["sprintf"])(
6522        /* translators: accessibility text. 1: heading level. 2: heading content. */
6523        Object(external_this_wp_i18n_["__"])('Level %1$s. %2$s'), level, content);
6524      }
6525    },
6526    transforms: heading_transforms,
6527    deprecated: heading_deprecated,
6528    merge: function merge(attributes, attributesToMerge) {
6529      return {
6530        content: (attributes.content || '') + (attributesToMerge.content || '')
6531      };
6532    },
6533    edit: heading_edit,
6534    save: heading_save_save
6535  };
6536  
6537  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/quote.js
6538  
6539  
6540  /**
6541   * WordPress dependencies
6542   */
6543  
6544  var quote = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
6545    viewBox: "0 0 24 24",
6546    xmlns: "http://www.w3.org/2000/svg"
6547  }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
6548    d: "M13 6v6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H13zm-9 6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H4v6z"
6549  }));
6550  /* harmony default export */ var library_quote = (quote);
6551  
6552  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/deprecated.js
6553  
6554  
6555  
6556  function quote_deprecated_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
6557  
6558  function quote_deprecated_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { quote_deprecated_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { quote_deprecated_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
6559  
6560  /**
6561   * External dependencies
6562   */
6563  
6564  /**
6565   * WordPress dependencies
6566   */
6567  
6568  
6569  var quote_deprecated_blockAttributes = {
6570    value: {
6571      type: 'string',
6572      source: 'html',
6573      selector: 'blockquote',
6574      multiline: 'p',
6575      default: ''
6576    },
6577    citation: {
6578      type: 'string',
6579      source: 'html',
6580      selector: 'cite',
6581      default: ''
6582    },
6583    align: {
6584      type: 'string'
6585    }
6586  };
6587  var quote_deprecated_deprecated = [{
6588    attributes: quote_deprecated_blockAttributes,
6589    save: function save(_ref) {
6590      var attributes = _ref.attributes;
6591      var align = attributes.align,
6592          value = attributes.value,
6593          citation = attributes.citation;
6594      return Object(external_this_wp_element_["createElement"])("blockquote", {
6595        style: {
6596          textAlign: align ? align : null
6597        }
6598      }, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
6599        multiline: true,
6600        value: value
6601      }), !external_this_wp_blockEditor_["RichText"].isEmpty(citation) && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
6602        tagName: "cite",
6603        value: citation
6604      }));
6605    }
6606  }, {
6607    attributes: quote_deprecated_objectSpread(quote_deprecated_objectSpread({}, quote_deprecated_blockAttributes), {}, {
6608      style: {
6609        type: 'number',
6610        default: 1
6611      }
6612    }),
6613    migrate: function migrate(attributes) {
6614      if (attributes.style === 2) {
6615        return quote_deprecated_objectSpread(quote_deprecated_objectSpread({}, Object(external_this_lodash_["omit"])(attributes, ['style'])), {}, {
6616          className: attributes.className ? attributes.className + ' is-style-large' : 'is-style-large'
6617        });
6618      }
6619  
6620      return attributes;
6621    },
6622    save: function save(_ref2) {
6623      var attributes = _ref2.attributes;
6624      var align = attributes.align,
6625          value = attributes.value,
6626          citation = attributes.citation,
6627          style = attributes.style;
6628      return Object(external_this_wp_element_["createElement"])("blockquote", {
6629        className: style === 2 ? 'is-large' : '',
6630        style: {
6631          textAlign: align ? align : null
6632        }
6633      }, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
6634        multiline: true,
6635        value: value
6636      }), !external_this_wp_blockEditor_["RichText"].isEmpty(citation) && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
6637        tagName: "cite",
6638        value: citation
6639      }));
6640    }
6641  }, {
6642    attributes: quote_deprecated_objectSpread(quote_deprecated_objectSpread({}, quote_deprecated_blockAttributes), {}, {
6643      citation: {
6644        type: 'string',
6645        source: 'html',
6646        selector: 'footer',
6647        default: ''
6648      },
6649      style: {
6650        type: 'number',
6651        default: 1
6652      }
6653    }),
6654    save: function save(_ref3) {
6655      var attributes = _ref3.attributes;
6656      var align = attributes.align,
6657          value = attributes.value,
6658          citation = attributes.citation,
6659          style = attributes.style;
6660      return Object(external_this_wp_element_["createElement"])("blockquote", {
6661        className: "blocks-quote-style-".concat(style),
6662        style: {
6663          textAlign: align ? align : null
6664        }
6665      }, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
6666        multiline: true,
6667        value: value
6668      }), !external_this_wp_blockEditor_["RichText"].isEmpty(citation) && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
6669        tagName: "footer",
6670        value: citation
6671      }));
6672    }
6673  }];
6674  /* harmony default export */ var quote_deprecated = (quote_deprecated_deprecated);
6675  
6676  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/edit.js
6677  
6678  
6679  
6680  function quote_edit_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
6681  
6682  function quote_edit_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { quote_edit_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { quote_edit_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
6683  
6684  /**
6685   * External dependencies
6686   */
6687  
6688  /**
6689   * WordPress dependencies
6690   */
6691  
6692  
6693  
6694  
6695  
6696  function QuoteEdit(_ref) {
6697    var attributes = _ref.attributes,
6698        setAttributes = _ref.setAttributes,
6699        isSelected = _ref.isSelected,
6700        mergeBlocks = _ref.mergeBlocks,
6701        onReplace = _ref.onReplace,
6702        className = _ref.className,
6703        insertBlocksAfter = _ref.insertBlocksAfter;
6704    var align = attributes.align,
6705        value = attributes.value,
6706        citation = attributes.citation;
6707    var blockProps = Object(external_this_wp_blockEditor_["useBlockProps"])({
6708      className: classnames_default()(className, Object(defineProperty["a" /* default */])({}, "has-text-align-".concat(align), align))
6709    });
6710    return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockControls"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["AlignmentToolbar"], {
6711      value: align,
6712      onChange: function onChange(nextAlign) {
6713        setAttributes({
6714          align: nextAlign
6715        });
6716      }
6717    })), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["BlockQuotation"], blockProps, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"], {
6718      identifier: "value",
6719      multiline: true,
6720      value: value,
6721      onChange: function onChange(nextValue) {
6722        return setAttributes({
6723          value: nextValue
6724        });
6725      },
6726      onMerge: mergeBlocks,
6727      onRemove: function onRemove(forward) {
6728        var hasEmptyCitation = !citation || citation.length === 0;
6729  
6730        if (!forward && hasEmptyCitation) {
6731          onReplace([]);
6732        }
6733      },
6734      placeholder: // translators: placeholder text used for the quote
6735      Object(external_this_wp_i18n_["__"])('Write quote…'),
6736      onReplace: onReplace,
6737      onSplit: function onSplit(piece) {
6738        return Object(external_this_wp_blocks_["createBlock"])('core/quote', quote_edit_objectSpread(quote_edit_objectSpread({}, attributes), {}, {
6739          value: piece
6740        }));
6741      },
6742      __unstableOnSplitMiddle: function __unstableOnSplitMiddle() {
6743        return Object(external_this_wp_blocks_["createBlock"])('core/paragraph');
6744      },
6745      textAlign: align
6746    }), (!external_this_wp_blockEditor_["RichText"].isEmpty(citation) || isSelected) && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"], {
6747      identifier: "citation",
6748      value: citation,
6749      onChange: function onChange(nextCitation) {
6750        return setAttributes({
6751          citation: nextCitation
6752        });
6753      },
6754      __unstableMobileNoFocusOnMount: true,
6755      placeholder: // translators: placeholder text used for the citation
6756      Object(external_this_wp_i18n_["__"])('Write citation…'),
6757      className: "wp-block-quote__citation",
6758      textAlign: align,
6759      __unstableOnSplitAtEnd: function __unstableOnSplitAtEnd() {
6760        return insertBlocksAfter(Object(external_this_wp_blocks_["createBlock"])('core/paragraph'));
6761      }
6762    })));
6763  }
6764  
6765  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/save.js
6766  
6767  
6768  
6769  /**
6770   * External dependencies
6771   */
6772  
6773  /**
6774   * WordPress dependencies
6775   */
6776  
6777  
6778  function quote_save_save(_ref) {
6779    var attributes = _ref.attributes;
6780    var align = attributes.align,
6781        value = attributes.value,
6782        citation = attributes.citation;
6783    var className = classnames_default()(Object(defineProperty["a" /* default */])({}, "has-text-align-".concat(align), align));
6784    return Object(external_this_wp_element_["createElement"])("blockquote", external_this_wp_blockEditor_["useBlockProps"].save({
6785      className: className
6786    }), Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
6787      multiline: true,
6788      value: value
6789    }), !external_this_wp_blockEditor_["RichText"].isEmpty(citation) && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
6790      tagName: "cite",
6791      value: citation
6792    }));
6793  }
6794  
6795  // EXTERNAL MODULE: external {"this":["wp","richText"]}
6796  var external_this_wp_richText_ = __webpack_require__(25);
6797  
6798  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/transforms.js
6799  
6800  
6801  
6802  
6803  function quote_transforms_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
6804  
6805  function quote_transforms_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { quote_transforms_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { quote_transforms_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
6806  
6807  /**
6808   * WordPress dependencies
6809   */
6810  
6811  
6812  var quote_transforms_transforms = {
6813    from: [{
6814      type: 'block',
6815      isMultiBlock: true,
6816      blocks: ['core/paragraph'],
6817      transform: function transform(attributes) {
6818        return Object(external_this_wp_blocks_["createBlock"])('core/quote', {
6819          value: Object(external_this_wp_richText_["toHTMLString"])({
6820            value: Object(external_this_wp_richText_["join"])(attributes.map(function (_ref) {
6821              var content = _ref.content;
6822              return Object(external_this_wp_richText_["create"])({
6823                html: content
6824              });
6825            }), "\u2028"),
6826            multilineTag: 'p'
6827          }),
6828          anchor: attributes.anchor
6829        });
6830      }
6831    }, {
6832      type: 'block',
6833      blocks: ['core/heading'],
6834      transform: function transform(_ref2) {
6835        var content = _ref2.content,
6836            anchor = _ref2.anchor;
6837        return Object(external_this_wp_blocks_["createBlock"])('core/quote', {
6838          value: "<p>".concat(content, "</p>"),
6839          anchor: anchor
6840        });
6841      }
6842    }, {
6843      type: 'block',
6844      blocks: ['core/pullquote'],
6845      transform: function transform(_ref3) {
6846        var value = _ref3.value,
6847            citation = _ref3.citation,
6848            anchor = _ref3.anchor;
6849        return Object(external_this_wp_blocks_["createBlock"])('core/quote', {
6850          value: value,
6851          citation: citation,
6852          anchor: anchor
6853        });
6854      }
6855    }, {
6856      type: 'prefix',
6857      prefix: '>',
6858      transform: function transform(content) {
6859        return Object(external_this_wp_blocks_["createBlock"])('core/quote', {
6860          value: "<p>".concat(content, "</p>")
6861        });
6862      }
6863    }, {
6864      type: 'raw',
6865      isMatch: function isMatch(node) {
6866        var isParagraphOrSingleCite = function () {
6867          var hasCitation = false;
6868          return function (child) {
6869            // Child is a paragraph.
6870            if (child.nodeName === 'P') {
6871              return true;
6872            } // Child is a cite and no other cite child exists before it.
6873  
6874  
6875            if (!hasCitation && child.nodeName === 'CITE') {
6876              hasCitation = true;
6877              return true;
6878            }
6879          };
6880        }();
6881  
6882        return node.nodeName === 'BLOCKQUOTE' && // The quote block can only handle multiline paragraph
6883        // content with an optional cite child.
6884        Array.from(node.childNodes).every(isParagraphOrSingleCite);
6885      },
6886      schema: function schema(_ref4) {
6887        var phrasingContentSchema = _ref4.phrasingContentSchema;
6888        return {
6889          blockquote: {
6890            children: {
6891              p: {
6892                children: phrasingContentSchema
6893              },
6894              cite: {
6895                children: phrasingContentSchema
6896              }
6897            }
6898          }
6899        };
6900      }
6901    }],
6902    to: [{
6903      type: 'block',
6904      blocks: ['core/paragraph'],
6905      transform: function transform(_ref5) {
6906        var value = _ref5.value,
6907            citation = _ref5.citation;
6908        var paragraphs = [];
6909  
6910        if (value && value !== '<p></p>') {
6911          paragraphs.push.apply(paragraphs, Object(toConsumableArray["a" /* default */])(Object(external_this_wp_richText_["split"])(Object(external_this_wp_richText_["create"])({
6912            html: value,
6913            multilineTag: 'p'
6914          }), "\u2028").map(function (piece) {
6915            return Object(external_this_wp_blocks_["createBlock"])('core/paragraph', {
6916              content: Object(external_this_wp_richText_["toHTMLString"])({
6917                value: piece
6918              })
6919            });
6920          })));
6921        }
6922  
6923        if (citation && citation !== '<p></p>') {
6924          paragraphs.push(Object(external_this_wp_blocks_["createBlock"])('core/paragraph', {
6925            content: citation
6926          }));
6927        }
6928  
6929        if (paragraphs.length === 0) {
6930          return Object(external_this_wp_blocks_["createBlock"])('core/paragraph', {
6931            content: ''
6932          });
6933        }
6934  
6935        return paragraphs;
6936      }
6937    }, {
6938      type: 'block',
6939      blocks: ['core/heading'],
6940      transform: function transform(_ref6) {
6941        var value = _ref6.value,
6942            citation = _ref6.citation,
6943            attrs = Object(objectWithoutProperties["a" /* default */])(_ref6, ["value", "citation"]);
6944  
6945        // If there is no quote content, use the citation as the
6946        // content of the resulting heading. A nonexistent citation
6947        // will result in an empty heading.
6948        if (value === '<p></p>') {
6949          return Object(external_this_wp_blocks_["createBlock"])('core/heading', {
6950            content: citation
6951          });
6952        }
6953  
6954        var pieces = Object(external_this_wp_richText_["split"])(Object(external_this_wp_richText_["create"])({
6955          html: value,
6956          multilineTag: 'p'
6957        }), "\u2028");
6958        var headingBlock = Object(external_this_wp_blocks_["createBlock"])('core/heading', {
6959          content: Object(external_this_wp_richText_["toHTMLString"])({
6960            value: pieces[0]
6961          })
6962        });
6963  
6964        if (!citation && pieces.length === 1) {
6965          return headingBlock;
6966        }
6967  
6968        var quotePieces = pieces.slice(1);
6969        var quoteBlock = Object(external_this_wp_blocks_["createBlock"])('core/quote', quote_transforms_objectSpread(quote_transforms_objectSpread({}, attrs), {}, {
6970          citation: citation,
6971          value: Object(external_this_wp_richText_["toHTMLString"])({
6972            value: quotePieces.length ? Object(external_this_wp_richText_["join"])(pieces.slice(1), "\u2028") : Object(external_this_wp_richText_["create"])(),
6973            multilineTag: 'p'
6974          })
6975        }));
6976        return [headingBlock, quoteBlock];
6977      }
6978    }, {
6979      type: 'block',
6980      blocks: ['core/pullquote'],
6981      transform: function transform(_ref7) {
6982        var value = _ref7.value,
6983            citation = _ref7.citation,
6984            anchor = _ref7.anchor;
6985        return Object(external_this_wp_blocks_["createBlock"])('core/pullquote', {
6986          value: value,
6987          citation: citation,
6988          anchor: anchor
6989        });
6990      }
6991    }]
6992  };
6993  /* harmony default export */ var quote_transforms = (quote_transforms_transforms);
6994  
6995  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/index.js
6996  
6997  
6998  function quote_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
6999  
7000  function quote_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { quote_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { quote_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
7001  
7002  /**
7003   * WordPress dependencies
7004   */
7005  
7006  
7007  /**
7008   * Internal dependencies
7009   */
7010  
7011  
7012  
7013  var quote_metadata = {
7014    apiVersion: 2,
7015    name: "core/quote",
7016    category: "text",
7017    attributes: {
7018      value: {
7019        type: "string",
7020        source: "html",
7021        selector: "blockquote",
7022        multiline: "p",
7023        "default": ""
7024      },
7025      citation: {
7026        type: "string",
7027        source: "html",
7028        selector: "cite",
7029        "default": ""
7030      },
7031      align: {
7032        type: "string"
7033      }
7034    },
7035    supports: {
7036      anchor: true
7037    }
7038  };
7039  
7040  
7041  var quote_name = quote_metadata.name;
7042  
7043  var quote_settings = {
7044    title: Object(external_this_wp_i18n_["__"])('Quote'),
7045    description: Object(external_this_wp_i18n_["__"])('Give quoted text visual emphasis. "In quoting others, we cite ourselves." — Julio Cortázar'),
7046    icon: library_quote,
7047    keywords: [Object(external_this_wp_i18n_["__"])('blockquote'), Object(external_this_wp_i18n_["__"])('cite')],
7048    example: {
7049      attributes: {
7050        value: '<p>' + Object(external_this_wp_i18n_["__"])('In quoting others, we cite ourselves.') + '</p>',
7051        citation: 'Julio Cortázar',
7052        className: 'is-style-large'
7053      }
7054    },
7055    styles: [{
7056      name: 'default',
7057      label: Object(external_this_wp_i18n_["_x"])('Default', 'block style'),
7058      isDefault: true
7059    }, {
7060      name: 'large',
7061      label: Object(external_this_wp_i18n_["_x"])('Large', 'block style')
7062    }],
7063    transforms: quote_transforms,
7064    edit: QuoteEdit,
7065    save: quote_save_save,
7066    merge: function merge(attributes, _ref) {
7067      var value = _ref.value,
7068          citation = _ref.citation;
7069  
7070      // Quote citations cannot be merged. Pick the second one unless it's
7071      // empty.
7072      if (!citation) {
7073        citation = attributes.citation;
7074      }
7075  
7076      if (!value || value === '<p></p>') {
7077        return quote_objectSpread(quote_objectSpread({}, attributes), {}, {
7078          citation: citation
7079        });
7080      }
7081  
7082      return quote_objectSpread(quote_objectSpread({}, attributes), {}, {
7083        value: attributes.value + value,
7084        citation: citation
7085      });
7086    },
7087    deprecated: quote_deprecated
7088  };
7089  
7090  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/gallery.js
7091  
7092  
7093  /**
7094   * WordPress dependencies
7095   */
7096  
7097  var gallery = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
7098    viewBox: "0 0 24 24",
7099    xmlns: "http://www.w3.org/2000/svg"
7100  }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
7101    d: "M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8h-1.5zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zM4.5 4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1V12l-2.3-1.7c-.3-.2-.6-.2-.9 0l-2.9 2.1L8 11.3c-.2-.1-.5-.1-.7 0l-2.9 1.5V4.6zm0 11.8v-1.8l3.2-1.7 2.4 1.2c.2.1.5.1.8-.1l2.8-2 2.8 2v2.5c0 .1-.1.1-.1.1H4.6c0-.1-.1-.2-.1-.2z"
7102  }));
7103  /* harmony default export */ var library_gallery = (gallery);
7104  
7105  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/shared.js
7106  /**
7107   * External dependencies
7108   */
7109  
7110  function defaultColumnsNumber(attributes) {
7111    return Math.min(3, attributes.images.length);
7112  }
7113  var shared_pickRelevantMediaFiles = function pickRelevantMediaFiles(image) {
7114    var sizeSlug = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'large';
7115    var imageProps = Object(external_this_lodash_["pick"])(image, ['alt', 'id', 'link', 'caption']);
7116    imageProps.url = Object(external_this_lodash_["get"])(image, ['sizes', sizeSlug, 'url']) || Object(external_this_lodash_["get"])(image, ['media_details', 'sizes', sizeSlug, 'source_url']) || image.url;
7117    var fullUrl = Object(external_this_lodash_["get"])(image, ['sizes', 'full', 'url']) || Object(external_this_lodash_["get"])(image, ['media_details', 'sizes', 'full', 'source_url']);
7118  
7119    if (fullUrl) {
7120      imageProps.fullUrl = fullUrl;
7121    }
7122  
7123    return imageProps;
7124  };
7125  
7126  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/deprecated.js
7127  
7128  
7129  
7130  function gallery_deprecated_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
7131  
7132  function gallery_deprecated_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { gallery_deprecated_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { gallery_deprecated_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
7133  
7134  /**
7135   * External dependencies
7136   */
7137  
7138  
7139  /**
7140   * WordPress dependencies
7141   */
7142  
7143  
7144  /**
7145   * Internal dependencies
7146   */
7147  
7148  
7149  var gallery_deprecated_deprecated = [{
7150    attributes: {
7151      images: {
7152        type: 'array',
7153        default: [],
7154        source: 'query',
7155        selector: '.blocks-gallery-item',
7156        query: {
7157          url: {
7158            type: 'string',
7159            source: 'attribute',
7160            selector: 'img',
7161            attribute: 'src'
7162          },
7163          fullUrl: {
7164            type: 'string',
7165            source: 'attribute',
7166            selector: 'img',
7167            attribute: 'data-full-url'
7168          },
7169          link: {
7170            type: 'string',
7171            source: 'attribute',
7172            selector: 'img',
7173            attribute: 'data-link'
7174          },
7175          alt: {
7176            type: 'string',
7177            source: 'attribute',
7178            selector: 'img',
7179            attribute: 'alt',
7180            default: ''
7181          },
7182          id: {
7183            type: 'string',
7184            source: 'attribute',
7185            selector: 'img',
7186            attribute: 'data-id'
7187          },
7188          caption: {
7189            type: 'string',
7190            source: 'html',
7191            selector: '.blocks-gallery-item__caption'
7192          }
7193        }
7194      },
7195      ids: {
7196        type: 'array',
7197        items: {
7198          type: 'number'
7199        },
7200        default: []
7201      },
7202      columns: {
7203        type: 'number',
7204        minimum: 1,
7205        maximum: 8
7206      },
7207      caption: {
7208        type: 'string',
7209        source: 'html',
7210        selector: '.blocks-gallery-caption'
7211      },
7212      imageCrop: {
7213        type: 'boolean',
7214        default: true
7215      },
7216      linkTo: {
7217        type: 'string',
7218        default: 'none'
7219      },
7220      sizeSlug: {
7221        type: 'string',
7222        default: 'large'
7223      }
7224    },
7225    supports: {
7226      align: true
7227    },
7228    isEligible: function isEligible(_ref) {
7229      var linkTo = _ref.linkTo;
7230      return !linkTo || linkTo === 'attachment' || linkTo === 'media';
7231    },
7232    migrate: function migrate(attributes) {
7233      var linkTo = attributes.linkTo;
7234  
7235      if (!attributes.linkTo) {
7236        linkTo = 'none';
7237      } else if (attributes.linkTo === 'attachment') {
7238        linkTo = 'post';
7239      } else if (attributes.linkTo === 'media') {
7240        linkTo = 'file';
7241      }
7242  
7243      return gallery_deprecated_objectSpread(gallery_deprecated_objectSpread({}, attributes), {}, {
7244        linkTo: linkTo
7245      });
7246    },
7247    save: function save(_ref2) {
7248      var attributes = _ref2.attributes;
7249      var images = attributes.images,
7250          _attributes$columns = attributes.columns,
7251          columns = _attributes$columns === void 0 ? defaultColumnsNumber(attributes) : _attributes$columns,
7252          imageCrop = attributes.imageCrop,
7253          caption = attributes.caption,
7254          linkTo = attributes.linkTo;
7255      return Object(external_this_wp_element_["createElement"])("figure", {
7256        className: "columns-".concat(columns, " ").concat(imageCrop ? 'is-cropped' : '')
7257      }, Object(external_this_wp_element_["createElement"])("ul", {
7258        className: "blocks-gallery-grid"
7259      }, images.map(function (image) {
7260        var href;
7261  
7262        switch (linkTo) {
7263          case 'media':
7264            href = image.fullUrl || image.url;
7265            break;
7266  
7267          case 'attachment':
7268            href = image.link;
7269            break;
7270        }
7271  
7272        var img = Object(external_this_wp_element_["createElement"])("img", {
7273          src: image.url,
7274          alt: image.alt,
7275          "data-id": image.id,
7276          "data-full-url": image.fullUrl,
7277          "data-link": image.link,
7278          className: image.id ? "wp-image-".concat(image.id) : null
7279        });
7280        return Object(external_this_wp_element_["createElement"])("li", {
7281          key: image.id || image.url,
7282          className: "blocks-gallery-item"
7283        }, Object(external_this_wp_element_["createElement"])("figure", null, href ? Object(external_this_wp_element_["createElement"])("a", {
7284          href: href
7285        }, img) : img, !external_this_wp_blockEditor_["RichText"].isEmpty(image.caption) && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
7286          tagName: "figcaption",
7287          className: "blocks-gallery-item__caption",
7288          value: image.caption
7289        })));
7290      })), !external_this_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
7291        tagName: "figcaption",
7292        className: "blocks-gallery-caption",
7293        value: caption
7294      }));
7295    }
7296  }, {
7297    attributes: {
7298      images: {
7299        type: 'array',
7300        default: [],
7301        source: 'query',
7302        selector: '.blocks-gallery-item',
7303        query: {
7304          url: {
7305            source: 'attribute',
7306            selector: 'img',
7307            attribute: 'src'
7308          },
7309          fullUrl: {
7310            source: 'attribute',
7311            selector: 'img',
7312            attribute: 'data-full-url'
7313          },
7314          link: {
7315            source: 'attribute',
7316            selector: 'img',
7317            attribute: 'data-link'
7318          },
7319          alt: {
7320            source: 'attribute',
7321            selector: 'img',
7322            attribute: 'alt',
7323            default: ''
7324          },
7325          id: {
7326            source: 'attribute',
7327            selector: 'img',
7328            attribute: 'data-id'
7329          },
7330          caption: {
7331            type: 'string',
7332            source: 'html',
7333            selector: '.blocks-gallery-item__caption'
7334          }
7335        }
7336      },
7337      ids: {
7338        type: 'array',
7339        default: []
7340      },
7341      columns: {
7342        type: 'number'
7343      },
7344      caption: {
7345        type: 'string',
7346        source: 'html',
7347        selector: '.blocks-gallery-caption'
7348      },
7349      imageCrop: {
7350        type: 'boolean',
7351        default: true
7352      },
7353      linkTo: {
7354        type: 'string',
7355        default: 'none'
7356      }
7357    },
7358    supports: {
7359      align: true
7360    },
7361    isEligible: function isEligible(_ref3) {
7362      var ids = _ref3.ids;
7363      return ids && ids.some(function (id) {
7364        return typeof id === 'string';
7365      });
7366    },
7367    migrate: function migrate(attributes) {
7368      return gallery_deprecated_objectSpread(gallery_deprecated_objectSpread({}, attributes), {}, {
7369        ids: Object(external_this_lodash_["map"])(attributes.ids, function (id) {
7370          var parsedId = parseInt(id, 10);
7371          return Number.isInteger(parsedId) ? parsedId : null;
7372        })
7373      });
7374    },
7375    save: function save(_ref4) {
7376      var attributes = _ref4.attributes;
7377      var images = attributes.images,
7378          _attributes$columns2 = attributes.columns,
7379          columns = _attributes$columns2 === void 0 ? defaultColumnsNumber(attributes) : _attributes$columns2,
7380          imageCrop = attributes.imageCrop,
7381          caption = attributes.caption,
7382          linkTo = attributes.linkTo;
7383      return Object(external_this_wp_element_["createElement"])("figure", {
7384        className: "columns-".concat(columns, " ").concat(imageCrop ? 'is-cropped' : '')
7385      }, Object(external_this_wp_element_["createElement"])("ul", {
7386        className: "blocks-gallery-grid"
7387      }, images.map(function (image) {
7388        var href;
7389  
7390        switch (linkTo) {
7391          case 'media':
7392            href = image.fullUrl || image.url;
7393            break;
7394  
7395          case 'attachment':
7396            href = image.link;
7397            break;
7398        }
7399  
7400        var img = Object(external_this_wp_element_["createElement"])("img", {
7401          src: image.url,
7402          alt: image.alt,
7403          "data-id": image.id,
7404          "data-full-url": image.fullUrl,
7405          "data-link": image.link,
7406          className: image.id ? "wp-image-".concat(image.id) : null
7407        });
7408        return Object(external_this_wp_element_["createElement"])("li", {
7409          key: image.id || image.url,
7410          className: "blocks-gallery-item"
7411        }, Object(external_this_wp_element_["createElement"])("figure", null, href ? Object(external_this_wp_element_["createElement"])("a", {
7412          href: href
7413        }, img) : img, !external_this_wp_blockEditor_["RichText"].isEmpty(image.caption) && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
7414          tagName: "figcaption",
7415          className: "blocks-gallery-item__caption",
7416          value: image.caption
7417        })));
7418      })), !external_this_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
7419        tagName: "figcaption",
7420        className: "blocks-gallery-caption",
7421        value: caption
7422      }));
7423    }
7424  }, {
7425    attributes: {
7426      images: {
7427        type: 'array',
7428        default: [],
7429        source: 'query',
7430        selector: 'ul.wp-block-gallery .blocks-gallery-item',
7431        query: {
7432          url: {
7433            source: 'attribute',
7434            selector: 'img',
7435            attribute: 'src'
7436          },
7437          fullUrl: {
7438            source: 'attribute',
7439            selector: 'img',
7440            attribute: 'data-full-url'
7441          },
7442          alt: {
7443            source: 'attribute',
7444            selector: 'img',
7445            attribute: 'alt',
7446            default: ''
7447          },
7448          id: {
7449            source: 'attribute',
7450            selector: 'img',
7451            attribute: 'data-id'
7452          },
7453          link: {
7454            source: 'attribute',
7455            selector: 'img',
7456            attribute: 'data-link'
7457          },
7458          caption: {
7459            type: 'array',
7460            source: 'children',
7461            selector: 'figcaption'
7462          }
7463        }
7464      },
7465      ids: {
7466        type: 'array',
7467        default: []
7468      },
7469      columns: {
7470        type: 'number'
7471      },
7472      imageCrop: {
7473        type: 'boolean',
7474        default: true
7475      },
7476      linkTo: {
7477        type: 'string',
7478        default: 'none'
7479      }
7480    },
7481    supports: {
7482      align: true
7483    },
7484    save: function save(_ref5) {
7485      var attributes = _ref5.attributes;
7486      var images = attributes.images,
7487          _attributes$columns3 = attributes.columns,
7488          columns = _attributes$columns3 === void 0 ? defaultColumnsNumber(attributes) : _attributes$columns3,
7489          imageCrop = attributes.imageCrop,
7490          linkTo = attributes.linkTo;
7491      return Object(external_this_wp_element_["createElement"])("ul", {
7492        className: "columns-".concat(columns, " ").concat(imageCrop ? 'is-cropped' : '')
7493      }, images.map(function (image) {
7494        var href;
7495  
7496        switch (linkTo) {
7497          case 'media':
7498            href = image.fullUrl || image.url;
7499            break;
7500  
7501          case 'attachment':
7502            href = image.link;
7503            break;
7504        }
7505  
7506        var img = Object(external_this_wp_element_["createElement"])("img", {
7507          src: image.url,
7508          alt: image.alt,
7509          "data-id": image.id,
7510          "data-full-url": image.fullUrl,
7511          "data-link": image.link,
7512          className: image.id ? "wp-image-".concat(image.id) : null
7513        });
7514        return Object(external_this_wp_element_["createElement"])("li", {
7515          key: image.id || image.url,
7516          className: "blocks-gallery-item"
7517        }, Object(external_this_wp_element_["createElement"])("figure", null, href ? Object(external_this_wp_element_["createElement"])("a", {
7518          href: href
7519        }, img) : img, image.caption && image.caption.length > 0 && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
7520          tagName: "figcaption",
7521          value: image.caption
7522        })));
7523      }));
7524    }
7525  }, {
7526    attributes: {
7527      images: {
7528        type: 'array',
7529        default: [],
7530        source: 'query',
7531        selector: 'ul.wp-block-gallery .blocks-gallery-item',
7532        query: {
7533          url: {
7534            source: 'attribute',
7535            selector: 'img',
7536            attribute: 'src'
7537          },
7538          alt: {
7539            source: 'attribute',
7540            selector: 'img',
7541            attribute: 'alt',
7542            default: ''
7543          },
7544          id: {
7545            source: 'attribute',
7546            selector: 'img',
7547            attribute: 'data-id'
7548          },
7549          link: {
7550            source: 'attribute',
7551            selector: 'img',
7552            attribute: 'data-link'
7553          },
7554          caption: {
7555            type: 'array',
7556            source: 'children',
7557            selector: 'figcaption'
7558          }
7559        }
7560      },
7561      columns: {
7562        type: 'number'
7563      },
7564      imageCrop: {
7565        type: 'boolean',
7566        default: true
7567      },
7568      linkTo: {
7569        type: 'string',
7570        default: 'none'
7571      }
7572    },
7573    isEligible: function isEligible(_ref6) {
7574      var images = _ref6.images,
7575          ids = _ref6.ids;
7576      return images && images.length > 0 && (!ids && images || ids && images && ids.length !== images.length || Object(external_this_lodash_["some"])(images, function (id, index) {
7577        if (!id && ids[index] !== null) {
7578          return true;
7579        }
7580  
7581        return parseInt(id, 10) !== ids[index];
7582      }));
7583    },
7584    migrate: function migrate(attributes) {
7585      return gallery_deprecated_objectSpread(gallery_deprecated_objectSpread({}, attributes), {}, {
7586        ids: Object(external_this_lodash_["map"])(attributes.images, function (_ref7) {
7587          var id = _ref7.id;
7588  
7589          if (!id) {
7590            return null;
7591          }
7592  
7593          return parseInt(id, 10);
7594        })
7595      });
7596    },
7597    supports: {
7598      align: true
7599    },
7600    save: function save(_ref8) {
7601      var attributes = _ref8.attributes;
7602      var images = attributes.images,
7603          _attributes$columns4 = attributes.columns,
7604          columns = _attributes$columns4 === void 0 ? defaultColumnsNumber(attributes) : _attributes$columns4,
7605          imageCrop = attributes.imageCrop,
7606          linkTo = attributes.linkTo;
7607      return Object(external_this_wp_element_["createElement"])("ul", {
7608        className: "columns-".concat(columns, " ").concat(imageCrop ? 'is-cropped' : '')
7609      }, images.map(function (image) {
7610        var href;
7611  
7612        switch (linkTo) {
7613          case 'media':
7614            href = image.url;
7615            break;
7616  
7617          case 'attachment':
7618            href = image.link;
7619            break;
7620        }
7621  
7622        var img = Object(external_this_wp_element_["createElement"])("img", {
7623          src: image.url,
7624          alt: image.alt,
7625          "data-id": image.id,
7626          "data-link": image.link,
7627          className: image.id ? "wp-image-".concat(image.id) : null
7628        });
7629        return Object(external_this_wp_element_["createElement"])("li", {
7630          key: image.id || image.url,
7631          className: "blocks-gallery-item"
7632        }, Object(external_this_wp_element_["createElement"])("figure", null, href ? Object(external_this_wp_element_["createElement"])("a", {
7633          href: href
7634        }, img) : img, image.caption && image.caption.length > 0 && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
7635          tagName: "figcaption",
7636          value: image.caption
7637        })));
7638      }));
7639    }
7640  }, {
7641    attributes: {
7642      images: {
7643        type: 'array',
7644        default: [],
7645        source: 'query',
7646        selector: 'div.wp-block-gallery figure.blocks-gallery-image img',
7647        query: {
7648          url: {
7649            source: 'attribute',
7650            attribute: 'src'
7651          },
7652          alt: {
7653            source: 'attribute',
7654            attribute: 'alt',
7655            default: ''
7656          },
7657          id: {
7658            source: 'attribute',
7659            attribute: 'data-id'
7660          }
7661        }
7662      },
7663      columns: {
7664        type: 'number'
7665      },
7666      imageCrop: {
7667        type: 'boolean',
7668        default: true
7669      },
7670      linkTo: {
7671        type: 'string',
7672        default: 'none'
7673      },
7674      align: {
7675        type: 'string',
7676        default: 'none'
7677      }
7678    },
7679    supports: {
7680      align: true
7681    },
7682    save: function save(_ref9) {
7683      var attributes = _ref9.attributes;
7684      var images = attributes.images,
7685          _attributes$columns5 = attributes.columns,
7686          columns = _attributes$columns5 === void 0 ? defaultColumnsNumber(attributes) : _attributes$columns5,
7687          align = attributes.align,
7688          imageCrop = attributes.imageCrop,
7689          linkTo = attributes.linkTo;
7690      var className = classnames_default()("columns-".concat(columns), {
7691        alignnone: align === 'none',
7692        'is-cropped': imageCrop
7693      });
7694      return Object(external_this_wp_element_["createElement"])("div", {
7695        className: className
7696      }, images.map(function (image) {
7697        var href;
7698  
7699        switch (linkTo) {
7700          case 'media':
7701            href = image.url;
7702            break;
7703  
7704          case 'attachment':
7705            href = image.link;
7706            break;
7707        }
7708  
7709        var img = Object(external_this_wp_element_["createElement"])("img", {
7710          src: image.url,
7711          alt: image.alt,
7712          "data-id": image.id
7713        });
7714        return Object(external_this_wp_element_["createElement"])("figure", {
7715          key: image.id || image.url,
7716          className: "blocks-gallery-image"
7717        }, href ? Object(external_this_wp_element_["createElement"])("a", {
7718          href: href
7719        }, img) : img);
7720      }));
7721    }
7722  }];
7723  /* harmony default export */ var gallery_deprecated = (gallery_deprecated_deprecated);
7724  
7725  // EXTERNAL MODULE: external {"this":["wp","viewport"]}
7726  var external_this_wp_viewport_ = __webpack_require__(101);
7727  
7728  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/shared-icon.js
7729  
7730  
7731  /**
7732   * WordPress dependencies
7733   */
7734  
7735  
7736  var sharedIcon = Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockIcon"], {
7737    icon: library_gallery
7738  });
7739  
7740  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
7741  var classCallCheck = __webpack_require__(21);
7742  
7743  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
7744  var createClass = __webpack_require__(22);
7745  
7746  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
7747  var assertThisInitialized = __webpack_require__(16);
7748  
7749  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules
7750  var inherits = __webpack_require__(23);
7751  
7752  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
7753  var possibleConstructorReturn = __webpack_require__(24);
7754  
7755  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
7756  var getPrototypeOf = __webpack_require__(19);
7757  
7758  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-left.js
7759  var chevron_left = __webpack_require__(215);
7760  
7761  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-right.js
7762  var chevron_right = __webpack_require__(214);
7763  
7764  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/edit.js + 1 modules
7765  var library_edit = __webpack_require__(274);
7766  
7767  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close-small.js
7768  var close_small = __webpack_require__(159);
7769  
7770  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/constants.js
7771  var constants_LINK_DESTINATION_NONE = 'none';
7772  var constants_LINK_DESTINATION_MEDIA = 'file';
7773  var constants_LINK_DESTINATION_ATTACHMENT = 'post';
7774  
7775  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/gallery-image.js
7776  
7777  
7778  
7779  
7780  
7781  
7782  
7783  
7784  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; }
7785  
7786  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
7787  
7788  /**
7789   * External dependencies
7790   */
7791  
7792  
7793  /**
7794   * WordPress dependencies
7795   */
7796  
7797  
7798  
7799  
7800  
7801  
7802  
7803  
7804  
7805  
7806  /**
7807   * Internal dependencies
7808   */
7809  
7810  
7811  
7812  
7813  var gallery_image_isTemporaryImage = function isTemporaryImage(id, url) {
7814    return !id && Object(external_this_wp_blob_["isBlobURL"])(url);
7815  };
7816  
7817  var gallery_image_GalleryImage = /*#__PURE__*/function (_Component) {
7818    Object(inherits["a" /* default */])(GalleryImage, _Component);
7819  
7820    var _super = _createSuper(GalleryImage);
7821  
7822    function GalleryImage() {
7823      var _this;
7824  
7825      Object(classCallCheck["a" /* default */])(this, GalleryImage);
7826  
7827      _this = _super.apply(this, arguments);
7828      _this.onSelectImage = _this.onSelectImage.bind(Object(assertThisInitialized["a" /* default */])(_this));
7829      _this.onSelectCaption = _this.onSelectCaption.bind(Object(assertThisInitialized["a" /* default */])(_this));
7830      _this.onRemoveImage = _this.onRemoveImage.bind(Object(assertThisInitialized["a" /* default */])(_this));
7831      _this.bindContainer = _this.bindContainer.bind(Object(assertThisInitialized["a" /* default */])(_this));
7832      _this.onEdit = _this.onEdit.bind(Object(assertThisInitialized["a" /* default */])(_this));
7833      _this.onSelectImageFromLibrary = _this.onSelectImageFromLibrary.bind(Object(assertThisInitialized["a" /* default */])(_this));
7834      _this.onSelectCustomURL = _this.onSelectCustomURL.bind(Object(assertThisInitialized["a" /* default */])(_this));
7835      _this.state = {
7836        captionSelected: false,
7837        isEditing: false
7838      };
7839      return _this;
7840    }
7841  
7842    Object(createClass["a" /* default */])(GalleryImage, [{
7843      key: "bindContainer",
7844      value: function bindContainer(ref) {
7845        this.container = ref;
7846      }
7847    }, {
7848      key: "onSelectCaption",
7849      value: function onSelectCaption() {
7850        if (!this.state.captionSelected) {
7851          this.setState({
7852            captionSelected: true
7853          });
7854        }
7855  
7856        if (!this.props.isSelected) {
7857          this.props.onSelect();
7858        }
7859      }
7860    }, {
7861      key: "onSelectImage",
7862      value: function onSelectImage() {
7863        if (!this.props.isSelected) {
7864          this.props.onSelect();
7865        }
7866  
7867        if (this.state.captionSelected) {
7868          this.setState({
7869            captionSelected: false
7870          });
7871        }
7872      }
7873    }, {
7874      key: "onRemoveImage",
7875      value: function onRemoveImage(event) {
7876        if (this.container === document.activeElement && this.props.isSelected && [external_this_wp_keycodes_["BACKSPACE"], external_this_wp_keycodes_["DELETE"]].indexOf(event.keyCode) !== -1) {
7877          event.stopPropagation();
7878          event.preventDefault();
7879          this.props.onRemove();
7880        }
7881      }
7882    }, {
7883      key: "onEdit",
7884      value: function onEdit() {
7885        this.setState({
7886          isEditing: true
7887        });
7888      }
7889    }, {
7890      key: "componentDidUpdate",
7891      value: function componentDidUpdate(prevProps) {
7892        var _this$props = this.props,
7893            isSelected = _this$props.isSelected,
7894            image = _this$props.image,
7895            url = _this$props.url,
7896            __unstableMarkNextChangeAsNotPersistent = _this$props.__unstableMarkNextChangeAsNotPersistent;
7897  
7898        if (image && !url) {
7899          __unstableMarkNextChangeAsNotPersistent();
7900  
7901          this.props.setAttributes({
7902            url: image.source_url,
7903            alt: image.alt_text
7904          });
7905        } // unselect the caption so when the user selects other image and comeback
7906        // the caption is not immediately selected
7907  
7908  
7909        if (this.state.captionSelected && !isSelected && prevProps.isSelected) {
7910          this.setState({
7911            captionSelected: false
7912          });
7913        }
7914      }
7915    }, {
7916      key: "deselectOnBlur",
7917      value: function deselectOnBlur() {
7918        this.props.onDeselect();
7919      }
7920    }, {
7921      key: "onSelectImageFromLibrary",
7922      value: function onSelectImageFromLibrary(media) {
7923        var _this$props2 = this.props,
7924            setAttributes = _this$props2.setAttributes,
7925            id = _this$props2.id,
7926            url = _this$props2.url,
7927            alt = _this$props2.alt,
7928            caption = _this$props2.caption,
7929            sizeSlug = _this$props2.sizeSlug;
7930  
7931        if (!media || !media.url) {
7932          return;
7933        }
7934  
7935        var mediaAttributes = shared_pickRelevantMediaFiles(media, sizeSlug); // If the current image is temporary but an alt text was meanwhile
7936        // written by the user, make sure the text is not overwritten.
7937  
7938        if (gallery_image_isTemporaryImage(id, url)) {
7939          if (alt) {
7940            mediaAttributes = Object(external_this_lodash_["omit"])(mediaAttributes, ['alt']);
7941          }
7942        } // If a caption text was meanwhile written by the user,
7943        // make sure the text is not overwritten by empty captions.
7944  
7945  
7946        if (caption && !Object(external_this_lodash_["get"])(mediaAttributes, ['caption'])) {
7947          mediaAttributes = Object(external_this_lodash_["omit"])(mediaAttributes, ['caption']);
7948        }
7949  
7950        setAttributes(mediaAttributes);
7951        this.setState({
7952          isEditing: false
7953        });
7954      }
7955    }, {
7956      key: "onSelectCustomURL",
7957      value: function onSelectCustomURL(newURL) {
7958        var _this$props3 = this.props,
7959            setAttributes = _this$props3.setAttributes,
7960            url = _this$props3.url;
7961  
7962        if (newURL !== url) {
7963          setAttributes({
7964            url: newURL,
7965            id: undefined
7966          });
7967          this.setState({
7968            isEditing: false
7969          });
7970        }
7971      }
7972    }, {
7973      key: "render",
7974      value: function render() {
7975        var _this$props4 = this.props,
7976            url = _this$props4.url,
7977            alt = _this$props4.alt,
7978            id = _this$props4.id,
7979            linkTo = _this$props4.linkTo,
7980            link = _this$props4.link,
7981            isFirstItem = _this$props4.isFirstItem,
7982            isLastItem = _this$props4.isLastItem,
7983            isSelected = _this$props4.isSelected,
7984            caption = _this$props4.caption,
7985            onRemove = _this$props4.onRemove,
7986            onMoveForward = _this$props4.onMoveForward,
7987            onMoveBackward = _this$props4.onMoveBackward,
7988            setAttributes = _this$props4.setAttributes,
7989            ariaLabel = _this$props4['aria-label'];
7990        var isEditing = this.state.isEditing;
7991        var href;
7992  
7993        switch (linkTo) {
7994          case constants_LINK_DESTINATION_MEDIA:
7995            href = url;
7996            break;
7997  
7998          case constants_LINK_DESTINATION_ATTACHMENT:
7999            href = link;
8000            break;
8001        }
8002  
8003        var img = // Disable reason: Image itself is not meant to be interactive, but should
8004        // direct image selection and unfocus caption fields.
8005  
8006        /* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
8007        Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])("img", {
8008          src: url,
8009          alt: alt,
8010          "data-id": id,
8011          onClick: this.onSelectImage,
8012          onFocus: this.onSelectImage,
8013          onKeyDown: this.onRemoveImage,
8014          tabIndex: "0",
8015          "aria-label": ariaLabel,
8016          ref: this.bindContainer
8017        }), Object(external_this_wp_blob_["isBlobURL"])(url) && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Spinner"], null))
8018        /* eslint-enable jsx-a11y/no-noninteractive-element-interactions */
8019        ;
8020        var className = classnames_default()({
8021          'is-selected': isSelected,
8022          'is-transient': Object(external_this_wp_blob_["isBlobURL"])(url)
8023        });