
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="cdc55a34-e67b-5cde-bb19-5e4c674ac59f")}catch(e){}}();
const TASK_ID_LENGTH = 5;
export function createShortTaskId(randomUuid) {
    return randomUuid().replaceAll("-", "").slice(0, TASK_ID_LENGTH);
}
export function createUniqueTaskId(existingIds, randomUuid) {
    for (let attempt = 0; attempt < 16; attempt += 1) {
        const candidate = createShortTaskId(randomUuid);
        if (!existingIds.has(candidate)) {
            return candidate;
        }
    }
    return `${Date.now().toString(36)}${Math.random().toString(36).slice(2)}`.slice(0, TASK_ID_LENGTH);
}
//# sourceMappingURL=task-id.js.map
//# debugId=cdc55a34-e67b-5cde-bb19-5e4c674ac59f
