const uuid7 = (date) => {
const n = BigInt(Math.floor(new Date(date))) << 80n | 7n << 76n | BigInt(Math.random() * 2 ** 12 >>> 0) << 64n | 2n << 62n | BigInt(Math.random() * 2 ** 32 >>> 0) << 30n | BigInt(Math.random() * 2 ** 30 >>> 0)
return `${(n >> 96n).toString(16).padStart(8, "0")}-${((n >> 80n) & (2n ** 16n) - 1n).toString(16).padStart(4, "0")}-${((n >> 64n) & (2n ** 16n) - 1n).toString(16).padStart(4, "0")}-${((n >> 48n) & (2n ** 16n) - 1n).toString(16).padStart(4, "0")}-${(n & (2n ** 48n - 1n)).toString(16).padStart(12, "0")}`
}