wp/wp-includes/js/dist/annotations.js
changeset 16 a86126ab1dd4
parent 9 177826044cd9
child 18 be944660c56a
equal deleted inserted replaced
15:3d4e9c994f10 16:a86126ab1dd4
    80 /******/ 	// __webpack_public_path__
    80 /******/ 	// __webpack_public_path__
    81 /******/ 	__webpack_require__.p = "";
    81 /******/ 	__webpack_require__.p = "";
    82 /******/
    82 /******/
    83 /******/
    83 /******/
    84 /******/ 	// Load entry module and return exports
    84 /******/ 	// Load entry module and return exports
    85 /******/ 	return __webpack_require__(__webpack_require__.s = 370);
    85 /******/ 	return __webpack_require__(__webpack_require__.s = 448);
    86 /******/ })
    86 /******/ })
    87 /************************************************************************/
    87 /************************************************************************/
    88 /******/ ({
    88 /******/ ({
    89 
    89 
    90 /***/ 1:
    90 /***/ 1:
    96 
    96 
    97 /***/ 15:
    97 /***/ 15:
    98 /***/ (function(module, __webpack_exports__, __webpack_require__) {
    98 /***/ (function(module, __webpack_exports__, __webpack_require__) {
    99 
    99 
   100 "use strict";
   100 "use strict";
   101 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
       
   102 function _defineProperty(obj, key, value) {
       
   103   if (key in obj) {
       
   104     Object.defineProperty(obj, key, {
       
   105       value: value,
       
   106       enumerable: true,
       
   107       configurable: true,
       
   108       writable: true
       
   109     });
       
   110   } else {
       
   111     obj[key] = value;
       
   112   }
       
   113 
       
   114   return obj;
       
   115 }
       
   116 
       
   117 /***/ }),
       
   118 
       
   119 /***/ 17:
       
   120 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   121 
       
   122 "use strict";
       
   123 
       
   124 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
       
   125 function _arrayWithoutHoles(arr) {
       
   126   if (Array.isArray(arr)) {
       
   127     for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
       
   128       arr2[i] = arr[i];
       
   129     }
       
   130 
       
   131     return arr2;
       
   132   }
       
   133 }
       
   134 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
       
   135 var iterableToArray = __webpack_require__(34);
       
   136 
       
   137 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
       
   138 function _nonIterableSpread() {
       
   139   throw new TypeError("Invalid attempt to spread non-iterable instance");
       
   140 }
       
   141 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
       
   142 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _toConsumableArray; });
       
   143 
       
   144 
       
   145 
       
   146 function _toConsumableArray(arr) {
       
   147   return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || _nonIterableSpread();
       
   148 }
       
   149 
       
   150 /***/ }),
       
   151 
       
   152 /***/ 2:
       
   153 /***/ (function(module, exports) {
       
   154 
       
   155 (function() { module.exports = this["lodash"]; }());
       
   156 
       
   157 /***/ }),
       
   158 
       
   159 /***/ 20:
       
   160 /***/ (function(module, exports) {
       
   161 
       
   162 (function() { module.exports = this["wp"]["richText"]; }());
       
   163 
       
   164 /***/ }),
       
   165 
       
   166 /***/ 21:
       
   167 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   168 
       
   169 "use strict";
       
   170 
       
   171 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
       
   172 function _objectWithoutPropertiesLoose(source, excluded) {
       
   173   if (source == null) return {};
       
   174   var target = {};
       
   175   var sourceKeys = Object.keys(source);
       
   176   var key, i;
       
   177 
       
   178   for (i = 0; i < sourceKeys.length; i++) {
       
   179     key = sourceKeys[i];
       
   180     if (excluded.indexOf(key) >= 0) continue;
       
   181     target[key] = source[key];
       
   182   }
       
   183 
       
   184   return target;
       
   185 }
       
   186 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
       
   187 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutProperties; });
   101 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutProperties; });
       
   102 /* harmony import */ var _objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41);
   188 
   103 
   189 function _objectWithoutProperties(source, excluded) {
   104 function _objectWithoutProperties(source, excluded) {
   190   if (source == null) return {};
   105   if (source == null) return {};
   191   var target = _objectWithoutPropertiesLoose(source, excluded);
   106   var target = Object(_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(source, excluded);
   192   var key, i;
   107   var key, i;
   193 
   108 
   194   if (Object.getOwnPropertySymbols) {
   109   if (Object.getOwnPropertySymbols) {
   195     var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
   110     var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
   196 
   111 
   205   return target;
   120   return target;
   206 }
   121 }
   207 
   122 
   208 /***/ }),
   123 /***/ }),
   209 
   124 
       
   125 /***/ 18:
       
   126 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   127 
       
   128 "use strict";
       
   129 
       
   130 // EXPORTS
       
   131 __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; });
       
   132 
       
   133 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
       
   134 var arrayLikeToArray = __webpack_require__(26);
       
   135 
       
   136 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
       
   137 
       
   138 function _arrayWithoutHoles(arr) {
       
   139   if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr);
       
   140 }
       
   141 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
       
   142 var iterableToArray = __webpack_require__(35);
       
   143 
       
   144 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
       
   145 var unsupportedIterableToArray = __webpack_require__(29);
       
   146 
       
   147 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
       
   148 function _nonIterableSpread() {
       
   149   throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
       
   150 }
       
   151 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
       
   152 
       
   153 
       
   154 
       
   155 
       
   156 function _toConsumableArray(arr) {
       
   157   return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread();
       
   158 }
       
   159 
       
   160 /***/ }),
       
   161 
       
   162 /***/ 2:
       
   163 /***/ (function(module, exports) {
       
   164 
       
   165 (function() { module.exports = this["lodash"]; }());
       
   166 
       
   167 /***/ }),
       
   168 
       
   169 /***/ 25:
       
   170 /***/ (function(module, exports) {
       
   171 
       
   172 (function() { module.exports = this["wp"]["richText"]; }());
       
   173 
       
   174 /***/ }),
       
   175 
   210 /***/ 26:
   176 /***/ 26:
       
   177 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   178 
       
   179 "use strict";
       
   180 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; });
       
   181 function _arrayLikeToArray(arr, len) {
       
   182   if (len == null || len > arr.length) len = arr.length;
       
   183 
       
   184   for (var i = 0, arr2 = new Array(len); i < len; i++) {
       
   185     arr2[i] = arr[i];
       
   186   }
       
   187 
       
   188   return arr2;
       
   189 }
       
   190 
       
   191 /***/ }),
       
   192 
       
   193 /***/ 29:
       
   194 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   195 
       
   196 "use strict";
       
   197 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; });
       
   198 /* harmony import */ var _arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26);
       
   199 
       
   200 function _unsupportedIterableToArray(o, minLen) {
       
   201   if (!o) return;
       
   202   if (typeof o === "string") return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
       
   203   var n = Object.prototype.toString.call(o).slice(8, -1);
       
   204   if (n === "Object" && o.constructor) n = o.constructor.name;
       
   205   if (n === "Map" || n === "Set") return Array.from(o);
       
   206   if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
       
   207 }
       
   208 
       
   209 /***/ }),
       
   210 
       
   211 /***/ 32:
   211 /***/ (function(module, exports) {
   212 /***/ (function(module, exports) {
   212 
   213 
   213 (function() { module.exports = this["wp"]["hooks"]; }());
   214 (function() { module.exports = this["wp"]["hooks"]; }());
   214 
   215 
   215 /***/ }),
   216 /***/ }),
   216 
   217 
   217 /***/ 30:
   218 /***/ 35:
       
   219 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   220 
       
   221 "use strict";
       
   222 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
       
   223 function _iterableToArray(iter) {
       
   224   if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
       
   225 }
       
   226 
       
   227 /***/ }),
       
   228 
       
   229 /***/ 4:
       
   230 /***/ (function(module, exports) {
       
   231 
       
   232 (function() { module.exports = this["wp"]["data"]; }());
       
   233 
       
   234 /***/ }),
       
   235 
       
   236 /***/ 41:
       
   237 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   238 
       
   239 "use strict";
       
   240 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutPropertiesLoose; });
       
   241 function _objectWithoutPropertiesLoose(source, excluded) {
       
   242   if (source == null) return {};
       
   243   var target = {};
       
   244   var sourceKeys = Object.keys(source);
       
   245   var key, i;
       
   246 
       
   247   for (i = 0; i < sourceKeys.length; i++) {
       
   248     key = sourceKeys[i];
       
   249     if (excluded.indexOf(key) >= 0) continue;
       
   250     target[key] = source[key];
       
   251   }
       
   252 
       
   253   return target;
       
   254 }
       
   255 
       
   256 /***/ }),
       
   257 
       
   258 /***/ 42:
   218 /***/ (function(module, __webpack_exports__, __webpack_require__) {
   259 /***/ (function(module, __webpack_exports__, __webpack_require__) {
   219 
   260 
   220 "use strict";
   261 "use strict";
   221 
   262 
   222 
   263 
   494 });
   535 });
   495 
   536 
   496 
   537 
   497 /***/ }),
   538 /***/ }),
   498 
   539 
   499 /***/ 34:
   540 /***/ 448:
   500 /***/ (function(module, __webpack_exports__, __webpack_require__) {
   541 /***/ (function(module, __webpack_exports__, __webpack_require__) {
   501 
   542 
   502 "use strict";
   543 "use strict";
   503 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
   544 // ESM COMPAT FLAG
   504 function _iterableToArray(iter) {
       
   505   if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
       
   506 }
       
   507 
       
   508 /***/ }),
       
   509 
       
   510 /***/ 370:
       
   511 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   512 
       
   513 "use strict";
       
   514 __webpack_require__.r(__webpack_exports__);
   545 __webpack_require__.r(__webpack_exports__);
       
   546 
       
   547 // NAMESPACE OBJECT: ./node_modules/@wordpress/annotations/build-module/store/selectors.js
   515 var selectors_namespaceObject = {};
   548 var selectors_namespaceObject = {};
   516 __webpack_require__.r(selectors_namespaceObject);
   549 __webpack_require__.r(selectors_namespaceObject);
   517 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetAnnotationsForBlock", function() { return __experimentalGetAnnotationsForBlock; });
   550 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetAnnotationsForBlock", function() { return __experimentalGetAnnotationsForBlock; });
   518 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetAllAnnotationsForBlock", function() { return selectors_experimentalGetAllAnnotationsForBlock; });
   551 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetAllAnnotationsForBlock", function() { return __experimentalGetAllAnnotationsForBlock; });
   519 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetAnnotationsForRichText", function() { return __experimentalGetAnnotationsForRichText; });
   552 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetAnnotationsForRichText", function() { return __experimentalGetAnnotationsForRichText; });
   520 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetAnnotations", function() { return __experimentalGetAnnotations; });
   553 __webpack_require__.d(selectors_namespaceObject, "__experimentalGetAnnotations", function() { return __experimentalGetAnnotations; });
       
   554 
       
   555 // NAMESPACE OBJECT: ./node_modules/@wordpress/annotations/build-module/store/actions.js
   521 var actions_namespaceObject = {};
   556 var actions_namespaceObject = {};
   522 __webpack_require__.r(actions_namespaceObject);
   557 __webpack_require__.r(actions_namespaceObject);
   523 __webpack_require__.d(actions_namespaceObject, "__experimentalAddAnnotation", function() { return __experimentalAddAnnotation; });
   558 __webpack_require__.d(actions_namespaceObject, "__experimentalAddAnnotation", function() { return __experimentalAddAnnotation; });
   524 __webpack_require__.d(actions_namespaceObject, "__experimentalRemoveAnnotation", function() { return __experimentalRemoveAnnotation; });
   559 __webpack_require__.d(actions_namespaceObject, "__experimentalRemoveAnnotation", function() { return __experimentalRemoveAnnotation; });
   525 __webpack_require__.d(actions_namespaceObject, "__experimentalUpdateAnnotationRange", function() { return __experimentalUpdateAnnotationRange; });
   560 __webpack_require__.d(actions_namespaceObject, "__experimentalUpdateAnnotationRange", function() { return __experimentalUpdateAnnotationRange; });
   526 __webpack_require__.d(actions_namespaceObject, "__experimentalRemoveAnnotationsBySource", function() { return __experimentalRemoveAnnotationsBySource; });
   561 __webpack_require__.d(actions_namespaceObject, "__experimentalRemoveAnnotationsBySource", function() { return __experimentalRemoveAnnotationsBySource; });
   527 
   562 
   528 // EXTERNAL MODULE: external {"this":["wp","data"]}
   563 // EXTERNAL MODULE: external {"this":["wp","data"]}
   529 var external_this_wp_data_ = __webpack_require__(5);
   564 var external_this_wp_data_ = __webpack_require__(4);
       
   565 
       
   566 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
       
   567 var toConsumableArray = __webpack_require__(18);
   530 
   568 
   531 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
   569 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
   532 var defineProperty = __webpack_require__(15);
   570 var defineProperty = __webpack_require__(5);
   533 
   571 
   534 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
   572 // EXTERNAL MODULE: external {"this":"lodash"}
   535 var toConsumableArray = __webpack_require__(17);
   573 var external_this_lodash_ = __webpack_require__(2);
   536 
       
   537 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread.js
       
   538 var objectSpread = __webpack_require__(7);
       
   539 
       
   540 // EXTERNAL MODULE: external "lodash"
       
   541 var external_lodash_ = __webpack_require__(2);
       
   542 
   574 
   543 // CONCATENATED MODULE: ./node_modules/@wordpress/annotations/build-module/store/reducer.js
   575 // CONCATENATED MODULE: ./node_modules/@wordpress/annotations/build-module/store/reducer.js
   544 
   576 
   545 
   577 
   546 
   578 
       
   579 function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
       
   580 
       
   581 function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
   547 
   582 
   548 /**
   583 /**
   549  * External dependencies
   584  * External dependencies
   550  */
   585  */
   551 
   586 
   570  * @return {boolean} Whether the given annotation is valid.
   605  * @return {boolean} Whether the given annotation is valid.
   571  */
   606  */
   572 
   607 
   573 
   608 
   574 function isValidAnnotationRange(annotation) {
   609 function isValidAnnotationRange(annotation) {
   575   return Object(external_lodash_["isNumber"])(annotation.start) && Object(external_lodash_["isNumber"])(annotation.end) && annotation.start <= annotation.end;
   610   return Object(external_this_lodash_["isNumber"])(annotation.start) && Object(external_this_lodash_["isNumber"])(annotation.end) && annotation.start <= annotation.end;
   576 }
   611 }
   577 /**
   612 /**
   578  * Reducer managing annotations.
   613  * Reducer managing annotations.
   579  *
   614  *
   580  * @param {Array} state The annotations currently shown in the editor.
   615  * @param {Object} state  The annotations currently shown in the editor.
   581  * @param {Object} action Dispatched action.
   616  * @param {Object} action Dispatched action.
   582  *
   617  *
   583  * @return {Array} Updated state.
   618  * @return {Array} Updated state.
   584  */
   619  */
   585 
   620 
   586 
   621 
   587 function reducer_annotations() {
   622 function reducer_annotations() {
       
   623   var _state$blockClientId;
       
   624 
   588   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
   625   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
   589   var action = arguments.length > 1 ? arguments[1] : undefined;
   626   var action = arguments.length > 1 ? arguments[1] : undefined;
   590 
   627 
   591   switch (action.type) {
   628   switch (action.type) {
   592     case 'ANNOTATION_ADD':
   629     case 'ANNOTATION_ADD':
   602 
   639 
   603       if (newAnnotation.selector === 'range' && !isValidAnnotationRange(newAnnotation.range)) {
   640       if (newAnnotation.selector === 'range' && !isValidAnnotationRange(newAnnotation.range)) {
   604         return state;
   641         return state;
   605       }
   642       }
   606 
   643 
   607       var previousAnnotationsForBlock = Object(external_lodash_["get"])(state, blockClientId, []);
   644       var previousAnnotationsForBlock = (_state$blockClientId = state === null || state === void 0 ? void 0 : state[blockClientId]) !== null && _state$blockClientId !== void 0 ? _state$blockClientId : [];
   608       return Object(objectSpread["a" /* default */])({}, state, Object(defineProperty["a" /* default */])({}, blockClientId, [].concat(Object(toConsumableArray["a" /* default */])(previousAnnotationsForBlock), [newAnnotation])));
   645       return _objectSpread({}, state, Object(defineProperty["a" /* default */])({}, blockClientId, [].concat(Object(toConsumableArray["a" /* default */])(previousAnnotationsForBlock), [newAnnotation])));
   609 
   646 
   610     case 'ANNOTATION_REMOVE':
   647     case 'ANNOTATION_REMOVE':
   611       return Object(external_lodash_["mapValues"])(state, function (annotationsForBlock) {
   648       return Object(external_this_lodash_["mapValues"])(state, function (annotationsForBlock) {
   612         return filterWithReference(annotationsForBlock, function (annotation) {
   649         return filterWithReference(annotationsForBlock, function (annotation) {
   613           return annotation.id !== action.annotationId;
   650           return annotation.id !== action.annotationId;
   614         });
   651         });
   615       });
   652       });
   616 
   653 
   617     case 'ANNOTATION_UPDATE_RANGE':
   654     case 'ANNOTATION_UPDATE_RANGE':
   618       return Object(external_lodash_["mapValues"])(state, function (annotationsForBlock) {
   655       return Object(external_this_lodash_["mapValues"])(state, function (annotationsForBlock) {
   619         var hasChangedRange = false;
   656         var hasChangedRange = false;
   620         var newAnnotations = annotationsForBlock.map(function (annotation) {
   657         var newAnnotations = annotationsForBlock.map(function (annotation) {
   621           if (annotation.id === action.annotationId) {
   658           if (annotation.id === action.annotationId) {
   622             hasChangedRange = true;
   659             hasChangedRange = true;
   623             return Object(objectSpread["a" /* default */])({}, annotation, {
   660             return _objectSpread({}, annotation, {
   624               range: {
   661               range: {
   625                 start: action.start,
   662                 start: action.start,
   626                 end: action.end
   663                 end: action.end
   627               }
   664               }
   628             });
   665             });
   632         });
   669         });
   633         return hasChangedRange ? newAnnotations : annotationsForBlock;
   670         return hasChangedRange ? newAnnotations : annotationsForBlock;
   634       });
   671       });
   635 
   672 
   636     case 'ANNOTATION_REMOVE_SOURCE':
   673     case 'ANNOTATION_REMOVE_SOURCE':
   637       return Object(external_lodash_["mapValues"])(state, function (annotationsForBlock) {
   674       return Object(external_this_lodash_["mapValues"])(state, function (annotationsForBlock) {
   638         return filterWithReference(annotationsForBlock, function (annotation) {
   675         return filterWithReference(annotationsForBlock, function (annotation) {
   639           return annotation.source !== action.source;
   676           return annotation.source !== action.source;
   640         });
   677         });
   641       });
   678       });
   642   }
   679   }
   643 
   680 
   644   return state;
   681   return state;
   645 }
   682 }
   646 /* harmony default export */ var reducer = (reducer_annotations);
   683 /* harmony default export */ var reducer = (reducer_annotations);
   647 
   684 
   648 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules
   685 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
   649 var objectWithoutProperties = __webpack_require__(21);
   686 var objectWithoutProperties = __webpack_require__(15);
   650 
   687 
   651 // EXTERNAL MODULE: ./node_modules/rememo/es/rememo.js
   688 // EXTERNAL MODULE: ./node_modules/rememo/es/rememo.js
   652 var rememo = __webpack_require__(30);
   689 var rememo = __webpack_require__(42);
   653 
   690 
   654 // CONCATENATED MODULE: ./node_modules/@wordpress/annotations/build-module/store/selectors.js
   691 // CONCATENATED MODULE: ./node_modules/@wordpress/annotations/build-module/store/selectors.js
   655 
   692 
   656 
   693 
       
   694 
       
   695 function selectors_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
       
   696 
       
   697 function selectors_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { selectors_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { selectors_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
   657 
   698 
   658 /**
   699 /**
   659  * External dependencies
   700  * External dependencies
   660  */
   701  */
   661 
   702 
   679  *
   720  *
   680  * @return {Array} The annotations applicable to this block.
   721  * @return {Array} The annotations applicable to this block.
   681  */
   722  */
   682 
   723 
   683 var __experimentalGetAnnotationsForBlock = Object(rememo["a" /* default */])(function (state, blockClientId) {
   724 var __experimentalGetAnnotationsForBlock = Object(rememo["a" /* default */])(function (state, blockClientId) {
   684   return Object(external_lodash_["get"])(state, blockClientId, []).filter(function (annotation) {
   725   var _state$blockClientId;
       
   726 
       
   727   return ((_state$blockClientId = state === null || state === void 0 ? void 0 : state[blockClientId]) !== null && _state$blockClientId !== void 0 ? _state$blockClientId : []).filter(function (annotation) {
   685     return annotation.selector === 'block';
   728     return annotation.selector === 'block';
   686   });
   729   });
   687 }, function (state, blockClientId) {
   730 }, function (state, blockClientId) {
   688   return [Object(external_lodash_["get"])(state, blockClientId, EMPTY_ARRAY)];
   731   var _state$blockClientId2;
       
   732 
       
   733   return [(_state$blockClientId2 = state === null || state === void 0 ? void 0 : state[blockClientId]) !== null && _state$blockClientId2 !== void 0 ? _state$blockClientId2 : EMPTY_ARRAY];
   689 });
   734 });
   690 var selectors_experimentalGetAllAnnotationsForBlock = function __experimentalGetAllAnnotationsForBlock(state, blockClientId) {
   735 function __experimentalGetAllAnnotationsForBlock(state, blockClientId) {
   691   return Object(external_lodash_["get"])(state, blockClientId, EMPTY_ARRAY);
   736   var _state$blockClientId3;
   692 };
   737 
       
   738   return (_state$blockClientId3 = state === null || state === void 0 ? void 0 : state[blockClientId]) !== null && _state$blockClientId3 !== void 0 ? _state$blockClientId3 : EMPTY_ARRAY;
       
   739 }
   693 /**
   740 /**
   694  * Returns the annotations that apply to the given RichText instance.
   741  * Returns the annotations that apply to the given RichText instance.
   695  *
   742  *
   696  * Both a blockClientId and a richTextIdentifier are required. This is because
   743  * Both a blockClientId and a richTextIdentifier are required. This is because
   697  * a block might have multiple `RichText` components. This does mean that every
   744  * a block might have multiple `RichText` components. This does mean that every
   702  * @param {string} richTextIdentifier Unique identifier that identifies the given RichText.
   749  * @param {string} richTextIdentifier Unique identifier that identifies the given RichText.
   703  * @return {Array} All the annotations relevant for the `RichText`.
   750  * @return {Array} All the annotations relevant for the `RichText`.
   704  */
   751  */
   705 
   752 
   706 var __experimentalGetAnnotationsForRichText = Object(rememo["a" /* default */])(function (state, blockClientId, richTextIdentifier) {
   753 var __experimentalGetAnnotationsForRichText = Object(rememo["a" /* default */])(function (state, blockClientId, richTextIdentifier) {
   707   return Object(external_lodash_["get"])(state, blockClientId, []).filter(function (annotation) {
   754   var _state$blockClientId4;
       
   755 
       
   756   return ((_state$blockClientId4 = state === null || state === void 0 ? void 0 : state[blockClientId]) !== null && _state$blockClientId4 !== void 0 ? _state$blockClientId4 : []).filter(function (annotation) {
   708     return annotation.selector === 'range' && richTextIdentifier === annotation.richTextIdentifier;
   757     return annotation.selector === 'range' && richTextIdentifier === annotation.richTextIdentifier;
   709   }).map(function (annotation) {
   758   }).map(function (annotation) {
   710     var range = annotation.range,
   759     var range = annotation.range,
   711         other = Object(objectWithoutProperties["a" /* default */])(annotation, ["range"]);
   760         other = Object(objectWithoutProperties["a" /* default */])(annotation, ["range"]);
   712 
   761 
   713     return Object(objectSpread["a" /* default */])({}, range, other);
   762     return selectors_objectSpread({}, range, {}, other);
   714   });
   763   });
   715 }, function (state, blockClientId) {
   764 }, function (state, blockClientId) {
   716   return [Object(external_lodash_["get"])(state, blockClientId, EMPTY_ARRAY)];
   765   var _state$blockClientId5;
       
   766 
       
   767   return [(_state$blockClientId5 = state === null || state === void 0 ? void 0 : state[blockClientId]) !== null && _state$blockClientId5 !== void 0 ? _state$blockClientId5 : EMPTY_ARRAY];
   717 });
   768 });
   718 /**
   769 /**
   719  * Returns all annotations in the editor state.
   770  * Returns all annotations in the editor state.
   720  *
   771  *
   721  * @param {Object} state Editor state.
   772  * @param {Object} state Editor state.
   722  * @return {Array} All annotations currently applied.
   773  * @return {Array} All annotations currently applied.
   723  */
   774  */
   724 
   775 
   725 function __experimentalGetAnnotations(state) {
   776 function __experimentalGetAnnotations(state) {
   726   return Object(external_lodash_["flatMap"])(state, function (annotations) {
   777   return Object(external_this_lodash_["flatMap"])(state, function (annotations) {
   727     return annotations;
   778     return annotations;
   728   });
   779   });
   729 }
   780 }
   730 
   781 
   731 // EXTERNAL MODULE: ./node_modules/uuid/v4.js
   782 // CONCATENATED MODULE: ./node_modules/@wordpress/annotations/node_modules/uuid/dist/esm-browser/rng.js
   732 var v4 = __webpack_require__(65);
   783 // Unique ID creation requires a high quality random # generator. In the browser we therefore
   733 var v4_default = /*#__PURE__*/__webpack_require__.n(v4);
   784 // require the crypto API and do not support built-in fallback to lower quality random number
   734 
   785 // generators (like Math.random()).
       
   786 // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
       
   787 // find the complete implementation of crypto (msCrypto) on IE11.
       
   788 var getRandomValues = typeof crypto != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto != 'undefined' && typeof msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto);
       
   789 var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
       
   790 
       
   791 function rng() {
       
   792   if (!getRandomValues) {
       
   793     throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
       
   794   }
       
   795 
       
   796   return getRandomValues(rnds8);
       
   797 }
       
   798 // CONCATENATED MODULE: ./node_modules/@wordpress/annotations/node_modules/uuid/dist/esm-browser/bytesToUuid.js
       
   799 /**
       
   800  * Convert array of 16 byte values to UUID string format of the form:
       
   801  * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
       
   802  */
       
   803 var byteToHex = [];
       
   804 
       
   805 for (var bytesToUuid_i = 0; bytesToUuid_i < 256; ++bytesToUuid_i) {
       
   806   byteToHex[bytesToUuid_i] = (bytesToUuid_i + 0x100).toString(16).substr(1);
       
   807 }
       
   808 
       
   809 function bytesToUuid(buf, offset) {
       
   810   var i = offset || 0;
       
   811   var bth = byteToHex; // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
       
   812 
       
   813   return [bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]]].join('');
       
   814 }
       
   815 
       
   816 /* harmony default export */ var esm_browser_bytesToUuid = (bytesToUuid);
       
   817 // CONCATENATED MODULE: ./node_modules/@wordpress/annotations/node_modules/uuid/dist/esm-browser/v4.js
       
   818 
       
   819 
       
   820 
       
   821 function v4(options, buf, offset) {
       
   822   var i = buf && offset || 0;
       
   823 
       
   824   if (typeof options == 'string') {
       
   825     buf = options === 'binary' ? new Array(16) : null;
       
   826     options = null;
       
   827   }
       
   828 
       
   829   options = options || {};
       
   830   var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
       
   831 
       
   832   rnds[6] = rnds[6] & 0x0f | 0x40;
       
   833   rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
       
   834 
       
   835   if (buf) {
       
   836     for (var ii = 0; ii < 16; ++ii) {
       
   837       buf[i + ii] = rnds[ii];
       
   838     }
       
   839   }
       
   840 
       
   841   return buf || esm_browser_bytesToUuid(rnds);
       
   842 }
       
   843 
       
   844 /* harmony default export */ var esm_browser_v4 = (v4);
   735 // CONCATENATED MODULE: ./node_modules/@wordpress/annotations/build-module/store/actions.js
   845 // CONCATENATED MODULE: ./node_modules/@wordpress/annotations/build-module/store/actions.js
   736 /**
   846 /**
   737  * External dependencies
   847  * External dependencies
       
   848  */
       
   849 
       
   850 /**
       
   851  * @typedef WPAnnotationRange
       
   852  *
       
   853  * @property {number} start The offset where the annotation should start.
       
   854  * @property {number} end   The offset where the annotation should end.
   738  */
   855  */
   739 
   856 
   740 /**
   857 /**
   741  * Adds an annotation to a block.
   858  * Adds an annotation to a block.
   742  *
   859  *
   745  * annotation. The `source` is the source of the annotation, this will be used
   862  * annotation. The `source` is the source of the annotation, this will be used
   746  * to identity groups of annotations.
   863  * to identity groups of annotations.
   747  *
   864  *
   748  * The `range` property is only relevant if the selector is 'range'.
   865  * The `range` property is only relevant if the selector is 'range'.
   749  *
   866  *
   750  * @param {Object} annotation         The annotation to add.
   867  * @param {Object}            annotation                    The annotation to add.
   751  * @param {string} blockClientId      The blockClientId to add the annotation to.
   868  * @param {string}            annotation.blockClientId      The blockClientId to add the annotation to.
   752  * @param {string} richTextIdentifier Identifier for the RichText instance the annotation applies to.
   869  * @param {string}            annotation.richTextIdentifier Identifier for the RichText instance the annotation applies to.
   753  * @param {Object} range              The range at which to apply this annotation.
   870  * @param {WPAnnotationRange} annotation.range              The range at which to apply this annotation.
   754  * @param {number} range.start        The offset where the annotation should start.
   871  * @param {string}            [annotation.selector="range"] The way to apply this annotation.
   755  * @param {number} range.end          The offset where the annotation should end.
   872  * @param {string}            [annotation.source="default"] The source that added the annotation.
   756  * @param {string} [selector="range"] The way to apply this annotation.
   873  * @param {string}            [annotation.id]               The ID the annotation should have. Generates a UUID by default.
   757  * @param {string} [source="default"] The source that added the annotation.
       
   758  * @param {string} [id=uuid()]        The ID the annotation should have.
       
   759  *                                    Generates a UUID by default.
       
   760  *
   874  *
   761  * @return {Object} Action object.
   875  * @return {Object} Action object.
   762  */
   876  */
   763 
   877 
   764 function __experimentalAddAnnotation(_ref) {
   878 function __experimentalAddAnnotation(_ref) {
   770       _ref$selector = _ref.selector,
   884       _ref$selector = _ref.selector,
   771       selector = _ref$selector === void 0 ? 'range' : _ref$selector,
   885       selector = _ref$selector === void 0 ? 'range' : _ref$selector,
   772       _ref$source = _ref.source,
   886       _ref$source = _ref.source,
   773       source = _ref$source === void 0 ? 'default' : _ref$source,
   887       source = _ref$source === void 0 ? 'default' : _ref$source,
   774       _ref$id = _ref.id,
   888       _ref$id = _ref.id,
   775       id = _ref$id === void 0 ? v4_default()() : _ref$id;
   889       id = _ref$id === void 0 ? esm_browser_v4() : _ref$id;
   776   var action = {
   890   var action = {
   777     type: 'ANNOTATION_ADD',
   891     type: 'ANNOTATION_ADD',
   778     id: id,
   892     id: id,
   779     blockClientId: blockClientId,
   893     blockClientId: blockClientId,
   780     richTextIdentifier: richTextIdentifier,
   894     richTextIdentifier: richTextIdentifier,
   858   actions: actions_namespaceObject
   972   actions: actions_namespaceObject
   859 });
   973 });
   860 /* harmony default export */ var build_module_store = (store);
   974 /* harmony default export */ var build_module_store = (store);
   861 
   975 
   862 // EXTERNAL MODULE: external {"this":["wp","richText"]}
   976 // EXTERNAL MODULE: external {"this":["wp","richText"]}
   863 var external_this_wp_richText_ = __webpack_require__(20);
   977 var external_this_wp_richText_ = __webpack_require__(25);
   864 
       
   865 // EXTERNAL MODULE: ./node_modules/memize/index.js
       
   866 var memize = __webpack_require__(41);
       
   867 var memize_default = /*#__PURE__*/__webpack_require__.n(memize);
       
   868 
   978 
   869 // EXTERNAL MODULE: external {"this":["wp","i18n"]}
   979 // EXTERNAL MODULE: external {"this":["wp","i18n"]}
   870 var external_this_wp_i18n_ = __webpack_require__(1);
   980 var external_this_wp_i18n_ = __webpack_require__(1);
   871 
   981 
   872 // CONCATENATED MODULE: ./node_modules/@wordpress/annotations/build-module/format/annotation.js
   982 // CONCATENATED MODULE: ./node_modules/@wordpress/annotations/build-module/format/annotation.js
   873 /**
   983 /**
   874  * External dependencies
       
   875  */
       
   876 
       
   877 /**
       
   878  * WordPress dependencies
   984  * WordPress dependencies
   879  */
   985  */
   880 
       
   881 
   986 
   882 
   987 
   883 var FORMAT_NAME = 'core/annotation';
   988 var FORMAT_NAME = 'core/annotation';
   884 var ANNOTATION_ATTRIBUTE_PREFIX = 'annotation-text-';
   989 var ANNOTATION_ATTRIBUTE_PREFIX = 'annotation-text-';
   885 var STORE_KEY = 'core/annotations';
   990 var STORE_KEY = 'core/annotations';
   960   return positions;
  1065   return positions;
   961 }
  1066 }
   962 /**
  1067 /**
   963  * Updates annotations in the state based on positions retrieved from RichText.
  1068  * Updates annotations in the state based on positions retrieved from RichText.
   964  *
  1069  *
   965  * @param {Array}    annotations           The annotations that are currently applied.
  1070  * @param {Array}    annotations                   The annotations that are currently applied.
   966  * @param {Array}    positions             The current positions of the given annotations.
  1071  * @param {Array}    positions                     The current positions of the given annotations.
   967  * @param {Function} removeAnnotation      Function to remove an annotation from the state.
  1072  * @param {Object}   actions
   968  * @param {Function} updateAnnotationRange Function to update an annotation range in the state.
  1073  * @param {Function} actions.removeAnnotation      Function to remove an annotation from the state.
       
  1074  * @param {Function} actions.updateAnnotationRange Function to update an annotation range in the state.
   969  */
  1075  */
   970 
  1076 
   971 
  1077 
   972 function updateAnnotationsWithPositions(annotations, positions, _ref) {
  1078 function updateAnnotationsWithPositions(annotations, positions, _ref) {
   973   var removeAnnotation = _ref.removeAnnotation,
  1079   var removeAnnotation = _ref.removeAnnotation,
   988     if (start !== position.start || end !== position.end) {
  1094     if (start !== position.start || end !== position.end) {
   989       updateAnnotationRange(currentAnnotation.id, position.start, position.end);
  1095       updateAnnotationRange(currentAnnotation.id, position.start, position.end);
   990     }
  1096     }
   991   });
  1097   });
   992 }
  1098 }
   993 /**
  1099 
   994  * Create prepareEditableTree memoized based on the annotation props.
       
   995  *
       
   996  * @param {Object} The props with annotations in them.
       
   997  *
       
   998  * @return {Function} The prepareEditableTree.
       
   999  */
       
  1000 
       
  1001 
       
  1002 var createPrepareEditableTree = memize_default()(function (props) {
       
  1003   var annotations = props.annotations;
       
  1004   return function (formats, text) {
       
  1005     if (annotations.length === 0) {
       
  1006       return formats;
       
  1007     }
       
  1008 
       
  1009     var record = {
       
  1010       formats: formats,
       
  1011       text: text
       
  1012     };
       
  1013     record = applyAnnotations(record, annotations);
       
  1014     return record.formats;
       
  1015   };
       
  1016 });
       
  1017 /**
       
  1018  * Returns the annotations as a props object. Memoized to prevent re-renders.
       
  1019  *
       
  1020  * @param {Array} The annotations to put in the object.
       
  1021  *
       
  1022  * @return {Object} The annotations props object.
       
  1023  */
       
  1024 
       
  1025 var getAnnotationObject = memize_default()(function (annotations) {
       
  1026   return {
       
  1027     annotations: annotations
       
  1028   };
       
  1029 });
       
  1030 var annotation_annotation = {
  1100 var annotation_annotation = {
  1031   name: FORMAT_NAME,
  1101   name: FORMAT_NAME,
  1032   title: Object(external_this_wp_i18n_["__"])('Annotation'),
  1102   title: Object(external_this_wp_i18n_["__"])('Annotation'),
  1033   tagName: 'mark',
  1103   tagName: 'mark',
  1034   className: 'annotation-text',
  1104   className: 'annotation-text',
  1040     return null;
  1110     return null;
  1041   },
  1111   },
  1042   __experimentalGetPropsForEditableTreePreparation: function __experimentalGetPropsForEditableTreePreparation(select, _ref2) {
  1112   __experimentalGetPropsForEditableTreePreparation: function __experimentalGetPropsForEditableTreePreparation(select, _ref2) {
  1043     var richTextIdentifier = _ref2.richTextIdentifier,
  1113     var richTextIdentifier = _ref2.richTextIdentifier,
  1044         blockClientId = _ref2.blockClientId;
  1114         blockClientId = _ref2.blockClientId;
  1045     return getAnnotationObject(select(STORE_KEY).__experimentalGetAnnotationsForRichText(blockClientId, richTextIdentifier));
  1115     return {
       
  1116       annotations: select(STORE_KEY).__experimentalGetAnnotationsForRichText(blockClientId, richTextIdentifier)
       
  1117     };
  1046   },
  1118   },
  1047   __experimentalCreatePrepareEditableTree: createPrepareEditableTree,
  1119   __experimentalCreatePrepareEditableTree: function __experimentalCreatePrepareEditableTree(_ref3) {
       
  1120     var annotations = _ref3.annotations;
       
  1121     return function (formats, text) {
       
  1122       if (annotations.length === 0) {
       
  1123         return formats;
       
  1124       }
       
  1125 
       
  1126       var record = {
       
  1127         formats: formats,
       
  1128         text: text
       
  1129       };
       
  1130       record = applyAnnotations(record, annotations);
       
  1131       return record.formats;
       
  1132     };
       
  1133   },
  1048   __experimentalGetPropsForEditableTreeChangeHandler: function __experimentalGetPropsForEditableTreeChangeHandler(dispatch) {
  1134   __experimentalGetPropsForEditableTreeChangeHandler: function __experimentalGetPropsForEditableTreeChangeHandler(dispatch) {
  1049     return {
  1135     return {
  1050       removeAnnotation: dispatch(STORE_KEY).__experimentalRemoveAnnotation,
  1136       removeAnnotation: dispatch(STORE_KEY).__experimentalRemoveAnnotation,
  1051       updateAnnotationRange: dispatch(STORE_KEY).__experimentalUpdateAnnotationRange
  1137       updateAnnotationRange: dispatch(STORE_KEY).__experimentalUpdateAnnotationRange
  1052     };
  1138     };
  1082     settings = Object(objectWithoutProperties["a" /* default */])(annotation_annotation, ["name"]);
  1168     settings = Object(objectWithoutProperties["a" /* default */])(annotation_annotation, ["name"]);
  1083 
  1169 
  1084 Object(external_this_wp_richText_["registerFormatType"])(format_name, settings);
  1170 Object(external_this_wp_richText_["registerFormatType"])(format_name, settings);
  1085 
  1171 
  1086 // EXTERNAL MODULE: external {"this":["wp","hooks"]}
  1172 // EXTERNAL MODULE: external {"this":["wp","hooks"]}
  1087 var external_this_wp_hooks_ = __webpack_require__(26);
  1173 var external_this_wp_hooks_ = __webpack_require__(32);
  1088 
  1174 
  1089 // CONCATENATED MODULE: ./node_modules/@wordpress/annotations/build-module/block/index.js
  1175 // CONCATENATED MODULE: ./node_modules/@wordpress/annotations/build-module/block/index.js
  1090 /**
  1176 /**
  1091  * WordPress dependencies
  1177  * WordPress dependencies
  1092  */
  1178  */
  1099  * @return {Object} The enhanced component.
  1185  * @return {Object} The enhanced component.
  1100  */
  1186  */
  1101 
  1187 
  1102 var block_addAnnotationClassName = function addAnnotationClassName(OriginalComponent) {
  1188 var block_addAnnotationClassName = function addAnnotationClassName(OriginalComponent) {
  1103   return Object(external_this_wp_data_["withSelect"])(function (select, _ref) {
  1189   return Object(external_this_wp_data_["withSelect"])(function (select, _ref) {
  1104     var clientId = _ref.clientId;
  1190     var clientId = _ref.clientId,
       
  1191         className = _ref.className;
  1105 
  1192 
  1106     var annotations = select('core/annotations').__experimentalGetAnnotationsForBlock(clientId);
  1193     var annotations = select('core/annotations').__experimentalGetAnnotationsForBlock(clientId);
  1107 
  1194 
  1108     return {
  1195     return {
  1109       className: annotations.map(function (annotation) {
  1196       className: annotations.map(function (annotation) {
  1110         return 'is-annotated-by-' + annotation.source;
  1197         return 'is-annotated-by-' + annotation.source;
  1111       }).join(' ')
  1198       }).concat(className).filter(Boolean).join(' ')
  1112     };
  1199     };
  1113   })(OriginalComponent);
  1200   })(OriginalComponent);
  1114 };
  1201 };
  1115 
  1202 
  1116 Object(external_this_wp_hooks_["addFilter"])('editor.BlockListBlock', 'core/annotations', block_addAnnotationClassName);
  1203 Object(external_this_wp_hooks_["addFilter"])('editor.BlockListBlock', 'core/annotations', block_addAnnotationClassName);
  1124 
  1211 
  1125 
  1212 
  1126 
  1213 
  1127 /***/ }),
  1214 /***/ }),
  1128 
  1215 
  1129 /***/ 41:
       
  1130 /***/ (function(module, exports, __webpack_require__) {
       
  1131 
       
  1132 module.exports = function memize( fn, options ) {
       
  1133 	var size = 0,
       
  1134 		maxSize, head, tail;
       
  1135 
       
  1136 	if ( options && options.maxSize ) {
       
  1137 		maxSize = options.maxSize;
       
  1138 	}
       
  1139 
       
  1140 	function memoized( /* ...args */ ) {
       
  1141 		var node = head,
       
  1142 			len = arguments.length,
       
  1143 			args, i;
       
  1144 
       
  1145 		searchCache: while ( node ) {
       
  1146 			// Perform a shallow equality test to confirm that whether the node
       
  1147 			// under test is a candidate for the arguments passed. Two arrays
       
  1148 			// are shallowly equal if their length matches and each entry is
       
  1149 			// strictly equal between the two sets. Avoid abstracting to a
       
  1150 			// function which could incur an arguments leaking deoptimization.
       
  1151 
       
  1152 			// Check whether node arguments match arguments length
       
  1153 			if ( node.args.length !== arguments.length ) {
       
  1154 				node = node.next;
       
  1155 				continue;
       
  1156 			}
       
  1157 
       
  1158 			// Check whether node arguments match arguments values
       
  1159 			for ( i = 0; i < len; i++ ) {
       
  1160 				if ( node.args[ i ] !== arguments[ i ] ) {
       
  1161 					node = node.next;
       
  1162 					continue searchCache;
       
  1163 				}
       
  1164 			}
       
  1165 
       
  1166 			// At this point we can assume we've found a match
       
  1167 
       
  1168 			// Surface matched node to head if not already
       
  1169 			if ( node !== head ) {
       
  1170 				// As tail, shift to previous. Must only shift if not also
       
  1171 				// head, since if both head and tail, there is no previous.
       
  1172 				if ( node === tail ) {
       
  1173 					tail = node.prev;
       
  1174 				}
       
  1175 
       
  1176 				// Adjust siblings to point to each other. If node was tail,
       
  1177 				// this also handles new tail's empty `next` assignment.
       
  1178 				node.prev.next = node.next;
       
  1179 				if ( node.next ) {
       
  1180 					node.next.prev = node.prev;
       
  1181 				}
       
  1182 
       
  1183 				node.next = head;
       
  1184 				node.prev = null;
       
  1185 				head.prev = node;
       
  1186 				head = node;
       
  1187 			}
       
  1188 
       
  1189 			// Return immediately
       
  1190 			return node.val;
       
  1191 		}
       
  1192 
       
  1193 		// No cached value found. Continue to insertion phase:
       
  1194 
       
  1195 		// Create a copy of arguments (avoid leaking deoptimization)
       
  1196 		args = new Array( len );
       
  1197 		for ( i = 0; i < len; i++ ) {
       
  1198 			args[ i ] = arguments[ i ];
       
  1199 		}
       
  1200 
       
  1201 		node = {
       
  1202 			args: args,
       
  1203 
       
  1204 			// Generate the result from original function
       
  1205 			val: fn.apply( null, args )
       
  1206 		};
       
  1207 
       
  1208 		// Don't need to check whether node is already head, since it would
       
  1209 		// have been returned above already if it was
       
  1210 
       
  1211 		// Shift existing head down list
       
  1212 		if ( head ) {
       
  1213 			head.prev = node;
       
  1214 			node.next = head;
       
  1215 		} else {
       
  1216 			// If no head, follows that there's no tail (at initial or reset)
       
  1217 			tail = node;
       
  1218 		}
       
  1219 
       
  1220 		// Trim tail if we're reached max size and are pending cache insertion
       
  1221 		if ( size === maxSize ) {
       
  1222 			tail = tail.prev;
       
  1223 			tail.next = null;
       
  1224 		} else {
       
  1225 			size++;
       
  1226 		}
       
  1227 
       
  1228 		head = node;
       
  1229 
       
  1230 		return node.val;
       
  1231 	}
       
  1232 
       
  1233 	memoized.clear = function() {
       
  1234 		head = null;
       
  1235 		tail = null;
       
  1236 		size = 0;
       
  1237 	};
       
  1238 
       
  1239 	if ( false ) {}
       
  1240 
       
  1241 	return memoized;
       
  1242 };
       
  1243 
       
  1244 
       
  1245 /***/ }),
       
  1246 
       
  1247 /***/ 5:
  1216 /***/ 5:
  1248 /***/ (function(module, exports) {
  1217 /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1249 
  1218 
  1250 (function() { module.exports = this["wp"]["data"]; }());
  1219 "use strict";
  1251 
  1220 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
  1252 /***/ }),
  1221 function _defineProperty(obj, key, value) {
  1253 
  1222   if (key in obj) {
  1254 /***/ 65:
  1223     Object.defineProperty(obj, key, {
  1255 /***/ (function(module, exports, __webpack_require__) {
  1224       value: value,
  1256 
  1225       enumerable: true,
  1257 var rng = __webpack_require__(87);
  1226       configurable: true,
  1258 var bytesToUuid = __webpack_require__(88);
  1227       writable: true
  1259 
  1228     });
  1260 function v4(options, buf, offset) {
  1229   } else {
  1261   var i = buf && offset || 0;
  1230     obj[key] = value;
  1262 
       
  1263   if (typeof(options) == 'string') {
       
  1264     buf = options === 'binary' ? new Array(16) : null;
       
  1265     options = null;
       
  1266   }
  1231   }
  1267   options = options || {};
  1232 
  1268 
  1233   return obj;
  1269   var rnds = options.random || (options.rng || rng)();
  1234 }
  1270 
       
  1271   // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
       
  1272   rnds[6] = (rnds[6] & 0x0f) | 0x40;
       
  1273   rnds[8] = (rnds[8] & 0x3f) | 0x80;
       
  1274 
       
  1275   // Copy bytes to buffer, if provided
       
  1276   if (buf) {
       
  1277     for (var ii = 0; ii < 16; ++ii) {
       
  1278       buf[i + ii] = rnds[ii];
       
  1279     }
       
  1280   }
       
  1281 
       
  1282   return buf || bytesToUuid(rnds);
       
  1283 }
       
  1284 
       
  1285 module.exports = v4;
       
  1286 
       
  1287 
       
  1288 /***/ }),
       
  1289 
       
  1290 /***/ 7:
       
  1291 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  1292 
       
  1293 "use strict";
       
  1294 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectSpread; });
       
  1295 /* harmony import */ var _defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15);
       
  1296 
       
  1297 function _objectSpread(target) {
       
  1298   for (var i = 1; i < arguments.length; i++) {
       
  1299     var source = arguments[i] != null ? arguments[i] : {};
       
  1300     var ownKeys = Object.keys(source);
       
  1301 
       
  1302     if (typeof Object.getOwnPropertySymbols === 'function') {
       
  1303       ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
       
  1304         return Object.getOwnPropertyDescriptor(source, sym).enumerable;
       
  1305       }));
       
  1306     }
       
  1307 
       
  1308     ownKeys.forEach(function (key) {
       
  1309       Object(_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(target, key, source[key]);
       
  1310     });
       
  1311   }
       
  1312 
       
  1313   return target;
       
  1314 }
       
  1315 
       
  1316 /***/ }),
       
  1317 
       
  1318 /***/ 87:
       
  1319 /***/ (function(module, exports) {
       
  1320 
       
  1321 // Unique ID creation requires a high quality random # generator.  In the
       
  1322 // browser this is a little complicated due to unknown quality of Math.random()
       
  1323 // and inconsistent support for the `crypto` API.  We do the best we can via
       
  1324 // feature-detection
       
  1325 
       
  1326 // getRandomValues needs to be invoked in a context where "this" is a Crypto
       
  1327 // implementation. Also, find the complete implementation of crypto on IE11.
       
  1328 var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||
       
  1329                       (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));
       
  1330 
       
  1331 if (getRandomValues) {
       
  1332   // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto
       
  1333   var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
       
  1334 
       
  1335   module.exports = function whatwgRNG() {
       
  1336     getRandomValues(rnds8);
       
  1337     return rnds8;
       
  1338   };
       
  1339 } else {
       
  1340   // Math.random()-based (RNG)
       
  1341   //
       
  1342   // If all else fails, use Math.random().  It's fast, but is of unspecified
       
  1343   // quality.
       
  1344   var rnds = new Array(16);
       
  1345 
       
  1346   module.exports = function mathRNG() {
       
  1347     for (var i = 0, r; i < 16; i++) {
       
  1348       if ((i & 0x03) === 0) r = Math.random() * 0x100000000;
       
  1349       rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;
       
  1350     }
       
  1351 
       
  1352     return rnds;
       
  1353   };
       
  1354 }
       
  1355 
       
  1356 
       
  1357 /***/ }),
       
  1358 
       
  1359 /***/ 88:
       
  1360 /***/ (function(module, exports) {
       
  1361 
       
  1362 /**
       
  1363  * Convert array of 16 byte values to UUID string format of the form:
       
  1364  * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
       
  1365  */
       
  1366 var byteToHex = [];
       
  1367 for (var i = 0; i < 256; ++i) {
       
  1368   byteToHex[i] = (i + 0x100).toString(16).substr(1);
       
  1369 }
       
  1370 
       
  1371 function bytesToUuid(buf, offset) {
       
  1372   var i = offset || 0;
       
  1373   var bth = byteToHex;
       
  1374   // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
       
  1375   return ([bth[buf[i++]], bth[buf[i++]], 
       
  1376 	bth[buf[i++]], bth[buf[i++]], '-',
       
  1377 	bth[buf[i++]], bth[buf[i++]], '-',
       
  1378 	bth[buf[i++]], bth[buf[i++]], '-',
       
  1379 	bth[buf[i++]], bth[buf[i++]], '-',
       
  1380 	bth[buf[i++]], bth[buf[i++]],
       
  1381 	bth[buf[i++]], bth[buf[i++]],
       
  1382 	bth[buf[i++]], bth[buf[i++]]]).join('');
       
  1383 }
       
  1384 
       
  1385 module.exports = bytesToUuid;
       
  1386 
       
  1387 
  1235 
  1388 /***/ })
  1236 /***/ })
  1389 
  1237 
  1390 /******/ });
  1238 /******/ });