in src/lib/util/utils.ts [204:216]
export function generateRandomId(prefix: string, existingIds: object) {
let randomStr
while (true) {
randomStr = Math.random().toString(36).substr(2, 12)
if (prefix && typeof prefix.valueOf() === "string") {
randomStr = prefix + randomStr
}
if (!existingIds || !(randomStr in existingIds)) {
break
}
}
return randomStr
}