const UPPERCASE_PREFIX = '^{';
const UPPERCASE_SUFFIX = '}^';
export function encodeDragDataTransfer(str) {
    return str.replace(/([A-Z]+)/g, `${UPPERCASE_PREFIX}$1${UPPERCASE_SUFFIX}`);
}
export function decodeDragDataTransfer(str) {
    const escapeRegExp = (escape) => ['', ...escape.split('')].join('\\');
    return str.replace(new RegExp(`${escapeRegExp(UPPERCASE_PREFIX)}(.*?)${escapeRegExp(UPPERCASE_SUFFIX)}`, 'g'), (_, p1) => p1.toUpperCase());
}
//# sourceMappingURL=encodeDragDataTransfer.js.map