[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

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 = "K51g");
  86  /******/ })
  87  /************************************************************************/
  88  /******/ ({
  89  
  90  /***/ "1K8p":
  91  /***/ (function(module, exports, __webpack_require__) {
  92  
  93  "use strict";
  94  /**
  95   * Copyright (c) 2015, Facebook, Inc.
  96   * All rights reserved.
  97   *
  98   * This source code is licensed under the BSD-style license found in the
  99   * LICENSE file in the root directory of this source tree. An additional grant
 100   * of patent rights can be found in the PATENTS file in the same directory.
 101   *
 102   * @providesModule normalizeWheel
 103   * @typechecks
 104   */
 105  
 106  
 107  
 108  var UserAgent_DEPRECATED = __webpack_require__("jrfk");
 109  
 110  var isEventSupported = __webpack_require__("ez49");
 111  
 112  
 113  // Reasonable defaults
 114  var PIXEL_STEP  = 10;
 115  var LINE_HEIGHT = 40;
 116  var PAGE_HEIGHT = 800;
 117  
 118  /**
 119   * Mouse wheel (and 2-finger trackpad) support on the web sucks.  It is
 120   * complicated, thus this doc is long and (hopefully) detailed enough to answer
 121   * your questions.
 122   *
 123   * If you need to react to the mouse wheel in a predictable way, this code is
 124   * like your bestest friend. * hugs *
 125   *
 126   * As of today, there are 4 DOM event types you can listen to:
 127   *
 128   *   'wheel'                -- Chrome(31+), FF(17+), IE(9+)
 129   *   'mousewheel'           -- Chrome, IE(6+), Opera, Safari
 130   *   'MozMousePixelScroll'  -- FF(3.5 only!) (2010-2013) -- don't bother!
 131   *   'DOMMouseScroll'       -- FF(0.9.7+) since 2003
 132   *
 133   * So what to do?  The is the best:
 134   *
 135   *   normalizeWheel.getEventType();
 136   *
 137   * In your event callback, use this code to get sane interpretation of the
 138   * deltas.  This code will return an object with properties:
 139   *
 140   *   spinX   -- normalized spin speed (use for zoom) - x plane
 141   *   spinY   -- " - y plane
 142   *   pixelX  -- normalized distance (to pixels) - x plane
 143   *   pixelY  -- " - y plane
 144   *
 145   * Wheel values are provided by the browser assuming you are using the wheel to
 146   * scroll a web page by a number of lines or pixels (or pages).  Values can vary
 147   * significantly on different platforms and browsers, forgetting that you can
 148   * scroll at different speeds.  Some devices (like trackpads) emit more events
 149   * at smaller increments with fine granularity, and some emit massive jumps with
 150   * linear speed or acceleration.
 151   *
 152   * This code does its best to normalize the deltas for you:
 153   *
 154   *   - spin is trying to normalize how far the wheel was spun (or trackpad
 155   *     dragged).  This is super useful for zoom support where you want to
 156   *     throw away the chunky scroll steps on the PC and make those equal to
 157   *     the slow and smooth tiny steps on the Mac. Key data: This code tries to
 158   *     resolve a single slow step on a wheel to 1.
 159   *
 160   *   - pixel is normalizing the desired scroll delta in pixel units.  You'll
 161   *     get the crazy differences between browsers, but at least it'll be in
 162   *     pixels!
 163   *
 164   *   - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT.  This
 165   *     should translate to positive value zooming IN, negative zooming OUT.
 166   *     This matches the newer 'wheel' event.
 167   *
 168   * Why are there spinX, spinY (or pixels)?
 169   *
 170   *   - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn
 171   *     with a mouse.  It results in side-scrolling in the browser by default.
 172   *
 173   *   - spinY is what you expect -- it's the classic axis of a mouse wheel.
 174   *
 175   *   - I dropped spinZ/pixelZ.  It is supported by the DOM 3 'wheel' event and
 176   *     probably is by browsers in conjunction with fancy 3D controllers .. but
 177   *     you know.
 178   *
 179   * Implementation info:
 180   *
 181   * Examples of 'wheel' event if you scroll slowly (down) by one step with an
 182   * average mouse:
 183   *
 184   *   OS X + Chrome  (mouse)     -    4   pixel delta  (wheelDelta -120)
 185   *   OS X + Safari  (mouse)     -  N/A   pixel delta  (wheelDelta  -12)
 186   *   OS X + Firefox (mouse)     -    0.1 line  delta  (wheelDelta  N/A)
 187   *   Win8 + Chrome  (mouse)     -  100   pixel delta  (wheelDelta -120)
 188   *   Win8 + Firefox (mouse)     -    3   line  delta  (wheelDelta -120)
 189   *
 190   * On the trackpad:
 191   *
 192   *   OS X + Chrome  (trackpad)  -    2   pixel delta  (wheelDelta   -6)
 193   *   OS X + Firefox (trackpad)  -    1   pixel delta  (wheelDelta  N/A)
 194   *
 195   * On other/older browsers.. it's more complicated as there can be multiple and
 196   * also missing delta values.
 197   *
 198   * The 'wheel' event is more standard:
 199   *
 200   * http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents
 201   *
 202   * The basics is that it includes a unit, deltaMode (pixels, lines, pages), and
 203   * deltaX, deltaY and deltaZ.  Some browsers provide other values to maintain
 204   * backward compatibility with older events.  Those other values help us
 205   * better normalize spin speed.  Example of what the browsers provide:
 206   *
 207   *                          | event.wheelDelta | event.detail
 208   *        ------------------+------------------+--------------
 209   *          Safari v5/OS X  |       -120       |       0
 210   *          Safari v5/Win7  |       -120       |       0
 211   *         Chrome v17/OS X  |       -120       |       0
 212   *         Chrome v17/Win7  |       -120       |       0
 213   *                IE9/Win7  |       -120       |   undefined
 214   *         Firefox v4/OS X  |     undefined    |       1
 215   *         Firefox v4/Win7  |     undefined    |       3
 216   *
 217   */
 218  function normalizeWheel(/*object*/ event) /*object*/ {
 219    var sX = 0, sY = 0,       // spinX, spinY
 220        pX = 0, pY = 0;       // pixelX, pixelY
 221  
 222    // Legacy
 223    if ('detail'      in event) { sY = event.detail; }
 224    if ('wheelDelta'  in event) { sY = -event.wheelDelta / 120; }
 225    if ('wheelDeltaY' in event) { sY = -event.wheelDeltaY / 120; }
 226    if ('wheelDeltaX' in event) { sX = -event.wheelDeltaX / 120; }
 227  
 228    // side scrolling on FF with DOMMouseScroll
 229    if ( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {
 230      sX = sY;
 231      sY = 0;
 232    }
 233  
 234    pX = sX * PIXEL_STEP;
 235    pY = sY * PIXEL_STEP;
 236  
 237    if ('deltaY' in event) { pY = event.deltaY; }
 238    if ('deltaX' in event) { pX = event.deltaX; }
 239  
 240    if ((pX || pY) && event.deltaMode) {
 241      if (event.deltaMode == 1) {          // delta in LINE units
 242        pX *= LINE_HEIGHT;
 243        pY *= LINE_HEIGHT;
 244      } else {                             // delta in PAGE units
 245        pX *= PAGE_HEIGHT;
 246        pY *= PAGE_HEIGHT;
 247      }
 248    }
 249  
 250    // Fall-back if spin cannot be determined
 251    if (pX && !sX) { sX = (pX < 1) ? -1 : 1; }
 252    if (pY && !sY) { sY = (pY < 1) ? -1 : 1; }
 253  
 254    return { spinX  : sX,
 255             spinY  : sY,
 256             pixelX : pX,
 257             pixelY : pY };
 258  }
 259  
 260  
 261  /**
 262   * The best combination if you prefer spinX + spinY normalization.  It favors
 263   * the older DOMMouseScroll for Firefox, as FF does not include wheelDelta with
 264   * 'wheel' event, making spin speed determination impossible.
 265   */
 266  normalizeWheel.getEventType = function() /*string*/ {
 267    return (UserAgent_DEPRECATED.firefox())
 268             ? 'DOMMouseScroll'
 269             : (isEventSupported('wheel'))
 270                 ? 'wheel'
 271                 : 'mousewheel';
 272  };
 273  
 274  module.exports = normalizeWheel;
 275  
 276  
 277  /***/ }),
 278  
 279  /***/ "1Yn1":
 280  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 281  
 282  "use strict";
 283  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
 284  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 285  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
 286  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 287  
 288  
 289  /**
 290   * WordPress dependencies
 291   */
 292  
 293  const code = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 294    viewBox: "0 0 24 24",
 295    xmlns: "http://www.w3.org/2000/svg"
 296  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 297    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"
 298  }));
 299  /* harmony default export */ __webpack_exports__["a"] = (code);
 300  
 301  
 302  /***/ }),
 303  
 304  /***/ "1ZqX":
 305  /***/ (function(module, exports) {
 306  
 307  (function() { module.exports = window["wp"]["data"]; }());
 308  
 309  /***/ }),
 310  
 311  /***/ "1iEr":
 312  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 313  
 314  "use strict";
 315  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
 316  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 317  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
 318  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 319  
 320  
 321  /**
 322   * WordPress dependencies
 323   */
 324  
 325  const chevronRight = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 326    xmlns: "http://www.w3.org/2000/svg",
 327    viewBox: "0 0 24 24"
 328  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 329    d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"
 330  }));
 331  /* harmony default export */ __webpack_exports__["a"] = (chevronRight);
 332  
 333  
 334  /***/ }),
 335  
 336  /***/ "2gm7":
 337  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 338  
 339  "use strict";
 340  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
 341  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 342  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
 343  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 344  
 345  
 346  /**
 347   * WordPress dependencies
 348   */
 349  
 350  const chevronLeft = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 351    xmlns: "http://www.w3.org/2000/svg",
 352    viewBox: "0 0 24 24"
 353  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 354    d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"
 355  }));
 356  /* harmony default export */ __webpack_exports__["a"] = (chevronLeft);
 357  
 358  
 359  /***/ }),
 360  
 361  /***/ "4eJC":
 362  /***/ (function(module, exports, __webpack_require__) {
 363  
 364  /**
 365   * Memize options object.
 366   *
 367   * @typedef MemizeOptions
 368   *
 369   * @property {number} [maxSize] Maximum size of the cache.
 370   */
 371  
 372  /**
 373   * Internal cache entry.
 374   *
 375   * @typedef MemizeCacheNode
 376   *
 377   * @property {?MemizeCacheNode|undefined} [prev] Previous node.
 378   * @property {?MemizeCacheNode|undefined} [next] Next node.
 379   * @property {Array<*>}                   args   Function arguments for cache
 380   *                                               entry.
 381   * @property {*}                          val    Function result.
 382   */
 383  
 384  /**
 385   * Properties of the enhanced function for controlling cache.
 386   *
 387   * @typedef MemizeMemoizedFunction
 388   *
 389   * @property {()=>void} clear Clear the cache.
 390   */
 391  
 392  /**
 393   * Accepts a function to be memoized, and returns a new memoized function, with
 394   * optional options.
 395   *
 396   * @template {Function} F
 397   *
 398   * @param {F}             fn        Function to memoize.
 399   * @param {MemizeOptions} [options] Options object.
 400   *
 401   * @return {F & MemizeMemoizedFunction} Memoized function.
 402   */
 403  function memize( fn, options ) {
 404      var size = 0;
 405  
 406      /** @type {?MemizeCacheNode|undefined} */
 407      var head;
 408  
 409      /** @type {?MemizeCacheNode|undefined} */
 410      var tail;
 411  
 412      options = options || {};
 413  
 414  	function memoized( /* ...args */ ) {
 415          var node = head,
 416              len = arguments.length,
 417              args, i;
 418  
 419          searchCache: while ( node ) {
 420              // Perform a shallow equality test to confirm that whether the node
 421              // under test is a candidate for the arguments passed. Two arrays
 422              // are shallowly equal if their length matches and each entry is
 423              // strictly equal between the two sets. Avoid abstracting to a
 424              // function which could incur an arguments leaking deoptimization.
 425  
 426              // Check whether node arguments match arguments length
 427              if ( node.args.length !== arguments.length ) {
 428                  node = node.next;
 429                  continue;
 430              }
 431  
 432              // Check whether node arguments match arguments values
 433              for ( i = 0; i < len; i++ ) {
 434                  if ( node.args[ i ] !== arguments[ i ] ) {
 435                      node = node.next;
 436                      continue searchCache;
 437                  }
 438              }
 439  
 440              // At this point we can assume we've found a match
 441  
 442              // Surface matched node to head if not already
 443              if ( node !== head ) {
 444                  // As tail, shift to previous. Must only shift if not also
 445                  // head, since if both head and tail, there is no previous.
 446                  if ( node === tail ) {
 447                      tail = node.prev;
 448                  }
 449  
 450                  // Adjust siblings to point to each other. If node was tail,
 451                  // this also handles new tail's empty `next` assignment.
 452                  /** @type {MemizeCacheNode} */ ( node.prev ).next = node.next;
 453                  if ( node.next ) {
 454                      node.next.prev = node.prev;
 455                  }
 456  
 457                  node.next = head;
 458                  node.prev = null;
 459                  /** @type {MemizeCacheNode} */ ( head ).prev = node;
 460                  head = node;
 461              }
 462  
 463              // Return immediately
 464              return node.val;
 465          }
 466  
 467          // No cached value found. Continue to insertion phase:
 468  
 469          // Create a copy of arguments (avoid leaking deoptimization)
 470          args = new Array( len );
 471          for ( i = 0; i < len; i++ ) {
 472              args[ i ] = arguments[ i ];
 473          }
 474  
 475          node = {
 476              args: args,
 477  
 478              // Generate the result from original function
 479              val: fn.apply( null, args ),
 480          };
 481  
 482          // Don't need to check whether node is already head, since it would
 483          // have been returned above already if it was
 484  
 485          // Shift existing head down list
 486          if ( head ) {
 487              head.prev = node;
 488              node.next = head;
 489          } else {
 490              // If no head, follows that there's no tail (at initial or reset)
 491              tail = node;
 492          }
 493  
 494          // Trim tail if we're reached max size and are pending cache insertion
 495          if ( size === /** @type {MemizeOptions} */ ( options ).maxSize ) {
 496              tail = /** @type {MemizeCacheNode} */ ( tail ).prev;
 497              /** @type {MemizeCacheNode} */ ( tail ).next = null;
 498          } else {
 499              size++;
 500          }
 501  
 502          head = node;
 503  
 504          return node.val;
 505      }
 506  
 507      memoized.clear = function() {
 508          head = null;
 509          tail = null;
 510          size = 0;
 511      };
 512  
 513      if ( false ) {}
 514  
 515      // Ignore reason: There's not a clear solution to create an intersection of
 516      // the function with additional properties, where the goal is to retain the
 517      // function signature of the incoming argument and add control properties
 518      // on the return value.
 519  
 520      // @ts-ignore
 521      return memoized;
 522  }
 523  
 524  module.exports = memize;
 525  
 526  
 527  /***/ }),
 528  
 529  /***/ "A/WM":
 530  /***/ (function(module, exports, __webpack_require__) {
 531  
 532  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
 533    Copyright (c) 2018 Jed Watson.
 534    Licensed under the MIT License (MIT), see
 535    http://jedwatson.github.io/classnames
 536  */
 537  /* global define */
 538  
 539  (function () {
 540      'use strict';
 541  
 542      var classNames = (function () {
 543          // don't inherit from Object so we can skip hasOwnProperty check later
 544          // http://stackoverflow.com/questions/15518328/creating-js-object-with-object-createnull#answer-21079232
 545  		function StorageObject() {}
 546          StorageObject.prototype = Object.create(null);
 547  
 548  		function _parseArray (resultSet, array) {
 549              var length = array.length;
 550  
 551              for (var i = 0; i < length; ++i) {
 552                  _parse(resultSet, array[i]);
 553              }
 554          }
 555  
 556          var hasOwn = {}.hasOwnProperty;
 557  
 558  		function _parseNumber (resultSet, num) {
 559              resultSet[num] = true;
 560          }
 561  
 562  		function _parseObject (resultSet, object) {
 563              if (object.toString === Object.prototype.toString) {
 564                  for (var k in object) {
 565                      if (hasOwn.call(object, k)) {
 566                          // set value to false instead of deleting it to avoid changing object structure
 567                          // https://www.smashingmagazine.com/2012/11/writing-fast-memory-efficient-javascript/#de-referencing-misconceptions
 568                          resultSet[k] = !!object[k];
 569                      }
 570                  }
 571              } else {
 572                  resultSet[object.toString()] = true;
 573              }
 574          }
 575  
 576          var SPACE = /\s+/;
 577  		function _parseString (resultSet, str) {
 578              var array = str.split(SPACE);
 579              var length = array.length;
 580  
 581              for (var i = 0; i < length; ++i) {
 582                  resultSet[array[i]] = true;
 583              }
 584          }
 585  
 586  		function _parse (resultSet, arg) {
 587              if (!arg) return;
 588              var argType = typeof arg;
 589  
 590              // 'foo bar'
 591              if (argType === 'string') {
 592                  _parseString(resultSet, arg);
 593  
 594              // ['foo', 'bar', ...]
 595              } else if (Array.isArray(arg)) {
 596                  _parseArray(resultSet, arg);
 597  
 598              // { 'foo': true, ... }
 599              } else if (argType === 'object') {
 600                  _parseObject(resultSet, arg);
 601  
 602              // '130'
 603              } else if (argType === 'number') {
 604                  _parseNumber(resultSet, arg);
 605              }
 606          }
 607  
 608  		function _classNames () {
 609              // don't leak arguments
 610              // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
 611              var len = arguments.length;
 612              var args = Array(len);
 613              for (var i = 0; i < len; i++) {
 614                  args[i] = arguments[i];
 615              }
 616  
 617              var classSet = new StorageObject();
 618              _parseArray(classSet, args);
 619  
 620              var list = [];
 621  
 622              for (var k in classSet) {
 623                  if (classSet[k]) {
 624                      list.push(k)
 625                  }
 626              }
 627  
 628              return list.join(' ');
 629          }
 630  
 631          return _classNames;
 632      })();
 633  
 634      if ( true && module.exports) {
 635          classNames.default = classNames;
 636          module.exports = classNames;
 637      } else if (true) {
 638          // register as 'classnames', consistent with npm package name
 639          !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
 640              return classNames;
 641          }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
 642                  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
 643      } else {}
 644  }());
 645  
 646  
 647  /***/ }),
 648  
 649  /***/ "B9Az":
 650  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 651  
 652  "use strict";
 653  
 654  // EXTERNAL MODULE: external ["wp","element"]
 655  var external_wp_element_ = __webpack_require__("GRId");
 656  
 657  // EXTERNAL MODULE: external ["wp","primitives"]
 658  var external_wp_primitives_ = __webpack_require__("Tqx9");
 659  
 660  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/pencil.js
 661  
 662  
 663  /**
 664   * WordPress dependencies
 665   */
 666  
 667  const pencil = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
 668    xmlns: "http://www.w3.org/2000/svg",
 669    viewBox: "0 0 24 24"
 670  }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
 671    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"
 672  }));
 673  /* harmony default export */ var library_pencil = (pencil);
 674  
 675  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/edit.js
 676  /**
 677   * Internal dependencies
 678   */
 679  
 680  /* harmony default export */ var edit = __webpack_exports__["a"] = (library_pencil);
 681  
 682  
 683  /***/ }),
 684  
 685  /***/ "Bpkj":
 686  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 687  
 688  "use strict";
 689  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
 690  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 691  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
 692  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 693  
 694  
 695  /**
 696   * WordPress dependencies
 697   */
 698  
 699  const link = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 700    xmlns: "http://www.w3.org/2000/svg",
 701    viewBox: "0 0 24 24"
 702  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 703    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"
 704  }));
 705  /* harmony default export */ __webpack_exports__["a"] = (link);
 706  
 707  
 708  /***/ }),
 709  
 710  /***/ "FEKF":
 711  /***/ (function(module, exports, __webpack_require__) {
 712  
 713  /*! Fast Average Color | © 2019 Denis Seleznev | MIT License | https://github.com/hcodes/fast-average-color/ */
 714  (function (global, factory) {
 715       true ? module.exports = factory() :
 716      undefined;
 717  }(this, (function () { 'use strict';
 718  
 719  function _classCallCheck(instance, Constructor) {
 720    if (!(instance instanceof Constructor)) {
 721      throw new TypeError("Cannot call a class as a function");
 722    }
 723  }
 724  
 725  function _defineProperties(target, props) {
 726    for (var i = 0; i < props.length; i++) {
 727      var descriptor = props[i];
 728      descriptor.enumerable = descriptor.enumerable || false;
 729      descriptor.configurable = true;
 730      if ("value" in descriptor) descriptor.writable = true;
 731      Object.defineProperty(target, descriptor.key, descriptor);
 732    }
 733  }
 734  
 735  function _createClass(Constructor, protoProps, staticProps) {
 736    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
 737    if (staticProps) _defineProperties(Constructor, staticProps);
 738    return Constructor;
 739  }
 740  
 741  function _slicedToArray(arr, i) {
 742    return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
 743  }
 744  
 745  function _arrayWithHoles(arr) {
 746    if (Array.isArray(arr)) return arr;
 747  }
 748  
 749  function _iterableToArrayLimit(arr, i) {
 750    var _arr = [];
 751    var _n = true;
 752    var _d = false;
 753    var _e = undefined;
 754  
 755    try {
 756      for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
 757        _arr.push(_s.value);
 758  
 759        if (i && _arr.length === i) break;
 760      }
 761    } catch (err) {
 762      _d = true;
 763      _e = err;
 764    } finally {
 765      try {
 766        if (!_n && _i["return"] != null) _i["return"]();
 767      } finally {
 768        if (_d) throw _e;
 769      }
 770    }
 771  
 772    return _arr;
 773  }
 774  
 775  function _nonIterableRest() {
 776    throw new TypeError("Invalid attempt to destructure non-iterable instance");
 777  }
 778  
 779  var FastAverageColor =
 780  /*#__PURE__*/
 781  function () {
 782    function FastAverageColor() {
 783      _classCallCheck(this, FastAverageColor);
 784    }
 785  
 786    _createClass(FastAverageColor, [{
 787      key: "getColorAsync",
 788  
 789      /**
 790       * Get asynchronously the average color from not loaded image.
 791       *
 792       * @param {HTMLImageElement} resource
 793       * @param {Function} callback
 794       * @param {Object|null} [options]
 795       * @param {Array}  [options.defaultColor=[255, 255, 255, 255]]
 796       * @param {*}      [options.data]
 797       * @param {string} [options.mode="speed"] "precision" or "speed"
 798       * @param {string} [options.algorithm="sqrt"] "simple", "sqrt" or "dominant"
 799       * @param {number} [options.step=1]
 800       * @param {number} [options.left=0]
 801       * @param {number} [options.top=0]
 802       * @param {number} [options.width=width of resource]
 803       * @param {number} [options.height=height of resource]
 804       */
 805      value: function getColorAsync(resource, callback, options) {
 806        if (resource.complete) {
 807          callback.call(resource, this.getColor(resource, options), options && options.data);
 808        } else {
 809          this._bindImageEvents(resource, callback, options);
 810        }
 811      }
 812      /**
 813       * Get the average color from images, videos and canvas.
 814       *
 815       * @param {HTMLImageElement|HTMLVideoElement|HTMLCanvasElement} resource
 816       * @param {Object|null} [options]
 817       * @param {Array}  [options.defaultColor=[255, 255, 255, 255]]
 818       * @param {*}      [options.data]
 819       * @param {string} [options.mode="speed"] "precision" or "speed"
 820       * @param {string} [options.algorithm="sqrt"] "simple", "sqrt" or "dominant"
 821       * @param {number} [options.step=1]
 822       * @param {number} [options.left=0]
 823       * @param {number} [options.top=0]
 824       * @param {number} [options.width=width of resource]
 825       * @param {number} [options.height=height of resource]
 826       *
 827       * @returns {Object}
 828       */
 829  
 830    }, {
 831      key: "getColor",
 832      value: function getColor(resource, options) {
 833        options = options || {};
 834  
 835        var defaultColor = this._getDefaultColor(options),
 836            originalSize = this._getOriginalSize(resource),
 837            size = this._prepareSizeAndPosition(originalSize, options);
 838  
 839        var error = null,
 840            value = defaultColor;
 841  
 842        if (!size.srcWidth || !size.srcHeight || !size.destWidth || !size.destHeight) {
 843          return this._prepareResult(defaultColor, new Error('FastAverageColor: Incorrect sizes.'));
 844        }
 845  
 846        if (!this._ctx) {
 847          this._canvas = this._makeCanvas();
 848          this._ctx = this._canvas.getContext && this._canvas.getContext('2d');
 849  
 850          if (!this._ctx) {
 851            return this._prepareResult(defaultColor, new Error('FastAverageColor: Canvas Context 2D is not supported in this browser.'));
 852          }
 853        }
 854  
 855        this._canvas.width = size.destWidth;
 856        this._canvas.height = size.destHeight;
 857  
 858        try {
 859          this._ctx.clearRect(0, 0, size.destWidth, size.destHeight);
 860  
 861          this._ctx.drawImage(resource, size.srcLeft, size.srcTop, size.srcWidth, size.srcHeight, 0, 0, size.destWidth, size.destHeight);
 862  
 863          var bitmapData = this._ctx.getImageData(0, 0, size.destWidth, size.destHeight).data;
 864  
 865          value = this.getColorFromArray4(bitmapData, options);
 866        } catch (e) {
 867          // Security error, CORS
 868          // https://developer.mozilla.org/en/docs/Web/HTML/CORS_enabled_image
 869          error = e;
 870        }
 871  
 872        return this._prepareResult(value, error);
 873      }
 874      /**
 875       * Get the average color from a array when 1 pixel is 4 bytes.
 876       *
 877       * @param {Array|Uint8Array} arr
 878       * @param {Object} [options]
 879       * @param {string} [options.algorithm="sqrt"] "simple", "sqrt" or "dominant"
 880       * @param {Array}  [options.defaultColor=[255, 255, 255, 255]]
 881       * @param {number} [options.step=1]
 882       *
 883       * @returns {Array} [red (0-255), green (0-255), blue (0-255), alpha (0-255)]
 884       */
 885  
 886    }, {
 887      key: "getColorFromArray4",
 888      value: function getColorFromArray4(arr, options) {
 889        options = options || {};
 890        var bytesPerPixel = 4,
 891            arrLength = arr.length;
 892  
 893        if (arrLength < bytesPerPixel) {
 894          return this._getDefaultColor(options);
 895        }
 896  
 897        var len = arrLength - arrLength % bytesPerPixel,
 898            preparedStep = (options.step || 1) * bytesPerPixel,
 899            algorithm = '_' + (options.algorithm || 'sqrt') + 'Algorithm';
 900  
 901        if (typeof this[algorithm] !== 'function') {
 902          throw new Error("FastAverageColor: ".concat(options.algorithm, " is unknown algorithm."));
 903        }
 904  
 905        return this[algorithm](arr, len, preparedStep);
 906      }
 907      /**
 908       * Destroy the instance.
 909       */
 910  
 911    }, {
 912      key: "destroy",
 913      value: function destroy() {
 914        delete this._canvas;
 915        delete this._ctx;
 916      }
 917    }, {
 918      key: "_getDefaultColor",
 919      value: function _getDefaultColor(options) {
 920        return this._getOption(options, 'defaultColor', [255, 255, 255, 255]);
 921      }
 922    }, {
 923      key: "_getOption",
 924      value: function _getOption(options, name, defaultValue) {
 925        return typeof options[name] === 'undefined' ? defaultValue : options[name];
 926      }
 927    }, {
 928      key: "_prepareSizeAndPosition",
 929      value: function _prepareSizeAndPosition(originalSize, options) {
 930        var srcLeft = this._getOption(options, 'left', 0),
 931            srcTop = this._getOption(options, 'top', 0),
 932            srcWidth = this._getOption(options, 'width', originalSize.width),
 933            srcHeight = this._getOption(options, 'height', originalSize.height),
 934            destWidth = srcWidth,
 935            destHeight = srcHeight;
 936  
 937        if (options.mode === 'precision') {
 938          return {
 939            srcLeft: srcLeft,
 940            srcTop: srcTop,
 941            srcWidth: srcWidth,
 942            srcHeight: srcHeight,
 943            destWidth: destWidth,
 944            destHeight: destHeight
 945          };
 946        }
 947  
 948        var maxSize = 100,
 949            minSize = 10;
 950        var factor;
 951  
 952        if (srcWidth > srcHeight) {
 953          factor = srcWidth / srcHeight;
 954          destWidth = maxSize;
 955          destHeight = Math.round(destWidth / factor);
 956        } else {
 957          factor = srcHeight / srcWidth;
 958          destHeight = maxSize;
 959          destWidth = Math.round(destHeight / factor);
 960        }
 961  
 962        if (destWidth > srcWidth || destHeight > srcHeight || destWidth < minSize || destHeight < minSize) {
 963          destWidth = srcWidth;
 964          destHeight = srcHeight;
 965        }
 966  
 967        return {
 968          srcLeft: srcLeft,
 969          srcTop: srcTop,
 970          srcWidth: srcWidth,
 971          srcHeight: srcHeight,
 972          destWidth: destWidth,
 973          destHeight: destHeight
 974        };
 975      }
 976    }, {
 977      key: "_simpleAlgorithm",
 978      value: function _simpleAlgorithm(arr, len, preparedStep) {
 979        var redTotal = 0,
 980            greenTotal = 0,
 981            blueTotal = 0,
 982            alphaTotal = 0,
 983            count = 0;
 984  
 985        for (var i = 0; i < len; i += preparedStep) {
 986          var alpha = arr[i + 3],
 987              red = arr[i] * alpha,
 988              green = arr[i + 1] * alpha,
 989              blue = arr[i + 2] * alpha;
 990          redTotal += red;
 991          greenTotal += green;
 992          blueTotal += blue;
 993          alphaTotal += alpha;
 994          count++;
 995        }
 996  
 997        return alphaTotal ? [Math.round(redTotal / alphaTotal), Math.round(greenTotal / alphaTotal), Math.round(blueTotal / alphaTotal), Math.round(alphaTotal / count)] : [0, 0, 0, 0];
 998      }
 999    }, {
1000      key: "_sqrtAlgorithm",
1001      value: function _sqrtAlgorithm(arr, len, preparedStep) {
1002        var redTotal = 0,
1003            greenTotal = 0,
1004            blueTotal = 0,
1005            alphaTotal = 0,
1006            count = 0;
1007  
1008        for (var i = 0; i < len; i += preparedStep) {
1009          var red = arr[i],
1010              green = arr[i + 1],
1011              blue = arr[i + 2],
1012              alpha = arr[i + 3];
1013          redTotal += red * red * alpha;
1014          greenTotal += green * green * alpha;
1015          blueTotal += blue * blue * alpha;
1016          alphaTotal += alpha;
1017          count++;
1018        }
1019  
1020        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];
1021      }
1022    }, {
1023      key: "_dominantAlgorithm",
1024      value: function _dominantAlgorithm(arr, len, preparedStep) {
1025        var colorHash = {},
1026            divider = 24;
1027  
1028        for (var i = 0; i < len; i += preparedStep) {
1029          var red = arr[i],
1030              green = arr[i + 1],
1031              blue = arr[i + 2],
1032              alpha = arr[i + 3],
1033              key = Math.round(red / divider) + ',' + Math.round(green / divider) + ',' + Math.round(blue / divider);
1034  
1035          if (colorHash[key]) {
1036            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];
1037          } else {
1038            colorHash[key] = [red * alpha, green * alpha, blue * alpha, alpha, 1];
1039          }
1040        }
1041  
1042        var buffer = Object.keys(colorHash).map(function (key) {
1043          return colorHash[key];
1044        }).sort(function (a, b) {
1045          var countA = a[4],
1046              countB = b[4];
1047          return countA > countB ? -1 : countA === countB ? 0 : 1;
1048        });
1049  
1050        var _buffer$ = _slicedToArray(buffer[0], 5),
1051            redTotal = _buffer$[0],
1052            greenTotal = _buffer$[1],
1053            blueTotal = _buffer$[2],
1054            alphaTotal = _buffer$[3],
1055            count = _buffer$[4];
1056  
1057        return alphaTotal ? [Math.round(redTotal / alphaTotal), Math.round(greenTotal / alphaTotal), Math.round(blueTotal / alphaTotal), Math.round(alphaTotal / count)] : [0, 0, 0, 0];
1058      }
1059    }, {
1060      key: "_bindImageEvents",
1061      value: function _bindImageEvents(resource, callback, options) {
1062        var _this = this;
1063  
1064        options = options || {};
1065  
1066        var data = options && options.data,
1067            defaultColor = this._getDefaultColor(options),
1068            onload = function onload() {
1069          unbindEvents();
1070          callback.call(resource, _this.getColor(resource, options), data);
1071        },
1072            onerror = function onerror() {
1073          unbindEvents();
1074          callback.call(resource, _this._prepareResult(defaultColor, new Error('Image error')), data);
1075        },
1076            onabort = function onabort() {
1077          unbindEvents();
1078          callback.call(resource, _this._prepareResult(defaultColor, new Error('Image abort')), data);
1079        },
1080            unbindEvents = function unbindEvents() {
1081          resource.removeEventListener('load', onload);
1082          resource.removeEventListener('error', onerror);
1083          resource.removeEventListener('abort', onabort);
1084        };
1085  
1086        resource.addEventListener('load', onload);
1087        resource.addEventListener('error', onerror);
1088        resource.addEventListener('abort', onabort);
1089      }
1090    }, {
1091      key: "_prepareResult",
1092      value: function _prepareResult(value, error) {
1093        var rgb = value.slice(0, 3),
1094            rgba = [].concat(rgb, value[3] / 255),
1095            isDark = this._isDark(value);
1096  
1097        return {
1098          error: error,
1099          value: value,
1100          rgb: 'rgb(' + rgb.join(',') + ')',
1101          rgba: 'rgba(' + rgba.join(',') + ')',
1102          hex: this._arrayToHex(rgb),
1103          hexa: this._arrayToHex(value),
1104          isDark: isDark,
1105          isLight: !isDark
1106        };
1107      }
1108    }, {
1109      key: "_getOriginalSize",
1110      value: function _getOriginalSize(resource) {
1111        if (resource instanceof HTMLImageElement) {
1112          return {
1113            width: resource.naturalWidth,
1114            height: resource.naturalHeight
1115          };
1116        }
1117  
1118        if (resource instanceof HTMLVideoElement) {
1119          return {
1120            width: resource.videoWidth,
1121            height: resource.videoHeight
1122          };
1123        }
1124  
1125        return {
1126          width: resource.width,
1127          height: resource.height
1128        };
1129      }
1130    }, {
1131      key: "_toHex",
1132      value: function _toHex(num) {
1133        var str = num.toString(16);
1134        return str.length === 1 ? '0' + str : str;
1135      }
1136    }, {
1137      key: "_arrayToHex",
1138      value: function _arrayToHex(arr) {
1139        return '#' + arr.map(this._toHex).join('');
1140      }
1141    }, {
1142      key: "_isDark",
1143      value: function _isDark(color) {
1144        // http://www.w3.org/TR/AERT#color-contrast
1145        var result = (color[0] * 299 + color[1] * 587 + color[2] * 114) / 1000;
1146        return result < 128;
1147      }
1148    }, {
1149      key: "_makeCanvas",
1150      value: function _makeCanvas() {
1151        return typeof window === 'undefined' ? new OffscreenCanvas(1, 1) : document.createElement('canvas');
1152      }
1153    }]);
1154  
1155    return FastAverageColor;
1156  }();
1157  
1158  return FastAverageColor;
1159  
1160  })));
1161  
1162  
1163  /***/ }),
1164  
1165  /***/ "FqII":
1166  /***/ (function(module, exports) {
1167  
1168  (function() { module.exports = window["wp"]["date"]; }());
1169  
1170  /***/ }),
1171  
1172  /***/ "GRId":
1173  /***/ (function(module, exports) {
1174  
1175  (function() { module.exports = window["wp"]["element"]; }());
1176  
1177  /***/ }),
1178  
1179  /***/ "HSyU":
1180  /***/ (function(module, exports) {
1181  
1182  (function() { module.exports = window["wp"]["blocks"]; }());
1183  
1184  /***/ }),
1185  
1186  /***/ "JREk":
1187  /***/ (function(module, exports) {
1188  
1189  (function() { module.exports = window["wp"]["serverSideRender"]; }());
1190  
1191  /***/ }),
1192  
1193  /***/ "K51g":
1194  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1195  
1196  "use strict";
1197  // ESM COMPAT FLAG
1198  __webpack_require__.r(__webpack_exports__);
1199  
1200  // EXPORTS
1201  __webpack_require__.d(__webpack_exports__, "__experimentalGetCoreBlocks", function() { return /* binding */ __experimentalGetCoreBlocks; });
1202  __webpack_require__.d(__webpack_exports__, "registerCoreBlocks", function() { return /* binding */ registerCoreBlocks; });
1203  __webpack_require__.d(__webpack_exports__, "__experimentalRegisterExperimentalCoreBlocks", function() { return /* binding */ __experimentalRegisterExperimentalCoreBlocks; });
1204  
1205  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/paragraph/index.js
1206  var build_module_paragraph_namespaceObject = {};
1207  __webpack_require__.r(build_module_paragraph_namespaceObject);
1208  __webpack_require__.d(build_module_paragraph_namespaceObject, "metadata", function() { return paragraph_metadata; });
1209  __webpack_require__.d(build_module_paragraph_namespaceObject, "name", function() { return paragraph_name; });
1210  __webpack_require__.d(build_module_paragraph_namespaceObject, "settings", function() { return paragraph_settings; });
1211  
1212  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/image/index.js
1213  var build_module_image_namespaceObject = {};
1214  __webpack_require__.r(build_module_image_namespaceObject);
1215  __webpack_require__.d(build_module_image_namespaceObject, "metadata", function() { return image_metadata; });
1216  __webpack_require__.d(build_module_image_namespaceObject, "name", function() { return image_name; });
1217  __webpack_require__.d(build_module_image_namespaceObject, "settings", function() { return image_settings; });
1218  
1219  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/heading/index.js
1220  var build_module_heading_namespaceObject = {};
1221  __webpack_require__.r(build_module_heading_namespaceObject);
1222  __webpack_require__.d(build_module_heading_namespaceObject, "metadata", function() { return heading_metadata; });
1223  __webpack_require__.d(build_module_heading_namespaceObject, "name", function() { return heading_name; });
1224  __webpack_require__.d(build_module_heading_namespaceObject, "settings", function() { return heading_settings; });
1225  
1226  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/quote/index.js
1227  var build_module_quote_namespaceObject = {};
1228  __webpack_require__.r(build_module_quote_namespaceObject);
1229  __webpack_require__.d(build_module_quote_namespaceObject, "metadata", function() { return quote_metadata; });
1230  __webpack_require__.d(build_module_quote_namespaceObject, "name", function() { return quote_name; });
1231  __webpack_require__.d(build_module_quote_namespaceObject, "settings", function() { return quote_settings; });
1232  
1233  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/gallery/index.js
1234  var build_module_gallery_namespaceObject = {};
1235  __webpack_require__.r(build_module_gallery_namespaceObject);
1236  __webpack_require__.d(build_module_gallery_namespaceObject, "metadata", function() { return gallery_metadata; });
1237  __webpack_require__.d(build_module_gallery_namespaceObject, "name", function() { return gallery_name; });
1238  __webpack_require__.d(build_module_gallery_namespaceObject, "settings", function() { return gallery_settings; });
1239  
1240  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/archives/index.js
1241  var archives_namespaceObject = {};
1242  __webpack_require__.r(archives_namespaceObject);
1243  __webpack_require__.d(archives_namespaceObject, "metadata", function() { return archives_metadata; });
1244  __webpack_require__.d(archives_namespaceObject, "name", function() { return archives_name; });
1245  __webpack_require__.d(archives_namespaceObject, "settings", function() { return archives_settings; });
1246  
1247  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/audio/index.js
1248  var build_module_audio_namespaceObject = {};
1249  __webpack_require__.r(build_module_audio_namespaceObject);
1250  __webpack_require__.d(build_module_audio_namespaceObject, "metadata", function() { return audio_metadata; });
1251  __webpack_require__.d(build_module_audio_namespaceObject, "name", function() { return audio_name; });
1252  __webpack_require__.d(build_module_audio_namespaceObject, "settings", function() { return audio_settings; });
1253  
1254  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/button/index.js
1255  var button_namespaceObject = {};
1256  __webpack_require__.r(button_namespaceObject);
1257  __webpack_require__.d(button_namespaceObject, "metadata", function() { return button_metadata; });
1258  __webpack_require__.d(button_namespaceObject, "name", function() { return button_name; });
1259  __webpack_require__.d(button_namespaceObject, "settings", function() { return button_settings; });
1260  
1261  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/buttons/index.js
1262  var build_module_buttons_namespaceObject = {};
1263  __webpack_require__.r(build_module_buttons_namespaceObject);
1264  __webpack_require__.d(build_module_buttons_namespaceObject, "metadata", function() { return buttons_metadata; });
1265  __webpack_require__.d(build_module_buttons_namespaceObject, "name", function() { return buttons_name; });
1266  __webpack_require__.d(build_module_buttons_namespaceObject, "settings", function() { return buttons_settings; });
1267  
1268  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/calendar/index.js
1269  var build_module_calendar_namespaceObject = {};
1270  __webpack_require__.r(build_module_calendar_namespaceObject);
1271  __webpack_require__.d(build_module_calendar_namespaceObject, "metadata", function() { return calendar_metadata; });
1272  __webpack_require__.d(build_module_calendar_namespaceObject, "name", function() { return calendar_name; });
1273  __webpack_require__.d(build_module_calendar_namespaceObject, "settings", function() { return calendar_settings; });
1274  
1275  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/categories/index.js
1276  var categories_namespaceObject = {};
1277  __webpack_require__.r(categories_namespaceObject);
1278  __webpack_require__.d(categories_namespaceObject, "metadata", function() { return categories_metadata; });
1279  __webpack_require__.d(categories_namespaceObject, "name", function() { return categories_name; });
1280  __webpack_require__.d(categories_namespaceObject, "settings", function() { return categories_settings; });
1281  
1282  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/code/index.js
1283  var code_namespaceObject = {};
1284  __webpack_require__.r(code_namespaceObject);
1285  __webpack_require__.d(code_namespaceObject, "metadata", function() { return code_metadata; });
1286  __webpack_require__.d(code_namespaceObject, "name", function() { return code_name; });
1287  __webpack_require__.d(code_namespaceObject, "settings", function() { return code_settings; });
1288  
1289  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/columns/index.js
1290  var build_module_columns_namespaceObject = {};
1291  __webpack_require__.r(build_module_columns_namespaceObject);
1292  __webpack_require__.d(build_module_columns_namespaceObject, "metadata", function() { return columns_metadata; });
1293  __webpack_require__.d(build_module_columns_namespaceObject, "name", function() { return columns_name; });
1294  __webpack_require__.d(build_module_columns_namespaceObject, "settings", function() { return columns_settings; });
1295  
1296  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/column/index.js
1297  var build_module_column_namespaceObject = {};
1298  __webpack_require__.r(build_module_column_namespaceObject);
1299  __webpack_require__.d(build_module_column_namespaceObject, "metadata", function() { return column_metadata; });
1300  __webpack_require__.d(build_module_column_namespaceObject, "name", function() { return column_name; });
1301  __webpack_require__.d(build_module_column_namespaceObject, "settings", function() { return column_settings; });
1302  
1303  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/cover/index.js
1304  var build_module_cover_namespaceObject = {};
1305  __webpack_require__.r(build_module_cover_namespaceObject);
1306  __webpack_require__.d(build_module_cover_namespaceObject, "metadata", function() { return cover_metadata; });
1307  __webpack_require__.d(build_module_cover_namespaceObject, "name", function() { return cover_name; });
1308  __webpack_require__.d(build_module_cover_namespaceObject, "settings", function() { return cover_settings; });
1309  
1310  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/embed/index.js
1311  var embed_namespaceObject = {};
1312  __webpack_require__.r(embed_namespaceObject);
1313  __webpack_require__.d(embed_namespaceObject, "metadata", function() { return embed_metadata; });
1314  __webpack_require__.d(embed_namespaceObject, "name", function() { return embed_name; });
1315  __webpack_require__.d(embed_namespaceObject, "settings", function() { return embed_settings; });
1316  
1317  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/file/index.js
1318  var build_module_file_namespaceObject = {};
1319  __webpack_require__.r(build_module_file_namespaceObject);
1320  __webpack_require__.d(build_module_file_namespaceObject, "metadata", function() { return file_metadata; });
1321  __webpack_require__.d(build_module_file_namespaceObject, "name", function() { return file_name; });
1322  __webpack_require__.d(build_module_file_namespaceObject, "settings", function() { return file_settings; });
1323  
1324  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/html/index.js
1325  var build_module_html_namespaceObject = {};
1326  __webpack_require__.r(build_module_html_namespaceObject);
1327  __webpack_require__.d(build_module_html_namespaceObject, "metadata", function() { return html_metadata; });
1328  __webpack_require__.d(build_module_html_namespaceObject, "name", function() { return html_name; });
1329  __webpack_require__.d(build_module_html_namespaceObject, "settings", function() { return html_settings; });
1330  
1331  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/media-text/index.js
1332  var media_text_namespaceObject = {};
1333  __webpack_require__.r(media_text_namespaceObject);
1334  __webpack_require__.d(media_text_namespaceObject, "metadata", function() { return media_text_metadata; });
1335  __webpack_require__.d(media_text_namespaceObject, "name", function() { return media_text_name; });
1336  __webpack_require__.d(media_text_namespaceObject, "settings", function() { return media_text_settings; });
1337  
1338  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/latest-comments/index.js
1339  var latest_comments_namespaceObject = {};
1340  __webpack_require__.r(latest_comments_namespaceObject);
1341  __webpack_require__.d(latest_comments_namespaceObject, "metadata", function() { return latest_comments_metadata; });
1342  __webpack_require__.d(latest_comments_namespaceObject, "name", function() { return latest_comments_name; });
1343  __webpack_require__.d(latest_comments_namespaceObject, "settings", function() { return latest_comments_settings; });
1344  
1345  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/latest-posts/index.js
1346  var latest_posts_namespaceObject = {};
1347  __webpack_require__.r(latest_posts_namespaceObject);
1348  __webpack_require__.d(latest_posts_namespaceObject, "metadata", function() { return latest_posts_metadata; });
1349  __webpack_require__.d(latest_posts_namespaceObject, "name", function() { return latest_posts_name; });
1350  __webpack_require__.d(latest_posts_namespaceObject, "settings", function() { return latest_posts_settings; });
1351  
1352  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/legacy-widget/index.js
1353  var legacy_widget_namespaceObject = {};
1354  __webpack_require__.r(legacy_widget_namespaceObject);
1355  __webpack_require__.d(legacy_widget_namespaceObject, "metadata", function() { return legacy_widget_metadata; });
1356  __webpack_require__.d(legacy_widget_namespaceObject, "name", function() { return legacy_widget_name; });
1357  __webpack_require__.d(legacy_widget_namespaceObject, "settings", function() { return legacy_widget_settings; });
1358  
1359  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/loginout/index.js
1360  var loginout_namespaceObject = {};
1361  __webpack_require__.r(loginout_namespaceObject);
1362  __webpack_require__.d(loginout_namespaceObject, "metadata", function() { return loginout_metadata; });
1363  __webpack_require__.d(loginout_namespaceObject, "name", function() { return loginout_name; });
1364  __webpack_require__.d(loginout_namespaceObject, "settings", function() { return loginout_settings; });
1365  
1366  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/list/index.js
1367  var build_module_list_namespaceObject = {};
1368  __webpack_require__.r(build_module_list_namespaceObject);
1369  __webpack_require__.d(build_module_list_namespaceObject, "metadata", function() { return list_metadata; });
1370  __webpack_require__.d(build_module_list_namespaceObject, "name", function() { return list_name; });
1371  __webpack_require__.d(build_module_list_namespaceObject, "settings", function() { return list_settings; });
1372  
1373  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/missing/index.js
1374  var missing_namespaceObject = {};
1375  __webpack_require__.r(missing_namespaceObject);
1376  __webpack_require__.d(missing_namespaceObject, "metadata", function() { return missing_metadata; });
1377  __webpack_require__.d(missing_namespaceObject, "name", function() { return missing_name; });
1378  __webpack_require__.d(missing_namespaceObject, "settings", function() { return missing_settings; });
1379  
1380  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/more/index.js
1381  var build_module_more_namespaceObject = {};
1382  __webpack_require__.r(build_module_more_namespaceObject);
1383  __webpack_require__.d(build_module_more_namespaceObject, "metadata", function() { return more_metadata; });
1384  __webpack_require__.d(build_module_more_namespaceObject, "name", function() { return more_name; });
1385  __webpack_require__.d(build_module_more_namespaceObject, "settings", function() { return more_settings; });
1386  
1387  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/nextpage/index.js
1388  var nextpage_namespaceObject = {};
1389  __webpack_require__.r(nextpage_namespaceObject);
1390  __webpack_require__.d(nextpage_namespaceObject, "metadata", function() { return nextpage_metadata; });
1391  __webpack_require__.d(nextpage_namespaceObject, "name", function() { return nextpage_name; });
1392  __webpack_require__.d(nextpage_namespaceObject, "settings", function() { return nextpage_settings; });
1393  
1394  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/page-list/index.js
1395  var page_list_namespaceObject = {};
1396  __webpack_require__.r(page_list_namespaceObject);
1397  __webpack_require__.d(page_list_namespaceObject, "metadata", function() { return page_list_metadata; });
1398  __webpack_require__.d(page_list_namespaceObject, "name", function() { return page_list_name; });
1399  __webpack_require__.d(page_list_namespaceObject, "settings", function() { return page_list_settings; });
1400  
1401  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/preformatted/index.js
1402  var build_module_preformatted_namespaceObject = {};
1403  __webpack_require__.r(build_module_preformatted_namespaceObject);
1404  __webpack_require__.d(build_module_preformatted_namespaceObject, "metadata", function() { return preformatted_metadata; });
1405  __webpack_require__.d(build_module_preformatted_namespaceObject, "name", function() { return preformatted_name; });
1406  __webpack_require__.d(build_module_preformatted_namespaceObject, "settings", function() { return preformatted_settings; });
1407  
1408  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/pullquote/index.js
1409  var build_module_pullquote_namespaceObject = {};
1410  __webpack_require__.r(build_module_pullquote_namespaceObject);
1411  __webpack_require__.d(build_module_pullquote_namespaceObject, "metadata", function() { return pullquote_metadata; });
1412  __webpack_require__.d(build_module_pullquote_namespaceObject, "name", function() { return pullquote_name; });
1413  __webpack_require__.d(build_module_pullquote_namespaceObject, "settings", function() { return pullquote_settings; });
1414  
1415  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/block/index.js
1416  var block_namespaceObject = {};
1417  __webpack_require__.r(block_namespaceObject);
1418  __webpack_require__.d(block_namespaceObject, "metadata", function() { return block_metadata; });
1419  __webpack_require__.d(block_namespaceObject, "name", function() { return block_name; });
1420  __webpack_require__.d(block_namespaceObject, "settings", function() { return block_settings; });
1421  
1422  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/rss/index.js
1423  var build_module_rss_namespaceObject = {};
1424  __webpack_require__.r(build_module_rss_namespaceObject);
1425  __webpack_require__.d(build_module_rss_namespaceObject, "metadata", function() { return rss_metadata; });
1426  __webpack_require__.d(build_module_rss_namespaceObject, "name", function() { return rss_name; });
1427  __webpack_require__.d(build_module_rss_namespaceObject, "settings", function() { return rss_settings; });
1428  
1429  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/search/index.js
1430  var search_namespaceObject = {};
1431  __webpack_require__.r(search_namespaceObject);
1432  __webpack_require__.d(search_namespaceObject, "metadata", function() { return search_metadata; });
1433  __webpack_require__.d(search_namespaceObject, "name", function() { return search_name; });
1434  __webpack_require__.d(search_namespaceObject, "settings", function() { return search_settings; });
1435  
1436  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/group/index.js
1437  var build_module_group_namespaceObject = {};
1438  __webpack_require__.r(build_module_group_namespaceObject);
1439  __webpack_require__.d(build_module_group_namespaceObject, "metadata", function() { return group_metadata; });
1440  __webpack_require__.d(build_module_group_namespaceObject, "name", function() { return group_name; });
1441  __webpack_require__.d(build_module_group_namespaceObject, "settings", function() { return group_settings; });
1442  
1443  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/separator/index.js
1444  var build_module_separator_namespaceObject = {};
1445  __webpack_require__.r(build_module_separator_namespaceObject);
1446  __webpack_require__.d(build_module_separator_namespaceObject, "metadata", function() { return separator_metadata; });
1447  __webpack_require__.d(build_module_separator_namespaceObject, "name", function() { return separator_name; });
1448  __webpack_require__.d(build_module_separator_namespaceObject, "settings", function() { return build_module_separator_settings; });
1449  
1450  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/shortcode/index.js
1451  var build_module_shortcode_namespaceObject = {};
1452  __webpack_require__.r(build_module_shortcode_namespaceObject);
1453  __webpack_require__.d(build_module_shortcode_namespaceObject, "metadata", function() { return shortcode_metadata; });
1454  __webpack_require__.d(build_module_shortcode_namespaceObject, "name", function() { return shortcode_name; });
1455  __webpack_require__.d(build_module_shortcode_namespaceObject, "settings", function() { return shortcode_settings; });
1456  
1457  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/spacer/index.js
1458  var spacer_namespaceObject = {};
1459  __webpack_require__.r(spacer_namespaceObject);
1460  __webpack_require__.d(spacer_namespaceObject, "metadata", function() { return spacer_metadata; });
1461  __webpack_require__.d(spacer_namespaceObject, "name", function() { return spacer_name; });
1462  __webpack_require__.d(spacer_namespaceObject, "settings", function() { return spacer_settings; });
1463  
1464  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/table/index.js
1465  var build_module_table_namespaceObject = {};
1466  __webpack_require__.r(build_module_table_namespaceObject);
1467  __webpack_require__.d(build_module_table_namespaceObject, "metadata", function() { return table_metadata; });
1468  __webpack_require__.d(build_module_table_namespaceObject, "name", function() { return table_name; });
1469  __webpack_require__.d(build_module_table_namespaceObject, "settings", function() { return table_settings; });
1470  
1471  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/text-columns/index.js
1472  var text_columns_namespaceObject = {};
1473  __webpack_require__.r(text_columns_namespaceObject);
1474  __webpack_require__.d(text_columns_namespaceObject, "metadata", function() { return text_columns_metadata; });
1475  __webpack_require__.d(text_columns_namespaceObject, "name", function() { return text_columns_name; });
1476  __webpack_require__.d(text_columns_namespaceObject, "settings", function() { return text_columns_settings; });
1477  
1478  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/verse/index.js
1479  var build_module_verse_namespaceObject = {};
1480  __webpack_require__.r(build_module_verse_namespaceObject);
1481  __webpack_require__.d(build_module_verse_namespaceObject, "metadata", function() { return verse_metadata; });
1482  __webpack_require__.d(build_module_verse_namespaceObject, "name", function() { return verse_name; });
1483  __webpack_require__.d(build_module_verse_namespaceObject, "settings", function() { return verse_settings; });
1484  
1485  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/video/index.js
1486  var build_module_video_namespaceObject = {};
1487  __webpack_require__.r(build_module_video_namespaceObject);
1488  __webpack_require__.d(build_module_video_namespaceObject, "metadata", function() { return video_metadata; });
1489  __webpack_require__.d(build_module_video_namespaceObject, "name", function() { return video_name; });
1490  __webpack_require__.d(build_module_video_namespaceObject, "settings", function() { return video_settings; });
1491  
1492  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/tag-cloud/index.js
1493  var tag_cloud_namespaceObject = {};
1494  __webpack_require__.r(tag_cloud_namespaceObject);
1495  __webpack_require__.d(tag_cloud_namespaceObject, "metadata", function() { return tag_cloud_metadata; });
1496  __webpack_require__.d(tag_cloud_namespaceObject, "name", function() { return tag_cloud_name; });
1497  __webpack_require__.d(tag_cloud_namespaceObject, "settings", function() { return tag_cloud_settings; });
1498  
1499  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/freeform/index.js
1500  var freeform_namespaceObject = {};
1501  __webpack_require__.r(freeform_namespaceObject);
1502  __webpack_require__.d(freeform_namespaceObject, "metadata", function() { return freeform_metadata; });
1503  __webpack_require__.d(freeform_namespaceObject, "name", function() { return freeform_name; });
1504  __webpack_require__.d(freeform_namespaceObject, "settings", function() { return freeform_settings; });
1505  
1506  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/social-links/index.js
1507  var social_links_namespaceObject = {};
1508  __webpack_require__.r(social_links_namespaceObject);
1509  __webpack_require__.d(social_links_namespaceObject, "metadata", function() { return social_links_metadata; });
1510  __webpack_require__.d(social_links_namespaceObject, "name", function() { return social_links_name; });
1511  __webpack_require__.d(social_links_namespaceObject, "settings", function() { return social_links_settings; });
1512  
1513  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/social-link/index.js
1514  var social_link_namespaceObject = {};
1515  __webpack_require__.r(social_link_namespaceObject);
1516  __webpack_require__.d(social_link_namespaceObject, "metadata", function() { return social_link_metadata; });
1517  __webpack_require__.d(social_link_namespaceObject, "name", function() { return social_link_name; });
1518  __webpack_require__.d(social_link_namespaceObject, "settings", function() { return social_link_settings; });
1519  
1520  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/site-logo/index.js
1521  var build_module_site_logo_namespaceObject = {};
1522  __webpack_require__.r(build_module_site_logo_namespaceObject);
1523  __webpack_require__.d(build_module_site_logo_namespaceObject, "metadata", function() { return site_logo_metadata; });
1524  __webpack_require__.d(build_module_site_logo_namespaceObject, "name", function() { return site_logo_name; });
1525  __webpack_require__.d(build_module_site_logo_namespaceObject, "settings", function() { return site_logo_settings; });
1526  
1527  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/site-tagline/index.js
1528  var site_tagline_namespaceObject = {};
1529  __webpack_require__.r(site_tagline_namespaceObject);
1530  __webpack_require__.d(site_tagline_namespaceObject, "metadata", function() { return site_tagline_metadata; });
1531  __webpack_require__.d(site_tagline_namespaceObject, "name", function() { return site_tagline_name; });
1532  __webpack_require__.d(site_tagline_namespaceObject, "settings", function() { return site_tagline_settings; });
1533  
1534  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/site-title/index.js
1535  var site_title_namespaceObject = {};
1536  __webpack_require__.r(site_title_namespaceObject);
1537  __webpack_require__.d(site_title_namespaceObject, "metadata", function() { return site_title_metadata; });
1538  __webpack_require__.d(site_title_namespaceObject, "name", function() { return site_title_name; });
1539  __webpack_require__.d(site_title_namespaceObject, "settings", function() { return site_title_settings; });
1540  
1541  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query/index.js
1542  var query_namespaceObject = {};
1543  __webpack_require__.r(query_namespaceObject);
1544  __webpack_require__.d(query_namespaceObject, "metadata", function() { return query_metadata; });
1545  __webpack_require__.d(query_namespaceObject, "name", function() { return query_name; });
1546  __webpack_require__.d(query_namespaceObject, "settings", function() { return query_settings; });
1547  
1548  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-template/index.js
1549  var post_template_namespaceObject = {};
1550  __webpack_require__.r(post_template_namespaceObject);
1551  __webpack_require__.d(post_template_namespaceObject, "metadata", function() { return post_template_metadata; });
1552  __webpack_require__.d(post_template_namespaceObject, "name", function() { return post_template_name; });
1553  __webpack_require__.d(post_template_namespaceObject, "settings", function() { return post_template_settings; });
1554  
1555  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-title/index.js
1556  var query_title_namespaceObject = {};
1557  __webpack_require__.r(query_title_namespaceObject);
1558  __webpack_require__.d(query_title_namespaceObject, "metadata", function() { return query_title_metadata; });
1559  __webpack_require__.d(query_title_namespaceObject, "name", function() { return query_title_name; });
1560  __webpack_require__.d(query_title_namespaceObject, "settings", function() { return query_title_settings; });
1561  
1562  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-pagination/index.js
1563  var build_module_query_pagination_namespaceObject = {};
1564  __webpack_require__.r(build_module_query_pagination_namespaceObject);
1565  __webpack_require__.d(build_module_query_pagination_namespaceObject, "metadata", function() { return query_pagination_metadata; });
1566  __webpack_require__.d(build_module_query_pagination_namespaceObject, "name", function() { return query_pagination_name; });
1567  __webpack_require__.d(build_module_query_pagination_namespaceObject, "settings", function() { return query_pagination_settings; });
1568  
1569  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-pagination-next/index.js
1570  var build_module_query_pagination_next_namespaceObject = {};
1571  __webpack_require__.r(build_module_query_pagination_next_namespaceObject);
1572  __webpack_require__.d(build_module_query_pagination_next_namespaceObject, "metadata", function() { return query_pagination_next_metadata; });
1573  __webpack_require__.d(build_module_query_pagination_next_namespaceObject, "name", function() { return query_pagination_next_name; });
1574  __webpack_require__.d(build_module_query_pagination_next_namespaceObject, "settings", function() { return query_pagination_next_settings; });
1575  
1576  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-pagination-numbers/index.js
1577  var build_module_query_pagination_numbers_namespaceObject = {};
1578  __webpack_require__.r(build_module_query_pagination_numbers_namespaceObject);
1579  __webpack_require__.d(build_module_query_pagination_numbers_namespaceObject, "metadata", function() { return query_pagination_numbers_metadata; });
1580  __webpack_require__.d(build_module_query_pagination_numbers_namespaceObject, "name", function() { return query_pagination_numbers_name; });
1581  __webpack_require__.d(build_module_query_pagination_numbers_namespaceObject, "settings", function() { return query_pagination_numbers_settings; });
1582  
1583  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-pagination-previous/index.js
1584  var build_module_query_pagination_previous_namespaceObject = {};
1585  __webpack_require__.r(build_module_query_pagination_previous_namespaceObject);
1586  __webpack_require__.d(build_module_query_pagination_previous_namespaceObject, "metadata", function() { return query_pagination_previous_metadata; });
1587  __webpack_require__.d(build_module_query_pagination_previous_namespaceObject, "name", function() { return query_pagination_previous_name; });
1588  __webpack_require__.d(build_module_query_pagination_previous_namespaceObject, "settings", function() { return query_pagination_previous_settings; });
1589  
1590  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-title/index.js
1591  var build_module_post_title_namespaceObject = {};
1592  __webpack_require__.r(build_module_post_title_namespaceObject);
1593  __webpack_require__.d(build_module_post_title_namespaceObject, "metadata", function() { return post_title_metadata; });
1594  __webpack_require__.d(build_module_post_title_namespaceObject, "name", function() { return post_title_name; });
1595  __webpack_require__.d(build_module_post_title_namespaceObject, "settings", function() { return post_title_settings; });
1596  
1597  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-content/index.js
1598  var build_module_post_content_namespaceObject = {};
1599  __webpack_require__.r(build_module_post_content_namespaceObject);
1600  __webpack_require__.d(build_module_post_content_namespaceObject, "metadata", function() { return post_content_metadata; });
1601  __webpack_require__.d(build_module_post_content_namespaceObject, "name", function() { return post_content_name; });
1602  __webpack_require__.d(build_module_post_content_namespaceObject, "settings", function() { return post_content_settings; });
1603  
1604  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-date/index.js
1605  var build_module_post_date_namespaceObject = {};
1606  __webpack_require__.r(build_module_post_date_namespaceObject);
1607  __webpack_require__.d(build_module_post_date_namespaceObject, "metadata", function() { return post_date_metadata; });
1608  __webpack_require__.d(build_module_post_date_namespaceObject, "name", function() { return post_date_name; });
1609  __webpack_require__.d(build_module_post_date_namespaceObject, "settings", function() { return post_date_settings; });
1610  
1611  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-excerpt/index.js
1612  var build_module_post_excerpt_namespaceObject = {};
1613  __webpack_require__.r(build_module_post_excerpt_namespaceObject);
1614  __webpack_require__.d(build_module_post_excerpt_namespaceObject, "metadata", function() { return post_excerpt_metadata; });
1615  __webpack_require__.d(build_module_post_excerpt_namespaceObject, "name", function() { return post_excerpt_name; });
1616  __webpack_require__.d(build_module_post_excerpt_namespaceObject, "settings", function() { return post_excerpt_settings; });
1617  
1618  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-featured-image/index.js
1619  var build_module_post_featured_image_namespaceObject = {};
1620  __webpack_require__.r(build_module_post_featured_image_namespaceObject);
1621  __webpack_require__.d(build_module_post_featured_image_namespaceObject, "metadata", function() { return post_featured_image_metadata; });
1622  __webpack_require__.d(build_module_post_featured_image_namespaceObject, "name", function() { return post_featured_image_name; });
1623  __webpack_require__.d(build_module_post_featured_image_namespaceObject, "settings", function() { return post_featured_image_settings; });
1624  
1625  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-terms/index.js
1626  var post_terms_namespaceObject = {};
1627  __webpack_require__.r(post_terms_namespaceObject);
1628  __webpack_require__.d(post_terms_namespaceObject, "metadata", function() { return post_terms_metadata; });
1629  __webpack_require__.d(post_terms_namespaceObject, "name", function() { return post_terms_name; });
1630  __webpack_require__.d(post_terms_namespaceObject, "settings", function() { return post_terms_settings; });
1631  
1632  // EXTERNAL MODULE: external ["wp","coreData"]
1633  var external_wp_coreData_ = __webpack_require__("jZUy");
1634  
1635  // EXTERNAL MODULE: external ["wp","blockEditor"]
1636  var external_wp_blockEditor_ = __webpack_require__("axFQ");
1637  
1638  // EXTERNAL MODULE: external ["wp","blocks"]
1639  var external_wp_blocks_ = __webpack_require__("HSyU");
1640  
1641  // EXTERNAL MODULE: external "lodash"
1642  var external_lodash_ = __webpack_require__("YLtl");
1643  
1644  // EXTERNAL MODULE: external ["wp","i18n"]
1645  var external_wp_i18n_ = __webpack_require__("l3Sj");
1646  
1647  // EXTERNAL MODULE: external ["wp","element"]
1648  var external_wp_element_ = __webpack_require__("GRId");
1649  
1650  // EXTERNAL MODULE: external ["wp","primitives"]
1651  var external_wp_primitives_ = __webpack_require__("Tqx9");
1652  
1653  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/paragraph.js
1654  
1655  
1656  /**
1657   * WordPress dependencies
1658   */
1659  
1660  const paragraph = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
1661    xmlns: "http://www.w3.org/2000/svg",
1662    viewBox: "0 0 24 24"
1663  }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
1664    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"
1665  }));
1666  /* harmony default export */ var library_paragraph = (paragraph);
1667  
1668  // EXTERNAL MODULE: ./node_modules/classnames/index.js
1669  var classnames = __webpack_require__("TSYQ");
1670  var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
1671  
1672  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/deprecated.js
1673  
1674  
1675  /**
1676   * External dependencies
1677   */
1678  
1679  
1680  /**
1681   * WordPress dependencies
1682   */
1683  
1684  
1685  
1686  const supports = {
1687    className: false
1688  };
1689  const deprecated_blockAttributes = {
1690    align: {
1691      type: 'string'
1692    },
1693    content: {
1694      type: 'string',
1695      source: 'html',
1696      selector: 'p',
1697      default: ''
1698    },
1699    dropCap: {
1700      type: 'boolean',
1701      default: false
1702    },
1703    placeholder: {
1704      type: 'string'
1705    },
1706    textColor: {
1707      type: 'string'
1708    },
1709    backgroundColor: {
1710      type: 'string'
1711    },
1712    fontSize: {
1713      type: 'string'
1714    },
1715    direction: {
1716      type: 'string',
1717      enum: ['ltr', 'rtl']
1718    },
1719    style: {
1720      type: 'object'
1721    }
1722  };
1723  
1724  const migrateCustomColorsAndFontSizes = attributes => {
1725    if (!attributes.customTextColor && !attributes.customBackgroundColor && !attributes.customFontSize) {
1726      return attributes;
1727    }
1728  
1729    const style = {};
1730  
1731    if (attributes.customTextColor || attributes.customBackgroundColor) {
1732      style.color = {};
1733    }
1734  
1735    if (attributes.customTextColor) {
1736      style.color.text = attributes.customTextColor;
1737    }
1738  
1739    if (attributes.customBackgroundColor) {
1740      style.color.background = attributes.customBackgroundColor;
1741    }
1742  
1743    if (attributes.customFontSize) {
1744      style.typography = {
1745        fontSize: attributes.customFontSize
1746      };
1747    }
1748  
1749    return { ...Object(external_lodash_["omit"])(attributes, ['customTextColor', 'customBackgroundColor', 'customFontSize']),
1750      style
1751    };
1752  };
1753  
1754  const deprecated = [{
1755    supports,
1756    attributes: { ...Object(external_lodash_["omit"])(deprecated_blockAttributes, ['style']),
1757      customTextColor: {
1758        type: 'string'
1759      },
1760      customBackgroundColor: {
1761        type: 'string'
1762      },
1763      customFontSize: {
1764        type: 'number'
1765      }
1766    },
1767    migrate: migrateCustomColorsAndFontSizes,
1768  
1769    save({
1770      attributes
1771    }) {
1772      const {
1773        align,
1774        content,
1775        dropCap,
1776        backgroundColor,
1777        textColor,
1778        customBackgroundColor,
1779        customTextColor,
1780        fontSize,
1781        customFontSize,
1782        direction
1783      } = attributes;
1784      const textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor);
1785      const backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor);
1786      const fontSizeClass = Object(external_wp_blockEditor_["getFontSizeClass"])(fontSize);
1787      const className = classnames_default()({
1788        'has-text-color': textColor || customTextColor,
1789        'has-background': backgroundColor || customBackgroundColor,
1790        'has-drop-cap': dropCap,
1791        [`has-text-align-$align}`]: align,
1792        [fontSizeClass]: fontSizeClass,
1793        [textClass]: textClass,
1794        [backgroundClass]: backgroundClass
1795      });
1796      const styles = {
1797        backgroundColor: backgroundClass ? undefined : customBackgroundColor,
1798        color: textClass ? undefined : customTextColor,
1799        fontSize: fontSizeClass ? undefined : customFontSize
1800      };
1801      return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
1802        tagName: "p",
1803        style: styles,
1804        className: className ? className : undefined,
1805        value: content,
1806        dir: direction
1807      });
1808    }
1809  
1810  }, {
1811    supports,
1812    attributes: { ...Object(external_lodash_["omit"])(deprecated_blockAttributes, ['style']),
1813      customTextColor: {
1814        type: 'string'
1815      },
1816      customBackgroundColor: {
1817        type: 'string'
1818      },
1819      customFontSize: {
1820        type: 'number'
1821      }
1822    },
1823    migrate: migrateCustomColorsAndFontSizes,
1824  
1825    save({
1826      attributes
1827    }) {
1828      const {
1829        align,
1830        content,
1831        dropCap,
1832        backgroundColor,
1833        textColor,
1834        customBackgroundColor,
1835        customTextColor,
1836        fontSize,
1837        customFontSize,
1838        direction
1839      } = attributes;
1840      const textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor);
1841      const backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor);
1842      const fontSizeClass = Object(external_wp_blockEditor_["getFontSizeClass"])(fontSize);
1843      const className = classnames_default()({
1844        'has-text-color': textColor || customTextColor,
1845        'has-background': backgroundColor || customBackgroundColor,
1846        'has-drop-cap': dropCap,
1847        [fontSizeClass]: fontSizeClass,
1848        [textClass]: textClass,
1849        [backgroundClass]: backgroundClass
1850      });
1851      const styles = {
1852        backgroundColor: backgroundClass ? undefined : customBackgroundColor,
1853        color: textClass ? undefined : customTextColor,
1854        fontSize: fontSizeClass ? undefined : customFontSize,
1855        textAlign: align
1856      };
1857      return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
1858        tagName: "p",
1859        style: styles,
1860        className: className ? className : undefined,
1861        value: content,
1862        dir: direction
1863      });
1864    }
1865  
1866  }, {
1867    supports,
1868    attributes: { ...Object(external_lodash_["omit"])(deprecated_blockAttributes, ['style']),
1869      customTextColor: {
1870        type: 'string'
1871      },
1872      customBackgroundColor: {
1873        type: 'string'
1874      },
1875      customFontSize: {
1876        type: 'number'
1877      },
1878      width: {
1879        type: 'string'
1880      }
1881    },
1882    migrate: migrateCustomColorsAndFontSizes,
1883  
1884    save({
1885      attributes
1886    }) {
1887      const {
1888        width,
1889        align,
1890        content,
1891        dropCap,
1892        backgroundColor,
1893        textColor,
1894        customBackgroundColor,
1895        customTextColor,
1896        fontSize,
1897        customFontSize
1898      } = attributes;
1899      const textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor);
1900      const backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor);
1901      const fontSizeClass = fontSize && `is-$fontSize}-text`;
1902      const className = classnames_default()({
1903        [`align$width}`]: width,
1904        'has-background': backgroundColor || customBackgroundColor,
1905        'has-drop-cap': dropCap,
1906        [fontSizeClass]: fontSizeClass,
1907        [textClass]: textClass,
1908        [backgroundClass]: backgroundClass
1909      });
1910      const styles = {
1911        backgroundColor: backgroundClass ? undefined : customBackgroundColor,
1912        color: textClass ? undefined : customTextColor,
1913        fontSize: fontSizeClass ? undefined : customFontSize,
1914        textAlign: align
1915      };
1916      return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
1917        tagName: "p",
1918        style: styles,
1919        className: className ? className : undefined,
1920        value: content
1921      });
1922    }
1923  
1924  }, {
1925    supports,
1926    attributes: Object(external_lodash_["omit"])({ ...deprecated_blockAttributes,
1927      fontSize: {
1928        type: 'number'
1929      }
1930    }, ['style']),
1931  
1932    save({
1933      attributes
1934    }) {
1935      const {
1936        width,
1937        align,
1938        content,
1939        dropCap,
1940        backgroundColor,
1941        textColor,
1942        fontSize
1943      } = attributes;
1944      const className = classnames_default()({
1945        [`align$width}`]: width,
1946        'has-background': backgroundColor,
1947        'has-drop-cap': dropCap
1948      });
1949      const styles = {
1950        backgroundColor,
1951        color: textColor,
1952        fontSize,
1953        textAlign: align
1954      };
1955      return Object(external_wp_element_["createElement"])("p", {
1956        style: styles,
1957        className: className ? className : undefined
1958      }, content);
1959    },
1960  
1961    migrate(attributes) {
1962      return migrateCustomColorsAndFontSizes(Object(external_lodash_["omit"])({ ...attributes,
1963        customFontSize: Object(external_lodash_["isFinite"])(attributes.fontSize) ? attributes.fontSize : undefined,
1964        customTextColor: attributes.textColor && '#' === attributes.textColor[0] ? attributes.textColor : undefined,
1965        customBackgroundColor: attributes.backgroundColor && '#' === attributes.backgroundColor[0] ? attributes.backgroundColor : undefined
1966      }), ['fontSize', 'textColor', 'backgroundColor', 'style']);
1967    }
1968  
1969  }, {
1970    supports,
1971    attributes: { ...deprecated_blockAttributes,
1972      content: {
1973        type: 'string',
1974        source: 'html',
1975        default: ''
1976      }
1977    },
1978  
1979    save({
1980      attributes
1981    }) {
1982      return Object(external_wp_element_["createElement"])(external_wp_element_["RawHTML"], null, attributes.content);
1983    },
1984  
1985    migrate(attributes) {
1986      return attributes;
1987    }
1988  
1989  }];
1990  /* harmony default export */ var paragraph_deprecated = (deprecated);
1991  
1992  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
1993  var esm_extends = __webpack_require__("wx14");
1994  
1995  // EXTERNAL MODULE: external ["wp","components"]
1996  var external_wp_components_ = __webpack_require__("tI+e");
1997  
1998  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-ltr.js
1999  
2000  
2001  /**
2002   * WordPress dependencies
2003   */
2004  
2005  const formatLtr = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
2006    xmlns: "http://www.w3.org/2000/svg",
2007    viewBox: "-2 -2 24 24"
2008  }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
2009    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"
2010  }));
2011  /* harmony default export */ var format_ltr = (formatLtr);
2012  
2013  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/edit.js
2014  
2015  
2016  
2017  /**
2018   * External dependencies
2019   */
2020  
2021  /**
2022   * WordPress dependencies
2023   */
2024  
2025  
2026  
2027  
2028  
2029  
2030  const edit_name = 'core/paragraph';
2031  
2032  function ParagraphRTLControl({
2033    direction,
2034    setDirection
2035  }) {
2036    return Object(external_wp_i18n_["isRTL"])() && Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarDropdownMenu"], {
2037      controls: [{
2038        icon: format_ltr,
2039        title: Object(external_wp_i18n_["_x"])('Left to right', 'editor button'),
2040        isActive: direction === 'ltr',
2041  
2042        onClick() {
2043          setDirection(direction === 'ltr' ? undefined : 'ltr');
2044        }
2045  
2046      }]
2047    });
2048  }
2049  
2050  function ParagraphBlock({
2051    attributes,
2052    mergeBlocks,
2053    onReplace,
2054    onRemove,
2055    setAttributes,
2056    clientId
2057  }) {
2058    const {
2059      align,
2060      content,
2061      direction,
2062      dropCap,
2063      placeholder
2064    } = attributes;
2065    const isDropCapFeatureEnabled = Object(external_wp_blockEditor_["useSetting"])('typography.dropCap');
2066    const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
2067      className: classnames_default()({
2068        'has-drop-cap': dropCap,
2069        [`has-text-align-$align}`]: align
2070      }),
2071      style: {
2072        direction
2073      }
2074    });
2075    return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
2076      group: "block"
2077    }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["AlignmentControl"], {
2078      value: align,
2079      onChange: newAlign => setAttributes({
2080        align: newAlign
2081      })
2082    }), Object(external_wp_element_["createElement"])(ParagraphRTLControl, {
2083      direction: direction,
2084      setDirection: newDirection => setAttributes({
2085        direction: newDirection
2086      })
2087    })), isDropCapFeatureEnabled && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
2088      title: Object(external_wp_i18n_["__"])('Text settings')
2089    }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
2090      label: Object(external_wp_i18n_["__"])('Drop cap'),
2091      checked: !!dropCap,
2092      onChange: () => setAttributes({
2093        dropCap: !dropCap
2094      }),
2095      help: dropCap ? Object(external_wp_i18n_["__"])('Showing large initial letter.') : Object(external_wp_i18n_["__"])('Toggle to show a large initial letter.')
2096    }))), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], Object(esm_extends["a" /* default */])({
2097      identifier: "content",
2098      tagName: "p"
2099    }, blockProps, {
2100      value: content,
2101      onChange: newContent => setAttributes({
2102        content: newContent
2103      }),
2104      onSplit: (value, isOriginal) => {
2105        let newAttributes;
2106  
2107        if (isOriginal || value) {
2108          newAttributes = { ...attributes,
2109            content: value
2110          };
2111        }
2112  
2113        const block = Object(external_wp_blocks_["createBlock"])(edit_name, newAttributes);
2114  
2115        if (isOriginal) {
2116          block.clientId = clientId;
2117        }
2118  
2119        return block;
2120      },
2121      onMerge: mergeBlocks,
2122      onReplace: onReplace,
2123      onRemove: onRemove,
2124      "aria-label": content ? Object(external_wp_i18n_["__"])('Paragraph block') : Object(external_wp_i18n_["__"])('Empty block; start writing or type forward slash to choose a block'),
2125      "data-empty": content ? false : true,
2126      placeholder: placeholder || Object(external_wp_i18n_["__"])('Type / to choose a block'),
2127      __unstableEmbedURLOnPaste: true,
2128      __unstableAllowPrefixTransformations: true
2129    })));
2130  }
2131  
2132  /* harmony default export */ var edit = (ParagraphBlock);
2133  
2134  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/save.js
2135  
2136  
2137  /**
2138   * External dependencies
2139   */
2140  
2141  /**
2142   * WordPress dependencies
2143   */
2144  
2145  
2146  function save({
2147    attributes
2148  }) {
2149    const {
2150      align,
2151      content,
2152      dropCap,
2153      direction
2154    } = attributes;
2155    const className = classnames_default()({
2156      'has-drop-cap': dropCap,
2157      [`has-text-align-$align}`]: align
2158    });
2159    return Object(external_wp_element_["createElement"])("p", external_wp_blockEditor_["useBlockProps"].save({
2160      className,
2161      dir: direction
2162    }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
2163      value: content
2164    }));
2165  }
2166  
2167  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/transforms.js
2168  /**
2169   * WordPress dependencies
2170   */
2171  
2172  /**
2173   * Internal dependencies
2174   */
2175  
2176  const {
2177    name: transforms_name
2178  } = {
2179    apiVersion: 2,
2180    name: "core/paragraph",
2181    title: "Paragraph",
2182    category: "text",
2183    description: "Start with the building block of all narrative.",
2184    keywords: ["text"],
2185    textdomain: "default",
2186    attributes: {
2187      align: {
2188        type: "string"
2189      },
2190      content: {
2191        type: "string",
2192        source: "html",
2193        selector: "p",
2194        "default": "",
2195        __experimentalRole: "content"
2196      },
2197      dropCap: {
2198        type: "boolean",
2199        "default": false
2200      },
2201      placeholder: {
2202        type: "string"
2203      },
2204      direction: {
2205        type: "string",
2206        "enum": ["ltr", "rtl"]
2207      }
2208    },
2209    supports: {
2210      anchor: true,
2211      className: false,
2212      color: {
2213        link: true
2214      },
2215      typography: {
2216        fontSize: true,
2217        lineHeight: true
2218      },
2219      __experimentalSelector: "p",
2220      __unstablePasteTextInline: true
2221    },
2222    editorStyle: "wp-block-paragraph-editor",
2223    style: "wp-block-paragraph"
2224  };
2225  const transforms = {
2226    from: [{
2227      type: 'raw',
2228      // Paragraph is a fallback and should be matched last.
2229      priority: 20,
2230      selector: 'p',
2231      schema: ({
2232        phrasingContentSchema,
2233        isPaste
2234      }) => ({
2235        p: {
2236          children: phrasingContentSchema,
2237          attributes: isPaste ? [] : ['style', 'id']
2238        }
2239      }),
2240  
2241      transform(node) {
2242        const attributes = Object(external_wp_blocks_["getBlockAttributes"])(transforms_name, node.outerHTML);
2243        const {
2244          textAlign
2245        } = node.style || {};
2246  
2247        if (textAlign === 'left' || textAlign === 'center' || textAlign === 'right') {
2248          attributes.align = textAlign;
2249        }
2250  
2251        return Object(external_wp_blocks_["createBlock"])(transforms_name, attributes);
2252      }
2253  
2254    }]
2255  };
2256  /* harmony default export */ var paragraph_transforms = (transforms);
2257  
2258  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/index.js
2259  /**
2260   * External dependencies
2261   */
2262  
2263  /**
2264   * WordPress dependencies
2265   */
2266  
2267  
2268  
2269  /**
2270   * Internal dependencies
2271   */
2272  
2273  
2274  
2275  const paragraph_metadata = {
2276    apiVersion: 2,
2277    name: "core/paragraph",
2278    title: "Paragraph",
2279    category: "text",
2280    description: "Start with the building block of all narrative.",
2281    keywords: ["text"],
2282    textdomain: "default",
2283    attributes: {
2284      align: {
2285        type: "string"
2286      },
2287      content: {
2288        type: "string",
2289        source: "html",
2290        selector: "p",
2291        "default": "",
2292        __experimentalRole: "content"
2293      },
2294      dropCap: {
2295        type: "boolean",
2296        "default": false
2297      },
2298      placeholder: {
2299        type: "string"
2300      },
2301      direction: {
2302        type: "string",
2303        "enum": ["ltr", "rtl"]
2304      }
2305    },
2306    supports: {
2307      anchor: true,
2308      className: false,
2309      color: {
2310        link: true
2311      },
2312      typography: {
2313        fontSize: true,
2314        lineHeight: true
2315      },
2316      __experimentalSelector: "p",
2317      __unstablePasteTextInline: true
2318    },
2319    editorStyle: "wp-block-paragraph-editor",
2320    style: "wp-block-paragraph"
2321  };
2322  
2323  
2324  const {
2325    name: paragraph_name
2326  } = paragraph_metadata;
2327  
2328  const paragraph_settings = {
2329    icon: library_paragraph,
2330    example: {
2331      attributes: {
2332        content: Object(external_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.'),
2333        style: {
2334          typography: {
2335            fontSize: 28
2336          }
2337        },
2338        dropCap: true
2339      }
2340    },
2341  
2342    __experimentalLabel(attributes, {
2343      context
2344    }) {
2345      if (context === 'accessibility') {
2346        const {
2347          content
2348        } = attributes;
2349        return Object(external_lodash_["isEmpty"])(content) ? Object(external_wp_i18n_["__"])('Empty') : content;
2350      }
2351    },
2352  
2353    transforms: paragraph_transforms,
2354    deprecated: paragraph_deprecated,
2355  
2356    merge(attributes, attributesToMerge) {
2357      return {
2358        content: (attributes.content || '') + (attributesToMerge.content || '')
2359      };
2360    },
2361  
2362    edit: edit,
2363    save: save
2364  };
2365  
2366  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/image.js
2367  
2368  
2369  /**
2370   * WordPress dependencies
2371   */
2372  
2373  const image_image = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
2374    viewBox: "0 0 24 24",
2375    xmlns: "http://www.w3.org/2000/svg"
2376  }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
2377    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"
2378  }));
2379  /* harmony default export */ var library_image = (image_image);
2380  
2381  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/deprecated.js
2382  
2383  
2384  
2385  /**
2386   * External dependencies
2387   */
2388  
2389  /**
2390   * WordPress dependencies
2391   */
2392  
2393  
2394  const image_deprecated_blockAttributes = {
2395    align: {
2396      type: 'string'
2397    },
2398    url: {
2399      type: 'string',
2400      source: 'attribute',
2401      selector: 'img',
2402      attribute: 'src'
2403    },
2404    alt: {
2405      type: 'string',
2406      source: 'attribute',
2407      selector: 'img',
2408      attribute: 'alt',
2409      default: ''
2410    },
2411    caption: {
2412      type: 'string',
2413      source: 'html',
2414      selector: 'figcaption'
2415    },
2416    href: {
2417      type: 'string',
2418      source: 'attribute',
2419      selector: 'figure > a',
2420      attribute: 'href'
2421    },
2422    rel: {
2423      type: 'string',
2424      source: 'attribute',
2425      selector: 'figure > a',
2426      attribute: 'rel'
2427    },
2428    linkClass: {
2429      type: 'string',
2430      source: 'attribute',
2431      selector: 'figure > a',
2432      attribute: 'class'
2433    },
2434    id: {
2435      type: 'number'
2436    },
2437    width: {
2438      type: 'number'
2439    },
2440    height: {
2441      type: 'number'
2442    },
2443    linkDestination: {
2444      type: 'string'
2445    },
2446    linkTarget: {
2447      type: 'string',
2448      source: 'attribute',
2449      selector: 'figure > a',
2450      attribute: 'target'
2451    }
2452  };
2453  const deprecated_deprecated = [{
2454    attributes: image_deprecated_blockAttributes,
2455  
2456    save({
2457      attributes
2458    }) {
2459      const {
2460        url,
2461        alt,
2462        caption,
2463        align,
2464        href,
2465        width,
2466        height,
2467        id
2468      } = attributes;
2469      const classes = classnames_default()({
2470        [`align$align}`]: align,
2471        'is-resized': width || height
2472      });
2473      const image = Object(external_wp_element_["createElement"])("img", {
2474        src: url,
2475        alt: alt,
2476        className: id ? `wp-image-$id}` : null,
2477        width: width,
2478        height: height
2479      });
2480      return Object(external_wp_element_["createElement"])("figure", {
2481        className: classes
2482      }, href ? Object(external_wp_element_["createElement"])("a", {
2483        href: href
2484      }, image) : image, !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
2485        tagName: "figcaption",
2486        value: caption
2487      }));
2488    }
2489  
2490  }, {
2491    attributes: image_deprecated_blockAttributes,
2492  
2493    save({
2494      attributes
2495    }) {
2496      const {
2497        url,
2498        alt,
2499        caption,
2500        align,
2501        href,
2502        width,
2503        height,
2504        id
2505      } = attributes;
2506      const image = Object(external_wp_element_["createElement"])("img", {
2507        src: url,
2508        alt: alt,
2509        className: id ? `wp-image-$id}` : null,
2510        width: width,
2511        height: height
2512      });
2513      return Object(external_wp_element_["createElement"])("figure", {
2514        className: align ? `align$align}` : null
2515      }, href ? Object(external_wp_element_["createElement"])("a", {
2516        href: href
2517      }, image) : image, !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
2518        tagName: "figcaption",
2519        value: caption
2520      }));
2521    }
2522  
2523  }, {
2524    attributes: image_deprecated_blockAttributes,
2525  
2526    save({
2527      attributes
2528    }) {
2529      const {
2530        url,
2531        alt,
2532        caption,
2533        align,
2534        href,
2535        width,
2536        height
2537      } = attributes;
2538      const extraImageProps = width || height ? {
2539        width,
2540        height
2541      } : {};
2542      const image = Object(external_wp_element_["createElement"])("img", Object(esm_extends["a" /* default */])({
2543        src: url,
2544        alt: alt
2545      }, extraImageProps));
2546      let figureStyle = {};
2547  
2548      if (width) {
2549        figureStyle = {
2550          width
2551        };
2552      } else if (align === 'left' || align === 'right') {
2553        figureStyle = {
2554          maxWidth: '50%'
2555        };
2556      }
2557  
2558      return Object(external_wp_element_["createElement"])("figure", {
2559        className: align ? `align$align}` : null,
2560        style: figureStyle
2561      }, href ? Object(external_wp_element_["createElement"])("a", {
2562        href: href
2563      }, image) : image, !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
2564        tagName: "figcaption",
2565        value: caption
2566      }));
2567    }
2568  
2569  }];
2570  /* harmony default export */ var image_deprecated = (deprecated_deprecated);
2571  
2572  // EXTERNAL MODULE: external ["wp","blob"]
2573  var external_wp_blob_ = __webpack_require__("xTGt");
2574  
2575  // EXTERNAL MODULE: external ["wp","data"]
2576  var external_wp_data_ = __webpack_require__("1ZqX");
2577  
2578  // EXTERNAL MODULE: external ["wp","compose"]
2579  var external_wp_compose_ = __webpack_require__("K9lf");
2580  
2581  // EXTERNAL MODULE: external ["wp","url"]
2582  var external_wp_url_ = __webpack_require__("Mmq9");
2583  
2584  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/crop.js
2585  
2586  
2587  /**
2588   * WordPress dependencies
2589   */
2590  
2591  const crop_crop = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
2592    xmlns: "http://www.w3.org/2000/svg",
2593    viewBox: "0 0 24 24"
2594  }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
2595    d: "M16.5 7.8v7H18v-7c0-1-.8-1.8-1.8-1.8h-7v1.5h7c.2 0 .3.1.3.3zm-8.7 8.7c-.1 0-.2-.1-.2-.2V2H6v4H2v1.5h4v8.8c0 1 .8 1.8 1.8 1.8h8.8v4H18v-4h4v-1.5H7.8z"
2596  }));
2597  /* harmony default export */ var library_crop = (crop_crop);
2598  
2599  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/upload.js
2600  var upload = __webpack_require__("NTP4");
2601  
2602  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/overlay-text.js
2603  
2604  
2605  /**
2606   * WordPress dependencies
2607   */
2608  
2609  const overlayText = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
2610    xmlns: "http://www.w3.org/2000/svg",
2611    viewBox: "0 0 24 24"
2612  }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
2613    d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12-9.8c.4 0 .8-.3.9-.7l1.1-3h3.6l.5 1.7h1.9L13 9h-2.2l-3.4 9.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12H20V6c0-1.1-.9-2-2-2zm-6 7l1.4 3.9h-2.7L12 11z"
2614  }));
2615  /* harmony default export */ var overlay_text = (overlayText);
2616  
2617  // EXTERNAL MODULE: external ["wp","notices"]
2618  var external_wp_notices_ = __webpack_require__("onLe");
2619  
2620  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/constants.js
2621  const ASPECT_RATIOS = [// Common video resolutions.
2622  {
2623    ratio: '2.33',
2624    className: 'wp-embed-aspect-21-9'
2625  }, {
2626    ratio: '2.00',
2627    className: 'wp-embed-aspect-18-9'
2628  }, {
2629    ratio: '1.78',
2630    className: 'wp-embed-aspect-16-9'
2631  }, {
2632    ratio: '1.33',
2633    className: 'wp-embed-aspect-4-3'
2634  }, // Vertical video and instagram square video support.
2635  {
2636    ratio: '1.00',
2637    className: 'wp-embed-aspect-1-1'
2638  }, {
2639    ratio: '0.56',
2640    className: 'wp-embed-aspect-9-16'
2641  }, {
2642    ratio: '0.50',
2643    className: 'wp-embed-aspect-1-2'
2644  }];
2645  const WP_EMBED_TYPE = 'wp-embed';
2646  
2647  // EXTERNAL MODULE: ./node_modules/classnames/dedupe.js
2648  var dedupe = __webpack_require__("A/WM");
2649  var dedupe_default = /*#__PURE__*/__webpack_require__.n(dedupe);
2650  
2651  // EXTERNAL MODULE: ./node_modules/memize/index.js
2652  var memize = __webpack_require__("4eJC");
2653  var memize_default = /*#__PURE__*/__webpack_require__.n(memize);
2654  
2655  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/util.js
2656  
2657  
2658  /**
2659   * Internal dependencies
2660   */
2661  
2662  /**
2663   * External dependencies
2664   */
2665  
2666  
2667  
2668  
2669  /**
2670   * WordPress dependencies
2671   */
2672  
2673  
2674  
2675  /**
2676   * Internal dependencies
2677   */
2678  
2679  const util_metadata = {
2680    apiVersion: 2,
2681    name: "core/embed",
2682    title: "Embed",
2683    category: "embed",
2684    description: "Add a block that displays content pulled from other sites, like Twitter, Instagram or YouTube.",
2685    textdomain: "default",
2686    attributes: {
2687      url: {
2688        type: "string"
2689      },
2690      caption: {
2691        type: "string",
2692        source: "html",
2693        selector: "figcaption"
2694      },
2695      type: {
2696        type: "string"
2697      },
2698      providerNameSlug: {
2699        type: "string"
2700      },
2701      allowResponsive: {
2702        type: "boolean",
2703        "default": true
2704      },
2705      responsive: {
2706        type: "boolean",
2707        "default": false
2708      },
2709      previewable: {
2710        type: "boolean",
2711        "default": true
2712      }
2713    },
2714    supports: {
2715      align: true
2716    },
2717    editorStyle: "wp-block-embed-editor",
2718    style: "wp-block-embed"
2719  };
2720  const {
2721    name: DEFAULT_EMBED_BLOCK
2722  } = util_metadata;
2723  /** @typedef {import('@wordpress/blocks').WPBlockVariation} WPBlockVariation */
2724  
2725  /**
2726   * Returns the embed block's information by matching the provided service provider
2727   *
2728   * @param {string} provider The embed block's provider
2729   * @return {WPBlockVariation} The embed block's information
2730   */
2731  
2732  const getEmbedInfoByProvider = provider => {
2733    var _getBlockVariations;
2734  
2735    return (_getBlockVariations = Object(external_wp_blocks_["getBlockVariations"])(DEFAULT_EMBED_BLOCK)) === null || _getBlockVariations === void 0 ? void 0 : _getBlockVariations.find(({
2736      name
2737    }) => name === provider);
2738  };
2739  /**
2740   * Returns true if any of the regular expressions match the URL.
2741   *
2742   * @param {string}   url      The URL to test.
2743   * @param {Array}    patterns The list of regular expressions to test agains.
2744   * @return {boolean} True if any of the regular expressions match the URL.
2745   */
2746  
2747  const matchesPatterns = (url, patterns = []) => patterns.some(pattern => url.match(pattern));
2748  /**
2749   * Finds the block variation that should be used for the URL,
2750   * based on the provided URL and the variation's patterns.
2751   *
2752   * @param {string}  url The URL to test.
2753   * @return {WPBlockVariation} The block variation that should be used for this URL
2754   */
2755  
2756  const findMoreSuitableBlock = url => {
2757    var _getBlockVariations2;
2758  
2759    return (_getBlockVariations2 = Object(external_wp_blocks_["getBlockVariations"])(DEFAULT_EMBED_BLOCK)) === null || _getBlockVariations2 === void 0 ? void 0 : _getBlockVariations2.find(({
2760      patterns
2761    }) => matchesPatterns(url, patterns));
2762  };
2763  const isFromWordPress = html => html && html.includes('class="wp-embedded-content"');
2764  const getPhotoHtml = photo => {
2765    // 100% width for the preview so it fits nicely into the document, some "thumbnails" are
2766    // actually the full size photo. If thumbnails not found, use full image.
2767    const imageUrl = photo.thumbnail_url || photo.url;
2768    const photoPreview = Object(external_wp_element_["createElement"])("p", null, Object(external_wp_element_["createElement"])("img", {
2769      src: imageUrl,
2770      alt: photo.title,
2771      width: "100%"
2772    }));
2773    return Object(external_wp_element_["renderToString"])(photoPreview);
2774  };
2775  /**
2776   * Creates a more suitable embed block based on the passed in props
2777   * and attributes generated from an embed block's preview.
2778   *
2779   * We require `attributesFromPreview` to be generated from the latest attributes
2780   * and preview, and because of the way the react lifecycle operates, we can't
2781   * guarantee that the attributes contained in the block's props are the latest
2782   * versions, so we require that these are generated separately.
2783   * See `getAttributesFromPreview` in the generated embed edit component.
2784   *
2785   * @param {Object} props                  The block's props.
2786   * @param {Object} [attributesFromPreview]  Attributes generated from the block's most up to date preview.
2787   * @return {Object|undefined} A more suitable embed block if one exists.
2788   */
2789  
2790  const createUpgradedEmbedBlock = (props, attributesFromPreview = {}) => {
2791    var _getBlockVariations3;
2792  
2793    const {
2794      preview,
2795      attributes: {
2796        url,
2797        providerNameSlug,
2798        type
2799      } = {}
2800    } = props;
2801    if (!url || !Object(external_wp_blocks_["getBlockType"])(DEFAULT_EMBED_BLOCK)) return;
2802    const matchedBlock = findMoreSuitableBlock(url); // WordPress blocks can work on multiple sites, and so don't have patterns,
2803    // so if we're in a WordPress block, assume the user has chosen it for a WordPress URL.
2804  
2805    const isCurrentBlockWP = providerNameSlug === 'wordpress' || type === WP_EMBED_TYPE; // if current block is not WordPress and a more suitable block found
2806    // that is different from the current one, create the new matched block
2807  
2808    const shouldCreateNewBlock = !isCurrentBlockWP && matchedBlock && (matchedBlock.attributes.providerNameSlug !== providerNameSlug || !providerNameSlug);
2809  
2810    if (shouldCreateNewBlock) {
2811      return Object(external_wp_blocks_["createBlock"])(DEFAULT_EMBED_BLOCK, {
2812        url,
2813        ...matchedBlock.attributes
2814      });
2815    }
2816  
2817    const wpVariation = (_getBlockVariations3 = Object(external_wp_blocks_["getBlockVariations"])(DEFAULT_EMBED_BLOCK)) === null || _getBlockVariations3 === void 0 ? void 0 : _getBlockVariations3.find(({
2818      name
2819    }) => name === 'wordpress'); // We can't match the URL for WordPress embeds, we have to check the HTML instead.
2820  
2821    if (!wpVariation || !preview || !isFromWordPress(preview.html) || isCurrentBlockWP) {
2822      return;
2823    } // This is not the WordPress embed block so transform it into one.
2824  
2825  
2826    return Object(external_wp_blocks_["createBlock"])(DEFAULT_EMBED_BLOCK, {
2827      url,
2828      ...wpVariation.attributes,
2829      // By now we have the preview, but when the new block first renders, it
2830      // won't have had all the attributes set, and so won't get the correct
2831      // type and it won't render correctly. So, we pass through the current attributes
2832      // here so that the initial render works when we switch to the WordPress
2833      // block. This only affects the WordPress block because it can't be
2834      // rendered in the usual Sandbox (it has a sandbox of its own) and it
2835      // relies on the preview to set the correct render type.
2836      ...attributesFromPreview
2837    });
2838  };
2839  /**
2840   * Removes all previously set aspect ratio related classes and return the rest
2841   * existing class names.
2842   *
2843   * @param {string} existingClassNames Any existing class names.
2844   * @return {string} The class names without any aspect ratio related class.
2845   */
2846  
2847  const removeAspectRatioClasses = existingClassNames => {
2848    if (!existingClassNames) {
2849      // Avoids extraneous work and also, by returning the same value as
2850      // received, ensures the post is not dirtied by a change of the block
2851      // attribute from `undefined` to an emtpy string.
2852      return existingClassNames;
2853    }
2854  
2855    const aspectRatioClassNames = ASPECT_RATIOS.reduce((accumulator, {
2856      className
2857    }) => {
2858      accumulator[className] = false;
2859      return accumulator;
2860    }, {
2861      'wp-has-aspect-ratio': false
2862    });
2863    return dedupe_default()(existingClassNames, aspectRatioClassNames);
2864  };
2865  /**
2866   * Returns class names with any relevant responsive aspect ratio names.
2867   *
2868   * @param {string}  html               The preview HTML that possibly contains an iframe with width and height set.
2869   * @param {string}  existingClassNames Any existing class names.
2870   * @param {boolean} allowResponsive    If the responsive class names should be added, or removed.
2871   * @return {string} Deduped class names.
2872   */
2873  
2874  function getClassNames(html, existingClassNames, allowResponsive = true) {
2875    if (!allowResponsive) {
2876      return removeAspectRatioClasses(existingClassNames);
2877    }
2878  
2879    const previewDocument = document.implementation.createHTMLDocument('');
2880    previewDocument.body.innerHTML = html;
2881    const iframe = previewDocument.body.querySelector('iframe'); // If we have a fixed aspect iframe, and it's a responsive embed block.
2882  
2883    if (iframe && iframe.height && iframe.width) {
2884      const aspectRatio = (iframe.width / iframe.height).toFixed(2); // Given the actual aspect ratio, find the widest ratio to support it.
2885  
2886      for (let ratioIndex = 0; ratioIndex < ASPECT_RATIOS.length; ratioIndex++) {
2887        const potentialRatio = ASPECT_RATIOS[ratioIndex];
2888  
2889        if (aspectRatio >= potentialRatio.ratio) {
2890          // Evaluate the difference between actual aspect ratio and closest match.
2891          // If the difference is too big, do not scale the embed according to aspect ratio.
2892          const ratioDiff = aspectRatio - potentialRatio.ratio;
2893  
2894          if (ratioDiff > 0.1) {
2895            // No close aspect ratio match found.
2896            return removeAspectRatioClasses(existingClassNames);
2897          } // Close aspect ratio match found.
2898  
2899  
2900          return dedupe_default()(removeAspectRatioClasses(existingClassNames), potentialRatio.className, 'wp-has-aspect-ratio');
2901        }
2902      }
2903    }
2904  
2905    return existingClassNames;
2906  }
2907  /**
2908   * Fallback behaviour for unembeddable URLs.
2909   * Creates a paragraph block containing a link to the URL, and calls `onReplace`.
2910   *
2911   * @param {string}   url       The URL that could not be embedded.
2912   * @param {Function} onReplace Function to call with the created fallback block.
2913   */
2914  
2915  function util_fallback(url, onReplace) {
2916    const link = Object(external_wp_element_["createElement"])("a", {
2917      href: url
2918    }, url);
2919    onReplace(Object(external_wp_blocks_["createBlock"])('core/paragraph', {
2920      content: Object(external_wp_element_["renderToString"])(link)
2921    }));
2922  }
2923  /***
2924   * Gets block attributes based on the preview and responsive state.
2925   *
2926   * @param {Object} preview The preview data.
2927   * @param {string} title The block's title, e.g. Twitter.
2928   * @param {Object} currentClassNames The block's current class names.
2929   * @param {boolean} isResponsive Boolean indicating if the block supports responsive content.
2930   * @param {boolean} allowResponsive Apply responsive classes to fixed size content.
2931   * @return {Object} Attributes and values.
2932   */
2933  
2934  const getAttributesFromPreview = memize_default()((preview, title, currentClassNames, isResponsive, allowResponsive = true) => {
2935    if (!preview) {
2936      return {};
2937    }
2938  
2939    const attributes = {}; // Some plugins only return HTML with no type info, so default this to 'rich'.
2940  
2941    let {
2942      type = 'rich'
2943    } = preview; // If we got a provider name from the API, use it for the slug, otherwise we use the title,
2944    // because not all embed code gives us a provider name.
2945  
2946    const {
2947      html,
2948      provider_name: providerName
2949    } = preview;
2950    const providerNameSlug = Object(external_lodash_["kebabCase"])((providerName || title).toLowerCase());
2951  
2952    if (isFromWordPress(html)) {
2953      type = WP_EMBED_TYPE;
2954    }
2955  
2956    if (html || 'photo' === type) {
2957      attributes.type = type;
2958      attributes.providerNameSlug = providerNameSlug;
2959    }
2960  
2961    attributes.className = getClassNames(html, currentClassNames, isResponsive && allowResponsive);
2962    return attributes;
2963  });
2964  
2965  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/use-client-width.js
2966  /**
2967   * WordPress dependencies
2968   */
2969  
2970  function useClientWidth(ref, dependencies) {
2971    const [clientWidth, setClientWidth] = Object(external_wp_element_["useState"])();
2972  
2973    function calculateClientWidth() {
2974      setClientWidth(ref.current.clientWidth);
2975    }
2976  
2977    Object(external_wp_element_["useEffect"])(calculateClientWidth, dependencies);
2978    Object(external_wp_element_["useEffect"])(() => {
2979      const {
2980        defaultView
2981      } = ref.current.ownerDocument;
2982      defaultView.addEventListener('resize', calculateClientWidth);
2983      return () => {
2984        defaultView.removeEventListener('resize', calculateClientWidth);
2985      };
2986    }, []);
2987    return clientWidth;
2988  }
2989  
2990  // CONCATENATED MODULE: ./node_modules/react-easy-crop/node_modules/tslib/tslib.es6.js
2991  /*! *****************************************************************************

2992  Copyright (c) Microsoft Corporation.

2993  

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

2995  purpose with or without fee is hereby granted.

2996  

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

2998  REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY

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

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

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

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

3003  PERFORMANCE OF THIS SOFTWARE.

3004  ***************************************************************************** */
3005  /* global Reflect, Promise */

