[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

   1  this["wp"] = this["wp"] || {}; this["wp"]["formatLibrary"] =
   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 = "t1DA");
  86  /******/ })
  87  /************************************************************************/
  88  /******/ ({
  89  
  90  /***/ "1Yn1":
  91  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  92  
  93  "use strict";
  94  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
  95  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
  96  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
  97  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
  98  
  99  
 100  /**
 101   * WordPress dependencies
 102   */
 103  
 104  const code = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 105    viewBox: "0 0 24 24",
 106    xmlns: "http://www.w3.org/2000/svg"
 107  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 108    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"
 109  }));
 110  /* harmony default export */ __webpack_exports__["a"] = (code);
 111  
 112  
 113  /***/ }),
 114  
 115  /***/ "1ZqX":
 116  /***/ (function(module, exports) {
 117  
 118  (function() { module.exports = window["wp"]["data"]; }());
 119  
 120  /***/ }),
 121  
 122  /***/ "Bpkj":
 123  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 124  
 125  "use strict";
 126  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
 127  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 128  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
 129  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 130  
 131  
 132  /**
 133   * WordPress dependencies
 134   */
 135  
 136  const link = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 137    xmlns: "http://www.w3.org/2000/svg",
 138    viewBox: "0 0 24 24"
 139  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 140    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"
 141  }));
 142  /* harmony default export */ __webpack_exports__["a"] = (link);
 143  
 144  
 145  /***/ }),
 146  
 147  /***/ "Crq9":
 148  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 149  
 150  "use strict";
 151  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
 152  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 153  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
 154  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 155  
 156  
 157  /**
 158   * WordPress dependencies
 159   */
 160  
 161  const formatStrikethrough = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 162    xmlns: "http://www.w3.org/2000/svg",
 163    viewBox: "0 0 24 24"
 164  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 165    d: "M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"
 166  }));
 167  /* harmony default export */ __webpack_exports__["a"] = (formatStrikethrough);
 168  
 169  
 170  /***/ }),
 171  
 172  /***/ "GRId":
 173  /***/ (function(module, exports) {
 174  
 175  (function() { module.exports = window["wp"]["element"]; }());
 176  
 177  /***/ }),
 178  
 179  /***/ "Mmq9":
 180  /***/ (function(module, exports) {
 181  
 182  (function() { module.exports = window["wp"]["url"]; }());
 183  
 184  /***/ }),
 185  
 186  /***/ "Mp0b":
 187  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 188  
 189  "use strict";
 190  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
 191  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 192  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
 193  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 194  
 195  
 196  /**
 197   * WordPress dependencies
 198   */
 199  
 200  const linkOff = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 201    xmlns: "http://www.w3.org/2000/svg",
 202    viewBox: "0 0 24 24"
 203  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 204    d: "M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"
 205  }));
 206  /* harmony default export */ __webpack_exports__["a"] = (linkOff);
 207  
 208  
 209  /***/ }),
 210  
 211  /***/ "Tqx9":
 212  /***/ (function(module, exports) {
 213  
 214  (function() { module.exports = window["wp"]["primitives"]; }());
 215  
 216  /***/ }),
 217  
 218  /***/ "YLtl":
 219  /***/ (function(module, exports) {
 220  
 221  (function() { module.exports = window["lodash"]; }());
 222  
 223  /***/ }),
 224  
 225  /***/ "axFQ":
 226  /***/ (function(module, exports) {
 227  
 228  (function() { module.exports = window["wp"]["blockEditor"]; }());
 229  
 230  /***/ }),
 231  
 232  /***/ "btIw":
 233  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 234  
 235  "use strict";
 236  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
 237  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 238  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9");
 239  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 240  
 241  
 242  /**
 243   * WordPress dependencies
 244   */
 245  
 246  const keyboardReturn = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 247    xmlns: "http://www.w3.org/2000/svg",
 248    viewBox: "-2 -2 24 24"
 249  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 250    d: "M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"
 251  }));
 252  /* harmony default export */ __webpack_exports__["a"] = (keyboardReturn);
 253  
 254  
 255  /***/ }),
 256  
 257  /***/ "gdqT":
 258  /***/ (function(module, exports) {
 259  
 260  (function() { module.exports = window["wp"]["a11y"]; }());
 261  
 262  /***/ }),
 263  
 264  /***/ "iClF":
 265  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 266  
 267  "use strict";
 268  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId");
 269  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 270  /**
 271   * WordPress dependencies
 272   */
 273  
 274  /** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */
 275  
 276  /**
 277   * Return an SVG icon.
 278   *
 279   * @param {IconProps} props icon is the SVG component to render
 280   *                          size is a number specifiying the icon size in pixels
 281   *                          Other props will be passed to wrapped SVG component
 282   *
 283   * @return {JSX.Element}  Icon component
 284   */
 285  
 286  function Icon(_ref) {
 287    let {
 288      icon,
 289      size = 24,
 290      ...props
 291    } = _ref;
 292    return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["cloneElement"])(icon, {
 293      width: size,
 294      height: size,
 295      ...props
 296    });
 297  }
 298  
 299  /* harmony default export */ __webpack_exports__["a"] = (Icon);
 300  
 301  
 302  /***/ }),
 303  
 304  /***/ "l3Sj":
 305  /***/ (function(module, exports) {
 306  
 307  (function() { module.exports = window["wp"]["i18n"]; }());
 308  
 309  /***/ }),
 310  
 311  /***/ "oMoS":
 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 button = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 326    viewBox: "0 0 24 24",
 327    xmlns: "http://www.w3.org/2000/svg"
 328  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 329    d: "M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 12.8h8v-1.5H8v1.5z"
 330  }));
 331  /* harmony default export */ __webpack_exports__["a"] = (button);
 332  
 333  
 334  /***/ }),
 335  
 336  /***/ "qRz9":
 337  /***/ (function(module, exports) {
 338  
 339  (function() { module.exports = window["wp"]["richText"]; }());
 340  
 341  /***/ }),
 342  
 343  /***/ "rmEH":
 344  /***/ (function(module, exports) {
 345  
 346  (function() { module.exports = window["wp"]["htmlEntities"]; }());
 347  
 348  /***/ }),
 349  
 350  /***/ "t1DA":
 351  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 352  
 353  "use strict";
 354  // ESM COMPAT FLAG
 355  __webpack_require__.r(__webpack_exports__);
 356  
 357  // EXTERNAL MODULE: external ["wp","richText"]
 358  var external_wp_richText_ = __webpack_require__("qRz9");
 359  
 360  // EXTERNAL MODULE: external ["wp","element"]
 361  var external_wp_element_ = __webpack_require__("GRId");
 362  
 363  // EXTERNAL MODULE: external ["wp","i18n"]
 364  var external_wp_i18n_ = __webpack_require__("l3Sj");
 365  
 366  // EXTERNAL MODULE: external ["wp","blockEditor"]
 367  var external_wp_blockEditor_ = __webpack_require__("axFQ");
 368  
 369  // EXTERNAL MODULE: external ["wp","primitives"]
 370  var external_wp_primitives_ = __webpack_require__("Tqx9");
 371  
 372  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-bold.js
 373  
 374  
 375  /**
 376   * WordPress dependencies
 377   */
 378  
 379  const formatBold = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
 380    xmlns: "http://www.w3.org/2000/svg",
 381    viewBox: "0 0 24 24"
 382  }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
 383    d: "M14.7 11.3c1-.6 1.5-1.6 1.5-3 0-2.3-1.3-3.4-4-3.4H7v14h5.8c1.4 0 2.5-.3 3.3-1 .8-.7 1.2-1.7 1.2-2.9.1-1.9-.8-3.1-2.6-3.7zm-5.1-4h2.3c.6 0 1.1.1 1.4.4.3.3.5.7.5 1.2s-.2 1-.5 1.2c-.3.3-.8.4-1.4.4H9.6V7.3zm4.6 9c-.4.3-1 .4-1.7.4H9.6v-3.9h2.9c.7 0 1.3.2 1.7.5.4.3.6.8.6 1.5s-.2 1.2-.6 1.5z"
 384  }));
 385  /* harmony default export */ var format_bold = (formatBold);
 386  
 387  // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/bold/index.js
 388  
 389  
 390  /**
 391   * WordPress dependencies
 392   */
 393  
 394  
 395  
 396  
 397  const bold_name = 'core/bold';
 398  
 399  const title = Object(external_wp_i18n_["__"])('Bold');
 400  
 401  const bold = {
 402    name: bold_name,
 403    title,
 404    tagName: 'strong',
 405    className: null,
 406  
 407    edit(_ref) {
 408      let {
 409        isActive,
 410        value,
 411        onChange,
 412        onFocus
 413      } = _ref;
 414  
 415      function onToggle() {
 416        onChange(Object(external_wp_richText_["toggleFormat"])(value, {
 417          type: bold_name,
 418          title
 419        }));
 420      }
 421  
 422      function onClick() {
 423        onChange(Object(external_wp_richText_["toggleFormat"])(value, {
 424          type: bold_name
 425        }));
 426        onFocus();
 427      }
 428  
 429      return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextShortcut"], {
 430        type: "primary",
 431        character: "b",
 432        onUse: onToggle
 433      }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], {
 434        name: "bold",
 435        icon: format_bold,
 436        title: title,
 437        onClick: onClick,
 438        isActive: isActive,
 439        shortcutType: "primary",
 440        shortcutCharacter: "b"
 441      }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__unstableRichTextInputEvent"], {
 442        inputType: "formatBold",
 443        onInput: onToggle
 444      }));
 445    }
 446  
 447  };
 448  
 449  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/code.js
 450  var code = __webpack_require__("1Yn1");
 451  
 452  // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/code/index.js
 453  
 454  
 455  /**
 456   * WordPress dependencies
 457   */
 458  
 459  
 460  
 461  
 462  const code_name = 'core/code';
 463  
 464  const code_title = Object(external_wp_i18n_["__"])('Inline code');
 465  
 466  const code_code = {
 467    name: code_name,
 468    title: code_title,
 469    tagName: 'code',
 470    className: null,
 471  
 472    __unstableInputRule(value) {
 473      const BACKTICK = '`';
 474      const {
 475        start,
 476        text
 477      } = value;
 478      const characterBefore = text.slice(start - 1, start); // Quick check the text for the necessary character.
 479  
 480      if (characterBefore !== BACKTICK) {
 481        return value;
 482      }
 483  
 484      const textBefore = text.slice(0, start - 1);
 485      const indexBefore = textBefore.lastIndexOf(BACKTICK);
 486  
 487      if (indexBefore === -1) {
 488        return value;
 489      }
 490  
 491      const startIndex = indexBefore;
 492      const endIndex = start - 2;
 493  
 494      if (startIndex === endIndex) {
 495        return value;
 496      }
 497  
 498      value = Object(external_wp_richText_["remove"])(value, startIndex, startIndex + 1);
 499      value = Object(external_wp_richText_["remove"])(value, endIndex, endIndex + 1);
 500      value = Object(external_wp_richText_["applyFormat"])(value, {
 501        type: code_name
 502      }, startIndex, endIndex);
 503      return value;
 504    },
 505  
 506    edit(_ref) {
 507      let {
 508        value,
 509        onChange,
 510        onFocus,
 511        isActive
 512      } = _ref;
 513  
 514      function onClick() {
 515        onChange(Object(external_wp_richText_["toggleFormat"])(value, {
 516          type: code_name,
 517          title: code_title
 518        }));
 519        onFocus();
 520      }
 521  
 522      return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], {
 523        icon: code["a" /* default */],
 524        title: code_title,
 525        onClick: onClick,
 526        isActive: isActive,
 527        role: "menuitemcheckbox"
 528      });
 529    }
 530  
 531  };
 532  
 533  // EXTERNAL MODULE: external ["wp","components"]
 534  var external_wp_components_ = __webpack_require__("tI+e");
 535  
 536  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/keyboard-return.js
 537  var keyboard_return = __webpack_require__("btIw");
 538  
 539  // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/image/index.js
 540  
 541  
 542  /**
 543   * WordPress dependencies
 544   */
 545  
 546  
 547  
 548  
 549  
 550  
 551  const ALLOWED_MEDIA_TYPES = ['image'];
 552  const image_name = 'core/image';
 553  
 554  const image_title = Object(external_wp_i18n_["__"])('Inline image');
 555  
 556  const image_image = {
 557    name: image_name,
 558    title: image_title,
 559    keywords: [Object(external_wp_i18n_["__"])('photo'), Object(external_wp_i18n_["__"])('media')],
 560    object: true,
 561    tagName: 'img',
 562    className: null,
 563    attributes: {
 564      className: 'class',
 565      style: 'style',
 566      url: 'src',
 567      alt: 'alt'
 568    },
 569    edit: Edit
 570  };
 571  
 572  function InlineUI(_ref) {
 573    let {
 574      value,
 575      onChange,
 576      activeObjectAttributes,
 577      contentRef
 578    } = _ref;
 579    const {
 580      style
 581    } = activeObjectAttributes;
 582    const [width, setWidth] = Object(external_wp_element_["useState"])(style === null || style === void 0 ? void 0 : style.replace(/\D/g, ''));
 583    const anchorRef = Object(external_wp_richText_["useAnchorRef"])({
 584      ref: contentRef,
 585      value,
 586      settings: image_image
 587    });
 588    return Object(external_wp_element_["createElement"])(external_wp_components_["Popover"], {
 589      position: "bottom center",
 590      focusOnMount: false,
 591      anchorRef: anchorRef,
 592      className: "block-editor-format-toolbar__image-popover"
 593    }, Object(external_wp_element_["createElement"])("form", {
 594      className: "block-editor-format-toolbar__image-container-content",
 595      onSubmit: event => {
 596        const newReplacements = value.replacements.slice();
 597        newReplacements[value.start] = {
 598          type: image_name,
 599          attributes: { ...activeObjectAttributes,
 600            style: width ? `width: $width}px;` : ''
 601          }
 602        };
 603        onChange({ ...value,
 604          replacements: newReplacements
 605        });
 606        event.preventDefault();
 607      }
 608    }, Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], {
 609      className: "block-editor-format-toolbar__image-container-value",
 610      type: "number",
 611      label: Object(external_wp_i18n_["__"])('Width'),
 612      value: width,
 613      min: 1,
 614      onChange: newWidth => setWidth(newWidth)
 615    }), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], {
 616      icon: keyboard_return["a" /* default */],
 617      label: Object(external_wp_i18n_["__"])('Apply'),
 618      type: "submit"
 619    })));
 620  }
 621  
 622  function Edit(_ref2) {
 623    let {
 624      value,
 625      onChange,
 626      onFocus,
 627      isObjectActive,
 628      activeObjectAttributes,
 629      contentRef
 630    } = _ref2;
 631    const [isModalOpen, setIsModalOpen] = Object(external_wp_element_["useState"])(false);
 632  
 633    function openModal() {
 634      setIsModalOpen(true);
 635    }
 636  
 637    function closeModal() {
 638      setIsModalOpen(false);
 639    }
 640  
 641    return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaUploadCheck"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], {
 642      icon: Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], {
 643        xmlns: "http://www.w3.org/2000/svg",
 644        viewBox: "0 0 24 24"
 645      }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], {
 646        d: "M4 18.5h16V17H4v1.5zM16 13v1.5h4V13h-4zM5.1 15h7.8c.6 0 1.1-.5 1.1-1.1V6.1c0-.6-.5-1.1-1.1-1.1H5.1C4.5 5 4 5.5 4 6.1v7.8c0 .6.5 1.1 1.1 1.1zm.4-8.5h7V10l-1-1c-.3-.3-.8-.3-1 0l-1.6 1.5-1.2-.7c-.3-.2-.6-.2-.9 0l-1.3 1V6.5zm0 6.1l1.8-1.3 1.3.8c.3.2.7.2.9-.1l1.5-1.4 1.5 1.4v1.5h-7v-.9z"
 647      })),
 648      title: image_title,
 649      onClick: openModal,
 650      isActive: isObjectActive
 651    }), isModalOpen && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaUpload"], {
 652      allowedTypes: ALLOWED_MEDIA_TYPES,
 653      onSelect: _ref3 => {
 654        let {
 655          id,
 656          url,
 657          alt,
 658          width: imgWidth
 659        } = _ref3;
 660        closeModal();
 661        onChange(Object(external_wp_richText_["insertObject"])(value, {
 662          type: image_name,
 663          attributes: {
 664            className: `wp-image-$id}`,
 665            style: `width: $Math.min(imgWidth, 150)}px;`,
 666            url,
 667            alt
 668          }
 669        }));
 670        onFocus();
 671      },
 672      onClose: closeModal,
 673      render: _ref4 => {
 674        let {
 675          open
 676        } = _ref4;
 677        open();
 678        return null;
 679      }
 680    }), isObjectActive && Object(external_wp_element_["createElement"])(InlineUI, {
 681      value: value,
 682      onChange: onChange,
 683      activeObjectAttributes: activeObjectAttributes,
 684      contentRef: contentRef
 685    }));
 686  }
 687  
 688  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-italic.js
 689  
 690  
 691  /**
 692   * WordPress dependencies
 693   */
 694  
 695  const formatItalic = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
 696    xmlns: "http://www.w3.org/2000/svg",
 697    viewBox: "0 0 24 24"
 698  }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
 699    d: "M12.5 5L10 19h1.9l2.5-14z"
 700  }));
 701  /* harmony default export */ var format_italic = (formatItalic);
 702  
 703  // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/italic/index.js
 704  
 705  
 706  /**
 707   * WordPress dependencies
 708   */
 709  
 710  
 711  
 712  
 713  const italic_name = 'core/italic';
 714  
 715  const italic_title = Object(external_wp_i18n_["__"])('Italic');
 716  
 717  const italic = {
 718    name: italic_name,
 719    title: italic_title,
 720    tagName: 'em',
 721    className: null,
 722  
 723    edit(_ref) {
 724      let {
 725        isActive,
 726        value,
 727        onChange,
 728        onFocus
 729      } = _ref;
 730  
 731      function onToggle() {
 732        onChange(Object(external_wp_richText_["toggleFormat"])(value, {
 733          type: italic_name,
 734          title: italic_title
 735        }));
 736      }
 737  
 738      function onClick() {
 739        onChange(Object(external_wp_richText_["toggleFormat"])(value, {
 740          type: italic_name
 741        }));
 742        onFocus();
 743      }
 744  
 745      return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextShortcut"], {
 746        type: "primary",
 747        character: "i",
 748        onUse: onToggle
 749      }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], {
 750        name: "italic",
 751        icon: format_italic,
 752        title: italic_title,
 753        onClick: onClick,
 754        isActive: isActive,
 755        shortcutType: "primary",
 756        shortcutCharacter: "i"
 757      }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__unstableRichTextInputEvent"], {
 758        inputType: "formatItalic",
 759        onInput: onToggle
 760      }));
 761    }
 762  
 763  };
 764  
 765  // EXTERNAL MODULE: external ["wp","url"]
 766  var external_wp_url_ = __webpack_require__("Mmq9");
 767  
 768  // EXTERNAL MODULE: external ["wp","htmlEntities"]
 769  var external_wp_htmlEntities_ = __webpack_require__("rmEH");
 770  
 771  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/link-off.js
 772  var link_off = __webpack_require__("Mp0b");
 773  
 774  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/link.js
 775  var library_link = __webpack_require__("Bpkj");
 776  
 777  // EXTERNAL MODULE: external ["wp","a11y"]
 778  var external_wp_a11y_ = __webpack_require__("gdqT");
 779  
 780  // EXTERNAL MODULE: external ["wp","data"]
 781  var external_wp_data_ = __webpack_require__("1ZqX");
 782  
 783  // EXTERNAL MODULE: external "lodash"
 784  var external_lodash_ = __webpack_require__("YLtl");
 785  
 786  // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/link/utils.js
 787  /**
 788   * External dependencies
 789   */
 790  
 791  /**
 792   * WordPress dependencies
 793   */
 794  
 795  
 796  /**
 797   * Check for issues with the provided href.
 798   *
 799   * @param {string} href The href.
 800   *
 801   * @return {boolean} Is the href invalid?
 802   */
 803  
 804  function isValidHref(href) {
 805    if (!href) {
 806      return false;
 807    }
 808  
 809    const trimmedHref = href.trim();
 810  
 811    if (!trimmedHref) {
 812      return false;
 813    } // Does the href start with something that looks like a URL protocol?
 814  
 815  
 816    if (/^\S+:/.test(trimmedHref)) {
 817      const protocol = Object(external_wp_url_["getProtocol"])(trimmedHref);
 818  
 819      if (!Object(external_wp_url_["isValidProtocol"])(protocol)) {
 820        return false;
 821      } // Add some extra checks for http(s) URIs, since these are the most common use-case.
 822      // This ensures URIs with an http protocol have exactly two forward slashes following the protocol.
 823  
 824  
 825      if (Object(external_lodash_["startsWith"])(protocol, 'http') && !/^https?:\/\/[^\/\s]/i.test(trimmedHref)) {
 826        return false;
 827      }
 828  
 829      const authority = Object(external_wp_url_["getAuthority"])(trimmedHref);
 830  
 831      if (!Object(external_wp_url_["isValidAuthority"])(authority)) {
 832        return false;
 833      }
 834  
 835      const path = Object(external_wp_url_["getPath"])(trimmedHref);
 836  
 837      if (path && !Object(external_wp_url_["isValidPath"])(path)) {
 838        return false;
 839      }
 840  
 841      const queryString = Object(external_wp_url_["getQueryString"])(trimmedHref);
 842  
 843      if (queryString && !Object(external_wp_url_["isValidQueryString"])(queryString)) {
 844        return false;
 845      }
 846  
 847      const fragment = Object(external_wp_url_["getFragment"])(trimmedHref);
 848  
 849      if (fragment && !Object(external_wp_url_["isValidFragment"])(fragment)) {
 850        return false;
 851      }
 852    } // Validate anchor links.
 853  
 854  
 855    if (Object(external_lodash_["startsWith"])(trimmedHref, '#') && !Object(external_wp_url_["isValidFragment"])(trimmedHref)) {
 856      return false;
 857    }
 858  
 859    return true;
 860  }
 861  /**
 862   * Generates the format object that will be applied to the link text.
 863   *
 864   * @param {Object}  options
 865   * @param {string}  options.url              The href of the link.
 866   * @param {string}  options.type             The type of the link.
 867   * @param {string}  options.id               The ID of the link.
 868   * @param {boolean} options.opensInNewWindow Whether this link will open in a new window.
 869   *
 870   * @return {Object} The final format object.
 871   */
 872  
 873  function createLinkFormat(_ref) {
 874    let {
 875      url,
 876      type,
 877      id,
 878      opensInNewWindow
 879    } = _ref;
 880    const format = {
 881      type: 'core/link',
 882      attributes: {
 883        url
 884      }
 885    };
 886    if (type) format.attributes.type = type;
 887    if (id) format.attributes.id = id;
 888  
 889    if (opensInNewWindow) {
 890      format.attributes.target = '_blank';
 891      format.attributes.rel = 'noreferrer noopener';
 892    }
 893  
 894    return format;
 895  }
 896  /* eslint-disable jsdoc/no-undefined-types */
 897  
 898  /**
 899   * Get the start and end boundaries of a given format from a rich text value.
 900   *
 901   *
 902   * @param {RichTextValue} value      the rich text value to interrogate.
 903   * @param {string}        format     the identifier for the target format (e.g. `core/link`, `core/bold`).
 904   * @param {number?}       startIndex optional startIndex to seek from.
 905   * @param {number?}       endIndex   optional endIndex to seek from.
 906   * @return {Object}    object containing start and end values for the given format.
 907   */
 908  
 909  /* eslint-enable jsdoc/no-undefined-types */
 910  
 911  function getFormatBoundary(value, format) {
 912    let startIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : value.start;
 913    let endIndex = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : value.end;
 914    const EMPTY_BOUNDARIES = {
 915      start: null,
 916      end: null
 917    };
 918    const {
 919      formats
 920    } = value;
 921    let targetFormat;
 922    let initialIndex;
 923  
 924    if (!(formats !== null && formats !== void 0 && formats.length)) {
 925      return EMPTY_BOUNDARIES;
 926    } // Clone formats to avoid modifying source formats.
 927  
 928  
 929    const newFormats = formats.slice();
 930    const formatAtStart = Object(external_lodash_["find"])(newFormats[startIndex], {
 931      type: format.type
 932    });
 933    const formatAtEnd = Object(external_lodash_["find"])(newFormats[endIndex], {
 934      type: format.type
 935    });
 936    const formatAtEndMinusOne = Object(external_lodash_["find"])(newFormats[endIndex - 1], {
 937      type: format.type
 938    });
 939  
 940    if (!!formatAtStart) {
 941      // Set values to conform to "start"
 942      targetFormat = formatAtStart;
 943      initialIndex = startIndex;
 944    } else if (!!formatAtEnd) {
 945      // Set values to conform to "end"
 946      targetFormat = formatAtEnd;
 947      initialIndex = endIndex;
 948    } else if (!!formatAtEndMinusOne) {
 949      // This is an edge case which will occur if you create a format, then place
 950      // the caret just before the format and hit the back ARROW key. The resulting
 951      // value object will have start and end +1 beyond the edge of the format boundary.
 952      targetFormat = formatAtEndMinusOne;
 953      initialIndex = endIndex - 1;
 954    } else {
 955      return EMPTY_BOUNDARIES;
 956    }
 957  
 958    const index = newFormats[initialIndex].indexOf(targetFormat);
 959    const walkingArgs = [newFormats, initialIndex, targetFormat, index]; // Walk the startIndex "backwards" to the leading "edge" of the matching format.
 960  
 961    startIndex = walkToStart(...walkingArgs); // Walk the endIndex "forwards" until the trailing "edge" of the matching format.
 962  
 963    endIndex = walkToEnd(...walkingArgs); // Safe guard: start index cannot be less than 0
 964  
 965    startIndex = startIndex < 0 ? 0 : startIndex; // // Return the indicies of the "edges" as the boundaries.
 966  
 967    return {
 968      start: startIndex,
 969      end: endIndex
 970    };
 971  }
 972  /**
 973   * Walks forwards/backwards towards the boundary of a given format within an
 974   * array of format objects. Returns the index of the boundary.
 975   *
 976   * @param {Array}  formats         the formats to search for the given format type.
 977   * @param {number} initialIndex    the starting index from which to walk.
 978   * @param {Object} targetFormatRef a reference to the format type object being sought.
 979   * @param {number} formatIndex     the index at which we expect the target format object to be.
 980   * @param {string} direction       either 'forwards' or 'backwards' to indicate the direction.
 981   * @return {number} the index of the boundary of the given format.
 982   */
 983  
 984  function walkToBoundary(formats, initialIndex, targetFormatRef, formatIndex, direction) {
 985    let index = initialIndex;
 986    const directions = {
 987      forwards: 1,
 988      backwards: -1
 989    };
 990    const directionIncrement = directions[direction] || 1; // invalid direction arg default to forwards
 991  
 992    const inverseDirectionIncrement = directionIncrement * -1;
 993  
 994    while (formats[index] && formats[index][formatIndex] === targetFormatRef) {
 995      // Increment/decrement in the direction of operation.
 996      index = index + directionIncrement;
 997    } // Restore by one in inverse direction of operation
 998    // to avoid out of bounds.
 999  
1000  
1001    index = index + inverseDirectionIncrement;
1002    return index;
1003  }
1004  
1005  const walkToStart = Object(external_lodash_["partialRight"])(walkToBoundary, 'backwards');
1006  const walkToEnd = Object(external_lodash_["partialRight"])(walkToBoundary, 'forwards');
1007  
1008  // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/link/use-link-instance-key.js
1009  // Weakly referenced map allows unused ids to be garbage collected.
1010  const weakMap = new WeakMap(); // Incrementing zero-based ID value
1011  
1012  let use_link_instance_key_id = -1;
1013  const prefix = 'link-control-instance';
1014  
1015  function getKey(_id) {
1016    return `$prefix}-$_id}`;
1017  }
1018  /**
1019   * Builds a unique link control key for the given object reference.
1020   *
1021   * @param {Object} instance an unique object reference specific to this link control instance.
1022   * @return {string} the unique key to use for this link control.
1023   */
1024  
1025  
1026  function useLinkInstanceKey(instance) {
1027    if (!instance) {
1028      return;
1029    }
1030  
1031    if (weakMap.has(instance)) {
1032      return getKey(weakMap.get(instance));
1033    }
1034  
1035    use_link_instance_key_id += 1;
1036    weakMap.set(instance, use_link_instance_key_id);
1037    return getKey(use_link_instance_key_id);
1038  }
1039  
1040  /* harmony default export */ var use_link_instance_key = (useLinkInstanceKey);
1041  
1042  // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/link/inline.js
1043  
1044  
1045  /**
1046   * WordPress dependencies
1047   */
1048  
1049  
1050  
1051  
1052  
1053  
1054  
1055  /**
1056   * Internal dependencies
1057   */
1058  
1059  
1060  
1061  
1062  
1063  function InlineLinkUI(_ref) {
1064    let {
1065      isActive,
1066      activeAttributes,
1067      addingLink,
1068      value,
1069      onChange,
1070      speak,
1071      stopAddingLink,
1072      contentRef
1073    } = _ref;
1074    const richLinkTextValue = getRichTextValueFromSelection(value, isActive); // Get the text content minus any HTML tags.
1075  
1076    const richTextText = richLinkTextValue.text;
1077    /**
1078     * Pending settings to be applied to the next link. When inserting a new
1079     * link, toggle values cannot be applied immediately, because there is not
1080     * yet a link for them to apply to. Thus, they are maintained in a state
1081     * value until the time that the link can be inserted or edited.
1082     *
1083     * @type {[Object|undefined,Function]}
1084     */
1085  
1086    const [nextLinkValue, setNextLinkValue] = Object(external_wp_element_["useState"])();
1087    const {
1088      createPageEntity,
1089      userCanCreatePages
1090    } = Object(external_wp_data_["useSelect"])(select => {
1091      const {
1092        getSettings
1093      } = select(external_wp_blockEditor_["store"]);
1094  
1095      const _settings = getSettings();
1096  
1097      return {
1098        createPageEntity: _settings.__experimentalCreatePageEntity,
1099        userCanCreatePages: _settings.__experimentalUserCanCreatePages
1100      };
1101    }, []);
1102    const linkValue = {
1103      url: activeAttributes.url,
1104      type: activeAttributes.type,
1105      id: activeAttributes.id,
1106      opensInNewTab: activeAttributes.target === '_blank',
1107      title: richTextText,
1108      ...nextLinkValue
1109    };
1110  
1111    function removeLink() {
1112      const newValue = Object(external_wp_richText_["removeFormat"])(value, 'core/link');
1113      onChange(newValue);
1114      stopAddingLink();
1115      speak(Object(external_wp_i18n_["__"])('Link removed.'), 'assertive');
1116    }
1117  
1118    function onChangeLink(nextValue) {
1119      // Merge with values from state, both for the purpose of assigning the
1120      // next state value, and for use in constructing the new link format if
1121      // the link is ready to be applied.
1122      nextValue = { ...nextLinkValue,
1123        ...nextValue
1124      }; // LinkControl calls `onChange` immediately upon the toggling a setting.
1125  
1126      const didToggleSetting = linkValue.opensInNewTab !== nextValue.opensInNewTab && linkValue.url === nextValue.url; // If change handler was called as a result of a settings change during
1127      // link insertion, it must be held in state until the link is ready to
1128      // be applied.
1129  
1130      const didToggleSettingForNewLink = didToggleSetting && nextValue.url === undefined; // If link will be assigned, the state value can be considered flushed.
1131      // Otherwise, persist the pending changes.
1132  
1133      setNextLinkValue(didToggleSettingForNewLink ? nextValue : undefined);
1134  
1135      if (didToggleSettingForNewLink) {
1136        return;
1137      }
1138  
1139      const newUrl = Object(external_wp_url_["prependHTTP"])(nextValue.url);
1140      const linkFormat = createLinkFormat({
1141        url: newUrl,
1142        type: nextValue.type,
1143        id: nextValue.id !== undefined && nextValue.id !== null ? String(nextValue.id) : undefined,
1144        opensInNewWindow: nextValue.opensInNewTab
1145      });
1146      const newText = nextValue.title || newUrl;
1147  
1148      if (Object(external_wp_richText_["isCollapsed"])(value) && !isActive) {
1149        // Scenario: we don't have any actively selected text or formats.
1150        const toInsert = Object(external_wp_richText_["applyFormat"])(Object(external_wp_richText_["create"])({
1151          text: newText
1152        }), linkFormat, 0, newText.length);
1153        onChange(Object(external_wp_richText_["insert"])(value, toInsert));
1154      } else {
1155        // Scenario: we have any active text selection or an active format
1156        let newValue;
1157  
1158        if (newText === richTextText) {
1159          // If we're not updating the text then ignore
1160          newValue = Object(external_wp_richText_["applyFormat"])(value, linkFormat);
1161        } else {
1162          // Create new RichText value for the new text in order that we
1163          // can apply formats to it.
1164          newValue = Object(external_wp_richText_["create"])({
1165            text: newText
1166          }); // Apply the new Link format to this new text value.
1167  
1168          newValue = Object(external_wp_richText_["applyFormat"])(newValue, linkFormat, 0, newText.length); // Update the original (full) RichTextValue replacing the
1169          // target text with the *new* RichTextValue containing:
1170          // 1. The new text content.
1171          // 2. The new link format.
1172          // Note original formats will be lost when applying this change.
1173          // That is expected behaviour.
1174          // See: https://github.com/WordPress/gutenberg/pull/33849#issuecomment-936134179.
1175  
1176          newValue = Object(external_wp_richText_["replace"])(value, richTextText, newValue);
1177        }
1178  
1179        newValue.start = newValue.end;
1180        newValue.activeFormats = [];
1181        onChange(newValue);
1182      } // Focus should only be shifted back to the formatted segment when the
1183      // URL is submitted.
1184  
1185  
1186      if (!didToggleSetting) {
1187        stopAddingLink();
1188      }
1189  
1190      if (!isValidHref(newUrl)) {
1191        speak(Object(external_wp_i18n_["__"])('Warning: the link has been inserted but may have errors. Please test it.'), 'assertive');
1192      } else if (isActive) {
1193        speak(Object(external_wp_i18n_["__"])('Link edited.'), 'assertive');
1194      } else {
1195        speak(Object(external_wp_i18n_["__"])('Link inserted.'), 'assertive');
1196      }
1197    }
1198  
1199    const anchorRef = Object(external_wp_richText_["useAnchorRef"])({
1200      ref: contentRef,
1201      value,
1202      settings: link_link
1203    }); // Generate a string based key that is unique to this anchor reference.
1204    // This is used to force re-mount the LinkControl component to avoid
1205    // potential stale state bugs caused by the component not being remounted
1206    // See https://github.com/WordPress/gutenberg/pull/34742.
1207  
1208    const forceRemountKey = use_link_instance_key(anchorRef); // The focusOnMount prop shouldn't evolve during render of a Popover
1209    // otherwise it causes a render of the content.
1210  
1211    const focusOnMount = Object(external_wp_element_["useRef"])(addingLink ? 'firstElement' : false);
1212  
1213    async function handleCreate(pageTitle) {
1214      const page = await createPageEntity({
1215        title: pageTitle,
1216        status: 'draft'
1217      });
1218      return {
1219        id: page.id,
1220        type: page.type,
1221        title: page.title.rendered,
1222        url: page.link,
1223        kind: 'post-type'
1224      };
1225    }
1226  
1227    function createButtonText(searchTerm) {
1228      return Object(external_wp_element_["createInterpolateElement"])(Object(external_wp_i18n_["sprintf"])(
1229      /* translators: %s: search term. */
1230      Object(external_wp_i18n_["__"])('Create Page: <mark>%s</mark>'), searchTerm), {
1231        mark: Object(external_wp_element_["createElement"])("mark", null)
1232      });
1233    }
1234  
1235    return Object(external_wp_element_["createElement"])(external_wp_components_["Popover"], {
1236      anchorRef: anchorRef,
1237      focusOnMount: focusOnMount.current,
1238      onClose: stopAddingLink,
1239      position: "bottom center"
1240    }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalLinkControl"], {
1241      key: forceRemountKey,
1242      value: linkValue,
1243      onChange: onChangeLink,
1244      onRemove: removeLink,
1245      forceIsEditingLink: addingLink,
1246      hasRichPreviews: true,
1247      createSuggestion: createPageEntity && handleCreate,
1248      withCreateSuggestion: userCanCreatePages,
1249      createSuggestionButtonText: createButtonText,
1250      hasTextControl: true
1251    }));
1252  }
1253  
1254  function getRichTextValueFromSelection(value, isActive) {
1255    // Default to the selection ranges on the RichTextValue object.
1256    let textStart = value.start;
1257    let textEnd = value.end; // If the format is currently active then the rich text value
1258    // should always be taken from the bounds of the active format
1259    // and not the selected text.
1260  
1261    if (isActive) {
1262      const boundary = getFormatBoundary(value, {
1263        type: 'core/link'
1264      });
1265      textStart = boundary.start; // Text *selection* always extends +1 beyond the edge of the format.
1266      // We account for that here.
1267  
1268      textEnd = boundary.end + 1;
1269    } // Get a RichTextValue containing the selected text content.
1270  
1271  
1272    return Object(external_wp_richText_["slice"])(value, textStart, textEnd);
1273  }
1274  
1275  /* harmony default export */ var inline = (Object(external_wp_components_["withSpokenMessages"])(InlineLinkUI));
1276  
1277  // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/link/index.js
1278  
1279  
1280  /**
1281   * WordPress dependencies
1282   */
1283  
1284  
1285  
1286  
1287  
1288  
1289  
1290  
1291  /**
1292   * Internal dependencies
1293   */
1294  
1295  
1296  
1297  const link_name = 'core/link';
1298  
1299  const link_title = Object(external_wp_i18n_["__"])('Link');
1300  
1301  function link_Edit(_ref) {
1302    let {
1303      isActive,
1304      activeAttributes,
1305      value,
1306      onChange,
1307      onFocus,
1308      contentRef
1309    } = _ref;
1310    const [addingLink, setAddingLink] = Object(external_wp_element_["useState"])(false);
1311  
1312    function addLink() {
1313      const text = Object(external_wp_richText_["getTextContent"])(Object(external_wp_richText_["slice"])(value));
1314  
1315      if (text && Object(external_wp_url_["isURL"])(text) && isValidHref(text)) {
1316        onChange(Object(external_wp_richText_["applyFormat"])(value, {
1317          type: link_name,
1318          attributes: {
1319            url: text
1320          }
1321        }));
1322      } else if (text && Object(external_wp_url_["isEmail"])(text)) {
1323        onChange(Object(external_wp_richText_["applyFormat"])(value, {
1324          type: link_name,
1325          attributes: {
1326            url: `mailto:$text}`
1327          }
1328        }));
1329      } else {
1330        setAddingLink(true);
1331      }
1332    }
1333  
1334    function stopAddingLink() {
1335      setAddingLink(false);
1336      onFocus();
1337    }
1338  
1339    function onRemoveFormat() {
1340      onChange(Object(external_wp_richText_["removeFormat"])(value, link_name));
1341      Object(external_wp_a11y_["speak"])(Object(external_wp_i18n_["__"])('Link removed.'), 'assertive');
1342    }
1343  
1344    return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextShortcut"], {
1345      type: "primary",
1346      character: "k",
1347      onUse: addLink
1348    }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextShortcut"], {
1349      type: "primaryShift",
1350      character: "k",
1351      onUse: onRemoveFormat
1352    }), isActive && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], {
1353      name: "link",
1354      icon: link_off["a" /* default */],
1355      title: Object(external_wp_i18n_["__"])('Unlink'),
1356      onClick: onRemoveFormat,
1357      isActive: isActive,
1358      shortcutType: "primaryShift",
1359      shortcutCharacter: "k"
1360    }), !isActive && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], {
1361      name: "link",
1362      icon: library_link["a" /* default */],
1363      title: link_title,
1364      onClick: addLink,
1365      isActive: isActive,
1366      shortcutType: "primary",
1367      shortcutCharacter: "k"
1368    }), (addingLink || isActive) && Object(external_wp_element_["createElement"])(inline, {
1369      addingLink: addingLink,
1370      stopAddingLink: stopAddingLink,
1371      isActive: isActive,
1372      activeAttributes: activeAttributes,
1373      value: value,
1374      onChange: onChange,
1375      contentRef: contentRef
1376    }));
1377  }
1378  
1379  const link_link = {
1380    name: link_name,
1381    title: link_title,
1382    tagName: 'a',
1383    className: null,
1384    attributes: {
1385      url: 'href',
1386      type: 'data-type',
1387      id: 'data-id',
1388      target: 'target'
1389    },
1390  
1391    __unstablePasteRule(value, _ref2) {
1392      let {
1393        html,
1394        plainText
1395      } = _ref2;
1396  
1397      if (Object(external_wp_richText_["isCollapsed"])(value)) {
1398        return value;
1399      }
1400  
1401      const pastedText = (html || plainText).replace(/<[^>]+>/g, '').trim(); // A URL was pasted, turn the selection into a link
1402  
1403      if (!Object(external_wp_url_["isURL"])(pastedText)) {
1404        return value;
1405      } // Allows us to ask for this information when we get a report.
1406  
1407  
1408      window.console.log('Created link:\n\n', pastedText);
1409      return Object(external_wp_richText_["applyFormat"])(value, {
1410        type: link_name,
1411        attributes: {
1412          url: Object(external_wp_htmlEntities_["decodeEntities"])(pastedText)
1413        }
1414      });
1415    },
1416  
1417    edit: link_Edit
1418  };
1419  
1420  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/format-strikethrough.js
1421  var format_strikethrough = __webpack_require__("Crq9");
1422  
1423  // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/strikethrough/index.js
1424  
1425  
1426  /**
1427   * WordPress dependencies
1428   */
1429  
1430  
1431  
1432  
1433  const strikethrough_name = 'core/strikethrough';
1434  
1435  const strikethrough_title = Object(external_wp_i18n_["__"])('Strikethrough');
1436  
1437  const strikethrough = {
1438    name: strikethrough_name,
1439    title: strikethrough_title,
1440    tagName: 's',
1441    className: null,
1442  
1443    edit(_ref) {
1444      let {
1445        isActive,
1446        value,
1447        onChange,
1448        onFocus
1449      } = _ref;
1450  
1451      function onClick() {
1452        onChange(Object(external_wp_richText_["toggleFormat"])(value, {
1453          type: strikethrough_name,
1454          title: strikethrough_title
1455        }));
1456        onFocus();
1457      }
1458  
1459      return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], {
1460        icon: format_strikethrough["a" /* default */],
1461        title: strikethrough_title,
1462        onClick: onClick,
1463        isActive: isActive,
1464        role: "menuitemcheckbox"
1465      });
1466    }
1467  
1468  };
1469  
1470  // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/underline/index.js
1471  
1472  
1473  /**
1474   * WordPress dependencies
1475   */
1476  
1477  
1478  
1479  const underline_name = 'core/underline';
1480  
1481  const underline_title = Object(external_wp_i18n_["__"])('Underline');
1482  
1483  const underline = {
1484    name: underline_name,
1485    title: underline_title,
1486    tagName: 'span',
1487    className: null,
1488    attributes: {
1489      style: 'style'
1490    },
1491  
1492    edit(_ref) {
1493      let {
1494        value,
1495        onChange
1496      } = _ref;
1497  
1498      const onToggle = () => {
1499        onChange(Object(external_wp_richText_["toggleFormat"])(value, {
1500          type: underline_name,
1501          attributes: {
1502            style: 'text-decoration: underline;'
1503          },
1504          title: underline_title
1505        }));
1506      };
1507  
1508      return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextShortcut"], {
1509        type: "primary",
1510        character: "u",
1511        onUse: onToggle
1512      }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__unstableRichTextInputEvent"], {
1513        inputType: "formatUnderline",
1514        onInput: onToggle
1515      }));
1516    }
1517  
1518  };
1519  
1520  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/icon/index.js
1521  var icon = __webpack_require__("iClF");
1522  
1523  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/text-color.js
1524  
1525  
1526  /**
1527   * WordPress dependencies
1528   */
1529  
1530  const textColor = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
1531    xmlns: "http://www.w3.org/2000/svg",
1532    viewBox: "0 0 24 24"
1533  }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
1534    d: "M12.9 6h-2l-4 11h1.9l1.1-3h4.2l1.1 3h1.9L12.9 6zm-2.5 6.5l1.5-4.9 1.7 4.9h-3.2z"
1535  }));
1536  /* harmony default export */ var text_color = (textColor);
1537  
1538  // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/text-color/inline.js
1539  
1540  
1541  /**
1542   * External dependencies
1543   */
1544  
1545  /**
1546   * WordPress dependencies
1547   */
1548  
1549  
1550  
1551  
1552  
1553  
1554  
1555  /**
1556   * Internal dependencies
1557   */
1558  
1559  
1560  
1561  function parseCSS() {
1562    let css = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
1563    return css.split(';').reduce((accumulator, rule) => {
1564      if (rule) {
1565        const [property, value] = rule.split(':');
1566        if (property === 'color') accumulator.color = value;
1567        if (property === 'background-color') accumulator.backgroundColor = value;
1568      }
1569  
1570      return accumulator;
1571    }, {});
1572  }
1573  
1574  function parseClassName() {
1575    let className = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
1576    let colorSettings = arguments.length > 1 ? arguments[1] : undefined;
1577    return className.split(' ').reduce((accumulator, name) => {
1578      const match = name.match(/^has-([^-]+)-color$/);
1579  
1580      if (match) {
1581        const [, colorSlug] = name.match(/^has-([^-]+)-color$/);
1582        const colorObject = Object(external_wp_blockEditor_["getColorObjectByAttributeValues"])(colorSettings, colorSlug);
1583        accumulator.color = colorObject.color;
1584      }
1585  
1586      return accumulator;
1587    }, {});
1588  }
1589  
1590  function getActiveColors(value, name, colorSettings) {
1591    const activeColorFormat = Object(external_wp_richText_["getActiveFormat"])(value, name);
1592  
1593    if (!activeColorFormat) {
1594      return {};
1595    }
1596  
1597    return { ...parseCSS(activeColorFormat.attributes.style),
1598      ...parseClassName(activeColorFormat.attributes.class, colorSettings)
1599    };
1600  }
1601  
1602  function setColors(value, name, colorSettings, colors) {
1603    const {
1604      color,
1605      backgroundColor
1606    } = { ...getActiveColors(value, name, colorSettings),
1607      ...colors
1608    };
1609  
1610    if (!color && !backgroundColor) {
1611      return Object(external_wp_richText_["removeFormat"])(value, name);
1612    }
1613  
1614    const styles = [];
1615    const classNames = [];
1616    const attributes = {};
1617  
1618    if (backgroundColor) {
1619      styles.push(['background-color', backgroundColor].join(':'));
1620    } else {
1621      // Override default browser color for mark element.
1622      styles.push(['background-color', 'rgba(0, 0, 0, 0)'].join(':'));
1623    }
1624  
1625    if (color) {
1626      const colorObject = Object(external_wp_blockEditor_["getColorObjectByColorValue"])(colorSettings, color);
1627  
1628      if (colorObject) {
1629        classNames.push(Object(external_wp_blockEditor_["getColorClassName"])('color', colorObject.slug));
1630      } else {
1631        styles.push(['color', color].join(':'));
1632      }
1633    }
1634  
1635    if (styles.length) attributes.style = styles.join(';');
1636    if (classNames.length) attributes.class = classNames.join(' ');
1637    return Object(external_wp_richText_["applyFormat"])(value, {
1638      type: name,
1639      attributes
1640    });
1641  }
1642  
1643  function ColorPicker(_ref) {
1644    let {
1645      name,
1646      property,
1647      value,
1648      onChange
1649    } = _ref;
1650    const colors = Object(external_wp_data_["useSelect"])(select => {
1651      const {
1652        getSettings
1653      } = select(external_wp_blockEditor_["store"]);
1654      return Object(external_lodash_["get"])(getSettings(), ['colors'], []);
1655    }, []);
1656    const onColorChange = Object(external_wp_element_["useCallback"])(color => {
1657      onChange(setColors(value, name, colors, {
1658        [property]: color
1659      }));
1660    }, [colors, onChange, property]);
1661    const activeColors = Object(external_wp_element_["useMemo"])(() => getActiveColors(value, name, colors), [name, value, colors]);
1662    return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["ColorPalette"], {
1663      value: activeColors[property],
1664      onChange: onColorChange
1665    });
1666  }
1667  
1668  function InlineColorUI(_ref2) {
1669    let {
1670      name,
1671      value,
1672      onChange,
1673      onClose,
1674      contentRef
1675    } = _ref2;
1676  
1677    /* 
1678     As you change the text color by typing a HEX value into a field,
1679     the return value of document.getSelection jumps to the field you're editing,
1680     not the highlighted text. Given that useAnchorRef uses document.getSelection,
1681     it will return null, since it can't find the <mark> element within the HEX input.
1682     This caches the last truthy value of the selection anchor reference.
1683     */
1684    const anchorRef = Object(external_wp_blockEditor_["useCachedTruthy"])(Object(external_wp_richText_["useAnchorRef"])({
1685      ref: contentRef,
1686      value,
1687      settings: text_color_textColor
1688    }));
1689    return Object(external_wp_element_["createElement"])(external_wp_components_["Popover"], {
1690      onClose: onClose,
1691      className: "components-inline-color-popover",
1692      anchorRef: anchorRef
1693    }, Object(external_wp_element_["createElement"])(external_wp_components_["TabPanel"], {
1694      tabs: [{
1695        name: 'color',
1696        title: Object(external_wp_i18n_["__"])('Text')
1697      }, {
1698        name: 'backgroundColor',
1699        title: Object(external_wp_i18n_["__"])('Background')
1700      }]
1701    }, tab => Object(external_wp_element_["createElement"])(ColorPicker, {
1702      name: name,
1703      property: tab.name,
1704      value: value,
1705      onChange: onChange
1706    })));
1707  }
1708  
1709  // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/text-color/index.js
1710  
1711  
1712  /**
1713   * External dependencies
1714   */
1715  
1716  /**
1717   * WordPress dependencies
1718   */
1719  
1720  
1721  
1722  
1723  
1724  
1725  /**
1726   * Internal dependencies
1727   */
1728  
1729  
1730  const text_color_name = 'core/text-color';
1731  
1732  const text_color_title = Object(external_wp_i18n_["__"])('Highlight');
1733  
1734  const EMPTY_ARRAY = [];
1735  
1736  function getComputedStyleProperty(element, property) {
1737    const {
1738      ownerDocument
1739    } = element;
1740    const {
1741      defaultView
1742    } = ownerDocument;
1743    const style = defaultView.getComputedStyle(element);
1744    const value = style.getPropertyValue(property);
1745  
1746    if (property === 'background-color' && value === 'rgba(0, 0, 0, 0)' && element.parentElement) {
1747      return getComputedStyleProperty(element.parentElement, property);
1748    }
1749  
1750    return value;
1751  }
1752  
1753  function fillComputedColors(element, _ref) {
1754    let {
1755      color,
1756      backgroundColor
1757    } = _ref;
1758  
1759    if (!color && !backgroundColor) {
1760      return;
1761    }
1762  
1763    return {
1764      color: color || getComputedStyleProperty(element, 'color'),
1765      backgroundColor: backgroundColor === 'rgba(0, 0, 0, 0)' ? getComputedStyleProperty(element, 'background-color') : backgroundColor
1766    };
1767  }
1768  
1769  function TextColorEdit(_ref2) {
1770    let {
1771      value,
1772      onChange,
1773      isActive,
1774      activeAttributes,
1775      contentRef
1776    } = _ref2;
1777    const allowCustomControl = Object(external_wp_blockEditor_["useSetting"])('color.custom');
1778    const colors = Object(external_wp_blockEditor_["useSetting"])('color.palette') || EMPTY_ARRAY;
1779    const [isAddingColor, setIsAddingColor] = Object(external_wp_element_["useState"])(false);
1780    const enableIsAddingColor = Object(external_wp_element_["useCallback"])(() => setIsAddingColor(true), [setIsAddingColor]);
1781    const disableIsAddingColor = Object(external_wp_element_["useCallback"])(() => setIsAddingColor(false), [setIsAddingColor]);
1782    const colorIndicatorStyle = Object(external_wp_element_["useMemo"])(() => fillComputedColors(contentRef.current, getActiveColors(value, text_color_name, colors)), [value, colors]);
1783    const hasColorsToChoose = !Object(external_lodash_["isEmpty"])(colors) || !allowCustomControl;
1784  
1785    if (!hasColorsToChoose && !isActive) {
1786      return null;
1787    }
1788  
1789    return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], {
1790      className: "format-library-text-color-button",
1791      isActive: isActive,
1792      icon: Object(external_wp_element_["createElement"])(icon["a" /* default */], {
1793        icon: text_color,
1794        style: colorIndicatorStyle
1795      }),
1796      title: text_color_title // If has no colors to choose but a color is active remove the color onClick
1797      ,
1798      onClick: hasColorsToChoose ? enableIsAddingColor : () => onChange(Object(external_wp_richText_["removeFormat"])(value, text_color_name)),
1799      role: "menuitemcheckbox"
1800    }), isAddingColor && Object(external_wp_element_["createElement"])(InlineColorUI, {
1801      name: text_color_name,
1802      onClose: disableIsAddingColor,
1803      activeAttributes: activeAttributes,
1804      value: value,
1805      onChange: onChange,
1806      contentRef: contentRef
1807    }));
1808  }
1809  
1810  const text_color_textColor = {
1811    name: text_color_name,
1812    title: text_color_title,
1813    tagName: 'mark',
1814    className: 'has-inline-color',
1815    attributes: {
1816      style: 'style',
1817      class: 'class'
1818    },
1819  
1820    /*
1821     * Since this format relies on the <mark> tag, it's important to
1822     * prevent the default yellow background color applied by most
1823     * browsers. The solution is to detect when this format is used with a
1824     * text color but no background color, and in such cases to override
1825     * the default styling with a transparent background.
1826     *
1827     * @see https://github.com/WordPress/gutenberg/pull/35516
1828     */
1829    __unstableFilterAttributeValue(key, value) {
1830      if (key !== 'style') return value; // We should not add a background-color if it's already set
1831  
1832      if (value && value.includes('background-color')) return value;
1833      const addedCSS = ['background-color', 'rgba(0, 0, 0, 0)'].join(':'); // Prepend `addedCSS` to avoid a double `;;` as any the existing CSS
1834      // rules will already include a `;`.
1835  
1836      return value ? [addedCSS, value].join(';') : addedCSS;
1837    },
1838  
1839    edit: TextColorEdit
1840  };
1841  
1842  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/subscript.js
1843  
1844  
1845  /**
1846   * WordPress dependencies
1847   */
1848  
1849  const subscript = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
1850    xmlns: "http://www.w3.org/2000/svg",
1851    viewBox: "0 0 24 24"
1852  }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
1853    d: "M16.9 18.3l.8-1.2c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.1-.3-.4-.5-.6-.7-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.2 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3L15 19.4h4.3v-1.2h-2.4zM14.1 7.2h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z"
1854  }));
1855  /* harmony default export */ var library_subscript = (subscript);
1856  
1857  // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/subscript/index.js
1858  
1859  
1860  /**
1861   * WordPress dependencies
1862   */
1863  
1864  
1865  
1866  
1867  const subscript_name = 'core/subscript';
1868  
1869  const subscript_title = Object(external_wp_i18n_["__"])('Subscript');
1870  
1871  const subscript_subscript = {
1872    name: subscript_name,
1873    title: subscript_title,
1874    tagName: 'sub',
1875    className: null,
1876  
1877    edit(_ref) {
1878      let {
1879        isActive,
1880        value,
1881        onChange,
1882        onFocus
1883      } = _ref;
1884  
1885      function onToggle() {
1886        onChange(Object(external_wp_richText_["toggleFormat"])(value, {
1887          type: subscript_name,
1888          title: subscript_title
1889        }));
1890      }
1891  
1892      function onClick() {
1893        onToggle();
1894        onFocus();
1895      }
1896  
1897      return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], {
1898        icon: library_subscript,
1899        title: subscript_title,
1900        onClick: onClick,
1901        isActive: isActive,
1902        role: "menuitemcheckbox"
1903      });
1904    }
1905  
1906  };
1907  
1908  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/superscript.js
1909  
1910  
1911  /**
1912   * WordPress dependencies
1913   */
1914  
1915  const superscript = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
1916    xmlns: "http://www.w3.org/2000/svg",
1917    viewBox: "0 0 24 24"
1918  }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], {
1919    d: "M16.9 10.3l.8-1.3c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.2-.2-.4-.4-.7-.6-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.1 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3l-1.8 2.8h4.3v-1.2h-2.2zm-2.8-3.1h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z"
1920  }));
1921  /* harmony default export */ var library_superscript = (superscript);
1922  
1923  // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/superscript/index.js
1924  
1925  
1926  /**
1927   * WordPress dependencies
1928   */
1929  
1930  
1931  
1932  
1933  const superscript_name = 'core/superscript';
1934  
1935  const superscript_title = Object(external_wp_i18n_["__"])('Superscript');
1936  
1937  const superscript_superscript = {
1938    name: superscript_name,
1939    title: superscript_title,
1940    tagName: 'sup',
1941    className: null,
1942  
1943    edit(_ref) {
1944      let {
1945        isActive,
1946        value,
1947        onChange,
1948        onFocus
1949      } = _ref;
1950  
1951      function onToggle() {
1952        onChange(Object(external_wp_richText_["toggleFormat"])(value, {
1953          type: superscript_name,
1954          title: superscript_title
1955        }));
1956      }
1957  
1958      function onClick() {
1959        onToggle();
1960        onFocus();
1961      }
1962  
1963      return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], {
1964        icon: library_superscript,
1965        title: superscript_title,
1966        onClick: onClick,
1967        isActive: isActive,
1968        role: "menuitemcheckbox"
1969      });
1970    }
1971  
1972  };
1973  
1974  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/button.js
1975  var library_button = __webpack_require__("oMoS");
1976  
1977  // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/keyboard/index.js
1978  
1979  
1980  /**
1981   * WordPress dependencies
1982   */
1983  
1984  
1985  
1986  
1987  const keyboard_name = 'core/keyboard';
1988  
1989  const keyboard_title = Object(external_wp_i18n_["__"])('Keyboard input');
1990  
1991  const keyboard = {
1992    name: keyboard_name,
1993    title: keyboard_title,
1994    tagName: 'kbd',
1995    className: null,
1996  
1997    edit(_ref) {
1998      let {
1999        isActive,
2000        value,
2001        onChange,
2002        onFocus
2003      } = _ref;
2004  
2005      function onToggle() {
2006        onChange(Object(external_wp_richText_["toggleFormat"])(value, {
2007          type: keyboard_name,
2008          title: keyboard_title
2009        }));
2010      }
2011  
2012      function onClick() {
2013        onToggle();
2014        onFocus();
2015      }
2016  
2017      return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], {
2018        icon: library_button["a" /* default */],
2019        title: keyboard_title,
2020        onClick: onClick,
2021        isActive: isActive,
2022        role: "menuitemcheckbox"
2023      });
2024    }
2025  
2026  };
2027  
2028  // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/default-formats.js
2029  /**
2030   * Internal dependencies
2031   */
2032  
2033  
2034  
2035  
2036  
2037  
2038  
2039  
2040  
2041  
2042  
2043  /* harmony default export */ var default_formats = ([bold, code_code, image_image, italic, link_link, strikethrough, underline, text_color_textColor, subscript_subscript, superscript_superscript, keyboard]);
2044  
2045  // CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/index.js
2046  /**
2047   * WordPress dependencies
2048   */
2049  
2050  /**
2051   * Internal dependencies
2052   */
2053  
2054  
2055  default_formats.forEach(_ref => {
2056    let {
2057      name,
2058      ...settings
2059    } = _ref;
2060    return Object(external_wp_richText_["registerFormatType"])(name, settings);
2061  });
2062  
2063  
2064  /***/ }),
2065  
2066  /***/ "tI+e":
2067  /***/ (function(module, exports) {
2068  
2069  (function() { module.exports = window["wp"]["components"]; }());
2070  
2071  /***/ })
2072  
2073  /******/ });


Generated: Mon Nov 29 01:00:03 2021 Cross-referenced by PHPXref 0.7.1