: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* Ignored from documentation as the recommended usage for this action through setFreeformContentHandlerName from @wordpress/blocks.
* @param {string} name Block name.
* @return {Object} Action object.
function setFreeformFallbackBlockName(name) {
type: 'SET_FREEFORM_FALLBACK_BLOCK_NAME',
* Returns an action object used to set the name of the block used as a fallback
* for unregistered blocks.
* Ignored from documentation as the recommended usage for this action through setUnregisteredTypeHandlerName from @wordpress/blocks.
* @param {string} name Block name.
* @return {Object} Action object.
function setUnregisteredFallbackBlockName(name) {
type: 'SET_UNREGISTERED_FALLBACK_BLOCK_NAME',
* Returns an action object used to set the name of the block used
* when grouping other blocks
* eg: in "Group/Ungroup" interactions
* Ignored from documentation as the recommended usage for this action through setGroupingBlockName from @wordpress/blocks.
* @param {string} name Block name.
* @return {Object} Action object.
function actions_setGroupingBlockName(name) {
type: 'SET_GROUPING_BLOCK_NAME',
* Returns an action object used to set block categories.
* Ignored from documentation as the recommended usage for this action through setCategories from @wordpress/blocks.
* @param {WPBlockCategory[]} categories Block categories.
* @return {Object} Action object.
function setCategories(categories) {
* Returns an action object used to update a category.
* Ignored from documentation as the recommended usage for this action through updateCategory from @wordpress/blocks.
* @param {string} slug Block category slug.
* @param {Object} category Object containing the category properties that should be updated.
* @return {Object} Action object.
function updateCategory(slug, category) {
* Returns an action object used to add block collections
* Ignored from documentation as the recommended usage for this action through registerBlockCollection from @wordpress/blocks.
* @param {string} namespace The namespace of the blocks to put in the collection
* @param {string} title The title to display in the block inserter
* @param {Object} icon (optional) The icon to display in the block inserter
* @return {Object} Action object.
function addBlockCollection(namespace, title, icon) {
type: 'ADD_BLOCK_COLLECTION',
* Returns an action object used to remove block collections
* Ignored from documentation as the recommended usage for this action through unregisterBlockCollection from @wordpress/blocks.
* @param {string} namespace The namespace of the blocks to put in the collection
* @return {Object} Action object.
function removeBlockCollection(namespace) {
type: 'REMOVE_BLOCK_COLLECTION',
;// CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/store/private-actions.js
/** @typedef {import('../api/registration').WPBlockType} WPBlockType */
* Add bootstrapped block type metadata to the store. These metadata usually come from
* the `block.json` file and are either statically boostrapped from the server, or
* passed as the `metadata` parameter to the `registerBlockType` function.
* @param {string} name Block name.
* @param {WPBlockType} blockType Block type metadata.
function addBootstrappedBlockType(name, blockType) {
type: 'ADD_BOOTSTRAPPED_BLOCK_TYPE',
* Add unprocessed block type settings to the store. These data are passed as the
* `settings` parameter to the client-side `registerBlockType` function.
* @param {string} name Block name.
* @param {WPBlockType} blockType Unprocessed block type settings.
function addUnprocessedBlockType(name, blockType) {
type: 'ADD_UNPROCESSED_BLOCK_TYPE',
const processedBlockType = dispatch(processBlockType(name, blockType));
if (!processedBlockType) {
dispatch.addBlockTypes(processedBlockType);
* Register new block bindings source.
* @param {string} source Name of the source to register.
function registerBlockBindingsSource(source) {
type: 'REGISTER_BLOCK_BINDINGS_SOURCE',
sourceLabel: source.label,
getValue: source.getValue,
setValue: source.setValue,
setValues: source.setValues,
getPlaceholder: source.getPlaceholder,
canUserEditValue: source.canUserEditValue
;// CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/store/constants.js
const STORE_NAME = 'core/blocks';
;// CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/store/index.js
* Store definition for the blocks namespace.
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
const store = (0,external_wp_data_namespaceObject.createReduxStore)(STORE_NAME, {
selectors: selectors_namespaceObject,
actions: actions_namespaceObject
(0,external_wp_data_namespaceObject.register)(store);
unlock(store).registerPrivateSelectors(private_selectors_namespaceObject);
unlock(store).registerPrivateActions(private_actions_namespaceObject);
;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/native.js
const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
/* harmony default export */ const esm_browser_native = ({
;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/rng.js
// Unique ID creation requires a high quality random # generator. In the browser we therefore
// require the crypto API and do not support built-in fallback to lower quality random number
// generators (like Math.random()).
const rnds8 = new Uint8Array(16);
// lazy load so that environments that need to polyfill have a chance to do so
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
return getRandomValues(rnds8);
;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/stringify.js
* Convert array of 16 byte values to UUID string format of the form:
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
for (let i = 0; i < 256; ++i) {
byteToHex.push((i + 0x100).toString(16).slice(1));
function unsafeStringify(arr, offset = 0) {
// Note: Be careful editing this code! It's been tuned for performance
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
function stringify(arr, offset = 0) {
const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one
// - One or more input array values don't map to a hex octet (leading to
// "undefined" in the uuid)
// - Invalid input values for the RFC `version` or `variant` fields
throw TypeError('Stringified UUID is invalid');
/* harmony default export */ const esm_browser_stringify = ((/* unused pure expression or super */ null && (stringify)));
;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/v4.js
function v4(options, buf, offset) {
if (esm_browser_native.randomUUID && !buf && !options) {
return esm_browser_native.randomUUID();
const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
rnds[6] = rnds[6] & 0x0f | 0x40;
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
for (let i = 0; i < 16; ++i) {
buf[offset + i] = rnds[i];
return unsafeStringify(rnds);
/* harmony default export */ const esm_browser_v4 = (v4);
;// CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/factory.js
* Returns a block object given its type and attributes.
* @param {string} name Block name.
* @param {Object} attributes Block attributes.
* @param {?Array} innerBlocks Nested blocks.
* @return {Object} Block object.
function createBlock(name, attributes = {}, innerBlocks = []) {
const sanitizedAttributes = __experimentalSanitizeBlockAttributes(name, attributes);
const clientId = esm_browser_v4();
// Blocks are stored with a unique ID, the assigned type name, the block
// attributes, and their inner blocks.
attributes: sanitizedAttributes,
* Given an array of InnerBlocks templates or Block Objects,
* returns an array of created Blocks from them.
* It handles the case of having InnerBlocks as Blocks by
* converting them to the proper format to continue recursively.
* @param {Array} innerBlocksOrTemplate Nested blocks or InnerBlocks templates.
* @return {Object[]} Array of Block objects.
function createBlocksFromInnerBlocksTemplate(innerBlocksOrTemplate = []) {
return innerBlocksOrTemplate.map(innerBlock => {
const innerBlockTemplate = Array.isArray(innerBlock) ? innerBlock : [innerBlock.name, innerBlock.attributes, innerBlock.innerBlocks];
const [name, attributes, innerBlocks = []] = innerBlockTemplate;
return createBlock(name, attributes, createBlocksFromInnerBlocksTemplate(innerBlocks));
* Given a block object, returns a copy of the block object while sanitizing its attributes,
* optionally merging new attributes and/or replacing its inner blocks.
* @param {Object} block Block instance.
* @param {Object} mergeAttributes Block attributes.
* @param {?Array} newInnerBlocks Nested blocks.
* @return {Object} A cloned block.
function __experimentalCloneSanitizedBlock(block, mergeAttributes = {}, newInnerBlocks) {
const clientId = esm_browser_v4();
const sanitizedAttributes = __experimentalSanitizeBlockAttributes(block.name, {
attributes: sanitizedAttributes,
innerBlocks: newInnerBlocks || block.innerBlocks.map(innerBlock => __experimentalCloneSanitizedBlock(innerBlock))
* Given a block object, returns a copy of the block object,
* optionally merging new attributes and/or replacing its inner blocks.
* @param {Object} block Block instance.
* @param {Object} mergeAttributes Block attributes.
* @param {?Array} newInnerBlocks Nested blocks.
* @return {Object} A cloned block.
function cloneBlock(block, mergeAttributes = {}, newInnerBlocks) {
const clientId = esm_browser_v4();
innerBlocks: newInnerBlocks || block.innerBlocks.map(innerBlock => cloneBlock(innerBlock))
* Returns a boolean indicating whether a transform is possible based on
* various bits of context.
* @param {Object} transform The transform object to validate.
* @param {string} direction Is this a 'from' or 'to' transform.
* @param {Array} blocks The blocks to transform from.
* @return {boolean} Is the transform possible?
const isPossibleTransformForSource = (transform, direction, blocks) => {
// If multiple blocks are selected, only multi block transforms
// or wildcard transforms are allowed.
const isMultiBlock = blocks.length > 1;
const firstBlockName = blocks[0].name;
const isValidForMultiBlocks = isWildcardBlockTransform(transform) || !isMultiBlock || transform.isMultiBlock;
if (!isValidForMultiBlocks) {
// Check non-wildcard transforms to ensure that transform is valid
// for a block selection of multiple blocks of different types.
if (!isWildcardBlockTransform(transform) && !blocks.every(block => block.name === firstBlockName)) {
// Only consider 'block' type transforms as valid.
const isBlockType = transform.type === 'block';
// Check if the transform's block name matches the source block (or is a wildcard)
// only if this is a transform 'from'.
const sourceBlock = blocks[0];
const hasMatchingName = direction !== 'from' || transform.blocks.indexOf(sourceBlock.name) !== -1 || isWildcardBlockTransform(transform);
// Don't allow single Grouping blocks to be transformed into
if (!isMultiBlock && direction === 'from' && isContainerGroupBlock(sourceBlock.name) && isContainerGroupBlock(transform.blockName)) {
// If the transform has a `isMatch` function specified, check that it returns true.
if (!maybeCheckTransformIsMatch(transform, blocks)) {
* Returns block types that the 'blocks' can be transformed into, based on
* 'from' transforms on other blocks.
* @param {Array} blocks The blocks to transform from.
* @return {Array} Block types that the blocks can be transformed into.
const getBlockTypesForPossibleFromTransforms = blocks => {
const allBlockTypes = getBlockTypes();
// filter all blocks to find those with a 'from' transform.
const blockTypesWithPossibleFromTransforms = allBlockTypes.filter(blockType => {
const fromTransforms = getBlockTransforms('from', blockType.name);
return !!findTransform(fromTransforms, transform => {
return isPossibleTransformForSource(transform, 'from', blocks);