diff --git a/.gitignore b/.gitignore index 1ec6efd7..da507885 100644 --- a/.gitignore +++ b/.gitignore @@ -56,3 +56,9 @@ typings/ # Cargo build output target/ + +# Local SQLite files +lazer/cardano/backend/data/*.db + +# Backend build output +lazer/cardano/backend/dist/ diff --git a/lazer/cardano/README.md b/lazer/cardano/README.md new file mode 100644 index 00000000..07363c81 --- /dev/null +++ b/lazer/cardano/README.md @@ -0,0 +1,56 @@ +# Payth: calibrate uncertainty + +This project aims to bring Pyth to Cardano with a simple, small and yet useful use case. Right now it's not a product per se, but it could become one in some ways. + +## Project description + +Imagine you want to submit a grant proposal for a project idea you had that will improve Cardano significantly. You do your research, desing a feasible solution, and estimate a budget based on the amount of time and effort you expect to put on the solution. But, the grant will be paid in *ADA*, while your budget is estimated in *USD*. + +Of course, you could convert the budget to ADA using the current exchange rate, but delivery may take months or even years. During that time, the rate can fluctuate dramatically, potentially reaching entirely different value ranges. Payth solves this problem. + +The idea is pretty basic: an applicant, Anne, wants to do some task that will be paid in the future by some sponsor Bill. The transaction is gonna be in ADA, but Anne wants the price fixed in USD to avoid possible fluctuations. This could be benefitial, economically speaking, to any of them depending on the market. So Anne fixes a price in USD and, using the off-chain Pyth API, determines the corresponding amount of ADA at the given moment. She makes a request to Bill, and he **locks** in a Cardano Validator that amount of ADA, plus a certain margin (right now that margin is fixed to 100%). + +When both actors agree the task is complete, Bill proceeds to **unlock** the funds. How much? Well, the amount of ADA corresponding to the USD agreed, but using the current relation between USD and ADA. This is where **Pyth** comes in to compute on-chain how much ADA should be sent to Anne and how much should return to Bill. + +In the case that Anne leaves the job undone, or any real life condition that interrupts the relationship, Bill has the option to retrieve the locked funds. So, in summary, there are 2 possible flows: **lock --> unlock** and **lock --> cancel**. + +This of course can improve in many ways: +* Add validity times for the unlock or the cancel actions +* Give flexibility to the margin given by Bill +* Allow other currencies to be used instead of USD + +## Use cases +Catalyst and other rounds of funding could optionally use this system to reduce uncertainty for developers, but also it could work for freelance initiatives, service retainers and bounties or open tasks. + +## Codebase overview +The project is divided into 2 main sections: backend and frontend. +* The **frontend** connects the user with their Eternl wallet and makes requests to Pyth off-chain API to track the current ADA and USD value in the market. It also handles user interactions and request to the backend for creating a Task, completing a Task and retrieving money if the task is aborted. It is divided in 2 screens "Applicant" and "Sponsor" where each role has a different view. +* The **backend** provides 3 endpoints for the 3 actions, which in this context correspond to **lock**, **unlock** and **cancel** scripts. Each of them handles the deploy of a different transaction in cardano, using the **Evolution** framework. It also contains the Aiken code that will regulate the **unlocking** of funds. It also contains a battery of Aiken and Typescript tests. + +## Try it yourself +* Go to the ```frontend``` directory, run ```npm i``` and run the frontend with ```npm run dev```. +* Go to the ```backend``` directory, run ```npm i``` and run the server with ```npm run api```. +* Go to the ```backend``` directory, create a ```.env``` file like the `.env.example` and fill it with your own credentials. Give funds to the sponsor address. +* Go to the ```frontend``` directory, create a ```.env``` file like the `.env.example` and fill it with your own credentials. +* To run the tests, run `aiken check` for the Aiken tests and `npm run test` for the backend tests. + +**Disclaimer:** some actions may take more than one attempt or take some time to make impact, sorry for the complications. + +Note that the project must be run in Google Chrome, or any browser that supports Eternl Wallet extension (but it was tested in Chrome). + +## Frontend overview +Here you can see the header of the page after connecting the wallet + +![header.png](images/header.png) + +Then you can choose which role are you on: + +![role.png](images/role.png) + +If you are an applicant, you can create your request + +![create.png](images/create.png) + +and then see a list of created requests + +![tasks.png](images/tasks.png) \ No newline at end of file diff --git a/lazer/cardano/backend/.env.example b/lazer/cardano/backend/.env.example new file mode 100644 index 00000000..d8b3ff49 --- /dev/null +++ b/lazer/cardano/backend/.env.example @@ -0,0 +1,15 @@ +# Blockfrost API key for Cardano preprod +BLOCKFROST_PROJECT_ID=preprodXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + +BLOCKFROST_URL=https://cardano-preprod.blockfrost.io/api/v0 + +# Sponsor wallet seed phrase (24 words) +SPONSOR_SEED_PHRASE=word1 word2 word3 word4 word5 word6 word7 word8 word9 word10 word11 word12 word13 word14 word15 word16 word17 word18 word19 word20 word21 word22 word23 word24 + +# Pyth Lazer deployment PolicyId on preprod +PYTH_POLICY_ID=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + +# Pyth Lazer API token +PYTH_LAZER_TOKEN=your_pyth_lazer_token_here + +NETWORK=preprod \ No newline at end of file diff --git a/lazer/cardano/backend/aiken.lock b/lazer/cardano/backend/aiken.lock new file mode 100644 index 00000000..1abde83d --- /dev/null +++ b/lazer/cardano/backend/aiken.lock @@ -0,0 +1,27 @@ +# This file was generated by Aiken +# You typically do not need to edit this file + +[[requirements]] +name = "aiken-lang/stdlib" +version = "v3.0.0" +source = "github" + +[[requirements]] +name = "pyth-network/pyth-lazer-cardano" +version = "main" +source = "github" + +[[packages]] +name = "aiken-lang/stdlib" +version = "v3.0.0" +requirements = [] +source = "github" + +[[packages]] +name = "pyth-network/pyth-lazer-cardano" +version = "main" +requirements = [] +source = "github" + +[etags] +"pyth-network/pyth-lazer-cardano@main" = [{ secs_since_epoch = 1774216218, nanos_since_epoch = 134812250 }, "a46dacd97a22eb07feeaf966d48c3116c8249ddc836705656e3135cea285bcfc"] diff --git a/lazer/cardano/backend/aiken.toml b/lazer/cardano/backend/aiken.toml new file mode 100644 index 00000000..72ac68e0 --- /dev/null +++ b/lazer/cardano/backend/aiken.toml @@ -0,0 +1,14 @@ +name = "pyth-examples/pay-with-pyth" +version = "0.0.1" +license = "Apache-2.0" +description = "Payment agreements in USD settled in ADA using Pyth oracle prices" + +[[dependencies]] +name = "aiken-lang/stdlib" +version = "v3.0.0" +source = "github" + +[[dependencies]] +name = "pyth-network/pyth-lazer-cardano" +version = "main" +source = "github" diff --git a/lazer/cardano/backend/api/server.ts b/lazer/cardano/backend/api/server.ts new file mode 100644 index 00000000..b062e26a --- /dev/null +++ b/lazer/cardano/backend/api/server.ts @@ -0,0 +1,611 @@ +import { randomUUID } from "node:crypto"; +import { mkdirSync } from "node:fs"; +import { createServer, type IncomingMessage, type ServerResponse } from "node:http"; +import { dirname, join } from "node:path"; +import { fileURLToPath } from "node:url"; +import { DatabaseSync } from "node:sqlite"; +import { executeCancelFlow } from "../deployment/services/cancelFlow.js"; +import { executeLockFlow } from "../deployment/services/lockFlow.js"; +import { executeUnlockFlow } from "../deployment/services/unlockFlow.js"; + +interface CreateRequestPayload { + requesterAddressHex: string; + sponsorAddressHex?: string | null; + usdAmount: number; + adaUsd: number; + coverageMultiplier?: number; + description?: string; + dueDate?: string; +} + +interface LockNumbers { + coverageMultiplier: number; + lockAda: number; + lockLovelace: number; +} + +const __dirname = dirname(fileURLToPath(import.meta.url)); +const dataDir = join(__dirname, "..", "data"); +mkdirSync(dataDir, { recursive: true }); + +const dbPath = join(dataDir, "requests.db"); +const db = new DatabaseSync(dbPath); + +db.exec(` + CREATE TABLE IF NOT EXISTS requests ( + id TEXT PRIMARY KEY, + requester_address_hex TEXT NOT NULL, + sponsor_address_hex TEXT, + usd_amount REAL NOT NULL, + lock_ada REAL NOT NULL, + lock_lovelace INTEGER NOT NULL, + ada_usd REAL NOT NULL, + coverage_multiplier REAL NOT NULL, + status TEXT NOT NULL, + description TEXT, + due_date TEXT, + created_at TEXT NOT NULL, + lock_tx_id TEXT NOT NULL, + lock_tx_draft_json TEXT NOT NULL, + pyth_policy_id TEXT, + cancel_tx_id TEXT, + unlock_tx_id TEXT + ) +`); + +try { + db.exec(`ALTER TABLE requests ADD COLUMN cancel_tx_id TEXT`); +} catch { + // Column already exists. +} + +try { + db.exec(`ALTER TABLE requests ADD COLUMN unlock_tx_id TEXT`); +} catch { + // Column already exists. +} + +try { + db.exec(`ALTER TABLE requests ADD COLUMN pyth_policy_id TEXT`); +} catch { + // Column already exists. +} + +const insertRequest = db.prepare(` + INSERT INTO requests ( + id, + requester_address_hex, + sponsor_address_hex, + usd_amount, + lock_ada, + lock_lovelace, + ada_usd, + coverage_multiplier, + status, + description, + due_date, + created_at, + lock_tx_id, + lock_tx_draft_json, + pyth_policy_id + ) VALUES ( + $id, + $requesterAddressHex, + $sponsorAddressHex, + $usdAmount, + $lockAda, + $lockLovelace, + $adaUsd, + $coverageMultiplier, + $status, + $description, + $dueDate, + $createdAt, + $lockTxId, + $lockTxDraftJson, + $pythPolicyId + ) +`); + +const selectAllRequests = db.prepare(` + SELECT + id, + requester_address_hex AS requesterAddressHex, + sponsor_address_hex AS sponsorAddressHex, + usd_amount AS usdAmount, + lock_ada AS lockAda, + lock_lovelace AS lockLovelace, + ada_usd AS adaUsd, + coverage_multiplier AS coverageMultiplier, + status, + description, + due_date AS dueDate, + created_at AS createdAt, + lock_tx_id AS lockTxId, + lock_tx_draft_json AS lockTxDraftJson, + pyth_policy_id AS pythPolicyId, + cancel_tx_id AS cancelTxId, + unlock_tx_id AS unlockTxId + FROM requests + ORDER BY created_at DESC +`); + +const selectRequestById = db.prepare(` + SELECT + id, + requester_address_hex AS requesterAddressHex, + sponsor_address_hex AS sponsorAddressHex, + usd_amount AS usdAmount, + lock_ada AS lockAda, + lock_lovelace AS lockLovelace, + ada_usd AS adaUsd, + coverage_multiplier AS coverageMultiplier, + status, + description, + due_date AS dueDate, + created_at AS createdAt, + lock_tx_id AS lockTxId, + lock_tx_draft_json AS lockTxDraftJson, + pyth_policy_id AS pythPolicyId, + cancel_tx_id AS cancelTxId, + unlock_tx_id AS unlockTxId + FROM requests + WHERE id = $id + LIMIT 1 +`); + +const updateRequestCancelled = db.prepare(` + UPDATE requests + SET status = $status, + cancel_tx_id = $cancelTxId + WHERE id = $id +`); + +const updateRequestClaimed = db.prepare(` + UPDATE requests + SET status = $status, + unlock_tx_id = $unlockTxId + WHERE id = $id +`); + +const selectRowsMissingPythPolicyId = db.prepare(` + SELECT id, lock_tx_draft_json AS lockTxDraftJson + FROM requests + WHERE pyth_policy_id IS NULL +`); + +const updateRequestPythPolicyId = db.prepare(` + UPDATE requests + SET pyth_policy_id = $pythPolicyId + WHERE id = $id +`); + +for (const row of selectRowsMissingPythPolicyId.all() as Array>) { + try { + const draft = JSON.parse(String(row.lockTxDraftJson)) as { + metadata?: { pythPolicyId?: string }; + }; + const pythPolicyId = draft.metadata?.pythPolicyId; + if (typeof pythPolicyId === "string" && pythPolicyId.length > 0) { + updateRequestPythPolicyId.run({ + id: String(row.id), + pythPolicyId, + }); + } + } catch { + // Ignore malformed historical rows. + } +} + +function sendJson(res: ServerResponse, statusCode: number, payload: unknown): void { + res.writeHead(statusCode, { + "Content-Type": "application/json", + "Access-Control-Allow-Origin": "*", + "Access-Control-Allow-Headers": "Content-Type", + "Access-Control-Allow-Methods": "GET,POST,OPTIONS", + }); + res.end(JSON.stringify(payload)); +} + +function getRawBody(req: IncomingMessage): Promise { + return new Promise((resolve, reject) => { + let body = ""; + req.on("data", (chunk) => { + body += chunk; + if (body.length > 1_000_000) { + reject(new Error("Payload too large")); + } + }); + req.on("end", () => resolve(body)); + req.on("error", reject); + }); +} + +function toRequestOutput(row: Record) { + return { + id: row.id, + requesterAddressHex: row.requesterAddressHex, + sponsorAddressHex: row.sponsorAddressHex, + usdAmount: row.usdAmount, + lockAda: row.lockAda, + lockLovelace: row.lockLovelace, + adaUsd: row.adaUsd, + coverageMultiplier: row.coverageMultiplier, + status: row.status, + description: row.description, + dueDate: row.dueDate, + createdAt: row.createdAt, + lockTxId: row.lockTxId, + pythPolicyId: row.pythPolicyId, + cancelTxId: row.cancelTxId, + unlockTxId: row.unlockTxId, + lockTxDraft: JSON.parse(String(row.lockTxDraftJson)), + }; +} + +function validateLockPayload(payload: unknown): asserts payload is CreateRequestPayload { + if (!payload || typeof payload !== "object") { + throw new Error("Invalid JSON payload."); + } + const lockPayload = payload as CreateRequestPayload; + if ( + typeof lockPayload.requesterAddressHex !== "string" || + lockPayload.requesterAddressHex.length < 10 + ) { + throw new Error("requesterAddressHex is required."); + } + if (typeof lockPayload.usdAmount !== "number" || lockPayload.usdAmount <= 0) { + throw new Error("usdAmount must be a positive number."); + } + if (typeof lockPayload.adaUsd !== "number" || lockPayload.adaUsd <= 0) { + throw new Error("adaUsd must be a positive number."); + } + if ( + lockPayload.coverageMultiplier !== undefined && + (typeof lockPayload.coverageMultiplier !== "number" || lockPayload.coverageMultiplier <= 0) + ) { + throw new Error("coverageMultiplier must be a positive number."); + } +} + +function validateCreatePayload(payload: unknown): asserts payload is CreateRequestPayload { + validateLockPayload(payload); + const createPayload = payload as CreateRequestPayload; + if (typeof createPayload.description !== "string" || createPayload.description.trim().length === 0) { + throw new Error("description is required."); + } + if (typeof createPayload.dueDate !== "string" || createPayload.dueDate.length < 8) { + throw new Error("dueDate is required."); + } +} + +function buildLockNumbers(payload: CreateRequestPayload): LockNumbers { + const coverageMultiplier = payload.coverageMultiplier ?? 2; + const lockAda = (payload.usdAmount / payload.adaUsd) * coverageMultiplier; + const lockLovelace = Math.max(1, Math.round(lockAda * 1_000_000)); + + return { + coverageMultiplier, + lockAda, + lockLovelace, + }; +} + +function usdToCents(usdAmount: number): bigint { + return BigInt(Math.round(usdAmount * 100)); +} + +function safeStringify(value: unknown): string { + try { + return JSON.stringify(value); + } catch { + return String(value); + } +} + +function extractErrorCauseMessages(error: unknown): string[] { + const messages: string[] = []; + const visited = new Set(); + let current: unknown = error; + + while (current !== undefined && current !== null && !visited.has(current)) { + visited.add(current); + + if (current instanceof Error) { + if (current.message) { + messages.push(current.message); + } + current = current.cause; + continue; + } + + if (typeof current === "object") { + messages.push(safeStringify(current)); + const maybeCause = (current as { cause?: unknown }).cause; + if (maybeCause === undefined) { + break; + } + current = maybeCause; + continue; + } + + messages.push(String(current)); + break; + } + + return messages; +} + +const server = createServer(async (req, res) => { + try { + const requestUrl = new URL(req.url ?? "/", "http://localhost"); + + if (req.method === "OPTIONS") { + sendJson(res, 200, { ok: true }); + return; + } + + if (req.method === "GET" && requestUrl.pathname === "/api/health") { + sendJson(res, 200, { ok: true, dbPath }); + return; + } + + if (req.method === "GET" && requestUrl.pathname === "/api/requests") { + const rows = selectAllRequests.all(); + sendJson(res, 200, { requests: rows.map(toRequestOutput) }); + return; + } + + if (req.method === "POST" && requestUrl.pathname === "/api/lock-transaction") { + const rawBody = await getRawBody(req); + const payload = JSON.parse(rawBody || "{}"); + validateLockPayload(payload); + const { coverageMultiplier, lockAda, lockLovelace } = buildLockNumbers(payload); + const requestId = randomUUID(); + + const lockFlowResult = await executeLockFlow({ + usdAmountCents: usdToCents(payload.usdAmount), + userAddress: payload.requesterAddressHex, + lovelaceToLock: BigInt(lockLovelace), + }); + + sendJson(res, 201, { + requestId, + coverageMultiplier, + lockAda, + lockLovelace, + lockTxDraft: { + txId: lockFlowResult.txHash, + network: "preprod", + kind: "lock", + fromAddressHex: payload.requesterAddressHex, + toScriptAddress: lockFlowResult.scriptAddress, + amount: { + lovelace: lockLovelace, + }, + metadata: { + requestId, + usdAmount: payload.usdAmount, + adaUsd: payload.adaUsd, + coverageMultiplier, + pythPolicyId: lockFlowResult.pythPolicyId, + }, + }, + }); + return; + } + + if (req.method === "POST" && requestUrl.pathname === "/api/requests") { + const rawBody = await getRawBody(req); + const payload = JSON.parse(rawBody || "{}"); + validateCreatePayload(payload); + const { coverageMultiplier, lockAda, lockLovelace } = buildLockNumbers(payload); + const requestId = randomUUID(); + + const lockFlowResult = await executeLockFlow({ + usdAmountCents: usdToCents(payload.usdAmount), + userAddress: payload.requesterAddressHex, + lovelaceToLock: BigInt(lockLovelace), + }); + + const lockTxDraft = { + txId: lockFlowResult.txHash, + network: "preprod", + kind: "lock" as const, + fromAddressHex: payload.requesterAddressHex, + toScriptAddress: lockFlowResult.scriptAddress, + amount: { + lovelace: lockLovelace, + }, + // tx metadata excludes description and dueDate by design. + metadata: { + requestId, + usdAmount: payload.usdAmount, + adaUsd: payload.adaUsd, + coverageMultiplier, + pythPolicyId: lockFlowResult.pythPolicyId, + }, + }; + + const createdAt = new Date().toISOString(); + insertRequest.run({ + id: requestId, + requesterAddressHex: payload.requesterAddressHex, + sponsorAddressHex: payload.sponsorAddressHex ?? lockFlowResult.sponsorAddress, + usdAmount: payload.usdAmount, + lockAda, + lockLovelace, + adaUsd: payload.adaUsd, + coverageMultiplier, + status: "ready_to_claim", + description: payload.description ?? null, + dueDate: payload.dueDate ?? null, + createdAt, + lockTxId: lockTxDraft.txId, + lockTxDraftJson: JSON.stringify(lockTxDraft), + pythPolicyId: lockFlowResult.pythPolicyId, + }); + + sendJson(res, 201, { + request: { + id: requestId, + requesterAddressHex: payload.requesterAddressHex, + sponsorAddressHex: payload.sponsorAddressHex ?? lockFlowResult.sponsorAddress, + usdAmount: payload.usdAmount, + lockAda, + lockLovelace, + adaUsd: payload.adaUsd, + coverageMultiplier, + status: "ready_to_claim", + description: payload.description ?? null, + dueDate: payload.dueDate ?? null, + createdAt, + lockTxId: lockTxDraft.txId, + pythPolicyId: lockFlowResult.pythPolicyId, + }, + lockTxDraft, + }); + return; + } + + if ( + req.method === "POST" && + requestUrl.pathname.startsWith("/api/requests/") && + requestUrl.pathname.endsWith("/cancel") + ) { + const requestId = requestUrl.pathname + .replace("/api/requests/", "") + .replace("/cancel", "") + .replace(/\//g, ""); + + if (!requestId) { + throw new Error("Invalid request id."); + } + + const row = selectRequestById.get({ id: requestId }) as + | Record + | undefined; + if (!row) { + sendJson(res, 404, { error: "Request not found." }); + return; + } + + const request = toRequestOutput(row) as { + id: string; + requesterAddressHex: string; + sponsorAddressHex?: string | null; + usdAmount: number; + pythPolicyId?: string | null; + status: string; + }; + + if (request.status === "claimed") { + throw new Error("Claimed requests cannot be cancelled."); + } + if (request.status === "cancelled") { + throw new Error("Request is already cancelled."); + } + + const cancelResult = await executeCancelFlow({ + usdAmountCents: usdToCents(request.usdAmount), + userAddress: request.requesterAddressHex, + pythPolicyId: request.pythPolicyId ?? null, + }); + + updateRequestCancelled.run({ + id: request.id, + status: "cancelled", + cancelTxId: cancelResult.txHash, + }); + + sendJson(res, 200, { + requestId: request.id, + status: "cancelled", + cancelTxId: cancelResult.txHash, + }); + return; + } + + if ( + req.method === "POST" && + requestUrl.pathname.startsWith("/api/requests/") && + requestUrl.pathname.endsWith("/claim") + ) { + const requestId = requestUrl.pathname + .replace("/api/requests/", "") + .replace("/claim", "") + .replace(/\//g, ""); + + if (!requestId) { + throw new Error("Invalid request id."); + } + + const row = selectRequestById.get({ id: requestId }) as + | Record + | undefined; + if (!row) { + sendJson(res, 404, { error: "Request not found." }); + return; + } + + const request = toRequestOutput(row) as { + id: string; + requesterAddressHex: string; + sponsorAddressHex?: string | null; + usdAmount: number; + lockTxId?: string; + pythPolicyId?: string | null; + lockTxDraft?: { toScriptAddress?: string }; + status: string; + }; + + if (request.status === "claimed") { + throw new Error("Request is already claimed."); + } + if (request.status === "cancelled") { + throw new Error("Cancelled requests cannot be claimed."); + } + if (request.status !== "ready_to_claim") { + throw new Error("Only ready_to_claim requests can be claimed."); + } + + const unlockResult = await executeUnlockFlow({ + usdAmountCents: usdToCents(request.usdAmount), + userAddress: request.requesterAddressHex, + sponsorAddress: request.sponsorAddressHex ?? null, + pythPolicyId: request.pythPolicyId ?? null, + expectedScriptAddress: request.lockTxDraft?.toScriptAddress ?? null, + expectedLockTxId: request.lockTxId ?? null, + }); + + updateRequestClaimed.run({ + id: request.id, + status: "claimed", + unlockTxId: unlockResult.txHash, + }); + + sendJson(res, 200, { + requestId: request.id, + status: "claimed", + unlockTxId: unlockResult.txHash, + }); + return; + } + + sendJson(res, 404, { error: "Not found" }); + } catch (error) { + const messages = extractErrorCauseMessages(error); + sendJson(res, 400, { + error: + messages[0] ?? + (error instanceof Error ? error.message : "Unexpected server error."), + causes: messages.slice(1), + }); + } +}); + +const PORT = Number(process.env.PORT ?? 8787); +server.listen(PORT, () => { + console.log(`API server listening on http://localhost:${PORT}`); + console.log(`SQLite DB: ${dbPath}`); +}); diff --git a/lazer/cardano/backend/deployment/__tests__/pyth.test.ts b/lazer/cardano/backend/deployment/__tests__/pyth.test.ts new file mode 100644 index 00000000..cc63795f --- /dev/null +++ b/lazer/cardano/backend/deployment/__tests__/pyth.test.ts @@ -0,0 +1,31 @@ +import { describe, it, expect } from "vitest"; +import { Data } from "@lucid-evolution/lucid"; +import { buildWithdrawRedeemer } from "../pyth.js"; + +describe("buildWithdrawRedeemer", () => { + it("encodes a single hex update as a CBOR list of byte arrays", () => { + const hexUpdate = "deadbeef"; + const redeemer = buildWithdrawRedeemer(hexUpdate); + + expect(typeof redeemer).toBe("string"); + // Should be a valid CBOR hex string + expect(redeemer.length).toBeGreaterThan(0); + + // Decode and verify structure: should be a list containing one bytearray + const decoded = Data.from(redeemer); + expect(Array.isArray(decoded)).toBe(true); + const arr = decoded as string[]; + expect(arr).toHaveLength(1); + expect(arr[0]).toBe(hexUpdate); + }); + + it("handles a longer price update hex string", () => { + // Simulated Pyth update bytes (truncated for test) + const hexUpdate = + "b9011a820000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001f0075d3c793"; + const redeemer = buildWithdrawRedeemer(hexUpdate); + const decoded = Data.from(redeemer) as string[]; + expect(decoded).toHaveLength(1); + expect(decoded[0]).toBe(hexUpdate); + }); +}); diff --git a/lazer/cardano/backend/deployment/__tests__/setup.ts b/lazer/cardano/backend/deployment/__tests__/setup.ts new file mode 100644 index 00000000..142d4adc --- /dev/null +++ b/lazer/cardano/backend/deployment/__tests__/setup.ts @@ -0,0 +1,12 @@ +// Suppress libsodium-wrappers-sumo initialization errors in test environments. +// The 0.7.16 ESM package is missing libsodium-sumo.mjs (packaging bug). Our tests +// don't invoke any cryptographic operations, so this init failure is benign. +process.on("unhandledRejection", (reason) => { + if ( + reason instanceof Error && + reason.message.includes("Both wasm and asm failed to load") + ) { + return; // known libsodium packaging bug, safe to ignore in tests + } + throw reason; +}); diff --git a/lazer/cardano/backend/deployment/__tests__/transactions.test.ts b/lazer/cardano/backend/deployment/__tests__/transactions.test.ts new file mode 100644 index 00000000..cb483d2c --- /dev/null +++ b/lazer/cardano/backend/deployment/__tests__/transactions.test.ts @@ -0,0 +1,155 @@ +import { describe, it, expect } from "vitest"; +import { + Emulator, + generateEmulatorAccount, +} from "@lucid-evolution/provider"; +import { Lucid, paymentCredentialOf } from "@lucid-evolution/lucid"; +import { buildValidator, getScriptAddress } from "../validator.js"; +import { buildLockTx } from "../transactions/lock.js"; +import { buildCancelTx } from "../transactions/cancel.js"; +import type { Config } from "../config.js"; + +// -- Helpers -- + +function makeConfig(overrides: Partial = {}): Config { + return { + blockfrostProjectId: "test", + sponsorSeedPhrase: "", + pythPolicyId: + "aabbccddaabbccddaabbccddaabbccddaabbccddaabbccdd00000003", + pythLazerToken: "test", + network: "Preprod", + blockfrostUrl: "", + ...overrides, + }; +} + +const LOCK_AMOUNT = 30_000_000n; // 30 ADA + +describe("lock + cancel flow (emulator)", () => { + it("locks ADA at the script address", async () => { + const sponsorAccount = generateEmulatorAccount({ + lovelace: 100_000_000n, // 100 ADA + }); + + const emulator = new Emulator([sponsorAccount]); + const lucid = await Lucid(emulator, "Custom"); + lucid.selectWallet.fromAddress(sponsorAccount.address, []); + + const sponsorCred = paymentCredentialOf(sponsorAccount.address); + // Use a different key for user + const userAccount = generateEmulatorAccount({ lovelace: 2_000_000n }); + const userCred = paymentCredentialOf(userAccount.address); + + const validator = buildValidator({ + usdAmountCents: 1000n, + userPaymentKeyHash: userCred.hash, + sponsorPaymentKeyHash: sponsorCred.hash, + pythPolicyId: "aabbccddaabbccddaabbccddaabbccddaabbccddaabbccdd00000003", + }); + + const scriptAddress = getScriptAddress(validator, "Preprod"); + const config = makeConfig(); + + // Build and complete the lock tx (just check it builds without error) + const tx = await buildLockTx(lucid, config, { + validator, + lovelaceAmount: LOCK_AMOUNT, + }); + + expect(tx).toBeDefined(); + expect(typeof tx.toCBOR).toBe("function"); + }); + + it("cancel tx builds without error when script UTxO is provided", async () => { + // Accounts + const sponsorAccount = generateEmulatorAccount({ + lovelace: 100_000_000n, + }); + const userAccount = generateEmulatorAccount({ lovelace: 2_000_000n }); + + const emulator = new Emulator([sponsorAccount, userAccount]); + const lucid = await Lucid(emulator, "Custom"); + lucid.selectWallet.fromSeed(sponsorAccount.seedPhrase); + + const sponsorCred = paymentCredentialOf(sponsorAccount.address); + const userCred = paymentCredentialOf(userAccount.address); + + const validator = buildValidator({ + usdAmountCents: 1000n, + userPaymentKeyHash: userCred.hash, + sponsorPaymentKeyHash: sponsorCred.hash, + pythPolicyId: "aabbccddaabbccddaabbccddaabbccddaabbccddaabbccdd00000003", + }); + + const scriptAddress = getScriptAddress(validator, "Preprod"); + const config = makeConfig(); + + // Lock funds first + const lockTx = await buildLockTx(lucid, config, { + validator, + lovelaceAmount: LOCK_AMOUNT, + }); + const signedLock = await lockTx.sign.withWallet().complete(); + await signedLock.submit(); + emulator.awaitBlock(1); + + // Verify funds are now at the script address + const scriptUtxos = await lucid.utxosAt(scriptAddress); + expect(scriptUtxos.length).toBeGreaterThan(0); + expect(scriptUtxos[0].assets.lovelace).toBe(LOCK_AMOUNT); + + // Build cancel tx + const cancelTx = await buildCancelTx(lucid, config, { + validator, + sponsorAddress: sponsorAccount.address, + scriptUtxo: scriptUtxos[0], + }); + expect(cancelTx).toBeDefined(); + + // Sign and submit + const signedCancel = await cancelTx.sign.withWallet().complete(); + await signedCancel.submit(); + emulator.awaitBlock(1); + + // Script address should now be empty + const remainingUtxos = await lucid.utxosAt(scriptAddress); + expect(remainingUtxos.length).toBe(0); + }); + + it("lock creates a UTxO with correct lovelace at the script address", async () => { + const sponsorAccount = generateEmulatorAccount({ + lovelace: 100_000_000n, + }); + const userAccount = generateEmulatorAccount({ lovelace: 2_000_000n }); + + const emulator = new Emulator([sponsorAccount, userAccount]); + const lucid = await Lucid(emulator, "Custom"); + lucid.selectWallet.fromSeed(sponsorAccount.seedPhrase); + + const sponsorCred = paymentCredentialOf(sponsorAccount.address); + const userCred = paymentCredentialOf(userAccount.address); + + const validator = buildValidator({ + usdAmountCents: 500n, // $5.00 + userPaymentKeyHash: userCred.hash, + sponsorPaymentKeyHash: sponsorCred.hash, + pythPolicyId: "aabbccddaabbccddaabbccddaabbccddaabbccddaabbccdd00000003", + }); + + const scriptAddress = getScriptAddress(validator, "Preprod"); + const config = makeConfig(); + + const lockTx = await buildLockTx(lucid, config, { + validator, + lovelaceAmount: 20_000_000n, + }); + const signed = await lockTx.sign.withWallet().complete(); + await signed.submit(); + emulator.awaitBlock(1); + + const utxos = await lucid.utxosAt(scriptAddress); + expect(utxos.length).toBe(1); + expect(utxos[0].assets.lovelace).toBe(20_000_000n); + }); +}); diff --git a/lazer/cardano/backend/deployment/__tests__/unlock.test.ts b/lazer/cardano/backend/deployment/__tests__/unlock.test.ts new file mode 100644 index 00000000..734cf527 --- /dev/null +++ b/lazer/cardano/backend/deployment/__tests__/unlock.test.ts @@ -0,0 +1,66 @@ +import { describe, it, expect } from "vitest"; +import { Emulator, generateEmulatorAccount } from "@lucid-evolution/provider"; +import { + Lucid, + paymentCredentialOf, + credentialToRewardAddress, + credentialToAddress, + validatorToScriptHash, + Data, + Constr, + fromText, + stakeCredentialOf, +} from "@lucid-evolution/lucid"; +import { readFileSync } from "node:fs"; +import { fileURLToPath } from "node:url"; +import { dirname, resolve } from "node:path"; +import { buildValidator, getScriptAddress } from "../validator.js"; +import { buildLockTx } from "../transactions/lock.js"; +import { buildUnlockTxFromData, computeLovelaceForUser } from "../transactions/unlock.js"; +import type { Config } from "../config.js"; +import type { PythContext } from "../pyth.js"; + +const __dirname = dirname(fileURLToPath(import.meta.url)); +const blueprintPath = resolve(__dirname, "../../plutus.json"); + +function makeConfig(overrides: Partial = {}): Config { + return { + blockfrostProjectId: "test", + sponsorSeedPhrase: "", + pythPolicyId: "aabbccddaabbccddaabbccddaabbccddaabbccddaabbccdd00000003", + pythLazerToken: "test", + network: "Preprod", + blockfrostUrl: "", + ...overrides, + }; +} + +// Hardcoded Pyth price bytes from Aiken tests +// ADA/USD price=75000000, exponent=-8 => $0.75/ADA +const PYTH_UPDATE_075 = + "b9011a820000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001f0075d3c7930010a5d4e80000000301100000000200c06878040000000004f8ff"; + +// -- Unit tests -- + +describe("computeLovelaceForUser", () => { + it("at $0.75/ADA, 1000 cents ($10) → 13_333_334 lovelace (ceiling)", () => { + // price = 75000000 * 10^-8 = 0.75 + // numerator=75000000, denominator=100000000 + expect(computeLovelaceForUser(1000n, 75000000n, 100000000n)).toBe(13_333_334n); + }); + + it("at $0.75/ADA, 13_333_333 is NOT enough (ceiling enforced)", () => { + expect(computeLovelaceForUser(1000n, 75000000n, 100000000n)).toBeGreaterThan(13_333_333n); + }); + + it("at $0.50/ADA, 1000 cents ($10) → 20_000_000 lovelace", () => { + // price = 50000000 * 10^-8 = 0.50 + expect(computeLovelaceForUser(1000n, 50000000n, 100000000n)).toBe(20_000_000n); + }); + + it("exact division (no rounding needed)", () => { + // 2000 cents at $1.00/ADA = 20_000_000 lovelace + // numerator=1, denominator=1 + expect(computeLovelaceForUser(2000n, 1n, 1n)).toBe(20_000_000n); + }); +}); \ No newline at end of file diff --git a/lazer/cardano/backend/deployment/__tests__/validator.test.ts b/lazer/cardano/backend/deployment/__tests__/validator.test.ts new file mode 100644 index 00000000..dbece5bd --- /dev/null +++ b/lazer/cardano/backend/deployment/__tests__/validator.test.ts @@ -0,0 +1,75 @@ +import { describe, it, expect } from "vitest"; +import { getCompiledCode, buildValidator, getScriptAddress } from "../validator.js"; + +describe("getCompiledCode", () => { + it("loads the compiled code from the blueprint", () => { + const code = getCompiledCode(); + expect(code).toBeDefined(); + expect(typeof code).toBe("string"); + expect(code.length).toBeGreaterThan(0); + }); +}); + +describe("buildValidator", () => { + const baseParams = { + usdAmountCents: 1000n, + userPaymentKeyHash: + "aabbccddaabbccddaabbccddaabbccddaabbccddaabbccdd00000001", + sponsorPaymentKeyHash: + "aabbccddaabbccddaabbccddaabbccddaabbccddaabbccdd00000002", + pythPolicyId: + "aabbccddaabbccddaabbccddaabbccddaabbccddaabbccdd00000003", + }; + + it("returns a PlutusV3 spending validator", () => { + const validator = buildValidator(baseParams); + expect(validator.type).toBe("PlutusV3"); + expect(typeof validator.script).toBe("string"); + expect(validator.script.length).toBeGreaterThan(0); + }); + + it("produces a valid script address", () => { + const validator = buildValidator(baseParams); + const address = getScriptAddress(validator, "Preprod"); + expect(address).toBeDefined(); + expect(address.startsWith("addr_test1")).toBe(true); + }); + + it("different usd amounts produce different script hashes", () => { + const v1 = buildValidator({ ...baseParams, usdAmountCents: 1000n }); + const v2 = buildValidator({ ...baseParams, usdAmountCents: 2000n }); + expect(v1.script).not.toBe(v2.script); + }); + + it("different user addresses produce different script hashes", () => { + const v1 = buildValidator(baseParams); + const v2 = buildValidator({ + ...baseParams, + userPaymentKeyHash: + "11111111111111111111111111111111111111111111111111111111", + }); + expect(v1.script).not.toBe(v2.script); + }); + + it("different sponsor addresses produce different script hashes", () => { + const v1 = buildValidator(baseParams); + const v2 = buildValidator({ + ...baseParams, + sponsorPaymentKeyHash: + "22222222222222222222222222222222222222222222222222222222", + }); + expect(v1.script).not.toBe(v2.script); + }); + + it("supports addresses with stake key hashes", () => { + const validator = buildValidator({ + ...baseParams, + userStakeKeyHash: + "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", + sponsorStakeKeyHash: + "ffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + }); + expect(validator.type).toBe("PlutusV3"); + expect(validator.script.length).toBeGreaterThan(0); + }); +}); diff --git a/lazer/cardano/backend/deployment/config.ts b/lazer/cardano/backend/deployment/config.ts new file mode 100644 index 00000000..8af5adff --- /dev/null +++ b/lazer/cardano/backend/deployment/config.ts @@ -0,0 +1,39 @@ +import { Blockfrost, Lucid, type LucidEvolution } from "@lucid-evolution/lucid"; +import "dotenv/config"; + +export interface Config { + blockfrostProjectId: string; + sponsorSeedPhrase: string; + pythPolicyId: string; + pythLazerToken: string; + network: "Preprod" | "Mainnet"; + blockfrostUrl: string; +} + +function requireEnv(name: string): string { + const value = process.env[name]; + if (!value) { + throw new Error(`Missing required environment variable: ${name}`); + } + return value; +} + +export function loadConfig(): Config { + return { + blockfrostProjectId: requireEnv("BLOCKFROST_PROJECT_ID"), + sponsorSeedPhrase: requireEnv("SPONSOR_SEED_PHRASE"), + pythPolicyId: requireEnv("PYTH_POLICY_ID"), + pythLazerToken: requireEnv("PYTH_LAZER_TOKEN"), + network: "Preprod", + blockfrostUrl: "https://cardano-preprod.blockfrost.io/api/v0", + }; +} + +export async function initLucid(config: Config): Promise { + const lucid = await Lucid( + new Blockfrost(config.blockfrostUrl, config.blockfrostProjectId), + config.network, + ); + lucid.selectWallet.fromSeed(config.sponsorSeedPhrase); + return lucid; +} diff --git a/lazer/cardano/backend/deployment/index.ts b/lazer/cardano/backend/deployment/index.ts new file mode 100644 index 00000000..b9a838d8 --- /dev/null +++ b/lazer/cardano/backend/deployment/index.ts @@ -0,0 +1,26 @@ +export { loadConfig, initLucid, type Config } from "./config.js"; +export { + buildValidator, + getScriptAddress, + type ValidatorParams, +} from "./validator.js"; +export { + getPythContext, + fetchPriceUpdate, + buildWithdrawRedeemer, + parseAdaUsdPrice, + type PythContext, +} from "./pyth.js"; +export { buildLockTx, lock, type LockParams } from "./transactions/lock.js"; +export { + buildUnlockTx, + buildUnlockTxFromData, + computeLovelaceForUser, + unlock, + type UnlockParams, +} from "./transactions/unlock.js"; +export { + buildCancelTx, + cancel, + type CancelParams, +} from "./transactions/cancel.js"; diff --git a/lazer/cardano/backend/deployment/pyth.ts b/lazer/cardano/backend/deployment/pyth.ts new file mode 100644 index 00000000..cd75deef --- /dev/null +++ b/lazer/cardano/backend/deployment/pyth.ts @@ -0,0 +1,225 @@ +import { + Constr, + Data, + credentialToRewardAddress, + fromText, + validatorToScriptHash, + type LucidEvolution, + type Network, + type UTxO, + type WithdrawalValidator, +} from "@lucid-evolution/lucid"; +import { + PythLazerClient, + type JsonOrBinaryResponse, +} from "@pythnetwork/pyth-lazer-sdk"; + +const ADA_USD_FEED_ID = 16; +const PYTH_LAZER_WS_URL = "wss://pyth-lazer.dourolabs.app/v1/stream"; + +export interface PythContext { + stateUtxo: UTxO; + withdrawScriptHash: string; // 28-byte hash hex (from datum.fields[3]) + withdrawValidator?: WithdrawalValidator; // Optional: compiled validator (for inline attach) + withdrawRefUtxo?: UTxO; // Optional: UTxO with script as reference + rewardAddress: string; +} + +/** + * Fetches the Pyth State UTxO and extracts the withdraw script hash. + */ +export async function getPythContext( + lucid: LucidEvolution, + pythPolicyId: string, + network: Network, +): Promise { + const pythStateUnit = pythPolicyId + fromText("Pyth State"); + const stateUtxo = await lucid.utxoByUnit(pythStateUnit); + + if (!stateUtxo.datum) { + throw new Error("Pyth State UTxO has no inline datum"); + } + + // Decode the Pyth datum to get withdraw_script hash + // Pyth { governance, trusted_signers, deprecated_withdraw_scripts, withdraw_script } + const datum = Data.from(stateUtxo.datum); + if (!(datum instanceof Constr)) { + throw new Error("Unexpected Pyth datum format"); + } + const withdrawScriptHash = datum.fields[3] as string; + + // Build reward address directly from the 28-byte script hash + const rewardAddress = credentialToRewardAddress(network, { + type: "Script", + hash: withdrawScriptHash, + }); + + // Look for the withdrawal validator reference script at the contract address + let withdrawRefUtxo: UTxO | undefined; + try { + const contractUtxos = await lucid.utxosAt(stateUtxo.address); + withdrawRefUtxo = contractUtxos.find((u) => { + if (!u.scriptRef) return false; + try { + return validatorToScriptHash(u.scriptRef as WithdrawalValidator) === withdrawScriptHash; + } catch { + return false; + } + }); + } catch { + // Non-fatal: reference script lookup failed + } + + return { stateUtxo, withdrawScriptHash, withdrawRefUtxo, rewardAddress }; +} + +/** + * Fetches the latest ADA/USD price update from Pyth Lazer in solana/cardano format. + * Connects via WebSocket, subscribes to the feed, waits for one update, then disconnects. + * Returns the raw update bytes as hex string. + */ +export async function fetchPriceUpdate( + lazerToken: string, +): Promise { + const client = await PythLazerClient.create({ + token: lazerToken, + }); + + return new Promise((resolve, reject) => { + const timeout = setTimeout(() => { + client.shutdown(); + reject(new Error("Timed out waiting for Pyth Lazer price update")); + }, 15_000); + + client.addMessageListener((message: JsonOrBinaryResponse) => { + if (message.type === "json" && message.value.type === "streamUpdated") { + // Extract solana-format hex from the JSON response + const solanaData = ( + message.value as Record + ).solana as { encoding?: string; data?: string } | undefined; + if (solanaData?.data) { + clearTimeout(timeout); + client.shutdown(); + resolve(solanaData.data); + return; + } + } + if (message.type === "binary" && message.value.solana) { + clearTimeout(timeout); + client.shutdown(); + resolve(message.value.solana.toString("hex")); + return; + } + }); + + client.addAllConnectionsDownListener(() => { + clearTimeout(timeout); + reject(new Error("All Pyth Lazer WebSocket connections are down")); + }); + + client.subscribe({ + type: "subscribe", + subscriptionId: 1, + priceFeedIds: [ADA_USD_FEED_ID], + properties: ["price", "exponent"], + formats: ["solana"], + deliveryFormat: "binary", + channel: "fixed_rate@200ms", + jsonBinaryEncoding: "hex", + }); + }); +} + +/** + * Builds the withdrawal redeemer containing the price update bytes. + * The redeemer is a List encoded as PlutusData. + */ +export function buildWithdrawRedeemer(priceUpdateHex: string): string { + return Data.to([priceUpdateHex]); +} + +/** + * Parses the ADA/USD price from a raw Pyth Lazer hex-encoded update message. + * + * The price is returned as { numerator, denominator } so callers can do exact + * bigint arithmetic without floating-point loss. + * + * Wire format (little-endian): + * 4B magic (b9011a82) | 64B signature | 32B pubkey | 2B payload_len | payload + * Payload: + * 4B magic (75d3c793) | 8B timestamp_us | 1B channel_id | 1B feeds_count | feeds... + * Each feed: + * 4B feed_id | 1B props_count | props... + * Property 0 (price): 1B id=0 | 8B i64 LE (raw price integer) + * Property 4 (exponent): 1B id=4 | 2B i16 LE (exponent, typically negative) + * + * actual_price = price_raw * 10^exponent + * So: numerator = price_raw, denominator = 10^(-exponent) (when exponent < 0) + */ +export function parseAdaUsdPrice(priceUpdateHex: string): { + numerator: bigint; + denominator: bigint; +} { + const buf = Buffer.from(priceUpdateHex, "hex"); + let offset = 0; + + // Skip envelope: 4B magic + 64B signature + 32B pubkey + 2B payload_len + offset += 4 + 64 + 32 + 2; + + // Payload header: 4B magic + 8B timestamp + 1B channel + 1B feeds_count + offset += 4 + 8 + 1; + const feedsCount = buf.readUInt8(offset++); + + for (let i = 0; i < feedsCount; i++) { + const feedId = buf.readUInt32LE(offset); + offset += 4; + const propsCount = buf.readUInt8(offset++); + + let priceRaw: bigint | null = null; + let exponent: number | null = null; + + for (let j = 0; j < propsCount; j++) { + const propId = buf.readUInt8(offset++); + if (propId === 0) { + // price: i64 LE + priceRaw = buf.readBigInt64LE(offset); + offset += 8; + } else if (propId === 4) { + // exponent: i16 LE + exponent = buf.readInt16LE(offset); + offset += 2; + } else { + // skip unknown/unneeded props (fixed sizes per property ID) + offset += propSize(propId); + } + } + + if (feedId === ADA_USD_FEED_ID) { + if (priceRaw === null || exponent === null) { + throw new Error("ADA/USD feed is missing price or exponent property"); + } + if (priceRaw <= 0n) { + throw new Error(`ADA/USD price is zero or negative: ${priceRaw}`); + } + if (exponent >= 0) { + return { numerator: priceRaw * 10n ** BigInt(exponent), denominator: 1n }; + } else { + return { numerator: priceRaw, denominator: 10n ** BigInt(-exponent) }; + } + } + } + + throw new Error(`ADA/USD feed (id=${ADA_USD_FEED_ID}) not found in update`); +} + +/** Byte sizes of each property payload (after the 1-byte property ID). */ +function propSize(propId: number): number { + switch (propId) { + case 0: case 1: case 2: case 5: case 6: case 10: case 11: return 8; // i64 + case 3: return 2; // u16 + case 4: return 2; // i16 + case 7: case 8: case 12: return 9; // optional u64: 1B present flag + 8B value + case 9: return 2; // market session u16 + default: throw new Error(`Unknown Pyth property ID: ${propId}`); + } +} diff --git a/lazer/cardano/backend/deployment/pyth_example/example.ts b/lazer/cardano/backend/deployment/pyth_example/example.ts new file mode 100644 index 00000000..90c63eb1 --- /dev/null +++ b/lazer/cardano/backend/deployment/pyth_example/example.ts @@ -0,0 +1,202 @@ +/** biome-ignore-all lint/suspicious/noConsole: code example */ + +import process from "node:process"; +import type { ProviderOnlyClient } from "@evolution-sdk/evolution"; +import { + createClient, + ScriptHash, + TransactionHash, +} from "@evolution-sdk/evolution"; +import type { NetworkId } from "@evolution-sdk/evolution/sdk/client/Client"; +import { PythLazerClient } from "@pythnetwork/pyth-lazer-sdk"; +import yargs from "yargs"; +import { hideBin } from "yargs/helpers"; +import { getPythScriptHash, getPythState } from "./index.js"; + +/** Cardano network identifier. */ +export type Network = Exclude; + +/** Provider configuration for connecting to a Cardano node. */ +export type Provider = + | { + type: "blockfrost"; + projectId: string; +} + | { + type: "koios"; + token?: string; +} + | { + type: "maestro"; + apiKey: string; +}; + +function resolveBaseUrl(network: Network, provider: Provider): string { + switch (provider.type) { + case "blockfrost": { + return `https://cardano-${network}.blockfrost.io/api/v0`; + } + case "koios": { + return `https://${ + { + mainnet: "api", + preprod: "preprod", + preview: "preview", + }[network] + }.koios.rest/api/v1`; + } + case "maestro": { + return `https://${network}.gomaestro-api.org/v1`; + } + } +} + +/** + * Create Cardano client using Evolution SDK. + * @param network public network to use + * @param provider API provider and token + * @returns + */ +export function createEvolutionClient( + network: Network, + provider: Provider, +): ProviderOnlyClient { + return createClient({ + network, + provider: { ...provider, baseUrl: resolveBaseUrl(network, provider) }, + }); +} + +const { + network, + policyId: POLICY_ID, + lazerToken: LAZER_TOKEN, + provider: providerType, + providerToken, +} = await yargs(hideBin(process.argv)) + .option("network", { + choices: ["mainnet", "preprod", "preview"] as const, + default: "preprod" as const, + description: "Cardano network name, e.g. 'preprod'", + }) + .option("policy-id", { + demandOption: true, + description: "Hex-encoded policy ID of the Cardano Pyth deployment", + type: "string", + }) + .option("lazer-token", { + demandOption: true, + description: "Lazer authentication token", + type: "string", + }) + .option("provider", { + choices: ["blockfrost", "koios", "maestro"] as const, + default: "koios" as const, + description: "Cardano data provider used by Evolution SDK", + }) + .option("provider-token", { + description: + "Provider credential. Required for Blockfrost and Maestro, optional for Koios.", + type: "string", + }) + .help() + .parseAsync(); + +let provider: Provider; +switch (providerType) { + case "blockfrost": { + if (!providerToken) { + throw new Error("missing --provider-token"); + } + provider = { + projectId: providerToken, + type: providerType, + }; + break; + } + case "koios": { + provider = { + type: providerType, + ...(providerToken ? { token: providerToken } : {}), + }; + break; + } + case "maestro": { + if (!providerToken) { + throw new Error("missing --provider-token"); + } + provider = { + apiKey: providerToken, + type: providerType, + }; + break; + } +} + +///////////////////////////////////////////////////////////////////////////////////////// + +// Steps for fetching and verifying the price update: + +// 1. Fetch the price update from Pyth Lazer in the "solana" format - this is a +// little-endian format signed by an Ed25519 key, which we use for both Cardano and +// Solana integrations: +const lazer = await PythLazerClient.create({ token: LAZER_TOKEN }); +const latestPrice = await lazer.getLatestPrice({ + channel: "fixed_rate@200ms", + formats: ["solana"], + jsonBinaryEncoding: "hex", + priceFeedIds: [1], + properties: ["price", "bestBidPrice", "bestAskPrice", "exponent"], +}); + +if (!latestPrice.solana?.data) { + throw new Error("Missing update payload"); +} + +const update = Buffer.from(latestPrice.solana.data, "hex"); + +console.log("Fetched update bytes:", update.toString("hex")); + +// 2. Resolve the active Pyth State UTxO and withdraw script hash from +// on-chain state. Evolution SDK is used under the hood by `getPythState`. +if (!process.env.CARDANO_MNEMONIC) { + throw new Error("CARDANO_MNEMONIC environment variable not set"); +} +const client = createEvolutionClient(network, provider); + +const pythState = await getPythState(POLICY_ID, client); +const pythScript = getPythScriptHash(pythState); + +console.log("Active withdraw script hash:", pythScript); + +// 3. In your own transaction, include Pyth State UTxO as a reference input, and +// trigger 0-withdrawal on the verification script, together with the price +// update as a redeemer, to perform price verification on-chain. + +const wallet = client.attachWallet({ + mnemonic: process.env.CARDANO_MNEMONIC, + type: "seed", +}); + +const now = BigInt(Date.now()); +const tx = wallet + .newTx() + .setValidity({ from: now - 60_000n, to: now + 60_000n }) + .readFrom({ referenceInputs: [pythState] }) + .withdraw({ + amount: 0n, + redeemer: [update], + stakeCredential: ScriptHash.fromHex(pythScript), + }); + +// 4. Add your own scripts and transaction data... + +// 5. Sign and execute the transaction: +const builtTx = await tx.build(); +const digest = await builtTx.signAndSubmit(); + +console.log("Transaction Hash:", TransactionHash.toHex(digest)); + +await client.awaitTx(digest); + +console.log("Transaction successful."); \ No newline at end of file diff --git a/lazer/cardano/backend/deployment/pyth_example/index.ts b/lazer/cardano/backend/deployment/pyth_example/index.ts new file mode 100644 index 00000000..e1673e96 --- /dev/null +++ b/lazer/cardano/backend/deployment/pyth_example/index.ts @@ -0,0 +1,63 @@ +import type { UTxO } from "@evolution-sdk/evolution"; +import { + AssetName, + Data, + DatumOption, + Schema, + TSchema, +} from "@evolution-sdk/evolution"; +import type { ProviderOnlyClient } from "@evolution-sdk/evolution/sdk/client/Client"; + +const PYTH_STATE_NFT = AssetName.fromBytes(Buffer.from("Pyth State", "utf-8")); + +// Minimal schema matching the on-chain Pyth state datum layout. +// Only the `withdraw_script` field is used; the preceding fields +// are defined to keep positional alignment with the Plutus struct. +// biome-ignore assist/source/useSortedKeys: order-sensistive +const PythStateDatum = TSchema.Struct({ + // biome-ignore assist/source/useSortedKeys: order-sensitive + governance: TSchema.Struct({ + wormhole: TSchema.ByteArray, + emitter_chain: TSchema.Integer, + emitter_address: TSchema.ByteArray, + seen_sequence: TSchema.Integer, + }), + trusted_signers: TSchema.Map(TSchema.PlutusData, TSchema.PlutusData), + deprecated_withdraw_scripts: TSchema.Map( + TSchema.PlutusData, + TSchema.PlutusData, + ), + withdraw_script: TSchema.ByteArray, +}); + +export async function getPythState( + policyId: string, + client: ProviderOnlyClient, +): Promise { + const unit = policyId + AssetName.toHex(PYTH_STATE_NFT); + return await client.getUtxoByUnit(unit); +} + +/** + * Returns the hex-encoded hash of the withdraw script currently stored in the + * on-chain Pyth state for the given deployment. + * + * The withdraw script hash is read from the inline datum attached to the + * State NFT UTxO identified by `policyId`. + * + * @param pythState - fetched Pyth State UTxO + * @returns The withdraw script hash as a hex string. + */ +export function getPythScriptHash(pythState: UTxO.UTxO): string { + if (!DatumOption.isInlineDatum(pythState.datumOption)) { + throw new TypeError("State NFT UTxO does not have an inline datum"); + } + + const { data } = pythState.datumOption; + if (!(data instanceof Data.Constr)) { + throw new TypeError("State NFT datum is not a Constr"); + } + + const state = Schema.decodeSync(PythStateDatum)(data); + return Buffer.from(state.withdraw_script).toString("hex"); +} \ No newline at end of file diff --git a/lazer/cardano/backend/deployment/scripts/cancel.ts b/lazer/cardano/backend/deployment/scripts/cancel.ts new file mode 100644 index 00000000..5c71fbba --- /dev/null +++ b/lazer/cardano/backend/deployment/scripts/cancel.ts @@ -0,0 +1,24 @@ +import { executeCancelFlow } from "../services/cancelFlow.js"; + +async function main() { + const usdAmountCents = BigInt(process.argv[2] ?? "1000"); + const userAddress = process.argv[3]; + + if (!userAddress) { + console.error( + "Usage: tsx src/scripts/cancel.ts ", + ); + process.exit(1); + } + + console.log("Building cancel transaction..."); + + const cancelResult = await executeCancelFlow({ + usdAmountCents, + userAddress, + }); + + console.log(`Cancel transaction submitted: ${cancelResult.txHash}`); +} + +main().catch(console.error); diff --git a/lazer/cardano/backend/deployment/scripts/lock.ts b/lazer/cardano/backend/deployment/scripts/lock.ts new file mode 100644 index 00000000..b5266112 --- /dev/null +++ b/lazer/cardano/backend/deployment/scripts/lock.ts @@ -0,0 +1,28 @@ +import { executeLockFlow } from "../services/lockFlow.js"; + +async function main() { + const usdAmountCents = BigInt(process.argv[2] ?? "1000"); // default $10.00 + const userAddress = process.argv[3]; + const lovelaceToLock = BigInt(process.argv[4] ?? "30000000"); // default 30 ADA + + if (!userAddress) { + console.error( + "Usage: tsx src/scripts/lock.ts [lovelace_to_lock]", + ); + process.exit(1); + } + + console.log("Building lock transaction..."); + console.log(` USD amount: $${Number(usdAmountCents) / 100}`); + console.log(` Lovelace to lock: ${lovelaceToLock}`); + + const lockResult = await executeLockFlow({ + usdAmountCents, + userAddress, + lovelaceToLock, + }); + + console.log(`Lock transaction submitted: ${lockResult.txHash}`); +} + +main().catch(console.error); diff --git a/lazer/cardano/backend/deployment/scripts/unlock.ts b/lazer/cardano/backend/deployment/scripts/unlock.ts new file mode 100644 index 00000000..c97f7ecf --- /dev/null +++ b/lazer/cardano/backend/deployment/scripts/unlock.ts @@ -0,0 +1,78 @@ +import { Address, createClient } from "@evolution-sdk/evolution"; +import { paymentCredentialOf } from "@lucid-evolution/lucid"; +import { loadConfig } from "../config.js"; +import { buildValidator } from "../validator.js"; +import { unlock } from "../transactions/unlock.js"; + +function toEvolutionNetwork(network: "Preprod" | "Mainnet"): "preprod" | "mainnet" { + return network === "Mainnet" ? "mainnet" : "preprod"; +} + +function requirePaymentCredentialHash(address: string): string { + if (address.startsWith("addr")) { + return paymentCredentialOf(address).hash; + } + + const details = Address.getAddressDetails(address); + if (!details) { + throw new Error("Address must be bech32 or hex bytes."); + } + const rawAddress = Buffer.from(details.address.hex, "hex"); + return rawAddress.subarray(1, 29).toString("hex"); +} + +async function main() { + const usdAmountCents = BigInt(process.argv[2] ?? "1000"); + const userAddress = process.argv[3]; + + if (!userAddress) { + console.error( + "Usage: tsx src/scripts/unlock.ts ", + ); + process.exit(1); + } + + const config = loadConfig(); + const client = createClient({ + network: toEvolutionNetwork(config.network), + provider: { + type: "blockfrost", + baseUrl: config.blockfrostUrl, + projectId: config.blockfrostProjectId, + }, + }).attachWallet({ + type: "seed", + mnemonic: config.sponsorSeedPhrase, + }); + + const sponsorAddress = Address.toBech32(await client.address()); + const details = Address.getAddressDetails(userAddress); + if (!details) { + throw new Error("User address must be a valid bech32 or hex Cardano address."); + } + const normalizedUserAddress = details.address.bech32; + const sponsorPaymentKeyHash = requirePaymentCredentialHash(sponsorAddress); + const userPaymentKeyHash = requirePaymentCredentialHash(userAddress); + + const validator = buildValidator({ + usdAmountCents, + userPaymentKeyHash, + sponsorPaymentKeyHash, + pythPolicyId: config.pythPolicyId, + }); + + console.log("Building unlock transaction..."); + console.log(` USD amount: $${Number(usdAmountCents) / 100}`); + console.log(" Fetching Pyth oracle price..."); + + const txHash = await unlock(client as any, config, { + validator, + usdAmountCents, + userAddress: normalizedUserAddress, + sponsorAddress, + }); + + console.log(`Unlock transaction submitted: ${txHash}`); +} + +main().catch(console.error); diff --git a/lazer/cardano/backend/deployment/services/cancelFlow.ts b/lazer/cardano/backend/deployment/services/cancelFlow.ts new file mode 100644 index 00000000..57781699 --- /dev/null +++ b/lazer/cardano/backend/deployment/services/cancelFlow.ts @@ -0,0 +1,71 @@ +import { paymentCredentialOf } from "@lucid-evolution/lucid"; +import { loadConfig, initLucid } from "../config.js"; +import { buildValidator } from "../validator.js"; +import { cancel } from "../transactions/cancel.js"; + +export interface ExecuteCancelParams { + usdAmountCents: bigint; + userAddress: string; + pythPolicyId?: string | null; +} + +export interface ExecuteCancelResult { + txHash: string; + sponsorAddress: string; + usdAmountCents: bigint; +} + +function extractPaymentCredentialHash(addressInput: string): string { + if (addressInput.startsWith("addr")) { + return paymentCredentialOf(addressInput).hash; + } + + if (!/^[0-9a-fA-F]+$/.test(addressInput)) { + throw new Error("User address must be bech32 (addr...) or hex bytes."); + } + + const rawAddress = Buffer.from(addressInput, "hex"); + if (rawAddress.length < 29) { + throw new Error("User address hex is too short to extract payment credential."); + } + + const addressType = rawAddress[0] >> 4; + if (addressType > 7) { + throw new Error("Unsupported address type in user address hex."); + } + + return rawAddress.subarray(1, 29).toString("hex"); +} + +export async function executeCancelFlow( + params: ExecuteCancelParams, +): Promise { + // This mirrors scripts/cancel.ts from loadConfig() onward. + const config = loadConfig(); + if (params.pythPolicyId) { + config.pythPolicyId = params.pythPolicyId; + } + const lucid = await initLucid(config); + + const sponsorAddress = await lucid.wallet().address(); + const sponsorCred = paymentCredentialOf(sponsorAddress); + const userPaymentKeyHash = extractPaymentCredentialHash(params.userAddress); + + const validator = buildValidator({ + usdAmountCents: params.usdAmountCents, + userPaymentKeyHash, + sponsorPaymentKeyHash: sponsorCred.hash, + pythPolicyId: config.pythPolicyId, + }); + + const txHash = await cancel(lucid, config, { + validator, + sponsorAddress, + }); + + return { + txHash, + sponsorAddress, + usdAmountCents: params.usdAmountCents, + }; +} diff --git a/lazer/cardano/backend/deployment/services/lockFlow.ts b/lazer/cardano/backend/deployment/services/lockFlow.ts new file mode 100644 index 00000000..6d34aab2 --- /dev/null +++ b/lazer/cardano/backend/deployment/services/lockFlow.ts @@ -0,0 +1,72 @@ +import { paymentCredentialOf } from "@lucid-evolution/lucid"; +import { loadConfig, initLucid } from "../config.js"; +import { buildValidator, getScriptAddress } from "../validator.js"; +import { lock } from "../transactions/lock.js"; + +export interface ExecuteLockParams { + usdAmountCents: bigint; + userAddress: string; + lovelaceToLock: bigint; +} + +export interface ExecuteLockResult { + txHash: string; + sponsorAddress: string; + scriptAddress: string; + usdAmountCents: bigint; + lovelaceToLock: bigint; + pythPolicyId: string; +} + +function extractPaymentCredentialHash(addressInput: string): string { + if (addressInput.startsWith("addr")) { + return paymentCredentialOf(addressInput).hash; + } + + if (!/^[0-9a-fA-F]+$/.test(addressInput)) { + throw new Error("User address must be bech32 (addr...) or hex bytes."); + } + + const rawAddress = Buffer.from(addressInput, "hex"); + if (rawAddress.length < 29) { + throw new Error("User address hex is too short to extract payment credential."); + } + + const addressType = rawAddress[0] >> 4; + if (addressType > 7) { + throw new Error("Unsupported address type in user address hex."); + } + + return rawAddress.subarray(1, 29).toString("hex"); +} + +export async function executeLockFlow(params: ExecuteLockParams): Promise { + const config = loadConfig(); + const lucid = await initLucid(config); + + const sponsorAddress = await lucid.wallet().address(); + const sponsorCred = paymentCredentialOf(sponsorAddress); + const userPaymentKeyHash = extractPaymentCredentialHash(params.userAddress); + + const validator = buildValidator({ + usdAmountCents: params.usdAmountCents, + userPaymentKeyHash, + sponsorPaymentKeyHash: sponsorCred.hash, + pythPolicyId: config.pythPolicyId, + }); + const scriptAddress = getScriptAddress(validator, config.network); + + const txHash = await lock(lucid, config, { + validator, + lovelaceAmount: params.lovelaceToLock, + }); + + return { + txHash, + sponsorAddress, + scriptAddress, + usdAmountCents: params.usdAmountCents, + lovelaceToLock: params.lovelaceToLock, + pythPolicyId: config.pythPolicyId, + }; +} diff --git a/lazer/cardano/backend/deployment/services/unlockFlow.ts b/lazer/cardano/backend/deployment/services/unlockFlow.ts new file mode 100644 index 00000000..7839d01f --- /dev/null +++ b/lazer/cardano/backend/deployment/services/unlockFlow.ts @@ -0,0 +1,132 @@ +import { Address, createClient } from "@evolution-sdk/evolution"; +import { paymentCredentialOf } from "@lucid-evolution/lucid"; +import { loadConfig } from "../config.js"; +import { buildValidator, getScriptAddress } from "../validator.js"; +import { unlock } from "../transactions/unlock.js"; + +function toEvolutionNetwork(network: "Preprod" | "Mainnet"): "preprod" | "mainnet" { + return network === "Mainnet" ? "mainnet" : "preprod"; +} + +function normalizeToBech32Address(addressInput: string): string { + const details = Address.getAddressDetails(addressInput); + if (!details) { + throw new Error("User address must be a valid bech32 or hex Cardano address."); + } + return details.address.bech32; +} + +function normalizeToEnterpriseBech32Address(addressInput: string): string { + const details = Address.getAddressDetails(addressInput); + if (!details) { + throw new Error("User address must be a valid bech32 or hex Cardano address."); + } + + // The validator is parameterized with payment key hash only (no stake key), + // so the expected output address is enterprise-form for that payment credential. + return Address.toBech32( + new Address.Address({ + networkId: details.networkId, + paymentCredential: details.paymentCredential, + }), + ); +} + +function extractPaymentCredentialHash(addressInput: string): string { + if (addressInput.startsWith("addr")) { + return paymentCredentialOf(addressInput).hash; + } + + if (!/^[0-9a-fA-F]+$/.test(addressInput)) { + throw new Error("Address must be bech32 (addr...) or hex bytes."); + } + + const rawAddress = Buffer.from(addressInput, "hex"); + if (rawAddress.length < 29) { + throw new Error("Address hex is too short to extract payment credential."); + } + + const addressType = rawAddress[0] >> 4; + if (addressType > 7) { + throw new Error("Unsupported address type in address hex."); + } + + return rawAddress.subarray(1, 29).toString("hex"); +} + +export interface ExecuteUnlockParams { + usdAmountCents: bigint; + userAddress: string; + sponsorAddress?: string | null; + pythPolicyId?: string | null; + expectedScriptAddress?: string | null; + expectedLockTxId?: string | null; +} + +export interface ExecuteUnlockResult { + txHash: string; + sponsorAddress: string; + userAddress: string; + usdAmountCents: bigint; +} + +export async function executeUnlockFlow( + params: ExecuteUnlockParams, +): Promise { + // This mirrors scripts/unlock.ts from loadConfig() onward. + const config = loadConfig(); + if (params.pythPolicyId) { + config.pythPolicyId = params.pythPolicyId; + } + const client = createClient({ + network: toEvolutionNetwork(config.network), + provider: { + type: "blockfrost", + baseUrl: config.blockfrostUrl, + projectId: config.blockfrostProjectId, + }, + }).attachWallet({ + type: "seed", + mnemonic: config.sponsorSeedPhrase, + }); + + const walletSponsorAddress = Address.toBech32(await client.address()); + const sponsorAddress = params.sponsorAddress + ? normalizeToBech32Address(params.sponsorAddress) + : walletSponsorAddress; + const normalizedUserAddress = normalizeToBech32Address(params.userAddress); + const validatorUserAddress = normalizeToEnterpriseBech32Address(params.userAddress); + const sponsorPaymentKeyHash = extractPaymentCredentialHash(sponsorAddress); + const userPaymentKeyHash = extractPaymentCredentialHash(params.userAddress); + + const validator = buildValidator({ + usdAmountCents: params.usdAmountCents, + userPaymentKeyHash, + sponsorPaymentKeyHash, + pythPolicyId: config.pythPolicyId, + }); + const computedScriptAddress = getScriptAddress(validator, config.network); + if ( + params.expectedScriptAddress && + params.expectedScriptAddress !== computedScriptAddress + ) { + throw new Error( + `Request script mismatch. Stored lock script address is ${params.expectedScriptAddress}, but current config resolves to ${computedScriptAddress}. This usually means PYTH_POLICY_ID changed after the request was created.`, + ); + } + + const txHash = await unlock(client as any, config, { + validator, + usdAmountCents: params.usdAmountCents, + userAddress: validatorUserAddress, + sponsorAddress, + expectedLockTxId: params.expectedLockTxId ?? undefined, + }); + + return { + txHash, + sponsorAddress, + userAddress: normalizedUserAddress, + usdAmountCents: params.usdAmountCents, + }; +} diff --git a/lazer/cardano/backend/deployment/transactions/cancel.ts b/lazer/cardano/backend/deployment/transactions/cancel.ts new file mode 100644 index 00000000..b7a7b5e4 --- /dev/null +++ b/lazer/cardano/backend/deployment/transactions/cancel.ts @@ -0,0 +1,71 @@ +import { + Constr, + Data, + type LucidEvolution, + type SpendingValidator, + type TxSignBuilder, + type UTxO, +} from "@lucid-evolution/lucid"; +import { getScriptAddress } from "../validator.js"; +import type { Config } from "../config.js"; + +export interface CancelParams { + /** The parameterized spending validator */ + validator: SpendingValidator; + /** Bech32 address of the sponsor — locked ADA is explicitly sent back here */ + sponsorAddress: string; + /** The UTxO at the script address to spend (if known). If not provided, will be looked up. */ + scriptUtxo?: UTxO; +} + +/** + * Builds a transaction that cancels the payment agreement. + * The sponsor reclaims all locked ADA. No Pyth oracle interaction needed. + * The full UTxO value is explicitly routed back to sponsorAddress. + */ +export async function buildCancelTx( + lucid: LucidEvolution, + config: Config, + params: CancelParams, +): Promise { + const scriptAddress = getScriptAddress(params.validator, config.network); + + // Find the script UTxO to spend + let scriptUtxo = params.scriptUtxo; + if (!scriptUtxo) { + const utxos = await lucid.utxosAt(scriptAddress); + if (utxos.length === 0) { + throw new Error("No UTxOs found at script address"); + } + scriptUtxo = utxos[0]; + } + + // Cancel redeemer = Constr(1, []) i.e. the second variant of Action + const cancelRedeemer = Data.to(new Constr(1, [])); + + const tx = await lucid + .newTx() + .collectFrom([scriptUtxo], cancelRedeemer) + .attach.SpendingValidator(params.validator) + // Explicitly send all locked value back to the sponsor + .pay.ToAddress(params.sponsorAddress, scriptUtxo.assets) + .addSigner(params.sponsorAddress) + .complete(); + + return tx; +} + +/** + * Builds, signs, and submits a cancel transaction. + * Returns the transaction hash. + */ +export async function cancel( + lucid: LucidEvolution, + config: Config, + params: CancelParams, +): Promise { + const tx = await buildCancelTx(lucid, config, params); + const signed = await tx.sign.withWallet().complete(); + const txHash = await signed.submit(); + return txHash; +} diff --git a/lazer/cardano/backend/deployment/transactions/lock.ts b/lazer/cardano/backend/deployment/transactions/lock.ts new file mode 100644 index 00000000..67f8b81a --- /dev/null +++ b/lazer/cardano/backend/deployment/transactions/lock.ts @@ -0,0 +1,66 @@ +import { + Data, + type LucidEvolution, + type SpendingValidator, + type TxSignBuilder, +} from "@lucid-evolution/lucid"; +import { getScriptAddress } from "../validator.js"; +import type { Config } from "../config.js"; + +export interface LockParams { + /** The parameterized spending validator */ + validator: SpendingValidator; + /** Amount of lovelace to lock (should be ~2x the USD value in ADA) */ + lovelaceAmount: bigint; +} + +/** + * Builds a transaction that locks ADA at the script address. + * The sponsor sends lovelace to the parameterized script address with a Void datum. + */ +export async function buildLockTx( + lucid: LucidEvolution, + config: Config, + params: LockParams, +): Promise { + const scriptAddress = getScriptAddress(params.validator, config.network); + + const tx = await lucid + .newTx() + .pay.ToContract( + scriptAddress, + { kind: "inline", value: Data.void() }, + { lovelace: params.lovelaceAmount }, + ) + .complete(); + + return tx; +} + +/** + * Builds, signs, and submits a lock transaction. + * Returns the transaction hash. + */ +export async function lock( + lucid: LucidEvolution, + config: Config, + params: LockParams, +): Promise { + const tx = await buildLockTx(lucid, config, params); + const signed = await tx.sign.withWallet().complete(); + try { + const txHash = await signed.submit(); + return txHash; + } catch (submitError) { + const message = submitError instanceof Error ? submitError.message : String(submitError); + // Some providers return submit validation errors even when the exact same tx + // was already accepted (e.g. "All inputs are spent...already been included"). + if ( + message.includes("All inputs are spent") && + message.includes("already been included") + ) { + return signed.toHash(); + } + throw submitError; + } +} diff --git a/lazer/cardano/backend/deployment/transactions/unlock.ts b/lazer/cardano/backend/deployment/transactions/unlock.ts new file mode 100644 index 00000000..8a074df3 --- /dev/null +++ b/lazer/cardano/backend/deployment/transactions/unlock.ts @@ -0,0 +1,310 @@ +import { + Address, + Assets, + Data, + KeyHash, + ScriptHash, + TransactionHash, + type ProviderOnlyClient, + type SigningClient, + type UTxO, +} from "@evolution-sdk/evolution"; +import { PlutusV3 } from "@evolution-sdk/evolution/PlutusV3"; +import { validatorToAddress, type SpendingValidator } from "@lucid-evolution/lucid"; +import { PythLazerClient } from "@pythnetwork/pyth-lazer-sdk"; +import { parseAdaUsdPrice } from "../pyth.js"; +import { getPythScriptHash, getPythState } from "../pyth_example/index.js"; +import type { Config } from "../config.js"; + +export interface UnlockParams { + /** Double-CBOR-encoded parameterized Plutus V3 spending script */ + validatorScript?: string; + /** Backward-compatible fallback: object containing script hex */ + validator?: { script: string }; + /** USD amount in cents (must match the validator parameter) */ + usdAmountCents: bigint; + /** Bech32 address of the user — receives the ADA equivalent of usdAmountCents */ + userAddress: string; + /** Bech32 address of the sponsor — receives the remaining ADA */ + sponsorAddress: string; + /** The UTxO at the script address to spend (if known). If not provided, will be looked up. */ + scriptUtxo?: unknown; + /** Optional lock tx hash to target a specific script UTxO. */ + expectedLockTxId?: string; +} + +/** + * Computes the lovelace equivalent of usdAmountCents at the given ADA/USD price. + * Uses ceiling division to match the on-chain validator (rational.ceil). + * adaUsdPrice is expressed as { numerator, denominator } where price = numerator/denominator. + */ +export function computeLovelaceForUser( + usdAmountCents: bigint, + adaUsdNumerator: bigint, + adaUsdDenominator: bigint, +): bigint { + // lovelace = ceil(usdAmountCents * 10_000 / ada_usd_price) + // = ceil(usdAmountCents * 10_000 * denominator / numerator) + const dividend = usdAmountCents * 10_000n * adaUsdDenominator; + // ceil division: (a + b - 1) / b + return (dividend + adaUsdNumerator - 1n) / adaUsdNumerator; +} + +export interface EvolutionPythContext { + stateUtxo: unknown; + withdrawScriptHash: string; +} + +type UnlockClient = SigningClient & ProviderOnlyClient; + +const ADA_USD_FEED_ID = 16; + +function requirePaymentKeyHash(address: string): KeyHash.KeyHash { + const credential = Address.getPaymentCredential(address); + if (!credential) { + throw new Error("Invalid bech32 address"); + } + if (credential._tag !== "KeyHash") { + throw new Error("Address must use key payment credential"); + } + return credential; +} + +async function getPythContext( + client: UnlockClient, + pythPolicyId: string, +): Promise { + const stateUtxo = await getPythState(pythPolicyId, client); + const withdrawScriptHash = getPythScriptHash(stateUtxo); + return { stateUtxo, withdrawScriptHash }; +} + +async function fetchPriceUpdateLikeExample(lazerToken: string): Promise { + const lazer = await PythLazerClient.create({ token: lazerToken }); + const latestPrice = await lazer.getLatestPrice({ + channel: "fixed_rate@200ms", + formats: ["solana"], + jsonBinaryEncoding: "hex", + priceFeedIds: [ADA_USD_FEED_ID], + properties: ["price", "exponent"], + }); + + if (!latestPrice.solana?.data) { + throw new Error("Missing update payload"); + } + + return latestPrice.solana.data; +} + +function getValidatorScriptAndAddress( + validatorScript: string, + network: Config["network"], +): { + script: PlutusV3; + address: Address.Address; + scriptAddressBech32: string; +} { + const rawValidatorScript = unwrapDoubleCborScript(validatorScript); + const script = new PlutusV3({ + bytes: Buffer.from(rawValidatorScript, "hex"), + }); + const validator: SpendingValidator = { + type: "PlutusV3", + script: validatorScript, + }; + const scriptAddressBech32 = validatorToAddress(network, validator); + const address = Address.fromBech32(scriptAddressBech32); + return { script, address, scriptAddressBech32 }; +} + +function unwrapDoubleCborScript(scriptHex: string): string { + const bytes = Buffer.from(scriptHex, "hex"); + if (bytes.length === 0) { + throw new Error("Validator script is empty."); + } + + const header = bytes[0]; + let offset = 0; + let payloadLength = -1; + + // CBOR bytestring, definite length. + if (header >= 0x40 && header <= 0x57) { + offset = 1; + payloadLength = header - 0x40; + } else if (header === 0x58) { + offset = 2; + payloadLength = bytes[1]; + } else if (header === 0x59) { + offset = 3; + payloadLength = bytes.readUInt16BE(1); + } else if (header === 0x5a) { + offset = 5; + payloadLength = bytes.readUInt32BE(1); + } + + // Lucid validators are commonly "double-cbor encoded": + // the outer bytestring wraps the real Plutus script bytes once. + if (payloadLength >= 0 && offset + payloadLength === bytes.length) { + return bytes.subarray(offset, offset + payloadLength).toString("hex"); + } + + // If it's not wrapped in this shape, keep the original bytes. + return scriptHex; +} + +function resolveValidatorScript(params: UnlockParams): string { + const script = params.validatorScript ?? params.validator?.script; + if (!script) { + throw new Error("Missing validatorScript (or validator.script)"); + } + return script; +} + +function sleep(ms: number): Promise { + return new Promise((resolve) => setTimeout(resolve, ms)); +} + +async function findScriptUtxoWithRetry( + client: UnlockClient, + scriptAddress: Address.Address, + scriptAddressBech32: string, + expectedLockTxId?: string, + attempts = 8, + delayMs = 2500, +): Promise { + const normalizedExpectedLockTxId = expectedLockTxId?.toLowerCase(); + + for (let attempt = 1; attempt <= attempts; attempt += 1) { + const utxos = await client.getUtxos(scriptAddress); + if (utxos.length > 0) { + if (!normalizedExpectedLockTxId) { + return utxos[0]; + } + + const matched = utxos.find( + (utxo) => + TransactionHash.toHex((utxo as UTxO.UTxO).transactionId).toLowerCase() === + normalizedExpectedLockTxId, + ); + if (matched) { + return matched; + } + } + if (attempt < attempts) { + await sleep(delayMs); + } + } + + if (normalizedExpectedLockTxId) { + throw new Error( + `No unspent script UTxO found for lock tx ${normalizedExpectedLockTxId} at ${scriptAddressBech32} after ${attempts} attempts.`, + ); + } + + throw new Error( + `No UTxOs found at script address ${scriptAddressBech32} after ${attempts} attempts.`, + ); +} + +/** + * Builds an unlock transaction with pre-fetched Pyth context and price data. + * Useful for testing (inject mock data instead of fetching from network). + * + * @param currentTime - Optional Unix timestamp in milliseconds to use for validity range. + */ +export async function buildUnlockTxFromData( + client: UnlockClient, + config: Config, + params: UnlockParams, + pythCtx: EvolutionPythContext, + priceUpdateHex: string, + currentTime?: number, +) { + const validatorScriptHex = resolveValidatorScript(params); + const { script: validatorScript, address: scriptAddress, scriptAddressBech32 } = + getValidatorScriptAndAddress( + validatorScriptHex, + config.network, + ); + + let scriptUtxo = params.scriptUtxo; + if (!scriptUtxo) { + scriptUtxo = await findScriptUtxoWithRetry( + client, + scriptAddress, + scriptAddressBech32, + params.expectedLockTxId, + ); + } + + const { numerator, denominator } = parseAdaUsdPrice(priceUpdateHex); + const lovelaceToUser = computeLovelaceForUser(params.usdAmountCents, numerator, denominator); + + const totalLovelace = Assets.lovelaceOf((scriptUtxo as UTxO.UTxO).assets); + if (lovelaceToUser > totalLovelace) { + throw new Error( + `Locked ADA (${totalLovelace}) insufficient for ${lovelaceToUser} lovelace needed`, + ); + } + const lovelaceToSponsor = totalLovelace - lovelaceToUser; + console.log(`Lovelace to user: ${lovelaceToUser}`); + console.log(`Lovelace to sponsor: ${lovelaceToSponsor}`); + + const now = BigInt(currentTime ?? Date.now()); + const unlockRedeemer = Data.constr(0n, []); + const updateBytes = Buffer.from(priceUpdateHex, "hex"); + + return client + .newTx() + .setValidity({ from: now - 60_000n, to: now + 60_000n }) + .attachScript({ script: validatorScript }) + .collectFrom({ + inputs: [scriptUtxo as UTxO.UTxO], + redeemer: unlockRedeemer, + }) + .readFrom({ referenceInputs: [pythCtx.stateUtxo as UTxO.UTxO] }) + .withdraw({ + amount: 0n, + redeemer: [updateBytes], + stakeCredential: ScriptHash.fromHex(pythCtx.withdrawScriptHash), + }) + .payToAddress({ + address: Address.fromBech32(params.userAddress), + assets: Assets.fromLovelace(lovelaceToUser), + }) + .payToAddress({ + address: Address.fromBech32(params.sponsorAddress), + assets: Assets.fromLovelace(lovelaceToSponsor), + }) + .addSigner({ + keyHash: requirePaymentKeyHash(params.sponsorAddress), + }) + .build(); +} + +/** + * Builds a transaction that unlocks funds using a live Pyth oracle price. + */ +export async function buildUnlockTx( + client: UnlockClient, + config: Config, + params: UnlockParams, +) { + const pythCtx = await getPythContext(client, config.pythPolicyId); + const priceUpdateHex = await fetchPriceUpdateLikeExample(config.pythLazerToken); + return buildUnlockTxFromData(client, config, params, pythCtx, priceUpdateHex); +} + +/** + * Builds, signs, and submits an unlock transaction. + * Returns the transaction hash. + */ +export async function unlock( + client: UnlockClient, + config: Config, + params: UnlockParams, +): Promise { + const tx = await buildUnlockTx(client, config, params); + const txHash = await tx.signAndSubmit(); + return TransactionHash.toHex(txHash); +} diff --git a/lazer/cardano/backend/deployment/validator.ts b/lazer/cardano/backend/deployment/validator.ts new file mode 100644 index 00000000..3f36fe7b --- /dev/null +++ b/lazer/cardano/backend/deployment/validator.ts @@ -0,0 +1,94 @@ +import { + applyParamsToScript, + applyDoubleCborEncoding, + validatorToAddress, + Constr, + type Data, + type SpendingValidator, + type Network, +} from "@lucid-evolution/lucid"; +import { readFileSync } from "node:fs"; +import { resolve, dirname } from "node:path"; +import { fileURLToPath } from "node:url"; + +const __dirname = dirname(fileURLToPath(import.meta.url)); +const blueprintPath = resolve(__dirname, "../plutus.json"); + +interface Blueprint { + validators: Array<{ + title: string; + compiledCode: string; + hash: string; + }>; +} + +function loadBlueprint(): Blueprint { + const raw = readFileSync(blueprintPath, "utf-8"); + return JSON.parse(raw) as Blueprint; +} + +const VALIDATOR_TITLE = "pay_with_pyth.pay_with_pyth.spend"; + +export interface ValidatorParams { + usdAmountCents: bigint; + userPaymentKeyHash: string; + userStakeKeyHash?: string; + sponsorPaymentKeyHash: string; + sponsorStakeKeyHash?: string; + pythPolicyId: string; +} + +function encodeAddress( + paymentKeyHash: string, + stakeKeyHash?: string, +): Constr { + const paymentCredential: Constr = new Constr(0, [paymentKeyHash]); + const stakeCredential: Constr = stakeKeyHash + ? new Constr(0, [new Constr(0, [new Constr(0, [stakeKeyHash])])]) + : new Constr(1, []); + return new Constr(0, [paymentCredential, stakeCredential]); +} + +export function getCompiledCode(): string { + const blueprint = loadBlueprint(); + const validator = blueprint.validators.find( + (v) => v.title === VALIDATOR_TITLE, + ); + if (!validator) { + throw new Error(`Validator '${VALIDATOR_TITLE}' not found in blueprint`); + } + return validator.compiledCode; +} + +export function buildValidator(params: ValidatorParams): SpendingValidator { + const compiledCode = getCompiledCode(); + + const userAddress = encodeAddress( + params.userPaymentKeyHash, + params.userStakeKeyHash, + ); + const sponsorAddress = encodeAddress( + params.sponsorPaymentKeyHash, + params.sponsorStakeKeyHash, + ); + + const parameterizedScript = applyParamsToScript(compiledCode, [ + params.usdAmountCents, + userAddress, + sponsorAddress, + params.pythPolicyId, + ]); + + console.log("Parameterized script:", parameterizedScript); + return { + type: "PlutusV3", + script: applyDoubleCborEncoding(parameterizedScript), + }; +} + +export function getScriptAddress( + validator: SpendingValidator, + network: Network, +): string { + return validatorToAddress(network, validator); +} diff --git a/lazer/cardano/backend/package-lock.json b/lazer/cardano/backend/package-lock.json new file mode 100644 index 00000000..56983e82 --- /dev/null +++ b/lazer/cardano/backend/package-lock.json @@ -0,0 +1,7687 @@ +{ + "name": "pay-with-pyth-deployment", + "version": "0.0.1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "pay-with-pyth-deployment", + "version": "0.0.1", + "dependencies": { + "@evolution-sdk/evolution": "^0.3.30", + "@lucid-evolution/lucid": "^0.4.0", + "@pythnetwork/pyth-lazer-sdk": "^5.2.1", + "bech32": "^2.0.0", + "dotenv": "^16.4.0", + "libsodium-sumo": "^0.8.2", + "libsodium-wrappers-sumo": "^0.8.2", + "yargs": "^17.7.2" + }, + "devDependencies": { + "@types/node": "^22.0.0", + "tsx": "^4.19.0", + "typescript": "^5.5.0", + "vitest": "^4.1.0" + } + }, + "node_modules/@anastasia-labs/cardano-multiplatform-lib-browser": { + "version": "6.0.2-3", + "resolved": "https://registry.npmjs.org/@anastasia-labs/cardano-multiplatform-lib-browser/-/cardano-multiplatform-lib-browser-6.0.2-3.tgz", + "integrity": "sha512-EP5Kr21xPtfEuCM3lR5tCIUQpMQ4Moisig8zD9BqUmBhQr/2ddxuE+MWhBF6tqH1AepzeXqRuTD1ozvdRn49Bw==", + "license": "MIT" + }, + "node_modules/@anastasia-labs/cardano-multiplatform-lib-nodejs": { + "version": "6.0.2-3", + "resolved": "https://registry.npmjs.org/@anastasia-labs/cardano-multiplatform-lib-nodejs/-/cardano-multiplatform-lib-nodejs-6.0.2-3.tgz", + "integrity": "sha512-Jy7QKahRQJgX6OFeuQvPXO0ejKfT9cQ8m3PFLBhbM04jjzFnaxlJJJ5+7qNHe3xdy40fMbMMe2SgAYPJ4gZ2Xw==", + "license": "MIT" + }, + "node_modules/@biglup/is-cid": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@biglup/is-cid/-/is-cid-1.0.3.tgz", + "integrity": "sha512-R0XPZ/IQhU2TtetSFI9vI+7kJOJYNiCncn5ixEBW+/LNaZCo2HK37Mq3pRNzrM4FryuAkyeqY7Ujmj3I3e3t9g==", + "license": "Apache-2.0", + "dependencies": { + "@multiformats/mafmt": "^12.1.6", + "@multiformats/multiaddr": "^12.1.14", + "iso-url": "^1.1.3", + "multiformats": "^13.0.1", + "uint8arrays": "^5.0.1" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/@cardano-ogmios/client": { + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/@cardano-ogmios/client/-/client-6.9.0.tgz", + "integrity": "sha512-IsoUVsaMXiYyhWrdVKYOA5PDlX0EZ2gaq4lfk4JelRw6mcWVxemUrMaU2ndvugO9LQ3SCM1nESPgMIU0xe5FWw==", + "license": "MPL-2.0", + "dependencies": { + "@cardano-ogmios/schema": "6.9.0", + "@cardanosolutions/json-bigint": "^1.0.1", + "@types/json-bigint": "^1.0.1", + "bech32": "^2.0.0", + "cross-fetch": "^3.1.4", + "fastq": "^1.11.0", + "isomorphic-ws": "^4.0.1", + "nanoid": "^3.1.31", + "ts-custom-error": "^3.2.0", + "ws": "^7.5.10" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@cardano-ogmios/schema": { + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/@cardano-ogmios/schema/-/schema-6.9.0.tgz", + "integrity": "sha512-e7QVLF+dQMIv9p+p5CWQjMfBmkERYRa2wK2AjyehQZCJnecZ0gvTbRqewdX5VW4mVXf6KUfFyphsxWK46Pg6LA==", + "license": "MPL-2.0", + "engines": { + "node": ">=14" + } + }, + "node_modules/@cardano-sdk/core": { + "version": "0.45.10", + "resolved": "https://registry.npmjs.org/@cardano-sdk/core/-/core-0.45.10.tgz", + "integrity": "sha512-PU/onQuPgsy0CtFKDlHcozGHMTHrigWztTmKq54tL0TdWRcClXbMh5Q63ALcP388ZouPC1nKomOAooVgyrrEfw==", + "license": "Apache-2.0", + "dependencies": { + "@biglup/is-cid": "^1.0.3", + "@cardano-ogmios/client": "6.9.0", + "@cardano-ogmios/schema": "6.9.0", + "@cardano-sdk/crypto": "~0.2.3", + "@cardano-sdk/util": "~0.16.0", + "@foxglove/crc": "^0.0.3", + "@scure/base": "^1.1.1", + "fraction.js": "4.0.1", + "ip-address": "^9.0.5", + "lodash": "^4.17.21", + "ts-custom-error": "^3.2.0", + "ts-log": "^2.2.4", + "web-encoding": "^1.1.5" + }, + "engines": { + "node": ">=16.20.2" + }, + "peerDependencies": { + "rxjs": "^7.4.0" + }, + "peerDependenciesMeta": { + "rxjs": { + "optional": true + } + } + }, + "node_modules/@cardano-sdk/crypto": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@cardano-sdk/crypto/-/crypto-0.2.3.tgz", + "integrity": "sha512-jTl8rbocV1XO5DBR6+lGY6Owc/bP+wBg5eO3PttTeKhx/J7o99pyuTa5H36a/XTJwqDwKIXV922QxZR+rfjVbA==", + "license": "Apache-2.0", + "dependencies": { + "@cardano-sdk/util": "~0.16.0", + "blake2b": "^2.1.4", + "i": "^0.3.7", + "libsodium-wrappers-sumo": "^0.7.5", + "lodash": "^4.17.21", + "npm": "^9.3.0", + "pbkdf2": "^3.1.2", + "ts-custom-error": "^3.2.0", + "ts-log": "^2.2.4" + }, + "engines": { + "node": ">=16.20.2" + }, + "peerDependencies": { + "@dcspark/cardano-multiplatform-lib-asmjs": "^3.1.1", + "@dcspark/cardano-multiplatform-lib-browser": "^3.1.1", + "@dcspark/cardano-multiplatform-lib-nodejs": "^3.1.1" + }, + "peerDependenciesMeta": { + "@dcspark/cardano-multiplatform-lib-asmjs": { + "optional": true + }, + "@dcspark/cardano-multiplatform-lib-browser": { + "optional": true + }, + "@dcspark/cardano-multiplatform-lib-nodejs": { + "optional": true + } + } + }, + "node_modules/@cardano-sdk/util": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/@cardano-sdk/util/-/util-0.16.0.tgz", + "integrity": "sha512-f0tfX8oiauqAFCyyc/o2Ouezyk83QD4zqLl4DUjZNyCtITL8gBHh25Bkw7RUCGEZ+hf6Qms1n0ui0j3wVY7zRg==", + "license": "Apache-2.0", + "dependencies": { + "bech32": "^2.0.0", + "lodash": "^4.17.21", + "serialize-error": "^8", + "ts-custom-error": "^3.2.0", + "ts-log": "^2.2.4", + "type-fest": "^2.19.0" + }, + "engines": { + "node": ">=16.20.2" + } + }, + "node_modules/@cardanosolutions/json-bigint": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@cardanosolutions/json-bigint/-/json-bigint-1.1.0.tgz", + "integrity": "sha512-Pdgz18cSwLKKgheOqW/dqbzNI+CliNT4AdaKaKY/P++J9qLxIB8MITCurlzbaFWV3W4nmK0CRQwI1yvuArmjFg==", + "license": "MIT" + }, + "node_modules/@cbor-extract/cbor-extract-darwin-arm64": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@cbor-extract/cbor-extract-darwin-arm64/-/cbor-extract-darwin-arm64-2.2.2.tgz", + "integrity": "sha512-ZKZ/F8US7JR92J4DMct6cLW/Y66o2K576+zjlEN/MevH70bFIsB10wkZEQPLzl2oNh2SMGy55xpJ9JoBRl5DOA==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@cbor-extract/cbor-extract-darwin-x64": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@cbor-extract/cbor-extract-darwin-x64/-/cbor-extract-darwin-x64-2.2.2.tgz", + "integrity": "sha512-32b1mgc+P61Js+KW9VZv/c+xRw5EfmOcPx990JbCBSkYJFY0l25VinvyyWfl+3KjibQmAcYwmyzKF9J4DyKP/Q==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@cbor-extract/cbor-extract-linux-arm": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@cbor-extract/cbor-extract-linux-arm/-/cbor-extract-linux-arm-2.2.2.tgz", + "integrity": "sha512-tNg0za41TpQfkhWjptD+0gSD2fggMiDCSacuIeELyb2xZhr7PrhPe5h66Jc67B/5dmpIhI2QOUtv4SBsricyYQ==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@cbor-extract/cbor-extract-linux-arm64": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@cbor-extract/cbor-extract-linux-arm64/-/cbor-extract-linux-arm64-2.2.2.tgz", + "integrity": "sha512-wfqgzqCAy/Vn8i6WVIh7qZd0DdBFaWBjPdB6ma+Wihcjv0gHqD/mw3ouVv7kbbUNrab6dKEx/w3xQZEdeXIlzg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@cbor-extract/cbor-extract-linux-x64": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@cbor-extract/cbor-extract-linux-x64/-/cbor-extract-linux-x64-2.2.2.tgz", + "integrity": "sha512-rpiLnVEsqtPJ+mXTdx1rfz4RtUGYIUg2rUAZgd1KjiC1SehYUSkJN7Yh+aVfSjvCGtVP0/bfkQkXpPXKbmSUaA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@cbor-extract/cbor-extract-win32-x64": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@cbor-extract/cbor-extract-win32-x64/-/cbor-extract-win32-x64-2.2.2.tgz", + "integrity": "sha512-dI+9P7cfWxkTQ+oE+7Aa6onEn92PHgfWXZivjNheCRmTBDBf2fx6RyTi0cmgpYLnD1KLZK9ZYrMxaPZ4oiXhGA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@chainsafe/is-ip": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@chainsafe/is-ip/-/is-ip-2.1.0.tgz", + "integrity": "sha512-KIjt+6IfysQ4GCv66xihEitBjvhU/bixbbbFxdJ1sqCp4uJ0wuZiYBPhksZoy4lfaF0k9cwNzY5upEW/VWdw3w==", + "license": "MIT" + }, + "node_modules/@chainsafe/netmask": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@chainsafe/netmask/-/netmask-2.0.0.tgz", + "integrity": "sha512-I3Z+6SWUoaljh3TBzCnCxjlUyN8tA+NAk5L6m9IxvCf1BENQTePzPMis97CoN/iMW1St3WN+AWCCRp+TTBRiDg==", + "license": "MIT", + "dependencies": { + "@chainsafe/is-ip": "^2.0.1" + } + }, + "node_modules/@dnsquery/dns-packet": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/@dnsquery/dns-packet/-/dns-packet-6.1.1.tgz", + "integrity": "sha512-WXTuFvL3G+74SchFAtz3FgIYVOe196ycvGsMgvSH/8Goptb1qpIQtIuM4SOK9G9lhMWYpHxnXyy544ZhluFOew==", + "license": "MIT", + "dependencies": { + "@leichtgewicht/ip-codec": "^2.0.4", + "utf8-codec": "^1.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@effect/platform": { + "version": "0.71.7", + "resolved": "https://registry.npmjs.org/@effect/platform/-/platform-0.71.7.tgz", + "integrity": "sha512-Ttw8OhbcP1x5cPgcX4VdnDSWrskVdUrf9bO3eDd++TTcQzEiYVu9GZJaSMvz6Yqzfzt+1tIKoKi2jp6dLdJ9dg==", + "license": "MIT", + "dependencies": { + "find-my-way-ts": "^0.1.5", + "multipasta": "^0.2.5" + }, + "peerDependencies": { + "effect": "^3.11.10" + } + }, + "node_modules/@effect/schema": { + "version": "0.66.16", + "resolved": "https://registry.npmjs.org/@effect/schema/-/schema-0.66.16.tgz", + "integrity": "sha512-sT/k5NOgKslGPzs3DUaCFuM6g2JQoIIT8jpwEorAZooplPIMK2xIspr7ECz6pp6Dc7Wz/ppXGk7HVyGZQsIYEQ==", + "deprecated": "this package has been merged into the main effect package", + "license": "MIT", + "peerDependencies": { + "effect": "^3.1.3", + "fast-check": "^3.13.2" + } + }, + "node_modules/@emnapi/core": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.9.1.tgz", + "integrity": "sha512-mukuNALVsoix/w1BJwFzwXBN/dHeejQtuVzcDsfOEsdpCumXb/E9j8w11h5S54tT1xhifGfbbSm/ICrObRb3KA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/wasi-threads": "1.2.0", + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/runtime": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.9.1.tgz", + "integrity": "sha512-VYi5+ZVLhpgK4hQ0TAjiQiZ6ol0oe4mBx7mVv7IflsiEp0OWoVsp/+f9Vc1hOhE0TtkORVrI1GvzyreqpgWtkA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/wasi-threads": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.0.tgz", + "integrity": "sha512-N10dEJNSsUx41Z6pZsXU8FjPjpBEplgH24sfkmITrBED1/U2Esum9F3lfLrMjKHHjmi557zQn7kR9R+XWXu5Rg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@emurgo/cardano-message-signing-browser": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@emurgo/cardano-message-signing-browser/-/cardano-message-signing-browser-1.1.0.tgz", + "integrity": "sha512-LyeiGIqCyZu9DZnKsi4wlBjZA1MN+uy3Cqpb5J6RZWvFXDJnCoxrYB/EixUiGRD/la4WsldBgtPsrIHyGsVkpg==", + "license": "MIT" + }, + "node_modules/@emurgo/cardano-message-signing-nodejs": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@emurgo/cardano-message-signing-nodejs/-/cardano-message-signing-nodejs-1.1.0.tgz", + "integrity": "sha512-PQRc8K8wZshEdmQenNUzVtiI8oJNF/1uAnBhidee5C4o1l2mDLOW+ur46HWHIFKQ6x8mSJTllcjMscHgzju0gQ==", + "license": "MIT" + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.27.4", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.4.tgz", + "integrity": "sha512-cQPwL2mp2nSmHHJlCyoXgHGhbEPMrEEU5xhkcy3Hs/O7nGZqEpZ2sUtLaL9MORLtDfRvVl2/3PAuEkYZH0Ty8Q==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.27.4", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.4.tgz", + "integrity": "sha512-X9bUgvxiC8CHAGKYufLIHGXPJWnr0OCdR0anD2e21vdvgCI8lIfqFbnoeOz7lBjdrAGUhqLZLcQo6MLhTO2DKQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.27.4", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.4.tgz", + "integrity": "sha512-gdLscB7v75wRfu7QSm/zg6Rx29VLdy9eTr2t44sfTW7CxwAtQghZ4ZnqHk3/ogz7xao0QAgrkradbBzcqFPasw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.27.4", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.4.tgz", + "integrity": "sha512-PzPFnBNVF292sfpfhiyiXCGSn9HZg5BcAz+ivBuSsl6Rk4ga1oEXAamhOXRFyMcjwr2DVtm40G65N3GLeH1Lvw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.27.4", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.4.tgz", + "integrity": "sha512-b7xaGIwdJlht8ZFCvMkpDN6uiSmnxxK56N2GDTMYPr2/gzvfdQN8rTfBsvVKmIVY/X7EM+/hJKEIbbHs9oA4tQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.27.4", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.4.tgz", + "integrity": "sha512-sR+OiKLwd15nmCdqpXMnuJ9W2kpy0KigzqScqHI3Hqwr7IXxBp3Yva+yJwoqh7rE8V77tdoheRYataNKL4QrPw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.27.4", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.4.tgz", + "integrity": "sha512-jnfpKe+p79tCnm4GVav68A7tUFeKQwQyLgESwEAUzyxk/TJr4QdGog9sqWNcUbr/bZt/O/HXouspuQDd9JxFSw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.27.4", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.4.tgz", + "integrity": "sha512-2kb4ceA/CpfUrIcTUl1wrP/9ad9Atrp5J94Lq69w7UwOMolPIGrfLSvAKJp0RTvkPPyn6CIWrNy13kyLikZRZQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.27.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.4.tgz", + "integrity": "sha512-aBYgcIxX/wd5n2ys0yESGeYMGF+pv6g0DhZr3G1ZG4jMfruU9Tl1i2Z+Wnj9/KjGz1lTLCcorqE2viePZqj4Eg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.27.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.4.tgz", + "integrity": "sha512-7nQOttdzVGth1iz57kxg9uCz57dxQLHWxopL6mYuYthohPKEK0vU0C3O21CcBK6KDlkYVcnDXY099HcCDXd9dA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.27.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.4.tgz", + "integrity": "sha512-oPtixtAIzgvzYcKBQM/qZ3R+9TEUd1aNJQu0HhGyqtx6oS7qTpvjheIWBbes4+qu1bNlo2V4cbkISr8q6gRBFA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.27.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.4.tgz", + "integrity": "sha512-8mL/vh8qeCoRcFH2nM8wm5uJP+ZcVYGGayMavi8GmRJjuI3g1v6Z7Ni0JJKAJW+m0EtUuARb6Lmp4hMjzCBWzA==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.27.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.4.tgz", + "integrity": "sha512-1RdrWFFiiLIW7LQq9Q2NES+HiD4NyT8Itj9AUeCl0IVCA459WnPhREKgwrpaIfTOe+/2rdntisegiPWn/r/aAw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.27.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.4.tgz", + "integrity": "sha512-tLCwNG47l3sd9lpfyx9LAGEGItCUeRCWeAx6x2Jmbav65nAwoPXfewtAdtbtit/pJFLUWOhpv0FpS6GQAmPrHA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.27.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.4.tgz", + "integrity": "sha512-BnASypppbUWyqjd1KIpU4AUBiIhVr6YlHx/cnPgqEkNoVOhHg+YiSVxM1RLfiy4t9cAulbRGTNCKOcqHrEQLIw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.27.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.4.tgz", + "integrity": "sha512-+eUqgb/Z7vxVLezG8bVB9SfBie89gMueS+I0xYh2tJdw3vqA/0ImZJ2ROeWwVJN59ihBeZ7Tu92dF/5dy5FttA==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.27.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.4.tgz", + "integrity": "sha512-S5qOXrKV8BQEzJPVxAwnryi2+Iq5pB40gTEIT69BQONqR7JH1EPIcQ/Uiv9mCnn05jff9umq/5nqzxlqTOg9NA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.27.4", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.4.tgz", + "integrity": "sha512-xHT8X4sb0GS8qTqiwzHqpY00C95DPAq7nAwX35Ie/s+LO9830hrMd3oX0ZMKLvy7vsonee73x0lmcdOVXFzd6Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.27.4", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.4.tgz", + "integrity": "sha512-RugOvOdXfdyi5Tyv40kgQnI0byv66BFgAqjdgtAKqHoZTbTF2QqfQrFwa7cHEORJf6X2ht+l9ABLMP0dnKYsgg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.27.4", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.4.tgz", + "integrity": "sha512-2MyL3IAaTX+1/qP0O1SwskwcwCoOI4kV2IBX1xYnDDqthmq5ArrW94qSIKCAuRraMgPOmG0RDTA74mzYNQA9ow==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.27.4", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.4.tgz", + "integrity": "sha512-u8fg/jQ5aQDfsnIV6+KwLOf1CmJnfu1ShpwqdwC0uA7ZPwFws55Ngc12vBdeUdnuWoQYx/SOQLGDcdlfXhYmXQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.27.4", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.4.tgz", + "integrity": "sha512-JkTZrl6VbyO8lDQO3yv26nNr2RM2yZzNrNHEsj9bm6dOwwu9OYN28CjzZkH57bh4w0I2F7IodpQvUAEd1mbWXg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.27.4", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.4.tgz", + "integrity": "sha512-/gOzgaewZJfeJTlsWhvUEmUG4tWEY2Spp5M20INYRg2ZKl9QPO3QEEgPeRtLjEWSW8FilRNacPOg8R1uaYkA6g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.27.4", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.4.tgz", + "integrity": "sha512-Z9SExBg2y32smoDQdf1HRwHRt6vAHLXcxD2uGgO/v2jK7Y718Ix4ndsbNMU/+1Qiem9OiOdaqitioZwxivhXYg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.27.4", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.4.tgz", + "integrity": "sha512-DAyGLS0Jz5G5iixEbMHi5KdiApqHBWMGzTtMiJ72ZOLhbu/bzxgAe8Ue8CTS3n3HbIUHQz/L51yMdGMeoxXNJw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.27.4", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.4.tgz", + "integrity": "sha512-+knoa0BDoeXgkNvvV1vvbZX4+hizelrkwmGJBdT17t8FNPwG2lKemmuMZlmaNQ3ws3DKKCxpb4zRZEIp3UxFCg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@evolution-sdk/evolution": { + "version": "0.3.30", + "resolved": "https://registry.npmjs.org/@evolution-sdk/evolution/-/evolution-0.3.30.tgz", + "integrity": "sha512-8DMgxNdjWCEhCu8sMKz/ikY4qfGmoW8vBPT53Dji7i5PmHYMXLuVk0Nt5mNpIovujwSbC271GIJQo2pINtQsxg==", + "license": "MIT", + "dependencies": { + "@effect/platform": "^0.90.10", + "@effect/platform-node": "^0.96.1", + "@noble/curves": "^2.0.1", + "@noble/hashes": "^1.8.0", + "@scure/base": "^1.2.6", + "@scure/bip32": "^1.7.0", + "@scure/bip39": "^1.6.0", + "@types/bip39": "^3.0.4", + "bip39": "^3.1.0", + "effect": "^3.19.3" + } + }, + "node_modules/@evolution-sdk/evolution/node_modules/@effect/cluster": { + "version": "0.48.16", + "resolved": "https://registry.npmjs.org/@effect/cluster/-/cluster-0.48.16.tgz", + "integrity": "sha512-ZZkrSMVetOvlRDD8mPCX3IcVJtvUZBp6++lUKNGIT6LRIObRP4lVwtei85Z+4g49WpeLvJnSdH0zjPtGieFDHQ==", + "peer": true, + "peerDependencies": { + "@effect/platform": "^0.90.10", + "@effect/rpc": "^0.69.4", + "@effect/sql": "^0.44.2", + "@effect/workflow": "^0.9.6", + "effect": "^3.17.14" + } + }, + "node_modules/@evolution-sdk/evolution/node_modules/@effect/experimental": { + "version": "0.54.6", + "resolved": "https://registry.npmjs.org/@effect/experimental/-/experimental-0.54.6.tgz", + "integrity": "sha512-UqHMvCQmrZT6kUVoUC0lqyno4Yad+j9hBGCdUjW84zkLwAq08tPqySiZUKRwY+Ae5B2Ab8rISYJH7nQvct9DMQ==", + "peer": true, + "dependencies": { + "uuid": "^11.0.3" + }, + "peerDependencies": { + "@effect/platform": "^0.90.2", + "effect": "^3.17.7", + "ioredis": "^5", + "lmdb": "^3" + }, + "peerDependenciesMeta": { + "ioredis": { + "optional": true + }, + "lmdb": { + "optional": true + } + } + }, + "node_modules/@evolution-sdk/evolution/node_modules/@effect/platform": { + "version": "0.90.10", + "resolved": "https://registry.npmjs.org/@effect/platform/-/platform-0.90.10.tgz", + "integrity": "sha512-QhDPgCaLfIMQKOCoCPQvRUS+Y34iYJ07jdZ/CBAvYFvg/iUBebsmFuHL63RCD/YZH9BuK/kqqLYAA3M0fmUEgg==", + "dependencies": { + "find-my-way-ts": "^0.1.6", + "msgpackr": "^1.11.4", + "multipasta": "^0.2.7" + }, + "peerDependencies": { + "effect": "^3.17.13" + } + }, + "node_modules/@evolution-sdk/evolution/node_modules/@effect/platform-node": { + "version": "0.96.1", + "resolved": "https://registry.npmjs.org/@effect/platform-node/-/platform-node-0.96.1.tgz", + "integrity": "sha512-4nfB/XRJJ246MCdI7klTE/aVvA9txfI83RnymS7pNyoG4CXUKELi87JrkrWFTtOlewzt5UMWpmqsFmm2qHxx3A==", + "dependencies": { + "@effect/platform-node-shared": "^0.49.0", + "mime": "^3.0.0", + "undici": "^7.10.0", + "ws": "^8.18.2" + }, + "peerDependencies": { + "@effect/cluster": "^0.48.2", + "@effect/platform": "^0.90.6", + "@effect/rpc": "^0.69.1", + "@effect/sql": "^0.44.2", + "effect": "^3.17.10" + } + }, + "node_modules/@evolution-sdk/evolution/node_modules/@effect/platform-node-shared": { + "version": "0.49.2", + "resolved": "https://registry.npmjs.org/@effect/platform-node-shared/-/platform-node-shared-0.49.2.tgz", + "integrity": "sha512-uYlQi2swDV9hdHatr2Onov3G+VlEF+3+Qm9dvdOZiZNE1bVqvs/zs6LVT8Yrz/3Vq/4JPzGcN+acx0iiJo5ZVw==", + "dependencies": { + "@parcel/watcher": "^2.5.1", + "multipasta": "^0.2.7", + "ws": "^8.18.2" + }, + "peerDependencies": { + "@effect/cluster": "^0.48.10", + "@effect/platform": "^0.90.10", + "@effect/rpc": "^0.69.3", + "@effect/sql": "^0.44.2", + "effect": "^3.17.13" + } + }, + "node_modules/@evolution-sdk/evolution/node_modules/@effect/rpc": { + "version": "0.69.5", + "resolved": "https://registry.npmjs.org/@effect/rpc/-/rpc-0.69.5.tgz", + "integrity": "sha512-LLCZP/aiaW4HeoIaoZuVZpJb/PFCwdJP21b3xP6l+1yoRVw8HlKYyfy/outRCF+BT4ndtY0/utFSeGWC21Qr7w==", + "peer": true, + "peerDependencies": { + "@effect/platform": "^0.90.10", + "effect": "^3.17.14" + } + }, + "node_modules/@evolution-sdk/evolution/node_modules/@effect/sql": { + "version": "0.44.2", + "resolved": "https://registry.npmjs.org/@effect/sql/-/sql-0.44.2.tgz", + "integrity": "sha512-DEcvriHvj88zu7keruH9NcHQzam7yQzLNLJO6ucDXMCAwWzYZSJOsmkxBznRFv8ylFtccSclKH2fuj+wRKPjCQ==", + "peer": true, + "dependencies": { + "uuid": "^11.0.3" + }, + "peerDependencies": { + "@effect/experimental": "^0.54.6", + "@effect/platform": "^0.90.4", + "effect": "^3.17.7" + } + }, + "node_modules/@evolution-sdk/evolution/node_modules/@effect/workflow": { + "version": "0.9.6", + "resolved": "https://registry.npmjs.org/@effect/workflow/-/workflow-0.9.6.tgz", + "integrity": "sha512-uPBpSJ8NYwYA6VLZovfejwNik+2kAaoDtlPi+VTlxFMscWNYx+xlGiRg8CO/oa2pHCwkJYjOI27SGOlUawiz1w==", + "peer": true, + "peerDependencies": { + "@effect/platform": "^0.90.10", + "@effect/rpc": "^0.69.4", + "effect": "^3.17.14" + } + }, + "node_modules/@evolution-sdk/evolution/node_modules/ws": { + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.20.0.tgz", + "integrity": "sha512-sAt8BhgNbzCtgGbt2OxmpuryO63ZoDk/sqaB/znQm94T4fCEsy/yV+7CdC1kJhOU9lboAEU7R3kquuycDoibVA==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/@foxglove/crc": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@foxglove/crc/-/crc-0.0.3.tgz", + "integrity": "sha512-DjIZsnL3CyP/yQ/vUYA9cjrD0a/8YXejI5ZmsaOiT16cLfZcTwaCxIN01/ys4jsy+dZCQ/9DnWFn7AEFbiMDaA==", + "license": "MIT" + }, + "node_modules/@harmoniclabs/bigint-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@harmoniclabs/bigint-utils/-/bigint-utils-1.0.0.tgz", + "integrity": "sha512-OhZMHcdtH2hHKMlxWFHf71PmKHdoi9ARpjS9mUu0/cd8VWDDjT7VQoQwC5NN/68iyO4O5Dojrvrp9tjG5BDABA==", + "license": "Apache-2.0", + "dependencies": { + "@harmoniclabs/uint8array-utils": "^1.0.0" + } + }, + "node_modules/@harmoniclabs/biguint": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@harmoniclabs/biguint/-/biguint-1.0.0.tgz", + "integrity": "sha512-5DyCIBDL4W+7ffR1IJSbGrCG4xEYxAlFH5gCNF42qtyL5ltwZ92Ae1MyXpHM2TUPy7ocSTqlLUsOdy+SvqVVPw==", + "license": "Apache-2.0" + }, + "node_modules/@harmoniclabs/bitstream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@harmoniclabs/bitstream/-/bitstream-1.0.0.tgz", + "integrity": "sha512-Ed/I46IuCiytE5QiMmmUo9kPJcypM7OuUqoRaAXUALL5C6LKLpT6kYE1qeuhLkx2/WvkHT18jcOX6jhM/nmqoA==", + "license": "MIT", + "dependencies": { + "@harmoniclabs/uint8array-utils": "^1.0.0" + } + }, + "node_modules/@harmoniclabs/bytestring": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@harmoniclabs/bytestring/-/bytestring-1.0.0.tgz", + "integrity": "sha512-d5m10O0okKc6QNX0pSRriFTkk/kNMnMBGbo5X3kEZwKaXTI4tDVoTZBL7bwbYHwOEdSxWJjVtlO9xtB7ZrYZNg==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@harmoniclabs/uint8array-utils": "^1.0.0" + } + }, + "node_modules/@harmoniclabs/cbor": { + "version": "1.6.6", + "resolved": "https://registry.npmjs.org/@harmoniclabs/cbor/-/cbor-1.6.6.tgz", + "integrity": "sha512-nOcts7PhkKCbqPKwP3/IsIQACwJvqchpT88cwvKspB+oR09YfB1LC1NrUTsFg1DusLRydVsOwR07KgYTF5uNOA==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@harmoniclabs/bytestring": "^1.0.0", + "@harmoniclabs/obj-utils": "^1.0.0", + "@harmoniclabs/uint8array-utils": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/HarmonicLabs" + } + }, + "node_modules/@harmoniclabs/crypto": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@harmoniclabs/crypto/-/crypto-0.3.0.tgz", + "integrity": "sha512-UvmGQOLFVFhRIDYLpcWbPQLXl9advCt0h02Z/BtBuXtHiy35WRxKQ3njcUKI0v6zGITuvqQhsf6VOPMeekLdeA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@harmoniclabs/bitstream": "^1.0.0", + "@harmoniclabs/uint8array-utils": "^1.0.3" + } + }, + "node_modules/@harmoniclabs/obj-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@harmoniclabs/obj-utils/-/obj-utils-1.0.0.tgz", + "integrity": "sha512-EO1bQBZAORrutcP+leP5YNDwNd/9TOE23VEvs3ktniXg6w0knUrLjUIl2Pkcbs/D1VQxqmsNpXho+vaMj00qxA==", + "license": "MIT", + "peer": true + }, + "node_modules/@harmoniclabs/pair": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@harmoniclabs/pair/-/pair-1.0.0.tgz", + "integrity": "sha512-D9OBowsUsy1LctHxWzd9AngTzoo5x3rBiJ0gu579t41Q23pb+VNx1euEfluUEiaYbgljcl1lb/4D1fFTZd1tRQ==", + "license": "MIT", + "peer": true + }, + "node_modules/@harmoniclabs/plutus-data": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@harmoniclabs/plutus-data/-/plutus-data-1.2.6.tgz", + "integrity": "sha512-rF046GZ07XDpjZBNybALKYSycjxCLzXKbhLylu9pRuZiii5fVXReEfgtLB29TsPBvGY6ZBeiyHgJnLgm+huZBw==", + "license": "Apache-2.0", + "dependencies": { + "@harmoniclabs/biguint": "^1.0.0", + "@harmoniclabs/crypto": "^0.2.4", + "@harmoniclabs/uint8array-utils": "^1.0.0" + }, + "peerDependencies": { + "@harmoniclabs/bytestring": "^1.0.0", + "@harmoniclabs/cbor": "^1.3.0" + } + }, + "node_modules/@harmoniclabs/plutus-data/node_modules/@harmoniclabs/crypto": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/@harmoniclabs/crypto/-/crypto-0.2.5.tgz", + "integrity": "sha512-t2saWMFWBx8tOHotiYTTfQKhPGpWT4AMLXxq3u0apShVXNV0vgL0gEgSMudBjES/wrKByCqa2xmU70gadz26hA==", + "license": "MIT", + "dependencies": { + "@harmoniclabs/bitstream": "^1.0.0", + "@harmoniclabs/uint8array-utils": "^1.0.3" + } + }, + "node_modules/@harmoniclabs/uint8array-utils": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@harmoniclabs/uint8array-utils/-/uint8array-utils-1.0.4.tgz", + "integrity": "sha512-Z454prSbX4geXGHyjjcn9vm6u9NsD3VJykv8f8yE1VjIXSPitaLPEnm8u2+B+GMp1chYlLilOq+kW4OvJ6y28A==", + "license": "Apache-2.0" + }, + "node_modules/@harmoniclabs/uplc": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@harmoniclabs/uplc/-/uplc-1.4.1.tgz", + "integrity": "sha512-sELKStjxPBPBxBMylU4oBSUe0/8eJe2HqRblNSwrMu8Fso4YpSPDqHZ33iDZ8QAadVUsT5r2EQKX0TLrj7qXvQ==", + "license": "Apache-2.0", + "dependencies": { + "@harmoniclabs/bigint-utils": "^1.0.0", + "@harmoniclabs/uint8array-utils": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/HarmonicLabs" + }, + "peerDependencies": { + "@harmoniclabs/bytestring": "^1.0.0", + "@harmoniclabs/cbor": "^1.3.0", + "@harmoniclabs/crypto": "^0.3.0-dev0", + "@harmoniclabs/pair": "^1.0.0", + "@harmoniclabs/plutus-data": "^1.2.4" + } + }, + "node_modules/@isaacs/ttlcache": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@isaacs/ttlcache/-/ttlcache-1.4.1.tgz", + "integrity": "sha512-RQgQ4uQ+pLbqXfOmieB91ejmLwvSgv9nLx6sT6sD83s7umBypgg+OIBOBbEUiJXrfpnp9j0mRhYYdzp9uqq3lA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@leichtgewicht/ip-codec": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz", + "integrity": "sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==", + "license": "MIT" + }, + "node_modules/@libp2p/interface": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-3.1.0.tgz", + "integrity": "sha512-RE7/XyvC47fQBe1cHxhMvepYKa5bFCUyFrrpj8PuM0E7JtzxU7F+Du5j4VXbg2yLDcToe0+j8mB7jvwE2AThYw==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "@multiformats/dns": "^1.0.6", + "@multiformats/multiaddr": "^13.0.1", + "main-event": "^1.0.1", + "multiformats": "^13.4.0", + "progress-events": "^1.0.1", + "uint8arraylist": "^2.4.8" + } + }, + "node_modules/@libp2p/interface/node_modules/@multiformats/multiaddr": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-13.0.1.tgz", + "integrity": "sha512-XToN915cnfr6Lr9EdGWakGJbPT0ghpg/850HvdC+zFX8XvpLZElwa8synCiwa8TuvKNnny6m8j8NVBNCxhIO3g==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "@chainsafe/is-ip": "^2.0.1", + "multiformats": "^13.0.0", + "uint8-varint": "^2.0.1", + "uint8arrays": "^5.0.0" + } + }, + "node_modules/@lucid-evolution/core-types": { + "version": "0.1.22", + "resolved": "https://registry.npmjs.org/@lucid-evolution/core-types/-/core-types-0.1.22.tgz", + "integrity": "sha512-2ffw82PAjB9wdnW62zWh5J8Wkqrr+sMrdXtndejdu4UYmTdmf7rIClr+AfKO8IStCciVcNT/wQj59PyYu/Jg1Q==", + "license": "MIT", + "dependencies": { + "@anastasia-labs/cardano-multiplatform-lib-browser": "6.0.2-3", + "@anastasia-labs/cardano-multiplatform-lib-nodejs": "6.0.2-3" + } + }, + "node_modules/@lucid-evolution/core-utils": { + "version": "0.1.16", + "resolved": "https://registry.npmjs.org/@lucid-evolution/core-utils/-/core-utils-0.1.16.tgz", + "integrity": "sha512-fNKZiGl1h6tf48bji067uxHZpDlhkrIDrwhZLt5DQC/c6GVdZb4TSvqgs7MOmMqp1dj9dy6NDYWnCHeTqZAhJw==", + "license": "MIT", + "dependencies": { + "@anastasia-labs/cardano-multiplatform-lib-browser": "6.0.2-2", + "@anastasia-labs/cardano-multiplatform-lib-nodejs": "6.0.2-2" + } + }, + "node_modules/@lucid-evolution/core-utils/node_modules/@anastasia-labs/cardano-multiplatform-lib-browser": { + "version": "6.0.2-2", + "resolved": "https://registry.npmjs.org/@anastasia-labs/cardano-multiplatform-lib-browser/-/cardano-multiplatform-lib-browser-6.0.2-2.tgz", + "integrity": "sha512-sSPPjO1Zye82YVqrUGIKrli/Zt2pPkZkQd/jv9k6AzjIZdNPD3hvuB2yH6RHeZUO8+K57bu9r7Rlyf7VGbhhTQ==", + "license": "MIT" + }, + "node_modules/@lucid-evolution/core-utils/node_modules/@anastasia-labs/cardano-multiplatform-lib-nodejs": { + "version": "6.0.2-2", + "resolved": "https://registry.npmjs.org/@anastasia-labs/cardano-multiplatform-lib-nodejs/-/cardano-multiplatform-lib-nodejs-6.0.2-2.tgz", + "integrity": "sha512-KLYHyJWtFsTUUbIVz9dn5GiCbI4Mrx5mRpDWXa3lVLWFKok6AkvYlyHk4OH4NNa4JBerrHTB6ZJrk75UgKAaMA==", + "license": "MIT" + }, + "node_modules/@lucid-evolution/crc8": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/@lucid-evolution/crc8/-/crc8-0.1.8.tgz", + "integrity": "sha512-88+/S6n+sPgxYtG05rvbJDVb8MoFGzckkR3p26uGrzngYzlJGfxBWIzNhVwfI2mgINPo2C5lkZW3GYnfY0MjuA==", + "license": "MIT" + }, + "node_modules/@lucid-evolution/lucid": { + "version": "0.4.29", + "resolved": "https://registry.npmjs.org/@lucid-evolution/lucid/-/lucid-0.4.29.tgz", + "integrity": "sha512-+9pXlHivIGE4xJC6EZ62vtOBfgHgPpbJHgd7d6Ztk3lmbBwsM1PZVQ1WSE2upXSvqGE8KT/99IxmZ3kKfbtDUg==", + "license": "MIT", + "dependencies": { + "@anastasia-labs/cardano-multiplatform-lib-browser": "6.0.2-3", + "@anastasia-labs/cardano-multiplatform-lib-nodejs": "6.0.2-3", + "@effect/schema": "^0.66.16", + "@emurgo/cardano-message-signing-nodejs": "^1.1.0", + "@lucid-evolution/core-types": "0.1.22", + "@lucid-evolution/core-utils": "0.1.16", + "@lucid-evolution/plutus": "0.1.29", + "@lucid-evolution/provider": "0.1.90", + "@lucid-evolution/sign_data": "0.1.25", + "@lucid-evolution/uplc": "0.2.20", + "@lucid-evolution/utils": "0.1.66", + "@lucid-evolution/wallet": "0.1.72", + "effect": "^3.12.7" + } + }, + "node_modules/@lucid-evolution/plutus": { + "version": "0.1.29", + "resolved": "https://registry.npmjs.org/@lucid-evolution/plutus/-/plutus-0.1.29.tgz", + "integrity": "sha512-GHmq9Pso+xeFszwKAd9jvRFnmnV4fRKdm+OHYLrS58yh3uazKr9VR+amtT9SmKufoLy/gNo5sL7i6gcNSW+yIg==", + "license": "MIT", + "dependencies": { + "@anastasia-labs/cardano-multiplatform-lib-browser": "6.0.2-3", + "@anastasia-labs/cardano-multiplatform-lib-nodejs": "6.0.2-3", + "@lucid-evolution/core-types": "0.1.22", + "@lucid-evolution/core-utils": "0.1.16", + "@sinclair/typebox": "^0.32.28" + } + }, + "node_modules/@lucid-evolution/provider": { + "version": "0.1.90", + "resolved": "https://registry.npmjs.org/@lucid-evolution/provider/-/provider-0.1.90.tgz", + "integrity": "sha512-8vzVDlWJiDfuvuE2Un18N5uTK8qDkVB5GiglwoDV/qgBNRljQjiih53LbhcGa4KMXgufjZNyNDH854jFkJ95cg==", + "license": "MIT", + "dependencies": { + "@anastasia-labs/cardano-multiplatform-lib-browser": "6.0.2-3", + "@anastasia-labs/cardano-multiplatform-lib-nodejs": "6.0.2-3", + "@effect/platform": "^0.71.3", + "@effect/schema": "^0.68.26", + "@lucid-evolution/core-types": "0.1.22", + "@lucid-evolution/core-utils": "0.1.16", + "@lucid-evolution/utils": "0.1.66", + "@lucid-evolution/wallet": "0.1.72", + "effect": "^3.11.7" + } + }, + "node_modules/@lucid-evolution/provider/node_modules/@effect/schema": { + "version": "0.68.27", + "resolved": "https://registry.npmjs.org/@effect/schema/-/schema-0.68.27.tgz", + "integrity": "sha512-/rmIb+4QaQTecdTfeYSZtNikIV+BeIbYDl/hpgBTaS96en7pKNW5hcygFQhdocjKguIL7Y/be+oUrVafWV60ew==", + "deprecated": "this package has been merged into the main effect package", + "license": "MIT", + "dependencies": { + "fast-check": "^3.20.0" + }, + "peerDependencies": { + "effect": "^3.5.7" + } + }, + "node_modules/@lucid-evolution/sign_data": { + "version": "0.1.25", + "resolved": "https://registry.npmjs.org/@lucid-evolution/sign_data/-/sign_data-0.1.25.tgz", + "integrity": "sha512-ZDDl3SyO3Lf+/ji9u0Fg6I9oNs+tW//aHkgz4NlS+9xbx2bT9YU+mV9ZLLjWSZVGTb0TbzT4NGvVqdgRNspdYQ==", + "license": "MIT", + "dependencies": { + "@anastasia-labs/cardano-multiplatform-lib-browser": "6.0.2-3", + "@anastasia-labs/cardano-multiplatform-lib-nodejs": "6.0.2-3", + "@emurgo/cardano-message-signing-browser": "^1.0.1", + "@emurgo/cardano-message-signing-nodejs": "^1.0.1", + "@lucid-evolution/core-types": "0.1.22", + "@lucid-evolution/core-utils": "0.1.16" + } + }, + "node_modules/@lucid-evolution/uplc": { + "version": "0.2.20", + "resolved": "https://registry.npmjs.org/@lucid-evolution/uplc/-/uplc-0.2.20.tgz", + "integrity": "sha512-+40qeHmjMnM4Sjdq9JAf190a1t3TMbV1vegVLQGqt2AouOkIunZfziBZwuaqcgUVVbynW+j2Qx2ijK83Pap4XQ==" + }, + "node_modules/@lucid-evolution/utils": { + "version": "0.1.66", + "resolved": "https://registry.npmjs.org/@lucid-evolution/utils/-/utils-0.1.66.tgz", + "integrity": "sha512-sp6vsxrc0u9rYgb4ExRP4LRQM0oK6mVxqt70axK0T4DSS06KYtCqUWX6kjcOHY8jxDGfjK5RLh9hBY+Gul4OSQ==", + "license": "MIT", + "dependencies": { + "@anastasia-labs/cardano-multiplatform-lib-browser": "6.0.2-3", + "@anastasia-labs/cardano-multiplatform-lib-nodejs": "6.0.2-3", + "@cardano-sdk/core": "^0.45.1", + "@effect/schema": "^0.68.16", + "@harmoniclabs/plutus-data": "^1.2.4", + "@harmoniclabs/uplc": "^1.2.4", + "@lucid-evolution/core-types": "0.1.22", + "@lucid-evolution/core-utils": "0.1.16", + "@lucid-evolution/crc8": "0.1.8", + "@lucid-evolution/plutus": "0.1.29", + "@lucid-evolution/uplc": "0.2.20", + "bip39": "^3.1.0", + "cbor-x": "^1.6.0", + "effect": "^3.10.4" + } + }, + "node_modules/@lucid-evolution/utils/node_modules/@effect/schema": { + "version": "0.68.27", + "resolved": "https://registry.npmjs.org/@effect/schema/-/schema-0.68.27.tgz", + "integrity": "sha512-/rmIb+4QaQTecdTfeYSZtNikIV+BeIbYDl/hpgBTaS96en7pKNW5hcygFQhdocjKguIL7Y/be+oUrVafWV60ew==", + "deprecated": "this package has been merged into the main effect package", + "license": "MIT", + "dependencies": { + "fast-check": "^3.20.0" + }, + "peerDependencies": { + "effect": "^3.5.7" + } + }, + "node_modules/@lucid-evolution/wallet": { + "version": "0.1.72", + "resolved": "https://registry.npmjs.org/@lucid-evolution/wallet/-/wallet-0.1.72.tgz", + "integrity": "sha512-keGeDV4jUX2MAld79zAGja4mFNQ9FP4HJM8OB8DEnakewTVG4fk38SMSfvuQAh6yH8ZxTNoGUphrMSeVFU4OjQ==", + "license": "MIT", + "dependencies": { + "@anastasia-labs/cardano-multiplatform-lib-browser": "6.0.2-3", + "@anastasia-labs/cardano-multiplatform-lib-nodejs": "6.0.2-3", + "@lucid-evolution/core-types": "0.1.22", + "@lucid-evolution/core-utils": "0.1.16", + "@lucid-evolution/sign_data": "0.1.25", + "@lucid-evolution/utils": "0.1.66", + "bip39": "^3.1.0" + } + }, + "node_modules/@msgpackr-extract/msgpackr-extract-darwin-arm64": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-arm64/-/msgpackr-extract-darwin-arm64-3.0.3.tgz", + "integrity": "sha512-QZHtlVgbAdy2zAqNA9Gu1UpIuI8Xvsd1v8ic6B2pZmeFnFcMWiPLfWXh7TVw4eGEZ/C9TH281KwhVoeQUKbyjw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-darwin-x64": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-x64/-/msgpackr-extract-darwin-x64-3.0.3.tgz", + "integrity": "sha512-mdzd3AVzYKuUmiWOQ8GNhl64/IoFGol569zNRdkLReh6LRLHOXxU4U8eq0JwaD8iFHdVGqSy4IjFL4reoWCDFw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-linux-arm": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm/-/msgpackr-extract-linux-arm-3.0.3.tgz", + "integrity": "sha512-fg0uy/dG/nZEXfYilKoRe7yALaNmHoYeIoJuJ7KJ+YyU2bvY8vPv27f7UKhGRpY6euFYqEVhxCFZgAUNQBM3nw==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-linux-arm64": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm64/-/msgpackr-extract-linux-arm64-3.0.3.tgz", + "integrity": "sha512-YxQL+ax0XqBJDZiKimS2XQaf+2wDGVa1enVRGzEvLLVFeqa5kx2bWbtcSXgsxjQB7nRqqIGFIcLteF/sHeVtQg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-linux-x64": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-x64/-/msgpackr-extract-linux-x64-3.0.3.tgz", + "integrity": "sha512-cvwNfbP07pKUfq1uH+S6KJ7dT9K8WOE4ZiAcsrSes+UY55E/0jLYc+vq+DO7jlmqRb5zAggExKm0H7O/CBaesg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-win32-x64": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-win32-x64/-/msgpackr-extract-win32-x64-3.0.3.tgz", + "integrity": "sha512-x0fWaQtYp4E6sktbsdAqnehxDgEc/VwM7uLsRCYWaiGu0ykYdZPiS8zCWdnjHwyiumousxfBm4SO31eXqwEZhQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@multiformats/dns": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@multiformats/dns/-/dns-1.0.13.tgz", + "integrity": "sha512-yr4bxtA3MbvJ+2461kYIYMsiiZj/FIqKI64hE4SdvWJUdWF9EtZLar38juf20Sf5tguXKFUruluswAO6JsjS2w==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "@dnsquery/dns-packet": "^6.1.1", + "@libp2p/interface": "^3.1.0", + "hashlru": "^2.3.0", + "p-queue": "^9.0.0", + "progress-events": "^1.0.0", + "uint8arrays": "^5.0.2" + } + }, + "node_modules/@multiformats/mafmt": { + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/@multiformats/mafmt/-/mafmt-12.1.6.tgz", + "integrity": "sha512-tlJRfL21X+AKn9b5i5VnaTD6bNttpSpcqwKVmDmSHLwxoz97fAHaepqFOk/l1fIu94nImIXneNbhsJx/RQNIww==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "@multiformats/multiaddr": "^12.0.0" + } + }, + "node_modules/@multiformats/multiaddr": { + "version": "12.5.1", + "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-12.5.1.tgz", + "integrity": "sha512-+DDlr9LIRUS8KncI1TX/FfUn8F2dl6BIxJgshS/yFQCNB5IAF0OGzcwB39g5NLE22s4qqDePv0Qof6HdpJ/4aQ==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "@chainsafe/is-ip": "^2.0.1", + "@chainsafe/netmask": "^2.0.0", + "@multiformats/dns": "^1.0.3", + "abort-error": "^1.0.1", + "multiformats": "^13.0.0", + "uint8-varint": "^2.0.1", + "uint8arrays": "^5.0.0" + } + }, + "node_modules/@napi-rs/wasm-runtime": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.1.tgz", + "integrity": "sha512-p64ah1M1ld8xjWv3qbvFwHiFVWrq1yFvV4f7w+mzaqiR4IlSgkqhcRdHwsGgomwzBH51sRY4NEowLxnaBjcW/A==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.7.1", + "@emnapi/runtime": "^1.7.1", + "@tybys/wasm-util": "^0.10.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + } + }, + "node_modules/@noble/curves": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-2.0.1.tgz", + "integrity": "sha512-vs1Az2OOTBiP4q0pwjW5aF0xp9n4MxVrmkFBxc6EKZc6ddYx5gaZiAsZoq0uRRXWbi3AT/sBqn05eRPtn1JCPw==", + "dependencies": { + "@noble/hashes": "2.0.1" + }, + "engines": { + "node": ">= 20.19.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/curves/node_modules/@noble/hashes": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-2.0.1.tgz", + "integrity": "sha512-XlOlEbQcE9fmuXxrVTXCTlG2nlRXa9Rj3rr5Ue/+tX+nmkgbX720YHh0VR3hBF9xDvwnb8D2shVGOwNx+ulArw==", + "engines": { + "node": ">= 20.19.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "license": "MIT", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@oxc-project/types": { + "version": "0.120.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.120.0.tgz", + "integrity": "sha512-k1YNu55DuvAip/MGE1FTsIuU3FUCn6v/ujG9V7Nq5Df/kX2CWb13hhwD0lmJGMGqE+bE1MXvv9SZVnMzEXlWcg==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/Boshen" + } + }, + "node_modules/@parcel/watcher": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.6.tgz", + "integrity": "sha512-tmmZ3lQxAe/k/+rNnXQRawJ4NjxO2hqiOLTHvWchtGZULp4RyFeh6aU4XdOYBFe2KE1oShQTv4AblOs2iOrNnQ==", + "hasInstallScript": true, + "dependencies": { + "detect-libc": "^2.0.3", + "is-glob": "^4.0.3", + "node-addon-api": "^7.0.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "@parcel/watcher-android-arm64": "2.5.6", + "@parcel/watcher-darwin-arm64": "2.5.6", + "@parcel/watcher-darwin-x64": "2.5.6", + "@parcel/watcher-freebsd-x64": "2.5.6", + "@parcel/watcher-linux-arm-glibc": "2.5.6", + "@parcel/watcher-linux-arm-musl": "2.5.6", + "@parcel/watcher-linux-arm64-glibc": "2.5.6", + "@parcel/watcher-linux-arm64-musl": "2.5.6", + "@parcel/watcher-linux-x64-glibc": "2.5.6", + "@parcel/watcher-linux-x64-musl": "2.5.6", + "@parcel/watcher-win32-arm64": "2.5.6", + "@parcel/watcher-win32-ia32": "2.5.6", + "@parcel/watcher-win32-x64": "2.5.6" + } + }, + "node_modules/@parcel/watcher-android-arm64": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.6.tgz", + "integrity": "sha512-YQxSS34tPF/6ZG7r/Ih9xy+kP/WwediEUsqmtf0cuCV5TPPKw/PQHRhueUo6JdeFJaqV3pyjm0GdYjZotbRt/A==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-arm64": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.6.tgz", + "integrity": "sha512-Z2ZdrnwyXvvvdtRHLmM4knydIdU9adO3D4n/0cVipF3rRiwP+3/sfzpAwA/qKFL6i1ModaabkU7IbpeMBgiVEA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-x64": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.6.tgz", + "integrity": "sha512-HgvOf3W9dhithcwOWX9uDZyn1lW9R+7tPZ4sug+NGrGIo4Rk1hAXLEbcH1TQSqxts0NYXXlOWqVpvS1SFS4fRg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-freebsd-x64": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.6.tgz", + "integrity": "sha512-vJVi8yd/qzJxEKHkeemh7w3YAn6RJCtYlE4HPMoVnCpIXEzSrxErBW5SJBgKLbXU3WdIpkjBTeUNtyBVn8TRng==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-glibc": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.6.tgz", + "integrity": "sha512-9JiYfB6h6BgV50CCfasfLf/uvOcJskMSwcdH1PHH9rvS1IrNy8zad6IUVPVUfmXr+u+Km9IxcfMLzgdOudz9EQ==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-musl": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.6.tgz", + "integrity": "sha512-Ve3gUCG57nuUUSyjBq/MAM0CzArtuIOxsBdQ+ftz6ho8n7s1i9E1Nmk/xmP323r2YL0SONs1EuwqBp2u1k5fxg==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-glibc": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.6.tgz", + "integrity": "sha512-f2g/DT3NhGPdBmMWYoxixqYr3v/UXcmLOYy16Bx0TM20Tchduwr4EaCbmxh1321TABqPGDpS8D/ggOTaljijOA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-musl": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.6.tgz", + "integrity": "sha512-qb6naMDGlbCwdhLj6hgoVKJl2odL34z2sqkC7Z6kzir8b5W65WYDpLB6R06KabvZdgoHI/zxke4b3zR0wAbDTA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-glibc": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.6.tgz", + "integrity": "sha512-kbT5wvNQlx7NaGjzPFu8nVIW1rWqV780O7ZtkjuWaPUgpv2NMFpjYERVi0UYj1msZNyCzGlaCWEtzc+exjMGbQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-musl": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.6.tgz", + "integrity": "sha512-1JRFeC+h7RdXwldHzTsmdtYR/Ku8SylLgTU/reMuqdVD7CtLwf0VR1FqeprZ0eHQkO0vqsbvFLXUmYm/uNKJBg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-arm64": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.6.tgz", + "integrity": "sha512-3ukyebjc6eGlw9yRt678DxVF7rjXatWiHvTXqphZLvo7aC5NdEgFufVwjFfY51ijYEWpXbqF5jtrK275z52D4Q==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-ia32": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.6.tgz", + "integrity": "sha512-k35yLp1ZMwwee3Ez/pxBi5cf4AoBKYXj00CZ80jUz5h8prpiaQsiRPKQMxoLstNuqe2vR4RNPEAEcjEFzhEz/g==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-x64": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.6.tgz", + "integrity": "sha512-hbQlYcCq5dlAX9Qx+kFb0FHue6vbjlf0FrNzSKdYK2APUf7tGfGxQCk2ihEREmbR6ZMc0MVAD5RIX/41gpUzTw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@pythnetwork/pyth-lazer-sdk": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/@pythnetwork/pyth-lazer-sdk/-/pyth-lazer-sdk-5.2.1.tgz", + "integrity": "sha512-/0rrPi6sZdVH+cWtW+X/hmQzw+nP2fIF6BlrJRTrqwK2IXWZWW+40sHoj839HrbyUXOJyG9zKyco37eFuTE/nA==", + "license": "Apache-2.0", + "dependencies": { + "@isaacs/ttlcache": "^1.4.1", + "buffer": "^6.0.3", + "isomorphic-ws": "^5.0.0", + "ts-log": "^2.2.7", + "ws": "^8.18.0" + }, + "engines": { + "node": "^24.0.0" + } + }, + "node_modules/@pythnetwork/pyth-lazer-sdk/node_modules/isomorphic-ws": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz", + "integrity": "sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==", + "license": "MIT", + "peerDependencies": { + "ws": "*" + } + }, + "node_modules/@pythnetwork/pyth-lazer-sdk/node_modules/ws": { + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.20.0.tgz", + "integrity": "sha512-sAt8BhgNbzCtgGbt2OxmpuryO63ZoDk/sqaB/znQm94T4fCEsy/yV+7CdC1kJhOU9lboAEU7R3kquuycDoibVA==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.0.0-rc.10", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.0-rc.10.tgz", + "integrity": "sha512-jOHxwXhxmFKuXztiu1ORieJeTbx5vrTkcOkkkn2d35726+iwhrY1w/+nYY/AGgF12thg33qC3R1LMBF5tHTZHg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.0.0-rc.10", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.0-rc.10.tgz", + "integrity": "sha512-gED05Teg/vtTZbIJBc4VNMAxAFDUPkuO/rAIyyxZjTj1a1/s6z5TII/5yMGZ0uLRCifEtwUQn8OlYzuYc0m70w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.0.0-rc.10", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.0-rc.10.tgz", + "integrity": "sha512-rI15NcM1mA48lqrIxVkHfAqcyFLcQwyXWThy+BQ5+mkKKPvSO26ir+ZDp36AgYoYVkqvMcdS8zOE6SeBsR9e8A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.0.0-rc.10", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.0-rc.10.tgz", + "integrity": "sha512-XZRXHdTa+4ME1MuDVp021+doQ+z6Ei4CCFmNc5/sKbqb8YmkiJdj8QKlV3rCI0AJtAeSB5n0WGPuJWNL9p/L2w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.0.0-rc.10", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.0-rc.10.tgz", + "integrity": "sha512-R0SQMRluISSLzFE20sPWYHVmJdDQnRyc/FzSCN72BqQmh2SOZUFG+N3/vBZpR4C6WpEUVYJLrYUXaj43sJsNLA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.0.0-rc.10", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.0-rc.10.tgz", + "integrity": "sha512-Y1reMrV/o+cwpduYhJuOE3OMKx32RMYCidf14y+HssARRmhDuWXJ4yVguDg2R/8SyyGNo+auzz64LnPK9Hq6jg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.0.0-rc.10", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.0-rc.10.tgz", + "integrity": "sha512-vELN+HNb2IzuzSBUOD4NHmP9yrGwl1DVM29wlQvx1OLSclL0NgVWnVDKl/8tEks79EFek/kebQKnNJkIAA4W2g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.0.0-rc.10", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.0.0-rc.10.tgz", + "integrity": "sha512-ZqrufYTgzxbHwpqOjzSsb0UV/aV2TFIY5rP8HdsiPTv/CuAgCRjM6s9cYFwQ4CNH+hf9Y4erHW1GjZuZ7WoI7w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.0.0-rc.10", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.0.0-rc.10.tgz", + "integrity": "sha512-gSlmVS1FZJSRicA6IyjoRoKAFK7IIHBs7xJuHRSmjImqk3mPPWbR7RhbnfH2G6bcmMEllCt2vQ/7u9e6bBnByg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.0.0-rc.10", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.0-rc.10.tgz", + "integrity": "sha512-eOCKUpluKgfObT2pHjztnaWEIbUabWzk3qPZ5PuacuPmr4+JtQG4k2vGTY0H15edaTnicgU428XW/IH6AimcQw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.0.0-rc.10", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.0-rc.10.tgz", + "integrity": "sha512-Xdf2jQbfQowJnLcgYfD/m0Uu0Qj5OdxKallD78/IPPfzaiaI4KRAwZzHcKQ4ig1gtg1SuzC7jovNiM2TzQsBXA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.0.0-rc.10", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.0-rc.10.tgz", + "integrity": "sha512-o1hYe8hLi1EY6jgPFyxQgQ1wcycX+qz8eEbVmot2hFkgUzPxy9+kF0u0NIQBeDq+Mko47AkaFFaChcvZa9UX9Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-wasm32-wasi": { + "version": "1.0.0-rc.10", + "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.0-rc.10.tgz", + "integrity": "sha512-Ugv9o7qYJudqQO5Y5y2N2SOo6S4WiqiNOpuQyoPInnhVzCY+wi/GHltcLHypG9DEUYMB0iTB/huJrpadiAcNcA==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@napi-rs/wasm-runtime": "^1.1.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.0.0-rc.10", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.0-rc.10.tgz", + "integrity": "sha512-7UODQb4fQUNT/vmgDZBl3XOBAIOutP5R3O/rkxg0aLfEGQ4opbCgU5vOw/scPe4xOqBwL9fw7/RP1vAMZ6QlAQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.0.0-rc.10", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.0-rc.10.tgz", + "integrity": "sha512-PYxKHMVHOb5NJuDL53vBUl1VwUjymDcYI6rzpIni0C9+9mTiJedvUxSk7/RPp7OOAm3v+EjgMu9bIy3N6b408w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.0-rc.10", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-rc.10.tgz", + "integrity": "sha512-UkVDEFk1w3mveXeKgaTuYfKWtPbvgck1dT8TUG3bnccrH0XtLTuAyfCoks4Q/M5ZGToSVJTIQYCzy2g/atAOeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@scure/base": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.6.tgz", + "integrity": "sha512-g/nm5FgUa//MCj1gV09zTJTaM6KBAHqLN907YVQqf7zC49+DcO4B1so4ZX07Ef10Twr6nuqYEH9GEggFXA4Fmg==", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.7.0.tgz", + "integrity": "sha512-E4FFX/N3f4B80AKWp5dP6ow+flD1LQZo/w8UnLGYZO674jS6YnYeepycOOksv+vLPSpgN35wgKgy+ybfTb2SMw==", + "dependencies": { + "@noble/curves": "~1.9.0", + "@noble/hashes": "~1.8.0", + "@scure/base": "~1.2.5" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32/node_modules/@noble/curves": { + "version": "1.9.7", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.7.tgz", + "integrity": "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw==", + "dependencies": { + "@noble/hashes": "1.8.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.6.0.tgz", + "integrity": "sha512-+lF0BbLiJNwVlev4eKelw1WWLaiKXw7sSl8T6FvBlWkdX+94aGJ4o8XjUdlyhTCjd8c+B3KT3JfS8P0bLRNU6A==", + "dependencies": { + "@noble/hashes": "~1.8.0", + "@scure/base": "~1.2.5" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@sinclair/typebox": { + "version": "0.32.35", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.32.35.tgz", + "integrity": "sha512-Ul3YyOTU++to8cgNkttakC0dWvpERr6RYoHO2W47DLbFvrwBDJUY31B1sImH6JZSYc4Kt4PyHtoPNu+vL2r2dA==", + "license": "MIT" + }, + "node_modules/@standard-schema/spec": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", + "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", + "license": "MIT" + }, + "node_modules/@tybys/wasm-util": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.1.tgz", + "integrity": "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@types/bip39": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/bip39/-/bip39-3.0.4.tgz", + "integrity": "sha512-kgmgxd14vTUMqcKu/gRi7adMchm7teKnOzdkeP0oQ5QovXpbUJISU0KUtBt84DdxCws/YuNlSCIoZqgXexe6KQ==", + "deprecated": "This is a stub types definition. bip39 provides its own type definitions, so you do not need this installed.", + "dependencies": { + "bip39": "*" + } + }, + "node_modules/@types/chai": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", + "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/deep-eql": "*", + "assertion-error": "^2.0.1" + } + }, + "node_modules/@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@types/json-bigint/-/json-bigint-1.0.4.tgz", + "integrity": "sha512-ydHooXLbOmxBbubnA7Eh+RpBzuaIiQjh8WGJYQB50JFGFrdxW7JzVlyEV7fAXw0T2sqJ1ysTneJbiyNLqZRAag==", + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.19.15", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.15.tgz", + "integrity": "sha512-F0R/h2+dsy5wJAUe3tAU6oqa2qbWY5TpNfL/RGmo1y38hiyO1w3x2jPtt76wmuaJI4DQnOBu21cNXQ2STIUUWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/@vitest/expect": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.0.tgz", + "integrity": "sha512-EIxG7k4wlWweuCLG9Y5InKFwpMEOyrMb6ZJ1ihYu02LVj/bzUwn2VMU+13PinsjRW75XnITeFrQBMH5+dLvCDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@standard-schema/spec": "^1.1.0", + "@types/chai": "^5.2.2", + "@vitest/spy": "4.1.0", + "@vitest/utils": "4.1.0", + "chai": "^6.2.2", + "tinyrainbow": "^3.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/mocker": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.0.tgz", + "integrity": "sha512-evxREh+Hork43+Y4IOhTo+h5lGmVRyjqI739Rz4RlUPqwrkFFDF6EMvOOYjTx4E8Tl6gyCLRL8Mu7Ry12a13Tw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/spy": "4.1.0", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.21" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0-0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/@vitest/pretty-format": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.0.tgz", + "integrity": "sha512-3RZLZlh88Ib0J7NQTRATfc/3ZPOnSUn2uDBUoGNn5T36+bALixmzphN26OUD3LRXWkJu4H0s5vvUeqBiw+kS0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyrainbow": "^3.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.0.tgz", + "integrity": "sha512-Duvx2OzQ7d6OjchL+trw+aSrb9idh7pnNfxrklo14p3zmNL4qPCDeIJAK+eBKYjkIwG96Bc6vYuxhqDXQOWpoQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/utils": "4.1.0", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/snapshot": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.0.tgz", + "integrity": "sha512-0Vy9euT1kgsnj1CHttwi9i9o+4rRLEaPRSOJ5gyv579GJkNpgJK+B4HSv/rAWixx2wdAFci1X4CEPjiu2bXIMg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "4.1.0", + "@vitest/utils": "4.1.0", + "magic-string": "^0.30.21", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/spy": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.0.tgz", + "integrity": "sha512-pz77k+PgNpyMDv2FV6qmk5ZVau6c3R8HC8v342T2xlFxQKTrSeYw9waIJG8KgV9fFwAtTu4ceRzMivPTH6wSxw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.0.tgz", + "integrity": "sha512-XfPXT6a8TZY3dcGY8EdwsBulFCIw+BeeX0RZn2x/BtiY/75YGh8FeWGG8QISN/WhaqSrE2OrlDgtF8q5uhOTmw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "4.1.0", + "convert-source-map": "^2.0.0", + "tinyrainbow": "^3.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@zxing/text-encoding": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@zxing/text-encoding/-/text-encoding-0.9.0.tgz", + "integrity": "sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA==", + "license": "(Unlicense OR Apache-2.0)", + "optional": true + }, + "node_modules/abort-error": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/abort-error/-/abort-error-1.0.1.tgz", + "integrity": "sha512-fxqCblJiIPdSXIUrxI0PL+eJG49QdP9SQ70qtB65MVAoMr2rASlOyAbJFOylfB467F/f+5BCLJJq58RYi7mGfg==", + "license": "Apache-2.0 OR MIT" + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/b4a": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.8.0.tgz", + "integrity": "sha512-qRuSmNSkGQaHwNbM7J78Wwy+ghLEYF1zNrSeMxj4Kgw6y33O3mXcQ6Ie9fRvfU/YnxWkOchPXbaLb73TkIsfdg==", + "license": "Apache-2.0", + "peerDependencies": { + "react-native-b4a": "*" + }, + "peerDependenciesMeta": { + "react-native-b4a": { + "optional": true + } + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/bech32": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==", + "license": "MIT" + }, + "node_modules/bip39": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bip39/-/bip39-3.1.0.tgz", + "integrity": "sha512-c9kiwdk45Do5GL0vJMe7tS95VjCii65mYAH7DfWl3uW8AVzXKQVUm64i3hzVybBDMp9r7j9iNxR85+ul8MdN/A==", + "license": "ISC", + "dependencies": { + "@noble/hashes": "^1.2.0" + } + }, + "node_modules/blake2b": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/blake2b/-/blake2b-2.1.4.tgz", + "integrity": "sha512-AyBuuJNI64gIvwx13qiICz6H6hpmjvYS5DGkG6jbXMOT8Z3WUJ3V1X0FlhIoT1b/5JtHE3ki+xjtMvu1nn+t9A==", + "license": "ISC", + "dependencies": { + "blake2b-wasm": "^2.4.0", + "nanoassert": "^2.0.0" + } + }, + "node_modules/blake2b-wasm": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/blake2b-wasm/-/blake2b-wasm-2.4.0.tgz", + "integrity": "sha512-S1kwmW2ZhZFFFOghcx73+ZajEfKBqhP82JMssxtLVMxlaPea1p9uoLiUZ5WYyHn0KddwbLc+0vh4wR0KBNoT5w==", + "license": "MIT", + "dependencies": { + "b4a": "^1.0.1", + "nanoassert": "^2.0.0" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/call-bind": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.0", + "es-define-property": "^1.0.0", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/cbor-extract": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/cbor-extract/-/cbor-extract-2.2.2.tgz", + "integrity": "sha512-hlSxxI9XO2yQfe9g6msd3g4xCfDqK5T5P0fRMLuaLHhxn4ViPrm+a+MUfhrvH2W962RGxcBwEGzLQyjbDG1gng==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "node-gyp-build-optional-packages": "5.1.1" + }, + "bin": { + "download-cbor-prebuilds": "bin/download-prebuilds.js" + }, + "optionalDependencies": { + "@cbor-extract/cbor-extract-darwin-arm64": "2.2.2", + "@cbor-extract/cbor-extract-darwin-x64": "2.2.2", + "@cbor-extract/cbor-extract-linux-arm": "2.2.2", + "@cbor-extract/cbor-extract-linux-arm64": "2.2.2", + "@cbor-extract/cbor-extract-linux-x64": "2.2.2", + "@cbor-extract/cbor-extract-win32-x64": "2.2.2" + } + }, + "node_modules/cbor-x": { + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/cbor-x/-/cbor-x-1.6.4.tgz", + "integrity": "sha512-UGKHjp6RHC6QuZ2yy5LCKm7MojM4716DwoSaqwQpaH4DvZvbBTGcoDNTiG9Y2lByXZYFEs9WRkS5tLl96IrF1Q==", + "license": "MIT", + "optionalDependencies": { + "cbor-extract": "^2.2.2" + } + }, + "node_modules/chai": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz", + "integrity": "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/cipher-base": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.7.tgz", + "integrity": "sha512-Mz9QMT5fJe7bKI7MH31UilT5cEK5EHHRCccw/YRFsRY47AuNgaV6HY3rscp0/I4Q+tTW/5zoqpSeRRI54TkDWA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.4", + "safe-buffer": "^5.2.1", + "to-buffer": "^1.2.2" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "license": "MIT" + }, + "node_modules/create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "license": "MIT", + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "node_modules/create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "license": "MIT", + "dependencies": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "node_modules/cross-fetch": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.2.0.tgz", + "integrity": "sha512-Q+xVJLoGOeIMXZmbUK4HYk+69cQH6LudR0Vu/pRm2YlU/hDV9CiS0gKUMaWY5f2NeUH9C1nV3bsTlCo0FsTV1Q==", + "license": "MIT", + "dependencies": { + "node-fetch": "^2.7.0" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/dotenv": { + "version": "16.6.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz", + "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/effect": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/effect/-/effect-3.21.0.tgz", + "integrity": "sha512-PPN80qRokCd1f015IANNhrwOnLO7GrrMQfk4/lnZRE/8j7UPWrNNjPV0uBrZutI/nHzernbW+J0hdqQysHiSnQ==", + "license": "MIT", + "dependencies": { + "@standard-schema/spec": "^1.0.0", + "fast-check": "^3.23.1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-module-lexer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.0.0.tgz", + "integrity": "sha512-5POEcUuZybH7IdmGsD8wlf0AI55wMecM9rVBTI/qEAy2c1kTOm3DjFYjrBdI2K3BaJjJYfYFeRtM0t9ssnRuxw==", + "dev": true, + "license": "MIT" + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/esbuild": { + "version": "0.27.4", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.4.tgz", + "integrity": "sha512-Rq4vbHnYkK5fws5NF7MYTU68FPRE1ajX7heQ/8QXXWqNgqqJ/GkmmyxIzUnf2Sr/bakf8l54716CcMGHYhMrrQ==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.27.4", + "@esbuild/android-arm": "0.27.4", + "@esbuild/android-arm64": "0.27.4", + "@esbuild/android-x64": "0.27.4", + "@esbuild/darwin-arm64": "0.27.4", + "@esbuild/darwin-x64": "0.27.4", + "@esbuild/freebsd-arm64": "0.27.4", + "@esbuild/freebsd-x64": "0.27.4", + "@esbuild/linux-arm": "0.27.4", + "@esbuild/linux-arm64": "0.27.4", + "@esbuild/linux-ia32": "0.27.4", + "@esbuild/linux-loong64": "0.27.4", + "@esbuild/linux-mips64el": "0.27.4", + "@esbuild/linux-ppc64": "0.27.4", + "@esbuild/linux-riscv64": "0.27.4", + "@esbuild/linux-s390x": "0.27.4", + "@esbuild/linux-x64": "0.27.4", + "@esbuild/netbsd-arm64": "0.27.4", + "@esbuild/netbsd-x64": "0.27.4", + "@esbuild/openbsd-arm64": "0.27.4", + "@esbuild/openbsd-x64": "0.27.4", + "@esbuild/openharmony-arm64": "0.27.4", + "@esbuild/sunos-x64": "0.27.4", + "@esbuild/win32-arm64": "0.27.4", + "@esbuild/win32-ia32": "0.27.4", + "@esbuild/win32-x64": "0.27.4" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/eventemitter3": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.4.tgz", + "integrity": "sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==", + "license": "MIT" + }, + "node_modules/expect-type": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.3.0.tgz", + "integrity": "sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/fast-check": { + "version": "3.23.2", + "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-3.23.2.tgz", + "integrity": "sha512-h5+1OzzfCC3Ef7VbtKdcv7zsstUQwUDlYpUTvjeUsJAssPgLn7QzbboPtL5ro04Mq0rPOsMzl7q5hIbRs2wD1A==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT", + "dependencies": { + "pure-rand": "^6.1.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/fastq": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz", + "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==", + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/find-my-way-ts": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/find-my-way-ts/-/find-my-way-ts-0.1.6.tgz", + "integrity": "sha512-a85L9ZoXtNAey3Y6Z+eBWW658kO/MwR7zIafkIUPUMf3isZG0NCs2pjW2wtjxAKuJPxMAsHUIP4ZPGv0o5gyTA==", + "license": "MIT" + }, + "node_modules/for-each": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/fraction.js": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.0.1.tgz", + "integrity": "sha512-NQYzZw8MUsxSZFQo6E8tKOlmSd/BlDTNOR4puXFSHSwFwNaIlmbortQy5PDN/KnVQ4xWG2NtN0J0hjPw7eE06A==", + "license": "MIT OR GPL-2.0", + "engines": { + "node": "*" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/generator-function": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.1.tgz", + "integrity": "sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-tsconfig": { + "version": "4.13.6", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.13.6.tgz", + "integrity": "sha512-shZT/QMiSHc/YBLxxOkMtgSid5HFoauqCE3/exfsEcwg1WkeqjG+V40yBbBrsD+jW2HDXcs28xOfcbm2jI8Ddw==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hash-base": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.2.tgz", + "integrity": "sha512-Bb33KbowVTIj5s7Ked1OsqHUeCpz//tPwR+E2zJgJKo9Z5XolZ9b6bdUgjmYlwnWhoOQKoTd1TYToZGn5mAYOg==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "^2.3.8", + "safe-buffer": "^5.2.1", + "to-buffer": "^1.2.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/hashlru": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/hashlru/-/hashlru-2.3.0.tgz", + "integrity": "sha512-0cMsjjIC8I+D3M44pOQdsy0OHXGLVz6Z0beRuufhKa0KfaD2wGwAev6jILzXsd3/vpnNQJmWyZtIILqM1N+n5A==", + "license": "MIT" + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/i": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/i/-/i-0.3.7.tgz", + "integrity": "sha512-FYz4wlXgkQwIPqhzC5TdNMLSE5+GS1IIDJZY/1ZiEPCT2S3COUVZeT5OW4BmW4r5LHLQuOosSwsvnroG9GR59Q==", + "engines": { + "node": ">=0.4" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "license": "MIT", + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/is-arguments": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.2.0.tgz", + "integrity": "sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-function": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.2.tgz", + "integrity": "sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.4", + "generator-function": "^2.0.0", + "get-proto": "^1.0.1", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-regex": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", + "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "license": "MIT" + }, + "node_modules/iso-url": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/iso-url/-/iso-url-1.2.1.tgz", + "integrity": "sha512-9JPDgCN4B7QPkLtYAAOrEuAWvP9rWvR5offAr0/SeF046wIkglqH3VXgYYP6NcsKslH80UIVgmPqNe3j7tG2ng==", + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/isomorphic-ws": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", + "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==", + "license": "MIT", + "peerDependencies": { + "ws": "*" + } + }, + "node_modules/jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", + "license": "MIT" + }, + "node_modules/libsodium-sumo": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/libsodium-sumo/-/libsodium-sumo-0.8.2.tgz", + "integrity": "sha512-uMgnjphJ717jLN+jFG1HUgNrK/gOVVfaO1DGZ1Ig/fKLKLVhvaH/sM1I1v784JFvmkJDaczDpi7xSYC4Jvdo1Q==", + "license": "ISC" + }, + "node_modules/libsodium-wrappers-sumo": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/libsodium-wrappers-sumo/-/libsodium-wrappers-sumo-0.8.2.tgz", + "integrity": "sha512-wd1xAY++Kr6VMikSaa4EPRAHJmFvNlGWiiwU3Jh3GR1zRYF3/I3vy/wYsr4k3LVsNzwb9sqfEQ4LdVQ6zEebyQ==", + "license": "ISC", + "dependencies": { + "libsodium-sumo": "^0.8.0" + } + }, + "node_modules/lightningcss": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", + "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.32.0", + "lightningcss-darwin-arm64": "1.32.0", + "lightningcss-darwin-x64": "1.32.0", + "lightningcss-freebsd-x64": "1.32.0", + "lightningcss-linux-arm-gnueabihf": "1.32.0", + "lightningcss-linux-arm64-gnu": "1.32.0", + "lightningcss-linux-arm64-musl": "1.32.0", + "lightningcss-linux-x64-gnu": "1.32.0", + "lightningcss-linux-x64-musl": "1.32.0", + "lightningcss-win32-arm64-msvc": "1.32.0", + "lightningcss-win32-x64-msvc": "1.32.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz", + "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz", + "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz", + "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz", + "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz", + "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz", + "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz", + "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", + "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", + "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz", + "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", + "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lodash": { + "version": "4.17.23", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", + "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", + "license": "MIT" + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/main-event": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/main-event/-/main-event-1.0.1.tgz", + "integrity": "sha512-NWtdGrAca/69fm6DIVd8T9rtfDII4Q8NQbIbsKQq2VzS9eqOGYs8uaNQjcuaCq/d9H/o625aOTJX2Qoxzqw0Pw==", + "license": "Apache-2.0 OR MIT" + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "license": "MIT", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/mime": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", + "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/msgpackr": { + "version": "1.11.9", + "resolved": "https://registry.npmjs.org/msgpackr/-/msgpackr-1.11.9.tgz", + "integrity": "sha512-FkoAAyyA6HM8wL882EcEyFZ9s7hVADSwG9xrVx3dxxNQAtgADTrJoEWivID82Iv1zWDsv/OtbrrcZAzGzOMdNw==", + "optionalDependencies": { + "msgpackr-extract": "^3.0.2" + } + }, + "node_modules/msgpackr-extract": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/msgpackr-extract/-/msgpackr-extract-3.0.3.tgz", + "integrity": "sha512-P0efT1C9jIdVRefqjzOQ9Xml57zpOXnIuS+csaB4MdZbTdmGDLo8XhzBG1N7aO11gKDDkJvBLULeFTo46wwreA==", + "hasInstallScript": true, + "optional": true, + "dependencies": { + "node-gyp-build-optional-packages": "5.2.2" + }, + "bin": { + "download-msgpackr-prebuilds": "bin/download-prebuilds.js" + }, + "optionalDependencies": { + "@msgpackr-extract/msgpackr-extract-darwin-arm64": "3.0.3", + "@msgpackr-extract/msgpackr-extract-darwin-x64": "3.0.3", + "@msgpackr-extract/msgpackr-extract-linux-arm": "3.0.3", + "@msgpackr-extract/msgpackr-extract-linux-arm64": "3.0.3", + "@msgpackr-extract/msgpackr-extract-linux-x64": "3.0.3", + "@msgpackr-extract/msgpackr-extract-win32-x64": "3.0.3" + } + }, + "node_modules/msgpackr-extract/node_modules/node-gyp-build-optional-packages": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.2.2.tgz", + "integrity": "sha512-s+w+rBWnpTMwSFbaE0UXsRlg7hU4FjekKU4eyAih5T8nJuNZT1nNsskXpxmeqSK9UzkBl6UgRlnKc8hz8IEqOw==", + "optional": true, + "dependencies": { + "detect-libc": "^2.0.1" + }, + "bin": { + "node-gyp-build-optional-packages": "bin.js", + "node-gyp-build-optional-packages-optional": "optional.js", + "node-gyp-build-optional-packages-test": "build-test.js" + } + }, + "node_modules/multiformats": { + "version": "13.4.2", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz", + "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==", + "license": "Apache-2.0 OR MIT" + }, + "node_modules/multipasta": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/multipasta/-/multipasta-0.2.7.tgz", + "integrity": "sha512-KPA58d68KgGil15oDqXjkUBEBYc00XvbPj5/X+dyzeo/lWm9Nc25pQRlf1D+gv4OpK7NM0J1odrbu9JNNGvynA==", + "license": "MIT" + }, + "node_modules/nanoassert": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/nanoassert/-/nanoassert-2.0.0.tgz", + "integrity": "sha512-7vO7n28+aYO4J+8w96AzhmU8G+Y/xpPDJz/se19ICsqj/momRbb9mh9ZUtkoJ5X3nTnPdhEJyc0qnM6yAsHBaA==", + "license": "ISC" + }, + "node_modules/nanoid": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/node-addon-api": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", + "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==" + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-gyp-build-optional-packages": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.1.1.tgz", + "integrity": "sha512-+P72GAjVAbTxjjwUmwjVrqrdZROD4nf8KgpBoDxqXXTiYZZt/ud60dE5yvCSr9lRO8e8yv6kgJIC0K0PfZFVQw==", + "license": "MIT", + "optional": true, + "dependencies": { + "detect-libc": "^2.0.1" + }, + "bin": { + "node-gyp-build-optional-packages": "bin.js", + "node-gyp-build-optional-packages-optional": "optional.js", + "node-gyp-build-optional-packages-test": "build-test.js" + } + }, + "node_modules/npm": { + "version": "9.9.4", + "resolved": "https://registry.npmjs.org/npm/-/npm-9.9.4.tgz", + "integrity": "sha512-NzcQiLpqDuLhavdyJ2J3tGJ/ni/ebcqHVFZkv1C4/6lblraUPbPgCJ4Vhb4oa3FFhRa2Yj9gA58jGH/ztKueNQ==", + "bundleDependencies": [ + "@isaacs/string-locale-compare", + "@npmcli/arborist", + "@npmcli/config", + "@npmcli/fs", + "@npmcli/map-workspaces", + "@npmcli/package-json", + "@npmcli/promise-spawn", + "@npmcli/run-script", + "abbrev", + "archy", + "cacache", + "chalk", + "ci-info", + "cli-columns", + "cli-table3", + "columnify", + "fastest-levenshtein", + "fs-minipass", + "glob", + "graceful-fs", + "hosted-git-info", + "ini", + "init-package-json", + "is-cidr", + "json-parse-even-better-errors", + "libnpmaccess", + "libnpmdiff", + "libnpmexec", + "libnpmfund", + "libnpmhook", + "libnpmorg", + "libnpmpack", + "libnpmpublish", + "libnpmsearch", + "libnpmteam", + "libnpmversion", + "make-fetch-happen", + "minimatch", + "minipass", + "minipass-pipeline", + "ms", + "node-gyp", + "nopt", + "normalize-package-data", + "npm-audit-report", + "npm-install-checks", + "npm-package-arg", + "npm-pick-manifest", + "npm-profile", + "npm-registry-fetch", + "npm-user-validate", + "npmlog", + "p-map", + "pacote", + "parse-conflict-json", + "proc-log", + "qrcode-terminal", + "read", + "semver", + "sigstore", + "spdx-expression-parse", + "ssri", + "supports-color", + "tar", + "text-table", + "tiny-relative-date", + "treeverse", + "validate-npm-package-name", + "which", + "write-file-atomic" + ], + "license": "Artistic-2.0", + "workspaces": [ + "docs", + "smoke-tests", + "mock-globals", + "mock-registry", + "workspaces/*" + ], + "dependencies": { + "@isaacs/string-locale-compare": "^1.1.0", + "@npmcli/arborist": "^6.5.0", + "@npmcli/config": "^6.4.0", + "@npmcli/fs": "^3.1.0", + "@npmcli/map-workspaces": "^3.0.4", + "@npmcli/package-json": "^4.0.1", + "@npmcli/promise-spawn": "^6.0.2", + "@npmcli/run-script": "^6.0.2", + "abbrev": "^2.0.0", + "archy": "~1.0.0", + "cacache": "^17.1.4", + "chalk": "^5.3.0", + "ci-info": "^4.0.0", + "cli-columns": "^4.0.0", + "cli-table3": "^0.6.3", + "columnify": "^1.6.0", + "fastest-levenshtein": "^1.0.16", + "fs-minipass": "^3.0.3", + "glob": "^10.3.10", + "graceful-fs": "^4.2.11", + "hosted-git-info": "^6.1.3", + "ini": "^4.1.1", + "init-package-json": "^5.0.0", + "is-cidr": "^4.0.2", + "json-parse-even-better-errors": "^3.0.1", + "libnpmaccess": "^7.0.2", + "libnpmdiff": "^5.0.20", + "libnpmexec": "^6.0.4", + "libnpmfund": "^4.2.1", + "libnpmhook": "^9.0.3", + "libnpmorg": "^5.0.4", + "libnpmpack": "^5.0.20", + "libnpmpublish": "^7.5.1", + "libnpmsearch": "^6.0.2", + "libnpmteam": "^5.0.3", + "libnpmversion": "^4.0.2", + "make-fetch-happen": "^11.1.1", + "minimatch": "^9.0.3", + "minipass": "^7.0.4", + "minipass-pipeline": "^1.2.4", + "ms": "^2.1.2", + "node-gyp": "^9.4.1", + "nopt": "^7.2.0", + "normalize-package-data": "^5.0.0", + "npm-audit-report": "^5.0.0", + "npm-install-checks": "^6.3.0", + "npm-package-arg": "^10.1.0", + "npm-pick-manifest": "^8.0.2", + "npm-profile": "^7.0.1", + "npm-registry-fetch": "^14.0.5", + "npm-user-validate": "^2.0.0", + "npmlog": "^7.0.1", + "p-map": "^4.0.0", + "pacote": "^15.2.0", + "parse-conflict-json": "^3.0.1", + "proc-log": "^3.0.0", + "qrcode-terminal": "^0.12.0", + "read": "^2.1.0", + "semver": "^7.6.0", + "sigstore": "^1.9.0", + "spdx-expression-parse": "^3.0.1", + "ssri": "^10.0.5", + "supports-color": "^9.4.0", + "tar": "^6.2.1", + "text-table": "~0.2.0", + "tiny-relative-date": "^1.3.0", + "treeverse": "^3.0.0", + "validate-npm-package-name": "^5.0.0", + "which": "^3.0.1", + "write-file-atomic": "^5.0.1" + }, + "bin": { + "npm": "bin/npm-cli.js", + "npx": "bin/npx-cli.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@colors/colors": { + "version": "1.5.0", + "inBundle": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/npm/node_modules/@gar/promisify": { + "version": "1.1.3", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/@isaacs/cliui": { + "version": "8.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/npm/node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm/node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/npm/node_modules/@isaacs/string-locale-compare": { + "version": "1.1.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/@npmcli/arborist": { + "version": "6.5.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@isaacs/string-locale-compare": "^1.1.0", + "@npmcli/fs": "^3.1.0", + "@npmcli/installed-package-contents": "^2.0.2", + "@npmcli/map-workspaces": "^3.0.2", + "@npmcli/metavuln-calculator": "^5.0.0", + "@npmcli/name-from-folder": "^2.0.0", + "@npmcli/node-gyp": "^3.0.0", + "@npmcli/package-json": "^4.0.0", + "@npmcli/query": "^3.1.0", + "@npmcli/run-script": "^6.0.0", + "bin-links": "^4.0.1", + "cacache": "^17.0.4", + "common-ancestor-path": "^1.0.1", + "hosted-git-info": "^6.1.1", + "json-parse-even-better-errors": "^3.0.0", + "json-stringify-nice": "^1.1.4", + "minimatch": "^9.0.0", + "nopt": "^7.0.0", + "npm-install-checks": "^6.2.0", + "npm-package-arg": "^10.1.0", + "npm-pick-manifest": "^8.0.1", + "npm-registry-fetch": "^14.0.3", + "npmlog": "^7.0.1", + "pacote": "^15.0.8", + "parse-conflict-json": "^3.0.0", + "proc-log": "^3.0.0", + "promise-all-reject-late": "^1.0.0", + "promise-call-limit": "^1.0.2", + "read-package-json-fast": "^3.0.2", + "semver": "^7.3.7", + "ssri": "^10.0.1", + "treeverse": "^3.0.0", + "walk-up-path": "^3.0.1" + }, + "bin": { + "arborist": "bin/index.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/config": { + "version": "6.4.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/map-workspaces": "^3.0.2", + "ci-info": "^4.0.0", + "ini": "^4.1.0", + "nopt": "^7.0.0", + "proc-log": "^3.0.0", + "read-package-json-fast": "^3.0.2", + "semver": "^7.3.5", + "walk-up-path": "^3.0.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/disparity-colors": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "ansi-styles": "^4.3.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/fs": { + "version": "3.1.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/git": { + "version": "4.1.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/promise-spawn": "^6.0.0", + "lru-cache": "^7.4.4", + "npm-pick-manifest": "^8.0.0", + "proc-log": "^3.0.0", + "promise-inflight": "^1.0.1", + "promise-retry": "^2.0.1", + "semver": "^7.3.5", + "which": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/installed-package-contents": { + "version": "2.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-bundled": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" + }, + "bin": { + "installed-package-contents": "lib/index.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/map-workspaces": { + "version": "3.0.4", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/name-from-folder": "^2.0.0", + "glob": "^10.2.2", + "minimatch": "^9.0.0", + "read-package-json-fast": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/metavuln-calculator": { + "version": "5.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "cacache": "^17.0.0", + "json-parse-even-better-errors": "^3.0.0", + "pacote": "^15.0.0", + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/move-file": { + "version": "2.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/name-from-folder": { + "version": "2.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/node-gyp": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/package-json": { + "version": "4.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/git": "^4.1.0", + "glob": "^10.2.2", + "hosted-git-info": "^6.1.1", + "json-parse-even-better-errors": "^3.0.0", + "normalize-package-data": "^5.0.0", + "proc-log": "^3.0.0", + "semver": "^7.5.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/promise-spawn": { + "version": "6.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "which": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/query": { + "version": "3.1.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "postcss-selector-parser": "^6.0.10" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@npmcli/run-script": { + "version": "6.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/node-gyp": "^3.0.0", + "@npmcli/promise-spawn": "^6.0.0", + "node-gyp": "^9.0.0", + "read-package-json-fast": "^3.0.0", + "which": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "inBundle": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/npm/node_modules/@sigstore/bundle": { + "version": "1.1.0", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@sigstore/protobuf-specs": "^0.2.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@sigstore/protobuf-specs": { + "version": "0.2.1", + "inBundle": true, + "license": "Apache-2.0", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@sigstore/sign": { + "version": "1.0.0", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@sigstore/bundle": "^1.1.0", + "@sigstore/protobuf-specs": "^0.2.0", + "make-fetch-happen": "^11.0.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@sigstore/tuf": { + "version": "1.0.3", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@sigstore/protobuf-specs": "^0.2.0", + "tuf-js": "^1.1.7" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@tootallnate/once": { + "version": "2.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, + "node_modules/npm/node_modules/@tufjs/canonical-json": { + "version": "1.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/@tufjs/models": { + "version": "1.0.4", + "inBundle": true, + "license": "MIT", + "dependencies": { + "@tufjs/canonical-json": "1.0.0", + "minimatch": "^9.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/abbrev": { + "version": "2.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/agent-base": { + "version": "6.0.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/npm/node_modules/agentkeepalive": { + "version": "4.5.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "humanize-ms": "^1.2.1" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/npm/node_modules/aggregate-error": { + "version": "3.1.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/ansi-regex": { + "version": "5.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/ansi-styles": { + "version": "4.3.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/npm/node_modules/aproba": { + "version": "2.0.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/archy": { + "version": "1.0.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/are-we-there-yet": { + "version": "4.0.2", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/balanced-match": { + "version": "1.0.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/bin-links": { + "version": "4.0.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "cmd-shim": "^6.0.0", + "npm-normalize-package-bin": "^3.0.0", + "read-cmd-shim": "^4.0.0", + "write-file-atomic": "^5.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/binary-extensions": { + "version": "2.2.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/brace-expansion": { + "version": "2.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/npm/node_modules/builtins": { + "version": "5.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "semver": "^7.0.0" + } + }, + "node_modules/npm/node_modules/cacache": { + "version": "17.1.4", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^3.0.0", + "glob": "^10.2.2", + "lru-cache": "^7.7.1", + "minipass": "^7.0.3", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^4.0.0", + "ssri": "^10.0.0", + "tar": "^6.1.11", + "unique-filename": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/chalk": { + "version": "5.3.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/npm/node_modules/chownr": { + "version": "2.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/ci-info": { + "version": "4.0.0", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/cidr-regex": { + "version": "3.1.1", + "inBundle": true, + "license": "BSD-2-Clause", + "dependencies": { + "ip-regex": "^4.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/clean-stack": { + "version": "2.2.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/npm/node_modules/cli-columns": { + "version": "4.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/npm/node_modules/cli-table3": { + "version": "0.6.3", + "inBundle": true, + "license": "MIT", + "dependencies": { + "string-width": "^4.2.0" + }, + "engines": { + "node": "10.* || >= 12.*" + }, + "optionalDependencies": { + "@colors/colors": "1.5.0" + } + }, + "node_modules/npm/node_modules/clone": { + "version": "1.0.4", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/npm/node_modules/cmd-shim": { + "version": "6.0.2", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/color-convert": { + "version": "2.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/npm/node_modules/color-name": { + "version": "1.1.4", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/color-support": { + "version": "1.1.3", + "inBundle": true, + "license": "ISC", + "bin": { + "color-support": "bin.js" + } + }, + "node_modules/npm/node_modules/columnify": { + "version": "1.6.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "strip-ansi": "^6.0.1", + "wcwidth": "^1.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/npm/node_modules/common-ancestor-path": { + "version": "1.0.1", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/concat-map": { + "version": "0.0.1", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/console-control-strings": { + "version": "1.1.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/cross-spawn": { + "version": "7.0.6", + "inBundle": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/npm/node_modules/cross-spawn/node_modules/which": { + "version": "2.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/npm/node_modules/cssesc": { + "version": "3.0.0", + "inBundle": true, + "license": "MIT", + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm/node_modules/debug": { + "version": "4.3.7", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/npm/node_modules/defaults": { + "version": "1.0.4", + "inBundle": true, + "license": "MIT", + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm/node_modules/delegates": { + "version": "1.0.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/diff": { + "version": "5.2.0", + "inBundle": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/npm/node_modules/eastasianwidth": { + "version": "0.2.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/emoji-regex": { + "version": "8.0.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/encoding": { + "version": "0.1.13", + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "iconv-lite": "^0.6.2" + } + }, + "node_modules/npm/node_modules/env-paths": { + "version": "2.2.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/npm/node_modules/err-code": { + "version": "2.0.3", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/exponential-backoff": { + "version": "3.1.1", + "inBundle": true, + "license": "Apache-2.0" + }, + "node_modules/npm/node_modules/fastest-levenshtein": { + "version": "1.0.16", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 4.9.1" + } + }, + "node_modules/npm/node_modules/foreground-child": { + "version": "3.1.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/fs-minipass": { + "version": "3.0.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/fs.realpath": { + "version": "1.0.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/function-bind": { + "version": "1.1.2", + "inBundle": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/npm/node_modules/gauge": { + "version": "5.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", + "has-unicode": "^2.0.1", + "signal-exit": "^4.0.1", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/glob": { + "version": "10.3.10", + "inBundle": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.5", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/graceful-fs": { + "version": "4.2.11", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/has-unicode": { + "version": "2.0.1", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/hasown": { + "version": "2.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/npm/node_modules/hosted-git-info": { + "version": "6.1.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^7.5.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/http-cache-semantics": { + "version": "4.1.1", + "inBundle": true, + "license": "BSD-2-Clause" + }, + "node_modules/npm/node_modules/http-proxy-agent": { + "version": "5.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/npm/node_modules/https-proxy-agent": { + "version": "5.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/npm/node_modules/humanize-ms": { + "version": "1.2.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ms": "^2.0.0" + } + }, + "node_modules/npm/node_modules/iconv-lite": { + "version": "0.6.3", + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm/node_modules/ignore-walk": { + "version": "6.0.4", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minimatch": "^9.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/imurmurhash": { + "version": "0.1.4", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/npm/node_modules/indent-string": { + "version": "4.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/infer-owner": { + "version": "1.0.4", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/inflight": { + "version": "1.0.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/npm/node_modules/inherits": { + "version": "2.0.4", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/ini": { + "version": "4.1.1", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/init-package-json": { + "version": "5.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-package-arg": "^10.0.0", + "promzard": "^1.0.0", + "read": "^2.0.0", + "read-package-json": "^6.0.0", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4", + "validate-npm-package-name": "^5.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/ip-address": { + "version": "9.0.5", + "inBundle": true, + "license": "MIT", + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/npm/node_modules/ip-address/node_modules/sprintf-js": { + "version": "1.1.3", + "inBundle": true, + "license": "BSD-3-Clause" + }, + "node_modules/npm/node_modules/ip-regex": { + "version": "4.3.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/is-cidr": { + "version": "4.0.2", + "inBundle": true, + "license": "BSD-2-Clause", + "dependencies": { + "cidr-regex": "^3.1.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/is-core-module": { + "version": "2.13.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/npm/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/is-lambda": { + "version": "1.0.1", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/isexe": { + "version": "2.0.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/jackspeak": { + "version": "2.3.6", + "inBundle": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/npm/node_modules/jsbn": { + "version": "1.1.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/json-parse-even-better-errors": { + "version": "3.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/json-stringify-nice": { + "version": "1.1.4", + "inBundle": true, + "license": "ISC", + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/jsonparse": { + "version": "1.3.1", + "engines": [ + "node >= 0.2.0" + ], + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/just-diff": { + "version": "6.0.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/just-diff-apply": { + "version": "5.5.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/libnpmaccess": { + "version": "7.0.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-package-arg": "^10.1.0", + "npm-registry-fetch": "^14.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmdiff": { + "version": "5.0.21", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/arborist": "^6.5.0", + "@npmcli/disparity-colors": "^3.0.0", + "@npmcli/installed-package-contents": "^2.0.2", + "binary-extensions": "^2.2.0", + "diff": "^5.1.0", + "minimatch": "^9.0.0", + "npm-package-arg": "^10.1.0", + "pacote": "^15.0.8", + "tar": "^6.1.13" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmexec": { + "version": "6.0.5", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/arborist": "^6.5.0", + "@npmcli/run-script": "^6.0.0", + "ci-info": "^4.0.0", + "npm-package-arg": "^10.1.0", + "npmlog": "^7.0.1", + "pacote": "^15.0.8", + "proc-log": "^3.0.0", + "read": "^2.0.0", + "read-package-json-fast": "^3.0.2", + "semver": "^7.3.7", + "walk-up-path": "^3.0.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmfund": { + "version": "4.2.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/arborist": "^6.5.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmhook": { + "version": "9.0.4", + "inBundle": true, + "license": "ISC", + "dependencies": { + "aproba": "^2.0.0", + "npm-registry-fetch": "^14.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmorg": { + "version": "5.0.5", + "inBundle": true, + "license": "ISC", + "dependencies": { + "aproba": "^2.0.0", + "npm-registry-fetch": "^14.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmpack": { + "version": "5.0.21", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/arborist": "^6.5.0", + "@npmcli/run-script": "^6.0.0", + "npm-package-arg": "^10.1.0", + "pacote": "^15.0.8" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmpublish": { + "version": "7.5.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "ci-info": "^4.0.0", + "normalize-package-data": "^5.0.0", + "npm-package-arg": "^10.1.0", + "npm-registry-fetch": "^14.0.3", + "proc-log": "^3.0.0", + "semver": "^7.3.7", + "sigstore": "^1.4.0", + "ssri": "^10.0.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmsearch": { + "version": "6.0.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-registry-fetch": "^14.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmteam": { + "version": "5.0.4", + "inBundle": true, + "license": "ISC", + "dependencies": { + "aproba": "^2.0.0", + "npm-registry-fetch": "^14.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/libnpmversion": { + "version": "4.0.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/git": "^4.0.1", + "@npmcli/run-script": "^6.0.0", + "json-parse-even-better-errors": "^3.0.0", + "proc-log": "^3.0.0", + "semver": "^7.3.7" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/lru-cache": { + "version": "7.18.3", + "inBundle": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/npm/node_modules/make-fetch-happen": { + "version": "11.1.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "agentkeepalive": "^4.2.1", + "cacache": "^17.0.0", + "http-cache-semantics": "^4.1.1", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^5.0.0", + "minipass-fetch": "^3.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^10.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/make-fetch-happen/node_modules/minipass": { + "version": "5.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minimatch": { + "version": "9.0.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/minipass": { + "version": "7.0.4", + "inBundle": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/npm/node_modules/minipass-collect": { + "version": "1.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/npm/node_modules/minipass-collect/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minipass-fetch": { + "version": "3.0.4", + "inBundle": true, + "license": "MIT", + "dependencies": { + "minipass": "^7.0.3", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/npm/node_modules/minipass-flush": { + "version": "1.0.5", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/npm/node_modules/minipass-flush/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minipass-json-stream": { + "version": "1.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "jsonparse": "^1.3.1", + "minipass": "^3.0.0" + } + }, + "node_modules/npm/node_modules/minipass-json-stream/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minipass-pipeline": { + "version": "1.2.4", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minipass-pipeline/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minipass-sized": { + "version": "1.0.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minipass-sized/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/minizlib": { + "version": "2.1.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/npm/node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/mkdirp": { + "version": "1.0.4", + "inBundle": true, + "license": "MIT", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/ms": { + "version": "2.1.3", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/mute-stream": { + "version": "1.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/negotiator": { + "version": "0.6.3", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/npm/node_modules/node-gyp": { + "version": "9.4.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "env-paths": "^2.2.0", + "exponential-backoff": "^3.1.1", + "glob": "^7.1.4", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^10.0.3", + "nopt": "^6.0.0", + "npmlog": "^6.0.0", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.2", + "which": "^2.0.2" + }, + "bin": { + "node-gyp": "bin/node-gyp.js" + }, + "engines": { + "node": "^12.13 || ^14.13 || >=16" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/@npmcli/fs": { + "version": "2.1.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@gar/promisify": "^1.1.3", + "semver": "^7.3.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/abbrev": { + "version": "1.1.1", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/node-gyp/node_modules/are-we-there-yet": { + "version": "3.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/brace-expansion": { + "version": "1.1.11", + "inBundle": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/cacache": { + "version": "16.1.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/fs": "^2.1.0", + "@npmcli/move-file": "^2.0.0", + "chownr": "^2.0.0", + "fs-minipass": "^2.1.0", + "glob": "^8.0.1", + "infer-owner": "^1.0.4", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "mkdirp": "^1.0.4", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^9.0.0", + "tar": "^6.1.11", + "unique-filename": "^2.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/cacache/node_modules/brace-expansion": { + "version": "2.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/cacache/node_modules/glob": { + "version": "8.1.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/cacache/node_modules/minimatch": { + "version": "5.1.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/fs-minipass": { + "version": "2.1.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/gauge": { + "version": "4.0.4", + "inBundle": true, + "license": "ISC", + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", + "has-unicode": "^2.0.1", + "signal-exit": "^3.0.7", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/glob": { + "version": "7.2.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/make-fetch-happen": { + "version": "10.2.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "agentkeepalive": "^4.2.1", + "cacache": "^16.1.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^2.0.3", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^9.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/minimatch": { + "version": "3.1.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/minipass-fetch": { + "version": "2.1.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "minipass": "^3.1.6", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/nopt": { + "version": "6.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "abbrev": "^1.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/npmlog": { + "version": "6.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "are-we-there-yet": "^3.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^4.0.3", + "set-blocking": "^2.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/signal-exit": { + "version": "3.0.7", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/node-gyp/node_modules/ssri": { + "version": "9.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.1.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/unique-filename": { + "version": "2.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "unique-slug": "^3.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/unique-slug": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/which": { + "version": "2.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/npm/node_modules/nopt": { + "version": "7.2.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "abbrev": "^2.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/normalize-package-data": { + "version": "5.0.0", + "inBundle": true, + "license": "BSD-2-Clause", + "dependencies": { + "hosted-git-info": "^6.0.0", + "is-core-module": "^2.8.1", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-audit-report": { + "version": "5.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-bundled": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-normalize-package-bin": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-install-checks": { + "version": "6.3.0", + "inBundle": true, + "license": "BSD-2-Clause", + "dependencies": { + "semver": "^7.1.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-normalize-package-bin": { + "version": "3.0.1", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-package-arg": { + "version": "10.1.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "hosted-git-info": "^6.0.0", + "proc-log": "^3.0.0", + "semver": "^7.3.5", + "validate-npm-package-name": "^5.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-packlist": { + "version": "7.0.4", + "inBundle": true, + "license": "ISC", + "dependencies": { + "ignore-walk": "^6.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-pick-manifest": { + "version": "8.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-install-checks": "^6.0.0", + "npm-normalize-package-bin": "^3.0.0", + "npm-package-arg": "^10.0.0", + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-profile": { + "version": "7.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "npm-registry-fetch": "^14.0.0", + "proc-log": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-registry-fetch": { + "version": "14.0.5", + "inBundle": true, + "license": "ISC", + "dependencies": { + "make-fetch-happen": "^11.0.0", + "minipass": "^5.0.0", + "minipass-fetch": "^3.0.0", + "minipass-json-stream": "^1.0.1", + "minizlib": "^2.1.2", + "npm-package-arg": "^10.0.0", + "proc-log": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npm-registry-fetch/node_modules/minipass": { + "version": "5.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/npm-user-validate": { + "version": "2.0.0", + "inBundle": true, + "license": "BSD-2-Clause", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/npmlog": { + "version": "7.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "are-we-there-yet": "^4.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^5.0.0", + "set-blocking": "^2.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/once": { + "version": "1.4.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/npm/node_modules/p-map": { + "version": "4.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm/node_modules/pacote": { + "version": "15.2.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/git": "^4.0.0", + "@npmcli/installed-package-contents": "^2.0.1", + "@npmcli/promise-spawn": "^6.0.1", + "@npmcli/run-script": "^6.0.0", + "cacache": "^17.0.0", + "fs-minipass": "^3.0.0", + "minipass": "^5.0.0", + "npm-package-arg": "^10.0.0", + "npm-packlist": "^7.0.0", + "npm-pick-manifest": "^8.0.0", + "npm-registry-fetch": "^14.0.0", + "proc-log": "^3.0.0", + "promise-retry": "^2.0.1", + "read-package-json": "^6.0.0", + "read-package-json-fast": "^3.0.0", + "sigstore": "^1.3.0", + "ssri": "^10.0.0", + "tar": "^6.1.11" + }, + "bin": { + "pacote": "lib/bin.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/pacote/node_modules/minipass": { + "version": "5.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/parse-conflict-json": { + "version": "3.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "json-parse-even-better-errors": "^3.0.0", + "just-diff": "^6.0.0", + "just-diff-apply": "^5.2.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/path-is-absolute": { + "version": "1.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm/node_modules/path-key": { + "version": "3.1.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/path-scurry": { + "version": "1.10.1", + "inBundle": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^9.1.1 || ^10.0.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.2.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/npm/node_modules/postcss-selector-parser": { + "version": "6.0.15", + "inBundle": true, + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm/node_modules/proc-log": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/promise-all-reject-late": { + "version": "1.0.1", + "inBundle": true, + "license": "ISC", + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/promise-call-limit": { + "version": "1.0.2", + "inBundle": true, + "license": "ISC", + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/promise-inflight": { + "version": "1.0.1", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/promise-retry": { + "version": "2.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/promzard": { + "version": "1.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "read": "^2.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/qrcode-terminal": { + "version": "0.12.0", + "inBundle": true, + "bin": { + "qrcode-terminal": "bin/qrcode-terminal.js" + } + }, + "node_modules/npm/node_modules/read": { + "version": "2.1.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "mute-stream": "~1.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/read-cmd-shim": { + "version": "4.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/read-package-json": { + "version": "6.0.4", + "inBundle": true, + "license": "ISC", + "dependencies": { + "glob": "^10.2.2", + "json-parse-even-better-errors": "^3.0.0", + "normalize-package-data": "^5.0.0", + "npm-normalize-package-bin": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/read-package-json-fast": { + "version": "3.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "json-parse-even-better-errors": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/readable-stream": { + "version": "3.6.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/npm/node_modules/retry": { + "version": "0.12.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/npm/node_modules/rimraf": { + "version": "3.0.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/rimraf/node_modules/brace-expansion": { + "version": "1.1.11", + "inBundle": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/npm/node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "inBundle": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/rimraf/node_modules/minimatch": { + "version": "3.1.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/npm/node_modules/safe-buffer": { + "version": "5.2.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/safer-buffer": { + "version": "2.1.2", + "inBundle": true, + "license": "MIT", + "optional": true + }, + "node_modules/npm/node_modules/semver": { + "version": "7.6.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/semver/node_modules/lru-cache": { + "version": "6.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/set-blocking": { + "version": "2.0.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/shebang-command": { + "version": "2.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/shebang-regex": { + "version": "3.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/signal-exit": { + "version": "4.1.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/sigstore": { + "version": "1.9.0", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@sigstore/bundle": "^1.1.0", + "@sigstore/protobuf-specs": "^0.2.0", + "@sigstore/sign": "^1.0.0", + "@sigstore/tuf": "^1.0.3", + "make-fetch-happen": "^11.0.1" + }, + "bin": { + "sigstore": "bin/sigstore.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/smart-buffer": { + "version": "4.2.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/npm/node_modules/socks": { + "version": "2.8.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ip-address": "^9.0.5", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/npm/node_modules/socks-proxy-agent": { + "version": "7.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/npm/node_modules/spdx-correct": { + "version": "3.2.0", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/npm/node_modules/spdx-exceptions": { + "version": "2.5.0", + "inBundle": true, + "license": "CC-BY-3.0" + }, + "node_modules/npm/node_modules/spdx-expression-parse": { + "version": "3.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/npm/node_modules/spdx-license-ids": { + "version": "3.0.17", + "inBundle": true, + "license": "CC0-1.0" + }, + "node_modules/npm/node_modules/ssri": { + "version": "10.0.5", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/string_decoder": { + "version": "1.3.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/npm/node_modules/string-width": { + "version": "4.2.3", + "inBundle": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "inBundle": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/strip-ansi": { + "version": "6.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/supports-color": { + "version": "9.4.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/npm/node_modules/tar": { + "version": "6.2.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm/node_modules/tar/node_modules/fs-minipass": { + "version": "2.1.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/npm/node_modules/tar/node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/tar/node_modules/minipass": { + "version": "5.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": ">=8" + } + }, + "node_modules/npm/node_modules/text-table": { + "version": "0.2.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/tiny-relative-date": { + "version": "1.3.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/treeverse": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/tuf-js": { + "version": "1.1.7", + "inBundle": true, + "license": "MIT", + "dependencies": { + "@tufjs/models": "1.0.4", + "debug": "^4.3.4", + "make-fetch-happen": "^11.1.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/unique-filename": { + "version": "3.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "unique-slug": "^4.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/unique-slug": { + "version": "4.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/util-deprecate": { + "version": "1.0.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/validate-npm-package-license": { + "version": "3.0.4", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/npm/node_modules/validate-npm-package-name": { + "version": "5.0.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "builtins": "^5.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/walk-up-path": { + "version": "3.0.1", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/wcwidth": { + "version": "1.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/npm/node_modules/which": { + "version": "3.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/wide-align": { + "version": "1.1.5", + "inBundle": true, + "license": "ISC", + "dependencies": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, + "node_modules/npm/node_modules/wrap-ansi": { + "version": "8.1.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/npm/node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/npm/node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "6.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/npm/node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/npm/node_modules/wrap-ansi/node_modules/emoji-regex": { + "version": "9.2.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/npm/node_modules/wrap-ansi/node_modules/string-width": { + "version": "5.1.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm/node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "7.1.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/npm/node_modules/wrappy": { + "version": "1.0.2", + "inBundle": true, + "license": "ISC" + }, + "node_modules/npm/node_modules/write-file-atomic": { + "version": "5.0.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/yallist": { + "version": "4.0.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/obug": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.1.tgz", + "integrity": "sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==", + "dev": true, + "funding": [ + "https://github.com/sponsors/sxzz", + "https://opencollective.com/debug" + ], + "license": "MIT" + }, + "node_modules/p-queue": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-9.1.0.tgz", + "integrity": "sha512-O/ZPaXuQV29uSLbxWBGGZO1mCQXV2BLIwUr59JUU9SoH76mnYvtms7aafH/isNSNGwuEfP6W/4xD0/TJXxrizw==", + "license": "MIT", + "dependencies": { + "eventemitter3": "^5.0.1", + "p-timeout": "^7.0.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-timeout": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-7.0.1.tgz", + "integrity": "sha512-AxTM2wDGORHGEkPCt8yqxOTMgpfbEHqF51f/5fJCmwFC3C/zNcGT63SymH2ttOAaiIws2zVg4+izQCjrakcwHg==", + "license": "MIT", + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, + "node_modules/pbkdf2": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.5.tgz", + "integrity": "sha512-Q3CG/cYvCO1ye4QKkuH7EXxs3VC/rI1/trd+qX2+PolbaKG0H+bgcZzrTt96mMyRtejk+JMCiLUn3y29W8qmFQ==", + "license": "MIT", + "dependencies": { + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "ripemd160": "^2.0.3", + "safe-buffer": "^5.2.1", + "sha.js": "^2.4.12", + "to-buffer": "^1.2.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/possible-typed-array-names": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", + "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/postcss": { + "version": "8.5.8", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.8.tgz", + "integrity": "sha512-OW/rX8O/jXnm82Ey1k44pObPtdblfiuWnrd8X7GJ7emImCOstunGbXUpp7HdBrFQX6rJzn3sPT397Wp5aCwCHg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "license": "MIT" + }, + "node_modules/progress-events": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/progress-events/-/progress-events-1.0.1.tgz", + "integrity": "sha512-MOzLIwhpt64KIVN64h1MwdKWiyKFNc/S6BoYKPIVUHFg0/eIEyBulhWCgn678v/4c0ri3FdGuzXymNCv02MUIw==", + "license": "Apache-2.0 OR MIT" + }, + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT" + }, + "node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readable-stream/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/ripemd160": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.3.tgz", + "integrity": "sha512-5Di9UC0+8h1L6ZD2d7awM7E/T4uA1fJRlx6zk/NvdCCVEoAnFqvHmCuNeIKoCeIixBX/q8uM+6ycDvF8woqosA==", + "license": "MIT", + "dependencies": { + "hash-base": "^3.1.2", + "inherits": "^2.0.4" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/rolldown": { + "version": "1.0.0-rc.10", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.0-rc.10.tgz", + "integrity": "sha512-q7j6vvarRFmKpgJUT8HCAUljkgzEp4LAhPlJUvQhA5LA1SUL36s5QCysMutErzL3EbNOZOkoziSx9iZC4FddKA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@oxc-project/types": "=0.120.0", + "@rolldown/pluginutils": "1.0.0-rc.10" + }, + "bin": { + "rolldown": "bin/cli.mjs" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "optionalDependencies": { + "@rolldown/binding-android-arm64": "1.0.0-rc.10", + "@rolldown/binding-darwin-arm64": "1.0.0-rc.10", + "@rolldown/binding-darwin-x64": "1.0.0-rc.10", + "@rolldown/binding-freebsd-x64": "1.0.0-rc.10", + "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-rc.10", + "@rolldown/binding-linux-arm64-gnu": "1.0.0-rc.10", + "@rolldown/binding-linux-arm64-musl": "1.0.0-rc.10", + "@rolldown/binding-linux-ppc64-gnu": "1.0.0-rc.10", + "@rolldown/binding-linux-s390x-gnu": "1.0.0-rc.10", + "@rolldown/binding-linux-x64-gnu": "1.0.0-rc.10", + "@rolldown/binding-linux-x64-musl": "1.0.0-rc.10", + "@rolldown/binding-openharmony-arm64": "1.0.0-rc.10", + "@rolldown/binding-wasm32-wasi": "1.0.0-rc.10", + "@rolldown/binding-win32-arm64-msvc": "1.0.0-rc.10", + "@rolldown/binding-win32-x64-msvc": "1.0.0-rc.10" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safe-regex-test": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", + "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-regex": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/serialize-error": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-8.1.0.tgz", + "integrity": "sha512-3NnuWfM6vBYoy5gZFvHiYsVbafvI9vZv/+jlIigFn4oP4zjNPK3LhcY0xSCgeb1a5L8jO71Mit9LlNoi2UfDDQ==", + "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/serialize-error/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/sha.js": { + "version": "2.4.12", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.12.tgz", + "integrity": "sha512-8LzC5+bvI45BjpfXU8V5fdU2mfeKiQe1D1gIMn7XUlF3OTUrpdJpPPH4EMAnF0DsHHdSZqCdSss5qCmJKuiO3w==", + "license": "(MIT AND BSD-3-Clause)", + "dependencies": { + "inherits": "^2.0.4", + "safe-buffer": "^5.2.1", + "to-buffer": "^1.2.0" + }, + "bin": { + "sha.js": "bin.js" + }, + "engines": { + "node": ">= 0.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true, + "license": "ISC" + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", + "license": "BSD-3-Clause" + }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true, + "license": "MIT" + }, + "node_modules/std-env": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.0.0.tgz", + "integrity": "sha512-zUMPtQ/HBY3/50VbpkupYHbRroTRZJPRLvreamgErJVys0ceuzMkD44J/QjqhHjOzK42GQ3QZIeFG1OYfOtKqQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string_decoder/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyexec": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.4.tgz", + "integrity": "sha512-u9r3uZC0bdpGOXtlxUIdwf9pkmvhqJdrVCH9fapQtgy/OeTTMZ1nqH7agtvEfmGui6e1XxjcdrlxvxJvc3sMqw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyrainbow": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.1.0.tgz", + "integrity": "sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/to-buffer": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.2.tgz", + "integrity": "sha512-db0E3UJjcFhpDhAF4tLo03oli3pwl3dbnzXOUIlRKrp+ldk/VUxzpWYZENsw2SZiuBjHAk7DfB0VU7NKdpb6sw==", + "license": "MIT", + "dependencies": { + "isarray": "^2.0.5", + "safe-buffer": "^5.2.1", + "typed-array-buffer": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/to-buffer/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "license": "MIT" + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "license": "MIT" + }, + "node_modules/ts-custom-error": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/ts-custom-error/-/ts-custom-error-3.3.1.tgz", + "integrity": "sha512-5OX1tzOjxWEgsr/YEUWSuPrQ00deKLh6D7OTWcvNHm12/7QPyRh8SYpyWvA4IZv8H/+GQWQEh/kwo95Q9OVW1A==", + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/ts-log": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/ts-log/-/ts-log-2.2.7.tgz", + "integrity": "sha512-320x5Ggei84AxzlXp91QkIGSw5wgaLT6GeAH0KsqDmRZdVWW2OiSeVvElVoatk3f7nicwXlElXsoFkARiGE2yg==", + "license": "MIT" + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD", + "optional": true + }, + "node_modules/tsx": { + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.21.0.tgz", + "integrity": "sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "~0.27.0", + "get-tsconfig": "^4.7.5" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/type-fest": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", + "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typed-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/uint8-varint": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/uint8-varint/-/uint8-varint-2.0.4.tgz", + "integrity": "sha512-FwpTa7ZGA/f/EssWAb5/YV6pHgVF1fViKdW8cWaEarjB8t7NyofSWBdOTyFPaGuUG4gx3v1O3PQ8etsiOs3lcw==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "uint8arraylist": "^2.0.0", + "uint8arrays": "^5.0.0" + } + }, + "node_modules/uint8arraylist": { + "version": "2.4.8", + "resolved": "https://registry.npmjs.org/uint8arraylist/-/uint8arraylist-2.4.8.tgz", + "integrity": "sha512-vc1PlGOzglLF0eae1M8mLRTBivsvrGsdmJ5RbK3e+QRvRLOZfZhQROTwH/OfyF3+ZVUg9/8hE8bmKP2CvP9quQ==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "uint8arrays": "^5.0.1" + } + }, + "node_modules/uint8arrays": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz", + "integrity": "sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "multiformats": "^13.0.0" + } + }, + "node_modules/undici": { + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.24.5.tgz", + "integrity": "sha512-3IWdCpjgxp15CbJnsi/Y9TCDE7HWVN19j1hmzVhoAkY/+CJx449tVxT5wZc1Gwg8J+P0LWvzlBzxYRnHJ+1i7Q==", + "engines": { + "node": ">=20.18.1" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/utf8-codec": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/utf8-codec/-/utf8-codec-1.0.0.tgz", + "integrity": "sha512-S/QSLezp3qvG4ld5PUfXiH7mCFxLKjSVZRFkB3DOjgwHuJPFDkInAXc/anf7BAbHt/D38ozDzL+QMZ6/7gsI6w==", + "license": "MIT" + }, + "node_modules/util": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", + "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "which-typed-array": "^1.1.2" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + }, + "node_modules/uuid": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz", + "integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "peer": true, + "bin": { + "uuid": "dist/esm/bin/uuid" + } + }, + "node_modules/vite": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.0.1.tgz", + "integrity": "sha512-wt+Z2qIhfFt85uiyRt5LPU4oVEJBXj8hZNWKeqFG4gRG/0RaRGJ7njQCwzFVjO+v4+Ipmf5CY7VdmZRAYYBPHw==", + "dev": true, + "license": "MIT", + "dependencies": { + "lightningcss": "^1.32.0", + "picomatch": "^4.0.3", + "postcss": "^8.5.8", + "rolldown": "1.0.0-rc.10", + "tinyglobby": "^0.2.15" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "@vitejs/devtools": "^0.1.0", + "esbuild": "^0.27.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "@vitejs/devtools": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vitest": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.0.tgz", + "integrity": "sha512-YbDrMF9jM2Lqc++2530UourxZHmkKLxrs4+mYhEwqWS97WJ7wOYEkcr+QfRgJ3PW9wz3odRijLZjHEaRLTNbqw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/expect": "4.1.0", + "@vitest/mocker": "4.1.0", + "@vitest/pretty-format": "4.1.0", + "@vitest/runner": "4.1.0", + "@vitest/snapshot": "4.1.0", + "@vitest/spy": "4.1.0", + "@vitest/utils": "4.1.0", + "es-module-lexer": "^2.0.0", + "expect-type": "^1.3.0", + "magic-string": "^0.30.21", + "obug": "^2.1.1", + "pathe": "^2.0.3", + "picomatch": "^4.0.3", + "std-env": "^4.0.0-rc.1", + "tinybench": "^2.9.0", + "tinyexec": "^1.0.2", + "tinyglobby": "^0.2.15", + "tinyrainbow": "^3.0.3", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0-0", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^20.0.0 || ^22.0.0 || >=24.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@opentelemetry/api": "^1.9.0", + "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", + "@vitest/browser-playwright": "4.1.0", + "@vitest/browser-preview": "4.1.0", + "@vitest/browser-webdriverio": "4.1.0", + "@vitest/ui": "4.1.0", + "happy-dom": "*", + "jsdom": "*", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0-0" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@opentelemetry/api": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser-playwright": { + "optional": true + }, + "@vitest/browser-preview": { + "optional": true + }, + "@vitest/browser-webdriverio": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + }, + "vite": { + "optional": false + } + } + }, + "node_modules/web-encoding": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/web-encoding/-/web-encoding-1.1.5.tgz", + "integrity": "sha512-HYLeVCdJ0+lBYV2FvNZmv3HJ2Nt0QYXqZojk3d9FJOLkwnuhzM9tmamh8d7HPM8QqjKH8DeHkFTx+CFlWpZZDA==", + "license": "MIT", + "dependencies": { + "util": "^0.12.3" + }, + "optionalDependencies": { + "@zxing/text-encoding": "0.9.0" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.20", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.20.tgz", + "integrity": "sha512-LYfpUkmqwl0h9A2HL09Mms427Q1RZWuOHsukfVcKRq9q95iQxdw0ix1JQrqbcDR9PH1QDwf5Qo8OZb5lksZ8Xg==", + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "for-each": "^0.3.5", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/ws": { + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", + "license": "MIT", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "license": "ISC", + "engines": { + "node": ">=12" + } + } + } +} diff --git a/lazer/cardano/backend/package.json b/lazer/cardano/backend/package.json new file mode 100644 index 00000000..2197ef68 --- /dev/null +++ b/lazer/cardano/backend/package.json @@ -0,0 +1,34 @@ +{ + "name": "pay-with-pyth-deployment", + "version": "0.0.1", + "description": "Transaction building for Pay With Pyth Cardano dApp", + "type": "module", + "scripts": { + "api": "tsx api/server.ts", + "build": "tsc", + "lock": "tsx deployment/scripts/lock.ts", + "unlock": "tsx deployment/scripts/unlock.ts", + "cancel": "tsx deployment/scripts/cancel.ts", + "test": "vitest run" + }, + "dependencies": { + "@evolution-sdk/evolution": "^0.3.30", + "@lucid-evolution/lucid": "^0.4.0", + "@pythnetwork/pyth-lazer-sdk": "^5.2.1", + "bech32": "^2.0.0", + "dotenv": "^16.4.0", + "libsodium-sumo": "^0.8.2", + "libsodium-wrappers-sumo": "^0.8.2", + "yargs": "^17.7.2" + }, + "overrides": { + "libsodium-wrappers-sumo": "^0.8.2", + "libsodium-sumo": "^0.8.2" + }, + "devDependencies": { + "@types/node": "^22.0.0", + "tsx": "^4.19.0", + "typescript": "^5.5.0", + "vitest": "^4.1.0" + } +} diff --git a/lazer/cardano/backend/plutus.json b/lazer/cardano/backend/plutus.json new file mode 100644 index 00000000..051c03cc --- /dev/null +++ b/lazer/cardano/backend/plutus.json @@ -0,0 +1,290 @@ +{ + "preamble": { + "title": "pyth-examples/pay-with-pyth", + "description": "Payment agreements in USD settled in ADA using Pyth oracle prices", + "version": "0.0.1", + "plutusVersion": "v3", + "compiler": { + "name": "Aiken", + "version": "v1.1.19+e525483" + }, + "license": "Apache-2.0" + }, + "validators": [ + { + "title": "mock_pyth_withdraw.mock_pyth_withdraw.withdraw", + "redeemer": { + "title": "_redeemer", + "schema": { + "$ref": "#/definitions/Data" + } + }, + "compiledCode": "585301010029800aba2aba1aab9eaab9dab9a4888896600264653001300600198031803800cc0180092225980099b8748010c01cdd500144c928980498041baa0028b200c180300098019baa0068a4d13656400401", + "hash": "4ab26c95029067185f709d140300cccb15b0b20bbd62a7e9aa2e2e10" + }, + { + "title": "mock_pyth_withdraw.mock_pyth_withdraw.else", + "redeemer": { + "schema": {} + }, + "compiledCode": "585301010029800aba2aba1aab9eaab9dab9a4888896600264653001300600198031803800cc0180092225980099b8748010c01cdd500144c928980498041baa0028b200c180300098019baa0068a4d13656400401", + "hash": "4ab26c95029067185f709d140300cccb15b0b20bbd62a7e9aa2e2e10" + }, + { + "title": "pay_with_pyth.pay_with_pyth.spend", + "datum": { + "title": "_datum", + "schema": { + "$ref": "#/definitions/Void" + } + }, + "redeemer": { + "title": "redeemer", + "schema": { + "$ref": "#/definitions/pay_with_pyth~1Action" + } + }, + "parameters": [ + { + "title": "usd_amount_cents", + "schema": { + "$ref": "#/definitions/Int" + } + }, + { + "title": "user_address", + "schema": { + "$ref": "#/definitions/cardano~1address~1Address" + } + }, + { + "title": "sponsor_address", + "schema": { + "$ref": "#/definitions/cardano~1address~1Address" + } + }, + { + "title": "pyth_id", + "schema": { + "$ref": "#/definitions/cardano~1assets~1PolicyId" + } + } + ], + "compiledCode": "59011d010100222229800aba2aba1aab9faab9eaab9dab9a9bad0059bae0024888888896600264653001300900198049805000cc0240092225980099b8748008c024dd500144cc8a6002601c005300e300f0028992cc004c008c030dd5000c5660026466446600400400244b30010018a508acc004cdc79bae30120010038a518998010011809800a01c40446eb0c040c044c044c044c044c044c044c044c044c038dd50029bae300f300d3754003159800980118061baa0068a518a51402d16402d16402c601c60186ea804a60166ea80152222598009802800c56600260206ea802600516404515980099b87480080062b3001301037540130028b20228b201c4038300a37540046e1d20008b2010180480098029baa0098a4d13656400c01", + "hash": "e530506699a12170cebabba08d3e1094d02c1c80a3a534bec473238a" + }, + { + "title": "pay_with_pyth.pay_with_pyth.else", + "redeemer": { + "schema": {} + }, + "parameters": [ + { + "title": "usd_amount_cents", + "schema": { + "$ref": "#/definitions/Int" + } + }, + { + "title": "user_address", + "schema": { + "$ref": "#/definitions/cardano~1address~1Address" + } + }, + { + "title": "sponsor_address", + "schema": { + "$ref": "#/definitions/cardano~1address~1Address" + } + }, + { + "title": "pyth_id", + "schema": { + "$ref": "#/definitions/cardano~1assets~1PolicyId" + } + } + ], + "compiledCode": "59011d010100222229800aba2aba1aab9faab9eaab9dab9a9bad0059bae0024888888896600264653001300900198049805000cc0240092225980099b8748008c024dd500144cc8a6002601c005300e300f0028992cc004c008c030dd5000c5660026466446600400400244b30010018a508acc004cdc79bae30120010038a518998010011809800a01c40446eb0c040c044c044c044c044c044c044c044c044c038dd50029bae300f300d3754003159800980118061baa0068a518a51402d16402d16402c601c60186ea804a60166ea80152222598009802800c56600260206ea802600516404515980099b87480080062b3001301037540130028b20228b201c4038300a37540046e1d20008b2010180480098029baa0098a4d13656400c01", + "hash": "e530506699a12170cebabba08d3e1094d02c1c80a3a534bec473238a" + } + ], + "definitions": { + "Data": { + "title": "Data", + "description": "Any Plutus data." + }, + "Int": { + "dataType": "integer" + }, + "Option$cardano/address/StakeCredential": { + "title": "Option", + "anyOf": [ + { + "title": "Some", + "description": "An optional value.", + "dataType": "constructor", + "index": 0, + "fields": [ + { + "$ref": "#/definitions/cardano~1address~1StakeCredential" + } + ] + }, + { + "title": "None", + "description": "Nothing.", + "dataType": "constructor", + "index": 1, + "fields": [] + } + ] + }, + "Void": { + "title": "Unit", + "anyOf": [ + { + "dataType": "constructor", + "index": 0, + "fields": [] + } + ] + }, + "aiken/crypto/ScriptHash": { + "title": "ScriptHash", + "dataType": "bytes" + }, + "aiken/crypto/VerificationKeyHash": { + "title": "VerificationKeyHash", + "dataType": "bytes" + }, + "cardano/address/Address": { + "title": "Address", + "description": "A Cardano `Address` typically holding one or two credential references.\n\n Note that legacy bootstrap addresses (a.k.a. 'Byron addresses') are\n completely excluded from Plutus contexts. Thus, from an on-chain\n perspective only exists addresses of type 00, 01, ..., 07 as detailed\n in [CIP-0019 :: Shelley Addresses](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0019/#shelley-addresses).", + "anyOf": [ + { + "title": "Address", + "dataType": "constructor", + "index": 0, + "fields": [ + { + "title": "payment_credential", + "$ref": "#/definitions/cardano~1address~1PaymentCredential" + }, + { + "title": "stake_credential", + "$ref": "#/definitions/Option$cardano~1address~1StakeCredential" + } + ] + } + ] + }, + "cardano/address/Credential": { + "title": "Credential", + "description": "A general structure for representing an on-chain `Credential`.\n\n Credentials are always one of two kinds: a direct public/private key\n pair, or a script (native or Plutus).", + "anyOf": [ + { + "title": "VerificationKey", + "dataType": "constructor", + "index": 0, + "fields": [ + { + "$ref": "#/definitions/aiken~1crypto~1VerificationKeyHash" + } + ] + }, + { + "title": "Script", + "dataType": "constructor", + "index": 1, + "fields": [ + { + "$ref": "#/definitions/aiken~1crypto~1ScriptHash" + } + ] + } + ] + }, + "cardano/address/PaymentCredential": { + "title": "PaymentCredential", + "description": "A general structure for representing an on-chain `Credential`.\n\n Credentials are always one of two kinds: a direct public/private key\n pair, or a script (native or Plutus).", + "anyOf": [ + { + "title": "VerificationKey", + "dataType": "constructor", + "index": 0, + "fields": [ + { + "$ref": "#/definitions/aiken~1crypto~1VerificationKeyHash" + } + ] + }, + { + "title": "Script", + "dataType": "constructor", + "index": 1, + "fields": [ + { + "$ref": "#/definitions/aiken~1crypto~1ScriptHash" + } + ] + } + ] + }, + "cardano/address/StakeCredential": { + "title": "StakeCredential", + "description": "Represent a type of object that can be represented either inline (by hash)\n or via a reference (i.e. a pointer to an on-chain location).\n\n This is mainly use for capturing pointers to a stake credential\n registration certificate in the case of so-called pointer addresses.", + "anyOf": [ + { + "title": "Inline", + "dataType": "constructor", + "index": 0, + "fields": [ + { + "$ref": "#/definitions/cardano~1address~1Credential" + } + ] + }, + { + "title": "Pointer", + "dataType": "constructor", + "index": 1, + "fields": [ + { + "title": "slot_number", + "$ref": "#/definitions/Int" + }, + { + "title": "transaction_index", + "$ref": "#/definitions/Int" + }, + { + "title": "certificate_index", + "$ref": "#/definitions/Int" + } + ] + } + ] + }, + "cardano/assets/PolicyId": { + "title": "PolicyId", + "dataType": "bytes" + }, + "pay_with_pyth/Action": { + "title": "Action", + "anyOf": [ + { + "title": "Unlock", + "dataType": "constructor", + "index": 0, + "fields": [] + }, + { + "title": "Cancel", + "dataType": "constructor", + "index": 1, + "fields": [] + } + ] + } + } +} \ No newline at end of file diff --git a/lazer/cardano/backend/tsconfig.json b/lazer/cardano/backend/tsconfig.json new file mode 100644 index 00000000..ee14bff8 --- /dev/null +++ b/lazer/cardano/backend/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "ES2022", + "moduleResolution": "bundler", + "outDir": "./dist", + "rootDir": "./deployment", + "strict": true, + "esModuleInterop": true, + "resolveJsonModule": true, + "declaration": true, + "skipLibCheck": true + }, + "include": ["deployment/**/*"], + "exclude": ["deployment/__tests__/**/*", "deployment/pyth_example/**/*"] +} diff --git a/lazer/cardano/backend/validators/mock_pyth_withdraw.ak b/lazer/cardano/backend/validators/mock_pyth_withdraw.ak new file mode 100644 index 00000000..3430027a --- /dev/null +++ b/lazer/cardano/backend/validators/mock_pyth_withdraw.ak @@ -0,0 +1,12 @@ +use cardano/transaction.{Transaction} + +/// Mock Pyth withdrawal validator for testing. Always succeeds. +validator mock_pyth_withdraw { + withdraw(_redeemer: Data, _account, _self: Transaction) { + True + } + + else(_) { + fail + } +} diff --git a/lazer/cardano/backend/validators/pay_with_pyth.ak b/lazer/cardano/backend/validators/pay_with_pyth.ak new file mode 100644 index 00000000..e707b069 --- /dev/null +++ b/lazer/cardano/backend/validators/pay_with_pyth.ak @@ -0,0 +1,72 @@ +use aiken/collection/list +use aiken/math/rational +use cardano/address.{Address, VerificationKey} +use cardano/assets.{PolicyId, lovelace_of} +use cardano/transaction.{Transaction} +use pyth +use types/u32 + +const ada_usd_feed_id = 16 + +pub type Action { + Unlock + Cancel +} + +validator pay_with_pyth( + usd_amount_cents: Int, + user_address: Address, + sponsor_address: Address, + pyth_id: PolicyId, +) { + spend( + _datum: Option, + redeemer: Action, + _own_ref: Data, + self: Transaction, + ) { + // Transaction must be signed by the sponsor + expect VerificationKey(sponsor_key_hash) = + sponsor_address.payment_credential + trace @"sponsor_key_hash": sponsor_key_hash + trace @"extra_signatories": self.extra_signatories + expect list.has(self.extra_signatories, sponsor_key_hash) + trace @"sponsor signature check passed" + // ----------------------------------------- + when redeemer is { + Unlock -> { + expect [update, ..] = pyth.get_updates(pyth_id, self) + expect Some(feed) = + list.find( + update.feeds, + fn(feed) { u32.as_int(feed.feed_id) == ada_usd_feed_id }, + ) + expect Some(Some(price)) = feed.price + expect Some(exponent) = feed.exponent + expect Some(multiplier) = + rational.from_int(10) |> rational.pow(exponent) + let ada_usd_price = rational.from_int(price) |> rational.mul(multiplier) + // Compute the amount of lovelace to be sent to the user + expect Some(lovelace_needed) = + rational.from_int(usd_amount_cents * 10_000) + |> rational.div(ada_usd_price) + let lovelace_to_user = rational.ceil(lovelace_needed) + list.any( + self.outputs, + fn(output) { + output.address == user_address && lovelace_of(output.value) >= lovelace_to_user + }, + ) + } + // If the action is Cancel, the sponsor can manage the ADA in any way, for example, send it to itself + Cancel -> { + trace @"redeemer: Cancel" + True + } + } + } + + else(_) { + fail + } +} diff --git a/lazer/cardano/backend/validators/pay_with_pyth_test.ak b/lazer/cardano/backend/validators/pay_with_pyth_test.ak new file mode 100644 index 00000000..f65494d9 --- /dev/null +++ b/lazer/cardano/backend/validators/pay_with_pyth_test.ak @@ -0,0 +1,233 @@ +use cardano/address +use cardano/assets +use cardano/transaction.{ + InlineDatum, Input, NoDatum, Output, OutputReference, Transaction, Withdraw, + placeholder, +} +use pay_with_pyth.{Cancel, Unlock} +use pyth.{Governance, Pyth} + +// -- Test constants -- + +const sponsor_key_hash = + #"aabbccddaabbccddaabbccddaabbccddaabbccddaabbccdd00000001" + +const user_key_hash = + #"aabbccddaabbccddaabbccddaabbccddaabbccddaabbccdd00000002" + +const pyth_policy_id = + #"aabbccddaabbccddaabbccddaabbccddaabbccddaabbccdd00000003" + +const withdraw_script_hash = + #"aabbccddaabbccddaabbccddaabbccddaabbccddaabbccdd00000004" + +const script_hash = + #"aabbccddaabbccddaabbccddaabbccddaabbccddaabbccdd00000005" + +/// Pyth update: ADA/USD price=75000000, exponent=-8 => $0.75/ADA +const pyth_update_075 = + #"b9011a820000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001f0075d3c7930010a5d4e80000000301100000000200c06878040000000004f8ff" + +/// Pyth update: ADA/USD price=50000000, exponent=-8 => $0.50/ADA +const pyth_update_050 = + #"b9011a820000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001f0075d3c7930010a5d4e8000000030110000000020080f0fa020000000004f8ff" + +// -- Helper builders -- + +fn build_pyth_ref_input() -> Input { + Input { + output_reference: OutputReference { + transaction_id: #"0000000000000000000000000000000000000000000000000000000000000000", + output_index: 0, + }, + output: Output { + address: address.from_script(script_hash), + value: assets.from_asset(pyth_policy_id, "Pyth State", 1), + datum: InlineDatum( + Pyth { + governance: Governance { + wormhole: #"00000000000000000000000000000000000000000000000000000000", + emitter_chain: 0, + emitter_address: #"", + seen_sequence: 0, + }, + trusted_signers: [], + deprecated_withdraw_scripts: [], + withdraw_script: withdraw_script_hash, + }, + ), + reference_script: None, + }, + } +} + +fn build_unlock_tx(pyth_update: ByteArray, user_lovelace: Int) -> Transaction { + let updates: Data = [pyth_update] + Transaction { + ..placeholder, + reference_inputs: [build_pyth_ref_input()], + redeemers: [ + Pair(Withdraw(address.Script(withdraw_script_hash)), updates), + ], + extra_signatories: [sponsor_key_hash], + outputs: [ + Output { + address: address.from_verification_key(user_key_hash), + value: assets.from_lovelace(user_lovelace), + datum: NoDatum, + reference_script: None, + }, + ], + } +} + +// -- Cancel tests -- + +test cancel_succeeds() { + let tx = + Transaction { ..placeholder, extra_signatories: [sponsor_key_hash] } + pay_with_pyth.pay_with_pyth.spend( + 1000, + address.from_verification_key(user_key_hash), + address.from_verification_key(sponsor_key_hash), + pyth_policy_id, + None, + Cancel, + #"", + tx, + ) +} + +test cancel_fails_without_sponsor_sig() fail { + let tx = Transaction { ..placeholder, extra_signatories: [] } + pay_with_pyth.pay_with_pyth.spend( + 1000, + address.from_verification_key(user_key_hash), + address.from_verification_key(sponsor_key_hash), + pyth_policy_id, + None, + Cancel, + #"", + tx, + ) +} + +// -- Unlock tests -- + +// At $0.75/ADA, $10.00 (1000 cents) => ceil(1000*10000 / 0.75) = 13_333_334 lovelace +test unlock_exact_amount_075() { + pay_with_pyth.pay_with_pyth.spend( + 1000, + address.from_verification_key(user_key_hash), + address.from_verification_key(sponsor_key_hash), + pyth_policy_id, + None, + Unlock, + #"", + build_unlock_tx(pyth_update_075, 13_333_334), + ) +} + +test unlock_overpay_succeeds_075() { + pay_with_pyth.pay_with_pyth.spend( + 1000, + address.from_verification_key(user_key_hash), + address.from_verification_key(sponsor_key_hash), + pyth_policy_id, + None, + Unlock, + #"", + build_unlock_tx(pyth_update_075, 15_000_000), + ) +} + +test unlock_underpay_fails_075() fail { + pay_with_pyth.pay_with_pyth.spend( + 1000, + address.from_verification_key(user_key_hash), + address.from_verification_key(sponsor_key_hash), + pyth_policy_id, + None, + Unlock, + #"", + build_unlock_tx(pyth_update_075, 13_333_333), + ) +} + +// At $0.50/ADA, $10.00 => 1000*10000 / 0.50 = 20_000_000 lovelace +test unlock_exact_amount_050() { + pay_with_pyth.pay_with_pyth.spend( + 1000, + address.from_verification_key(user_key_hash), + address.from_verification_key(sponsor_key_hash), + pyth_policy_id, + None, + Unlock, + #"", + build_unlock_tx(pyth_update_050, 20_000_000), + ) +} + +test unlock_fails_without_sponsor_sig() fail { + let updates: Data = [pyth_update_075] + let tx = + Transaction { + ..placeholder, + reference_inputs: [build_pyth_ref_input()], + redeemers: [ + Pair(Withdraw(address.Script(withdraw_script_hash)), updates), + ], + extra_signatories: [], + outputs: [ + Output { + address: address.from_verification_key(user_key_hash), + value: assets.from_lovelace(13_333_334), + datum: NoDatum, + reference_script: None, + }, + ], + } + pay_with_pyth.pay_with_pyth.spend( + 1000, + address.from_verification_key(user_key_hash), + address.from_verification_key(sponsor_key_hash), + pyth_policy_id, + None, + Unlock, + #"", + tx, + ) +} + +test unlock_wrong_address_fails() fail { + let wrong_key = + #"aabbccddaabbccddaabbccddaabbccddaabbccddaabbccdd00000099" + let updates: Data = [pyth_update_075] + let tx = + Transaction { + ..placeholder, + reference_inputs: [build_pyth_ref_input()], + redeemers: [ + Pair(Withdraw(address.Script(withdraw_script_hash)), updates), + ], + extra_signatories: [sponsor_key_hash], + outputs: [ + Output { + address: address.from_verification_key(wrong_key), + value: assets.from_lovelace(13_333_334), + datum: NoDatum, + reference_script: None, + }, + ], + } + pay_with_pyth.pay_with_pyth.spend( + 1000, + address.from_verification_key(user_key_hash), + address.from_verification_key(sponsor_key_hash), + pyth_policy_id, + None, + Unlock, + #"", + tx, + ) +} diff --git a/lazer/cardano/backend/vitest.config.ts b/lazer/cardano/backend/vitest.config.ts new file mode 100644 index 00000000..4734701c --- /dev/null +++ b/lazer/cardano/backend/vitest.config.ts @@ -0,0 +1,8 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + include: ["deployment/__tests__/**/*.test.ts"], + setupFiles: ["deployment/__tests__/setup.ts"], + }, +}); diff --git a/lazer/cardano/frontend/.env.example b/lazer/cardano/frontend/.env.example new file mode 100644 index 00000000..f5495fd6 --- /dev/null +++ b/lazer/cardano/frontend/.env.example @@ -0,0 +1 @@ +VITE_PYTH_LAZER_TOKEN=your_pyth_pro_token_here diff --git a/lazer/cardano/frontend/dist/assets/index-Cct8iSwT.js b/lazer/cardano/frontend/dist/assets/index-Cct8iSwT.js new file mode 100644 index 00000000..e68f7088 --- /dev/null +++ b/lazer/cardano/frontend/dist/assets/index-Cct8iSwT.js @@ -0,0 +1,45 @@ +var Sf=Object.defineProperty;var Ef=(e,t,n)=>t in e?Sf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var K=(e,t,n)=>Ef(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&r(u)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();function Qu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ku={exports:{}},ji={},Yu={exports:{}},H={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var _r=Symbol.for("react.element"),kf=Symbol.for("react.portal"),Cf=Symbol.for("react.fragment"),_f=Symbol.for("react.strict_mode"),Nf=Symbol.for("react.profiler"),Tf=Symbol.for("react.provider"),If=Symbol.for("react.context"),Af=Symbol.for("react.forward_ref"),Rf=Symbol.for("react.suspense"),Pf=Symbol.for("react.memo"),Lf=Symbol.for("react.lazy"),Is=Symbol.iterator;function Df(e){return e===null||typeof e!="object"?null:(e=Is&&e[Is]||e["@@iterator"],typeof e=="function"?e:null)}var Gu={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Xu=Object.assign,qu={};function Ln(e,t,n){this.props=e,this.context=t,this.refs=qu,this.updater=n||Gu}Ln.prototype.isReactComponent={};Ln.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ln.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ju(){}Ju.prototype=Ln.prototype;function No(e,t,n){this.props=e,this.context=t,this.refs=qu,this.updater=n||Gu}var To=No.prototype=new Ju;To.constructor=No;Xu(To,Ln.prototype);To.isPureReactComponent=!0;var As=Array.isArray,Zu=Object.prototype.hasOwnProperty,Io={current:null},bu={key:!0,ref:!0,__self:!0,__source:!0};function ea(e,t,n){var r,i={},l=null,u=null;if(t!=null)for(r in t.ref!==void 0&&(u=t.ref),t.key!==void 0&&(l=""+t.key),t)Zu.call(t,r)&&!bu.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1>>1,V=D[O];if(0>>1;Oi(en,z))qei(zt,en)?(D[O]=zt,D[qe]=z,O=qe):(D[O]=en,D[Xe]=z,O=Xe);else if(qei(zt,z))D[O]=zt,D[qe]=z,O=qe;else break e}}return M}function i(D,M){var z=D.sortIndex-M.sortIndex;return z!==0?z:D.id-M.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var u=Date,a=u.now();e.unstable_now=function(){return u.now()-a}}var f=[],p=[],x=1,w=null,S=3,C=!1,N=!1,_=!1,B=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(D){for(var M=n(p);M!==null;){if(M.callback===null)r(p);else if(M.startTime<=D)r(p),M.sortIndex=M.expirationTime,t(f,M);else break;M=n(p)}}function T(D){if(_=!1,v(D),!N)if(n(f)!==null)N=!0,Un(A);else{var M=n(p);M!==null&&Bn(T,M.startTime-D)}}function A(D,M){N=!1,_&&(_=!1,m(R),R=-1),C=!0;var z=S;try{for(v(M),w=n(f);w!==null&&(!(w.expirationTime>M)||D&&!ee());){var O=w.callback;if(typeof O=="function"){w.callback=null,S=w.priorityLevel;var V=O(w.expirationTime<=M);M=e.unstable_now(),typeof V=="function"?w.callback=V:w===n(f)&&r(f),v(M)}else r(f);w=n(f)}if(w!==null)var Mt=!0;else{var Xe=n(p);Xe!==null&&Bn(T,Xe.startTime-M),Mt=!1}return Mt}finally{w=null,S=z,C=!1}}var P=!1,L=null,R=-1,U=5,j=-1;function ee(){return!(e.unstable_now()-jD||125O?(D.sortIndex=z,t(p,D),n(f)===null&&D===n(p)&&(_?(m(R),R=-1):_=!0,Bn(T,z-O))):(D.sortIndex=V,t(f,D),N||C||(N=!0,Un(A))),D},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(D){var M=S;return function(){var z=S;S=M;try{return D.apply(this,arguments)}finally{S=z}}}})(la);ia.exports=la;var Qf=ia.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Kf=$,Le=Qf;function I(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Dl=Object.prototype.hasOwnProperty,Yf=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ps={},Ls={};function Gf(e){return Dl.call(Ls,e)?!0:Dl.call(Ps,e)?!1:Yf.test(e)?Ls[e]=!0:(Ps[e]=!0,!1)}function Xf(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function qf(e,t,n,r){if(t===null||typeof t>"u"||Xf(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ke(e,t,n,r,i,l,u){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=u}var me={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){me[e]=new ke(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];me[t]=new ke(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){me[e]=new ke(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){me[e]=new ke(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){me[e]=new ke(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){me[e]=new ke(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){me[e]=new ke(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){me[e]=new ke(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){me[e]=new ke(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ro=/[\-:]([a-z])/g;function Po(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Ro,Po);me[t]=new ke(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Ro,Po);me[t]=new ke(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Ro,Po);me[t]=new ke(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){me[e]=new ke(e,1,!1,e.toLowerCase(),null,!1,!1)});me.xlinkHref=new ke("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){me[e]=new ke(e,1,!1,e.toLowerCase(),null,!0,!0)});function Lo(e,t,n,r){var i=me.hasOwnProperty(t)?me[t]:null;(i!==null?i.type!==0:r||!(2a||i[u]!==l[a]){var f=` +`+i[u].replace(" at new "," at ");return e.displayName&&f.includes("")&&(f=f.replace("",e.displayName)),f}while(1<=u&&0<=a);break}}}finally{ll=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Xn(e):""}function Jf(e){switch(e.tag){case 5:return Xn(e.type);case 16:return Xn("Lazy");case 13:return Xn("Suspense");case 19:return Xn("SuspenseList");case 0:case 2:case 15:return e=ol(e.type,!1),e;case 11:return e=ol(e.type.render,!1),e;case 1:return e=ol(e.type,!0),e;default:return""}}function Bl(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case un:return"Fragment";case sn:return"Portal";case Fl:return"Profiler";case Do:return"StrictMode";case jl:return"Suspense";case Ul:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ua:return(e.displayName||"Context")+".Consumer";case sa:return(e._context.displayName||"Context")+".Provider";case Fo:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case jo:return t=e.displayName||null,t!==null?t:Bl(e.type)||"Memo";case gt:t=e._payload,e=e._init;try{return Bl(e(t))}catch{}}return null}function Zf(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Bl(t);case 8:return t===Do?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Pt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ca(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function bf(e){var t=ca(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(u){r=""+u,l.call(this,u)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(u){r=""+u},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Fr(e){e._valueTracker||(e._valueTracker=bf(e))}function fa(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ca(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ci(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ml(e,t){var n=t.checked;return re({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Fs(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Pt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function da(e,t){t=t.checked,t!=null&&Lo(e,"checked",t,!1)}function zl(e,t){da(e,t);var n=Pt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ol(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ol(e,t.type,Pt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function js(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ol(e,t,n){(t!=="number"||ci(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var qn=Array.isArray;function wn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=jr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ar(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var bn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ed=["Webkit","ms","Moz","O"];Object.keys(bn).forEach(function(e){ed.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),bn[t]=bn[e]})});function ya(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||bn.hasOwnProperty(e)&&bn[e]?(""+t).trim():t+"px"}function ga(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=ya(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var td=re({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Hl(e,t){if(t){if(td[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(I(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(I(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(I(61))}if(t.style!=null&&typeof t.style!="object")throw Error(I(62))}}function Vl(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ql=null;function Uo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Kl=null,xn=null,Sn=null;function Ms(e){if(e=Ir(e)){if(typeof Kl!="function")throw Error(I(280));var t=e.stateNode;t&&(t=Oi(t),Kl(e.stateNode,e.type,t))}}function va(e){xn?Sn?Sn.push(e):Sn=[e]:xn=e}function wa(){if(xn){var e=xn,t=Sn;if(Sn=xn=null,Ms(e),t)for(e=0;e>>=0,e===0?32:31-(dd(e)/pd|0)|0}var Ur=64,Br=4194304;function Jn(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function hi(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,l=e.pingedLanes,u=n&268435455;if(u!==0){var a=u&~i;a!==0?r=Jn(a):(l&=u,l!==0&&(r=Jn(l)))}else u=n&~i,u!==0?r=Jn(u):l!==0&&(r=Jn(l));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,l=t&-t,i>=l||i===16&&(l&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Nr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ke(t),e[t]=n}function gd(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=tr),Ys=" ",Gs=!1;function za(e,t){switch(e){case"keyup":return Qd.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Oa(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var an=!1;function Yd(e,t){switch(e){case"compositionend":return Oa(t);case"keypress":return t.which!==32?null:(Gs=!0,Ys);case"textInput":return e=t.data,e===Ys&&Gs?null:e;default:return null}}function Gd(e,t){if(an)return e==="compositionend"||!Vo&&za(e,t)?(e=Ba(),ei=$o=St=null,an=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Zs(n)}}function Va(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Va(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Qa(){for(var e=window,t=ci();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ci(e.document)}return t}function Qo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function rp(e){var t=Qa(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Va(n.ownerDocument.documentElement,n)){if(r!==null&&Qo(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,l=Math.min(r.start,i);r=r.end===void 0?l:Math.min(r.end,i),!e.extend&&l>r&&(i=r,r=l,l=i),i=bs(n,l);var u=bs(n,r);i&&u&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==u.node||e.focusOffset!==u.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(u.node,u.offset)):(t.setEnd(u.node,u.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,cn=null,Zl=null,rr=null,bl=!1;function eu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;bl||cn==null||cn!==ci(r)||(r=cn,"selectionStart"in r&&Qo(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),rr&&mr(rr,r)||(rr=r,r=gi(Zl,"onSelect"),0pn||(e.current=lo[pn],lo[pn]=null,pn--)}function X(e,t){pn++,lo[pn]=e.current,e.current=t}var Lt={},we=Ft(Lt),Ne=Ft(!1),Yt=Lt;function Nn(e,t){var n=e.type.contextTypes;if(!n)return Lt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},l;for(l in n)i[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Te(e){return e=e.childContextTypes,e!=null}function wi(){J(Ne),J(we)}function su(e,t,n){if(we.current!==Lt)throw Error(I(168));X(we,t),X(Ne,n)}function ec(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(I(108,Zf(e)||"Unknown",i));return re({},n,r)}function xi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Lt,Yt=we.current,X(we,e),X(Ne,Ne.current),!0}function uu(e,t,n){var r=e.stateNode;if(!r)throw Error(I(169));n?(e=ec(e,t,Yt),r.__reactInternalMemoizedMergedChildContext=e,J(Ne),J(we),X(we,e)):J(Ne),X(Ne,n)}var lt=null,$i=!1,xl=!1;function tc(e){lt===null?lt=[e]:lt.push(e)}function mp(e){$i=!0,tc(e)}function jt(){if(!xl&<!==null){xl=!0;var e=0,t=Y;try{var n=lt;for(Y=1;e>=u,i-=u,ot=1<<32-Ke(t)+i|n<R?(U=L,L=null):U=L.sibling;var j=S(m,L,v[R],T);if(j===null){L===null&&(L=U);break}e&&L&&j.alternate===null&&t(m,L),h=l(j,h,R),P===null?A=j:P.sibling=j,P=j,L=U}if(R===v.length)return n(m,L),b&&Ot(m,R),A;if(L===null){for(;RR?(U=L,L=null):U=L.sibling;var ee=S(m,L,j.value,T);if(ee===null){L===null&&(L=U);break}e&&L&&ee.alternate===null&&t(m,L),h=l(ee,h,R),P===null?A=ee:P.sibling=ee,P=ee,L=U}if(j.done)return n(m,L),b&&Ot(m,R),A;if(L===null){for(;!j.done;R++,j=v.next())j=w(m,j.value,T),j!==null&&(h=l(j,h,R),P===null?A=j:P.sibling=j,P=j);return b&&Ot(m,R),A}for(L=r(m,L);!j.done;R++,j=v.next())j=C(L,m,R,j.value,T),j!==null&&(e&&j.alternate!==null&&L.delete(j.key===null?R:j.key),h=l(j,h,R),P===null?A=j:P.sibling=j,P=j);return e&&L.forEach(function(Ut){return t(m,Ut)}),b&&Ot(m,R),A}function B(m,h,v,T){if(typeof v=="object"&&v!==null&&v.type===un&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Dr:e:{for(var A=v.key,P=h;P!==null;){if(P.key===A){if(A=v.type,A===un){if(P.tag===7){n(m,P.sibling),h=i(P,v.props.children),h.return=m,m=h;break e}}else if(P.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===gt&&fu(A)===P.type){n(m,P.sibling),h=i(P,v.props),h.ref=Vn(m,P,v),h.return=m,m=h;break e}n(m,P);break}else t(m,P);P=P.sibling}v.type===un?(h=Kt(v.props.children,m.mode,T,v.key),h.return=m,m=h):(T=ui(v.type,v.key,v.props,null,m.mode,T),T.ref=Vn(m,h,v),T.return=m,m=T)}return u(m);case sn:e:{for(P=v.key;h!==null;){if(h.key===P)if(h.tag===4&&h.stateNode.containerInfo===v.containerInfo&&h.stateNode.implementation===v.implementation){n(m,h.sibling),h=i(h,v.children||[]),h.return=m,m=h;break e}else{n(m,h);break}else t(m,h);h=h.sibling}h=Il(v,m.mode,T),h.return=m,m=h}return u(m);case gt:return P=v._init,B(m,h,P(v._payload),T)}if(qn(v))return N(m,h,v,T);if(zn(v))return _(m,h,v,T);Vr(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,h!==null&&h.tag===6?(n(m,h.sibling),h=i(h,v),h.return=m,m=h):(n(m,h),h=Tl(v,m.mode,T),h.return=m,m=h),u(m)):n(m,h)}return B}var In=lc(!0),oc=lc(!1),ki=Ft(null),Ci=null,yn=null,Xo=null;function qo(){Xo=yn=Ci=null}function Jo(e){var t=ki.current;J(ki),e._currentValue=t}function uo(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function kn(e,t){Ci=e,Xo=yn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(_e=!0),e.firstContext=null)}function Oe(e){var t=e._currentValue;if(Xo!==e)if(e={context:e,memoizedValue:t,next:null},yn===null){if(Ci===null)throw Error(I(308));yn=e,Ci.dependencies={lanes:0,firstContext:e}}else yn=yn.next=e;return t}var Ht=null;function Zo(e){Ht===null?Ht=[e]:Ht.push(e)}function sc(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Zo(t)):(n.next=i.next,i.next=n),t.interleaved=n,dt(e,r)}function dt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var vt=!1;function bo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function uc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function at(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Tt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Q&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,dt(e,n)}return i=r.interleaved,i===null?(t.next=t,Zo(r)):(t.next=i.next,i.next=t),r.interleaved=t,dt(e,n)}function ni(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Mo(e,n)}}function du(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var u={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};l===null?i=l=u:l=l.next=u,n=n.next}while(n!==null);l===null?i=l=t:l=l.next=t}else i=l=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:l,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function _i(e,t,n,r){var i=e.updateQueue;vt=!1;var l=i.firstBaseUpdate,u=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var f=a,p=f.next;f.next=null,u===null?l=p:u.next=p,u=f;var x=e.alternate;x!==null&&(x=x.updateQueue,a=x.lastBaseUpdate,a!==u&&(a===null?x.firstBaseUpdate=p:a.next=p,x.lastBaseUpdate=f))}if(l!==null){var w=i.baseState;u=0,x=p=f=null,a=l;do{var S=a.lane,C=a.eventTime;if((r&S)===S){x!==null&&(x=x.next={eventTime:C,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var N=e,_=a;switch(S=t,C=n,_.tag){case 1:if(N=_.payload,typeof N=="function"){w=N.call(C,w,S);break e}w=N;break e;case 3:N.flags=N.flags&-65537|128;case 0:if(N=_.payload,S=typeof N=="function"?N.call(C,w,S):N,S==null)break e;w=re({},w,S);break e;case 2:vt=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,S=i.effects,S===null?i.effects=[a]:S.push(a))}else C={eventTime:C,lane:S,tag:a.tag,payload:a.payload,callback:a.callback,next:null},x===null?(p=x=C,f=w):x=x.next=C,u|=S;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;S=a,a=S.next,S.next=null,i.lastBaseUpdate=S,i.shared.pending=null}}while(!0);if(x===null&&(f=w),i.baseState=f,i.firstBaseUpdate=p,i.lastBaseUpdate=x,t=i.shared.interleaved,t!==null){i=t;do u|=i.lane,i=i.next;while(i!==t)}else l===null&&(i.shared.lanes=0);qt|=u,e.lanes=u,e.memoizedState=w}}function pu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=El.transition;El.transition={};try{e(!1),t()}finally{Y=n,El.transition=r}}function _c(){return $e().memoizedState}function wp(e,t,n){var r=At(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Nc(e))Tc(t,n);else if(n=sc(e,t,n,r),n!==null){var i=Se();Ye(n,e,r,i),Ic(n,t,r)}}function xp(e,t,n){var r=At(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Nc(e))Tc(t,i);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var u=t.lastRenderedState,a=l(u,n);if(i.hasEagerState=!0,i.eagerState=a,Ge(a,u)){var f=t.interleaved;f===null?(i.next=i,Zo(t)):(i.next=f.next,f.next=i),t.interleaved=i;return}}catch{}finally{}n=sc(e,t,i,r),n!==null&&(i=Se(),Ye(n,e,r,i),Ic(n,t,r))}}function Nc(e){var t=e.alternate;return e===ne||t!==null&&t===ne}function Tc(e,t){ir=Ti=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ic(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Mo(e,n)}}var Ii={readContext:Oe,useCallback:ye,useContext:ye,useEffect:ye,useImperativeHandle:ye,useInsertionEffect:ye,useLayoutEffect:ye,useMemo:ye,useReducer:ye,useRef:ye,useState:ye,useDebugValue:ye,useDeferredValue:ye,useTransition:ye,useMutableSource:ye,useSyncExternalStore:ye,useId:ye,unstable_isNewReconciler:!1},Sp={readContext:Oe,useCallback:function(e,t){return be().memoizedState=[e,t===void 0?null:t],e},useContext:Oe,useEffect:mu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ii(4194308,4,xc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ii(4194308,4,e,t)},useInsertionEffect:function(e,t){return ii(4,2,e,t)},useMemo:function(e,t){var n=be();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=be();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=wp.bind(null,ne,e),[r.memoizedState,e]},useRef:function(e){var t=be();return e={current:e},t.memoizedState=e},useState:hu,useDebugValue:ss,useDeferredValue:function(e){return be().memoizedState=e},useTransition:function(){var e=hu(!1),t=e[0];return e=vp.bind(null,e[1]),be().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ne,i=be();if(b){if(n===void 0)throw Error(I(407));n=n()}else{if(n=t(),de===null)throw Error(I(349));Xt&30||dc(r,t,n)}i.memoizedState=n;var l={value:n,getSnapshot:t};return i.queue=l,mu(hc.bind(null,r,l,e),[e]),r.flags|=2048,kr(9,pc.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=be(),t=de.identifierPrefix;if(b){var n=st,r=ot;n=(r&~(1<<32-Ke(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Sr++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=u.createElement(n,{is:r.is}):(e=u.createElement(n),n==="select"&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,n),e[et]=t,e[vr]=r,Mc(e,t,!1,!1),t.stateNode=e;e:{switch(u=Vl(n,r),n){case"dialog":q("cancel",e),q("close",e),i=r;break;case"iframe":case"object":case"embed":q("load",e),i=r;break;case"video":case"audio":for(i=0;iPn&&(t.flags|=128,r=!0,Qn(l,!1),t.lanes=4194304)}else{if(!r)if(e=Ni(u),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Qn(l,!0),l.tail===null&&l.tailMode==="hidden"&&!u.alternate&&!b)return ge(t),null}else 2*se()-l.renderingStartTime>Pn&&n!==1073741824&&(t.flags|=128,r=!0,Qn(l,!1),t.lanes=4194304);l.isBackwards?(u.sibling=t.child,t.child=u):(n=l.last,n!==null?n.sibling=u:t.child=u,l.last=u)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=se(),t.sibling=null,n=te.current,X(te,r?n&1|2:n&1),t):(ge(t),null);case 22:case 23:return ps(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ae&1073741824&&(ge(t),t.subtreeFlags&6&&(t.flags|=8192)):ge(t),null;case 24:return null;case 25:return null}throw Error(I(156,t.tag))}function Ap(e,t){switch(Yo(t),t.tag){case 1:return Te(t.type)&&wi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return An(),J(Ne),J(we),ns(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ts(t),null;case 13:if(J(te),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(I(340));Tn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return J(te),null;case 4:return An(),null;case 10:return Jo(t.type._context),null;case 22:case 23:return ps(),null;case 24:return null;default:return null}}var Kr=!1,ve=!1,Rp=typeof WeakSet=="function"?WeakSet:Set,F=null;function gn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){oe(e,t,r)}else n.current=null}function vo(e,t,n){try{n()}catch(r){oe(e,t,r)}}var Nu=!1;function Pp(e,t){if(eo=mi,e=Qa(),Qo(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var u=0,a=-1,f=-1,p=0,x=0,w=e,S=null;t:for(;;){for(var C;w!==n||i!==0&&w.nodeType!==3||(a=u+i),w!==l||r!==0&&w.nodeType!==3||(f=u+r),w.nodeType===3&&(u+=w.nodeValue.length),(C=w.firstChild)!==null;)S=w,w=C;for(;;){if(w===e)break t;if(S===n&&++p===i&&(a=u),S===l&&++x===r&&(f=u),(C=w.nextSibling)!==null)break;w=S,S=w.parentNode}w=C}n=a===-1||f===-1?null:{start:a,end:f}}else n=null}n=n||{start:0,end:0}}else n=null;for(to={focusedElem:e,selectionRange:n},mi=!1,F=t;F!==null;)if(t=F,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,F=e;else for(;F!==null;){t=F;try{var N=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(N!==null){var _=N.memoizedProps,B=N.memoizedState,m=t.stateNode,h=m.getSnapshotBeforeUpdate(t.elementType===t.type?_:He(t.type,_),B);m.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(I(163))}}catch(T){oe(t,t.return,T)}if(e=t.sibling,e!==null){e.return=t.return,F=e;break}F=t.return}return N=Nu,Nu=!1,N}function lr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var l=i.destroy;i.destroy=void 0,l!==void 0&&vo(t,n,l)}i=i.next}while(i!==r)}}function Vi(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function wo(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function $c(e){var t=e.alternate;t!==null&&(e.alternate=null,$c(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[et],delete t[vr],delete t[io],delete t[pp],delete t[hp])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Wc(e){return e.tag===5||e.tag===3||e.tag===4}function Tu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Wc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function xo(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=vi));else if(r!==4&&(e=e.child,e!==null))for(xo(e,t,n),e=e.sibling;e!==null;)xo(e,t,n),e=e.sibling}function So(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(So(e,t,n),e=e.sibling;e!==null;)So(e,t,n),e=e.sibling}var pe=null,Ve=!1;function yt(e,t,n){for(n=n.child;n!==null;)Hc(e,t,n),n=n.sibling}function Hc(e,t,n){if(nt&&typeof nt.onCommitFiberUnmount=="function")try{nt.onCommitFiberUnmount(Ui,n)}catch{}switch(n.tag){case 5:ve||gn(n,t);case 6:var r=pe,i=Ve;pe=null,yt(e,t,n),pe=r,Ve=i,pe!==null&&(Ve?(e=pe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):pe.removeChild(n.stateNode));break;case 18:pe!==null&&(Ve?(e=pe,n=n.stateNode,e.nodeType===8?wl(e.parentNode,n):e.nodeType===1&&wl(e,n),pr(e)):wl(pe,n.stateNode));break;case 4:r=pe,i=Ve,pe=n.stateNode.containerInfo,Ve=!0,yt(e,t,n),pe=r,Ve=i;break;case 0:case 11:case 14:case 15:if(!ve&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var l=i,u=l.destroy;l=l.tag,u!==void 0&&(l&2||l&4)&&vo(n,t,u),i=i.next}while(i!==r)}yt(e,t,n);break;case 1:if(!ve&&(gn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){oe(n,t,a)}yt(e,t,n);break;case 21:yt(e,t,n);break;case 22:n.mode&1?(ve=(r=ve)||n.memoizedState!==null,yt(e,t,n),ve=r):yt(e,t,n);break;default:yt(e,t,n)}}function Iu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Rp),t.forEach(function(r){var i=Op.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function We(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=u),r&=~l}if(r=i,r=se()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Dp(r/1960))-r,10e?16:e,Et===null)var r=!1;else{if(e=Et,Et=null,Pi=0,Q&6)throw Error(I(331));var i=Q;for(Q|=4,F=e.current;F!==null;){var l=F,u=l.child;if(F.flags&16){var a=l.deletions;if(a!==null){for(var f=0;fse()-fs?Qt(e,0):cs|=n),Ie(e,t)}function Jc(e,t){t===0&&(e.mode&1?(t=Br,Br<<=1,!(Br&130023424)&&(Br=4194304)):t=1);var n=Se();e=dt(e,t),e!==null&&(Nr(e,t,n),Ie(e,n))}function zp(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Jc(e,n)}function Op(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(I(314))}r!==null&&r.delete(t),Jc(e,n)}var Zc;Zc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ne.current)_e=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return _e=!1,Tp(e,t,n);_e=!!(e.flags&131072)}else _e=!1,b&&t.flags&1048576&&nc(t,Ei,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;li(e,t),e=t.pendingProps;var i=Nn(t,we.current);kn(t,n),i=is(null,t,r,e,i,n);var l=ls();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Te(r)?(l=!0,xi(t)):l=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,bo(t),i.updater=Hi,t.stateNode=i,i._reactInternals=t,co(t,r,e,n),t=ho(null,t,r,!0,l,n)):(t.tag=0,b&&l&&Ko(t),xe(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(li(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Wp(r),e=He(r,e),i){case 0:t=po(null,t,r,e,n);break e;case 1:t=ku(null,t,r,e,n);break e;case 11:t=Su(null,t,r,e,n);break e;case 14:t=Eu(null,t,r,He(r.type,e),n);break e}throw Error(I(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:He(r,i),po(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:He(r,i),ku(e,t,r,i,n);case 3:e:{if(jc(t),e===null)throw Error(I(387));r=t.pendingProps,l=t.memoizedState,i=l.element,uc(e,t),_i(t,r,null,n);var u=t.memoizedState;if(r=u.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:u.cache,pendingSuspenseBoundaries:u.pendingSuspenseBoundaries,transitions:u.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){i=Rn(Error(I(423)),t),t=Cu(e,t,r,n,i);break e}else if(r!==i){i=Rn(Error(I(424)),t),t=Cu(e,t,r,n,i);break e}else for(Re=Nt(t.stateNode.containerInfo.firstChild),Pe=t,b=!0,Qe=null,n=oc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Tn(),r===i){t=pt(e,t,n);break e}xe(e,t,r,n)}t=t.child}return t;case 5:return ac(t),e===null&&so(t),r=t.type,i=t.pendingProps,l=e!==null?e.memoizedProps:null,u=i.children,no(r,i)?u=null:l!==null&&no(r,l)&&(t.flags|=32),Fc(e,t),xe(e,t,u,n),t.child;case 6:return e===null&&so(t),null;case 13:return Uc(e,t,n);case 4:return es(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=In(t,null,r,n):xe(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:He(r,i),Su(e,t,r,i,n);case 7:return xe(e,t,t.pendingProps,n),t.child;case 8:return xe(e,t,t.pendingProps.children,n),t.child;case 12:return xe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,l=t.memoizedProps,u=i.value,X(ki,r._currentValue),r._currentValue=u,l!==null)if(Ge(l.value,u)){if(l.children===i.children&&!Ne.current){t=pt(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var a=l.dependencies;if(a!==null){u=l.child;for(var f=a.firstContext;f!==null;){if(f.context===r){if(l.tag===1){f=at(-1,n&-n),f.tag=2;var p=l.updateQueue;if(p!==null){p=p.shared;var x=p.pending;x===null?f.next=f:(f.next=x.next,x.next=f),p.pending=f}}l.lanes|=n,f=l.alternate,f!==null&&(f.lanes|=n),uo(l.return,n,t),a.lanes|=n;break}f=f.next}}else if(l.tag===10)u=l.type===t.type?null:l.child;else if(l.tag===18){if(u=l.return,u===null)throw Error(I(341));u.lanes|=n,a=u.alternate,a!==null&&(a.lanes|=n),uo(u,n,t),u=l.sibling}else u=l.child;if(u!==null)u.return=l;else for(u=l;u!==null;){if(u===t){u=null;break}if(l=u.sibling,l!==null){l.return=u.return,u=l;break}u=u.return}l=u}xe(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,kn(t,n),i=Oe(i),r=r(i),t.flags|=1,xe(e,t,r,n),t.child;case 14:return r=t.type,i=He(r,t.pendingProps),i=He(r.type,i),Eu(e,t,r,i,n);case 15:return Lc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:He(r,i),li(e,t),t.tag=1,Te(r)?(e=!0,xi(t)):e=!1,kn(t,n),Ac(t,r,i),co(t,r,i,n),ho(null,t,r,!0,e,n);case 19:return Bc(e,t,n);case 22:return Dc(e,t,n)}throw Error(I(156,t.tag))};function bc(e,t){return Na(e,t)}function $p(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Me(e,t,n,r){return new $p(e,t,n,r)}function ms(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Wp(e){if(typeof e=="function")return ms(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Fo)return 11;if(e===jo)return 14}return 2}function Rt(e,t){var n=e.alternate;return n===null?(n=Me(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ui(e,t,n,r,i,l){var u=2;if(r=e,typeof e=="function")ms(e)&&(u=1);else if(typeof e=="string")u=5;else e:switch(e){case un:return Kt(n.children,i,l,t);case Do:u=8,i|=8;break;case Fl:return e=Me(12,n,t,i|2),e.elementType=Fl,e.lanes=l,e;case jl:return e=Me(13,n,t,i),e.elementType=jl,e.lanes=l,e;case Ul:return e=Me(19,n,t,i),e.elementType=Ul,e.lanes=l,e;case aa:return Ki(n,i,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case sa:u=10;break e;case ua:u=9;break e;case Fo:u=11;break e;case jo:u=14;break e;case gt:u=16,r=null;break e}throw Error(I(130,e==null?e:typeof e,""))}return t=Me(u,n,t,i),t.elementType=e,t.type=r,t.lanes=l,t}function Kt(e,t,n,r){return e=Me(7,e,r,t),e.lanes=n,e}function Ki(e,t,n,r){return e=Me(22,e,r,t),e.elementType=aa,e.lanes=n,e.stateNode={isHidden:!1},e}function Tl(e,t,n){return e=Me(6,e,null,t),e.lanes=n,e}function Il(e,t,n){return t=Me(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Hp(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ul(0),this.expirationTimes=ul(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ul(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function ys(e,t,n,r,i,l,u,a,f){return e=new Hp(e,t,n,a,f),t===1?(t=1,l===!0&&(t|=8)):t=0,l=Me(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},bo(l),e}function Vp(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(rf)}catch(e){console.error(e)}}rf(),ra.exports=De;var Xp=ra.exports,Uu=Xp;Ll.createRoot=Uu.createRoot,Ll.hydrateRoot=Uu.hydrateRoot;const qp=["created","ready_to_claim","claimed","cancelled"];function Bu(e,t=8){return e.length<=t*2?e:`${e.slice(0,t)}...${e.slice(-t)}`}async function Ji(e){try{const t=await e.json();if(t.error)return t.error}catch{}return`Request failed with status ${e.status}.`}function lf(e){var n;const t=qp.includes(e.status)?e.status:"created";return{id:e.id,usdAmount:e.usdAmount,description:((n=e.description)==null?void 0:n.trim())||"Untitled request",dueDate:e.dueDate||new Date().toISOString().slice(0,10),createdAt:e.createdAt,lockAda:e.lockAda,status:t,beneficiaryLabel:`Eternl ${Bu(e.requesterAddressHex)}`,sponsorLabel:e.sponsorAddressHex?`Sponsor ${Bu(e.sponsorAddressHex)}`:"Sponsor Wallet A",requesterAddressHex:e.requesterAddressHex,sponsorAddressHex:e.sponsorAddressHex,lockLovelace:e.lockLovelace,adaUsdAtCreation:e.adaUsd,coverageMultiplier:e.coverageMultiplier,lockTxId:e.lockTxId,cancelTxId:e.cancelTxId,unlockTxId:e.unlockTxId,lockTxDraft:e.lockTxDraft}}async function Jp(){const e=await fetch("/api/requests");if(!e.ok)throw new Error(await Ji(e));return((await e.json()).requests??[]).map(lf)}async function Zp(e){const t=await fetch("/api/requests",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(await Ji(t));const n=await t.json();return{request:lf({...n.request,lockTxDraft:n.lockTxDraft}),lockTxDraft:n.lockTxDraft}}async function bp(e){const t=await fetch(`/api/requests/${encodeURIComponent(e)}/cancel`,{method:"POST"});if(!t.ok)throw new Error(await Ji(t));return await t.json()}async function eh(e){const t=await fetch(`/api/requests/${encodeURIComponent(e)}/claim`,{method:"POST"});if(!t.ok)throw new Error(await Ji(t));return await t.json()}function th(e,t=10){return e.length<=t*2?e:`${e.slice(0,t)}...${e.slice(-t)}`}function nh({wallet:e,compact:t=!1}){return g.jsxs("section",{className:`panel wallet-panel ${t?"wallet-panel--compact panel--utility":""}`.trim(),children:[g.jsxs("header",{className:"wallet-panel__header",children:[g.jsxs("div",{className:"wallet-panel__title",children:[e.walletIcon?g.jsx("img",{src:e.walletIcon,alt:e.walletName,className:"wallet-icon"}):null,g.jsx("h2",{children:t?"Eternl":e.walletName})]}),g.jsx("span",{className:`status-pill ${e.isConnected?"status-pill--ok":""}`,children:e.isConnected?"Connected":"Disconnected"})]}),e.isInstalled?null:g.jsx("p",{className:"muted",children:t?"Eternl not detected.":"Eternl wallet not detected. Install the browser extension and reload this page."}),e.isInstalled&&e.isConnected?g.jsxs("div",{className:"wallet-meta",children:[g.jsxs("div",{className:"wallet-meta__item",children:[g.jsx("span",{children:"Network"}),g.jsx("strong",{children:e.networkName})]}),g.jsxs("div",{className:"wallet-meta__item",children:[g.jsx("span",{children:"Address (hex)"}),g.jsx("strong",{children:e.primaryAddressHex?th(e.primaryAddressHex):"--"})]})]}):null,e.error?g.jsx("p",{className:"error-text",children:t?"Wallet connection failed.":e.error}):null,g.jsx("div",{className:"wallet-actions",children:e.isConnected?g.jsx("button",{type:"button",className:`button ${t?"button--tertiary":"button--secondary"}`,onClick:e.disconnect,children:"Disconnect"}):g.jsx("button",{type:"button",className:`button ${t?"button--tertiary":"button--primary"}`,onClick:()=>void e.connect(),disabled:!e.isInstalled||e.isConnecting,children:e.isConnecting?"Connecting...":t?"Connect":"Connect Eternl"})})]})}const of=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:2}),rh=new Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}),ih=new Intl.DateTimeFormat("en-US",{month:"short",day:"2-digit",year:"numeric"}),lh=new Intl.DateTimeFormat("en-US",{month:"short",day:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"});function Fi(e){return of.format(e)}function ut(e){return`${rh.format(e)} ADA`}function oh(e){return`${of.format(e)} / ADA`}function sh(e){return ih.format(new Date(e))}function Mu(e){return lh.format(new Date(e))}function uh({adaUsd:e,isLoading:t,error:n,updatedAt:r,onRefresh:i,compact:l=!1}){const u=t?"Refreshing ADA/USD...":n?l?"Price unavailable":n:r?l?`Updated ${Mu(r.toISOString())}`:`Last update: ${Mu(r.toISOString())}`:"Waiting for first quote...";return g.jsxs("section",{className:`panel live-price-panel ${l?"live-price-panel--compact panel--utility":""} ${t?"live-price-panel--loading":""}`.trim(),children:[g.jsxs("header",{className:"panel__header live-price-header",children:[g.jsx("h2",{children:l?"ADA/USD":"Live ADA/USD"}),g.jsx("button",{type:"button",className:`panel-icon-button ${t?"is-loading":""}`.trim(),onClick:()=>void i(),"aria-label":"Refresh ADA/USD quote",title:"Refresh quote",disabled:t,children:g.jsxs("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[g.jsx("path",{d:"M3 12a9 9 0 0 1 15.36-6.36"}),g.jsx("polyline",{points:"19 3 18.36 7.64 13.72 7"}),g.jsx("path",{d:"M21 12a9 9 0 0 1-15.36 6.36"}),g.jsx("polyline",{points:"5 21 5.64 16.36 10.28 17"})]})})]}),g.jsx("p",{className:"live-price-value",children:e?oh(e):"--"}),g.jsx("p",{className:`muted ${n?"negative":""} ${t?"loading-text":""}`,children:u})]})}function ah({value:e,onChange:t}){return g.jsxs("div",{className:"role-switcher-block",children:[g.jsx("p",{className:"role-switcher-label",children:"Who am I?"}),g.jsxs("div",{className:"role-switcher",role:"tablist","aria-label":"Role switcher",children:[g.jsx("button",{type:"button",className:`chip ${e==="applicant"?"chip--active":""}`,onClick:()=>t("applicant"),children:"Applicant"}),g.jsx("button",{type:"button",className:`chip ${e==="sponsor"?"chip--active":""}`,onClick:()=>t("sponsor"),children:"Sponsor"})]})]})}function ai(e,t,n){return t<=0||n<=0?0:e/t*n}function sf(e,t){const n=e.usdAmount/t,r=Math.min(n,e.lockAda),i=Math.max(e.lockAda-n,0),l=e.lockAda{u(!0),f(null);try{const P=await A.enable(),[L,R,U]=await Promise.all([P.getNetworkId(),P.getUsedAddresses({page:0,limit:1}),P.getChangeAddress()]),j=R[0]??U??null;if(!e.current)return;x(A.name||"Eternl"),S(A.icon||null),N(L),B(j),i(!0),f(null)}catch(P){if(!e.current)return;i(!1),N(null),B(null),f(P instanceof Error?P.message:"Wallet connection failed.")}finally{e.current&&u(!1)}},[]),h=$.useCallback(async()=>{const A=zu();if(!A){n(!1),f("Eternl is not detected in this browser.");return}n(!0),await m(A)},[m]),v=$.useCallback(()=>{i(!1),N(null),B(null),f(null)},[]);$.useEffect(()=>(e.current=!0,(async()=>{const P=zu();if(n(!!P),!!P){x(P.name||"Eternl"),S(P.icon||null);try{await P.isEnabled()&&await m(P)}catch(L){e.current&&f(L instanceof Error?L.message:"Could not initialize Eternl.")}}})(),()=>{e.current=!1}),[m]);const T=fh(C);return{isInstalled:t,isConnected:r,isConnecting:l,error:a,walletName:p,walletIcon:w,networkId:C,networkName:T,primaryAddressHex:_,connect:h,disconnect:v}}var xs={};Object.defineProperty(xs,"__esModule",{value:!0});var Zi=xs.dummyLogger=void 0;Zi=xs.dummyLogger={trace:function(e){},debug:function(e){},info:function(e){},warn:function(e){},error:function(e){}};const ph="https://history.pyth-lazer.dourolabs.app/history",hh="https://pyth-lazer-0.dourolabs.app",mh="wss://pyth-lazer-0.dourolabs.app/v1/stream",yh="wss://pyth-lazer-1.dourolabs.app/v1/stream",gh=461928307,Yn={JSON:3302625434,EVM:2593727018,SOLANA:2182742457,LE_ECDSA:1296547300,LE_UNSIGNED:1499680012};var vh=function(e){return e[e.CLIENT_TIMEOUT_BUT_RECONNECTING=4e3]="CLIENT_TIMEOUT_BUT_RECONNECTING",e}({});const wh=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Xr=()=>wh.now(),xh=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),Rl=e=>e===1/0||xh(e);class Ss{constructor({max:t=1/0,ttl:n,updateAgeOnGet:r=!1,checkAgeOnGet:i=!1,noUpdateTTL:l=!1,dispose:u,noDisposeOnSet:a=!1}={}){if(this.expirations=Object.create(null),this.data=new Map,this.expirationMap=new Map,n!==void 0&&!Rl(n))throw new TypeError("ttl must be positive integer or Infinity if set");if(!Rl(t))throw new TypeError("max must be positive integer or Infinity");if(this.ttl=n,this.max=t,this.updateAgeOnGet=!!r,this.checkAgeOnGet=!!i,this.noUpdateTTL=!!l,this.noDisposeOnSet=!!a,u!==void 0){if(typeof u!="function")throw new TypeError("dispose must be function if set");this.dispose=u}this.timer=void 0,this.timerExpiration=void 0}setTimer(t,n){if(this.timerExpiration{this.timer=void 0,this.timerExpiration=void 0,this.purgeStale();for(const i in this.expirations){this.setTimer(i,i-Xr());break}},n);r.unref&&r.unref(),this.timerExpiration=t,this.timer=r}cancelTimer(){this.timer&&(clearTimeout(this.timer),this.timerExpiration=void 0,this.timer=void 0)}cancelTimers(){return process.emitWarning('TTLCache.cancelTimers has been renamed to TTLCache.cancelTimer (no "s"), and will be removed in the next major version update'),this.cancelTimer()}clear(){const t=this.dispose!==Ss.prototype.dispose?[...this]:[];this.data.clear(),this.expirationMap.clear(),this.cancelTimer(),this.expirations=Object.create(null);for(const[n,r]of t)this.dispose(r,n,"delete")}setTTL(t,n=this.ttl){const r=this.expirationMap.get(t);if(r!==void 0){const i=this.expirations[r];!i||i.length<=1?delete this.expirations[r]:this.expirations[r]=i.filter(l=>l!==t)}if(n!==1/0){const i=Math.floor(Xr()+n);this.expirationMap.set(t,i),this.expirations[i]||(this.expirations[i]=[],this.setTimer(i,n)),this.expirations[i].push(t)}else this.expirationMap.set(t,1/0)}set(t,n,{ttl:r=this.ttl,noUpdateTTL:i=this.noUpdateTTL,noDisposeOnSet:l=this.noDisposeOnSet}={}){if(!Rl(r))throw new TypeError("ttl must be positive integer or Infinity");if(this.expirationMap.has(t)){i||this.setTTL(t,r);const u=this.data.get(t);u!==n&&(this.data.set(t,n),l||this.dispose(u,t,"set"))}else this.setTTL(t,r),this.data.set(t,n);for(;this.size>this.max;)this.purgeToCapacity();return this}has(t){return this.data.has(t)}getRemainingTTL(t){const n=this.expirationMap.get(t);return n===1/0?n:n!==void 0?Math.max(0,Math.ceil(n-Xr())):0}get(t,{updateAgeOnGet:n=this.updateAgeOnGet,ttl:r=this.ttl,checkAgeOnGet:i=this.checkAgeOnGet}={}){const l=this.data.get(t);if(i&&this.getRemainingTTL(t)===0){this.delete(t);return}return n&&this.setTTL(t,r),l}dispose(t,n){}delete(t){const n=this.expirationMap.get(t);if(n!==void 0){const r=this.data.get(t);this.data.delete(t),this.expirationMap.delete(t);const i=this.expirations[n];return i&&(i.length<=1?delete this.expirations[n]:this.expirations[n]=i.filter(l=>l!==t)),this.dispose(r,t,"delete"),this.size===0&&this.cancelTimer(),!0}return!1}purgeToCapacity(){for(const t in this.expirations){const n=this.expirations[t];if(this.size-n.length>=this.max){delete this.expirations[t];const r=[];for(const i of n)r.push([i,this.data.get(i)]),this.data.delete(i),this.expirationMap.delete(i);for(const[i,l]of r)this.dispose(l,i,"evict")}else{const r=this.size-this.max,i=[];for(const l of n.splice(0,r))i.push([l,this.data.get(l)]),this.data.delete(l),this.expirationMap.delete(l);for(const[l,u]of i)this.dispose(u,l,"evict");return}}}get size(){return this.data.size}purgeStale(){const t=Math.ceil(Xr());for(const n in this.expirations){if(n==="Infinity"||n>t)return;const r=[...this.expirations[n]||[]],i=[];delete this.expirations[n];for(const l of r)i.push([l,this.data.get(l)]),this.data.delete(l),this.expirationMap.delete(l);for(const[l,u]of i)this.dispose(u,l,"stale")}this.size===0&&this.cancelTimer()}*entries(){for(const t in this.expirations)for(const n of this.expirations[t])yield[n,this.data.get(n)]}*keys(){for(const t in this.expirations)for(const n of this.expirations[t])yield n}*values(){for(const t in this.expirations)for(const n of this.expirations[t])yield this.data.get(n)}[Symbol.iterator](){return this.entries()}}var Sh=Ss;const Eh=Qu(Sh);var on=null;typeof WebSocket<"u"?on=WebSocket:typeof MozWebSocket<"u"?on=MozWebSocket:typeof global<"u"?on=global.WebSocket||global.MozWebSocket:typeof window<"u"?on=window.WebSocket||window.MozWebSocket:typeof self<"u"&&(on=self.WebSocket||self.MozWebSocket);const Ou=on,uf=globalThis;function kh(){return typeof WorkerGlobalScope<"u"&&uf.self instanceof WorkerGlobalScope}function Ch(){return uf.window!==void 0}function af(){return kh()||Ch()}const _h=5e3,Nh=1e3,Th=10;class Ih{constructor(t){K(this,"endpoint");K(this,"wsOptions");K(this,"logger");K(this,"heartbeatTimeoutDurationMs");K(this,"maxRetryDelayMs");K(this,"logAfterRetryCount");K(this,"wsClient");K(this,"wsUserClosed",!1);K(this,"wsFailedAttempts");K(this,"heartbeatTimeout");K(this,"retryTimeout");K(this,"_isReconnecting",!1);K(this,"onError");K(this,"onMessage");K(this,"onReconnect");this.endpoint=t.endpoint,this.wsOptions=t.wsOptions,this.logger=t.logger??Zi,this.heartbeatTimeoutDurationMs=t.heartbeatTimeoutDurationMs??_h,this.maxRetryDelayMs=t.maxRetryDelayMs??Nh,this.logAfterRetryCount=t.logAfterRetryCount??Th,this.wsFailedAttempts=0,this.onError=n=>{},this.onMessage=n=>{},this.onReconnect=()=>{}}isReconnecting(){return this._isReconnecting}isConnected(){var t;return((t=this.wsClient)==null?void 0:t.readyState)===Ou.OPEN}shouldLogRetry(){return this.wsFailedAttempts%this.logAfterRetryCount===0}send(t){this.logger.debug("Sending message"),this.isConnected()?this.wsClient.send(t):this.logger.warn(`WebSocket to ${this.endpoint} is not connected. Cannot send message.`)}startWebSocket(){if(this.wsUserClosed){this.logger.error("Connection was explicitly closed by user. Will not reconnect.");return}if(this.wsClient!==void 0){this.logger.info("WebSocket client already started.");return}this.wsFailedAttempts==0&&this.logger.info("Creating Web Socket client"),this.retryTimeout!==void 0&&(clearTimeout(this.retryTimeout),this.retryTimeout=void 0),this.wsClient=new Ou(this.endpoint,af()?void 0:this.wsOptions),this.wsClient.addEventListener("open",()=>{this.logger.info("WebSocket connection established"),this.wsFailedAttempts=0,this._isReconnecting=!1,this.resetHeartbeat(),this.onReconnect()}),this.wsClient.addEventListener("close",t=>{this.wsUserClosed?this.logger.info(`WebSocket connection to ${this.endpoint} closed by user`):(this.shouldLogRetry()&&this.logger.warn(`WebSocket connection to ${this.endpoint} closed unexpectedly: Code: ${t.code.toString()}`),this.handleReconnect())}),this.wsClient.addEventListener("error",t=>{this.onError(t)}),this.wsClient.addEventListener("message",t=>{this.resetHeartbeat(),this.onMessage(t.data)}),"on"in this.wsClient&&this.wsClient.on("ping",()=>{this.logger.info("Ping received"),this.resetHeartbeat()})}resetHeartbeat(){this.heartbeatTimeout!==void 0&&clearTimeout(this.heartbeatTimeout),this.heartbeatTimeout=setTimeout(()=>{const t="Connection timed out. Reconnecting...";this.logger.warn(t),this.wsClient&&(typeof this.wsClient.terminate=="function"?this.wsClient.terminate():this.wsClient.close(vh.CLIENT_TIMEOUT_BUT_RECONNECTING,t)),this.handleReconnect()},this.heartbeatTimeoutDurationMs)}handleReconnect(){if(this.wsUserClosed){this.logger.info("WebSocket connection closed by user, not reconnecting.");return}this.heartbeatTimeout!==void 0&&clearTimeout(this.heartbeatTimeout),this.retryTimeout!==void 0&&clearTimeout(this.retryTimeout),this.wsFailedAttempts+=1,this.wsClient=void 0,this._isReconnecting=!0,this.shouldLogRetry()&&this.logger.error("Connection closed unexpectedly or because of timeout. Reconnecting after "+String(this.retryDelayMs())+"ms."),this.retryTimeout=setTimeout(()=>{this.startWebSocket()},this.retryDelayMs())}closeWebSocket(){this.wsClient!==void 0&&(this.wsClient.close(),this.wsClient=void 0),this.wsUserClosed=!0}retryDelayMs(){return this.wsFailedAttempts>=10?this.maxRetryDelayMs:Math.min(2**this.wsFailedAttempts*10,this.maxRetryDelayMs)}}var cf={},bi={};bi.byteLength=Ph;bi.toByteArray=Dh;bi.fromByteArray=Uh;var tt=[],je=[],Ah=typeof Uint8Array<"u"?Uint8Array:Array,Pl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var ln=0,Rh=Pl.length;ln0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function Ph(e){var t=ff(e),n=t[0],r=t[1];return(n+r)*3/4-r}function Lh(e,t,n){return(t+n)*3/4-n}function Dh(e){var t,n=ff(e),r=n[0],i=n[1],l=new Ah(Lh(e,r,i)),u=0,a=i>0?r-4:r,f;for(f=0;f>16&255,l[u++]=t>>8&255,l[u++]=t&255;return i===2&&(t=je[e.charCodeAt(f)]<<2|je[e.charCodeAt(f+1)]>>4,l[u++]=t&255),i===1&&(t=je[e.charCodeAt(f)]<<10|je[e.charCodeAt(f+1)]<<4|je[e.charCodeAt(f+2)]>>2,l[u++]=t>>8&255,l[u++]=t&255),l}function Fh(e){return tt[e>>18&63]+tt[e>>12&63]+tt[e>>6&63]+tt[e&63]}function jh(e,t,n){for(var r,i=[],l=t;la?a:u+l));return r===1?(t=e[n-1],i.push(tt[t>>2]+tt[t<<4&63]+"==")):r===2&&(t=(e[n-2]<<8)+e[n-1],i.push(tt[t>>10]+tt[t>>4&63]+tt[t<<2&63]+"=")),i.join("")}var Es={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */Es.read=function(e,t,n,r,i){var l,u,a=i*8-r-1,f=(1<>1,x=-7,w=n?i-1:0,S=n?-1:1,C=e[t+w];for(w+=S,l=C&(1<<-x)-1,C>>=-x,x+=a;x>0;l=l*256+e[t+w],w+=S,x-=8);for(u=l&(1<<-x)-1,l>>=-x,x+=r;x>0;u=u*256+e[t+w],w+=S,x-=8);if(l===0)l=1-p;else{if(l===f)return u?NaN:(C?-1:1)*(1/0);u=u+Math.pow(2,r),l=l-p}return(C?-1:1)*u*Math.pow(2,l-r)};Es.write=function(e,t,n,r,i,l){var u,a,f,p=l*8-i-1,x=(1<>1,S=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=r?0:l-1,N=r?1:-1,_=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,u=x):(u=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-u))<1&&(u--,f*=2),u+w>=1?t+=S/f:t+=S*Math.pow(2,1-w),t*f>=2&&(u++,f/=2),u+w>=x?(a=0,u=x):u+w>=1?(a=(t*f-1)*Math.pow(2,i),u=u+w):(a=t*Math.pow(2,w-1)*Math.pow(2,i),u=0));i>=8;e[n+C]=a&255,C+=N,a/=256,i-=8);for(u=u<0;e[n+C]=u&255,C+=N,u/=256,p-=8);e[n+C-N]|=_*128};/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */(function(e){const t=bi,n=Es,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=h,e.INSPECT_MAX_BYTES=50;const i=2147483647;e.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=l(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function l(){try{const c=new Uint8Array(1),o={foo:function(){return 42}};return Object.setPrototypeOf(o,Uint8Array.prototype),Object.setPrototypeOf(c,o),c.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function u(c){if(c>i)throw new RangeError('The value "'+c+'" is invalid for option "size"');const o=new Uint8Array(c);return Object.setPrototypeOf(o,a.prototype),o}function a(c,o,s){if(typeof c=="number"){if(typeof o=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return w(c)}return f(c,o,s)}a.poolSize=8192;function f(c,o,s){if(typeof c=="string")return S(c,o);if(ArrayBuffer.isView(c))return N(c);if(c==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof c);if(Je(c,ArrayBuffer)||c&&Je(c.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Je(c,SharedArrayBuffer)||c&&Je(c.buffer,SharedArrayBuffer)))return _(c,o,s);if(typeof c=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const d=c.valueOf&&c.valueOf();if(d!=null&&d!==c)return a.from(d,o,s);const y=B(c);if(y)return y;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof c[Symbol.toPrimitive]=="function")return a.from(c[Symbol.toPrimitive]("string"),o,s);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof c)}a.from=function(c,o,s){return f(c,o,s)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function p(c){if(typeof c!="number")throw new TypeError('"size" argument must be of type number');if(c<0)throw new RangeError('The value "'+c+'" is invalid for option "size"')}function x(c,o,s){return p(c),c<=0?u(c):o!==void 0?typeof s=="string"?u(c).fill(o,s):u(c).fill(o):u(c)}a.alloc=function(c,o,s){return x(c,o,s)};function w(c){return p(c),u(c<0?0:m(c)|0)}a.allocUnsafe=function(c){return w(c)},a.allocUnsafeSlow=function(c){return w(c)};function S(c,o){if((typeof o!="string"||o==="")&&(o="utf8"),!a.isEncoding(o))throw new TypeError("Unknown encoding: "+o);const s=v(c,o)|0;let d=u(s);const y=d.write(c,o);return y!==s&&(d=d.slice(0,y)),d}function C(c){const o=c.length<0?0:m(c.length)|0,s=u(o);for(let d=0;d=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return c|0}function h(c){return+c!=c&&(c=0),a.alloc(+c)}a.isBuffer=function(o){return o!=null&&o._isBuffer===!0&&o!==a.prototype},a.compare=function(o,s){if(Je(o,Uint8Array)&&(o=a.from(o,o.offset,o.byteLength)),Je(s,Uint8Array)&&(s=a.from(s,s.offset,s.byteLength)),!a.isBuffer(o)||!a.isBuffer(s))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(o===s)return 0;let d=o.length,y=s.length;for(let E=0,k=Math.min(d,y);Ey.length?(a.isBuffer(k)||(k=a.from(k)),k.copy(y,E)):Uint8Array.prototype.set.call(y,k,E);else if(a.isBuffer(k))k.copy(y,E);else throw new TypeError('"list" argument must be an Array of Buffers');E+=k.length}return y};function v(c,o){if(a.isBuffer(c))return c.length;if(ArrayBuffer.isView(c)||Je(c,ArrayBuffer))return c.byteLength;if(typeof c!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof c);const s=c.length,d=arguments.length>2&&arguments[2]===!0;if(!d&&s===0)return 0;let y=!1;for(;;)switch(o){case"ascii":case"latin1":case"binary":return s;case"utf8":case"utf-8":return tl(c).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return s*2;case"hex":return s>>>1;case"base64":return Ts(c).length;default:if(y)return d?-1:tl(c).length;o=(""+o).toLowerCase(),y=!0}}a.byteLength=v;function T(c,o,s){let d=!1;if((o===void 0||o<0)&&(o=0),o>this.length||((s===void 0||s>this.length)&&(s=this.length),s<=0)||(s>>>=0,o>>>=0,s<=o))return"";for(c||(c="utf8");;)switch(c){case"hex":return M(this,o,s);case"utf8":case"utf-8":return jn(this,o,s);case"ascii":return Bn(this,o,s);case"latin1":case"binary":return D(this,o,s);case"base64":return Bt(this,o,s);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,o,s);default:if(d)throw new TypeError("Unknown encoding: "+c);c=(c+"").toLowerCase(),d=!0}}a.prototype._isBuffer=!0;function A(c,o,s){const d=c[o];c[o]=c[s],c[s]=d}a.prototype.swap16=function(){const o=this.length;if(o%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let s=0;ss&&(o+=" ... "),""},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(o,s,d,y,E){if(Je(o,Uint8Array)&&(o=a.from(o,o.offset,o.byteLength)),!a.isBuffer(o))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof o);if(s===void 0&&(s=0),d===void 0&&(d=o?o.length:0),y===void 0&&(y=0),E===void 0&&(E=this.length),s<0||d>o.length||y<0||E>this.length)throw new RangeError("out of range index");if(y>=E&&s>=d)return 0;if(y>=E)return-1;if(s>=d)return 1;if(s>>>=0,d>>>=0,y>>>=0,E>>>=0,this===o)return 0;let k=E-y,W=d-s;const ie=Math.min(k,W),Z=this.slice(y,E),le=o.slice(s,d);for(let G=0;G2147483647?s=2147483647:s<-2147483648&&(s=-2147483648),s=+s,nl(s)&&(s=y?0:c.length-1),s<0&&(s=c.length+s),s>=c.length){if(y)return-1;s=c.length-1}else if(s<0)if(y)s=0;else return-1;if(typeof o=="string"&&(o=a.from(o,d)),a.isBuffer(o))return o.length===0?-1:L(c,o,s,d,y);if(typeof o=="number")return o=o&255,typeof Uint8Array.prototype.indexOf=="function"?y?Uint8Array.prototype.indexOf.call(c,o,s):Uint8Array.prototype.lastIndexOf.call(c,o,s):L(c,[o],s,d,y);throw new TypeError("val must be string, number or Buffer")}function L(c,o,s,d,y){let E=1,k=c.length,W=o.length;if(d!==void 0&&(d=String(d).toLowerCase(),d==="ucs2"||d==="ucs-2"||d==="utf16le"||d==="utf-16le")){if(c.length<2||o.length<2)return-1;E=2,k/=2,W/=2,s/=2}function ie(le,G){return E===1?le[G]:le.readUInt16BE(G*E)}let Z;if(y){let le=-1;for(Z=s;Zk&&(s=k-W),Z=s;Z>=0;Z--){let le=!0;for(let G=0;Gy&&(d=y)):d=y;const E=o.length;d>E/2&&(d=E/2);let k;for(k=0;k>>0,isFinite(d)?(d=d>>>0,y===void 0&&(y="utf8")):(y=d,d=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const E=this.length-s;if((d===void 0||d>E)&&(d=E),o.length>0&&(d<0||s<0)||s>this.length)throw new RangeError("Attempt to write outside buffer bounds");y||(y="utf8");let k=!1;for(;;)switch(y){case"hex":return R(this,o,s,d);case"utf8":case"utf-8":return U(this,o,s,d);case"ascii":case"latin1":case"binary":return j(this,o,s,d);case"base64":return ee(this,o,s,d);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ut(this,o,s,d);default:if(k)throw new TypeError("Unknown encoding: "+y);y=(""+y).toLowerCase(),k=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Bt(c,o,s){return o===0&&s===c.length?t.fromByteArray(c):t.fromByteArray(c.slice(o,s))}function jn(c,o,s){s=Math.min(c.length,s);const d=[];let y=o;for(;y239?4:E>223?3:E>191?2:1;if(y+W<=s){let ie,Z,le,G;switch(W){case 1:E<128&&(k=E);break;case 2:ie=c[y+1],(ie&192)===128&&(G=(E&31)<<6|ie&63,G>127&&(k=G));break;case 3:ie=c[y+1],Z=c[y+2],(ie&192)===128&&(Z&192)===128&&(G=(E&15)<<12|(ie&63)<<6|Z&63,G>2047&&(G<55296||G>57343)&&(k=G));break;case 4:ie=c[y+1],Z=c[y+2],le=c[y+3],(ie&192)===128&&(Z&192)===128&&(le&192)===128&&(G=(E&15)<<18|(ie&63)<<12|(Z&63)<<6|le&63,G>65535&&G<1114112&&(k=G))}}k===null?(k=65533,W=1):k>65535&&(k-=65536,d.push(k>>>10&1023|55296),k=56320|k&1023),d.push(k),y+=W}return Un(d)}const Rr=4096;function Un(c){const o=c.length;if(o<=Rr)return String.fromCharCode.apply(String,c);let s="",d=0;for(;dd)&&(s=d);let y="";for(let E=o;Ed&&(o=d),s<0?(s+=d,s<0&&(s=0)):s>d&&(s=d),ss)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(o,s,d){o=o>>>0,s=s>>>0,d||O(o,s,this.length);let y=this[o],E=1,k=0;for(;++k>>0,s=s>>>0,d||O(o,s,this.length);let y=this[o+--s],E=1;for(;s>0&&(E*=256);)y+=this[o+--s]*E;return y},a.prototype.readUint8=a.prototype.readUInt8=function(o,s){return o=o>>>0,s||O(o,1,this.length),this[o]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(o,s){return o=o>>>0,s||O(o,2,this.length),this[o]|this[o+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(o,s){return o=o>>>0,s||O(o,2,this.length),this[o]<<8|this[o+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(o,s){return o=o>>>0,s||O(o,4,this.length),(this[o]|this[o+1]<<8|this[o+2]<<16)+this[o+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(o,s){return o=o>>>0,s||O(o,4,this.length),this[o]*16777216+(this[o+1]<<16|this[o+2]<<8|this[o+3])},a.prototype.readBigUInt64LE=mt(function(o){o=o>>>0,nn(o,"offset");const s=this[o],d=this[o+7];(s===void 0||d===void 0)&&Mn(o,this.length-8);const y=s+this[++o]*2**8+this[++o]*2**16+this[++o]*2**24,E=this[++o]+this[++o]*2**8+this[++o]*2**16+d*2**24;return BigInt(y)+(BigInt(E)<>>0,nn(o,"offset");const s=this[o],d=this[o+7];(s===void 0||d===void 0)&&Mn(o,this.length-8);const y=s*2**24+this[++o]*2**16+this[++o]*2**8+this[++o],E=this[++o]*2**24+this[++o]*2**16+this[++o]*2**8+d;return(BigInt(y)<>>0,s=s>>>0,d||O(o,s,this.length);let y=this[o],E=1,k=0;for(;++k=E&&(y-=Math.pow(2,8*s)),y},a.prototype.readIntBE=function(o,s,d){o=o>>>0,s=s>>>0,d||O(o,s,this.length);let y=s,E=1,k=this[o+--y];for(;y>0&&(E*=256);)k+=this[o+--y]*E;return E*=128,k>=E&&(k-=Math.pow(2,8*s)),k},a.prototype.readInt8=function(o,s){return o=o>>>0,s||O(o,1,this.length),this[o]&128?(255-this[o]+1)*-1:this[o]},a.prototype.readInt16LE=function(o,s){o=o>>>0,s||O(o,2,this.length);const d=this[o]|this[o+1]<<8;return d&32768?d|4294901760:d},a.prototype.readInt16BE=function(o,s){o=o>>>0,s||O(o,2,this.length);const d=this[o+1]|this[o]<<8;return d&32768?d|4294901760:d},a.prototype.readInt32LE=function(o,s){return o=o>>>0,s||O(o,4,this.length),this[o]|this[o+1]<<8|this[o+2]<<16|this[o+3]<<24},a.prototype.readInt32BE=function(o,s){return o=o>>>0,s||O(o,4,this.length),this[o]<<24|this[o+1]<<16|this[o+2]<<8|this[o+3]},a.prototype.readBigInt64LE=mt(function(o){o=o>>>0,nn(o,"offset");const s=this[o],d=this[o+7];(s===void 0||d===void 0)&&Mn(o,this.length-8);const y=this[o+4]+this[o+5]*2**8+this[o+6]*2**16+(d<<24);return(BigInt(y)<>>0,nn(o,"offset");const s=this[o],d=this[o+7];(s===void 0||d===void 0)&&Mn(o,this.length-8);const y=(s<<24)+this[++o]*2**16+this[++o]*2**8+this[++o];return(BigInt(y)<>>0,s||O(o,4,this.length),n.read(this,o,!0,23,4)},a.prototype.readFloatBE=function(o,s){return o=o>>>0,s||O(o,4,this.length),n.read(this,o,!1,23,4)},a.prototype.readDoubleLE=function(o,s){return o=o>>>0,s||O(o,8,this.length),n.read(this,o,!0,52,8)},a.prototype.readDoubleBE=function(o,s){return o=o>>>0,s||O(o,8,this.length),n.read(this,o,!1,52,8)};function V(c,o,s,d,y,E){if(!a.isBuffer(c))throw new TypeError('"buffer" argument must be a Buffer instance');if(o>y||oc.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(o,s,d,y){if(o=+o,s=s>>>0,d=d>>>0,!y){const W=Math.pow(2,8*d)-1;V(this,o,s,d,W,0)}let E=1,k=0;for(this[s]=o&255;++k>>0,d=d>>>0,!y){const W=Math.pow(2,8*d)-1;V(this,o,s,d,W,0)}let E=d-1,k=1;for(this[s+E]=o&255;--E>=0&&(k*=256);)this[s+E]=o/k&255;return s+d},a.prototype.writeUint8=a.prototype.writeUInt8=function(o,s,d){return o=+o,s=s>>>0,d||V(this,o,s,1,255,0),this[s]=o&255,s+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(o,s,d){return o=+o,s=s>>>0,d||V(this,o,s,2,65535,0),this[s]=o&255,this[s+1]=o>>>8,s+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(o,s,d){return o=+o,s=s>>>0,d||V(this,o,s,2,65535,0),this[s]=o>>>8,this[s+1]=o&255,s+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(o,s,d){return o=+o,s=s>>>0,d||V(this,o,s,4,4294967295,0),this[s+3]=o>>>24,this[s+2]=o>>>16,this[s+1]=o>>>8,this[s]=o&255,s+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(o,s,d){return o=+o,s=s>>>0,d||V(this,o,s,4,4294967295,0),this[s]=o>>>24,this[s+1]=o>>>16,this[s+2]=o>>>8,this[s+3]=o&255,s+4};function Mt(c,o,s,d,y){Ns(o,d,y,c,s,7);let E=Number(o&BigInt(4294967295));c[s++]=E,E=E>>8,c[s++]=E,E=E>>8,c[s++]=E,E=E>>8,c[s++]=E;let k=Number(o>>BigInt(32)&BigInt(4294967295));return c[s++]=k,k=k>>8,c[s++]=k,k=k>>8,c[s++]=k,k=k>>8,c[s++]=k,s}function Xe(c,o,s,d,y){Ns(o,d,y,c,s,7);let E=Number(o&BigInt(4294967295));c[s+7]=E,E=E>>8,c[s+6]=E,E=E>>8,c[s+5]=E,E=E>>8,c[s+4]=E;let k=Number(o>>BigInt(32)&BigInt(4294967295));return c[s+3]=k,k=k>>8,c[s+2]=k,k=k>>8,c[s+1]=k,k=k>>8,c[s]=k,s+8}a.prototype.writeBigUInt64LE=mt(function(o,s=0){return Mt(this,o,s,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=mt(function(o,s=0){return Xe(this,o,s,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(o,s,d,y){if(o=+o,s=s>>>0,!y){const ie=Math.pow(2,8*d-1);V(this,o,s,d,ie-1,-ie)}let E=0,k=1,W=0;for(this[s]=o&255;++E>0)-W&255;return s+d},a.prototype.writeIntBE=function(o,s,d,y){if(o=+o,s=s>>>0,!y){const ie=Math.pow(2,8*d-1);V(this,o,s,d,ie-1,-ie)}let E=d-1,k=1,W=0;for(this[s+E]=o&255;--E>=0&&(k*=256);)o<0&&W===0&&this[s+E+1]!==0&&(W=1),this[s+E]=(o/k>>0)-W&255;return s+d},a.prototype.writeInt8=function(o,s,d){return o=+o,s=s>>>0,d||V(this,o,s,1,127,-128),o<0&&(o=255+o+1),this[s]=o&255,s+1},a.prototype.writeInt16LE=function(o,s,d){return o=+o,s=s>>>0,d||V(this,o,s,2,32767,-32768),this[s]=o&255,this[s+1]=o>>>8,s+2},a.prototype.writeInt16BE=function(o,s,d){return o=+o,s=s>>>0,d||V(this,o,s,2,32767,-32768),this[s]=o>>>8,this[s+1]=o&255,s+2},a.prototype.writeInt32LE=function(o,s,d){return o=+o,s=s>>>0,d||V(this,o,s,4,2147483647,-2147483648),this[s]=o&255,this[s+1]=o>>>8,this[s+2]=o>>>16,this[s+3]=o>>>24,s+4},a.prototype.writeInt32BE=function(o,s,d){return o=+o,s=s>>>0,d||V(this,o,s,4,2147483647,-2147483648),o<0&&(o=4294967295+o+1),this[s]=o>>>24,this[s+1]=o>>>16,this[s+2]=o>>>8,this[s+3]=o&255,s+4},a.prototype.writeBigInt64LE=mt(function(o,s=0){return Mt(this,o,s,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=mt(function(o,s=0){return Xe(this,o,s,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function en(c,o,s,d,y,E){if(s+d>c.length)throw new RangeError("Index out of range");if(s<0)throw new RangeError("Index out of range")}function qe(c,o,s,d,y){return o=+o,s=s>>>0,y||en(c,o,s,4),n.write(c,o,s,d,23,4),s+4}a.prototype.writeFloatLE=function(o,s,d){return qe(this,o,s,!0,d)},a.prototype.writeFloatBE=function(o,s,d){return qe(this,o,s,!1,d)};function zt(c,o,s,d,y){return o=+o,s=s>>>0,y||en(c,o,s,8),n.write(c,o,s,d,52,8),s+8}a.prototype.writeDoubleLE=function(o,s,d){return zt(this,o,s,!0,d)},a.prototype.writeDoubleBE=function(o,s,d){return zt(this,o,s,!1,d)},a.prototype.copy=function(o,s,d,y){if(!a.isBuffer(o))throw new TypeError("argument should be a Buffer");if(d||(d=0),!y&&y!==0&&(y=this.length),s>=o.length&&(s=o.length),s||(s=0),y>0&&y=this.length)throw new RangeError("Index out of range");if(y<0)throw new RangeError("sourceEnd out of bounds");y>this.length&&(y=this.length),o.length-s>>0,d=d===void 0?this.length:d>>>0,o||(o=0);let E;if(typeof o=="number")for(E=s;E2**32?y=_s(String(s)):typeof s=="bigint"&&(y=String(s),(s>BigInt(2)**BigInt(32)||s<-(BigInt(2)**BigInt(32)))&&(y=_s(y)),y+="n"),d+=` It must be ${o}. Received ${y}`,d},RangeError);function _s(c){let o="",s=c.length;const d=c[0]==="-"?1:0;for(;s>=d+4;s-=3)o=`_${c.slice(s-3,s)}${o}`;return`${c.slice(0,s)}${o}`}function hf(c,o,s){nn(o,"offset"),(c[o]===void 0||c[o+s]===void 0)&&Mn(o,c.length-(s+1))}function Ns(c,o,s,d,y,E){if(c>s||c= 0${k} and < 2${k} ** ${(E+1)*8}${k}`:W=`>= -(2${k} ** ${(E+1)*8-1}${k}) and < 2 ** ${(E+1)*8-1}${k}`,new tn.ERR_OUT_OF_RANGE("value",W,c)}hf(d,y,E)}function nn(c,o){if(typeof c!="number")throw new tn.ERR_INVALID_ARG_TYPE(o,"number",c)}function Mn(c,o,s){throw Math.floor(c)!==c?(nn(c,s),new tn.ERR_OUT_OF_RANGE("offset","an integer",c)):o<0?new tn.ERR_BUFFER_OUT_OF_BOUNDS:new tn.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${o}`,c)}const mf=/[^+/0-9A-Za-z-_]/g;function yf(c){if(c=c.split("=")[0],c=c.trim().replace(mf,""),c.length<2)return"";for(;c.length%4!==0;)c=c+"=";return c}function tl(c,o){o=o||1/0;let s;const d=c.length;let y=null;const E=[];for(let k=0;k55295&&s<57344){if(!y){if(s>56319){(o-=3)>-1&&E.push(239,191,189);continue}else if(k+1===d){(o-=3)>-1&&E.push(239,191,189);continue}y=s;continue}if(s<56320){(o-=3)>-1&&E.push(239,191,189),y=s;continue}s=(y-55296<<10|s-56320)+65536}else y&&(o-=3)>-1&&E.push(239,191,189);if(y=null,s<128){if((o-=1)<0)break;E.push(s)}else if(s<2048){if((o-=2)<0)break;E.push(s>>6|192,s&63|128)}else if(s<65536){if((o-=3)<0)break;E.push(s>>12|224,s>>6&63|128,s&63|128)}else if(s<1114112){if((o-=4)<0)break;E.push(s>>18|240,s>>12&63|128,s>>6&63|128,s&63|128)}else throw new Error("Invalid code point")}return E}function gf(c){const o=[];for(let s=0;s>8,y=s%256,E.push(y),E.push(d);return E}function Ts(c){return t.toByteArray(yf(c))}function Pr(c,o,s,d){let y;for(y=0;y=o.length||y>=c.length);++y)o[y+s]=c[y];return y}function Je(c,o){return c instanceof o||c!=null&&c.constructor!=null&&c.constructor.name!=null&&c.constructor.name===o.name}function nl(c){return c!==c}const wf=function(){const c="0123456789abcdef",o=new Array(256);for(let s=0;s<16;++s){const d=s*16;for(let y=0;y<16;++y)o[d+y]=c[s]+c[y]}return o}();function mt(c){return typeof BigInt>"u"?xf:c}function xf(){throw new Error("BigInt not supported")}})(cf);const Gn="Buffer"in globalThis?globalThis.Buffer:cf.Buffer;async function df(e){return typeof e=="string"?Gn.from(new TextEncoder().encode(e).buffer):e instanceof Gn?e:e instanceof Blob?Gn.from(await e.arrayBuffer()):e instanceof ArrayBuffer?Gn.from(e):Array.isArray(e)?Gn.concat(e):e}const Bh="ACCESS_TOKEN";function Mh(e,t){if(!e||!t)return e;const n=new URL(e);return n.searchParams.set(Bh,t),n.toString()}const zh=4;class ks{constructor(t){K(this,"logger");K(this,"rwsPool");K(this,"cache");K(this,"subscriptions");K(this,"messageListeners");K(this,"allConnectionsDownListeners");K(this,"wasAllDown",!0);K(this,"checkConnectionStatesInterval");K(this,"dedupeHandler",async t=>{const n=await this.constructCacheKeyFromWebsocketData(t);if(this.cache.has(n)){this.logger.debug("Dropping duplicate message");return}this.cache.set(n,!0),typeof t=="string"&&this.handleErrorMessages(t),await Promise.all(this.messageListeners.map(r=>r(t)))});this.logger=t,this.rwsPool=[],this.cache=new Eh({ttl:1e3*10}),this.subscriptions=new Map,this.messageListeners=[],this.allConnectionsDownListeners=[],this.checkConnectionStatesInterval=setInterval(()=>{this.checkConnectionStates()},100)}static async create(t,n,r){var f;const i=t.urls??[mh,yh],l=r??Zi,u=new ks(l),a=t.numConnections??zh;for(let p=0;p{if(!N.wsUserClosed)for(const[,_]of u.subscriptions)try{N.send(JSON.stringify(_))}catch(B){u.logger.error("Failed to resend subscription on reconnect:",B)}},t.onError&&(N.onError=t.onError),N.onMessage=_=>{u.dedupeHandler(_).catch(B=>{const m=`An error occurred in the WebSocket pool's dedupeHandler: ${B instanceof Error?B.message:String(B)}`;throw new Error(m)})},u.rwsPool.push(N),N.startWebSocket()}for(u.logger.info(`Started WebSocketPool with ${a.toString()} connections. Waiting for at least one to connect...`);!u.isAnyConnectionEstablished();)await new Promise(p=>setTimeout(p,100));return u.logger.info("At least one WebSocket connection is established. WebSocketPool is ready."),u}handleErrorMessages(t){const n=JSON.parse(t);if(n.type==="subscriptionError")throw new Error(`Error occurred for subscription ID ${String(n.subscriptionId)}: ${n.error}`);if(n.type==="error")throw new Error(`Error: ${n.error}`)}async constructCacheKeyFromWebsocketData(t){return typeof t=="string"?t:(await df(t)).toString("hex")}sendRequest(t){for(const n of this.rwsPool)n.send(JSON.stringify(t))}addSubscription(t){if(t.type!=="subscribe")throw new Error("Request must be a subscribe request");this.subscriptions.set(t.subscriptionId,t),this.sendRequest(t)}removeSubscription(t){this.subscriptions.delete(t);const n={type:"unsubscribe",subscriptionId:t};this.sendRequest(n)}addMessageListener(t){this.messageListeners.push(t)}addAllConnectionsDownListener(t){this.allConnectionsDownListeners.push(t)}areAllConnectionsDown(){return this.rwsPool.every(t=>!t.isConnected()||t.isReconnecting())}isAnyConnectionEstablished(){return this.rwsPool.some(t=>t.isConnected())}checkConnectionStates(){const t=this.areAllConnectionsDown();if(t&&!this.wasAllDown){this.wasAllDown=!0,this.logger.error("All WebSocket connections are down or reconnecting");for(const n of this.allConnectionsDownListeners)n()}!t&&this.wasAllDown&&(this.wasAllDown=!1)}shutdown(){for(const t of this.rwsPool)t.closeWebSocket();this.rwsPool=[],this.subscriptions.clear(),this.messageListeners=[],this.allConnectionsDownListeners=[],clearInterval(this.checkConnectionStatesInterval)}}const $u=2,qr=4,Wu=8;class Cs{constructor(t,n,r,i,l){K(this,"token");K(this,"metadataServiceUrl");K(this,"priceServiceUrl");K(this,"logger");K(this,"wsp");this.token=t,this.metadataServiceUrl=n,this.priceServiceUrl=r,this.logger=i,this.wsp=l}getWebSocketPool(){if(!this.wsp)throw new Error("WebSocket pool is not available. Make sure to provide webSocketPoolConfig when creating the client.");return this.wsp}static async create(t){const n=t.token,r=(t.metadataServiceUrl??ph).replace(/\/+$/,""),i=(t.priceServiceUrl??hh).replace(/\/+$/,""),l=t.logger??Zi;let u;return t.webSocketPoolConfig&&(u=await ks.create(t.webSocketPoolConfig,n,l)),new Cs(n,r,i,l,u)}addMessageListener(t){this.getWebSocketPool().addMessageListener(async r=>{if(typeof r=="string"){t({type:"json",value:JSON.parse(r)});return}const i=await df(r);let l=0;const u=i.subarray(l,l+qr).readUint32LE();if(l+=qr,u!=gh)throw new Error("binary update format magic mismatch");const a=Number(i.subarray(l,l+Wu).readBigInt64BE());l+=Wu;const f={subscriptionId:a};for(;l{var S;n.current&&x(!0);try{t.current||(t.current=await Cs.create({token:e}));const N=(S=(await t.current.getLatestPrice({channel:Oh,formats:["solana"],parsed:!0,jsonBinaryEncoding:"hex",priceFeedIds:[Hu],properties:["price","exponent"]})).parsed)==null?void 0:S.priceFeeds.find(B=>B.priceFeedId===Hu);if(!(N!=null&&N.price)||N.exponent===void 0)throw new Error("Pyth response did not include ADA/USD price and exponent.");const _=Wh(N.price,N.exponent);n.current&&(i(_),f(new Date),u(null))}catch(C){n.current&&u(C instanceof Error?C.message:"Unexpected error while fetching price.")}finally{n.current&&x(!1)}},[e]);return $.useEffect(()=>{n.current=!0;const S=async()=>{n.current&&await w()};S();const C=window.setInterval(()=>{S()},$h);return()=>{n.current=!1,window.clearInterval(C)}},[w]),{adaUsd:r,isLoading:p,error:l,updatedAt:a,refreshNow:w}}const Vh={created:"Created",ready_to_claim:"Ready to claim",claimed:"Claimed",cancelled:"Cancelled"};function Qh({status:e}){return g.jsx("span",{className:`status-badge status-badge--${e}`,children:Vh[e]})}function Kh({request:e,role:t,adaUsd:n,onClaim:r,onCancel:i}){const l=e.usdAmount/n,u=e.status==="ready_to_claim",a=e.status==="created"||e.status==="ready_to_claim",f=e.lockAdar==null?void 0:r(e.id),children:"Claim now"}):null,t==="sponsor"&&a?g.jsx("button",{className:"button button--secondary",type:"button",onClick:()=>i==null?void 0:i(e.id),children:"Cancel request"}):null,e.settlement?g.jsxs("section",{className:"settlement-result",children:[g.jsx("h4",{children:"Settlement result"}),g.jsxs("p",{children:["Sent to user: ",g.jsx("strong",{children:ut(e.settlement.sentAda)})]}),e.settlement.wasUnderfunded?g.jsxs("p",{children:["Underfunded claim. Locked collateral fully sent. Shortfall:"," ",g.jsx("strong",{children:Fi(e.settlement.shortfallUsd)})]}):g.jsxs("p",{children:["Returned to sponsor: ",g.jsx("strong",{children:ut(e.settlement.sponsorChangeAda)})]}),g.jsxs("p",{className:"muted",children:["Executed with ADA/USD ",e.settlement.executedAdaUsd.toFixed(2)]})]}):null,e.lockTxId||e.unlockTxId||e.cancelTxId?g.jsxs("section",{className:"tx-meta",children:[e.lockTxId?g.jsxs("p",{className:"muted",children:["Lock tx: ",g.jsx("code",{children:e.lockTxId})]}):null,e.unlockTxId?g.jsxs("p",{className:"muted",children:["Claim tx: ",g.jsx("code",{children:e.unlockTxId})]}):null,e.cancelTxId?g.jsxs("p",{className:"muted",children:["Cancel tx: ",g.jsx("code",{children:e.cancelTxId})]}):null]}):null]})}function pf({title:e,items:t,role:n,adaUsd:r,emptyText:i,filters:l,className:u,embedded:a=!1,onClaim:f,onCancel:p}){const x=g.jsxs(g.Fragment,{children:[l?g.jsx("div",{className:"filter-row request-list-filters",children:l}):null,t.length===0?g.jsx("p",{className:"empty-state",children:i}):null,g.jsx("div",{className:"request-list",children:t.map(w=>g.jsx(Kh,{request:w,role:n,adaUsd:r,onClaim:f,onCancel:p},w.id))})]});return a?x:g.jsxs("section",{className:`panel request-list-panel ${u??""}`.trim(),children:[g.jsx("header",{className:"panel__header",children:g.jsx("h2",{children:e})}),x]})}function Yh({requests:e,adaUsd:t,onCancel:n}){const r=e.filter(f=>f.status!=="claimed"&&f.status!=="cancelled"),i=r.reduce((f,p)=>f+p.lockAda,0),l=r.reduce((f,p)=>f+p.usdAmount/t,0),u=i-l,a=r.reduce((f,p)=>f+p.usdAmount,0);return g.jsxs("div",{className:"dashboard-grid dashboard-grid--single",children:[g.jsxs("section",{className:"panel summary-panel",children:[g.jsx("header",{className:"panel__header",children:g.jsx("h2",{children:"Sponsor Summary"})}),g.jsxs("div",{className:"summary-grid",children:[g.jsxs("div",{className:"metric-card",children:[g.jsx("span",{children:"Open USD liability"}),g.jsx("strong",{children:Fi(a)})]}),g.jsxs("div",{className:"metric-card",children:[g.jsx("span",{children:"Total locked ADA"}),g.jsx("strong",{children:ut(i)})]}),g.jsxs("div",{className:"metric-card",children:[g.jsx("span",{children:"Required ADA now"}),g.jsx("strong",{children:ut(l)})]}),g.jsxs("div",{className:"metric-card",children:[g.jsx("span",{children:"Coverage buffer"}),g.jsx("strong",{className:u>=0?"positive":"negative",children:ut(u)})]})]})]}),g.jsx(pf,{title:"Funded requests",items:e,role:"sponsor",adaUsd:t,emptyText:"No requests available.",onCancel:n})]})}function Gh({adaUsd:e,coverageMultiplier:t,onCreate:n,isCreating:r,className:i}){const[l,u]=$.useState("120"),[a,f]=$.useState(""),[p,x]=$.useState(()=>{const _=new Date;return _.setDate(_.getDate()+7),_.toISOString().slice(0,10)}),[w,S]=$.useState(""),C=$.useMemo(()=>{const _=Number(l);return Number.isNaN(_)||_<=0?0:ai(_,e,t)},[e,t,l]),N=async _=>{_.preventDefault();const B=Number(l);if(Number.isNaN(B)||B<=0){S("USD amount must be greater than zero.");return}if(!a.trim()){S("Description is required.");return}if(!p){S("Please select a due date.");return}S("");try{await n({usdAmount:B,description:a.trim(),dueDate:p}),f(""),u("120")}catch(m){S(m instanceof Error?m.message:"Could not create request right now.")}};return g.jsxs("section",{className:`panel request-form-panel ${i??""}`.trim(),children:[g.jsx("header",{className:"panel__header",children:g.jsx("div",{className:"panel__header-stack",children:g.jsx("h2",{children:"Create Request"})})}),g.jsxs("form",{className:"request-form",onSubmit:N,children:[g.jsxs("label",{children:["USD amount",g.jsx("input",{type:"number",step:"1",value:l,disabled:r,onChange:_=>u(_.target.value)})]}),g.jsxs("label",{children:["Description",g.jsx("textarea",{rows:3,value:a,placeholder:"What are you charging for?",disabled:r,onChange:_=>f(_.target.value)})]}),g.jsxs("label",{children:["Due date",g.jsx("input",{type:"date",value:p,min:new Date().toISOString().slice(0,10),disabled:r,onChange:_=>x(_.target.value)})]}),g.jsxs("div",{className:"estimate-block",children:[g.jsx("span",{children:"Estimated lock"}),g.jsx("strong",{children:ut(C)})]}),w?g.jsx("p",{className:"error-text",children:w}):null,g.jsx("button",{className:"button button--primary",type:"submit",disabled:r,children:r?"Creating lock transaction...":"Create"})]})]})}const Xh=[{value:"all",label:"All"},{value:"created",label:"Created"},{value:"ready_to_claim",label:"Ready"},{value:"claimed",label:"Claimed"},{value:"cancelled",label:"Cancelled"}];function qh({requests:e,filter:t,adaUsd:n,coverageMultiplier:r,onFilterChange:i,onCreate:l,onClaim:u,isCreating:a}){const[f,p]=$.useState(!0),x=t==="all"?e:e.filter(w=>w.status===t);return g.jsxs("div",{className:"user-dashboard-stack",children:[g.jsx(Gh,{adaUsd:n,coverageMultiplier:r,onCreate:l,isCreating:a,className:"panel--primary-action"}),g.jsxs("section",{className:"panel panel--secondary-action requests-collapsible",children:[g.jsxs("header",{className:"panel__header",children:[g.jsx("h2",{children:"Requests"}),g.jsx("button",{type:"button",className:"panel-toggle-button",onClick:()=>p(w=>!w),"aria-label":f?"Collapse requests section":"Expand requests section",title:f?"Collapse section":"Expand section",children:f?"▴":"▾"})]}),f?g.jsx(pf,{title:"Requests",items:x,role:"applicant",adaUsd:n,emptyText:"No requests in this state.",embedded:!0,filters:g.jsx(g.Fragment,{children:Xh.map(w=>g.jsx("button",{className:`chip ${t===w.value?"chip--active":""}`,type:"button",onClick:()=>i(w.value),children:w.label},w.value))}),onClaim:u}):g.jsxs("p",{className:"muted panel-summary",children:[x.length," request",x.length===1?"":"s"," in this filter."]})]})]})}const Vu=2,Jh=.65,Zh=0;function bh(e,t){return e.filter(n=>n.status===t).length}function em(){const[e,t]=$.useState("applicant"),[n,r]=$.useState("all"),i=dh(),{adaUsd:l,isLoading:u,error:a,updatedAt:f,refreshNow:p}=Hh(),[x,w]=$.useState(()=>ch(Jh)),[S,C]=$.useState(!1),[N,_]=$.useState(null),B=i.networkId===Zh,m=i.isConnected&&B,h=m&&l!==null;$.useEffect(()=>{let R=!0;return(async()=>{try{const j=await Jp();if(!R)return;w(j)}catch(j){if(!R)return;_(j instanceof Error?`Could not load persisted requests: ${j.message}`:"Could not load persisted requests.")}})(),()=>{R=!1}},[]);const v=$.useMemo(()=>x.filter(R=>R.status==="ready_to_claim").reduce((R,U)=>R+U.usdAmount,0),[x]),T=$.useMemo(()=>x.filter(R=>R.status!=="claimed").reduce((R,U)=>R+U.lockAda,0),[x]),A=async R=>{if(!l||!m)throw new Error("Connect Eternl on Preprod with a live ADA/USD price before creating.");if(!i.primaryAddressHex)throw new Error("Eternl did not provide a primary address to create the lock transaction.");C(!0),_(null);try{const{request:U}=await Zp({requesterAddressHex:i.primaryAddressHex,usdAmount:R.usdAmount,description:R.description,dueDate:R.dueDate,adaUsd:l,coverageMultiplier:Vu});w(j=>[U,...j])}catch(U){const j=U instanceof Error?U.message:"Could not create request.";throw _(j),new Error(j)}finally{C(!1)}},P=async R=>{if(!(!l||!m)){_(null);try{const U=await eh(R);w(j=>j.map(ee=>ee.id!==R||ee.status!=="ready_to_claim"?ee:{...ee,status:U.status,unlockTxId:U.unlockTxId,settlement:sf(ee,l)}))}catch(U){const j=U instanceof Error?U.message:"Could not claim request.";throw _(j),new Error(j)}}},L=async R=>{if(!m)throw new Error("Connect Eternl on Preprod before cancelling.");_(null);try{const U=await bp(R);w(j=>j.map(ee=>ee.id===R?{...ee,status:"cancelled",cancelTxId:U.cancelTxId}:ee))}catch(U){const j=U instanceof Error?U.message:"Could not cancel request.";throw _(j),new Error(j)}};return g.jsx("div",{className:"app-root",children:g.jsxs("main",{className:"app-shell",children:[g.jsxs("header",{className:"hero panel",children:[g.jsxs("div",{className:"hero-intro",children:[g.jsx("p",{className:"eyebrow",children:"Payth"}),g.jsx("h1",{children:"Request USD Payments on Cardano"}),g.jsx("p",{className:"hero-copy",children:"Applicants request in USD, sponsors lock ADA, and claims settle using live ADA/USD rates."})]}),g.jsxs("div",{className:"hero-controls",children:[g.jsxs("div",{className:"hero-controls__grid hero-controls__grid--utility",children:[g.jsx(nh,{wallet:i,compact:!0}),g.jsx(uh,{adaUsd:l,isLoading:u,error:a,updatedAt:f,onRefresh:p,compact:!0})]}),m?g.jsx("div",{className:"hero-controls__top",children:g.jsx(ah,{value:e,onChange:t})}):null]})]}),i.isConnected?B?h?g.jsxs(g.Fragment,{children:[g.jsxs("section",{className:"top-metrics",children:[g.jsxs("article",{className:"metric-card",children:[g.jsx("span",{children:"Total requests"}),g.jsx("strong",{children:x.length})]}),g.jsxs("article",{className:"metric-card",children:[g.jsx("span",{children:"Ready to claim"}),g.jsx("strong",{children:bh(x,"ready_to_claim")})]}),g.jsxs("article",{className:"metric-card",children:[g.jsx("span",{children:"Claimable value"}),g.jsx("strong",{children:Fi(v)})]}),g.jsxs("article",{className:"metric-card",children:[g.jsx("span",{children:"Open locked collateral"}),g.jsx("strong",{children:ut(T)})]})]}),e==="applicant"?g.jsx(qh,{requests:x,filter:n,adaUsd:l,coverageMultiplier:Vu,onFilterChange:r,onCreate:A,onClaim:P,isCreating:S}):g.jsx(Yh,{requests:x,adaUsd:l,onCancel:R=>{L(R)}}),N?g.jsx("p",{className:"error-text",children:N}):null]}):g.jsxs("section",{className:"panel",children:[g.jsx("h2",{children:"Live price unavailable"}),g.jsxs("p",{className:"muted",children:["Waiting for Pyth Pro ADA/USD quote. Configure ",g.jsx("code",{children:"VITE_PYTH_LAZER_TOKEN"})," and click refresh."]})]}):g.jsxs("section",{className:"panel",children:[g.jsx("h2",{children:"Wrong network selected"}),g.jsxs("p",{className:"muted",children:["This dApp is configured for ",g.jsx("strong",{children:"Preprod"}),". Please switch Eternl from Mainnet to Preprod/Testnet and reconnect."]})]}):g.jsxs("section",{className:"panel",children:[g.jsx("h2",{children:"Connect Eternl to continue"}),g.jsx("p",{className:"muted",children:"Login is required before creating and claiming payment requests."})]})]})})}Ll.createRoot(document.getElementById("root")).render(g.jsx(Mf.StrictMode,{children:g.jsx(em,{})})); diff --git a/lazer/cardano/frontend/dist/assets/index-iJoJJjhS.css b/lazer/cardano/frontend/dist/assets/index-iJoJJjhS.css new file mode 100644 index 00000000..5e9ea940 --- /dev/null +++ b/lazer/cardano/frontend/dist/assets/index-iJoJJjhS.css @@ -0,0 +1 @@ +@import"https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Syne:wght@600;700;800&display=swap";:root{--bg: #050c16;--bg-soft: #0d1b2f;--surface: #122640cc;--surface-solid: #10243d;--line: #2f4668;--text: #ecf4ff;--muted: #9ab2d4;--accent-lime: #c6ff1a;--accent-cyan: #3be6ff;--accent-orange: #ff6f3b;--success: #5cf0a4;--danger: #ff6767;--radius-xl: 24px;--radius-lg: 18px;--radius-md: 12px;--space-1: .25rem;--space-2: .5rem;--space-3: .75rem;--space-4: 1rem;--space-5: 1.5rem;--space-6: 2rem;--space-7: 2.5rem;--shadow-card: 0 22px 48px -30px rgba(22, 255, 229, .7);--shadow-hover: 0 28px 50px -26px rgba(255, 111, 59, .7);--ease-spring: cubic-bezier(.23, 1, .32, 1)}*,*:before,*:after{box-sizing:border-box}html,body,#root{margin:0;min-height:100%;height:100%}body{font-family:Space Grotesk,Segoe UI,sans-serif;color:var(--text);overflow-x:hidden;overflow-y:auto;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;background:var(--bg)}.app-root{position:relative;min-height:100vh;overflow:visible;background:radial-gradient(65rem 38rem at 14% -8%,#143053d9,#14305300 66%),radial-gradient(44rem 30rem at -10% 96%,#ff6f3b2e,#ff6f3b00 70%),radial-gradient(48rem 30rem at 112% -8%,#3be6ff24,#3be6ff00 72%),var(--bg);background-repeat:no-repeat}.app-shell{position:relative;z-index:1;width:min(1240px,100% - 2.25rem);margin:0 auto;padding:1.6rem 0 2.4rem;display:grid;gap:var(--space-5)}.panel{border:1px solid var(--line);border-radius:var(--radius-xl);background:linear-gradient(140deg,#0e223ade,#081322f2);box-shadow:var(--shadow-card);padding:var(--space-5);-webkit-backdrop-filter:none;backdrop-filter:none}.panel--utility{padding:1rem 1rem .9rem;border-color:#2f466899;background:linear-gradient(140deg,#0c1b2dd1,#08121fe6);box-shadow:0 10px 24px -18px #08203b99}.panel--primary-action{border-color:#c6ff1a8f;box-shadow:0 14px 30px -24px #c6ff1a57}.panel--secondary-action{border-color:#2f4668b8;box-shadow:0 16px 40px -34px #0e386473}.panel__header{display:flex;align-items:baseline;justify-content:space-between;gap:var(--space-4);margin-bottom:var(--space-4)}.panel__header h2{margin:0;font-size:1.3rem}.panel__header p{margin:0;color:var(--muted)}.hero{display:grid;grid-template-columns:1fr;gap:var(--space-5)}.hero-intro{max-width:70rem}.eyebrow{margin:0;color:var(--accent-cyan);text-transform:uppercase;letter-spacing:.12em;font-weight:600;font-size:.78rem}.hero h1{margin:.55rem 0 .8rem;font-size:clamp(1.8rem,3.2vw,3rem);line-height:1.02;font-family:Syne,Space Grotesk,sans-serif}.hero-copy{margin:0;color:var(--muted);max-width:68ch}.hero-controls{display:grid;gap:var(--space-3)}.hero-controls__top{display:flex;justify-content:flex-start}.hero-controls__grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-4);align-items:start}.hero-controls__grid--utility{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:.75rem}.top-metrics{display:grid;gap:var(--space-4);grid-template-columns:repeat(4,minmax(0,1fr))}.metric-card{border:1px solid rgba(198,255,26,.34);border-radius:var(--radius-lg);background:linear-gradient(160deg,#112743eb,#0a1626f5);padding:.95rem 1rem;display:grid;gap:.25rem}.metric-card span{font-size:.83rem;color:var(--muted)}.metric-card strong{font-size:1.15rem}.dashboard-grid{display:grid;grid-template-columns:1.14fr .86fr;gap:var(--space-5)}.user-dashboard-stack{display:grid;gap:var(--space-4)}.dashboard-grid--single{grid-template-columns:1fr}.left-column,.right-column{display:grid;gap:var(--space-4);align-content:start}.quick-kpis{display:grid;gap:.7rem}.quick-kpis h2{margin:0}.kpi-row{display:flex;justify-content:space-between;gap:var(--space-3);color:var(--muted);border-top:1px solid rgba(255,255,255,.08);padding-top:var(--space-3)}.kpi-row strong{color:var(--text)}.role-switcher-block{display:grid;gap:.35rem}.role-switcher-label{margin:0;margin-left:.35rem;font-size:.76rem;text-transform:uppercase;letter-spacing:.08em;color:var(--muted)}.role-switcher{display:inline-flex;gap:var(--space-2);padding:.3rem;border-radius:var(--radius-lg);border:1px solid var(--line);background:#040c1499}.chip{border:1px solid rgba(255,255,255,.13);background:#14263ccc;color:var(--text);border-radius:999px;font-family:inherit;padding:.46rem .85rem;font-size:.82rem;cursor:pointer;transition:transform .12s var(--ease-spring),border-color .16s var(--ease-spring),background .16s var(--ease-spring)}.chip:hover{transform:translateY(-1px);border-color:var(--accent-cyan)}.chip--active{border-color:var(--accent-lime);background:#c6ff1a26}.live-price-panel{display:grid;gap:var(--space-3)}.live-price-panel--compact{gap:.55rem}.wallet-panel{display:grid;gap:var(--space-3)}.wallet-panel--compact{gap:.6rem}.wallet-panel__header{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3)}.wallet-panel__title{display:flex;align-items:center;gap:var(--space-2)}.wallet-panel__title h2{margin:0;font-size:1.1rem}.wallet-panel--compact .wallet-panel__title h2{font-size:.96rem;opacity:.94}.wallet-icon{width:1.25rem;height:1.25rem;border-radius:.3rem}.status-pill{border-radius:999px;border:1px solid rgba(255,255,255,.22);padding:.24rem .62rem;font-size:.73rem;color:var(--muted)}.status-pill--ok{border-color:#5cf0a4b3;color:var(--success)}.wallet-panel--compact .status-pill{font-size:.68rem;padding:.2rem .52rem}.wallet-meta{display:grid;gap:var(--space-2)}.wallet-panel--compact .wallet-meta{gap:.35rem}.wallet-meta__item{display:flex;justify-content:space-between;gap:var(--space-3);padding-top:var(--space-2);border-top:1px solid rgba(255,255,255,.08)}.wallet-panel--compact .wallet-meta__item{padding-top:.35rem;font-size:.83rem}.wallet-meta__item span{color:var(--muted)}.wallet-meta__item strong{font-size:.9rem;text-align:right}.wallet-panel--compact .wallet-meta__item strong{font-size:.82rem;font-weight:600}.wallet-actions{display:flex;gap:var(--space-2)}.wallet-panel--compact .wallet-actions{justify-content:flex-start}.source-tag{font-size:.76rem;color:var(--accent-cyan);text-transform:uppercase;letter-spacing:.06em}.live-price-value{margin:0;font-size:1.8rem;font-family:Syne,Space Grotesk,sans-serif;line-height:1}.live-price-panel--compact .live-price-value{font-size:1.22rem}.live-price-panel--compact .panel__header{margin-bottom:.3rem}.live-price-panel--compact .panel__header h2{font-size:.95rem;opacity:.92}.live-price-header{margin-bottom:.35rem;align-items:center}.panel-icon-button{border:1px solid rgba(59,230,255,.5);background:#3be6ff21;color:#d8f7ff;width:1.85rem;height:1.85rem;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0;transition:border-color .14s ease,background .14s ease,color .14s ease,transform .14s ease,box-shadow .14s ease}.panel-icon-button:hover:not(:disabled){border-color:#3be6ffd1;background:#3be6ff33}.panel-icon-button svg{width:1.06rem;height:1.06rem;stroke:currentColor;stroke-width:2.35;fill:none;stroke-linecap:round;stroke-linejoin:round}.panel-icon-button.is-loading svg{animation:spin 1s linear infinite}.panel-icon-button:disabled{cursor:progress;opacity:1;border-color:#3be6ffe6;background:#3be6ff42;box-shadow:0 0 0 4px #3be6ff2e}.live-price-panel--loading .live-price-value{opacity:.88}.loading-text{color:#b9f2ff;animation:loading-pulse 1.1s ease-in-out infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes loading-pulse{0%{opacity:.65}50%{opacity:1}to{opacity:.65}}input,textarea{width:100%;border-radius:var(--radius-md);border:1px solid var(--line);background:#06101cf5;color:var(--text);font-family:inherit;padding:.6rem .75rem;outline:none;transition:border-color .12s var(--ease-spring),box-shadow .12s var(--ease-spring)}input:focus,textarea:focus{border-color:var(--accent-cyan);box-shadow:0 0 0 3px #3be6ff33}input[type=range]{accent-color:var(--accent-lime);padding:0;border:0;background:transparent}.request-form{display:grid;gap:var(--space-4)}.panel__header-stack{display:grid;gap:.35rem}.request-form-panel .panel__header{margin-bottom:var(--space-5)}.request-form-panel .panel__header h2{font-size:1.65rem;line-height:1.02}.request-form-eyebrow{margin:0;color:var(--accent-lime);text-transform:uppercase;letter-spacing:.1em;font-size:.72rem;font-weight:600}.request-form label{display:grid;gap:.5rem;font-size:.9rem}.estimate-block{border-radius:var(--radius-md);border:1px dashed rgba(198,255,26,.5);padding:.8rem .95rem;display:flex;justify-content:space-between;gap:var(--space-3);align-items:center}.estimate-block span{color:var(--muted)}.button{border:1px solid transparent;border-radius:var(--radius-md);font-family:inherit;font-weight:600;padding:.62rem .95rem;cursor:pointer;transition:background .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease,transform .16s ease}.button--primary{background:linear-gradient(120deg,var(--accent-lime),#88f31f);color:#091224}.button--secondary{background:#ffffff0f;border-color:#fff3;color:var(--text)}.button--secondary:hover:not(:disabled){background:#ffffff24;border-color:#ffffff6b;box-shadow:var(--shadow-hover);transform:translateY(-1px)}.button--tertiary{background:#3be6ff24;border-color:#3be6ff6b;color:#d7efff;padding:.46rem .75rem;font-size:.82rem}.button--tertiary:hover:not(:disabled){background:#3be6ff33;border-color:#3be6ffb8;color:#ecf7ff}.button--primary:hover{box-shadow:var(--shadow-hover);transform:translateY(-1px)}.button:disabled{opacity:.55;cursor:not-allowed}.filter-row{display:flex;flex-wrap:wrap;gap:var(--space-2)}.request-list-filters{margin-bottom:var(--space-4)}.requests-collapsible .panel__header{align-items:center}.panel-toggle-button{border:1px solid rgba(255,255,255,.16);border-radius:999px;width:1.4rem;height:1.4rem;padding:0;line-height:1;font-size:.95rem;color:var(--muted);background:#ffffff0a;cursor:pointer}.panel-toggle-button:hover{border-color:#ffffff5c;color:var(--text)}.panel-summary{margin:0}.request-list{display:grid;gap:var(--space-4)}.request-card{border:1px solid rgba(255,255,255,.12);border-radius:var(--radius-lg);background:linear-gradient(150deg,#122640e6,#091423f2);padding:1rem 1.08rem;display:grid;gap:var(--space-4);animation:card-in .18s var(--ease-spring);transition:transform .14s var(--ease-spring),border-color .16s var(--ease-spring)}.request-card:hover{transform:translateY(-2px);border-color:#3be6ff99}.request-card__header{display:flex;justify-content:space-between;gap:var(--space-4);align-items:start}.request-card__header h3{margin:0;font-size:1.04rem}.request-card__header p{margin:.38rem 0 0}.request-card__grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--space-4)}.request-card__grid div{display:grid;gap:.22rem}.meta-label{font-size:.75rem;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}.status-badge{border-radius:999px;padding:.3rem .7rem;border:1px solid;font-size:.77rem;font-weight:600;white-space:nowrap}.status-badge--created{border-color:var(--accent-cyan);color:var(--accent-cyan)}.status-badge--ready_to_claim{border-color:var(--accent-lime);color:var(--accent-lime)}.status-badge--claimed{border-color:var(--success);color:var(--success)}.status-badge--cancelled{border-color:var(--danger);color:var(--danger)}.settlement-result{border-top:1px solid rgba(255,255,255,.11);padding-top:var(--space-3)}.settlement-result h4{margin:0 0 .55rem}.settlement-result p{margin:.35rem 0}.summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--space-4)}.positive{color:var(--success)}.negative{color:var(--danger)}.muted{color:var(--muted)}.warning-text{margin:0;color:#ffc776;font-size:.9rem}.error-text{margin:0;color:#ff8f7d}.empty-state{color:var(--muted);border:1px dashed rgba(255,255,255,.24);border-radius:var(--radius-md);padding:1rem}@keyframes card-in{0%{transform:translateY(8px) scale(.99);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}@media (prefers-reduced-motion: reduce){.request-card{animation:none;transition:none}.button--primary:hover,.chip:hover,.request-card:hover{transform:none}}@media (max-width: 1080px){.top-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.hero-controls__grid,.dashboard-grid{grid-template-columns:1fr}.request-card__grid,.summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width: 640px){.app-shell{width:min(1240px,100% - 1rem);gap:var(--space-4)}.panel{padding:1rem}.top-metrics{grid-template-columns:1fr}.request-card__header{flex-direction:column;gap:var(--space-2)}.request-card__grid,.summary-grid{grid-template-columns:1fr}} diff --git a/lazer/cardano/frontend/dist/index.html b/lazer/cardano/frontend/dist/index.html new file mode 100644 index 00000000..0f701723 --- /dev/null +++ b/lazer/cardano/frontend/dist/index.html @@ -0,0 +1,13 @@ + + + + + + Pay With Pyth + + + + +
+ + diff --git a/lazer/cardano/frontend/index.html b/lazer/cardano/frontend/index.html new file mode 100644 index 00000000..4299cd13 --- /dev/null +++ b/lazer/cardano/frontend/index.html @@ -0,0 +1,12 @@ + + + + + + Pay With Pyth + + +
+ + + diff --git a/lazer/cardano/frontend/package-lock.json b/lazer/cardano/frontend/package-lock.json new file mode 100644 index 00000000..6322ef50 --- /dev/null +++ b/lazer/cardano/frontend/package-lock.json @@ -0,0 +1,1855 @@ +{ + "name": "pay-with-pyth-cardano-frontend", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "pay-with-pyth-cardano-frontend", + "version": "0.1.0", + "dependencies": { + "@pythnetwork/pyth-lazer-sdk": "^5.2.0", + "react": "^18.3.1", + "react-dom": "^18.3.1" + }, + "devDependencies": { + "@types/react": "^18.3.12", + "@types/react-dom": "^18.3.1", + "@vitejs/plugin-react": "^4.3.2", + "typescript": "^5.6.3", + "vite": "^5.4.9" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.28.5", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.0.tgz", + "integrity": "sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.0.tgz", + "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-module-transforms": "^7.28.6", + "@babel/helpers": "^7.28.6", + "@babel/parser": "^7.29.0", + "@babel/template": "^7.28.6", + "@babel/traverse": "^7.29.0", + "@babel/types": "^7.29.0", + "@jridgewell/remapping": "^2.3.5", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.29.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.1.tgz", + "integrity": "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.0", + "@babel/types": "^7.29.0", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz", + "integrity": "sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.28.6", + "@babel/helper-validator-option": "^7.27.1", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz", + "integrity": "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.28.6", + "@babel/types": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz", + "integrity": "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.28.6", + "@babel/helper-validator-identifier": "^7.28.5", + "@babel/traverse": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz", + "integrity": "sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", + "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.2.tgz", + "integrity": "sha512-HoGuUs4sCZNezVEKdVcwqmZN8GoHirLUcLaYVNBK2J0DadGtdcqgr3BCbvH8+XUo4NGjNl3VOtSjEKNzqfFgKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.28.6", + "@babel/types": "^7.29.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.2.tgz", + "integrity": "sha512-4GgRzy/+fsBa72/RZVJmGKPmZu9Byn8o4MoLpmNe1m8ZfYnz5emHLQz3U4gLud6Zwl0RZIcgiLD7Uq7ySFuDLA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.0" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-self": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.27.1.tgz", + "integrity": "sha512-6UzkCs+ejGdZ5mFFC/OCUrv028ab2fp1znZmCZjAOBKiBK2jXD1O+BPSfX8X2qjJ75fZBMSnQn3Rq2mrBJK2mw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-source": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.27.1.tgz", + "integrity": "sha512-zbwoTsBruTeKB9hSq73ha66iFeJHuaFkUbwvqElnygoNbj/jHRsSeokowZFN3CZ64IvEqcmmkVe89OPXc7ldAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz", + "integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.28.6", + "@babel/parser": "^7.28.6", + "@babel/types": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.0.tgz", + "integrity": "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.29.0", + "@babel/template": "^7.28.6", + "@babel/types": "^7.29.0", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz", + "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.28.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/ttlcache": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@isaacs/ttlcache/-/ttlcache-1.4.1.tgz", + "integrity": "sha512-RQgQ4uQ+pLbqXfOmieB91ejmLwvSgv9nLx6sT6sD83s7umBypgg+OIBOBbEUiJXrfpnp9j0mRhYYdzp9uqq3lA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@pythnetwork/pyth-lazer-sdk": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@pythnetwork/pyth-lazer-sdk/-/pyth-lazer-sdk-5.2.0.tgz", + "integrity": "sha512-iGnNXRqnPWzrcgsx/3ZhHEkN1emnT2A9bE9c7WHdETZSHKjkpn5PT54lLbOpov47kleB6EejB++EeoSBFa9Qxw==", + "license": "Apache-2.0", + "dependencies": { + "@isaacs/ttlcache": "^1.4.1", + "buffer": "^6.0.3", + "isomorphic-ws": "^5.0.0", + "ts-log": "^2.2.7", + "ws": "^8.18.0" + }, + "engines": { + "node": ">=22.14.0" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.0-beta.27", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz", + "integrity": "sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.60.0.tgz", + "integrity": "sha512-WOhNW9K8bR3kf4zLxbfg6Pxu2ybOUbB2AjMDHSQx86LIF4rH4Ft7vmMwNt0loO0eonglSNy4cpD3MKXXKQu0/A==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.60.0.tgz", + "integrity": "sha512-u6JHLll5QKRvjciE78bQXDmqRqNs5M/3GVqZeMwvmjaNODJih/WIrJlFVEihvV0MiYFmd+ZyPr9wxOVbPAG2Iw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.60.0.tgz", + "integrity": "sha512-qEF7CsKKzSRc20Ciu2Zw1wRrBz4g56F7r/vRwY430UPp/nt1x21Q/fpJ9N5l47WWvJlkNCPJz3QRVw008fi7yA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.60.0.tgz", + "integrity": "sha512-WADYozJ4QCnXCH4wPB+3FuGmDPoFseVCUrANmA5LWwGmC6FL14BWC7pcq+FstOZv3baGX65tZ378uT6WG8ynTw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.60.0.tgz", + "integrity": "sha512-6b8wGHJlDrGeSE3aH5mGNHBjA0TTkxdoNHik5EkvPHCt351XnigA4pS7Wsj/Eo9Y8RBU6f35cjN9SYmCFBtzxw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.60.0.tgz", + "integrity": "sha512-h25Ga0t4jaylMB8M/JKAyrvvfxGRjnPQIR8lnCayyzEjEOx2EJIlIiMbhpWxDRKGKF8jbNH01NnN663dH638mA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.60.0.tgz", + "integrity": "sha512-RzeBwv0B3qtVBWtcuABtSuCzToo2IEAIQrcyB/b2zMvBWVbjo8bZDjACUpnaafaxhTw2W+imQbP2BD1usasK4g==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.60.0.tgz", + "integrity": "sha512-Sf7zusNI2CIU1HLzuu9Tc5YGAHEZs5Lu7N1ssJG4Tkw6e0MEsN7NdjUDDfGNHy2IU+ENyWT+L2obgWiguWibWQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.60.0.tgz", + "integrity": "sha512-DX2x7CMcrJzsE91q7/O02IJQ5/aLkVtYFryqCjduJhUfGKG6yJV8hxaw8pZa93lLEpPTP/ohdN4wFz7yp/ry9A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.60.0.tgz", + "integrity": "sha512-09EL+yFVbJZlhcQfShpswwRZ0Rg+z/CsSELFCnPt3iK+iqwGsI4zht3secj5vLEs957QvFFXnzAT0FFPIxSrkQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.60.0.tgz", + "integrity": "sha512-i9IcCMPr3EXm8EQg5jnja0Zyc1iFxJjZWlb4wr7U2Wx/GrddOuEafxRdMPRYVaXjgbhvqalp6np07hN1w9kAKw==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.60.0.tgz", + "integrity": "sha512-DGzdJK9kyJ+B78MCkWeGnpXJ91tK/iKA6HwHxF4TAlPIY7GXEvMe8hBFRgdrR9Ly4qebR/7gfUs9y2IoaVEyog==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.60.0.tgz", + "integrity": "sha512-RwpnLsqC8qbS8z1H1AxBA1H6qknR4YpPR9w2XX0vo2Sz10miu57PkNcnHVaZkbqyw/kUWfKMI73jhmfi9BRMUQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.60.0.tgz", + "integrity": "sha512-Z8pPf54Ly3aqtdWC3G4rFigZgNvd+qJlOE52fmko3KST9SoGfAdSRCwyoyG05q1HrrAblLbk1/PSIV+80/pxLg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.60.0.tgz", + "integrity": "sha512-3a3qQustp3COCGvnP4SvrMHnPQ9d1vzCakQVRTliaz8cIp/wULGjiGpbcqrkv0WrHTEp8bQD/B3HBjzujVWLOA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.60.0.tgz", + "integrity": "sha512-pjZDsVH/1VsghMJ2/kAaxt6dL0psT6ZexQVrijczOf+PeP2BUqTHYejk3l6TlPRydggINOeNRhvpLa0AYpCWSQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.60.0.tgz", + "integrity": "sha512-3ObQs0BhvPgiUVZrN7gqCSvmFuMWvWvsjG5ayJ3Lraqv+2KhOsp+pUbigqbeWqueGIsnn+09HBw27rJ+gYK4VQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.60.0.tgz", + "integrity": "sha512-EtylprDtQPdS5rXvAayrNDYoJhIz1/vzN2fEubo3yLE7tfAw+948dO0g4M0vkTVFhKojnF+n6C8bDNe+gDRdTg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.60.0.tgz", + "integrity": "sha512-k09oiRCi/bHU9UVFqD17r3eJR9bn03TyKraCrlz5ULFJGdJGi7VOmm9jl44vOJvRJ6P7WuBi/s2A97LxxHGIdw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.60.0.tgz", + "integrity": "sha512-1o/0/pIhozoSaDJoDcec+IVLbnRtQmHwPV730+AOD29lHEEo4F5BEUB24H0OBdhbBBDwIOSuf7vgg0Ywxdfiiw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.60.0.tgz", + "integrity": "sha512-pESDkos/PDzYwtyzB5p/UoNU/8fJo68vcXM9ZW2V0kjYayj1KaaUfi1NmTUTUpMn4UhU4gTuK8gIaFO4UGuMbA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.60.0.tgz", + "integrity": "sha512-hj1wFStD7B1YBeYmvY+lWXZ7ey73YGPcViMShYikqKT1GtstIKQAtfUI6yrzPjAy/O7pO0VLXGmUVWXQMaYgTQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.60.0.tgz", + "integrity": "sha512-SyaIPFoxmUPlNDq5EHkTbiKzmSEmq/gOYFI/3HHJ8iS/v1mbugVa7dXUzcJGQfoytp9DJFLhHH4U3/eTy2Bq4w==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.60.0.tgz", + "integrity": "sha512-RdcryEfzZr+lAr5kRm2ucN9aVlCCa2QNq4hXelZxb8GG0NJSazq44Z3PCCc8wISRuCVnGs0lQJVX5Vp6fKA+IA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.60.0.tgz", + "integrity": "sha512-PrsWNQ8BuE00O3Xsx3ALh2Df8fAj9+cvvX9AIA6o4KpATR98c9mud4XtDWVvsEuyia5U4tVSTKygawyJkjm60w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.2" + } + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/prop-types": { + "version": "15.7.15", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz", + "integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/react": { + "version": "18.3.28", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.28.tgz", + "integrity": "sha512-z9VXpC7MWrhfWipitjNdgCauoMLRdIILQsAEV+ZesIzBq/oUlxk0m3ApZuMFCXdnS4U7KrI+l3WRUEGQ8K1QKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/prop-types": "*", + "csstype": "^3.2.2" + } + }, + "node_modules/@types/react-dom": { + "version": "18.3.7", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.7.tgz", + "integrity": "sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "^18.0.0" + } + }, + "node_modules/@vitejs/plugin-react": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.7.0.tgz", + "integrity": "sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.28.0", + "@babel/plugin-transform-react-jsx-self": "^7.27.1", + "@babel/plugin-transform-react-jsx-source": "^7.27.1", + "@rolldown/pluginutils": "1.0.0-beta.27", + "@types/babel__core": "^7.20.5", + "react-refresh": "^0.17.0" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/baseline-browser-mapping": { + "version": "2.10.10", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.10.tgz", + "integrity": "sha512-sUoJ3IMxx4AyRqO4MLeHlnGDkyXRoUG0/AI9fjK+vS72ekpV0yWVY7O0BVjmBcRtkNcsAO2QDZ4tdKKGoI6YaQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/browserslist": { + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz", + "integrity": "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "baseline-browser-mapping": "^2.9.0", + "caniuse-lite": "^1.0.30001759", + "electron-to-chromium": "^1.5.263", + "node-releases": "^2.0.27", + "update-browserslist-db": "^1.2.0" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001780", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001780.tgz", + "integrity": "sha512-llngX0E7nQci5BPJDqoZSbuZ5Bcs9F5db7EtgfwBerX9XGtkkiO4NwfDDIRzHTTwcYC8vC7bmeUEPGrKlR/TkQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.321", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.321.tgz", + "integrity": "sha512-L2C7Q279W2D/J4PLZLk7sebOILDSWos7bMsMNN06rK482umHUrh/3lM8G7IlHFOYip2oAg5nha1rCMxr/rs6ZQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/isomorphic-ws": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz", + "integrity": "sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==", + "license": "MIT", + "peerDependencies": { + "ws": "*" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "license": "MIT" + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/node-releases": { + "version": "2.0.36", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.36.tgz", + "integrity": "sha512-TdC8FSgHz8Mwtw9g5L4gR/Sh9XhSP/0DEkQxfEFXOpiul5IiHgHan2VhYYb6agDSfp4KuvltmGApc8HMgUrIkA==", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/postcss": { + "version": "8.5.8", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.8.tgz", + "integrity": "sha512-OW/rX8O/jXnm82Ey1k44pObPtdblfiuWnrd8X7GJ7emImCOstunGbXUpp7HdBrFQX6rJzn3sPT397Wp5aCwCHg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/react": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.2" + }, + "peerDependencies": { + "react": "^18.3.1" + } + }, + "node_modules/react-refresh": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.17.0.tgz", + "integrity": "sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/rollup": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.60.0.tgz", + "integrity": "sha512-yqjxruMGBQJ2gG4HtjZtAfXArHomazDHoFwFFmZZl0r7Pdo7qCIXKqKHZc8yeoMgzJJ+pO6pEEHa+V7uzWlrAQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.8" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.60.0", + "@rollup/rollup-android-arm64": "4.60.0", + "@rollup/rollup-darwin-arm64": "4.60.0", + "@rollup/rollup-darwin-x64": "4.60.0", + "@rollup/rollup-freebsd-arm64": "4.60.0", + "@rollup/rollup-freebsd-x64": "4.60.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.60.0", + "@rollup/rollup-linux-arm-musleabihf": "4.60.0", + "@rollup/rollup-linux-arm64-gnu": "4.60.0", + "@rollup/rollup-linux-arm64-musl": "4.60.0", + "@rollup/rollup-linux-loong64-gnu": "4.60.0", + "@rollup/rollup-linux-loong64-musl": "4.60.0", + "@rollup/rollup-linux-ppc64-gnu": "4.60.0", + "@rollup/rollup-linux-ppc64-musl": "4.60.0", + "@rollup/rollup-linux-riscv64-gnu": "4.60.0", + "@rollup/rollup-linux-riscv64-musl": "4.60.0", + "@rollup/rollup-linux-s390x-gnu": "4.60.0", + "@rollup/rollup-linux-x64-gnu": "4.60.0", + "@rollup/rollup-linux-x64-musl": "4.60.0", + "@rollup/rollup-openbsd-x64": "4.60.0", + "@rollup/rollup-openharmony-arm64": "4.60.0", + "@rollup/rollup-win32-arm64-msvc": "4.60.0", + "@rollup/rollup-win32-ia32-msvc": "4.60.0", + "@rollup/rollup-win32-x64-gnu": "4.60.0", + "@rollup/rollup-win32-x64-msvc": "4.60.0", + "fsevents": "~2.3.2" + } + }, + "node_modules/scheduler": { + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ts-log": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/ts-log/-/ts-log-2.2.7.tgz", + "integrity": "sha512-320x5Ggei84AxzlXp91QkIGSw5wgaLT6GeAH0KsqDmRZdVWW2OiSeVvElVoatk3f7nicwXlElXsoFkARiGE2yg==", + "license": "MIT" + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", + "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/vite": { + "version": "5.4.21", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.21.tgz", + "integrity": "sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.21.3", + "postcss": "^8.4.43", + "rollup": "^4.20.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/ws": { + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.20.0.tgz", + "integrity": "sha512-sAt8BhgNbzCtgGbt2OxmpuryO63ZoDk/sqaB/znQm94T4fCEsy/yV+7CdC1kJhOU9lboAEU7R3kquuycDoibVA==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + } + } +} diff --git a/lazer/cardano/frontend/package.json b/lazer/cardano/frontend/package.json new file mode 100644 index 00000000..dd9796f8 --- /dev/null +++ b/lazer/cardano/frontend/package.json @@ -0,0 +1,23 @@ +{ + "name": "pay-with-pyth-cardano-frontend", + "private": true, + "version": "0.1.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc -b && vite build", + "preview": "vite preview" + }, + "dependencies": { + "@pythnetwork/pyth-lazer-sdk": "^5.2.0", + "react": "^18.3.1", + "react-dom": "^18.3.1" + }, + "devDependencies": { + "@types/react": "^18.3.12", + "@types/react-dom": "^18.3.1", + "@vitejs/plugin-react": "^4.3.2", + "typescript": "^5.6.3", + "vite": "^5.4.9" + } +} diff --git a/lazer/cardano/frontend/src/App.tsx b/lazer/cardano/frontend/src/App.tsx new file mode 100644 index 00000000..026c0ead --- /dev/null +++ b/lazer/cardano/frontend/src/App.tsx @@ -0,0 +1,274 @@ +import { useEffect, useMemo, useState } from 'react'; +import { cancelRequestApi, claimRequestApi, createRequestApi, fetchRequestsApi } from './api/requests'; +import { EternlWalletPanel } from './components/EternlWalletPanel'; +import { LivePricePanel } from './components/LivePricePanel'; +import { RoleSwitcher } from './components/RoleSwitcher'; +import { createSeedRequests } from './data/seed'; +import { useEternlWallet } from './hooks/useEternlWallet'; +import { usePythAdaUsdPrice } from './hooks/usePythAdaUsdPrice'; +import { SponsorDashboard } from './screens/SponsorDashboard'; +import { UserDashboard } from './screens/UserDashboard'; +import type { + CreateRequestPayload, + PaymentRequest, + RequestFilter, + RequestStatus, + Role, +} from './types/payment'; +import { formatAda, formatUsd } from './utils/format'; +import { executeSettlement } from './utils/settlement'; + +const COVERAGE_MULTIPLIER = 2; +const INITIAL_ADA_USD = 0.65; +const REQUIRED_NETWORK_ID = 0; + +function countByStatus(requests: PaymentRequest[], status: RequestStatus): number { + return requests.filter((request) => request.status === status).length; +} + +export default function App(): JSX.Element { + const [role, setRole] = useState('applicant'); + const [filter, setFilter] = useState('all'); + const wallet = useEternlWallet(); + const { + adaUsd, + isLoading: isPriceLoading, + error: priceError, + updatedAt, + refreshNow, + } = usePythAdaUsdPrice(); + const [requests, setRequests] = useState(() => createSeedRequests(INITIAL_ADA_USD)); + const [isCreating, setIsCreating] = useState(false); + const [apiError, setApiError] = useState(null); + const isRequiredNetwork = wallet.networkId === REQUIRED_NETWORK_ID; + const canUseApp = wallet.isConnected && isRequiredNetwork; + const canSettle = canUseApp && adaUsd !== null; + + useEffect(() => { + let isSubscribed = true; + + const loadRequests = async (): Promise => { + try { + const persistedRequests = await fetchRequestsApi(); + if (!isSubscribed) { + return; + } + setRequests(persistedRequests); + } catch (loadError) { + if (!isSubscribed) { + return; + } + setApiError( + loadError instanceof Error + ? `Could not load persisted requests: ${loadError.message}` + : 'Could not load persisted requests.', + ); + } + }; + + void loadRequests(); + + return () => { + isSubscribed = false; + }; + }, []); + + const claimableUsd = useMemo( + () => + requests + .filter((request) => request.status === 'ready_to_claim') + .reduce((sum, request) => sum + request.usdAmount, 0), + [requests], + ); + + const lockedAda = useMemo( + () => + requests + .filter((request) => request.status !== 'claimed') + .reduce((sum, request) => sum + request.lockAda, 0), + [requests], + ); + + const handleCreate = async (payload: CreateRequestPayload): Promise => { + if (!adaUsd || !canUseApp) { + throw new Error('Connect Eternl on Preprod with a live ADA/USD price before creating.'); + } + if (!wallet.primaryAddressHex) { + throw new Error('Eternl did not provide a primary address to create the lock transaction.'); + } + + setIsCreating(true); + setApiError(null); + + try { + const { request } = await createRequestApi({ + requesterAddressHex: wallet.primaryAddressHex, + usdAmount: payload.usdAmount, + description: payload.description, + dueDate: payload.dueDate, + adaUsd, + coverageMultiplier: COVERAGE_MULTIPLIER, + }); + + setRequests((prev) => [request, ...prev]); + } catch (createError) { + const message = + createError instanceof Error ? createError.message : 'Could not create request.'; + setApiError(message); + throw new Error(message); + } finally { + setIsCreating(false); + } + }; + + const handleClaim = async (requestId: string): Promise => { + if (!adaUsd || !canUseApp) { + return; + } + + setApiError(null); + try { + const claimResult = await claimRequestApi(requestId); + setRequests((prev) => + prev.map((request) => { + if (request.id !== requestId || request.status !== 'ready_to_claim') { + return request; + } + return { + ...request, + status: claimResult.status, + unlockTxId: claimResult.unlockTxId, + settlement: executeSettlement(request, adaUsd), + }; + }), + ); + } catch (claimError) { + const message = claimError instanceof Error ? claimError.message : 'Could not claim request.'; + setApiError(message); + throw new Error(message); + } + }; + + const handleCancel = async (requestId: string): Promise => { + if (!canUseApp) { + throw new Error('Connect Eternl on Preprod before cancelling.'); + } + + setApiError(null); + try { + const cancelResult = await cancelRequestApi(requestId); + setRequests((prev) => + prev.map((request) => + request.id === requestId + ? { ...request, status: 'cancelled', cancelTxId: cancelResult.cancelTxId } + : request, + ), + ); + } catch (cancelError) { + const message = + cancelError instanceof Error ? cancelError.message : 'Could not cancel request.'; + setApiError(message); + throw new Error(message); + } + }; + + return ( +
+
+
+
+

Payth

+

Request USD Payments on Cardano

+

+ Applicants request in USD, sponsors lock ADA, and claims settle using live ADA/USD + rates. +

+
+
+
+ + +
+ {canUseApp ? ( +
+ +
+ ) : null} +
+
+ + {!wallet.isConnected ? ( +
+

Connect Eternl to continue

+

Login is required before creating and claiming payment requests.

+
+ ) : !isRequiredNetwork ? ( +
+

Wrong network selected

+

+ This dApp is configured for Preprod. Please switch Eternl from + Mainnet to Preprod/Testnet and reconnect. +

+
+ ) : !canSettle ? ( +
+

Live price unavailable

+

+ Waiting for Pyth Pro ADA/USD quote. Configure VITE_PYTH_LAZER_TOKEN and + click refresh. +

+
+ ) : ( + <> +
+
+ Total requests + {requests.length} +
+
+ Ready to claim + {countByStatus(requests, 'ready_to_claim')} +
+
+ Claimable value + {formatUsd(claimableUsd)} +
+
+ Open locked collateral + {formatAda(lockedAda)} +
+
+ {role === 'applicant' ? ( + + ) : ( + { + void handleCancel(requestId); + }} + /> + )} + {apiError ?

{apiError}

: null} + + )} +
+
+ ); +} diff --git a/lazer/cardano/frontend/src/api/requests.ts b/lazer/cardano/frontend/src/api/requests.ts new file mode 100644 index 00000000..9c1b16cc --- /dev/null +++ b/lazer/cardano/frontend/src/api/requests.ts @@ -0,0 +1,162 @@ +import type { LockTransactionDraft, PaymentRequest, RequestStatus } from '../types/payment'; + +interface CreateRequestApiPayload { + requesterAddressHex: string; + sponsorAddressHex?: string | null; + usdAmount: number; + description: string; + dueDate: string; + adaUsd: number; + coverageMultiplier?: number; +} + +interface ApiRequestRecord { + id: string; + requesterAddressHex: string; + sponsorAddressHex: string | null; + usdAmount: number; + lockAda: number; + lockLovelace: number; + adaUsd: number; + coverageMultiplier: number; + status: string; + description: string | null; + dueDate: string | null; + createdAt: string; + lockTxId?: string; + cancelTxId?: string; + unlockTxId?: string; + lockTxDraft?: LockTransactionDraft; +} + +interface CreateRequestApiResponse { + request: ApiRequestRecord; + lockTxDraft: LockTransactionDraft; +} + +interface ListRequestsApiResponse { + requests: ApiRequestRecord[]; +} + +const VALID_STATUSES: RequestStatus[] = ['created', 'ready_to_claim', 'claimed', 'cancelled']; + +function shortHex(value: string, keep = 8): string { + if (value.length <= keep * 2) { + return value; + } + return `${value.slice(0, keep)}...${value.slice(-keep)}`; +} + +async function parseApiError(response: Response): Promise { + try { + const data = (await response.json()) as { error?: string }; + if (data.error) { + return data.error; + } + } catch { + // noop + } + return `Request failed with status ${response.status}.`; +} + +function toPaymentRequest(record: ApiRequestRecord): PaymentRequest { + const status = VALID_STATUSES.includes(record.status as RequestStatus) + ? (record.status as RequestStatus) + : 'created'; + + return { + id: record.id, + usdAmount: record.usdAmount, + description: record.description?.trim() || 'Untitled request', + dueDate: record.dueDate || new Date().toISOString().slice(0, 10), + createdAt: record.createdAt, + lockAda: record.lockAda, + status, + beneficiaryLabel: `Eternl ${shortHex(record.requesterAddressHex)}`, + sponsorLabel: record.sponsorAddressHex + ? `Sponsor ${shortHex(record.sponsorAddressHex)}` + : 'Sponsor Wallet A', + requesterAddressHex: record.requesterAddressHex, + sponsorAddressHex: record.sponsorAddressHex, + lockLovelace: record.lockLovelace, + adaUsdAtCreation: record.adaUsd, + coverageMultiplier: record.coverageMultiplier, + lockTxId: record.lockTxId, + cancelTxId: record.cancelTxId, + unlockTxId: record.unlockTxId, + lockTxDraft: record.lockTxDraft, + }; +} + +export async function fetchRequestsApi(): Promise { + const response = await fetch('/api/requests'); + if (!response.ok) { + throw new Error(await parseApiError(response)); + } + + const data = (await response.json()) as ListRequestsApiResponse; + return (data.requests ?? []).map(toPaymentRequest); +} + +export async function createRequestApi( + payload: CreateRequestApiPayload, +): Promise<{ request: PaymentRequest; lockTxDraft: LockTransactionDraft }> { + const response = await fetch('/api/requests', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify(payload), + }); + + if (!response.ok) { + throw new Error(await parseApiError(response)); + } + + const data = (await response.json()) as CreateRequestApiResponse; + return { + request: toPaymentRequest({ + ...data.request, + lockTxDraft: data.lockTxDraft, + }), + lockTxDraft: data.lockTxDraft, + }; +} + +export async function cancelRequestApi( + requestId: string, +): Promise<{ requestId: string; status: RequestStatus; cancelTxId: string }> { + const response = await fetch(`/api/requests/${encodeURIComponent(requestId)}/cancel`, { + method: 'POST', + }); + + if (!response.ok) { + throw new Error(await parseApiError(response)); + } + + const data = (await response.json()) as { + requestId: string; + status: RequestStatus; + cancelTxId: string; + }; + return data; +} + +export async function claimRequestApi( + requestId: string, +): Promise<{ requestId: string; status: RequestStatus; unlockTxId: string }> { + const response = await fetch(`/api/requests/${encodeURIComponent(requestId)}/claim`, { + method: 'POST', + }); + + if (!response.ok) { + throw new Error(await parseApiError(response)); + } + + const data = (await response.json()) as { + requestId: string; + status: RequestStatus; + unlockTxId: string; + }; + return data; +} diff --git a/lazer/cardano/frontend/src/components/EternlWalletPanel.tsx b/lazer/cardano/frontend/src/components/EternlWalletPanel.tsx new file mode 100644 index 00000000..b75cfc02 --- /dev/null +++ b/lazer/cardano/frontend/src/components/EternlWalletPanel.tsx @@ -0,0 +1,79 @@ +import type { EternlWalletState } from '../types/wallet'; + +interface EternlWalletPanelProps { + wallet: EternlWalletState; + compact?: boolean; +} + +function shortHex(value: string, keep = 10): string { + if (value.length <= keep * 2) { + return value; + } + return `${value.slice(0, keep)}...${value.slice(-keep)}`; +} + +export function EternlWalletPanel({ wallet, compact = false }: EternlWalletPanelProps): JSX.Element { + return ( +
+
+
+ {wallet.walletIcon ? ( + {wallet.walletName} + ) : null} +

{compact ? 'Eternl' : wallet.walletName}

+
+ + {wallet.isConnected ? 'Connected' : 'Disconnected'} + +
+ + {!wallet.isInstalled ? ( +

+ {compact + ? 'Eternl not detected.' + : 'Eternl wallet not detected. Install the browser extension and reload this page.'} +

+ ) : null} + + {wallet.isInstalled && wallet.isConnected ? ( +
+
+ Network + {wallet.networkName} +
+
+ Address (hex) + {wallet.primaryAddressHex ? shortHex(wallet.primaryAddressHex) : '--'} +
+
+ ) : null} + + {wallet.error ? ( +

{compact ? 'Wallet connection failed.' : wallet.error}

+ ) : null} + +
+ {wallet.isConnected ? ( + + ) : ( + + )} +
+
+ ); +} diff --git a/lazer/cardano/frontend/src/components/LivePricePanel.tsx b/lazer/cardano/frontend/src/components/LivePricePanel.tsx new file mode 100644 index 00000000..522d37ab --- /dev/null +++ b/lazer/cardano/frontend/src/components/LivePricePanel.tsx @@ -0,0 +1,58 @@ +import { formatAdaUsd, formatDateTime } from '../utils/format'; + +interface LivePricePanelProps { + adaUsd: number | null; + isLoading: boolean; + error: string | null; + updatedAt: Date | null; + onRefresh: () => Promise; + compact?: boolean; +} + +export function LivePricePanel({ + adaUsd, + isLoading, + error, + updatedAt, + onRefresh, + compact = false, +}: LivePricePanelProps): JSX.Element { + const statusText = isLoading + ? 'Refreshing ADA/USD...' + : error + ? compact + ? 'Price unavailable' + : error + : updatedAt + ? compact + ? `Updated ${formatDateTime(updatedAt.toISOString())}` + : `Last update: ${formatDateTime(updatedAt.toISOString())}` + : 'Waiting for first quote...'; + + return ( +
+
+

{compact ? 'ADA/USD' : 'Live ADA/USD'}

+ +
+

{adaUsd ? formatAdaUsd(adaUsd) : '--'}

+

{statusText}

+
+ ); +} diff --git a/lazer/cardano/frontend/src/components/RequestCard.tsx b/lazer/cardano/frontend/src/components/RequestCard.tsx new file mode 100644 index 00000000..b673d486 --- /dev/null +++ b/lazer/cardano/frontend/src/components/RequestCard.tsx @@ -0,0 +1,118 @@ +import type { PaymentRequest, Role } from '../types/payment'; +import { formatAda, formatDate, formatUsd } from '../utils/format'; +import { StatusBadge } from './StatusBadge'; + +interface RequestCardProps { + request: PaymentRequest; + role: Role; + adaUsd: number; + onClaim?: (id: string) => void | Promise; + onCancel?: (id: string) => void; +} + +export function RequestCard({ + request, + role, + adaUsd, + onClaim, + onCancel, +}: RequestCardProps): JSX.Element { + const currentRequiredAda = request.usdAmount / adaUsd; + const isClaimable = request.status === 'ready_to_claim'; + const isCancelable = request.status === 'created' || request.status === 'ready_to_claim'; + const isUnderfundedNow = request.lockAda < currentRequiredAda; + + return ( +
+
+
+

{request.description}

+

+ Request #{request.id.slice(-4)} • Due {formatDate(request.dueDate)} +

+
+ +
+ +
+
+ Amount + {formatUsd(request.usdAmount)} +
+
+ Locked + {formatAda(request.lockAda)} +
+
+ Current required + {formatAda(currentRequiredAda)} +
+
+ Sponsor + {request.sponsorLabel} +
+
+ + {isUnderfundedNow && isClaimable ? ( +

+ Warning: if claimed now, all locked ADA will be sent and there will be a shortfall. +

+ ) : null} + + {role === 'applicant' && isClaimable ? ( + + ) : null} + {role === 'sponsor' && isCancelable ? ( + + ) : null} + + {request.settlement ? ( +
+

Settlement result

+

+ Sent to user: {formatAda(request.settlement.sentAda)} +

+ {request.settlement.wasUnderfunded ? ( +

+ Underfunded claim. Locked collateral fully sent. Shortfall:{' '} + {formatUsd(request.settlement.shortfallUsd)} +

+ ) : ( +

+ Returned to sponsor: {formatAda(request.settlement.sponsorChangeAda)} +

+ )} +

Executed with ADA/USD {request.settlement.executedAdaUsd.toFixed(2)}

+
+ ) : null} + + {request.lockTxId || request.unlockTxId || request.cancelTxId ? ( +
+ {request.lockTxId ? ( +

+ Lock tx: {request.lockTxId} +

+ ) : null} + {request.unlockTxId ? ( +

+ Claim tx: {request.unlockTxId} +

+ ) : null} + {request.cancelTxId ? ( +

+ Cancel tx: {request.cancelTxId} +

+ ) : null} +
+ ) : null} +
+ ); +} diff --git a/lazer/cardano/frontend/src/components/RequestForm.tsx b/lazer/cardano/frontend/src/components/RequestForm.tsx new file mode 100644 index 00000000..23b6972f --- /dev/null +++ b/lazer/cardano/frontend/src/components/RequestForm.tsx @@ -0,0 +1,124 @@ +import { type FormEvent, useMemo, useState } from 'react'; +import type { CreateRequestPayload } from '../types/payment'; +import { formatAda } from '../utils/format'; +import { computeLockAda } from '../utils/settlement'; + +interface RequestFormProps { + adaUsd: number; + coverageMultiplier: number; + onCreate: (payload: CreateRequestPayload) => Promise; + isCreating: boolean; + className?: string; +} + +export function RequestForm({ + adaUsd, + coverageMultiplier, + onCreate, + isCreating, + className, +}: RequestFormProps): JSX.Element { + const [usdAmount, setUsdAmount] = useState('120'); + const [description, setDescription] = useState(''); + const [dueDate, setDueDate] = useState(() => { + const date = new Date(); + date.setDate(date.getDate() + 7); + return date.toISOString().slice(0, 10); + }); + const [error, setError] = useState(''); + + const estimatedLockAda = useMemo(() => { + const amount = Number(usdAmount); + if (Number.isNaN(amount) || amount <= 0) { + return 0; + } + return computeLockAda(amount, adaUsd, coverageMultiplier); + }, [adaUsd, coverageMultiplier, usdAmount]); + + const handleSubmit = async (event: FormEvent): Promise => { + event.preventDefault(); + + const amount = Number(usdAmount); + if (Number.isNaN(amount) || amount <= 0) { + setError('USD amount must be greater than zero.'); + return; + } + if (!description.trim()) { + setError('Description is required.'); + return; + } + if (!dueDate) { + setError('Please select a due date.'); + return; + } + + setError(''); + try { + await onCreate({ + usdAmount: amount, + description: description.trim(), + dueDate, + }); + setDescription(''); + setUsdAmount('120'); + } catch (createError) { + setError( + createError instanceof Error ? createError.message : 'Could not create request right now.', + ); + } + }; + + return ( +
+
+
+

Create Request

+
+
+
+ +