* Store definition for the blocks namespace.
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
var store = Object(external_wp_data_["createReduxStore"])(STORE_NAME, {
selectors: selectors_namespaceObject,
actions: actions_namespaceObject
Object(external_wp_data_["register"])(store);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
var slicedToArray = __webpack_require__("ODXe");
// EXTERNAL MODULE: ./node_modules/uuid/dist/esm-browser/v4.js + 4 modules
var v4 = __webpack_require__("7Cbv");
// EXTERNAL MODULE: external ["wp","hooks"]
var external_wp_hooks_ = __webpack_require__("g56x");
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/block-default.js
var block_default = __webpack_require__("//Lo");
// EXTERNAL MODULE: ./node_modules/tinycolor2/tinycolor.js
var tinycolor = __webpack_require__("Zss7");
var tinycolor_default = /*#__PURE__*/__webpack_require__.n(tinycolor);
// EXTERNAL MODULE: external ["wp","element"]
var external_wp_element_ = __webpack_require__("GRId");
// EXTERNAL MODULE: external ["wp","dom"]
var external_wp_dom_ = __webpack_require__("1CF3");
// CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/utils.js
function utils_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; }
function utils_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { utils_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 { utils_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
* Array of icon colors containing a color to be used if the icon color
* was not explicitly set but the icon background color was.
var ICON_COLORS = ['#191e23', '#f8f9f9'];
* Determines whether the block is a default block
* and its attributes are equal to the default attributes
* which means the block is unmodified.
* @param {WPBlock} block Block Object
* @return {boolean} Whether the block is an unmodified default block
function isUnmodifiedDefaultBlock(block) {
var defaultBlockName = registration_getDefaultBlockName();
if (block.name !== defaultBlockName) {
} // Cache a created default block if no cache exists or the default block
if (!isUnmodifiedDefaultBlock.block || isUnmodifiedDefaultBlock.block.name !== defaultBlockName) {
isUnmodifiedDefaultBlock.block = createBlock(defaultBlockName);
var newDefaultBlock = isUnmodifiedDefaultBlock.block;
var blockType = registration_getBlockType(defaultBlockName);
return Object(external_lodash_["every"])(blockType.attributes, function (value, key) {
return newDefaultBlock.attributes[key] === block.attributes[key];
* Function that checks if the parameter is a valid icon.
* @param {*} icon Parameter to be checked.
* @return {boolean} True if the parameter is a valid icon and false otherwise.
function isValidIcon(icon) {
return !!icon && (Object(external_lodash_["isString"])(icon) || Object(external_wp_element_["isValidElement"])(icon) || Object(external_lodash_["isFunction"])(icon) || icon instanceof external_wp_element_["Component"]);
* Function that receives an icon as set by the blocks during the registration
* and returns a new icon object that is normalized so we can rely on just on possible icon structure
* @param {WPBlockTypeIconRender} icon Render behavior of a block type icon;
* one of a Dashicon slug, an element, or a
* @return {WPBlockTypeIconDescriptor} Object describing the icon.
function normalizeIconObject(icon) {
if (Object(external_lodash_["has"])(icon, ['background'])) {
var tinyBgColor = tinycolor_default()(icon.background);
return utils_objectSpread(utils_objectSpread({}, icon), {}, {
foreground: icon.foreground ? icon.foreground : Object(tinycolor["mostReadable"])(tinyBgColor, ICON_COLORS, {
includeFallbackColors: true,
shadowColor: tinyBgColor.setAlpha(0.3).toRgbString()
* Normalizes block type passed as param. When string is passed then
* it converts it to the matching block type object.
* It passes the original object otherwise.
* @param {string|Object} blockTypeOrName Block type or name.
* @return {?Object} Block type.
function normalizeBlockType(blockTypeOrName) {
if (Object(external_lodash_["isString"])(blockTypeOrName)) {
return registration_getBlockType(blockTypeOrName);
* Get the label for the block, usually this is either the block title,
* or the value of the block's `label` function when that's specified.
* @param {Object} blockType The block type.
* @param {Object} attributes The values of the block's attributes.
* @param {Object} context The intended use for the label.
* @return {string} The block label.
function getBlockLabel(blockType, attributes) {
var context = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'visual';
// Attempt to find entity title if block is a template part.
// Require slug to request, otherwise entity is uncreated and will throw 404.
if ('core/template-part' === blockType.name && attributes.slug) {
var entity = Object(external_wp_data_["select"])('core').getEntityRecord('postType', 'wp_template_part', attributes.theme + '//' + attributes.slug);
return Object(external_lodash_["startCase"])(((_entity$title = entity.title) === null || _entity$title === void 0 ? void 0 : _entity$title.rendered) || entity.slug);
var getLabel = blockType.__experimentalLabel,
var label = getLabel && getLabel(attributes, {
} // Strip any HTML (i.e. RichText formatting) before returning.
return Object(external_wp_dom_["__unstableStripHTML"])(label);
* Get a label for the block for use by screenreaders, this is more descriptive
* than the visual label and includes the block title and the value of the
* `getLabel` function if it's specified.
* @param {Object} blockType The block type.
* @param {Object} attributes The values of the block's attributes.
* @param {?number} position The position of the block in the block list.
* @param {string} [direction='vertical'] The direction of the block layout.
* @return {string} The block label.
function getAccessibleBlockLabel(blockType, attributes, position) {
var direction = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'vertical';
// `title` is already localized, `label` is a user-supplied value.
var title = blockType.title;
var label = getBlockLabel(blockType, attributes, 'accessibility');
var hasPosition = position !== undefined; // getBlockLabel returns the block title as a fallback when there's no label,
// if it did return the title, this function needs to avoid adding the
// title twice within the accessible label. Use this `hasLabel` boolean to
var hasLabel = label && label !== title;
if (hasPosition && direction === 'vertical') {
return Object(external_wp_i18n_["sprintf"])(
/* translators: accessibility text. 1: The block title. 2: The block row number. 3: The block label.. */
Object(external_wp_i18n_["__"])('%1$s Block. Row %2$d. %3$s'), title, position, label);
return Object(external_wp_i18n_["sprintf"])(
/* translators: accessibility text. 1: The block title. 2: The block row number. */
Object(external_wp_i18n_["__"])('%1$s Block. Row %2$d'), title, position);
} else if (hasPosition && direction === 'horizontal') {
return Object(external_wp_i18n_["sprintf"])(
/* translators: accessibility text. 1: The block title. 2: The block column number. 3: The block label.. */
Object(external_wp_i18n_["__"])('%1$s Block. Column %2$d. %3$s'), title, position, label);
return Object(external_wp_i18n_["sprintf"])(
/* translators: accessibility text. 1: The block title. 2: The block column number. */
Object(external_wp_i18n_["__"])('%1$s Block. Column %2$d'), title, position);
return Object(external_wp_i18n_["sprintf"])(
/* translators: accessibility text. %1: The block title. %2: The block label. */
Object(external_wp_i18n_["__"])('%1$s Block. %2$s'), title, label);
return Object(external_wp_i18n_["sprintf"])(
/* translators: accessibility text. %s: The block title. */
Object(external_wp_i18n_["__"])('%s Block'), title);
* Ensure attributes contains only values defined by block type, and merge
* default values for missing attributes.
* @param {string} name The block's name.
* @param {Object} attributes The block's attributes.
* @return {Object} The sanitized attributes.
function sanitizeBlockAttributes(name, attributes) {
// Get the type definition associated with a registered block.
var blockType = registration_getBlockType(name);
if (undefined === blockType) {
throw new Error("Block type '".concat(name, "' is not registered."));
return Object(external_lodash_["reduce"])(blockType.attributes, function (accumulator, schema, key) {
var value = attributes[key];
if (undefined !== value) {
accumulator[key] = value;
} else if (schema.hasOwnProperty('default')) {
accumulator[key] = schema.default;
if (['node', 'children'].indexOf(schema.source) !== -1) {
// Ensure value passed is always an array, which we're expecting in
// the RichText component to handle the deprecated value.
if (typeof accumulator[key] === 'string') {
accumulator[key] = [accumulator[key]];
} else if (!Array.isArray(accumulator[key])) {
// CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/constants.js
* Array of valid keys in a block type settings deprecation object.
var DEPRECATED_ENTRY_KEYS = ['attributes', 'supports', 'save', 'migrate', 'isEligible', 'apiVersion'];
var __EXPERIMENTAL_STYLE_PROPERTY = {
'--wp--style--color--link': {
value: ['color', 'link'],
support: ['color', 'link']
value: ['color', 'gradient'],
support: ['color', 'gradients']
value: ['color', 'background'],
value: ['border', 'radius'],
support: ['__experimentalBorder', 'radius']
value: ['color', 'text'],
value: ['typography', 'fontFamily'],
support: ['__experimentalFontFamily']
value: ['typography', 'fontSize'],
value: ['typography', 'fontStyle'],
support: ['__experimentalFontStyle']
value: ['typography', 'fontWeight'],
support: ['__experimentalFontWeight']
value: ['typography', 'lineHeight'],
value: ['spacing', 'padding'],
support: ['spacing', 'padding'],
properties: ['top', 'right', 'bottom', 'left']
value: ['typography', 'textDecoration'],
support: ['__experimentalTextDecoration']
value: ['typography', 'textTransform'],
support: ['__experimentalTextTransform']
// CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/registration.js
function registration_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; }
function registration_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { registration_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 { registration_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
/* eslint no-console: [ 'error', { allow: [ 'error', 'warn' ] } ] */
* An icon type definition. One of a Dashicon slug, an element,
* @typedef {(string|WPElement|WPComponent)} WPIcon
* @see https://developer.wordpress.org/resource/dashicons/
* Render behavior of a block type icon; one of a Dashicon slug, an element,
* @typedef {WPIcon} WPBlockTypeIconRender
* An object describing a normalized block type icon.
* @typedef {Object} WPBlockTypeIconDescriptor
* @property {WPBlockTypeIconRender} src Render behavior of the icon,
* one of a Dashicon slug, an
* element, or a component.
* @property {string} background Optimal background hex string
* color when displaying icon.
* @property {string} foreground Optimal foreground hex string
* color when displaying icon.
* @property {string} shadowColor Optimal shadow hex string
* color when displaying icon.
* Value to use to render the icon for a block type in an editor interface,
* either a Dashicon slug, an element, a component, or an object describing
* @typedef {(WPBlockTypeIconDescriptor|WPBlockTypeIconRender)} WPBlockTypeIcon
* Named block variation scopes.
* @typedef {'block'|'inserter'|'transform'} WPBlockVariationScope
* An object describing a variation defined for the block type.
* @typedef {Object} WPBlockVariation
* @property {string} name The unique and machine-readable name.
* @property {string} title A human-readable variation title.
* @property {string} [description] A detailed variation description.
* @property {string} [category] Block type category classification,
* used in search interfaces to arrange
* block types by category.
* @property {WPIcon} [icon] An icon helping to visualize the variation.
* @property {boolean} [isDefault] Indicates whether the current variation is
* the default one. Defaults to `false`.
* @property {Object} [attributes] Values which override block attributes.
* @property {Array[]} [innerBlocks] Initial configuration of nested blocks.
* @property {Object} [example] Example provides structured data for
* the block preview. You can set to
* `undefined` to disable the preview shown
* @property {WPBlockVariationScope[]} [scope] The list of scopes where the variation
* is applicable. When not provided, it
* assumes all available scopes.
* @property {string[]} [keywords] An array of terms (which can be translated)
* that help users discover the variation
* @property {Function} [isActive] A function that accepts a block's attributes
* and the variation's attributes and determines
* if a variation is active. This function doesn't
* try to find a match dynamically based on all
* block's attributes, as in many cases some
* attributes are irrelevant. An example would
* be for `embed` block where we only care about
* `providerNameSlug` attribute's value.
* Defined behavior of a block type.
* @typedef {Object} WPBlock
* @property {string} name Block type's namespaced name.
* @property {string} title Human-readable block type label.
* @property {string} [description] A detailed block type description.
* @property {string} [category] Block type category classification,
* used in search interfaces to arrange
* block types by category.
* @property {WPBlockTypeIcon} [icon] Block type icon.
* @property {string[]} [keywords] Additional keywords to produce block
* type as result in search interfaces.
* @property {Object} [attributes] Block type attributes.
* @property {WPComponent} [save] Optional component describing
* serialized markup structure of a
* @property {WPComponent} edit Component rendering an element to