"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getActiveObject = getActiveObject; var _specialCharacters = require("./special-characters"); /** * Internal dependencies */ /** @typedef {import('./types').RichTextValue} RichTextValue */ /** @typedef {import('./types').RichTextFormat} RichTextFormat */ /** * Gets the active object, if there is any. * * @param {RichTextValue} value Value to inspect. * * @return {RichTextFormat|void} Active object, or undefined. */ function getActiveObject({ start, end, replacements, text }) { if (start + 1 !== end || text[start] !== _specialCharacters.OBJECT_REPLACEMENT_CHARACTER) { return; } return replacements[start]; } //# sourceMappingURL=get-active-object.js.map