function magic_string_replace_all(src, search, replace) {
	let idx = src.original.indexOf(search);
	if (idx == -1) throw new Error('search not found in src');
	do {
		src.overwrite(idx, idx + search.length, replace, { storeName: true });
	} while ((idx = src.original.indexOf(search, idx + 1)) != -1);
}
@param {MagicString} src
@param {string} search
@param {string} replace