3006  
3007  var extendStatics = function(d, b) {
3008      extendStatics = Object.setPrototypeOf ||
3009          ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
3010          function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
3011      return extendStatics(d, b);
3012  };
3013  
3014  function __extends(d, b) {
3015      extendStatics(d, b);
3016      function __() { this.constructor = d; }
3017      d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3018  }
3019  
3020  var __assign = function() {
3021      __assign = Object.assign || function __assign(t) {
3022          for (var s, i = 1, n = arguments.length; i < n; i++) {
3023              s = arguments[i];
3024              for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
3025          }
3026          return t;
3027      }
3028      return __assign.apply(this, arguments);
3029  }
3030  
3031  function __rest(s, e) {
3032      var t = {};
3033      for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
3034          t[p] = s[p];
3035      if (s != null && typeof Object.getOwnPropertySymbols === "function")
3036          for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
3037              if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
3038                  t[p[i]] = s[p[i]];
3039          }
3040      return t;
3041  }
3042  
3043  function __decorate(decorators, target, key, desc) {
3044      var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3045      if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
3046      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;
3047      return c > 3 && r && Object.defineProperty(target, key, r), r;
3048  }
3049  
3050  function __param(paramIndex, decorator) {
3051      return function (target, key) { decorator(target, key, paramIndex); }
3052  }
3053  
3054  function __metadata(metadataKey, metadataValue) {
3055      if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
3056  }
3057  
3058  function __awaiter(thisArg, _arguments, P, generator) {
3059      function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3060      return new (P || (P = Promise))(function (resolve, reject) {
3061          function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
3062          function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
3063          function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
3064          step((generator = generator.apply(thisArg, _arguments || [])).next());
3065      });
3066  }
3067  
3068  function __generator(thisArg, body) {
3069      var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
3070      return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
3071      function verb(n) { return function (v) { return step([n, v]); }; }
3072      function step(op) {
3073          if (f) throw new TypeError("Generator is already executing.");
3074          while (_) try {
3075              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;
3076              if (y = 0, t) op = [op[0] & 2, t.value];
3077              switch (op[0]) {
3078                  case 0: case 1: t = op; break;
3079                  case 4: _.label++; return { value: op[1], done: false };
3080                  case 5: _.label++; y = op[1]; op = [0]; continue;
3081                  case 7: op = _.ops.pop(); _.trys.pop(); continue;
3082                  default:
3083                      if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
3084                      if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
3085                      if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
3086                      if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
3087                      if (t[2]) _.ops.pop();
3088                      _.trys.pop(); continue;
3089              }
3090              op = body.call(thisArg, _);
3091          } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
3092          if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
3093      }
3094  }
3095  
3096  var __createBinding = Object.create ? (function(o, m, k, k2) {
3097      if (k2 === undefined) k2 = k;
3098      Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
3099  }) : (function(o, m, k, k2) {
3100      if (k2 === undefined) k2 = k;
3101      o[k2] = m[k];
3102  });
3103  
3104  function __exportStar(m, o) {
3105      for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
3106  }
3107  
3108  function __values(o) {
3109      var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
3110      if (m) return m.call(o);
3111      if (o && typeof o.length === "number") return {
3112          next: function () {
3113              if (o && i >= o.length) o = void 0;
3114              return { value: o && o[i++], done: !o };
3115          }
3116      };
3117      throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
3118  }
3119  
3120  function __read(o, n) {
3121      var m = typeof Symbol === "function" && o[Symbol.iterator];
3122      if (!m) return o;
3123      var i = m.call(o), r, ar = [], e;
3124      try {
3125          while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
3126      }
3127      catch (error) { e = { error: error }; }
3128      finally {
3129          try {
3130              if (r && !r.done && (m = i["return"])) m.call(i);
3131          }
3132          finally { if (e) throw e.error; }
3133      }
3134      return ar;
3135  }
3136  
3137  function __spread() {
3138      for (var ar = [], i = 0; i < arguments.length; i++)
3139          ar = ar.concat(__read(arguments[i]));
3140      return ar;
3141  }
3142  
3143  function __spreadArrays() {
3144      for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
3145      for (var r = Array(s), k = 0, i = 0; i < il; i++)
3146          for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
3147              r[k] = a[j];
3148      return r;
3149  };
3150  
3151  function __await(v) {
3152      return this instanceof __await ? (this.v = v, this) : new __await(v);
3153  }
3154  
3155  function __asyncGenerator(thisArg, _arguments, generator) {
3156      if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
3157      var g = generator.apply(thisArg, _arguments || []), i, q = [];
3158      return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
3159      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); }); }; }
3160      function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
3161      function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
3162      function fulfill(value) { resume("next", value); }
3163      function reject(value) { resume("throw", value); }
3164      function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
3165  }
3166  
3167  function __asyncDelegator(o) {
3168      var i, p;
3169      return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
3170      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; }
3171  }
3172  
3173  function __asyncValues(o) {
3174      if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
3175      var m = o[Symbol.asyncIterator], i;
3176      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);
3177      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); }); }; }
3178      function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
3179  }
3180  
3181  function __makeTemplateObject(cooked, raw) {
3182      if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3183      return cooked;
3184  };
3185  
3186  var __setModuleDefault = Object.create ? (function(o, v) {
3187      Object.defineProperty(o, "default", { enumerable: true, value: v });
3188  }) : function(o, v) {
3189      o["default"] = v;
3190  };
3191  
3192  function __importStar(mod) {
3193      if (mod && mod.__esModule) return mod;
3194      var result = {};
3195      if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
3196      __setModuleDefault(result, mod);
3197      return result;
3198  }
3199  
3200  function __importDefault(mod) {
3201      return (mod && mod.__esModule) ? mod : { default: mod };
3202  }
3203  
3204  function __classPrivateFieldGet(receiver, privateMap) {
3205      if (!privateMap.has(receiver)) {
3206          throw new TypeError("attempted to get private field on non-instance");
3207      }
3208      return privateMap.get(receiver);
3209  }
3210  
3211  function __classPrivateFieldSet(receiver, privateMap, value) {
3212      if (!privateMap.has(receiver)) {
3213          throw new TypeError("attempted to set private field on non-instance");
3214      }
3215      privateMap.set(receiver, value);
3216      return value;
3217  }
3218  
3219  // EXTERNAL MODULE: external "React"
3220  var external_React_ = __webpack_require__("cDcd");
3221  var external_React_default = /*#__PURE__*/__webpack_require__.n(external_React_);
3222  
3223  // EXTERNAL MODULE: ./node_modules/normalize-wheel/index.js
3224  var normalize_wheel = __webpack_require__("wJiJ");
3225  var normalize_wheel_default = /*#__PURE__*/__webpack_require__.n(normalize_wheel);
3226  
3227  // CONCATENATED MODULE: ./node_modules/react-easy-crop/index.module.js
3228  
3229  
3230  
3231  
3232  /**

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

3234   * aspect ratio and optionally rotation

3235   */
3236  
3237  function getCropSize(mediaWidth, mediaHeight, containerWidth, containerHeight, aspect, rotation) {
3238    if (rotation === void 0) {
3239      rotation = 0;
3240    }
3241  
3242    var _a = translateSize(mediaWidth, mediaHeight, rotation),
3243        width = _a.width,
3244        height = _a.height;
3245  
3246    var fittingWidth = Math.min(width, containerWidth);
3247    var fittingHeight = Math.min(height, containerHeight);
3248  
3249    if (fittingWidth > fittingHeight * aspect) {
3250      return {
3251        width: fittingHeight * aspect,
3252        height: fittingHeight
3253      };
3254    }
3255  
3256    return {
3257      width: fittingWidth,
3258      height: fittingWidth / aspect
3259    };
3260  }
3261  /**

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

3263   */
3264  
3265  function index_module_restrictPosition(position, mediaSize, cropSize, zoom, rotation) {
3266    if (rotation === void 0) {
3267      rotation = 0;
3268    }
3269  
3270    var _a = translateSize(mediaSize.width, mediaSize.height, rotation),
3271        width = _a.width,
3272        height = _a.height;
3273  
3274    return {
3275      x: restrictPositionCoord(position.x, width, cropSize.width, zoom),
3276      y: restrictPositionCoord(position.y, height, cropSize.height, zoom)
3277    };
3278  }
3279  
3280  function restrictPositionCoord(position, mediaSize, cropSize, zoom) {
3281    var maxPosition = mediaSize * zoom / 2 - cropSize / 2;
3282    return Math.min(maxPosition, Math.max(position, -maxPosition));
3283  }
3284  
3285  function getDistanceBetweenPoints(pointA, pointB) {
3286    return Math.sqrt(Math.pow(pointA.y - pointB.y, 2) + Math.pow(pointA.x - pointB.x, 2));
3287  }
3288  function getRotationBetweenPoints(pointA, pointB) {
3289    return Math.atan2(pointB.y - pointA.y, pointB.x - pointA.x) * 180 / Math.PI;
3290  }
3291  /**

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

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

3294   */
3295  
3296  function computeCroppedArea(crop, mediaSize, cropSize, aspect, zoom, rotation, restrictPosition) {
3297    if (rotation === void 0) {
3298      rotation = 0;
3299    }
3300  
3301    if (restrictPosition === void 0) {
3302      restrictPosition = true;
3303    } // if the media is rotated by the user, we cannot limit the position anymore
3304    // as it might need to be negative.
3305  
3306  
3307    var limitAreaFn = restrictPosition && rotation === 0 ? limitArea : noOp;
3308    var croppedAreaPercentages = {
3309      x: limitAreaFn(100, ((mediaSize.width - cropSize.width / zoom) / 2 - crop.x / zoom) / mediaSize.width * 100),
3310      y: limitAreaFn(100, ((mediaSize.height - cropSize.height / zoom) / 2 - crop.y / zoom) / mediaSize.height * 100),
3311      width: limitAreaFn(100, cropSize.width / mediaSize.width * 100 / zoom),
3312      height: limitAreaFn(100, cropSize.height / mediaSize.height * 100 / zoom)
3313    }; // we compute the pixels size naively
3314  
3315    var widthInPixels = Math.round(limitAreaFn(mediaSize.naturalWidth, croppedAreaPercentages.width * mediaSize.naturalWidth / 100));
3316    var heightInPixels = Math.round(limitAreaFn(mediaSize.naturalHeight, croppedAreaPercentages.height * mediaSize.naturalHeight / 100));
3317    var isImgWiderThanHigh = mediaSize.naturalWidth >= mediaSize.naturalHeight * aspect; // then we ensure the width and height exactly match the aspect (to avoid rounding approximations)
3318    // if the media is wider than high, when zoom is 0, the crop height will be equals to iamge height
3319    // thus we want to compute the width from the height and aspect for accuracy.
3320    // Otherwise, we compute the height from width and aspect.
3321  
3322    var sizePixels = isImgWiderThanHigh ? {
3323      width: Math.round(heightInPixels * aspect),
3324      height: heightInPixels
3325    } : {
3326      width: widthInPixels,
3327      height: Math.round(widthInPixels / aspect)
3328    };
3329  
3330    var croppedAreaPixels = __assign(__assign({}, sizePixels), {
3331      x: Math.round(limitAreaFn(mediaSize.naturalWidth - sizePixels.width, croppedAreaPercentages.x * mediaSize.naturalWidth / 100)),
3332      y: Math.round(limitAreaFn(mediaSize.naturalHeight - sizePixels.height, croppedAreaPercentages.y * mediaSize.naturalHeight / 100))
3333    });
3334  
3335    return {
3336      croppedAreaPercentages: croppedAreaPercentages,
3337      croppedAreaPixels: croppedAreaPixels
3338    };
3339  }
3340  /**

3341   * Ensure the returned value is between 0 and max

3342   */
3343  
3344  function limitArea(max, value) {
3345    return Math.min(max, Math.max(0, value));
3346  }
3347  
3348  function noOp(_max, value) {
3349    return value;
3350  }
3351  /**

3352   * Compute the crop and zoom from the croppedAreaPixels

3353   */
3354  
3355  
3356  function getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize) {
3357    var mediaZoom = mediaSize.width / mediaSize.naturalWidth;
3358  
3359    if (cropSize) {
3360      var isHeightMaxSize_1 = cropSize.height > cropSize.width;
3361      return isHeightMaxSize_1 ? cropSize.height / mediaZoom / croppedAreaPixels.height : cropSize.width / mediaZoom / croppedAreaPixels.width;
3362    }
3363  
3364    var aspect = croppedAreaPixels.width / croppedAreaPixels.height;
3365    var isHeightMaxSize = mediaSize.naturalWidth >= mediaSize.naturalHeight * aspect;
3366    return isHeightMaxSize ? mediaSize.naturalHeight / croppedAreaPixels.height : mediaSize.naturalWidth / croppedAreaPixels.width;
3367  }
3368  /**

3369   * Compute the crop and zoom from the croppedAreaPixels

3370   */
3371  
3372  
3373  function getInitialCropFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize) {
3374    var mediaZoom = mediaSize.width / mediaSize.naturalWidth;
3375    var zoom = getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize);
3376    var cropZoom = mediaZoom * zoom;
3377    var crop = {
3378      x: ((mediaSize.naturalWidth - croppedAreaPixels.width) / 2 - croppedAreaPixels.x) * cropZoom,
3379      y: ((mediaSize.naturalHeight - croppedAreaPixels.height) / 2 - croppedAreaPixels.y) * cropZoom
3380    };
3381    return {
3382      crop: crop,
3383      zoom: zoom
3384    };
3385  }
3386  /**

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

3388   */
3389  
3390  function getCenter(a, b) {
3391    return {
3392      x: (b.x + a.x) / 2,
3393      y: (b.y + a.y) / 2
3394    };
3395  }
3396  /**

3397   *

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

3399   */
3400  
3401  function rotateAroundMidPoint(x, y, xMid, yMid, degrees) {
3402    var cos = Math.cos;
3403    var sin = Math.sin;
3404    var radian = degrees * Math.PI / 180; // Convert to radians
3405    // Subtract midpoints, so that midpoint is translated to origin
3406    // and add it in the end again
3407  
3408    var xr = (x - xMid) * cos(radian) - (y - yMid) * sin(radian) + xMid;
3409    var yr = (x - xMid) * sin(radian) + (y - yMid) * cos(radian) + yMid;
3410    return [xr, yr];
3411  }
3412  /**

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

3414   */
3415  
3416  function translateSize(width, height, rotation) {
3417    var centerX = width / 2;
3418    var centerY = height / 2;
3419    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)];
3420    var minX = Math.min.apply(Math, outerBounds.map(function (p) {
3421      return p[0];
3422    }));
3423    var maxX = Math.max.apply(Math, outerBounds.map(function (p) {
3424      return p[0];
3425    }));
3426    var minY = Math.min.apply(Math, outerBounds.map(function (p) {
3427      return p[1];
3428    }));
3429    var maxY = Math.max.apply(Math, outerBounds.map(function (p) {
3430      return p[1];
3431    }));
3432    return {
3433      width: maxX - minX,
3434      height: maxY - minY
3435    };
3436  }
3437  /**

3438   * Combine multiple class names into a single string.

3439   */
3440  
3441  function index_module_classNames() {
3442    var args = [];
3443  
3444    for (var _i = 0; _i < arguments.length; _i++) {
3445      args[_i] = arguments[_i];
3446    }
3447  
3448    return args.filter(function (value) {
3449      if (typeof value === 'string' && value.length > 0) {
3450        return true;
3451      }
3452  
3453      return false;
3454    }).join(' ').trim();
3455  }
3456  
3457  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  display: flex;\n  justify-content: center;\n  align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n  will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\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}\n.reactEasyCrop_Cover_Horizontal {\n  width: 100%;\n  height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n  width: auto;\n  height: 100%;\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";
3458  
3459  var MIN_ZOOM = 1;
3460  var MAX_ZOOM = 3;
3461  
3462  var index_module_Cropper =
3463  /** @class */
3464  function (_super) {
3465    __extends(Cropper, _super);
3466  
3467    function Cropper() {
3468      var _this = _super !== null && _super.apply(this, arguments) || this;
3469  
3470      _this.imageRef = null;
3471      _this.videoRef = null;
3472      _this.containerRef = null;
3473      _this.styleRef = null;
3474      _this.containerRect = null;
3475      _this.mediaSize = {
3476        width: 0,
3477        height: 0,
3478        naturalWidth: 0,
3479        naturalHeight: 0
3480      };
3481      _this.dragStartPosition = {
3482        x: 0,
3483        y: 0
3484      };
3485      _this.dragStartCrop = {
3486        x: 0,
3487        y: 0
3488      };
3489      _this.lastPinchDistance = 0;
3490      _this.lastPinchRotation = 0;
3491      _this.rafDragTimeout = null;
3492      _this.rafPinchTimeout = null;
3493      _this.wheelTimer = null;
3494      _this.state = {
3495        cropSize: null,
3496        hasWheelJustStarted: false
3497      }; // this is to prevent Safari on iOS >= 10 to zoom the page
3498  
3499      _this.preventZoomSafari = function (e) {
3500        return e.preventDefault();
3501      };
3502  
3503      _this.cleanEvents = function () {
3504        document.removeEventListener('mousemove', _this.onMouseMove);
3505        document.removeEventListener('mouseup', _this.onDragStopped);
3506        document.removeEventListener('touchmove', _this.onTouchMove);
3507        document.removeEventListener('touchend', _this.onDragStopped);
3508      };
3509  
3510      _this.clearScrollEvent = function () {
3511        if (_this.containerRef) _this.containerRef.removeEventListener('wheel', _this.onWheel);
3512  
3513        if (_this.wheelTimer) {
3514          clearTimeout(_this.wheelTimer);
3515        }
3516      };
3517  
3518      _this.onMediaLoad = function () {
3519        _this.computeSizes();
3520  
3521        _this.emitCropData();
3522  
3523        _this.setInitialCrop();
3524  
3525        if (_this.props.onMediaLoaded) {
3526          _this.props.onMediaLoaded(_this.mediaSize);
3527        }
3528      };
3529  
3530      _this.setInitialCrop = function () {
3531        var _a = _this.props,
3532            initialCroppedAreaPixels = _a.initialCroppedAreaPixels,
3533            cropSize = _a.cropSize;
3534  
3535        if (!initialCroppedAreaPixels) {
3536          return;
3537        }
3538  
3539        var _b = getInitialCropFromCroppedAreaPixels(initialCroppedAreaPixels, _this.mediaSize, cropSize),
3540            crop = _b.crop,
3541            zoom = _b.zoom;
3542  
3543        _this.props.onCropChange(crop);
3544  
3545        _this.props.onZoomChange && _this.props.onZoomChange(zoom);
3546      };
3547  
3548      _this.computeSizes = function () {
3549        var _a, _b, _c, _d, _e, _f;
3550  
3551        var mediaRef = _this.imageRef || _this.videoRef;
3552  
3553        if (mediaRef && _this.containerRef) {
3554          _this.containerRect = _this.containerRef.getBoundingClientRect();
3555          _this.mediaSize = {
3556            width: mediaRef.offsetWidth,
3557            height: mediaRef.offsetHeight,
3558            naturalWidth: ((_a = _this.imageRef) === null || _a === void 0 ? void 0 : _a.naturalWidth) || ((_b = _this.videoRef) === null || _b === void 0 ? void 0 : _b.videoWidth) || 0,
3559            naturalHeight: ((_c = _this.imageRef) === null || _c === void 0 ? void 0 : _c.naturalHeight) || ((_d = _this.videoRef) === null || _d === void 0 ? void 0 : _d.videoHeight) || 0
3560          };
3561          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);
3562  
3563          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) {
3564            _this.props.onCropSizeChange && _this.props.onCropSizeChange(cropSize);
3565          }
3566  
3567          _this.setState({
3568            cropSize: cropSize
3569          }, _this.recomputeCropPosition);
3570        }
3571      };
3572  
3573      _this.onMouseDown = function (e) {
3574        e.preventDefault();
3575        document.addEventListener('mousemove', _this.onMouseMove);
3576        document.addEventListener('mouseup', _this.onDragStopped);
3577  
3578        _this.onDragStart(Cropper.getMousePoint(e));
3579      };
3580  
3581      _this.onMouseMove = function (e) {
3582        return _this.onDrag(Cropper.getMousePoint(e));
3583      };
3584  
3585      _this.onTouchStart = function (e) {
3586        e.preventDefault();
3587        document.addEventListener('touchmove', _this.onTouchMove, {
3588          passive: false
3589        }); // iOS 11 now defaults to passive: true
3590  
3591        document.addEventListener('touchend', _this.onDragStopped);
3592  
3593        if (e.touches.length === 2) {
3594          _this.onPinchStart(e);
3595        } else if (e.touches.length === 1) {
3596          _this.onDragStart(Cropper.getTouchPoint(e.touches[0]));
3597        }
3598      };
3599  
3600      _this.onTouchMove = function (e) {
3601        // Prevent whole page from scrolling on iOS.
3602        e.preventDefault();
3603  
3604        if (e.touches.length === 2) {
3605          _this.onPinchMove(e);
3606        } else if (e.touches.length === 1) {
3607          _this.onDrag(Cropper.getTouchPoint(e.touches[0]));
3608        }
3609      };
3610  
3611      _this.onDragStart = function (_a) {
3612        var _b, _c;
3613  
3614        var x = _a.x,
3615            y = _a.y;
3616        _this.dragStartPosition = {
3617          x: x,
3618          y: y
3619        };
3620        _this.dragStartCrop = __assign({}, _this.props.crop);
3621        (_c = (_b = _this.props).onInteractionStart) === null || _c === void 0 ? void 0 : _c.call(_b);
3622      };
3623  
3624      _this.onDrag = function (_a) {
3625        var x = _a.x,
3626            y = _a.y;
3627        if (_this.rafDragTimeout) window.cancelAnimationFrame(_this.rafDragTimeout);
3628        _this.rafDragTimeout = window.requestAnimationFrame(function () {
3629          if (!_this.state.cropSize) return;
3630          if (x === undefined || y === undefined) return;
3631          var offsetX = x - _this.dragStartPosition.x;
3632          var offsetY = y - _this.dragStartPosition.y;
3633          var requestedPosition = {
3634            x: _this.dragStartCrop.x + offsetX,
3635            y: _this.dragStartCrop.y + offsetY
3636          };
3637          var newPosition = _this.props.restrictPosition ? index_module_restrictPosition(requestedPosition, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : requestedPosition;
3638  
3639          _this.props.onCropChange(newPosition);
3640        });
3641      };
3642  
3643      _this.onDragStopped = function () {
3644        var _a, _b;
3645  
3646        _this.cleanEvents();
3647  
3648        _this.emitCropData();
3649  
3650        (_b = (_a = _this.props).onInteractionEnd) === null || _b === void 0 ? void 0 : _b.call(_a);
3651      };
3652  
3653      _this.onWheel = function (e) {
3654        e.preventDefault();
3655        var point = Cropper.getMousePoint(e);
3656        var pixelY = normalize_wheel_default()(e).pixelY;
3657        var newZoom = _this.props.zoom - pixelY * _this.props.zoomSpeed / 200;
3658  
3659        _this.setNewZoom(newZoom, point);
3660  
3661        if (!_this.state.hasWheelJustStarted) {
3662          _this.setState({
3663            hasWheelJustStarted: true
3664          }, function () {
3665            var _a, _b;
3666  
3667            return (_b = (_a = _this.props).onInteractionStart) === null || _b === void 0 ? void 0 : _b.call(_a);
3668          });
3669        }
3670  
3671        if (_this.wheelTimer) {
3672          clearTimeout(_this.wheelTimer);
3673        }
3674  
3675        _this.wheelTimer = window.setTimeout(function () {
3676          return _this.setState({
3677            hasWheelJustStarted: false
3678          }, function () {
3679            var _a, _b;
3680  
3681            return (_b = (_a = _this.props).onInteractionEnd) === null || _b === void 0 ? void 0 : _b.call(_a);
3682          });
3683        }, 250);
3684      };
3685  
3686      _this.getPointOnContainer = function (_a) {
3687        var x = _a.x,
3688            y = _a.y;
3689  
3690        if (!_this.containerRect) {
3691          throw new Error('The Cropper is not mounted');
3692        }
3693  
3694        return {
3695          x: _this.containerRect.width / 2 - (x - _this.containerRect.left),
3696          y: _this.containerRect.height / 2 - (y - _this.containerRect.top)
3697        };
3698      };
3699  
3700      _this.getPointOnMedia = function (_a) {
3701        var x = _a.x,
3702            y = _a.y;
3703        var _b = _this.props,
3704            crop = _b.crop,
3705            zoom = _b.zoom;
3706        return {
3707          x: (x + crop.x) / zoom,
3708          y: (y + crop.y) / zoom
3709        };
3710      };
3711  
3712      _this.setNewZoom = function (zoom, point) {
3713        if (!_this.state.cropSize || !_this.props.onZoomChange) return;
3714  
3715        var zoomPoint = _this.getPointOnContainer(point);
3716  
3717        var zoomTarget = _this.getPointOnMedia(zoomPoint);
3718  
3719        var newZoom = Math.min(_this.props.maxZoom, Math.max(zoom, _this.props.minZoom));
3720        var requestedPosition = {
3721          x: zoomTarget.x * newZoom - zoomPoint.x,
3722          y: zoomTarget.y * newZoom - zoomPoint.y
3723        };
3724        var newPosition = _this.props.restrictPosition ? index_module_restrictPosition(requestedPosition, _this.mediaSize, _this.state.cropSize, newZoom, _this.props.rotation) : requestedPosition;
3725  
3726        _this.props.onCropChange(newPosition);
3727  
3728        _this.props.onZoomChange(newZoom);
3729      };
3730  
3731      _this.getCropData = function () {
3732        if (!_this.state.cropSize) {
3733          return null;
3734        } // this is to ensure the crop is correctly restricted after a zoom back (https://github.com/ricardo-ch/react-easy-crop/issues/6)
3735  
3736  
3737        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;
3738        return computeCroppedArea(restrictedPosition, _this.mediaSize, _this.state.cropSize, _this.getAspect(), _this.props.zoom, _this.props.rotation, _this.props.restrictPosition);
3739      };
3740  
3741      _this.emitCropData = function () {
3742        var cropData = _this.getCropData();
3743  
3744        if (!cropData) return;
3745        var croppedAreaPercentages = cropData.croppedAreaPercentages,
3746            croppedAreaPixels = cropData.croppedAreaPixels;
3747  
3748        if (_this.props.onCropComplete) {
3749          _this.props.onCropComplete(croppedAreaPercentages, croppedAreaPixels);
3750        }
3751  
3752        if (_this.props.onCropAreaChange) {
3753          _this.props.onCropAreaChange(croppedAreaPercentages, croppedAreaPixels);
3754        }
3755      };
3756  
3757      _this.emitCropAreaChange = function () {
3758        var cropData = _this.getCropData();
3759  
3760        if (!cropData) return;
3761        var croppedAreaPercentages = cropData.croppedAreaPercentages,
3762            croppedAreaPixels = cropData.croppedAreaPixels;
3763  
3764        if (_this.props.onCropAreaChange) {
3765          _this.props.onCropAreaChange(croppedAreaPercentages, croppedAreaPixels);
3766        }
3767      };
3768  
3769      _this.recomputeCropPosition = function () {
3770        if (!_this.state.cropSize) return;
3771        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;
3772  
3773        _this.props.onCropChange(newPosition);
3774  
3775        _this.emitCropData();
3776      };
3777  
3778      return _this;
3779    }
3780  
3781    Cropper.prototype.componentDidMount = function () {
3782      window.addEventListener('resize', this.computeSizes);
3783  
3784      if (this.containerRef) {
3785        this.props.zoomWithScroll && this.containerRef.addEventListener('wheel', this.onWheel, {
3786          passive: false
3787        });
3788        this.containerRef.addEventListener('gesturestart', this.preventZoomSafari);
3789        this.containerRef.addEventListener('gesturechange', this.preventZoomSafari);
3790      }
3791  
3792      if (!this.props.disableAutomaticStylesInjection) {
3793        this.styleRef = document.createElement('style');
3794        this.styleRef.setAttribute('type', 'text/css');
3795        this.styleRef.innerHTML = css_248z;
3796        document.head.appendChild(this.styleRef);
3797      } // when rendered via SSR, the image can already be loaded and its onLoad callback will never be called
3798  
3799  
3800      if (this.imageRef && this.imageRef.complete) {
3801        this.onMediaLoad();
3802      }
3803    };
3804  
3805    Cropper.prototype.componentWillUnmount = function () {
3806      var _a;
3807  
3808      window.removeEventListener('resize', this.computeSizes);
3809  
3810      if (this.containerRef) {
3811        this.containerRef.removeEventListener('gesturestart', this.preventZoomSafari);
3812        this.containerRef.removeEventListener('gesturechange', this.preventZoomSafari);
3813      }
3814  
3815      if (this.styleRef) {
3816        (_a = this.styleRef.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(this.styleRef);
3817      }
3818  
3819      this.cleanEvents();
3820      this.props.zoomWithScroll && this.clearScrollEvent();
3821    };
3822  
3823    Cropper.prototype.componentDidUpdate = function (prevProps) {
3824      var _a, _b, _c, _d, _e, _f, _g, _h;
3825  
3826      if (prevProps.rotation !== this.props.rotation) {
3827        this.computeSizes();
3828        this.recomputeCropPosition();
3829      } else if (prevProps.aspect !== this.props.aspect) {
3830        this.computeSizes();
3831      } else if (prevProps.zoom !== this.props.zoom) {
3832        this.recomputeCropPosition();
3833      } 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)) {
3834        this.computeSizes();
3835      } 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)) {
3836        this.emitCropAreaChange();
3837      }
3838  
3839      if (prevProps.zoomWithScroll !== this.props.zoomWithScroll && this.containerRef) {
3840        this.props.zoomWithScroll ? this.containerRef.addEventListener('wheel', this.onWheel, {
3841          passive: false
3842        }) : this.clearScrollEvent();
3843      }
3844    };
3845  
3846    Cropper.prototype.getAspect = function () {
3847      var _a = this.props,
3848          cropSize = _a.cropSize,
3849          aspect = _a.aspect;
3850  
3851      if (cropSize) {
3852        return cropSize.width / cropSize.height;
3853      }
3854  
3855      return aspect;
3856    };
3857  
3858    Cropper.prototype.onPinchStart = function (e) {
3859      var pointA = Cropper.getTouchPoint(e.touches[0]);
3860      var pointB = Cropper.getTouchPoint(e.touches[1]);
3861      this.lastPinchDistance = getDistanceBetweenPoints(pointA, pointB);
3862      this.lastPinchRotation = getRotationBetweenPoints(pointA, pointB);
3863      this.onDragStart(getCenter(pointA, pointB));
3864    };
3865  
3866    Cropper.prototype.onPinchMove = function (e) {
3867      var _this = this;
3868  
3869      var pointA = Cropper.getTouchPoint(e.touches[0]);
3870      var pointB = Cropper.getTouchPoint(e.touches[1]);
3871      var center = getCenter(pointA, pointB);
3872      this.onDrag(center);
3873      if (this.rafPinchTimeout) window.cancelAnimationFrame(this.rafPinchTimeout);
3874      this.rafPinchTimeout = window.requestAnimationFrame(function () {
3875        var distance = getDistanceBetweenPoints(pointA, pointB);
3876        var newZoom = _this.props.zoom * (distance / _this.lastPinchDistance);
3877  
3878        _this.setNewZoom(newZoom, center);
3879  
3880        _this.lastPinchDistance = distance;
3881        var rotation = getRotationBetweenPoints(pointA, pointB);
3882        var newRotation = _this.props.rotation + (rotation - _this.lastPinchRotation);
3883        _this.props.onRotationChange && _this.props.onRotationChange(newRotation);
3884        _this.lastPinchRotation = rotation;
3885      });
3886    };
3887  
3888    Cropper.prototype.render = function () {
3889      var _this = this;
3890  
3891      var _a = this.props,
3892          image = _a.image,
3893          video = _a.video,
3894          mediaProps = _a.mediaProps,
3895          transform = _a.transform,
3896          _b = _a.crop,
3897          x = _b.x,
3898          y = _b.y,
3899          rotation = _a.rotation,
3900          zoom = _a.zoom,
3901          cropShape = _a.cropShape,
3902          showGrid = _a.showGrid,
3903          _c = _a.style,
3904          containerStyle = _c.containerStyle,
3905          cropAreaStyle = _c.cropAreaStyle,
3906          mediaStyle = _c.mediaStyle,
3907          _d = _a.classes,
3908          containerClassName = _d.containerClassName,
3909          cropAreaClassName = _d.cropAreaClassName,
3910          mediaClassName = _d.mediaClassName,
3911          objectFit = _a.objectFit;
3912      return /*#__PURE__*/external_React_default.a.createElement("div", {
3913        onMouseDown: this.onMouseDown,
3914        onTouchStart: this.onTouchStart,
3915        ref: function ref(el) {
3916          return _this.containerRef = el;
3917        },
3918        "data-testid": "container",
3919        style: containerStyle,
3920        className: index_module_classNames('reactEasyCrop_Container', containerClassName)
3921      }, image ? /*#__PURE__*/external_React_default.a.createElement("img", __assign({
3922        alt: "",
3923        className: index_module_classNames('reactEasyCrop_Image', objectFit === 'contain' && 'reactEasyCrop_Contain', objectFit === 'horizontal-cover' && 'reactEasyCrop_Cover_Horizontal', objectFit === 'vertical-cover' && 'reactEasyCrop_Cover_Vertical', mediaClassName)
3924      }, mediaProps, {
3925        src: image,
3926        ref: function ref(el) {
3927          return _this.imageRef = el;
3928        },
3929        style: __assign(__assign({}, mediaStyle), {
3930          transform: transform || "translate(" + x + "px, " + y + "px) rotate(" + rotation + "deg) scale(" + zoom + ")"
3931        }),
3932        onLoad: this.onMediaLoad
3933      })) : video && /*#__PURE__*/external_React_default.a.createElement("video", __assign({
3934        autoPlay: true,
3935        loop: true,
3936        muted: true,
3937        className: index_module_classNames('reactEasyCrop_Video', objectFit === 'contain' && 'reactEasyCrop_Contain', objectFit === 'horizontal-cover' && 'reactEasyCrop_Cover_Horizontal', objectFit === 'vertical-cover' && 'reactEasyCrop_Cover_Vertical', mediaClassName)
3938      }, mediaProps, {
3939        ref: function ref(el) {
3940          return _this.videoRef = el;
3941        },
3942        onLoadedMetadata: this.onMediaLoad,
3943        style: __assign(__assign({}, mediaStyle), {
3944          transform: transform || "translate(" + x + "px, " + y + "px) rotate(" + rotation + "deg) scale(" + zoom + ")"
3945        }),
3946        controls: false
3947      }), (Array.isArray(video) ? video : [{
3948        src: video
3949      }]).map(function (item) {
3950        return /*#__PURE__*/external_React_default.a.createElement("source", __assign({
3951          key: item.src
3952        }, item));
3953      })), this.state.cropSize && /*#__PURE__*/external_React_default.a.createElement("div", {
3954        style: __assign(__assign({}, cropAreaStyle), {
3955          width: this.state.cropSize.width,
3956          height: this.state.cropSize.height
3957        }),
3958        "data-testid": "cropper",
3959        className: index_module_classNames('reactEasyCrop_CropArea', cropShape === 'round' && 'reactEasyCrop_CropAreaRound', showGrid && 'reactEasyCrop_CropAreaGrid', cropAreaClassName)
3960      }));
3961    };
3962  
3963    Cropper.defaultProps = {
3964      zoom: 1,
3965      rotation: 0,
3966      aspect: 4 / 3,
3967      maxZoom: MAX_ZOOM,
3968      minZoom: MIN_ZOOM,
3969      cropShape: 'rect',
3970      objectFit: 'contain',
3971      showGrid: true,
3972      style: {},
3973      classes: {},
3974      mediaProps: {},
3975      zoomSpeed: 1,
3976      restrictPosition: true,
3977      zoomWithScroll: true
3978    };
3979  
3980    Cropper.getMousePoint = function (e) {
3981      return {
3982        x: Number(e.clientX),
3983        y: Number(e.clientY)
3984      };
3985    };
3986  
3987    Cropper.getTouchPoint = function (touch) {
3988      return {
3989        x: Number(touch.clientX),
3990        y: Number(touch.clientY)
3991      };
3992    };
3993  
3994    return Cropper;
3995  }(external_React_default.a.Component);
3996  
3997  /* harmony default export */ var index_module = (index_module_Cropper);
3998  
3999  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-editing/constants.js
4000  const constants_MIN_ZOOM = 100;
4001  const constants_MAX_ZOOM = 300;
4002  const constants_POPOVER_PROPS = {
4003    position: 'bottom right',
4004    isAlternate: true
4005  };
4006  
4007  // EXTERNAL MODULE: external ["wp","apiFetch"]
4008  var external_wp_apiFetch_ = __webpack_require__("ywyh");
4009  var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_);
4010  
4011  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-editing/use-save-image.js
4012  /**
4013   * WordPress dependencies
4014   */
4015  
4016  
4017  
4018  
4019  
4020  function useSaveImage({
4021    crop,
4022    rotation,
4023    height,
4024    width,
4025    aspect,
4026    url,
4027    id,
4028    onSaveImage,
4029    onFinishEditing
4030  }) {
4031    const {
4032      createErrorNotice
4033    } = Object(external_wp_data_["useDispatch"])(external_wp_notices_["store"]);
4034    const [isInProgress, setIsInProgress] = Object(external_wp_element_["useState"])(false);
4035    const cancel = Object(external_wp_element_["useCallback"])(() => {
4036      setIsInProgress(false);
4037      onFinishEditing();
4038    }, [setIsInProgress, onFinishEditing]);
4039    const apply = Object(external_wp_element_["useCallback"])(() => {
4040      setIsInProgress(true);
4041      let attrs = {}; // The crop script may return some very small, sub-pixel values when the image was not cropped.
4042      // Crop only when the new size has changed by more than 0.1%.
4043  
4044      if (crop.width < 99.9 || crop.height < 99.9) {
4045        attrs = crop;
4046      }
4047  
4048      if (rotation > 0) {
4049        attrs.rotation = rotation;
4050      }
4051  
4052      attrs.src = url;
4053      external_wp_apiFetch_default()({
4054        path: `/wp/v2/media/$id}/edit`,
4055        method: 'POST',
4056        data: attrs
4057      }).then(response => {
4058        onSaveImage({
4059          id: response.id,
4060          url: response.source_url,
4061          height: height && width ? width / aspect : undefined
4062        });
4063      }).catch(error => {
4064        createErrorNotice(Object(external_wp_i18n_["sprintf"])(
4065        /* translators: 1. Error message */
4066        Object(external_wp_i18n_["__"])('Could not edit image. %s'), error.message), {
4067          id: 'image-editing-error',
4068          type: 'snackbar'
4069        });
4070      }).finally(() => {
4071        setIsInProgress(false);
4072        onFinishEditing();
4073      });
4074    }, [setIsInProgress, crop, rotation, height, width, aspect, url, onSaveImage, createErrorNotice, setIsInProgress, onFinishEditing]);
4075    return Object(external_wp_element_["useMemo"])(() => ({
4076      isInProgress,
4077      apply,
4078      cancel
4079    }), [isInProgress, apply, cancel]);
4080  }
4081  
4082  // EXTERNAL MODULE: external ["wp","hooks"]
4083  var external_wp_hooks_ = __webpack_require__("g56x");
4084  
4085  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-editing/use-transform-image.js
4086  /**
4087   * WordPress dependencies
4088   */
4089  
4090  
4091  
4092  function useTransformState({
4093    url,
4094    naturalWidth,
4095    naturalHeight
4096  }) {
4097    const [editedUrl, setEditedUrl] = Object(external_wp_element_["useState"])();
4098    const [crop, setCrop] = Object(external_wp_element_["useState"])();
4099    const [position, setPosition] = Object(external_wp_element_["useState"])({
4100      x: 0,
4101      y: 0
4102    });
4103    const [zoom, setZoom] = Object(external_wp_element_["useState"])();
4104    const [rotation, setRotation] = Object(external_wp_element_["useState"])();
4105    const [aspect, setAspect] = Object(external_wp_element_["useState"])();
4106    const [defaultAspect, setDefaultAspect] = Object(external_wp_element_["useState"])();
4107    const initializeTransformValues = Object(external_wp_element_["useCallback"])(() => {
4108      setPosition({
4109        x: 0,
4110        y: 0
4111      });
4112      setZoom(100);
4113      setRotation(0);
4114      setAspect(naturalWidth / naturalHeight);
4115      setDefaultAspect(naturalWidth / naturalHeight);
4116    }, [naturalWidth, naturalHeight, setPosition, setZoom, setRotation, setAspect, setDefaultAspect]);
4117    const rotateClockwise = Object(external_wp_element_["useCallback"])(() => {
4118      const angle = (rotation + 90) % 360;
4119      let naturalAspectRatio = naturalWidth / naturalHeight;
4120  
4121      if (rotation % 180 === 90) {
4122        naturalAspectRatio = naturalHeight / naturalWidth;
4123      }
4124  
4125      if (angle === 0) {
4126        setEditedUrl();
4127        setRotation(angle);
4128        setAspect(1 / aspect);
4129        setPosition({
4130          x: -(position.y * naturalAspectRatio),
4131          y: position.x * naturalAspectRatio
4132        });
4133        return;
4134      }
4135  
4136      function editImage(event) {
4137        const canvas = document.createElement('canvas');
4138        let translateX = 0;
4139        let translateY = 0;
4140  
4141        if (angle % 180) {
4142          canvas.width = event.target.height;
4143          canvas.height = event.target.width;
4144        } else {
4145          canvas.width = event.target.width;
4146          canvas.height = event.target.height;
4147        }
4148  
4149        if (angle === 90 || angle === 180) {
4150          translateX = canvas.width;
4151        }
4152  
4153        if (angle === 270 || angle === 180) {
4154          translateY = canvas.height;
4155        }
4156  
4157        const context = canvas.getContext('2d');
4158        context.translate(translateX, translateY);
4159        context.rotate(angle * Math.PI / 180);
4160        context.drawImage(event.target, 0, 0);
4161        canvas.toBlob(blob => {
4162          setEditedUrl(URL.createObjectURL(blob));
4163          setRotation(angle);
4164          setAspect(1 / aspect);
4165          setPosition({
4166            x: -(position.y * naturalAspectRatio),
4167            y: position.x * naturalAspectRatio
4168          });
4169        });
4170      }
4171  
4172      const el = new window.Image();
4173      el.src = url;
4174      el.onload = editImage;
4175      const imgCrossOrigin = Object(external_wp_hooks_["applyFilters"])('media.crossOrigin', undefined, url);
4176  
4177      if (typeof imgCrossOrigin === 'string') {
4178        el.crossOrigin = imgCrossOrigin;
4179      }
4180    }, [rotation, naturalWidth, naturalHeight, setEditedUrl, setRotation, setAspect, setPosition]);
4181    return Object(external_wp_element_["useMemo"])(() => ({
4182      editedUrl,
4183      setEditedUrl,
4184      crop,
4185      setCrop,
4186      position,
4187      setPosition,
4188      zoom,
4189      setZoom,
4190      rotation,
4191      setRotation,
4192      rotateClockwise,
4193      aspect,
4194      setAspect,
4195      defaultAspect,
4196      initializeTransformValues
4197    }), [editedUrl, setEditedUrl, crop, setCrop, position, setPosition, zoom, setZoom, rotation, setRotation, rotateClockwise, aspect, setAspect, defaultAspect, initializeTransformValues]);
4198  }
4199  
4200  function useTransformImage(imageProperties, isEditing) {
4201    const transformState = useTransformState(imageProperties);
4202    const {
4203      initializeTransformValues
4204    } = transformState;
4205    Object(external_wp_element_["useEffect"])(() => {
4206      if (isEditing) {
4207        initializeTransformValues();
4208      }
4209    }, [isEditing, initializeTransformValues]);
4210    return transformState;
4211  }
4212  
4213  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-editing/context.js
4214  
4215  
4216  /**
4217   * WordPress dependencies
4218   */
4219  
4220  /**
4221   * Internal dependencies
4222   */
4223  
4224  
4225  
4226  const ImageEditingContext = Object(external_wp_element_["createContext"])({});
4227  const useImageEditingContext = () => Object(external_wp_element_["useContext"])(ImageEditingContext);
4228  function ImageEditingProvider({
4229    id,
4230    url,
4231    naturalWidth,
4232    naturalHeight,
4233    isEditing,
4234    onFinishEditing,
4235    onSaveImage,
4236    children
4237  }) {
4238    const transformImage = useTransformImage({
4239      url,
4240      naturalWidth,
4241      naturalHeight
4242    }, isEditing);
4243    const saveImage = useSaveImage({
4244      id,
4245      url,
4246      onSaveImage,
4247      onFinishEditing,
4248      ...transformImage
4249    });
4250    const providerValue = Object(external_wp_element_["useMemo"])(() => ({ ...transformImage,
4251      ...saveImage
4252    }), [transformImage, saveImage]);
4253    return Object(external_wp_element_["createElement"])(ImageEditingContext.Provider, {
4254      value: providerValue
4255    }, children);
4256  }
4257  
4258  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-editing/cropper.js
4259  
4260  
4261  /**
4262   * External dependencies
4263   */
4264  
4265  
4266  /**
4267   * WordPress dependencies
4268   */
4269  
4270  
4271  /**
4272   * Internal dependencies
4273   */
4274  
4275  
4276  
4277  function ImageCropper({
4278    url,
4279    width,
4280    height,
4281    clientWidth,
4282    naturalHeight,
4283    naturalWidth
4284  }) {
4285    const {
4286      isInProgress,
4287      editedUrl,
4288      position,
4289      zoom,
4290      aspect,
4291      setPosition,
4292      setCrop,
4293      setZoom,
4294      rotation
4295    } = useImageEditingContext();
4296    let editedHeight = height || clientWidth * naturalHeight / naturalWidth;
4297  
4298    if (rotation % 180 === 90) {
4299      editedHeight = clientWidth * naturalWidth / naturalHeight;
4300    }
4301  
4302    return Object(external_wp_element_["createElement"])("div", {
4303      className: classnames_default()('wp-block-image__crop-area', {
4304        'is-applying': isInProgress
4305      }),
4306      style: {
4307        width: width || clientWidth,
4308        height: editedHeight
4309      }
4310    }, Object(external_wp_element_["createElement"])(index_module, {
4311      image: editedUrl || url,
4312      disabled: isInProgress,
4313      minZoom: constants_MIN_ZOOM / 100,
4314      maxZoom: constants_MAX_ZOOM / 100,
4315      crop: position,
4316      zoom: zoom / 100,
4317      aspect: aspect,
4318      onCropChange: setPosition,
4319      onCropComplete: newCropPercent => {
4320        setCrop(newCropPercent);
4321      },
4322      onZoomChange: newZoom => {
4323        setZoom(newZoom * 100);
4324      }
4325    }), isInProgress && Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null));
4326  }
4327  
4328  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/search.js
4329  var library_search = __webpack_require__("cGtP");
4330  
4331  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-editing/zoom-dropdown.js
4332  
4333  
4334  /**
4335   * WordPress dependencies
4336   */
4337  
4338  
4339  
4340  /**
4341   * Internal dependencies
4342   */
4343  
4344  
4345  
4346  function ZoomDropdown() {
4347    const {
4348      isInProgress,
4349      zoom,
4350      setZoom
4351    } = useImageEditingContext();
4352    return Object(external_wp_element_["createElement"])(external_wp_components_["Dropdown"], {
4353      contentClassName: "wp-block-image__zoom",
4354      popoverProps: constants_POPOVER_PROPS,
4355      renderToggle: ({
4356        isOpen,
4357        onToggle
4358      }) => Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
4359        icon: library_search["a" /* default */],
4360        label: Object(external_wp_i18n_["__"])('Zoom'),
4361        onClick: onToggle,
4362        "aria-expanded": isOpen,
4363        disabled: isInProgress
4364      }),
4365      renderContent: () => Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], {
4366        label: Object(external_wp_i18n_["__"])('Zoom'),
4367        min: constants_MIN_ZOOM,
4368        max: constants_MAX_ZOOM,
4369        value: Math.round(zoom),
4370        onChange: setZoom
4371      })
4372    });
4373  }
4374  
4375  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/check.js
4376  var check = __webpack_require__("RMJe");
4377  
4378  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/aspect-ratio.js
4379  
4380  
4381  /**
4382   * WordPress dependencies
4383   */
4384  
4385  const aspect_ratio_aspectRatio = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
4386    xmlns: "http://www.w3.org/2000/svg",
4387    viewBox: "0 0 24 24"
4388  }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
4389    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"
4390  }));
4391  /* harmony default export */ var aspect_ratio = (aspect_ratio_aspectRatio);
4392  
4393  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-editing/aspect-ratio-dropdown.js
4394  
4395  
4396  /**
4397   * WordPress dependencies
4398   */
4399  
4400  
4401  
4402  /**
4403   * Internal dependencies
4404   */
4405  
4406  
4407  
4408  
4409  function AspectGroup({
4410    aspectRatios,
4411    isDisabled,
4412    label,
4413    onClick,
4414    value
4415  }) {
4416    return Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], {
4417      label: label
4418    }, aspectRatios.map(({
4419      title,
4420      aspect
4421    }) => Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], {
4422      key: aspect,
4423      disabled: isDisabled,
4424      onClick: () => {
4425        onClick(aspect);
4426      },
4427      role: "menuitemradio",
4428      isSelected: aspect === value,
4429      icon: aspect === value ? check["a" /* default */] : undefined
4430    }, title)));
4431  }
4432  
4433  function AspectRatioDropdown({
4434    toggleProps
4435  }) {
4436    const {
4437      isInProgress,
4438      aspect,
4439      setAspect,
4440      defaultAspect
4441    } = useImageEditingContext();
4442    return Object(external_wp_element_["createElement"])(external_wp_components_["DropdownMenu"], {
4443      icon: aspect_ratio,
4444      label: Object(external_wp_i18n_["__"])('Aspect Ratio'),
4445      popoverProps: constants_POPOVER_PROPS,
4446      toggleProps: toggleProps,
4447      className: "wp-block-image__aspect-ratio"
4448    }, ({
4449      onClose
4450    }) => Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(AspectGroup, {
4451      isDisabled: isInProgress,
4452      onClick: newAspect => {
4453        setAspect(newAspect);
4454        onClose();
4455      },
4456      value: aspect,
4457      aspectRatios: [{
4458        title: Object(external_wp_i18n_["__"])('Original'),
4459        aspect: defaultAspect
4460      }, {
4461        title: Object(external_wp_i18n_["__"])('Square'),
4462        aspect: 1
4463      }]
4464    }), Object(external_wp_element_["createElement"])(AspectGroup, {
4465      label: Object(external_wp_i18n_["__"])('Landscape'),
4466      isDisabled: isInProgress,
4467      onClick: newAspect => {
4468        setAspect(newAspect);
4469        onClose();
4470      },
4471      value: aspect,
4472      aspectRatios: [{
4473        title: Object(external_wp_i18n_["__"])('16:10'),
4474        aspect: 16 / 10
4475      }, {
4476        title: Object(external_wp_i18n_["__"])('16:9'),
4477        aspect: 16 / 9
4478      }, {
4479        title: Object(external_wp_i18n_["__"])('4:3'),
4480        aspect: 4 / 3
4481      }, {
4482        title: Object(external_wp_i18n_["__"])('3:2'),
4483        aspect: 3 / 2
4484      }]
4485    }), Object(external_wp_element_["createElement"])(AspectGroup, {
4486      label: Object(external_wp_i18n_["__"])('Portrait'),
4487      isDisabled: isInProgress,
4488      onClick: newAspect => {
4489        setAspect(newAspect);
4490        onClose();
4491      },
4492      value: aspect,
4493      aspectRatios: [{
4494        title: Object(external_wp_i18n_["__"])('10:16'),
4495        aspect: 10 / 16
4496      }, {
4497        title: Object(external_wp_i18n_["__"])('9:16'),
4498        aspect: 9 / 16
4499      }, {
4500        title: Object(external_wp_i18n_["__"])('3:4'),
4501        aspect: 3 / 4
4502      }, {
4503        title: Object(external_wp_i18n_["__"])('2:3'),
4504        aspect: 2 / 3
4505      }]
4506    })));
4507  }
4508  
4509  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/rotate-right.js
4510  
4511  
4512  /**
4513   * WordPress dependencies
4514   */
4515  
4516  const rotateRight = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
4517    xmlns: "http://www.w3.org/2000/svg",
4518    viewBox: "0 0 24 24"
4519  }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
4520    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"
4521  }));
4522  /* harmony default export */ var rotate_right = (rotateRight);
4523  
4524  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-editing/rotation-button.js
4525  
4526  
4527  /**
4528   * WordPress dependencies
4529   */
4530  
4531  
4532  
4533  /**
4534   * Internal dependencies
4535   */
4536  
4537  
4538  function RotationButton() {
4539    const {
4540      isInProgress,
4541      rotateClockwise
4542    } = useImageEditingContext();
4543    return Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
4544      icon: rotate_right,
4545      label: Object(external_wp_i18n_["__"])('Rotate'),
4546      onClick: rotateClockwise,
4547      disabled: isInProgress
4548    });
4549  }
4550  
4551  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-editing/form-controls.js
4552  
4553  
4554  /**
4555   * WordPress dependencies
4556   */
4557  
4558  
4559  /**
4560   * Internal dependencies
4561   */
4562  
4563  
4564  function FormControls() {
4565    const {
4566      isInProgress,
4567      apply,
4568      cancel
4569    } = useImageEditingContext();
4570    return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
4571      onClick: apply,
4572      disabled: isInProgress
4573    }, Object(external_wp_i18n_["__"])('Apply')), Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
4574      onClick: cancel
4575    }, Object(external_wp_i18n_["__"])('Cancel')));
4576  }
4577  
4578  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-editing/index.js
4579  
4580  
4581  /**
4582   * WordPress dependencies
4583   */
4584  
4585  
4586  /**
4587   * Internal dependencies
4588   */
4589  
4590  
4591  
4592  
4593  
4594  
4595  function ImageEditor({
4596    url,
4597    width,
4598    height,
4599    clientWidth,
4600    naturalHeight,
4601    naturalWidth
4602  }) {
4603    return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(ImageCropper, {
4604      url: url,
4605      width: width,
4606      height: height,
4607      clientWidth: clientWidth,
4608      naturalHeight: naturalHeight,
4609      naturalWidth: naturalWidth
4610    }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, Object(external_wp_element_["createElement"])(ZoomDropdown, null), Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarItem"], null, toggleProps => Object(external_wp_element_["createElement"])(AspectRatioDropdown, {
4611      toggleProps: toggleProps
4612    })), Object(external_wp_element_["createElement"])(RotationButton, null)), Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, Object(external_wp_element_["createElement"])(FormControls, null))));
4613  }
4614  
4615  
4616  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/constants.js
4617  const MIN_SIZE = 20;
4618  const LINK_DESTINATION_NONE = 'none';
4619  const LINK_DESTINATION_MEDIA = 'media';
4620  const LINK_DESTINATION_ATTACHMENT = 'attachment';
4621  const LINK_DESTINATION_CUSTOM = 'custom';
4622  const NEW_TAB_REL = ['noreferrer', 'noopener'];
4623  const ALLOWED_MEDIA_TYPES = ['image'];
4624  
4625  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image.js
4626  
4627  
4628  /**
4629   * External dependencies
4630   */
4631  
4632  /**
4633   * WordPress dependencies
4634   */
4635  
4636  
4637  
4638  
4639  
4640  
4641  
4642  
4643  
4644  
4645  
4646  
4647  
4648  /**
4649   * Internal dependencies
4650   */
4651  
4652  
4653  
4654  
4655  
4656  /**
4657   * Module constants
4658   */
4659  
4660  
4661  
4662  function getFilename(url) {
4663    const path = Object(external_wp_url_["getPath"])(url);
4664  
4665    if (path) {
4666      return Object(external_lodash_["last"])(path.split('/'));
4667    }
4668  }
4669  
4670  function Image({
4671    temporaryURL,
4672    attributes: {
4673      url = '',
4674      alt,
4675      caption,
4676      align,
4677      id,
4678      href,
4679      rel,
4680      linkClass,
4681      linkDestination,
4682      title,
4683      width,
4684      height,
4685      linkTarget,
4686      sizeSlug
4687    },
4688    setAttributes,
4689    isSelected,
4690    insertBlocksAfter,
4691    onReplace,
4692    onSelectImage,
4693    onSelectURL,
4694    onUploadError,
4695    containerRef,
4696    clientId
4697  }) {
4698    const captionRef = Object(external_wp_element_["useRef"])();
4699    const prevUrl = Object(external_wp_compose_["usePrevious"])(url);
4700    const {
4701      getBlock
4702    } = Object(external_wp_data_["useSelect"])(external_wp_blockEditor_["store"]);
4703    const {
4704      image,
4705      multiImageSelection
4706    } = Object(external_wp_data_["useSelect"])(select => {
4707      const {
4708        getMedia
4709      } = select(external_wp_coreData_["store"]);
4710      const {
4711        getMultiSelectedBlockClientIds,
4712        getBlockName
4713      } = select(external_wp_blockEditor_["store"]);
4714      const multiSelectedClientIds = getMultiSelectedBlockClientIds();
4715      return {
4716        image: id && isSelected ? getMedia(id) : null,
4717        multiImageSelection: multiSelectedClientIds.length && multiSelectedClientIds.every(_clientId => getBlockName(_clientId) === 'core/image')
4718      };
4719    }, [id, isSelected]);
4720    const {
4721      imageEditing,
4722      imageSizes,
4723      maxWidth,
4724      mediaUpload
4725    } = Object(external_wp_data_["useSelect"])(select => {
4726      const {
4727        getSettings
4728      } = select(external_wp_blockEditor_["store"]);
4729      return Object(external_lodash_["pick"])(getSettings(), ['imageEditing', 'imageSizes', 'maxWidth', 'mediaUpload']);
4730    });
4731    const {
4732      replaceBlocks,
4733      toggleSelection
4734    } = Object(external_wp_data_["useDispatch"])(external_wp_blockEditor_["store"]);
4735    const {
4736      createErrorNotice,
4737      createSuccessNotice
4738    } = Object(external_wp_data_["useDispatch"])(external_wp_notices_["store"]);
4739    const isLargeViewport = Object(external_wp_compose_["useViewportMatch"])('medium');
4740    const isWideAligned = Object(external_lodash_["includes"])(['wide', 'full'], align);
4741    const [{
4742      naturalWidth,
4743      naturalHeight
4744    }, setNaturalSize] = Object(external_wp_element_["useState"])({});
4745    const [isEditingImage, setIsEditingImage] = Object(external_wp_element_["useState"])(false);
4746    const [externalBlob, setExternalBlob] = Object(external_wp_element_["useState"])();
4747    const clientWidth = useClientWidth(containerRef, [align]);
4748    const isResizable = !isWideAligned && isLargeViewport;
4749    const imageSizeOptions = Object(external_lodash_["map"])(Object(external_lodash_["filter"])(imageSizes, ({
4750      slug
4751    }) => Object(external_lodash_["get"])(image, ['media_details', 'sizes', slug, 'source_url'])), ({
4752      name,
4753      slug
4754    }) => ({
4755      value: slug,
4756      label: name
4757    })); // Check if the cover block is registered.
4758  
4759    const coverBlockExists = !!Object(external_wp_blocks_["getBlockType"])('core/cover'); // If an image is externally hosted, try to fetch the image data. This may
4760    // fail if the image host doesn't allow CORS with the domain. If it works,
4761    // we can enable a button in the toolbar to upload the image.
4762  
4763    Object(external_wp_element_["useEffect"])(() => {
4764      if (!isExternalImage(id, url) || !isSelected || externalBlob) {
4765        return;
4766      }
4767  
4768      window.fetch(url).then(response => response.blob()).then(blob => setExternalBlob(blob));
4769    }, [id, url, isSelected, externalBlob]); // Focus the caption after inserting an image from the placeholder. This is
4770    // done to preserve the behaviour of focussing the first tabbable element
4771    // when a block is mounted. Previously, the image block would remount when
4772    // the placeholder is removed. Maybe this behaviour could be removed.
4773  
4774    Object(external_wp_element_["useEffect"])(() => {
4775      if (url && !prevUrl && isSelected) {
4776        captionRef.current.focus();
4777      }
4778    }, [url, prevUrl]);
4779  
4780    function onResizeStart() {
4781      toggleSelection(false);
4782    }
4783  
4784    function onResizeStop() {
4785      toggleSelection(true);
4786    }
4787  
4788    function onImageError() {
4789      // Check if there's an embed block that handles this URL.
4790      const embedBlock = createUpgradedEmbedBlock({
4791        attributes: {
4792          url
4793        }
4794      });
4795  
4796      if (undefined !== embedBlock) {
4797        onReplace(embedBlock);
4798      }
4799    }
4800  
4801    function onSetHref(props) {
4802      setAttributes(props);
4803    }
4804  
4805    function onSetTitle(value) {
4806      // This is the HTML title attribute, separate from the media object
4807      // title.
4808      setAttributes({
4809        title: value
4810      });
4811    }
4812  
4813    function updateAlt(newAlt) {
4814      setAttributes({
4815        alt: newAlt
4816      });
4817    }
4818  
4819    function updateImage(newSizeSlug) {
4820      const newUrl = Object(external_lodash_["get"])(image, ['media_details', 'sizes', newSizeSlug, 'source_url']);
4821  
4822      if (!newUrl) {
4823        return null;
4824      }
4825  
4826      setAttributes({
4827        url: newUrl,
4828        width: undefined,
4829        height: undefined,
4830        sizeSlug: newSizeSlug
4831      });
4832    }
4833  
4834    function uploadExternal() {
4835      mediaUpload({
4836        filesList: [externalBlob],
4837  
4838        onFileChange([img]) {
4839          onSelectImage(img);
4840  
4841          if (Object(external_wp_blob_["isBlobURL"])(img.url)) {
4842            return;
4843          }
4844  
4845          setExternalBlob();
4846          createSuccessNotice(Object(external_wp_i18n_["__"])('Image uploaded.'), {
4847            type: 'snackbar'
4848          });
4849        },
4850  
4851        allowedTypes: ALLOWED_MEDIA_TYPES,
4852  
4853        onError(message) {
4854          createErrorNotice(message, {
4855            type: 'snackbar'
4856          });
4857        }
4858  
4859      });
4860    }
4861  
4862    function updateAlignment(nextAlign) {
4863      const extraUpdatedAttributes = ['wide', 'full'].includes(nextAlign) ? {
4864        width: undefined,
4865        height: undefined
4866      } : {};
4867      setAttributes({ ...extraUpdatedAttributes,
4868        align: nextAlign
4869      });
4870    }
4871  
4872    Object(external_wp_element_["useEffect"])(() => {
4873      if (!isSelected) {
4874        setIsEditingImage(false);
4875      }
4876    }, [isSelected]);
4877    const canEditImage = id && naturalWidth && naturalHeight && imageEditing;
4878    const allowCrop = !multiImageSelection && canEditImage && !isEditingImage;
4879  
4880    function switchToCover() {
4881      replaceBlocks(clientId, Object(external_wp_blocks_["switchToBlockType"])(getBlock(clientId), 'core/cover'));
4882    }
4883  
4884    const controls = Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
4885      group: "block"
4886    }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockAlignmentControl"], {
4887      value: align,
4888      onChange: updateAlignment
4889    }), !multiImageSelection && !isEditingImage && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalImageURLInputUI"], {
4890      url: href || '',
4891      onChangeUrl: onSetHref,
4892      linkDestination: linkDestination,
4893      mediaUrl: image && image.source_url || url,
4894      mediaLink: image && image.link,
4895      linkTarget: linkTarget,
4896      linkClass: linkClass,
4897      rel: rel
4898    }), allowCrop && Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
4899      onClick: () => setIsEditingImage(true),
4900      icon: library_crop,
4901      label: Object(external_wp_i18n_["__"])('Crop')
4902    }), externalBlob && Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
4903      onClick: uploadExternal,
4904      icon: upload["a" /* default */],
4905      label: Object(external_wp_i18n_["__"])('Upload external image')
4906    }), !multiImageSelection && coverBlockExists && Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
4907      icon: overlay_text,
4908      label: Object(external_wp_i18n_["__"])('Add text over image'),
4909      onClick: switchToCover
4910    })), !multiImageSelection && !isEditingImage && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
4911      group: "other"
4912    }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaReplaceFlow"], {
4913      mediaId: id,
4914      mediaURL: url,
4915      allowedTypes: ALLOWED_MEDIA_TYPES,
4916      accept: "image/*",
4917      onSelect: onSelectImage,
4918      onSelectURL: onSelectURL,
4919      onError: onUploadError
4920    })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
4921      title: Object(external_wp_i18n_["__"])('Image settings')
4922    }, !multiImageSelection && Object(external_wp_element_["createElement"])(external_wp_components_["TextareaControl"], {
4923      label: Object(external_wp_i18n_["__"])('Alt text (alternative text)'),
4924      value: alt,
4925      onChange: updateAlt,
4926      help: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ExternalLink"], {
4927        href: "https://www.w3.org/WAI/tutorials/images/decision-tree"
4928      }, Object(external_wp_i18n_["__"])('Describe the purpose of the image')), Object(external_wp_i18n_["__"])('Leave empty if the image is purely decorative.'))
4929    }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalImageSizeControl"], {
4930      onChangeImage: updateImage,
4931      onChange: value => setAttributes(value),
4932      slug: sizeSlug,
4933      width: width,
4934      height: height,
4935      imageSizeOptions: imageSizeOptions,
4936      isResizable: isResizable,
4937      imageWidth: naturalWidth,
4938      imageHeight: naturalHeight
4939    }))), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorAdvancedControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], {
4940      label: Object(external_wp_i18n_["__"])('Title attribute'),
4941      value: title || '',
4942      onChange: onSetTitle,
4943      help: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_i18n_["__"])('Describe the role of this image on the page.'), Object(external_wp_element_["createElement"])(external_wp_components_["ExternalLink"], {
4944        href: "https://www.w3.org/TR/html52/dom.html#the-title-attribute"
4945      }, Object(external_wp_i18n_["__"])('(Note: many devices and browsers do not display this text.)')))
4946    })));
4947    const filename = getFilename(url);
4948    let defaultedAlt;
4949  
4950    if (alt) {
4951      defaultedAlt = alt;
4952    } else if (filename) {
4953      defaultedAlt = Object(external_wp_i18n_["sprintf"])(
4954      /* translators: %s: file name */
4955      Object(external_wp_i18n_["__"])('This image has an empty alt attribute; its file name is %s'), filename);
4956    } else {
4957      defaultedAlt = Object(external_wp_i18n_["__"])('This image has an empty alt attribute');
4958    }
4959  
4960    let img = // Disable reason: Image itself is not meant to be interactive, but
4961    // should direct focus to block.
4962  
4963    /* eslint-disable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */
4964    Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("img", {
4965      src: temporaryURL || url,
4966      alt: defaultedAlt,
4967      onError: () => onImageError(),
4968      onLoad: event => {
4969        setNaturalSize(Object(external_lodash_["pick"])(event.target, ['naturalWidth', 'naturalHeight']));
4970      }
4971    }), temporaryURL && Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null))
4972    /* eslint-enable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */
4973    ;
4974    let imageWidthWithinContainer;
4975    let imageHeightWithinContainer;
4976  
4977    if (clientWidth && naturalWidth && naturalHeight) {
4978      const exceedMaxWidth = naturalWidth > clientWidth;
4979      const ratio = naturalHeight / naturalWidth;
4980      imageWidthWithinContainer = exceedMaxWidth ? clientWidth : naturalWidth;
4981      imageHeightWithinContainer = exceedMaxWidth ? clientWidth * ratio : naturalHeight;
4982    }
4983  
4984    if (canEditImage && isEditingImage) {
4985      img = Object(external_wp_element_["createElement"])(ImageEditor, {
4986        url: url,
4987        width: width,
4988        height: height,
4989        clientWidth: clientWidth,
4990        naturalHeight: naturalHeight,
4991        naturalWidth: naturalWidth
4992      });
4993    } else if (!isResizable || !imageWidthWithinContainer) {
4994      img = Object(external_wp_element_["createElement"])("div", {
4995        style: {
4996          width,
4997          height
4998        }
4999      }, img);
5000    } else {
5001      const currentWidth = width || imageWidthWithinContainer;
5002      const currentHeight = height || imageHeightWithinContainer;
5003      const ratio = naturalWidth / naturalHeight;
5004      const minWidth = naturalWidth < naturalHeight ? MIN_SIZE : MIN_SIZE * ratio;
5005      const minHeight = naturalHeight < naturalWidth ? MIN_SIZE : MIN_SIZE / ratio; // With the current implementation of ResizableBox, an image needs an
5006      // explicit pixel value for the max-width. In absence of being able to
5007      // set the content-width, this max-width is currently dictated by the
5008      // vanilla editor style. The following variable adds a buffer to this
5009      // vanilla style, so 3rd party themes have some wiggleroom. This does,
5010      // in most cases, allow you to scale the image beyond the width of the
5011      // main column, though not infinitely.
5012      // @todo It would be good to revisit this once a content-width variable
5013      // becomes available.
5014  
5015      const maxWidthBuffer = maxWidth * 2.5;
5016      let showRightHandle = false;
5017      let showLeftHandle = false;
5018      /* eslint-disable no-lonely-if */
5019      // See https://github.com/WordPress/gutenberg/issues/7584.
5020  
5021      if (align === 'center') {
5022        // When the image is centered, show both handles.
5023        showRightHandle = true;
5024        showLeftHandle = true;
5025      } else if (Object(external_wp_i18n_["isRTL"])()) {
5026        // In RTL mode the image is on the right by default.
5027        // Show the right handle and hide the left handle only when it is
5028        // aligned left. Otherwise always show the left handle.
5029        if (align === 'left') {
5030          showRightHandle = true;
5031        } else {
5032          showLeftHandle = true;
5033        }
5034      } else {
5035        // Show the left handle and hide the right handle only when the
5036        // image is aligned right. Otherwise always show the right handle.
5037        if (align === 'right') {
5038          showLeftHandle = true;
5039        } else {
5040          showRightHandle = true;
5041        }
5042      }
5043      /* eslint-enable no-lonely-if */
5044  
5045  
5046      img = Object(external_wp_element_["createElement"])(external_wp_components_["ResizableBox"], {
5047        size: {
5048          width: width !== null && width !== void 0 ? width : 'auto',
5049          height: height !== null && height !== void 0 ? height : 'auto'
5050        },
5051        showHandle: isSelected,
5052        minWidth: minWidth,
5053        maxWidth: maxWidthBuffer,
5054        minHeight: minHeight,
5055        maxHeight: maxWidthBuffer / ratio,
5056        lockAspectRatio: true,
5057        enable: {
5058          top: false,
5059          right: showRightHandle,
5060          bottom: true,
5061          left: showLeftHandle
5062        },
5063        onResizeStart: onResizeStart,
5064        onResizeStop: (event, direction, elt, delta) => {
5065          onResizeStop();
5066          setAttributes({
5067            width: parseInt(currentWidth + delta.width, 10),
5068            height: parseInt(currentHeight + delta.height, 10)
5069          });
5070        }
5071      }, img);
5072    }
5073  
5074    return Object(external_wp_element_["createElement"])(ImageEditingProvider, {
5075      id: id,
5076      url: url,
5077      naturalWidth: naturalWidth,
5078      naturalHeight: naturalHeight,
5079      clientWidth: clientWidth,
5080      onSaveImage: imageAttributes => setAttributes(imageAttributes),
5081      isEditing: isEditingImage,
5082      onFinishEditing: () => setIsEditingImage(false)
5083    }, !temporaryURL && controls, img, (!external_wp_blockEditor_["RichText"].isEmpty(caption) || isSelected) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], {
5084      ref: captionRef,
5085      tagName: "figcaption",
5086      "aria-label": Object(external_wp_i18n_["__"])('Image caption text'),
5087      placeholder: Object(external_wp_i18n_["__"])('Add caption'),
5088      value: caption,
5089      onChange: value => setAttributes({
5090        caption: value
5091      }),
5092      inlineToolbar: true,
5093      __unstableOnSplitAtEnd: () => insertBlocksAfter(Object(external_wp_blocks_["createBlock"])('core/paragraph'))
5094    }));
5095  }
5096  
5097  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/edit.js
5098  
5099  
5100  /**
5101   * External dependencies
5102   */
5103  
5104  
5105  /**
5106   * WordPress dependencies
5107   */
5108  
5109  
5110  
5111  
5112  
5113  
5114  
5115  
5116  /* global wp */
5117  
5118  /**
5119   * Internal dependencies
5120   */
5121  
5122  
5123  /**
5124   * Module constants
5125   */
5126  
5127  
5128  const pickRelevantMediaFiles = (image, size) => {
5129    const imageProps = Object(external_lodash_["pick"])(image, ['alt', 'id', 'link', 'caption']);
5130    imageProps.url = Object(external_lodash_["get"])(image, ['sizes', size, 'url']) || Object(external_lodash_["get"])(image, ['media_details', 'sizes', size, 'source_url']) || image.url;
5131    return imageProps;
5132  };
5133  /**
5134   * Is the URL a temporary blob URL? A blob URL is one that is used temporarily
5135   * while the image is being uploaded and will not have an id yet allocated.
5136   *
5137   * @param {number=} id The id of the image.
5138   * @param {string=} url The url of the image.
5139   *
5140   * @return {boolean} Is the URL a Blob URL
5141   */
5142  
5143  const isTemporaryImage = (id, url) => !id && Object(external_wp_blob_["isBlobURL"])(url);
5144  /**
5145   * Is the url for the image hosted externally. An externally hosted image has no
5146   * id and is not a blob url.
5147   *
5148   * @param {number=} id  The id of the image.
5149   * @param {string=} url The url of the image.
5150   *
5151   * @return {boolean} Is the url an externally hosted url?
5152   */
5153  
5154  
5155  const isExternalImage = (id, url) => url && !id && !Object(external_wp_blob_["isBlobURL"])(url);
5156  function ImageEdit({
5157    attributes,
5158    setAttributes,
5159    isSelected,
5160    className,
5161    noticeUI,
5162    insertBlocksAfter,
5163    noticeOperations,
5164    onReplace,
5165    clientId
5166  }) {
5167    const {
5168      url = '',
5169      alt,
5170      caption,
5171      align,
5172      id,
5173      width,
5174      height,
5175      sizeSlug
5176    } = attributes;
5177    const [temporaryURL, setTemporaryURL] = Object(external_wp_element_["useState"])();
5178    const altRef = Object(external_wp_element_["useRef"])();
5179    Object(external_wp_element_["useEffect"])(() => {
5180      altRef.current = alt;
5181    }, [alt]);
5182    const captionRef = Object(external_wp_element_["useRef"])();
5183    Object(external_wp_element_["useEffect"])(() => {
5184      captionRef.current = caption;
5185    }, [caption]);
5186    const ref = Object(external_wp_element_["useRef"])();
5187    const {
5188      imageDefaultSize,
5189      mediaUpload
5190    } = Object(external_wp_data_["useSelect"])(select => {
5191      const {
5192        getSettings
5193      } = select(external_wp_blockEditor_["store"]);
5194      return Object(external_lodash_["pick"])(getSettings(), ['imageDefaultSize', 'mediaUpload']);
5195    }, []);
5196  
5197    function onUploadError(message) {
5198      noticeOperations.removeAllNotices();
5199      noticeOperations.createErrorNotice(message);
5200    }
5201  
5202    function onSelectImage(media) {
5203      var _wp, _wp$media, _wp$media$view, _wp$media$view$settin, _wp$media$view$settin2;
5204  
5205      if (!media || !media.url) {
5206        setAttributes({
5207          url: undefined,
5208          alt: undefined,
5209          id: undefined,
5210          title: undefined,
5211          caption: undefined
5212        });
5213        return;
5214      }
5215  
5216      if (Object(external_wp_blob_["isBlobURL"])(media.url)) {
5217        setTemporaryURL(media.url);
5218        return;
5219      }
5220  
5221      setTemporaryURL();
5222      let mediaAttributes = pickRelevantMediaFiles(media, imageDefaultSize); // If a caption text was meanwhile written by the user,
5223      // make sure the text is not overwritten by empty captions.
5224  
5225      if (captionRef.current && !Object(external_lodash_["get"])(mediaAttributes, ['caption'])) {
5226        mediaAttributes = Object(external_lodash_["omit"])(mediaAttributes, ['caption']);
5227      }
5228  
5229      let additionalAttributes; // Reset the dimension attributes if changing to a different image.
5230  
5231      if (!media.id || media.id !== id) {
5232        additionalAttributes = {
5233          width: undefined,
5234          height: undefined,
5235          sizeSlug: imageDefaultSize
5236        };
5237      } else {
5238        // Keep the same url when selecting the same file, so "Image Size"
5239        // option is not changed.
5240        additionalAttributes = {
5241          url
5242        };
5243      } // Check if default link setting should be used.
5244  
5245  
5246      let linkDestination = attributes.linkDestination;
5247  
5248      if (!linkDestination) {
5249        // Use the WordPress option to determine the proper default.
5250        // The constants used in Gutenberg do not match WP options so a little more complicated than ideal.
5251        // TODO: fix this in a follow up PR, requires updating media-text and ui component.
5252        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) {
5253          case 'file':
5254          case LINK_DESTINATION_MEDIA:
5255            linkDestination = LINK_DESTINATION_MEDIA;
5256            break;
5257  
5258          case 'post':
5259          case LINK_DESTINATION_ATTACHMENT:
5260            linkDestination = LINK_DESTINATION_ATTACHMENT;
5261            break;
5262  
5263          case LINK_DESTINATION_CUSTOM:
5264            linkDestination = LINK_DESTINATION_CUSTOM;
5265            break;
5266  
5267          case LINK_DESTINATION_NONE:
5268            linkDestination = LINK_DESTINATION_NONE;
5269            break;
5270        }
5271      } // Check if the image is linked to it's media.
5272  
5273  
5274      let href;
5275  
5276      switch (linkDestination) {
5277        case LINK_DESTINATION_MEDIA:
5278          href = media.url;
5279          break;
5280  
5281        case LINK_DESTINATION_ATTACHMENT:
5282          href = media.link;
5283          break;
5284      }
5285  
5286      mediaAttributes.href = href;
5287      setAttributes({ ...mediaAttributes,
5288        ...additionalAttributes,
5289        linkDestination
5290      });
5291    }
5292  
5293    function onSelectURL(newURL) {
5294      if (newURL !== url) {
5295        setAttributes({
5296          url: newURL,
5297          id: undefined,
5298          width: undefined,
5299          height: undefined,
5300          sizeSlug: imageDefaultSize
5301        });
5302      }
5303    }
5304  
5305    function updateAlignment(nextAlign) {
5306      const extraUpdatedAttributes = ['wide', 'full'].includes(nextAlign) ? {
5307        width: undefined,
5308        height: undefined
5309      } : {};
5310      setAttributes({ ...extraUpdatedAttributes,
5311        align: nextAlign
5312      });
5313    }
5314  
5315    const isTemp = isTemporaryImage(id, url); // Upload a temporary image on mount.
5316  
5317    Object(external_wp_element_["useEffect"])(() => {
5318      if (!isTemp) {
5319        return;
5320      }
5321  
5322      const file = Object(external_wp_blob_["getBlobByURL"])(url);
5323  
5324      if (file) {
5325        mediaUpload({
5326          filesList: [file],
5327          onFileChange: ([img]) => {
5328            onSelectImage(img);
5329          },
5330          allowedTypes: ALLOWED_MEDIA_TYPES,
5331          onError: message => {
5332            noticeOperations.createErrorNotice(message);
5333            setAttributes({
5334              src: undefined,
5335              id: undefined,
5336              url: undefined
5337            });
5338          }
5339        });
5340      }
5341    }, []); // If an image is temporary, revoke the Blob url when it is uploaded (and is
5342    // no longer temporary).
5343  
5344    Object(external_wp_element_["useEffect"])(() => {
5345      if (!temporaryURL) {
5346        return;
5347      }
5348  
5349      return () => {
5350        Object(external_wp_blob_["revokeBlobURL"])(temporaryURL);
5351      };
5352    }, [temporaryURL]);
5353    const isExternal = isExternalImage(id, url);
5354    const src = isExternal ? url : undefined;
5355    const mediaPreview = !!url && Object(external_wp_element_["createElement"])("img", {
5356      alt: Object(external_wp_i18n_["__"])('Edit image'),
5357      title: Object(external_wp_i18n_["__"])('Edit image'),
5358      className: 'edit-image-preview',
5359      src: url
5360    });
5361    const classes = classnames_default()(className, {
5362      'is-transient': temporaryURL,
5363      'is-resized': !!width || !!height,
5364      [`size-$sizeSlug}`]: sizeSlug
5365    });
5366    const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
5367      ref,
5368      className: classes
5369    });
5370    return Object(external_wp_element_["createElement"])("figure", blockProps, (temporaryURL || url) && Object(external_wp_element_["createElement"])(Image, {
5371      temporaryURL: temporaryURL,
5372      attributes: attributes,
5373      setAttributes: setAttributes,
5374      isSelected: isSelected,
5375      insertBlocksAfter: insertBlocksAfter,
5376      onReplace: onReplace,
5377      onSelectImage: onSelectImage,
5378      onSelectURL: onSelectURL,
5379      onUploadError: onUploadError,
5380      containerRef: ref,
5381      clientId: clientId
5382    }), !url && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
5383      group: "block"
5384    }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockAlignmentControl"], {
5385      value: align,
5386      onChange: updateAlignment
5387    })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaPlaceholder"], {
5388      icon: Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockIcon"], {
5389        icon: library_image
5390      }),
5391      onSelect: onSelectImage,
5392      onSelectURL: onSelectURL,
5393      notices: noticeUI,
5394      onError: onUploadError,
5395      accept: "image/*",
5396      allowedTypes: ALLOWED_MEDIA_TYPES,
5397      value: {
5398        id,
5399        src
5400      },
5401      mediaPreview: mediaPreview,
5402      disableMediaButtons: temporaryURL || url
5403    }));
5404  }
5405  /* harmony default export */ var image_edit = (Object(external_wp_components_["withNotices"])(ImageEdit));
5406  
5407  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/save.js
5408  
5409  
5410  /**
5411   * External dependencies
5412   */
5413  
5414  
5415  /**
5416   * WordPress dependencies
5417   */
5418  
5419  
5420  function save_save({
5421    attributes
5422  }) {
5423    const {
5424      url,
5425      alt,
5426      caption,
5427      align,
5428      href,
5429      rel,
5430      linkClass,
5431      width,
5432      height,
5433      id,
5434      linkTarget,
5435      sizeSlug,
5436      title
5437    } = attributes;
5438    const newRel = Object(external_lodash_["isEmpty"])(rel) ? undefined : rel;
5439    const classes = classnames_default()({
5440      [`align$align}`]: align,
5441      [`size-$sizeSlug}`]: sizeSlug,
5442      'is-resized': width || height
5443    });
5444    const image = Object(external_wp_element_["createElement"])("img", {
5445      src: url,
5446      alt: alt,
5447      className: id ? `wp-image-$id}` : null,
5448      width: width,
5449      height: height,
5450      title: title
5451    });
5452    const figure = Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, href ? Object(external_wp_element_["createElement"])("a", {
5453      className: linkClass,
5454      href: href,
5455      target: linkTarget,
5456      rel: newRel
5457    }, image) : image, !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
5458      tagName: "figcaption",
5459      value: caption
5460    }));
5461  
5462    if ('left' === align || 'right' === align || 'center' === align) {
5463      return Object(external_wp_element_["createElement"])("div", external_wp_blockEditor_["useBlockProps"].save(), Object(external_wp_element_["createElement"])("figure", {
5464        className: classes
5465      }, figure));
5466    }
5467  
5468    return Object(external_wp_element_["createElement"])("figure", external_wp_blockEditor_["useBlockProps"].save({
5469      className: classes
5470    }), figure);
5471  }
5472  
5473  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/transforms.js
5474  /**
5475   * WordPress dependencies
5476   */
5477  
5478  
5479  function stripFirstImage(attributes, {
5480    shortcode
5481  }) {
5482    const {
5483      body
5484    } = document.implementation.createHTMLDocument('');
5485    body.innerHTML = shortcode.content;
5486    let nodeToRemove = body.querySelector('img'); // if an image has parents, find the topmost node to remove
5487  
5488    while (nodeToRemove && nodeToRemove.parentNode && nodeToRemove.parentNode !== body) {
5489      nodeToRemove = nodeToRemove.parentNode;
5490    }
5491  
5492    if (nodeToRemove) {
5493      nodeToRemove.parentNode.removeChild(nodeToRemove);
5494    }
5495  
5496    return body.innerHTML.trim();
5497  }
5498  
5499  function getFirstAnchorAttributeFormHTML(html, attributeName) {
5500    const {
5501      body
5502    } = document.implementation.createHTMLDocument('');
5503    body.innerHTML = html;
5504    const {
5505      firstElementChild
5506    } = body;
5507  
5508    if (firstElementChild && firstElementChild.nodeName === 'A') {
5509      return firstElementChild.getAttribute(attributeName) || undefined;
5510    }
5511  }
5512  
5513  const imageSchema = {
5514    img: {
5515      attributes: ['src', 'alt', 'title'],
5516      classes: ['alignleft', 'aligncenter', 'alignright', 'alignnone', /^wp-image-\d+$/]
5517    }
5518  };
5519  
5520  const schema = ({
5521    phrasingContentSchema
5522  }) => ({
5523    figure: {
5524      require: ['img'],
5525      children: { ...imageSchema,
5526        a: {
5527          attributes: ['href', 'rel', 'target'],
5528          children: imageSchema
5529        },
5530        figcaption: {
5531          children: phrasingContentSchema
5532        }
5533      }
5534    }
5535  });
5536  
5537  const transforms_transforms = {
5538    from: [{
5539      type: 'raw',
5540      isMatch: node => node.nodeName === 'FIGURE' && !!node.querySelector('img'),
5541      schema,
5542      transform: node => {
5543        // Search both figure and image classes. Alignment could be
5544        // set on either. ID is set on the image.
5545        const className = node.className + ' ' + node.querySelector('img').className;
5546        const alignMatches = /(?:^|\s)align(left|center|right)(?:$|\s)/.exec(className);
5547        const anchor = node.id === '' ? undefined : node.id;
5548        const align = alignMatches ? alignMatches[1] : undefined;
5549        const idMatches = /(?:^|\s)wp-image-(\d+)(?:$|\s)/.exec(className);
5550        const id = idMatches ? Number(idMatches[1]) : undefined;
5551        const anchorElement = node.querySelector('a');
5552        const linkDestination = anchorElement && anchorElement.href ? 'custom' : undefined;
5553        const href = anchorElement && anchorElement.href ? anchorElement.href : undefined;
5554        const rel = anchorElement && anchorElement.rel ? anchorElement.rel : undefined;
5555        const linkClass = anchorElement && anchorElement.className ? anchorElement.className : undefined;
5556        const attributes = Object(external_wp_blocks_["getBlockAttributes"])('core/image', node.outerHTML, {
5557          align,
5558          id,
5559          linkDestination,
5560          href,
5561          rel,
5562          linkClass,
5563          anchor
5564        });
5565        return Object(external_wp_blocks_["createBlock"])('core/image', attributes);
5566      }
5567    }, {
5568      type: 'files',
5569  
5570      isMatch(files) {
5571        return files.length === 1 && files[0].type.indexOf('image/') === 0;
5572      },
5573  
5574      transform(files) {
5575        const file = files[0]; // We don't need to upload the media directly here
5576        // It's already done as part of the `componentDidMount`
5577        // int the image block
5578  
5579        return Object(external_wp_blocks_["createBlock"])('core/image', {
5580          url: Object(external_wp_blob_["createBlobURL"])(file)
5581        });
5582      }
5583  
5584    }, {
5585      type: 'shortcode',
5586      tag: 'caption',
5587      attributes: {
5588        url: {
5589          type: 'string',
5590          source: 'attribute',
5591          attribute: 'src',
5592          selector: 'img'
5593        },
5594        alt: {
5595          type: 'string',
5596          source: 'attribute',
5597          attribute: 'alt',
5598          selector: 'img'
5599        },
5600        caption: {
5601          shortcode: stripFirstImage
5602        },
5603        href: {
5604          shortcode: (attributes, {
5605            shortcode
5606          }) => {
5607            return getFirstAnchorAttributeFormHTML(shortcode.content, 'href');
5608          }
5609        },
5610        rel: {
5611          shortcode: (attributes, {
5612            shortcode
5613          }) => {
5614            return getFirstAnchorAttributeFormHTML(shortcode.content, 'rel');
5615          }
5616        },
5617        linkClass: {
5618          shortcode: (attributes, {
5619            shortcode
5620          }) => {
5621            return getFirstAnchorAttributeFormHTML(shortcode.content, 'class');
5622          }
5623        },
5624        id: {
5625          type: 'number',
5626          shortcode: ({
5627            named: {
5628              id
5629            }
5630          }) => {
5631            if (!id) {
5632              return;
5633            }
5634  
5635            return parseInt(id.replace('attachment_', ''), 10);
5636          }
5637        },
5638        align: {
5639          type: 'string',
5640          shortcode: ({
5641            named: {
5642              align = 'alignnone'
5643            }
5644          }) => {
5645            return align.replace('align', '');
5646          }
5647        }
5648      }
5649    }]
5650  };
5651  /* harmony default export */ var image_transforms = (transforms_transforms);
5652  
5653  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/index.js
5654  /**
5655   * WordPress dependencies
5656   */
5657  
5658  
5659  /**
5660   * Internal dependencies
5661   */
5662  
5663  
5664  
5665  const image_metadata = {
5666    apiVersion: 2,
5667    name: "core/image",
5668    title: "Image",
5669    category: "media",
5670    description: "Insert an image to make a visual statement.",
5671    keywords: ["img", "photo", "picture"],
5672    textdomain: "default",
5673    attributes: {
5674      align: {
5675        type: "string"
5676      },
5677      url: {
5678        type: "string",
5679        source: "attribute",
5680        selector: "img",
5681        attribute: "src"
5682      },
5683      alt: {
5684        type: "string",
5685        source: "attribute",
5686        selector: "img",
5687        attribute: "alt",
5688        "default": ""
5689      },
5690      caption: {
5691        type: "string",
5692        source: "html",
5693        selector: "figcaption"
5694      },
5695      title: {
5696        type: "string",
5697        source: "attribute",
5698        selector: "img",
5699        attribute: "title"
5700      },
5701      href: {
5702        type: "string",
5703        source: "attribute",
5704        selector: "figure > a",
5705        attribute: "href"
5706      },
5707      rel: {
5708        type: "string",
5709        source: "attribute",
5710        selector: "figure > a",
5711        attribute: "rel"
5712      },
5713      linkClass: {
5714        type: "string",
5715        source: "attribute",
5716        selector: "figure > a",
5717        attribute: "class"
5718      },
5719      id: {
5720        type: "number"
5721      },
5722      width: {
5723        type: "number"
5724      },
5725      height: {
5726        type: "number"
5727      },
5728      sizeSlug: {
5729        type: "string"
5730      },
5731      linkDestination: {
5732        type: "string"
5733      },
5734      linkTarget: {
5735        type: "string",
5736        source: "attribute",
5737        selector: "figure > a",
5738        attribute: "target"
5739      }
5740    },
5741    supports: {
5742      anchor: true,
5743      color: {
5744        __experimentalDuotone: "img",
5745        text: false,
5746        background: false
5747      },
5748      __experimentalBorder: {
5749        radius: true
5750      }
5751    },
5752    styles: [{
5753      name: "default",
5754      label: "Default",
5755      isDefault: true
5756    }, {
5757      name: "rounded",
5758      label: "Rounded"
5759    }],
5760    editorStyle: "wp-block-image-editor",
5761    style: "wp-block-image"
5762  };
5763  
5764  
5765  const {
5766    name: image_name
5767  } = image_metadata;
5768  
5769  const image_settings = {
5770    icon: library_image,
5771    example: {
5772      attributes: {
5773        sizeSlug: 'large',
5774        url: 'https://s.w.org/images/core/5.3/MtBlanc1.jpg',
5775        // translators: Caption accompanying an image of the Mont Blanc, which serves as an example for the Image block.
5776        caption: Object(external_wp_i18n_["__"])('Mont Blanc appears—still, snowy, and serene.')
5777      }
5778    },
5779  
5780    __experimentalLabel(attributes, {
5781      context
5782    }) {
5783      if (context === 'accessibility') {
5784        const {
5785          caption,
5786          alt,
5787          url
5788        } = attributes;
5789  
5790        if (!url) {
5791          return Object(external_wp_i18n_["__"])('Empty');
5792        }
5793  
5794        if (!alt) {
5795          return caption || '';
5796        } // This is intended to be read by a screen reader.
5797        // A period simply means a pause, no need to translate it.
5798  
5799  
5800        return alt + (caption ? '. ' + caption : '');
5801      }
5802    },
5803  
5804    getEditWrapperProps(attributes) {
5805      return {
5806        'data-align': attributes.align
5807      };
5808    },
5809  
5810    transforms: image_transforms,
5811    edit: image_edit,
5812    save: save_save,
5813    deprecated: image_deprecated
5814  };
5815  
5816  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/heading.js
5817  
5818  
5819  /**
5820   * WordPress dependencies
5821   */
5822  
5823  const heading = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
5824    xmlns: "http://www.w3.org/2000/svg",
5825    viewBox: "0 0 24 24"
5826  }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
5827    d: "M6.2 5.2v13.4l5.8-4.8 5.8 4.8V5.2z"
5828  }));
5829  /* harmony default export */ var library_heading = (heading);
5830  
5831  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/deprecated.js
5832  
5833  
5834  /**
5835   * External dependencies
5836   */
5837  
5838  
5839  /**
5840   * WordPress dependencies
5841   */
5842  
5843  
5844  const blockSupports = {
5845    className: false,
5846    anchor: true
5847  };
5848  const heading_deprecated_blockAttributes = {
5849    align: {
5850      type: 'string'
5851    },
5852    content: {
5853      type: 'string',
5854      source: 'html',
5855      selector: 'h1,h2,h3,h4,h5,h6',
5856      default: ''
5857    },
5858    level: {
5859      type: 'number',
5860      default: 2
5861    },
5862    placeholder: {
5863      type: 'string'
5864    }
5865  };
5866  
5867  const migrateCustomColors = attributes => {
5868    if (!attributes.customTextColor) {
5869      return attributes;
5870    }
5871  
5872    const style = {
5873      color: {
5874        text: attributes.customTextColor
5875      }
5876    };
5877    return { ...Object(external_lodash_["omit"])(attributes, ['customTextColor']),
5878      style
5879    };
5880  };
5881  
5882  const TEXT_ALIGN_OPTIONS = ['left', 'right', 'center'];
5883  
5884  const migrateTextAlign = attributes => {
5885    const {
5886      align,
5887      ...rest
5888    } = attributes;
5889    return TEXT_ALIGN_OPTIONS.includes(align) ? { ...rest,
5890      textAlign: align
5891    } : attributes;
5892  };
5893  
5894  const heading_deprecated_deprecated = [{
5895    supports: {
5896      align: ['wide', 'full'],
5897      anchor: true,
5898      className: false,
5899      color: {
5900        link: true
5901      },
5902      fontSize: true,
5903      lineHeight: true,
5904      __experimentalSelector: {
5905        'core/heading/h1': 'h1',
5906        'core/heading/h2': 'h2',
5907        'core/heading/h3': 'h3',
5908        'core/heading/h4': 'h4',
5909        'core/heading/h5': 'h5',
5910        'core/heading/h6': 'h6'
5911      },
5912      __unstablePasteTextInline: true
5913    },
5914    attributes: heading_deprecated_blockAttributes,
5915    isEligible: ({
5916      align
5917    }) => TEXT_ALIGN_OPTIONS.includes(align),
5918    migrate: migrateTextAlign,
5919  
5920    save({
5921      attributes
5922    }) {
5923      const {
5924        align,
5925        content,
5926        level
5927      } = attributes;
5928      const TagName = 'h' + level;
5929      const className = classnames_default()({
5930        [`has-text-align-$align}`]: align
5931      });
5932      return Object(external_wp_element_["createElement"])(TagName, external_wp_blockEditor_["useBlockProps"].save({
5933        className
5934      }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
5935        value: content
5936      }));
5937    }
5938  
5939  }, {
5940    supports: blockSupports,
5941    attributes: { ...heading_deprecated_blockAttributes,
5942      customTextColor: {
5943        type: 'string'
5944      },
5945      textColor: {
5946        type: 'string'
5947      }
5948    },
5949    migrate: attributes => migrateCustomColors(migrateTextAlign(attributes)),
5950  
5951    save({
5952      attributes
5953    }) {
5954      const {
5955        align,
5956        content,
5957        customTextColor,
5958        level,
5959        textColor
5960      } = attributes;
5961      const tagName = 'h' + level;
5962      const textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor);
5963      const className = classnames_default()({
5964        [textClass]: textClass,
5965        'has-text-color': textColor || customTextColor,
5966        [`has-text-align-$align}`]: align
5967      });
5968      return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
5969        className: className ? className : undefined,
5970        tagName: tagName,
5971        style: {
5972          color: textClass ? undefined : customTextColor
5973        },
5974        value: content
5975      });
5976    }
5977  
5978  }, {
5979    attributes: { ...heading_deprecated_blockAttributes,
5980      customTextColor: {
5981        type: 'string'
5982      },
5983      textColor: {
5984        type: 'string'
5985      }
5986    },
5987    migrate: attributes => migrateCustomColors(migrateTextAlign(attributes)),
5988  
5989    save({
5990      attributes
5991    }) {
5992      const {
5993        align,
5994        content,
5995        customTextColor,
5996        level,
5997        textColor
5998      } = attributes;
5999      const tagName = 'h' + level;
6000      const textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor);
6001      const className = classnames_default()({
6002        [textClass]: textClass,
6003        [`has-text-align-$align}`]: align
6004      });
6005      return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
6006        className: className ? className : undefined,
6007        tagName: tagName,
6008        style: {
6009          color: textClass ? undefined : customTextColor
6010        },
6011        value: content
6012      });
6013    },
6014  
6015    supports: blockSupports
6016  }, {
6017    supports: blockSupports,
6018    attributes: { ...heading_deprecated_blockAttributes,
6019      customTextColor: {
6020        type: 'string'
6021      },
6022      textColor: {
6023        type: 'string'
6024      }
6025    },
6026    migrate: attributes => migrateCustomColors(migrateTextAlign(attributes)),
6027  
6028    save({
6029      attributes
6030    }) {
6031      const {
6032        align,
6033        level,
6034        content,
6035        textColor,
6036        customTextColor
6037      } = attributes;
6038      const tagName = 'h' + level;
6039      const textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor);
6040      const className = classnames_default()({
6041        [textClass]: textClass
6042      });
6043      return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
6044        className: className ? className : undefined,
6045        tagName: tagName,
6046        style: {
6047          textAlign: align,
6048          color: textClass ? undefined : customTextColor
6049        },
6050        value: content
6051      });
6052    }
6053  
6054  }];
6055  /* harmony default export */ var heading_deprecated = (heading_deprecated_deprecated);
6056  
6057  // EXTERNAL MODULE: external ["wp","keycodes"]
6058  var external_wp_keycodes_ = __webpack_require__("RxS6");
6059  
6060  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/heading-level-icon.js
6061  
6062  
6063  /**
6064   * WordPress dependencies
6065   */
6066  
6067  /** @typedef {import('@wordpress/element').WPComponent} WPComponent */
6068  
6069  /**
6070   * HeadingLevelIcon props.
6071   *
6072   * @typedef WPHeadingLevelIconProps
6073   *
6074   * @property {number}   level     The heading level to show an icon for.
6075   * @property {?boolean} isPressed Whether or not the icon should appear pressed; default: false.
6076   */
6077  
6078  /**
6079   * Heading level icon.
6080   *
6081   * @param {WPHeadingLevelIconProps} props Component props.
6082   *
6083   * @return {?WPComponent} The icon.
6084   */
6085  
6086  function HeadingLevelIcon({
6087    level,
6088    isPressed = false
6089  }) {
6090    const levelToPath = {
6091      1: 'M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z',
6092      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',
6093      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',
6094      4: 'M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z',
6095      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',
6096      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'
6097    };
6098  
6099    if (!levelToPath.hasOwnProperty(level)) {
6100      return null;
6101    }
6102  
6103    return Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
6104      width: "24",
6105      height: "24",
6106      viewBox: "0 0 20 20",
6107      xmlns: "http://www.w3.org/2000/svg",
6108      isPressed: isPressed
6109    }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
6110      d: levelToPath[level]
6111    }));
6112  }
6113  
6114  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/heading-level-dropdown.js
6115  
6116  
6117  /**
6118   * WordPress dependencies
6119   */
6120  
6121  
6122  
6123  /**
6124   * Internal dependencies
6125   */
6126  
6127  
6128  const HEADING_LEVELS = [1, 2, 3, 4, 5, 6];
6129  const heading_level_dropdown_POPOVER_PROPS = {
6130    className: 'block-library-heading-level-dropdown',
6131    isAlternate: true
6132  };
6133  /** @typedef {import('@wordpress/element').WPComponent} WPComponent */
6134  
6135  /**
6136   * HeadingLevelDropdown props.
6137   *
6138   * @typedef WPHeadingLevelDropdownProps
6139   *
6140   * @property {number}                 selectedLevel The chosen heading level.
6141   * @property {(newValue:number)=>any} onChange      Callback to run when
6142   *                                                  toolbar value is changed.
6143   */
6144  
6145  /**
6146   * Dropdown for selecting a heading level (1 through 6).
6147   *
6148   * @param {WPHeadingLevelDropdownProps} props Component props.
6149   *
6150   * @return {WPComponent} The toolbar.
6151   */
6152  
6153  function HeadingLevelDropdown({
6154    selectedLevel,
6155    onChange
6156  }) {
6157    return Object(external_wp_element_["createElement"])(external_wp_components_["Dropdown"], {
6158      popoverProps: heading_level_dropdown_POPOVER_PROPS,
6159      renderToggle: ({
6160        onToggle,
6161        isOpen
6162      }) => {
6163        const openOnArrowDown = event => {
6164          if (!isOpen && event.keyCode === external_wp_keycodes_["DOWN"]) {
6165            event.preventDefault();
6166            event.stopPropagation();
6167            onToggle();
6168          }
6169        };
6170  
6171        return Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], {
6172          "aria-expanded": isOpen,
6173          "aria-haspopup": "true",
6174          icon: Object(external_wp_element_["createElement"])(HeadingLevelIcon, {
6175            level: selectedLevel
6176          }),
6177          label: Object(external_wp_i18n_["__"])('Change heading level'),
6178          onClick: onToggle,
6179          onKeyDown: openOnArrowDown,
6180          showTooltip: true
6181        });
6182      },
6183      renderContent: () => Object(external_wp_element_["createElement"])(external_wp_components_["Toolbar"], {
6184        className: "block-library-heading-level-toolbar",
6185        label: Object(external_wp_i18n_["__"])('Change heading level')
6186      }, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], {
6187        isCollapsed: false,
6188        controls: HEADING_LEVELS.map(targetLevel => {
6189          const isActive = targetLevel === selectedLevel;
6190          return {
6191            icon: Object(external_wp_element_["createElement"])(HeadingLevelIcon, {
6192              level: targetLevel,
6193              isPressed: isActive
6194            }),
6195            title: Object(external_wp_i18n_["sprintf"])( // translators: %s: heading level e.g: "1", "2", "3"
6196            Object(external_wp_i18n_["__"])('Heading %d'), targetLevel),
6197            isActive,
6198  
6199            onClick() {
6200              onChange(targetLevel);
6201            }
6202  
6203          };
6204        })
6205      }))
6206    });
6207  }
6208  
6209  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/edit.js
6210  
6211  
6212  
6213  /**
6214   * External dependencies
6215   */
6216  
6217  /**
6218   * WordPress dependencies
6219   */
6220  
6221  
6222  
6223  
6224  /**
6225   * Internal dependencies
6226   */
6227  
6228  
6229  
6230  function HeadingEdit({
6231    attributes,
6232    setAttributes,
6233    mergeBlocks,
6234    onReplace,
6235    mergedStyle,
6236    clientId
6237  }) {
6238    const {
6239      textAlign,
6240      content,
6241      level,
6242      placeholder
6243    } = attributes;
6244    const tagName = 'h' + level;
6245    const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
6246      className: classnames_default()({
6247        [`has-text-align-$textAlign}`]: textAlign
6248      }),
6249      style: mergedStyle
6250    });
6251    return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
6252      group: "block"
6253    }, Object(external_wp_element_["createElement"])(HeadingLevelDropdown, {
6254      selectedLevel: level,
6255      onChange: newLevel => setAttributes({
6256        level: newLevel
6257      })
6258    }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["AlignmentControl"], {
6259      value: textAlign,
6260      onChange: nextAlign => {
6261        setAttributes({
6262          textAlign: nextAlign
6263        });
6264      }
6265    })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], Object(esm_extends["a" /* default */])({
6266      identifier: "content",
6267      tagName: tagName,
6268      value: content,
6269      onChange: value => setAttributes({
6270        content: value
6271      }),
6272      onMerge: mergeBlocks,
6273      onSplit: (value, isOriginal) => {
6274        let block;
6275  
6276        if (isOriginal || value) {
6277          block = Object(external_wp_blocks_["createBlock"])('core/heading', { ...attributes,
6278            content: value
6279          });
6280        } else {
6281          block = Object(external_wp_blocks_["createBlock"])('core/paragraph');
6282        }
6283  
6284        if (isOriginal) {
6285          block.clientId = clientId;
6286        }
6287  
6288        return block;
6289      },
6290      onReplace: onReplace,
6291      onRemove: () => onReplace([]),
6292      "aria-label": Object(external_wp_i18n_["__"])('Heading text'),
6293      placeholder: placeholder || Object(external_wp_i18n_["__"])('Heading'),
6294      textAlign: textAlign
6295    }, blockProps)));
6296  }
6297  
6298  /* harmony default export */ var heading_edit = (HeadingEdit);
6299  
6300  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/save.js
6301  
6302  
6303  /**
6304   * External dependencies
6305   */
6306  
6307  /**
6308   * WordPress dependencies
6309   */
6310  
6311  
6312  function heading_save_save({
6313    attributes
6314  }) {
6315    const {
6316      textAlign,
6317      content,
6318      level
6319    } = attributes;
6320    const TagName = 'h' + level;
6321    const className = classnames_default()({
6322      [`has-text-align-$textAlign}`]: textAlign
6323    });
6324    return Object(external_wp_element_["createElement"])(TagName, external_wp_blockEditor_["useBlockProps"].save({
6325      className
6326    }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
6327      value: content
6328    }));
6329  }
6330  
6331  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/shared.js
6332  /**
6333   * Given a node name string for a heading node, returns its numeric level.
6334   *
6335   * @param {string} nodeName Heading node name.
6336   *
6337   * @return {number} Heading level.
6338   */
6339  function getLevelFromHeadingNodeName(nodeName) {
6340    return Number(nodeName.substr(1));
6341  }
6342  
6343  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/transforms.js
6344  /**
6345   * WordPress dependencies
6346   */
6347  
6348  /**
6349   * Internal dependencies
6350   */
6351  
6352  
6353  const {
6354    name: heading_transforms_name
6355  } = {
6356    apiVersion: 2,
6357    name: "core/heading",
6358    title: "Heading",
6359    category: "text",
6360    description: "Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.",
6361    keywords: ["title", "subtitle"],
6362    textdomain: "default",
6363    attributes: {
6364      textAlign: {
6365        type: "string"
6366      },
6367      content: {
6368        type: "string",
6369        source: "html",
6370        selector: "h1,h2,h3,h4,h5,h6",
6371        "default": "",
6372        __experimentalRole: "content"
6373      },
6374      level: {
6375        type: "number",
6376        "default": 2
6377      },
6378      placeholder: {
6379        type: "string"
6380      }
6381    },
6382    supports: {
6383      align: ["wide", "full"],
6384      anchor: true,
6385      className: false,
6386      color: {
6387        link: true
6388      },
6389      typography: {
6390        fontSize: true,
6391        lineHeight: true,
6392        __experimentalFontWeight: true
6393      },
6394      __experimentalSelector: "h1,h2,h3,h4,h5,h6",
6395      __unstablePasteTextInline: true
6396    },
6397    editorStyle: "wp-block-heading-editor",
6398    style: "wp-block-heading"
6399  };
6400  const heading_transforms_transforms = {
6401    from: [{
6402      type: 'block',
6403      isMultiBlock: true,
6404      blocks: ['core/paragraph'],
6405      transform: attributes => attributes.map(({
6406        content,
6407        anchor
6408      }) => Object(external_wp_blocks_["createBlock"])(heading_transforms_name, {
6409        content,
6410        anchor
6411      }))
6412    }, {
6413      type: 'raw',
6414      selector: 'h1,h2,h3,h4,h5,h6',
6415      schema: ({
6416        phrasingContentSchema,
6417        isPaste
6418      }) => {
6419        const schema = {
6420          children: phrasingContentSchema,
6421          attributes: isPaste ? [] : ['style', 'id']
6422        };
6423        return {
6424          h1: schema,
6425          h2: schema,
6426          h3: schema,
6427          h4: schema,
6428          h5: schema,
6429          h6: schema
6430        };
6431      },
6432  
6433      transform(node) {
6434        const attributes = Object(external_wp_blocks_["getBlockAttributes"])(heading_transforms_name, node.outerHTML);
6435        const {
6436          textAlign
6437        } = node.style || {};
6438        attributes.level = getLevelFromHeadingNodeName(node.nodeName);
6439  
6440        if (textAlign === 'left' || textAlign === 'center' || textAlign === 'right') {
6441          attributes.align = textAlign;
6442        }
6443  
6444        return Object(external_wp_blocks_["createBlock"])(heading_transforms_name, attributes);
6445      }
6446  
6447    }, ...[1, 2, 3, 4, 5, 6].map(level => ({
6448      type: 'prefix',
6449      prefix: Array(level + 1).join('#'),
6450  
6451      transform(content) {
6452        return Object(external_wp_blocks_["createBlock"])(heading_transforms_name, {
6453          level,
6454          content
6455        });
6456      }
6457  
6458    })), ...[1, 2, 3, 4, 5, 6].map(level => ({
6459      type: 'enter',
6460      regExp: new RegExp(`^/(h|H)$level}$`),
6461  
6462      transform(content) {
6463        return Object(external_wp_blocks_["createBlock"])(heading_transforms_name, {
6464          level,
6465          content
6466        });
6467      }
6468  
6469    }))],
6470    to: [{
6471      type: 'block',
6472      isMultiBlock: true,
6473      blocks: ['core/paragraph'],
6474      transform: attributes => attributes.map(({
6475        content,
6476        anchor
6477      }) => Object(external_wp_blocks_["createBlock"])('core/paragraph', {
6478        content,
6479        anchor
6480      }))
6481    }]
6482  };
6483  /* harmony default export */ var heading_transforms = (heading_transforms_transforms);
6484  
6485  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/index.js
6486  /**
6487   * External dependencies
6488   */
6489  
6490  /**
6491   * WordPress dependencies
6492   */
6493  
6494  
6495  
6496  /**
6497   * Internal dependencies
6498   */
6499  
6500  
6501  
6502  const heading_metadata = {
6503    apiVersion: 2,
6504    name: "core/heading",
6505    title: "Heading",
6506    category: "text",
6507    description: "Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.",
6508    keywords: ["title", "subtitle"],
6509    textdomain: "default",
6510    attributes: {
6511      textAlign: {
6512        type: "string"
6513      },
6514      content: {
6515        type: "string",
6516        source: "html",
6517        selector: "h1,h2,h3,h4,h5,h6",
6518        "default": "",
6519        __experimentalRole: "content"
6520      },
6521      level: {
6522        type: "number",
6523        "default": 2
6524      },
6525      placeholder: {
6526        type: "string"
6527      }
6528    },
6529    supports: {
6530      align: ["wide", "full"],
6531      anchor: true,
6532      className: false,
6533      color: {
6534        link: true
6535      },
6536      typography: {
6537        fontSize: true,
6538        lineHeight: true,
6539        __experimentalFontWeight: true
6540      },
6541      __experimentalSelector: "h1,h2,h3,h4,h5,h6",
6542      __unstablePasteTextInline: true
6543    },
6544    editorStyle: "wp-block-heading-editor",
6545    style: "wp-block-heading"
6546  };
6547  
6548  
6549  const {
6550    name: heading_name
6551  } = heading_metadata;
6552  
6553  const heading_settings = {
6554    icon: library_heading,
6555    example: {
6556      attributes: {
6557        content: Object(external_wp_i18n_["__"])('Code is Poetry'),
6558        level: 2
6559      }
6560    },
6561  
6562    __experimentalLabel(attributes, {
6563      context
6564    }) {
6565      if (context === 'accessibility') {
6566        const {
6567          content,
6568          level
6569        } = attributes;
6570        return Object(external_lodash_["isEmpty"])(content) ? Object(external_wp_i18n_["sprintf"])(
6571        /* translators: accessibility text. %s: heading level. */
6572        Object(external_wp_i18n_["__"])('Level %s. Empty.'), level) : Object(external_wp_i18n_["sprintf"])(
6573        /* translators: accessibility text. 1: heading level. 2: heading content. */
6574        Object(external_wp_i18n_["__"])('Level %1$s. %2$s'), level, content);
6575      }
6576    },
6577  
6578    transforms: heading_transforms,
6579    deprecated: heading_deprecated,
6580  
6581    merge(attributes, attributesToMerge) {
6582      return {
6583        content: (attributes.content || '') + (attributesToMerge.content || '')
6584      };
6585    },
6586  
6587    edit: heading_edit,
6588    save: heading_save_save
6589  };
6590  
6591  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/quote.js
6592  
6593  
6594  /**
6595   * WordPress dependencies
6596   */
6597  
6598  const quote = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
6599    viewBox: "0 0 24 24",
6600    xmlns: "http://www.w3.org/2000/svg"
6601  }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
6602    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"
6603  }));
6604  /* harmony default export */ var library_quote = (quote);
6605  
6606  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/deprecated.js
6607  
6608  
6609  /**
6610   * External dependencies
6611   */
6612  
6613  /**
6614   * WordPress dependencies
6615   */
6616  
6617  
6618  const quote_deprecated_blockAttributes = {
6619    value: {
6620      type: 'string',
6621      source: 'html',
6622      selector: 'blockquote',
6623      multiline: 'p',
6624      default: ''
6625    },
6626    citation: {
6627      type: 'string',
6628      source: 'html',
6629      selector: 'cite',
6630      default: ''
6631    },
6632    align: {
6633      type: 'string'
6634    }
6635  };
6636  const quote_deprecated_deprecated = [{
6637    attributes: quote_deprecated_blockAttributes,
6638  
6639    save({
6640      attributes
6641    }) {
6642      const {
6643        align,
6644        value,
6645        citation
6646      } = attributes;
6647      return Object(external_wp_element_["createElement"])("blockquote", {
6648        style: {
6649          textAlign: align ? align : null
6650        }
6651      }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
6652        multiline: true,
6653        value: value
6654      }), !external_wp_blockEditor_["RichText"].isEmpty(citation) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
6655        tagName: "cite",
6656        value: citation
6657      }));
6658    }
6659  
6660  }, {
6661    attributes: { ...quote_deprecated_blockAttributes,
6662      style: {
6663        type: 'number',
6664        default: 1
6665      }
6666    },
6667  
6668    migrate(attributes) {
6669      if (attributes.style === 2) {
6670        return { ...Object(external_lodash_["omit"])(attributes, ['style']),
6671          className: attributes.className ? attributes.className + ' is-style-large' : 'is-style-large'
6672        };
6673      }
6674  
6675      return attributes;
6676    },
6677  
6678    save({
6679      attributes
6680    }) {
6681      const {
6682        align,
6683        value,
6684        citation,
6685        style
6686      } = attributes;
6687      return Object(external_wp_element_["createElement"])("blockquote", {
6688        className: style === 2 ? 'is-large' : '',
6689        style: {
6690          textAlign: align ? align : null
6691        }
6692      }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
6693        multiline: true,
6694        value: value
6695      }), !external_wp_blockEditor_["RichText"].isEmpty(citation) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
6696        tagName: "cite",
6697        value: citation
6698      }));
6699    }
6700  
6701  }, {
6702    attributes: { ...quote_deprecated_blockAttributes,
6703      citation: {
6704        type: 'string',
6705        source: 'html',
6706        selector: 'footer',
6707        default: ''
6708      },
6709      style: {
6710        type: 'number',
6711        default: 1
6712      }
6713    },
6714  
6715    save({
6716      attributes
6717    }) {
6718      const {
6719        align,
6720        value,
6721        citation,
6722        style
6723      } = attributes;
6724      return Object(external_wp_element_["createElement"])("blockquote", {
6725        className: `blocks-quote-style-$style}`,
6726        style: {
6727          textAlign: align ? align : null
6728        }
6729      }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
6730        multiline: true,
6731        value: value
6732      }), !external_wp_blockEditor_["RichText"].isEmpty(citation) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
6733        tagName: "footer",
6734        value: citation
6735      }));
6736    }
6737  
6738  }];
6739  /* harmony default export */ var quote_deprecated = (quote_deprecated_deprecated);
6740  
6741  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/edit.js
6742  
6743  
6744  /**
6745   * External dependencies
6746   */
6747  
6748  /**
6749   * WordPress dependencies
6750   */
6751  
6752  
6753  
6754  
6755  
6756  
6757  const isWebPlatform = external_wp_element_["Platform"].OS === 'web';
6758  function QuoteEdit({
6759    attributes,
6760    setAttributes,
6761    isSelected,
6762    mergeBlocks,
6763    onReplace,
6764    className,
6765    insertBlocksAfter,
6766    mergedStyle
6767  }) {
6768    const {
6769      align,
6770      value,
6771      citation
6772    } = attributes;
6773    const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({
6774      className: classnames_default()(className, {
6775        [`has-text-align-$align}`]: align
6776      }),
6777      style: mergedStyle
6778    });
6779    return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], {
6780      group: "block"
6781    }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["AlignmentControl"], {
6782      value: align,
6783      onChange: nextAlign => {
6784        setAttributes({
6785          align: nextAlign
6786        });
6787      }
6788    })), Object(external_wp_element_["createElement"])(external_wp_components_["BlockQuotation"], blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], {
6789      identifier: "value",
6790      multiline: true,
6791      value: value,
6792      onChange: nextValue => setAttributes({
6793        value: nextValue
6794      }),
6795      onMerge: mergeBlocks,
6796      onRemove: forward => {
6797        const hasEmptyCitation = !citation || citation.length === 0;
6798  
6799        if (!forward && hasEmptyCitation) {
6800          onReplace([]);
6801        }
6802      },
6803      "aria-label": Object(external_wp_i18n_["__"])('Quote text'),
6804      placeholder: // translators: placeholder text used for the quote
6805      Object(external_wp_i18n_["__"])('Add quote'),
6806      onReplace: onReplace,
6807      onSplit: piece => Object(external_wp_blocks_["createBlock"])('core/quote', { ...attributes,
6808        value: piece
6809      }),
6810      __unstableOnSplitMiddle: () => Object(external_wp_blocks_["createBlock"])('core/paragraph'),
6811      textAlign: align
6812    }), (!external_wp_blockEditor_["RichText"].isEmpty(citation) || isSelected) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], {
6813      identifier: "citation",
6814      tagName: isWebPlatform ? 'cite' : undefined,
6815      style: {
6816        display: 'block'
6817      },
6818      value: citation,
6819      onChange: nextCitation => setAttributes({
6820        citation: nextCitation
6821      }),
6822      __unstableMobileNoFocusOnMount: true,
6823      "aria-label": Object(external_wp_i18n_["__"])('Quote citation text'),
6824      placeholder: // translators: placeholder text used for the citation
6825      Object(external_wp_i18n_["__"])('Add citation'),
6826      className: "wp-block-quote__citation",
6827      textAlign: align,
6828      __unstableOnSplitAtEnd: () => insertBlocksAfter(Object(external_wp_blocks_["createBlock"])('core/paragraph'))
6829    })));
6830  }
6831  
6832  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/save.js
6833  
6834  
6835  /**
6836   * External dependencies
6837   */
6838  
6839  /**
6840   * WordPress dependencies
6841   */
6842  
6843  
6844  function quote_save_save({
6845    attributes
6846  }) {
6847    const {
6848      align,
6849      value,
6850      citation
6851    } = attributes;
6852    const className = classnames_default()({
6853      [`has-text-align-$align}`]: align
6854    });
6855    return Object(external_wp_element_["createElement"])("blockquote", external_wp_blockEditor_["useBlockProps"].save({
6856      className
6857    }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
6858      multiline: true,
6859      value: value
6860    }), !external_wp_blockEditor_["RichText"].isEmpty(citation) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
6861      tagName: "cite",
6862      value: citation
6863    }));
6864  }
6865  
6866  // EXTERNAL MODULE: external ["wp","richText"]
6867  var external_wp_richText_ = __webpack_require__("qRz9");
6868  
6869  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/transforms.js
6870  /**
6871   * WordPress dependencies
6872   */
6873  
6874  
6875  const quote_transforms_transforms = {
6876    from: [{
6877      type: 'block',
6878      isMultiBlock: true,
6879      blocks: ['core/paragraph'],
6880      transform: attributes => {
6881        return Object(external_wp_blocks_["createBlock"])('core/quote', {
6882          value: Object(external_wp_richText_["toHTMLString"])({
6883            value: Object(external_wp_richText_["join"])(attributes.map(({
6884              content
6885            }) => Object(external_wp_richText_["create"])({
6886              html: content
6887            })), '\u2028'),
6888            multilineTag: 'p'
6889          }),
6890          anchor: attributes.anchor
6891        });
6892      }
6893    }, {
6894      type: 'block',
6895      blocks: ['core/heading'],
6896      transform: ({
6897        content,
6898        anchor
6899      }) => {
6900        return Object(external_wp_blocks_["createBlock"])('core/quote', {
6901          value: `<p>$content}</p>`,
6902          anchor
6903        });
6904      }
6905    }, {
6906      type: 'block',
6907      blocks: ['core/pullquote'],
6908      transform: ({
6909        value,
6910        citation,
6911        anchor
6912      }) => Object(external_wp_blocks_["createBlock"])('core/quote', {
6913        value,
6914        citation,
6915        anchor
6916      })
6917    }, {
6918      type: 'prefix',
6919      prefix: '>',
6920      transform: content => {
6921        return Object(external_wp_blocks_["createBlock"])('core/quote', {
6922          value: `<p>$content}</p>`
6923        });
6924      }
6925    }, {
6926      type: 'raw',
6927      isMatch: node => {
6928        const isParagraphOrSingleCite = (() => {
6929          let hasCitation = false;
6930          return child => {
6931            // Child is a paragraph.
6932            if (child.nodeName === 'P') {
6933              return true;
6934            } // Child is a cite and no other cite child exists before it.
6935  
6936  
6937            if (!hasCitation && child.nodeName === 'CITE') {
6938              hasCitation = true;
6939              return true;
6940            }
6941          };
6942        })();
6943  
6944        return node.nodeName === 'BLOCKQUOTE' && // The quote block can only handle multiline paragraph
6945        // content with an optional cite child.
6946        Array.from(node.childNodes).every(isParagraphOrSingleCite);
6947      },
6948      schema: ({
6949        phrasingContentSchema
6950      }) => ({
6951        blockquote: {
6952          children: {
6953            p: {
6954              children: phrasingContentSchema
6955            },
6956            cite: {
6957              children: phrasingContentSchema
6958            }
6959          }
6960        }
6961      })
6962    }],
6963    to: [{
6964      type: 'block',
6965      blocks: ['core/paragraph'],
6966      transform: ({
6967        value,
6968        citation
6969      }) => {
6970        const paragraphs = [];
6971  
6972        if (value && value !== '<p></p>') {
6973          paragraphs.push(...Object(external_wp_richText_["split"])(Object(external_wp_richText_["create"])({
6974            html: value,
6975            multilineTag: 'p'
6976          }), '\u2028').map(piece => Object(external_wp_blocks_["createBlock"])('core/paragraph', {
6977            content: Object(external_wp_richText_["toHTMLString"])({
6978              value: piece
6979            })
6980          })));
6981        }
6982  
6983        if (citation && citation !== '<p></p>') {
6984          paragraphs.push(Object(external_wp_blocks_["createBlock"])('core/paragraph', {
6985            content: citation
6986          }));
6987        }
6988  
6989        if (paragraphs.length === 0) {
6990          return Object(external_wp_blocks_["createBlock"])('core/paragraph', {
6991            content: ''
6992          });
6993        }
6994  
6995        return paragraphs;
6996      }
6997    }, {
6998      type: 'block',
6999      blocks: ['core/heading'],
7000      transform: ({
7001        value,
7002        citation,
7003        ...attrs
7004      }) => {
7005        // If there is no quote content, use the citation as the
7006        // content of the resulting heading. A nonexistent citation
7007        // will result in an empty heading.
7008        if (value === '<p></p>') {
7009          return Object(external_wp_blocks_["createBlock"])('core/heading', {
7010            content: citation
7011          });
7012        }
7013  
7014        const pieces = Object(external_wp_richText_["split"])(Object(external_wp_richText_["create"])({
7015          html: value,
7016          multilineTag: 'p'
7017        }), '\u2028');
7018        const headingBlock = Object(external_wp_blocks_["createBlock"])('core/heading', {
7019          content: Object(external_wp_richText_["toHTMLString"])({
7020            value: pieces[0]
7021          })
7022        });
7023  
7024        if (!citation && pieces.length === 1) {
7025          return headingBlock;
7026        }
7027  
7028        const quotePieces = pieces.slice(1);
7029        const quoteBlock = Object(external_wp_blocks_["createBlock"])('core/quote', { ...attrs,
7030          citation,
7031          value: Object(external_wp_richText_["toHTMLString"])({
7032            value: quotePieces.length ? Object(external_wp_richText_["join"])(pieces.slice(1), '\u2028') : Object(external_wp_richText_["create"])(),
7033            multilineTag: 'p'
7034          })
7035        });
7036        return [headingBlock, quoteBlock];
7037      }
7038    }, {
7039      type: 'block',
7040      blocks: ['core/pullquote'],
7041      transform: ({
7042        value,
7043        citation,
7044        anchor
7045      }) => {
7046        return Object(external_wp_blocks_["createBlock"])('core/pullquote', {
7047          value,
7048          citation,
7049          anchor
7050        });
7051      }
7052    }]
7053  };
7054  /* harmony default export */ var quote_transforms = (quote_transforms_transforms);
7055  
7056  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/index.js
7057  /**
7058   * WordPress dependencies
7059   */
7060  
7061  
7062  /**
7063   * Internal dependencies
7064   */
7065  
7066  
7067  
7068  const quote_metadata = {
7069    apiVersion: 2,
7070    name: "core/quote",
7071    title: "Quote",
7072    category: "text",
7073    description: "Give quoted text visual emphasis. \"In quoting others, we cite ourselves.\" \u2014 Julio Cort\xE1zar",
7074    keywords: ["blockquote", "cite"],
7075    textdomain: "default",
7076    attributes: {
7077      value: {
7078        type: "string",
7079        source: "html",
7080        selector: "blockquote",
7081        multiline: "p",
7082        "default": "",
7083        __experimentalRole: "content"
7084      },
7085      citation: {
7086        type: "string",
7087        source: "html",
7088        selector: "cite",
7089        "default": "",
7090        __experimentalRole: "content"
7091      },
7092      align: {
7093        type: "string"
7094      }
7095    },
7096    supports: {
7097      anchor: true
7098    },
7099    styles: [{
7100      name: "default",
7101      label: "Default",
7102      isDefault: true
7103    }, {
7104      name: "large",
7105      label: "Large"
7106    }],
7107    editorStyle: "wp-block-quote-editor",
7108    style: "wp-block-quote"
7109  };
7110  
7111  
7112  const {
7113    name: quote_name
7114  } = quote_metadata;
7115  
7116  const quote_settings = {
7117    icon: library_quote,
7118    example: {
7119      attributes: {
7120        value: '<p>' + Object(external_wp_i18n_["__"])('In quoting others, we cite ourselves.') + '</p>',
7121        citation: 'Julio Cortázar',
7122        className: 'is-style-large'
7123      }
7124    },
7125    transforms: quote_transforms,
7126    edit: QuoteEdit,
7127    save: quote_save_save,
7128  
7129    merge(attributes, {
7130      value,
7131      citation
7132    }) {
7133      // Quote citations cannot be merged. Pick the second one unless it's
7134      // empty.
7135      if (!citation) {
7136        citation = attributes.citation;
7137      }
7138  
7139      if (!value || value === '<p></p>') {
7140        return { ...attributes,
7141          citation
7142        };
7143      }
7144  
7145      return { ...attributes,
7146        value: attributes.value + value,
7147        citation
7148      };
7149    },
7150  
7151    deprecated: quote_deprecated
7152  };
7153  
7154  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/gallery.js
7155  
7156  
7157  /**
7158   * WordPress dependencies
7159   */
7160  
7161  const gallery = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
7162    viewBox: "0 0 24 24",
7163    xmlns: "http://www.w3.org/2000/svg"
7164  }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
7165    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"
7166  }));
7167  /* harmony default export */ var library_gallery = (gallery);
7168  
7169  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/shared.js
7170  /**
7171   * External dependencies
7172   */
7173  
7174  function defaultColumnsNumber(attributes) {
7175    return Math.min(3, attributes.images.length);
7176  }
7177  const shared_pickRelevantMediaFiles = (image, sizeSlug = 'large') => {
7178    const imageProps = Object(external_lodash_["pick"])(image, ['alt', 'id', 'link', 'caption']);
7179    imageProps.url = Object(external_lodash_["get"])(image, ['sizes', sizeSlug, 'url']) || Object(external_lodash_["get"])(image, ['media_details', 'sizes', sizeSlug, 'source_url']) || image.url;
7180    const fullUrl = Object(external_lodash_["get"])(image, ['sizes', 'full', 'url']) || Object(external_lodash_["get"])(image, ['media_details', 'sizes', 'full', 'source_url']);
7181  
7182    if (fullUrl) {
7183      imageProps.fullUrl = fullUrl;
7184    }
7185  
7186    return imageProps;
7187  };
7188  
7189  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/deprecated.js
7190  
7191  
7192  /**
7193   * External dependencies
7194   */
7195  
7196  
7197  /**
7198   * WordPress dependencies
7199   */
7200  
7201  
7202  /**
7203   * Internal dependencies
7204   */
7205  
7206  
7207  const gallery_deprecated_deprecated = [{
7208    attributes: {
7209      images: {
7210        type: 'array',
7211        default: [],
7212        source: 'query',
7213        selector: '.blocks-gallery-item',
7214        query: {
7215          url: {
7216            type: 'string',
7217            source: 'attribute',
7218            selector: 'img',
7219            attribute: 'src'
7220          },
7221          fullUrl: {
7222            type: 'string',
7223            source: 'attribute',
7224            selector: 'img',
7225            attribute: 'data-full-url'
7226          },
7227          link: {
7228            type: 'string',
7229            source: 'attribute',
7230            selector: 'img',
7231            attribute: 'data-link'
7232          },
7233          alt: {
7234            type: 'string',
7235            source: 'attribute',
7236            selector: 'img',
7237            attribute: 'alt',
7238            default: ''
7239          },
7240          id: {
7241            type: 'string',
7242            source: 'attribute',
7243            selector: 'img',
7244            attribute: 'data-id'
7245          },
7246          caption: {
7247            type: 'string',
7248            source: 'html',
7249            selector: '.blocks-gallery-item__caption'
7250          }
7251        }
7252      },
7253      ids: {
7254        type: 'array',
7255        items: {
7256          type: 'number'
7257        },
7258        default: []
7259      },
7260      columns: {
7261        type: 'number',
7262        minimum: 1,
7263        maximum: 8
7264      },
7265      caption: {
7266        type: 'string',
7267        source: 'html',
7268        selector: '.blocks-gallery-caption'
7269      },
7270      imageCrop: {
7271        type: 'boolean',
7272        default: true
7273      },
7274      linkTo: {
7275        type: 'string',
7276        default: 'none'
7277      },
7278      sizeSlug: {
7279        type: 'string',
7280        default: 'large'
7281      }
7282    },
7283    supports: {
7284      align: true
7285    },
7286  
7287    isEligible({
7288      linkTo
7289    }) {
7290      return !linkTo || linkTo === 'attachment' || linkTo === 'media';
7291    },
7292  
7293    migrate(attributes) {
7294      let linkTo = attributes.linkTo;
7295  
7296      if (!attributes.linkTo) {
7297        linkTo = 'none';
7298      } else if (attributes.linkTo === 'attachment') {
7299        linkTo = 'post';
7300      } else if (attributes.linkTo === 'media') {
7301        linkTo = 'file';
7302      }
7303  
7304      return { ...attributes,
7305        linkTo
7306      };
7307    },
7308  
7309    save({
7310      attributes
7311    }) {
7312      const {
7313        images,
7314        columns = defaultColumnsNumber(attributes),
7315        imageCrop,
7316        caption,
7317        linkTo
7318      } = attributes;
7319      return Object(external_wp_element_["createElement"])("figure", {
7320        className: `columns-$columns} $imageCrop ? 'is-cropped' : ''}`
7321      }, Object(external_wp_element_["createElement"])("ul", {
7322        className: "blocks-gallery-grid"
7323      }, images.map(image => {
7324        let href;
7325  
7326        switch (linkTo) {
7327          case 'media':
7328            href = image.fullUrl || image.url;
7329            break;
7330  
7331          case 'attachment':
7332            href = image.link;
7333            break;
7334        }
7335  
7336        const img = Object(external_wp_element_["createElement"])("img", {
7337          src: image.url,
7338          alt: image.alt,
7339          "data-id": image.id,
7340          "data-full-url": image.fullUrl,
7341          "data-link": image.link,
7342          className: image.id ? `wp-image-$image.id}` : null
7343        });
7344        return Object(external_wp_element_["createElement"])("li", {
7345          key: image.id || image.url,
7346          className: "blocks-gallery-item"
7347        }, Object(external_wp_element_["createElement"])("figure", null, href ? Object(external_wp_element_["createElement"])("a", {
7348          href: href
7349        }, img) : img, !external_wp_blockEditor_["RichText"].isEmpty(image.caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
7350          tagName: "figcaption",
7351          className: "blocks-gallery-item__caption",
7352          value: image.caption
7353        })));
7354      })), !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
7355        tagName: "figcaption",
7356        className: "blocks-gallery-caption",
7357        value: caption
7358      }));
7359    }
7360  
7361  }, {
7362    attributes: {
7363      images: {
7364        type: 'array',
7365        default: [],
7366        source: 'query',
7367        selector: '.blocks-gallery-item',
7368        query: {
7369          url: {
7370            source: 'attribute',
7371            selector: 'img',
7372            attribute: 'src'
7373          },
7374          fullUrl: {
7375            source: 'attribute',
7376            selector: 'img',
7377            attribute: 'data-full-url'
7378          },
7379          link: {
7380            source: 'attribute',
7381            selector: 'img',
7382            attribute: 'data-link'
7383          },
7384          alt: {
7385            source: 'attribute',
7386            selector: 'img',
7387            attribute: 'alt',
7388            default: ''
7389          },
7390          id: {
7391            source: 'attribute',
7392            selector: 'img',
7393            attribute: 'data-id'
7394          },
7395          caption: {
7396            type: 'string',
7397            source: 'html',
7398            selector: '.blocks-gallery-item__caption'
7399          }
7400        }
7401      },
7402      ids: {
7403        type: 'array',
7404        default: []
7405      },
7406      columns: {
7407        type: 'number'
7408      },
7409      caption: {
7410        type: 'string',
7411        source: 'html',
7412        selector: '.blocks-gallery-caption'
7413      },
7414      imageCrop: {
7415        type: 'boolean',
7416        default: true
7417      },
7418      linkTo: {
7419        type: 'string',
7420        default: 'none'
7421      }
7422    },
7423    supports: {
7424      align: true
7425    },
7426  
7427    isEligible({
7428      ids
7429    }) {
7430      return ids && ids.some(id => typeof id === 'string');
7431    },
7432  
7433    migrate(attributes) {
7434      return { ...attributes,
7435        ids: Object(external_lodash_["map"])(attributes.ids, id => {
7436          const parsedId = parseInt(id, 10);
7437          return Number.isInteger(parsedId) ? parsedId : null;
7438        })
7439      };
7440    },
7441  
7442    save({
7443      attributes
7444    }) {
7445      const {
7446        images,
7447        columns = defaultColumnsNumber(attributes),
7448        imageCrop,
7449        caption,
7450        linkTo
7451      } = attributes;
7452      return Object(external_wp_element_["createElement"])("figure", {
7453        className: `columns-$columns} $imageCrop ? 'is-cropped' : ''}`
7454      }, Object(external_wp_element_["createElement"])("ul", {
7455        className: "blocks-gallery-grid"
7456      }, images.map(image => {
7457        let href;
7458  
7459        switch (linkTo) {
7460          case 'media':
7461            href = image.fullUrl || image.url;
7462            break;
7463  
7464          case 'attachment':
7465            href = image.link;
7466            break;
7467        }
7468  
7469        const img = Object(external_wp_element_["createElement"])("img", {
7470          src: image.url,
7471          alt: image.alt,
7472          "data-id": image.id,
7473          "data-full-url": image.fullUrl,
7474          "data-link": image.link,
7475          className: image.id ? `wp-image-$image.id}` : null
7476        });
7477        return Object(external_wp_element_["createElement"])("li", {
7478          key: image.id || image.url,
7479          className: "blocks-gallery-item"
7480        }, Object(external_wp_element_["createElement"])("figure", null, href ? Object(external_wp_element_["createElement"])("a", {
7481          href: href
7482        }, img) : img, !external_wp_blockEditor_["RichText"].isEmpty(image.caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
7483          tagName: "figcaption",
7484          className: "blocks-gallery-item__caption",
7485          value: image.caption
7486        })));
7487      })), !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
7488        tagName: "figcaption",
7489        className: "blocks-gallery-caption",
7490        value: caption
7491      }));
7492    }
7493  
7494  }, {
7495    attributes: {
7496      images: {
7497        type: 'array',
7498        default: [],
7499        source: 'query',
7500        selector: 'ul.wp-block-gallery .blocks-gallery-item',
7501        query: {
7502          url: {
7503            source: 'attribute',
7504            selector: 'img',
7505            attribute: 'src'
7506          },
7507          fullUrl: {
7508            source: 'attribute',
7509            selector: 'img',
7510            attribute: 'data-full-url'
7511          },
7512          alt: {
7513            source: 'attribute',
7514            selector: 'img',
7515            attribute: 'alt',
7516            default: ''
7517          },
7518          id: {
7519            source: 'attribute',
7520            selector: 'img',
7521            attribute: 'data-id'
7522          },
7523          link: {
7524            source: 'attribute',
7525            selector: 'img',
7526            attribute: 'data-link'
7527          },
7528          caption: {
7529            type: 'array',
7530            source: 'children',
7531            selector: 'figcaption'
7532          }
7533        }
7534      },
7535      ids: {
7536        type: 'array',
7537        default: []
7538      },
7539      columns: {
7540        type: 'number'
7541      },
7542      imageCrop: {
7543        type: 'boolean',
7544        default: true
7545      },
7546      linkTo: {
7547        type: 'string',
7548        default: 'none'
7549      }
7550    },
7551    supports: {
7552      align: true
7553    },
7554  
7555    save({
7556      attributes
7557    }) {
7558      const {
7559        images,
7560        columns = defaultColumnsNumber(attributes),
7561        imageCrop,
7562        linkTo
7563      } = attributes;
7564      return Object(external_wp_element_["createElement"])("ul", {
7565        className: `columns-$columns} $imageCrop ? 'is-cropped' : ''}`
7566      }, images.map(image => {
7567        let href;
7568  
7569        switch (linkTo) {
7570          case 'media':
7571            href = image.fullUrl || image.url;
7572            break;
7573  
7574          case 'attachment':
7575            href = image.link;
7576            break;
7577        }
7578  
7579        const img = Object(external_wp_element_["createElement"])("img", {
7580          src: image.url,
7581          alt: image.alt,
7582          "data-id": image.id,
7583          "data-full-url": image.fullUrl,
7584          "data-link": image.link,
7585          className: image.id ? `wp-image-$image.id}` : null
7586        });
7587        return Object(external_wp_element_["createElement"])("li", {
7588          key: image.id || image.url,
7589          className: "blocks-gallery-item"
7590        }, Object(external_wp_element_["createElement"])("figure", null, href ? Object(external_wp_element_["createElement"])("a", {
7591          href: href
7592        }, img) : img, image.caption && image.caption.length > 0 && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
7593          tagName: "figcaption",
7594          value: image.caption
7595        })));
7596      }));
7597    }
7598  
7599  }, {
7600    attributes: {
7601      images: {
7602        type: 'array',
7603        default: [],
7604        source: 'query',
7605        selector: 'ul.wp-block-gallery .blocks-gallery-item',
7606        query: {
7607          url: {
7608            source: 'attribute',
7609            selector: 'img',
7610            attribute: 'src'
7611          },
7612          alt: {
7613            source: 'attribute',
7614            selector: 'img',
7615            attribute: 'alt',
7616            default: ''
7617          },
7618          id: {
7619            source: 'attribute',
7620            selector: 'img',
7621            attribute: 'data-id'
7622          },
7623          link: {
7624            source: 'attribute',
7625            selector: 'img',
7626            attribute: 'data-link'
7627          },
7628          caption: {
7629            type: 'array',
7630            source: 'children',
7631            selector: 'figcaption'
7632          }
7633        }
7634      },
7635      columns: {
7636        type: 'number'
7637      },
7638      imageCrop: {
7639        type: 'boolean',
7640        default: true
7641      },
7642      linkTo: {
7643        type: 'string',
7644        default: 'none'
7645      }
7646    },
7647  
7648    isEligible({
7649      images,
7650      ids
7651    }) {
7652      return images && images.length > 0 && (!ids && images || ids && images && ids.length !== images.length || Object(external_lodash_["some"])(images, (id, index) => {
7653        if (!id && ids[index] !== null) {
7654          return true;
7655        }
7656  
7657        return parseInt(id, 10) !== ids[index];
7658      }));
7659    },
7660  
7661    migrate(attributes) {
7662      return { ...attributes,
7663        ids: Object(external_lodash_["map"])(attributes.images, ({
7664          id
7665        }) => {
7666          if (!id) {
7667            return null;
7668          }
7669  
7670          return parseInt(id, 10);
7671        })
7672      };
7673    },
7674  
7675    supports: {
7676      align: true
7677    },
7678  
7679    save({
7680      attributes
7681    }) {
7682      const {
7683        images,
7684        columns = defaultColumnsNumber(attributes),
7685        imageCrop,
7686        linkTo
7687      } = attributes;
7688      return Object(external_wp_element_["createElement"])("ul", {
7689        className: `columns-$columns} $imageCrop ? 'is-cropped' : ''}`
7690      }, images.map(image => {
7691        let href;
7692  
7693        switch (linkTo) {
7694          case 'media':
7695            href = image.url;
7696            break;
7697  
7698          case 'attachment':
7699            href = image.link;
7700            break;
7701        }
7702  
7703        const img = Object(external_wp_element_["createElement"])("img", {
7704          src: image.url,
7705          alt: image.alt,
7706          "data-id": image.id,
7707          "data-link": image.link,
7708          className: image.id ? `wp-image-$image.id}` : null
7709        });
7710        return Object(external_wp_element_["createElement"])("li", {
7711          key: image.id || image.url,
7712          className: "blocks-gallery-item"
7713        }, Object(external_wp_element_["createElement"])("figure", null, href ? Object(external_wp_element_["createElement"])("a", {
7714          href: href
7715        }, img) : img, image.caption && image.caption.length > 0 && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
7716          tagName: "figcaption",
7717          value: image.caption
7718        })));
7719      }));
7720    }
7721  
7722  }, {
7723    attributes: {
7724      images: {
7725        type: 'array',
7726        default: [],
7727        source: 'query',
7728        selector: 'div.wp-block-gallery figure.blocks-gallery-image img',
7729        query: {
7730          url: {
7731            source: 'attribute',
7732            attribute: 'src'
7733          },
7734          alt: {
7735            source: 'attribute',
7736            attribute: 'alt',
7737            default: ''
7738          },
7739          id: {
7740            source: 'attribute',
7741            attribute: 'data-id'
7742          }
7743        }
7744      },
7745      columns: {
7746        type: 'number'
7747      },
7748      imageCrop: {
7749        type: 'boolean',
7750        default: true
7751      },
7752      linkTo: {
7753        type: 'string',
7754        default: 'none'
7755      },
7756      align: {
7757        type: 'string',
7758        default: 'none'
7759      }
7760    },
7761    supports: {
7762      align: true
7763    },
7764  
7765    save({
7766      attributes
7767    }) {
7768      const {
7769        images,
7770        columns = defaultColumnsNumber(attributes),
7771        align,
7772        imageCrop,
7773        linkTo
7774      } = attributes;
7775      const className = classnames_default()(`columns-$columns}`, {
7776        alignnone: align === 'none',
7777        'is-cropped': imageCrop
7778      });
7779      return Object(external_wp_element_["createElement"])("div", {
7780        className: className
7781      }, images.map(image => {
7782        let href;
7783  
7784        switch (linkTo) {
7785          case 'media':
7786            href = image.url;
7787            break;
7788  
7789          case 'attachment':
7790            href = image.link;
7791            break;
7792        }
7793  
7794        const img = Object(external_wp_element_["createElement"])("img", {
7795          src: image.url,
7796          alt: image.alt,
7797          "data-id": image.id
7798        });
7799        return Object(external_wp_element_["createElement"])("figure", {
7800          key: image.id || image.url,
7801          className: "blocks-gallery-image"
7802        }, href ? Object(external_wp_element_["createElement"])("a", {
7803          href: href
7804        }, img) : img);
7805      }));
7806    }
7807  
7808  }];
7809  /* harmony default export */ var gallery_deprecated = (gallery_deprecated_deprecated);
7810  
7811  // EXTERNAL MODULE: external ["wp","viewport"]
7812  var external_wp_viewport_ = __webpack_require__("KEfo");
7813  
7814  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/shared-icon.js
7815  
7816  
7817  /**
7818   * WordPress dependencies
7819   */
7820  
7821  
7822  const sharedIcon = Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockIcon"], {
7823    icon: library_gallery
7824  });
7825  
7826  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-left.js
7827  var chevron_left = __webpack_require__("2gm7");
7828  
7829  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-right.js
7830  var chevron_right = __webpack_require__("1iEr");
7831  
7832  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/edit.js + 1 modules
7833  var library_edit = __webpack_require__("B9Az");
7834  
7835  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close-small.js
7836  var close_small = __webpack_require__("bWcr");
7837  
7838  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/constants.js
7839  const constants_LINK_DESTINATION_NONE = 'none';
7840  const constants_LINK_DESTINATION_MEDIA = 'file';
7841  const constants_LINK_DESTINATION_ATTACHMENT = 'post';
7842  
7843  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/gallery-image.js
7844  
7845  
7846  /**
7847   * External dependencies
7848   */
7849  
7850  
7851  /**
7852   * WordPress dependencies
7853   */
7854  
7855  
7856  
7857  
7858  
7859  
7860  
7861  
7862  
7863  
7864  
7865  /**
7866   * Internal dependencies
7867   */
7868  
7869  
7870  
7871  
7872  const gallery_image_isTemporaryImage = (id, url) => !id && Object(external_wp_blob_["isBlobURL"])(url);
7873  
7874  class gallery_image_GalleryImage extends external_wp_element_["Component"] {
7875    constructor() {
7876      super(...arguments);
7877      this.onSelectImage = this.onSelectImage.bind(this);
7878      this.onRemoveImage = this.onRemoveImage.bind(this);
7879      this.bindContainer = this.bindContainer.bind(this);
7880      this.onEdit = this.onEdit.bind(this);
7881      this.onSelectImageFromLibrary = this.onSelectImageFromLibrary.bind(this);
7882      this.onSelectCustomURL = this.onSelectCustomURL.bind(this);
7883      this.state = {
7884        isEditing: false
7885      };
7886    }
7887  
7888    bindContainer(ref) {
7889      this.container = ref;
7890    }
7891  
7892    onSelectImage() {
7893      if (!this.props.isSelected) {
7894        this.props.onSelect();
7895      }
7896    }
7897  
7898    onRemoveImage(event) {
7899      if (this.container === this.container.ownerDocument.activeElement && this.props.isSelected && [external_wp_keycodes_["BACKSPACE"], external_wp_keycodes_["DELETE"]].indexOf(event.keyCode) !== -1) {
7900        event.stopPropagation();
7901        event.preventDefault();
7902        this.props.onRemove();
7903      }
7904    }
7905  
7906    onEdit() {
7907      this.setState({
7908        isEditing: true
7909      });
7910    }
7911  
7912    componentDidUpdate() {
7913      const {
7914        image,
7915        url,
7916        __unstableMarkNextChangeAsNotPersistent
7917      } = this.props;
7918  
7919      if (image && !url) {
7920        __unstableMarkNextChangeAsNotPersistent();
7921  
7922        this.props.setAttributes({
7923          url: image.source_url,
7924          alt: image.alt_text
7925        });
7926      }
7927    }
7928  
7929    deselectOnBlur() {
7930      this.props.onDeselect();
7931    }
7932  
7933    onSelectImageFromLibrary(media) {
7934      const {
7935        setAttributes,
7936        id,
7937        url,
7938        alt,
7939        caption,
7940        sizeSlug
7941      } = this.props;
7942  
7943      if (!media || !media.url) {
7944        return;
7945      }
7946  
7947      let mediaAttributes = shared_pickRelevantMediaFiles(media, sizeSlug); // If the current image is temporary but an alt text was meanwhile
7948      // written by the user, make sure the text is not overwritten.
7949  
7950      if (gallery_image_isTemporaryImage(id, url)) {
7951        if (alt) {
7952          mediaAttributes = Object(external_lodash_["omit"])(mediaAttributes, ['alt']);
7953        }
7954      } // If a caption text was meanwhile written by the user,
7955      // make sure the text is not overwritten by empty captions.
7956  
7957  
7958      if (caption && !Object(external_lodash_["get"])(mediaAttributes, ['caption'])) {
7959        mediaAttributes = Object(external_lodash_["omit"])(mediaAttributes, ['caption']);
7960      }
7961  
7962      setAttributes(mediaAttributes);
7963      this.setState({
7964        isEditing: false
7965      });
7966    }
7967  
7968    onSelectCustomURL(newURL) {
7969      const {
7970        setAttributes,
7971        url
7972      } = this.props;
7973  
7974      if (newURL !== url) {
7975        setAttributes({
7976          url: newURL,
7977          id: undefined
7978        });
7979        this.setState({
7980          isEditing: false
7981        });
7982      }
7983    }
7984  
7985    render() {
7986      const {
7987        url,
7988        alt,
7989        id,
7990        linkTo,
7991        link,
7992        isFirstItem,
7993        isLastItem,
7994        isSelected,
7995        caption,
7996        onRemove,
7997        onMoveForward,
7998        onMoveBackward,
7999        setAttributes,
8000        'aria-label': ariaLabel
8001      } = this.props;
8002      const {
8003        isEditing
8004      } = this.state;
8005      let href;
8006  
8007      switch (linkTo) {
8008        case constants_LINK_DESTINATION_MEDIA:
8009          href = url;
8010          break;
8011  
8012        case constants_LINK_DESTINATION_ATTACHMENT:
8013          href = link;
8014          break;
8015      }
8016  
8017      const img = // Disable reason: Image itself is not meant to be interactive, but should
8018      // direct image selection and unfocus caption fields.
8019  
8020      /* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
8021      Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("img", {
8022        src: url,
8023        alt: alt,
8024        "data-id": id,
8025        onKeyDown: this.onRemoveImage,
8026        tabIndex: "0",
8027        "aria-label": ariaLabel,
8028        ref: this.bindContainer
8029      }), Object(external_wp_blob_["isBlobURL"])(url) && Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null))
8030      /* eslint-enable jsx-a11y/no-noninteractive-element-interactions */
8031      ;
8032      const className = classnames_default()({
8033        'is-selected': isSelected,
8034        'is-transient': Object(external_wp_blob_["isBlobURL"])(url)
8035      });
8036      return (// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
8037        Object(external_wp_element_["createElement"])("figure", {
8038          className: className,
8039          onClick: this.onSelectImage,
8040          onFocus: this.onSelectImage
8041        }, !isEditing && (href ? Object(external_wp_element_["createElement"])("a", {
8042          href: href
8043        }, img) : img), isEditing && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaPlaceholder"], {
8044          labels: {
8045            title: Object(external_wp_i18n_["__"])('Edit gallery image')
8046          },
8047          icon: library_image,
8048          onSelect: this.onSelectImageFromLibrary,
8049          onSelectURL: this.onSelectCustomURL,
8050          accept: "image/*",
8051          allowedTypes: ['image'],
8052          value: {
8053            id,
8054            src: url
8055          }
8056        }), Object(external_wp_element_["createElement"])(external_wp_components_["ButtonGroup"], {
8057          className: "block-library-gallery-item__inline-menu is-left"
8058        }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
8059          icon: chevron_left["a" /* default */],
8060          onClick: isFirstItem ? undefined : onMoveBackward,
8061          label: Object(external_wp_i18n_["__"])('Move image backward'),
8062          "aria-disabled": isFirstItem,
8063          disabled: !isSelected
8064        }), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
8065          icon: chevron_right["a" /* default */],
8066          onClick: isLastItem ? undefined : onMoveForward,
8067          label: Object(external_wp_i18n_["__"])('Move image forward'),
8068          "aria-disabled": isLastItem,
8069          disabled: !isSelected
8070        })), Object(external_wp_element_["createElement"])(external_wp_components_["ButtonGroup"], {
8071          className: "block-library-gallery-item__inline-menu is-right"
8072        }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
8073          icon: library_edit["a" /* default */],
8074          onClick: this.onEdit,
8075          label: Object(external_wp_i18n_["__"])('Replace image'),
8076          disabled: !isSelected
8077        }), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
8078          icon: close_small["a" /* default */],
8079          onClick: onRemove,
8080          label: Object(external_wp_i18n_["__"])('Remove image'),
8081          disabled: !isSelected
8082        })), !isEditing && (isSelected || caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], {
8083          tagName: "figcaption",
8084          "aria-label": Object(external_wp_i18n_["__"])('Image caption text'),
8085          placeholder: isSelected ? Object(external_wp_i18n_["__"])('Add caption') : null,
8086          value: caption,
8087          onChange: newCaption => setAttributes({
8088            caption: newCaption
8089          }),
8090          inlineToolbar: true
8091        }))
8092      );
8093    }
8094  
8095  }
8096  
8097  /* harmony default export */ var gallery_image = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])((select, ownProps) => {
8098    const {
8099      getMedia
8100    } = select(external_wp_coreData_["store"]);
8101    const {
8102      id
8103    } = ownProps;
8104    return {
8105      image: id ? getMedia(parseInt(id, 10)) : null
8106    };
8107  }), Object(external_wp_data_["withDispatch"])(dispatch => {
8108    const {
8109      __unstableMarkNextChangeAsNotPersistent
8110    } = dispatch(external_wp_blockEditor_["store"]);
8111    return {
8112      __unstableMarkNextChangeAsNotPersistent
8113    };
8114  })])(gallery_image_GalleryImage));
8115  
8116  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/gallery.js
8117  
8118  
8119  
8120  /**
8121   * External dependencies
8122   */
8123  
8124  /**
8125   * WordPress dependencies
8126   */
8127  
8128  
8129  
8130  
8131  
8132  /**
8133   * Internal dependencies
8134   */
8135  
8136  
8137  
8138  const Gallery = props => {
8139    const {
8140      attributes,
8141      isSelected,
8142      setAttributes,
8143      selectedImage,
8144      mediaPlaceholder,
8145      onMoveBackward,
8146      onMoveForward,
8147      onRemoveImage,
8148      onSelectImage,
8149      onDeselectImage,
8150      onSetImageAttributes,
8151      insertBlocksAfter,
8152      blockProps
8153    } = props;
8154    const {
8155      align,
8156      columns = defaultColumnsNumber(attributes),
8157      caption,
8158      imageCrop,
8159      images
8160    } = attributes;
8161    return Object(external_wp_element_["createElement"])("figure", Object(esm_extends["a" /* default */])({}, blockProps, {
8162      className: classnames_default()(blockProps.className, {
8163        [`align$align}`]: align,
8164        [`columns-$columns}`]: columns,
8165        'is-cropped': imageCrop
8166      })
8167    }), Object(external_wp_element_["createElement"])("ul", {
8168      className: "blocks-gallery-grid"
8169    }, images.map((img, index) => {
8170      const ariaLabel = Object(external_wp_i18n_["sprintf"])(
8171      /* translators: 1: the order number of the image. 2: the total number of images. */
8172      Object(external_wp_i18n_["__"])('image %1$d of %2$d in gallery'), index + 1, images.length);
8173      return Object(external_wp_element_["createElement"])("li", {
8174        className: "blocks-gallery-item",
8175        key: img.id ? `$img.id}-$index}` : img.url
8176      }, Object(external_wp_element_["createElement"])(gallery_image, {
8177        url: img.url,
8178        alt: img.alt,
8179        id: img.id,
8180        isFirstItem: index === 0,
8181        isLastItem: index + 1 === images.length,
8182        isSelected: isSelected && selectedImage === index,
8183        onMoveBackward: onMoveBackward(index),
8184        onMoveForward: onMoveForward(index),
8185        onRemove: onRemoveImage(index),
8186        onSelect: onSelectImage(index),
8187        onDeselect: onDeselectImage(index),
8188        setAttributes: attrs => onSetImageAttributes(index, attrs),
8189        caption: img.caption,
8190        "aria-label": ariaLabel,
8191        sizeSlug: attributes.sizeSlug
8192      }));
8193    })), mediaPlaceholder, Object(external_wp_element_["createElement"])(RichTextVisibilityHelper, {
8194      isHidden: !isSelected && external_wp_blockEditor_["RichText"].isEmpty(caption),
8195      tagName: "figcaption",
8196      className: "blocks-gallery-caption",
8197      "aria-label": Object(external_wp_i18n_["__"])('Gallery caption text'),
8198      placeholder: Object(external_wp_i18n_["__"])('Write gallery caption…'),
8199      value: caption,
8200      onChange: value => setAttributes({
8201        caption: value
8202      }),
8203      inlineToolbar: true,
8204      __unstableOnSplitAtEnd: () => insertBlocksAfter(Object(external_wp_blocks_["createBlock"])('core/paragraph'))
8205    }));
8206  };
8207  
8208  function RichTextVisibilityHelper({
8209    isHidden,
8210    ...richTextProps
8211  }) {
8212    return isHidden ? Object(external_wp_element_["createElement"])(external_wp_components_["VisuallyHidden"], Object(esm_extends["a" /* default */])({
8213      as: external_wp_blockEditor_["RichText"]
8214    }, richTextProps)) : Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], richTextProps);
8215  }
8216  
8217  /* harmony default export */ var gallery_gallery = (Gallery);
8218  
8219  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/edit.js
8220  
8221  
8222  
8223  /**
8224   * External dependencies
8225   */
8226  
8227  /**
8228   * WordPress dependencies
8229   */
8230  
8231  
8232  
8233  
8234  
8235  
8236  
8237  
8238  
8239  
8240  
8241  /**
8242   * Internal dependencies
8243   */
8244  
8245  
8246  
8247  
8248  
8249  const MAX_COLUMNS = 8;
8250  const linkOptions = [{
8251    value: constants_LINK_DESTINATION_ATTACHMENT,
8252    label: Object(external_wp_i18n_["__"])('Attachment Page')
8253  }, {
8254    value: constants_LINK_DESTINATION_MEDIA,
8255    label: Object(external_wp_i18n_["__"])('Media File')
8256  }, {
8257    value: constants_LINK_DESTINATION_NONE,
8258    label: Object(external_wp_i18n_["__"])('None')
8259  }];
8260  const edit_ALLOWED_MEDIA_TYPES = ['image'];
8261  const PLACEHOLDER_TEXT = external_wp_element_["Platform"].select({
8262    web: Object(external_wp_i18n_["__"])('Drag images, upload new ones or select files from your library.'),
8263    native: Object(external_wp_i18n_["__"])('ADD MEDIA')
8264  });
8265  const MOBILE_CONTROL_PROPS_RANGE_CONTROL = external_wp_element_["Platform"].select({
8266    web: {},
8267    native: {
8268      type: 'stepper'
8269    }
8270  });
8271  
8272  function GalleryEdit(props) {
8273    const {
8274      attributes,
8275      clientId,
8276      isSelected,
8277      noticeUI,
8278      noticeOperations,
8279      onFocus
8280    } = props;
8281    const {
8282      columns = defaultColumnsNumber(attributes),
8283      imageCrop,
8284      images,
8285      linkTo,
8286      sizeSlug
8287    } = attributes;
8288    const [selectedImage, setSelectedImage] = Object(external_wp_element_["useState"])();
8289    const [attachmentCaptions, setAttachmentCaptions] = Object(external_wp_element_["useState"])();
8290    const {
8291      __unstableMarkNextChangeAsNotPersistent
8292    } = Object(external_wp_data_["useDispatch"])(external_wp_blockEditor_["store"]);
8293    const {
8294      imageSizes,
8295      mediaUpload,
8296      getMedia,
8297      wasBlockJustInserted
8298    } = Object(external_wp_data_["useSelect"])(select => {
8299      const settings = select(external_wp_blockEditor_["store"]).getSettings();
8300      return {
8301        imageSizes: settings.imageSizes,
8302        mediaUpload: settings.mediaUpload,
8303        getMedia: select(external_wp_coreData_["store"]).getMedia,
8304        wasBlockJustInserted: select(external_wp_blockEditor_["store"]).wasBlockJustInserted(clientId, 'inserter_menu')
8305      };
8306    });
8307    const resizedImages = Object(external_wp_element_["useMemo"])(() => {
8308      if (isSelected) {
8309        return Object(external_lodash_["reduce"])(attributes.ids, (currentResizedImages, id) => {
8310          if (!id) {
8311            return currentResizedImages;
8312          }
8313  
8314          const image = getMedia(id);
8315          const sizes = Object(external_lodash_["reduce"])(imageSizes, (currentSizes, size) => {
8316            const defaultUrl = Object(external_lodash_["get"])(image, ['sizes', size.slug, 'url']);
8317            const mediaDetailsUrl = Object(external_lodash_["get"])(image, ['media_details', 'sizes', size.slug, 'source_url']);
8318            return { ...currentSizes,
8319              [size.slug]: defaultUrl || mediaDetailsUrl
8320            };
8321          }, {});
8322          return { ...currentResizedImages,
8323            [parseInt(id, 10)]: sizes
8324          };
8325        }, {});
8326      }
8327  
8328      return {};
8329    }, [isSelected, attributes.ids, imageSizes]);
8330  
8331    function onFocusGalleryCaption() {
8332      setSelectedImage();
8333    }
8334  
8335    function setAttributes(newAttrs) {
8336      if (newAttrs.ids) {
8337        throw new Error('The "ids" attribute should not be changed directly. It is managed automatically when "images" attribute changes');
8338      }
8339  
8340      if (newAttrs.images) {
8341        newAttrs = { ...newAttrs,
8342          // Unlike images[ n ].id which is a string, always ensure the
8343          // ids array contains numbers as per its attribute type.
8344          ids: Object(external_lodash_["map"])(newAttrs.images, ({
8345            id
8346          }) => parseInt(id, 10))
8347        };
8348      }
8349  
8350      props.setAttributes(newAttrs);
8351    }
8352  
8353    function onSelectImage(index) {
8354      return () => {
8355        setSelectedImage(index);
8356      };
8357    }
8358  
8359    function onDeselectImage() {
8360      return () => {
8361        setSelectedImage();
8362      };
8363    }
8364  
8365    function onMove(oldIndex, newIndex) {
8366      const newImages = [...images];
8367      newImages.splice(newIndex, 1, images[oldIndex]);
8368      newImages.splice(oldIndex, 1, images[newIndex]);
8369      setSelectedImage(newIndex);
8370      setAttributes({
8371        images: newImages
8372      });
8373    }
8374  
8375    function onMoveForward(oldIndex) {
8376      return () => {
8377        if (oldIndex === images.length - 1) {
8378          return;
8379        }
8380  
8381        onMove(oldIndex, oldIndex + 1);
8382      };
8383    }
8384  
8385    function onMoveBackward(oldIndex) {
8386      return () => {
8387        if (oldIndex === 0) {
8388          return;
8389        }
8390  
8391        onMove(oldIndex, oldIndex - 1);
8392      };
8393    }
8394  
8395    function onRemoveImage(index) {
8396      return () => {
8397        const newImages = Object(external_lodash_["filter"])(images, (img, i) => index !== i);
8398        setSelectedImage();
8399        setAttributes({
8400          images: newImages,
8401          columns: attributes.columns ? Math.min(newImages.length, attributes.columns) : attributes.columns
8402        });
8403      };
8404    }
8405  
8406    function selectCaption(newImage) {
8407      // The image id in both the images and attachmentCaptions arrays is a
8408      // string, so ensure comparison works correctly by converting the
8409      // newImage.id to a string.
8410      const newImageId = Object(external_lodash_["toString"])(newImage.id);
8411      const currentImage = Object(external_lodash_["find"])(images, {
8412        id: newImageId
8413      });
8414      const currentImageCaption = currentImage ? currentImage.caption : newImage.caption;
8415  
8416      if (!attachmentCaptions) {
8417        return currentImageCaption;
8418      }
8419  
8420      const attachment = Object(external_lodash_["find"])(attachmentCaptions, {
8421        id: newImageId
8422      }); // if the attachment caption is updated
8423  
8424      if (attachment && attachment.caption !== newImage.caption) {
8425        return newImage.caption;
8426      }
8427  
8428      return currentImageCaption;
8429    }
8430  
8431    function onSelectImages(newImages) {
8432      setAttachmentCaptions(newImages.map(newImage => ({
8433        // Store the attachmentCaption id as a string for consistency
8434        // with the type of the id in the images attribute.
8435        id: Object(external_lodash_["toString"])(newImage.id),
8436        caption: newImage.caption
8437      })));
8438      setAttributes({
8439        images: newImages.map(newImage => ({ ...shared_pickRelevantMediaFiles(newImage, sizeSlug),
8440          caption: selectCaption(newImage, images, attachmentCaptions),
8441          // The id value is stored in a data attribute, so when the
8442          // block is parsed it's converted to a string. Converting
8443          // to a string here ensures it's type is consistent.
8444          id: Object(external_lodash_["toString"])(newImage.id)
8445        })),
8446        columns: attributes.columns ? Math.min(newImages.length, attributes.columns) : attributes.columns
8447      });
8448    }
8449  
8450    function onUploadError(message) {
8451      noticeOperations.removeAllNotices();
8452      noticeOperations.createErrorNotice(message);
8453    }
8454  
8455    function setLinkTo(value) {
8456      setAttributes({
8457        linkTo: value
8458      });
8459    }
8460  
8461    function setColumnsNumber(value) {
8462      setAttributes({
8463        columns: value
8464      });
8465    }
8466  
8467    function toggleImageCrop() {
8468      setAttributes({
8469        imageCrop: !imageCrop
8470      });
8471    }
8472  
8473    function getImageCropHelp(checked) {
8474      return checked ? Object(external_wp_i18n_["__"])('Thumbnails are cropped to align.') : Object(external_wp_i18n_["__"])('Thumbnails are not cropped.');
8475    }
8476  
8477    function setImageAttributes(index, newAttributes) {
8478      if (!images[index]) {
8479        return;
8480      }
8481  
8482      setAttributes({
8483        images: [...images.slice(0, index), { ...images[index],
8484          ...newAttributes
8485        }, ...images.slice(index + 1)]
8486      });
8487    }
8488  
8489    function getImagesSizeOptions() {
8490      return Object(external_lodash_["map"])(Object(external_lodash_["filter"])(imageSizes, ({
8491        slug
8492      }) => Object(external_lodash_["some"])(resizedImages, sizes => sizes[slug])), ({
8493        name,
8494        slug
8495      }) => ({
8496        value: slug,
8497        label: name
8498      }));
8499    }
8500  
8501    function updateImagesSize(newSizeSlug) {
8502      const updatedImages = Object(external_lodash_["map"])(images, image => {
8503        if (!image.id) {
8504          return image;
8505        }
8506  
8507        const url = Object(external_lodash_["get"])(resizedImages, [parseInt(image.id, 10), newSizeSlug]);
8508        return { ...image,
8509          ...(url && {
8510            url
8511          })
8512        };
8513      });
8514      setAttributes({
8515        images: updatedImages,
8516        sizeSlug: newSizeSlug
8517      });
8518    }
8519  
8520    Object(external_wp_element_["useEffect"])(() => {
8521      if (external_wp_element_["Platform"].OS === 'web' && images && images.length > 0 && Object(external_lodash_["every"])(images, ({
8522        url
8523      }) => Object(external_wp_blob_["isBlobURL"])(url))) {
8524        const filesList = Object(external_lodash_["map"])(images, ({
8525          url
8526        }) => Object(external_wp_blob_["getBlobByURL"])(url));
8527        Object(external_lodash_["forEach"])(images, ({
8528          url
8529        }) => Object(external_wp_blob_["revokeBlobURL"])(url));
8530        mediaUpload({
8531          filesList,
8532          onFileChange: onSelectImages,
8533          allowedTypes: ['image']
8534        });
8535      }
8536    }, []);
8537    Object(external_wp_element_["useEffect"])(() => {
8538      // Deselect images when deselecting the block
8539      if (!isSelected) {
8540        setSelectedImage();
8541      }
8542    }, [isSelected]);
8543    Object(external_wp_element_["useEffect"])(() => {
8544      // linkTo attribute must be saved so blocks don't break when changing
8545      // image_default_link_type in options.php
8546      if (!linkTo) {
8547        var _window, _window$wp, _window$wp$media, _window$wp$media$view, _window$wp$media$view2, _window$wp$media$view3;
8548  
8549        __unstableMarkNextChangeAsNotPersistent();
8550  
8551        setAttributes({
8552          linkTo: ((_window = window) === null || _window === void 0 ? void 0 : (_window$wp = _window.wp) === null || _window$wp === void 0 ? void 0 : (_window$wp$media = _window$wp.media) === null || _window$wp$media === void 0 ? void 0 : (_window$wp$media$view = _window$wp$media.view) === null || _window$wp$media$view === void 0 ? void 0 : (_window$wp$media$view2 = _window$wp$media$view.settings) === null || _window$wp$media$view2 === void 0 ? void 0 : (_window$wp$media$view3 = _window$wp$media$view2.defaultProps) === null || _window$wp$media$view3 === void 0 ? void 0 : _window$wp$media$view3.link) || constants_LINK_DESTINATION_NONE
8553        });
8554      }
8555    }, [linkTo]);
8556    const hasImages = !!images.length;
8557    const hasImageIds = hasImages && images.some(image => !!image.id);
8558    const mediaPlaceholder = Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaPlaceholder"], {
8559      addToGallery: hasImageIds,
8560      isAppender: hasImages,
8561      disableMediaButtons: hasImages && !isSelected,
8562      icon: !hasImages && sharedIcon,
8563      labels: {
8564        title: !hasImages && Object(external_wp_i18n_["__"])('Gallery'),
8565        instructions: !hasImages && PLACEHOLDER_TEXT
8566      },
8567      onSelect: onSelectImages,
8568      accept: "image/*",
8569      allowedTypes: edit_ALLOWED_MEDIA_TYPES,
8570      multiple: true,
8571      value: hasImageIds ? images : {},
8572      onError: onUploadError,
8573      notices: hasImages ? undefined : noticeUI,
8574      onFocus: onFocus,
8575      autoOpenMediaUpload: !hasImages && isSelected && wasBlockJustInserted
8576    });
8577    const blockProps = Object(external_wp_blockEditor_["useBlockProps"])();
8578  
8579    if (!hasImages) {
8580      return Object(external_wp_element_["createElement"])(external_wp_primitives_["View"], blockProps, mediaPlaceholder);
8581    }
8582  
8583    const imageSizeOptions = getImagesSizeOptions();
8584    const shouldShowSizeOptions = hasImages && !Object(external_lodash_["isEmpty"])(imageSizeOptions);
8585    return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], {
8586      title: Object(external_wp_i18n_["__"])('Gallery settings')
8587    }, images.length > 1 && Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], Object(esm_extends["a" /* default */])({
8588      label: Object(external_wp_i18n_["__"])('Columns'),
8589      value: columns,
8590      onChange: setColumnsNumber,
8591      min: 1,
8592      max: Math.min(MAX_COLUMNS, images.length)
8593    }, MOBILE_CONTROL_PROPS_RANGE_CONTROL, {
8594      required: true
8595    })), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], {
8596      label: Object(external_wp_i18n_["__"])('Crop images'),
8597      checked: !!imageCrop,
8598      onChange: toggleImageCrop,
8599      help: getImageCropHelp
8600    }), Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], {
8601      label: Object(external_wp_i18n_["__"])('Link to'),
8602      value: linkTo,
8603      onChange: setLinkTo,
8604      options: linkOptions,
8605      hideCancelButton: true
8606    }), shouldShowSizeOptions && Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], {
8607      label: Object(external_wp_i18n_["__"])('Image size'),
8608      value: sizeSlug,
8609      options: imageSizeOptions,
8610      onChange: updateImagesSize,
8611      hideCancelButton: true
8612    }))), noticeUI, Object(external_wp_element_["createElement"])(gallery_gallery, Object(esm_extends["a" /* default */])({}, props, {
8613      selectedImage: selectedImage,
8614      mediaPlaceholder: mediaPlaceholder,
8615      onMoveBackward: onMoveBackward,
8616      onMoveForward: onMoveForward,
8617      onRemoveImage: onRemoveImage,
8618      onSelectImage: onSelectImage,
8619      onDeselectImage: onDeselectImage,
8620      onSetImageAttributes: setImageAttributes,
8621      blockProps: blockProps // This prop is used by gallery.native.js.
8622      ,
8623      onFocusGalleryCaption: onFocusGalleryCaption
8624    })));
8625  }
8626  
8627  /* harmony default export */ var gallery_edit = (Object(external_wp_compose_["compose"])([external_wp_components_["withNotices"], Object(external_wp_viewport_["withViewportMatch"])({
8628    isNarrow: '< small'
8629  })])(GalleryEdit));
8630  
8631  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/save.js
8632  
8633  
8634  /**
8635   * WordPress dependencies
8636   */
8637  
8638  /**
8639   * Internal dependencies
8640   */
8641  
8642  
8643  
8644  function gallery_save_save({
8645    attributes
8646  }) {
8647    const {
8648      images,
8649      columns = defaultColumnsNumber(attributes),
8650      imageCrop,
8651      caption,
8652      linkTo
8653    } = attributes;
8654    const className = `columns-$columns} $imageCrop ? 'is-cropped' : ''}`;
8655    return Object(external_wp_element_["createElement"])("figure", external_wp_blockEditor_["useBlockProps"].save({
8656      className
8657    }), Object(external_wp_element_["createElement"])("ul", {
8658      className: "blocks-gallery-grid"
8659    }, images.map(image => {
8660      let href;
8661  
8662      switch (linkTo) {
8663        case constants_LINK_DESTINATION_MEDIA:
8664          href = image.fullUrl || image.url;
8665          break;
8666  
8667        case constants_LINK_DESTINATION_ATTACHMENT:
8668          href = image.link;
8669          break;
8670      }
8671  
8672      const img = Object(external_wp_element_["createElement"])("img", {
8673        src: image.url,
8674        alt: image.alt,
8675        "data-id": image.id,
8676        "data-full-url": image.fullUrl,
8677        "data-link": image.link,
8678        className: image.id ? `wp-image-$image.id}` : null
8679      });
8680      return Object(external_wp_element_["createElement"])("li", {
8681        key: image.id || image.url,
8682        className: "blocks-gallery-item"
8683      }, Object(external_wp_element_["createElement"])("figure", null, href ? Object(external_wp_element_["createElement"])("a", {
8684        href: href
8685      }, img) : img, !external_wp_blockEditor_["RichText"].isEmpty(image.caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
8686        tagName: "figcaption",
8687        className: "blocks-gallery-item__caption",
8688        value: image.caption
8689      })));
8690    })), !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, {
8691      tagName: "figcaption",
8692      className: "blocks-gallery-caption",
8693      value: caption
8694    }));
8695  }
8696  
8697  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/transforms.js
8698  /**
8699   * External dependencies
8700   */
8701  
8702  /**
8703   * WordPress dependencies
8704   */
8705  
8706  
8707  
8708  /**
8709   * Internal dependencies
8710   */
8711  
8712  
8713  
8714  
8715  const parseShortcodeIds = ids => {
8716    if (!ids) {
8717      return [];
8718    }
8719  
8720    return ids.split(',').map(id => parseInt(id, 10));
8721  };
8722  
8723  const gallery_transforms_transforms = {
8724    from: [{
8725      type: 'block',
8726      isMultiBlock: true,
8727      blocks: ['core/image'],
8728      transform: attributes => {
8729        // Init the align and size from the first item which may be either the placeholder or an image.
8730        let {
8731          align,
8732          sizeSlug
8733        } = attributes[0]; // Loop through all the images and check if they have the same align and size.
8734  
8735        align = Object(external_lodash_["every"])(attributes, ['align', align]) ? align : undefined;
8736        sizeSlug = Object(external_lodash_["every"])(attributes, ['sizeSlug', sizeSlug]) ? sizeSlug : undefined;
8737        const validImages =