From c691e296dbf68b165a4166261c494b47a97e79be Mon Sep 17 00:00:00 2001 From: Maximilien COMLAN Date: Tue, 7 Oct 2025 23:27:24 +0100 Subject: [PATCH 01/20] added typescript support on direct-pay, invoices --- lib/client.ts | 27 + lib/credentials.ts | 38 + lib/direct-pay.ts | 48 + lib/errors.ts | 8 + lib/invoices/checkout.ts | 87 ++ lib/invoices/invoice.ts | 169 +++ lib/invoices/onsite.ts | 83 ++ lib/store.ts | 55 + lib/types/index.ts | 20 + package-lock.json | 2607 ++++++++++++++++++++++++++++++++++++++ package.json | 4 +- 11 files changed, 3145 insertions(+), 1 deletion(-) create mode 100644 lib/client.ts create mode 100644 lib/credentials.ts create mode 100644 lib/direct-pay.ts create mode 100644 lib/errors.ts create mode 100644 lib/invoices/checkout.ts create mode 100644 lib/invoices/invoice.ts create mode 100644 lib/invoices/onsite.ts create mode 100644 lib/store.ts create mode 100644 lib/types/index.ts create mode 100644 package-lock.json diff --git a/lib/client.ts b/lib/client.ts new file mode 100644 index 0000000..120c2f3 --- /dev/null +++ b/lib/client.ts @@ -0,0 +1,27 @@ +import { Setup } from "./credentials"; +import axios, {Axios} from "axios" +import { Store } from "./store"; + +export class PaydunyaClient { + setup: Setup; + store?: Store; + axios: Axios; + + constructor(setup: Setup, store: Store | undefined = undefined) { + this.setup = setup; + this.store = store; + + this.axios = axios.create({ + baseURL: this.baseURL + }); + + this.axios.interceptors.request.use((config) => { + return this.setup.extendRequestConfig(config) + }); + } + + get baseURL() { + return this.setup.mode === "test" ? 'https://app.paydunya.com/sandbox-api/v1': 'https://app.paydunya.com/api/v1' + } + +} \ No newline at end of file diff --git a/lib/credentials.ts b/lib/credentials.ts new file mode 100644 index 0000000..e55b2f7 --- /dev/null +++ b/lib/credentials.ts @@ -0,0 +1,38 @@ +import axios, {Axios, InternalAxiosRequestConfig} from "axios" +type Environment = "live" | "test" + +interface SetupOptions { + masterKey: string; + privateKey: string; + publicKey: string; + token: string; + mode: Environment; +} + +export class Setup { + masterKey: string + privateKey: string + publicKey: string + token: string + mode: Environment + + constructor(options: SetupOptions) { + this.masterKey = options.masterKey; + this.privateKey = options.privateKey; + this.publicKey = options.publicKey; + this.token = options.token; + this.mode = options.mode; + } + + extendRequestConfig(config: InternalAxiosRequestConfig) { + config.headers + .set("Content-Type", "application/json") + .set("PAYDUNYA-MASTER-KEY", this.masterKey) + .set("PAYDUNYA-PRIVATE-KEY", this.privateKey) + .set("PAYDUNYA-TOKEN", this.token) + return config + } + +} + + diff --git a/lib/direct-pay.ts b/lib/direct-pay.ts new file mode 100644 index 0000000..16edbb0 --- /dev/null +++ b/lib/direct-pay.ts @@ -0,0 +1,48 @@ +import util from 'util'; +import { PaydunyaClient } from './client'; +import { ResponseError } from './errors'; + + +export class DirectPay { + private client: PaydunyaClient; + + public responseText?: string; + public description?: string; + public transactionID?: string; + + constructor(client: PaydunyaClient) { + this.client = client; + } + + /** + * Credit a PAYDUNYA account + * @param account Account alias, number or email + * @param amount Amount to credit + */ + async creditAccount(account: string, amount: number): Promise { + const body = { + account_alias: account, + amount: Number(amount) + }; + + const res = await this.client.axios + .post(`/direct-pay/credit-account`, body); + + if (res.data.response_code === '00') { + this.responseText = res.data.response_text; + this.description = res.data.description; + this.transactionID = res.data.transaction_id; + } else { + const e = new ResponseError( + util.format( + 'Failed to credit account. Please ensure %s and %s are valid OR check your account balance.', + account, + amount + ), + res.data + ); + throw e; + } + + } +} \ No newline at end of file diff --git a/lib/errors.ts b/lib/errors.ts new file mode 100644 index 0000000..0f13263 --- /dev/null +++ b/lib/errors.ts @@ -0,0 +1,8 @@ +export class ResponseError extends Error { + data: T | undefined = undefined + + constructor(message: string, data: T | undefined = undefined) { + super(message) + this.data = data; + } +} \ No newline at end of file diff --git a/lib/invoices/checkout.ts b/lib/invoices/checkout.ts new file mode 100644 index 0000000..3b92a80 --- /dev/null +++ b/lib/invoices/checkout.ts @@ -0,0 +1,87 @@ +import { Invoice } from './invoice'; +import { PaydunyaClient } from '../client'; +import { ResponseError } from '../errors'; + +export default class CheckoutInvoice extends Invoice { + token?: string; + url?: string; + status?: string; + responseText?: string; + customer?: any; + receiptURL?: string; + receipt_identifier?: string; + provider_reference?: string; + + constructor(client: PaydunyaClient) { + super(client); + } + + /** + * Create invoice + */ + async create() { + const requestBody = this.asRequestBody(); + + return this.client.axios + .post('/checkout-invoice/create', requestBody) + .then((res) => { + if (res.data.response_code === '00') { + this.token = res.data.token; + this.url = res.data.response_text; + return this.confirm(this.token); + } else { + const e = new ResponseError('Failed to create invoice.', res.data); + throw e; + } + }); + } + + /** + * Get token status. + * @param {string} givenToken Invoice token + */ + async confirm(givenToken?: string) { + const token = givenToken ? givenToken : this.token; + this.client.axios + .get(`/checkout-invoice/confirm/${token}`) + .then((res) => { + const body = res.data; + if (body.response_code === '00') { + this.status = body.status; + this.responseText = body.response_text; + if (this.status === 'completed') { + this.customer = body.customer; + this.receiptURL = body.receipt_url; + this.receipt_identifier = body.receipt_identifier; + this.provider_reference = body.provider_reference; + if (body.custom_data && Object.keys(body.custom_data).length > 0) { + this.customData = body.custom_data; + } + } + this.totalAmount = body.invoice.total_amount; + return this.asObject + + } else { + const e = new ResponseError('Could not confirm invoice status.', res.data); + throw e; + } + }); + }; + + + get asObject() { + return { + token: this.token, + url: this.url, + status: this.status, + responseText: this.responseText, + customer: this.customer, + receiptURL: this.receiptURL, + receipt_identifier: this.receipt_identifier, + provider_reference: this.provider_reference, + customData: this.customData, + totalAmount: this.totalAmount + }; + } + +} \ No newline at end of file diff --git a/lib/invoices/invoice.ts b/lib/invoices/invoice.ts new file mode 100644 index 0000000..d675410 --- /dev/null +++ b/lib/invoices/invoice.ts @@ -0,0 +1,169 @@ +import { PaydunyaClient } from "../client"; +import { PaymentChannel } from "../types"; + +interface InvoiceItem { + name: string; + quantity: number; + unit_price: number; + total_price: number; + description?: string; +} + +interface InvoiceTax { + name: string; + amount: number; +} + +interface InvoiceData { + total_amount: number; + channels: PaymentChannel[]; + items: Record; + description: string; + taxes: Record; + custom_data: Record; +} + + +/** + * Invoice class + * @param {object} setup Instance of paydunya.Setup + * @param {object} store Instance of paydunya.Store + */ +export class Invoice { + client: PaydunyaClient; + returnURL?: string; + cancelURL?: string; + callbackURL?: string; + + description: string; + items: Record; + customData: Record; + taxes: Record; + channels: PaymentChannel[]; + totalAmount: number; + + constructor(client: PaydunyaClient) { + this.client = client; + + if (client.store?.return_url) this.returnURL = client.store!.return_url; + if (client.store?.cancel_url) this.cancelURL = client.store!.cancel_url; + if (client.store?.callback_url) this.callbackURL = client.store!.callback_url; + + this.description = ''; + this.items = {}; + this.customData = {}; + this.taxes = {}; + this.channels = []; + this.totalAmount = 0; + } + + get store() { + return this.client.store + } + + /** + * Add an item to invoice + * @param {string} name + * @param {number} quantity + * @param {number} unitPrice + * @param {number} totalPrice + * @param {string} description + */ + addItem( + name: string, + quantity?: number, + unitPrice?: number, + totalPrice?: number, + description?: string + ) { + const position = Object.keys(this.items).length + 1; + this.items['item_' + position] = { + name: name, + quantity: quantity || 0, + unit_price: unitPrice || 0, + total_price: totalPrice || 0, + }; + if (description) this.items['item_' + position].description = description; + + return this; + } + + /** + * Add a tax + * @param {string} name + * @param {number} amount + */ + addTax(name: string, amount: number) { + const position = Object.keys(this.taxes).length + 1; + this.taxes['tax_' + position] = { + name: name, + amount: Number(amount), + }; + return this + } + + /** + * Add a payment channel + * @param {string} channel + */ + addChannel(channel: PaymentChannel) { + this.channels.push(channel); + return this + } + + /** + * Add many payment channels at once + * @param {array} channels + */ + addChannels(channels: PaymentChannel[] = []) { + for (let i = 0; i < channels.length; i++) { + this.channels.push(channels[i]); + } + + return this; + } + + /** + * Add custom data key, value pairs to request + * @param {string} title key + * @param {string} value + */ + addCustomData(title: string, value: string) { + this.customData[title] = value; + return this + } + + /** + * Generate the request body + * @return {object} + */ + asRequestBody() { + if (this.totalAmount <= 0) + throw new Error( + "Invalid parameters. Initialize Invoice with valid instances of Setup and Store. Total amount must also be set.\neg: var invoice = new Invoice; invoice.init(setup, store); invoice.setTotalAmount(40)" + ); + + const body = { + invoice: { + total_amount: this.totalAmount, + } as InvoiceData, + actions: undefined as any, + custom_data: undefined as Record | undefined, + store: this.store?.asObject, + }; + + if (this.description) body.invoice.description = this.description; + if (Object.keys(this.channels).length > 0) body.invoice.channels = this.channels; + if (Object.keys(this.items).length > 0) body.invoice.items = this.items; + if (this.returnURL || this.cancelURL || this.callbackURL) { + body.actions = {}; + if (this.returnURL) body.actions.return_url = this.returnURL; + if (this.cancelURL) body.actions.cancel_url = this.cancelURL; + if (this.callbackURL) body.actions.callback_url = this.callbackURL; + } + if (Object.keys(this.taxes).length > 0) body.invoice.taxes = this.taxes; + if (Object.keys(this.customData).length > 0) body.custom_data = this.customData; + + return body; + } +} \ No newline at end of file diff --git a/lib/invoices/onsite.ts b/lib/invoices/onsite.ts new file mode 100644 index 0000000..61d7df9 --- /dev/null +++ b/lib/invoices/onsite.ts @@ -0,0 +1,83 @@ +import { PaydunyaClient } from "../client"; +import { ResponseError } from "../errors"; +import { Invoice } from "./invoice"; + + +export class OnsiteInvoice extends Invoice { + token?: string; + oprToken?: string; + responseText?: string; + status?: string; + receiptURL?: string; + customer?: any; + + constructor(client: PaydunyaClient) { + super(client); + } + + /** + * + * @param customer The account alias, username or phone number + */ + async create(customer: string) { + let body = { + invoice_data: this.asRequestBody(), + opr_data: { + account_alias: customer + } + } + return this.client.axios.post(`/opr/create`, body) + .then((response) => { + if (response.data?.response_code === '00') { + this.token = response.data.invoice_token; + this.oprToken = response.data.token; + this.responseText = response.data.description + + return { + token: this.token, + oprToken: this.oprToken, + responseText: this.responseText + } + } + else { + let error = new ResponseError('Failed to create invoice', response.data) + throw error; + } + }); + } + + + /** + * Charge paydunya account + * @param oprToken The OPR token of the invoice to confirm + * * @param confirmToken Confirmation token sent to PAYDUNYA user + */ + async charge(oprToken: string, confirmToken: string) { + let body = { + token: oprToken, + confirm_token: confirmToken + }; + + return this.client.axios.post(`/opr/charge`, body) + .then((response) => { + if (response.data?.response_code === '00') { + this.responseText = response.data.response_text; + this.status = response.data.invoice_data.status; + this.receiptURL = response.data.invoice_data.receipt_url; + this.customer = response.data.invoice_data.customer; + + return { + responseText: this.responseText, + status: this.status, + receiptURL: response.data.invoice_data.receipt_url, + customer: response.data.invoice_data.customer, + } + } else { + let error = new ResponseError('Failed to charge invoice. Check OPR/confirm token and try again.', response.data); + throw error; + } + }); + } + + +} \ No newline at end of file diff --git a/lib/store.ts b/lib/store.ts new file mode 100644 index 0000000..79b2cfe --- /dev/null +++ b/lib/store.ts @@ -0,0 +1,55 @@ +interface PartialStoreConfiguration { + tagline:string; + phone_number: string; + postal_address: string; + logo_url: string; + website_url:string; + cancel_url: string; + return_url: string; + callback_url: string; +} + +interface StoreConfiguration extends Partial { + name: string; +} + +export class Store { + + name: string; + tagline?: string; + phone_number?: string; + postal_address?: string; + logo_url?: string; + website_url?: string; + cancel_url?: string; + return_url?: string; + callback_url?: string; + + constructor(config: StoreConfiguration) { + if (!config || !config.name) { + throw new Error('Invalid parameters.'); + } + this.name = config.name; + if (config.tagline) this.tagline = config.tagline; + if (config.phone_number) this.phone_number = config.phone_number; + if (config.postal_address) this.postal_address = config.postal_address; + if (config.logo_url) this.logo_url = config.logo_url; + if (config.website_url) this.website_url = config.website_url; + if (config.cancel_url) this.cancel_url = config.cancel_url; + if (config.return_url) this.return_url = config.return_url; + if (config.callback_url) this.callback_url = config.callback_url; + } + + get asObject() { + const obj: Record = { name: this.name }; + if (this.tagline) obj.tagline = this.tagline; + if (this.phone_number) obj.phone_number = this.phone_number; + if (this.postal_address) obj.postal_address = this.postal_address; + if (this.logo_url) obj.logo_url = this.logo_url; + if (this.website_url) obj.website_url = this.website_url; + if (this.cancel_url) obj.cancel_url = this.cancel_url; + if (this.return_url) obj.return_url = this.return_url; + if (this.callback_url) obj.callback_url = this.callback_url; + return obj; + } +} \ No newline at end of file diff --git a/lib/types/index.ts b/lib/types/index.ts new file mode 100644 index 0000000..6cc5e7f --- /dev/null +++ b/lib/types/index.ts @@ -0,0 +1,20 @@ +export enum PaymentChannel { + Card = "card", + OrangeMoneySenegal = "orange-money-senegal", + WaveSenegal = "wave-senegal", + FreeMoneySenegal = "free-money-senegal", + ExpressoSn = "expresso-sn", + WizallSenegal = "wizall-senegal", + MtnBenin = "mtn-benin", + MoovBenin = "moov-benin", + OrangeMoneyCi = "orange-money-ci", + WaveCi = "wave-ci", + MtnCi = "mtn-ci", + MoovCi = "moov-ci", + TMoneyTogo = "t-money-togo", + MoovTogo = "moov-togo", + OrangeMoneyMali = "orange-money-mali", + MoovMl = "moov-ml", + OrangeMoneyBurkina = "orange-money-burkina", + MoovBurkinaFaso = "moov-burkina-faso" +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..863838d --- /dev/null +++ b/package-lock.json @@ -0,0 +1,2607 @@ +{ + "name": "paydunya", + "version": "1.0.12", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "paydunya", + "version": "1.0.12", + "license": "MIT", + "dependencies": { + "axios": "^1.12.2", + "bluebird": "^2.1.3", + "superagent": "^0.18.1", + "typescript": "^5.9.3" + }, + "devDependencies": { + "browserify": "^10.2.4", + "uglifyify": "^3.0.1" + } + }, + "node_modules/acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha512-fu2ygVGuMmlzG8ZeRJ0bvR41nsAkxxhbyk8bZ1SS521Z7vmgJFTQQlfz/Mp/nJexGBz+v8sC9bM6+lNgskt4Ug==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-node": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz", + "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "acorn": "^7.0.0", + "acorn-walk": "^7.0.0", + "xtend": "^4.0.2" + } + }, + "node_modules/acorn-node/node_modules/acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", + "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha512-GrTZLRpmp6wIC2ztrWW9MjjTgSKccffgFagbNDOX95/dcjEcYZibYTeaOntySQLcdw1ztBoFkviiUvTMbb9MYg==", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", + "dev": true, + "license": "BSD-3-Clause OR MIT", + "engines": { + "node": ">=0.4.2" + } + }, + "node_modules/asn1.js": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/asn1.js/node_modules/bn.js": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", + "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", + "dev": true, + "license": "MIT" + }, + "node_modules/assert": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.3.0.tgz", + "integrity": "sha512-5aKcpD+XnHpZ7EGxsuo6uoILNh0rvm0Ypa17GlkrF2CNSPhvdgi3ft9XsL2ajdVOI2I3xuGZnHvlXAeqTZYvXg==", + "dev": true, + "license": "MIT", + "dependencies": { + "util": "0.10.3" + } + }, + "node_modules/assert/node_modules/inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha512-8nWq2nLTAwd02jTqJExUYFSD/fKq6VH9Y/oG2accc/kdI0V98Bag8d5a4gi3XHz73rDWa2PvTtvcWYquKqSENA==", + "dev": true, + "license": "ISC" + }, + "node_modules/assert/node_modules/util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha512-5KiHfsmkqacuKjkRkdV7SsfDJ2EGiPsK92s2MhNSY0craxjTdKTtqKsJaCWp4LW33ZZ0OPUv1WO/TFvNQRiQxQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "2.0.1" + } + }, + "node_modules/astw": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/astw/-/astw-2.2.0.tgz", + "integrity": "sha512-E/4z//dvN0lfr8zAx8hXeQ8o3nRoQaL/wqI7fAALEvh/40mnyUxfFB9MwyDHYKVDtS3cp3Pow5s96djZR5lkWw==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^4.0.3" + } + }, + "node_modules/async": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "integrity": "sha512-l6ToIJIotphWahxxHyzK9bnLR6kM4jJIIgLShZeqLY7iboHoGkdgFl7W2/Ivi4SkMJYGKqW8vSuk0uKUj6qsSw==", + "license": "MIT" + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/axios": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.12.2.tgz", + "integrity": "sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.4", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/axios/node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/axios/node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/axios/node_modules/form-data": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", + "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/Base64": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz", + "integrity": "sha512-reGEWshDmTDQDsCec/HduOO9Wyj6yMOupMfhIf3ugN1TDlK2NQW4DDJSqNNtp380SNcvRfXtO8HSCQot0d0SMw==", + "dev": true + }, + "node_modules/base64-js": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz", + "integrity": "sha512-3XSA2cR/h/73EzlXXdU6YNycmYI7+kicTxks4eJg2g39biHR84slg2+des+p7iHYhbRg/udIS4TD53WabcOUkw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/bluebird": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz", + "integrity": "sha512-UfFSr22dmHPQqPP9XWHRhq+gWnHCYguQGkXQlbyPtW5qTnhFWA8/iXg765tH0cAjy7l/zPJ1aBTO0g5XgA7kvQ==", + "license": "MIT" + }, + "node_modules/bn.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.2.tgz", + "integrity": "sha512-v2YAxEmKaBLahNwE1mjp4WON6huMNeuDvagFZW+ASCuA/ku0bXR9hSMw0XpiqMoA3+rmnyck/tPRSFQkoC9Cuw==", + "dev": true, + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", + "dev": true, + "license": "MIT" + }, + "node_modules/browser-pack": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-5.0.1.tgz", + "integrity": "sha512-BFMQuYXCcwr3Uvna1y1hikqd3r2dQpWIQBIN3m5YwE3ClfnXDeF3tqP6Wqjhs1LRUeBJpgHn8yD+fPX/YSEgMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "combine-source-map": "~0.6.1", + "defined": "^1.0.0", + "JSONStream": "^1.0.3", + "through2": "^1.0.0", + "umd": "^3.0.0" + }, + "bin": { + "browser-pack": "bin/cmd.js" + } + }, + "node_modules/browser-resolve": { + "version": "1.11.3", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz", + "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve": "1.1.7" + } + }, + "node_modules/browser-resolve/node_modules/resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg==", + "dev": true, + "license": "MIT" + }, + "node_modules/browserify": { + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/browserify/-/browserify-10.2.6.tgz", + "integrity": "sha512-rhKmIuWDcE1ULm6lrd3kQdUTqFsLd/UJp3yYt4Ur5rDzk/Gj2AH6+ZTNqkaMqwMphkf8Rp83S1GfMxtu9QjGDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "assert": "~1.3.0", + "browser-pack": "^5.0.0", + "browser-resolve": "^1.7.1", + "browserify-zlib": "~0.1.2", + "buffer": "^3.0.0", + "builtins": "~0.0.3", + "commondir": "0.0.1", + "concat-stream": "~1.4.1", + "console-browserify": "^1.1.0", + "constants-browserify": "~0.0.1", + "crypto-browserify": "^3.0.0", + "defined": "^1.0.0", + "deps-sort": "^1.3.7", + "domain-browser": "~1.1.0", + "duplexer2": "~0.0.2", + "events": "~1.0.0", + "glob": "^4.0.5", + "has": "^1.0.0", + "htmlescape": "^1.1.0", + "http-browserify": "^1.4.0", + "https-browserify": "~0.0.0", + "inherits": "~2.0.1", + "insert-module-globals": "^6.4.1", + "isarray": "0.0.1", + "JSONStream": "^1.0.3", + "labeled-stream-splicer": "^1.0.0", + "module-deps": "^3.7.11", + "os-browserify": "~0.1.1", + "parents": "^1.0.1", + "path-browserify": "~0.0.0", + "process": "~0.11.0", + "punycode": "^1.3.2", + "querystring-es3": "~0.2.0", + "read-only-stream": "^1.1.1", + "readable-stream": "^1.1.13", + "resolve": "^1.1.4", + "shasum": "^1.0.0", + "shell-quote": "~0.0.1", + "stream-browserify": "^1.0.0", + "string_decoder": "~0.10.0", + "subarg": "^1.0.0", + "syntax-error": "^1.1.1", + "through2": "^1.0.0", + "timers-browserify": "^1.0.1", + "tty-browserify": "~0.0.0", + "url": "~0.10.1", + "util": "~0.10.1", + "vm-browserify": "~0.0.1", + "xtend": "^4.0.0" + }, + "bin": { + "browserify": "bin/cmd.js" + } + }, + "node_modules/browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "node_modules/browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/browserify-rsa": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.1.tgz", + "integrity": "sha512-YBjSAiTqM04ZVei6sXighu679a3SqWORA3qZTEqZImnlkDIFtKc6pNutpjyZ8RJTjQtuYfeetkxM11GwoYXMIQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^5.2.1", + "randombytes": "^2.1.0", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/browserify-sign": { + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.5.tgz", + "integrity": "sha512-C2AUdAJg6rlM2W5QMp2Q4KGQMVBwR1lIimTsUnutJ8bMpW5B52pGpR2gEnNBNwijumDo5FojQ0L9JrXA8m4YEw==", + "dev": true, + "license": "ISC", + "dependencies": { + "bn.js": "^5.2.2", + "browserify-rsa": "^4.1.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.6.1", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.9", + "readable-stream": "^2.3.8", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/browserify-sign/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/browserify-sign/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==", + "dev": true, + "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/browserify-sign/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==", + "dev": true, + "license": "MIT" + }, + "node_modules/browserify-sign/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==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/browserify-sign/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==", + "dev": true, + "license": "MIT" + }, + "node_modules/browserify-zlib": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", + "integrity": "sha512-19OEpq7vWgsH6WkvkBJQDFvJS1uPcbFOQ4v9CU839dO+ZZXUZO6XpE6hNCqvlIIj+4fZvRiJ6DsAQ382GwiyTQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "pako": "~0.2.0" + } + }, + "node_modules/buffer": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-3.6.2.tgz", + "integrity": "sha512-c3M77NkHJxS0zx/ErxXhDLr1v3y2MDXPeTJPvLNOaIYJ4ymHBUFQ9EXzt9HYuqAJllMoNb/EZ8hIiulnQFAUuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "base64-js": "0.0.8", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "node_modules/buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/buffer/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/builtins": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-0.0.7.tgz", + "integrity": "sha512-T8uCGKc0/2aLVt6omt8JxDRBoWEMkku+wFesxnhxnt4NygVZG99zqxo7ciK8eebszceKamGoUiLdkXCgGQyrQw==", + "dev": true, + "license": "MIT" + }, + "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==", + "dev": true, + "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==", + "dev": true, + "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/camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha512-wzLkDa4K/mzI1OSITC+DUyjgIl/ETNHE9QvYgy6J6Jvqyyz4C0Xfd+lQhb19sX2jMpZV4IssUn0VDVmglV+s4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha512-Baz3aNe2gd2LP2qk5U+sDk/m4oSuwSDcBfayTCTBoWpfIGO5XFxPmjILQII4NGiZjD6DoDI6kf7gKaxkf7s3VQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "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==", + "dev": true, + "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": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha512-GIOYRizG+TGoc7Wgc1LiOTLare95R3mzKgoln+Q/lE4ceiYH19gUpl0l0Ffq4lJDEf3FxujMe6IBfOCs7pfqNA==", + "dev": true, + "license": "ISC", + "dependencies": { + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" + } + }, + "node_modules/combine-source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.6.1.tgz", + "integrity": "sha512-XKRNtuZRlVDTuSGKsfZpXYz80y0XDbYS4a+FzafTgmYHy/ckruFBx7Nd6WaQnFHVI3O6IseWVdXUvZutMpjSkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "convert-source-map": "~1.1.0", + "inline-source-map": "~0.5.0", + "lodash.memoize": "~3.0.3", + "source-map": "~0.4.2" + } + }, + "node_modules/combined-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz", + "integrity": "sha512-qfexlmLp9MyrkajQVyjEDb0Vj+KhRgR/rxLiVhaihlT+ZkX0lReqtH6Ack40CvMDERR4b5eFp3CreskpBs1Pig==", + "dependencies": { + "delayed-stream": "0.0.5" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commondir": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-0.0.1.tgz", + "integrity": "sha512-Ghe1LmLv3G3c0XJYu+c88MCRIPqWQ67qaqKY1KvuN4uPAjfUj+y4hvcpZ2kCPrjpRNyklW4dpAZZ8a7vOh50tg==", + "dev": true, + "license": "MIT/X11", + "engines": { + "node": "*" + } + }, + "node_modules/component-emitter": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.1.2.tgz", + "integrity": "sha512-YhIbp3PJiznERfjlIkK0ue4obZxt2S60+0W8z24ZymOHT8sHloOqWOqZRU2eN5OlY8U08VFsP02letcu26FilA==" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-stream": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.4.11.tgz", + "integrity": "sha512-X3JMh8+4je3U1cQpG87+f9lXHDrqcb2MVLg9L7o8b1UZ0DzhRrUpdn65ttzu10PpJPPI3MQNkis+oha6TSA9Mw==", + "dev": true, + "engines": [ + "node >= 0.8" + ], + "license": "MIT", + "dependencies": { + "inherits": "~2.0.1", + "readable-stream": "~1.1.9", + "typedarray": "~0.0.5" + } + }, + "node_modules/console-browserify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", + "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", + "dev": true + }, + "node_modules/constants-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-0.0.1.tgz", + "integrity": "sha512-FL+diDS9AKR5BAA2M+GNk8lnH64tRE3zepTG9hucxc7o04LgCRhkQZhF7u/OKHZT8LLRT+sZEi9qFzXUchq9pA==", + "dev": true, + "license": "MIT" + }, + "node_modules/convert-source-map": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", + "integrity": "sha512-Y8L5rp6jo+g9VEPgvqNfEopjTR4OTYct8lXlS8iVQdmnjDvbdbzYe9rjtFCB9egC86JoNCU61WRY+ScjkZpnIg==", + "dev": true, + "license": "MIT" + }, + "node_modules/cookiejar": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.0.1.tgz", + "integrity": "sha512-Txnl7P7okmx/FyZNRAjPyHMKISV2ADNbd+xITouEVyl2jUczrU4tJT40KcfQL/ifCo0kqqLgD49QlNofAAmBKQ==", + "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-ecdh": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" + } + }, + "node_modules/create-ecdh/node_modules/bn.js": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", + "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", + "dev": true, + "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==", + "dev": true, + "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==", + "dev": true, + "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/crypto-browserify": { + "version": "3.12.1", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.1.tgz", + "integrity": "sha512-r4ESw/IlusD17lgQi1O20Fa3qNnsckR126TdUuBgAu7GBYSIPvdNyONd3Zrxh0xCwA4+6w/TDArBPsMvhur+KQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "browserify-cipher": "^1.0.1", + "browserify-sign": "^4.2.3", + "create-ecdh": "^4.0.4", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "diffie-hellman": "^5.0.3", + "hash-base": "~3.0.4", + "inherits": "^2.0.4", + "pbkdf2": "^3.1.2", + "public-encrypt": "^4.0.3", + "randombytes": "^2.1.0", + "randomfill": "^1.0.4" + }, + "engines": { + "node": ">= 0.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/debug": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-1.0.5.tgz", + "integrity": "sha512-SIKSrp4+XqcUaNWhwaPJbLFnvSXPsZ4xBdH2WRK0Xo++UzMC4eepYghGAVhVhOwmfq3kqowqJ5w45R3pmYZnuA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.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==", + "dev": true, + "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/defined": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.1.tgz", + "integrity": "sha512-hsBd2qSVCRE+5PmNdHt1uzyrFu5d3RwmFDKzyNZMFq/EwDNJF7Ee5+D5oEKF0hU6LhtoUF1macFvOe4AskQC1Q==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/delayed-stream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz", + "integrity": "sha512-v+7uBd1pqe5YtgPacIIbZ8HuHeLFVNe4mUEyFDXL6KiqzEykjbw+5mXZXpGFgNVasdL4jWKgaKIXrEHiynN1LA==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/deps-sort": { + "version": "1.3.9", + "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-1.3.9.tgz", + "integrity": "sha512-aEnmQuu/Hf5h8akL8QshYWzk9MVBg/JYMyNq/Lz68i69nR17tunjP6o/AC6Tn48c8ayzG6aeKs6OoFOtVCtvrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "JSONStream": "^1.0.3", + "shasum": "^1.0.0", + "subarg": "^1.0.0", + "through2": "^1.0.0" + }, + "bin": { + "deps-sort": "bin/cmd.js" + } + }, + "node_modules/des.js": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.1.0.tgz", + "integrity": "sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/detective": { + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/detective/-/detective-4.7.1.tgz", + "integrity": "sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^5.2.1", + "defined": "^1.0.0" + } + }, + "node_modules/detective/node_modules/acorn": { + "version": "5.7.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", + "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "node_modules/diffie-hellman/node_modules/bn.js": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", + "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", + "dev": true, + "license": "MIT" + }, + "node_modules/domain-browser": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz", + "integrity": "sha512-fJ5MoHxe69h3E4/lJtFRhcWwLb04bhIBSfvCEMS1YDH+/9yEZTqBHTSTgch8nCP5tE5k2gdQEjodUqJzy7qJ9Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4", + "npm": ">=1.2" + } + }, + "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/duplexer2": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", + "integrity": "sha512-+AWBwjGadtksxjOQSFDhPNQbed7icNXApT4+2BNpsXzcCBiInq2H9XW0O8sfHFaPmnQRs7cg/P0fAr2IWQSW0g==", + "dev": true, + "license": "BSD", + "dependencies": { + "readable-stream": "~1.1.9" + } + }, + "node_modules/elliptic": { + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", + "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/elliptic/node_modules/bn.js": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", + "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", + "dev": true, + "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-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/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/events": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/events/-/events-1.0.2.tgz", + "integrity": "sha512-XK19KwlDJo8XsceooxNDK1pObtcT44+Xte6V/jQc4a+fHq1qEouThyyX2ePmS0hS8RcCulmRxzg+T8jiLKAFFQ==", + "dev": true, + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/extend": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-1.2.1.tgz", + "integrity": "sha512-2/JwIYRpMBDSjbQjUUppNSrmc719crhFaWIdT+TRSVA8gE+6HEobQWqJ6VkPt/H8twS7h/0WWs7veh8wmp98Ng==" + }, + "node_modules/follow-redirects": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", + "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/for-each": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/form-data": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-0.1.3.tgz", + "integrity": "sha512-khpfkwI/RQybQdwruvz89OCmcXiFZstZ88llcc552BrzvOhqIOHC6YCRJ44GLK7BRFBEMGH9zJ2zMy0nz27Y9w==", + "dependencies": { + "async": "~0.9.0", + "combined-stream": "~0.0.4", + "mime": "~1.2.11" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/formidable": { + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.0.14.tgz", + "integrity": "sha512-aOskFHEfYwkSKSzGui5jhQ+uyLo2NTwpzhndggz2YZHlv0HkAi+zG5ZEBCL3GTvqLyr/FzX9Mvx9DueCmu2HzQ==", + "deprecated": "Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau", + "engines": { + "node": ">=0.8.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/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/glob": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", + "integrity": "sha512-I0rTWUKSZKxPSIAIaqhSXTM/DiII6wame+rEC3cFA5Lqmr9YmdL7z6Hj9+bdWtTvoY1Su4/OiMLmb37Y7JzvJQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^2.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": "*" + } + }, + "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": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", + "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "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==", + "dev": true, + "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.0.5", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.5.tgz", + "integrity": "sha512-vXm0l45VbcHEVlTCzs8M+s0VeYsB2lnlAaThoLKGXr3bE/VWDOelNUnycUPEhKEaXARL2TEFjBOyUiM6+55KBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.4", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "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/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "dev": true, + "license": "MIT", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/htmlescape": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", + "integrity": "sha512-eVcrzgbR4tim7c7soKQKtxa/kQM4TzjnlU83rcZ9bHU6t31ehfV7SktN6McWgwPWg+JYMA/O3qpGxBvFq1z2Jg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/http-browserify": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/http-browserify/-/http-browserify-1.7.0.tgz", + "integrity": "sha512-Irf/LJXmE3cBzU1eaR4+NEX6bmVLqt1wkmDiA7kBwH7zmb0D8kBAXsDmQ88hhj/qv9iEZKlyGx/hrMcFi8sOHw==", + "dev": true, + "license": "MIT/X11", + "dependencies": { + "Base64": "~0.2.0", + "inherits": "~2.0.1" + } + }, + "node_modules/https-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz", + "integrity": "sha512-EjDQFbgJr1vDD/175UJeSX3ncQ3+RUnCL5NkthQGHvF4VNHlzTy8ifJfTqz47qiPRqaFH58+CbuG3x51WuB1XQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "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/indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha512-i0G7hLJ1z0DE8dsqJa2rycj9dBmNKgXBvotXtZYXakU9oivfB9Uj2ZBC27qqef2U58/ZLwalxa1X/RDCdkHtVg==", + "dev": true + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "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/inline-source-map": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.5.0.tgz", + "integrity": "sha512-2WtHG0qX9OH9TVcxsLVfq3Tzr+qtL6PtWgoh0XAAKe4KkdA/57Q+OGJuRJHA4mZ2OZnkJ/ZAaXf9krLB12/nIg==", + "dev": true, + "license": "MIT", + "dependencies": { + "source-map": "~0.4.0" + } + }, + "node_modules/insert-module-globals": { + "version": "6.6.3", + "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-6.6.3.tgz", + "integrity": "sha512-ryk8hTKUZCc300SPOOwx30WhE5oRUssPDVlIoO8vtoMNBy5HGeesVRl3HF7ra4ll42T0IdnwD9XR9svh6+RRhg==", + "dev": true, + "license": "MIT", + "dependencies": { + "combine-source-map": "~0.6.1", + "concat-stream": "~1.4.1", + "is-buffer": "^1.1.0", + "JSONStream": "^1.0.3", + "lexical-scope": "^1.2.0", + "process": "~0.11.0", + "through2": "^1.0.0", + "xtend": "^4.0.0" + }, + "bin": { + "insert-module-globals": "bin/cmd.js" + } + }, + "node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true, + "license": "MIT" + }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "dev": true, + "license": "MIT", + "dependencies": { + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "license": "MIT" + }, + "node_modules/json-stable-stringify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", + "integrity": "sha512-nKtD/Qxm7tWdZqJoldEC7fF0S41v0mWbeaXG3637stOWfyGxTgWTYE2wtfKmjzpvxv2MA2xzxsXOIiwUpkX6Qw==", + "dev": true, + "license": "MIT", + "dependencies": { + "jsonify": "~0.0.0" + } + }, + "node_modules/jsonify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz", + "integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==", + "dev": true, + "license": "Public Domain", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", + "dev": true, + "engines": [ + "node >= 0.2.0" + ], + "license": "MIT" + }, + "node_modules/JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "dev": true, + "license": "(MIT OR Apache-2.0)", + "dependencies": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + }, + "bin": { + "JSONStream": "bin.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/labeled-stream-splicer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-1.0.2.tgz", + "integrity": "sha512-3KBjPRnXrYC5h2jEf/d6hO7Lcl+38QzRVTOyHA2sFzZVMYwsUFuejlrOMwAjmz13hVBr9ruDS1RwE4YEz8P58w==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.1", + "isarray": "~0.0.1", + "stream-splicer": "^1.1.0" + } + }, + "node_modules/lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha512-RE2g0b5VGZsOCFOCgP7omTRYFqydmZkBwl5oNnQ1lDYC57uyO9KqNnNVxT7COSHTxrRCWVcAVOcbjk+tvh/rgQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lexical-scope": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/lexical-scope/-/lexical-scope-1.2.0.tgz", + "integrity": "sha512-ntJ8IcBCuKwudML7vAuT/L0aIMU0+9vO25K4CjLPYgzf1NZ0bAhJJBZrvkO+oUGgKcbdkH8UZdRsaEg+wULLRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "astw": "^2.0.0" + } + }, + "node_modules/lodash.memoize": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", + "integrity": "sha512-eDn9kqrAmVUC1wmZvlQ6Uhde44n+tXpqPrN8olQJbttgh0oKclk+SF54P47VEGE9CEiMeRwAP8BaM7UHvBkz2A==", + "dev": true, + "license": "MIT" + }, + "node_modules/longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha512-k+yt5n3l48JU4k8ftnKG6V7u32wyH2NfKzeMto9F/QRE0amxy/LayxwlvjjkZEIzqR+19IrtFO8p5kB9QaYUFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/methods": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.0.1.tgz", + "integrity": "sha512-2403MfnVypWSNIEpmQ26/ObZ5kSUx37E8NHRvriw0+I8Sne7k0HGuLGCk0OrCqURh4UIygD0cSsYq+Ll+kzNqA==", + "license": "MIT" + }, + "node_modules/miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + }, + "bin": { + "miller-rabin": "bin/miller-rabin" + } + }, + "node_modules/miller-rabin/node_modules/bn.js": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", + "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", + "dev": true, + "license": "MIT" + }, + "node_modules/mime": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.2.11.tgz", + "integrity": "sha512-Ysa2F/nqTNGHhhm9MV8ure4+Hc+Y8AWiqUdHxsO7xu8zc92ND9f3kpALHjaP026Ft17UfxrMt95c50PLUeynBw==" + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true, + "license": "ISC" + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", + "dev": true, + "license": "MIT" + }, + "node_modules/minimatch": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", + "integrity": "sha512-jQo6o1qSVLEWaw3l+bwYA2X0uLuK2KjNh2wjgO7Q/9UJnXr1Q3yQKR8BI0/Bt/rPg75e6SMW4hW/6cBHVTZUjA==", + "deprecated": "Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/module-deps": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-3.9.1.tgz", + "integrity": "sha512-EbWWlSGaCVidEsLsSzkY6l/jm0IcGDSQ8tGwtjM8joTrxqxP0om02Px9Np8D7FMZ/vZFdsOGbio+WqkKQxYuTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "browser-resolve": "^1.7.0", + "concat-stream": "~1.4.5", + "defined": "^1.0.0", + "detective": "^4.0.0", + "duplexer2": "0.0.2", + "inherits": "^2.0.1", + "JSONStream": "^1.0.3", + "parents": "^1.0.0", + "readable-stream": "^1.1.13", + "resolve": "^1.1.3", + "stream-combiner2": "~1.0.0", + "subarg": "^1.0.0", + "through2": "^1.0.0", + "xtend": "^4.0.0" + }, + "bin": { + "module-deps": "bin/cmd.js" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/os-browserify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.1.2.tgz", + "integrity": "sha512-aZicJZccvxWOZ0Bja2eAch2L8RIJWBuRYmM8Gwl/JjNtRltH0Itcz4eH/ESyuIWfse8cc93ZCf0XrzhXK2HEDA==", + "dev": true, + "license": "MIT" + }, + "node_modules/pako": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", + "integrity": "sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==", + "dev": true, + "license": "MIT" + }, + "node_modules/parents": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", + "integrity": "sha512-mXKF3xkoUt5td2DoxpLmtOmZvko9VfFpwRwkKDHSNvgmpLAeBo18YDhcPbBzJq+QLCHMbGOfzia2cX4U+0v9Mg==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-platform": "~0.11.15" + } + }, + "node_modules/parse-asn1": { + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.9.tgz", + "integrity": "sha512-fIYNuZ/HastSb80baGOuPRo1O9cf4baWw5WsAp7dBuUzeTD/BoaG8sVTdlPFksBE2lF21dN+A1AnrpIjSWqHHg==", + "dev": true, + "license": "ISC", + "dependencies": { + "asn1.js": "^4.10.1", + "browserify-aes": "^1.2.0", + "evp_bytestokey": "^1.0.3", + "pbkdf2": "^3.1.5", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/path-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", + "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-platform": { + "version": "0.11.15", + "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", + "integrity": "sha512-Y30dB6rab1A/nfEKsZxmr01nUotHX0c/ZiIAsCTatEe1CmS5Pm5He7fZ195bPT7RdquoaL8lLxFCMQi/bS7IJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "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==", + "dev": true, + "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/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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6.0" + } + }, + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT" + }, + "node_modules/public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/public-encrypt/node_modules/bn.js": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", + "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", + "dev": true, + "license": "MIT" + }, + "node_modules/punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/qs": { + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/qs/-/qs-0.6.6.tgz", + "integrity": "sha512-kN+yNdAf29Jgp+AYHUmC7X4QdJPR8czuMWLNLc0aRxkQ7tB3vJQEONKKT9ou/rW7EbqVec11srC9q9BiVbcnHA==", + "engines": { + "node": "*" + } + }, + "node_modules/querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==", + "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", + "dev": true, + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==", + "dev": true, + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "license": "MIT", + "dependencies": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "node_modules/read-only-stream": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-1.1.1.tgz", + "integrity": "sha512-CNGbvYZYr0b1F41aN7bYLHUBvvoynSS7ZTf2RLa5egnjZxKJPJUpUdWplD+jxQPijP/eL02IJxBhY8hwJlI3PQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "readable-stream": "^1.0.31", + "readable-wrap": "^1.0.0" + } + }, + "node_modules/readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "node_modules/readable-wrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/readable-wrap/-/readable-wrap-1.0.0.tgz", + "integrity": "sha512-/8n0Mr10S+HGKFygQ42Z40JIXwafPH3A72pwmlNClThgsImV5LJJiCue5Je1asxwY082sYxq/+kTxH6nTn0w3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "readable-stream": "^1.1.13-1" + } + }, + "node_modules/reduce-component": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/reduce-component/-/reduce-component-1.0.1.tgz", + "integrity": "sha512-y0wyCcdQul3hI3xHfIs0vg/jSbboQc/YTOAqaxjFG7At+XSexduuOqBVL9SmOLSwa/ldkbzVzdwuk9s2EKTAZg==", + "license": "Apache, Version 2.0" + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/resolve": { + "version": "1.22.10", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", + "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.16.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha512-yqINtL/G7vs2v+dFIZmFUDbnVyFUJFKd6gK22Kgo6R4jfJGFtisKyncWDDULgjfqf4ASQuIQyjJ7XZ+3aWpsAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "align-text": "^0.1.1" + }, + "engines": { + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "hash-base": "^3.1.2", + "inherits": "^2.0.4" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/ripemd160/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==", + "dev": true, + "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/ripemd160/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/ripemd160/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==", + "dev": true, + "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/ripemd160/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==", + "dev": true, + "license": "MIT" + }, + "node_modules/ripemd160/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==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/ripemd160/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==", + "dev": true, + "license": "MIT" + }, + "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==", + "dev": true, + "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/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==", + "dev": true, + "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==", + "dev": true, + "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/shasum": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", + "integrity": "sha512-UTzHm/+AzKfO9RgPgRpDIuMSNie1ubXRaljjlhFMNGYoG7z+rm9AHLPMf70R7887xboDH9Q+5YQbWKObFHEAtw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-stable-stringify": "~0.0.0", + "sha.js": "~2.4.4" + } + }, + "node_modules/shell-quote": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-0.0.1.tgz", + "integrity": "sha512-uEWz7wa9vnCi9w4mvKZMgbHFk3DCKjLQlZcy0tJxUH4NwZjRrPPHXAYIEt2TmJs600Dcgj0Z3fZLZKVPVdGNbQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha512-Y8nIfcb1s/7DcobUz1yOO1GSp7gyL+D9zLHDehT7iRESqGSxjJ448Sg7rvfgsRJCnKLdSl11uGf0s9X80cH0/A==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "amdefine": ">=0.0.4" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/stream-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-1.0.0.tgz", + "integrity": "sha512-e+V5xc4LlkOiRr64kZTUdb11exsbpSnwb9uwmXaHeDXCpfHg7vaefMJOxi21Pe74ZOqjZ87blBcqqpNAM4Ku0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "~2.0.1", + "readable-stream": "^1.0.27-1" + } + }, + "node_modules/stream-combiner2": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.0.2.tgz", + "integrity": "sha512-7DO1SfBVnyIyo9ytUjSyVojT5bp1ZY6h3pj7HUs6PwcRSd/r8mBOHbRwYC7nbHRakKzMKyNp5HWJRv4GgVherA==", + "dev": true, + "license": "MIT", + "dependencies": { + "duplexer2": "~0.0.2", + "through2": "~0.5.1" + } + }, + "node_modules/stream-combiner2/node_modules/readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==", + "dev": true, + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "node_modules/stream-combiner2/node_modules/through2": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.5.1.tgz", + "integrity": "sha512-zexCrAOTbjkBCXGyozn7hhS3aEaqdrc59mAD2E3dKYzV1vFuEGQ1hEDJN2oQMQFwy4he2zyLqPZV+AlfS8ZWJA==", + "dev": true, + "license": "MIT", + "dependencies": { + "readable-stream": "~1.0.17", + "xtend": "~3.0.0" + } + }, + "node_modules/stream-combiner2/node_modules/xtend": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz", + "integrity": "sha512-sp/sT9OALMjRW1fKDlPeuSZlDQpkqReA0pyJukniWbTGoEKefHxhGJynE3PNhUMlcM8qWIjPwecwCw4LArS5Eg==", + "dev": true, + "engines": { + "node": ">=0.4" + } + }, + "node_modules/stream-splicer": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-1.3.2.tgz", + "integrity": "sha512-nmUMEbdm/sZYqe9dZs7mqJvTYpunsDbIWI5FiBCMc/hMVd6vwzy+ITmo7C3gcLYqrn+uQ1w+EJwooWvJ997JAA==", + "dev": true, + "license": "MIT", + "dependencies": { + "indexof": "0.0.1", + "inherits": "^2.0.1", + "isarray": "~0.0.1", + "readable-stream": "^1.1.13-1", + "readable-wrap": "^1.0.0", + "through2": "^1.0.0" + } + }, + "node_modules/string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", + "license": "MIT" + }, + "node_modules/subarg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", + "integrity": "sha512-RIrIdRY0X1xojthNcVtgT9sjpOGagEUKpZdgBUi054OEPFo282yg+zE+t1Rj3+RqKq2xStL7uUHhY+AjbC4BXg==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.1.0" + } + }, + "node_modules/superagent": { + "version": "0.18.2", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-0.18.2.tgz", + "integrity": "sha512-v+q/OU7MnLHOE3BSRzwK7O4TO+qkD2ibrRuaHTlzonqXyXJInfUA2CoYWVwJiDBiF+XBcdHsvhbWHFgbC2YKsA==", + "deprecated": "Please upgrade to superagent v10.2.2+, see release notes at https://github.com/forwardemail/superagent/releases/tag/v10.2.2 - maintenance is supported by Forward Email @ https://forwardemail.net", + "dependencies": { + "component-emitter": "1.1.2", + "cookiejar": "2.0.1", + "debug": "~1.0.1", + "extend": "~1.2.1", + "form-data": "0.1.3", + "formidable": "1.0.14", + "methods": "1.0.1", + "mime": "1.2.11", + "qs": "0.6.6", + "readable-stream": "1.0.27-1", + "reduce-component": "1.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/superagent/node_modules/readable-stream": { + "version": "1.0.27-1", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.27-1.tgz", + "integrity": "sha512-uQE31HGhpMrqZwtDjRliOs2aC3XBi+DdkhLs+Xa0dvVD5eDiZr3+k8rKVZcyTzxosgtMw7B/twQsK3P1KTZeVg==", + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/syntax-error": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz", + "integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn-node": "^1.2.0" + } + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true, + "license": "MIT" + }, + "node_modules/through2": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-1.1.1.tgz", + "integrity": "sha512-zEbpaeSMHxczpTzO1KkMHjBC1enTA68ojeaZGG4toqdASpb9t4xUZaYFBq2/9OHo5nTGFVSYd4c910OR+6wxbQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "readable-stream": ">=1.1.13-1 <1.2.0-0", + "xtend": ">=4.0.0 <4.1.0-0" + } + }, + "node_modules/timers-browserify": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", + "integrity": "sha512-PIxwAupJZiYU4JmVZYwXp9FKsHMXb5h0ZEFyuXTAn8WLHOlcij+FEcbrvDsom1o5dr1YggEtFbECvGCW2sT53Q==", + "dev": true, + "dependencies": { + "process": "~0.11.0" + }, + "engines": { + "node": ">=0.6.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==", + "dev": true, + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/tty-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", + "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==", + "dev": true, + "license": "MIT" + }, + "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==", + "dev": true, + "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/typedarray": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.7.tgz", + "integrity": "sha512-ueeb9YybpjhivjbHP2LdFDAjbS948fGEPj+ACAMs4xCMmh72OCOMQWBQKlaN4ZNQ04yfLSDLSx1tGRIoWimObQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha512-qLq/4y2pjcU3vhlhseXGGJ7VbFO4pBANu0kwl8VCa9KEI0V8VfZIx2Fy3w01iSTA/pGwKZSmu/+I4etLNDdt5w==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "source-map": "~0.5.1", + "yargs": "~3.10.0" + }, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + }, + "optionalDependencies": { + "uglify-to-browserify": "~1.0.0" + } + }, + "node_modules/uglify-js/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha512-vb2s1lYx2xBtUgy+ta+b2J/GLVUR+wmpINwHePmPRhOsIVCG2wDzKJ0n14GslH1BifsqVzSOwQhRaCAsZ/nI4Q==", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/uglifyify": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/uglifyify/-/uglifyify-3.0.4.tgz", + "integrity": "sha512-T2Pjw1oeZkT8UzDZNXzvNgepvGYNg3vrKKCi5jrgqMxMxF+VR14XZTL5AONjFVYVvpNHvD2pWd6UssByt8Mpew==", + "dev": true, + "license": "MIT", + "dependencies": { + "convert-source-map": "~1.1.0", + "extend": "^1.2.1", + "minimatch": "^3.0.2", + "through": "~2.3.4", + "uglify-js": "2.x.x" + } + }, + "node_modules/uglifyify/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/umd": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz", + "integrity": "sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow==", + "dev": true, + "license": "MIT", + "bin": { + "umd": "bin/cli.js" + } + }, + "node_modules/url": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", + "integrity": "sha512-hzSUW2q06EqL1gKM/a+obYHLIO6ct2hwPuviqTTOcfFVc61UbfJ2Q32+uGL/HCPxKqrdGB5QUwIe7UqlDgwsOQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "punycode": "1.3.2", + "querystring": "0.2.0" + } + }, + "node_modules/url/node_modules/punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/util": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "2.0.3" + } + }, + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/util/node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", + "dev": true, + "license": "ISC" + }, + "node_modules/vm-browserify": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "integrity": "sha512-NyZNR3WDah+NPkjh/YmhuWSsT4a0mF0BJYgUmvrJ70zxjTXh5Y2Asobxlh0Nfs0PCFB5FVpRJft7NozAWFMwLQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "indexof": "0.0.1" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.19", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz", + "integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==", + "dev": true, + "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/window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha512-1pTPQDKTdd61ozlKGNCjhNRd+KPmgLSGa3mZTHoOliaGcESD8G1PXhh7c1fgiPjVbNVfgy2Faw4BI8/m0cC8Mg==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha512-xSBsCeh+g+dinoBv3GAOWM4LcVVO68wLXRanibtBSdUvkGWQRGeE9P7IwU9EmDDi4jA6L44lz15CGMwdw9N5+Q==", + "dev": true, + "license": "MIT/X11", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4" + } + }, + "node_modules/yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha512-QFzUah88GAGy9lyDKGBqZdkYApt63rCXYBGYnEP4xDJPXNqXXnBDACnbrXnViV6jRSqAePwrATi2i8mfYm4L1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + } + } + } +} diff --git a/package.json b/package.json index 8a50b67..882bc30 100644 --- a/package.json +++ b/package.json @@ -23,8 +23,10 @@ "url": "https://github.com/paydunyadev/paydunya-node-master/issues" }, "dependencies": { + "axios": "^1.12.2", "bluebird": "^2.1.3", - "superagent": "^0.18.1" + "superagent": "^0.18.1", + "typescript": "^5.9.3" }, "devDependencies": { "browserify": "^10.2.4", From e2e4c99a2429234abb2eea4a0bad7db3b71f0bc2 Mon Sep 17 00:00:00 2001 From: Maximilien COMLAN Date: Wed, 8 Oct 2025 00:29:25 +0100 Subject: [PATCH 02/20] dropped original js files --- lib/checkout-invoice.js | 92 ---------------------------- lib/credentials.ts | 2 +- lib/direct-pay.js | 53 ---------------- lib/index.js | 40 ------------ lib/invoice.js | 127 --------------------------------------- lib/invoices/checkout.ts | 2 +- lib/onsite-invoice.js | 92 ---------------------------- 7 files changed, 2 insertions(+), 406 deletions(-) delete mode 100644 lib/checkout-invoice.js delete mode 100644 lib/direct-pay.js delete mode 100644 lib/index.js delete mode 100644 lib/invoice.js delete mode 100644 lib/onsite-invoice.js diff --git a/lib/checkout-invoice.js b/lib/checkout-invoice.js deleted file mode 100644 index 80cea6e..0000000 --- a/lib/checkout-invoice.js +++ /dev/null @@ -1,92 +0,0 @@ -var Invoice = require('./invoice') - , request = require('superagent') - , Promise = require('bluebird') - ; - - -// Inherit invoice -CheckoutInvoice.prototype = Object.create(Invoice.prototype); -CheckoutInvoice.prototype.constructor = CheckoutInvoice; - -/** - * CheckoutInvoice class - * @param {object} setup Instance of paydunya.Setup - * @param {object} store Instance of paydunya.Store - */ -function CheckoutInvoice(setup, store) { - Invoice.call(this, setup, store); - this.baseURL = this.baseURL + '/checkout-invoice'; -} - - -/** - * Create invoice - * @return {promise} - */ -CheckoutInvoice.prototype.create = function (){ - var self = this; - - var requestBody = self.generateRequestBody(); - - return new Promise(function (resolve, reject) { - request.post(self.baseURL + '/create') - .set(self.config) - .send(requestBody) - .end(function (err, res) { - if (err) return reject(err) - - if (res.body.response_code === '00') { - self.token = res.body.token; - self.url = res.body.response_text; - - //check invoice status - resolve(self.confirm()); - } else { - var e = new Error('Failed to create invoice.') - e.data = res.body - reject(e) - } - }) - }); -}; - -/** - * Get token status. - * @param {string} givenToken Invoice token - * @return {promise} - */ -CheckoutInvoice.prototype.confirm = function (givenToken) { - var self = this; - var token = givenToken ? givenToken : self.token; - - return new Promise(function (resolve, reject) { - request.get(self.baseURL + '/confirm/' + token) - .set(self.config) - .end(function (err, res) { - if (err) return reject(err) - - var body = res.body - if (body.response_code === '00') { - self.status = body.status; - self.responseText = body.response_text; - - if (self.status === 'completed') { - self.customer = body.customer; - self.receiptURL = body.receipt_url - self.receipt_identifier = body.receipt_identifier - self.provider_reference = body.provider_reference - if (body.custom_data && Object.keys(body.custom_data).length > 0) - self.customData = body.custom_data; - } - self.totalAmount = body.invoice.total_amount; - resolve(); - } else { - var e = new Error('Could not confirm invoice status.') - e.data = body - reject(e) - } - }) - }); -} - -module.exports = CheckoutInvoice; diff --git a/lib/credentials.ts b/lib/credentials.ts index e55b2f7..d4629e7 100644 --- a/lib/credentials.ts +++ b/lib/credentials.ts @@ -1,4 +1,4 @@ -import axios, {Axios, InternalAxiosRequestConfig} from "axios" +import {InternalAxiosRequestConfig} from "axios" type Environment = "live" | "test" interface SetupOptions { diff --git a/lib/direct-pay.js b/lib/direct-pay.js deleted file mode 100644 index 6955110..0000000 --- a/lib/direct-pay.js +++ /dev/null @@ -1,53 +0,0 @@ -var request = require('superagent') - , Promise = require('bluebird') - , util = require('util') - ; - -/** - * DirectPay class - * @param {object} setup Instance of paydunya.Setup - */ -function DirectPay(setup){ - if (!(setup && setup.config)) throw new Error('Must be initialized with instance of paydunya.Setup'); - - this.config = setup.config; - this.baseURL = setup.baseURL + '/direct-pay'; -} - -/** - * Credit an PAYDUNYA account - * @param {string} account Account alias, number or email - * @param {number} amount - * @return {promise} - */ -DirectPay.prototype.creditAccount = function (account, amount){ - var self = this; - var body = { - account_alias: account, - amount: Number(amount) - }; - - return new Promise(function (resolve, reject) { - request.post(self.baseURL + '/credit-account') - .set(self.config) - .send(body) - .end(function (err, res) { - if (err) return reject(err) - - if (res.body.response_code === '00') { - self.responseText = res.body.response_text; - self.description = res.body.description; - self.transactionID = res.body.transaction_id; - resolve(); - } else { - var e = new Error(new Error(util.format('Failed to credit account. ' - + 'Please ensure %s and %s are valid OR check your account balance.' - , account, amount))) - e.data = res.body - reject(e) - } - }) - }) -}; - -module.exports = DirectPay; \ No newline at end of file diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index b83542d..0000000 --- a/lib/index.js +++ /dev/null @@ -1,40 +0,0 @@ -exports.Setup = exports.setup = Setup; -exports.Store = exports.store = Store; -exports.CheckoutInvoice = exports.checkoutInvoice = require('./checkout-invoice'); -exports.OnsiteInvoice = exports.onsiteInvoice = require('./onsite-invoice'); -exports.DirectPay = exports.directPay = require('./direct-pay'); - -/** - * Setup PAYDUNYA - * @param {object} data - */ -function Setup(data) { - this.config = {} - this.config['PAYDUNYA-MASTER-KEY'] = data && data.masterKey || process.env.PAYDUNYA_MASTER_KEY; - this.config['PAYDUNYA-PRIVATE-KEY'] = data && data.privateKey || process.env.PAYDUNYA_PRIVATE_KEY; - // this.config['PAYDUNYA-PUBLIC-KEY'] = data && data.publicKey || process.env.PAYDUNYA_PUBLIC_KEY; - this.config['PAYDUNYA-TOKEN'] = data && data.token || process.env.PAYDUNYA_TOKEN; - this.config['Content-Type'] = 'application/json'; - if (data && data.mode && data.mode.toLowerCase() === 'test') - this.baseURL = 'https://app.paydunya.com/sandbox-api/v1'; - else - this.baseURL = 'https://app.paydunya.com/api/v1'; -} - -/** - * Setup merchant store - * @param {object} data - */ -function Store(data) { - if (!(data && data.name)) - throw new Error('Invalid parameters.'); - this.name = data.name; - if (data.tagline) this.tagline = data.tagline; - if (data.phoneNumber) this.phone_number = data.phoneNumber; - if (data.postalAddress) this.postal_address = data.postalAddress; - if (data.logoURL) this.logo_url = data.logoURL; - if (data.websiteURL) this.website_url = data.websiteURL; - if (data.cancelURL) this.cancel_url = data.cancelURL; - if (data.returnURL) this.return_url = data.returnURL; - if (data.callbackURL) this.callback_url = data.callbackURL; -} \ No newline at end of file diff --git a/lib/invoice.js b/lib/invoice.js deleted file mode 100644 index 7fb323a..0000000 --- a/lib/invoice.js +++ /dev/null @@ -1,127 +0,0 @@ -/** - * Invoice class - * @param {object} setup Instance of paydunya.Setup - * @param {object} store Instance of paydunya.Store - */ -function Invoice(setup, store){ - // validate input - if (!(setup && store && setup.config['PAYDUNYA-MASTER-KEY'] && setup.config['PAYDUNYA-PRIVATE-KEY'] && setup.config['PAYDUNYA-TOKEN'] && store.name)) { - throw new Error('Invalid parameters;'); - } - - this.baseURL = setup.baseURL; - this.config = setup.config; - - if (store.return_url) this.returnURL = store.return_url; - if (store.cancel_url) this.cancelURL = store.cancel_url; - if (store.callback_url) this.callbackURL = store.callback_url; - - this.store = store; - this.description = ''; - this.items = {}; - this.customData = {}; - this.taxes = {}; - this.channels = []; - this.totalAmount = 0; -} - - -/** - * Add an item to invoice - * @param {string} name - * @param {number} quantity - * @param {number} unitPrice - * @param {number} totalPrice - * @param {string} description - */ -Invoice.prototype.addItem = function (name, quantity, unitPrice, totalPrice, description) { - if (!name) throw new Error('Invalid parameters; name is required.'); - var position = Object.keys(this.items).length + 1; - this.items['item_' + position] = { - name: name, - quantity: quantity || 0, - unit_price: unitPrice || 0, - total_price: totalPrice || 0 - } - if (description) this.items['item_' + position].description = description; -}; - -/** - * Add a tax - * @param {string} name - * @param {number} amount [description] - */ -Invoice.prototype.addTax = function (name, amount){ - if (!(name && typeof name === 'string' && typeof Number(amount) === 'number')) - throw new Error('Invalid parameters.'); - var position = Object.keys(this.taxes).length + 1; - this.taxes['tax_' + position] = { - name: name, - amount: Number(amount) - }; -}; - -/** - * Add a payment channel - * @param {string} channel - */ -Invoice.prototype.addChannel = function (channel){ - if (!(channel && typeof channel === 'string')) - throw new Error('Invalid parameters.'); - this.channels.push(channel); -}; - -/** - * Add many payment channels at once - * @param {array} channels - */ -Invoice.prototype.addChannels = function (channels){ - if (!(channels && channels instanceof Array)) - throw new Error('Invalid parameters.'); - this.channels = []; - for (var i = 0; i < channels.length; i++) { - this.channels.push(channels[i]); - } -}; - -/** - * Add custom data key, value pairs to request - * @param {string} title key - * @param {string} value - */ -Invoice.prototype.addCustomData = function (title, value) { - if (!(title && value)) throw new Error('Invalid parameters.'); - - this.customData[title] = value; -}; - -/** - * Generate the request body - * @return {object} - */ -Invoice.prototype.generateRequestBody = function () { - if (!(this.store && this.store.name && this.baseURL && this.totalAmount > 0)) - throw new Error("Invalid parameters. Initialize Invoice with valid instances of Setup and Store. Total amount must also be set.\neg: var invoice = new Invoice; invoice.init(setup, store); invoice.setTotalAmount(40)"); - - var body = { - invoice: { - total_amount: this.totalAmount - }, - store: this.store - }; - if (this.description) body.invoice.description = this.description; - if (Object.keys(this.channels).length > 0) body.invoice.channels = this.channels; - if (Object.keys(this.items).length > 0) body.invoice.items = this.items; - if (this.returnURL || this.cancelURL || this.callbackURL) { - body.actions = {}; - if (this.returnURL) body.actions.return_url = this.returnURL; - if (this.cancelURL) body.actions.cancel_url = this.cancelURL; - if (this.callbackURL) body.actions.callback_url = this.callbackURL; - } - if (Object.keys(this.taxes).length > 0) body.invoice.taxes = this.taxes; - if (Object.keys(this.customData).length > 0) body.custom_data = this.customData; - - return body; -}; - -module.exports = Invoice; diff --git a/lib/invoices/checkout.ts b/lib/invoices/checkout.ts index 3b92a80..1e8e1ab 100644 --- a/lib/invoices/checkout.ts +++ b/lib/invoices/checkout.ts @@ -42,7 +42,7 @@ export default class CheckoutInvoice extends Invoice { */ async confirm(givenToken?: string) { const token = givenToken ? givenToken : this.token; - this.client.axios + return this.client.axios .get(`/checkout-invoice/confirm/${token}`) .then((res) => { const body = res.data; diff --git a/lib/onsite-invoice.js b/lib/onsite-invoice.js deleted file mode 100644 index b1339c9..0000000 --- a/lib/onsite-invoice.js +++ /dev/null @@ -1,92 +0,0 @@ -var Invoice = require('./invoice') - , request = require('superagent') - , Promise = require('bluebird') - ; - -// Inherit invoice -OnsiteInvoice.prototype = Object.create(Invoice.prototype); -OnsiteInvoice.prototype.constructor = OnsiteInvoice; - -/** - * OnsiteInvoice class - * @param {object} setup Instance of paydunya.Setup - * @param {object} store Instance of paydunya.Store - */ -function OnsiteInvoice(setup, store) { - Invoice.call(this, setup, store); // call Invoice initializer - this.baseURL = this.baseURL + '/opr'; -}; - -/** - * Create an invoice - * @param {string} customer Account alias, number or username - * @return {promise} - */ -OnsiteInvoice.prototype.create = function (customer) { - var self = this; - - // setup request body - var body = { - invoice_data: self.generateRequestBody(), - opr_data: { - account_alias: String(customer) - } - }; - - return new Promise(function (resolve, reject) { - request.post(self.baseURL + '/create') - .set(self.config) - .send(body) - .end(function (err, res) { - if (err) return reject(err) - - if (res.body.response_code === '00') { - self.token = res.body.invoice_token; - self.oprToken = res.body.token; - self.responseText = res.body.description; - resolve(); - } else { - var e = new Error('Failed to create invoice') - e.data = res.body - reject(e) - } - }) - }) -}; - -/** - * Charge PAYDUNYA account - * @param {string} oprToken OPR token generated on first step of onsite payment - * @param {string} confirmToken Confirmation token sent to PAYDUNYA user - * @return {promise} - */ -OnsiteInvoice.prototype.charge = function (oprToken, confirmToken){ - var self = this; - var body = { - token: oprToken + '', - confirm_token: confirmToken + '' - }; - - return new Promise (function (resolve, reject) { - request.post(self.baseURL + '/charge') - .set(self.config) - .send(body) - .end(function (err, res) { - if (err) return reject(err) - - if (res.body.response_code === '00') { - self.responseText = res.body.response_text; - self.status = res.body.invoice_data.status; - self.receiptURL = res.body.invoice_data.receipt_url; - self.customer = res.body.invoice_data.customer; - resolve(); - } else { - var e = new Error('Failed to charge invoice. Check OPR/confirm token and try again.') - e.data = res.body - reject(e) - } - }) - }) -}; - -module.exports = OnsiteInvoice; \ No newline at end of file From 89b1b65a4549d5115660fff1f2b61b07c66537bf Mon Sep 17 00:00:00 2001 From: EricAgbessi Date: Wed, 8 Oct 2025 02:11:05 +0100 Subject: [PATCH 03/20] refactoring --- lib/constantes.ts | 18 +++ lib/direct-pay.ts | 88 ++++++------ lib/invoices/checkout.ts | 159 ++++++++++----------- lib/invoices/invoice.ts | 296 ++++++++++++++++++++------------------- lib/invoices/onsite.ts | 141 +++++++++---------- 5 files changed, 358 insertions(+), 344 deletions(-) create mode 100644 lib/constantes.ts diff --git a/lib/constantes.ts b/lib/constantes.ts new file mode 100644 index 0000000..7dda93d --- /dev/null +++ b/lib/constantes.ts @@ -0,0 +1,18 @@ +export enum Status { + Completed = "completed", + Canceled = "canceled", + Pending = "pending", + Failed = "failed", +} + +export enum ResponseCode { + success = "00", +} + +export enum ApiRoutes { + CREATE_INVOICE = "/checkout-invoice/create", + CONFIRM_INVOICE = "/checkout-invoice/confirm/", + CREATE_ONSITEINVOCE = "/opr/create", + CHARGE_ONSITEINVOCE = "/opr/charge", + CREDIT_ACCOUNT = "/direct-pay/credit-account", +} diff --git a/lib/direct-pay.ts b/lib/direct-pay.ts index 16edbb0..7883aa1 100644 --- a/lib/direct-pay.ts +++ b/lib/direct-pay.ts @@ -1,48 +1,46 @@ -import util from 'util'; -import { PaydunyaClient } from './client'; -import { ResponseError } from './errors'; - +import util from "util"; +import { PaydunyaClient } from "./client"; +import { ResponseError } from "./errors"; +import { ApiRoutes } from "./constantes"; export class DirectPay { - private client: PaydunyaClient; - - public responseText?: string; - public description?: string; - public transactionID?: string; - - constructor(client: PaydunyaClient) { - this.client = client; - } - - /** - * Credit a PAYDUNYA account - * @param account Account alias, number or email - * @param amount Amount to credit - */ - async creditAccount(account: string, amount: number): Promise { - const body = { - account_alias: account, - amount: Number(amount) - }; - - const res = await this.client.axios - .post(`/direct-pay/credit-account`, body); - - if (res.data.response_code === '00') { - this.responseText = res.data.response_text; - this.description = res.data.description; - this.transactionID = res.data.transaction_id; - } else { - const e = new ResponseError( - util.format( - 'Failed to credit account. Please ensure %s and %s are valid OR check your account balance.', - account, - amount - ), - res.data - ); - throw e; - } - + private client: PaydunyaClient; + + public responseText?: string; + public description?: string; + public transactionID?: string; + + constructor(client: PaydunyaClient) { + this.client = client; + } + + /** + * Credit a PAYDUNYA account + * @param account Account alias, number or email + * @param amount Amount to credit + */ + async creditAccount(account: string, amount: number): Promise { + const body = { + account_alias: account, + amount: Number(amount), + }; + + const res = await this.client.axios.post(ApiRoutes.CREDIT_ACCOUNT, body); + + if (res.data.response_code === "00") { + this.responseText = res.data.response_text; + this.description = res.data.description; + this.transactionID = res.data.transaction_id; + } else { + const e = new ResponseError( + util.format( + "Failed to credit account. Please ensure %s and %s are valid OR check your account balance.", + account, + amount + ), + res.data + ); + throw e; } -} \ No newline at end of file + } +} diff --git a/lib/invoices/checkout.ts b/lib/invoices/checkout.ts index 1e8e1ab..89365cb 100644 --- a/lib/invoices/checkout.ts +++ b/lib/invoices/checkout.ts @@ -1,87 +1,88 @@ -import { Invoice } from './invoice'; -import { PaydunyaClient } from '../client'; -import { ResponseError } from '../errors'; +import { Invoice } from "./invoice"; +import { PaydunyaClient } from "../client"; +import { ResponseError } from "../errors"; +import { ApiRoutes, ResponseCode, Status } from "../constantes"; export default class CheckoutInvoice extends Invoice { - token?: string; - url?: string; - status?: string; - responseText?: string; - customer?: any; - receiptURL?: string; - receipt_identifier?: string; - provider_reference?: string; + token?: string; + url?: string; + status?: string; + responseText?: string; + customer?: any; + receiptURL?: string; + receipt_identifier?: string; + provider_reference?: string; - constructor(client: PaydunyaClient) { - super(client); - } + constructor(client: PaydunyaClient) { + super(client); + } - /** - * Create invoice - */ - async create() { - const requestBody = this.asRequestBody(); + /** + * Create invoice + */ + async create() { + const requestBody = this.asRequestBody(); - return this.client.axios - .post('/checkout-invoice/create', requestBody) - .then((res) => { - if (res.data.response_code === '00') { - this.token = res.data.token; - this.url = res.data.response_text; - return this.confirm(this.token); - } else { - const e = new ResponseError('Failed to create invoice.', res.data); - throw e; - } - }); - } + return this.client.axios + .post(ApiRoutes.CREATE_INVOICE, requestBody) + .then((res) => { + if (res.data.response_code === ResponseCode.success) { + this.token = res.data.token; + this.url = res.data.response_text; + return this.confirm(this.token); + } else { + const e = new ResponseError("Failed to create invoice.", res.data); + throw e; + } + }); + } - /** - * Get token status. - * @param {string} givenToken Invoice token - */ - async confirm(givenToken?: string) { - const token = givenToken ? givenToken : this.token; - return this.client.axios - .get(`/checkout-invoice/confirm/${token}`) - .then((res) => { - const body = res.data; - if (body.response_code === '00') { - this.status = body.status; - this.responseText = body.response_text; - if (this.status === 'completed') { - this.customer = body.customer; - this.receiptURL = body.receipt_url; - this.receipt_identifier = body.receipt_identifier; - this.provider_reference = body.provider_reference; - if (body.custom_data && Object.keys(body.custom_data).length > 0) { - this.customData = body.custom_data; - } - } - this.totalAmount = body.invoice.total_amount; - return this.asObject + /** + * Get token status. + * @param {string} givenToken Invoice token + */ + async confirm(givenToken?: string) { + const token = givenToken ? givenToken : this.token; + this.client.axios + .get(`${ApiRoutes.CONFIRM_INVOICE}${token}`) + .then((res) => { + const body = res.data; + if (body.response_code === ResponseCode.success) { + this.status = body.status; + this.responseText = body.response_text; + if (this.status === Status.Completed) { + this.customer = body.customer; + this.receiptURL = body.receipt_url; + this.receipt_identifier = body.receipt_identifier; + this.provider_reference = body.provider_reference; + if (body.custom_data && Object.keys(body.custom_data).length > 0) { + this.customData = body.custom_data; + } + } + this.totalAmount = body.invoice.total_amount; + return this.asObject; + } else { + const e = new ResponseError( + "Could not confirm invoice status.", + res.data + ); + throw e; + } + }); + } - } else { - const e = new ResponseError('Could not confirm invoice status.', res.data); - throw e; - } - }); + get asObject() { + return { + token: this.token, + url: this.url, + status: this.status, + responseText: this.responseText, + customer: this.customer, + receiptURL: this.receiptURL, + receipt_identifier: this.receipt_identifier, + provider_reference: this.provider_reference, + customData: this.customData, + totalAmount: this.totalAmount, }; - - - get asObject() { - return { - token: this.token, - url: this.url, - status: this.status, - responseText: this.responseText, - customer: this.customer, - receiptURL: this.receiptURL, - receipt_identifier: this.receipt_identifier, - provider_reference: this.provider_reference, - customData: this.customData, - totalAmount: this.totalAmount - }; - } - -} \ No newline at end of file + } +} diff --git a/lib/invoices/invoice.ts b/lib/invoices/invoice.ts index d675410..24674ff 100644 --- a/lib/invoices/invoice.ts +++ b/lib/invoices/invoice.ts @@ -2,168 +2,170 @@ import { PaydunyaClient } from "../client"; import { PaymentChannel } from "../types"; interface InvoiceItem { - name: string; - quantity: number; - unit_price: number; - total_price: number; - description?: string; + name: string; + quantity: number; + unit_price: number; + total_price: number; + description?: string; } interface InvoiceTax { - name: string; - amount: number; + name: string; + amount: number; } interface InvoiceData { - total_amount: number; - channels: PaymentChannel[]; - items: Record; - description: string; - taxes: Record; - custom_data: Record; + total_amount: number; + channels: PaymentChannel[]; + items: Record; + description: string; + taxes: Record; + custom_data: Record; } - /** * Invoice class * @param {object} setup Instance of paydunya.Setup * @param {object} store Instance of paydunya.Store */ export class Invoice { - client: PaydunyaClient; - returnURL?: string; - cancelURL?: string; - callbackURL?: string; - - description: string; - items: Record; - customData: Record; - taxes: Record; - channels: PaymentChannel[]; - totalAmount: number; - - constructor(client: PaydunyaClient) { - this.client = client; - - if (client.store?.return_url) this.returnURL = client.store!.return_url; - if (client.store?.cancel_url) this.cancelURL = client.store!.cancel_url; - if (client.store?.callback_url) this.callbackURL = client.store!.callback_url; - - this.description = ''; - this.items = {}; - this.customData = {}; - this.taxes = {}; - this.channels = []; - this.totalAmount = 0; - } - - get store() { - return this.client.store - } - - /** - * Add an item to invoice - * @param {string} name - * @param {number} quantity - * @param {number} unitPrice - * @param {number} totalPrice - * @param {string} description - */ - addItem( - name: string, - quantity?: number, - unitPrice?: number, - totalPrice?: number, - description?: string - ) { - const position = Object.keys(this.items).length + 1; - this.items['item_' + position] = { - name: name, - quantity: quantity || 0, - unit_price: unitPrice || 0, - total_price: totalPrice || 0, - }; - if (description) this.items['item_' + position].description = description; - - return this; - } - - /** - * Add a tax - * @param {string} name - * @param {number} amount - */ - addTax(name: string, amount: number) { - const position = Object.keys(this.taxes).length + 1; - this.taxes['tax_' + position] = { - name: name, - amount: Number(amount), - }; - return this + client: PaydunyaClient; + returnURL?: string; + cancelURL?: string; + callbackURL?: string; + + description: string; + items: Record; + customData: Record; + taxes: Record; + channels: PaymentChannel[]; + totalAmount: number; + + constructor(client: PaydunyaClient) { + this.client = client; + + if (client.store?.return_url) this.returnURL = client.store!.return_url; + if (client.store?.cancel_url) this.cancelURL = client.store!.cancel_url; + if (client.store?.callback_url) + this.callbackURL = client.store!.callback_url; + + this.description = ""; + this.items = {}; + this.customData = {}; + this.taxes = {}; + this.channels = []; + this.totalAmount = 0; + } + + get store() { + return this.client.store; + } + + /** + * Add an item to invoice + * @param {string} name + * @param {number} quantity + * @param {number} unitPrice + * @param {number} totalPrice + * @param {string} description + */ + addItem( + name: string, + quantity?: number, + unitPrice?: number, + totalPrice?: number, + description?: string + ) { + const position = Object.keys(this.items).length + 1; + this.items["item_" + position] = { + name: name, + quantity: quantity || 0, + unit_price: unitPrice || 0, + total_price: totalPrice || 0, + }; + if (description) this.items["item_" + position].description = description; + + return this; + } + + /** + * Add a tax + * @param {string} name + * @param {number} amount + */ + addTax(name: string, amount: number) { + const position = Object.keys(this.taxes).length + 1; + this.taxes["tax_" + position] = { + name: name, + amount: Number(amount), + }; + return this; + } + + /** + * Add a payment channel + * @param {string} channel + */ + addChannel(channel: PaymentChannel) { + this.channels.push(channel); + return this; + } + + /** + * Add many payment channels at once + * @param {array} channels + */ + addChannels(channels: PaymentChannel[] = []) { + for (let i = 0; i < channels.length; i++) { + this.channels.push(channels[i]); } - /** - * Add a payment channel - * @param {string} channel - */ - addChannel(channel: PaymentChannel) { - this.channels.push(channel); - return this + return this; + } + + /** + * Add custom data key, value pairs to request + * @param {string} title key + * @param {string} value + */ + addCustomData(title: string, value: string) { + this.customData[title] = value; + return this; + } + + /** + * Generate the request body + * @return {object} + */ + asRequestBody() { + if (this.totalAmount <= 0) + throw new Error( + "Invalid parameters. Initialize Invoice with valid instances of Setup and Store. Total amount must also be set.\neg: var invoice = new Invoice; invoice.init(setup, store); invoice.setTotalAmount(40)" + ); + + const body = { + invoice: { + total_amount: this.totalAmount, + } as InvoiceData, + actions: undefined as any, + custom_data: undefined as Record | undefined, + store: this.store?.asObject, + }; + + if (this.description) body.invoice.description = this.description; + if (Object.keys(this.channels).length > 0) + body.invoice.channels = this.channels; + if (Object.keys(this.items).length > 0) body.invoice.items = this.items; + if (this.returnURL || this.cancelURL || this.callbackURL) { + body.actions = {}; + if (this.returnURL) body.actions.return_url = this.returnURL; + if (this.cancelURL) body.actions.cancel_url = this.cancelURL; + if (this.callbackURL) body.actions.callback_url = this.callbackURL; } + if (Object.keys(this.taxes).length > 0) body.invoice.taxes = this.taxes; + if (Object.keys(this.customData).length > 0) + body.custom_data = this.customData; - /** - * Add many payment channels at once - * @param {array} channels - */ - addChannels(channels: PaymentChannel[] = []) { - for (let i = 0; i < channels.length; i++) { - this.channels.push(channels[i]); - } - - return this; - } - - /** - * Add custom data key, value pairs to request - * @param {string} title key - * @param {string} value - */ - addCustomData(title: string, value: string) { - this.customData[title] = value; - return this - } - - /** - * Generate the request body - * @return {object} - */ - asRequestBody() { - if (this.totalAmount <= 0) - throw new Error( - "Invalid parameters. Initialize Invoice with valid instances of Setup and Store. Total amount must also be set.\neg: var invoice = new Invoice; invoice.init(setup, store); invoice.setTotalAmount(40)" - ); - - const body = { - invoice: { - total_amount: this.totalAmount, - } as InvoiceData, - actions: undefined as any, - custom_data: undefined as Record | undefined, - store: this.store?.asObject, - }; - - if (this.description) body.invoice.description = this.description; - if (Object.keys(this.channels).length > 0) body.invoice.channels = this.channels; - if (Object.keys(this.items).length > 0) body.invoice.items = this.items; - if (this.returnURL || this.cancelURL || this.callbackURL) { - body.actions = {}; - if (this.returnURL) body.actions.return_url = this.returnURL; - if (this.cancelURL) body.actions.cancel_url = this.cancelURL; - if (this.callbackURL) body.actions.callback_url = this.callbackURL; - } - if (Object.keys(this.taxes).length > 0) body.invoice.taxes = this.taxes; - if (Object.keys(this.customData).length > 0) body.custom_data = this.customData; - - return body; - } -} \ No newline at end of file + return body; + } +} diff --git a/lib/invoices/onsite.ts b/lib/invoices/onsite.ts index 61d7df9..7c0f02b 100644 --- a/lib/invoices/onsite.ts +++ b/lib/invoices/onsite.ts @@ -1,83 +1,78 @@ import { PaydunyaClient } from "../client"; +import { ApiRoutes, ResponseCode } from "../constantes"; import { ResponseError } from "../errors"; import { Invoice } from "./invoice"; - export class OnsiteInvoice extends Invoice { - token?: string; - oprToken?: string; - responseText?: string; - status?: string; - receiptURL?: string; - customer?: any; + token?: string; + oprToken?: string; + responseText?: string; + status?: string; + receiptURL?: string; + customer?: any; - constructor(client: PaydunyaClient) { - super(client); - } + constructor(client: PaydunyaClient) { + super(client); + } - /** - * - * @param customer The account alias, username or phone number - */ - async create(customer: string) { - let body = { - invoice_data: this.asRequestBody(), - opr_data: { - account_alias: customer - } + /** + * + * @param customer The account alias, username or phone number + */ + async create(customer: string) { + let body = { + invoice_data: this.asRequestBody(), + opr_data: { + account_alias: customer, + }, + }; + return this.client.axios + .post(ApiRoutes.CREATE_ONSITEINVOCE, body) + .then((response) => { + if (response.data?.response_code === ResponseCode.success) { + return { + token: response.data.invoice_token, + oprToken: response.data.token, + responseText: response.data.description, + }; + } else { + let error = new ResponseError( + "Failed to create invoice", + response.data + ); + throw error; } - return this.client.axios.post(`/opr/create`, body) - .then((response) => { - if (response.data?.response_code === '00') { - this.token = response.data.invoice_token; - this.oprToken = response.data.token; - this.responseText = response.data.description - - return { - token: this.token, - oprToken: this.oprToken, - responseText: this.responseText - } - } - else { - let error = new ResponseError('Failed to create invoice', response.data) - throw error; - } - }); - } - - - /** - * Charge paydunya account - * @param oprToken The OPR token of the invoice to confirm - * * @param confirmToken Confirmation token sent to PAYDUNYA user - */ - async charge(oprToken: string, confirmToken: string) { - let body = { - token: oprToken, - confirm_token: confirmToken - }; + }); + } - return this.client.axios.post(`/opr/charge`, body) - .then((response) => { - if (response.data?.response_code === '00') { - this.responseText = response.data.response_text; - this.status = response.data.invoice_data.status; - this.receiptURL = response.data.invoice_data.receipt_url; - this.customer = response.data.invoice_data.customer; + /** + * Charge paydunya account + * @param oprToken The OPR token of the invoice to confirm + * * @param confirmToken Confirmation token sent to PAYDUNYA user + */ + async charge(oprToken: string, confirmToken: string) { + let body = { + token: oprToken, + confirm_token: confirmToken, + }; - return { - responseText: this.responseText, - status: this.status, - receiptURL: response.data.invoice_data.receipt_url, - customer: response.data.invoice_data.customer, - } - } else { - let error = new ResponseError('Failed to charge invoice. Check OPR/confirm token and try again.', response.data); - throw error; - } - }); - } - - -} \ No newline at end of file + return this.client.axios + .post(ApiRoutes.CHARGE_ONSITEINVOCE, body) + .then((response) => { + if (response.data?.response_code === ResponseCode.success) { + return { + responseText: response.data.response_text, + status: response.data.invoice_data.status, + receiptURL: response.data.invoice_data.receipt_url, + customer: response.data.invoice_data.customer, + }; + } else { + let error = new ResponseError( + "Failed to charge invoice. Check OPR/confirm token and try again.", + response.data + ); + throw error; + } + }); + } +} From dbecd6b0886f354350aee7be411bc7dd127fe80b Mon Sep 17 00:00:00 2001 From: Maximilien COMLAN Date: Wed, 8 Oct 2025 02:19:34 +0100 Subject: [PATCH 04/20] renamed to constants --- lib/{constantes.ts => constants.ts} | 8 ++++---- lib/direct-pay.ts | 4 ++-- lib/invoices/checkout.ts | 4 ++-- lib/invoices/onsite.ts | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) rename lib/{constantes.ts => constants.ts} (76%) diff --git a/lib/constantes.ts b/lib/constants.ts similarity index 76% rename from lib/constantes.ts rename to lib/constants.ts index 7dda93d..bd5707e 100644 --- a/lib/constantes.ts +++ b/lib/constants.ts @@ -1,8 +1,8 @@ export enum Status { - Completed = "completed", - Canceled = "canceled", - Pending = "pending", - Failed = "failed", + COMPLETED = "completed", + CANCELLED = "cancelled", + PENDING = "pending", + FAILED = "failed", } export enum ResponseCode { diff --git a/lib/direct-pay.ts b/lib/direct-pay.ts index 7883aa1..cfde970 100644 --- a/lib/direct-pay.ts +++ b/lib/direct-pay.ts @@ -1,7 +1,7 @@ import util from "util"; import { PaydunyaClient } from "./client"; import { ResponseError } from "./errors"; -import { ApiRoutes } from "./constantes"; +import { ApiRoutes, ResponseCode } from "./constants"; export class DirectPay { private client: PaydunyaClient; @@ -27,7 +27,7 @@ export class DirectPay { const res = await this.client.axios.post(ApiRoutes.CREDIT_ACCOUNT, body); - if (res.data.response_code === "00") { + if (res.data.response_code === ResponseCode.success) { this.responseText = res.data.response_text; this.description = res.data.description; this.transactionID = res.data.transaction_id; diff --git a/lib/invoices/checkout.ts b/lib/invoices/checkout.ts index 89365cb..83fb32f 100644 --- a/lib/invoices/checkout.ts +++ b/lib/invoices/checkout.ts @@ -1,7 +1,7 @@ import { Invoice } from "./invoice"; import { PaydunyaClient } from "../client"; import { ResponseError } from "../errors"; -import { ApiRoutes, ResponseCode, Status } from "../constantes"; +import { ApiRoutes, ResponseCode, Status } from "../constants"; export default class CheckoutInvoice extends Invoice { token?: string; @@ -50,7 +50,7 @@ export default class CheckoutInvoice extends Invoice { if (body.response_code === ResponseCode.success) { this.status = body.status; this.responseText = body.response_text; - if (this.status === Status.Completed) { + if (this.status === Status.COMPLETED) { this.customer = body.customer; this.receiptURL = body.receipt_url; this.receipt_identifier = body.receipt_identifier; diff --git a/lib/invoices/onsite.ts b/lib/invoices/onsite.ts index 7c0f02b..3af7b1a 100644 --- a/lib/invoices/onsite.ts +++ b/lib/invoices/onsite.ts @@ -1,5 +1,5 @@ import { PaydunyaClient } from "../client"; -import { ApiRoutes, ResponseCode } from "../constantes"; +import { ApiRoutes, ResponseCode } from "../constants"; import { ResponseError } from "../errors"; import { Invoice } from "./invoice"; From ae227c8cafdda1921523e14ab74b2dd4c6f73cb7 Mon Sep 17 00:00:00 2001 From: Maximilien COMLAN Date: Wed, 8 Oct 2025 02:54:07 +0100 Subject: [PATCH 05/20] added balance querying class --- lib/balance.ts | 79 +++++++++++++++++++++++++++++++++++++++++ lib/constants.ts | 22 ++++++++++++ lib/invoices/invoice.ts | 2 +- lib/types/index.ts | 20 ----------- 4 files changed, 102 insertions(+), 21 deletions(-) create mode 100644 lib/balance.ts delete mode 100644 lib/types/index.ts diff --git a/lib/balance.ts b/lib/balance.ts new file mode 100644 index 0000000..ab56207 --- /dev/null +++ b/lib/balance.ts @@ -0,0 +1,79 @@ +import { PaydunyaClient } from "./client"; +import axios, { Axios } from "axios"; +import { ApiRoutes } from "./constants"; + +type SupportedCountryCode = "SN" | "CI" | "BJ" | "TG" | "ML" | "BF" + +interface BalanceByCountry { + ["Balance SN"]: string; + ["Balance CI"]: string; + ["Balance BJ"]: string; + ["Balance TG"]: string; + ["Balance ML"]: string; + ["Balance BF"]: string; +} + +interface BalanceResult extends BalanceByCountry { + success: boolean; + description: string; +} + +interface AccountBalanceResult extends Partial { + success: boolean; + description: string; +} + +export class Money { + amount: number; + currency: string; + + constructor(amount: number, currency: string) { + this.amount = amount; + this.currency = currency; + } +} + +export class Balance { + + client: PaydunyaClient + axios: Axios + + constructor(client: PaydunyaClient) { + this.client = client; + this.axios = axios.create({ + baseURL: "https://app.paydunya.com/api/v2" + }); + this.axios.interceptors.request.use((config) => { + return this.client.setup.extendRequestConfig(config); + }) + } + + async getAll() { + return this.client.axios.get(ApiRoutes.CHECK_BALANCE) + .then((result) => { + if (result.data.success) { + return result.data + } + return undefined; + }); + } + + async getBalanceByCountry(country: SupportedCountryCode) { + let result = await this.getAll() + if (result && Object.keys(result).includes(`Balance ${country}`)) { + let [amount, currency] = result[`Balance ${country}`].split(" ") + return new Money(parseFloat(amount), currency); + } + } + + async getAccountBalance(account: string) { + return this.client.axios.get(`${ApiRoutes.CHECK_BALANCE}/${account}`) + .then((result) => { + if (result.data.success) { + return result.data + } + return undefined; + }); + } + +} \ No newline at end of file diff --git a/lib/constants.ts b/lib/constants.ts index bd5707e..6406c1e 100644 --- a/lib/constants.ts +++ b/lib/constants.ts @@ -15,4 +15,26 @@ export enum ApiRoutes { CREATE_ONSITEINVOCE = "/opr/create", CHARGE_ONSITEINVOCE = "/opr/charge", CREDIT_ACCOUNT = "/direct-pay/credit-account", + CHECK_BALANCE = "/disburse/check-balance" } + +export enum PaymentChannel { + Card = "card", + OrangeMoneySenegal = "orange-money-senegal", + WaveSenegal = "wave-senegal", + FreeMoneySenegal = "free-money-senegal", + ExpressoSn = "expresso-sn", + WizallSenegal = "wizall-senegal", + MtnBenin = "mtn-benin", + MoovBenin = "moov-benin", + OrangeMoneyCi = "orange-money-ci", + WaveCi = "wave-ci", + MtnCi = "mtn-ci", + MoovCi = "moov-ci", + TMoneyTogo = "t-money-togo", + MoovTogo = "moov-togo", + OrangeMoneyMali = "orange-money-mali", + MoovMl = "moov-ml", + OrangeMoneyBurkina = "orange-money-burkina", + MoovBurkinaFaso = "moov-burkina-faso" +} \ No newline at end of file diff --git a/lib/invoices/invoice.ts b/lib/invoices/invoice.ts index 24674ff..a2d82ac 100644 --- a/lib/invoices/invoice.ts +++ b/lib/invoices/invoice.ts @@ -1,5 +1,5 @@ import { PaydunyaClient } from "../client"; -import { PaymentChannel } from "../types"; +import { PaymentChannel } from "../constants"; interface InvoiceItem { name: string; diff --git a/lib/types/index.ts b/lib/types/index.ts deleted file mode 100644 index 6cc5e7f..0000000 --- a/lib/types/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -export enum PaymentChannel { - Card = "card", - OrangeMoneySenegal = "orange-money-senegal", - WaveSenegal = "wave-senegal", - FreeMoneySenegal = "free-money-senegal", - ExpressoSn = "expresso-sn", - WizallSenegal = "wizall-senegal", - MtnBenin = "mtn-benin", - MoovBenin = "moov-benin", - OrangeMoneyCi = "orange-money-ci", - WaveCi = "wave-ci", - MtnCi = "mtn-ci", - MoovCi = "moov-ci", - TMoneyTogo = "t-money-togo", - MoovTogo = "moov-togo", - OrangeMoneyMali = "orange-money-mali", - MoovMl = "moov-ml", - OrangeMoneyBurkina = "orange-money-burkina", - MoovBurkinaFaso = "moov-burkina-faso" -} \ No newline at end of file From 000306a075eedc8b2400de1f91f1a21a19bfe42a Mon Sep 17 00:00:00 2001 From: Maximilien COMLAN Date: Wed, 8 Oct 2025 03:43:46 +0100 Subject: [PATCH 06/20] support dynamic country codes --- lib/balance.ts | 46 +++++++++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/lib/balance.ts b/lib/balance.ts index ab56207..518aa5e 100644 --- a/lib/balance.ts +++ b/lib/balance.ts @@ -2,16 +2,22 @@ import { PaydunyaClient } from "./client"; import axios, { Axios } from "axios"; import { ApiRoutes } from "./constants"; -type SupportedCountryCode = "SN" | "CI" | "BJ" | "TG" | "ML" | "BF" - -interface BalanceByCountry { - ["Balance SN"]: string; - ["Balance CI"]: string; - ["Balance BJ"]: string; - ["Balance TG"]: string; - ["Balance ML"]: string; - ["Balance BF"]: string; -} +const CountryCodes = { + SN: "SN", + CI: "CI", + BJ: "BJ", + TG: "TG", + ML: "ML", + BF: "BF" +} as const; + +type SupportedCountryCode = keyof typeof CountryCodes + +type BalanceByCountryKey = `Balance ${SupportedCountryCode}` + +type BalanceByCountry = { + [key in BalanceByCountryKey]: string; +}; interface BalanceResult extends BalanceByCountry { success: boolean; @@ -23,7 +29,7 @@ interface AccountBalanceResult extends Partial { description: string; } -export class Money { +class Money { amount: number; currency: string; @@ -31,6 +37,11 @@ export class Money { this.amount = amount; this.currency = currency; } + + static parse(value: string) { + let [amount, currency] = value.split(" ") + return new Money(parseFloat(amount), currency.trim()) + } } export class Balance { @@ -52,7 +63,13 @@ export class Balance { return this.client.axios.get(ApiRoutes.CHECK_BALANCE) .then((result) => { if (result.data.success) { - return result.data + + let items: { [key in SupportedCountryCode]?: Money } = {}; + Object.keys(CountryCodes).forEach((country) => { + (items as any)[country] = Money.parse((result.data as any)[`Balance ${country}`]) + }); + + return items; } return undefined; }); @@ -60,9 +77,8 @@ export class Balance { async getBalanceByCountry(country: SupportedCountryCode) { let result = await this.getAll() - if (result && Object.keys(result).includes(`Balance ${country}`)) { - let [amount, currency] = result[`Balance ${country}`].split(" ") - return new Money(parseFloat(amount), currency); + if (result && result[country]) { + return result[country]; } } From bcd6d8bad9942c5ce4afec328987a5124ec74cfb Mon Sep 17 00:00:00 2001 From: Maximilien COMLAN Date: Wed, 8 Oct 2025 03:55:18 +0100 Subject: [PATCH 07/20] moved supported country codes to constants --- lib/balance.ts | 15 +++------------ lib/constants.ts | 11 ++++++++++- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/balance.ts b/lib/balance.ts index 518aa5e..4bf3a8b 100644 --- a/lib/balance.ts +++ b/lib/balance.ts @@ -1,17 +1,8 @@ import { PaydunyaClient } from "./client"; import axios, { Axios } from "axios"; -import { ApiRoutes } from "./constants"; +import { ApiRoutes, SUPPORTED_COUNTRY_CODES } from "./constants"; -const CountryCodes = { - SN: "SN", - CI: "CI", - BJ: "BJ", - TG: "TG", - ML: "ML", - BF: "BF" -} as const; - -type SupportedCountryCode = keyof typeof CountryCodes +type SupportedCountryCode = keyof typeof SUPPORTED_COUNTRY_CODES; type BalanceByCountryKey = `Balance ${SupportedCountryCode}` @@ -65,7 +56,7 @@ export class Balance { if (result.data.success) { let items: { [key in SupportedCountryCode]?: Money } = {}; - Object.keys(CountryCodes).forEach((country) => { + Object.keys(SUPPORTED_COUNTRY_CODES).forEach((country) => { (items as any)[country] = Money.parse((result.data as any)[`Balance ${country}`]) }); diff --git a/lib/constants.ts b/lib/constants.ts index 6406c1e..89c67d4 100644 --- a/lib/constants.ts +++ b/lib/constants.ts @@ -37,4 +37,13 @@ export enum PaymentChannel { MoovMl = "moov-ml", OrangeMoneyBurkina = "orange-money-burkina", MoovBurkinaFaso = "moov-burkina-faso" -} \ No newline at end of file +} + +export const SUPPORTED_COUNTRY_CODES = { + SN: "SN", + CI: "CI", + BJ: "BJ", + TG: "TG", + ML: "ML", + BF: "BF" +} as const; \ No newline at end of file From 8b7661859f0e449d10888018119081d02e1de3f4 Mon Sep 17 00:00:00 2001 From: Maximilien COMLAN Date: Fri, 10 Oct 2025 09:36:20 +0100 Subject: [PATCH 08/20] added tsconfg with build command --- README.md | 41 +- dist/balance.d.ts | 34 ++ dist/balance.js | 63 +++ dist/balance.js.map | 1 + dist/constants.d.ts | 45 +++ dist/constants.js | 53 +++ dist/constants.js.map | 1 + dist/credentials.d.ts | 19 + dist/credentials.js | 27 ++ dist/credentials.js.map | 1 + dist/direct-pay.d.ts | 14 + dist/direct-pay.js | 41 ++ dist/direct-pay.js.map | 1 + dist/errors.d.ts | 4 + dist/errors.js | 12 + dist/errors.js.map | 1 + dist/index.d.ts | 16 + dist/index.js | 40 ++ dist/index.js.map | 1 + dist/invoices/checkout.d.ts | 34 ++ dist/invoices/checkout.js | 84 ++++ dist/invoices/checkout.js.map | 1 + dist/invoices/invoice.d.ts | 82 ++++ dist/invoices/invoice.js | 136 +++++++ dist/invoices/invoice.js.map | 1 + dist/invoices/onsite.d.ts | 31 ++ dist/invoices/onsite.js | 73 ++++ dist/invoices/onsite.js.map | 1 + dist/paydunya-node.min.js | 47 --- dist/store.d.ts | 27 ++ dist/store.js | 58 +++ dist/store.js.map | 1 + dist/transport.d.ts | 10 + dist/transport.js | 27 ++ dist/transport.js.map | 1 + package-lock.json | 557 +++++++++++++++++++++++++- package.json | 8 +- src/examples/index.ts | 9 + {lib => src/lib}/balance.ts | 22 +- {lib => src/lib}/constants.ts | 0 {lib => src/lib}/credentials.ts | 12 +- {lib => src/lib}/direct-pay.ts | 12 +- {lib => src/lib}/errors.ts | 0 src/lib/index.ts | 64 +++ {lib => src/lib}/invoices/checkout.ts | 8 +- {lib => src/lib}/invoices/invoice.ts | 22 +- {lib => src/lib}/invoices/onsite.ts | 10 +- {lib => src/lib}/store.ts | 0 lib/client.ts => src/lib/transport.ts | 14 +- tsconfig.json | 38 ++ 50 files changed, 1690 insertions(+), 115 deletions(-) create mode 100644 dist/balance.d.ts create mode 100644 dist/balance.js create mode 100644 dist/balance.js.map create mode 100644 dist/constants.d.ts create mode 100644 dist/constants.js create mode 100644 dist/constants.js.map create mode 100644 dist/credentials.d.ts create mode 100644 dist/credentials.js create mode 100644 dist/credentials.js.map create mode 100644 dist/direct-pay.d.ts create mode 100644 dist/direct-pay.js create mode 100644 dist/direct-pay.js.map create mode 100644 dist/errors.d.ts create mode 100644 dist/errors.js create mode 100644 dist/errors.js.map create mode 100644 dist/index.d.ts create mode 100644 dist/index.js create mode 100644 dist/index.js.map create mode 100644 dist/invoices/checkout.d.ts create mode 100644 dist/invoices/checkout.js create mode 100644 dist/invoices/checkout.js.map create mode 100644 dist/invoices/invoice.d.ts create mode 100644 dist/invoices/invoice.js create mode 100644 dist/invoices/invoice.js.map create mode 100644 dist/invoices/onsite.d.ts create mode 100644 dist/invoices/onsite.js create mode 100644 dist/invoices/onsite.js.map delete mode 100644 dist/paydunya-node.min.js create mode 100644 dist/store.d.ts create mode 100644 dist/store.js create mode 100644 dist/store.js.map create mode 100644 dist/transport.d.ts create mode 100644 dist/transport.js create mode 100644 dist/transport.js.map create mode 100644 src/examples/index.ts rename {lib => src/lib}/balance.ts (78%) rename {lib => src/lib}/constants.ts (100%) rename {lib => src/lib}/credentials.ts (77%) rename {lib => src/lib}/direct-pay.ts (80%) rename {lib => src/lib}/errors.ts (100%) create mode 100644 src/lib/index.ts rename {lib => src/lib}/invoices/checkout.ts (94%) rename {lib => src/lib}/invoices/invoice.ts (87%) rename {lib => src/lib}/invoices/onsite.ts (92%) rename {lib => src/lib}/store.ts (100%) rename lib/client.ts => src/lib/transport.ts (62%) create mode 100644 tsconfig.json diff --git a/README.md b/README.md index a820aeb..41af913 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ PAYDUNYA NodeJS API Client ====================================== The [Node.JS](http://nodejs.org) library for [PAYDUNYA (paydunya.com)](https://paydunya.com). +Fully supports Typescript. Built on the PAYDUNYA HTTP API (beta). @@ -14,25 +15,39 @@ npm install --save paydunya Setup paydunya API keys. -```javascript -var setup = new paydunya.Setup({ - masterKey: 'wQzk9ZwR-Qq9m-0hD0-zpud-je5coGC3FHKW', - privateKey: 'test_private_rMIdJM3PLLhLjyArx9tF3VURAF5', - publicKey: 'test_public_kb9Wo0Qpn8vNWMvMZOwwpvuTUja-OSDNhUqKoaTI4wc', - token: 'IivOiOxGJuWhc5znlIiK', - mode: 'test' // optional. use in sandbox mode. -}); +```typescript +import { PaydunyaClient } from "paydunya-sdk" +let client = PaydunyaClient.fromCredentials({ + masterKey: "your-master-key", + privateKey: "your-private-key", + publicKey: "your-public-key", + token: "your-token", + mode: "test" // or "live" +}) ``` -It might usually be suitable to put your API configuration in environment variables. In that case you can initialize `paydunya.Setup` without passing configuration parameters. -The library will automatically detect the environment variables and use them. -Auto-detected environment variables: `PAYDUNYA_MASTER_KEY`, `PAYDUNYA_PRIVATE_KEY`, `PAYDUNYA_PUBLIC_KEY`, `PAYDUNYA_TOKEN` +### Auto-Detection +It might be suitable for you to put your API configuration in environment variables. +In that case, instantiate your client with these parameters. + +```typescript +import { PaydunyaClient } from "paydunya-sdk" +let client = PaydunyaClient.autoDetect() +``` +In that case please pass the following keys in your environment: +- `PAYDUNYA_MASTER_KEY`: the master key of your account, +- `PAYDUNYA_PRIVATE_KEY`: your private key +- `PAYDUNYA_PUBLIC_KEY`: your public key +- `PAYDUNYA_TOKEN`: your paydunya token, +- `PAYDUNYA_MODE`: your current environment. `test` or `live`. + ## Checkout Store Configuration -```javascript -var store = new paydunya.Store({ +```typescript +import {Store} from "paydunya-sdk/store" +let store = new Store({ name: 'Magasin Chez Sandra', // only name is required tagline: "L'élégance n'a pas de prix", phoneNumber: '336530583', diff --git a/dist/balance.d.ts b/dist/balance.d.ts new file mode 100644 index 0000000..44afc8c --- /dev/null +++ b/dist/balance.d.ts @@ -0,0 +1,34 @@ +import { Transport } from "./transport"; +import { AxiosInstance } from "axios"; +import { SUPPORTED_COUNTRY_CODES } from "./constants"; +type SupportedCountryCode = keyof typeof SUPPORTED_COUNTRY_CODES; +type BalanceByCountryKey = `Balance ${SupportedCountryCode}`; +type BalanceByCountry = { + [key in BalanceByCountryKey]: string; +}; +interface AccountBalanceResult extends Partial { + success: boolean; + description: string; +} +declare class Money { + amount: number; + currency: string; + constructor(amount: number, currency: string); + static parse(value: string): Money; +} +export declare class Balance { + transport: Transport; + axios: AxiosInstance; + constructor(transport: Transport); + getAll(): Promise<{ + SN?: Money; + CI?: Money; + BJ?: Money; + TG?: Money; + ML?: Money; + BF?: Money; + } | undefined>; + getBalanceByCountry(country: SupportedCountryCode): Promise; + getAccountBalance(account: string): Promise; +} +export {}; diff --git a/dist/balance.js b/dist/balance.js new file mode 100644 index 0000000..bad2cff --- /dev/null +++ b/dist/balance.js @@ -0,0 +1,63 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Balance = void 0; +const axios_1 = __importDefault(require("axios")); +const constants_1 = require("./constants"); +class Money { + amount; + currency; + constructor(amount, currency) { + this.amount = amount; + this.currency = currency; + } + static parse(value) { + let [amount, currency] = value.split(" "); + return new Money(parseFloat(amount || "0"), currency?.trim() || "XOF"); + } +} +class Balance { + transport; + axios; + constructor(transport) { + this.transport = transport; + this.axios = axios_1.default.create({ + baseURL: "https://app.paydunya.com/api/v2" + }); + this.axios.interceptors.request.use((config) => { + return this.transport.setup.extendRequestConfig(config); + }); + } + async getAll() { + return this.axios.get(constants_1.ApiRoutes.CHECK_BALANCE) + .then((result) => { + if (result.data.success) { + let items = {}; + Object.keys(constants_1.SUPPORTED_COUNTRY_CODES).forEach((country) => { + items[country] = Money.parse(result.data[`Balance ${country}`]); + }); + return items; + } + return undefined; + }); + } + async getBalanceByCountry(country) { + let result = await this.getAll(); + if (result && result[country]) { + return result[country]; + } + } + async getAccountBalance(account) { + return this.axios.get(`${constants_1.ApiRoutes.CHECK_BALANCE}/${account}`) + .then((result) => { + if (result.data.success) { + return result.data; + } + return undefined; + }); + } +} +exports.Balance = Balance; +//# sourceMappingURL=balance.js.map \ No newline at end of file diff --git a/dist/balance.js.map b/dist/balance.js.map new file mode 100644 index 0000000..21cb482 --- /dev/null +++ b/dist/balance.js.map @@ -0,0 +1 @@ +{"version":3,"file":"balance.js","sourceRoot":"","sources":["../src/lib/balance.ts"],"names":[],"mappings":";;;;;;AACA,kDAA6C;AAC7C,2CAAiE;AAoBjE,MAAM,KAAK;IACP,MAAM,CAAS;IACf,QAAQ,CAAS;IAEjB,YAAY,MAAc,EAAE,QAAgB;QACxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,KAAa;QACtB,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QACzC,OAAO,IAAI,KAAK,CAAC,UAAU,CAAC,MAAM,IAAI,GAAG,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,KAAK,CAAC,CAAA;IAC1E,CAAC;CACJ;AAED,MAAa,OAAO;IAEhB,SAAS,CAAW;IACpB,KAAK,CAAe;IAEpB,YAAY,SAAoB;QAC5B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,KAAK,GAAG,eAAK,CAAC,MAAM,CAAC;YACtB,OAAO,EAAE,iCAAiC;SAC7C,CAAC,CAAC;QACH,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;YAC3C,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;QAC5D,CAAC,CAAC,CAAA;IACN,CAAC;IAED,KAAK,CAAC,MAAM;QACR,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAgB,qBAAS,CAAC,aAAa,CAAC;aACxD,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;YACb,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;gBAEtB,IAAI,KAAK,GAA8C,EAAE,CAAC;gBAC1D,MAAM,CAAC,IAAI,CAAC,mCAAuB,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;oBACpD,KAAa,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC,KAAK,CAAE,MAAM,CAAC,IAAY,CAAC,WAAW,OAAO,EAAE,CAAC,CAAC,CAAA;gBACrF,CAAC,CAAC,CAAC;gBAEH,OAAO,KAAK,CAAC;YACjB,CAAC;YACD,OAAO,SAAS,CAAC;QACrB,CAAC,CAAC,CAAC;IACX,CAAC;IAED,KAAK,CAAC,mBAAmB,CAAC,OAA6B;QACnD,IAAI,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,EAAE,CAAA;QAChC,IAAI,MAAM,IAAI,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;YAC5B,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC;QAC3B,CAAC;IACL,CAAC;IAED,KAAK,CAAC,iBAAiB,CAAC,OAAe;QACnC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAuB,GAAG,qBAAS,CAAC,aAAa,IAAI,OAAO,EAAE,CAAC;aAC/E,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;YACb,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;gBACtB,OAAO,MAAM,CAAC,IAAI,CAAA;YACtB,CAAC;YACD,OAAO,SAAS,CAAC;QACrB,CAAC,CAAC,CAAC;IACX,CAAC;CAEJ;AAhDD,0BAgDC"} \ No newline at end of file diff --git a/dist/constants.d.ts b/dist/constants.d.ts new file mode 100644 index 0000000..1161f76 --- /dev/null +++ b/dist/constants.d.ts @@ -0,0 +1,45 @@ +export declare enum Status { + COMPLETED = "completed", + CANCELLED = "cancelled", + PENDING = "pending", + FAILED = "failed" +} +export declare enum ResponseCode { + success = "00" +} +export declare enum ApiRoutes { + CREATE_INVOICE = "/checkout-invoice/create", + CONFIRM_INVOICE = "/checkout-invoice/confirm/", + CREATE_ONSITEINVOCE = "/opr/create", + CHARGE_ONSITEINVOCE = "/opr/charge", + CREDIT_ACCOUNT = "/direct-pay/credit-account", + CHECK_BALANCE = "/disburse/check-balance" +} +export declare enum PaymentChannel { + Card = "card", + OrangeMoneySenegal = "orange-money-senegal", + WaveSenegal = "wave-senegal", + FreeMoneySenegal = "free-money-senegal", + ExpressoSn = "expresso-sn", + WizallSenegal = "wizall-senegal", + MtnBenin = "mtn-benin", + MoovBenin = "moov-benin", + OrangeMoneyCi = "orange-money-ci", + WaveCi = "wave-ci", + MtnCi = "mtn-ci", + MoovCi = "moov-ci", + TMoneyTogo = "t-money-togo", + MoovTogo = "moov-togo", + OrangeMoneyMali = "orange-money-mali", + MoovMl = "moov-ml", + OrangeMoneyBurkina = "orange-money-burkina", + MoovBurkinaFaso = "moov-burkina-faso" +} +export declare const SUPPORTED_COUNTRY_CODES: { + readonly SN: "SN"; + readonly CI: "CI"; + readonly BJ: "BJ"; + readonly TG: "TG"; + readonly ML: "ML"; + readonly BF: "BF"; +}; diff --git a/dist/constants.js b/dist/constants.js new file mode 100644 index 0000000..a0b10d8 --- /dev/null +++ b/dist/constants.js @@ -0,0 +1,53 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SUPPORTED_COUNTRY_CODES = exports.PaymentChannel = exports.ApiRoutes = exports.ResponseCode = exports.Status = void 0; +var Status; +(function (Status) { + Status["COMPLETED"] = "completed"; + Status["CANCELLED"] = "cancelled"; + Status["PENDING"] = "pending"; + Status["FAILED"] = "failed"; +})(Status || (exports.Status = Status = {})); +var ResponseCode; +(function (ResponseCode) { + ResponseCode["success"] = "00"; +})(ResponseCode || (exports.ResponseCode = ResponseCode = {})); +var ApiRoutes; +(function (ApiRoutes) { + ApiRoutes["CREATE_INVOICE"] = "/checkout-invoice/create"; + ApiRoutes["CONFIRM_INVOICE"] = "/checkout-invoice/confirm/"; + ApiRoutes["CREATE_ONSITEINVOCE"] = "/opr/create"; + ApiRoutes["CHARGE_ONSITEINVOCE"] = "/opr/charge"; + ApiRoutes["CREDIT_ACCOUNT"] = "/direct-pay/credit-account"; + ApiRoutes["CHECK_BALANCE"] = "/disburse/check-balance"; +})(ApiRoutes || (exports.ApiRoutes = ApiRoutes = {})); +var PaymentChannel; +(function (PaymentChannel) { + PaymentChannel["Card"] = "card"; + PaymentChannel["OrangeMoneySenegal"] = "orange-money-senegal"; + PaymentChannel["WaveSenegal"] = "wave-senegal"; + PaymentChannel["FreeMoneySenegal"] = "free-money-senegal"; + PaymentChannel["ExpressoSn"] = "expresso-sn"; + PaymentChannel["WizallSenegal"] = "wizall-senegal"; + PaymentChannel["MtnBenin"] = "mtn-benin"; + PaymentChannel["MoovBenin"] = "moov-benin"; + PaymentChannel["OrangeMoneyCi"] = "orange-money-ci"; + PaymentChannel["WaveCi"] = "wave-ci"; + PaymentChannel["MtnCi"] = "mtn-ci"; + PaymentChannel["MoovCi"] = "moov-ci"; + PaymentChannel["TMoneyTogo"] = "t-money-togo"; + PaymentChannel["MoovTogo"] = "moov-togo"; + PaymentChannel["OrangeMoneyMali"] = "orange-money-mali"; + PaymentChannel["MoovMl"] = "moov-ml"; + PaymentChannel["OrangeMoneyBurkina"] = "orange-money-burkina"; + PaymentChannel["MoovBurkinaFaso"] = "moov-burkina-faso"; +})(PaymentChannel || (exports.PaymentChannel = PaymentChannel = {})); +exports.SUPPORTED_COUNTRY_CODES = { + SN: "SN", + CI: "CI", + BJ: "BJ", + TG: "TG", + ML: "ML", + BF: "BF" +}; +//# sourceMappingURL=constants.js.map \ No newline at end of file diff --git a/dist/constants.js.map b/dist/constants.js.map new file mode 100644 index 0000000..9fede43 --- /dev/null +++ b/dist/constants.js.map @@ -0,0 +1 @@ +{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/lib/constants.ts"],"names":[],"mappings":";;;AAAA,IAAY,MAKX;AALD,WAAY,MAAM;IAChB,iCAAuB,CAAA;IACvB,iCAAuB,CAAA;IACvB,6BAAmB,CAAA;IACnB,2BAAiB,CAAA;AACnB,CAAC,EALW,MAAM,sBAAN,MAAM,QAKjB;AAED,IAAY,YAEX;AAFD,WAAY,YAAY;IACtB,8BAAc,CAAA;AAChB,CAAC,EAFW,YAAY,4BAAZ,YAAY,QAEvB;AAED,IAAY,SAOX;AAPD,WAAY,SAAS;IACnB,wDAA2C,CAAA;IAC3C,2DAA8C,CAAA;IAC9C,gDAAmC,CAAA;IACnC,gDAAmC,CAAA;IACnC,0DAA6C,CAAA;IAC7C,sDAAyC,CAAA;AAC3C,CAAC,EAPW,SAAS,yBAAT,SAAS,QAOpB;AAED,IAAY,cAmBX;AAnBD,WAAY,cAAc;IACtB,+BAAa,CAAA;IACb,6DAA2C,CAAA;IAC3C,8CAA4B,CAAA;IAC5B,yDAAuC,CAAA;IACvC,4CAA0B,CAAA;IAC1B,kDAAgC,CAAA;IAChC,wCAAsB,CAAA;IACtB,0CAAwB,CAAA;IACxB,mDAAiC,CAAA;IACjC,oCAAkB,CAAA;IAClB,kCAAgB,CAAA;IAChB,oCAAkB,CAAA;IAClB,6CAA2B,CAAA;IAC3B,wCAAsB,CAAA;IACtB,uDAAqC,CAAA;IACrC,oCAAkB,CAAA;IAClB,6DAA2C,CAAA;IAC3C,uDAAqC,CAAA;AACzC,CAAC,EAnBW,cAAc,8BAAd,cAAc,QAmBzB;AAEY,QAAA,uBAAuB,GAAG;IACnC,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;CACF,CAAC"} \ No newline at end of file diff --git a/dist/credentials.d.ts b/dist/credentials.d.ts new file mode 100644 index 0000000..bd82cc6 --- /dev/null +++ b/dist/credentials.d.ts @@ -0,0 +1,19 @@ +import { InternalAxiosRequestConfig } from "axios"; +type Environment = "live" | "test"; +interface CredentialOptions { + masterKey: string; + privateKey: string; + publicKey: string; + token: string; + mode: Environment; +} +export declare class Credentials { + masterKey: string; + privateKey: string; + publicKey: string; + token: string; + mode: Environment; + constructor(options: CredentialOptions); + extendRequestConfig(config: InternalAxiosRequestConfig): InternalAxiosRequestConfig; +} +export {}; diff --git a/dist/credentials.js b/dist/credentials.js new file mode 100644 index 0000000..492545e --- /dev/null +++ b/dist/credentials.js @@ -0,0 +1,27 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Credentials = void 0; +class Credentials { + masterKey; + privateKey; + publicKey; + token; + mode; + constructor(options) { + this.masterKey = options.masterKey; + this.privateKey = options.privateKey; + this.publicKey = options.publicKey; + this.token = options.token; + this.mode = options.mode; + } + extendRequestConfig(config) { + config.headers + .set("Content-Type", "application/json") + .set("PAYDUNYA-MASTER-KEY", this.masterKey) + .set("PAYDUNYA-PRIVATE-KEY", this.privateKey) + .set("PAYDUNYA-TOKEN", this.token); + return config; + } +} +exports.Credentials = Credentials; +//# sourceMappingURL=credentials.js.map \ No newline at end of file diff --git a/dist/credentials.js.map b/dist/credentials.js.map new file mode 100644 index 0000000..fd52d39 --- /dev/null +++ b/dist/credentials.js.map @@ -0,0 +1 @@ +{"version":3,"file":"credentials.js","sourceRoot":"","sources":["../src/lib/credentials.ts"],"names":[],"mappings":";;;AAWA,MAAa,WAAW;IACpB,SAAS,CAAQ;IACjB,UAAU,CAAQ;IAClB,SAAS,CAAQ;IACjB,KAAK,CAAQ;IACb,IAAI,CAAa;IAEjB,YAAY,OAA0B;QAClC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QACrC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAC7B,CAAC;IAED,mBAAmB,CAAC,MAAkC;QAClD,MAAM,CAAC,OAAO;aACb,GAAG,CAAC,cAAc,EAAE,kBAAkB,CAAC;aACvC,GAAG,CAAC,qBAAqB,EAAE,IAAI,CAAC,SAAS,CAAC;aAC1C,GAAG,CAAC,sBAAsB,EAAE,IAAI,CAAC,UAAU,CAAC;aAC5C,GAAG,CAAC,gBAAgB,EAAE,IAAI,CAAC,KAAK,CAAC,CAAA;QAClC,OAAO,MAAM,CAAA;IACjB,CAAC;CAEJ;AAxBD,kCAwBC"} \ No newline at end of file diff --git a/dist/direct-pay.d.ts b/dist/direct-pay.d.ts new file mode 100644 index 0000000..e64f566 --- /dev/null +++ b/dist/direct-pay.d.ts @@ -0,0 +1,14 @@ +import { Transport } from "./transport"; +export declare class DirectPay { + private transport; + responseText?: string; + description?: string; + transactionID?: string; + constructor(transport: Transport); + /** + * Credit a PAYDUNYA account + * @param account Account alias, number or email + * @param amount Amount to credit + */ + creditAccount(account: string, amount: number): Promise; +} diff --git a/dist/direct-pay.js b/dist/direct-pay.js new file mode 100644 index 0000000..c091835 --- /dev/null +++ b/dist/direct-pay.js @@ -0,0 +1,41 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DirectPay = void 0; +const errors_1 = require("./errors"); +const constants_1 = require("./constants"); +const util_1 = __importDefault(require("util")); +class DirectPay { + transport; + responseText; + description; + transactionID; + constructor(transport) { + this.transport = transport; + } + /** + * Credit a PAYDUNYA account + * @param account Account alias, number or email + * @param amount Amount to credit + */ + async creditAccount(account, amount) { + const body = { + account_alias: account, + amount: Number(amount), + }; + const res = await this.transport.axios.post(constants_1.ApiRoutes.CREDIT_ACCOUNT, body); + if (res.data.response_code === constants_1.ResponseCode.success) { + this.responseText = res.data.response_text; + this.description = res.data.description; + this.transactionID = res.data.transaction_id; + } + else { + const e = new errors_1.ResponseError(util_1.default.format("Failed to credit account. Please ensure %s and %s are valid OR check your account balance.", account, amount), res.data); + throw e; + } + } +} +exports.DirectPay = DirectPay; +//# sourceMappingURL=direct-pay.js.map \ No newline at end of file diff --git a/dist/direct-pay.js.map b/dist/direct-pay.js.map new file mode 100644 index 0000000..2541a4e --- /dev/null +++ b/dist/direct-pay.js.map @@ -0,0 +1 @@ +{"version":3,"file":"direct-pay.js","sourceRoot":"","sources":["../src/lib/direct-pay.ts"],"names":[],"mappings":";;;;;;AACA,qCAAyC;AACzC,2CAAsD;AACtD,gDAAuB;AAEvB,MAAa,SAAS;IACZ,SAAS,CAAY;IAEtB,YAAY,CAAU;IACtB,WAAW,CAAU;IACrB,aAAa,CAAU;IAE9B,YAAY,SAAoB;QAC9B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,aAAa,CAAC,OAAe,EAAE,MAAc;QACjD,MAAM,IAAI,GAAG;YACX,aAAa,EAAE,OAAO;YACtB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;SACvB,CAAC;QAEF,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,qBAAS,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;QAE5E,IAAI,GAAG,CAAC,IAAI,CAAC,aAAa,KAAK,wBAAY,CAAC,OAAO,EAAE,CAAC;YACpD,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC;YAC3C,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC;YACxC,IAAI,CAAC,aAAa,GAAG,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC;QAC/C,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,GAAG,IAAI,sBAAa,CACzB,cAAI,CAAC,MAAM,CACT,4FAA4F,EAC5F,OAAO,EACP,MAAM,CACP,EACD,GAAG,CAAC,IAAI,CACT,CAAC;YACF,MAAM,CAAC,CAAC;QACV,CAAC;IACH,CAAC;CACF;AAxCD,8BAwCC"} \ No newline at end of file diff --git a/dist/errors.d.ts b/dist/errors.d.ts new file mode 100644 index 0000000..bec19e8 --- /dev/null +++ b/dist/errors.d.ts @@ -0,0 +1,4 @@ +export declare class ResponseError extends Error { + data: T | undefined; + constructor(message: string, data?: T | undefined); +} diff --git a/dist/errors.js b/dist/errors.js new file mode 100644 index 0000000..e39bd2e --- /dev/null +++ b/dist/errors.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ResponseError = void 0; +class ResponseError extends Error { + data = undefined; + constructor(message, data = undefined) { + super(message); + this.data = data; + } +} +exports.ResponseError = ResponseError; +//# sourceMappingURL=errors.js.map \ No newline at end of file diff --git a/dist/errors.js.map b/dist/errors.js.map new file mode 100644 index 0000000..1ebd9e7 --- /dev/null +++ b/dist/errors.js.map @@ -0,0 +1 @@ +{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/lib/errors.ts"],"names":[],"mappings":";;;AAAA,MAAa,aAA2B,SAAQ,KAAK;IACjD,IAAI,GAAkB,SAAS,CAAA;IAE/B,YAAY,OAAe,EAAE,OAAsB,SAAS;QACxD,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;CACJ;AAPD,sCAOC"} \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 0000000..ff298a2 --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,16 @@ +import { Balance } from "./balance"; +import { Transport } from "./transport"; +import { DirectPay } from "./direct-pay"; +import CheckoutInvoice from "./invoices/checkout"; +import { OnsiteInvoice } from "./invoices/onsite"; +import { Credentials } from "./credentials"; +export declare class PaydunyaClient { + transport: Transport; + constructor(transport: Transport); + checkoutInvoiceInstance(): CheckoutInvoice; + onsiteInvoiceInstance(): OnsiteInvoice; + directpayInstance(): DirectPay; + balanceInstance(): Balance; + static fromCredentialsInstance(credentials: Credentials): PaydunyaClient; + static fromCredentials(params: ConstructorParameters[0]): PaydunyaClient; +} diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 0000000..a68fee1 --- /dev/null +++ b/dist/index.js @@ -0,0 +1,40 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PaydunyaClient = void 0; +const balance_1 = require("./balance"); +const transport_1 = require("./transport"); +const direct_pay_1 = require("./direct-pay"); +const checkout_1 = __importDefault(require("./invoices/checkout")); +const onsite_1 = require("./invoices/onsite"); +const credentials_1 = require("./credentials"); +class PaydunyaClient { + transport; + constructor(transport) { + this.transport = transport; + } + checkoutInvoiceInstance() { + return new checkout_1.default(this.transport); + } + onsiteInvoiceInstance() { + return new onsite_1.OnsiteInvoice(this.transport); + } + directpayInstance() { + return new direct_pay_1.DirectPay(this.transport); + } + balanceInstance() { + return new balance_1.Balance(this.transport); + } + static fromCredentialsInstance(credentials) { + let client = new PaydunyaClient(new transport_1.Transport(credentials)); + return client; + } + static fromCredentials(params) { + let client = new PaydunyaClient(new transport_1.Transport(new credentials_1.Credentials(params))); + return client; + } +} +exports.PaydunyaClient = PaydunyaClient; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/index.js.map b/dist/index.js.map new file mode 100644 index 0000000..19e8976 --- /dev/null +++ b/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":";;;;;;AAAA,uCAAoC;AACpC,2CAAwC;AACxC,6CAAyC;AACzC,mEAAkD;AAClD,8CAAkD;AAClD,+CAA4C;AAE5C,MAAa,cAAc;IACvB,SAAS,CAAY;IAErB,YAAY,SAAoB;QAC5B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC/B,CAAC;IAED,uBAAuB;QACnB,OAAO,IAAI,kBAAe,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC/C,CAAC;IAED,qBAAqB;QACjB,OAAO,IAAI,sBAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC7C,CAAC;IAED,iBAAiB;QACb,OAAO,IAAI,sBAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACzC,CAAC;IAED,eAAe;QACX,OAAO,IAAI,iBAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACvC,CAAC;IAED,MAAM,CAAC,uBAAuB,CAAC,WAAwB;QACnD,IAAI,MAAM,GAAG,IAAI,cAAc,CAC3B,IAAI,qBAAS,CACT,WAAW,CACd,CACJ,CAAA;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,MAAM,CAAC,eAAe,CAAC,MAAoD;QACvE,IAAI,MAAM,GAAG,IAAI,cAAc,CAC3B,IAAI,qBAAS,CACT,IAAI,yBAAW,CAAC,MAAM,CAAC,CAC1B,CACJ,CAAA;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;CAEJ;AAzCD,wCAyCC"} \ No newline at end of file diff --git a/dist/invoices/checkout.d.ts b/dist/invoices/checkout.d.ts new file mode 100644 index 0000000..c39cd25 --- /dev/null +++ b/dist/invoices/checkout.d.ts @@ -0,0 +1,34 @@ +import { Invoice } from "./invoice"; +import { Transport } from "../transport"; +export default class CheckoutInvoice extends Invoice { + token?: string; + url?: string; + status?: string; + responseText?: string; + customer?: any; + receiptURL?: string; + receipt_identifier?: string; + provider_reference?: string; + constructor(client: Transport); + /** + * Create invoice + */ + create(): Promise; + /** + * Get token status. + * @param {string} givenToken Invoice token + */ + confirm(givenToken?: string): Promise; + get asObject(): { + token: string | undefined; + url: string | undefined; + status: string | undefined; + responseText: string | undefined; + customer: any; + receiptURL: string | undefined; + receipt_identifier: string | undefined; + provider_reference: string | undefined; + customData: Record; + totalAmount: number; + }; +} diff --git a/dist/invoices/checkout.js b/dist/invoices/checkout.js new file mode 100644 index 0000000..f1be201 --- /dev/null +++ b/dist/invoices/checkout.js @@ -0,0 +1,84 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const invoice_1 = require("./invoice"); +const errors_1 = require("../errors"); +const constants_1 = require("../constants"); +class CheckoutInvoice extends invoice_1.Invoice { + token; + url; + status; + responseText; + customer; + receiptURL; + receipt_identifier; + provider_reference; + constructor(client) { + super(client); + } + /** + * Create invoice + */ + async create() { + const requestBody = this.asRequestBody(); + return this.transport.axios + .post(constants_1.ApiRoutes.CREATE_INVOICE, requestBody) + .then((res) => { + if (res.data.response_code === constants_1.ResponseCode.success) { + this.token = res.data.token; + this.url = res.data.response_text; + return this.confirm(this.token); + } + else { + const e = new errors_1.ResponseError("Failed to create invoice.", res.data); + throw e; + } + }); + } + /** + * Get token status. + * @param {string} givenToken Invoice token + */ + async confirm(givenToken) { + const token = givenToken ? givenToken : this.token; + this.transport.axios + .get(`${constants_1.ApiRoutes.CONFIRM_INVOICE}${token}`) + .then((res) => { + const body = res.data; + if (body.response_code === constants_1.ResponseCode.success) { + this.status = body.status; + this.responseText = body.response_text; + if (this.status === constants_1.Status.COMPLETED) { + this.customer = body.customer; + this.receiptURL = body.receipt_url; + this.receipt_identifier = body.receipt_identifier; + this.provider_reference = body.provider_reference; + if (body.custom_data && Object.keys(body.custom_data).length > 0) { + this.customData = body.custom_data; + } + } + this.totalAmount = body.invoice.total_amount; + return this.asObject; + } + else { + const e = new errors_1.ResponseError("Could not confirm invoice status.", res.data); + throw e; + } + }); + } + get asObject() { + return { + token: this.token, + url: this.url, + status: this.status, + responseText: this.responseText, + customer: this.customer, + receiptURL: this.receiptURL, + receipt_identifier: this.receipt_identifier, + provider_reference: this.provider_reference, + customData: this.customData, + totalAmount: this.totalAmount, + }; + } +} +exports.default = CheckoutInvoice; +//# sourceMappingURL=checkout.js.map \ No newline at end of file diff --git a/dist/invoices/checkout.js.map b/dist/invoices/checkout.js.map new file mode 100644 index 0000000..30b1b3b --- /dev/null +++ b/dist/invoices/checkout.js.map @@ -0,0 +1 @@ +{"version":3,"file":"checkout.js","sourceRoot":"","sources":["../../src/lib/invoices/checkout.ts"],"names":[],"mappings":";;AAAA,uCAAoC;AAEpC,sCAA0C;AAC1C,4CAA+D;AAE/D,MAAqB,eAAgB,SAAQ,iBAAO;IAClD,KAAK,CAAU;IACf,GAAG,CAAU;IACb,MAAM,CAAU;IAChB,YAAY,CAAU;IACtB,QAAQ,CAAO;IACf,UAAU,CAAU;IACpB,kBAAkB,CAAU;IAC5B,kBAAkB,CAAU;IAE5B,YAAY,MAAiB;QAC3B,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM;QACV,MAAM,WAAW,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;QAEzC,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK;aACxB,IAAI,CAAC,qBAAS,CAAC,cAAc,EAAE,WAAW,CAAC;aAC3C,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;YACZ,IAAI,GAAG,CAAC,IAAI,CAAC,aAAa,KAAK,wBAAY,CAAC,OAAO,EAAE,CAAC;gBACpD,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;gBAC5B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC;gBAClC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAClC,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,GAAG,IAAI,sBAAa,CAAC,2BAA2B,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;gBACnE,MAAM,CAAC,CAAC;YACV,CAAC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,OAAO,CAAC,UAAmB;QAC/B,MAAM,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;QACnD,IAAI,CAAC,SAAS,CAAC,KAAK;aACjB,GAAG,CAAC,GAAG,qBAAS,CAAC,eAAe,GAAG,KAAK,EAAE,CAAC;aAC3C,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;YACZ,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;YACtB,IAAI,IAAI,CAAC,aAAa,KAAK,wBAAY,CAAC,OAAO,EAAE,CAAC;gBAChD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;gBAC1B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC;gBACvC,IAAI,IAAI,CAAC,MAAM,KAAK,kBAAM,CAAC,SAAS,EAAE,CAAC;oBACrC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;oBAC9B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC;oBACnC,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,CAAC;oBAClD,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,CAAC;oBAClD,IAAI,IAAI,CAAC,WAAW,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;wBACjE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC;oBACrC,CAAC;gBACH,CAAC;gBACD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC;gBAC7C,OAAO,IAAI,CAAC,QAAQ,CAAC;YACvB,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,GAAG,IAAI,sBAAa,CACzB,mCAAmC,EACnC,GAAG,CAAC,IAAI,CACT,CAAC;gBACF,MAAM,CAAC,CAAC;YACV,CAAC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;IAED,IAAI,QAAQ;QACV,OAAO;YACL,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;YAC3C,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;YAC3C,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAC;IACJ,CAAC;CACF;AAlFD,kCAkFC"} \ No newline at end of file diff --git a/dist/invoices/invoice.d.ts b/dist/invoices/invoice.d.ts new file mode 100644 index 0000000..70014d7 --- /dev/null +++ b/dist/invoices/invoice.d.ts @@ -0,0 +1,82 @@ +import { Transport } from "../transport"; +import { PaymentChannel } from "../constants"; +interface InvoiceItem { + name: string; + quantity: number; + unit_price: number; + total_price: number; + description?: string; +} +interface InvoiceTax { + name: string; + amount: number; +} +interface InvoiceData { + total_amount: number; + channels: PaymentChannel[]; + items: Record; + description: string; + taxes: Record; + custom_data: Record; +} +/** + * Invoice class + * @param {object} setup Instance of paydunya.Setup + * @param {object} store Instance of paydunya.Store + */ +export declare class Invoice { + transport: Transport; + returnURL?: string; + cancelURL?: string; + callbackURL?: string; + description: string; + items: Record; + customData: Record; + taxes: Record; + channels: PaymentChannel[]; + totalAmount: number; + constructor(transport: Transport); + get store(): import("../store").Store | undefined; + /** + * Add an item to invoice + * @param {string} name + * @param {number} quantity + * @param {number} unitPrice + * @param {number} totalPrice + * @param {string} description + */ + addItem(name: string, quantity?: number, unitPrice?: number, totalPrice?: number, description?: string): this; + /** + * Add a tax + * @param {string} name + * @param {number} amount + */ + addTax(name: string, amount: number): this; + /** + * Add a payment channel + * @param {string} channel + */ + addChannel(channel: PaymentChannel): this; + /** + * Add many payment channels at once + * @param {array} channels + */ + addChannels(channels?: PaymentChannel[]): this; + /** + * Add custom data key, value pairs to request + * @param {string} title key + * @param {string} value + */ + addCustomData(title: string, value: string): this; + /** + * Generate the request body + * @return {object} + */ + asRequestBody(): { + invoice: InvoiceData; + actions: any; + custom_data: Record | undefined; + store: Record | undefined; + }; +} +export {}; diff --git a/dist/invoices/invoice.js b/dist/invoices/invoice.js new file mode 100644 index 0000000..683b457 --- /dev/null +++ b/dist/invoices/invoice.js @@ -0,0 +1,136 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Invoice = void 0; +/** + * Invoice class + * @param {object} setup Instance of paydunya.Setup + * @param {object} store Instance of paydunya.Store + */ +class Invoice { + transport; + returnURL; + cancelURL; + callbackURL; + description; + items; + customData; + taxes; + channels; + totalAmount; + constructor(transport) { + this.transport = transport; + if (transport.store?.return_url) + this.returnURL = transport.store.return_url; + if (transport.store?.cancel_url) + this.cancelURL = transport.store.cancel_url; + if (transport.store?.callback_url) + this.callbackURL = transport.store.callback_url; + this.description = ""; + this.items = {}; + this.customData = {}; + this.taxes = {}; + this.channels = []; + this.totalAmount = 0; + } + get store() { + return this.transport.store; + } + /** + * Add an item to invoice + * @param {string} name + * @param {number} quantity + * @param {number} unitPrice + * @param {number} totalPrice + * @param {string} description + */ + addItem(name, quantity, unitPrice, totalPrice, description) { + const position = Object.keys(this.items).length + 1; + this.items["item_" + position] = { + name: name, + quantity: quantity || 0, + unit_price: unitPrice || 0, + total_price: totalPrice || 0, + }; + if (description) + this.items["item_" + position].description = description; + return this; + } + /** + * Add a tax + * @param {string} name + * @param {number} amount + */ + addTax(name, amount) { + const position = Object.keys(this.taxes).length + 1; + this.taxes["tax_" + position] = { + name: name, + amount: Number(amount), + }; + return this; + } + /** + * Add a payment channel + * @param {string} channel + */ + addChannel(channel) { + this.channels.push(channel); + return this; + } + /** + * Add many payment channels at once + * @param {array} channels + */ + addChannels(channels = []) { + for (let i = 0; i < channels.length; i++) { + this.channels.push(channels[i]); + } + return this; + } + /** + * Add custom data key, value pairs to request + * @param {string} title key + * @param {string} value + */ + addCustomData(title, value) { + this.customData[title] = value; + return this; + } + /** + * Generate the request body + * @return {object} + */ + asRequestBody() { + if (this.totalAmount <= 0) + throw new Error("Invalid parameters. Initialize Invoice with valid instances of Setup and Store. Total amount must also be set.\neg: var invoice = new Invoice; invoice.init(setup, store); invoice.setTotalAmount(40)"); + const body = { + invoice: { + total_amount: this.totalAmount, + }, + actions: undefined, + custom_data: undefined, + store: this.store?.asObject, + }; + if (this.description) + body.invoice.description = this.description; + if (Object.keys(this.channels).length > 0) + body.invoice.channels = this.channels; + if (Object.keys(this.items).length > 0) + body.invoice.items = this.items; + if (this.returnURL || this.cancelURL || this.callbackURL) { + body.actions = {}; + if (this.returnURL) + body.actions.return_url = this.returnURL; + if (this.cancelURL) + body.actions.cancel_url = this.cancelURL; + if (this.callbackURL) + body.actions.callback_url = this.callbackURL; + } + if (Object.keys(this.taxes).length > 0) + body.invoice.taxes = this.taxes; + if (Object.keys(this.customData).length > 0) + body.custom_data = this.customData; + return body; + } +} +exports.Invoice = Invoice; +//# sourceMappingURL=invoice.js.map \ No newline at end of file diff --git a/dist/invoices/invoice.js.map b/dist/invoices/invoice.js.map new file mode 100644 index 0000000..95de1aa --- /dev/null +++ b/dist/invoices/invoice.js.map @@ -0,0 +1 @@ +{"version":3,"file":"invoice.js","sourceRoot":"","sources":["../../src/lib/invoices/invoice.ts"],"names":[],"mappings":";;;AAyBA;;;;GAIG;AACH,MAAa,OAAO;IAClB,SAAS,CAAY;IACrB,SAAS,CAAU;IACnB,SAAS,CAAU;IACnB,WAAW,CAAU;IAErB,WAAW,CAAS;IACpB,KAAK,CAA8B;IACnC,UAAU,CAAsB;IAChC,KAAK,CAA6B;IAClC,QAAQ,CAAmB;IAC3B,WAAW,CAAS;IAEpB,YAAY,SAAoB;QAC9B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAE3B,IAAI,SAAS,CAAC,KAAK,EAAE,UAAU;YAAE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC,KAAM,CAAC,UAAU,CAAC;QAC9E,IAAI,SAAS,CAAC,KAAK,EAAE,UAAU;YAAE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC,KAAM,CAAC,UAAU,CAAC;QAC9E,IAAI,SAAS,CAAC,KAAK,EAAE,YAAY;YAC/B,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC,KAAM,CAAC,YAAY,CAAC;QAEnD,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC;IACvB,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;IAC9B,CAAC;IAED;;;;;;;OAOG;IACH,OAAO,CACL,IAAY,EACZ,QAAiB,EACjB,SAAkB,EAClB,UAAmB,EACnB,WAAoB;QAEpB,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;QACpD,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,QAAQ,CAAC,GAAG;YAC/B,IAAI,EAAE,IAAI;YACV,QAAQ,EAAE,QAAQ,IAAI,CAAC;YACvB,UAAU,EAAE,SAAS,IAAI,CAAC;YAC1B,WAAW,EAAE,UAAU,IAAI,CAAC;SAC7B,CAAC;QACF,IAAI,WAAW;YAAE,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,QAAQ,CAAE,CAAC,WAAW,GAAG,WAAW,CAAC;QAE3E,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,IAAY,EAAE,MAAc;QACjC,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;QACpD,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,QAAQ,CAAC,GAAG;YAC9B,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;SACvB,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;OAGG;IACH,UAAU,CAAC,OAAuB;QAChC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;OAGG;IACH,WAAW,CAAC,WAA6B,EAAE;QACzC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACzC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAE,CAAC,CAAC;QACnC,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,aAAa,CAAC,KAAa,EAAE,KAAa;QACxC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;QAC/B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;OAGG;IACH,aAAa;QACX,IAAI,IAAI,CAAC,WAAW,IAAI,CAAC;YACvB,MAAM,IAAI,KAAK,CACb,uMAAuM,CACxM,CAAC;QAEJ,MAAM,IAAI,GAAG;YACX,OAAO,EAAE;gBACP,YAAY,EAAE,IAAI,CAAC,WAAW;aAChB;YAChB,OAAO,EAAE,SAAgB;YACzB,WAAW,EAAE,SAA4C;YACzD,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ;SAC5B,CAAC;QAEF,IAAI,IAAI,CAAC,WAAW;YAAE,IAAI,CAAC,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QAClE,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,GAAG,CAAC;YACvC,IAAI,CAAC,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QACxC,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC;YAAE,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACxE,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACzD,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;YAClB,IAAI,IAAI,CAAC,SAAS;gBAAE,IAAI,CAAC,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC;YAC7D,IAAI,IAAI,CAAC,SAAS;gBAAE,IAAI,CAAC,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC;YAC7D,IAAI,IAAI,CAAC,WAAW;gBAAE,IAAI,CAAC,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC;QACrE,CAAC;QACD,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC;YAAE,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACxE,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,CAAC;YACzC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC;QAErC,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA5ID,0BA4IC"} \ No newline at end of file diff --git a/dist/invoices/onsite.d.ts b/dist/invoices/onsite.d.ts new file mode 100644 index 0000000..0219b02 --- /dev/null +++ b/dist/invoices/onsite.d.ts @@ -0,0 +1,31 @@ +import { Transport } from "../transport"; +import { Invoice } from "./invoice"; +export declare class OnsiteInvoice extends Invoice { + token?: string; + oprToken?: string; + responseText?: string; + status?: string; + receiptURL?: string; + customer?: any; + constructor(transport: Transport); + /** + * + * @param customer The account alias, username or phone number + */ + create(customer: string): Promise<{ + token: any; + oprToken: any; + responseText: any; + }>; + /** + * Charge paydunya account + * @param oprToken The OPR token of the invoice to confirm + * * @param confirmToken Confirmation token sent to PAYDUNYA user + */ + charge(oprToken: string, confirmToken: string): Promise<{ + responseText: any; + status: any; + receiptURL: any; + customer: any; + }>; +} diff --git a/dist/invoices/onsite.js b/dist/invoices/onsite.js new file mode 100644 index 0000000..6a6009c --- /dev/null +++ b/dist/invoices/onsite.js @@ -0,0 +1,73 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OnsiteInvoice = void 0; +const constants_1 = require("../constants"); +const errors_1 = require("../errors"); +const invoice_1 = require("./invoice"); +class OnsiteInvoice extends invoice_1.Invoice { + token; + oprToken; + responseText; + status; + receiptURL; + customer; + constructor(transport) { + super(transport); + } + /** + * + * @param customer The account alias, username or phone number + */ + async create(customer) { + let body = { + invoice_data: this.asRequestBody(), + opr_data: { + account_alias: customer, + }, + }; + return this.transport.axios + .post(constants_1.ApiRoutes.CREATE_ONSITEINVOCE, body) + .then((response) => { + if (response.data?.response_code === constants_1.ResponseCode.success) { + return { + token: response.data.invoice_token, + oprToken: response.data.token, + responseText: response.data.description, + }; + } + else { + let error = new errors_1.ResponseError("Failed to create invoice", response.data); + throw error; + } + }); + } + /** + * Charge paydunya account + * @param oprToken The OPR token of the invoice to confirm + * * @param confirmToken Confirmation token sent to PAYDUNYA user + */ + async charge(oprToken, confirmToken) { + let body = { + token: oprToken, + confirm_token: confirmToken, + }; + return this.transport.axios + .post(constants_1.ApiRoutes.CHARGE_ONSITEINVOCE, body) + .then((response) => { + if (response.data?.response_code === constants_1.ResponseCode.success) { + return { + responseText: response.data.response_text, + status: response.data.invoice_data.status, + receiptURL: response.data.invoice_data.receipt_url, + customer: response.data.invoice_data.customer, + }; + } + else { + let error = new errors_1.ResponseError("Failed to charge invoice. Check OPR/confirm token and try again.", response.data); + throw error; + } + }); + } +} +exports.OnsiteInvoice = OnsiteInvoice; +//# sourceMappingURL=onsite.js.map \ No newline at end of file diff --git a/dist/invoices/onsite.js.map b/dist/invoices/onsite.js.map new file mode 100644 index 0000000..3d0c5b3 --- /dev/null +++ b/dist/invoices/onsite.js.map @@ -0,0 +1 @@ +{"version":3,"file":"onsite.js","sourceRoot":"","sources":["../../src/lib/invoices/onsite.ts"],"names":[],"mappings":";;;AACA,4CAAuD;AACvD,sCAA0C;AAC1C,uCAAoC;AAEpC,MAAa,aAAc,SAAQ,iBAAO;IACxC,KAAK,CAAU;IACf,QAAQ,CAAU;IAClB,YAAY,CAAU;IACtB,MAAM,CAAU;IAChB,UAAU,CAAU;IACpB,QAAQ,CAAO;IAEf,YAAY,SAAoB;QAC9B,KAAK,CAAC,SAAS,CAAC,CAAC;IACnB,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,MAAM,CAAC,QAAgB;QAC3B,IAAI,IAAI,GAAG;YACT,YAAY,EAAE,IAAI,CAAC,aAAa,EAAE;YAClC,QAAQ,EAAE;gBACR,aAAa,EAAE,QAAQ;aACxB;SACF,CAAC;QACF,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK;aACxB,IAAI,CAAC,qBAAS,CAAC,mBAAmB,EAAE,IAAI,CAAC;aACzC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;YACjB,IAAI,QAAQ,CAAC,IAAI,EAAE,aAAa,KAAK,wBAAY,CAAC,OAAO,EAAE,CAAC;gBAC1D,OAAO;oBACL,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,aAAa;oBAClC,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK;oBAC7B,YAAY,EAAE,QAAQ,CAAC,IAAI,CAAC,WAAW;iBACxC,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,IAAI,KAAK,GAAG,IAAI,sBAAa,CAC3B,0BAA0B,EAC1B,QAAQ,CAAC,IAAI,CACd,CAAC;gBACF,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,YAAoB;QACjD,IAAI,IAAI,GAAG;YACT,KAAK,EAAE,QAAQ;YACf,aAAa,EAAE,YAAY;SAC5B,CAAC;QAEF,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK;aACxB,IAAI,CAAC,qBAAS,CAAC,mBAAmB,EAAE,IAAI,CAAC;aACzC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;YACjB,IAAI,QAAQ,CAAC,IAAI,EAAE,aAAa,KAAK,wBAAY,CAAC,OAAO,EAAE,CAAC;gBAC1D,OAAO;oBACL,YAAY,EAAE,QAAQ,CAAC,IAAI,CAAC,aAAa;oBACzC,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM;oBACzC,UAAU,EAAE,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,WAAW;oBAClD,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ;iBAC9C,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,IAAI,KAAK,GAAG,IAAI,sBAAa,CAC3B,kEAAkE,EAClE,QAAQ,CAAC,IAAI,CACd,CAAC;gBACF,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;CACF;AAxED,sCAwEC"} \ No newline at end of file diff --git a/dist/paydunya-node.min.js b/dist/paydunya-node.min.js deleted file mode 100644 index 042dde9..0000000 --- a/dist/paydunya-node.min.js +++ /dev/null @@ -1,47 +0,0 @@ -(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o0&&(t.customData=c.custom_data)),t.totalAmount=c.invoice.total_amount,e();else{var i=new Error("Could not confirm invoice status.");i.data=c,r(i)}})})},module.exports=CheckoutInvoice; - -},{"./invoice":4,"bluebird":6,"superagent":10}],2:[function(require,module,exports){ -function DirectPay(e){if(!e||!e.config)throw new Error("Must be initialized with instance of paydunya.Setup");this.config=e.config,this.baseURL=e.baseURL+"/direct-pay"}var request=require("superagent"),Promise=require("bluebird"),util=require("util");DirectPay.prototype.creditAccount=function(e,t){var r=this,i={account_alias:e,amount:Number(t)};return new Promise(function(n,o){request.post(r.baseURL+"/credit-account").set(r.config).send(i).end(function(i,a){if(i)return o(i);if("00"===a.body.response_code)r.responseText=a.body.response_text,r.description=a.body.description,r.transactionID=a.body.transaction_id,n();else{var c=new Error(new Error(util.format("Failed to credit account. Please ensure %s and %s are valid OR check your account balance.",e,t)));c.data=a.body,o(c)}})})},module.exports=DirectPay; - -},{"bluebird":6,"superagent":10,"util":13}],3:[function(require,module,exports){ -(function (process){ -function Setup(e){this.config={},this.config["PAYDUNYA-MASTER-KEY"]=e&&e.masterKey||process.env.PAYDUNYA_MASTER_KEY,this.config["PAYDUNYA-PRIVATE-KEY"]=e&&e.privateKey||process.env.PAYDUNYA_PRIVATE_KEY,this.config["PAYDUNYA-TOKEN"]=e&&e.token||process.env.PAYDUNYA_TOKEN,this.config["Content-Type"]="application/json",e&&e.mode&&"test"===e.mode.toLowerCase()?this.baseURL="https://app.paydunya.com/sandbox-api/v1":this.baseURL="https://app.paydunya.com/api/v1"}function Store(e){if(!e||!e.name)throw new Error("Invalid parameters.");this.name=e.name,e.tagline&&(this.tagline=e.tagline),e.phoneNumber&&(this.phone_number=e.phoneNumber),e.postalAddress&&(this.postal_address=e.postalAddress),e.logoURL&&(this.logo_url=e.logoURL),e.websiteURL&&(this.website_url=e.websiteURL),e.cancelURL&&(this.cancel_url=e.cancelURL),e.returnURL&&(this.return_url=e.returnURL),e.callbackURL&&(this.callback_url=e.callbackURL)}exports.Setup=exports.setup=Setup,exports.Store=exports.store=Store,exports.CheckoutInvoice=exports.checkoutInvoice=require("./checkout-invoice"),exports.OnsiteInvoice=exports.onsiteInvoice=require("./onsite-invoice"),exports.DirectPay=exports.directPay=require("./direct-pay"); -}).call(this,require('_process')) -},{"./checkout-invoice":1,"./direct-pay":2,"./onsite-invoice":5,"_process":8}],4:[function(require,module,exports){ -function Invoice(t,e){if(!(t&&e&&t.config["PAYDUNYA-MASTER-KEY"]&&t.config["PAYDUNYA-PRIVATE-KEY"]&&t.config["PAYDUNYA-TOKEN"]&&e.name))throw new Error("Invalid parameters;");this.baseURL=t.baseURL,this.config=t.config,e.return_url&&(this.returnURL=e.return_url),e.cancel_url&&(this.cancelURL=e.cancel_url),e.callback_url&&(this.callbackURL=e.callback_url),this.store=e,this.description="",this.items={},this.customData={},this.taxes={},this.channels=[],this.totalAmount=0}Invoice.prototype.addItem=function(t,e,i,n,s){if(!t)throw new Error("Invalid parameters; name is required.");var a=Object.keys(this.items).length+1;this.items["item_"+a]={name:t,quantity:e||0,unit_price:i||0,total_price:n||0},s&&(this.items["item_"+a].description=s)},Invoice.prototype.addTax=function(t,e){if(!t||"string"!=typeof t||"number"!=typeof Number(e))throw new Error("Invalid parameters.");var i=Object.keys(this.taxes).length+1;this.taxes["tax_"+i]={name:t,amount:Number(e)}},Invoice.prototype.addChannel=function(t){if(!t||"string"!=typeof t)throw new Error("Invalid parameters.");this.channels.push(t)},Invoice.prototype.addChannels=function(t){if(!(t&&t instanceof Array))throw new Error("Invalid parameters.");this.channels=[];for(var e=0;e0))throw new Error("Invalid parameters. Initialize Invoice with valid instances of Setup and Store. Total amount must also be set.\neg: var invoice = new Invoice; invoice.init(setup, store); invoice.setTotalAmount(40)");var t={invoice:{total_amount:this.totalAmount},store:this.store};return this.description&&(t.invoice.description=this.description),Object.keys(this.channels).length>0&&(t.invoice.channels=this.channels),Object.keys(this.items).length>0&&(t.invoice.items=this.items),(this.returnURL||this.cancelURL||this.callbackURL)&&(t.actions={},this.returnURL&&(t.actions.return_url=this.returnURL),this.cancelURL&&(t.actions.cancel_url=this.cancelURL),this.callbackURL&&(t.actions.callback_url=this.callbackURL)),Object.keys(this.taxes).length>0&&(t.invoice.taxes=this.taxes),Object.keys(this.customData).length>0&&(t.custom_data=this.customData),t},module.exports=Invoice; - -},{}],5:[function(require,module,exports){ -function OnsiteInvoice(e,o){Invoice.call(this,e,o),this.baseURL=this.baseURL+"/opr"}var Invoice=require("./invoice"),request=require("superagent"),Promise=require("bluebird");OnsiteInvoice.prototype=Object.create(Invoice.prototype),OnsiteInvoice.prototype.constructor=OnsiteInvoice,OnsiteInvoice.prototype.create=function(e){var o=this,t={invoice_data:o.generateRequestBody(),opr_data:{account_alias:String(e)}};return new Promise(function(e,n){request.post(o.baseURL+"/create").set(o.config).send(t).end(function(t,i){if(t)return n(t);if("00"===i.body.response_code)o.token=i.body.invoice_token,o.oprToken=i.body.token,o.responseText=i.body.description,e();else{var r=new Error("Failed to create invoice");r.data=i.body,n(r)}})})},OnsiteInvoice.prototype.charge=function(e,o){var t=this,n={token:e+"",confirm_token:o+""};return new Promise(function(e,o){request.post(t.baseURL+"/charge").set(t.config).send(n).end(function(n,i){if(n)return o(n);if("00"===i.body.response_code)t.responseText=i.body.response_text,t.status=i.body.invoice_data.status,t.receiptURL=i.body.invoice_data.receipt_url,t.customer=i.body.invoice_data.customer,e();else{var r=new Error("Failed to charge invoice. Check OPR/confirm token and try again.");r.data=i.body,o(r)}})})},module.exports=OnsiteInvoice; - -},{"./invoice":4,"bluebird":6,"superagent":10}],6:[function(require,module,exports){ -(function (process,global){ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Promise=t()}}(function(){var t,e,r;return function t(e,r,n){function i(s,a){if(!r[s]){if(!e[s]){var u="function"==typeof _dereq_&&_dereq_;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[s]={exports:{}};e[s][0].call(l.exports,function(t){var r=e[s][1][t];return i(r||t)},l,l.exports,t,e,r,n)}return r[s].exports}for(var o="function"==typeof _dereq_&&_dereq_,s=0;s0},n.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(t){throw new Error("No async scheduler available\n\n See http://goo.gl/m3OTXk\n")}},l.hasDevTools?(u.isStatic&&(u=function(t){setTimeout(t,0)}),n.prototype.invokeLater=function(t,e,r){this._trampolineEnabled?i.call(this,t,e,r):this._schedule(function(){setTimeout(function(){t.call(e,r)},100)})},n.prototype.invoke=function(t,e,r){this._trampolineEnabled?o.call(this,t,e,r):this._schedule(function(){t.call(e,r)})},n.prototype.settlePromises=function(t){this._trampolineEnabled?s.call(this,t):this._schedule(function(){t._settlePromises()})}):(n.prototype.invokeLater=i,n.prototype.invoke=o,n.prototype.settlePromises=s),n.prototype.invokeFirst=function(t,e,r){this._normalQueue.unshift(t,e,r),this._queueTick()},n.prototype._drainQueue=function(t){for(;t.length()>0;){var e=t.shift();if("function"==typeof e){var r=t.shift(),n=t.shift();e.call(r,n)}else e._settlePromises()}},n.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._drainQueue(this._lateQueue)},n.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},n.prototype._reset=function(){this._isTickUsed=!1},e.exports=new n,e.exports.firstLineError=a},{"./queue.js":28,"./schedule.js":31,"./util.js":38}],3:[function(t,e,r){"use strict";e.exports=function(t,e,r){var n=function(t,e){this._reject(e)},i=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(n,n,null,this,t)},o=function(t,e){this._isPending()&&this._resolveCallback(e.target)},s=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(n){var a=r(n),u=new t(e);u._propagateFrom(this,1);var c=this._target();if(u._setBoundTo(a),a instanceof t){var l={promiseRejectionQueued:!1,promise:u,target:c,bindingPromise:a};c._then(e,i,u._progress,u,l),a._then(o,s,u._progress,u,l)}else u._resolveCallback(c);return u},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=131072|this._bitField,this._boundTo=t):this._bitField=-131073&this._bitField},t.prototype._isBound=function(){return 131072==(131072&this._bitField)},t.bind=function(n,i){var o=r(n),s=new t(e);return s._setBoundTo(o),o instanceof t?o._then(function(){s._resolveCallback(i)},s._reject,s._progress,s,null):s._resolveCallback(i),s}}},{}],4:[function(t,e,r){"use strict";function n(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=t("./promise.js")();o.noConflict=n,e.exports=o},{"./promise.js":23}],5:[function(t,e,r){"use strict";var n=Object.create;if(n){var i=n(null),o=n(null);i[" size"]=o[" size"]=0}e.exports=function(e){function r(t,r){var n;if(null!=t&&(n=t[r]),"function"!=typeof n){var i="Object "+a.classString(t)+" has no method '"+a.toString(r)+"'";throw new e.TypeError(i)}return n}function n(t){return r(t,this.pop()).apply(t,this)}function i(t){return t[this]}function o(t){var e=+this;return e<0&&(e=Math.max(0,e+t.length)),t[e]}var s,a=t("./util.js"),u=a.canEvaluate;a.isIdentifier;e.prototype.call=function(t){for(var e=arguments.length,r=new Array(e-1),i=1;i32&&this.uncycle()}function r(t,e){for(var r=0;r=0;--a)if(n[a]===o){s=a;break}for(var a=s;a>=0;--a){var u=n[a];if(e[i]!==u)break;e.pop(),i--}e=n}}function o(t){for(var e=[],r=0;r0&&(e=e.slice(r)),e}function a(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t.toString();if(/\[object [a-zA-Z0-9$_]+\]/.test(e))try{e=JSON.stringify(t)}catch(t){}0===e.length&&(e="(empty array)")}return"(<"+u(e)+">, no stack trace)"}function u(t){return t.length<41?t:t.substr(0,38)+"..."}function c(t){var e=t.match(g);if(e)return{fileName:e[1],line:parseInt(e[2],10)}}var l,h=t("./async.js"),p=t("./util.js"),f=/[\\\/]bluebird[\\\/]js[\\\/](main|debug|zalgo|instrumented)/,_=null,d=null,v=!1;p.inherits(e,Error),e.prototype.uncycle=function(){var t=this._length;if(!(t<2)){for(var e=[],r={},n=0,i=this;void 0!==i;++n)e.push(i),i=i._parent;t=this._length=n;for(var n=t-1;n>=0;--n){var o=e[n].stack;void 0===r[o]&&(r[o]=n)}for(var n=0;n0&&(e[a-1]._parent=void 0,e[a-1]._length=1),e[n]._parent=void 0,e[n]._length=1;var u=n>0?e[n-1]:this;a=0;--l)e[l]._length=c,c++;return}}}},e.prototype.parent=function(){return this._parent},e.prototype.hasParent=function(){return void 0!==this._parent},e.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var s=e.parseStackAndMessage(t),a=s.message,u=[s.stack],c=this;void 0!==c;)u.push(o(c.stack.split("\n"))),c=c._parent;i(u),n(u),p.notEnumerableProp(t,"stack",r(a,u)),p.notEnumerableProp(t,"__stackCleaned__",!0)}},e.parseStackAndMessage=function(t){var e=t.stack,r=t.toString();return e="string"==typeof e&&e.length>0?s(t):[" (No stack trace)"],{message:r,stack:o(e)}},e.formatAndLogError=function(t,e){if("undefined"!=typeof console){var r;if("object"==typeof t||"function"==typeof t){var n=t.stack;r=e+d(n,t)}else r=e+String(t);"function"==typeof l?l(r):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(r)}},e.unhandledRejection=function(t){e.formatAndLogError(t,"^--- With additional stack trace: ")},e.isSupported=function(){return"function"==typeof j},e.fireRejectionEvent=function(t,r,n,i){var o=!1;try{"function"==typeof r&&(o=!0,"rejectionHandled"===t?r(i):r(n,i))}catch(t){h.throwLater(t)}var s=!1;try{s=b(t,n,i)}catch(t){s=!0,h.throwLater(t)}var a=!1;if(m)try{a=m(t.toLowerCase(),{reason:n,promise:i})}catch(t){a=!0,h.throwLater(t)}s||o||a||"unhandledRejection"!==t||e.formatAndLogError(n,"Unhandled rejection ")};var y=function(){return!1},g=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;e.setBounds=function(t,r){if(e.isSupported()){for(var n,i,o=t.stack.split("\n"),s=r.stack.split("\n"),a=-1,u=-1,l=0;l=u||(y=function(t){if(f.test(t))return!0;var e=c(t);return!!(e&&e.fileName===n&&a<=e.line&&e.line<=u)})}};var m,j=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():a(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit=Error.stackTraceLimit+6,_=t,d=e;var r=Error.captureStackTrace;return y=function(t){return f.test(t)},function(t,e){Error.stackTraceLimit=Error.stackTraceLimit+6,r(t,e),Error.stackTraceLimit=Error.stackTraceLimit-6}}var n=new Error;if("string"==typeof n.stack&&n.stack.split("\n")[0].indexOf("stackDetection@")>=0)return _=/@/,d=e,v=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(t){i="stack"in t}return"stack"in n||!i||"number"!=typeof Error.stackTraceLimit?(d=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?a(e):e.toString()},null):(_=t,d=e,function(t){Error.stackTraceLimit=Error.stackTraceLimit+6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit=Error.stackTraceLimit-6})}(),b=function(){if(p.isNode)return function(t,e,r){return"rejectionHandled"===t?process.emit(t,r):process.emit(t,e,r)};var t=!1,e=!0;try{var r=new self.CustomEvent("test");t=r instanceof CustomEvent}catch(t){}if(!t)try{var n=document.createEvent("CustomEvent");n.initCustomEvent("testingtheevent",!1,!0,{}),self.dispatchEvent(n)}catch(t){e=!1}e&&(m=function(e,r){var n;return t?n=new self.CustomEvent(e,{detail:r,bubbles:!1,cancelable:!0}):self.dispatchEvent&&(n=document.createEvent("CustomEvent"),n.initCustomEvent(e,!1,!0,r)),!!n&&!self.dispatchEvent(n)});var i={};return i.unhandledRejection="onunhandledRejection".toLowerCase(),i.rejectionHandled="onrejectionHandled".toLowerCase(),function(t,e,r){var n=i[t],o=self[n];return!!o&&("rejectionHandled"===t?o.call(self,r):o.call(self,e,r),!0)}}();return"undefined"!=typeof console&&void 0!==console.warn&&(l=function(t){console.warn(t)},p.isNode&&process.stderr.isTTY?l=function(t){process.stderr.write(""+t+"\n")}:p.isNode||"string"!=typeof(new Error).stack||(l=function(t){console.warn("%c"+t,"color: red")})),e}},{"./async.js":2,"./util.js":38}],8:[function(t,e,r){"use strict";e.exports=function(e){function r(t,e,r){this._instances=t,this._callback=e,this._promise=r}function n(t,e){var r={},n=s(t).call(r,e);return n===a?n:u(r).length?(a.e=new c("Catch filter must inherit from Error or be a simple predicate function\n\n See http://goo.gl/o84o68\n"),a):n}var i=t("./util.js"),o=t("./errors.js"),s=i.tryCatch,a=i.errorObj,u=t("./es5.js").keys,c=o.TypeError;return r.prototype.doFilter=function(t){for(var r=this._callback,i=this._promise,o=i._boundValue(),u=0,c=this._instances.length;u=0)return s[t]}var s=[];return n.prototype._pushContext=function(){r()&&void 0!==this._trace&&s.push(this._trace)},n.prototype._popContext=function(){r()&&void 0!==this._trace&&s.pop()},t.prototype._peekContext=o,t.prototype._pushContext=n.prototype._pushContext,t.prototype._popContext=n.prototype._popContext,i}},{}],10:[function(t,e,r){"use strict";e.exports=function(e,r){var n,i,o=e._getDomain,s=t("./async.js"),a=t("./errors.js").Warning,u=t("./util.js"),c=u.canAttachTrace,l=u.isNode&&(!!process.env.BLUEBIRD_DEBUG||"development"===process.env.NODE_ENV);return u.isNode&&0==process.env.BLUEBIRD_DEBUG&&(l=!1),l&&s.disableTrampolineIfNecessary(),e.prototype._ignoreRejections=function(){this._unsetRejectionIsUnhandled(),this._bitField=16777216|this._bitField},e.prototype._ensurePossibleRejectionHandled=function(){0==(16777216&this._bitField)&&(this._setRejectionIsUnhandled(),s.invokeLater(this._notifyUnhandledRejection,this,void 0))},e.prototype._notifyUnhandledRejectionIsHandled=function(){r.fireRejectionEvent("rejectionHandled",n,void 0,this)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._getCarriedStackTrace()||this._settledValue;this._setUnhandledRejectionIsNotified(),r.fireRejectionEvent("unhandledRejection",i,t,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=524288|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-524289&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(524288&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=2097152|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-2097153&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(2097152&this._bitField)>0},e.prototype._setCarriedStackTrace=function(t){this._bitField=1048576|this._bitField,this._fulfillmentHandler0=t},e.prototype._isCarryingStackTrace=function(){return(1048576&this._bitField)>0},e.prototype._getCarriedStackTrace=function(){return this._isCarryingStackTrace()?this._fulfillmentHandler0:void 0},e.prototype._captureStackTrace=function(){return l&&(this._trace=new r(this._peekContext())),this},e.prototype._attachExtraTrace=function(t,e){if(l&&c(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var i=r.parseStackAndMessage(t);u.notEnumerableProp(t,"stack",i.message+"\n"+i.stack.join("\n")),u.notEnumerableProp(t,"__stackCleaned__",!0)}}},e.prototype._warn=function(t){var e=new a(t),n=this._peekContext();if(n)n.attachExtraTrace(e);else{var i=r.parseStackAndMessage(e);e.stack=i.message+"\n"+i.stack.join("\n")}r.formatAndLogError(e,"")},e.onPossiblyUnhandledRejection=function(t){var e=o();i="function"==typeof t?null===e?t:e.bind(t):void 0},e.onUnhandledRejectionHandled=function(t){var e=o();n="function"==typeof t?null===e?t:e.bind(t):void 0},e.longStackTraces=function(){if(s.haveItemsQueued()&&!1===l)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/DT1qyG\n");(l=r.isSupported())&&s.disableTrampolineIfNecessary()},e.hasLongStackTraces=function(){return l&&r.isSupported()},r.isSupported()||(e.longStackTraces=function(){},l=!1),function(){return l}}},{"./async.js":2,"./errors.js":13,"./util.js":38}],11:[function(t,e,r){"use strict";var n=t("./util.js"),i=n.isPrimitive;e.exports=function(t){var e=function(){return this},r=function(){throw this},n=function(){},o=function(){throw void 0},s=function(t,e){return 1===e?function(){throw t}:2===e?function(){return t}:void 0};t.prototype.return=t.prototype.thenReturn=function(r){return void 0===r?this.then(n):i(r)?this._then(s(r,2),void 0,void 0,void 0,void 0):(r instanceof t&&r._ignoreRejections(),this._then(e,void 0,void 0,r,void 0))},t.prototype.throw=t.prototype.thenThrow=function(t){return void 0===t?this.then(o):i(t)?this._then(s(t,1),void 0,void 0,void 0,void 0):this._then(r,void 0,void 0,t,void 0)}}},{"./util.js":38}],12:[function(t,e,r){"use strict";e.exports=function(t,e){var r=t.reduce;t.prototype.each=function(t){return r(this,t,null,e)},t.each=function(t,n){return r(t,n,null,e)}}},{}],13:[function(t,e,r){"use strict";function n(t,e){function r(n){if(!(this instanceof r))return new r(n);h(this,"message","string"==typeof n?n:e),h(this,"name",t),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return l(r,Error),r}function i(t){if(!(this instanceof i))return new i(t);h(this,"name","OperationalError"),h(this,"message",t),this.cause=t,this.isOperational=!0,t instanceof Error?(h(this,"message",t.message),h(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}var o,s,a=t("./es5.js"),u=a.freeze,c=t("./util.js"),l=c.inherits,h=c.notEnumerableProp,p=n("Warning","warning"),f=n("CancellationError","cancellation error"),_=n("TimeoutError","timeout error"),d=n("AggregateError","aggregate error");try{o=TypeError,s=RangeError}catch(t){o=n("TypeError","type error"),s=n("RangeError","range error")}for(var v="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),y=0;y0&&"function"==typeof arguments[e]){t=arguments[e];var n}for(var i=arguments.length,o=new Array(i),s=0;s=1?[]:d,l.invoke(a,this,void 0)}function a(){this._init$(void 0,-2)}function u(t,e,r,n){var i="object"==typeof r&&null!==r?r.concurrency:0;return i="number"==typeof i&&isFinite(i)&&i>=1?i:0,new s(t,e,i,n)}var c=e._getDomain,l=t("./async.js"),h=t("./util.js"),p=h.tryCatch,f=h.errorObj,_={},d=[];h.inherits(s,r),s.prototype._init=function(){},s.prototype._promiseFulfilled=function(t,r){var n=this._values,o=this.length(),s=this._preservedValues,a=this._limit;if(n[r]===_){if(n[r]=t,a>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return}else{if(a>=1&&this._inFlight>=a)return n[r]=t,void this._queue.push(r);null!==s&&(s[r]=t);var u=this._callback,c=this._promise._boundValue();this._promise._pushContext();var l=p(u).call(c,t,r,o);if(this._promise._popContext(),l===f)return this._reject(l.e);var h=i(l,this._promise);if(h instanceof e){if(h=h._target(),h._isPending())return a>=1&&this._inFlight++,n[r]=_,h._proxyPromiseArray(this,r);if(!h._isFulfilled())return this._reject(h._reason());l=h._value()}n[r]=l}++this._totalResolved>=o&&(null!==s?this._filter(n,s):this._resolve(n))},s.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,r=this._values;t.length>0&&this._inFlight1){var n,i=new Array(e-1),o=0;for(n=0;n0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+u.classString(t);arguments.length>1&&(n+=", "+u.classString(e)),this._warn(n)}return this._then(t,e,r,void 0,void 0)},r.prototype.done=function(t,e,r){this._then(t,e,r,void 0,void 0)._setIsFinal()}, -r.prototype.spread=function(t,e){return this.all()._then(t,e,void 0,_,void 0)},r.prototype.isCancellable=function(){return!this.isResolved()&&this._cancellable()},r.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},r.prototype.all=function(){return new y(this).promise()},r.prototype.error=function(t){return this.caught(u.originatesFromRejection,t)},r.getNewLibraryCopy=e.exports,r.is=function(t){return t instanceof r},r.fromNode=function(t){var e=new r(f),n=F(t)(k(e));return n===E&&e._rejectCallback(n.e,!0,!0),e},r.all=function(t){return new y(t).promise()},r.defer=r.pending=function(){var t=new r(f);return new w(t)},r.cast=function(t){var e=v(t);if(!(e instanceof r)){var n=e;e=new r(f),e._fulfillUnchecked(n)}return e},r.resolve=r.fulfilled=r.cast,r.reject=r.rejected=function(t){var e=new r(f);return e._captureStackTrace(),e._rejectCallback(t,!0),e},r.setScheduler=function(t){if("function"!=typeof t)throw new p("fn must be a function\n\n See http://goo.gl/916lJJ\n");var e=l._schedule;return l._schedule=t,e},r.prototype._then=function(t,e,n,o,s){var a=void 0!==s,u=a?s:new r(f);a||(u._propagateFrom(this,5),u._captureStackTrace());var c=this._target();c!==this&&(void 0===o&&(o=this._boundTo),a||u._setIsMigrated());var h=c._addCallbacks(t,e,n,u,o,i());return c._isResolved()&&!c._isSettlePromisesQueued()&&l.invoke(c._settlePromiseAtPostResolution,c,h),u},r.prototype._settlePromiseAtPostResolution=function(t){this._isRejectionUnhandled()&&this._unsetRejectionIsUnhandled(),this._settlePromiseAt(t)},r.prototype._length=function(){return 131071&this._bitField},r.prototype._isFollowingOrFulfilledOrRejected=function(){return(939524096&this._bitField)>0},r.prototype._isFollowing=function(){return 536870912==(536870912&this._bitField)},r.prototype._setLength=function(t){this._bitField=-131072&this._bitField|131071&t},r.prototype._setFulfilled=function(){this._bitField=268435456|this._bitField},r.prototype._setRejected=function(){this._bitField=134217728|this._bitField},r.prototype._setFollowing=function(){this._bitField=536870912|this._bitField},r.prototype._setIsFinal=function(){this._bitField=33554432|this._bitField},r.prototype._isFinal=function(){return(33554432&this._bitField)>0},r.prototype._cancellable=function(){return(67108864&this._bitField)>0},r.prototype._setCancellable=function(){this._bitField=67108864|this._bitField},r.prototype._unsetCancellable=function(){this._bitField=-67108865&this._bitField},r.prototype._setIsMigrated=function(){this._bitField=4194304|this._bitField},r.prototype._unsetIsMigrated=function(){this._bitField=-4194305&this._bitField},r.prototype._isMigrated=function(){return(4194304&this._bitField)>0},r.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[5*t-5+4];if(e!==c)return void 0===e&&this._isBound()?this._boundValue():e},r.prototype._promiseAt=function(t){return 0===t?this._promise0:this[5*t-5+3]},r.prototype._fulfillmentHandlerAt=function(t){return 0===t?this._fulfillmentHandler0:this[5*t-5+0]},r.prototype._rejectionHandlerAt=function(t){return 0===t?this._rejectionHandler0:this[5*t-5+1]},r.prototype._boundValue=function(){var t=this._boundTo;return void 0!==t&&t instanceof r?t.isFulfilled()?t.value():void 0:t},r.prototype._migrateCallbacks=function(t,e){var n=t._fulfillmentHandlerAt(e),i=t._rejectionHandlerAt(e),o=t._progressHandlerAt(e),s=t._promiseAt(e),a=t._receiverAt(e);s instanceof r&&s._setIsMigrated(),void 0===a&&(a=c),this._addCallbacks(n,i,o,s,a,null)},r.prototype._addCallbacks=function(t,e,r,n,i,o){var s=this._length();if(s>=131066&&(s=0,this._setLength(0)),0===s)this._promise0=n,void 0!==i&&(this._receiver0=i),"function"!=typeof t||this._isCarryingStackTrace()||(this._fulfillmentHandler0=null===o?t:o.bind(t)),"function"==typeof e&&(this._rejectionHandler0=null===o?e:o.bind(e)),"function"==typeof r&&(this._progressHandler0=null===o?r:o.bind(r));else{var a=5*s-5;this[a+3]=n,this[a+4]=i,"function"==typeof t&&(this[a+0]=null===o?t:o.bind(t)),"function"==typeof e&&(this[a+1]=null===o?e:o.bind(e)),"function"==typeof r&&(this[a+2]=null===o?r:o.bind(r))}return this._setLength(s+1),s},r.prototype._setProxyHandlers=function(t,e){var r=this._length();if(r>=131066&&(r=0,this._setLength(0)),0===r)this._promise0=e,this._receiver0=t;else{var n=5*r-5;this[n+3]=e,this[n+4]=t}this._setLength(r+1)},r.prototype._proxyPromiseArray=function(t,e){this._setProxyHandlers(t,e)},r.prototype._resolveCallback=function(t,e){if(!this._isFollowingOrFulfilledOrRejected()){if(t===this)return this._rejectCallback(o(),!1,!0);var n=v(t,this);if(!(n instanceof r))return this._fulfill(t);var i=1|(e?4:0);this._propagateFrom(n,i);var s=n._target();if(s._isPending()){for(var a=this._length(),u=0;u0&&t._cancellable()&&(this._setCancellable(),this._cancellationParent=t),(4&e)>0&&t._isBound()&&this._setBoundTo(t._boundTo)},r.prototype._fulfill=function(t){this._isFollowingOrFulfilledOrRejected()||this._fulfillUnchecked(t)},r.prototype._reject=function(t,e){this._isFollowingOrFulfilledOrRejected()||this._rejectUnchecked(t,e)},r.prototype._settlePromiseAt=function(t){var e=this._promiseAt(t),n=e instanceof r;if(n&&e._isMigrated())return e._unsetIsMigrated(),l.invoke(this._settlePromiseAt,this,t);var i=this._isFulfilled()?this._fulfillmentHandlerAt(t):this._rejectionHandlerAt(t),o=this._isCarryingStackTrace()?this._getCarriedStackTrace():void 0,s=this._settledValue,a=this._receiverAt(t);this._clearCallbackDataAtIndex(t),"function"==typeof i?n?this._settlePromiseFromHandler(i,a,s,e):i.call(a,s,e):a instanceof y?a._isResolved()||(this._isFulfilled()?a._promiseFulfilled(s,e):a._promiseRejected(s,e)):n&&(this._isFulfilled()?e._fulfill(s):e._reject(s,o)),t>=4&&4==(31&t)&&l.invokeLater(this._setLength,this,0)},r.prototype._clearCallbackDataAtIndex=function(t){if(0===t)this._isCarryingStackTrace()||(this._fulfillmentHandler0=void 0),this._rejectionHandler0=this._progressHandler0=this._receiver0=this._promise0=void 0;else{var e=5*t-5;this[e+3]=this[e+4]=this[e+0]=this[e+1]=this[e+2]=void 0}},r.prototype._isSettlePromisesQueued=function(){return-1073741824==(-1073741824&this._bitField)},r.prototype._setSettlePromisesQueued=function(){this._bitField=-1073741824|this._bitField},r.prototype._unsetSettlePromisesQueued=function(){this._bitField=1073741823&this._bitField},r.prototype._queueSettlePromises=function(){l.settlePromises(this),this._setSettlePromisesQueued()},r.prototype._fulfillUnchecked=function(t){if(t===this){var e=o();return this._attachExtraTrace(e),this._rejectUnchecked(e,void 0)}this._setFulfilled(),this._settledValue=t,this._cleanValues(),this._length()>0&&this._queueSettlePromises()},r.prototype._rejectUncheckedCheckError=function(t){var e=u.ensureErrorObject(t);this._rejectUnchecked(t,e===t?void 0:e)},r.prototype._rejectUnchecked=function(t,e){if(t===this){var r=o();return this._attachExtraTrace(r),this._rejectUnchecked(r)}if(this._setRejected(),this._settledValue=t,this._cleanValues(),this._isFinal())return void l.throwLater(function(t){throw"stack"in t&&l.invokeFirst(g.unhandledRejection,void 0,t),t},void 0===e?t:e);void 0!==e&&e!==t&&this._setCarriedStackTrace(e),this._length()>0?this._queueSettlePromises():this._ensurePossibleRejectionHandled()},r.prototype._settlePromises=function(){this._unsetSettlePromisesQueued();for(var t=this._length(),e=0;e=this._length&&this._resolve(this._values)},s.prototype._promiseRejected=function(t,e){this._totalResolved++,this._reject(t)},s.prototype.shouldCopyValues=function(){return!0},s.prototype.getActualLength=function(t){return t},s}},{"./util.js":38}],25:[function(t,e,r){"use strict";function n(t){return t instanceof Error&&f.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(n(t)){e=new h(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var r=f.keys(t),i=0;i2){for(var o=arguments.length,s=new Array(o-1),a=1;a=this._length){for(var r={},n=this.length(),i=0,o=this.length();i>1},e.prototype.props=function(){return s(this)},e.props=function(t){return s(t)}}},{"./es5.js":14,"./util.js":38}],28:[function(t,e,r){"use strict";function n(t,e,r,n,i){for(var o=0;o=this._length&&this._resolve(this._values)},n.prototype._promiseFulfilled=function(t,e){var r=new i;r._bitField=268435456,r._settledValue=t,this._promiseResolved(e,r)},n.prototype._promiseRejected=function(t,e){var r=new i;r._bitField=134217728,r._settledValue=t,this._promiseResolved(e,r)},e.settle=function(t){return new n(t).promise()},e.prototype.settle=function(){return new n(this).promise()}}},{"./util.js":38}],33:[function(t,e,r){"use strict";e.exports=function(e,r,n){function i(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(t,e){if((0|e)!==e||e<0)return n("expecting a positive integer\n\n See http://goo.gl/1wAmHx\n");var r=new i(t),o=r.promise();return r.setHowMany(e),r.init(),o}var s=t("./util.js"),a=t("./errors.js").RangeError,u=t("./errors.js").AggregateError,c=s.isArray;s.inherits(i,r),i.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var t=c(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(t){this._howMany=t},i.prototype._promiseFulfilled=function(t){this._addFulfilled(t),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values))},i.prototype._promiseRejected=function(t){if(this._addRejected(t),this.howMany()>this._canPossiblyFulfill()){for(var e=new u,r=this.length();r0},e.prototype.isRejected=t.prototype._isRejected=function(){return(134217728&this._bitField)>0},e.prototype.isPending=t.prototype._isPending=function(){return 0==(402653184&this._bitField)},e.prototype.isResolved=t.prototype._isResolved=function(){return(402653184&this._bitField)>0},t.prototype.isPending=function(){return this._target()._isPending()},t.prototype.isRejected=function(){return this._target()._isRejected()},t.prototype.isFulfilled=function(){return this._target()._isFulfilled()},t.prototype.isResolved=function(){return this._target()._isResolved()},t.prototype._value=function(){return this._settledValue},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue},t.prototype.value=function(){var t=this._target();if(!t.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/hc1DLj\n");return t._settledValue},t.prototype.reason=function(){var t=this._target();if(!t.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/hPuiwB\n");return t._unsetRejectionIsUnhandled(),t._settledValue},t.PromiseInspection=e}},{}],35:[function(t,e,r){"use strict";e.exports=function(e,r){function n(t,n){if(c(t)){if(t instanceof e)return t;if(o(t)){var l=new e(r);return t._then(l._fulfillUnchecked,l._rejectUncheckedCheckError,l._progressUnchecked,l,null),l}var h=a.tryCatch(i)(t);if(h===u){n&&n._pushContext();var l=e.reject(h.e);return n&&n._popContext(),l}if("function"==typeof h)return s(t,h,n)}return t}function i(t){return t.then}function o(t){return l.call(t,"_promise0")}function s(t,n,i){function o(t){l&&(l._resolveCallback(t),l=null)}function s(t){l&&(l._rejectCallback(t,p,!0),l=null)}function c(t){l&&"function"==typeof l._progress&&l._progress(t)}var l=new e(r),h=l;i&&i._pushContext(),l._captureStackTrace(),i&&i._popContext();var p=!0,f=a.tryCatch(n).call(t,o,s,c);return p=!1,l&&f===u&&(l._rejectCallback(f.e,!0,!0),l=null),h}var a=t("./util.js"),u=a.errorObj,c=a.isObject,l={}.hasOwnProperty;return n}},{"./util.js":38}],36:[function(t,e,r){"use strict";e.exports=function(e,r){function n(t){var e=this;return e instanceof Number&&(e=+e),clearTimeout(e),t}function i(t){var e=this;throw e instanceof Number&&(e=+e),clearTimeout(e),t}var o=t("./util.js"),s=e.TimeoutError,a=function(t,e){if(t.isPending()){var r;!o.isPrimitive(e)&&e instanceof Error?r=e:("string"!=typeof e&&(e="operation timed out"),r=new s(e)),o.markAsOriginatingFromRejection(r),t._attachExtraTrace(r),t._cancel(r)}},u=function(t){return c(+this).thenReturn(t)},c=e.delay=function(t,n){if(void 0===n){n=t,t=void 0;var i=new e(r);return setTimeout(function(){i._fulfill()},n),i}return n=+n,e.resolve(t)._then(u,null,null,n,void 0)};e.prototype.delay=function(t){return c(this,t)},e.prototype.timeout=function(t,e){t=+t;var r=this.then().cancellable();r._cancellationParent=this;var o=setTimeout(function(){a(r,e)},t);return r._then(n,i,void 0,o,void 0)}}},{"./util.js":38}],37:[function(t,e,r){"use strict";e.exports=function(e,r,n,i){function o(t){for(var r=t.length,n=0;n=u)return c.resolve();var l=a(t[o++]);if(l instanceof e&&l._isDisposable()){try{l=n(l._getDisposer().tryDispose(r),t.promise)}catch(t){return s(t)}if(l instanceof e)return l._then(i,s,null,null,null)}i()}var o=0,u=t.length,c=e.defer();return i(),c.promise}function c(t){var e=new v;return e._settledValue=t,e._bitField=268435456,u(this,e).thenReturn(t)}function l(t){var e=new v;return e._settledValue=t,e._bitField=134217728,u(this,e).thenThrow(t)}function h(t,e,r){this._data=t,this._promise=e,this._context=r}function p(t,e,r){this.constructor$(t,e,r)}function f(t){return h.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}var _=t("./errors.js").TypeError,d=t("./util.js").inherits,v=e.PromiseInspection;h.prototype.data=function(){return this._data},h.prototype.promise=function(){return this._promise},h.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():null},h.prototype.tryDispose=function(t){var e=this.resource(),r=this._context;void 0!==r&&r._pushContext();var n=null!==e?this.doDispose(e,t):null;return void 0!==r&&r._popContext(),this._promise._unsetDisposable(),this._data=null,n},h.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},d(p,h),p.prototype.doDispose=function(t,e){return this.data().call(t,t,e)},e.using=function(){var t=arguments.length;if(t<2)return r("you must pass at least 2 arguments to Promise.using");var i=arguments[t-1];if("function"!=typeof i)return r("fn must be a function\n\n See http://goo.gl/916lJJ\n");var s,a=!0;2===t&&Array.isArray(arguments[0])?(s=arguments[0],t=s.length,a=!1):(s=arguments,t--);for(var u=new Array(t),p=0;p0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-262145&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new p(t,this,i());throw new _}}},{"./errors.js":13,"./util.js":38}],38:[function(t,e,r){"use strict";function n(){try{var t=C;return C=null,t.apply(this,arguments)}catch(t){return F.e=t,F}}function i(t){return C=t,n}function o(t){return null==t||!0===t||!1===t||"string"==typeof t||"number"==typeof t}function s(t){return!o(t)}function a(t){return o(t)?new Error(v(t)):t}function u(t,e){var r,n=t.length,i=new Array(n+1);for(r=0;r1,n=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=x.test(t+"")&&w.names(t).length>0;if(r||n||i)return!0}return!1}catch(t){return!1}}function f(t){function e(){}e.prototype=t;for(var r=8;r--;)new e;return t}function _(t){return R.test(t)}function d(t,e,r){for(var n=new Array(t),i=0;i10||t[0]>0}(),A.isNode&&A.toFastProperties(process);try{throw new Error}catch(t){A.lastLineError=t}e.exports=A},{"./es5.js":14}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise); - -}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"_process":8}],7:[function(require,module,exports){ -function Emitter(t){if(t)return mixin(t)}function mixin(t){for(var e in Emitter.prototype)t[e]=Emitter.prototype[e];return t}module.exports=Emitter,Emitter.prototype.on=Emitter.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks[t]=this._callbacks[t]||[]).push(e),this},Emitter.prototype.once=function(t,e){function i(){r.off(t,i),e.apply(this,arguments)}var r=this;return this._callbacks=this._callbacks||{},i.fn=e,this.on(t,i),this},Emitter.prototype.off=Emitter.prototype.removeListener=Emitter.prototype.removeAllListeners=Emitter.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i=this._callbacks[t];if(!i)return this;if(1==arguments.length)return delete this._callbacks[t],this;for(var r,s=0;s1)for(var r=1;r=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),isBoolean(r)?t.showHidden=r:r&&exports._extend(t,r),isUndefined(t.showHidden)&&(t.showHidden=!1),isUndefined(t.depth)&&(t.depth=2),isUndefined(t.colors)&&(t.colors=!1),isUndefined(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=stylizeWithColor),formatValue(t,e,t.depth)}function stylizeWithColor(e,r){var t=inspect.styles[r];return t?"["+inspect.colors[t][0]+"m"+e+"["+inspect.colors[t][1]+"m":e}function stylizeNoColor(e,r){return e}function arrayToHash(e){var r={};return e.forEach(function(e,t){r[e]=!0}),r}function formatValue(e,r,t){if(e.customInspect&&r&&isFunction(r.inspect)&&r.inspect!==exports.inspect&&(!r.constructor||r.constructor.prototype!==r)){var n=r.inspect(t,e);return isString(n)||(n=formatValue(e,n,t)),n}var i=formatPrimitive(e,r);if(i)return i;var o=Object.keys(r),s=arrayToHash(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(r)),isError(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return formatError(r);if(0===o.length){if(isFunction(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(isRegExp(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(isDate(r))return e.stylize(Date.prototype.toString.call(r),"date");if(isError(r))return formatError(r)}var c="",a=!1,l=["{","}"];if(isArray(r)&&(a=!0,l=["[","]"]),isFunction(r)){c=" [Function"+(r.name?": "+r.name:"")+"]"}if(isRegExp(r)&&(c=" "+RegExp.prototype.toString.call(r)),isDate(r)&&(c=" "+Date.prototype.toUTCString.call(r)),isError(r)&&(c=" "+formatError(r)),0===o.length&&(!a||0==r.length))return l[0]+c+l[1];if(t<0)return isRegExp(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r);var p;return p=a?formatArray(e,r,t,s,o):o.map(function(n){return formatProperty(e,r,t,s,n,a)}),e.seen.pop(),reduceToSingleString(p,c,l)}function formatPrimitive(e,r){if(isUndefined(r))return e.stylize("undefined","undefined");if(isString(r)){var t="'"+JSON.stringify(r).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(t,"string")}return isNumber(r)?e.stylize(""+r,"number"):isBoolean(r)?e.stylize(""+r,"boolean"):isNull(r)?e.stylize("null","null"):void 0}function formatError(e){return"["+Error.prototype.toString.call(e)+"]"}function formatArray(e,r,t,n,i){for(var o=[],s=0,u=r.length;s-1&&(u=o?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n"))):u=e.stylize("[Circular]","special")),isUndefined(s)){if(o&&i.match(/^\d+$/))return u;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+u}function reduceToSingleString(e,r,t){var n=0;return e.reduce(function(e,r){return n++,r.indexOf("\n")>=0&&n++,e+r.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?t[0]+(""===r?"":r+"\n ")+" "+e.join(",\n ")+" "+t[1]:t[0]+r+" "+e.join(", ")+" "+t[1]}function isArray(e){return Array.isArray(e)}function isBoolean(e){return"boolean"==typeof e}function isNull(e){return null===e}function isNullOrUndefined(e){return null==e}function isNumber(e){return"number"==typeof e}function isString(e){return"string"==typeof e}function isSymbol(e){return"symbol"==typeof e}function isUndefined(e){return void 0===e}function isRegExp(e){return isObject(e)&&"[object RegExp]"===objectToString(e)}function isObject(e){return"object"==typeof e&&null!==e}function isDate(e){return isObject(e)&&"[object Date]"===objectToString(e)}function isError(e){return isObject(e)&&("[object Error]"===objectToString(e)||e instanceof Error)}function isFunction(e){return"function"==typeof e}function isPrimitive(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function objectToString(e){return Object.prototype.toString.call(e)}function pad(e){return e<10?"0"+e.toString(10):e.toString(10)}function timestamp(){var e=new Date,r=[pad(e.getHours()),pad(e.getMinutes()),pad(e.getSeconds())].join(":");return[e.getDate(),months[e.getMonth()],r].join(" ")}function hasOwnProperty(e,r){return Object.prototype.hasOwnProperty.call(e,r)}var formatRegExp=/%[sdj%]/g;exports.format=function(e){if(!isString(e)){for(var r=[],t=0;t=i)return e;switch(e){case"%s":return String(n[t++]);case"%d":return Number(n[t++]);case"%j":try{return JSON.stringify(n[t++])}catch(e){return"[Circular]"}default:return e}}),s=n[t];t { + name: string; +} +export declare class Store { + name: string; + tagline?: string; + phone_number?: string; + postal_address?: string; + logo_url?: string; + website_url?: string; + cancel_url?: string; + return_url?: string; + callback_url?: string; + constructor(config: StoreConfiguration); + get asObject(): Record; +} +export {}; diff --git a/dist/store.js b/dist/store.js new file mode 100644 index 0000000..1d3b45d --- /dev/null +++ b/dist/store.js @@ -0,0 +1,58 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Store = void 0; +class Store { + name; + tagline; + phone_number; + postal_address; + logo_url; + website_url; + cancel_url; + return_url; + callback_url; + constructor(config) { + if (!config || !config.name) { + throw new Error('Invalid parameters.'); + } + this.name = config.name; + if (config.tagline) + this.tagline = config.tagline; + if (config.phone_number) + this.phone_number = config.phone_number; + if (config.postal_address) + this.postal_address = config.postal_address; + if (config.logo_url) + this.logo_url = config.logo_url; + if (config.website_url) + this.website_url = config.website_url; + if (config.cancel_url) + this.cancel_url = config.cancel_url; + if (config.return_url) + this.return_url = config.return_url; + if (config.callback_url) + this.callback_url = config.callback_url; + } + get asObject() { + const obj = { name: this.name }; + if (this.tagline) + obj.tagline = this.tagline; + if (this.phone_number) + obj.phone_number = this.phone_number; + if (this.postal_address) + obj.postal_address = this.postal_address; + if (this.logo_url) + obj.logo_url = this.logo_url; + if (this.website_url) + obj.website_url = this.website_url; + if (this.cancel_url) + obj.cancel_url = this.cancel_url; + if (this.return_url) + obj.return_url = this.return_url; + if (this.callback_url) + obj.callback_url = this.callback_url; + return obj; + } +} +exports.Store = Store; +//# sourceMappingURL=store.js.map \ No newline at end of file diff --git a/dist/store.js.map b/dist/store.js.map new file mode 100644 index 0000000..f872f97 --- /dev/null +++ b/dist/store.js.map @@ -0,0 +1 @@ +{"version":3,"file":"store.js","sourceRoot":"","sources":["../src/lib/store.ts"],"names":[],"mappings":";;;AAeA,MAAa,KAAK;IAEd,IAAI,CAAS;IACb,OAAO,CAAU;IACjB,YAAY,CAAU;IACtB,cAAc,CAAU;IACxB,QAAQ,CAAU;IAClB,WAAW,CAAU;IACrB,UAAU,CAAU;IACpB,UAAU,CAAU;IACpB,YAAY,CAAU;IAEtB,YAAY,MAA0B;QAClC,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAC3C,CAAC;QACD,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,MAAM,CAAC,OAAO;YAAE,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;QAClD,IAAI,MAAM,CAAC,YAAY;YAAE,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;QACjE,IAAI,MAAM,CAAC,cAAc;YAAE,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;QACvE,IAAI,MAAM,CAAC,QAAQ;YAAE,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;QACrD,IAAI,MAAM,CAAC,WAAW;YAAE,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;QAC9D,IAAI,MAAM,CAAC,UAAU;YAAE,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QAC3D,IAAI,MAAM,CAAC,UAAU;YAAE,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QAC3D,IAAI,MAAM,CAAC,YAAY;YAAE,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;IACrE,CAAC;IAED,IAAI,QAAQ;QACR,MAAM,GAAG,GAA2B,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;QACxD,IAAI,IAAI,CAAC,OAAO;YAAE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC7C,IAAI,IAAI,CAAC,YAAY;YAAE,GAAG,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;QAC5D,IAAI,IAAI,CAAC,cAAc;YAAE,GAAG,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC;QAClE,IAAI,IAAI,CAAC,QAAQ;YAAE,GAAG,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAChD,IAAI,IAAI,CAAC,WAAW;YAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QACzD,IAAI,IAAI,CAAC,UAAU;YAAE,GAAG,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QACtD,IAAI,IAAI,CAAC,UAAU;YAAE,GAAG,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QACtD,IAAI,IAAI,CAAC,YAAY;YAAE,GAAG,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;QAC5D,OAAO,GAAG,CAAC;IACf,CAAC;CACJ;AAvCD,sBAuCC"} \ No newline at end of file diff --git a/dist/transport.d.ts b/dist/transport.d.ts new file mode 100644 index 0000000..1db4a1e --- /dev/null +++ b/dist/transport.d.ts @@ -0,0 +1,10 @@ +import { Credentials } from "./credentials"; +import { AxiosInstance } from "axios"; +import { Store } from "./store"; +export declare class Transport { + setup: Credentials; + store: Store | undefined; + axios: AxiosInstance; + constructor(setup: Credentials, store?: Store | undefined); + get baseURL(): "https://app.paydunya.com/sandbox-api/v1" | "https://app.paydunya.com/api/v1"; +} diff --git a/dist/transport.js b/dist/transport.js new file mode 100644 index 0000000..70a6c0b --- /dev/null +++ b/dist/transport.js @@ -0,0 +1,27 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Transport = void 0; +const axios_1 = __importDefault(require("axios")); +class Transport { + setup; + store = undefined; + axios; + constructor(setup, store = undefined) { + this.setup = setup; + this.store = store; + this.axios = axios_1.default.create({ + baseURL: this.baseURL + }); + this.axios.interceptors.request.use((config) => { + return this.setup.extendRequestConfig(config); + }); + } + get baseURL() { + return this.setup.mode === "test" ? 'https://app.paydunya.com/sandbox-api/v1' : 'https://app.paydunya.com/api/v1'; + } +} +exports.Transport = Transport; +//# sourceMappingURL=transport.js.map \ No newline at end of file diff --git a/dist/transport.js.map b/dist/transport.js.map new file mode 100644 index 0000000..095fdf4 --- /dev/null +++ b/dist/transport.js.map @@ -0,0 +1 @@ +{"version":3,"file":"transport.js","sourceRoot":"","sources":["../src/lib/transport.ts"],"names":[],"mappings":";;;;;;AACA,kDAA0C;AAG1C,MAAa,SAAS;IAClB,KAAK,CAAc;IACnB,KAAK,GAAsB,SAAS,CAAC;IACrC,KAAK,CAAgB;IAErB,YAAY,KAAkB,EAAE,QAA2B,SAAS;QAChE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,IAAI,CAAC,KAAK,GAAG,eAAK,CAAC,MAAM,CAAC;YACtB,OAAO,EAAE,IAAI,CAAC,OAAO;SACxB,CAAC,CAAC;QAEH,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;YAC3C,OAAO,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAA;QACjD,CAAC,CAAC,CAAC;IACP,CAAC;IAED,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,yCAAyC,CAAA,CAAC,CAAC,iCAAiC,CAAA;IACpH,CAAC;CAEJ;AAtBD,8BAsBC"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 863838d..b9f91ad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "paydunya", - "version": "1.0.12", + "version": "1.0.13", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "paydunya", - "version": "1.0.12", + "version": "1.0.13", "license": "MIT", "dependencies": { "axios": "^1.12.2", @@ -15,10 +15,63 @@ "typescript": "^5.9.3" }, "devDependencies": { + "@types/node": "^24.7.0", "browserify": "^10.2.4", + "rimraf": "^6.0.1", "uglifyify": "^3.0.1" } }, + "node_modules/@isaacs/balanced-match": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", + "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@isaacs/brace-expansion": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz", + "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@isaacs/balanced-match": "^4.0.1" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": 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/@types/node": { + "version": "24.7.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.7.0.tgz", + "integrity": "sha512-IbKooQVqUBrlzWTi79E8Fw78l8k1RNtlDDNWsFZs7XonuQSJ8oNYfEeclhprUldXISRMLzBpILuKgPlIxm+/Yw==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~7.14.0" + } + }, "node_modules/acorn": { "version": "4.0.13", "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", @@ -92,6 +145,32 @@ "node": ">=0.4.2" } }, + "node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/asn1.js": { "version": "4.10.1", "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", @@ -639,6 +718,26 @@ "wordwrap": "0.0.2" } }, + "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==", + "dev": true, + "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==", + "dev": true, + "license": "MIT" + }, "node_modules/combine-source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.6.1.tgz", @@ -779,6 +878,21 @@ "sha.js": "^2.4.8" } }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/crypto-browserify": { "version": "3.12.1", "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.1.tgz", @@ -965,6 +1079,13 @@ "readable-stream": "~1.1.9" } }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, "node_modules/elliptic": { "version": "6.6.1", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", @@ -988,6 +1109,13 @@ "dev": true, "license": "MIT" }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "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", @@ -1094,6 +1222,23 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/form-data": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/form-data/-/form-data-0.1.3.tgz", @@ -1429,6 +1574,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/is-typed-array": { "version": "1.1.15", "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", @@ -1451,6 +1606,29 @@ "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", "license": "MIT" }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/jackspeak": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz", + "integrity": "sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/json-stable-stringify": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", @@ -1560,6 +1738,16 @@ "node": ">=0.10.0" } }, + "node_modules/lru-cache": { + "version": "11.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz", + "integrity": "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, "node_modules/math-intrinsics": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", @@ -1672,6 +1860,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/module-deps": { "version": "3.9.1", "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-3.9.1.tgz", @@ -1724,6 +1922,13 @@ "dev": true, "license": "MIT" }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, "node_modules/pako": { "version": "0.2.9", "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", @@ -1765,6 +1970,16 @@ "dev": true, "license": "MIT" }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", @@ -1782,6 +1997,23 @@ "node": ">= 0.8.0" } }, + "node_modules/path-scurry": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", + "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/pbkdf2": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.5.tgz", @@ -1994,6 +2226,66 @@ "node": ">=0.10.0" } }, + "node_modules/rimraf": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.0.1.tgz", + "integrity": "sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^11.0.0", + "package-json-from-dist": "^1.0.0" + }, + "bin": { + "rimraf": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.3.tgz", + "integrity": "sha512-2Nim7dha1KVkaiF4q6Dj+ngPPMdfvLJEOpZk/jKiUAkqKebpGAWQXAq9z1xu9HKu5lWfqw/FASuccEjyznjPaA==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.3.1", + "jackspeak": "^4.1.1", + "minimatch": "^10.0.3", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^2.0.0" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/minimatch": { + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.3.tgz", + "integrity": "sha512-IPZ167aShDZZUMdRk66cyQAW3qr0WzbHkPdMYa8bzZhlHhO3jALbKdxcaak7W9FfT2rZNpQuUu4Od7ILEpXSaw==", + "dev": true, + "license": "ISC", + "dependencies": { + "@isaacs/brace-expansion": "^5.0.0" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/ripemd160": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.3.tgz", @@ -2142,6 +2434,29 @@ "sha.js": "~2.4.4" } }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/shell-quote": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-0.0.1.tgz", @@ -2152,6 +2467,19 @@ "node": "*" } }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/source-map": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", @@ -2241,6 +2569,110 @@ "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", "license": "MIT" }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": 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/string-width-cjs": { + "name": "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==", + "dev": 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/string-width-cjs/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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/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==", + "dev": true, + "license": "MIT" + }, + "node_modules/string-width-cjs/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==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs/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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/subarg": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", @@ -2480,6 +2912,13 @@ "umd": "bin/cli.js" } }, + "node_modules/undici-types": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.14.0.tgz", + "integrity": "sha512-QQiYxHuyZ9gQUIrmPo3IA+hUl4KYk8uSA7cHrcKd/l3p1OTpZcM0Tbp9x7FAtXdAYhlasd60ncPpgu6ihG6TOA==", + "dev": true, + "license": "MIT" + }, "node_modules/url": { "version": "0.10.3", "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", @@ -2532,6 +2971,22 @@ "indexof": "0.0.1" } }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/which-typed-array": { "version": "1.1.19", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz", @@ -2573,6 +3028,104 @@ "node": ">=0.4.0" } }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": 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/wrap-ansi-cjs": { + "name": "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==", + "dev": 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/wrap-ansi-cjs/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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/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==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/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==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi-cjs/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==", + "dev": 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/wrap-ansi-cjs/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==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/package.json b/package.json index 882bc30..05f739a 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { "name": "paydunya", - "version": "1.0.12", + "version": "1.0.13", "description": "PAYDUNYA Node.JS Library", - "main": "lib/index.js", + "main": "dist/index.js", "scripts": { "test": "mocha test", "build-debug": "browserify lib/index.js -o dist/paydunya-node.debug.js", - "build": "browserify -g uglifyify lib/index.js -o dist/paydunya-node.min.js" + "build": "rimraf dist && tsc" }, "repository": { "type": "git", @@ -29,7 +29,9 @@ "typescript": "^5.9.3" }, "devDependencies": { + "@types/node": "^24.7.0", "browserify": "^10.2.4", + "rimraf": "^6.0.1", "uglifyify": "^3.0.1" } } diff --git a/src/examples/index.ts b/src/examples/index.ts new file mode 100644 index 0000000..e466196 --- /dev/null +++ b/src/examples/index.ts @@ -0,0 +1,9 @@ +import { PaydunyaClient } from "../lib"; + +let client = PaydunyaClient.fromCredentials({ + masterKey: "your-master-key", + privateKey: "your-private-key", + publicKey: "your-public-key", + token: "your-token", + mode: "test" // or "live" +}); \ No newline at end of file diff --git a/lib/balance.ts b/src/lib/balance.ts similarity index 78% rename from lib/balance.ts rename to src/lib/balance.ts index 4bf3a8b..b0d27ab 100644 --- a/lib/balance.ts +++ b/src/lib/balance.ts @@ -1,5 +1,5 @@ -import { PaydunyaClient } from "./client"; -import axios, { Axios } from "axios"; +import { Transport } from "./transport"; +import axios, { AxiosInstance } from "axios"; import { ApiRoutes, SUPPORTED_COUNTRY_CODES } from "./constants"; type SupportedCountryCode = keyof typeof SUPPORTED_COUNTRY_CODES; @@ -31,30 +31,30 @@ class Money { static parse(value: string) { let [amount, currency] = value.split(" ") - return new Money(parseFloat(amount), currency.trim()) + return new Money(parseFloat(amount || "0"), currency?.trim() || "XOF") } } export class Balance { - client: PaydunyaClient - axios: Axios + transport: Transport + axios: AxiosInstance - constructor(client: PaydunyaClient) { - this.client = client; + constructor(transport: Transport) { + this.transport = transport; this.axios = axios.create({ baseURL: "https://app.paydunya.com/api/v2" }); this.axios.interceptors.request.use((config) => { - return this.client.setup.extendRequestConfig(config); + return this.transport.setup.extendRequestConfig(config); }) } async getAll() { - return this.client.axios.get(ApiRoutes.CHECK_BALANCE) + return this.axios.get(ApiRoutes.CHECK_BALANCE) .then((result) => { if (result.data.success) { - + let items: { [key in SupportedCountryCode]?: Money } = {}; Object.keys(SUPPORTED_COUNTRY_CODES).forEach((country) => { (items as any)[country] = Money.parse((result.data as any)[`Balance ${country}`]) @@ -74,7 +74,7 @@ export class Balance { } async getAccountBalance(account: string) { - return this.client.axios.get(`${ApiRoutes.CHECK_BALANCE}/${account}`) + return this.axios.get(`${ApiRoutes.CHECK_BALANCE}/${account}`) .then((result) => { if (result.data.success) { return result.data diff --git a/lib/constants.ts b/src/lib/constants.ts similarity index 100% rename from lib/constants.ts rename to src/lib/constants.ts diff --git a/lib/credentials.ts b/src/lib/credentials.ts similarity index 77% rename from lib/credentials.ts rename to src/lib/credentials.ts index d4629e7..e7bac94 100644 --- a/lib/credentials.ts +++ b/src/lib/credentials.ts @@ -1,22 +1,22 @@ import {InternalAxiosRequestConfig} from "axios" -type Environment = "live" | "test" +export type PaydunyaEnvironment = "live" | "test" -interface SetupOptions { +interface CredentialOptions { masterKey: string; privateKey: string; publicKey: string; token: string; - mode: Environment; + mode: PaydunyaEnvironment; } -export class Setup { +export class Credentials { masterKey: string privateKey: string publicKey: string token: string - mode: Environment + mode: PaydunyaEnvironment - constructor(options: SetupOptions) { + constructor(options: CredentialOptions) { this.masterKey = options.masterKey; this.privateKey = options.privateKey; this.publicKey = options.publicKey; diff --git a/lib/direct-pay.ts b/src/lib/direct-pay.ts similarity index 80% rename from lib/direct-pay.ts rename to src/lib/direct-pay.ts index cfde970..e315255 100644 --- a/lib/direct-pay.ts +++ b/src/lib/direct-pay.ts @@ -1,17 +1,17 @@ -import util from "util"; -import { PaydunyaClient } from "./client"; +import { Transport } from "./transport"; import { ResponseError } from "./errors"; import { ApiRoutes, ResponseCode } from "./constants"; +import util from "util" export class DirectPay { - private client: PaydunyaClient; + private transport: Transport; public responseText?: string; public description?: string; public transactionID?: string; - constructor(client: PaydunyaClient) { - this.client = client; + constructor(transport: Transport) { + this.transport = transport; } /** @@ -25,7 +25,7 @@ export class DirectPay { amount: Number(amount), }; - const res = await this.client.axios.post(ApiRoutes.CREDIT_ACCOUNT, body); + const res = await this.transport.axios.post(ApiRoutes.CREDIT_ACCOUNT, body); if (res.data.response_code === ResponseCode.success) { this.responseText = res.data.response_text; diff --git a/lib/errors.ts b/src/lib/errors.ts similarity index 100% rename from lib/errors.ts rename to src/lib/errors.ts diff --git a/src/lib/index.ts b/src/lib/index.ts new file mode 100644 index 0000000..688c48d --- /dev/null +++ b/src/lib/index.ts @@ -0,0 +1,64 @@ +import { Balance } from "./balance"; +import { Transport } from "./transport"; +import { DirectPay } from "./direct-pay"; +import CheckoutInvoice from "./invoices/checkout"; +import { OnsiteInvoice } from "./invoices/onsite"; +import { Credentials, PaydunyaEnvironment } from "./credentials"; + +export class PaydunyaClient { + transport: Transport; + + constructor(transport: Transport) { + this.transport = transport; + } + + checkoutInvoiceInstance() { + return new CheckoutInvoice(this.transport); + } + + onsiteInvoiceInstance() { + return new OnsiteInvoice(this.transport); + } + + directpayInstance() { + return new DirectPay(this.transport); + } + + balanceInstance() { + return new Balance(this.transport); + } + + static fromCredentialsInstance(credentials: Credentials) { + let client = new PaydunyaClient( + new Transport( + credentials + ) + ) + return client; + } + + static fromCredentials(params: ConstructorParameters[0]) { + let client = new PaydunyaClient( + new Transport( + new Credentials(params) + ) + ) + return client; + } + + static autoDetect() { + let client = new PaydunyaClient( + new Transport( + new Credentials({ + masterKey: process.env.PAYDUNYA_MASTER_KEY || "", + privateKey: process.env.PAYDUNYA_PRIVATE_KEY || "", + publicKey: process.env.PAYDUNYA_PUBLIC_KEY || "", + token: process.env.PAYDUNYA_TOKEN || "", + mode: (process.env.PAYDUNYA_MODE || "live") as PaydunyaEnvironment, + }) + ) + ) + return client; + } + +} \ No newline at end of file diff --git a/lib/invoices/checkout.ts b/src/lib/invoices/checkout.ts similarity index 94% rename from lib/invoices/checkout.ts rename to src/lib/invoices/checkout.ts index 83fb32f..4002b11 100644 --- a/lib/invoices/checkout.ts +++ b/src/lib/invoices/checkout.ts @@ -1,5 +1,5 @@ import { Invoice } from "./invoice"; -import { PaydunyaClient } from "../client"; +import { Transport } from "../transport"; import { ResponseError } from "../errors"; import { ApiRoutes, ResponseCode, Status } from "../constants"; @@ -13,7 +13,7 @@ export default class CheckoutInvoice extends Invoice { receipt_identifier?: string; provider_reference?: string; - constructor(client: PaydunyaClient) { + constructor(client: Transport) { super(client); } @@ -23,7 +23,7 @@ export default class CheckoutInvoice extends Invoice { async create() { const requestBody = this.asRequestBody(); - return this.client.axios + return this.transport.axios .post(ApiRoutes.CREATE_INVOICE, requestBody) .then((res) => { if (res.data.response_code === ResponseCode.success) { @@ -43,7 +43,7 @@ export default class CheckoutInvoice extends Invoice { */ async confirm(givenToken?: string) { const token = givenToken ? givenToken : this.token; - this.client.axios + this.transport.axios .get(`${ApiRoutes.CONFIRM_INVOICE}${token}`) .then((res) => { const body = res.data; diff --git a/lib/invoices/invoice.ts b/src/lib/invoices/invoice.ts similarity index 87% rename from lib/invoices/invoice.ts rename to src/lib/invoices/invoice.ts index a2d82ac..959ecd8 100644 --- a/lib/invoices/invoice.ts +++ b/src/lib/invoices/invoice.ts @@ -1,4 +1,4 @@ -import { PaydunyaClient } from "../client"; +import { Transport } from "../transport"; import { PaymentChannel } from "../constants"; interface InvoiceItem { @@ -29,7 +29,7 @@ interface InvoiceData { * @param {object} store Instance of paydunya.Store */ export class Invoice { - client: PaydunyaClient; + transport: Transport; returnURL?: string; cancelURL?: string; callbackURL?: string; @@ -41,13 +41,13 @@ export class Invoice { channels: PaymentChannel[]; totalAmount: number; - constructor(client: PaydunyaClient) { - this.client = client; + constructor(transport: Transport) { + this.transport = transport; - if (client.store?.return_url) this.returnURL = client.store!.return_url; - if (client.store?.cancel_url) this.cancelURL = client.store!.cancel_url; - if (client.store?.callback_url) - this.callbackURL = client.store!.callback_url; + if (transport.store?.return_url) this.returnURL = transport.store!.return_url; + if (transport.store?.cancel_url) this.cancelURL = transport.store!.cancel_url; + if (transport.store?.callback_url) + this.callbackURL = transport.store!.callback_url; this.description = ""; this.items = {}; @@ -58,7 +58,7 @@ export class Invoice { } get store() { - return this.client.store; + return this.transport.store; } /** @@ -83,7 +83,7 @@ export class Invoice { unit_price: unitPrice || 0, total_price: totalPrice || 0, }; - if (description) this.items["item_" + position].description = description; + if (description) this.items["item_" + position]!.description = description; return this; } @@ -117,7 +117,7 @@ export class Invoice { */ addChannels(channels: PaymentChannel[] = []) { for (let i = 0; i < channels.length; i++) { - this.channels.push(channels[i]); + this.channels.push(channels[i]!); } return this; diff --git a/lib/invoices/onsite.ts b/src/lib/invoices/onsite.ts similarity index 92% rename from lib/invoices/onsite.ts rename to src/lib/invoices/onsite.ts index 3af7b1a..a5cad72 100644 --- a/lib/invoices/onsite.ts +++ b/src/lib/invoices/onsite.ts @@ -1,4 +1,4 @@ -import { PaydunyaClient } from "../client"; +import { Transport } from "../transport"; import { ApiRoutes, ResponseCode } from "../constants"; import { ResponseError } from "../errors"; import { Invoice } from "./invoice"; @@ -11,8 +11,8 @@ export class OnsiteInvoice extends Invoice { receiptURL?: string; customer?: any; - constructor(client: PaydunyaClient) { - super(client); + constructor(transport: Transport) { + super(transport); } /** @@ -26,7 +26,7 @@ export class OnsiteInvoice extends Invoice { account_alias: customer, }, }; - return this.client.axios + return this.transport.axios .post(ApiRoutes.CREATE_ONSITEINVOCE, body) .then((response) => { if (response.data?.response_code === ResponseCode.success) { @@ -56,7 +56,7 @@ export class OnsiteInvoice extends Invoice { confirm_token: confirmToken, }; - return this.client.axios + return this.transport.axios .post(ApiRoutes.CHARGE_ONSITEINVOCE, body) .then((response) => { if (response.data?.response_code === ResponseCode.success) { diff --git a/lib/store.ts b/src/lib/store.ts similarity index 100% rename from lib/store.ts rename to src/lib/store.ts diff --git a/lib/client.ts b/src/lib/transport.ts similarity index 62% rename from lib/client.ts rename to src/lib/transport.ts index 120c2f3..ba6c927 100644 --- a/lib/client.ts +++ b/src/lib/transport.ts @@ -1,13 +1,13 @@ -import { Setup } from "./credentials"; -import axios, {Axios} from "axios" +import { Credentials } from "./credentials"; +import axios, {AxiosInstance} from "axios" import { Store } from "./store"; -export class PaydunyaClient { - setup: Setup; - store?: Store; - axios: Axios; +export class Transport { + setup: Credentials; + store: Store | undefined = undefined; + axios: AxiosInstance; - constructor(setup: Setup, store: Store | undefined = undefined) { + constructor(setup: Credentials, store: Store | undefined = undefined) { this.setup = setup; this.store = store; diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..f877856 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,38 @@ +{ + // Visit https://aka.ms/tsconfig to read more about this file + "compilerOptions": { + // File Layout + "rootDir": "src/lib/", + "outDir": "dist", + // Environment Settings + // See also https://aka.ms/tsconfig/module + "module": "nodenext", + "target": "esnext", + // For nodejs: + "lib": ["esnext"], + "types": ["node"], + "sourceMap": true, + // Stricter Typechecking Options + "noUncheckedIndexedAccess": true, + "exactOptionalPropertyTypes": true, + // Style Options + // "noImplicitReturns": true, + // "noImplicitOverride": true, + // "noUnusedLocals": true, + // "noUnusedParameters": true, + // "noFallthroughCasesInSwitch": true, + // "noPropertyAccessFromIndexSignature": true, + // Recommended Options + "strict": true, + "jsx": "react-jsx", + "verbatimModuleSyntax": false, + "isolatedModules": true, + "noUncheckedSideEffectImports": true, + "moduleDetection": "force", + "skipLibCheck": true, + "declaration": true + }, + "exclude": [ + "src/examples" + ], +} \ No newline at end of file From d5d0b4614fce7550bd34ca8108c11205605ce274 Mon Sep 17 00:00:00 2001 From: Maximilien COMLAN Date: Fri, 10 Oct 2025 09:48:48 +0100 Subject: [PATCH 09/20] updated README --- README.md | 96 +++++++++++++++++++++++++++---------------------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/README.md b/README.md index 41af913..613ac7b 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,15 @@ PAYDUNYA NodeJS API Client ====================================== The [Node.JS](http://nodejs.org) library for [PAYDUNYA (paydunya.com)](https://paydunya.com). -Fully supports Typescript. -Built on the PAYDUNYA HTTP API (beta). +✅ Fully supports Typescript. + +Built on the PAYDUNYA HTTP API. ## Installation -```javascript -npm install --save paydunya +```typescript +npm install --save paydunya-sdk ``` ## API configuration @@ -58,26 +59,26 @@ let store = new Store({ ## Initialize Checkout Invoice -```javascript -var invoice = new paydunya.CheckoutInvoice(setup, store); +```typescript +let invoice = client.checkoutInvoiceInstance(); ``` ## Initialize Onsite Invoice -```javascript -var invoice = new paydunya.OnsiteInvoice(setup, store); +```typescript +let invoice = client.onsiteInvoiceInstance(); ``` ## Add Invoice Items & Description -```javascript +```typescript invoice.addItem('Ordinateur Lenovo L440', 1, 400000, 400000); // name, quantity, unit price, total price invoice.description = 'Lenovo Product' ``` ## Setting Total Amount Chargeable -```javascript +```typescript invoice.totalAmount = 400000; ``` @@ -86,11 +87,11 @@ After setting total amount and adding items to your invoice you can create a che ```javascript invoice.create() - .then(function (){ - invoice.status; - invoice.token; // invoice token - invoice.responseText; - invoice.url; // PAYDUNYA redirect checkout url + .then(function (result){ + result.status; + result.token; // invoice token + result.responseText; + result.url; // PAYDUNYA redirect checkout url }) .catch(function (e) { console.log(e); @@ -100,12 +101,12 @@ invoice.create() ## Onsite Payment Request (OPR): Step 1 - Token request After setting total amount and adding items to your invoice get the paydunya customer's username or phone number and start an OPR request. -```javascript +```typescript invoice.create('alioune@gmail.com') - .then(function(){ - invoice.oprToken; // You need to pass the OPR Token on Step 2 - invoice.token; // invoice token - invoice.responseText; + .then((result){ + result.oprToken; // You need to pass the OPR Token on Step 2 + result.token; // invoice token + result.responseText; }) .catch(function (e) { console.log(e); @@ -116,13 +117,13 @@ invoice.create('alioune@gmail.com') ## Onsite Payment Request (OPR): Step 2 - Charge To successfully complete an OPR charge, you need both your OPR Token & the Confirmation code sent to the customer. After a successfull charge you can programatically access the receipt url, customer information and more. -```javascript +```typescript invoice.charge('oprToken', '0000') - .then(function (){ - invoice.status; - invoice.responseText; - invoice.receiptURL; - invoice.customer; // {name: 'Alioune Badara', phone: '773830279', email: 'alioune@gmail.com'} + .then((result){ + result.status; + result.responseText; + result.receiptURL; + result.customer; // {name: 'Alioune Badara', phone: '773830279', email: 'alioune@gmail.com'} }) .catch(function (e) { console.log(e); @@ -134,7 +135,7 @@ invoice.charge('oprToken', '0000') ### Adding Tax Information You may include tax information on on the checkout page. This information will be available on the invoice & receipt printouts and PDF downloads. -```javascript +```typescript invoice.addTax('VAT (18%)', 3000); invoice.addTax('Autre taxe (5%)', 200); ``` @@ -143,7 +144,7 @@ invoice.addTax('Autre taxe (5%)', 200); There are times when you may need to add an extra load of data with the checkout information for later use. paydunya allows saving of custom data on their servers which are persisted even after successful payment. Note: Custom data is not displayed anywhere on the checkout page, invoice/receipt download & printouts. -```javascript +```typescript invoice.addCustomData('CartID', 32393); invoice.addCustomData('Plan', 'NOEL'); ``` @@ -153,9 +154,9 @@ You can optionally set the URL where your customers will be redirected to after Note: There are two options as to how the cancel URL is set, one is to set it globally using the checkout setup information and the other is set it as per checkout invoice. Setting the cancel URL directly on the invoice instance will overwrite the global settings if already set. -```javascript +```typescript // Globally -var store = new paydunya.Store({ +let store = new Store({ name: 'Magasin chez Sandra', cancelURL: 'http://www.ma-super-boutique.com/' }); @@ -168,9 +169,9 @@ invoice.cancelURL = 'http://www.ma-super-boutique.com/'; PAYDUNYA does a good job of managing receipt downloads and printouts after your customer successfuly makes payment. However there may be cases where you may descide to redirect your customers to another URL after successfully making payment. Return URL guarantees this action. Note: PAYDUNYA will append `?token=INVOICE_TOKEN` to your URL. -```javascript +```typescript // Globally -var store = new paydunya.Store({ +let store = new Store({ name: 'Magasin chez Sandra', returnURL: 'http://www.ma-super-boutique.com/confirm' }); @@ -182,19 +183,18 @@ invoice.returnURL = 'http://www.ma-super-boutique.com/confirm'; ### Confirming a Checkout Programatically The API allows you to check on the status of any checkout using the checkout token key. You have access to all the data including the receipt download link & customer information in cases where the checkout has been confirmed as completed. -```javascript -var token = 'odaff0a023'; - -var invoice = new paydunya.CheckoutInvoice(setup, store); +```typescript +let token = 'odaff0a023'; +let invoice = client.checkoutInvoiceInstance(); invoice.confirm(token) - .then(function (){ - invoice.status; // completed, pending, canceled or fail - invoice.responseText; + .then(function (result){ + result.status; // completed, pending, canceled or fail + result.responseText; // available if status == 'completed' - invoice.customer; // {name: 'Alioune Badara', phone: '772639273', email: 'alioune@gmail.com'} - invoice.receiptURL; // 'https://app.paydunya.com/sandbox-checkout/receipt/pdf/test_44a6fef19a.pdf' + result.customer; // {name: 'Alioune Badara', phone: '772639273', email: 'alioune@gmail.com'} + result.receiptURL; // 'https://app.paydunya.com/sandbox-checkout/receipt/pdf/test_44a6fef19a.pdf' }) .catch(function (e) { console.log(e); @@ -204,13 +204,13 @@ invoice.confirm(token) ## DirectPay You can pay any paydunya account directly via your third party apps. This is particularly excellent for implementing your own Adaptive payment solutions on top of paydunya. -```javascript -var directPay = new paydunya.DirectPay(setup); +```typescript +var directPay = new client.directpayInstance(setup); directPay.creditAccount('alioune@gmail.com', 5000) - .then(function (){ - directPay.description; - directPay.responseText; - directPay.transactionID; + .then(function (result){ + result.description; + result.responseText; + result.transactionID; }) .catch(function (e) { console.log(e); @@ -220,7 +220,7 @@ directPay.creditAccount('alioune@gmail.com', 5000) # Running Tests To run tests just setup the API configuration environment variables. An internet connection is required for some of the tests to pass. -```javascript +```typescript npm install -g mocha ``` Then From c0a42bfbf82e0f554401e1417ab71e4d60e0f542 Mon Sep 17 00:00:00 2001 From: Maximilien COMLAN Date: Mon, 13 Oct 2025 15:31:48 +0100 Subject: [PATCH 10/20] updating test cases --- .npmignore | 1 + __tests__/.env.local | 4 + .../checkout-invoice.done.js | 0 __tests__/checkout-invoice.ts | 53 + {test => __tests__}/direct-pay.js | 0 {test => __tests__}/invoice.js | 0 {test => __tests__}/onsite-invoice.js | 0 {test => __tests__}/setup.js | 0 {test => __tests__}/store.js | 0 jest.config.js | 11 + package-lock.json | 6449 ++++++++++++++--- package.json | 11 +- src/lib/constants.ts | 2 +- src/lib/credentials.ts | 17 +- src/lib/index.ts | 13 +- src/lib/invoices/checkout.ts | 30 +- src/lib/transport.ts | 4 +- tsconfig.json | 4 +- 18 files changed, 5517 insertions(+), 1082 deletions(-) create mode 100644 .npmignore create mode 100644 __tests__/.env.local rename test/checkout-invoice.js => __tests__/checkout-invoice.done.js (100%) create mode 100644 __tests__/checkout-invoice.ts rename {test => __tests__}/direct-pay.js (100%) rename {test => __tests__}/invoice.js (100%) rename {test => __tests__}/onsite-invoice.js (100%) rename {test => __tests__}/setup.js (100%) rename {test => __tests__}/store.js (100%) create mode 100644 jest.config.js diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..aa8e45f --- /dev/null +++ b/.npmignore @@ -0,0 +1 @@ +src/ \ No newline at end of file diff --git a/__tests__/.env.local b/__tests__/.env.local new file mode 100644 index 0000000..8d74cda --- /dev/null +++ b/__tests__/.env.local @@ -0,0 +1,4 @@ +PAYDUNYA_MASTER_KEY=JhByj8C1-PTtU-ucie-NFOP-M0TEug8grSsf +PAYDUNYA_PRIVATE_KEY=test_private_MrduDEpcRR0UdKaXyALrtHD0JAH +PAYDUNYA_PUBLIC_KEY=test_public_dtUH0u5ARkmCGFGaJEons9jnVfB +PAYDUNYA_TOKEN=Fo2285p8dhbg4WIViNFo \ No newline at end of file diff --git a/test/checkout-invoice.js b/__tests__/checkout-invoice.done.js similarity index 100% rename from test/checkout-invoice.js rename to __tests__/checkout-invoice.done.js diff --git a/__tests__/checkout-invoice.ts b/__tests__/checkout-invoice.ts new file mode 100644 index 0000000..aef6078 --- /dev/null +++ b/__tests__/checkout-invoice.ts @@ -0,0 +1,53 @@ +import { strict as assert } from 'assert'; +import { PaydunyaClient } from '../src/lib'; +import { Store } from '../src/lib/store'; +import { PaydunyaEnvironment } from '../src/lib/credentials'; +import { config } from 'dotenv'; +import { join } from 'path'; + +config({ path: join(__dirname, ".env.local") }) + +describe('CheckoutInvoice', function () { + + let token = ''; + + it('should work with valid initialization and total amount', function (done) { + const client = PaydunyaClient.autoDetect(PaydunyaEnvironment.TEST) + client.store = new Store({ name: "Magasin Chez Sandra" }) + const invoice = client.checkoutInvoiceInstance(); + + invoice.totalAmount = 1000; + + invoice.create() + .then((output) => { + expect(output.url).toBeTruthy() + expect(output.token).toBeTruthy() + token = output.token || ''; + done(); + }) + .catch(done); + }); + + it('should confirm completed token', function (done) { + + const client = PaydunyaClient.fromCredentials({ + mode: PaydunyaEnvironment.TEST, + privateKey: process.env.PAYDUNYA_PRIVATE_KEY || "", + publicKey: process.env.PAYDUNYA_PUBLIC_KEY || "", + masterKey: process.env.PAYDUNYA_MASTER_KEY || "", + token: process.env.PAYDUNYA_TOKEN || "" + }); + + client.store = new Store({ name: "Magasin Chez Sandra" }) + const invoice = client.checkoutInvoiceInstance(); + + invoice.getTokenStatus(token) + .then((result) => { + expect(result.status).toBeTruthy(); + expect(result.hash).toBeTruthy(); + expect(result.status).toBe("pending"); + done(); + }) + .catch(done); + }); +}); \ No newline at end of file diff --git a/test/direct-pay.js b/__tests__/direct-pay.js similarity index 100% rename from test/direct-pay.js rename to __tests__/direct-pay.js diff --git a/test/invoice.js b/__tests__/invoice.js similarity index 100% rename from test/invoice.js rename to __tests__/invoice.js diff --git a/test/onsite-invoice.js b/__tests__/onsite-invoice.js similarity index 100% rename from test/onsite-invoice.js rename to __tests__/onsite-invoice.js diff --git a/test/setup.js b/__tests__/setup.js similarity index 100% rename from test/setup.js rename to __tests__/setup.js diff --git a/test/store.js b/__tests__/store.js similarity index 100% rename from test/store.js rename to __tests__/store.js diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000..86f88fb --- /dev/null +++ b/jest.config.js @@ -0,0 +1,11 @@ +const { createDefaultPreset } = require("ts-jest"); + +const tsJestTransformCfg = createDefaultPreset().transform; + +/** @type {import("jest").Config} **/ +module.exports = { + testEnvironment: "node", + transform: { + ...tsJestTransformCfg, + }, +}; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index b9f91ad..60cd012 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "paydunya", + "name": "paydunya-sdk", "version": "1.0.13", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "paydunya", + "name": "paydunya-sdk", "version": "1.0.13", "license": "MIT", "dependencies": { @@ -15,1620 +15,5023 @@ "typescript": "^5.9.3" }, "devDependencies": { + "@types/jest": "^30.0.0", "@types/node": "^24.7.0", "browserify": "^10.2.4", + "dotenv": "^17.2.3", + "jest": "^30.2.0", "rimraf": "^6.0.1", + "ts-jest": "^29.4.5", "uglifyify": "^3.0.1" } }, - "node_modules/@isaacs/balanced-match": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", - "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==", + "node_modules/@babel/code-frame": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", "dev": true, "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.27.1", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, "engines": { - "node": "20 || >=22" + "node": ">=6.9.0" } }, - "node_modules/@isaacs/brace-expansion": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz", - "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==", + "node_modules/@babel/compat-data": { + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.4.tgz", + "integrity": "sha512-YsmSKC29MJwf0gF8Rjjrg5LQCmyh+j/nD8/eP7f+BeoQTKYqs9RoWbjGOdy0+1Ekr68RJZMUOPVQaQisnIo4Rw==", "dev": true, "license": "MIT", - "dependencies": { - "@isaacs/balanced-match": "^4.0.1" + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.4.tgz", + "integrity": "sha512-2BCOP7TN8M+gVDj7/ht3hsaO/B/n5oDbiAyyvnRlNOs+u1o+JWNYTQrmpuNp1/Wq2gcFrI01JAW+paEKDMx/CA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.3", + "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-module-transforms": "^7.28.3", + "@babel/helpers": "^7.28.4", + "@babel/parser": "^7.28.4", + "@babel/template": "^7.27.2", + "@babel/traverse": "^7.28.4", + "@babel/types": "^7.28.4", + "@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": "20 || >=22" + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" } }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "node_modules/@babel/core/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": "ISC", + "license": "MIT" + }, + "node_modules/@babel/core/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": { - "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" + "ms": "^2.1.3" }, "engines": { - "node": ">=12" + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/@types/node": { - "version": "24.7.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.7.0.tgz", - "integrity": "sha512-IbKooQVqUBrlzWTi79E8Fw78l8k1RNtlDDNWsFZs7XonuQSJ8oNYfEeclhprUldXISRMLzBpILuKgPlIxm+/Yw==", + "node_modules/@babel/core/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/@babel/generator": { + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.3.tgz", + "integrity": "sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~7.14.0" + "@babel/parser": "^7.28.3", + "@babel/types": "^7.28.2", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" } }, - "node_modules/acorn": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", - "integrity": "sha512-fu2ygVGuMmlzG8ZeRJ0bvR41nsAkxxhbyk8bZ1SS521Z7vmgJFTQQlfz/Mp/nJexGBz+v8sC9bM6+lNgskt4Ug==", + "node_modules/@babel/helper-compilation-targets": { + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", + "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", "dev": true, "license": "MIT", - "bin": { - "acorn": "bin/acorn" + "dependencies": { + "@babel/compat-data": "^7.27.2", + "@babel/helper-validator-option": "^7.27.1", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" }, "engines": { - "node": ">=0.4.0" + "node": ">=6.9.0" } }, - "node_modules/acorn-node": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz", - "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==", + "node_modules/@babel/helper-compilation-targets/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": "Apache-2.0", + "license": "ISC", "dependencies": { - "acorn": "^7.0.0", - "acorn-walk": "^7.0.0", - "xtend": "^4.0.2" + "yallist": "^3.0.2" } }, - "node_modules/acorn-node/node_modules/acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "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", - "bin": { - "acorn": "bin/acorn" - }, "engines": { - "node": ">=0.4.0" + "node": ">=6.9.0" } }, - "node_modules/acorn-walk": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", - "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", + "node_modules/@babel/helper-module-imports": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", + "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", "dev": true, "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.27.1", + "@babel/types": "^7.27.1" + }, "engines": { - "node": ">=0.4.0" + "node": ">=6.9.0" } }, - "node_modules/align-text": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", - "integrity": "sha512-GrTZLRpmp6wIC2ztrWW9MjjTgSKccffgFagbNDOX95/dcjEcYZibYTeaOntySQLcdw1ztBoFkviiUvTMbb9MYg==", + "node_modules/@babel/helper-module-transforms": { + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz", + "integrity": "sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==", "dev": true, "license": "MIT", "dependencies": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" + "@babel/helper-module-imports": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1", + "@babel/traverse": "^7.28.3" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "node_modules/amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", + "node_modules/@babel/helper-plugin-utils": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz", + "integrity": "sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==", "dev": true, - "license": "BSD-3-Clause OR MIT", + "license": "MIT", "engines": { - "node": ">=0.4.2" + "node": ">=6.9.0" } }, - "node_modules/ansi-regex": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", - "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "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": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" + "node": ">=6.9.0" } }, - "node_modules/ansi-styles": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", - "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "node_modules/@babel/helper-validator-identifier": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", + "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", "dev": true, "license": "MIT", "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": ">=6.9.0" } }, - "node_modules/asn1.js": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "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", - "dependencies": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" + "engines": { + "node": ">=6.9.0" } }, - "node_modules/asn1.js/node_modules/bn.js": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", - "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", + "node_modules/@babel/helpers": { + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.4.tgz", + "integrity": "sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "@babel/template": "^7.27.2", + "@babel/types": "^7.28.4" + }, + "engines": { + "node": ">=6.9.0" + } }, - "node_modules/assert": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.3.0.tgz", - "integrity": "sha512-5aKcpD+XnHpZ7EGxsuo6uoILNh0rvm0Ypa17GlkrF2CNSPhvdgi3ft9XsL2ajdVOI2I3xuGZnHvlXAeqTZYvXg==", + "node_modules/@babel/parser": { + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.4.tgz", + "integrity": "sha512-yZbBqeM6TkpP9du/I2pUZnJsRMGGvOuIrhjzC1AwHwW+6he4mni6Bp/m8ijn0iOuZuPI2BfkCoSRunpyjnrQKg==", "dev": true, "license": "MIT", "dependencies": { - "util": "0.10.3" + "@babel/types": "^7.28.4" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" } }, - "node_modules/assert/node_modules/inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha512-8nWq2nLTAwd02jTqJExUYFSD/fKq6VH9Y/oG2accc/kdI0V98Bag8d5a4gi3XHz73rDWa2PvTtvcWYquKqSENA==", + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", "dev": true, - "license": "ISC" + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } }, - "node_modules/assert/node_modules/util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha512-5KiHfsmkqacuKjkRkdV7SsfDJ2EGiPsK92s2MhNSY0craxjTdKTtqKsJaCWp4LW33ZZ0OPUv1WO/TFvNQRiQxQ==", + "node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", "dev": true, "license": "MIT", "dependencies": { - "inherits": "2.0.1" + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/astw": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/astw/-/astw-2.2.0.tgz", - "integrity": "sha512-E/4z//dvN0lfr8zAx8hXeQ8o3nRoQaL/wqI7fAALEvh/40mnyUxfFB9MwyDHYKVDtS3cp3Pow5s96djZR5lkWw==", + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", "dev": true, "license": "MIT", "dependencies": { - "acorn": "^4.0.3" + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/async": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", - "integrity": "sha512-l6ToIJIotphWahxxHyzK9bnLR6kM4jJIIgLShZeqLY7iboHoGkdgFl7W2/Ivi4SkMJYGKqW8vSuk0uKUj6qsSw==", - "license": "MIT" - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "license": "MIT" + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } }, - "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==", + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.27.1.tgz", + "integrity": "sha512-oFT0FrKHgF53f4vOsZGi2Hh3I35PfSmVs4IBFLFj4dnafP+hIWDLg3VyKmUHfLoLHlyxY4C7DGtmHuJgn+IGww==", "dev": true, "license": "MIT", "dependencies": { - "possible-typed-array-names": "^1.0.0" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { - "node": ">= 0.4" + "node": ">=6.9.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/axios": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.12.2.tgz", - "integrity": "sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==", + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, "license": "MIT", "dependencies": { - "follow-redirects": "^1.15.6", - "form-data": "^4.0.4", - "proxy-from-env": "^1.1.0" + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/axios/node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, "license": "MIT", "dependencies": { - "delayed-stream": "~1.0.0" + "@babel/helper-plugin-utils": "^7.8.0" }, - "engines": { - "node": ">= 0.8" + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/axios/node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.27.1.tgz", + "integrity": "sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w==", + "dev": true, "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, "engines": { - "node": ">=0.4.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/axios/node_modules/form-data": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", - "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, "license": "MIT", "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "es-set-tostringtag": "^2.1.0", - "hasown": "^2.0.2", - "mime-types": "^2.1.12" + "@babel/helper-plugin-utils": "^7.10.4" }, - "engines": { - "node": ">= 6" + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } }, - "node_modules/Base64": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz", - "integrity": "sha512-reGEWshDmTDQDsCec/HduOO9Wyj6yMOupMfhIf3ugN1TDlK2NQW4DDJSqNNtp380SNcvRfXtO8HSCQot0d0SMw==", - "dev": true + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } }, - "node_modules/base64-js": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz", - "integrity": "sha512-3XSA2cR/h/73EzlXXdU6YNycmYI7+kicTxks4eJg2g39biHR84slg2+des+p7iHYhbRg/udIS4TD53WabcOUkw==", + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", "dev": true, "license": "MIT", - "engines": { - "node": ">= 0.4" + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/bluebird": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz", - "integrity": "sha512-UfFSr22dmHPQqPP9XWHRhq+gWnHCYguQGkXQlbyPtW5qTnhFWA8/iXg765tH0cAjy7l/zPJ1aBTO0g5XgA7kvQ==", - "license": "MIT" - }, - "node_modules/bn.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.2.tgz", - "integrity": "sha512-v2YAxEmKaBLahNwE1mjp4WON6huMNeuDvagFZW+ASCuA/ku0bXR9hSMw0XpiqMoA3+rmnyck/tPRSFQkoC9Cuw==", - "dev": true, - "license": "MIT" - }, - "node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", - "dev": true, - "license": "MIT" - }, - "node_modules/browser-pack": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-5.0.1.tgz", - "integrity": "sha512-BFMQuYXCcwr3Uvna1y1hikqd3r2dQpWIQBIN3m5YwE3ClfnXDeF3tqP6Wqjhs1LRUeBJpgHn8yD+fPX/YSEgMQ==", + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", "dev": true, "license": "MIT", "dependencies": { - "combine-source-map": "~0.6.1", - "defined": "^1.0.0", - "JSONStream": "^1.0.3", - "through2": "^1.0.0", - "umd": "^3.0.0" + "@babel/helper-plugin-utils": "^7.8.0" }, - "bin": { - "browser-pack": "bin/cmd.js" + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/browser-resolve": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz", - "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==", + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", "dev": true, "license": "MIT", "dependencies": { - "resolve": "1.1.7" + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/browser-resolve/node_modules/resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg==", - "dev": true, - "license": "MIT" - }, - "node_modules/browserify": { - "version": "10.2.6", - "resolved": "https://registry.npmjs.org/browserify/-/browserify-10.2.6.tgz", - "integrity": "sha512-rhKmIuWDcE1ULm6lrd3kQdUTqFsLd/UJp3yYt4Ur5rDzk/Gj2AH6+ZTNqkaMqwMphkf8Rp83S1GfMxtu9QjGDA==", + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", "dev": true, "license": "MIT", "dependencies": { - "assert": "~1.3.0", - "browser-pack": "^5.0.0", - "browser-resolve": "^1.7.1", - "browserify-zlib": "~0.1.2", - "buffer": "^3.0.0", - "builtins": "~0.0.3", - "commondir": "0.0.1", - "concat-stream": "~1.4.1", - "console-browserify": "^1.1.0", - "constants-browserify": "~0.0.1", - "crypto-browserify": "^3.0.0", - "defined": "^1.0.0", - "deps-sort": "^1.3.7", - "domain-browser": "~1.1.0", - "duplexer2": "~0.0.2", - "events": "~1.0.0", - "glob": "^4.0.5", - "has": "^1.0.0", - "htmlescape": "^1.1.0", - "http-browserify": "^1.4.0", - "https-browserify": "~0.0.0", - "inherits": "~2.0.1", - "insert-module-globals": "^6.4.1", - "isarray": "0.0.1", - "JSONStream": "^1.0.3", - "labeled-stream-splicer": "^1.0.0", - "module-deps": "^3.7.11", - "os-browserify": "~0.1.1", - "parents": "^1.0.1", - "path-browserify": "~0.0.0", - "process": "~0.11.0", - "punycode": "^1.3.2", - "querystring-es3": "~0.2.0", - "read-only-stream": "^1.1.1", - "readable-stream": "^1.1.13", - "resolve": "^1.1.4", - "shasum": "^1.0.0", - "shell-quote": "~0.0.1", - "stream-browserify": "^1.0.0", - "string_decoder": "~0.10.0", - "subarg": "^1.0.0", - "syntax-error": "^1.1.1", - "through2": "^1.0.0", - "timers-browserify": "^1.0.1", - "tty-browserify": "~0.0.0", - "url": "~0.10.1", - "util": "~0.10.1", - "vm-browserify": "~0.0.1", - "xtend": "^4.0.0" + "@babel/helper-plugin-utils": "^7.14.5" }, - "bin": { - "browserify": "bin/cmd.js" + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", "dev": true, "license": "MIT", "dependencies": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz", + "integrity": "sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ==", "dev": true, "license": "MIT", "dependencies": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "node_modules/@babel/template": { + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", + "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", "dev": true, "license": "MIT", "dependencies": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" + "@babel/code-frame": "^7.27.1", + "@babel/parser": "^7.27.2", + "@babel/types": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" } }, - "node_modules/browserify-rsa": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.1.tgz", - "integrity": "sha512-YBjSAiTqM04ZVei6sXighu679a3SqWORA3qZTEqZImnlkDIFtKc6pNutpjyZ8RJTjQtuYfeetkxM11GwoYXMIQ==", + "node_modules/@babel/traverse": { + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.4.tgz", + "integrity": "sha512-YEzuboP2qvQavAcjgQNVgsvHIDv6ZpwXvcvjmyySP2DIMuByS/6ioU5G9pYrWHM6T2YDfc7xga9iNzYOs12CFQ==", "dev": true, "license": "MIT", "dependencies": { - "bn.js": "^5.2.1", - "randombytes": "^2.1.0", - "safe-buffer": "^5.2.1" + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.3", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.28.4", + "@babel/template": "^7.27.2", + "@babel/types": "^7.28.4", + "debug": "^4.3.1" }, "engines": { - "node": ">= 0.10" + "node": ">=6.9.0" } }, - "node_modules/browserify-sign": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.5.tgz", - "integrity": "sha512-C2AUdAJg6rlM2W5QMp2Q4KGQMVBwR1lIimTsUnutJ8bMpW5B52pGpR2gEnNBNwijumDo5FojQ0L9JrXA8m4YEw==", + "node_modules/@babel/traverse/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": "ISC", + "license": "MIT", "dependencies": { - "bn.js": "^5.2.2", - "browserify-rsa": "^4.1.1", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "elliptic": "^6.6.1", - "inherits": "^2.0.4", - "parse-asn1": "^5.1.9", - "readable-stream": "^2.3.8", - "safe-buffer": "^5.2.1" + "ms": "^2.1.3" }, "engines": { - "node": ">= 0.10" + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/browserify-sign/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "node_modules/@babel/traverse/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/browserify-sign/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==", + "node_modules/@babel/types": { + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.4.tgz", + "integrity": "sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==", "dev": true, "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" + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" } }, - "node_modules/browserify-sign/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==", + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true, "license": "MIT" }, - "node_modules/browserify-sign/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==", + "node_modules/@emnapi/core": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.5.0.tgz", + "integrity": "sha512-sbP8GzB1WDzacS8fgNPpHlp6C9VZe+SJP3F90W9rLemaQj2PzIuTEl1qDOYQf58YIpyjViI24y9aPWCjEzY2cg==", "dev": true, "license": "MIT", + "optional": true, "dependencies": { - "safe-buffer": "~5.1.0" + "@emnapi/wasi-threads": "1.1.0", + "tslib": "^2.4.0" } }, - "node_modules/browserify-sign/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==", - "dev": true, - "license": "MIT" - }, - "node_modules/browserify-zlib": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", - "integrity": "sha512-19OEpq7vWgsH6WkvkBJQDFvJS1uPcbFOQ4v9CU839dO+ZZXUZO6XpE6hNCqvlIIj+4fZvRiJ6DsAQ382GwiyTQ==", + "node_modules/@emnapi/runtime": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.5.0.tgz", + "integrity": "sha512-97/BJ3iXHww3djw6hYIfErCZFee7qCtrneuLa20UXFCOTCfBM2cvQHjWJ2EG0s0MtdNwInarqCTz35i4wWXHsQ==", "dev": true, "license": "MIT", + "optional": true, "dependencies": { - "pako": "~0.2.0" + "tslib": "^2.4.0" } }, - "node_modules/buffer": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-3.6.2.tgz", - "integrity": "sha512-c3M77NkHJxS0zx/ErxXhDLr1v3y2MDXPeTJPvLNOaIYJ4ymHBUFQ9EXzt9HYuqAJllMoNb/EZ8hIiulnQFAUuQ==", + "node_modules/@emnapi/wasi-threads": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.1.0.tgz", + "integrity": "sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==", "dev": true, "license": "MIT", + "optional": true, "dependencies": { - "base64-js": "0.0.8", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" + "tslib": "^2.4.0" } }, - "node_modules/buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/buffer/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/builtins": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-0.0.7.tgz", - "integrity": "sha512-T8uCGKc0/2aLVt6omt8JxDRBoWEMkku+wFesxnhxnt4NygVZG99zqxo7ciK8eebszceKamGoUiLdkXCgGQyrQw==", + "node_modules/@isaacs/balanced-match": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", + "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": "20 || >=22" + } }, - "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==", + "node_modules/@isaacs/brace-expansion": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz", + "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==", "dev": true, "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" + "@isaacs/balanced-match": "^4.0.1" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": "20 || >=22" } }, - "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", + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" + "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": ">= 0.4" + "node": ">=12" } }, - "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==", + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "get-intrinsic": "^1.3.0" + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=8" } }, - "node_modules/camelcase": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha512-wzLkDa4K/mzI1OSITC+DUyjgIl/ETNHE9QvYgy6J6Jvqyyz4C0Xfd+lQhb19sX2jMpZV4IssUn0VDVmglV+s4g==", + "node_modules/@istanbuljs/load-nyc-config/node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true, "license": "MIT", "engines": { - "node": ">=0.10.0" + "node": ">=6" } }, - "node_modules/center-align": { + "node_modules/@istanbuljs/schema": { "version": "0.1.3", - "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", - "integrity": "sha512-Baz3aNe2gd2LP2qk5U+sDk/m4oSuwSDcBfayTCTBoWpfIGO5XFxPmjILQII4NGiZjD6DoDI6kf7gKaxkf7s3VQ==", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", "dev": true, "license": "MIT", - "dependencies": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" - }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "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==", + "node_modules/@jest/console": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-30.2.0.tgz", + "integrity": "sha512-+O1ifRjkvYIkBqASKWgLxrpEhQAAE7hY77ALLUufSk5717KfOShg6IbqLmdsLMPdUiFvA2kTs0R7YZy+l0IzZQ==", "dev": true, "license": "MIT", "dependencies": { - "inherits": "^2.0.4", - "safe-buffer": "^5.2.1", - "to-buffer": "^1.2.2" + "@jest/types": "30.2.0", + "@types/node": "*", + "chalk": "^4.1.2", + "jest-message-util": "30.2.0", + "jest-util": "30.2.0", + "slash": "^3.0.0" }, "engines": { - "node": ">= 0.10" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/core": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-30.2.0.tgz", + "integrity": "sha512-03W6IhuhjqTlpzh/ojut/pDB2LPRygyWX8ExpgHtQA8H/3K7+1vKmcINx5UzeOX1se6YEsBsOHQ1CRzf3fOwTQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "30.2.0", + "@jest/pattern": "30.0.1", + "@jest/reporters": "30.2.0", + "@jest/test-result": "30.2.0", + "@jest/transform": "30.2.0", + "@jest/types": "30.2.0", + "@types/node": "*", + "ansi-escapes": "^4.3.2", + "chalk": "^4.1.2", + "ci-info": "^4.2.0", + "exit-x": "^0.2.2", + "graceful-fs": "^4.2.11", + "jest-changed-files": "30.2.0", + "jest-config": "30.2.0", + "jest-haste-map": "30.2.0", + "jest-message-util": "30.2.0", + "jest-regex-util": "30.0.1", + "jest-resolve": "30.2.0", + "jest-resolve-dependencies": "30.2.0", + "jest-runner": "30.2.0", + "jest-runtime": "30.2.0", + "jest-snapshot": "30.2.0", + "jest-util": "30.2.0", + "jest-validate": "30.2.0", + "jest-watcher": "30.2.0", + "micromatch": "^4.0.8", + "pretty-format": "30.2.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } } }, - "node_modules/cliui": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", - "integrity": "sha512-GIOYRizG+TGoc7Wgc1LiOTLare95R3mzKgoln+Q/lE4ceiYH19gUpl0l0Ffq4lJDEf3FxujMe6IBfOCs7pfqNA==", + "node_modules/@jest/diff-sequences": { + "version": "30.0.1", + "resolved": "https://registry.npmjs.org/@jest/diff-sequences/-/diff-sequences-30.0.1.tgz", + "integrity": "sha512-n5H8QLDJ47QqbCNn5SuFjCRDrOLEZ0h8vAHCK5RL9Ls7Xa8AQLa/YxAc9UjFqoEDM48muwtBGjtMY5cr0PLDCw==", "dev": true, - "license": "ISC", - "dependencies": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", - "wordwrap": "0.0.2" + "license": "MIT", + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "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==", + "node_modules/@jest/environment": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-30.2.0.tgz", + "integrity": "sha512-/QPTL7OBJQ5ac09UDRa3EQes4gt1FTEG/8jZ/4v5IVzx+Cv7dLxlVIvfvSVRiiX2drWyXeBjkMSR8hvOWSog5g==", "dev": true, "license": "MIT", "dependencies": { - "color-name": "~1.1.4" + "@jest/fake-timers": "30.2.0", + "@jest/types": "30.2.0", + "@types/node": "*", + "jest-mock": "30.2.0" }, "engines": { - "node": ">=7.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.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==", + "node_modules/@jest/expect": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-30.2.0.tgz", + "integrity": "sha512-V9yxQK5erfzx99Sf+7LbhBwNWEZ9eZay8qQ9+JSC0TrMR1pMDHLMY+BnVPacWU6Jamrh252/IKo4F1Xn/zfiqA==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "expect": "30.2.0", + "jest-snapshot": "30.2.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } }, - "node_modules/combine-source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.6.1.tgz", - "integrity": "sha512-XKRNtuZRlVDTuSGKsfZpXYz80y0XDbYS4a+FzafTgmYHy/ckruFBx7Nd6WaQnFHVI3O6IseWVdXUvZutMpjSkQ==", + "node_modules/@jest/expect-utils": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-30.2.0.tgz", + "integrity": "sha512-1JnRfhqpD8HGpOmQp180Fo9Zt69zNtC+9lR+kT7NVL05tNXIi+QC8Csz7lfidMoVLPD3FnOtcmp0CEFnxExGEA==", "dev": true, "license": "MIT", "dependencies": { - "convert-source-map": "~1.1.0", - "inline-source-map": "~0.5.0", - "lodash.memoize": "~3.0.3", - "source-map": "~0.4.2" + "@jest/get-type": "30.1.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/combined-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz", - "integrity": "sha512-qfexlmLp9MyrkajQVyjEDb0Vj+KhRgR/rxLiVhaihlT+ZkX0lReqtH6Ack40CvMDERR4b5eFp3CreskpBs1Pig==", + "node_modules/@jest/fake-timers": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-30.2.0.tgz", + "integrity": "sha512-HI3tRLjRxAbBy0VO8dqqm7Hb2mIa8d5bg/NJkyQcOk7V118ObQML8RC5luTF/Zsg4474a+gDvhce7eTnP4GhYw==", + "dev": true, + "license": "MIT", "dependencies": { - "delayed-stream": "0.0.5" + "@jest/types": "30.2.0", + "@sinonjs/fake-timers": "^13.0.0", + "@types/node": "*", + "jest-message-util": "30.2.0", + "jest-mock": "30.2.0", + "jest-util": "30.2.0" }, "engines": { - "node": ">= 0.8" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/commondir": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-0.0.1.tgz", - "integrity": "sha512-Ghe1LmLv3G3c0XJYu+c88MCRIPqWQ67qaqKY1KvuN4uPAjfUj+y4hvcpZ2kCPrjpRNyklW4dpAZZ8a7vOh50tg==", + "node_modules/@jest/get-type": { + "version": "30.1.0", + "resolved": "https://registry.npmjs.org/@jest/get-type/-/get-type-30.1.0.tgz", + "integrity": "sha512-eMbZE2hUnx1WV0pmURZY9XoXPkUYjpc55mb0CrhtdWLtzMQPFvu/rZkTLZFTsdaVQa+Tr4eWAteqcUzoawq/uA==", "dev": true, - "license": "MIT/X11", + "license": "MIT", "engines": { - "node": "*" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/component-emitter": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.1.2.tgz", - "integrity": "sha512-YhIbp3PJiznERfjlIkK0ue4obZxt2S60+0W8z24ZymOHT8sHloOqWOqZRU2eN5OlY8U08VFsP02letcu26FilA==" - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "node_modules/@jest/globals": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-30.2.0.tgz", + "integrity": "sha512-b63wmnKPaK+6ZZfpYhz9K61oybvbI1aMcIs80++JI1O1rR1vaxHUCNqo3ITu6NU0d4V34yZFoHMn/uoKr/Rwfw==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "@jest/environment": "30.2.0", + "@jest/expect": "30.2.0", + "@jest/types": "30.2.0", + "jest-mock": "30.2.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } }, - "node_modules/concat-stream": { - "version": "1.4.11", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.4.11.tgz", - "integrity": "sha512-X3JMh8+4je3U1cQpG87+f9lXHDrqcb2MVLg9L7o8b1UZ0DzhRrUpdn65ttzu10PpJPPI3MQNkis+oha6TSA9Mw==", + "node_modules/@jest/pattern": { + "version": "30.0.1", + "resolved": "https://registry.npmjs.org/@jest/pattern/-/pattern-30.0.1.tgz", + "integrity": "sha512-gWp7NfQW27LaBQz3TITS8L7ZCQ0TLvtmI//4OwlQRx4rnWxcPNIYjxZpDcN4+UlGxgm3jS5QPz8IPTCkb59wZA==", "dev": true, - "engines": [ - "node >= 0.8" - ], "license": "MIT", "dependencies": { - "inherits": "~2.0.1", - "readable-stream": "~1.1.9", - "typedarray": "~0.0.5" + "@types/node": "*", + "jest-regex-util": "30.0.1" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/reporters": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-30.2.0.tgz", + "integrity": "sha512-DRyW6baWPqKMa9CzeiBjHwjd8XeAyco2Vt8XbcLFjiwCOEKOvy82GJ8QQnJE9ofsxCMPjH4MfH8fCWIHHDKpAQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "30.2.0", + "@jest/test-result": "30.2.0", + "@jest/transform": "30.2.0", + "@jest/types": "30.2.0", + "@jridgewell/trace-mapping": "^0.3.25", + "@types/node": "*", + "chalk": "^4.1.2", + "collect-v8-coverage": "^1.0.2", + "exit-x": "^0.2.2", + "glob": "^10.3.10", + "graceful-fs": "^4.2.11", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^6.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^5.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "30.2.0", + "jest-util": "30.2.0", + "jest-worker": "30.2.0", + "slash": "^3.0.0", + "string-length": "^4.0.2", + "v8-to-istanbul": "^9.0.1" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } } }, - "node_modules/console-browserify": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", - "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", - "dev": true - }, - "node_modules/constants-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-0.0.1.tgz", - "integrity": "sha512-FL+diDS9AKR5BAA2M+GNk8lnH64tRE3zepTG9hucxc7o04LgCRhkQZhF7u/OKHZT8LLRT+sZEi9qFzXUchq9pA==", + "node_modules/@jest/reporters/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } }, - "node_modules/convert-source-map": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", - "integrity": "sha512-Y8L5rp6jo+g9VEPgvqNfEopjTR4OTYct8lXlS8iVQdmnjDvbdbzYe9rjtFCB9egC86JoNCU61WRY+ScjkZpnIg==", + "node_modules/@jest/reporters/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", "dev": true, - "license": "MIT" - }, - "node_modules/cookiejar": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.0.1.tgz", - "integrity": "sha512-Txnl7P7okmx/FyZNRAjPyHMKISV2ADNbd+xITouEVyl2jUczrU4tJT40KcfQL/ifCo0kqqLgD49QlNofAAmBKQ==", - "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" + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } }, - "node_modules/create-ecdh": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", - "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "node_modules/@jest/reporters/node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", "dev": true, - "license": "MIT", + "license": "BlueOak-1.0.0", "dependencies": { - "bn.js": "^4.1.0", - "elliptic": "^6.5.3" + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" } }, - "node_modules/create-ecdh/node_modules/bn.js": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", - "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", + "node_modules/@jest/reporters/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", "dev": true, - "license": "MIT" + "license": "ISC" }, - "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==", + "node_modules/@jest/reporters/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "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==", + "node_modules/@jest/reporters/node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, - "license": "MIT", + "license": "BlueOak-1.0.0", "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" + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "node_modules/@jest/schemas": { + "version": "30.0.5", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-30.0.5.tgz", + "integrity": "sha512-DmdYgtezMkh3cpU8/1uyXakv3tJRcmcXxBOcO0tbaozPwpmh4YMsnWrQm9ZmZMfa5ocbxzbFk6O4bDPEc/iAnA==", "dev": true, "license": "MIT", "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" + "@sinclair/typebox": "^0.34.0" }, "engines": { - "node": ">= 8" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/crypto-browserify": { - "version": "3.12.1", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.1.tgz", - "integrity": "sha512-r4ESw/IlusD17lgQi1O20Fa3qNnsckR126TdUuBgAu7GBYSIPvdNyONd3Zrxh0xCwA4+6w/TDArBPsMvhur+KQ==", + "node_modules/@jest/snapshot-utils": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/@jest/snapshot-utils/-/snapshot-utils-30.2.0.tgz", + "integrity": "sha512-0aVxM3RH6DaiLcjj/b0KrIBZhSX1373Xci4l3cW5xiUWPctZ59zQ7jj4rqcJQ/Z8JuN/4wX3FpJSa3RssVvCug==", "dev": true, "license": "MIT", "dependencies": { - "browserify-cipher": "^1.0.1", - "browserify-sign": "^4.2.3", - "create-ecdh": "^4.0.4", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "diffie-hellman": "^5.0.3", - "hash-base": "~3.0.4", - "inherits": "^2.0.4", - "pbkdf2": "^3.1.2", - "public-encrypt": "^4.0.3", - "randombytes": "^2.1.0", - "randomfill": "^1.0.4" + "@jest/types": "30.2.0", + "chalk": "^4.1.2", + "graceful-fs": "^4.2.11", + "natural-compare": "^1.4.0" }, "engines": { - "node": ">= 0.10" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/debug": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-1.0.5.tgz", - "integrity": "sha512-SIKSrp4+XqcUaNWhwaPJbLFnvSXPsZ4xBdH2WRK0Xo++UzMC4eepYghGAVhVhOwmfq3kqowqJ5w45R3pmYZnuA==", + "node_modules/@jest/source-map": { + "version": "30.0.1", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-30.0.1.tgz", + "integrity": "sha512-MIRWMUUR3sdbP36oyNyhbThLHyJ2eEDClPCiHVbrYAe5g3CHRArIVpBw7cdSB5fr+ofSfIb2Tnsw8iEHL0PYQg==", + "dev": true, + "license": "MIT", "dependencies": { - "ms": "2.0.0" + "@jridgewell/trace-mapping": "^0.3.25", + "callsites": "^3.1.0", + "graceful-fs": "^4.2.11" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "node_modules/@jest/test-result": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-30.2.0.tgz", + "integrity": "sha512-RF+Z+0CCHkARz5HT9mcQCBulb1wgCP3FBvl9VFokMX27acKphwyQsNuWH3c+ojd1LeWBLoTYoxF0zm6S/66mjg==", "dev": true, "license": "MIT", + "dependencies": { + "@jest/console": "30.2.0", + "@jest/types": "30.2.0", + "@types/istanbul-lib-coverage": "^2.0.6", + "collect-v8-coverage": "^1.0.2" + }, "engines": { - "node": ">=0.10.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.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==", + "node_modules/@jest/test-sequencer": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-30.2.0.tgz", + "integrity": "sha512-wXKgU/lk8fKXMu/l5Hog1R61bL4q5GCdT6OJvdAFz1P+QrpoFuLU68eoKuVc4RbrTtNnTL5FByhWdLgOPSph+Q==", "dev": true, "license": "MIT", "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" + "@jest/test-result": "30.2.0", + "graceful-fs": "^4.2.11", + "jest-haste-map": "30.2.0", + "slash": "^3.0.0" }, "engines": { - "node": ">= 0.4" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/transform": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-30.2.0.tgz", + "integrity": "sha512-XsauDV82o5qXbhalKxD7p4TZYYdwcaEXC77PPD2HixEFF+6YGppjrAAQurTl2ECWcEomHBMMNS9AH3kcCFx8jA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.27.4", + "@jest/types": "30.2.0", + "@jridgewell/trace-mapping": "^0.3.25", + "babel-plugin-istanbul": "^7.0.1", + "chalk": "^4.1.2", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.11", + "jest-haste-map": "30.2.0", + "jest-regex-util": "30.0.1", + "jest-util": "30.2.0", + "micromatch": "^4.0.8", + "pirates": "^4.0.7", + "slash": "^3.0.0", + "write-file-atomic": "^5.0.1" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/defined": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.1.tgz", - "integrity": "sha512-hsBd2qSVCRE+5PmNdHt1uzyrFu5d3RwmFDKzyNZMFq/EwDNJF7Ee5+D5oEKF0hU6LhtoUF1macFvOe4AskQC1Q==", + "node_modules/@jest/transform/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/@jest/types": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-30.2.0.tgz", + "integrity": "sha512-H9xg1/sfVvyfU7o3zMfBEjQ1gcsdeTMgqHoYdN79tuLqfTtuu7WckRA1R5whDwOzxaZAeMKTYWqP+WCAi0CHsg==", "dev": true, "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" + "dependencies": { + "@jest/pattern": "30.0.1", + "@jest/schemas": "30.0.5", + "@types/istanbul-lib-coverage": "^2.0.6", + "@types/istanbul-reports": "^3.0.4", + "@types/node": "*", + "@types/yargs": "^17.0.33", + "chalk": "^4.1.2" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/delayed-stream": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz", - "integrity": "sha512-v+7uBd1pqe5YtgPacIIbZ8HuHeLFVNe4mUEyFDXL6KiqzEykjbw+5mXZXpGFgNVasdL4jWKgaKIXrEHiynN1LA==", - "engines": { - "node": ">=0.4.0" + "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/deps-sort": { - "version": "1.3.9", - "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-1.3.9.tgz", - "integrity": "sha512-aEnmQuu/Hf5h8akL8QshYWzk9MVBg/JYMyNq/Lz68i69nR17tunjP6o/AC6Tn48c8ayzG6aeKs6OoFOtVCtvrQ==", + "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": { - "JSONStream": "^1.0.3", - "shasum": "^1.0.0", - "subarg": "^1.0.0", - "through2": "^1.0.0" - }, - "bin": { - "deps-sort": "bin/cmd.js" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" } }, - "node_modules/des.js": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.1.0.tgz", - "integrity": "sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==", + "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": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/detective": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/detective/-/detective-4.7.1.tgz", - "integrity": "sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig==", + "node_modules/@napi-rs/wasm-runtime": { + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.12.tgz", + "integrity": "sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==", "dev": true, "license": "MIT", + "optional": true, "dependencies": { - "acorn": "^5.2.1", - "defined": "^1.0.0" + "@emnapi/core": "^1.4.3", + "@emnapi/runtime": "^1.4.3", + "@tybys/wasm-util": "^0.10.0" } }, - "node_modules/detective/node_modules/acorn": { - "version": "5.7.4", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", - "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==", + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", "dev": true, "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, + "optional": true, "engines": { - "node": ">=0.4.0" + "node": ">=14" } }, - "node_modules/diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "node_modules/@pkgr/core": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.2.9.tgz", + "integrity": "sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==", "dev": true, "license": "MIT", - "dependencies": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/pkgr" } }, - "node_modules/diffie-hellman/node_modules/bn.js": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", - "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", + "node_modules/@sinclair/typebox": { + "version": "0.34.41", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.41.tgz", + "integrity": "sha512-6gS8pZzSXdyRHTIqoqSVknxolr1kzfy4/CeDnrzsVz8TTIWUbOBr6gnzOmTYJ3eXQNh4IYHIGi5aIL7sOZ2G/g==", "dev": true, "license": "MIT" }, - "node_modules/domain-browser": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz", - "integrity": "sha512-fJ5MoHxe69h3E4/lJtFRhcWwLb04bhIBSfvCEMS1YDH+/9yEZTqBHTSTgch8nCP5tE5k2gdQEjodUqJzy7qJ9Q==", + "node_modules/@sinonjs/commons": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "13.0.5", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-13.0.5.tgz", + "integrity": "sha512-36/hTbH2uaWuGVERyC6da9YwGWnzUZXuPro/F2LfsdOsLnCojz/iSH8MxUt/FD2S5XBSVPhmArFUXcpCQ2Hkiw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sinonjs/commons": "^3.0.1" + } + }, + "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", - "engines": { - "node": ">=0.4", - "npm": ">=1.2" + "optional": true, + "dependencies": { + "tslib": "^2.4.0" } }, - "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==", + "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": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" - }, - "engines": { - "node": ">= 0.4" + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" } }, - "node_modules/duplexer2": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", - "integrity": "sha512-+AWBwjGadtksxjOQSFDhPNQbed7icNXApT4+2BNpsXzcCBiInq2H9XW0O8sfHFaPmnQRs7cg/P0fAr2IWQSW0g==", + "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": "BSD", + "license": "MIT", "dependencies": { - "readable-stream": "~1.1.9" + "@babel/types": "^7.0.0" } }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "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" + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } }, - "node_modules/elliptic": { - "version": "6.6.1", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", - "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", + "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": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" + "@babel/types": "^7.28.2" } }, - "node_modules/elliptic/node_modules/bn.js": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", - "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", "dev": true, "license": "MIT" }, - "node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } }, - "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==", + "node_modules/@types/istanbul-reports": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", + "dev": true, "license": "MIT", - "engines": { - "node": ">= 0.4" + "dependencies": { + "@types/istanbul-lib-report": "*" } }, - "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==", + "node_modules/@types/jest": { + "version": "30.0.0", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-30.0.0.tgz", + "integrity": "sha512-XTYugzhuwqWjws0CVz8QpM36+T+Dz5mTEBKhNs/esGLnCIlGdRy+Dq78NRjd7ls7r8BC8ZRMOrKlkO1hU0JOwA==", + "dev": true, "license": "MIT", - "engines": { - "node": ">= 0.4" + "dependencies": { + "expect": "^30.0.0", + "pretty-format": "^30.0.0" } }, - "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==", + "node_modules/@types/node": { + "version": "24.7.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.7.0.tgz", + "integrity": "sha512-IbKooQVqUBrlzWTi79E8Fw78l8k1RNtlDDNWsFZs7XonuQSJ8oNYfEeclhprUldXISRMLzBpILuKgPlIxm+/Yw==", + "dev": true, "license": "MIT", "dependencies": { - "es-errors": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" + "undici-types": "~7.14.0" } }, - "node_modules/es-set-tostringtag": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", - "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "node_modules/@types/stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/yargs": { + "version": "17.0.33", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", + "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@ungap/structured-clone": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", + "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", + "dev": true, + "license": "ISC" + }, + "node_modules/@unrs/resolver-binding-android-arm-eabi": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm-eabi/-/resolver-binding-android-arm-eabi-1.11.1.tgz", + "integrity": "sha512-ppLRUgHVaGRWUx0R0Ut06Mjo9gBaBkg3v/8AxusGLhsIotbBLuRk51rAzqLC8gq6NyyAojEXglNjzf6R948DNw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@unrs/resolver-binding-android-arm64": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm64/-/resolver-binding-android-arm64-1.11.1.tgz", + "integrity": "sha512-lCxkVtb4wp1v+EoN+HjIG9cIIzPkX5OtM03pQYkG+U5O/wL53LC4QbIeazgiKqluGeVEeBlZahHalCaBvU1a2g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@unrs/resolver-binding-darwin-arm64": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.11.1.tgz", + "integrity": "sha512-gPVA1UjRu1Y/IsB/dQEsp2V1pm44Of6+LWvbLc9SDk1c2KhhDRDBUkQCYVWe6f26uJb3fOK8saWMgtX8IrMk3g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@unrs/resolver-binding-darwin-x64": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.11.1.tgz", + "integrity": "sha512-cFzP7rWKd3lZaCsDze07QX1SC24lO8mPty9vdP+YVa3MGdVgPmFc59317b2ioXtgCMKGiCLxJ4HQs62oz6GfRQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@unrs/resolver-binding-freebsd-x64": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.11.1.tgz", + "integrity": "sha512-fqtGgak3zX4DCB6PFpsH5+Kmt/8CIi4Bry4rb1ho6Av2QHTREM+47y282Uqiu3ZRF5IQioJQ5qWRV6jduA+iGw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm-gnueabihf": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.11.1.tgz", + "integrity": "sha512-u92mvlcYtp9MRKmP+ZvMmtPN34+/3lMHlyMj7wXJDeXxuM0Vgzz0+PPJNsro1m3IZPYChIkn944wW8TYgGKFHw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm-musleabihf": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.11.1.tgz", + "integrity": "sha512-cINaoY2z7LVCrfHkIcmvj7osTOtm6VVT16b5oQdS4beibX2SYBwgYLmqhBjA1t51CarSaBuX5YNsWLjsqfW5Cw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm64-gnu": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.11.1.tgz", + "integrity": "sha512-34gw7PjDGB9JgePJEmhEqBhWvCiiWCuXsL9hYphDF7crW7UgI05gyBAi6MF58uGcMOiOqSJ2ybEeCvHcq0BCmQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm64-musl": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.11.1.tgz", + "integrity": "sha512-RyMIx6Uf53hhOtJDIamSbTskA99sPHS96wxVE/bJtePJJtpdKGXO1wY90oRdXuYOGOTuqjT8ACccMc4K6QmT3w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-ppc64-gnu": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.11.1.tgz", + "integrity": "sha512-D8Vae74A4/a+mZH0FbOkFJL9DSK2R6TFPC9M+jCWYia/q2einCubX10pecpDiTmkJVUH+y8K3BZClycD8nCShA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-riscv64-gnu": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.11.1.tgz", + "integrity": "sha512-frxL4OrzOWVVsOc96+V3aqTIQl1O2TjgExV4EKgRY09AJ9leZpEg8Ak9phadbuX0BA4k8U5qtvMSQQGGmaJqcQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-riscv64-musl": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.11.1.tgz", + "integrity": "sha512-mJ5vuDaIZ+l/acv01sHoXfpnyrNKOk/3aDoEdLO/Xtn9HuZlDD6jKxHlkN8ZhWyLJsRBxfv9GYM2utQ1SChKew==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-s390x-gnu": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.11.1.tgz", + "integrity": "sha512-kELo8ebBVtb9sA7rMe1Cph4QHreByhaZ2QEADd9NzIQsYNQpt9UkM9iqr2lhGr5afh885d/cB5QeTXSbZHTYPg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-x64-gnu": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.11.1.tgz", + "integrity": "sha512-C3ZAHugKgovV5YvAMsxhq0gtXuwESUKc5MhEtjBpLoHPLYM+iuwSj3lflFwK3DPm68660rZ7G8BMcwSro7hD5w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-x64-musl": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.11.1.tgz", + "integrity": "sha512-rV0YSoyhK2nZ4vEswT/QwqzqQXw5I6CjoaYMOX0TqBlWhojUf8P94mvI7nuJTeaCkkds3QE4+zS8Ko+GdXuZtA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-wasm32-wasi": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.11.1.tgz", + "integrity": "sha512-5u4RkfxJm+Ng7IWgkzi3qrFOvLvQYnPBmjmZQ8+szTK/b31fQCnleNl1GgEt7nIsZRIf5PLhPwT0WM+q45x/UQ==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@napi-rs/wasm-runtime": "^0.2.11" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@unrs/resolver-binding-win32-arm64-msvc": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.11.1.tgz", + "integrity": "sha512-nRcz5Il4ln0kMhfL8S3hLkxI85BXs3o8EYoattsJNdsX4YUU89iOkVn7g0VHSRxFuVMdM4Q1jEpIId1Ihim/Uw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@unrs/resolver-binding-win32-ia32-msvc": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.11.1.tgz", + "integrity": "sha512-DCEI6t5i1NmAZp6pFonpD5m7i6aFrpofcp4LA2i8IIq60Jyo28hamKBxNrZcyOwVOZkgsRp9O2sXWBWP8MnvIQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@unrs/resolver-binding-win32-x64-msvc": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.11.1.tgz", + "integrity": "sha512-lrW200hZdbfRtztbygyaq/6jP6AKE8qQN2KvPcJ+x7wiD038YtnYtZ82IMNJ69GJibV7bwL3y9FgK+5w/pYt6g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha512-fu2ygVGuMmlzG8ZeRJ0bvR41nsAkxxhbyk8bZ1SS521Z7vmgJFTQQlfz/Mp/nJexGBz+v8sC9bM6+lNgskt4Ug==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-node": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz", + "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "acorn": "^7.0.0", + "acorn-walk": "^7.0.0", + "xtend": "^4.0.2" + } + }, + "node_modules/acorn-node/node_modules/acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", + "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha512-GrTZLRpmp6wIC2ztrWW9MjjTgSKccffgFagbNDOX95/dcjEcYZibYTeaOntySQLcdw1ztBoFkviiUvTMbb9MYg==", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", + "dev": true, + "license": "BSD-3-Clause OR MIT", + "engines": { + "node": ">=0.4.2" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/asn1.js": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/asn1.js/node_modules/bn.js": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", + "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", + "dev": true, + "license": "MIT" + }, + "node_modules/assert": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.3.0.tgz", + "integrity": "sha512-5aKcpD+XnHpZ7EGxsuo6uoILNh0rvm0Ypa17GlkrF2CNSPhvdgi3ft9XsL2ajdVOI2I3xuGZnHvlXAeqTZYvXg==", + "dev": true, + "license": "MIT", + "dependencies": { + "util": "0.10.3" + } + }, + "node_modules/assert/node_modules/inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha512-8nWq2nLTAwd02jTqJExUYFSD/fKq6VH9Y/oG2accc/kdI0V98Bag8d5a4gi3XHz73rDWa2PvTtvcWYquKqSENA==", + "dev": true, + "license": "ISC" + }, + "node_modules/assert/node_modules/util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha512-5KiHfsmkqacuKjkRkdV7SsfDJ2EGiPsK92s2MhNSY0craxjTdKTtqKsJaCWp4LW33ZZ0OPUv1WO/TFvNQRiQxQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "2.0.1" + } + }, + "node_modules/astw": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/astw/-/astw-2.2.0.tgz", + "integrity": "sha512-E/4z//dvN0lfr8zAx8hXeQ8o3nRoQaL/wqI7fAALEvh/40mnyUxfFB9MwyDHYKVDtS3cp3Pow5s96djZR5lkWw==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^4.0.3" + } + }, + "node_modules/async": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "integrity": "sha512-l6ToIJIotphWahxxHyzK9bnLR6kM4jJIIgLShZeqLY7iboHoGkdgFl7W2/Ivi4SkMJYGKqW8vSuk0uKUj6qsSw==", + "license": "MIT" + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/axios": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.12.2.tgz", + "integrity": "sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.4", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/axios/node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/axios/node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/axios/node_modules/form-data": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", + "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/babel-jest": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-30.2.0.tgz", + "integrity": "sha512-0YiBEOxWqKkSQWL9nNGGEgndoeL0ZpWrbLMNL5u/Kaxrli3Eaxlt3ZtIDktEvXt4L/R9r3ODr2zKwGM/2BjxVw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/transform": "30.2.0", + "@types/babel__core": "^7.20.5", + "babel-plugin-istanbul": "^7.0.1", + "babel-preset-jest": "30.2.0", + "chalk": "^4.1.2", + "graceful-fs": "^4.2.11", + "slash": "^3.0.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.11.0 || ^8.0.0-0" + } + }, + "node_modules/babel-plugin-istanbul": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-7.0.1.tgz", + "integrity": "sha512-D8Z6Qm8jCvVXtIRkBnqNHX0zJ37rQcFJ9u8WOS6tkYOsRdHBzypCstaxWiu5ZIlqQtviRYbgnRLSoCEvjqcqbA==", + "dev": true, + "license": "BSD-3-Clause", + "workspaces": [ + "test/babel-8" + ], + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-instrument": "^6.0.2", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/babel-plugin-jest-hoist": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-30.2.0.tgz", + "integrity": "sha512-ftzhzSGMUnOzcCXd6WHdBGMyuwy15Wnn0iyyWGKgBDLxf9/s5ABuraCSpBX2uG0jUg4rqJnxsLc5+oYBqoxVaA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/babel__core": "^7.20.5" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/babel-preset-current-node-syntax": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.2.0.tgz", + "integrity": "sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5" + }, + "peerDependencies": { + "@babel/core": "^7.0.0 || ^8.0.0-0" + } + }, + "node_modules/babel-preset-jest": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-30.2.0.tgz", + "integrity": "sha512-US4Z3NOieAQumwFnYdUWKvUKh8+YSnS/gB3t6YBiz0bskpu7Pine8pPCheNxlPEW4wnUkma2a94YuW2q3guvCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-plugin-jest-hoist": "30.2.0", + "babel-preset-current-node-syntax": "^1.2.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.11.0 || ^8.0.0-beta.1" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/Base64": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz", + "integrity": "sha512-reGEWshDmTDQDsCec/HduOO9Wyj6yMOupMfhIf3ugN1TDlK2NQW4DDJSqNNtp380SNcvRfXtO8HSCQot0d0SMw==", + "dev": true + }, + "node_modules/base64-js": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz", + "integrity": "sha512-3XSA2cR/h/73EzlXXdU6YNycmYI7+kicTxks4eJg2g39biHR84slg2+des+p7iHYhbRg/udIS4TD53WabcOUkw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/baseline-browser-mapping": { + "version": "2.8.16", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.16.tgz", + "integrity": "sha512-OMu3BGQ4E7P1ErFsIPpbJh0qvDudM/UuJeHgkAvfWe+0HFJCXh+t/l8L6fVLR55RI/UbKrVLnAXZSVwd9ysWYw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.js" + } + }, + "node_modules/bluebird": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz", + "integrity": "sha512-UfFSr22dmHPQqPP9XWHRhq+gWnHCYguQGkXQlbyPtW5qTnhFWA8/iXg765tH0cAjy7l/zPJ1aBTO0g5XgA7kvQ==", + "license": "MIT" + }, + "node_modules/bn.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.2.tgz", + "integrity": "sha512-v2YAxEmKaBLahNwE1mjp4WON6huMNeuDvagFZW+ASCuA/ku0bXR9hSMw0XpiqMoA3+rmnyck/tPRSFQkoC9Cuw==", + "dev": true, + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", + "dev": true, + "license": "MIT" + }, + "node_modules/browser-pack": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-5.0.1.tgz", + "integrity": "sha512-BFMQuYXCcwr3Uvna1y1hikqd3r2dQpWIQBIN3m5YwE3ClfnXDeF3tqP6Wqjhs1LRUeBJpgHn8yD+fPX/YSEgMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "combine-source-map": "~0.6.1", + "defined": "^1.0.0", + "JSONStream": "^1.0.3", + "through2": "^1.0.0", + "umd": "^3.0.0" + }, + "bin": { + "browser-pack": "bin/cmd.js" + } + }, + "node_modules/browser-resolve": { + "version": "1.11.3", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz", + "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve": "1.1.7" + } + }, + "node_modules/browser-resolve/node_modules/resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg==", + "dev": true, + "license": "MIT" + }, + "node_modules/browserify": { + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/browserify/-/browserify-10.2.6.tgz", + "integrity": "sha512-rhKmIuWDcE1ULm6lrd3kQdUTqFsLd/UJp3yYt4Ur5rDzk/Gj2AH6+ZTNqkaMqwMphkf8Rp83S1GfMxtu9QjGDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "assert": "~1.3.0", + "browser-pack": "^5.0.0", + "browser-resolve": "^1.7.1", + "browserify-zlib": "~0.1.2", + "buffer": "^3.0.0", + "builtins": "~0.0.3", + "commondir": "0.0.1", + "concat-stream": "~1.4.1", + "console-browserify": "^1.1.0", + "constants-browserify": "~0.0.1", + "crypto-browserify": "^3.0.0", + "defined": "^1.0.0", + "deps-sort": "^1.3.7", + "domain-browser": "~1.1.0", + "duplexer2": "~0.0.2", + "events": "~1.0.0", + "glob": "^4.0.5", + "has": "^1.0.0", + "htmlescape": "^1.1.0", + "http-browserify": "^1.4.0", + "https-browserify": "~0.0.0", + "inherits": "~2.0.1", + "insert-module-globals": "^6.4.1", + "isarray": "0.0.1", + "JSONStream": "^1.0.3", + "labeled-stream-splicer": "^1.0.0", + "module-deps": "^3.7.11", + "os-browserify": "~0.1.1", + "parents": "^1.0.1", + "path-browserify": "~0.0.0", + "process": "~0.11.0", + "punycode": "^1.3.2", + "querystring-es3": "~0.2.0", + "read-only-stream": "^1.1.1", + "readable-stream": "^1.1.13", + "resolve": "^1.1.4", + "shasum": "^1.0.0", + "shell-quote": "~0.0.1", + "stream-browserify": "^1.0.0", + "string_decoder": "~0.10.0", + "subarg": "^1.0.0", + "syntax-error": "^1.1.1", + "through2": "^1.0.0", + "timers-browserify": "^1.0.1", + "tty-browserify": "~0.0.0", + "url": "~0.10.1", + "util": "~0.10.1", + "vm-browserify": "~0.0.1", + "xtend": "^4.0.0" + }, + "bin": { + "browserify": "bin/cmd.js" + } + }, + "node_modules/browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "node_modules/browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/browserify-rsa": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.1.tgz", + "integrity": "sha512-YBjSAiTqM04ZVei6sXighu679a3SqWORA3qZTEqZImnlkDIFtKc6pNutpjyZ8RJTjQtuYfeetkxM11GwoYXMIQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^5.2.1", + "randombytes": "^2.1.0", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/browserify-sign": { + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.5.tgz", + "integrity": "sha512-C2AUdAJg6rlM2W5QMp2Q4KGQMVBwR1lIimTsUnutJ8bMpW5B52pGpR2gEnNBNwijumDo5FojQ0L9JrXA8m4YEw==", + "dev": true, + "license": "ISC", + "dependencies": { + "bn.js": "^5.2.2", + "browserify-rsa": "^4.1.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.6.1", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.9", + "readable-stream": "^2.3.8", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/browserify-sign/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/browserify-sign/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==", + "dev": true, + "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/browserify-sign/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==", + "dev": true, + "license": "MIT" + }, + "node_modules/browserify-sign/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==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/browserify-sign/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==", + "dev": true, + "license": "MIT" + }, + "node_modules/browserify-zlib": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", + "integrity": "sha512-19OEpq7vWgsH6WkvkBJQDFvJS1uPcbFOQ4v9CU839dO+ZZXUZO6XpE6hNCqvlIIj+4fZvRiJ6DsAQ382GwiyTQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "pako": "~0.2.0" + } + }, + "node_modules/browserslist": { + "version": "4.26.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.26.3.tgz", + "integrity": "sha512-lAUU+02RFBuCKQPj/P6NgjlbCnLBMp4UtgTx7vNHd3XSIJF87s9a5rA3aH2yw3GS9DqZAUbOtZdCCiZeVRqt0w==", + "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.8.9", + "caniuse-lite": "^1.0.30001746", + "electron-to-chromium": "^1.5.227", + "node-releases": "^2.0.21", + "update-browserslist-db": "^1.1.3" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-json-stable-stringify": "2.x" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "node-int64": "^0.4.0" + } + }, + "node_modules/buffer": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-3.6.2.tgz", + "integrity": "sha512-c3M77NkHJxS0zx/ErxXhDLr1v3y2MDXPeTJPvLNOaIYJ4ymHBUFQ9EXzt9HYuqAJllMoNb/EZ8hIiulnQFAUuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "base64-js": "0.0.8", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/buffer/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/builtins": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-0.0.7.tgz", + "integrity": "sha512-T8uCGKc0/2aLVt6omt8JxDRBoWEMkku+wFesxnhxnt4NygVZG99zqxo7ciK8eebszceKamGoUiLdkXCgGQyrQw==", + "dev": true, + "license": "MIT" + }, + "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==", + "dev": true, + "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==", + "dev": true, + "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/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha512-wzLkDa4K/mzI1OSITC+DUyjgIl/ETNHE9QvYgy6J6Jvqyyz4C0Xfd+lQhb19sX2jMpZV4IssUn0VDVmglV+s4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001750", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001750.tgz", + "integrity": "sha512-cuom0g5sdX6rw00qOoLNSFCJ9/mYIsuSOA+yzpDw8eopiFqcVwQvZHqov0vmEighRxX++cfC0Vg1G+1Iy/mSpQ==", + "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/center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha512-Baz3aNe2gd2LP2qk5U+sDk/m4oSuwSDcBfayTCTBoWpfIGO5XFxPmjILQII4NGiZjD6DoDI6kf7gKaxkf7s3VQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/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==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/ci-info": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.3.1.tgz", + "integrity": "sha512-Wdy2Igu8OcBpI2pZePZ5oWjPC38tmDVx5WKUXKwlLYkA0ozo85sLsLvkBbBn/sZaSCMFOGZJ14fvW9t5/d7kdA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.4", + "safe-buffer": "^5.2.1", + "to-buffer": "^1.2.2" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/cjs-module-lexer": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.1.0.tgz", + "integrity": "sha512-UX0OwmYRYQQetfrLEZeewIFFI+wSTofC+pMBLNuH3RUuu/xzG1oz84UCEDOSoQlN3fZ4+AzmV50ZYvGqkMh9yA==", + "dev": true, + "license": "MIT" + }, + "node_modules/cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha512-GIOYRizG+TGoc7Wgc1LiOTLare95R3mzKgoln+Q/lE4ceiYH19gUpl0l0Ffq4lJDEf3FxujMe6IBfOCs7pfqNA==", + "dev": true, + "license": "ISC", + "dependencies": { + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" + } + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/collect-v8-coverage": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", + "dev": true, + "license": "MIT" + }, + "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==", + "dev": true, + "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==", + "dev": true, + "license": "MIT" + }, + "node_modules/combine-source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.6.1.tgz", + "integrity": "sha512-XKRNtuZRlVDTuSGKsfZpXYz80y0XDbYS4a+FzafTgmYHy/ckruFBx7Nd6WaQnFHVI3O6IseWVdXUvZutMpjSkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "convert-source-map": "~1.1.0", + "inline-source-map": "~0.5.0", + "lodash.memoize": "~3.0.3", + "source-map": "~0.4.2" + } + }, + "node_modules/combined-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz", + "integrity": "sha512-qfexlmLp9MyrkajQVyjEDb0Vj+KhRgR/rxLiVhaihlT+ZkX0lReqtH6Ack40CvMDERR4b5eFp3CreskpBs1Pig==", + "dependencies": { + "delayed-stream": "0.0.5" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commondir": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-0.0.1.tgz", + "integrity": "sha512-Ghe1LmLv3G3c0XJYu+c88MCRIPqWQ67qaqKY1KvuN4uPAjfUj+y4hvcpZ2kCPrjpRNyklW4dpAZZ8a7vOh50tg==", + "dev": true, + "license": "MIT/X11", + "engines": { + "node": "*" + } + }, + "node_modules/component-emitter": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.1.2.tgz", + "integrity": "sha512-YhIbp3PJiznERfjlIkK0ue4obZxt2S60+0W8z24ZymOHT8sHloOqWOqZRU2eN5OlY8U08VFsP02letcu26FilA==" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-stream": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.4.11.tgz", + "integrity": "sha512-X3JMh8+4je3U1cQpG87+f9lXHDrqcb2MVLg9L7o8b1UZ0DzhRrUpdn65ttzu10PpJPPI3MQNkis+oha6TSA9Mw==", + "dev": true, + "engines": [ + "node >= 0.8" + ], + "license": "MIT", + "dependencies": { + "inherits": "~2.0.1", + "readable-stream": "~1.1.9", + "typedarray": "~0.0.5" + } + }, + "node_modules/console-browserify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", + "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", + "dev": true + }, + "node_modules/constants-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-0.0.1.tgz", + "integrity": "sha512-FL+diDS9AKR5BAA2M+GNk8lnH64tRE3zepTG9hucxc7o04LgCRhkQZhF7u/OKHZT8LLRT+sZEi9qFzXUchq9pA==", + "dev": true, + "license": "MIT" + }, + "node_modules/convert-source-map": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", + "integrity": "sha512-Y8L5rp6jo+g9VEPgvqNfEopjTR4OTYct8lXlS8iVQdmnjDvbdbzYe9rjtFCB9egC86JoNCU61WRY+ScjkZpnIg==", + "dev": true, + "license": "MIT" + }, + "node_modules/cookiejar": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.0.1.tgz", + "integrity": "sha512-Txnl7P7okmx/FyZNRAjPyHMKISV2ADNbd+xITouEVyl2jUczrU4tJT40KcfQL/ifCo0kqqLgD49QlNofAAmBKQ==", + "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-ecdh": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" + } + }, + "node_modules/create-ecdh/node_modules/bn.js": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", + "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", + "dev": true, + "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==", + "dev": true, + "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==", + "dev": true, + "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-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/crypto-browserify": { + "version": "3.12.1", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.1.tgz", + "integrity": "sha512-r4ESw/IlusD17lgQi1O20Fa3qNnsckR126TdUuBgAu7GBYSIPvdNyONd3Zrxh0xCwA4+6w/TDArBPsMvhur+KQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "browserify-cipher": "^1.0.1", + "browserify-sign": "^4.2.3", + "create-ecdh": "^4.0.4", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "diffie-hellman": "^5.0.3", + "hash-base": "~3.0.4", + "inherits": "^2.0.4", + "pbkdf2": "^3.1.2", + "public-encrypt": "^4.0.3", + "randombytes": "^2.1.0", + "randomfill": "^1.0.4" + }, + "engines": { + "node": ">= 0.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/debug": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-1.0.5.tgz", + "integrity": "sha512-SIKSrp4+XqcUaNWhwaPJbLFnvSXPsZ4xBdH2WRK0Xo++UzMC4eepYghGAVhVhOwmfq3kqowqJ5w45R3pmYZnuA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/dedent": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.0.tgz", + "integrity": "sha512-HGFtf8yhuhGhqO07SV79tRp+br4MnbdjeVxotpn1QBl30pcLLCQjX5b2295ll0fv8RKDKsmWYrl05usHM9CewQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.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==", + "dev": true, + "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/defined": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.1.tgz", + "integrity": "sha512-hsBd2qSVCRE+5PmNdHt1uzyrFu5d3RwmFDKzyNZMFq/EwDNJF7Ee5+D5oEKF0hU6LhtoUF1macFvOe4AskQC1Q==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/delayed-stream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz", + "integrity": "sha512-v+7uBd1pqe5YtgPacIIbZ8HuHeLFVNe4mUEyFDXL6KiqzEykjbw+5mXZXpGFgNVasdL4jWKgaKIXrEHiynN1LA==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/deps-sort": { + "version": "1.3.9", + "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-1.3.9.tgz", + "integrity": "sha512-aEnmQuu/Hf5h8akL8QshYWzk9MVBg/JYMyNq/Lz68i69nR17tunjP6o/AC6Tn48c8ayzG6aeKs6OoFOtVCtvrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "JSONStream": "^1.0.3", + "shasum": "^1.0.0", + "subarg": "^1.0.0", + "through2": "^1.0.0" + }, + "bin": { + "deps-sort": "bin/cmd.js" + } + }, + "node_modules/des.js": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.1.0.tgz", + "integrity": "sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/detective": { + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/detective/-/detective-4.7.1.tgz", + "integrity": "sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^5.2.1", + "defined": "^1.0.0" + } + }, + "node_modules/detective/node_modules/acorn": { + "version": "5.7.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", + "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "node_modules/diffie-hellman/node_modules/bn.js": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", + "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", + "dev": true, + "license": "MIT" + }, + "node_modules/domain-browser": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz", + "integrity": "sha512-fJ5MoHxe69h3E4/lJtFRhcWwLb04bhIBSfvCEMS1YDH+/9yEZTqBHTSTgch8nCP5tE5k2gdQEjodUqJzy7qJ9Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4", + "npm": ">=1.2" + } + }, + "node_modules/dotenv": { + "version": "17.2.3", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.3.tgz", + "integrity": "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w==", + "dev": true, + "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/duplexer2": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", + "integrity": "sha512-+AWBwjGadtksxjOQSFDhPNQbed7icNXApT4+2BNpsXzcCBiInq2H9XW0O8sfHFaPmnQRs7cg/P0fAr2IWQSW0g==", + "dev": true, + "license": "BSD", + "dependencies": { + "readable-stream": "~1.1.9" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, + "node_modules/electron-to-chromium": { + "version": "1.5.234", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.234.tgz", + "integrity": "sha512-RXfEp2x+VRYn8jbKfQlRImzoJU01kyDvVPBmG39eU2iuRVhuS6vQNocB8J0/8GrIMLnPzgz4eW6WiRnJkTuNWg==", + "dev": true, + "license": "ISC" + }, + "node_modules/elliptic": { + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", + "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/elliptic/node_modules/bn.js": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", + "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", + "dev": true, + "license": "MIT" + }, + "node_modules/emittery": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/error-ex": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", + "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "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-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/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "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/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/events": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/events/-/events-1.0.2.tgz", + "integrity": "sha512-XK19KwlDJo8XsceooxNDK1pObtcT44+Xte6V/jQc4a+fHq1qEouThyyX2ePmS0hS8RcCulmRxzg+T8jiLKAFFQ==", + "dev": true, + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/execa/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/exit-x": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/exit-x/-/exit-x-0.2.2.tgz", + "integrity": "sha512-+I6B/IkJc1o/2tiURyz/ivu/O0nKNEArIUB5O7zBrlDVJr22SCLH3xTeEry428LvFhRzIA1g8izguxJ/gbNcVQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/expect": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-30.2.0.tgz", + "integrity": "sha512-u/feCi0GPsI+988gU2FLcsHyAHTU0MX1Wg68NhAnN7z/+C5wqG+CY8J53N9ioe8RXgaoz0nBR/TYMf3AycUuPw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/expect-utils": "30.2.0", + "@jest/get-type": "30.1.0", + "jest-matcher-utils": "30.2.0", + "jest-message-util": "30.2.0", + "jest-mock": "30.2.0", + "jest-util": "30.2.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/extend": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-1.2.1.tgz", + "integrity": "sha512-2/JwIYRpMBDSjbQjUUppNSrmc719crhFaWIdT+TRSVA8gE+6HEobQWqJ6VkPt/H8twS7h/0WWs7veh8wmp98Ng==" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "bser": "2.1.1" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", + "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/for-each": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/form-data": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-0.1.3.tgz", + "integrity": "sha512-khpfkwI/RQybQdwruvz89OCmcXiFZstZ88llcc552BrzvOhqIOHC6YCRJ44GLK7BRFBEMGH9zJ2zMy0nz27Y9w==", + "dependencies": { + "async": "~0.9.0", + "combined-stream": "~0.0.4", + "mime": "~1.2.11" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/formidable": { + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.0.14.tgz", + "integrity": "sha512-aOskFHEfYwkSKSzGui5jhQ+uyLo2NTwpzhndggz2YZHlv0HkAi+zG5ZEBCL3GTvqLyr/FzX9Mvx9DueCmu2HzQ==", + "deprecated": "Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "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/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/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==", + "dev": true, + "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-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, + "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-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", + "integrity": "sha512-I0rTWUKSZKxPSIAIaqhSXTM/DiII6wame+rEC3cFA5Lqmr9YmdL7z6Hj9+bdWtTvoY1Su4/OiMLmb37Y7JzvJQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^2.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": "*" + } + }, + "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/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/handlebars": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/handlebars/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/handlebars/node_modules/uglify-js": { + "version": "3.19.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", + "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==", + "dev": true, + "license": "BSD-2-Clause", + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/handlebars/node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/has": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", + "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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==", + "dev": true, + "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.0.5", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.5.tgz", + "integrity": "sha512-vXm0l45VbcHEVlTCzs8M+s0VeYsB2lnlAaThoLKGXr3bE/VWDOelNUnycUPEhKEaXARL2TEFjBOyUiM6+55KBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.4", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "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/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "dev": true, + "license": "MIT", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true, + "license": "MIT" + }, + "node_modules/htmlescape": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", + "integrity": "sha512-eVcrzgbR4tim7c7soKQKtxa/kQM4TzjnlU83rcZ9bHU6t31ehfV7SktN6McWgwPWg+JYMA/O3qpGxBvFq1z2Jg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/http-browserify": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/http-browserify/-/http-browserify-1.7.0.tgz", + "integrity": "sha512-Irf/LJXmE3cBzU1eaR4+NEX6bmVLqt1wkmDiA7kBwH7zmb0D8kBAXsDmQ88hhj/qv9iEZKlyGx/hrMcFi8sOHw==", + "dev": true, + "license": "MIT/X11", + "dependencies": { + "Base64": "~0.2.0", + "inherits": "~2.0.1" + } + }, + "node_modules/https-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz", + "integrity": "sha512-EjDQFbgJr1vDD/175UJeSX3ncQ3+RUnCL5NkthQGHvF4VNHlzTy8ifJfTqz47qiPRqaFH58+CbuG3x51WuB1XQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.17.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==", + "dev": true, + "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/import-local": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha512-i0G7hLJ1z0DE8dsqJa2rycj9dBmNKgXBvotXtZYXakU9oivfB9Uj2ZBC27qqef2U58/ZLwalxa1X/RDCdkHtVg==", + "dev": true + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "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/inline-source-map": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.5.0.tgz", + "integrity": "sha512-2WtHG0qX9OH9TVcxsLVfq3Tzr+qtL6PtWgoh0XAAKe4KkdA/57Q+OGJuRJHA4mZ2OZnkJ/ZAaXf9krLB12/nIg==", + "dev": true, + "license": "MIT", + "dependencies": { + "source-map": "~0.4.0" + } + }, + "node_modules/insert-module-globals": { + "version": "6.6.3", + "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-6.6.3.tgz", + "integrity": "sha512-ryk8hTKUZCc300SPOOwx30WhE5oRUssPDVlIoO8vtoMNBy5HGeesVRl3HF7ra4ll42T0IdnwD9XR9svh6+RRhg==", + "dev": true, + "license": "MIT", + "dependencies": { + "combine-source-map": "~0.6.1", + "concat-stream": "~1.4.1", + "is-buffer": "^1.1.0", + "JSONStream": "^1.0.3", + "lexical-scope": "^1.2.0", + "process": "~0.11.0", + "through2": "^1.0.0", + "xtend": "^4.0.0" + }, + "bin": { + "insert-module-globals": "bin/cmd.js" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true, + "license": "MIT" + }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", + "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz", + "integrity": "sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.23", + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-source-maps/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/istanbul-lib-source-maps/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/istanbul-reports": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz", + "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jackspeak": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz", + "integrity": "sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/jest": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-30.2.0.tgz", + "integrity": "sha512-F26gjC0yWN8uAA5m5Ss8ZQf5nDHWGlN/xWZIh8S5SRbsEKBovwZhxGd6LJlbZYxBgCYOtreSUyb8hpXyGC5O4A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/core": "30.2.0", + "@jest/types": "30.2.0", + "import-local": "^3.2.0", + "jest-cli": "30.2.0" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-changed-files": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-30.2.0.tgz", + "integrity": "sha512-L8lR1ChrRnSdfeOvTrwZMlnWV8G/LLjQ0nG9MBclwWZidA2N5FviRki0Bvh20WRMOX31/JYvzdqTJrk5oBdydQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "execa": "^5.1.1", + "jest-util": "30.2.0", + "p-limit": "^3.1.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-circus": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-30.2.0.tgz", + "integrity": "sha512-Fh0096NC3ZkFx05EP2OXCxJAREVxj1BcW/i6EWqqymcgYKWjyyDpral3fMxVcHXg6oZM7iULer9wGRFvfpl+Tg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "30.2.0", + "@jest/expect": "30.2.0", + "@jest/test-result": "30.2.0", + "@jest/types": "30.2.0", + "@types/node": "*", + "chalk": "^4.1.2", + "co": "^4.6.0", + "dedent": "^1.6.0", + "is-generator-fn": "^2.1.0", + "jest-each": "30.2.0", + "jest-matcher-utils": "30.2.0", + "jest-message-util": "30.2.0", + "jest-runtime": "30.2.0", + "jest-snapshot": "30.2.0", + "jest-util": "30.2.0", + "p-limit": "^3.1.0", + "pretty-format": "30.2.0", + "pure-rand": "^7.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.6" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-cli": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-30.2.0.tgz", + "integrity": "sha512-Os9ukIvADX/A9sLt6Zse3+nmHtHaE6hqOsjQtNiugFTbKRHYIYtZXNGNK9NChseXy7djFPjndX1tL0sCTlfpAA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/core": "30.2.0", + "@jest/test-result": "30.2.0", + "@jest/types": "30.2.0", + "chalk": "^4.1.2", + "exit-x": "^0.2.2", + "import-local": "^3.2.0", + "jest-config": "30.2.0", + "jest-util": "30.2.0", + "jest-validate": "30.2.0", + "yargs": "^17.7.2" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-cli/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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-cli/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==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-cli/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==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/jest-cli/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==", + "dev": true, + "license": "MIT" + }, + "node_modules/jest-cli/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==", + "dev": 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/jest-cli/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==", + "dev": true, "license": "MIT", "dependencies": { - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" + "ansi-regex": "^5.0.1" }, "engines": { - "node": ">= 0.4" + "node": ">=8" } }, - "node_modules/events": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/events/-/events-1.0.2.tgz", - "integrity": "sha512-XK19KwlDJo8XsceooxNDK1pObtcT44+Xte6V/jQc4a+fHq1qEouThyyX2ePmS0hS8RcCulmRxzg+T8jiLKAFFQ==", + "node_modules/jest-cli/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==", "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, "engines": { - "node": ">=0.4.x" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "node_modules/jest-cli/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, "license": "MIT", "dependencies": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" + "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/extend": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-1.2.1.tgz", - "integrity": "sha512-2/JwIYRpMBDSjbQjUUppNSrmc719crhFaWIdT+TRSVA8gE+6HEobQWqJ6VkPt/H8twS7h/0WWs7veh8wmp98Ng==" - }, - "node_modules/follow-redirects": { - "version": "1.15.11", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", - "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "license": "MIT", + "node_modules/jest-config": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-30.2.0.tgz", + "integrity": "sha512-g4WkyzFQVWHtu6uqGmQR4CQxz/CH3yDSlhzXMWzNjDx843gYjReZnMRanjRCq5XZFuQrGDxgUaiYWE8BRfVckA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.27.4", + "@jest/get-type": "30.1.0", + "@jest/pattern": "30.0.1", + "@jest/test-sequencer": "30.2.0", + "@jest/types": "30.2.0", + "babel-jest": "30.2.0", + "chalk": "^4.1.2", + "ci-info": "^4.2.0", + "deepmerge": "^4.3.1", + "glob": "^10.3.10", + "graceful-fs": "^4.2.11", + "jest-circus": "30.2.0", + "jest-docblock": "30.2.0", + "jest-environment-node": "30.2.0", + "jest-regex-util": "30.0.1", + "jest-resolve": "30.2.0", + "jest-runner": "30.2.0", + "jest-util": "30.2.0", + "jest-validate": "30.2.0", + "micromatch": "^4.0.8", + "parse-json": "^5.2.0", + "pretty-format": "30.2.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, "engines": { - "node": ">=4.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + }, + "peerDependencies": { + "@types/node": "*", + "esbuild-register": ">=3.4.0", + "ts-node": ">=9.0.0" }, "peerDependenciesMeta": { - "debug": { + "@types/node": { + "optional": true + }, + "esbuild-register": { + "optional": true + }, + "ts-node": { "optional": true } } }, - "node_modules/for-each": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", - "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", + "node_modules/jest-config/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", "dependencies": { - "is-callable": "^1.2.7" + "balanced-match": "^1.0.0" + } + }, + "node_modules/jest-config/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" }, - "engines": { - "node": ">= 0.4" + "bin": { + "glob": "dist/esm/bin.mjs" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/foreground-child": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", - "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "node_modules/jest-config/node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "dependencies": { - "cross-spawn": "^7.0.6", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" + "@isaacs/cliui": "^8.0.2" }, "funding": { "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" } }, - "node_modules/form-data": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-0.1.3.tgz", - "integrity": "sha512-khpfkwI/RQybQdwruvz89OCmcXiFZstZ88llcc552BrzvOhqIOHC6YCRJ44GLK7BRFBEMGH9zJ2zMy0nz27Y9w==", + "node_modules/jest-config/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/jest-config/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", "dependencies": { - "async": "~0.9.0", - "combined-stream": "~0.0.4", - "mime": "~1.2.11" + "brace-expansion": "^2.0.1" }, "engines": { - "node": ">= 0.8" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/formidable": { - "version": "1.0.14", - "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.0.14.tgz", - "integrity": "sha512-aOskFHEfYwkSKSzGui5jhQ+uyLo2NTwpzhndggz2YZHlv0HkAi+zG5ZEBCL3GTvqLyr/FzX9Mvx9DueCmu2HzQ==", - "deprecated": "Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau", + "node_modules/jest-config/node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, "engines": { - "node": ">=0.8.0" + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "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==", + "node_modules/jest-diff": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-30.2.0.tgz", + "integrity": "sha512-dQHFo3Pt4/NLlG5z4PxZ/3yZTZ1C7s9hveiOj+GCN+uT109NC2QgsoVZsVOAvbJ3RgKkvyLGXZV9+piDpWbm6A==", + "dev": true, "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" + "dependencies": { + "@jest/diff-sequences": "30.0.1", + "@jest/get-type": "30.1.0", + "chalk": "^4.1.2", + "pretty-format": "30.2.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "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==", + "node_modules/jest-docblock": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-30.2.0.tgz", + "integrity": "sha512-tR/FFgZKS1CXluOQzZvNH3+0z9jXr3ldGSD8bhyuxvlVUwbeLOGynkunvlTMxchC5urrKndYiwCFC0DLVjpOCA==", + "dev": true, "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" + "detect-newline": "^3.1.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "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==", + "node_modules/jest-each": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-30.2.0.tgz", + "integrity": "sha512-lpWlJlM7bCUf1mfmuqTA8+j2lNURW9eNafOy99knBM01i5CQeY5UH1vZjgT9071nDJac1M4XsbyI44oNOdhlDQ==", + "dev": true, "license": "MIT", "dependencies": { - "dunder-proto": "^1.0.1", - "es-object-atoms": "^1.0.0" + "@jest/get-type": "30.1.0", + "@jest/types": "30.2.0", + "chalk": "^4.1.2", + "jest-util": "30.2.0", + "pretty-format": "30.2.0" }, "engines": { - "node": ">= 0.4" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/glob": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", - "integrity": "sha512-I0rTWUKSZKxPSIAIaqhSXTM/DiII6wame+rEC3cFA5Lqmr9YmdL7z6Hj9+bdWtTvoY1Su4/OiMLmb37Y7JzvJQ==", - "deprecated": "Glob versions prior to v9 are no longer supported", + "node_modules/jest-environment-node": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-30.2.0.tgz", + "integrity": "sha512-ElU8v92QJ9UrYsKrxDIKCxu6PfNj4Hdcktcn0JX12zqNdqWHB0N+hwOnnBBXvjLd2vApZtuLUGs1QSY+MsXoNA==", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^2.0.1", - "once": "^1.3.0" + "@jest/environment": "30.2.0", + "@jest/fake-timers": "30.2.0", + "@jest/types": "30.2.0", + "@types/node": "*", + "jest-mock": "30.2.0", + "jest-util": "30.2.0", + "jest-validate": "30.2.0" }, "engines": { - "node": "*" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/gopd": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", - "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "node_modules/jest-haste-map": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-30.2.0.tgz", + "integrity": "sha512-sQA/jCb9kNt+neM0anSj6eZhLZUIhQgwDt7cPGjumgLM4rXsfb9kpnlacmvZz3Q5tb80nS+oG/if+NBKrHC+Xw==", + "dev": true, "license": "MIT", + "dependencies": { + "@jest/types": "30.2.0", + "@types/node": "*", + "anymatch": "^3.1.3", + "fb-watchman": "^2.0.2", + "graceful-fs": "^4.2.11", + "jest-regex-util": "30.0.1", + "jest-util": "30.2.0", + "jest-worker": "30.2.0", + "micromatch": "^4.0.8", + "walker": "^1.0.8" + }, "engines": { - "node": ">= 0.4" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "optionalDependencies": { + "fsevents": "^2.3.3" } }, - "node_modules/has": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", - "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==", + "node_modules/jest-leak-detector": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-30.2.0.tgz", + "integrity": "sha512-M6jKAjyzjHG0SrQgwhgZGy9hFazcudwCNovY/9HPIicmNSBuockPSedAP9vlPK6ONFJ1zfyH/M2/YYJxOz5cdQ==", "dev": true, "license": "MIT", + "dependencies": { + "@jest/get-type": "30.1.0", + "pretty-format": "30.2.0" + }, "engines": { - "node": ">= 0.4.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "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==", + "node_modules/jest-matcher-utils": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-30.2.0.tgz", + "integrity": "sha512-dQ94Nq4dbzmUWkQ0ANAWS9tBRfqCrn0bV9AMYdOi/MHW726xn7eQmMeRTpX2ViC00bpNaWXq+7o4lIQ3AX13Hg==", "dev": true, "license": "MIT", "dependencies": { - "es-define-property": "^1.0.0" + "@jest/get-type": "30.1.0", + "chalk": "^4.1.2", + "jest-diff": "30.2.0", + "pretty-format": "30.2.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "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==", + "node_modules/jest-message-util": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.2.0.tgz", + "integrity": "sha512-y4DKFLZ2y6DxTWD4cDe07RglV88ZiNEdlRfGtqahfbIjfsw1nMCPx49Uev4IA/hWn3sDKyAnSPwoYSsAEdcimw==", + "dev": true, "license": "MIT", - "engines": { - "node": ">= 0.4" + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@jest/types": "30.2.0", + "@types/stack-utils": "^2.0.3", + "chalk": "^4.1.2", + "graceful-fs": "^4.2.11", + "micromatch": "^4.0.8", + "pretty-format": "30.2.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.6" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "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==", + "node_modules/jest-mock": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.2.0.tgz", + "integrity": "sha512-JNNNl2rj4b5ICpmAcq+WbLH83XswjPbjH4T7yvGzfAGCPh1rw+xVNbtk+FnRslvt9lkCcdn9i1oAoKUuFsOxRw==", + "dev": true, "license": "MIT", "dependencies": { - "has-symbols": "^1.0.3" + "@jest/types": "30.2.0", + "@types/node": "*", + "jest-util": "30.2.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/hash-base": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.5.tgz", - "integrity": "sha512-vXm0l45VbcHEVlTCzs8M+s0VeYsB2lnlAaThoLKGXr3bE/VWDOelNUnycUPEhKEaXARL2TEFjBOyUiM6+55KBg==", + "node_modules/jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", "dev": true, "license": "MIT", - "dependencies": { - "inherits": "^2.0.4", - "safe-buffer": "^5.2.1" + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "node_modules/jest-regex-util": { + "version": "30.0.1", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-30.0.1.tgz", + "integrity": "sha512-jHEQgBXAgc+Gh4g0p3bCevgRCVRkB4VB70zhoAE48gxeSr1hfUOsM/C2WoJgVL7Eyg//hudYENbm3Ne+/dRVVA==", + "dev": true, + "license": "MIT", "engines": { - "node": ">= 0.10" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "node_modules/jest-resolve": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-30.2.0.tgz", + "integrity": "sha512-TCrHSxPlx3tBY3hWNtRQKbtgLhsXa1WmbJEqBlTBrGafd5fiQFByy2GNCEoGR+Tns8d15GaL9cxEzKOO3GEb2A==", "dev": true, "license": "MIT", "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" + "chalk": "^4.1.2", + "graceful-fs": "^4.2.11", + "jest-haste-map": "30.2.0", + "jest-pnp-resolver": "^1.2.3", + "jest-util": "30.2.0", + "jest-validate": "30.2.0", + "slash": "^3.0.0", + "unrs-resolver": "^1.7.11" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "node_modules/jest-resolve-dependencies": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-30.2.0.tgz", + "integrity": "sha512-xTOIGug/0RmIe3mmCqCT95yO0vj6JURrn1TKWlNbhiAefJRWINNPgwVkrVgt/YaerPzY3iItufd80v3lOrFJ2w==", + "dev": true, "license": "MIT", "dependencies": { - "function-bind": "^1.1.2" + "jest-regex-util": "30.0.1", + "jest-snapshot": "30.2.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-runner": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-30.2.0.tgz", + "integrity": "sha512-PqvZ2B2XEyPEbclp+gV6KO/F1FIFSbIwewRgmROCMBo/aZ6J1w8Qypoj2pEOcg3G2HzLlaP6VUtvwCI8dM3oqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "30.2.0", + "@jest/environment": "30.2.0", + "@jest/test-result": "30.2.0", + "@jest/transform": "30.2.0", + "@jest/types": "30.2.0", + "@types/node": "*", + "chalk": "^4.1.2", + "emittery": "^0.13.1", + "exit-x": "^0.2.2", + "graceful-fs": "^4.2.11", + "jest-docblock": "30.2.0", + "jest-environment-node": "30.2.0", + "jest-haste-map": "30.2.0", + "jest-leak-detector": "30.2.0", + "jest-message-util": "30.2.0", + "jest-resolve": "30.2.0", + "jest-runtime": "30.2.0", + "jest-util": "30.2.0", + "jest-watcher": "30.2.0", + "jest-worker": "30.2.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" }, "engines": { - "node": ">= 0.4" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-runtime": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-30.2.0.tgz", + "integrity": "sha512-p1+GVX/PJqTucvsmERPMgCPvQJpFt4hFbM+VN3n8TMo47decMUcJbt+rgzwrEme0MQUA/R+1de2axftTHkKckg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "30.2.0", + "@jest/fake-timers": "30.2.0", + "@jest/globals": "30.2.0", + "@jest/source-map": "30.0.1", + "@jest/test-result": "30.2.0", + "@jest/transform": "30.2.0", + "@jest/types": "30.2.0", + "@types/node": "*", + "chalk": "^4.1.2", + "cjs-module-lexer": "^2.1.0", + "collect-v8-coverage": "^1.0.2", + "glob": "^10.3.10", + "graceful-fs": "^4.2.11", + "jest-haste-map": "30.2.0", + "jest-message-util": "30.2.0", + "jest-mock": "30.2.0", + "jest-regex-util": "30.0.1", + "jest-resolve": "30.2.0", + "jest-snapshot": "30.2.0", + "jest-util": "30.2.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "node_modules/jest-runtime/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", "dependencies": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" + "balanced-match": "^1.0.0" } }, - "node_modules/htmlescape": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", - "integrity": "sha512-eVcrzgbR4tim7c7soKQKtxa/kQM4TzjnlU83rcZ9bHU6t31ehfV7SktN6McWgwPWg+JYMA/O3qpGxBvFq1z2Jg==", + "node_modules/jest-runtime/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10" + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/http-browserify": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/http-browserify/-/http-browserify-1.7.0.tgz", - "integrity": "sha512-Irf/LJXmE3cBzU1eaR4+NEX6bmVLqt1wkmDiA7kBwH7zmb0D8kBAXsDmQ88hhj/qv9iEZKlyGx/hrMcFi8sOHw==", + "node_modules/jest-runtime/node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", "dev": true, - "license": "MIT/X11", + "license": "BlueOak-1.0.0", "dependencies": { - "Base64": "~0.2.0", - "inherits": "~2.0.1" + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" } }, - "node_modules/https-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz", - "integrity": "sha512-EjDQFbgJr1vDD/175UJeSX3ncQ3+RUnCL5NkthQGHvF4VNHlzTy8ifJfTqz47qiPRqaFH58+CbuG3x51WuB1XQ==", + "node_modules/jest-runtime/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", "dev": true, - "license": "MIT" + "license": "ISC" }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "node_modules/jest-runtime/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, - "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/indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha512-i0G7hLJ1z0DE8dsqJa2rycj9dBmNKgXBvotXtZYXakU9oivfB9Uj2ZBC27qqef2U58/ZLwalxa1X/RDCdkHtVg==", - "dev": true + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "node_modules/jest-runtime/node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "dependencies": { - "once": "^1.3.0", - "wrappy": "1" + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "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/jest-snapshot": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-30.2.0.tgz", + "integrity": "sha512-5WEtTy2jXPFypadKNpbNkZ72puZCa6UjSr/7djeecHWOu7iYhSXSnHScT8wBz3Rn8Ena5d5RYRcsyKIeqG1IyA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.27.4", + "@babel/generator": "^7.27.5", + "@babel/plugin-syntax-jsx": "^7.27.1", + "@babel/plugin-syntax-typescript": "^7.27.1", + "@babel/types": "^7.27.3", + "@jest/expect-utils": "30.2.0", + "@jest/get-type": "30.1.0", + "@jest/snapshot-utils": "30.2.0", + "@jest/transform": "30.2.0", + "@jest/types": "30.2.0", + "babel-preset-current-node-syntax": "^1.2.0", + "chalk": "^4.1.2", + "expect": "30.2.0", + "graceful-fs": "^4.2.11", + "jest-diff": "30.2.0", + "jest-matcher-utils": "30.2.0", + "jest-message-util": "30.2.0", + "jest-util": "30.2.0", + "pretty-format": "30.2.0", + "semver": "^7.7.2", + "synckit": "^0.11.8" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } }, - "node_modules/inline-source-map": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.5.0.tgz", - "integrity": "sha512-2WtHG0qX9OH9TVcxsLVfq3Tzr+qtL6PtWgoh0XAAKe4KkdA/57Q+OGJuRJHA4mZ2OZnkJ/ZAaXf9krLB12/nIg==", + "node_modules/jest-snapshot/node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jest-util": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.2.0.tgz", + "integrity": "sha512-QKNsM0o3Xe6ISQU869e+DhG+4CK/48aHYdJZGlFQVTjnbvgpcKyxpzk29fGiO7i/J8VENZ+d2iGnSsvmuHywlA==", "dev": true, "license": "MIT", "dependencies": { - "source-map": "~0.4.0" + "@jest/types": "30.2.0", + "@types/node": "*", + "chalk": "^4.1.2", + "ci-info": "^4.2.0", + "graceful-fs": "^4.2.11", + "picomatch": "^4.0.2" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/insert-module-globals": { - "version": "6.6.3", - "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-6.6.3.tgz", - "integrity": "sha512-ryk8hTKUZCc300SPOOwx30WhE5oRUssPDVlIoO8vtoMNBy5HGeesVRl3HF7ra4ll42T0IdnwD9XR9svh6+RRhg==", + "node_modules/jest-util/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", - "dependencies": { - "combine-source-map": "~0.6.1", - "concat-stream": "~1.4.1", - "is-buffer": "^1.1.0", - "JSONStream": "^1.0.3", - "lexical-scope": "^1.2.0", - "process": "~0.11.0", - "through2": "^1.0.0", - "xtend": "^4.0.0" + "engines": { + "node": ">=12" }, - "bin": { - "insert-module-globals": "bin/cmd.js" + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "node_modules/jest-validate": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-30.2.0.tgz", + "integrity": "sha512-FBGWi7dP2hpdi8nBoWxSsLvBFewKAg0+uSQwBaof4Y4DPgBabXgpSYC5/lR7VmnIlSpASmCi/ntRWPbv7089Pw==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "@jest/get-type": "30.1.0", + "@jest/types": "30.2.0", + "camelcase": "^6.3.0", + "chalk": "^4.1.2", + "leven": "^3.1.0", + "pretty-format": "30.2.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } }, - "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==", + "node_modules/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, "license": "MIT", "engines": { - "node": ">= 0.4" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-core-module": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", - "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "node_modules/jest-watcher": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-30.2.0.tgz", + "integrity": "sha512-PYxa28dxJ9g777pGm/7PrbnMeA0Jr7osHP9bS7eJy9DuAjMgdGtxgf0uKMyoIsTWAkIbUW5hSDdJ3urmgXBqxg==", "dev": true, "license": "MIT", "dependencies": { - "hasown": "^2.0.2" + "@jest/test-result": "30.2.0", + "@jest/types": "30.2.0", + "@types/node": "*", + "ansi-escapes": "^4.3.2", + "chalk": "^4.1.2", + "emittery": "^0.13.1", + "jest-util": "30.2.0", + "string-length": "^4.0.2" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.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==", + "node_modules/jest-worker": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-30.2.0.tgz", + "integrity": "sha512-0Q4Uk8WF7BUwqXHuAjc23vmopWJw5WH7w2tqBoUOZpOjW/ZnR44GXXd1r82RvnmI2GZge3ivrYXk/BE2+VtW2g==", "dev": true, "license": "MIT", + "dependencies": { + "@types/node": "*", + "@ungap/structured-clone": "^1.3.0", + "jest-util": "30.2.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.1.1" + }, "engines": { - "node": ">=8" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "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==", + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "license": "MIT", "dependencies": { - "which-typed-array": "^1.1.16" + "has-flag": "^4.0.0" }, "engines": { - "node": ">= 0.4" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "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==", + "dev": true, "license": "MIT" }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, - "license": "ISC" + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } }, - "node_modules/jackspeak": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz", - "integrity": "sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==", + "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": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" }, "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">=6" } }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true, + "license": "MIT" + }, "node_modules/json-stable-stringify": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", @@ -1639,6 +5042,19 @@ "jsonify": "~0.0.0" } }, + "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/jsonify": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz", @@ -1711,6 +5127,16 @@ "node": ">=0.10.0" } }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/lexical-scope": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/lexical-scope/-/lexical-scope-1.2.0.tgz", @@ -1721,6 +5147,26 @@ "astw": "^2.0.0" } }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/lodash.memoize": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", @@ -1738,14 +5184,60 @@ "node": ">=0.10.0" } }, - "node_modules/lru-cache": { - "version": "11.2.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz", - "integrity": "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==", + "node_modules/lru-cache": { + "version": "11.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz", + "integrity": "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "dev": true, "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, "engines": { - "node": "20 || >=22" + "node": ">=10" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "license": "ISC" + }, + "node_modules/makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "tmpl": "1.0.5" } }, "node_modules/math-intrinsics": { @@ -1769,12 +5261,33 @@ "safe-buffer": "^5.1.2" } }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true, + "license": "MIT" + }, "node_modules/methods": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/methods/-/methods-1.0.1.tgz", "integrity": "sha512-2403MfnVypWSNIEpmQ26/ObZ5kSUx37E8NHRvriw0+I8Sne7k0HGuLGCk0OrCqURh4UIygD0cSsYq+Ll+kzNqA==", "license": "MIT" }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, "node_modules/miller-rabin": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", @@ -1822,6 +5335,16 @@ "node": ">= 0.6" } }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -1905,6 +5428,73 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "license": "MIT" }, + "node_modules/napi-postinstall": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.4.tgz", + "integrity": "sha512-PHI5f1O0EP5xJ9gQmFGMS6IZcrVvTjpXjz7Na41gTE7eE2hK11lg04CECCYEEjdc17EV4DO+fkGEtt7TpTaTiQ==", + "dev": true, + "license": "MIT", + "bin": { + "napi-postinstall": "lib/cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/napi-postinstall" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-releases": { + "version": "2.0.23", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.23.tgz", + "integrity": "sha512-cCmFDMSm26S6tQSDpBCg/NR8NENrVPhAJSf+XbxBG4rPFaaonlEoE9wHQmun+cls499TQGSb7ZyPBRlzgKfpeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -1915,6 +5505,22 @@ "wrappy": "1" } }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/os-browserify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.1.2.tgz", @@ -1922,6 +5528,61 @@ "dev": true, "license": "MIT" }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-locate/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/package-json-from-dist": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", @@ -1963,6 +5624,25 @@ "node": ">= 0.10" } }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/path-browserify": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", @@ -1970,6 +5650,26 @@ "dev": true, "license": "MIT" }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -2032,6 +5732,49 @@ "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": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pirates": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", + "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "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", @@ -2042,6 +5785,34 @@ "node": ">= 0.4" } }, + "node_modules/pretty-format": { + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.2.0.tgz", + "integrity": "sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "30.0.5", + "ansi-styles": "^5.2.0", + "react-is": "^18.3.1" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -2094,6 +5865,23 @@ "dev": true, "license": "MIT" }, + "node_modules/pure-rand": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-7.0.1.tgz", + "integrity": "sha512-oTUZM/NAZS8p7ANR3SHh30kXB+zK2r2BPcEn/awJIbOvq82WoMN4p62AWWp3Hhw50G0xMsw1mhIBLqHw64EcNQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT" + }, "node_modules/qs": { "version": "0.6.6", "resolved": "https://registry.npmjs.org/qs/-/qs-0.6.6.tgz", @@ -2142,6 +5930,13 @@ "safe-buffer": "^5.1.0" } }, + "node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true, + "license": "MIT" + }, "node_modules/read-only-stream": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-1.1.1.tgz", @@ -2192,6 +5987,16 @@ "node": ">=0.10" } }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/resolve": { "version": "1.22.10", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", @@ -2213,6 +6018,29 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/right-align": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", @@ -2384,6 +6212,16 @@ ], "license": "MIT" }, + "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/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -2480,6 +6318,16 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/source-map": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", @@ -2487,10 +6335,51 @@ "dev": true, "license": "BSD-3-Clause", "dependencies": { - "amdefine": ">=0.0.4" + "amdefine": ">=0.0.4" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/source-map-support/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^2.0.0" }, "engines": { - "node": ">=0.8.0" + "node": ">=10" } }, "node_modules/stream-browserify": { @@ -2569,6 +6458,43 @@ "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", "license": "MIT" }, + "node_modules/string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-length/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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-length/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==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/string-width": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", @@ -2673,6 +6599,39 @@ "node": ">=8" } }, + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/subarg": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", @@ -2717,6 +6676,19 @@ "string_decoder": "~0.10.x" } }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -2730,6 +6702,22 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/synckit": { + "version": "0.11.11", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.11.tgz", + "integrity": "sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@pkgr/core": "^0.2.9" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/synckit" + } + }, "node_modules/syntax-error": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz", @@ -2740,6 +6728,56 @@ "acorn-node": "^1.2.0" } }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "license": "ISC", + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/test-exclude/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": 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/test-exclude/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -2770,6 +6808,13 @@ "node": ">=0.6.0" } }, + "node_modules/tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true, + "license": "BSD-3-Clause" + }, "node_modules/to-buffer": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.2.tgz", @@ -2792,6 +6837,113 @@ "dev": true, "license": "MIT" }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-jest": { + "version": "29.4.5", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.5.tgz", + "integrity": "sha512-HO3GyiWn2qvTQA4kTgjDcXiMwYQt68a1Y8+JuLRVpdIzm+UOLSHgl/XqR4c6nzJkq5rOkjc02O2I7P7l/Yof0Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "bs-logger": "^0.2.6", + "fast-json-stable-stringify": "^2.1.0", + "handlebars": "^4.7.8", + "json5": "^2.2.3", + "lodash.memoize": "^4.1.2", + "make-error": "^1.3.6", + "semver": "^7.7.3", + "type-fest": "^4.41.0", + "yargs-parser": "^21.1.1" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/transform": "^29.0.0 || ^30.0.0", + "@jest/types": "^29.0.0 || ^30.0.0", + "babel-jest": "^29.0.0 || ^30.0.0", + "jest": "^29.0.0 || ^30.0.0", + "jest-util": "^29.0.0 || ^30.0.0", + "typescript": ">=4.3 <6" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@jest/transform": { + "optional": true + }, + "@jest/types": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jest-util": { + "optional": true + } + } + }, + "node_modules/ts-jest/node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true, + "license": "MIT" + }, + "node_modules/ts-jest/node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ts-jest/node_modules/type-fest": { + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "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/tty-browserify": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", @@ -2799,6 +6951,29 @@ "dev": true, "license": "MIT" }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "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", @@ -2919,6 +7094,72 @@ "dev": true, "license": "MIT" }, + "node_modules/unrs-resolver": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.11.1.tgz", + "integrity": "sha512-bSjt9pjaEBnNiGgc9rUiHGKv5l4/TGzDmYw3RhnkJGtLhbnnA/5qJj7x3dNDCRx/PJxu774LlH8lCOlB4hEfKg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "napi-postinstall": "^0.3.0" + }, + "funding": { + "url": "https://opencollective.com/unrs-resolver" + }, + "optionalDependencies": { + "@unrs/resolver-binding-android-arm-eabi": "1.11.1", + "@unrs/resolver-binding-android-arm64": "1.11.1", + "@unrs/resolver-binding-darwin-arm64": "1.11.1", + "@unrs/resolver-binding-darwin-x64": "1.11.1", + "@unrs/resolver-binding-freebsd-x64": "1.11.1", + "@unrs/resolver-binding-linux-arm-gnueabihf": "1.11.1", + "@unrs/resolver-binding-linux-arm-musleabihf": "1.11.1", + "@unrs/resolver-binding-linux-arm64-gnu": "1.11.1", + "@unrs/resolver-binding-linux-arm64-musl": "1.11.1", + "@unrs/resolver-binding-linux-ppc64-gnu": "1.11.1", + "@unrs/resolver-binding-linux-riscv64-gnu": "1.11.1", + "@unrs/resolver-binding-linux-riscv64-musl": "1.11.1", + "@unrs/resolver-binding-linux-s390x-gnu": "1.11.1", + "@unrs/resolver-binding-linux-x64-gnu": "1.11.1", + "@unrs/resolver-binding-linux-x64-musl": "1.11.1", + "@unrs/resolver-binding-wasm32-wasi": "1.11.1", + "@unrs/resolver-binding-win32-arm64-msvc": "1.11.1", + "@unrs/resolver-binding-win32-ia32-msvc": "1.11.1", + "@unrs/resolver-binding-win32-x64-msvc": "1.11.1" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", + "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==", + "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/url": { "version": "0.10.3", "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", @@ -2961,6 +7202,28 @@ "dev": true, "license": "ISC" }, + "node_modules/v8-to-istanbul": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", + "dev": true, + "license": "ISC", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/v8-to-istanbul/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/vm-browserify": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", @@ -2971,6 +7234,16 @@ "indexof": "0.0.1" } }, + "node_modules/walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "makeerror": "1.0.12" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -3133,6 +7406,20 @@ "dev": true, "license": "ISC" }, + "node_modules/write-file-atomic": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", + "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==", + "dev": 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/xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", @@ -3143,6 +7430,23 @@ "node": ">=0.4" } }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "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" + }, "node_modules/yargs": { "version": "3.10.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", @@ -3155,6 +7459,29 @@ "decamelize": "^1.0.0", "window-size": "0.1.0" } + }, + "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==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/package.json b/package.json index 05f739a..0434c29 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "paydunya", + "name": "paydunya-sdk", "version": "1.0.13", "description": "PAYDUNYA Node.JS Library", "main": "dist/index.js", @@ -29,9 +29,16 @@ "typescript": "^5.9.3" }, "devDependencies": { + "@types/jest": "^30.0.0", "@types/node": "^24.7.0", "browserify": "^10.2.4", + "dotenv": "^17.2.3", + "jest": "^30.2.0", "rimraf": "^6.0.1", + "ts-jest": "^29.4.5", "uglifyify": "^3.0.1" - } + }, + "files": [ + "dist/**/*" + ] } diff --git a/src/lib/constants.ts b/src/lib/constants.ts index 89c67d4..1272ae5 100644 --- a/src/lib/constants.ts +++ b/src/lib/constants.ts @@ -1,4 +1,4 @@ -export enum Status { +export enum InvoiceStatus { COMPLETED = "completed", CANCELLED = "cancelled", PENDING = "pending", diff --git a/src/lib/credentials.ts b/src/lib/credentials.ts index e7bac94..26f0020 100644 --- a/src/lib/credentials.ts +++ b/src/lib/credentials.ts @@ -1,5 +1,9 @@ -import {InternalAxiosRequestConfig} from "axios" -export type PaydunyaEnvironment = "live" | "test" +import { InternalAxiosRequestConfig } from "axios" + +export enum PaydunyaEnvironment { + LIVE = "live", + TEST = "test" +} interface CredentialOptions { masterKey: string; @@ -26,10 +30,11 @@ export class Credentials { extendRequestConfig(config: InternalAxiosRequestConfig) { config.headers - .set("Content-Type", "application/json") - .set("PAYDUNYA-MASTER-KEY", this.masterKey) - .set("PAYDUNYA-PRIVATE-KEY", this.privateKey) - .set("PAYDUNYA-TOKEN", this.token) + .set("Content-Type", "application/json") + .set("PAYDUNYA-MASTER-KEY", this.masterKey) + .set("PAYDUNYA-PRIVATE-KEY", this.privateKey) + .set("PAYDUNYA-TOKEN", this.token) + return config } diff --git a/src/lib/index.ts b/src/lib/index.ts index 688c48d..4b5a827 100644 --- a/src/lib/index.ts +++ b/src/lib/index.ts @@ -4,6 +4,7 @@ import { DirectPay } from "./direct-pay"; import CheckoutInvoice from "./invoices/checkout"; import { OnsiteInvoice } from "./invoices/onsite"; import { Credentials, PaydunyaEnvironment } from "./credentials"; +import { Store } from "./store"; export class PaydunyaClient { transport: Transport; @@ -12,6 +13,14 @@ export class PaydunyaClient { this.transport = transport; } + get store(): Store | undefined { + return this.transport.store; + } + + set store(store: Store) { + this.transport.store = store; + } + checkoutInvoiceInstance() { return new CheckoutInvoice(this.transport); } @@ -46,7 +55,7 @@ export class PaydunyaClient { return client; } - static autoDetect() { + static autoDetect(mode: PaydunyaEnvironment = PaydunyaEnvironment.LIVE) { let client = new PaydunyaClient( new Transport( new Credentials({ @@ -54,7 +63,7 @@ export class PaydunyaClient { privateKey: process.env.PAYDUNYA_PRIVATE_KEY || "", publicKey: process.env.PAYDUNYA_PUBLIC_KEY || "", token: process.env.PAYDUNYA_TOKEN || "", - mode: (process.env.PAYDUNYA_MODE || "live") as PaydunyaEnvironment, + mode: (process.env.PAYDUNYA_MODE || mode) as PaydunyaEnvironment, }) ) ) diff --git a/src/lib/invoices/checkout.ts b/src/lib/invoices/checkout.ts index 4002b11..bc393f3 100644 --- a/src/lib/invoices/checkout.ts +++ b/src/lib/invoices/checkout.ts @@ -1,7 +1,8 @@ import { Invoice } from "./invoice"; import { Transport } from "../transport"; import { ResponseError } from "../errors"; -import { ApiRoutes, ResponseCode, Status } from "../constants"; +import { ApiRoutes, ResponseCode, InvoiceStatus } from "../constants"; + export default class CheckoutInvoice extends Invoice { token?: string; @@ -12,6 +13,8 @@ export default class CheckoutInvoice extends Invoice { receiptURL?: string; receipt_identifier?: string; provider_reference?: string; + hash?: string; + constructor(client: Transport) { super(client); @@ -29,7 +32,7 @@ export default class CheckoutInvoice extends Invoice { if (res.data.response_code === ResponseCode.success) { this.token = res.data.token; this.url = res.data.response_text; - return this.confirm(this.token); + return this.getTokenStatus(this.token); } else { const e = new ResponseError("Failed to create invoice.", res.data); throw e; @@ -41,16 +44,29 @@ export default class CheckoutInvoice extends Invoice { * Get token status. * @param {string} givenToken Invoice token */ - async confirm(givenToken?: string) { + async getTokenStatus(givenToken?: string) { const token = givenToken ? givenToken : this.token; - this.transport.axios + return this.transport.axios .get(`${ApiRoutes.CONFIRM_INVOICE}${token}`) .then((res) => { const body = res.data; + if (body.response_code === ResponseCode.success) { this.status = body.status; this.responseText = body.response_text; - if (this.status === Status.COMPLETED) { + + this.hash = body?.hash; + this.items = body.invoice.items; + this.taxes = body.taxes; + this.description = body.description; + + if (body.actions) { + this.cancelURL = body.actions.cancel_url; + this.callbackURL = body.actions.callback_url; + this.returnURL = body.actions.return_url; + } + + if (this.status === InvoiceStatus.COMPLETED) { this.customer = body.customer; this.receiptURL = body.receipt_url; this.receipt_identifier = body.receipt_identifier; @@ -59,6 +75,7 @@ export default class CheckoutInvoice extends Invoice { this.customData = body.custom_data; } } + this.totalAmount = body.invoice.total_amount; return this.asObject; } else { @@ -76,6 +93,7 @@ export default class CheckoutInvoice extends Invoice { token: this.token, url: this.url, status: this.status, + hash: this.hash, responseText: this.responseText, customer: this.customer, receiptURL: this.receiptURL, @@ -83,6 +101,6 @@ export default class CheckoutInvoice extends Invoice { provider_reference: this.provider_reference, customData: this.customData, totalAmount: this.totalAmount, - }; + } } } diff --git a/src/lib/transport.ts b/src/lib/transport.ts index ba6c927..194170e 100644 --- a/src/lib/transport.ts +++ b/src/lib/transport.ts @@ -1,4 +1,4 @@ -import { Credentials } from "./credentials"; +import { Credentials, PaydunyaEnvironment } from "./credentials"; import axios, {AxiosInstance} from "axios" import { Store } from "./store"; @@ -21,7 +21,7 @@ export class Transport { } get baseURL() { - return this.setup.mode === "test" ? 'https://app.paydunya.com/sandbox-api/v1': 'https://app.paydunya.com/api/v1' + return this.setup.mode === PaydunyaEnvironment.TEST ? 'https://app.paydunya.com/sandbox-api/v1': 'https://app.paydunya.com/api/v1' } } \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index f877856..3eafbea 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,7 +10,7 @@ "target": "esnext", // For nodejs: "lib": ["esnext"], - "types": ["node"], + "types": ["node", "jest"], "sourceMap": true, // Stricter Typechecking Options "noUncheckedIndexedAccess": true, @@ -33,6 +33,6 @@ "declaration": true }, "exclude": [ - "src/examples" + "src/examples" ], } \ No newline at end of file From 127762502d88269c8aa04156e9dce6b226b24752 Mon Sep 17 00:00:00 2001 From: Maximilien COMLAN Date: Mon, 13 Oct 2025 15:32:27 +0100 Subject: [PATCH 11/20] remove assert import --- __tests__/checkout-invoice.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/__tests__/checkout-invoice.ts b/__tests__/checkout-invoice.ts index aef6078..ba4c43a 100644 --- a/__tests__/checkout-invoice.ts +++ b/__tests__/checkout-invoice.ts @@ -1,4 +1,3 @@ -import { strict as assert } from 'assert'; import { PaydunyaClient } from '../src/lib'; import { Store } from '../src/lib/store'; import { PaydunyaEnvironment } from '../src/lib/credentials'; From c1f4a859b199e2bd0d5a4d1c1d8dfde8fb8fb0f4 Mon Sep 17 00:00:00 2001 From: Maximilien COMLAN Date: Mon, 13 Oct 2025 21:45:32 +0100 Subject: [PATCH 12/20] WIP on direct pay integration --- .gitignore | 3 ++- __tests__/direct-pay.ts | 22 ++++++++++++++++ src/lib/balance.ts | 6 ++--- src/lib/constants.ts | 2 +- src/lib/direct-pay.ts | 49 ++++++++++++++++++++++-------------- src/lib/invoices/checkout.ts | 15 +++++------ src/lib/invoices/onsite.ts | 10 ++++---- src/lib/transport.ts | 6 ++--- 8 files changed, 74 insertions(+), 39 deletions(-) create mode 100644 __tests__/direct-pay.ts diff --git a/.gitignore b/.gitignore index cfe25a5..1c9ab98 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,5 @@ test/test-results.xml # Bower stuff. bower_components/ -dist/paydunya-node.debug.js \ No newline at end of file +dist/paydunya-node.debug.js +__tests__/.env.local \ No newline at end of file diff --git a/__tests__/direct-pay.ts b/__tests__/direct-pay.ts new file mode 100644 index 0000000..cb0eb12 --- /dev/null +++ b/__tests__/direct-pay.ts @@ -0,0 +1,22 @@ +import { PaydunyaClient } from '../src/lib'; +import { PaydunyaEnvironment } from '../src/lib/credentials'; +import { config } from 'dotenv'; +import { join } from 'path'; + +config({ path: join(__dirname, ".env.local") }) + +describe('DirectPay', function () { + let client = PaydunyaClient.autoDetect(PaydunyaEnvironment.TEST); + let directPay = client.directpayInstance(); + + it('should credit account if initialized correctly', function (done) { + directPay.creditAccount('maximiliencomlan05@gmail.com', 2000) + .then(function () { + expect(directPay.description).toBeTruthy(); + expect(directPay.transactionID).toBeTruthy(); + expect(directPay.responseText).toBeTruthy(); + done(); + }); + }); + +}); \ No newline at end of file diff --git a/src/lib/balance.ts b/src/lib/balance.ts index b0d27ab..4039335 100644 --- a/src/lib/balance.ts +++ b/src/lib/balance.ts @@ -1,6 +1,6 @@ import { Transport } from "./transport"; import axios, { AxiosInstance } from "axios"; -import { ApiRoutes, SUPPORTED_COUNTRY_CODES } from "./constants"; +import { Endpoints, SUPPORTED_COUNTRY_CODES } from "./constants"; type SupportedCountryCode = keyof typeof SUPPORTED_COUNTRY_CODES; @@ -51,7 +51,7 @@ export class Balance { } async getAll() { - return this.axios.get(ApiRoutes.CHECK_BALANCE) + return this.axios.get(Endpoints.CHECK_BALANCE) .then((result) => { if (result.data.success) { @@ -74,7 +74,7 @@ export class Balance { } async getAccountBalance(account: string) { - return this.axios.get(`${ApiRoutes.CHECK_BALANCE}/${account}`) + return this.axios.get(`${Endpoints.CHECK_BALANCE}/${account}`) .then((result) => { if (result.data.success) { return result.data diff --git a/src/lib/constants.ts b/src/lib/constants.ts index 1272ae5..7c0f80c 100644 --- a/src/lib/constants.ts +++ b/src/lib/constants.ts @@ -9,7 +9,7 @@ export enum ResponseCode { success = "00", } -export enum ApiRoutes { +export enum Endpoints { CREATE_INVOICE = "/checkout-invoice/create", CONFIRM_INVOICE = "/checkout-invoice/confirm/", CREATE_ONSITEINVOCE = "/opr/create", diff --git a/src/lib/direct-pay.ts b/src/lib/direct-pay.ts index e315255..f739602 100644 --- a/src/lib/direct-pay.ts +++ b/src/lib/direct-pay.ts @@ -1,6 +1,6 @@ import { Transport } from "./transport"; import { ResponseError } from "./errors"; -import { ApiRoutes, ResponseCode } from "./constants"; +import { Endpoints, ResponseCode } from "./constants"; import util from "util" export class DirectPay { @@ -19,28 +19,39 @@ export class DirectPay { * @param account Account alias, number or email * @param amount Amount to credit */ - async creditAccount(account: string, amount: number): Promise { + async creditAccount(account: string, amount: number) { const body = { account_alias: account, amount: Number(amount), }; + return this.transport.client.post(Endpoints.CREDIT_ACCOUNT, body) + .then((res) => { + console.log(res.data); - const res = await this.transport.axios.post(ApiRoutes.CREDIT_ACCOUNT, body); - - if (res.data.response_code === ResponseCode.success) { - this.responseText = res.data.response_text; - this.description = res.data.description; - this.transactionID = res.data.transaction_id; - } else { - const e = new ResponseError( - util.format( - "Failed to credit account. Please ensure %s and %s are valid OR check your account balance.", - account, - amount - ), - res.data - ); - throw e; - } + if (res.data.response_code === ResponseCode.success) { + this.responseText = res.data.response_text; + this.description = res.data.description; + this.transactionID = res.data.transaction_id; + return { + responseText: this.responseText, + description: this.description, + transactionID: this.transactionID + } + } else { + const e = new ResponseError( + util.format( + "Failed to credit account. Please ensure %s and %s are valid OR check your account balance.", + account, + amount + ), + res.data + ); + throw e; + } + }) + .catch((err) => { + console.log(err); + return undefined; + }) } } diff --git a/src/lib/invoices/checkout.ts b/src/lib/invoices/checkout.ts index bc393f3..00c3c76 100644 --- a/src/lib/invoices/checkout.ts +++ b/src/lib/invoices/checkout.ts @@ -1,7 +1,7 @@ import { Invoice } from "./invoice"; import { Transport } from "../transport"; import { ResponseError } from "../errors"; -import { ApiRoutes, ResponseCode, InvoiceStatus } from "../constants"; +import { Endpoints, ResponseCode, InvoiceStatus } from "../constants"; export default class CheckoutInvoice extends Invoice { @@ -26,8 +26,8 @@ export default class CheckoutInvoice extends Invoice { async create() { const requestBody = this.asRequestBody(); - return this.transport.axios - .post(ApiRoutes.CREATE_INVOICE, requestBody) + return this.transport.client + .post(Endpoints.CREATE_INVOICE, requestBody) .then((res) => { if (res.data.response_code === ResponseCode.success) { this.token = res.data.token; @@ -46,8 +46,8 @@ export default class CheckoutInvoice extends Invoice { */ async getTokenStatus(givenToken?: string) { const token = givenToken ? givenToken : this.token; - return this.transport.axios - .get(`${ApiRoutes.CONFIRM_INVOICE}${token}`) + return this.transport.client + .get(`${Endpoints.CONFIRM_INVOICE}${token}`) .then((res) => { const body = res.data; @@ -66,6 +66,8 @@ export default class CheckoutInvoice extends Invoice { this.returnURL = body.actions.return_url; } + this.totalAmount = body.invoice.total_amount; + if (this.status === InvoiceStatus.COMPLETED) { this.customer = body.customer; this.receiptURL = body.receipt_url; @@ -75,8 +77,7 @@ export default class CheckoutInvoice extends Invoice { this.customData = body.custom_data; } } - - this.totalAmount = body.invoice.total_amount; + return this.asObject; } else { const e = new ResponseError( diff --git a/src/lib/invoices/onsite.ts b/src/lib/invoices/onsite.ts index a5cad72..4b88a83 100644 --- a/src/lib/invoices/onsite.ts +++ b/src/lib/invoices/onsite.ts @@ -1,5 +1,5 @@ import { Transport } from "../transport"; -import { ApiRoutes, ResponseCode } from "../constants"; +import { Endpoints, ResponseCode } from "../constants"; import { ResponseError } from "../errors"; import { Invoice } from "./invoice"; @@ -26,8 +26,8 @@ export class OnsiteInvoice extends Invoice { account_alias: customer, }, }; - return this.transport.axios - .post(ApiRoutes.CREATE_ONSITEINVOCE, body) + return this.transport.client + .post(Endpoints.CREATE_ONSITEINVOCE, body) .then((response) => { if (response.data?.response_code === ResponseCode.success) { return { @@ -56,8 +56,8 @@ export class OnsiteInvoice extends Invoice { confirm_token: confirmToken, }; - return this.transport.axios - .post(ApiRoutes.CHARGE_ONSITEINVOCE, body) + return this.transport.client + .post(Endpoints.CHARGE_ONSITEINVOCE, body) .then((response) => { if (response.data?.response_code === ResponseCode.success) { return { diff --git a/src/lib/transport.ts b/src/lib/transport.ts index 194170e..631bc45 100644 --- a/src/lib/transport.ts +++ b/src/lib/transport.ts @@ -5,17 +5,17 @@ import { Store } from "./store"; export class Transport { setup: Credentials; store: Store | undefined = undefined; - axios: AxiosInstance; + client: AxiosInstance; constructor(setup: Credentials, store: Store | undefined = undefined) { this.setup = setup; this.store = store; - this.axios = axios.create({ + this.client = axios.create({ baseURL: this.baseURL }); - this.axios.interceptors.request.use((config) => { + this.client.interceptors.request.use((config) => { return this.setup.extendRequestConfig(config) }); } From 4335766c2e734cc2ed334126fc191167551012f9 Mon Sep 17 00:00:00 2001 From: Maximilien COMLAN Date: Wed, 15 Oct 2025 11:04:48 +0100 Subject: [PATCH 13/20] added invoice and insite-invoices although these tests cannot pass (the endpoints of the api are deprecated --- __tests__/checkout-invoice.done.js | 41 ------------ __tests__/checkout-invoice.ts | 3 +- __tests__/direct-pay.js | 29 -------- __tests__/direct-pay.ts | 3 + __tests__/invoice.js | 103 ----------------------------- __tests__/invoice.ts | 100 ++++++++++++++++++++++++++++ __tests__/onsite-invoice.js | 28 -------- __tests__/onsite-invoice.ts | 31 +++++++++ __tests__/setup.js | 40 ----------- __tests__/store.js | 31 --------- package.json | 2 +- src/lib/direct-pay.ts | 16 ++--- src/lib/index.ts | 5 ++ 13 files changed, 146 insertions(+), 286 deletions(-) delete mode 100644 __tests__/checkout-invoice.done.js delete mode 100644 __tests__/direct-pay.js delete mode 100644 __tests__/invoice.js create mode 100644 __tests__/invoice.ts delete mode 100644 __tests__/onsite-invoice.js create mode 100644 __tests__/onsite-invoice.ts delete mode 100644 __tests__/setup.js delete mode 100644 __tests__/store.js diff --git a/__tests__/checkout-invoice.done.js b/__tests__/checkout-invoice.done.js deleted file mode 100644 index 96002cf..0000000 --- a/__tests__/checkout-invoice.done.js +++ /dev/null @@ -1,41 +0,0 @@ -var assert = require('assert') - , Invoice = require('../lib/invoice') - , paydunya = require('../lib') - , Setup = paydunya.Setup - , Store = paydunya.Store - , CheckoutInvoice = paydunya.CheckoutInvoice - ; - -describe('CheckoutInvoice', function () { - describe('#create()', function () { - it('should work with valid initialization and total amount', function (done){ - this.timeout(15000); - var setup = new Setup({mode: 'test'}); - var store = new Store({name: 'Magasin Chez Sandra'}); - var invoice = new CheckoutInvoice(setup, store); - invoice.totalAmount = 1000; - - invoice.create() - .then(function () { - assert.ok(invoice.url); - assert.ok(invoice.token); - done(); - }); - }); - }); - - describe('#confirm', function () { - it('should confirm completed token', function (done){ - this.timeout(10000); - var setup = new Setup({mode: 'test'}); - var store = new Store({name: 'Magasin Chez Sandra'}); - var invoice = new CheckoutInvoice(setup, store); - invoice.confirm('test_449a6fef1a') - .then(function () { - assert.ok(invoice.customer); - assert.ok(invoice.receiptURL); - done(); - }) - }); - }); -}); \ No newline at end of file diff --git a/__tests__/checkout-invoice.ts b/__tests__/checkout-invoice.ts index ba4c43a..24f2237 100644 --- a/__tests__/checkout-invoice.ts +++ b/__tests__/checkout-invoice.ts @@ -14,14 +14,13 @@ describe('CheckoutInvoice', function () { const client = PaydunyaClient.autoDetect(PaydunyaEnvironment.TEST) client.store = new Store({ name: "Magasin Chez Sandra" }) const invoice = client.checkoutInvoiceInstance(); - invoice.totalAmount = 1000; invoice.create() .then((output) => { expect(output.url).toBeTruthy() expect(output.token).toBeTruthy() - token = output.token || ''; + token = output.token || ""; done(); }) .catch(done); diff --git a/__tests__/direct-pay.js b/__tests__/direct-pay.js deleted file mode 100644 index 460dda7..0000000 --- a/__tests__/direct-pay.js +++ /dev/null @@ -1,29 +0,0 @@ -var assert = require('assert') - , paydunya = require('../lib') - , Setup = paydunya.setup - , DirectPay = paydunya.directPay; - ; - -describe('DirectPay', function () { - describe('#creditAccount()', function () { - it('should not credit account if not initialized correctly', function (done){ - assert.throws(function (){ - new DirectPay(); - }); - done(); - }); - - it('should credit account if initialized correctly', function (done){ - this.timeout(10000); - var setup = new Setup({mode: 'test'}); - var directPay = new DirectPay(setup); - directPay.creditAccount('fabrice@gmail.com', 5000) - .then(function (){ - assert.ok(directPay.description); - assert.ok(directPay.transactionID); - assert.ok(directPay.responseText); - done(); - }); - }); - }); -}); \ No newline at end of file diff --git a/__tests__/direct-pay.ts b/__tests__/direct-pay.ts index cb0eb12..66c38e9 100644 --- a/__tests__/direct-pay.ts +++ b/__tests__/direct-pay.ts @@ -5,6 +5,9 @@ import { join } from 'path'; config({ path: join(__dirname, ".env.local") }) +/** + * Direct Pay endpoint seems to be deprecated. endpoint not found on the server + */ describe('DirectPay', function () { let client = PaydunyaClient.autoDetect(PaydunyaEnvironment.TEST); let directPay = client.directpayInstance(); diff --git a/__tests__/invoice.js b/__tests__/invoice.js deleted file mode 100644 index 2987893..0000000 --- a/__tests__/invoice.js +++ /dev/null @@ -1,103 +0,0 @@ -var assert = require('assert') - , Invoice = require('../lib/invoice') - , paydunya = require('../lib') - , Setup = paydunya.Setup - , Store = paydunya.Store - ; - -describe('Invoice', function (){ - - describe('#addItem()', function () { - it('should add item to invoice', function (done){ - var setup = new Setup({mode: 'test'}); - var store = new Store({name: 'Magasin Chez Sandra'}); - var invoice = new Invoice(setup, store); - invoice.addItem('iPhone', 1, 5000, 5000, 'apple gadget'); - assert.strictEqual(invoice.items.item_1.name, 'iPhone'); - assert.strictEqual(invoice.items.item_1.quantity, 1); - assert.strictEqual(invoice.items.item_1.unit_price, 5000); - assert.strictEqual(invoice.items.item_1.total_price, 5000); - assert.strictEqual(invoice.items.item_1.description, 'apple gadget'); - - //add another item - invoice.addItem('Galaxy Phone', 1, 400000, 400000); - assert.strictEqual(invoice.items.item_2.name, 'Galaxy Phone'); - done(); - }); - }); - - describe('#addTax()', function () { - it('should add tax with valid parameters', function (done){ - var setup = new Setup({made: 'test'}); - var store = new Store({name: 'Magasin Chez Sandra', returnURL: 'http://ma-super-boutique.com/callback'}); - var invoice = new Invoice(setup, store); - invoice.addTax('TVA', 18); - assert.strictEqual(invoice.taxes.tax_1.name, 'TVA'); - assert.strictEqual(invoice.taxes.tax_1.amount, 18); - done(); - }); - }); - - describe('#addChannel()', function () { - it('should add channel with valid parameters', function (done){ - var setup = new Setup({made: 'test'}); - var store = new Store({name: 'Magasin Chez Sandra', returnURL: 'http://ma-super-boutique.com/callback'}); - var invoice = new Invoice(setup, store); - invoice.addChanel('wari'); - invoice.addChanel('orange-money-senegal'); - assert.strictEqual(invoice.channels[0], 'wari'); - assert.strictEqual(invoice.channels[1], 'orange-money-senegal'); - done(); - }); - }); - - describe('#addChannels()', function () { - it('should add channels with valid parameters', function (done){ - var setup = new Setup({made: 'test'}); - var store = new Store({name: 'Magasin Chez Sandra', returnURL: 'http://ma-super-boutique.com/callback'}); - var invoice = new Invoice(setup, store); - invoice.addChanels(['wari', 'orange-money-senegal', 'card']); - assert.strictEqual(invoice.channels[0], 'wari'); - assert.strictEqual(invoice.channels[1], 'orange-money-senegal'); - assert.strictEqual(invoice.channels[2], 'card'); - done(); - }); - }); - - describe('#addCustomData', function () { - it('should add custom data', function (done){ - var setup = new Setup({made: 'test'}); - var store = new Store({name: 'Magasin Chez Sandra'}); - var invoice = new Invoice(setup, store); - invoice.addCustomData('size', 'large'); - assert.strictEqual(invoice.customData.size, 'large'); - done(); - }); - }); - - describe('#generateRequestBody()', function () { - it('should fail with invalid parameters', function (done) { - var setup = new Setup({made: 'test'}); - var store = new Store({name: 'Magasin Chez Sandra', returnURL: 'http://ma-super-boutique.com/callback'}); - var invoice = new Invoice(setup, store); - assert.throws(function () { - invoice.generateRequestBody(); - }); - invoice.totalAmount = 50000; - assert.doesNotThrow(function () { - invoice.generateRequestBody(); - }); - invoice.addTax('TVA', 18); - invoice.addCustomData('size', 'large'); - var body = invoice.generateRequestBody(); - assert.strictEqual(body.invoice.total_amount, 50000); - assert.strictEqual(body.store.name, 'Magasin Chez Sandra'); - assert.strictEqual(body.actions.return_url, 'http://ma-super-boutique.com/callback'); - assert.strictEqual(body.invoice.taxes.tax_1.name, 'TVA'); - assert.strictEqual(body.invoice.taxes.tax_1.amount, 18); - assert.strictEqual(body.custom_data.size, 'large'); - done(); - }); - }); - -}); diff --git a/__tests__/invoice.ts b/__tests__/invoice.ts new file mode 100644 index 0000000..01a4c88 --- /dev/null +++ b/__tests__/invoice.ts @@ -0,0 +1,100 @@ +import { config } from "dotenv"; +import { join } from "path"; +import { PaydunyaClient } from "../src/lib"; +import { PaydunyaEnvironment } from "../src/lib/credentials"; +import { Store } from "../src/lib/store"; +import { PaymentChannel } from "../src/lib/constants"; + +config({ path: join(__dirname, ".env.local") }) + +describe('Invoice', function () { + + describe('#addItem()', function () { + it('should add item to invoice', function (done) { + let client = PaydunyaClient.autoDetect(PaydunyaEnvironment.TEST); + client.store = new Store({ name: 'Magasin Chez Sandra', return_url: 'http://ma-super-boutique.com/callback' }); + let invoice = client.invoiceInstance(); + invoice.addItem('iPhone', 1, 5000, 5000, 'apple gadget'); + expect(invoice.items.item_1?.name).toBe('iPhone'); + expect(invoice.items.item_1?.quantity).toBe(1); + expect(invoice.items.item_1?.unit_price).toBe(5000); + expect(invoice.items.item_1?.total_price).toBe(5000); + expect(invoice.items.item_1?.description).toBe('apple gadget'); + + //add another item + invoice.addItem('Galaxy Phone', 1, 400000, 400000); + expect(invoice.items.item_2?.name).toBe('Galaxy Phone'); + done(); + }); + }); + + describe('#addTax()', function () { + it('should add tax with valid parameters', function (done) { + let client = PaydunyaClient.autoDetect(PaydunyaEnvironment.TEST); + client.store = new Store({ name: 'Magasin Chez Sandra', return_url: 'http://ma-super-boutique.com/callback' }); + let invoice = client.invoiceInstance(); + invoice.addTax('TVA', 18); + expect(invoice.taxes.tax_1?.name).toBe('TVA'); + expect(invoice.taxes.tax_1?.amount).toBe(18); + done(); + }) + }); + + describe('#addChannel()', function () { + it('should add channel with valid parameters', function (done) { + let client = PaydunyaClient.autoDetect(PaydunyaEnvironment.TEST); + client.store = new Store({ name: 'Magasin Chez Sandra', return_url: 'http://ma-super-boutique.com/callback' }); + let invoice = client.invoiceInstance(); + invoice.addChannel(PaymentChannel.WaveCi); + invoice.addChannel(PaymentChannel.OrangeMoneySenegal); + expect(invoice.channels[0]).toBe(PaymentChannel.WaveCi); + expect(invoice.channels[1]).toBe(PaymentChannel.OrangeMoneySenegal); + done(); + }); + }); + + describe('#addChannels()', function () { + it('should add channels with valid parameters', function (done) { + let client = PaydunyaClient.autoDetect(PaydunyaEnvironment.TEST); + client.store = new Store({ name: 'Magasin Chez Sandra', return_url: 'http://ma-super-boutique.com/callback' }); + let invoice = client.invoiceInstance(); + invoice.addChannels([PaymentChannel.OrangeMoneySenegal, PaymentChannel.Card]); + expect(invoice.channels[0]).toBe(PaymentChannel.OrangeMoneySenegal); + expect(invoice.channels[1]).toBe(PaymentChannel.Card); + done(); + }); + }); + + describe('#addCustomData', function () { + it('should add custom data', function (done) { + let client = PaydunyaClient.autoDetect(PaydunyaEnvironment.TEST); + client.store = new Store({ name: 'Magasin Chez Sandra', return_url: 'http://ma-super-boutique.com/callback' }); + let invoice = client.invoiceInstance(); + invoice.addCustomData('size', 'large'); + expect(invoice.customData.size).toBe('large'); + done(); + }); + }); + + describe('#generateRequestBody()', function () { + it('should fail with invalid parameters', function (done) { + let client = PaydunyaClient.autoDetect(PaydunyaEnvironment.TEST); + client.store = new Store({ name: 'Magasin Chez Sandra', return_url: 'http://ma-super-boutique.com/callback' }); + let invoice = client.invoiceInstance(); + invoice.totalAmount = 50000; + invoice.addTax('TVA', 18); + invoice.addCustomData('size', 'large'); + + let body = invoice.asRequestBody(); + + expect(body.invoice.total_amount).toBe(50000); + expect(body.store?.name).toBe('Magasin Chez Sandra'); + expect(body.actions.return_url).toBe('http://ma-super-boutique.com/callback'); + expect(body.invoice.taxes.tax_1?.name).toBe('TVA'); + expect(body.invoice.taxes.tax_1?.amount).toBe(18); + expect(body.custom_data?.size).toBe('large'); + done(); + }); + }); + +}); diff --git a/__tests__/onsite-invoice.js b/__tests__/onsite-invoice.js deleted file mode 100644 index e5cb026..0000000 --- a/__tests__/onsite-invoice.js +++ /dev/null @@ -1,28 +0,0 @@ -var assert = require('assert') - , Promise = require('bluebird') - , Invoice = require('../lib/invoice') - , paydunya = require('../lib') - , Setup = paydunya.Setup - , Store = paydunya.Store - , OnsiteInvoice = paydunya.OnsiteInvoice - ; - -describe('OnsiteInvoice', function () { - describe('#create()', function () { - it('should create onsite payment request and charge', function (done){ - this.timeout(15000); - var setup = new Setup({mode: 'test'}); - var store = new Store({name: 'Magasin Chez Sandra'}); - var invoice = new OnsiteInvoice(setup, store); - invoice.totalAmount = 8000; - - invoice.create('fabrice@gmail.com') - .then(function (){ - assert.ok(invoice.oprToken); - assert.ok(invoice.token); - assert.ok(invoice.responseText); - done(); - }); - }); - }); -}); \ No newline at end of file diff --git a/__tests__/onsite-invoice.ts b/__tests__/onsite-invoice.ts new file mode 100644 index 0000000..52cdae0 --- /dev/null +++ b/__tests__/onsite-invoice.ts @@ -0,0 +1,31 @@ +import { config } from "dotenv"; +import { join } from "path"; +import { PaydunyaClient } from "../src/lib"; +import { PaydunyaEnvironment } from "../src/lib/credentials"; +import { Store } from "../src/lib/store"; + +/** + * Onsite Invoice seems to be not working in the test environment + * The endpoint returns a 404 not found error + */ + +config({ path: join(__dirname, ".env.local") }) + +describe('OnsiteInvoice', function () { + describe('#create()', function () { + it('should create onsite payment request and charge', function (done) { + let client = PaydunyaClient.autoDetect(PaydunyaEnvironment.TEST); + client.store = new Store({ name: 'Magasin Chez Sandra', return_url: 'http://ma-super-boutique.com/callback' }); + let invoice = client.onsiteInvoiceInstance(); + invoice.totalAmount = 8000; + + invoice.create('fabrice@gmail.com') + .then(function () { + expect(invoice.oprToken).toBeTruthy(); + expect(invoice.token).toBeTruthy(); + expect(invoice.responseText).toBeTruthy(); + done(); + }); + }); + }); +}); \ No newline at end of file diff --git a/__tests__/setup.js b/__tests__/setup.js deleted file mode 100644 index 249eaff..0000000 --- a/__tests__/setup.js +++ /dev/null @@ -1,40 +0,0 @@ -var assert = require('assert') - , Setup = require('../lib').setup - ; - -describe('Setup', function () { - it('should initialize with environment variables when no parameters are given', function (done){ - var setup = new Setup(); - assert.strictEqual(setup.config['PAYDUNYA-MASTER-KEY'], process.env.PAYDUNYA_MASTER_KEY); - assert.strictEqual(setup.config['PAYDUNYA-PRIVATE-KEY'], process.env.PAYDUNYA_PRIVATE_KEY); - // assert.strictEqual(setup.config['PAYDUNYA-PUBLIC-KEY'], process.env.PAYDUNYA_PUBLIC_KEY); - assert.strictEqual(setup.config['PAYDUNYA-TOKEN'], process.env.PAYDUNYA_TOKEN); - done(); - }); - - it('should initialize with given data', function (done){ - var setup = new Setup({ - masterKey: 'master', - privateKey: 'private', - publicKey: 'public', - token: 'token' - }); - assert.strictEqual(setup.config['PAYDUNYA-MASTER-KEY'], 'master'); - assert.strictEqual(setup.config['PAYDUNYA-PRIVATE-KEY'], 'private'); - // assert.strictEqual(setup.config['PAYDUNYA-PUBLIC-KEY'], 'public'); - assert.strictEqual(setup.config['PAYDUNYA-TOKEN'], 'token'); - done(); - }); - - it('should set to sandbox base url as endpoint in test mode', function (done){ - var setup = new Setup({mode: 'test'}); - assert.strictEqual(setup.baseURL, 'https://app.paydunya.com/sandbox-api/v1'); - done(); - }); - - it('should set live baseURL when mode !== "test"', function (done){ - var setup = new Setup(); - assert.strictEqual(setup.baseURL, 'https://app.paydunya.com/api/v1'); - done(); - }); -}); diff --git a/__tests__/store.js b/__tests__/store.js deleted file mode 100644 index 63cd8c7..0000000 --- a/__tests__/store.js +++ /dev/null @@ -1,31 +0,0 @@ -var assert = require('assert') - , Store = require('../lib').store - ; - -describe('Store', function () { - it('should not initialize without required parameters', function (done){ - assert.throws(function () {new Store()}); - done(); - }); - - it('should initialize without error when name is initialized', function (done){ - assert.doesNotThrow(function () {new Store({name: 'Magasin Chez Sandra'})}); - done(); - }); - - it('should set values on initialize', function (done){ - var data = { - name: 'Magasin Chez Sandra', - tagline: "L'élégance n'a pas de prix", - phoneNumber: '336530583', - postalAddress: 'Dakar Plateau - Etablissement kheweul' - }; - var store = new Store(data); - - assert.strictEqual(store.name, data.name); - assert.strictEqual(store.tagline, data.tagline); - assert.strictEqual(store.phone_number, data.phoneNumber); - assert.strictEqual(store.postal_address, data.postalAddress); - done(); - }); -}); \ No newline at end of file diff --git a/package.json b/package.json index 0434c29..95ae8ff 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "PAYDUNYA Node.JS Library", "main": "dist/index.js", "scripts": { - "test": "mocha test", + "test": "jest test", "build-debug": "browserify lib/index.js -o dist/paydunya-node.debug.js", "build": "rimraf dist && tsc" }, diff --git a/src/lib/direct-pay.ts b/src/lib/direct-pay.ts index f739602..3a68f10 100644 --- a/src/lib/direct-pay.ts +++ b/src/lib/direct-pay.ts @@ -26,16 +26,14 @@ export class DirectPay { }; return this.transport.client.post(Endpoints.CREDIT_ACCOUNT, body) .then((res) => { - console.log(res.data); - if (res.data.response_code === ResponseCode.success) { this.responseText = res.data.response_text; this.description = res.data.description; this.transactionID = res.data.transaction_id; - return { - responseText: this.responseText, - description: this.description, - transactionID: this.transactionID + return { + responseText: this.responseText, + description: this.description, + transactionID: this.transactionID } } else { const e = new ResponseError( @@ -48,10 +46,6 @@ export class DirectPay { ); throw e; } - }) - .catch((err) => { - console.log(err); - return undefined; - }) + }); } } diff --git a/src/lib/index.ts b/src/lib/index.ts index 4b5a827..136566a 100644 --- a/src/lib/index.ts +++ b/src/lib/index.ts @@ -5,6 +5,7 @@ import CheckoutInvoice from "./invoices/checkout"; import { OnsiteInvoice } from "./invoices/onsite"; import { Credentials, PaydunyaEnvironment } from "./credentials"; import { Store } from "./store"; +import { Invoice } from "./invoices/invoice"; export class PaydunyaClient { transport: Transport; @@ -21,6 +22,10 @@ export class PaydunyaClient { this.transport.store = store; } + invoiceInstance() { + return new Invoice(this.transport); + } + checkoutInvoiceInstance() { return new CheckoutInvoice(this.transport); } From 9974b2e1e7efb588e2340946a571eae47018ba28 Mon Sep 17 00:00:00 2001 From: Maximilien COMLAN Date: Wed, 15 Oct 2025 12:54:17 +0100 Subject: [PATCH 14/20] marked DirectPay and OnsiteInvoice as deprecated --- package-lock.json | 959 ++++++++++++++++++++++++++++++++++++- package.json | 12 +- src/lib/direct-pay.ts | 4 + src/lib/invoices/onsite.ts | 4 + 4 files changed, 975 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 60cd012..8176feb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,9 @@ "jest": "^30.2.0", "rimraf": "^6.0.1", "ts-jest": "^29.4.5", - "uglifyify": "^3.0.1" + "uglifyify": "^3.0.1", + "webpack": "^5.102.1", + "webpack-cli": "^6.0.1" } }, "node_modules/@babel/code-frame": { @@ -588,6 +590,16 @@ "dev": true, "license": "MIT" }, + "node_modules/@discoveryjs/json-ext": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.6.3.tgz", + "integrity": "sha512-4B4OijXeVNOPZlYA2oEwWOTkzyltLao+xbotHQeqN++Rv27Y6s818+n2Qkp8q+Fxhn0t/5lA5X1Mxktud8eayQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.17.0" + } + }, "node_modules/@emnapi/core": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.5.0.tgz", @@ -1168,6 +1180,17 @@ "node": ">=6.0.0" } }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.11", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.11.tgz", + "integrity": "sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" + } + }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.5.5", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", @@ -1306,6 +1329,35 @@ "@babel/types": "^7.28.2" } }, + "node_modules/@types/eslint": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", + "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint-scope": { + "version": "3.7.7", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", + "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "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/istanbul-lib-coverage": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", @@ -1344,6 +1396,13 @@ "pretty-format": "^30.0.0" } }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/node": { "version": "24.7.0", "resolved": "https://registry.npmjs.org/@types/node/-/node-24.7.0.tgz", @@ -1654,6 +1713,228 @@ "win32" ] }, + "node_modules/@webassemblyjs/ast": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz", + "integrity": "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/helper-numbers": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2" + } + }, + "node_modules/@webassemblyjs/floating-point-hex-parser": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz", + "integrity": "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-api-error": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz", + "integrity": "sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-buffer": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz", + "integrity": "sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-numbers": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz", + "integrity": "sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/floating-point-hex-parser": "1.13.2", + "@webassemblyjs/helper-api-error": "1.13.2", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/helper-wasm-bytecode": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz", + "integrity": "sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-wasm-section": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz", + "integrity": "sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/wasm-gen": "1.14.1" + } + }, + "node_modules/@webassemblyjs/ieee754": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz", + "integrity": "sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "node_modules/@webassemblyjs/leb128": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.13.2.tgz", + "integrity": "sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/utf8": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.13.2.tgz", + "integrity": "sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/wasm-edit": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz", + "integrity": "sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/helper-wasm-section": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-opt": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1", + "@webassemblyjs/wast-printer": "1.14.1" + } + }, + "node_modules/@webassemblyjs/wasm-gen": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz", + "integrity": "sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" + } + }, + "node_modules/@webassemblyjs/wasm-opt": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz", + "integrity": "sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1" + } + }, + "node_modules/@webassemblyjs/wasm-parser": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz", + "integrity": "sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-api-error": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" + } + }, + "node_modules/@webassemblyjs/wast-printer": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz", + "integrity": "sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webpack-cli/configtest": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-3.0.1.tgz", + "integrity": "sha512-u8d0pJ5YFgneF/GuvEiDA61Tf1VDomHHYMjv/wc9XzYj7nopltpG96nXN5dJRstxZhcNpV1g+nT6CydO7pHbjA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12.0" + }, + "peerDependencies": { + "webpack": "^5.82.0", + "webpack-cli": "6.x.x" + } + }, + "node_modules/@webpack-cli/info": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-3.0.1.tgz", + "integrity": "sha512-coEmDzc2u/ffMvuW9aCjoRzNSPDl/XLuhPdlFRpT9tZHmJ/039az33CE7uH+8s0uL1j5ZNtfdv0HkfaKRBGJsQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12.0" + }, + "peerDependencies": { + "webpack": "^5.82.0", + "webpack-cli": "6.x.x" + } + }, + "node_modules/@webpack-cli/serve": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-3.0.1.tgz", + "integrity": "sha512-sbgw03xQaCLiT6gcY/6u3qBDn01CWw/nbaXl3gTdTFuJJ75Gffv3E3DBpgvY2fkkrdS1fpjaXNOmJlnbtKauKg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12.0" + }, + "peerDependencies": { + "webpack": "^5.82.0", + "webpack-cli": "6.x.x" + }, + "peerDependenciesMeta": { + "webpack-dev-server": { + "optional": true + } + } + }, + "node_modules/@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true, + "license": "Apache-2.0" + }, "node_modules/acorn": { "version": "4.0.13", "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", @@ -1702,6 +1983,54 @@ "node": ">=0.4.0" } }, + "node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3" + }, + "peerDependencies": { + "ajv": "^8.8.2" + } + }, "node_modules/align-text": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", @@ -2573,6 +2902,16 @@ "node": ">=10" } }, + "node_modules/chrome-trace-event": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", + "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0" + } + }, "node_modules/ci-info": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.3.1.tgz", @@ -2623,6 +2962,31 @@ "wordwrap": "0.0.2" } }, + "node_modules/clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/clone-deep/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -2661,6 +3025,13 @@ "dev": true, "license": "MIT" }, + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true, + "license": "MIT" + }, "node_modules/combine-source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.6.1.tgz", @@ -2685,6 +3056,13 @@ "node": ">= 0.8" } }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "license": "MIT" + }, "node_modules/commondir": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-0.0.1.tgz", @@ -3107,6 +3485,33 @@ "dev": true, "license": "MIT" }, + "node_modules/enhanced-resolve": { + "version": "5.18.3", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.3.tgz", + "integrity": "sha512-d4lC8xfavMeBjzGr2vECC3fsGXziXZQyJxD868h2M/mBI3PwAuODxAkLkq5HYuvrPYcUtiLzsTo8U3PgX3Ocww==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/envinfo": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.18.0.tgz", + "integrity": "sha512-02QGCLRW+Jb8PC270ic02lat+N57iBaWsvHjcJViqp6UVupRB+Vsg7brYPTqEFXvsdTql3KnSczv5ModZFpl8Q==", + "dev": true, + "license": "MIT", + "bin": { + "envinfo": "dist/cli.js" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/error-ex": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", @@ -3135,6 +3540,13 @@ "node": ">= 0.4" } }, + "node_modules/es-module-lexer": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", + "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", + "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", @@ -3182,6 +3594,20 @@ "node": ">=8" } }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", @@ -3196,6 +3622,39 @@ "node": ">=4" } }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, "node_modules/events": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/events/-/events-1.0.2.tgz", @@ -3280,6 +3739,13 @@ "resolved": "https://registry.npmjs.org/extend/-/extend-1.2.1.tgz", "integrity": "sha512-2/JwIYRpMBDSjbQjUUppNSrmc719crhFaWIdT+TRSVA8gE+6HEobQWqJ6VkPt/H8twS7h/0WWs7veh8wmp98Ng==" }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -3287,6 +3753,33 @@ "dev": true, "license": "MIT" }, + "node_modules/fast-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz", + "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/fastest-levenshtein": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", + "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.9.1" + } + }, "node_modules/fb-watchman": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", @@ -3324,6 +3817,16 @@ "node": ">=8" } }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "license": "BSD-3-Clause", + "bin": { + "flat": "cli.js" + } + }, "node_modules/follow-redirects": { "version": "1.15.11", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", @@ -3527,6 +4030,13 @@ "node": "*" } }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true, + "license": "BSD-2-Clause" + }, "node_modules/gopd": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", @@ -3858,6 +4368,16 @@ "insert-module-globals": "bin/cmd.js" } }, + "node_modules/interpret": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", + "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -3931,6 +4451,19 @@ "node": ">=0.12.0" } }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "license": "MIT", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -3973,6 +4506,16 @@ "dev": true, "license": "ISC" }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/istanbul-lib-coverage": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", @@ -5032,6 +5575,13 @@ "dev": true, "license": "MIT" }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" + }, "node_modules/json-stable-stringify": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", @@ -5154,6 +5704,20 @@ "dev": true, "license": "MIT" }, + "node_modules/loader-runner": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.1.tgz", + "integrity": "sha512-IWqP2SCPhyVFTBtRcgMHdzlf9ul25NwaFx4wCEH/KjAXuuHY4yNjvPXsBokp8jCB936PyWRaPKUNh8NvylLp2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.11.5" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, "node_modules/locate-path": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", @@ -5971,6 +6535,19 @@ "readable-stream": "^1.1.13-1" } }, + "node_modules/rechoir": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", + "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve": "^1.20.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, "node_modules/reduce-component": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/reduce-component/-/reduce-component-1.0.1.tgz", @@ -5997,6 +6574,16 @@ "node": ">=0.10.0" } }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/resolve": { "version": "1.22.10", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", @@ -6212,6 +6799,26 @@ ], "license": "MIT" }, + "node_modules/schema-utils": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.3.tgz", + "integrity": "sha512-eflK8wEtyOE6+hsaRVPxvUKYCpRgzLqDTb8krvAsRIwOGlHoSgYLgBXoubGgLd2fT41/OUYdb48v4k4WWHQurA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.9.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.1.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, "node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -6222,6 +6829,16 @@ "semver": "bin/semver.js" } }, + "node_modules/serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "randombytes": "^2.1.0" + } + }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -6261,6 +6878,29 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shallow-clone/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/shasum": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", @@ -6728,6 +7368,139 @@ "acorn-node": "^1.2.0" } }, + "node_modules/tapable": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.0.tgz", + "integrity": "sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/terser": { + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.44.0.tgz", + "integrity": "sha512-nIVck8DK+GM/0Frwd+nIhZ84pR/BX7rmXMfYwyg+Sri5oGVE99/E3KvXqpC2xHFxyqXyGHTKBSioxxplrO4I4w==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.15.0", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser-webpack-plugin": { + "version": "5.3.14", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.14.tgz", + "integrity": "sha512-vkZjpUjb6OMS7dhV+tILUW6BhpDR7P2L/aQSAv+Uwk+m8KATX9EccViHTJR2qDtACKPIYndLGCyl3FMo+r2LMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.25", + "jest-worker": "^27.4.5", + "schema-utils": "^4.3.0", + "serialize-javascript": "^6.0.2", + "terser": "^5.31.1" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "uglify-js": { + "optional": true + } + } + }, + "node_modules/terser-webpack-plugin/node_modules/jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/terser-webpack-plugin/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/terser/node_modules/acorn": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/terser/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/terser/node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, "node_modules/test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", @@ -7244,6 +8017,183 @@ "makeerror": "1.0.12" } }, + "node_modules/watchpack": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.4.tgz", + "integrity": "sha512-c5EGNOiyxxV5qmTtAB7rbiXxi1ooX1pQKMLX/MIabJjRA0SJBQOjKF+KSVfHkr9U1cADPon0mRiVe/riyaiDUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack": { + "version": "5.102.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.102.1.tgz", + "integrity": "sha512-7h/weGm9d/ywQ6qzJ+Xy+r9n/3qgp/thalBbpOi5i223dPXKi04IBtqPN9nTd+jBc7QKfvDbaBnFipYp4sJAUQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint-scope": "^3.7.7", + "@types/estree": "^1.0.8", + "@types/json-schema": "^7.0.15", + "@webassemblyjs/ast": "^1.14.1", + "@webassemblyjs/wasm-edit": "^1.14.1", + "@webassemblyjs/wasm-parser": "^1.14.1", + "acorn": "^8.15.0", + "acorn-import-phases": "^1.0.3", + "browserslist": "^4.26.3", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.17.3", + "es-module-lexer": "^1.2.1", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.11", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^4.3.3", + "tapable": "^2.3.0", + "terser-webpack-plugin": "^5.3.11", + "watchpack": "^2.4.4", + "webpack-sources": "^3.3.3" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-cli": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-6.0.1.tgz", + "integrity": "sha512-MfwFQ6SfwinsUVi0rNJm7rHZ31GyTcpVE5pgVA3hwFRb7COD4TzjUUwhGWKfO50+xdc2MQPuEBBJoqIMGt3JDw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@discoveryjs/json-ext": "^0.6.1", + "@webpack-cli/configtest": "^3.0.1", + "@webpack-cli/info": "^3.0.1", + "@webpack-cli/serve": "^3.0.1", + "colorette": "^2.0.14", + "commander": "^12.1.0", + "cross-spawn": "^7.0.3", + "envinfo": "^7.14.0", + "fastest-levenshtein": "^1.0.12", + "import-local": "^3.0.2", + "interpret": "^3.1.1", + "rechoir": "^0.8.0", + "webpack-merge": "^6.0.1" + }, + "bin": { + "webpack-cli": "bin/cli.js" + }, + "engines": { + "node": ">=18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.82.0" + }, + "peerDependenciesMeta": { + "webpack-bundle-analyzer": { + "optional": true + }, + "webpack-dev-server": { + "optional": true + } + } + }, + "node_modules/webpack-cli/node_modules/commander": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/webpack-merge": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-6.0.1.tgz", + "integrity": "sha512-hXXvrjtx2PLYx4qruKl+kyRSLc52V+cCvMxRjmKwoA+CBbbF5GfIBtR6kCvl0fYGqTUPKB+1ktVmTHqMOzgCBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "clone-deep": "^4.0.1", + "flat": "^5.0.2", + "wildcard": "^2.0.1" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/webpack-sources": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.3.3.tgz", + "integrity": "sha512-yd1RBzSGanHkitROoPFd6qsrxt+oFhg/129YzheDGqeustzX0vTZJZsSsQjVQC4yzBQ56K55XU8gaNCtIzOnTg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack/node_modules/acorn": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/webpack/node_modules/acorn-import-phases": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/acorn-import-phases/-/acorn-import-phases-1.0.4.tgz", + "integrity": "sha512-wKmbr/DDiIXzEOiWrTTUcDm24kQ2vGfZQvM2fwg2vXqR5uW6aapr7ObPtj1th32b9u90/Pf4AItvdTh42fBmVQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.13.0" + }, + "peerDependencies": { + "acorn": "^8.14.0" + } + }, + "node_modules/webpack/node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.x" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -7282,6 +8232,13 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/wildcard": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", + "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", + "dev": true, + "license": "MIT" + }, "node_modules/window-size": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", diff --git a/package.json b/package.json index 95ae8ff..9c29883 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "dist/index.js", "scripts": { "test": "jest test", - "build-debug": "browserify lib/index.js -o dist/paydunya-node.debug.js", + "build-debug": "browserify dist/index.js -o dist/paydunya-node.debug.js", "build": "rimraf dist && tsc" }, "repository": { @@ -15,7 +15,11 @@ "keywords": [ "paydunya", "mobile", - "payment" + "payment", + "sdk", + "nodejs", + "library", + "api" ], "author": "PAYDUNYA", "license": "MIT", @@ -36,7 +40,9 @@ "jest": "^30.2.0", "rimraf": "^6.0.1", "ts-jest": "^29.4.5", - "uglifyify": "^3.0.1" + "uglifyify": "^3.0.1", + "webpack": "^5.102.1", + "webpack-cli": "^6.0.1" }, "files": [ "dist/**/*" diff --git a/src/lib/direct-pay.ts b/src/lib/direct-pay.ts index 3a68f10..c00ea57 100644 --- a/src/lib/direct-pay.ts +++ b/src/lib/direct-pay.ts @@ -3,6 +3,10 @@ import { ResponseError } from "./errors"; import { Endpoints, ResponseCode } from "./constants"; import util from "util" +/** + * @deprecated + * This endpoints are not working anymore. Throwing 404 errors + */ export class DirectPay { private transport: Transport; diff --git a/src/lib/invoices/onsite.ts b/src/lib/invoices/onsite.ts index 4b88a83..725d5d1 100644 --- a/src/lib/invoices/onsite.ts +++ b/src/lib/invoices/onsite.ts @@ -3,6 +3,10 @@ import { Endpoints, ResponseCode } from "../constants"; import { ResponseError } from "../errors"; import { Invoice } from "./invoice"; +/** + * @deprecated + * These endpoints are not working anymore. Throwing 404 errors + */ export class OnsiteInvoice extends Invoice { token?: string; oprToken?: string; From f67486cf827704756a67ca67834554301f1d6424 Mon Sep 17 00:00:00 2001 From: Maximilien COMLAN Date: Wed, 15 Oct 2025 22:17:27 +0100 Subject: [PATCH 15/20] added webpack support and removed unused librairies --- dist/balance.js | 4 +- dist/constants.d.ts | 4 +- dist/constants.js | 34 +- dist/constants.js.map | 2 +- dist/credentials.d.ts | 9 +- dist/credentials.js | 7 +- dist/credentials.js.map | 2 +- dist/direct-pay.d.ts | 10 +- dist/direct-pay.js | 35 +- dist/direct-pay.js.map | 2 +- dist/index.d.ts | 8 +- dist/index.js | 20 + dist/index.js.map | 2 +- dist/invoices/checkout.d.ts | 30 +- dist/invoices/checkout.js | 27 +- dist/invoices/checkout.js.map | 2 +- dist/invoices/invoice.js | 2 +- dist/invoices/invoice.js.map | 2 +- dist/invoices/onsite.d.ts | 4 + dist/invoices/onsite.js | 12 +- dist/invoices/onsite.js.map | 2 +- dist/paydunya.min.js | 2 + dist/paydunya.min.js.LICENSE.txt | 1 + dist/transport.d.ts | 2 +- dist/transport.js | 9 +- dist/transport.js.map | 2 +- package-lock.json | 2261 ++---------------------------- package.json | 21 +- src/lib/direct-pay.ts | 7 +- src/lib/invoices/invoice.ts | 2 +- tsconfig.json | 5 +- webpack.config.js | 24 + 32 files changed, 293 insertions(+), 2263 deletions(-) create mode 100644 dist/paydunya.min.js create mode 100644 dist/paydunya.min.js.LICENSE.txt create mode 100644 webpack.config.js diff --git a/dist/balance.js b/dist/balance.js index bad2cff..6f6a2d1 100644 --- a/dist/balance.js +++ b/dist/balance.js @@ -31,7 +31,7 @@ class Balance { }); } async getAll() { - return this.axios.get(constants_1.ApiRoutes.CHECK_BALANCE) + return this.axios.get(constants_1.Endpoints.CHECK_BALANCE) .then((result) => { if (result.data.success) { let items = {}; @@ -50,7 +50,7 @@ class Balance { } } async getAccountBalance(account) { - return this.axios.get(`${constants_1.ApiRoutes.CHECK_BALANCE}/${account}`) + return this.axios.get(`${constants_1.Endpoints.CHECK_BALANCE}/${account}`) .then((result) => { if (result.data.success) { return result.data; diff --git a/dist/constants.d.ts b/dist/constants.d.ts index 1161f76..6b9ccb5 100644 --- a/dist/constants.d.ts +++ b/dist/constants.d.ts @@ -1,4 +1,4 @@ -export declare enum Status { +export declare enum InvoiceStatus { COMPLETED = "completed", CANCELLED = "cancelled", PENDING = "pending", @@ -7,7 +7,7 @@ export declare enum Status { export declare enum ResponseCode { success = "00" } -export declare enum ApiRoutes { +export declare enum Endpoints { CREATE_INVOICE = "/checkout-invoice/create", CONFIRM_INVOICE = "/checkout-invoice/confirm/", CREATE_ONSITEINVOCE = "/opr/create", diff --git a/dist/constants.js b/dist/constants.js index a0b10d8..8f2ab4f 100644 --- a/dist/constants.js +++ b/dist/constants.js @@ -1,26 +1,26 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.SUPPORTED_COUNTRY_CODES = exports.PaymentChannel = exports.ApiRoutes = exports.ResponseCode = exports.Status = void 0; -var Status; -(function (Status) { - Status["COMPLETED"] = "completed"; - Status["CANCELLED"] = "cancelled"; - Status["PENDING"] = "pending"; - Status["FAILED"] = "failed"; -})(Status || (exports.Status = Status = {})); +exports.SUPPORTED_COUNTRY_CODES = exports.PaymentChannel = exports.Endpoints = exports.ResponseCode = exports.InvoiceStatus = void 0; +var InvoiceStatus; +(function (InvoiceStatus) { + InvoiceStatus["COMPLETED"] = "completed"; + InvoiceStatus["CANCELLED"] = "cancelled"; + InvoiceStatus["PENDING"] = "pending"; + InvoiceStatus["FAILED"] = "failed"; +})(InvoiceStatus || (exports.InvoiceStatus = InvoiceStatus = {})); var ResponseCode; (function (ResponseCode) { ResponseCode["success"] = "00"; })(ResponseCode || (exports.ResponseCode = ResponseCode = {})); -var ApiRoutes; -(function (ApiRoutes) { - ApiRoutes["CREATE_INVOICE"] = "/checkout-invoice/create"; - ApiRoutes["CONFIRM_INVOICE"] = "/checkout-invoice/confirm/"; - ApiRoutes["CREATE_ONSITEINVOCE"] = "/opr/create"; - ApiRoutes["CHARGE_ONSITEINVOCE"] = "/opr/charge"; - ApiRoutes["CREDIT_ACCOUNT"] = "/direct-pay/credit-account"; - ApiRoutes["CHECK_BALANCE"] = "/disburse/check-balance"; -})(ApiRoutes || (exports.ApiRoutes = ApiRoutes = {})); +var Endpoints; +(function (Endpoints) { + Endpoints["CREATE_INVOICE"] = "/checkout-invoice/create"; + Endpoints["CONFIRM_INVOICE"] = "/checkout-invoice/confirm/"; + Endpoints["CREATE_ONSITEINVOCE"] = "/opr/create"; + Endpoints["CHARGE_ONSITEINVOCE"] = "/opr/charge"; + Endpoints["CREDIT_ACCOUNT"] = "/direct-pay/credit-account"; + Endpoints["CHECK_BALANCE"] = "/disburse/check-balance"; +})(Endpoints || (exports.Endpoints = Endpoints = {})); var PaymentChannel; (function (PaymentChannel) { PaymentChannel["Card"] = "card"; diff --git a/dist/constants.js.map b/dist/constants.js.map index 9fede43..ee3fe65 100644 --- a/dist/constants.js.map +++ b/dist/constants.js.map @@ -1 +1 @@ -{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/lib/constants.ts"],"names":[],"mappings":";;;AAAA,IAAY,MAKX;AALD,WAAY,MAAM;IAChB,iCAAuB,CAAA;IACvB,iCAAuB,CAAA;IACvB,6BAAmB,CAAA;IACnB,2BAAiB,CAAA;AACnB,CAAC,EALW,MAAM,sBAAN,MAAM,QAKjB;AAED,IAAY,YAEX;AAFD,WAAY,YAAY;IACtB,8BAAc,CAAA;AAChB,CAAC,EAFW,YAAY,4BAAZ,YAAY,QAEvB;AAED,IAAY,SAOX;AAPD,WAAY,SAAS;IACnB,wDAA2C,CAAA;IAC3C,2DAA8C,CAAA;IAC9C,gDAAmC,CAAA;IACnC,gDAAmC,CAAA;IACnC,0DAA6C,CAAA;IAC7C,sDAAyC,CAAA;AAC3C,CAAC,EAPW,SAAS,yBAAT,SAAS,QAOpB;AAED,IAAY,cAmBX;AAnBD,WAAY,cAAc;IACtB,+BAAa,CAAA;IACb,6DAA2C,CAAA;IAC3C,8CAA4B,CAAA;IAC5B,yDAAuC,CAAA;IACvC,4CAA0B,CAAA;IAC1B,kDAAgC,CAAA;IAChC,wCAAsB,CAAA;IACtB,0CAAwB,CAAA;IACxB,mDAAiC,CAAA;IACjC,oCAAkB,CAAA;IAClB,kCAAgB,CAAA;IAChB,oCAAkB,CAAA;IAClB,6CAA2B,CAAA;IAC3B,wCAAsB,CAAA;IACtB,uDAAqC,CAAA;IACrC,oCAAkB,CAAA;IAClB,6DAA2C,CAAA;IAC3C,uDAAqC,CAAA;AACzC,CAAC,EAnBW,cAAc,8BAAd,cAAc,QAmBzB;AAEY,QAAA,uBAAuB,GAAG;IACnC,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;CACF,CAAC"} \ No newline at end of file +{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/lib/constants.ts"],"names":[],"mappings":";;;AAAA,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,wCAAuB,CAAA;IACvB,wCAAuB,CAAA;IACvB,oCAAmB,CAAA;IACnB,kCAAiB,CAAA;AACnB,CAAC,EALW,aAAa,6BAAb,aAAa,QAKxB;AAED,IAAY,YAEX;AAFD,WAAY,YAAY;IACtB,8BAAc,CAAA;AAChB,CAAC,EAFW,YAAY,4BAAZ,YAAY,QAEvB;AAED,IAAY,SAOX;AAPD,WAAY,SAAS;IACnB,wDAA2C,CAAA;IAC3C,2DAA8C,CAAA;IAC9C,gDAAmC,CAAA;IACnC,gDAAmC,CAAA;IACnC,0DAA6C,CAAA;IAC7C,sDAAyC,CAAA;AAC3C,CAAC,EAPW,SAAS,yBAAT,SAAS,QAOpB;AAED,IAAY,cAmBX;AAnBD,WAAY,cAAc;IACtB,+BAAa,CAAA;IACb,6DAA2C,CAAA;IAC3C,8CAA4B,CAAA;IAC5B,yDAAuC,CAAA;IACvC,4CAA0B,CAAA;IAC1B,kDAAgC,CAAA;IAChC,wCAAsB,CAAA;IACtB,0CAAwB,CAAA;IACxB,mDAAiC,CAAA;IACjC,oCAAkB,CAAA;IAClB,kCAAgB,CAAA;IAChB,oCAAkB,CAAA;IAClB,6CAA2B,CAAA;IAC3B,wCAAsB,CAAA;IACtB,uDAAqC,CAAA;IACrC,oCAAkB,CAAA;IAClB,6DAA2C,CAAA;IAC3C,uDAAqC,CAAA;AACzC,CAAC,EAnBW,cAAc,8BAAd,cAAc,QAmBzB;AAEY,QAAA,uBAAuB,GAAG;IACnC,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;CACF,CAAC"} \ No newline at end of file diff --git a/dist/credentials.d.ts b/dist/credentials.d.ts index bd82cc6..c395ff6 100644 --- a/dist/credentials.d.ts +++ b/dist/credentials.d.ts @@ -1,18 +1,21 @@ import { InternalAxiosRequestConfig } from "axios"; -type Environment = "live" | "test"; +export declare enum PaydunyaEnvironment { + LIVE = "live", + TEST = "test" +} interface CredentialOptions { masterKey: string; privateKey: string; publicKey: string; token: string; - mode: Environment; + mode: PaydunyaEnvironment; } export declare class Credentials { masterKey: string; privateKey: string; publicKey: string; token: string; - mode: Environment; + mode: PaydunyaEnvironment; constructor(options: CredentialOptions); extendRequestConfig(config: InternalAxiosRequestConfig): InternalAxiosRequestConfig; } diff --git a/dist/credentials.js b/dist/credentials.js index 492545e..2fa8134 100644 --- a/dist/credentials.js +++ b/dist/credentials.js @@ -1,6 +1,11 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.Credentials = void 0; +exports.Credentials = exports.PaydunyaEnvironment = void 0; +var PaydunyaEnvironment; +(function (PaydunyaEnvironment) { + PaydunyaEnvironment["LIVE"] = "live"; + PaydunyaEnvironment["TEST"] = "test"; +})(PaydunyaEnvironment || (exports.PaydunyaEnvironment = PaydunyaEnvironment = {})); class Credentials { masterKey; privateKey; diff --git a/dist/credentials.js.map b/dist/credentials.js.map index fd52d39..e0c485e 100644 --- a/dist/credentials.js.map +++ b/dist/credentials.js.map @@ -1 +1 @@ -{"version":3,"file":"credentials.js","sourceRoot":"","sources":["../src/lib/credentials.ts"],"names":[],"mappings":";;;AAWA,MAAa,WAAW;IACpB,SAAS,CAAQ;IACjB,UAAU,CAAQ;IAClB,SAAS,CAAQ;IACjB,KAAK,CAAQ;IACb,IAAI,CAAa;IAEjB,YAAY,OAA0B;QAClC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QACrC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAC7B,CAAC;IAED,mBAAmB,CAAC,MAAkC;QAClD,MAAM,CAAC,OAAO;aACb,GAAG,CAAC,cAAc,EAAE,kBAAkB,CAAC;aACvC,GAAG,CAAC,qBAAqB,EAAE,IAAI,CAAC,SAAS,CAAC;aAC1C,GAAG,CAAC,sBAAsB,EAAE,IAAI,CAAC,UAAU,CAAC;aAC5C,GAAG,CAAC,gBAAgB,EAAE,IAAI,CAAC,KAAK,CAAC,CAAA;QAClC,OAAO,MAAM,CAAA;IACjB,CAAC;CAEJ;AAxBD,kCAwBC"} \ No newline at end of file +{"version":3,"file":"credentials.js","sourceRoot":"","sources":["../src/lib/credentials.ts"],"names":[],"mappings":";;;AAEA,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC3B,oCAAa,CAAA;IACb,oCAAa,CAAA;AACjB,CAAC,EAHW,mBAAmB,mCAAnB,mBAAmB,QAG9B;AAUD,MAAa,WAAW;IACpB,SAAS,CAAQ;IACjB,UAAU,CAAQ;IAClB,SAAS,CAAQ;IACjB,KAAK,CAAQ;IACb,IAAI,CAAqB;IAEzB,YAAY,OAA0B;QAClC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QACrC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAC7B,CAAC;IAED,mBAAmB,CAAC,MAAkC;QAClD,MAAM,CAAC,OAAO;aACT,GAAG,CAAC,cAAc,EAAE,kBAAkB,CAAC;aACvC,GAAG,CAAC,qBAAqB,EAAE,IAAI,CAAC,SAAS,CAAC;aAC1C,GAAG,CAAC,sBAAsB,EAAE,IAAI,CAAC,UAAU,CAAC;aAC5C,GAAG,CAAC,gBAAgB,EAAE,IAAI,CAAC,KAAK,CAAC,CAAA;QAEtC,OAAO,MAAM,CAAA;IACjB,CAAC;CAEJ;AAzBD,kCAyBC"} \ No newline at end of file diff --git a/dist/direct-pay.d.ts b/dist/direct-pay.d.ts index e64f566..f71b79e 100644 --- a/dist/direct-pay.d.ts +++ b/dist/direct-pay.d.ts @@ -1,4 +1,8 @@ import { Transport } from "./transport"; +/** + * @deprecated + * This endpoints are not working anymore. Throwing 404 errors + */ export declare class DirectPay { private transport; responseText?: string; @@ -10,5 +14,9 @@ export declare class DirectPay { * @param account Account alias, number or email * @param amount Amount to credit */ - creditAccount(account: string, amount: number): Promise; + creditAccount(account: string, amount: number): Promise<{ + responseText: string | undefined; + description: string | undefined; + transactionID: string | undefined; + }>; } diff --git a/dist/direct-pay.js b/dist/direct-pay.js index c091835..9382ef1 100644 --- a/dist/direct-pay.js +++ b/dist/direct-pay.js @@ -1,12 +1,12 @@ "use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", { value: true }); exports.DirectPay = void 0; const errors_1 = require("./errors"); const constants_1 = require("./constants"); -const util_1 = __importDefault(require("util")); +/** + * @deprecated + * This endpoints are not working anymore. Throwing 404 errors + */ class DirectPay { transport; responseText; @@ -25,16 +25,23 @@ class DirectPay { account_alias: account, amount: Number(amount), }; - const res = await this.transport.axios.post(constants_1.ApiRoutes.CREDIT_ACCOUNT, body); - if (res.data.response_code === constants_1.ResponseCode.success) { - this.responseText = res.data.response_text; - this.description = res.data.description; - this.transactionID = res.data.transaction_id; - } - else { - const e = new errors_1.ResponseError(util_1.default.format("Failed to credit account. Please ensure %s and %s are valid OR check your account balance.", account, amount), res.data); - throw e; - } + return this.transport.client.post(constants_1.Endpoints.CREDIT_ACCOUNT, body) + .then((res) => { + if (res.data.response_code === constants_1.ResponseCode.success) { + this.responseText = res.data.response_text; + this.description = res.data.description; + this.transactionID = res.data.transaction_id; + return { + responseText: this.responseText, + description: this.description, + transactionID: this.transactionID + }; + } + else { + const e = new errors_1.ResponseError(`Failed to credit account. Please ensure ${account} and ${amount} are valid OR check your account balance.`, res.data); + throw e; + } + }); } } exports.DirectPay = DirectPay; diff --git a/dist/direct-pay.js.map b/dist/direct-pay.js.map index 2541a4e..f643307 100644 --- a/dist/direct-pay.js.map +++ b/dist/direct-pay.js.map @@ -1 +1 @@ -{"version":3,"file":"direct-pay.js","sourceRoot":"","sources":["../src/lib/direct-pay.ts"],"names":[],"mappings":";;;;;;AACA,qCAAyC;AACzC,2CAAsD;AACtD,gDAAuB;AAEvB,MAAa,SAAS;IACZ,SAAS,CAAY;IAEtB,YAAY,CAAU;IACtB,WAAW,CAAU;IACrB,aAAa,CAAU;IAE9B,YAAY,SAAoB;QAC9B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,aAAa,CAAC,OAAe,EAAE,MAAc;QACjD,MAAM,IAAI,GAAG;YACX,aAAa,EAAE,OAAO;YACtB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;SACvB,CAAC;QAEF,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,qBAAS,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;QAE5E,IAAI,GAAG,CAAC,IAAI,CAAC,aAAa,KAAK,wBAAY,CAAC,OAAO,EAAE,CAAC;YACpD,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC;YAC3C,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC;YACxC,IAAI,CAAC,aAAa,GAAG,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC;QAC/C,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,GAAG,IAAI,sBAAa,CACzB,cAAI,CAAC,MAAM,CACT,4FAA4F,EAC5F,OAAO,EACP,MAAM,CACP,EACD,GAAG,CAAC,IAAI,CACT,CAAC;YACF,MAAM,CAAC,CAAC;QACV,CAAC;IACH,CAAC;CACF;AAxCD,8BAwCC"} \ No newline at end of file +{"version":3,"file":"direct-pay.js","sourceRoot":"","sources":["../src/lib/direct-pay.ts"],"names":[],"mappings":";;;AACA,qCAAyC;AACzC,2CAAsD;AAEtD;;;GAGG;AACH,MAAa,SAAS;IACZ,SAAS,CAAY;IAEtB,YAAY,CAAU;IACtB,WAAW,CAAU;IACrB,aAAa,CAAU;IAE9B,YAAY,SAAoB;QAC9B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,aAAa,CAAC,OAAe,EAAE,MAAc;QACjD,MAAM,IAAI,GAAG;YACX,aAAa,EAAE,OAAO;YACtB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;SACvB,CAAC;QACF,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,qBAAS,CAAC,cAAc,EAAE,IAAI,CAAC;aAC9D,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;YACZ,IAAI,GAAG,CAAC,IAAI,CAAC,aAAa,KAAK,wBAAY,CAAC,OAAO,EAAE,CAAC;gBACpD,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC;gBAC3C,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC;gBACxC,IAAI,CAAC,aAAa,GAAG,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC;gBAC7C,OAAO;oBACL,YAAY,EAAE,IAAI,CAAC,YAAY;oBAC/B,WAAW,EAAE,IAAI,CAAC,WAAW;oBAC7B,aAAa,EAAE,IAAI,CAAC,aAAa;iBAClC,CAAA;YACH,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,GAAG,IAAI,sBAAa,CACzB,2CAA2C,OAAO,QAAQ,MAAM,2CAA2C,EAC3G,GAAG,CAAC,IAAI,CACT,CAAC;gBACF,MAAM,CAAC,CAAC;YACV,CAAC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;CACF;AAzCD,8BAyCC"} \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts index ff298a2..7e8bd1a 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -3,14 +3,20 @@ import { Transport } from "./transport"; import { DirectPay } from "./direct-pay"; import CheckoutInvoice from "./invoices/checkout"; import { OnsiteInvoice } from "./invoices/onsite"; -import { Credentials } from "./credentials"; +import { Credentials, PaydunyaEnvironment } from "./credentials"; +import { Store } from "./store"; +import { Invoice } from "./invoices/invoice"; export declare class PaydunyaClient { transport: Transport; constructor(transport: Transport); + get store(): Store | undefined; + set store(store: Store); + invoiceInstance(): Invoice; checkoutInvoiceInstance(): CheckoutInvoice; onsiteInvoiceInstance(): OnsiteInvoice; directpayInstance(): DirectPay; balanceInstance(): Balance; static fromCredentialsInstance(credentials: Credentials): PaydunyaClient; static fromCredentials(params: ConstructorParameters[0]): PaydunyaClient; + static autoDetect(mode?: PaydunyaEnvironment): PaydunyaClient; } diff --git a/dist/index.js b/dist/index.js index a68fee1..b4bfb91 100644 --- a/dist/index.js +++ b/dist/index.js @@ -10,11 +10,21 @@ const direct_pay_1 = require("./direct-pay"); const checkout_1 = __importDefault(require("./invoices/checkout")); const onsite_1 = require("./invoices/onsite"); const credentials_1 = require("./credentials"); +const invoice_1 = require("./invoices/invoice"); class PaydunyaClient { transport; constructor(transport) { this.transport = transport; } + get store() { + return this.transport.store; + } + set store(store) { + this.transport.store = store; + } + invoiceInstance() { + return new invoice_1.Invoice(this.transport); + } checkoutInvoiceInstance() { return new checkout_1.default(this.transport); } @@ -35,6 +45,16 @@ class PaydunyaClient { let client = new PaydunyaClient(new transport_1.Transport(new credentials_1.Credentials(params))); return client; } + static autoDetect(mode = credentials_1.PaydunyaEnvironment.LIVE) { + let client = new PaydunyaClient(new transport_1.Transport(new credentials_1.Credentials({ + masterKey: process.env.PAYDUNYA_MASTER_KEY || "", + privateKey: process.env.PAYDUNYA_PRIVATE_KEY || "", + publicKey: process.env.PAYDUNYA_PUBLIC_KEY || "", + token: process.env.PAYDUNYA_TOKEN || "", + mode: (process.env.PAYDUNYA_MODE || mode), + }))); + return client; + } } exports.PaydunyaClient = PaydunyaClient; //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/index.js.map b/dist/index.js.map index 19e8976..2988505 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":";;;;;;AAAA,uCAAoC;AACpC,2CAAwC;AACxC,6CAAyC;AACzC,mEAAkD;AAClD,8CAAkD;AAClD,+CAA4C;AAE5C,MAAa,cAAc;IACvB,SAAS,CAAY;IAErB,YAAY,SAAoB;QAC5B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC/B,CAAC;IAED,uBAAuB;QACnB,OAAO,IAAI,kBAAe,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC/C,CAAC;IAED,qBAAqB;QACjB,OAAO,IAAI,sBAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC7C,CAAC;IAED,iBAAiB;QACb,OAAO,IAAI,sBAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACzC,CAAC;IAED,eAAe;QACX,OAAO,IAAI,iBAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACvC,CAAC;IAED,MAAM,CAAC,uBAAuB,CAAC,WAAwB;QACnD,IAAI,MAAM,GAAG,IAAI,cAAc,CAC3B,IAAI,qBAAS,CACT,WAAW,CACd,CACJ,CAAA;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,MAAM,CAAC,eAAe,CAAC,MAAoD;QACvE,IAAI,MAAM,GAAG,IAAI,cAAc,CAC3B,IAAI,qBAAS,CACT,IAAI,yBAAW,CAAC,MAAM,CAAC,CAC1B,CACJ,CAAA;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;CAEJ;AAzCD,wCAyCC"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":";;;;;;AAAA,uCAAoC;AACpC,2CAAwC;AACxC,6CAAyC;AACzC,mEAAkD;AAClD,8CAAkD;AAClD,+CAAiE;AAEjE,gDAA6C;AAE7C,MAAa,cAAc;IACvB,SAAS,CAAY;IAErB,YAAY,SAAoB;QAC5B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC/B,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;IAChC,CAAC;IAED,IAAI,KAAK,CAAC,KAAY;QAClB,IAAI,CAAC,SAAS,CAAC,KAAK,GAAG,KAAK,CAAC;IACjC,CAAC;IAED,eAAe;QACX,OAAO,IAAI,iBAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACvC,CAAC;IAED,uBAAuB;QACnB,OAAO,IAAI,kBAAe,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC/C,CAAC;IAED,qBAAqB;QACjB,OAAO,IAAI,sBAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC7C,CAAC;IAED,iBAAiB;QACb,OAAO,IAAI,sBAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACzC,CAAC;IAED,eAAe;QACX,OAAO,IAAI,iBAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACvC,CAAC;IAED,MAAM,CAAC,uBAAuB,CAAC,WAAwB;QACnD,IAAI,MAAM,GAAG,IAAI,cAAc,CAC3B,IAAI,qBAAS,CACT,WAAW,CACd,CACJ,CAAA;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,MAAM,CAAC,eAAe,CAAC,MAAoD;QACvE,IAAI,MAAM,GAAG,IAAI,cAAc,CAC3B,IAAI,qBAAS,CACT,IAAI,yBAAW,CAAC,MAAM,CAAC,CAC1B,CACJ,CAAA;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,OAA4B,iCAAmB,CAAC,IAAI;QAClE,IAAI,MAAM,GAAG,IAAI,cAAc,CAC3B,IAAI,qBAAS,CACT,IAAI,yBAAW,CAAC;YACZ,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,EAAE;YAChD,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,EAAE;YAClD,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,EAAE;YAChD,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,EAAE;YACvC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,IAAI,CAAwB;SACnE,CAAC,CACL,CACJ,CAAA;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;CAEJ;AApED,wCAoEC"} \ No newline at end of file diff --git a/dist/invoices/checkout.d.ts b/dist/invoices/checkout.d.ts index c39cd25..53f97df 100644 --- a/dist/invoices/checkout.d.ts +++ b/dist/invoices/checkout.d.ts @@ -9,20 +9,46 @@ export default class CheckoutInvoice extends Invoice { receiptURL?: string; receipt_identifier?: string; provider_reference?: string; + hash?: string; constructor(client: Transport); /** * Create invoice */ - create(): Promise; + create(): Promise<{ + token: string | undefined; + url: string | undefined; + status: string | undefined; + hash: string | undefined; + responseText: string | undefined; + customer: any; + receiptURL: string | undefined; + receipt_identifier: string | undefined; + provider_reference: string | undefined; + customData: Record; + totalAmount: number; + }>; /** * Get token status. * @param {string} givenToken Invoice token */ - confirm(givenToken?: string): Promise; + getTokenStatus(givenToken?: string): Promise<{ + token: string | undefined; + url: string | undefined; + status: string | undefined; + hash: string | undefined; + responseText: string | undefined; + customer: any; + receiptURL: string | undefined; + receipt_identifier: string | undefined; + provider_reference: string | undefined; + customData: Record; + totalAmount: number; + }>; get asObject(): { token: string | undefined; url: string | undefined; status: string | undefined; + hash: string | undefined; responseText: string | undefined; customer: any; receiptURL: string | undefined; diff --git a/dist/invoices/checkout.js b/dist/invoices/checkout.js index f1be201..68ae758 100644 --- a/dist/invoices/checkout.js +++ b/dist/invoices/checkout.js @@ -12,6 +12,7 @@ class CheckoutInvoice extends invoice_1.Invoice { receiptURL; receipt_identifier; provider_reference; + hash; constructor(client) { super(client); } @@ -20,13 +21,13 @@ class CheckoutInvoice extends invoice_1.Invoice { */ async create() { const requestBody = this.asRequestBody(); - return this.transport.axios - .post(constants_1.ApiRoutes.CREATE_INVOICE, requestBody) + return this.transport.client + .post(constants_1.Endpoints.CREATE_INVOICE, requestBody) .then((res) => { if (res.data.response_code === constants_1.ResponseCode.success) { this.token = res.data.token; this.url = res.data.response_text; - return this.confirm(this.token); + return this.getTokenStatus(this.token); } else { const e = new errors_1.ResponseError("Failed to create invoice.", res.data); @@ -38,16 +39,26 @@ class CheckoutInvoice extends invoice_1.Invoice { * Get token status. * @param {string} givenToken Invoice token */ - async confirm(givenToken) { + async getTokenStatus(givenToken) { const token = givenToken ? givenToken : this.token; - this.transport.axios - .get(`${constants_1.ApiRoutes.CONFIRM_INVOICE}${token}`) + return this.transport.client + .get(`${constants_1.Endpoints.CONFIRM_INVOICE}${token}`) .then((res) => { const body = res.data; if (body.response_code === constants_1.ResponseCode.success) { this.status = body.status; this.responseText = body.response_text; - if (this.status === constants_1.Status.COMPLETED) { + this.hash = body?.hash; + this.items = body.invoice.items; + this.taxes = body.taxes; + this.description = body.description; + if (body.actions) { + this.cancelURL = body.actions.cancel_url; + this.callbackURL = body.actions.callback_url; + this.returnURL = body.actions.return_url; + } + this.totalAmount = body.invoice.total_amount; + if (this.status === constants_1.InvoiceStatus.COMPLETED) { this.customer = body.customer; this.receiptURL = body.receipt_url; this.receipt_identifier = body.receipt_identifier; @@ -56,7 +67,6 @@ class CheckoutInvoice extends invoice_1.Invoice { this.customData = body.custom_data; } } - this.totalAmount = body.invoice.total_amount; return this.asObject; } else { @@ -70,6 +80,7 @@ class CheckoutInvoice extends invoice_1.Invoice { token: this.token, url: this.url, status: this.status, + hash: this.hash, responseText: this.responseText, customer: this.customer, receiptURL: this.receiptURL, diff --git a/dist/invoices/checkout.js.map b/dist/invoices/checkout.js.map index 30b1b3b..b9de52b 100644 --- a/dist/invoices/checkout.js.map +++ b/dist/invoices/checkout.js.map @@ -1 +1 @@ -{"version":3,"file":"checkout.js","sourceRoot":"","sources":["../../src/lib/invoices/checkout.ts"],"names":[],"mappings":";;AAAA,uCAAoC;AAEpC,sCAA0C;AAC1C,4CAA+D;AAE/D,MAAqB,eAAgB,SAAQ,iBAAO;IAClD,KAAK,CAAU;IACf,GAAG,CAAU;IACb,MAAM,CAAU;IAChB,YAAY,CAAU;IACtB,QAAQ,CAAO;IACf,UAAU,CAAU;IACpB,kBAAkB,CAAU;IAC5B,kBAAkB,CAAU;IAE5B,YAAY,MAAiB;QAC3B,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM;QACV,MAAM,WAAW,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;QAEzC,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK;aACxB,IAAI,CAAC,qBAAS,CAAC,cAAc,EAAE,WAAW,CAAC;aAC3C,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;YACZ,IAAI,GAAG,CAAC,IAAI,CAAC,aAAa,KAAK,wBAAY,CAAC,OAAO,EAAE,CAAC;gBACpD,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;gBAC5B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC;gBAClC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAClC,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,GAAG,IAAI,sBAAa,CAAC,2BAA2B,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;gBACnE,MAAM,CAAC,CAAC;YACV,CAAC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,OAAO,CAAC,UAAmB;QAC/B,MAAM,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;QACnD,IAAI,CAAC,SAAS,CAAC,KAAK;aACjB,GAAG,CAAC,GAAG,qBAAS,CAAC,eAAe,GAAG,KAAK,EAAE,CAAC;aAC3C,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;YACZ,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;YACtB,IAAI,IAAI,CAAC,aAAa,KAAK,wBAAY,CAAC,OAAO,EAAE,CAAC;gBAChD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;gBAC1B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC;gBACvC,IAAI,IAAI,CAAC,MAAM,KAAK,kBAAM,CAAC,SAAS,EAAE,CAAC;oBACrC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;oBAC9B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC;oBACnC,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,CAAC;oBAClD,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,CAAC;oBAClD,IAAI,IAAI,CAAC,WAAW,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;wBACjE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC;oBACrC,CAAC;gBACH,CAAC;gBACD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC;gBAC7C,OAAO,IAAI,CAAC,QAAQ,CAAC;YACvB,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,GAAG,IAAI,sBAAa,CACzB,mCAAmC,EACnC,GAAG,CAAC,IAAI,CACT,CAAC;gBACF,MAAM,CAAC,CAAC;YACV,CAAC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;IAED,IAAI,QAAQ;QACV,OAAO;YACL,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;YAC3C,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;YAC3C,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAC;IACJ,CAAC;CACF;AAlFD,kCAkFC"} \ No newline at end of file +{"version":3,"file":"checkout.js","sourceRoot":"","sources":["../../src/lib/invoices/checkout.ts"],"names":[],"mappings":";;AAAA,uCAAoC;AAEpC,sCAA0C;AAC1C,4CAAsE;AAGtE,MAAqB,eAAgB,SAAQ,iBAAO;IAClD,KAAK,CAAU;IACf,GAAG,CAAU;IACb,MAAM,CAAU;IAChB,YAAY,CAAU;IACtB,QAAQ,CAAO;IACf,UAAU,CAAU;IACpB,kBAAkB,CAAU;IAC5B,kBAAkB,CAAU;IAC5B,IAAI,CAAU;IAGd,YAAY,MAAiB;QAC3B,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM;QACV,MAAM,WAAW,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;QAEzC,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM;aACzB,IAAI,CAAC,qBAAS,CAAC,cAAc,EAAE,WAAW,CAAC;aAC3C,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;YACZ,IAAI,GAAG,CAAC,IAAI,CAAC,aAAa,KAAK,wBAAY,CAAC,OAAO,EAAE,CAAC;gBACpD,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;gBAC5B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC;gBAClC,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACzC,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,GAAG,IAAI,sBAAa,CAAC,2BAA2B,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;gBACnE,MAAM,CAAC,CAAC;YACV,CAAC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,cAAc,CAAC,UAAmB;QACtC,MAAM,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;QACnD,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM;aACzB,GAAG,CAAC,GAAG,qBAAS,CAAC,eAAe,GAAG,KAAK,EAAE,CAAC;aAC3C,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;YACZ,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;YAEtB,IAAI,IAAI,CAAC,aAAa,KAAK,wBAAY,CAAC,OAAO,EAAE,CAAC;gBAChD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;gBAC1B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC;gBAEvC,IAAI,CAAC,IAAI,GAAG,IAAI,EAAE,IAAI,CAAC;gBACvB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;gBAChC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;gBACxB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;gBAEpC,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;oBACjB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;oBACzC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC;oBAC7C,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;gBAC3C,CAAC;gBAED,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC;gBAE7C,IAAI,IAAI,CAAC,MAAM,KAAK,yBAAa,CAAC,SAAS,EAAE,CAAC;oBAC5C,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;oBAC9B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC;oBACnC,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,CAAC;oBAClD,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,CAAC;oBAClD,IAAI,IAAI,CAAC,WAAW,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;wBACjE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC;oBACrC,CAAC;gBACH,CAAC;gBAED,OAAO,IAAI,CAAC,QAAQ,CAAC;YACvB,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,GAAG,IAAI,sBAAa,CACzB,mCAAmC,EACnC,GAAG,CAAC,IAAI,CACT,CAAC;gBACF,MAAM,CAAC,CAAC;YACV,CAAC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;IAED,IAAI,QAAQ;QACV,OAAO;YACL,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;YAC3C,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;YAC3C,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAA;IACH,CAAC;CACF;AApGD,kCAoGC"} \ No newline at end of file diff --git a/dist/invoices/invoice.js b/dist/invoices/invoice.js index 683b457..29f9376 100644 --- a/dist/invoices/invoice.js +++ b/dist/invoices/invoice.js @@ -101,7 +101,7 @@ class Invoice { */ asRequestBody() { if (this.totalAmount <= 0) - throw new Error("Invalid parameters. Initialize Invoice with valid instances of Setup and Store. Total amount must also be set.\neg: var invoice = new Invoice; invoice.init(setup, store); invoice.setTotalAmount(40)"); + throw new Error("Invalid parameters. Initialize Invoice with valid instances of Setup and Store. Total amount must also be set."); const body = { invoice: { total_amount: this.totalAmount, diff --git a/dist/invoices/invoice.js.map b/dist/invoices/invoice.js.map index 95de1aa..705c6e8 100644 --- a/dist/invoices/invoice.js.map +++ b/dist/invoices/invoice.js.map @@ -1 +1 @@ -{"version":3,"file":"invoice.js","sourceRoot":"","sources":["../../src/lib/invoices/invoice.ts"],"names":[],"mappings":";;;AAyBA;;;;GAIG;AACH,MAAa,OAAO;IAClB,SAAS,CAAY;IACrB,SAAS,CAAU;IACnB,SAAS,CAAU;IACnB,WAAW,CAAU;IAErB,WAAW,CAAS;IACpB,KAAK,CAA8B;IACnC,UAAU,CAAsB;IAChC,KAAK,CAA6B;IAClC,QAAQ,CAAmB;IAC3B,WAAW,CAAS;IAEpB,YAAY,SAAoB;QAC9B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAE3B,IAAI,SAAS,CAAC,KAAK,EAAE,UAAU;YAAE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC,KAAM,CAAC,UAAU,CAAC;QAC9E,IAAI,SAAS,CAAC,KAAK,EAAE,UAAU;YAAE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC,KAAM,CAAC,UAAU,CAAC;QAC9E,IAAI,SAAS,CAAC,KAAK,EAAE,YAAY;YAC/B,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC,KAAM,CAAC,YAAY,CAAC;QAEnD,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC;IACvB,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;IAC9B,CAAC;IAED;;;;;;;OAOG;IACH,OAAO,CACL,IAAY,EACZ,QAAiB,EACjB,SAAkB,EAClB,UAAmB,EACnB,WAAoB;QAEpB,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;QACpD,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,QAAQ,CAAC,GAAG;YAC/B,IAAI,EAAE,IAAI;YACV,QAAQ,EAAE,QAAQ,IAAI,CAAC;YACvB,UAAU,EAAE,SAAS,IAAI,CAAC;YAC1B,WAAW,EAAE,UAAU,IAAI,CAAC;SAC7B,CAAC;QACF,IAAI,WAAW;YAAE,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,QAAQ,CAAE,CAAC,WAAW,GAAG,WAAW,CAAC;QAE3E,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,IAAY,EAAE,MAAc;QACjC,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;QACpD,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,QAAQ,CAAC,GAAG;YAC9B,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;SACvB,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;OAGG;IACH,UAAU,CAAC,OAAuB;QAChC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;OAGG;IACH,WAAW,CAAC,WAA6B,EAAE;QACzC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACzC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAE,CAAC,CAAC;QACnC,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,aAAa,CAAC,KAAa,EAAE,KAAa;QACxC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;QAC/B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;OAGG;IACH,aAAa;QACX,IAAI,IAAI,CAAC,WAAW,IAAI,CAAC;YACvB,MAAM,IAAI,KAAK,CACb,uMAAuM,CACxM,CAAC;QAEJ,MAAM,IAAI,GAAG;YACX,OAAO,EAAE;gBACP,YAAY,EAAE,IAAI,CAAC,WAAW;aAChB;YAChB,OAAO,EAAE,SAAgB;YACzB,WAAW,EAAE,SAA4C;YACzD,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ;SAC5B,CAAC;QAEF,IAAI,IAAI,CAAC,WAAW;YAAE,IAAI,CAAC,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QAClE,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,GAAG,CAAC;YACvC,IAAI,CAAC,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QACxC,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC;YAAE,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACxE,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACzD,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;YAClB,IAAI,IAAI,CAAC,SAAS;gBAAE,IAAI,CAAC,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC;YAC7D,IAAI,IAAI,CAAC,SAAS;gBAAE,IAAI,CAAC,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC;YAC7D,IAAI,IAAI,CAAC,WAAW;gBAAE,IAAI,CAAC,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC;QACrE,CAAC;QACD,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC;YAAE,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACxE,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,CAAC;YACzC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC;QAErC,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA5ID,0BA4IC"} \ No newline at end of file +{"version":3,"file":"invoice.js","sourceRoot":"","sources":["../../src/lib/invoices/invoice.ts"],"names":[],"mappings":";;;AAyBA;;;;GAIG;AACH,MAAa,OAAO;IAClB,SAAS,CAAY;IACrB,SAAS,CAAU;IACnB,SAAS,CAAU;IACnB,WAAW,CAAU;IAErB,WAAW,CAAS;IACpB,KAAK,CAA8B;IACnC,UAAU,CAAsB;IAChC,KAAK,CAA6B;IAClC,QAAQ,CAAmB;IAC3B,WAAW,CAAS;IAEpB,YAAY,SAAoB;QAC9B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAE3B,IAAI,SAAS,CAAC,KAAK,EAAE,UAAU;YAAE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC,KAAM,CAAC,UAAU,CAAC;QAC9E,IAAI,SAAS,CAAC,KAAK,EAAE,UAAU;YAAE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC,KAAM,CAAC,UAAU,CAAC;QAC9E,IAAI,SAAS,CAAC,KAAK,EAAE,YAAY;YAC/B,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC,KAAM,CAAC,YAAY,CAAC;QAEnD,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC;IACvB,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;IAC9B,CAAC;IAED;;;;;;;OAOG;IACH,OAAO,CACL,IAAY,EACZ,QAAiB,EACjB,SAAkB,EAClB,UAAmB,EACnB,WAAoB;QAEpB,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;QACpD,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,QAAQ,CAAC,GAAG;YAC/B,IAAI,EAAE,IAAI;YACV,QAAQ,EAAE,QAAQ,IAAI,CAAC;YACvB,UAAU,EAAE,SAAS,IAAI,CAAC;YAC1B,WAAW,EAAE,UAAU,IAAI,CAAC;SAC7B,CAAC;QACF,IAAI,WAAW;YAAE,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,QAAQ,CAAE,CAAC,WAAW,GAAG,WAAW,CAAC;QAE3E,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,IAAY,EAAE,MAAc;QACjC,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;QACpD,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,QAAQ,CAAC,GAAG;YAC9B,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;SACvB,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;OAGG;IACH,UAAU,CAAC,OAAuB;QAChC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;OAGG;IACH,WAAW,CAAC,WAA6B,EAAE;QACzC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACzC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAE,CAAC,CAAC;QACnC,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,aAAa,CAAC,KAAa,EAAE,KAAa;QACxC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;QAC/B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;OAGG;IACH,aAAa;QACX,IAAI,IAAI,CAAC,WAAW,IAAI,CAAC;YACvB,MAAM,IAAI,KAAK,CACb,gHAAgH,CACjH,CAAC;QAEJ,MAAM,IAAI,GAAG;YACX,OAAO,EAAE;gBACP,YAAY,EAAE,IAAI,CAAC,WAAW;aAChB;YAChB,OAAO,EAAE,SAAgB;YACzB,WAAW,EAAE,SAA4C;YACzD,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ;SAC5B,CAAC;QAEF,IAAI,IAAI,CAAC,WAAW;YAAE,IAAI,CAAC,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QAClE,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,GAAG,CAAC;YACvC,IAAI,CAAC,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QACxC,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC;YAAE,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACxE,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACzD,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;YAClB,IAAI,IAAI,CAAC,SAAS;gBAAE,IAAI,CAAC,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC;YAC7D,IAAI,IAAI,CAAC,SAAS;gBAAE,IAAI,CAAC,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC;YAC7D,IAAI,IAAI,CAAC,WAAW;gBAAE,IAAI,CAAC,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC;QACrE,CAAC;QACD,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC;YAAE,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACxE,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,CAAC;YACzC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC;QAErC,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA5ID,0BA4IC"} \ No newline at end of file diff --git a/dist/invoices/onsite.d.ts b/dist/invoices/onsite.d.ts index 0219b02..66632b6 100644 --- a/dist/invoices/onsite.d.ts +++ b/dist/invoices/onsite.d.ts @@ -1,5 +1,9 @@ import { Transport } from "../transport"; import { Invoice } from "./invoice"; +/** + * @deprecated + * These endpoints are not working anymore. Throwing 404 errors + */ export declare class OnsiteInvoice extends Invoice { token?: string; oprToken?: string; diff --git a/dist/invoices/onsite.js b/dist/invoices/onsite.js index 6a6009c..ae1c2d6 100644 --- a/dist/invoices/onsite.js +++ b/dist/invoices/onsite.js @@ -4,6 +4,10 @@ exports.OnsiteInvoice = void 0; const constants_1 = require("../constants"); const errors_1 = require("../errors"); const invoice_1 = require("./invoice"); +/** + * @deprecated + * These endpoints are not working anymore. Throwing 404 errors + */ class OnsiteInvoice extends invoice_1.Invoice { token; oprToken; @@ -25,8 +29,8 @@ class OnsiteInvoice extends invoice_1.Invoice { account_alias: customer, }, }; - return this.transport.axios - .post(constants_1.ApiRoutes.CREATE_ONSITEINVOCE, body) + return this.transport.client + .post(constants_1.Endpoints.CREATE_ONSITEINVOCE, body) .then((response) => { if (response.data?.response_code === constants_1.ResponseCode.success) { return { @@ -51,8 +55,8 @@ class OnsiteInvoice extends invoice_1.Invoice { token: oprToken, confirm_token: confirmToken, }; - return this.transport.axios - .post(constants_1.ApiRoutes.CHARGE_ONSITEINVOCE, body) + return this.transport.client + .post(constants_1.Endpoints.CHARGE_ONSITEINVOCE, body) .then((response) => { if (response.data?.response_code === constants_1.ResponseCode.success) { return { diff --git a/dist/invoices/onsite.js.map b/dist/invoices/onsite.js.map index 3d0c5b3..9c2f6b1 100644 --- a/dist/invoices/onsite.js.map +++ b/dist/invoices/onsite.js.map @@ -1 +1 @@ -{"version":3,"file":"onsite.js","sourceRoot":"","sources":["../../src/lib/invoices/onsite.ts"],"names":[],"mappings":";;;AACA,4CAAuD;AACvD,sCAA0C;AAC1C,uCAAoC;AAEpC,MAAa,aAAc,SAAQ,iBAAO;IACxC,KAAK,CAAU;IACf,QAAQ,CAAU;IAClB,YAAY,CAAU;IACtB,MAAM,CAAU;IAChB,UAAU,CAAU;IACpB,QAAQ,CAAO;IAEf,YAAY,SAAoB;QAC9B,KAAK,CAAC,SAAS,CAAC,CAAC;IACnB,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,MAAM,CAAC,QAAgB;QAC3B,IAAI,IAAI,GAAG;YACT,YAAY,EAAE,IAAI,CAAC,aAAa,EAAE;YAClC,QAAQ,EAAE;gBACR,aAAa,EAAE,QAAQ;aACxB;SACF,CAAC;QACF,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK;aACxB,IAAI,CAAC,qBAAS,CAAC,mBAAmB,EAAE,IAAI,CAAC;aACzC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;YACjB,IAAI,QAAQ,CAAC,IAAI,EAAE,aAAa,KAAK,wBAAY,CAAC,OAAO,EAAE,CAAC;gBAC1D,OAAO;oBACL,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,aAAa;oBAClC,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK;oBAC7B,YAAY,EAAE,QAAQ,CAAC,IAAI,CAAC,WAAW;iBACxC,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,IAAI,KAAK,GAAG,IAAI,sBAAa,CAC3B,0BAA0B,EAC1B,QAAQ,CAAC,IAAI,CACd,CAAC;gBACF,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,YAAoB;QACjD,IAAI,IAAI,GAAG;YACT,KAAK,EAAE,QAAQ;YACf,aAAa,EAAE,YAAY;SAC5B,CAAC;QAEF,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK;aACxB,IAAI,CAAC,qBAAS,CAAC,mBAAmB,EAAE,IAAI,CAAC;aACzC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;YACjB,IAAI,QAAQ,CAAC,IAAI,EAAE,aAAa,KAAK,wBAAY,CAAC,OAAO,EAAE,CAAC;gBAC1D,OAAO;oBACL,YAAY,EAAE,QAAQ,CAAC,IAAI,CAAC,aAAa;oBACzC,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM;oBACzC,UAAU,EAAE,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,WAAW;oBAClD,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ;iBAC9C,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,IAAI,KAAK,GAAG,IAAI,sBAAa,CAC3B,kEAAkE,EAClE,QAAQ,CAAC,IAAI,CACd,CAAC;gBACF,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;CACF;AAxED,sCAwEC"} \ No newline at end of file +{"version":3,"file":"onsite.js","sourceRoot":"","sources":["../../src/lib/invoices/onsite.ts"],"names":[],"mappings":";;;AACA,4CAAuD;AACvD,sCAA0C;AAC1C,uCAAoC;AAEpC;;;GAGG;AACH,MAAa,aAAc,SAAQ,iBAAO;IACxC,KAAK,CAAU;IACf,QAAQ,CAAU;IAClB,YAAY,CAAU;IACtB,MAAM,CAAU;IAChB,UAAU,CAAU;IACpB,QAAQ,CAAO;IAEf,YAAY,SAAoB;QAC9B,KAAK,CAAC,SAAS,CAAC,CAAC;IACnB,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,MAAM,CAAC,QAAgB;QAC3B,IAAI,IAAI,GAAG;YACT,YAAY,EAAE,IAAI,CAAC,aAAa,EAAE;YAClC,QAAQ,EAAE;gBACR,aAAa,EAAE,QAAQ;aACxB;SACF,CAAC;QACF,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM;aACzB,IAAI,CAAC,qBAAS,CAAC,mBAAmB,EAAE,IAAI,CAAC;aACzC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;YACjB,IAAI,QAAQ,CAAC,IAAI,EAAE,aAAa,KAAK,wBAAY,CAAC,OAAO,EAAE,CAAC;gBAC1D,OAAO;oBACL,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,aAAa;oBAClC,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK;oBAC7B,YAAY,EAAE,QAAQ,CAAC,IAAI,CAAC,WAAW;iBACxC,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,IAAI,KAAK,GAAG,IAAI,sBAAa,CAC3B,0BAA0B,EAC1B,QAAQ,CAAC,IAAI,CACd,CAAC;gBACF,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,YAAoB;QACjD,IAAI,IAAI,GAAG;YACT,KAAK,EAAE,QAAQ;YACf,aAAa,EAAE,YAAY;SAC5B,CAAC;QAEF,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM;aACzB,IAAI,CAAC,qBAAS,CAAC,mBAAmB,EAAE,IAAI,CAAC;aACzC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;YACjB,IAAI,QAAQ,CAAC,IAAI,EAAE,aAAa,KAAK,wBAAY,CAAC,OAAO,EAAE,CAAC;gBAC1D,OAAO;oBACL,YAAY,EAAE,QAAQ,CAAC,IAAI,CAAC,aAAa;oBACzC,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM;oBACzC,UAAU,EAAE,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,WAAW;oBAClD,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ;iBAC9C,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,IAAI,KAAK,GAAG,IAAI,sBAAa,CAC3B,kEAAkE,EAClE,QAAQ,CAAC,IAAI,CACd,CAAC;gBACF,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;CACF;AAxED,sCAwEC"} \ No newline at end of file diff --git a/dist/paydunya.min.js b/dist/paydunya.min.js new file mode 100644 index 0000000..bb59894 --- /dev/null +++ b/dist/paydunya.min.js @@ -0,0 +1,2 @@ +/*! For license information please see paydunya.min.js.LICENSE.txt */ +(()=>{"use strict";var e={94:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Invoice=void 0,t.Invoice=class{transport;returnURL;cancelURL;callbackURL;description;items;customData;taxes;channels;totalAmount;constructor(e){this.transport=e,e.store?.return_url&&(this.returnURL=e.store.return_url),e.store?.cancel_url&&(this.cancelURL=e.store.cancel_url),e.store?.callback_url&&(this.callbackURL=e.store.callback_url),this.description="",this.items={},this.customData={},this.taxes={},this.channels=[],this.totalAmount=0}get store(){return this.transport.store}addItem(e,t,n,r,s){const o=Object.keys(this.items).length+1;return this.items["item_"+o]={name:e,quantity:t||0,unit_price:n||0,total_price:r||0},s&&(this.items["item_"+o].description=s),this}addTax(e,t){const n=Object.keys(this.taxes).length+1;return this.taxes["tax_"+n]={name:e,amount:Number(t)},this}addChannel(e){return this.channels.push(e),this}addChannels(e=[]){for(let t=0;t0&&(e.invoice.channels=this.channels),Object.keys(this.items).length>0&&(e.invoice.items=this.items),(this.returnURL||this.cancelURL||this.callbackURL)&&(e.actions={},this.returnURL&&(e.actions.return_url=this.returnURL),this.cancelURL&&(e.actions.cancel_url=this.cancelURL),this.callbackURL&&(e.actions.callback_url=this.callbackURL)),Object.keys(this.taxes).length>0&&(e.invoice.taxes=this.taxes),Object.keys(this.customData).length>0&&(e.custom_data=this.customData),e}}},149:(e,t)=>{var n,r,s,o;Object.defineProperty(t,"__esModule",{value:!0}),t.SUPPORTED_COUNTRY_CODES=t.PaymentChannel=t.Endpoints=t.ResponseCode=t.InvoiceStatus=void 0,function(e){e.COMPLETED="completed",e.CANCELLED="cancelled",e.PENDING="pending",e.FAILED="failed"}(n||(t.InvoiceStatus=n={})),function(e){e.success="00"}(r||(t.ResponseCode=r={})),function(e){e.CREATE_INVOICE="/checkout-invoice/create",e.CONFIRM_INVOICE="/checkout-invoice/confirm/",e.CREATE_ONSITEINVOCE="/opr/create",e.CHARGE_ONSITEINVOCE="/opr/charge",e.CREDIT_ACCOUNT="/direct-pay/credit-account",e.CHECK_BALANCE="/disburse/check-balance"}(s||(t.Endpoints=s={})),function(e){e.Card="card",e.OrangeMoneySenegal="orange-money-senegal",e.WaveSenegal="wave-senegal",e.FreeMoneySenegal="free-money-senegal",e.ExpressoSn="expresso-sn",e.WizallSenegal="wizall-senegal",e.MtnBenin="mtn-benin",e.MoovBenin="moov-benin",e.OrangeMoneyCi="orange-money-ci",e.WaveCi="wave-ci",e.MtnCi="mtn-ci",e.MoovCi="moov-ci",e.TMoneyTogo="t-money-togo",e.MoovTogo="moov-togo",e.OrangeMoneyMali="orange-money-mali",e.MoovMl="moov-ml",e.OrangeMoneyBurkina="orange-money-burkina",e.MoovBurkinaFaso="moov-burkina-faso"}(o||(t.PaymentChannel=o={})),t.SUPPORTED_COUNTRY_CODES={SN:"SN",CI:"CI",BJ:"BJ",TG:"TG",ML:"ML",BF:"BF"}},224:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DirectPay=void 0;const r=n(473),s=n(149);t.DirectPay=class{transport;responseText;description;transactionID;constructor(e){this.transport=e}async creditAccount(e,t){const n={account_alias:e,amount:Number(t)};return this.transport.client.post(s.Endpoints.CREDIT_ACCOUNT,n).then(n=>{if(n.data.response_code===s.ResponseCode.success)return this.responseText=n.data.response_text,this.description=n.data.description,this.transactionID=n.data.transaction_id,{responseText:this.responseText,description:this.description,transactionID:this.transactionID};throw new r.ResponseError(`Failed to credit account. Please ensure ${e} and ${t} are valid OR check your account balance.`,n.data)})}}},423:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OnsiteInvoice=void 0;const r=n(149),s=n(473),o=n(94);class i extends o.Invoice{token;oprToken;responseText;status;receiptURL;customer;constructor(e){super(e)}async create(e){let t={invoice_data:this.asRequestBody(),opr_data:{account_alias:e}};return this.transport.client.post(r.Endpoints.CREATE_ONSITEINVOCE,t).then(e=>{if(e.data?.response_code===r.ResponseCode.success)return{token:e.data.invoice_token,oprToken:e.data.token,responseText:e.data.description};throw new s.ResponseError("Failed to create invoice",e.data)})}async charge(e,t){let n={token:e,confirm_token:t};return this.transport.client.post(r.Endpoints.CHARGE_ONSITEINVOCE,n).then(e=>{if(e.data?.response_code===r.ResponseCode.success)return{responseText:e.data.response_text,status:e.data.invoice_data.status,receiptURL:e.data.invoice_data.receipt_url,customer:e.data.invoice_data.customer};throw new s.ResponseError("Failed to charge invoice. Check OPR/confirm token and try again.",e.data)})}}t.OnsiteInvoice=i},425:(e,t,n)=>{function r(e,t){return function(){return e.apply(t,arguments)}}const{toString:s}=Object.prototype,{getPrototypeOf:o}=Object,{iterator:i,toStringTag:a}=Symbol,c=(u=Object.create(null),e=>{const t=s.call(e);return u[t]||(u[t]=t.slice(8,-1).toLowerCase())});var u;const l=e=>(e=e.toLowerCase(),t=>c(t)===e),d=e=>t=>typeof t===e,{isArray:f}=Array,h=d("undefined");function p(e){return null!==e&&!h(e)&&null!==e.constructor&&!h(e.constructor)&&b(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const m=l("ArrayBuffer"),y=d("string"),b=d("function"),g=d("number"),E=e=>null!==e&&"object"==typeof e,w=e=>{if("object"!==c(e))return!1;const t=o(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||a in e||i in e)},v=l("Date"),R=l("File"),O=l("Blob"),_=l("FileList"),T=l("URLSearchParams"),[S,C,A,x]=["ReadableStream","Request","Response","Headers"].map(l);function U(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,s;if("object"!=typeof e&&(e=[e]),f(e))for(r=0,s=e.length;r0;)if(r=n[s],t===r.toLowerCase())return r;return null}const P="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,k=e=>!h(e)&&e!==P,j=(L="undefined"!=typeof Uint8Array&&o(Uint8Array),e=>L&&e instanceof L);var L;const D=l("HTMLFormElement"),B=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),F=l("RegExp"),I=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};U(n,(n,s)=>{let o;!1!==(o=t(n,s,e))&&(r[s]=o||n)}),Object.defineProperties(e,r)},M=l("AsyncFunction"),q=(K="function"==typeof setImmediate,z=b(P.postMessage),K?setImmediate:z?(H=`axios@${Math.random()}`,V=[],P.addEventListener("message",({source:e,data:t})=>{e===P&&t===H&&V.length&&V.shift()()},!1),e=>{V.push(e),P.postMessage(H,"*")}):e=>setTimeout(e));var K,z,H,V;const Y="undefined"!=typeof queueMicrotask?queueMicrotask.bind(P):"undefined"!=typeof process&&process.nextTick||q;var J={isArray:f,isArrayBuffer:m,isBuffer:p,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||b(e.append)&&("formdata"===(t=c(e))||"object"===t&&b(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&m(e.buffer),t},isString:y,isNumber:g,isBoolean:e=>!0===e||!1===e,isObject:E,isPlainObject:w,isEmptyObject:e=>{if(!E(e)||p(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:S,isRequest:C,isResponse:A,isHeaders:x,isUndefined:h,isDate:v,isFile:R,isBlob:O,isRegExp:F,isFunction:b,isStream:e=>E(e)&&b(e.pipe),isURLSearchParams:T,isTypedArray:j,isFileList:_,forEach:U,merge:function e(){const{caseless:t,skipUndefined:n}=k(this)&&this||{},r={},s=(s,o)=>{const i=t&&N(r,o)||o;w(r[i])&&w(s)?r[i]=e(r[i],s):w(s)?r[i]=e({},s):f(s)?r[i]=s.slice():n&&h(s)||(r[i]=s)};for(let e=0,t=arguments.length;e(U(t,(t,s)=>{n&&b(t)?e[s]=r(t,n):e[s]=t},{allOwnKeys:s}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let s,i,a;const c={};if(t=t||{},null==e)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)a=s[i],r&&!r(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==n&&o(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:c,kindOfTest:l,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(f(e))return e;let t=e.length;if(!g(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[i]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:D,hasOwnProperty:B,hasOwnProp:B,reduceDescriptors:I,freezeMethods:e=>{I(e,(t,n)=>{if(b(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];b(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return f(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:N,global:P,isContextDefined:k,isSpecCompliantForm:function(e){return!!(e&&b(e.append)&&"FormData"===e[a]&&e[i])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(E(e)){if(t.indexOf(e)>=0)return;if(p(e))return e;if(!("toJSON"in e)){t[r]=e;const s=f(e)?[]:{};return U(e,(e,t)=>{const o=n(e,r+1);!h(o)&&(s[t]=o)}),t[r]=void 0,s}}return e};return n(e,0)},isAsyncFn:M,isThenable:e=>e&&(E(e)||b(e))&&b(e.then)&&b(e.catch),setImmediate:q,asap:Y,isIterable:e=>null!=e&&b(e[i])};function W(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}J.inherits(W,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:J.toJSONObject(this.config),code:this.code,status:this.status}}});const $=W.prototype,G={};function X(e){return J.isPlainObject(e)||J.isArray(e)}function Q(e){return J.endsWith(e,"[]")?e.slice(0,-2):e}function Z(e,t,n){return e?e.concat(t).map(function(e,t){return e=Q(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{G[e]={value:e}}),Object.defineProperties(W,G),Object.defineProperty($,"isAxiosError",{value:!0}),W.from=(e,t,n,r,s,o)=>{const i=Object.create($);J.toFlatObject(e,i,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const a=e&&e.message?e.message:"Error",c=null==t&&e?e.code:t;return W.call(i,a,c,n,r,s),e&&null==i.cause&&Object.defineProperty(i,"cause",{value:e,configurable:!0}),i.name=e&&e.name||"Error",o&&Object.assign(i,o),i};const ee=J.toFlatObject(J,{},null,function(e){return/^is[A-Z]/.test(e)});function te(e,t,n){if(!J.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=J.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!J.isUndefined(t[e])})).metaTokens,s=n.visitor||u,o=n.dots,i=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&J.isSpecCompliantForm(t);if(!J.isFunction(s))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(J.isDate(e))return e.toISOString();if(J.isBoolean(e))return e.toString();if(!a&&J.isBlob(e))throw new W("Blob is not supported. Use a Buffer instead.");return J.isArrayBuffer(e)||J.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,s){let a=e;if(e&&!s&&"object"==typeof e)if(J.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(J.isArray(e)&&function(e){return J.isArray(e)&&!e.some(X)}(e)||(J.isFileList(e)||J.endsWith(n,"[]"))&&(a=J.toArray(e)))return n=Q(n),a.forEach(function(e,r){!J.isUndefined(e)&&null!==e&&t.append(!0===i?Z([n],r,o):null===i?n:n+"[]",c(e))}),!1;return!!X(e)||(t.append(Z(s,n,o),c(e)),!1)}const l=[],d=Object.assign(ee,{defaultVisitor:u,convertValue:c,isVisitable:X});if(!J.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!J.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),J.forEach(n,function(n,o){!0===(!(J.isUndefined(n)||null===n)&&s.call(t,n,J.isString(o)?o.trim():o,r,d))&&e(n,r?r.concat(o):[o])}),l.pop()}}(e),t}function ne(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function re(e,t){this._pairs=[],e&&te(e,this,t)}const se=re.prototype;function oe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ie(e,t,n){if(!t)return e;const r=n&&n.encode||oe;J.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let o;if(o=s?s(t,n):J.isURLSearchParams(t)?t.toString():new re(t,n).toString(r),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}se.append=function(e,t){this._pairs.push([e,t])},se.toString=function(e){const t=e?function(t){return e.call(this,t,ne)}:ne;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var ae=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){J.forEach(this.handlers,function(t){null!==t&&e(t)})}},ce={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ue={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:re,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const le="undefined"!=typeof window&&"undefined"!=typeof document,de="object"==typeof navigator&&navigator||void 0,fe=le&&(!de||["ReactNative","NativeScript","NS"].indexOf(de.product)<0),he="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,pe=le&&window.location.href||"http://localhost";var me={...Object.freeze({__proto__:null,hasBrowserEnv:le,hasStandardBrowserWebWorkerEnv:he,hasStandardBrowserEnv:fe,navigator:de,origin:pe}),...ue};function ye(e){function t(e,n,r,s){let o=e[s++];if("__proto__"===o)return!0;const i=Number.isFinite(+o),a=s>=e.length;return o=!o&&J.isArray(r)?r.length:o,a?(J.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!i):(r[o]&&J.isObject(r[o])||(r[o]=[]),t(e,n,r[o],s)&&J.isArray(r[o])&&(r[o]=function(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r{t(function(e){return J.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null}const be={transitional:ce,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,s=J.isObject(e);if(s&&J.isHTMLForm(e)&&(e=new FormData(e)),J.isFormData(e))return r?JSON.stringify(ye(e)):e;if(J.isArrayBuffer(e)||J.isBuffer(e)||J.isStream(e)||J.isFile(e)||J.isBlob(e)||J.isReadableStream(e))return e;if(J.isArrayBufferView(e))return e.buffer;if(J.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return te(e,new me.classes.URLSearchParams,{visitor:function(e,t,n,r){return me.isNode&&J.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((o=J.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return te(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return s||r?(t.setContentType("application/json",!1),function(e){if(J.isString(e))try{return(0,JSON.parse)(e),J.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||be.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(J.isResponse(e)||J.isReadableStream(e))return e;if(e&&J.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw W.from(e,W.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:me.classes.FormData,Blob:me.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};J.forEach(["delete","get","head","post","put","patch"],e=>{be.headers[e]={}});var ge=be;const Ee=J.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),we=Symbol("internals");function ve(e){return e&&String(e).trim().toLowerCase()}function Re(e){return!1===e||null==e?e:J.isArray(e)?e.map(Re):String(e)}function Oe(e,t,n,r,s){return J.isFunction(r)?r.call(this,t,n):(s&&(t=n),J.isString(t)?J.isString(r)?-1!==t.indexOf(r):J.isRegExp(r)?r.test(t):void 0:void 0)}class _e{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function s(e,t,n){const s=ve(t);if(!s)throw new Error("header name must be a non-empty string");const o=J.findKey(r,s);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=Re(e))}const o=(e,t)=>J.forEach(e,(e,n)=>s(e,n,t));if(J.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(J.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((e=>{const t={};let n,r,s;return e&&e.split("\n").forEach(function(e){s=e.indexOf(":"),n=e.substring(0,s).trim().toLowerCase(),r=e.substring(s+1).trim(),!n||t[n]&&Ee[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(J.isObject(e)&&J.isIterable(e)){let n,r,s={};for(const t of e){if(!J.isArray(t))throw TypeError("Object iterator must return a key-value pair");s[r=t[0]]=(n=s[r])?J.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}o(s,t)}else null!=e&&s(t,e,n);return this}get(e,t){if(e=ve(e)){const n=J.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(J.isFunction(t))return t.call(this,e,n);if(J.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ve(e)){const n=J.findKey(this,e);return!(!n||void 0===this[n]||t&&!Oe(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function s(e){if(e=ve(e)){const s=J.findKey(n,e);!s||t&&!Oe(0,n[s],s,t)||(delete n[s],r=!0)}}return J.isArray(e)?e.forEach(s):s(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const s=t[n];e&&!Oe(0,this[s],s,e,!0)||(delete this[s],r=!0)}return r}normalize(e){const t=this,n={};return J.forEach(this,(r,s)=>{const o=J.findKey(n,s);if(o)return t[o]=Re(r),void delete t[s];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(s):String(s).trim();i!==s&&delete t[s],t[i]=Re(r),n[i]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return J.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&J.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[we]=this[we]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=ve(e);t[r]||(function(e,t){const n=J.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,s){return this[r].call(this,t,e,n,s)},configurable:!0})})}(n,e),t[r]=!0)}return J.isArray(e)?e.forEach(r):r(e),this}}_e.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),J.reduceDescriptors(_e.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),J.freezeMethods(_e);var Te=_e;function Se(e,t){const n=this||ge,r=t||n,s=Te.from(r.headers);let o=r.data;return J.forEach(e,function(e){o=e.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function Ce(e){return!(!e||!e.__CANCEL__)}function Ae(e,t,n){W.call(this,null==e?"canceled":e,W.ERR_CANCELED,t,n),this.name="CanceledError"}function xe(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new W("Request failed with status code "+n.status,[W.ERR_BAD_REQUEST,W.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}J.inherits(Ae,W,{__CANCEL__:!0});const Ue=(e,t,n=3)=>{let r=0;const s=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s,o=0,i=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=r[i];s||(s=c),n[o]=a,r[o]=c;let l=i,d=0;for(;l!==o;)d+=n[l++],l%=e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),c-s{c=o,i=null,a&&(clearTimeout(a),a=null),(n=>{const o=n.loaded,i=n.lengthComputable?n.total:void 0,a=o-r,c=s(a);r=o,e({loaded:o,total:i,progress:i?o/i:void 0,bytes:a,rate:c||void 0,estimated:c&&i&&o<=i?(i-o)/c:void 0,event:n,lengthComputable:null!=i,[t?"download":"upload"]:!0})})(...n)};return[(...e)=>{const t=Date.now(),n=t-c;n>=u?l(e,t):(i=e,a||(a=setTimeout(()=>{a=null,l(i)},u-n)))},()=>i&&l(i)]}(0,n)},Ne=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Pe=e=>(...t)=>J.asap(()=>e(...t));var ke=me.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,me.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(me.origin),me.navigator&&/(msie|trident)/i.test(me.navigator.userAgent)):()=>!0,je=me.hasStandardBrowserEnv?{write(e,t,n,r,s,o){const i=[e+"="+encodeURIComponent(t)];J.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),J.isString(r)&&i.push("path="+r),J.isString(s)&&i.push("domain="+s),!0===o&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Le(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const De=e=>e instanceof Te?{...e}:e;function Be(e,t){t=t||{};const n={};function r(e,t,n,r){return J.isPlainObject(e)&&J.isPlainObject(t)?J.merge.call({caseless:r},e,t):J.isPlainObject(t)?J.merge({},t):J.isArray(t)?t.slice():t}function s(e,t,n,s){return J.isUndefined(t)?J.isUndefined(e)?void 0:r(void 0,e,0,s):r(e,t,0,s)}function o(e,t){if(!J.isUndefined(t))return r(void 0,t)}function i(e,t){return J.isUndefined(t)?J.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,s,o){return o in t?r(n,s):o in e?r(void 0,n):void 0}const c={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(e,t,n)=>s(De(e),De(t),0,!0)};return J.forEach(Object.keys({...e,...t}),function(r){const o=c[r]||s,i=o(e[r],t[r],r);J.isUndefined(i)&&o!==a||(n[r]=i)}),n}var Fe=e=>{const t=Be({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:a}=t;if(t.headers=i=Te.from(i),t.url=ie(Le(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),J.isFormData(n))if(me.hasStandardBrowserEnv||me.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(J.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&i.set(e,n)})}if(me.hasStandardBrowserEnv&&(r&&J.isFunction(r)&&(r=r(t)),r||!1!==r&&ke(t.url))){const e=s&&o&&je.read(o);e&&i.set(s,e)}return t},Ie="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=Fe(e);let s=r.data;const o=Te.from(r.headers).normalize();let i,a,c,u,l,{responseType:d,onUploadProgress:f,onDownloadProgress:h}=r;function p(){u&&u(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(i),r.signal&&r.signal.removeEventListener("abort",i)}let m=new XMLHttpRequest;function y(){if(!m)return;const r=Te.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());xe(function(e){t(e),p()},function(e){n(e),p()},{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=y:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(y)},m.onabort=function(){m&&(n(new W("Request aborted",W.ECONNABORTED,e,m)),m=null)},m.onerror=function(t){const r=new W(t&&t.message?t.message:"Network Error",W.ERR_NETWORK,e,m);r.event=t||null,n(r),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const s=r.transitional||ce;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new W(t,s.clarifyTimeoutError?W.ETIMEDOUT:W.ECONNABORTED,e,m)),m=null},void 0===s&&o.setContentType(null),"setRequestHeader"in m&&J.forEach(o.toJSON(),function(e,t){m.setRequestHeader(t,e)}),J.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),h&&([c,l]=Ue(h,!0),m.addEventListener("progress",c)),f&&m.upload&&([a,u]=Ue(f),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(i=t=>{m&&(n(!t||t.type?new Ae(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(i),r.signal&&(r.signal.aborted?i():r.signal.addEventListener("abort",i)));const b=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);b&&-1===me.protocols.indexOf(b)?n(new W("Unsupported protocol "+b+":",W.ERR_BAD_REQUEST,e)):m.send(s||null)})},Me=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const s=function(e){if(!n){n=!0,i();const t=e instanceof Error?e:this.reason;r.abort(t instanceof W?t:new Ae(t instanceof Error?t.message:t))}};let o=t&&setTimeout(()=>{o=null,s(new W(`timeout ${t} of ms exceeded`,W.ETIMEDOUT))},t);const i=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(s):e.removeEventListener("abort",s)}),e=null)};e.forEach(e=>e.addEventListener("abort",s));const{signal:a}=r;return a.unsubscribe=()=>J.asap(i),a}};const qe=function*(e,t){let n=e.byteLength;if(!t||n{const s=async function*(e,t){for await(const n of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}}(e))yield*qe(n,t)}(e,t);let o,i=0,a=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await s.next();if(t)return a(),void e.close();let o=r.byteLength;if(n){let e=i+=o;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),s.return())},{highWaterMark:2})},{isFunction:ze}=J,He=(({Request:e,Response:t})=>({Request:e,Response:t}))(J.global),{ReadableStream:Ve,TextEncoder:Ye}=J.global,Je=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},We=e=>{e=J.merge.call({skipUndefined:!0},He,e);const{fetch:t,Request:n,Response:r}=e,s=t?ze(t):"function"==typeof fetch,o=ze(n),i=ze(r);if(!s)return!1;const a=s&&ze(Ve),c=s&&("function"==typeof Ye?(u=new Ye,e=>u.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var u;const l=o&&a&&Je(()=>{let e=!1;const t=new n(me.origin,{body:new Ve,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),d=i&&a&&Je(()=>J.isReadableStream(new r("").body)),f={stream:d&&(e=>e.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!f[e]&&(f[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new W(`Response type '${e}' is not supported`,W.ERR_NOT_SUPPORT,n)})});return async e=>{let{url:s,method:i,data:a,signal:u,cancelToken:h,timeout:p,onDownloadProgress:m,onUploadProgress:y,responseType:b,headers:g,withCredentials:E="same-origin",fetchOptions:w}=Fe(e),v=t||fetch;b=b?(b+"").toLowerCase():"text";let R=Me([u,h&&h.toAbortSignal()],p),O=null;const _=R&&R.unsubscribe&&(()=>{R.unsubscribe()});let T;try{if(y&&l&&"get"!==i&&"head"!==i&&0!==(T=await(async(e,t)=>{const r=J.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(J.isBlob(e))return e.size;if(J.isSpecCompliantForm(e)){const t=new n(me.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return J.isArrayBufferView(e)||J.isArrayBuffer(e)?e.byteLength:(J.isURLSearchParams(e)&&(e+=""),J.isString(e)?(await c(e)).byteLength:void 0)})(t):r})(g,a))){let e,t=new n(s,{method:"POST",body:a,duplex:"half"});if(J.isFormData(a)&&(e=t.headers.get("content-type"))&&g.setContentType(e),t.body){const[e,n]=Ne(T,Ue(Pe(y)));a=Ke(t.body,65536,e,n)}}J.isString(E)||(E=E?"include":"omit");const t=o&&"credentials"in n.prototype,u={...w,signal:R,method:i.toUpperCase(),headers:g.normalize().toJSON(),body:a,duplex:"half",credentials:t?E:void 0};O=o&&new n(s,u);let h=await(o?v(O,w):v(s,u));const p=d&&("stream"===b||"response"===b);if(d&&(m||p&&_)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=h[t]});const t=J.toFiniteNumber(h.headers.get("content-length")),[n,s]=m&&Ne(t,Ue(Pe(m),!0))||[];h=new r(Ke(h.body,65536,n,()=>{s&&s(),_&&_()}),e)}b=b||"text";let S=await f[J.findKey(f,b)||"text"](h,e);return!p&&_&&_(),await new Promise((t,n)=>{xe(t,n,{data:S,headers:Te.from(h.headers),status:h.status,statusText:h.statusText,config:e,request:O})})}catch(t){if(_&&_(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new W("Network Error",W.ERR_NETWORK,e,O),{cause:t.cause||t});throw W.from(t,t&&t.code,e,O)}}},$e=new Map,Ge=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:s}=t,o=[r,s,n];let i,a,c=o.length,u=$e;for(;c--;)i=o[c],a=u.get(i),void 0===a&&u.set(i,a=c?new Map:We(t)),u=a;return a};Ge();const Xe={http:null,xhr:Ie,fetch:{get:Ge}};J.forEach(Xe,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const Qe=e=>`- ${e}`,Ze=e=>J.isFunction(e)||null===e||!1===e;var et=(e,t)=>{e=J.isArray(e)?e:[e];const{length:n}=e;let r,s;const o={};for(let i=0;i`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new W("There is no suitable adapter to dispatch the request "+(n?e.length>1?"since :\n"+e.map(Qe).join("\n"):" "+Qe(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return s};function tt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ae(null,e)}function nt(e){return tt(e),e.headers=Te.from(e.headers),e.data=Se.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),et(e.adapter||ge.adapter,e)(e).then(function(t){return tt(e),t.data=Se.call(e,e.transformResponse,t),t.headers=Te.from(t.headers),t},function(t){return Ce(t)||(tt(e),t&&t.response&&(t.response.data=Se.call(e,e.transformResponse,t.response),t.response.headers=Te.from(t.response.headers))),Promise.reject(t)})}const rt="1.12.2",st={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{st[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const ot={};st.transitional=function(e,t,n){function r(e,t){return"[Axios v"+rt+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,s,o)=>{if(!1===e)throw new W(r(s," has been removed"+(t?" in "+t:"")),W.ERR_DEPRECATED);return t&&!ot[s]&&(ot[s]=!0,console.warn(r(s," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,s,o)}},st.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var it={assertOptions:function(e,t,n){if("object"!=typeof e)throw new W("options must be an object",W.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const t=e[o],n=void 0===t||i(t,o,e);if(!0!==n)throw new W("option "+o+" must be "+n,W.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new W("Unknown option "+o,W.ERR_BAD_OPTION)}},validators:st};const at=it.validators;class ct{constructor(e){this.defaults=e||{},this.interceptors={request:new ae,response:new ae}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Be(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:s}=t;void 0!==n&&it.assertOptions(n,{silentJSONParsing:at.transitional(at.boolean),forcedJSONParsing:at.transitional(at.boolean),clarifyTimeoutError:at.transitional(at.boolean)},!1),null!=r&&(J.isFunction(r)?t.paramsSerializer={serialize:r}:it.assertOptions(r,{encode:at.function,serialize:at.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),it.assertOptions(t,{baseUrl:at.spelling("baseURL"),withXsrfToken:at.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=s&&J.merge(s.common,s[t.method]);s&&J.forEach(["delete","get","head","post","put","patch","common"],e=>{delete s[e]}),t.headers=Te.concat(o,s);const i=[];let a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,i.unshift(e.fulfilled,e.rejected))});const c=[];let u;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,d=0;if(!a){const e=[nt.bind(this),void 0];for(e.unshift(...i),e.push(...c),l=e.length,u=Promise.resolve(t);d{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,s){n.reason||(n.reason=new Ae(e,r,s),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new lt(function(t){e=t}),cancel:e}}}var dt=lt;const ft={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ft).forEach(([e,t])=>{ft[t]=e});var ht=ft;const pt=function e(t){const n=new ut(t),s=r(ut.prototype.request,n);return J.extend(s,ut.prototype,n,{allOwnKeys:!0}),J.extend(s,n,null,{allOwnKeys:!0}),s.create=function(n){return e(Be(t,n))},s}(ge);pt.Axios=ut,pt.CanceledError=Ae,pt.CancelToken=dt,pt.isCancel=Ce,pt.VERSION=rt,pt.toFormData=te,pt.AxiosError=W,pt.Cancel=pt.CanceledError,pt.all=function(e){return Promise.all(e)},pt.spread=function(e){return function(t){return e.apply(null,t)}},pt.isAxiosError=function(e){return J.isObject(e)&&!0===e.isAxiosError},pt.mergeConfig=Be,pt.AxiosHeaders=Te,pt.formToJSON=e=>ye(J.isHTMLForm(e)?new FormData(e):e),pt.getAdapter=et,pt.HttpStatusCode=ht,pt.default=pt,e.exports=pt},457:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=n(94),s=n(473),o=n(149);class i extends r.Invoice{token;url;status;responseText;customer;receiptURL;receipt_identifier;provider_reference;hash;constructor(e){super(e)}async create(){const e=this.asRequestBody();return this.transport.client.post(o.Endpoints.CREATE_INVOICE,e).then(e=>{if(e.data.response_code===o.ResponseCode.success)return this.token=e.data.token,this.url=e.data.response_text,this.getTokenStatus(this.token);throw new s.ResponseError("Failed to create invoice.",e.data)})}async getTokenStatus(e){const t=e||this.token;return this.transport.client.get(`${o.Endpoints.CONFIRM_INVOICE}${t}`).then(e=>{const t=e.data;if(t.response_code===o.ResponseCode.success)return this.status=t.status,this.responseText=t.response_text,this.hash=t?.hash,this.items=t.invoice.items,this.taxes=t.taxes,this.description=t.description,t.actions&&(this.cancelURL=t.actions.cancel_url,this.callbackURL=t.actions.callback_url,this.returnURL=t.actions.return_url),this.totalAmount=t.invoice.total_amount,this.status===o.InvoiceStatus.COMPLETED&&(this.customer=t.customer,this.receiptURL=t.receipt_url,this.receipt_identifier=t.receipt_identifier,this.provider_reference=t.provider_reference,t.custom_data&&Object.keys(t.custom_data).length>0&&(this.customData=t.custom_data)),this.asObject;throw new s.ResponseError("Could not confirm invoice status.",e.data)})}get asObject(){return{token:this.token,url:this.url,status:this.status,hash:this.hash,responseText:this.responseText,customer:this.customer,receiptURL:this.receiptURL,receipt_identifier:this.receipt_identifier,provider_reference:this.provider_reference,customData:this.customData,totalAmount:this.totalAmount}}}t.default=i},473:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResponseError=void 0;class n extends Error{data=void 0;constructor(e,t=void 0){super(e),this.data=t}}t.ResponseError=n},546:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Credentials=t.PaydunyaEnvironment=void 0,function(e){e.LIVE="live",e.TEST="test"}(n||(t.PaydunyaEnvironment=n={})),t.Credentials=class{masterKey;privateKey;publicKey;token;mode;constructor(e){this.masterKey=e.masterKey,this.privateKey=e.privateKey,this.publicKey=e.publicKey,this.token=e.token,this.mode=e.mode}extendRequestConfig(e){return e.headers.set("Content-Type","application/json").set("PAYDUNYA-MASTER-KEY",this.masterKey).set("PAYDUNYA-PRIVATE-KEY",this.privateKey).set("PAYDUNYA-TOKEN",this.token),e}}},568:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PaydunyaClient=void 0;const s=n(928),o=n(641),i=n(224),a=r(n(457)),c=n(423),u=n(546),l=n(94);class d{transport;constructor(e){this.transport=e}get store(){return this.transport.store}set store(e){this.transport.store=e}invoiceInstance(){return new l.Invoice(this.transport)}checkoutInvoiceInstance(){return new a.default(this.transport)}onsiteInvoiceInstance(){return new c.OnsiteInvoice(this.transport)}directpayInstance(){return new i.DirectPay(this.transport)}balanceInstance(){return new s.Balance(this.transport)}static fromCredentialsInstance(e){return new d(new o.Transport(e))}static fromCredentials(e){return new d(new o.Transport(new u.Credentials(e)))}static autoDetect(e=u.PaydunyaEnvironment.LIVE){return new d(new o.Transport(new u.Credentials({masterKey:process.env.PAYDUNYA_MASTER_KEY||"",privateKey:process.env.PAYDUNYA_PRIVATE_KEY||"",publicKey:process.env.PAYDUNYA_PUBLIC_KEY||"",token:process.env.PAYDUNYA_TOKEN||"",mode:process.env.PAYDUNYA_MODE||e})))}}t.PaydunyaClient=d},641:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Transport=void 0;const s=n(546),o=r(n(425));t.Transport=class{setup;store=void 0;client;constructor(e,t=void 0){this.setup=e,this.store=t,this.client=o.default.create({baseURL:this.baseURL}),this.client.interceptors.request.use(e=>this.setup.extendRequestConfig(e))}get baseURL(){return this.setup.mode===s.PaydunyaEnvironment.TEST?"https://app.paydunya.com/sandbox-api/v1":"https://app.paydunya.com/api/v1"}}},928:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Balance=void 0;const s=r(n(425)),o=n(149);class i{amount;currency;constructor(e,t){this.amount=e,this.currency=t}static parse(e){let[t,n]=e.split(" ");return new i(parseFloat(t||"0"),n?.trim()||"XOF")}}t.Balance=class{transport;axios;constructor(e){this.transport=e,this.axios=s.default.create({baseURL:"https://app.paydunya.com/api/v2"}),this.axios.interceptors.request.use(e=>this.transport.setup.extendRequestConfig(e))}async getAll(){return this.axios.get(o.Endpoints.CHECK_BALANCE).then(e=>{if(e.data.success){let t={};return Object.keys(o.SUPPORTED_COUNTRY_CODES).forEach(n=>{t[n]=i.parse(e.data[`Balance ${n}`])}),t}})}async getBalanceByCountry(e){let t=await this.getAll();if(t&&t[e])return t[e]}async getAccountBalance(e){return this.axios.get(`${o.Endpoints.CHECK_BALANCE}/${e}`).then(e=>{if(e.data.success)return e.data})}}}},t={};function n(r){var s=t[r];if(void 0!==s)return s.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n(568)})(); \ No newline at end of file diff --git a/dist/paydunya.min.js.LICENSE.txt b/dist/paydunya.min.js.LICENSE.txt new file mode 100644 index 0000000..7b60bc4 --- /dev/null +++ b/dist/paydunya.min.js.LICENSE.txt @@ -0,0 +1 @@ +/*! Axios v1.12.2 Copyright (c) 2025 Matt Zabriskie and contributors */ diff --git a/dist/transport.d.ts b/dist/transport.d.ts index 1db4a1e..e705d0b 100644 --- a/dist/transport.d.ts +++ b/dist/transport.d.ts @@ -4,7 +4,7 @@ import { Store } from "./store"; export declare class Transport { setup: Credentials; store: Store | undefined; - axios: AxiosInstance; + client: AxiosInstance; constructor(setup: Credentials, store?: Store | undefined); get baseURL(): "https://app.paydunya.com/sandbox-api/v1" | "https://app.paydunya.com/api/v1"; } diff --git a/dist/transport.js b/dist/transport.js index 70a6c0b..9afe135 100644 --- a/dist/transport.js +++ b/dist/transport.js @@ -4,23 +4,24 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Transport = void 0; +const credentials_1 = require("./credentials"); const axios_1 = __importDefault(require("axios")); class Transport { setup; store = undefined; - axios; + client; constructor(setup, store = undefined) { this.setup = setup; this.store = store; - this.axios = axios_1.default.create({ + this.client = axios_1.default.create({ baseURL: this.baseURL }); - this.axios.interceptors.request.use((config) => { + this.client.interceptors.request.use((config) => { return this.setup.extendRequestConfig(config); }); } get baseURL() { - return this.setup.mode === "test" ? 'https://app.paydunya.com/sandbox-api/v1' : 'https://app.paydunya.com/api/v1'; + return this.setup.mode === credentials_1.PaydunyaEnvironment.TEST ? 'https://app.paydunya.com/sandbox-api/v1' : 'https://app.paydunya.com/api/v1'; } } exports.Transport = Transport; diff --git a/dist/transport.js.map b/dist/transport.js.map index 095fdf4..4f8feed 100644 --- a/dist/transport.js.map +++ b/dist/transport.js.map @@ -1 +1 @@ -{"version":3,"file":"transport.js","sourceRoot":"","sources":["../src/lib/transport.ts"],"names":[],"mappings":";;;;;;AACA,kDAA0C;AAG1C,MAAa,SAAS;IAClB,KAAK,CAAc;IACnB,KAAK,GAAsB,SAAS,CAAC;IACrC,KAAK,CAAgB;IAErB,YAAY,KAAkB,EAAE,QAA2B,SAAS;QAChE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,IAAI,CAAC,KAAK,GAAG,eAAK,CAAC,MAAM,CAAC;YACtB,OAAO,EAAE,IAAI,CAAC,OAAO;SACxB,CAAC,CAAC;QAEH,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;YAC3C,OAAO,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAA;QACjD,CAAC,CAAC,CAAC;IACP,CAAC;IAED,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,yCAAyC,CAAA,CAAC,CAAC,iCAAiC,CAAA;IACpH,CAAC;CAEJ;AAtBD,8BAsBC"} \ No newline at end of file +{"version":3,"file":"transport.js","sourceRoot":"","sources":["../src/lib/transport.ts"],"names":[],"mappings":";;;;;;AAAA,+CAAiE;AACjE,kDAA0C;AAG1C,MAAa,SAAS;IAClB,KAAK,CAAc;IACnB,KAAK,GAAsB,SAAS,CAAC;IACrC,MAAM,CAAgB;IAEtB,YAAY,KAAkB,EAAE,QAA2B,SAAS;QAChE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,IAAI,CAAC,MAAM,GAAG,eAAK,CAAC,MAAM,CAAC;YACvB,OAAO,EAAE,IAAI,CAAC,OAAO;SACxB,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;YAC5C,OAAO,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAA;QACjD,CAAC,CAAC,CAAC;IACP,CAAC;IAED,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,iCAAmB,CAAC,IAAI,CAAC,CAAC,CAAC,yCAAyC,CAAA,CAAC,CAAC,iCAAiC,CAAA;IACtI,CAAC;CAEJ;AAtBD,8BAsBC"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 8176feb..6705e3f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,20 +9,17 @@ "version": "1.0.13", "license": "MIT", "dependencies": { - "axios": "^1.12.2", - "bluebird": "^2.1.3", - "superagent": "^0.18.1", - "typescript": "^5.9.3" + "axios": "^1.12.2" }, "devDependencies": { "@types/jest": "^30.0.0", "@types/node": "^24.7.0", - "browserify": "^10.2.4", "dotenv": "^17.2.3", "jest": "^30.2.0", "rimraf": "^6.0.1", "ts-jest": "^29.4.5", - "uglifyify": "^3.0.1", + "ts-loader": "^9.5.4", + "typescript": "^5.9.3", "webpack": "^5.102.1", "webpack-cli": "^6.0.1" } @@ -1935,54 +1932,6 @@ "dev": true, "license": "Apache-2.0" }, - "node_modules/acorn": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", - "integrity": "sha512-fu2ygVGuMmlzG8ZeRJ0bvR41nsAkxxhbyk8bZ1SS521Z7vmgJFTQQlfz/Mp/nJexGBz+v8sC9bM6+lNgskt4Ug==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-node": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz", - "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "acorn": "^7.0.0", - "acorn-walk": "^7.0.0", - "xtend": "^4.0.2" - } - }, - "node_modules/acorn-node/node_modules/acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-walk": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", - "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/ajv": { "version": "8.17.1", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", @@ -2031,31 +1980,6 @@ "ajv": "^8.8.2" } }, - "node_modules/align-text": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", - "integrity": "sha512-GrTZLRpmp6wIC2ztrWW9MjjTgSKccffgFagbNDOX95/dcjEcYZibYTeaOntySQLcdw1ztBoFkviiUvTMbb9MYg==", - "dev": true, - "license": "MIT", - "dependencies": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", - "dev": true, - "license": "BSD-3-Clause OR MIT", - "engines": { - "node": ">=0.4.2" - } - }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -2122,90 +2046,12 @@ "sprintf-js": "~1.0.2" } }, - "node_modules/asn1.js": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", - "dev": true, - "license": "MIT", - "dependencies": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "node_modules/asn1.js/node_modules/bn.js": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", - "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", - "dev": true, - "license": "MIT" - }, - "node_modules/assert": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.3.0.tgz", - "integrity": "sha512-5aKcpD+XnHpZ7EGxsuo6uoILNh0rvm0Ypa17GlkrF2CNSPhvdgi3ft9XsL2ajdVOI2I3xuGZnHvlXAeqTZYvXg==", - "dev": true, - "license": "MIT", - "dependencies": { - "util": "0.10.3" - } - }, - "node_modules/assert/node_modules/inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha512-8nWq2nLTAwd02jTqJExUYFSD/fKq6VH9Y/oG2accc/kdI0V98Bag8d5a4gi3XHz73rDWa2PvTtvcWYquKqSENA==", - "dev": true, - "license": "ISC" - }, - "node_modules/assert/node_modules/util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha512-5KiHfsmkqacuKjkRkdV7SsfDJ2EGiPsK92s2MhNSY0craxjTdKTtqKsJaCWp4LW33ZZ0OPUv1WO/TFvNQRiQxQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "2.0.1" - } - }, - "node_modules/astw": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/astw/-/astw-2.2.0.tgz", - "integrity": "sha512-E/4z//dvN0lfr8zAx8hXeQ8o3nRoQaL/wqI7fAALEvh/40mnyUxfFB9MwyDHYKVDtS3cp3Pow5s96djZR5lkWw==", - "dev": true, - "license": "MIT", - "dependencies": { - "acorn": "^4.0.3" - } - }, - "node_modules/async": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", - "integrity": "sha512-l6ToIJIotphWahxxHyzK9bnLR6kM4jJIIgLShZeqLY7iboHoGkdgFl7W2/Ivi4SkMJYGKqW8vSuk0uKUj6qsSw==", - "license": "MIT" - }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "license": "MIT" }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "possible-typed-array-names": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/axios": { "version": "1.12.2", "resolved": "https://registry.npmjs.org/axios/-/axios-1.12.2.tgz", @@ -2360,22 +2206,6 @@ "dev": true, "license": "MIT" }, - "node_modules/Base64": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz", - "integrity": "sha512-reGEWshDmTDQDsCec/HduOO9Wyj6yMOupMfhIf3ugN1TDlK2NQW4DDJSqNNtp380SNcvRfXtO8HSCQot0d0SMw==", - "dev": true - }, - "node_modules/base64-js": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz", - "integrity": "sha512-3XSA2cR/h/73EzlXXdU6YNycmYI7+kicTxks4eJg2g39biHR84slg2+des+p7iHYhbRg/udIS4TD53WabcOUkw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, "node_modules/baseline-browser-mapping": { "version": "2.8.16", "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.16.tgz", @@ -2386,19 +2216,6 @@ "baseline-browser-mapping": "dist/cli.js" } }, - "node_modules/bluebird": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz", - "integrity": "sha512-UfFSr22dmHPQqPP9XWHRhq+gWnHCYguQGkXQlbyPtW5qTnhFWA8/iXg765tH0cAjy7l/zPJ1aBTO0g5XgA7kvQ==", - "license": "MIT" - }, - "node_modules/bn.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.2.tgz", - "integrity": "sha512-v2YAxEmKaBLahNwE1mjp4WON6huMNeuDvagFZW+ASCuA/ku0bXR9hSMw0XpiqMoA3+rmnyck/tPRSFQkoC9Cuw==", - "dev": true, - "license": "MIT" - }, "node_modules/brace-expansion": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", @@ -2423,241 +2240,6 @@ "node": ">=8" } }, - "node_modules/brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", - "dev": true, - "license": "MIT" - }, - "node_modules/browser-pack": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-5.0.1.tgz", - "integrity": "sha512-BFMQuYXCcwr3Uvna1y1hikqd3r2dQpWIQBIN3m5YwE3ClfnXDeF3tqP6Wqjhs1LRUeBJpgHn8yD+fPX/YSEgMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "combine-source-map": "~0.6.1", - "defined": "^1.0.0", - "JSONStream": "^1.0.3", - "through2": "^1.0.0", - "umd": "^3.0.0" - }, - "bin": { - "browser-pack": "bin/cmd.js" - } - }, - "node_modules/browser-resolve": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz", - "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve": "1.1.7" - } - }, - "node_modules/browser-resolve/node_modules/resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg==", - "dev": true, - "license": "MIT" - }, - "node_modules/browserify": { - "version": "10.2.6", - "resolved": "https://registry.npmjs.org/browserify/-/browserify-10.2.6.tgz", - "integrity": "sha512-rhKmIuWDcE1ULm6lrd3kQdUTqFsLd/UJp3yYt4Ur5rDzk/Gj2AH6+ZTNqkaMqwMphkf8Rp83S1GfMxtu9QjGDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "assert": "~1.3.0", - "browser-pack": "^5.0.0", - "browser-resolve": "^1.7.1", - "browserify-zlib": "~0.1.2", - "buffer": "^3.0.0", - "builtins": "~0.0.3", - "commondir": "0.0.1", - "concat-stream": "~1.4.1", - "console-browserify": "^1.1.0", - "constants-browserify": "~0.0.1", - "crypto-browserify": "^3.0.0", - "defined": "^1.0.0", - "deps-sort": "^1.3.7", - "domain-browser": "~1.1.0", - "duplexer2": "~0.0.2", - "events": "~1.0.0", - "glob": "^4.0.5", - "has": "^1.0.0", - "htmlescape": "^1.1.0", - "http-browserify": "^1.4.0", - "https-browserify": "~0.0.0", - "inherits": "~2.0.1", - "insert-module-globals": "^6.4.1", - "isarray": "0.0.1", - "JSONStream": "^1.0.3", - "labeled-stream-splicer": "^1.0.0", - "module-deps": "^3.7.11", - "os-browserify": "~0.1.1", - "parents": "^1.0.1", - "path-browserify": "~0.0.0", - "process": "~0.11.0", - "punycode": "^1.3.2", - "querystring-es3": "~0.2.0", - "read-only-stream": "^1.1.1", - "readable-stream": "^1.1.13", - "resolve": "^1.1.4", - "shasum": "^1.0.0", - "shell-quote": "~0.0.1", - "stream-browserify": "^1.0.0", - "string_decoder": "~0.10.0", - "subarg": "^1.0.0", - "syntax-error": "^1.1.1", - "through2": "^1.0.0", - "timers-browserify": "^1.0.1", - "tty-browserify": "~0.0.0", - "url": "~0.10.1", - "util": "~0.10.1", - "vm-browserify": "~0.0.1", - "xtend": "^4.0.0" - }, - "bin": { - "browserify": "bin/cmd.js" - } - }, - "node_modules/browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "dev": true, - "license": "MIT", - "dependencies": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "node_modules/browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/browserify-rsa": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.1.tgz", - "integrity": "sha512-YBjSAiTqM04ZVei6sXighu679a3SqWORA3qZTEqZImnlkDIFtKc6pNutpjyZ8RJTjQtuYfeetkxM11GwoYXMIQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "bn.js": "^5.2.1", - "randombytes": "^2.1.0", - "safe-buffer": "^5.2.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/browserify-sign": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.5.tgz", - "integrity": "sha512-C2AUdAJg6rlM2W5QMp2Q4KGQMVBwR1lIimTsUnutJ8bMpW5B52pGpR2gEnNBNwijumDo5FojQ0L9JrXA8m4YEw==", - "dev": true, - "license": "ISC", - "dependencies": { - "bn.js": "^5.2.2", - "browserify-rsa": "^4.1.1", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "elliptic": "^6.6.1", - "inherits": "^2.0.4", - "parse-asn1": "^5.1.9", - "readable-stream": "^2.3.8", - "safe-buffer": "^5.2.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/browserify-sign/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/browserify-sign/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==", - "dev": true, - "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/browserify-sign/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==", - "dev": true, - "license": "MIT" - }, - "node_modules/browserify-sign/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==", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/browserify-sign/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==", - "dev": true, - "license": "MIT" - }, - "node_modules/browserify-zlib": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", - "integrity": "sha512-19OEpq7vWgsH6WkvkBJQDFvJS1uPcbFOQ4v9CU839dO+ZZXUZO6XpE6hNCqvlIIj+4fZvRiJ6DsAQ382GwiyTQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "pako": "~0.2.0" - } - }, "node_modules/browserslist": { "version": "4.26.3", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.26.3.tgz", @@ -2715,18 +2297,6 @@ "node-int64": "^0.4.0" } }, - "node_modules/buffer": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-3.6.2.tgz", - "integrity": "sha512-c3M77NkHJxS0zx/ErxXhDLr1v3y2MDXPeTJPvLNOaIYJ4ymHBUFQ9EXzt9HYuqAJllMoNb/EZ8hIiulnQFAUuQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "base64-js": "0.0.8", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -2734,46 +2304,6 @@ "dev": true, "license": "MIT" }, - "node_modules/buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/buffer/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/builtins": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-0.0.7.tgz", - "integrity": "sha512-T8uCGKc0/2aLVt6omt8JxDRBoWEMkku+wFesxnhxnt4NygVZG99zqxo7ciK8eebszceKamGoUiLdkXCgGQyrQw==", - "dev": true, - "license": "MIT" - }, - "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==", - "dev": true, - "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", @@ -2787,23 +2317,6 @@ "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==", - "dev": true, - "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/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -2814,16 +2327,6 @@ "node": ">=6" } }, - "node_modules/camelcase": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha512-wzLkDa4K/mzI1OSITC+DUyjgIl/ETNHE9QvYgy6J6Jvqyyz4C0Xfd+lQhb19sX2jMpZV4IssUn0VDVmglV+s4g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/caniuse-lite": { "version": "1.0.30001750", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001750.tgz", @@ -2845,20 +2348,6 @@ ], "license": "CC-BY-4.0" }, - "node_modules/center-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", - "integrity": "sha512-Baz3aNe2gd2LP2qk5U+sDk/m4oSuwSDcBfayTCTBoWpfIGO5XFxPmjILQII4NGiZjD6DoDI6kf7gKaxkf7s3VQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -2928,21 +2417,6 @@ "node": ">=8" } }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.4", - "safe-buffer": "^5.2.1", - "to-buffer": "^1.2.2" - }, - "engines": { - "node": ">= 0.10" - } - }, "node_modules/cjs-module-lexer": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.1.0.tgz", @@ -2950,18 +2424,6 @@ "dev": true, "license": "MIT" }, - "node_modules/cliui": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", - "integrity": "sha512-GIOYRizG+TGoc7Wgc1LiOTLare95R3mzKgoln+Q/lE4ceiYH19gUpl0l0Ffq4lJDEf3FxujMe6IBfOCs7pfqNA==", - "dev": true, - "license": "ISC", - "dependencies": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", - "wordwrap": "0.0.2" - } - }, "node_modules/clone-deep": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", @@ -3032,30 +2494,6 @@ "dev": true, "license": "MIT" }, - "node_modules/combine-source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.6.1.tgz", - "integrity": "sha512-XKRNtuZRlVDTuSGKsfZpXYz80y0XDbYS4a+FzafTgmYHy/ckruFBx7Nd6WaQnFHVI3O6IseWVdXUvZutMpjSkQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "convert-source-map": "~1.1.0", - "inline-source-map": "~0.5.0", - "lodash.memoize": "~3.0.3", - "source-map": "~0.4.2" - } - }, - "node_modules/combined-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz", - "integrity": "sha512-qfexlmLp9MyrkajQVyjEDb0Vj+KhRgR/rxLiVhaihlT+ZkX0lReqtH6Ack40CvMDERR4b5eFp3CreskpBs1Pig==", - "dependencies": { - "delayed-stream": "0.0.5" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", @@ -3063,332 +2501,61 @@ "dev": true, "license": "MIT" }, - "node_modules/commondir": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-0.0.1.tgz", - "integrity": "sha512-Ghe1LmLv3G3c0XJYu+c88MCRIPqWQ67qaqKY1KvuN4uPAjfUj+y4hvcpZ2kCPrjpRNyklW4dpAZZ8a7vOh50tg==", - "dev": true, - "license": "MIT/X11", - "engines": { - "node": "*" - } - }, - "node_modules/component-emitter": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.1.2.tgz", - "integrity": "sha512-YhIbp3PJiznERfjlIkK0ue4obZxt2S60+0W8z24ZymOHT8sHloOqWOqZRU2eN5OlY8U08VFsP02letcu26FilA==" - }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "license": "MIT" - }, - "node_modules/concat-stream": { - "version": "1.4.11", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.4.11.tgz", - "integrity": "sha512-X3JMh8+4je3U1cQpG87+f9lXHDrqcb2MVLg9L7o8b1UZ0DzhRrUpdn65ttzu10PpJPPI3MQNkis+oha6TSA9Mw==", - "dev": true, - "engines": [ - "node >= 0.8" - ], - "license": "MIT", - "dependencies": { - "inherits": "~2.0.1", - "readable-stream": "~1.1.9", - "typedarray": "~0.0.5" - } - }, - "node_modules/console-browserify": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", - "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", - "dev": true - }, - "node_modules/constants-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-0.0.1.tgz", - "integrity": "sha512-FL+diDS9AKR5BAA2M+GNk8lnH64tRE3zepTG9hucxc7o04LgCRhkQZhF7u/OKHZT8LLRT+sZEi9qFzXUchq9pA==", - "dev": true, - "license": "MIT" - }, - "node_modules/convert-source-map": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", - "integrity": "sha512-Y8L5rp6jo+g9VEPgvqNfEopjTR4OTYct8lXlS8iVQdmnjDvbdbzYe9rjtFCB9egC86JoNCU61WRY+ScjkZpnIg==", - "dev": true, - "license": "MIT" - }, - "node_modules/cookiejar": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.0.1.tgz", - "integrity": "sha512-Txnl7P7okmx/FyZNRAjPyHMKISV2ADNbd+xITouEVyl2jUczrU4tJT40KcfQL/ifCo0kqqLgD49QlNofAAmBKQ==", - "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-ecdh": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", - "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", - "dev": true, - "license": "MIT", - "dependencies": { - "bn.js": "^4.1.0", - "elliptic": "^6.5.3" - } - }, - "node_modules/create-ecdh/node_modules/bn.js": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", - "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", - "dev": true, - "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==", - "dev": true, - "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==", - "dev": true, - "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-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/crypto-browserify": { - "version": "3.12.1", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.1.tgz", - "integrity": "sha512-r4ESw/IlusD17lgQi1O20Fa3qNnsckR126TdUuBgAu7GBYSIPvdNyONd3Zrxh0xCwA4+6w/TDArBPsMvhur+KQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "browserify-cipher": "^1.0.1", - "browserify-sign": "^4.2.3", - "create-ecdh": "^4.0.4", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "diffie-hellman": "^5.0.3", - "hash-base": "~3.0.4", - "inherits": "^2.0.4", - "pbkdf2": "^3.1.2", - "public-encrypt": "^4.0.3", - "randombytes": "^2.1.0", - "randomfill": "^1.0.4" - }, - "engines": { - "node": ">= 0.10" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/debug": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-1.0.5.tgz", - "integrity": "sha512-SIKSrp4+XqcUaNWhwaPJbLFnvSXPsZ4xBdH2WRK0Xo++UzMC4eepYghGAVhVhOwmfq3kqowqJ5w45R3pmYZnuA==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/dedent": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.0.tgz", - "integrity": "sha512-HGFtf8yhuhGhqO07SV79tRp+br4MnbdjeVxotpn1QBl30pcLLCQjX5b2295ll0fv8RKDKsmWYrl05usHM9CewQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "babel-plugin-macros": "^3.1.0" - }, - "peerDependenciesMeta": { - "babel-plugin-macros": { - "optional": true - } - } - }, - "node_modules/deepmerge": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", - "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.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==", - "dev": true, - "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/defined": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.1.tgz", - "integrity": "sha512-hsBd2qSVCRE+5PmNdHt1uzyrFu5d3RwmFDKzyNZMFq/EwDNJF7Ee5+D5oEKF0hU6LhtoUF1macFvOe4AskQC1Q==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/delayed-stream": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz", - "integrity": "sha512-v+7uBd1pqe5YtgPacIIbZ8HuHeLFVNe4mUEyFDXL6KiqzEykjbw+5mXZXpGFgNVasdL4jWKgaKIXrEHiynN1LA==", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/deps-sort": { - "version": "1.3.9", - "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-1.3.9.tgz", - "integrity": "sha512-aEnmQuu/Hf5h8akL8QshYWzk9MVBg/JYMyNq/Lz68i69nR17tunjP6o/AC6Tn48c8ayzG6aeKs6OoFOtVCtvrQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "JSONStream": "^1.0.3", - "shasum": "^1.0.0", - "subarg": "^1.0.0", - "through2": "^1.0.0" - }, - "bin": { - "deps-sort": "bin/cmd.js" - } - }, - "node_modules/des.js": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.1.0.tgz", - "integrity": "sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "node_modules/detect-newline": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", - "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } + "license": "MIT" }, - "node_modules/detective": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/detective/-/detective-4.7.1.tgz", - "integrity": "sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig==", + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "license": "MIT", "dependencies": { - "acorn": "^5.2.1", - "defined": "^1.0.0" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" } }, - "node_modules/detective/node_modules/acorn": { - "version": "5.7.4", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", - "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==", + "node_modules/dedent": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.0.tgz", + "integrity": "sha512-HGFtf8yhuhGhqO07SV79tRp+br4MnbdjeVxotpn1QBl30pcLLCQjX5b2295ll0fv8RKDKsmWYrl05usHM9CewQ==", "dev": true, "license": "MIT", - "bin": { - "acorn": "bin/acorn" + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" }, - "engines": { - "node": ">=0.4.0" + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } } }, - "node_modules/diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "dev": true, "license": "MIT", - "dependencies": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/diffie-hellman/node_modules/bn.js": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", - "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", - "dev": true, - "license": "MIT" - }, - "node_modules/domain-browser": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz", - "integrity": "sha512-fJ5MoHxe69h3E4/lJtFRhcWwLb04bhIBSfvCEMS1YDH+/9yEZTqBHTSTgch8nCP5tE5k2gdQEjodUqJzy7qJ9Q==", + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", "dev": true, "license": "MIT", "engines": { - "node": ">=0.4", - "npm": ">=1.2" + "node": ">=8" } }, "node_modules/dotenv": { @@ -3418,16 +2585,6 @@ "node": ">= 0.4" } }, - "node_modules/duplexer2": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", - "integrity": "sha512-+AWBwjGadtksxjOQSFDhPNQbed7icNXApT4+2BNpsXzcCBiInq2H9XW0O8sfHFaPmnQRs7cg/P0fAr2IWQSW0g==", - "dev": true, - "license": "BSD", - "dependencies": { - "readable-stream": "~1.1.9" - } - }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -3442,29 +2599,6 @@ "dev": true, "license": "ISC" }, - "node_modules/elliptic": { - "version": "6.6.1", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", - "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", - "dev": true, - "license": "MIT", - "dependencies": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/elliptic/node_modules/bn.js": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", - "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", - "dev": true, - "license": "MIT" - }, "node_modules/emittery": { "version": "0.13.1", "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", @@ -3655,26 +2789,6 @@ "node": ">=4.0" } }, - "node_modules/events": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/events/-/events-1.0.2.tgz", - "integrity": "sha512-XK19KwlDJo8XsceooxNDK1pObtcT44+Xte6V/jQc4a+fHq1qEouThyyX2ePmS0hS8RcCulmRxzg+T8jiLKAFFQ==", - "dev": true, - "engines": { - "node": ">=0.4.x" - } - }, - "node_modules/evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "dev": true, - "license": "MIT", - "dependencies": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, "node_modules/execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", @@ -3734,11 +2848,6 @@ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/extend": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-1.2.1.tgz", - "integrity": "sha512-2/JwIYRpMBDSjbQjUUppNSrmc719crhFaWIdT+TRSVA8gE+6HEobQWqJ6VkPt/H8twS7h/0WWs7veh8wmp98Ng==" - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -3847,22 +2956,6 @@ } } }, - "node_modules/for-each": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", - "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-callable": "^1.2.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/foreground-child": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", @@ -3880,28 +2973,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/form-data": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-0.1.3.tgz", - "integrity": "sha512-khpfkwI/RQybQdwruvz89OCmcXiFZstZ88llcc552BrzvOhqIOHC6YCRJ44GLK7BRFBEMGH9zJ2zMy0nz27Y9w==", - "dependencies": { - "async": "~0.9.0", - "combined-stream": "~0.0.4", - "mime": "~1.2.11" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/formidable": { - "version": "1.0.14", - "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.0.14.tgz", - "integrity": "sha512-aOskFHEfYwkSKSzGui5jhQ+uyLo2NTwpzhndggz2YZHlv0HkAi+zG5ZEBCL3GTvqLyr/FzX9Mvx9DueCmu2HzQ==", - "deprecated": "Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau", - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -4013,23 +3084,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/glob": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", - "integrity": "sha512-I0rTWUKSZKxPSIAIaqhSXTM/DiII6wame+rEC3cFA5Lqmr9YmdL7z6Hj9+bdWtTvoY1Su4/OiMLmb37Y7JzvJQ==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^2.0.1", - "once": "^1.3.0" - }, - "engines": { - "node": "*" - } - }, "node_modules/glob-to-regexp": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", @@ -4109,16 +3163,6 @@ "dev": true, "license": "MIT" }, - "node_modules/has": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", - "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -4129,19 +3173,6 @@ "node": ">=8" } }, - "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==", - "dev": true, - "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", @@ -4169,31 +3200,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/hash-base": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.5.tgz", - "integrity": "sha512-vXm0l45VbcHEVlTCzs8M+s0VeYsB2lnlAaThoLKGXr3bE/VWDOelNUnycUPEhKEaXARL2TEFjBOyUiM6+55KBg==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.4", - "safe-buffer": "^5.2.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", @@ -4206,18 +3212,6 @@ "node": ">= 0.4" } }, - "node_modules/hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", - "dev": true, - "license": "MIT", - "dependencies": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -4225,34 +3219,6 @@ "dev": true, "license": "MIT" }, - "node_modules/htmlescape": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", - "integrity": "sha512-eVcrzgbR4tim7c7soKQKtxa/kQM4TzjnlU83rcZ9bHU6t31ehfV7SktN6McWgwPWg+JYMA/O3qpGxBvFq1z2Jg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10" - } - }, - "node_modules/http-browserify": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/http-browserify/-/http-browserify-1.7.0.tgz", - "integrity": "sha512-Irf/LJXmE3cBzU1eaR4+NEX6bmVLqt1wkmDiA7kBwH7zmb0D8kBAXsDmQ88hhj/qv9iEZKlyGx/hrMcFi8sOHw==", - "dev": true, - "license": "MIT/X11", - "dependencies": { - "Base64": "~0.2.0", - "inherits": "~2.0.1" - } - }, - "node_modules/https-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz", - "integrity": "sha512-EjDQFbgJr1vDD/175UJeSX3ncQ3+RUnCL5NkthQGHvF4VNHlzTy8ifJfTqz47qiPRqaFH58+CbuG3x51WuB1XQ==", - "dev": true, - "license": "MIT" - }, "node_modules/human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", @@ -4263,27 +3229,6 @@ "node": ">=10.17.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==", - "dev": true, - "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/import-local": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", @@ -4314,12 +3259,6 @@ "node": ">=0.8.19" } }, - "node_modules/indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha512-i0G7hLJ1z0DE8dsqJa2rycj9dBmNKgXBvotXtZYXakU9oivfB9Uj2ZBC27qqef2U58/ZLwalxa1X/RDCdkHtVg==", - "dev": true - }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -4336,37 +3275,8 @@ "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/inline-source-map": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.5.0.tgz", - "integrity": "sha512-2WtHG0qX9OH9TVcxsLVfq3Tzr+qtL6PtWgoh0XAAKe4KkdA/57Q+OGJuRJHA4mZ2OZnkJ/ZAaXf9krLB12/nIg==", - "dev": true, - "license": "MIT", - "dependencies": { - "source-map": "~0.4.0" - } - }, - "node_modules/insert-module-globals": { - "version": "6.6.3", - "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-6.6.3.tgz", - "integrity": "sha512-ryk8hTKUZCc300SPOOwx30WhE5oRUssPDVlIoO8vtoMNBy5HGeesVRl3HF7ra4ll42T0IdnwD9XR9svh6+RRhg==", "dev": true, - "license": "MIT", - "dependencies": { - "combine-source-map": "~0.6.1", - "concat-stream": "~1.4.1", - "is-buffer": "^1.1.0", - "JSONStream": "^1.0.3", - "lexical-scope": "^1.2.0", - "process": "~0.11.0", - "through2": "^1.0.0", - "xtend": "^4.0.0" - }, - "bin": { - "insert-module-globals": "bin/cmd.js" - } + "license": "ISC" }, "node_modules/interpret": { "version": "3.1.1", @@ -4385,26 +3295,6 @@ "dev": true, "license": "MIT" }, - "node_modules/is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true, - "license": "MIT" - }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-core-module": { "version": "2.16.1", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", @@ -4477,28 +3367,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "which-typed-array": "^1.1.16" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", - "license": "MIT" - }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -5582,16 +4450,6 @@ "dev": true, "license": "MIT" }, - "node_modules/json-stable-stringify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", - "integrity": "sha512-nKtD/Qxm7tWdZqJoldEC7fF0S41v0mWbeaXG3637stOWfyGxTgWTYE2wtfKmjzpvxv2MA2xzxsXOIiwUpkX6Qw==", - "dev": true, - "license": "MIT", - "dependencies": { - "jsonify": "~0.0.0" - } - }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", @@ -5602,79 +4460,7 @@ "json5": "lib/cli.js" }, "engines": { - "node": ">=6" - } - }, - "node_modules/jsonify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz", - "integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==", - "dev": true, - "license": "Public Domain", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", - "dev": true, - "engines": [ - "node >= 0.2.0" - ], - "license": "MIT" - }, - "node_modules/JSONStream": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", - "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", - "dev": true, - "license": "(MIT OR Apache-2.0)", - "dependencies": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" - }, - "bin": { - "JSONStream": "bin.js" - }, - "engines": { - "node": "*" - } - }, - "node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/labeled-stream-splicer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-1.0.2.tgz", - "integrity": "sha512-3KBjPRnXrYC5h2jEf/d6hO7Lcl+38QzRVTOyHA2sFzZVMYwsUFuejlrOMwAjmz13hVBr9ruDS1RwE4YEz8P58w==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.1", - "isarray": "~0.0.1", - "stream-splicer": "^1.1.0" - } - }, - "node_modules/lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha512-RE2g0b5VGZsOCFOCgP7omTRYFqydmZkBwl5oNnQ1lDYC57uyO9KqNnNVxT7COSHTxrRCWVcAVOcbjk+tvh/rgQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" + "node": ">=6" } }, "node_modules/leven": { @@ -5687,16 +4473,6 @@ "node": ">=6" } }, - "node_modules/lexical-scope": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/lexical-scope/-/lexical-scope-1.2.0.tgz", - "integrity": "sha512-ntJ8IcBCuKwudML7vAuT/L0aIMU0+9vO25K4CjLPYgzf1NZ0bAhJJBZrvkO+oUGgKcbdkH8UZdRsaEg+wULLRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "astw": "^2.0.0" - } - }, "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", @@ -5731,23 +4507,6 @@ "node": ">=8" } }, - "node_modules/lodash.memoize": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", - "integrity": "sha512-eDn9kqrAmVUC1wmZvlQ6Uhde44n+tXpqPrN8olQJbttgh0oKclk+SF54P47VEGE9CEiMeRwAP8BaM7UHvBkz2A==", - "dev": true, - "license": "MIT" - }, - "node_modules/longest": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha512-k+yt5n3l48JU4k8ftnKG6V7u32wyH2NfKzeMto9F/QRE0amxy/LayxwlvjjkZEIzqR+19IrtFO8p5kB9QaYUFg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/lru-cache": { "version": "11.2.2", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz", @@ -5813,18 +4572,6 @@ "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -5832,12 +4579,6 @@ "dev": true, "license": "MIT" }, - "node_modules/methods": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.0.1.tgz", - "integrity": "sha512-2403MfnVypWSNIEpmQ26/ObZ5kSUx37E8NHRvriw0+I8Sne7k0HGuLGCk0OrCqURh4UIygD0cSsYq+Ll+kzNqA==", - "license": "MIT" - }, "node_modules/micromatch": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", @@ -5852,32 +4593,6 @@ "node": ">=8.6" } }, - "node_modules/miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - }, - "bin": { - "miller-rabin": "bin/miller-rabin" - } - }, - "node_modules/miller-rabin/node_modules/bn.js": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", - "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", - "dev": true, - "license": "MIT" - }, - "node_modules/mime": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.2.11.tgz", - "integrity": "sha512-Ysa2F/nqTNGHhhm9MV8ure4+Hc+Y8AWiqUdHxsO7xu8zc92ND9f3kpALHjaP026Ft17UfxrMt95c50PLUeynBw==" - }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -5909,34 +4624,6 @@ "node": ">=6" } }, - "node_modules/minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true, - "license": "ISC" - }, - "node_modules/minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", - "dev": true, - "license": "MIT" - }, - "node_modules/minimatch": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", - "integrity": "sha512-jQo6o1qSVLEWaw3l+bwYA2X0uLuK2KjNh2wjgO7Q/9UJnXr1Q3yQKR8BI0/Bt/rPg75e6SMW4hW/6cBHVTZUjA==", - "deprecated": "Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.0.0" - }, - "engines": { - "node": "*" - } - }, "node_modules/minimist": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", @@ -5957,41 +4644,6 @@ "node": ">=16 || 14 >=14.17" } }, - "node_modules/module-deps": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-3.9.1.tgz", - "integrity": "sha512-EbWWlSGaCVidEsLsSzkY6l/jm0IcGDSQ8tGwtjM8joTrxqxP0om02Px9Np8D7FMZ/vZFdsOGbio+WqkKQxYuTA==", - "dev": true, - "license": "MIT", - "dependencies": { - "browser-resolve": "^1.7.0", - "concat-stream": "~1.4.5", - "defined": "^1.0.0", - "detective": "^4.0.0", - "duplexer2": "0.0.2", - "inherits": "^2.0.1", - "JSONStream": "^1.0.3", - "parents": "^1.0.0", - "readable-stream": "^1.1.13", - "resolve": "^1.1.3", - "stream-combiner2": "~1.0.0", - "subarg": "^1.0.0", - "through2": "^1.0.0", - "xtend": "^4.0.0" - }, - "bin": { - "module-deps": "bin/cmd.js" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT" - }, "node_modules/napi-postinstall": { "version": "0.3.4", "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.4.tgz", @@ -6085,13 +4737,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/os-browserify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.1.2.tgz", - "integrity": "sha512-aZicJZccvxWOZ0Bja2eAch2L8RIJWBuRYmM8Gwl/JjNtRltH0Itcz4eH/ESyuIWfse8cc93ZCf0XrzhXK2HEDA==", - "dev": true, - "license": "MIT" - }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -6154,40 +4799,6 @@ "dev": true, "license": "BlueOak-1.0.0" }, - "node_modules/pako": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", - "integrity": "sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==", - "dev": true, - "license": "MIT" - }, - "node_modules/parents": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", - "integrity": "sha512-mXKF3xkoUt5td2DoxpLmtOmZvko9VfFpwRwkKDHSNvgmpLAeBo18YDhcPbBzJq+QLCHMbGOfzia2cX4U+0v9Mg==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-platform": "~0.11.15" - } - }, - "node_modules/parse-asn1": { - "version": "5.1.9", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.9.tgz", - "integrity": "sha512-fIYNuZ/HastSb80baGOuPRo1O9cf4baWw5WsAp7dBuUzeTD/BoaG8sVTdlPFksBE2lF21dN+A1AnrpIjSWqHHg==", - "dev": true, - "license": "ISC", - "dependencies": { - "asn1.js": "^4.10.1", - "browserify-aes": "^1.2.0", - "evp_bytestokey": "^1.0.3", - "pbkdf2": "^3.1.5", - "safe-buffer": "^5.2.1" - }, - "engines": { - "node": ">= 0.10" - } - }, "node_modules/parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -6207,13 +4818,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/path-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", - "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", - "dev": true, - "license": "MIT" - }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -6251,16 +4855,6 @@ "dev": true, "license": "MIT" }, - "node_modules/path-platform": { - "version": "0.11.15", - "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", - "integrity": "sha512-Y30dB6rab1A/nfEKsZxmr01nUotHX0c/ZiIAsCTatEe1CmS5Pm5He7fZ195bPT7RdquoaL8lLxFCMQi/bS7IJg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/path-scurry": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", @@ -6278,24 +4872,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "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==", - "dev": true, - "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", @@ -6339,16 +4915,6 @@ "node": ">=8" } }, - "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==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, "node_modules/pretty-format": { "version": "30.2.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.2.0.tgz", @@ -6377,58 +4943,12 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6.0" - } - }, - "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==", - "dev": true, - "license": "MIT" - }, "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", "license": "MIT" }, - "node_modules/public-encrypt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", - "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/public-encrypt/node_modules/bn.js": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", - "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", - "dev": true, - "license": "MIT" - }, - "node_modules/punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", - "dev": true, - "license": "MIT" - }, "node_modules/pure-rand": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-7.0.1.tgz", @@ -6446,33 +4966,6 @@ ], "license": "MIT" }, - "node_modules/qs": { - "version": "0.6.6", - "resolved": "https://registry.npmjs.org/qs/-/qs-0.6.6.tgz", - "integrity": "sha512-kN+yNdAf29Jgp+AYHUmC7X4QdJPR8czuMWLNLc0aRxkQ7tB3vJQEONKKT9ou/rW7EbqVec11srC9q9BiVbcnHA==", - "engines": { - "node": "*" - } - }, - "node_modules/querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==", - "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", - "dev": true, - "engines": { - "node": ">=0.4.x" - } - }, - "node_modules/querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==", - "dev": true, - "engines": { - "node": ">=0.4.x" - } - }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -6483,17 +4976,6 @@ "safe-buffer": "^5.1.0" } }, - "node_modules/randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "dev": true, - "license": "MIT", - "dependencies": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, "node_modules/react-is": { "version": "18.3.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", @@ -6501,40 +4983,6 @@ "dev": true, "license": "MIT" }, - "node_modules/read-only-stream": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-1.1.1.tgz", - "integrity": "sha512-CNGbvYZYr0b1F41aN7bYLHUBvvoynSS7ZTf2RLa5egnjZxKJPJUpUdWplD+jxQPijP/eL02IJxBhY8hwJlI3PQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "readable-stream": "^1.0.31", - "readable-wrap": "^1.0.0" - } - }, - "node_modules/readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "node_modules/readable-wrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/readable-wrap/-/readable-wrap-1.0.0.tgz", - "integrity": "sha512-/8n0Mr10S+HGKFygQ42Z40JIXwafPH3A72pwmlNClThgsImV5LJJiCue5Je1asxwY082sYxq/+kTxH6nTn0w3g==", - "dev": true, - "license": "MIT", - "dependencies": { - "readable-stream": "^1.1.13-1" - } - }, "node_modules/rechoir": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", @@ -6548,22 +4996,6 @@ "node": ">= 10.13.0" } }, - "node_modules/reduce-component": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/reduce-component/-/reduce-component-1.0.1.tgz", - "integrity": "sha512-y0wyCcdQul3hI3xHfIs0vg/jSbboQc/YTOAqaxjFG7At+XSexduuOqBVL9SmOLSwa/ldkbzVzdwuk9s2EKTAZg==", - "license": "Apache, Version 2.0" - }, - "node_modules/repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -6628,19 +5060,6 @@ "node": ">=8" } }, - "node_modules/right-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", - "integrity": "sha512-yqINtL/G7vs2v+dFIZmFUDbnVyFUJFKd6gK22Kgo6R4jfJGFtisKyncWDDULgjfqf4ASQuIQyjJ7XZ+3aWpsAg==", - "dev": true, - "license": "MIT", - "dependencies": { - "align-text": "^0.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/rimraf": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.0.1.tgz", @@ -6701,83 +5120,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "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==", - "dev": true, - "license": "MIT", - "dependencies": { - "hash-base": "^3.1.2", - "inherits": "^2.0.4" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/ripemd160/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==", - "dev": true, - "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/ripemd160/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/ripemd160/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==", - "dev": true, - "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/ripemd160/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==", - "dev": true, - "license": "MIT" - }, - "node_modules/ripemd160/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==", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/ripemd160/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==", - "dev": true, - "license": "MIT" - }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -6839,45 +5181,6 @@ "randombytes": "^2.1.0" } }, - "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==", - "dev": true, - "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==", - "dev": true, - "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/shallow-clone": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", @@ -6897,19 +5200,8 @@ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true, "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/shasum": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", - "integrity": "sha512-UTzHm/+AzKfO9RgPgRpDIuMSNie1ubXRaljjlhFMNGYoG7z+rm9AHLPMf70R7887xboDH9Q+5YQbWKObFHEAtw==", - "dev": true, - "license": "MIT", - "dependencies": { - "json-stable-stringify": "~0.0.0", - "sha.js": "~2.4.4" + "engines": { + "node": ">=0.10.0" } }, "node_modules/shebang-command": { @@ -6935,16 +5227,6 @@ "node": ">=8" } }, - "node_modules/shell-quote": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-0.0.1.tgz", - "integrity": "sha512-uEWz7wa9vnCi9w4mvKZMgbHFk3DCKjLQlZcy0tJxUH4NwZjRrPPHXAYIEt2TmJs600Dcgj0Z3fZLZKVPVdGNbQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, "node_modules/signal-exit": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", @@ -6968,19 +5250,6 @@ "node": ">=8" } }, - "node_modules/source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha512-Y8nIfcb1s/7DcobUz1yOO1GSp7gyL+D9zLHDehT7iRESqGSxjJ448Sg7rvfgsRJCnKLdSl11uGf0s9X80cH0/A==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "amdefine": ">=0.0.4" - }, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/source-map-support": { "version": "0.5.13", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", @@ -7022,82 +5291,6 @@ "node": ">=10" } }, - "node_modules/stream-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-1.0.0.tgz", - "integrity": "sha512-e+V5xc4LlkOiRr64kZTUdb11exsbpSnwb9uwmXaHeDXCpfHg7vaefMJOxi21Pe74ZOqjZ87blBcqqpNAM4Ku0g==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "~2.0.1", - "readable-stream": "^1.0.27-1" - } - }, - "node_modules/stream-combiner2": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.0.2.tgz", - "integrity": "sha512-7DO1SfBVnyIyo9ytUjSyVojT5bp1ZY6h3pj7HUs6PwcRSd/r8mBOHbRwYC7nbHRakKzMKyNp5HWJRv4GgVherA==", - "dev": true, - "license": "MIT", - "dependencies": { - "duplexer2": "~0.0.2", - "through2": "~0.5.1" - } - }, - "node_modules/stream-combiner2/node_modules/readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==", - "dev": true, - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "node_modules/stream-combiner2/node_modules/through2": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.5.1.tgz", - "integrity": "sha512-zexCrAOTbjkBCXGyozn7hhS3aEaqdrc59mAD2E3dKYzV1vFuEGQ1hEDJN2oQMQFwy4he2zyLqPZV+AlfS8ZWJA==", - "dev": true, - "license": "MIT", - "dependencies": { - "readable-stream": "~1.0.17", - "xtend": "~3.0.0" - } - }, - "node_modules/stream-combiner2/node_modules/xtend": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz", - "integrity": "sha512-sp/sT9OALMjRW1fKDlPeuSZlDQpkqReA0pyJukniWbTGoEKefHxhGJynE3PNhUMlcM8qWIjPwecwCw4LArS5Eg==", - "dev": true, - "engines": { - "node": ">=0.4" - } - }, - "node_modules/stream-splicer": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-1.3.2.tgz", - "integrity": "sha512-nmUMEbdm/sZYqe9dZs7mqJvTYpunsDbIWI5FiBCMc/hMVd6vwzy+ITmo7C3gcLYqrn+uQ1w+EJwooWvJ997JAA==", - "dev": true, - "license": "MIT", - "dependencies": { - "indexof": "0.0.1", - "inherits": "^2.0.1", - "isarray": "~0.0.1", - "readable-stream": "^1.1.13-1", - "readable-wrap": "^1.0.0", - "through2": "^1.0.0" - } - }, - "node_modules/string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", - "license": "MIT" - }, "node_modules/string-length": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", @@ -7272,50 +5465,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/subarg": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", - "integrity": "sha512-RIrIdRY0X1xojthNcVtgT9sjpOGagEUKpZdgBUi054OEPFo282yg+zE+t1Rj3+RqKq2xStL7uUHhY+AjbC4BXg==", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.1.0" - } - }, - "node_modules/superagent": { - "version": "0.18.2", - "resolved": "https://registry.npmjs.org/superagent/-/superagent-0.18.2.tgz", - "integrity": "sha512-v+q/OU7MnLHOE3BSRzwK7O4TO+qkD2ibrRuaHTlzonqXyXJInfUA2CoYWVwJiDBiF+XBcdHsvhbWHFgbC2YKsA==", - "deprecated": "Please upgrade to superagent v10.2.2+, see release notes at https://github.com/forwardemail/superagent/releases/tag/v10.2.2 - maintenance is supported by Forward Email @ https://forwardemail.net", - "dependencies": { - "component-emitter": "1.1.2", - "cookiejar": "2.0.1", - "debug": "~1.0.1", - "extend": "~1.2.1", - "form-data": "0.1.3", - "formidable": "1.0.14", - "methods": "1.0.1", - "mime": "1.2.11", - "qs": "0.6.6", - "readable-stream": "1.0.27-1", - "reduce-component": "1.0.1" - }, - "engines": { - "node": "*" - } - }, - "node_modules/superagent/node_modules/readable-stream": { - "version": "1.0.27-1", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.27-1.tgz", - "integrity": "sha512-uQE31HGhpMrqZwtDjRliOs2aC3XBi+DdkhLs+Xa0dvVD5eDiZr3+k8rKVZcyTzxosgtMw7B/twQsK3P1KTZeVg==", - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -7358,16 +5507,6 @@ "url": "https://opencollective.com/synckit" } }, - "node_modules/syntax-error": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz", - "integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==", - "dev": true, - "license": "MIT", - "dependencies": { - "acorn-node": "^1.2.0" - } - }, "node_modules/tapable": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.0.tgz", @@ -7551,36 +5690,6 @@ "node": "*" } }, - "node_modules/through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", - "dev": true, - "license": "MIT" - }, - "node_modules/through2": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/through2/-/through2-1.1.1.tgz", - "integrity": "sha512-zEbpaeSMHxczpTzO1KkMHjBC1enTA68ojeaZGG4toqdASpb9t4xUZaYFBq2/9OHo5nTGFVSYd4c910OR+6wxbQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "readable-stream": ">=1.1.13-1 <1.2.0-0", - "xtend": ">=4.0.0 <4.1.0-0" - } - }, - "node_modules/timers-browserify": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", - "integrity": "sha512-PIxwAupJZiYU4JmVZYwXp9FKsHMXb5h0ZEFyuXTAn8WLHOlcij+FEcbrvDsom1o5dr1YggEtFbECvGCW2sT53Q==", - "dev": true, - "dependencies": { - "process": "~0.11.0" - }, - "engines": { - "node": ">=0.6.0" - } - }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -7588,28 +5697,6 @@ "dev": true, "license": "BSD-3-Clause" }, - "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==", - "dev": true, - "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==", - "dev": true, - "license": "MIT" - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -7709,6 +5796,50 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/ts-loader": { + "version": "9.5.4", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.5.4.tgz", + "integrity": "sha512-nCz0rEwunlTZiy6rXFByQU1kVVpCIgUpc/psFiKVrUwrizdnIbRFu8w7bxhUF0X613DYwT4XzrZHpVyMe758hQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "enhanced-resolve": "^5.0.0", + "micromatch": "^4.0.0", + "semver": "^7.3.4", + "source-map": "^0.7.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "typescript": "*", + "webpack": "^5.0.0" + } + }, + "node_modules/ts-loader/node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ts-loader/node_modules/source-map": { + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz", + "integrity": "sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">= 12" + } + }, "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -7717,13 +5848,6 @@ "license": "0BSD", "optional": true }, - "node_modules/tty-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", - "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==", - "dev": true, - "license": "MIT" - }, "node_modules/type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", @@ -7747,35 +5871,11 @@ "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==", - "dev": true, - "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/typedarray": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.7.tgz", - "integrity": "sha512-ueeb9YybpjhivjbHP2LdFDAjbS948fGEPj+ACAMs4xCMmh72OCOMQWBQKlaN4ZNQ04yfLSDLSx1tGRIoWimObQ==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "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", @@ -7785,81 +5885,6 @@ "node": ">=14.17" } }, - "node_modules/uglify-js": { - "version": "2.8.29", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", - "integrity": "sha512-qLq/4y2pjcU3vhlhseXGGJ7VbFO4pBANu0kwl8VCa9KEI0V8VfZIx2Fy3w01iSTA/pGwKZSmu/+I4etLNDdt5w==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "source-map": "~0.5.1", - "yargs": "~3.10.0" - }, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "engines": { - "node": ">=0.8.0" - }, - "optionalDependencies": { - "uglify-to-browserify": "~1.0.0" - } - }, - "node_modules/uglify-js/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/uglify-to-browserify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "integrity": "sha512-vb2s1lYx2xBtUgy+ta+b2J/GLVUR+wmpINwHePmPRhOsIVCG2wDzKJ0n14GslH1BifsqVzSOwQhRaCAsZ/nI4Q==", - "dev": true, - "license": "MIT", - "optional": true - }, - "node_modules/uglifyify": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/uglifyify/-/uglifyify-3.0.4.tgz", - "integrity": "sha512-T2Pjw1oeZkT8UzDZNXzvNgepvGYNg3vrKKCi5jrgqMxMxF+VR14XZTL5AONjFVYVvpNHvD2pWd6UssByt8Mpew==", - "dev": true, - "license": "MIT", - "dependencies": { - "convert-source-map": "~1.1.0", - "extend": "^1.2.1", - "minimatch": "^3.0.2", - "through": "~2.3.4", - "uglify-js": "2.x.x" - } - }, - "node_modules/uglifyify/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/umd": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz", - "integrity": "sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow==", - "dev": true, - "license": "MIT", - "bin": { - "umd": "bin/cli.js" - } - }, "node_modules/undici-types": { "version": "7.14.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.14.0.tgz", @@ -7933,48 +5958,6 @@ "browserslist": ">= 4.21.0" } }, - "node_modules/url": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", - "integrity": "sha512-hzSUW2q06EqL1gKM/a+obYHLIO6ct2hwPuviqTTOcfFVc61UbfJ2Q32+uGL/HCPxKqrdGB5QUwIe7UqlDgwsOQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "punycode": "1.3.2", - "querystring": "0.2.0" - } - }, - "node_modules/url/node_modules/punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==", - "dev": true, - "license": "MIT" - }, - "node_modules/util": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", - "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "2.0.3" - } - }, - "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==", - "dev": true, - "license": "MIT" - }, - "node_modules/util/node_modules/inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", - "dev": true, - "license": "ISC" - }, "node_modules/v8-to-istanbul": { "version": "9.3.0", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", @@ -7997,16 +5980,6 @@ "dev": true, "license": "MIT" }, - "node_modules/vm-browserify": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", - "integrity": "sha512-NyZNR3WDah+NPkjh/YmhuWSsT4a0mF0BJYgUmvrJ70zxjTXh5Y2Asobxlh0Nfs0PCFB5FVpRJft7NozAWFMwLQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "indexof": "0.0.1" - } - }, "node_modules/walker": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", @@ -8210,28 +6183,6 @@ "node": ">= 8" } }, - "node_modules/which-typed-array": { - "version": "1.1.19", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz", - "integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==", - "dev": true, - "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/wildcard": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", @@ -8239,25 +6190,6 @@ "dev": true, "license": "MIT" }, - "node_modules/window-size": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "integrity": "sha512-1pTPQDKTdd61ozlKGNCjhNRd+KPmgLSGa3mZTHoOliaGcESD8G1PXhh7c1fgiPjVbNVfgy2Faw4BI8/m0cC8Mg==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/wordwrap": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha512-xSBsCeh+g+dinoBv3GAOWM4LcVVO68wLXRanibtBSdUvkGWQRGeE9P7IwU9EmDDi4jA6L44lz15CGMwdw9N5+Q==", - "dev": true, - "license": "MIT/X11", - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/wrap-ansi": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", @@ -8377,16 +6309,6 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.4" - } - }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -8404,19 +6326,6 @@ "dev": true, "license": "ISC" }, - "node_modules/yargs": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", - "integrity": "sha512-QFzUah88GAGy9lyDKGBqZdkYApt63rCXYBGYnEP4xDJPXNqXXnBDACnbrXnViV6jRSqAePwrATi2i8mfYm4L1A==", - "dev": true, - "license": "MIT", - "dependencies": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", - "window-size": "0.1.0" - } - }, "node_modules/yargs-parser": { "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", diff --git a/package.json b/package.json index 9c29883..6f4f2b2 100644 --- a/package.json +++ b/package.json @@ -3,10 +3,12 @@ "version": "1.0.13", "description": "PAYDUNYA Node.JS Library", "main": "dist/index.js", + "types": "dists/index.d.ts", "scripts": { "test": "jest test", - "build-debug": "browserify dist/index.js -o dist/paydunya-node.debug.js", - "build": "rimraf dist && tsc" + "webpack": "webpack --config webpack.config.js", + "build": "rimraf dist && tsc && npm run webpack", + "prepublish": "npm run build" }, "repository": { "type": "git", @@ -27,24 +29,25 @@ "url": "https://github.com/paydunyadev/paydunya-node-master/issues" }, "dependencies": { - "axios": "^1.12.2", - "bluebird": "^2.1.3", - "superagent": "^0.18.1", - "typescript": "^5.9.3" + "axios": "^1.12.2" }, "devDependencies": { "@types/jest": "^30.0.0", "@types/node": "^24.7.0", - "browserify": "^10.2.4", "dotenv": "^17.2.3", "jest": "^30.2.0", "rimraf": "^6.0.1", "ts-jest": "^29.4.5", - "uglifyify": "^3.0.1", + "ts-loader": "^9.5.4", + "typescript": "^5.9.3", "webpack": "^5.102.1", "webpack-cli": "^6.0.1" }, + "exports": { + ".": "./dist/index.js" + }, "files": [ - "dist/**/*" + "dist/*.d.ts", + "dist" ] } diff --git a/src/lib/direct-pay.ts b/src/lib/direct-pay.ts index c00ea57..7940d7e 100644 --- a/src/lib/direct-pay.ts +++ b/src/lib/direct-pay.ts @@ -2,7 +2,6 @@ import { Transport } from "./transport"; import { ResponseError } from "./errors"; import { Endpoints, ResponseCode } from "./constants"; import util from "util" - /** * @deprecated * This endpoints are not working anymore. Throwing 404 errors @@ -41,11 +40,7 @@ export class DirectPay { } } else { const e = new ResponseError( - util.format( - "Failed to credit account. Please ensure %s and %s are valid OR check your account balance.", - account, - amount - ), + `Failed to credit account. Please ensure ${account} and ${amount} are valid OR check your account balance.`, res.data ); throw e; diff --git a/src/lib/invoices/invoice.ts b/src/lib/invoices/invoice.ts index 959ecd8..40b42c4 100644 --- a/src/lib/invoices/invoice.ts +++ b/src/lib/invoices/invoice.ts @@ -140,7 +140,7 @@ export class Invoice { asRequestBody() { if (this.totalAmount <= 0) throw new Error( - "Invalid parameters. Initialize Invoice with valid instances of Setup and Store. Total amount must also be set.\neg: var invoice = new Invoice; invoice.init(setup, store); invoice.setTotalAmount(40)" + "Invalid parameters. Initialize Invoice with valid instances of Setup and Store. Total amount must also be set." ); const body = { diff --git a/tsconfig.json b/tsconfig.json index 3eafbea..7c90cd3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -33,6 +33,7 @@ "declaration": true }, "exclude": [ - "src/examples" - ], + "src/examples", + "__tests__", + ] } \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 0000000..b93c62f --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,24 @@ +const path = require("path"); + +module.exports = { + mode: "production", + entry: "./src/lib/index.ts", + module: { + rules: [ + { + test: /\.ts?$/, + use: 'ts-loader', + exclude: /node_modules/ + } + ] + }, + + resolve: { + extensions: ['.ts', '.js'], + }, + + output: { + filename: 'paydunya.min.js', + path: path.resolve(__dirname, 'dist'), + } +} \ No newline at end of file From 2e1e218227e3aad5c4513d6ef7a225c9f6a91e7e Mon Sep 17 00:00:00 2001 From: Maximilien COMLAN Date: Wed, 15 Oct 2025 22:21:31 +0100 Subject: [PATCH 16/20] updated package name --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6f4f2b2..66591a0 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "paydunya-sdk", + "name": "paydunya", "version": "1.0.13", "description": "PAYDUNYA Node.JS Library", "main": "dist/index.js", From 8acbe51c6320ea05514cb9cdbfddb7f90130b30e Mon Sep 17 00:00:00 2001 From: Maximilien COMLAN Date: Wed, 15 Oct 2025 22:24:50 +0100 Subject: [PATCH 17/20] disabled autoDetect in browser environment as it requires process.env --- dist/index.js | 3 +++ dist/index.js.map | 2 +- dist/paydunya.min.js | 2 +- package.json | 2 +- src/lib/index.ts | 3 +++ 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/dist/index.js b/dist/index.js index b4bfb91..9d8ce28 100644 --- a/dist/index.js +++ b/dist/index.js @@ -46,6 +46,9 @@ class PaydunyaClient { return client; } static autoDetect(mode = credentials_1.PaydunyaEnvironment.LIVE) { + if (globalThis.process === undefined) { + throw new Error("Auto detection of credentials is only available in NodeJS environment"); + } let client = new PaydunyaClient(new transport_1.Transport(new credentials_1.Credentials({ masterKey: process.env.PAYDUNYA_MASTER_KEY || "", privateKey: process.env.PAYDUNYA_PRIVATE_KEY || "", diff --git a/dist/index.js.map b/dist/index.js.map index 2988505..0acf9b4 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":";;;;;;AAAA,uCAAoC;AACpC,2CAAwC;AACxC,6CAAyC;AACzC,mEAAkD;AAClD,8CAAkD;AAClD,+CAAiE;AAEjE,gDAA6C;AAE7C,MAAa,cAAc;IACvB,SAAS,CAAY;IAErB,YAAY,SAAoB;QAC5B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC/B,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;IAChC,CAAC;IAED,IAAI,KAAK,CAAC,KAAY;QAClB,IAAI,CAAC,SAAS,CAAC,KAAK,GAAG,KAAK,CAAC;IACjC,CAAC;IAED,eAAe;QACX,OAAO,IAAI,iBAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACvC,CAAC;IAED,uBAAuB;QACnB,OAAO,IAAI,kBAAe,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC/C,CAAC;IAED,qBAAqB;QACjB,OAAO,IAAI,sBAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC7C,CAAC;IAED,iBAAiB;QACb,OAAO,IAAI,sBAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACzC,CAAC;IAED,eAAe;QACX,OAAO,IAAI,iBAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACvC,CAAC;IAED,MAAM,CAAC,uBAAuB,CAAC,WAAwB;QACnD,IAAI,MAAM,GAAG,IAAI,cAAc,CAC3B,IAAI,qBAAS,CACT,WAAW,CACd,CACJ,CAAA;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,MAAM,CAAC,eAAe,CAAC,MAAoD;QACvE,IAAI,MAAM,GAAG,IAAI,cAAc,CAC3B,IAAI,qBAAS,CACT,IAAI,yBAAW,CAAC,MAAM,CAAC,CAC1B,CACJ,CAAA;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,OAA4B,iCAAmB,CAAC,IAAI;QAClE,IAAI,MAAM,GAAG,IAAI,cAAc,CAC3B,IAAI,qBAAS,CACT,IAAI,yBAAW,CAAC;YACZ,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,EAAE;YAChD,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,EAAE;YAClD,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,EAAE;YAChD,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,EAAE;YACvC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,IAAI,CAAwB;SACnE,CAAC,CACL,CACJ,CAAA;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;CAEJ;AApED,wCAoEC"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":";;;;;;AAAA,uCAAoC;AACpC,2CAAwC;AACxC,6CAAyC;AACzC,mEAAkD;AAClD,8CAAkD;AAClD,+CAAiE;AAEjE,gDAA6C;AAE7C,MAAa,cAAc;IACvB,SAAS,CAAY;IAErB,YAAY,SAAoB;QAC5B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC/B,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;IAChC,CAAC;IAED,IAAI,KAAK,CAAC,KAAY;QAClB,IAAI,CAAC,SAAS,CAAC,KAAK,GAAG,KAAK,CAAC;IACjC,CAAC;IAED,eAAe;QACX,OAAO,IAAI,iBAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACvC,CAAC;IAED,uBAAuB;QACnB,OAAO,IAAI,kBAAe,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC/C,CAAC;IAED,qBAAqB;QACjB,OAAO,IAAI,sBAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC7C,CAAC;IAED,iBAAiB;QACb,OAAO,IAAI,sBAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACzC,CAAC;IAED,eAAe;QACX,OAAO,IAAI,iBAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACvC,CAAC;IAED,MAAM,CAAC,uBAAuB,CAAC,WAAwB;QACnD,IAAI,MAAM,GAAG,IAAI,cAAc,CAC3B,IAAI,qBAAS,CACT,WAAW,CACd,CACJ,CAAA;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,MAAM,CAAC,eAAe,CAAC,MAAoD;QACvE,IAAI,MAAM,GAAG,IAAI,cAAc,CAC3B,IAAI,qBAAS,CACT,IAAI,yBAAW,CAAC,MAAM,CAAC,CAC1B,CACJ,CAAA;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,OAA4B,iCAAmB,CAAC,IAAI;QAClE,IAAG,UAAU,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;YAClC,MAAM,IAAI,KAAK,CAAC,uEAAuE,CAAC,CAAC;QAC7F,CAAC;QACD,IAAI,MAAM,GAAG,IAAI,cAAc,CAC3B,IAAI,qBAAS,CACT,IAAI,yBAAW,CAAC;YACZ,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,EAAE;YAChD,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,EAAE;YAClD,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,EAAE;YAChD,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,EAAE;YACvC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,IAAI,CAAwB;SACnE,CAAC,CACL,CACJ,CAAA;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;CAEJ;AAvED,wCAuEC"} \ No newline at end of file diff --git a/dist/paydunya.min.js b/dist/paydunya.min.js index bb59894..23652a9 100644 --- a/dist/paydunya.min.js +++ b/dist/paydunya.min.js @@ -1,2 +1,2 @@ /*! For license information please see paydunya.min.js.LICENSE.txt */ -(()=>{"use strict";var e={94:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Invoice=void 0,t.Invoice=class{transport;returnURL;cancelURL;callbackURL;description;items;customData;taxes;channels;totalAmount;constructor(e){this.transport=e,e.store?.return_url&&(this.returnURL=e.store.return_url),e.store?.cancel_url&&(this.cancelURL=e.store.cancel_url),e.store?.callback_url&&(this.callbackURL=e.store.callback_url),this.description="",this.items={},this.customData={},this.taxes={},this.channels=[],this.totalAmount=0}get store(){return this.transport.store}addItem(e,t,n,r,s){const o=Object.keys(this.items).length+1;return this.items["item_"+o]={name:e,quantity:t||0,unit_price:n||0,total_price:r||0},s&&(this.items["item_"+o].description=s),this}addTax(e,t){const n=Object.keys(this.taxes).length+1;return this.taxes["tax_"+n]={name:e,amount:Number(t)},this}addChannel(e){return this.channels.push(e),this}addChannels(e=[]){for(let t=0;t0&&(e.invoice.channels=this.channels),Object.keys(this.items).length>0&&(e.invoice.items=this.items),(this.returnURL||this.cancelURL||this.callbackURL)&&(e.actions={},this.returnURL&&(e.actions.return_url=this.returnURL),this.cancelURL&&(e.actions.cancel_url=this.cancelURL),this.callbackURL&&(e.actions.callback_url=this.callbackURL)),Object.keys(this.taxes).length>0&&(e.invoice.taxes=this.taxes),Object.keys(this.customData).length>0&&(e.custom_data=this.customData),e}}},149:(e,t)=>{var n,r,s,o;Object.defineProperty(t,"__esModule",{value:!0}),t.SUPPORTED_COUNTRY_CODES=t.PaymentChannel=t.Endpoints=t.ResponseCode=t.InvoiceStatus=void 0,function(e){e.COMPLETED="completed",e.CANCELLED="cancelled",e.PENDING="pending",e.FAILED="failed"}(n||(t.InvoiceStatus=n={})),function(e){e.success="00"}(r||(t.ResponseCode=r={})),function(e){e.CREATE_INVOICE="/checkout-invoice/create",e.CONFIRM_INVOICE="/checkout-invoice/confirm/",e.CREATE_ONSITEINVOCE="/opr/create",e.CHARGE_ONSITEINVOCE="/opr/charge",e.CREDIT_ACCOUNT="/direct-pay/credit-account",e.CHECK_BALANCE="/disburse/check-balance"}(s||(t.Endpoints=s={})),function(e){e.Card="card",e.OrangeMoneySenegal="orange-money-senegal",e.WaveSenegal="wave-senegal",e.FreeMoneySenegal="free-money-senegal",e.ExpressoSn="expresso-sn",e.WizallSenegal="wizall-senegal",e.MtnBenin="mtn-benin",e.MoovBenin="moov-benin",e.OrangeMoneyCi="orange-money-ci",e.WaveCi="wave-ci",e.MtnCi="mtn-ci",e.MoovCi="moov-ci",e.TMoneyTogo="t-money-togo",e.MoovTogo="moov-togo",e.OrangeMoneyMali="orange-money-mali",e.MoovMl="moov-ml",e.OrangeMoneyBurkina="orange-money-burkina",e.MoovBurkinaFaso="moov-burkina-faso"}(o||(t.PaymentChannel=o={})),t.SUPPORTED_COUNTRY_CODES={SN:"SN",CI:"CI",BJ:"BJ",TG:"TG",ML:"ML",BF:"BF"}},224:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DirectPay=void 0;const r=n(473),s=n(149);t.DirectPay=class{transport;responseText;description;transactionID;constructor(e){this.transport=e}async creditAccount(e,t){const n={account_alias:e,amount:Number(t)};return this.transport.client.post(s.Endpoints.CREDIT_ACCOUNT,n).then(n=>{if(n.data.response_code===s.ResponseCode.success)return this.responseText=n.data.response_text,this.description=n.data.description,this.transactionID=n.data.transaction_id,{responseText:this.responseText,description:this.description,transactionID:this.transactionID};throw new r.ResponseError(`Failed to credit account. Please ensure ${e} and ${t} are valid OR check your account balance.`,n.data)})}}},423:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OnsiteInvoice=void 0;const r=n(149),s=n(473),o=n(94);class i extends o.Invoice{token;oprToken;responseText;status;receiptURL;customer;constructor(e){super(e)}async create(e){let t={invoice_data:this.asRequestBody(),opr_data:{account_alias:e}};return this.transport.client.post(r.Endpoints.CREATE_ONSITEINVOCE,t).then(e=>{if(e.data?.response_code===r.ResponseCode.success)return{token:e.data.invoice_token,oprToken:e.data.token,responseText:e.data.description};throw new s.ResponseError("Failed to create invoice",e.data)})}async charge(e,t){let n={token:e,confirm_token:t};return this.transport.client.post(r.Endpoints.CHARGE_ONSITEINVOCE,n).then(e=>{if(e.data?.response_code===r.ResponseCode.success)return{responseText:e.data.response_text,status:e.data.invoice_data.status,receiptURL:e.data.invoice_data.receipt_url,customer:e.data.invoice_data.customer};throw new s.ResponseError("Failed to charge invoice. Check OPR/confirm token and try again.",e.data)})}}t.OnsiteInvoice=i},425:(e,t,n)=>{function r(e,t){return function(){return e.apply(t,arguments)}}const{toString:s}=Object.prototype,{getPrototypeOf:o}=Object,{iterator:i,toStringTag:a}=Symbol,c=(u=Object.create(null),e=>{const t=s.call(e);return u[t]||(u[t]=t.slice(8,-1).toLowerCase())});var u;const l=e=>(e=e.toLowerCase(),t=>c(t)===e),d=e=>t=>typeof t===e,{isArray:f}=Array,h=d("undefined");function p(e){return null!==e&&!h(e)&&null!==e.constructor&&!h(e.constructor)&&b(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const m=l("ArrayBuffer"),y=d("string"),b=d("function"),g=d("number"),E=e=>null!==e&&"object"==typeof e,w=e=>{if("object"!==c(e))return!1;const t=o(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||a in e||i in e)},v=l("Date"),R=l("File"),O=l("Blob"),_=l("FileList"),T=l("URLSearchParams"),[S,C,A,x]=["ReadableStream","Request","Response","Headers"].map(l);function U(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,s;if("object"!=typeof e&&(e=[e]),f(e))for(r=0,s=e.length;r0;)if(r=n[s],t===r.toLowerCase())return r;return null}const P="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,k=e=>!h(e)&&e!==P,j=(L="undefined"!=typeof Uint8Array&&o(Uint8Array),e=>L&&e instanceof L);var L;const D=l("HTMLFormElement"),B=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),F=l("RegExp"),I=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};U(n,(n,s)=>{let o;!1!==(o=t(n,s,e))&&(r[s]=o||n)}),Object.defineProperties(e,r)},M=l("AsyncFunction"),q=(K="function"==typeof setImmediate,z=b(P.postMessage),K?setImmediate:z?(H=`axios@${Math.random()}`,V=[],P.addEventListener("message",({source:e,data:t})=>{e===P&&t===H&&V.length&&V.shift()()},!1),e=>{V.push(e),P.postMessage(H,"*")}):e=>setTimeout(e));var K,z,H,V;const Y="undefined"!=typeof queueMicrotask?queueMicrotask.bind(P):"undefined"!=typeof process&&process.nextTick||q;var J={isArray:f,isArrayBuffer:m,isBuffer:p,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||b(e.append)&&("formdata"===(t=c(e))||"object"===t&&b(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&m(e.buffer),t},isString:y,isNumber:g,isBoolean:e=>!0===e||!1===e,isObject:E,isPlainObject:w,isEmptyObject:e=>{if(!E(e)||p(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:S,isRequest:C,isResponse:A,isHeaders:x,isUndefined:h,isDate:v,isFile:R,isBlob:O,isRegExp:F,isFunction:b,isStream:e=>E(e)&&b(e.pipe),isURLSearchParams:T,isTypedArray:j,isFileList:_,forEach:U,merge:function e(){const{caseless:t,skipUndefined:n}=k(this)&&this||{},r={},s=(s,o)=>{const i=t&&N(r,o)||o;w(r[i])&&w(s)?r[i]=e(r[i],s):w(s)?r[i]=e({},s):f(s)?r[i]=s.slice():n&&h(s)||(r[i]=s)};for(let e=0,t=arguments.length;e(U(t,(t,s)=>{n&&b(t)?e[s]=r(t,n):e[s]=t},{allOwnKeys:s}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let s,i,a;const c={};if(t=t||{},null==e)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)a=s[i],r&&!r(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==n&&o(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:c,kindOfTest:l,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(f(e))return e;let t=e.length;if(!g(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[i]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:D,hasOwnProperty:B,hasOwnProp:B,reduceDescriptors:I,freezeMethods:e=>{I(e,(t,n)=>{if(b(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];b(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return f(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:N,global:P,isContextDefined:k,isSpecCompliantForm:function(e){return!!(e&&b(e.append)&&"FormData"===e[a]&&e[i])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(E(e)){if(t.indexOf(e)>=0)return;if(p(e))return e;if(!("toJSON"in e)){t[r]=e;const s=f(e)?[]:{};return U(e,(e,t)=>{const o=n(e,r+1);!h(o)&&(s[t]=o)}),t[r]=void 0,s}}return e};return n(e,0)},isAsyncFn:M,isThenable:e=>e&&(E(e)||b(e))&&b(e.then)&&b(e.catch),setImmediate:q,asap:Y,isIterable:e=>null!=e&&b(e[i])};function W(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}J.inherits(W,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:J.toJSONObject(this.config),code:this.code,status:this.status}}});const $=W.prototype,G={};function X(e){return J.isPlainObject(e)||J.isArray(e)}function Q(e){return J.endsWith(e,"[]")?e.slice(0,-2):e}function Z(e,t,n){return e?e.concat(t).map(function(e,t){return e=Q(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{G[e]={value:e}}),Object.defineProperties(W,G),Object.defineProperty($,"isAxiosError",{value:!0}),W.from=(e,t,n,r,s,o)=>{const i=Object.create($);J.toFlatObject(e,i,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const a=e&&e.message?e.message:"Error",c=null==t&&e?e.code:t;return W.call(i,a,c,n,r,s),e&&null==i.cause&&Object.defineProperty(i,"cause",{value:e,configurable:!0}),i.name=e&&e.name||"Error",o&&Object.assign(i,o),i};const ee=J.toFlatObject(J,{},null,function(e){return/^is[A-Z]/.test(e)});function te(e,t,n){if(!J.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=J.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!J.isUndefined(t[e])})).metaTokens,s=n.visitor||u,o=n.dots,i=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&J.isSpecCompliantForm(t);if(!J.isFunction(s))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(J.isDate(e))return e.toISOString();if(J.isBoolean(e))return e.toString();if(!a&&J.isBlob(e))throw new W("Blob is not supported. Use a Buffer instead.");return J.isArrayBuffer(e)||J.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,s){let a=e;if(e&&!s&&"object"==typeof e)if(J.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(J.isArray(e)&&function(e){return J.isArray(e)&&!e.some(X)}(e)||(J.isFileList(e)||J.endsWith(n,"[]"))&&(a=J.toArray(e)))return n=Q(n),a.forEach(function(e,r){!J.isUndefined(e)&&null!==e&&t.append(!0===i?Z([n],r,o):null===i?n:n+"[]",c(e))}),!1;return!!X(e)||(t.append(Z(s,n,o),c(e)),!1)}const l=[],d=Object.assign(ee,{defaultVisitor:u,convertValue:c,isVisitable:X});if(!J.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!J.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),J.forEach(n,function(n,o){!0===(!(J.isUndefined(n)||null===n)&&s.call(t,n,J.isString(o)?o.trim():o,r,d))&&e(n,r?r.concat(o):[o])}),l.pop()}}(e),t}function ne(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function re(e,t){this._pairs=[],e&&te(e,this,t)}const se=re.prototype;function oe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ie(e,t,n){if(!t)return e;const r=n&&n.encode||oe;J.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let o;if(o=s?s(t,n):J.isURLSearchParams(t)?t.toString():new re(t,n).toString(r),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}se.append=function(e,t){this._pairs.push([e,t])},se.toString=function(e){const t=e?function(t){return e.call(this,t,ne)}:ne;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var ae=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){J.forEach(this.handlers,function(t){null!==t&&e(t)})}},ce={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ue={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:re,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const le="undefined"!=typeof window&&"undefined"!=typeof document,de="object"==typeof navigator&&navigator||void 0,fe=le&&(!de||["ReactNative","NativeScript","NS"].indexOf(de.product)<0),he="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,pe=le&&window.location.href||"http://localhost";var me={...Object.freeze({__proto__:null,hasBrowserEnv:le,hasStandardBrowserWebWorkerEnv:he,hasStandardBrowserEnv:fe,navigator:de,origin:pe}),...ue};function ye(e){function t(e,n,r,s){let o=e[s++];if("__proto__"===o)return!0;const i=Number.isFinite(+o),a=s>=e.length;return o=!o&&J.isArray(r)?r.length:o,a?(J.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!i):(r[o]&&J.isObject(r[o])||(r[o]=[]),t(e,n,r[o],s)&&J.isArray(r[o])&&(r[o]=function(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r{t(function(e){return J.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null}const be={transitional:ce,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,s=J.isObject(e);if(s&&J.isHTMLForm(e)&&(e=new FormData(e)),J.isFormData(e))return r?JSON.stringify(ye(e)):e;if(J.isArrayBuffer(e)||J.isBuffer(e)||J.isStream(e)||J.isFile(e)||J.isBlob(e)||J.isReadableStream(e))return e;if(J.isArrayBufferView(e))return e.buffer;if(J.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return te(e,new me.classes.URLSearchParams,{visitor:function(e,t,n,r){return me.isNode&&J.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((o=J.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return te(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return s||r?(t.setContentType("application/json",!1),function(e){if(J.isString(e))try{return(0,JSON.parse)(e),J.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||be.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(J.isResponse(e)||J.isReadableStream(e))return e;if(e&&J.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw W.from(e,W.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:me.classes.FormData,Blob:me.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};J.forEach(["delete","get","head","post","put","patch"],e=>{be.headers[e]={}});var ge=be;const Ee=J.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),we=Symbol("internals");function ve(e){return e&&String(e).trim().toLowerCase()}function Re(e){return!1===e||null==e?e:J.isArray(e)?e.map(Re):String(e)}function Oe(e,t,n,r,s){return J.isFunction(r)?r.call(this,t,n):(s&&(t=n),J.isString(t)?J.isString(r)?-1!==t.indexOf(r):J.isRegExp(r)?r.test(t):void 0:void 0)}class _e{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function s(e,t,n){const s=ve(t);if(!s)throw new Error("header name must be a non-empty string");const o=J.findKey(r,s);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=Re(e))}const o=(e,t)=>J.forEach(e,(e,n)=>s(e,n,t));if(J.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(J.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((e=>{const t={};let n,r,s;return e&&e.split("\n").forEach(function(e){s=e.indexOf(":"),n=e.substring(0,s).trim().toLowerCase(),r=e.substring(s+1).trim(),!n||t[n]&&Ee[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(J.isObject(e)&&J.isIterable(e)){let n,r,s={};for(const t of e){if(!J.isArray(t))throw TypeError("Object iterator must return a key-value pair");s[r=t[0]]=(n=s[r])?J.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}o(s,t)}else null!=e&&s(t,e,n);return this}get(e,t){if(e=ve(e)){const n=J.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(J.isFunction(t))return t.call(this,e,n);if(J.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ve(e)){const n=J.findKey(this,e);return!(!n||void 0===this[n]||t&&!Oe(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function s(e){if(e=ve(e)){const s=J.findKey(n,e);!s||t&&!Oe(0,n[s],s,t)||(delete n[s],r=!0)}}return J.isArray(e)?e.forEach(s):s(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const s=t[n];e&&!Oe(0,this[s],s,e,!0)||(delete this[s],r=!0)}return r}normalize(e){const t=this,n={};return J.forEach(this,(r,s)=>{const o=J.findKey(n,s);if(o)return t[o]=Re(r),void delete t[s];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(s):String(s).trim();i!==s&&delete t[s],t[i]=Re(r),n[i]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return J.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&J.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[we]=this[we]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=ve(e);t[r]||(function(e,t){const n=J.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,s){return this[r].call(this,t,e,n,s)},configurable:!0})})}(n,e),t[r]=!0)}return J.isArray(e)?e.forEach(r):r(e),this}}_e.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),J.reduceDescriptors(_e.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),J.freezeMethods(_e);var Te=_e;function Se(e,t){const n=this||ge,r=t||n,s=Te.from(r.headers);let o=r.data;return J.forEach(e,function(e){o=e.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function Ce(e){return!(!e||!e.__CANCEL__)}function Ae(e,t,n){W.call(this,null==e?"canceled":e,W.ERR_CANCELED,t,n),this.name="CanceledError"}function xe(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new W("Request failed with status code "+n.status,[W.ERR_BAD_REQUEST,W.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}J.inherits(Ae,W,{__CANCEL__:!0});const Ue=(e,t,n=3)=>{let r=0;const s=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s,o=0,i=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=r[i];s||(s=c),n[o]=a,r[o]=c;let l=i,d=0;for(;l!==o;)d+=n[l++],l%=e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),c-s{c=o,i=null,a&&(clearTimeout(a),a=null),(n=>{const o=n.loaded,i=n.lengthComputable?n.total:void 0,a=o-r,c=s(a);r=o,e({loaded:o,total:i,progress:i?o/i:void 0,bytes:a,rate:c||void 0,estimated:c&&i&&o<=i?(i-o)/c:void 0,event:n,lengthComputable:null!=i,[t?"download":"upload"]:!0})})(...n)};return[(...e)=>{const t=Date.now(),n=t-c;n>=u?l(e,t):(i=e,a||(a=setTimeout(()=>{a=null,l(i)},u-n)))},()=>i&&l(i)]}(0,n)},Ne=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Pe=e=>(...t)=>J.asap(()=>e(...t));var ke=me.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,me.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(me.origin),me.navigator&&/(msie|trident)/i.test(me.navigator.userAgent)):()=>!0,je=me.hasStandardBrowserEnv?{write(e,t,n,r,s,o){const i=[e+"="+encodeURIComponent(t)];J.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),J.isString(r)&&i.push("path="+r),J.isString(s)&&i.push("domain="+s),!0===o&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Le(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const De=e=>e instanceof Te?{...e}:e;function Be(e,t){t=t||{};const n={};function r(e,t,n,r){return J.isPlainObject(e)&&J.isPlainObject(t)?J.merge.call({caseless:r},e,t):J.isPlainObject(t)?J.merge({},t):J.isArray(t)?t.slice():t}function s(e,t,n,s){return J.isUndefined(t)?J.isUndefined(e)?void 0:r(void 0,e,0,s):r(e,t,0,s)}function o(e,t){if(!J.isUndefined(t))return r(void 0,t)}function i(e,t){return J.isUndefined(t)?J.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,s,o){return o in t?r(n,s):o in e?r(void 0,n):void 0}const c={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(e,t,n)=>s(De(e),De(t),0,!0)};return J.forEach(Object.keys({...e,...t}),function(r){const o=c[r]||s,i=o(e[r],t[r],r);J.isUndefined(i)&&o!==a||(n[r]=i)}),n}var Fe=e=>{const t=Be({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:a}=t;if(t.headers=i=Te.from(i),t.url=ie(Le(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),J.isFormData(n))if(me.hasStandardBrowserEnv||me.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(J.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&i.set(e,n)})}if(me.hasStandardBrowserEnv&&(r&&J.isFunction(r)&&(r=r(t)),r||!1!==r&&ke(t.url))){const e=s&&o&&je.read(o);e&&i.set(s,e)}return t},Ie="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=Fe(e);let s=r.data;const o=Te.from(r.headers).normalize();let i,a,c,u,l,{responseType:d,onUploadProgress:f,onDownloadProgress:h}=r;function p(){u&&u(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(i),r.signal&&r.signal.removeEventListener("abort",i)}let m=new XMLHttpRequest;function y(){if(!m)return;const r=Te.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());xe(function(e){t(e),p()},function(e){n(e),p()},{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=y:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(y)},m.onabort=function(){m&&(n(new W("Request aborted",W.ECONNABORTED,e,m)),m=null)},m.onerror=function(t){const r=new W(t&&t.message?t.message:"Network Error",W.ERR_NETWORK,e,m);r.event=t||null,n(r),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const s=r.transitional||ce;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new W(t,s.clarifyTimeoutError?W.ETIMEDOUT:W.ECONNABORTED,e,m)),m=null},void 0===s&&o.setContentType(null),"setRequestHeader"in m&&J.forEach(o.toJSON(),function(e,t){m.setRequestHeader(t,e)}),J.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),h&&([c,l]=Ue(h,!0),m.addEventListener("progress",c)),f&&m.upload&&([a,u]=Ue(f),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(i=t=>{m&&(n(!t||t.type?new Ae(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(i),r.signal&&(r.signal.aborted?i():r.signal.addEventListener("abort",i)));const b=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);b&&-1===me.protocols.indexOf(b)?n(new W("Unsupported protocol "+b+":",W.ERR_BAD_REQUEST,e)):m.send(s||null)})},Me=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const s=function(e){if(!n){n=!0,i();const t=e instanceof Error?e:this.reason;r.abort(t instanceof W?t:new Ae(t instanceof Error?t.message:t))}};let o=t&&setTimeout(()=>{o=null,s(new W(`timeout ${t} of ms exceeded`,W.ETIMEDOUT))},t);const i=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(s):e.removeEventListener("abort",s)}),e=null)};e.forEach(e=>e.addEventListener("abort",s));const{signal:a}=r;return a.unsubscribe=()=>J.asap(i),a}};const qe=function*(e,t){let n=e.byteLength;if(!t||n{const s=async function*(e,t){for await(const n of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}}(e))yield*qe(n,t)}(e,t);let o,i=0,a=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await s.next();if(t)return a(),void e.close();let o=r.byteLength;if(n){let e=i+=o;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),s.return())},{highWaterMark:2})},{isFunction:ze}=J,He=(({Request:e,Response:t})=>({Request:e,Response:t}))(J.global),{ReadableStream:Ve,TextEncoder:Ye}=J.global,Je=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},We=e=>{e=J.merge.call({skipUndefined:!0},He,e);const{fetch:t,Request:n,Response:r}=e,s=t?ze(t):"function"==typeof fetch,o=ze(n),i=ze(r);if(!s)return!1;const a=s&&ze(Ve),c=s&&("function"==typeof Ye?(u=new Ye,e=>u.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var u;const l=o&&a&&Je(()=>{let e=!1;const t=new n(me.origin,{body:new Ve,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),d=i&&a&&Je(()=>J.isReadableStream(new r("").body)),f={stream:d&&(e=>e.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!f[e]&&(f[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new W(`Response type '${e}' is not supported`,W.ERR_NOT_SUPPORT,n)})});return async e=>{let{url:s,method:i,data:a,signal:u,cancelToken:h,timeout:p,onDownloadProgress:m,onUploadProgress:y,responseType:b,headers:g,withCredentials:E="same-origin",fetchOptions:w}=Fe(e),v=t||fetch;b=b?(b+"").toLowerCase():"text";let R=Me([u,h&&h.toAbortSignal()],p),O=null;const _=R&&R.unsubscribe&&(()=>{R.unsubscribe()});let T;try{if(y&&l&&"get"!==i&&"head"!==i&&0!==(T=await(async(e,t)=>{const r=J.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(J.isBlob(e))return e.size;if(J.isSpecCompliantForm(e)){const t=new n(me.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return J.isArrayBufferView(e)||J.isArrayBuffer(e)?e.byteLength:(J.isURLSearchParams(e)&&(e+=""),J.isString(e)?(await c(e)).byteLength:void 0)})(t):r})(g,a))){let e,t=new n(s,{method:"POST",body:a,duplex:"half"});if(J.isFormData(a)&&(e=t.headers.get("content-type"))&&g.setContentType(e),t.body){const[e,n]=Ne(T,Ue(Pe(y)));a=Ke(t.body,65536,e,n)}}J.isString(E)||(E=E?"include":"omit");const t=o&&"credentials"in n.prototype,u={...w,signal:R,method:i.toUpperCase(),headers:g.normalize().toJSON(),body:a,duplex:"half",credentials:t?E:void 0};O=o&&new n(s,u);let h=await(o?v(O,w):v(s,u));const p=d&&("stream"===b||"response"===b);if(d&&(m||p&&_)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=h[t]});const t=J.toFiniteNumber(h.headers.get("content-length")),[n,s]=m&&Ne(t,Ue(Pe(m),!0))||[];h=new r(Ke(h.body,65536,n,()=>{s&&s(),_&&_()}),e)}b=b||"text";let S=await f[J.findKey(f,b)||"text"](h,e);return!p&&_&&_(),await new Promise((t,n)=>{xe(t,n,{data:S,headers:Te.from(h.headers),status:h.status,statusText:h.statusText,config:e,request:O})})}catch(t){if(_&&_(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new W("Network Error",W.ERR_NETWORK,e,O),{cause:t.cause||t});throw W.from(t,t&&t.code,e,O)}}},$e=new Map,Ge=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:s}=t,o=[r,s,n];let i,a,c=o.length,u=$e;for(;c--;)i=o[c],a=u.get(i),void 0===a&&u.set(i,a=c?new Map:We(t)),u=a;return a};Ge();const Xe={http:null,xhr:Ie,fetch:{get:Ge}};J.forEach(Xe,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const Qe=e=>`- ${e}`,Ze=e=>J.isFunction(e)||null===e||!1===e;var et=(e,t)=>{e=J.isArray(e)?e:[e];const{length:n}=e;let r,s;const o={};for(let i=0;i`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new W("There is no suitable adapter to dispatch the request "+(n?e.length>1?"since :\n"+e.map(Qe).join("\n"):" "+Qe(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return s};function tt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ae(null,e)}function nt(e){return tt(e),e.headers=Te.from(e.headers),e.data=Se.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),et(e.adapter||ge.adapter,e)(e).then(function(t){return tt(e),t.data=Se.call(e,e.transformResponse,t),t.headers=Te.from(t.headers),t},function(t){return Ce(t)||(tt(e),t&&t.response&&(t.response.data=Se.call(e,e.transformResponse,t.response),t.response.headers=Te.from(t.response.headers))),Promise.reject(t)})}const rt="1.12.2",st={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{st[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const ot={};st.transitional=function(e,t,n){function r(e,t){return"[Axios v"+rt+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,s,o)=>{if(!1===e)throw new W(r(s," has been removed"+(t?" in "+t:"")),W.ERR_DEPRECATED);return t&&!ot[s]&&(ot[s]=!0,console.warn(r(s," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,s,o)}},st.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var it={assertOptions:function(e,t,n){if("object"!=typeof e)throw new W("options must be an object",W.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const t=e[o],n=void 0===t||i(t,o,e);if(!0!==n)throw new W("option "+o+" must be "+n,W.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new W("Unknown option "+o,W.ERR_BAD_OPTION)}},validators:st};const at=it.validators;class ct{constructor(e){this.defaults=e||{},this.interceptors={request:new ae,response:new ae}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Be(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:s}=t;void 0!==n&&it.assertOptions(n,{silentJSONParsing:at.transitional(at.boolean),forcedJSONParsing:at.transitional(at.boolean),clarifyTimeoutError:at.transitional(at.boolean)},!1),null!=r&&(J.isFunction(r)?t.paramsSerializer={serialize:r}:it.assertOptions(r,{encode:at.function,serialize:at.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),it.assertOptions(t,{baseUrl:at.spelling("baseURL"),withXsrfToken:at.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=s&&J.merge(s.common,s[t.method]);s&&J.forEach(["delete","get","head","post","put","patch","common"],e=>{delete s[e]}),t.headers=Te.concat(o,s);const i=[];let a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,i.unshift(e.fulfilled,e.rejected))});const c=[];let u;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,d=0;if(!a){const e=[nt.bind(this),void 0];for(e.unshift(...i),e.push(...c),l=e.length,u=Promise.resolve(t);d{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,s){n.reason||(n.reason=new Ae(e,r,s),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new lt(function(t){e=t}),cancel:e}}}var dt=lt;const ft={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ft).forEach(([e,t])=>{ft[t]=e});var ht=ft;const pt=function e(t){const n=new ut(t),s=r(ut.prototype.request,n);return J.extend(s,ut.prototype,n,{allOwnKeys:!0}),J.extend(s,n,null,{allOwnKeys:!0}),s.create=function(n){return e(Be(t,n))},s}(ge);pt.Axios=ut,pt.CanceledError=Ae,pt.CancelToken=dt,pt.isCancel=Ce,pt.VERSION=rt,pt.toFormData=te,pt.AxiosError=W,pt.Cancel=pt.CanceledError,pt.all=function(e){return Promise.all(e)},pt.spread=function(e){return function(t){return e.apply(null,t)}},pt.isAxiosError=function(e){return J.isObject(e)&&!0===e.isAxiosError},pt.mergeConfig=Be,pt.AxiosHeaders=Te,pt.formToJSON=e=>ye(J.isHTMLForm(e)?new FormData(e):e),pt.getAdapter=et,pt.HttpStatusCode=ht,pt.default=pt,e.exports=pt},457:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=n(94),s=n(473),o=n(149);class i extends r.Invoice{token;url;status;responseText;customer;receiptURL;receipt_identifier;provider_reference;hash;constructor(e){super(e)}async create(){const e=this.asRequestBody();return this.transport.client.post(o.Endpoints.CREATE_INVOICE,e).then(e=>{if(e.data.response_code===o.ResponseCode.success)return this.token=e.data.token,this.url=e.data.response_text,this.getTokenStatus(this.token);throw new s.ResponseError("Failed to create invoice.",e.data)})}async getTokenStatus(e){const t=e||this.token;return this.transport.client.get(`${o.Endpoints.CONFIRM_INVOICE}${t}`).then(e=>{const t=e.data;if(t.response_code===o.ResponseCode.success)return this.status=t.status,this.responseText=t.response_text,this.hash=t?.hash,this.items=t.invoice.items,this.taxes=t.taxes,this.description=t.description,t.actions&&(this.cancelURL=t.actions.cancel_url,this.callbackURL=t.actions.callback_url,this.returnURL=t.actions.return_url),this.totalAmount=t.invoice.total_amount,this.status===o.InvoiceStatus.COMPLETED&&(this.customer=t.customer,this.receiptURL=t.receipt_url,this.receipt_identifier=t.receipt_identifier,this.provider_reference=t.provider_reference,t.custom_data&&Object.keys(t.custom_data).length>0&&(this.customData=t.custom_data)),this.asObject;throw new s.ResponseError("Could not confirm invoice status.",e.data)})}get asObject(){return{token:this.token,url:this.url,status:this.status,hash:this.hash,responseText:this.responseText,customer:this.customer,receiptURL:this.receiptURL,receipt_identifier:this.receipt_identifier,provider_reference:this.provider_reference,customData:this.customData,totalAmount:this.totalAmount}}}t.default=i},473:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResponseError=void 0;class n extends Error{data=void 0;constructor(e,t=void 0){super(e),this.data=t}}t.ResponseError=n},546:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Credentials=t.PaydunyaEnvironment=void 0,function(e){e.LIVE="live",e.TEST="test"}(n||(t.PaydunyaEnvironment=n={})),t.Credentials=class{masterKey;privateKey;publicKey;token;mode;constructor(e){this.masterKey=e.masterKey,this.privateKey=e.privateKey,this.publicKey=e.publicKey,this.token=e.token,this.mode=e.mode}extendRequestConfig(e){return e.headers.set("Content-Type","application/json").set("PAYDUNYA-MASTER-KEY",this.masterKey).set("PAYDUNYA-PRIVATE-KEY",this.privateKey).set("PAYDUNYA-TOKEN",this.token),e}}},568:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PaydunyaClient=void 0;const s=n(928),o=n(641),i=n(224),a=r(n(457)),c=n(423),u=n(546),l=n(94);class d{transport;constructor(e){this.transport=e}get store(){return this.transport.store}set store(e){this.transport.store=e}invoiceInstance(){return new l.Invoice(this.transport)}checkoutInvoiceInstance(){return new a.default(this.transport)}onsiteInvoiceInstance(){return new c.OnsiteInvoice(this.transport)}directpayInstance(){return new i.DirectPay(this.transport)}balanceInstance(){return new s.Balance(this.transport)}static fromCredentialsInstance(e){return new d(new o.Transport(e))}static fromCredentials(e){return new d(new o.Transport(new u.Credentials(e)))}static autoDetect(e=u.PaydunyaEnvironment.LIVE){return new d(new o.Transport(new u.Credentials({masterKey:process.env.PAYDUNYA_MASTER_KEY||"",privateKey:process.env.PAYDUNYA_PRIVATE_KEY||"",publicKey:process.env.PAYDUNYA_PUBLIC_KEY||"",token:process.env.PAYDUNYA_TOKEN||"",mode:process.env.PAYDUNYA_MODE||e})))}}t.PaydunyaClient=d},641:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Transport=void 0;const s=n(546),o=r(n(425));t.Transport=class{setup;store=void 0;client;constructor(e,t=void 0){this.setup=e,this.store=t,this.client=o.default.create({baseURL:this.baseURL}),this.client.interceptors.request.use(e=>this.setup.extendRequestConfig(e))}get baseURL(){return this.setup.mode===s.PaydunyaEnvironment.TEST?"https://app.paydunya.com/sandbox-api/v1":"https://app.paydunya.com/api/v1"}}},928:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Balance=void 0;const s=r(n(425)),o=n(149);class i{amount;currency;constructor(e,t){this.amount=e,this.currency=t}static parse(e){let[t,n]=e.split(" ");return new i(parseFloat(t||"0"),n?.trim()||"XOF")}}t.Balance=class{transport;axios;constructor(e){this.transport=e,this.axios=s.default.create({baseURL:"https://app.paydunya.com/api/v2"}),this.axios.interceptors.request.use(e=>this.transport.setup.extendRequestConfig(e))}async getAll(){return this.axios.get(o.Endpoints.CHECK_BALANCE).then(e=>{if(e.data.success){let t={};return Object.keys(o.SUPPORTED_COUNTRY_CODES).forEach(n=>{t[n]=i.parse(e.data[`Balance ${n}`])}),t}})}async getBalanceByCountry(e){let t=await this.getAll();if(t&&t[e])return t[e]}async getAccountBalance(e){return this.axios.get(`${o.Endpoints.CHECK_BALANCE}/${e}`).then(e=>{if(e.data.success)return e.data})}}}},t={};function n(r){var s=t[r];if(void 0!==s)return s.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n(568)})(); \ No newline at end of file +(()=>{"use strict";var e={94:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Invoice=void 0,t.Invoice=class{transport;returnURL;cancelURL;callbackURL;description;items;customData;taxes;channels;totalAmount;constructor(e){this.transport=e,e.store?.return_url&&(this.returnURL=e.store.return_url),e.store?.cancel_url&&(this.cancelURL=e.store.cancel_url),e.store?.callback_url&&(this.callbackURL=e.store.callback_url),this.description="",this.items={},this.customData={},this.taxes={},this.channels=[],this.totalAmount=0}get store(){return this.transport.store}addItem(e,t,n,r,o){const s=Object.keys(this.items).length+1;return this.items["item_"+s]={name:e,quantity:t||0,unit_price:n||0,total_price:r||0},o&&(this.items["item_"+s].description=o),this}addTax(e,t){const n=Object.keys(this.taxes).length+1;return this.taxes["tax_"+n]={name:e,amount:Number(t)},this}addChannel(e){return this.channels.push(e),this}addChannels(e=[]){for(let t=0;t0&&(e.invoice.channels=this.channels),Object.keys(this.items).length>0&&(e.invoice.items=this.items),(this.returnURL||this.cancelURL||this.callbackURL)&&(e.actions={},this.returnURL&&(e.actions.return_url=this.returnURL),this.cancelURL&&(e.actions.cancel_url=this.cancelURL),this.callbackURL&&(e.actions.callback_url=this.callbackURL)),Object.keys(this.taxes).length>0&&(e.invoice.taxes=this.taxes),Object.keys(this.customData).length>0&&(e.custom_data=this.customData),e}}},149:(e,t)=>{var n,r,o,s;Object.defineProperty(t,"__esModule",{value:!0}),t.SUPPORTED_COUNTRY_CODES=t.PaymentChannel=t.Endpoints=t.ResponseCode=t.InvoiceStatus=void 0,function(e){e.COMPLETED="completed",e.CANCELLED="cancelled",e.PENDING="pending",e.FAILED="failed"}(n||(t.InvoiceStatus=n={})),function(e){e.success="00"}(r||(t.ResponseCode=r={})),function(e){e.CREATE_INVOICE="/checkout-invoice/create",e.CONFIRM_INVOICE="/checkout-invoice/confirm/",e.CREATE_ONSITEINVOCE="/opr/create",e.CHARGE_ONSITEINVOCE="/opr/charge",e.CREDIT_ACCOUNT="/direct-pay/credit-account",e.CHECK_BALANCE="/disburse/check-balance"}(o||(t.Endpoints=o={})),function(e){e.Card="card",e.OrangeMoneySenegal="orange-money-senegal",e.WaveSenegal="wave-senegal",e.FreeMoneySenegal="free-money-senegal",e.ExpressoSn="expresso-sn",e.WizallSenegal="wizall-senegal",e.MtnBenin="mtn-benin",e.MoovBenin="moov-benin",e.OrangeMoneyCi="orange-money-ci",e.WaveCi="wave-ci",e.MtnCi="mtn-ci",e.MoovCi="moov-ci",e.TMoneyTogo="t-money-togo",e.MoovTogo="moov-togo",e.OrangeMoneyMali="orange-money-mali",e.MoovMl="moov-ml",e.OrangeMoneyBurkina="orange-money-burkina",e.MoovBurkinaFaso="moov-burkina-faso"}(s||(t.PaymentChannel=s={})),t.SUPPORTED_COUNTRY_CODES={SN:"SN",CI:"CI",BJ:"BJ",TG:"TG",ML:"ML",BF:"BF"}},224:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DirectPay=void 0;const r=n(473),o=n(149);t.DirectPay=class{transport;responseText;description;transactionID;constructor(e){this.transport=e}async creditAccount(e,t){const n={account_alias:e,amount:Number(t)};return this.transport.client.post(o.Endpoints.CREDIT_ACCOUNT,n).then(n=>{if(n.data.response_code===o.ResponseCode.success)return this.responseText=n.data.response_text,this.description=n.data.description,this.transactionID=n.data.transaction_id,{responseText:this.responseText,description:this.description,transactionID:this.transactionID};throw new r.ResponseError(`Failed to credit account. Please ensure ${e} and ${t} are valid OR check your account balance.`,n.data)})}}},423:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OnsiteInvoice=void 0;const r=n(149),o=n(473),s=n(94);class i extends s.Invoice{token;oprToken;responseText;status;receiptURL;customer;constructor(e){super(e)}async create(e){let t={invoice_data:this.asRequestBody(),opr_data:{account_alias:e}};return this.transport.client.post(r.Endpoints.CREATE_ONSITEINVOCE,t).then(e=>{if(e.data?.response_code===r.ResponseCode.success)return{token:e.data.invoice_token,oprToken:e.data.token,responseText:e.data.description};throw new o.ResponseError("Failed to create invoice",e.data)})}async charge(e,t){let n={token:e,confirm_token:t};return this.transport.client.post(r.Endpoints.CHARGE_ONSITEINVOCE,n).then(e=>{if(e.data?.response_code===r.ResponseCode.success)return{responseText:e.data.response_text,status:e.data.invoice_data.status,receiptURL:e.data.invoice_data.receipt_url,customer:e.data.invoice_data.customer};throw new o.ResponseError("Failed to charge invoice. Check OPR/confirm token and try again.",e.data)})}}t.OnsiteInvoice=i},425:(e,t,n)=>{function r(e,t){return function(){return e.apply(t,arguments)}}const{toString:o}=Object.prototype,{getPrototypeOf:s}=Object,{iterator:i,toStringTag:a}=Symbol,c=(u=Object.create(null),e=>{const t=o.call(e);return u[t]||(u[t]=t.slice(8,-1).toLowerCase())});var u;const l=e=>(e=e.toLowerCase(),t=>c(t)===e),d=e=>t=>typeof t===e,{isArray:f}=Array,h=d("undefined");function p(e){return null!==e&&!h(e)&&null!==e.constructor&&!h(e.constructor)&&b(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const m=l("ArrayBuffer"),y=d("string"),b=d("function"),g=d("number"),E=e=>null!==e&&"object"==typeof e,w=e=>{if("object"!==c(e))return!1;const t=s(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||a in e||i in e)},v=l("Date"),R=l("File"),O=l("Blob"),_=l("FileList"),T=l("URLSearchParams"),[S,C,A,x]=["ReadableStream","Request","Response","Headers"].map(l);function N(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),f(e))for(r=0,o=e.length;r0;)if(r=n[o],t===r.toLowerCase())return r;return null}const P="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,k=e=>!h(e)&&e!==P,j=(L="undefined"!=typeof Uint8Array&&s(Uint8Array),e=>L&&e instanceof L);var L;const D=l("HTMLFormElement"),B=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),F=l("RegExp"),I=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};N(n,(n,o)=>{let s;!1!==(s=t(n,o,e))&&(r[o]=s||n)}),Object.defineProperties(e,r)},M=l("AsyncFunction"),q=(K="function"==typeof setImmediate,z=b(P.postMessage),K?setImmediate:z?(H=`axios@${Math.random()}`,V=[],P.addEventListener("message",({source:e,data:t})=>{e===P&&t===H&&V.length&&V.shift()()},!1),e=>{V.push(e),P.postMessage(H,"*")}):e=>setTimeout(e));var K,z,H,V;const Y="undefined"!=typeof queueMicrotask?queueMicrotask.bind(P):"undefined"!=typeof process&&process.nextTick||q;var J={isArray:f,isArrayBuffer:m,isBuffer:p,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||b(e.append)&&("formdata"===(t=c(e))||"object"===t&&b(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&m(e.buffer),t},isString:y,isNumber:g,isBoolean:e=>!0===e||!1===e,isObject:E,isPlainObject:w,isEmptyObject:e=>{if(!E(e)||p(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:S,isRequest:C,isResponse:A,isHeaders:x,isUndefined:h,isDate:v,isFile:R,isBlob:O,isRegExp:F,isFunction:b,isStream:e=>E(e)&&b(e.pipe),isURLSearchParams:T,isTypedArray:j,isFileList:_,forEach:N,merge:function e(){const{caseless:t,skipUndefined:n}=k(this)&&this||{},r={},o=(o,s)=>{const i=t&&U(r,s)||s;w(r[i])&&w(o)?r[i]=e(r[i],o):w(o)?r[i]=e({},o):f(o)?r[i]=o.slice():n&&h(o)||(r[i]=o)};for(let e=0,t=arguments.length;e(N(t,(t,o)=>{n&&b(t)?e[o]=r(t,n):e[o]=t},{allOwnKeys:o}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,a;const c={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],r&&!r(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==n&&s(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:c,kindOfTest:l,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(f(e))return e;let t=e.length;if(!g(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[i]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:D,hasOwnProperty:B,hasOwnProp:B,reduceDescriptors:I,freezeMethods:e=>{I(e,(t,n)=>{if(b(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];b(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return f(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:U,global:P,isContextDefined:k,isSpecCompliantForm:function(e){return!!(e&&b(e.append)&&"FormData"===e[a]&&e[i])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(E(e)){if(t.indexOf(e)>=0)return;if(p(e))return e;if(!("toJSON"in e)){t[r]=e;const o=f(e)?[]:{};return N(e,(e,t)=>{const s=n(e,r+1);!h(s)&&(o[t]=s)}),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:M,isThenable:e=>e&&(E(e)||b(e))&&b(e.then)&&b(e.catch),setImmediate:q,asap:Y,isIterable:e=>null!=e&&b(e[i])};function W(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}J.inherits(W,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:J.toJSONObject(this.config),code:this.code,status:this.status}}});const $=W.prototype,G={};function X(e){return J.isPlainObject(e)||J.isArray(e)}function Q(e){return J.endsWith(e,"[]")?e.slice(0,-2):e}function Z(e,t,n){return e?e.concat(t).map(function(e,t){return e=Q(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{G[e]={value:e}}),Object.defineProperties(W,G),Object.defineProperty($,"isAxiosError",{value:!0}),W.from=(e,t,n,r,o,s)=>{const i=Object.create($);J.toFlatObject(e,i,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const a=e&&e.message?e.message:"Error",c=null==t&&e?e.code:t;return W.call(i,a,c,n,r,o),e&&null==i.cause&&Object.defineProperty(i,"cause",{value:e,configurable:!0}),i.name=e&&e.name||"Error",s&&Object.assign(i,s),i};const ee=J.toFlatObject(J,{},null,function(e){return/^is[A-Z]/.test(e)});function te(e,t,n){if(!J.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=J.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!J.isUndefined(t[e])})).metaTokens,o=n.visitor||u,s=n.dots,i=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&J.isSpecCompliantForm(t);if(!J.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(J.isDate(e))return e.toISOString();if(J.isBoolean(e))return e.toString();if(!a&&J.isBlob(e))throw new W("Blob is not supported. Use a Buffer instead.");return J.isArrayBuffer(e)||J.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let a=e;if(e&&!o&&"object"==typeof e)if(J.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(J.isArray(e)&&function(e){return J.isArray(e)&&!e.some(X)}(e)||(J.isFileList(e)||J.endsWith(n,"[]"))&&(a=J.toArray(e)))return n=Q(n),a.forEach(function(e,r){!J.isUndefined(e)&&null!==e&&t.append(!0===i?Z([n],r,s):null===i?n:n+"[]",c(e))}),!1;return!!X(e)||(t.append(Z(o,n,s),c(e)),!1)}const l=[],d=Object.assign(ee,{defaultVisitor:u,convertValue:c,isVisitable:X});if(!J.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!J.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),J.forEach(n,function(n,s){!0===(!(J.isUndefined(n)||null===n)&&o.call(t,n,J.isString(s)?s.trim():s,r,d))&&e(n,r?r.concat(s):[s])}),l.pop()}}(e),t}function ne(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function re(e,t){this._pairs=[],e&&te(e,this,t)}const oe=re.prototype;function se(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ie(e,t,n){if(!t)return e;const r=n&&n.encode||se;J.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let s;if(s=o?o(t,n):J.isURLSearchParams(t)?t.toString():new re(t,n).toString(r),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}oe.append=function(e,t){this._pairs.push([e,t])},oe.toString=function(e){const t=e?function(t){return e.call(this,t,ne)}:ne;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var ae=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){J.forEach(this.handlers,function(t){null!==t&&e(t)})}},ce={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ue={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:re,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const le="undefined"!=typeof window&&"undefined"!=typeof document,de="object"==typeof navigator&&navigator||void 0,fe=le&&(!de||["ReactNative","NativeScript","NS"].indexOf(de.product)<0),he="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,pe=le&&window.location.href||"http://localhost";var me={...Object.freeze({__proto__:null,hasBrowserEnv:le,hasStandardBrowserWebWorkerEnv:he,hasStandardBrowserEnv:fe,navigator:de,origin:pe}),...ue};function ye(e){function t(e,n,r,o){let s=e[o++];if("__proto__"===s)return!0;const i=Number.isFinite(+s),a=o>=e.length;return s=!s&&J.isArray(r)?r.length:s,a?(J.hasOwnProp(r,s)?r[s]=[r[s],n]:r[s]=n,!i):(r[s]&&J.isObject(r[s])||(r[s]=[]),t(e,n,r[s],o)&&J.isArray(r[s])&&(r[s]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r{t(function(e){return J.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null}const be={transitional:ce,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=J.isObject(e);if(o&&J.isHTMLForm(e)&&(e=new FormData(e)),J.isFormData(e))return r?JSON.stringify(ye(e)):e;if(J.isArrayBuffer(e)||J.isBuffer(e)||J.isStream(e)||J.isFile(e)||J.isBlob(e)||J.isReadableStream(e))return e;if(J.isArrayBufferView(e))return e.buffer;if(J.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return te(e,new me.classes.URLSearchParams,{visitor:function(e,t,n,r){return me.isNode&&J.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((s=J.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return te(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e){if(J.isString(e))try{return(0,JSON.parse)(e),J.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||be.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(J.isResponse(e)||J.isReadableStream(e))return e;if(e&&J.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw W.from(e,W.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:me.classes.FormData,Blob:me.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};J.forEach(["delete","get","head","post","put","patch"],e=>{be.headers[e]={}});var ge=be;const Ee=J.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),we=Symbol("internals");function ve(e){return e&&String(e).trim().toLowerCase()}function Re(e){return!1===e||null==e?e:J.isArray(e)?e.map(Re):String(e)}function Oe(e,t,n,r,o){return J.isFunction(r)?r.call(this,t,n):(o&&(t=n),J.isString(t)?J.isString(r)?-1!==t.indexOf(r):J.isRegExp(r)?r.test(t):void 0:void 0)}class _e{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=ve(t);if(!o)throw new Error("header name must be a non-empty string");const s=J.findKey(r,o);(!s||void 0===r[s]||!0===n||void 0===n&&!1!==r[s])&&(r[s||t]=Re(e))}const s=(e,t)=>J.forEach(e,(e,n)=>o(e,n,t));if(J.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(J.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&Ee[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(J.isObject(e)&&J.isIterable(e)){let n,r,o={};for(const t of e){if(!J.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[r=t[0]]=(n=o[r])?J.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}s(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=ve(e)){const n=J.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(J.isFunction(t))return t.call(this,e,n);if(J.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ve(e)){const n=J.findKey(this,e);return!(!n||void 0===this[n]||t&&!Oe(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=ve(e)){const o=J.findKey(n,e);!o||t&&!Oe(0,n[o],o,t)||(delete n[o],r=!0)}}return J.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!Oe(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return J.forEach(this,(r,o)=>{const s=J.findKey(n,o);if(s)return t[s]=Re(r),void delete t[o];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();i!==o&&delete t[o],t[i]=Re(r),n[i]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return J.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&J.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[we]=this[we]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=ve(e);t[r]||(function(e,t){const n=J.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return J.isArray(e)?e.forEach(r):r(e),this}}_e.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),J.reduceDescriptors(_e.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),J.freezeMethods(_e);var Te=_e;function Se(e,t){const n=this||ge,r=t||n,o=Te.from(r.headers);let s=r.data;return J.forEach(e,function(e){s=e.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function Ce(e){return!(!e||!e.__CANCEL__)}function Ae(e,t,n){W.call(this,null==e?"canceled":e,W.ERR_CANCELED,t,n),this.name="CanceledError"}function xe(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new W("Request failed with status code "+n.status,[W.ERR_BAD_REQUEST,W.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}J.inherits(Ae,W,{__CANCEL__:!0});const Ne=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,s=0,i=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=r[i];o||(o=c),n[s]=a,r[s]=c;let l=i,d=0;for(;l!==s;)d+=n[l++],l%=e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),c-o{c=s,i=null,a&&(clearTimeout(a),a=null),(n=>{const s=n.loaded,i=n.lengthComputable?n.total:void 0,a=s-r,c=o(a);r=s,e({loaded:s,total:i,progress:i?s/i:void 0,bytes:a,rate:c||void 0,estimated:c&&i&&s<=i?(i-s)/c:void 0,event:n,lengthComputable:null!=i,[t?"download":"upload"]:!0})})(...n)};return[(...e)=>{const t=Date.now(),n=t-c;n>=u?l(e,t):(i=e,a||(a=setTimeout(()=>{a=null,l(i)},u-n)))},()=>i&&l(i)]}(0,n)},Ue=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Pe=e=>(...t)=>J.asap(()=>e(...t));var ke=me.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,me.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(me.origin),me.navigator&&/(msie|trident)/i.test(me.navigator.userAgent)):()=>!0,je=me.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const i=[e+"="+encodeURIComponent(t)];J.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),J.isString(r)&&i.push("path="+r),J.isString(o)&&i.push("domain="+o),!0===s&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Le(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const De=e=>e instanceof Te?{...e}:e;function Be(e,t){t=t||{};const n={};function r(e,t,n,r){return J.isPlainObject(e)&&J.isPlainObject(t)?J.merge.call({caseless:r},e,t):J.isPlainObject(t)?J.merge({},t):J.isArray(t)?t.slice():t}function o(e,t,n,o){return J.isUndefined(t)?J.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function s(e,t){if(!J.isUndefined(t))return r(void 0,t)}function i(e,t){return J.isUndefined(t)?J.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,s){return s in t?r(n,o):s in e?r(void 0,n):void 0}const c={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(e,t,n)=>o(De(e),De(t),0,!0)};return J.forEach(Object.keys({...e,...t}),function(r){const s=c[r]||o,i=s(e[r],t[r],r);J.isUndefined(i)&&s!==a||(n[r]=i)}),n}var Fe=e=>{const t=Be({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:a}=t;if(t.headers=i=Te.from(i),t.url=ie(Le(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),J.isFormData(n))if(me.hasStandardBrowserEnv||me.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(J.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&i.set(e,n)})}if(me.hasStandardBrowserEnv&&(r&&J.isFunction(r)&&(r=r(t)),r||!1!==r&&ke(t.url))){const e=o&&s&&je.read(s);e&&i.set(o,e)}return t},Ie="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=Fe(e);let o=r.data;const s=Te.from(r.headers).normalize();let i,a,c,u,l,{responseType:d,onUploadProgress:f,onDownloadProgress:h}=r;function p(){u&&u(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(i),r.signal&&r.signal.removeEventListener("abort",i)}let m=new XMLHttpRequest;function y(){if(!m)return;const r=Te.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());xe(function(e){t(e),p()},function(e){n(e),p()},{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=y:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(y)},m.onabort=function(){m&&(n(new W("Request aborted",W.ECONNABORTED,e,m)),m=null)},m.onerror=function(t){const r=new W(t&&t.message?t.message:"Network Error",W.ERR_NETWORK,e,m);r.event=t||null,n(r),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||ce;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new W(t,o.clarifyTimeoutError?W.ETIMEDOUT:W.ECONNABORTED,e,m)),m=null},void 0===o&&s.setContentType(null),"setRequestHeader"in m&&J.forEach(s.toJSON(),function(e,t){m.setRequestHeader(t,e)}),J.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),h&&([c,l]=Ne(h,!0),m.addEventListener("progress",c)),f&&m.upload&&([a,u]=Ne(f),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(i=t=>{m&&(n(!t||t.type?new Ae(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(i),r.signal&&(r.signal.aborted?i():r.signal.addEventListener("abort",i)));const b=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);b&&-1===me.protocols.indexOf(b)?n(new W("Unsupported protocol "+b+":",W.ERR_BAD_REQUEST,e)):m.send(o||null)})},Me=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,i();const t=e instanceof Error?e:this.reason;r.abort(t instanceof W?t:new Ae(t instanceof Error?t.message:t))}};let s=t&&setTimeout(()=>{s=null,o(new W(`timeout ${t} of ms exceeded`,W.ETIMEDOUT))},t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:a}=r;return a.unsubscribe=()=>J.asap(i),a}};const qe=function*(e,t){let n=e.byteLength;if(!t||n{const o=async function*(e,t){for await(const n of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}}(e))yield*qe(n,t)}(e,t);let s,i=0,a=e=>{s||(s=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return a(),void e.close();let s=r.byteLength;if(n){let e=i+=s;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},{isFunction:ze}=J,He=(({Request:e,Response:t})=>({Request:e,Response:t}))(J.global),{ReadableStream:Ve,TextEncoder:Ye}=J.global,Je=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},We=e=>{e=J.merge.call({skipUndefined:!0},He,e);const{fetch:t,Request:n,Response:r}=e,o=t?ze(t):"function"==typeof fetch,s=ze(n),i=ze(r);if(!o)return!1;const a=o&&ze(Ve),c=o&&("function"==typeof Ye?(u=new Ye,e=>u.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var u;const l=s&&a&&Je(()=>{let e=!1;const t=new n(me.origin,{body:new Ve,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),d=i&&a&&Je(()=>J.isReadableStream(new r("").body)),f={stream:d&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!f[e]&&(f[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new W(`Response type '${e}' is not supported`,W.ERR_NOT_SUPPORT,n)})});return async e=>{let{url:o,method:i,data:a,signal:u,cancelToken:h,timeout:p,onDownloadProgress:m,onUploadProgress:y,responseType:b,headers:g,withCredentials:E="same-origin",fetchOptions:w}=Fe(e),v=t||fetch;b=b?(b+"").toLowerCase():"text";let R=Me([u,h&&h.toAbortSignal()],p),O=null;const _=R&&R.unsubscribe&&(()=>{R.unsubscribe()});let T;try{if(y&&l&&"get"!==i&&"head"!==i&&0!==(T=await(async(e,t)=>{const r=J.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(J.isBlob(e))return e.size;if(J.isSpecCompliantForm(e)){const t=new n(me.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return J.isArrayBufferView(e)||J.isArrayBuffer(e)?e.byteLength:(J.isURLSearchParams(e)&&(e+=""),J.isString(e)?(await c(e)).byteLength:void 0)})(t):r})(g,a))){let e,t=new n(o,{method:"POST",body:a,duplex:"half"});if(J.isFormData(a)&&(e=t.headers.get("content-type"))&&g.setContentType(e),t.body){const[e,n]=Ue(T,Ne(Pe(y)));a=Ke(t.body,65536,e,n)}}J.isString(E)||(E=E?"include":"omit");const t=s&&"credentials"in n.prototype,u={...w,signal:R,method:i.toUpperCase(),headers:g.normalize().toJSON(),body:a,duplex:"half",credentials:t?E:void 0};O=s&&new n(o,u);let h=await(s?v(O,w):v(o,u));const p=d&&("stream"===b||"response"===b);if(d&&(m||p&&_)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=h[t]});const t=J.toFiniteNumber(h.headers.get("content-length")),[n,o]=m&&Ue(t,Ne(Pe(m),!0))||[];h=new r(Ke(h.body,65536,n,()=>{o&&o(),_&&_()}),e)}b=b||"text";let S=await f[J.findKey(f,b)||"text"](h,e);return!p&&_&&_(),await new Promise((t,n)=>{xe(t,n,{data:S,headers:Te.from(h.headers),status:h.status,statusText:h.statusText,config:e,request:O})})}catch(t){if(_&&_(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new W("Network Error",W.ERR_NETWORK,e,O),{cause:t.cause||t});throw W.from(t,t&&t.code,e,O)}}},$e=new Map,Ge=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:o}=t,s=[r,o,n];let i,a,c=s.length,u=$e;for(;c--;)i=s[c],a=u.get(i),void 0===a&&u.set(i,a=c?new Map:We(t)),u=a;return a};Ge();const Xe={http:null,xhr:Ie,fetch:{get:Ge}};J.forEach(Xe,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const Qe=e=>`- ${e}`,Ze=e=>J.isFunction(e)||null===e||!1===e;var et=(e,t)=>{e=J.isArray(e)?e:[e];const{length:n}=e;let r,o;const s={};for(let i=0;i`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new W("There is no suitable adapter to dispatch the request "+(n?e.length>1?"since :\n"+e.map(Qe).join("\n"):" "+Qe(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return o};function tt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ae(null,e)}function nt(e){return tt(e),e.headers=Te.from(e.headers),e.data=Se.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),et(e.adapter||ge.adapter,e)(e).then(function(t){return tt(e),t.data=Se.call(e,e.transformResponse,t),t.headers=Te.from(t.headers),t},function(t){return Ce(t)||(tt(e),t&&t.response&&(t.response.data=Se.call(e,e.transformResponse,t.response),t.response.headers=Te.from(t.response.headers))),Promise.reject(t)})}const rt="1.12.2",ot={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ot[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const st={};ot.transitional=function(e,t,n){function r(e,t){return"[Axios v"+rt+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,s)=>{if(!1===e)throw new W(r(o," has been removed"+(t?" in "+t:"")),W.ERR_DEPRECATED);return t&&!st[o]&&(st[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,s)}},ot.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var it={assertOptions:function(e,t,n){if("object"!=typeof e)throw new W("options must be an object",W.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],i=t[s];if(i){const t=e[s],n=void 0===t||i(t,s,e);if(!0!==n)throw new W("option "+s+" must be "+n,W.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new W("Unknown option "+s,W.ERR_BAD_OPTION)}},validators:ot};const at=it.validators;class ct{constructor(e){this.defaults=e||{},this.interceptors={request:new ae,response:new ae}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Be(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&it.assertOptions(n,{silentJSONParsing:at.transitional(at.boolean),forcedJSONParsing:at.transitional(at.boolean),clarifyTimeoutError:at.transitional(at.boolean)},!1),null!=r&&(J.isFunction(r)?t.paramsSerializer={serialize:r}:it.assertOptions(r,{encode:at.function,serialize:at.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),it.assertOptions(t,{baseUrl:at.spelling("baseURL"),withXsrfToken:at.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&J.merge(o.common,o[t.method]);o&&J.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=Te.concat(s,o);const i=[];let a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,i.unshift(e.fulfilled,e.rejected))});const c=[];let u;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,d=0;if(!a){const e=[nt.bind(this),void 0];for(e.unshift(...i),e.push(...c),l=e.length,u=Promise.resolve(t);d{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new Ae(e,r,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new lt(function(t){e=t}),cancel:e}}}var dt=lt;const ft={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ft).forEach(([e,t])=>{ft[t]=e});var ht=ft;const pt=function e(t){const n=new ut(t),o=r(ut.prototype.request,n);return J.extend(o,ut.prototype,n,{allOwnKeys:!0}),J.extend(o,n,null,{allOwnKeys:!0}),o.create=function(n){return e(Be(t,n))},o}(ge);pt.Axios=ut,pt.CanceledError=Ae,pt.CancelToken=dt,pt.isCancel=Ce,pt.VERSION=rt,pt.toFormData=te,pt.AxiosError=W,pt.Cancel=pt.CanceledError,pt.all=function(e){return Promise.all(e)},pt.spread=function(e){return function(t){return e.apply(null,t)}},pt.isAxiosError=function(e){return J.isObject(e)&&!0===e.isAxiosError},pt.mergeConfig=Be,pt.AxiosHeaders=Te,pt.formToJSON=e=>ye(J.isHTMLForm(e)?new FormData(e):e),pt.getAdapter=et,pt.HttpStatusCode=ht,pt.default=pt,e.exports=pt},457:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=n(94),o=n(473),s=n(149);class i extends r.Invoice{token;url;status;responseText;customer;receiptURL;receipt_identifier;provider_reference;hash;constructor(e){super(e)}async create(){const e=this.asRequestBody();return this.transport.client.post(s.Endpoints.CREATE_INVOICE,e).then(e=>{if(e.data.response_code===s.ResponseCode.success)return this.token=e.data.token,this.url=e.data.response_text,this.getTokenStatus(this.token);throw new o.ResponseError("Failed to create invoice.",e.data)})}async getTokenStatus(e){const t=e||this.token;return this.transport.client.get(`${s.Endpoints.CONFIRM_INVOICE}${t}`).then(e=>{const t=e.data;if(t.response_code===s.ResponseCode.success)return this.status=t.status,this.responseText=t.response_text,this.hash=t?.hash,this.items=t.invoice.items,this.taxes=t.taxes,this.description=t.description,t.actions&&(this.cancelURL=t.actions.cancel_url,this.callbackURL=t.actions.callback_url,this.returnURL=t.actions.return_url),this.totalAmount=t.invoice.total_amount,this.status===s.InvoiceStatus.COMPLETED&&(this.customer=t.customer,this.receiptURL=t.receipt_url,this.receipt_identifier=t.receipt_identifier,this.provider_reference=t.provider_reference,t.custom_data&&Object.keys(t.custom_data).length>0&&(this.customData=t.custom_data)),this.asObject;throw new o.ResponseError("Could not confirm invoice status.",e.data)})}get asObject(){return{token:this.token,url:this.url,status:this.status,hash:this.hash,responseText:this.responseText,customer:this.customer,receiptURL:this.receiptURL,receipt_identifier:this.receipt_identifier,provider_reference:this.provider_reference,customData:this.customData,totalAmount:this.totalAmount}}}t.default=i},473:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResponseError=void 0;class n extends Error{data=void 0;constructor(e,t=void 0){super(e),this.data=t}}t.ResponseError=n},546:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Credentials=t.PaydunyaEnvironment=void 0,function(e){e.LIVE="live",e.TEST="test"}(n||(t.PaydunyaEnvironment=n={})),t.Credentials=class{masterKey;privateKey;publicKey;token;mode;constructor(e){this.masterKey=e.masterKey,this.privateKey=e.privateKey,this.publicKey=e.publicKey,this.token=e.token,this.mode=e.mode}extendRequestConfig(e){return e.headers.set("Content-Type","application/json").set("PAYDUNYA-MASTER-KEY",this.masterKey).set("PAYDUNYA-PRIVATE-KEY",this.privateKey).set("PAYDUNYA-TOKEN",this.token),e}}},568:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PaydunyaClient=void 0;const o=n(928),s=n(641),i=n(224),a=r(n(457)),c=n(423),u=n(546),l=n(94);class d{transport;constructor(e){this.transport=e}get store(){return this.transport.store}set store(e){this.transport.store=e}invoiceInstance(){return new l.Invoice(this.transport)}checkoutInvoiceInstance(){return new a.default(this.transport)}onsiteInvoiceInstance(){return new c.OnsiteInvoice(this.transport)}directpayInstance(){return new i.DirectPay(this.transport)}balanceInstance(){return new o.Balance(this.transport)}static fromCredentialsInstance(e){return new d(new s.Transport(e))}static fromCredentials(e){return new d(new s.Transport(new u.Credentials(e)))}static autoDetect(e=u.PaydunyaEnvironment.LIVE){if(void 0===globalThis.process)throw new Error("Auto detection of credentials is only available in NodeJS environment");return new d(new s.Transport(new u.Credentials({masterKey:process.env.PAYDUNYA_MASTER_KEY||"",privateKey:process.env.PAYDUNYA_PRIVATE_KEY||"",publicKey:process.env.PAYDUNYA_PUBLIC_KEY||"",token:process.env.PAYDUNYA_TOKEN||"",mode:process.env.PAYDUNYA_MODE||e})))}}t.PaydunyaClient=d},641:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Transport=void 0;const o=n(546),s=r(n(425));t.Transport=class{setup;store=void 0;client;constructor(e,t=void 0){this.setup=e,this.store=t,this.client=s.default.create({baseURL:this.baseURL}),this.client.interceptors.request.use(e=>this.setup.extendRequestConfig(e))}get baseURL(){return this.setup.mode===o.PaydunyaEnvironment.TEST?"https://app.paydunya.com/sandbox-api/v1":"https://app.paydunya.com/api/v1"}}},928:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Balance=void 0;const o=r(n(425)),s=n(149);class i{amount;currency;constructor(e,t){this.amount=e,this.currency=t}static parse(e){let[t,n]=e.split(" ");return new i(parseFloat(t||"0"),n?.trim()||"XOF")}}t.Balance=class{transport;axios;constructor(e){this.transport=e,this.axios=o.default.create({baseURL:"https://app.paydunya.com/api/v2"}),this.axios.interceptors.request.use(e=>this.transport.setup.extendRequestConfig(e))}async getAll(){return this.axios.get(s.Endpoints.CHECK_BALANCE).then(e=>{if(e.data.success){let t={};return Object.keys(s.SUPPORTED_COUNTRY_CODES).forEach(n=>{t[n]=i.parse(e.data[`Balance ${n}`])}),t}})}async getBalanceByCountry(e){let t=await this.getAll();if(t&&t[e])return t[e]}async getAccountBalance(e){return this.axios.get(`${s.Endpoints.CHECK_BALANCE}/${e}`).then(e=>{if(e.data.success)return e.data})}}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var s=t[r]={exports:{}};return e[r].call(s.exports,s,s.exports,n),s.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n(568)})(); \ No newline at end of file diff --git a/package.json b/package.json index 66591a0..dcb5011 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "paydunya", - "version": "1.0.13", + "version": "1.1.0", "description": "PAYDUNYA Node.JS Library", "main": "dist/index.js", "types": "dists/index.d.ts", diff --git a/src/lib/index.ts b/src/lib/index.ts index 136566a..4ce3f28 100644 --- a/src/lib/index.ts +++ b/src/lib/index.ts @@ -61,6 +61,9 @@ export class PaydunyaClient { } static autoDetect(mode: PaydunyaEnvironment = PaydunyaEnvironment.LIVE) { + if(globalThis.process === undefined) { + throw new Error("Auto detection of credentials is only available in NodeJS environment"); + } let client = new PaydunyaClient( new Transport( new Credentials({ From 6efc577c887fb92d42046bfc652ef3fdeb41c26c Mon Sep 17 00:00:00 2001 From: Maximilien COMLAN Date: Wed, 15 Oct 2025 22:40:18 +0100 Subject: [PATCH 18/20] updated client and deprecated some calls --- dist/balance.js | 1 - dist/balance.js.map | 1 - dist/constants.js | 1 - dist/constants.js.map | 1 - dist/credentials.js | 1 - dist/credentials.js.map | 1 - dist/direct-pay.js | 1 - dist/direct-pay.js.map | 1 - dist/errors.js | 1 - dist/errors.js.map | 1 - dist/index.d.ts | 13 +++++++++++++ dist/index.js | 28 +++++++++++++++++++++++++++- dist/index.js.map | 1 - dist/invoices/checkout.js | 1 - dist/invoices/checkout.js.map | 1 - dist/invoices/invoice.d.ts | 2 +- dist/invoices/invoice.js | 1 - dist/invoices/invoice.js.map | 1 - dist/invoices/onsite.js | 1 - dist/invoices/onsite.js.map | 1 - dist/paydunya.min.js | 2 +- dist/store.js | 1 - dist/store.js.map | 1 - dist/transport.js | 1 - dist/transport.js.map | 1 - package-lock.json | 8 ++++---- src/lib/index.ts | 16 +++++++++++++++- tsconfig.json | 2 +- 28 files changed, 62 insertions(+), 30 deletions(-) delete mode 100644 dist/balance.js.map delete mode 100644 dist/constants.js.map delete mode 100644 dist/credentials.js.map delete mode 100644 dist/direct-pay.js.map delete mode 100644 dist/errors.js.map delete mode 100644 dist/index.js.map delete mode 100644 dist/invoices/checkout.js.map delete mode 100644 dist/invoices/invoice.js.map delete mode 100644 dist/invoices/onsite.js.map delete mode 100644 dist/store.js.map delete mode 100644 dist/transport.js.map diff --git a/dist/balance.js b/dist/balance.js index 6f6a2d1..8deb204 100644 --- a/dist/balance.js +++ b/dist/balance.js @@ -60,4 +60,3 @@ class Balance { } } exports.Balance = Balance; -//# sourceMappingURL=balance.js.map \ No newline at end of file diff --git a/dist/balance.js.map b/dist/balance.js.map deleted file mode 100644 index 21cb482..0000000 --- a/dist/balance.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"balance.js","sourceRoot":"","sources":["../src/lib/balance.ts"],"names":[],"mappings":";;;;;;AACA,kDAA6C;AAC7C,2CAAiE;AAoBjE,MAAM,KAAK;IACP,MAAM,CAAS;IACf,QAAQ,CAAS;IAEjB,YAAY,MAAc,EAAE,QAAgB;QACxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,KAAa;QACtB,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QACzC,OAAO,IAAI,KAAK,CAAC,UAAU,CAAC,MAAM,IAAI,GAAG,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,KAAK,CAAC,CAAA;IAC1E,CAAC;CACJ;AAED,MAAa,OAAO;IAEhB,SAAS,CAAW;IACpB,KAAK,CAAe;IAEpB,YAAY,SAAoB;QAC5B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,KAAK,GAAG,eAAK,CAAC,MAAM,CAAC;YACtB,OAAO,EAAE,iCAAiC;SAC7C,CAAC,CAAC;QACH,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;YAC3C,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;QAC5D,CAAC,CAAC,CAAA;IACN,CAAC;IAED,KAAK,CAAC,MAAM;QACR,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAgB,qBAAS,CAAC,aAAa,CAAC;aACxD,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;YACb,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;gBAEtB,IAAI,KAAK,GAA8C,EAAE,CAAC;gBAC1D,MAAM,CAAC,IAAI,CAAC,mCAAuB,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;oBACpD,KAAa,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC,KAAK,CAAE,MAAM,CAAC,IAAY,CAAC,WAAW,OAAO,EAAE,CAAC,CAAC,CAAA;gBACrF,CAAC,CAAC,CAAC;gBAEH,OAAO,KAAK,CAAC;YACjB,CAAC;YACD,OAAO,SAAS,CAAC;QACrB,CAAC,CAAC,CAAC;IACX,CAAC;IAED,KAAK,CAAC,mBAAmB,CAAC,OAA6B;QACnD,IAAI,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,EAAE,CAAA;QAChC,IAAI,MAAM,IAAI,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;YAC5B,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC;QAC3B,CAAC;IACL,CAAC;IAED,KAAK,CAAC,iBAAiB,CAAC,OAAe;QACnC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAuB,GAAG,qBAAS,CAAC,aAAa,IAAI,OAAO,EAAE,CAAC;aAC/E,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;YACb,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;gBACtB,OAAO,MAAM,CAAC,IAAI,CAAA;YACtB,CAAC;YACD,OAAO,SAAS,CAAC;QACrB,CAAC,CAAC,CAAC;IACX,CAAC;CAEJ;AAhDD,0BAgDC"} \ No newline at end of file diff --git a/dist/constants.js b/dist/constants.js index 8f2ab4f..ffc9be9 100644 --- a/dist/constants.js +++ b/dist/constants.js @@ -50,4 +50,3 @@ exports.SUPPORTED_COUNTRY_CODES = { ML: "ML", BF: "BF" }; -//# sourceMappingURL=constants.js.map \ No newline at end of file diff --git a/dist/constants.js.map b/dist/constants.js.map deleted file mode 100644 index ee3fe65..0000000 --- a/dist/constants.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/lib/constants.ts"],"names":[],"mappings":";;;AAAA,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,wCAAuB,CAAA;IACvB,wCAAuB,CAAA;IACvB,oCAAmB,CAAA;IACnB,kCAAiB,CAAA;AACnB,CAAC,EALW,aAAa,6BAAb,aAAa,QAKxB;AAED,IAAY,YAEX;AAFD,WAAY,YAAY;IACtB,8BAAc,CAAA;AAChB,CAAC,EAFW,YAAY,4BAAZ,YAAY,QAEvB;AAED,IAAY,SAOX;AAPD,WAAY,SAAS;IACnB,wDAA2C,CAAA;IAC3C,2DAA8C,CAAA;IAC9C,gDAAmC,CAAA;IACnC,gDAAmC,CAAA;IACnC,0DAA6C,CAAA;IAC7C,sDAAyC,CAAA;AAC3C,CAAC,EAPW,SAAS,yBAAT,SAAS,QAOpB;AAED,IAAY,cAmBX;AAnBD,WAAY,cAAc;IACtB,+BAAa,CAAA;IACb,6DAA2C,CAAA;IAC3C,8CAA4B,CAAA;IAC5B,yDAAuC,CAAA;IACvC,4CAA0B,CAAA;IAC1B,kDAAgC,CAAA;IAChC,wCAAsB,CAAA;IACtB,0CAAwB,CAAA;IACxB,mDAAiC,CAAA;IACjC,oCAAkB,CAAA;IAClB,kCAAgB,CAAA;IAChB,oCAAkB,CAAA;IAClB,6CAA2B,CAAA;IAC3B,wCAAsB,CAAA;IACtB,uDAAqC,CAAA;IACrC,oCAAkB,CAAA;IAClB,6DAA2C,CAAA;IAC3C,uDAAqC,CAAA;AACzC,CAAC,EAnBW,cAAc,8BAAd,cAAc,QAmBzB;AAEY,QAAA,uBAAuB,GAAG;IACnC,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;CACF,CAAC"} \ No newline at end of file diff --git a/dist/credentials.js b/dist/credentials.js index 2fa8134..8a56618 100644 --- a/dist/credentials.js +++ b/dist/credentials.js @@ -29,4 +29,3 @@ class Credentials { } } exports.Credentials = Credentials; -//# sourceMappingURL=credentials.js.map \ No newline at end of file diff --git a/dist/credentials.js.map b/dist/credentials.js.map deleted file mode 100644 index e0c485e..0000000 --- a/dist/credentials.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"credentials.js","sourceRoot":"","sources":["../src/lib/credentials.ts"],"names":[],"mappings":";;;AAEA,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC3B,oCAAa,CAAA;IACb,oCAAa,CAAA;AACjB,CAAC,EAHW,mBAAmB,mCAAnB,mBAAmB,QAG9B;AAUD,MAAa,WAAW;IACpB,SAAS,CAAQ;IACjB,UAAU,CAAQ;IAClB,SAAS,CAAQ;IACjB,KAAK,CAAQ;IACb,IAAI,CAAqB;IAEzB,YAAY,OAA0B;QAClC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QACrC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAC7B,CAAC;IAED,mBAAmB,CAAC,MAAkC;QAClD,MAAM,CAAC,OAAO;aACT,GAAG,CAAC,cAAc,EAAE,kBAAkB,CAAC;aACvC,GAAG,CAAC,qBAAqB,EAAE,IAAI,CAAC,SAAS,CAAC;aAC1C,GAAG,CAAC,sBAAsB,EAAE,IAAI,CAAC,UAAU,CAAC;aAC5C,GAAG,CAAC,gBAAgB,EAAE,IAAI,CAAC,KAAK,CAAC,CAAA;QAEtC,OAAO,MAAM,CAAA;IACjB,CAAC;CAEJ;AAzBD,kCAyBC"} \ No newline at end of file diff --git a/dist/direct-pay.js b/dist/direct-pay.js index 9382ef1..318e764 100644 --- a/dist/direct-pay.js +++ b/dist/direct-pay.js @@ -45,4 +45,3 @@ class DirectPay { } } exports.DirectPay = DirectPay; -//# sourceMappingURL=direct-pay.js.map \ No newline at end of file diff --git a/dist/direct-pay.js.map b/dist/direct-pay.js.map deleted file mode 100644 index f643307..0000000 --- a/dist/direct-pay.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"direct-pay.js","sourceRoot":"","sources":["../src/lib/direct-pay.ts"],"names":[],"mappings":";;;AACA,qCAAyC;AACzC,2CAAsD;AAEtD;;;GAGG;AACH,MAAa,SAAS;IACZ,SAAS,CAAY;IAEtB,YAAY,CAAU;IACtB,WAAW,CAAU;IACrB,aAAa,CAAU;IAE9B,YAAY,SAAoB;QAC9B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,aAAa,CAAC,OAAe,EAAE,MAAc;QACjD,MAAM,IAAI,GAAG;YACX,aAAa,EAAE,OAAO;YACtB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;SACvB,CAAC;QACF,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,qBAAS,CAAC,cAAc,EAAE,IAAI,CAAC;aAC9D,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;YACZ,IAAI,GAAG,CAAC,IAAI,CAAC,aAAa,KAAK,wBAAY,CAAC,OAAO,EAAE,CAAC;gBACpD,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC;gBAC3C,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC;gBACxC,IAAI,CAAC,aAAa,GAAG,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC;gBAC7C,OAAO;oBACL,YAAY,EAAE,IAAI,CAAC,YAAY;oBAC/B,WAAW,EAAE,IAAI,CAAC,WAAW;oBAC7B,aAAa,EAAE,IAAI,CAAC,aAAa;iBAClC,CAAA;YACH,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,GAAG,IAAI,sBAAa,CACzB,2CAA2C,OAAO,QAAQ,MAAM,2CAA2C,EAC3G,GAAG,CAAC,IAAI,CACT,CAAC;gBACF,MAAM,CAAC,CAAC;YACV,CAAC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;CACF;AAzCD,8BAyCC"} \ No newline at end of file diff --git a/dist/errors.js b/dist/errors.js index e39bd2e..8aadb71 100644 --- a/dist/errors.js +++ b/dist/errors.js @@ -9,4 +9,3 @@ class ResponseError extends Error { } } exports.ResponseError = ResponseError; -//# sourceMappingURL=errors.js.map \ No newline at end of file diff --git a/dist/errors.js.map b/dist/errors.js.map deleted file mode 100644 index 1ebd9e7..0000000 --- a/dist/errors.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/lib/errors.ts"],"names":[],"mappings":";;;AAAA,MAAa,aAA2B,SAAQ,KAAK;IACjD,IAAI,GAAkB,SAAS,CAAA;IAE/B,YAAY,OAAe,EAAE,OAAsB,SAAS;QACxD,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;CACJ;AAPD,sCAOC"} \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts index 7e8bd1a..babc29f 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -13,10 +13,23 @@ export declare class PaydunyaClient { set store(store: Store); invoiceInstance(): Invoice; checkoutInvoiceInstance(): CheckoutInvoice; + /** + * @deprecated - OnsiteInvoice endpoint seems to be deprecated + */ onsiteInvoiceInstance(): OnsiteInvoice; + /** + * @deprecated - Direct Pay endpoint seems to be deprecated + */ directpayInstance(): DirectPay; balanceInstance(): Balance; static fromCredentialsInstance(credentials: Credentials): PaydunyaClient; static fromCredentials(params: ConstructorParameters[0]): PaydunyaClient; static autoDetect(mode?: PaydunyaEnvironment): PaydunyaClient; } +export * from "./balance"; +export * from "./credentials"; +export * from "./errors"; +export * from "./invoices/checkout"; +export * from "./invoices/invoice"; +export * from "./store"; +export * from "./transport"; diff --git a/dist/index.js b/dist/index.js index 9d8ce28..bbac71f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,4 +1,18 @@ "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; @@ -28,9 +42,15 @@ class PaydunyaClient { checkoutInvoiceInstance() { return new checkout_1.default(this.transport); } + /** + * @deprecated - OnsiteInvoice endpoint seems to be deprecated + */ onsiteInvoiceInstance() { return new onsite_1.OnsiteInvoice(this.transport); } + /** + * @deprecated - Direct Pay endpoint seems to be deprecated + */ directpayInstance() { return new direct_pay_1.DirectPay(this.transport); } @@ -60,4 +80,10 @@ class PaydunyaClient { } } exports.PaydunyaClient = PaydunyaClient; -//# sourceMappingURL=index.js.map \ No newline at end of file +__exportStar(require("./balance"), exports); +__exportStar(require("./credentials"), exports); +__exportStar(require("./errors"), exports); +__exportStar(require("./invoices/checkout"), exports); +__exportStar(require("./invoices/invoice"), exports); +__exportStar(require("./store"), exports); +__exportStar(require("./transport"), exports); diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 0acf9b4..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":";;;;;;AAAA,uCAAoC;AACpC,2CAAwC;AACxC,6CAAyC;AACzC,mEAAkD;AAClD,8CAAkD;AAClD,+CAAiE;AAEjE,gDAA6C;AAE7C,MAAa,cAAc;IACvB,SAAS,CAAY;IAErB,YAAY,SAAoB;QAC5B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC/B,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;IAChC,CAAC;IAED,IAAI,KAAK,CAAC,KAAY;QAClB,IAAI,CAAC,SAAS,CAAC,KAAK,GAAG,KAAK,CAAC;IACjC,CAAC;IAED,eAAe;QACX,OAAO,IAAI,iBAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACvC,CAAC;IAED,uBAAuB;QACnB,OAAO,IAAI,kBAAe,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC/C,CAAC;IAED,qBAAqB;QACjB,OAAO,IAAI,sBAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC7C,CAAC;IAED,iBAAiB;QACb,OAAO,IAAI,sBAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACzC,CAAC;IAED,eAAe;QACX,OAAO,IAAI,iBAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACvC,CAAC;IAED,MAAM,CAAC,uBAAuB,CAAC,WAAwB;QACnD,IAAI,MAAM,GAAG,IAAI,cAAc,CAC3B,IAAI,qBAAS,CACT,WAAW,CACd,CACJ,CAAA;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,MAAM,CAAC,eAAe,CAAC,MAAoD;QACvE,IAAI,MAAM,GAAG,IAAI,cAAc,CAC3B,IAAI,qBAAS,CACT,IAAI,yBAAW,CAAC,MAAM,CAAC,CAC1B,CACJ,CAAA;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,OAA4B,iCAAmB,CAAC,IAAI;QAClE,IAAG,UAAU,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;YAClC,MAAM,IAAI,KAAK,CAAC,uEAAuE,CAAC,CAAC;QAC7F,CAAC;QACD,IAAI,MAAM,GAAG,IAAI,cAAc,CAC3B,IAAI,qBAAS,CACT,IAAI,yBAAW,CAAC;YACZ,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,EAAE;YAChD,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,EAAE;YAClD,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,EAAE;YAChD,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,EAAE;YACvC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,IAAI,CAAwB;SACnE,CAAC,CACL,CACJ,CAAA;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;CAEJ;AAvED,wCAuEC"} \ No newline at end of file diff --git a/dist/invoices/checkout.js b/dist/invoices/checkout.js index 68ae758..028f41a 100644 --- a/dist/invoices/checkout.js +++ b/dist/invoices/checkout.js @@ -92,4 +92,3 @@ class CheckoutInvoice extends invoice_1.Invoice { } } exports.default = CheckoutInvoice; -//# sourceMappingURL=checkout.js.map \ No newline at end of file diff --git a/dist/invoices/checkout.js.map b/dist/invoices/checkout.js.map deleted file mode 100644 index b9de52b..0000000 --- a/dist/invoices/checkout.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"checkout.js","sourceRoot":"","sources":["../../src/lib/invoices/checkout.ts"],"names":[],"mappings":";;AAAA,uCAAoC;AAEpC,sCAA0C;AAC1C,4CAAsE;AAGtE,MAAqB,eAAgB,SAAQ,iBAAO;IAClD,KAAK,CAAU;IACf,GAAG,CAAU;IACb,MAAM,CAAU;IAChB,YAAY,CAAU;IACtB,QAAQ,CAAO;IACf,UAAU,CAAU;IACpB,kBAAkB,CAAU;IAC5B,kBAAkB,CAAU;IAC5B,IAAI,CAAU;IAGd,YAAY,MAAiB;QAC3B,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM;QACV,MAAM,WAAW,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;QAEzC,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM;aACzB,IAAI,CAAC,qBAAS,CAAC,cAAc,EAAE,WAAW,CAAC;aAC3C,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;YACZ,IAAI,GAAG,CAAC,IAAI,CAAC,aAAa,KAAK,wBAAY,CAAC,OAAO,EAAE,CAAC;gBACpD,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;gBAC5B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC;gBAClC,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACzC,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,GAAG,IAAI,sBAAa,CAAC,2BAA2B,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;gBACnE,MAAM,CAAC,CAAC;YACV,CAAC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,cAAc,CAAC,UAAmB;QACtC,MAAM,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;QACnD,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM;aACzB,GAAG,CAAC,GAAG,qBAAS,CAAC,eAAe,GAAG,KAAK,EAAE,CAAC;aAC3C,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;YACZ,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;YAEtB,IAAI,IAAI,CAAC,aAAa,KAAK,wBAAY,CAAC,OAAO,EAAE,CAAC;gBAChD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;gBAC1B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC;gBAEvC,IAAI,CAAC,IAAI,GAAG,IAAI,EAAE,IAAI,CAAC;gBACvB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;gBAChC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;gBACxB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;gBAEpC,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;oBACjB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;oBACzC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC;oBAC7C,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;gBAC3C,CAAC;gBAED,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC;gBAE7C,IAAI,IAAI,CAAC,MAAM,KAAK,yBAAa,CAAC,SAAS,EAAE,CAAC;oBAC5C,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;oBAC9B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC;oBACnC,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,CAAC;oBAClD,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,CAAC;oBAClD,IAAI,IAAI,CAAC,WAAW,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;wBACjE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC;oBACrC,CAAC;gBACH,CAAC;gBAED,OAAO,IAAI,CAAC,QAAQ,CAAC;YACvB,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,GAAG,IAAI,sBAAa,CACzB,mCAAmC,EACnC,GAAG,CAAC,IAAI,CACT,CAAC;gBACF,MAAM,CAAC,CAAC;YACV,CAAC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;IAED,IAAI,QAAQ;QACV,OAAO;YACL,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;YAC3C,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;YAC3C,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAA;IACH,CAAC;CACF;AApGD,kCAoGC"} \ No newline at end of file diff --git a/dist/invoices/invoice.d.ts b/dist/invoices/invoice.d.ts index 70014d7..009057f 100644 --- a/dist/invoices/invoice.d.ts +++ b/dist/invoices/invoice.d.ts @@ -36,7 +36,7 @@ export declare class Invoice { channels: PaymentChannel[]; totalAmount: number; constructor(transport: Transport); - get store(): import("../store").Store | undefined; + get store(): import("..").Store | undefined; /** * Add an item to invoice * @param {string} name diff --git a/dist/invoices/invoice.js b/dist/invoices/invoice.js index 29f9376..e18db6e 100644 --- a/dist/invoices/invoice.js +++ b/dist/invoices/invoice.js @@ -133,4 +133,3 @@ class Invoice { } } exports.Invoice = Invoice; -//# sourceMappingURL=invoice.js.map \ No newline at end of file diff --git a/dist/invoices/invoice.js.map b/dist/invoices/invoice.js.map deleted file mode 100644 index 705c6e8..0000000 --- a/dist/invoices/invoice.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"invoice.js","sourceRoot":"","sources":["../../src/lib/invoices/invoice.ts"],"names":[],"mappings":";;;AAyBA;;;;GAIG;AACH,MAAa,OAAO;IAClB,SAAS,CAAY;IACrB,SAAS,CAAU;IACnB,SAAS,CAAU;IACnB,WAAW,CAAU;IAErB,WAAW,CAAS;IACpB,KAAK,CAA8B;IACnC,UAAU,CAAsB;IAChC,KAAK,CAA6B;IAClC,QAAQ,CAAmB;IAC3B,WAAW,CAAS;IAEpB,YAAY,SAAoB;QAC9B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAE3B,IAAI,SAAS,CAAC,KAAK,EAAE,UAAU;YAAE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC,KAAM,CAAC,UAAU,CAAC;QAC9E,IAAI,SAAS,CAAC,KAAK,EAAE,UAAU;YAAE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC,KAAM,CAAC,UAAU,CAAC;QAC9E,IAAI,SAAS,CAAC,KAAK,EAAE,YAAY;YAC/B,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC,KAAM,CAAC,YAAY,CAAC;QAEnD,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC;IACvB,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;IAC9B,CAAC;IAED;;;;;;;OAOG;IACH,OAAO,CACL,IAAY,EACZ,QAAiB,EACjB,SAAkB,EAClB,UAAmB,EACnB,WAAoB;QAEpB,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;QACpD,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,QAAQ,CAAC,GAAG;YAC/B,IAAI,EAAE,IAAI;YACV,QAAQ,EAAE,QAAQ,IAAI,CAAC;YACvB,UAAU,EAAE,SAAS,IAAI,CAAC;YAC1B,WAAW,EAAE,UAAU,IAAI,CAAC;SAC7B,CAAC;QACF,IAAI,WAAW;YAAE,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,QAAQ,CAAE,CAAC,WAAW,GAAG,WAAW,CAAC;QAE3E,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,IAAY,EAAE,MAAc;QACjC,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;QACpD,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,QAAQ,CAAC,GAAG;YAC9B,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;SACvB,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;OAGG;IACH,UAAU,CAAC,OAAuB;QAChC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;OAGG;IACH,WAAW,CAAC,WAA6B,EAAE;QACzC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACzC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAE,CAAC,CAAC;QACnC,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,aAAa,CAAC,KAAa,EAAE,KAAa;QACxC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;QAC/B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;OAGG;IACH,aAAa;QACX,IAAI,IAAI,CAAC,WAAW,IAAI,CAAC;YACvB,MAAM,IAAI,KAAK,CACb,gHAAgH,CACjH,CAAC;QAEJ,MAAM,IAAI,GAAG;YACX,OAAO,EAAE;gBACP,YAAY,EAAE,IAAI,CAAC,WAAW;aAChB;YAChB,OAAO,EAAE,SAAgB;YACzB,WAAW,EAAE,SAA4C;YACzD,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ;SAC5B,CAAC;QAEF,IAAI,IAAI,CAAC,WAAW;YAAE,IAAI,CAAC,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QAClE,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,GAAG,CAAC;YACvC,IAAI,CAAC,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QACxC,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC;YAAE,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACxE,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACzD,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;YAClB,IAAI,IAAI,CAAC,SAAS;gBAAE,IAAI,CAAC,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC;YAC7D,IAAI,IAAI,CAAC,SAAS;gBAAE,IAAI,CAAC,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC;YAC7D,IAAI,IAAI,CAAC,WAAW;gBAAE,IAAI,CAAC,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC;QACrE,CAAC;QACD,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC;YAAE,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACxE,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,CAAC;YACzC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC;QAErC,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA5ID,0BA4IC"} \ No newline at end of file diff --git a/dist/invoices/onsite.js b/dist/invoices/onsite.js index ae1c2d6..344e8b1 100644 --- a/dist/invoices/onsite.js +++ b/dist/invoices/onsite.js @@ -74,4 +74,3 @@ class OnsiteInvoice extends invoice_1.Invoice { } } exports.OnsiteInvoice = OnsiteInvoice; -//# sourceMappingURL=onsite.js.map \ No newline at end of file diff --git a/dist/invoices/onsite.js.map b/dist/invoices/onsite.js.map deleted file mode 100644 index 9c2f6b1..0000000 --- a/dist/invoices/onsite.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"onsite.js","sourceRoot":"","sources":["../../src/lib/invoices/onsite.ts"],"names":[],"mappings":";;;AACA,4CAAuD;AACvD,sCAA0C;AAC1C,uCAAoC;AAEpC;;;GAGG;AACH,MAAa,aAAc,SAAQ,iBAAO;IACxC,KAAK,CAAU;IACf,QAAQ,CAAU;IAClB,YAAY,CAAU;IACtB,MAAM,CAAU;IAChB,UAAU,CAAU;IACpB,QAAQ,CAAO;IAEf,YAAY,SAAoB;QAC9B,KAAK,CAAC,SAAS,CAAC,CAAC;IACnB,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,MAAM,CAAC,QAAgB;QAC3B,IAAI,IAAI,GAAG;YACT,YAAY,EAAE,IAAI,CAAC,aAAa,EAAE;YAClC,QAAQ,EAAE;gBACR,aAAa,EAAE,QAAQ;aACxB;SACF,CAAC;QACF,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM;aACzB,IAAI,CAAC,qBAAS,CAAC,mBAAmB,EAAE,IAAI,CAAC;aACzC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;YACjB,IAAI,QAAQ,CAAC,IAAI,EAAE,aAAa,KAAK,wBAAY,CAAC,OAAO,EAAE,CAAC;gBAC1D,OAAO;oBACL,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,aAAa;oBAClC,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK;oBAC7B,YAAY,EAAE,QAAQ,CAAC,IAAI,CAAC,WAAW;iBACxC,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,IAAI,KAAK,GAAG,IAAI,sBAAa,CAC3B,0BAA0B,EAC1B,QAAQ,CAAC,IAAI,CACd,CAAC;gBACF,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,YAAoB;QACjD,IAAI,IAAI,GAAG;YACT,KAAK,EAAE,QAAQ;YACf,aAAa,EAAE,YAAY;SAC5B,CAAC;QAEF,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM;aACzB,IAAI,CAAC,qBAAS,CAAC,mBAAmB,EAAE,IAAI,CAAC;aACzC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;YACjB,IAAI,QAAQ,CAAC,IAAI,EAAE,aAAa,KAAK,wBAAY,CAAC,OAAO,EAAE,CAAC;gBAC1D,OAAO;oBACL,YAAY,EAAE,QAAQ,CAAC,IAAI,CAAC,aAAa;oBACzC,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM;oBACzC,UAAU,EAAE,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,WAAW;oBAClD,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ;iBAC9C,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,IAAI,KAAK,GAAG,IAAI,sBAAa,CAC3B,kEAAkE,EAClE,QAAQ,CAAC,IAAI,CACd,CAAC;gBACF,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;CACF;AAxED,sCAwEC"} \ No newline at end of file diff --git a/dist/paydunya.min.js b/dist/paydunya.min.js index 23652a9..2d43db4 100644 --- a/dist/paydunya.min.js +++ b/dist/paydunya.min.js @@ -1,2 +1,2 @@ /*! For license information please see paydunya.min.js.LICENSE.txt */ -(()=>{"use strict";var e={94:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Invoice=void 0,t.Invoice=class{transport;returnURL;cancelURL;callbackURL;description;items;customData;taxes;channels;totalAmount;constructor(e){this.transport=e,e.store?.return_url&&(this.returnURL=e.store.return_url),e.store?.cancel_url&&(this.cancelURL=e.store.cancel_url),e.store?.callback_url&&(this.callbackURL=e.store.callback_url),this.description="",this.items={},this.customData={},this.taxes={},this.channels=[],this.totalAmount=0}get store(){return this.transport.store}addItem(e,t,n,r,o){const s=Object.keys(this.items).length+1;return this.items["item_"+s]={name:e,quantity:t||0,unit_price:n||0,total_price:r||0},o&&(this.items["item_"+s].description=o),this}addTax(e,t){const n=Object.keys(this.taxes).length+1;return this.taxes["tax_"+n]={name:e,amount:Number(t)},this}addChannel(e){return this.channels.push(e),this}addChannels(e=[]){for(let t=0;t0&&(e.invoice.channels=this.channels),Object.keys(this.items).length>0&&(e.invoice.items=this.items),(this.returnURL||this.cancelURL||this.callbackURL)&&(e.actions={},this.returnURL&&(e.actions.return_url=this.returnURL),this.cancelURL&&(e.actions.cancel_url=this.cancelURL),this.callbackURL&&(e.actions.callback_url=this.callbackURL)),Object.keys(this.taxes).length>0&&(e.invoice.taxes=this.taxes),Object.keys(this.customData).length>0&&(e.custom_data=this.customData),e}}},149:(e,t)=>{var n,r,o,s;Object.defineProperty(t,"__esModule",{value:!0}),t.SUPPORTED_COUNTRY_CODES=t.PaymentChannel=t.Endpoints=t.ResponseCode=t.InvoiceStatus=void 0,function(e){e.COMPLETED="completed",e.CANCELLED="cancelled",e.PENDING="pending",e.FAILED="failed"}(n||(t.InvoiceStatus=n={})),function(e){e.success="00"}(r||(t.ResponseCode=r={})),function(e){e.CREATE_INVOICE="/checkout-invoice/create",e.CONFIRM_INVOICE="/checkout-invoice/confirm/",e.CREATE_ONSITEINVOCE="/opr/create",e.CHARGE_ONSITEINVOCE="/opr/charge",e.CREDIT_ACCOUNT="/direct-pay/credit-account",e.CHECK_BALANCE="/disburse/check-balance"}(o||(t.Endpoints=o={})),function(e){e.Card="card",e.OrangeMoneySenegal="orange-money-senegal",e.WaveSenegal="wave-senegal",e.FreeMoneySenegal="free-money-senegal",e.ExpressoSn="expresso-sn",e.WizallSenegal="wizall-senegal",e.MtnBenin="mtn-benin",e.MoovBenin="moov-benin",e.OrangeMoneyCi="orange-money-ci",e.WaveCi="wave-ci",e.MtnCi="mtn-ci",e.MoovCi="moov-ci",e.TMoneyTogo="t-money-togo",e.MoovTogo="moov-togo",e.OrangeMoneyMali="orange-money-mali",e.MoovMl="moov-ml",e.OrangeMoneyBurkina="orange-money-burkina",e.MoovBurkinaFaso="moov-burkina-faso"}(s||(t.PaymentChannel=s={})),t.SUPPORTED_COUNTRY_CODES={SN:"SN",CI:"CI",BJ:"BJ",TG:"TG",ML:"ML",BF:"BF"}},224:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DirectPay=void 0;const r=n(473),o=n(149);t.DirectPay=class{transport;responseText;description;transactionID;constructor(e){this.transport=e}async creditAccount(e,t){const n={account_alias:e,amount:Number(t)};return this.transport.client.post(o.Endpoints.CREDIT_ACCOUNT,n).then(n=>{if(n.data.response_code===o.ResponseCode.success)return this.responseText=n.data.response_text,this.description=n.data.description,this.transactionID=n.data.transaction_id,{responseText:this.responseText,description:this.description,transactionID:this.transactionID};throw new r.ResponseError(`Failed to credit account. Please ensure ${e} and ${t} are valid OR check your account balance.`,n.data)})}}},423:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OnsiteInvoice=void 0;const r=n(149),o=n(473),s=n(94);class i extends s.Invoice{token;oprToken;responseText;status;receiptURL;customer;constructor(e){super(e)}async create(e){let t={invoice_data:this.asRequestBody(),opr_data:{account_alias:e}};return this.transport.client.post(r.Endpoints.CREATE_ONSITEINVOCE,t).then(e=>{if(e.data?.response_code===r.ResponseCode.success)return{token:e.data.invoice_token,oprToken:e.data.token,responseText:e.data.description};throw new o.ResponseError("Failed to create invoice",e.data)})}async charge(e,t){let n={token:e,confirm_token:t};return this.transport.client.post(r.Endpoints.CHARGE_ONSITEINVOCE,n).then(e=>{if(e.data?.response_code===r.ResponseCode.success)return{responseText:e.data.response_text,status:e.data.invoice_data.status,receiptURL:e.data.invoice_data.receipt_url,customer:e.data.invoice_data.customer};throw new o.ResponseError("Failed to charge invoice. Check OPR/confirm token and try again.",e.data)})}}t.OnsiteInvoice=i},425:(e,t,n)=>{function r(e,t){return function(){return e.apply(t,arguments)}}const{toString:o}=Object.prototype,{getPrototypeOf:s}=Object,{iterator:i,toStringTag:a}=Symbol,c=(u=Object.create(null),e=>{const t=o.call(e);return u[t]||(u[t]=t.slice(8,-1).toLowerCase())});var u;const l=e=>(e=e.toLowerCase(),t=>c(t)===e),d=e=>t=>typeof t===e,{isArray:f}=Array,h=d("undefined");function p(e){return null!==e&&!h(e)&&null!==e.constructor&&!h(e.constructor)&&b(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const m=l("ArrayBuffer"),y=d("string"),b=d("function"),g=d("number"),E=e=>null!==e&&"object"==typeof e,w=e=>{if("object"!==c(e))return!1;const t=s(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||a in e||i in e)},v=l("Date"),R=l("File"),O=l("Blob"),_=l("FileList"),T=l("URLSearchParams"),[S,C,A,x]=["ReadableStream","Request","Response","Headers"].map(l);function N(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),f(e))for(r=0,o=e.length;r0;)if(r=n[o],t===r.toLowerCase())return r;return null}const P="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,k=e=>!h(e)&&e!==P,j=(L="undefined"!=typeof Uint8Array&&s(Uint8Array),e=>L&&e instanceof L);var L;const D=l("HTMLFormElement"),B=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),F=l("RegExp"),I=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};N(n,(n,o)=>{let s;!1!==(s=t(n,o,e))&&(r[o]=s||n)}),Object.defineProperties(e,r)},M=l("AsyncFunction"),q=(K="function"==typeof setImmediate,z=b(P.postMessage),K?setImmediate:z?(H=`axios@${Math.random()}`,V=[],P.addEventListener("message",({source:e,data:t})=>{e===P&&t===H&&V.length&&V.shift()()},!1),e=>{V.push(e),P.postMessage(H,"*")}):e=>setTimeout(e));var K,z,H,V;const Y="undefined"!=typeof queueMicrotask?queueMicrotask.bind(P):"undefined"!=typeof process&&process.nextTick||q;var J={isArray:f,isArrayBuffer:m,isBuffer:p,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||b(e.append)&&("formdata"===(t=c(e))||"object"===t&&b(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&m(e.buffer),t},isString:y,isNumber:g,isBoolean:e=>!0===e||!1===e,isObject:E,isPlainObject:w,isEmptyObject:e=>{if(!E(e)||p(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:S,isRequest:C,isResponse:A,isHeaders:x,isUndefined:h,isDate:v,isFile:R,isBlob:O,isRegExp:F,isFunction:b,isStream:e=>E(e)&&b(e.pipe),isURLSearchParams:T,isTypedArray:j,isFileList:_,forEach:N,merge:function e(){const{caseless:t,skipUndefined:n}=k(this)&&this||{},r={},o=(o,s)=>{const i=t&&U(r,s)||s;w(r[i])&&w(o)?r[i]=e(r[i],o):w(o)?r[i]=e({},o):f(o)?r[i]=o.slice():n&&h(o)||(r[i]=o)};for(let e=0,t=arguments.length;e(N(t,(t,o)=>{n&&b(t)?e[o]=r(t,n):e[o]=t},{allOwnKeys:o}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,a;const c={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],r&&!r(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==n&&s(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:c,kindOfTest:l,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(f(e))return e;let t=e.length;if(!g(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[i]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:D,hasOwnProperty:B,hasOwnProp:B,reduceDescriptors:I,freezeMethods:e=>{I(e,(t,n)=>{if(b(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];b(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return f(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:U,global:P,isContextDefined:k,isSpecCompliantForm:function(e){return!!(e&&b(e.append)&&"FormData"===e[a]&&e[i])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(E(e)){if(t.indexOf(e)>=0)return;if(p(e))return e;if(!("toJSON"in e)){t[r]=e;const o=f(e)?[]:{};return N(e,(e,t)=>{const s=n(e,r+1);!h(s)&&(o[t]=s)}),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:M,isThenable:e=>e&&(E(e)||b(e))&&b(e.then)&&b(e.catch),setImmediate:q,asap:Y,isIterable:e=>null!=e&&b(e[i])};function W(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}J.inherits(W,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:J.toJSONObject(this.config),code:this.code,status:this.status}}});const $=W.prototype,G={};function X(e){return J.isPlainObject(e)||J.isArray(e)}function Q(e){return J.endsWith(e,"[]")?e.slice(0,-2):e}function Z(e,t,n){return e?e.concat(t).map(function(e,t){return e=Q(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{G[e]={value:e}}),Object.defineProperties(W,G),Object.defineProperty($,"isAxiosError",{value:!0}),W.from=(e,t,n,r,o,s)=>{const i=Object.create($);J.toFlatObject(e,i,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const a=e&&e.message?e.message:"Error",c=null==t&&e?e.code:t;return W.call(i,a,c,n,r,o),e&&null==i.cause&&Object.defineProperty(i,"cause",{value:e,configurable:!0}),i.name=e&&e.name||"Error",s&&Object.assign(i,s),i};const ee=J.toFlatObject(J,{},null,function(e){return/^is[A-Z]/.test(e)});function te(e,t,n){if(!J.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=J.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!J.isUndefined(t[e])})).metaTokens,o=n.visitor||u,s=n.dots,i=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&J.isSpecCompliantForm(t);if(!J.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(J.isDate(e))return e.toISOString();if(J.isBoolean(e))return e.toString();if(!a&&J.isBlob(e))throw new W("Blob is not supported. Use a Buffer instead.");return J.isArrayBuffer(e)||J.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let a=e;if(e&&!o&&"object"==typeof e)if(J.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(J.isArray(e)&&function(e){return J.isArray(e)&&!e.some(X)}(e)||(J.isFileList(e)||J.endsWith(n,"[]"))&&(a=J.toArray(e)))return n=Q(n),a.forEach(function(e,r){!J.isUndefined(e)&&null!==e&&t.append(!0===i?Z([n],r,s):null===i?n:n+"[]",c(e))}),!1;return!!X(e)||(t.append(Z(o,n,s),c(e)),!1)}const l=[],d=Object.assign(ee,{defaultVisitor:u,convertValue:c,isVisitable:X});if(!J.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!J.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),J.forEach(n,function(n,s){!0===(!(J.isUndefined(n)||null===n)&&o.call(t,n,J.isString(s)?s.trim():s,r,d))&&e(n,r?r.concat(s):[s])}),l.pop()}}(e),t}function ne(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function re(e,t){this._pairs=[],e&&te(e,this,t)}const oe=re.prototype;function se(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ie(e,t,n){if(!t)return e;const r=n&&n.encode||se;J.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let s;if(s=o?o(t,n):J.isURLSearchParams(t)?t.toString():new re(t,n).toString(r),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}oe.append=function(e,t){this._pairs.push([e,t])},oe.toString=function(e){const t=e?function(t){return e.call(this,t,ne)}:ne;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var ae=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){J.forEach(this.handlers,function(t){null!==t&&e(t)})}},ce={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ue={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:re,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const le="undefined"!=typeof window&&"undefined"!=typeof document,de="object"==typeof navigator&&navigator||void 0,fe=le&&(!de||["ReactNative","NativeScript","NS"].indexOf(de.product)<0),he="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,pe=le&&window.location.href||"http://localhost";var me={...Object.freeze({__proto__:null,hasBrowserEnv:le,hasStandardBrowserWebWorkerEnv:he,hasStandardBrowserEnv:fe,navigator:de,origin:pe}),...ue};function ye(e){function t(e,n,r,o){let s=e[o++];if("__proto__"===s)return!0;const i=Number.isFinite(+s),a=o>=e.length;return s=!s&&J.isArray(r)?r.length:s,a?(J.hasOwnProp(r,s)?r[s]=[r[s],n]:r[s]=n,!i):(r[s]&&J.isObject(r[s])||(r[s]=[]),t(e,n,r[s],o)&&J.isArray(r[s])&&(r[s]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r{t(function(e){return J.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null}const be={transitional:ce,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=J.isObject(e);if(o&&J.isHTMLForm(e)&&(e=new FormData(e)),J.isFormData(e))return r?JSON.stringify(ye(e)):e;if(J.isArrayBuffer(e)||J.isBuffer(e)||J.isStream(e)||J.isFile(e)||J.isBlob(e)||J.isReadableStream(e))return e;if(J.isArrayBufferView(e))return e.buffer;if(J.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return te(e,new me.classes.URLSearchParams,{visitor:function(e,t,n,r){return me.isNode&&J.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((s=J.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return te(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e){if(J.isString(e))try{return(0,JSON.parse)(e),J.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||be.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(J.isResponse(e)||J.isReadableStream(e))return e;if(e&&J.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw W.from(e,W.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:me.classes.FormData,Blob:me.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};J.forEach(["delete","get","head","post","put","patch"],e=>{be.headers[e]={}});var ge=be;const Ee=J.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),we=Symbol("internals");function ve(e){return e&&String(e).trim().toLowerCase()}function Re(e){return!1===e||null==e?e:J.isArray(e)?e.map(Re):String(e)}function Oe(e,t,n,r,o){return J.isFunction(r)?r.call(this,t,n):(o&&(t=n),J.isString(t)?J.isString(r)?-1!==t.indexOf(r):J.isRegExp(r)?r.test(t):void 0:void 0)}class _e{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=ve(t);if(!o)throw new Error("header name must be a non-empty string");const s=J.findKey(r,o);(!s||void 0===r[s]||!0===n||void 0===n&&!1!==r[s])&&(r[s||t]=Re(e))}const s=(e,t)=>J.forEach(e,(e,n)=>o(e,n,t));if(J.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(J.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&Ee[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(J.isObject(e)&&J.isIterable(e)){let n,r,o={};for(const t of e){if(!J.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[r=t[0]]=(n=o[r])?J.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}s(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=ve(e)){const n=J.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(J.isFunction(t))return t.call(this,e,n);if(J.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ve(e)){const n=J.findKey(this,e);return!(!n||void 0===this[n]||t&&!Oe(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=ve(e)){const o=J.findKey(n,e);!o||t&&!Oe(0,n[o],o,t)||(delete n[o],r=!0)}}return J.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!Oe(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return J.forEach(this,(r,o)=>{const s=J.findKey(n,o);if(s)return t[s]=Re(r),void delete t[o];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();i!==o&&delete t[o],t[i]=Re(r),n[i]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return J.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&J.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[we]=this[we]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=ve(e);t[r]||(function(e,t){const n=J.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return J.isArray(e)?e.forEach(r):r(e),this}}_e.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),J.reduceDescriptors(_e.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),J.freezeMethods(_e);var Te=_e;function Se(e,t){const n=this||ge,r=t||n,o=Te.from(r.headers);let s=r.data;return J.forEach(e,function(e){s=e.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function Ce(e){return!(!e||!e.__CANCEL__)}function Ae(e,t,n){W.call(this,null==e?"canceled":e,W.ERR_CANCELED,t,n),this.name="CanceledError"}function xe(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new W("Request failed with status code "+n.status,[W.ERR_BAD_REQUEST,W.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}J.inherits(Ae,W,{__CANCEL__:!0});const Ne=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,s=0,i=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=r[i];o||(o=c),n[s]=a,r[s]=c;let l=i,d=0;for(;l!==s;)d+=n[l++],l%=e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),c-o{c=s,i=null,a&&(clearTimeout(a),a=null),(n=>{const s=n.loaded,i=n.lengthComputable?n.total:void 0,a=s-r,c=o(a);r=s,e({loaded:s,total:i,progress:i?s/i:void 0,bytes:a,rate:c||void 0,estimated:c&&i&&s<=i?(i-s)/c:void 0,event:n,lengthComputable:null!=i,[t?"download":"upload"]:!0})})(...n)};return[(...e)=>{const t=Date.now(),n=t-c;n>=u?l(e,t):(i=e,a||(a=setTimeout(()=>{a=null,l(i)},u-n)))},()=>i&&l(i)]}(0,n)},Ue=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Pe=e=>(...t)=>J.asap(()=>e(...t));var ke=me.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,me.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(me.origin),me.navigator&&/(msie|trident)/i.test(me.navigator.userAgent)):()=>!0,je=me.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const i=[e+"="+encodeURIComponent(t)];J.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),J.isString(r)&&i.push("path="+r),J.isString(o)&&i.push("domain="+o),!0===s&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Le(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const De=e=>e instanceof Te?{...e}:e;function Be(e,t){t=t||{};const n={};function r(e,t,n,r){return J.isPlainObject(e)&&J.isPlainObject(t)?J.merge.call({caseless:r},e,t):J.isPlainObject(t)?J.merge({},t):J.isArray(t)?t.slice():t}function o(e,t,n,o){return J.isUndefined(t)?J.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function s(e,t){if(!J.isUndefined(t))return r(void 0,t)}function i(e,t){return J.isUndefined(t)?J.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,s){return s in t?r(n,o):s in e?r(void 0,n):void 0}const c={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(e,t,n)=>o(De(e),De(t),0,!0)};return J.forEach(Object.keys({...e,...t}),function(r){const s=c[r]||o,i=s(e[r],t[r],r);J.isUndefined(i)&&s!==a||(n[r]=i)}),n}var Fe=e=>{const t=Be({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:a}=t;if(t.headers=i=Te.from(i),t.url=ie(Le(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),J.isFormData(n))if(me.hasStandardBrowserEnv||me.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(J.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&i.set(e,n)})}if(me.hasStandardBrowserEnv&&(r&&J.isFunction(r)&&(r=r(t)),r||!1!==r&&ke(t.url))){const e=o&&s&&je.read(s);e&&i.set(o,e)}return t},Ie="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=Fe(e);let o=r.data;const s=Te.from(r.headers).normalize();let i,a,c,u,l,{responseType:d,onUploadProgress:f,onDownloadProgress:h}=r;function p(){u&&u(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(i),r.signal&&r.signal.removeEventListener("abort",i)}let m=new XMLHttpRequest;function y(){if(!m)return;const r=Te.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());xe(function(e){t(e),p()},function(e){n(e),p()},{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=y:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(y)},m.onabort=function(){m&&(n(new W("Request aborted",W.ECONNABORTED,e,m)),m=null)},m.onerror=function(t){const r=new W(t&&t.message?t.message:"Network Error",W.ERR_NETWORK,e,m);r.event=t||null,n(r),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||ce;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new W(t,o.clarifyTimeoutError?W.ETIMEDOUT:W.ECONNABORTED,e,m)),m=null},void 0===o&&s.setContentType(null),"setRequestHeader"in m&&J.forEach(s.toJSON(),function(e,t){m.setRequestHeader(t,e)}),J.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),h&&([c,l]=Ne(h,!0),m.addEventListener("progress",c)),f&&m.upload&&([a,u]=Ne(f),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(i=t=>{m&&(n(!t||t.type?new Ae(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(i),r.signal&&(r.signal.aborted?i():r.signal.addEventListener("abort",i)));const b=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);b&&-1===me.protocols.indexOf(b)?n(new W("Unsupported protocol "+b+":",W.ERR_BAD_REQUEST,e)):m.send(o||null)})},Me=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,i();const t=e instanceof Error?e:this.reason;r.abort(t instanceof W?t:new Ae(t instanceof Error?t.message:t))}};let s=t&&setTimeout(()=>{s=null,o(new W(`timeout ${t} of ms exceeded`,W.ETIMEDOUT))},t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:a}=r;return a.unsubscribe=()=>J.asap(i),a}};const qe=function*(e,t){let n=e.byteLength;if(!t||n{const o=async function*(e,t){for await(const n of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}}(e))yield*qe(n,t)}(e,t);let s,i=0,a=e=>{s||(s=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return a(),void e.close();let s=r.byteLength;if(n){let e=i+=s;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},{isFunction:ze}=J,He=(({Request:e,Response:t})=>({Request:e,Response:t}))(J.global),{ReadableStream:Ve,TextEncoder:Ye}=J.global,Je=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},We=e=>{e=J.merge.call({skipUndefined:!0},He,e);const{fetch:t,Request:n,Response:r}=e,o=t?ze(t):"function"==typeof fetch,s=ze(n),i=ze(r);if(!o)return!1;const a=o&&ze(Ve),c=o&&("function"==typeof Ye?(u=new Ye,e=>u.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var u;const l=s&&a&&Je(()=>{let e=!1;const t=new n(me.origin,{body:new Ve,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),d=i&&a&&Je(()=>J.isReadableStream(new r("").body)),f={stream:d&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!f[e]&&(f[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new W(`Response type '${e}' is not supported`,W.ERR_NOT_SUPPORT,n)})});return async e=>{let{url:o,method:i,data:a,signal:u,cancelToken:h,timeout:p,onDownloadProgress:m,onUploadProgress:y,responseType:b,headers:g,withCredentials:E="same-origin",fetchOptions:w}=Fe(e),v=t||fetch;b=b?(b+"").toLowerCase():"text";let R=Me([u,h&&h.toAbortSignal()],p),O=null;const _=R&&R.unsubscribe&&(()=>{R.unsubscribe()});let T;try{if(y&&l&&"get"!==i&&"head"!==i&&0!==(T=await(async(e,t)=>{const r=J.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(J.isBlob(e))return e.size;if(J.isSpecCompliantForm(e)){const t=new n(me.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return J.isArrayBufferView(e)||J.isArrayBuffer(e)?e.byteLength:(J.isURLSearchParams(e)&&(e+=""),J.isString(e)?(await c(e)).byteLength:void 0)})(t):r})(g,a))){let e,t=new n(o,{method:"POST",body:a,duplex:"half"});if(J.isFormData(a)&&(e=t.headers.get("content-type"))&&g.setContentType(e),t.body){const[e,n]=Ue(T,Ne(Pe(y)));a=Ke(t.body,65536,e,n)}}J.isString(E)||(E=E?"include":"omit");const t=s&&"credentials"in n.prototype,u={...w,signal:R,method:i.toUpperCase(),headers:g.normalize().toJSON(),body:a,duplex:"half",credentials:t?E:void 0};O=s&&new n(o,u);let h=await(s?v(O,w):v(o,u));const p=d&&("stream"===b||"response"===b);if(d&&(m||p&&_)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=h[t]});const t=J.toFiniteNumber(h.headers.get("content-length")),[n,o]=m&&Ue(t,Ne(Pe(m),!0))||[];h=new r(Ke(h.body,65536,n,()=>{o&&o(),_&&_()}),e)}b=b||"text";let S=await f[J.findKey(f,b)||"text"](h,e);return!p&&_&&_(),await new Promise((t,n)=>{xe(t,n,{data:S,headers:Te.from(h.headers),status:h.status,statusText:h.statusText,config:e,request:O})})}catch(t){if(_&&_(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new W("Network Error",W.ERR_NETWORK,e,O),{cause:t.cause||t});throw W.from(t,t&&t.code,e,O)}}},$e=new Map,Ge=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:o}=t,s=[r,o,n];let i,a,c=s.length,u=$e;for(;c--;)i=s[c],a=u.get(i),void 0===a&&u.set(i,a=c?new Map:We(t)),u=a;return a};Ge();const Xe={http:null,xhr:Ie,fetch:{get:Ge}};J.forEach(Xe,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const Qe=e=>`- ${e}`,Ze=e=>J.isFunction(e)||null===e||!1===e;var et=(e,t)=>{e=J.isArray(e)?e:[e];const{length:n}=e;let r,o;const s={};for(let i=0;i`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new W("There is no suitable adapter to dispatch the request "+(n?e.length>1?"since :\n"+e.map(Qe).join("\n"):" "+Qe(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return o};function tt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ae(null,e)}function nt(e){return tt(e),e.headers=Te.from(e.headers),e.data=Se.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),et(e.adapter||ge.adapter,e)(e).then(function(t){return tt(e),t.data=Se.call(e,e.transformResponse,t),t.headers=Te.from(t.headers),t},function(t){return Ce(t)||(tt(e),t&&t.response&&(t.response.data=Se.call(e,e.transformResponse,t.response),t.response.headers=Te.from(t.response.headers))),Promise.reject(t)})}const rt="1.12.2",ot={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ot[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const st={};ot.transitional=function(e,t,n){function r(e,t){return"[Axios v"+rt+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,s)=>{if(!1===e)throw new W(r(o," has been removed"+(t?" in "+t:"")),W.ERR_DEPRECATED);return t&&!st[o]&&(st[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,s)}},ot.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var it={assertOptions:function(e,t,n){if("object"!=typeof e)throw new W("options must be an object",W.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],i=t[s];if(i){const t=e[s],n=void 0===t||i(t,s,e);if(!0!==n)throw new W("option "+s+" must be "+n,W.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new W("Unknown option "+s,W.ERR_BAD_OPTION)}},validators:ot};const at=it.validators;class ct{constructor(e){this.defaults=e||{},this.interceptors={request:new ae,response:new ae}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Be(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&it.assertOptions(n,{silentJSONParsing:at.transitional(at.boolean),forcedJSONParsing:at.transitional(at.boolean),clarifyTimeoutError:at.transitional(at.boolean)},!1),null!=r&&(J.isFunction(r)?t.paramsSerializer={serialize:r}:it.assertOptions(r,{encode:at.function,serialize:at.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),it.assertOptions(t,{baseUrl:at.spelling("baseURL"),withXsrfToken:at.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&J.merge(o.common,o[t.method]);o&&J.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=Te.concat(s,o);const i=[];let a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,i.unshift(e.fulfilled,e.rejected))});const c=[];let u;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,d=0;if(!a){const e=[nt.bind(this),void 0];for(e.unshift(...i),e.push(...c),l=e.length,u=Promise.resolve(t);d{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new Ae(e,r,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new lt(function(t){e=t}),cancel:e}}}var dt=lt;const ft={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ft).forEach(([e,t])=>{ft[t]=e});var ht=ft;const pt=function e(t){const n=new ut(t),o=r(ut.prototype.request,n);return J.extend(o,ut.prototype,n,{allOwnKeys:!0}),J.extend(o,n,null,{allOwnKeys:!0}),o.create=function(n){return e(Be(t,n))},o}(ge);pt.Axios=ut,pt.CanceledError=Ae,pt.CancelToken=dt,pt.isCancel=Ce,pt.VERSION=rt,pt.toFormData=te,pt.AxiosError=W,pt.Cancel=pt.CanceledError,pt.all=function(e){return Promise.all(e)},pt.spread=function(e){return function(t){return e.apply(null,t)}},pt.isAxiosError=function(e){return J.isObject(e)&&!0===e.isAxiosError},pt.mergeConfig=Be,pt.AxiosHeaders=Te,pt.formToJSON=e=>ye(J.isHTMLForm(e)?new FormData(e):e),pt.getAdapter=et,pt.HttpStatusCode=ht,pt.default=pt,e.exports=pt},457:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=n(94),o=n(473),s=n(149);class i extends r.Invoice{token;url;status;responseText;customer;receiptURL;receipt_identifier;provider_reference;hash;constructor(e){super(e)}async create(){const e=this.asRequestBody();return this.transport.client.post(s.Endpoints.CREATE_INVOICE,e).then(e=>{if(e.data.response_code===s.ResponseCode.success)return this.token=e.data.token,this.url=e.data.response_text,this.getTokenStatus(this.token);throw new o.ResponseError("Failed to create invoice.",e.data)})}async getTokenStatus(e){const t=e||this.token;return this.transport.client.get(`${s.Endpoints.CONFIRM_INVOICE}${t}`).then(e=>{const t=e.data;if(t.response_code===s.ResponseCode.success)return this.status=t.status,this.responseText=t.response_text,this.hash=t?.hash,this.items=t.invoice.items,this.taxes=t.taxes,this.description=t.description,t.actions&&(this.cancelURL=t.actions.cancel_url,this.callbackURL=t.actions.callback_url,this.returnURL=t.actions.return_url),this.totalAmount=t.invoice.total_amount,this.status===s.InvoiceStatus.COMPLETED&&(this.customer=t.customer,this.receiptURL=t.receipt_url,this.receipt_identifier=t.receipt_identifier,this.provider_reference=t.provider_reference,t.custom_data&&Object.keys(t.custom_data).length>0&&(this.customData=t.custom_data)),this.asObject;throw new o.ResponseError("Could not confirm invoice status.",e.data)})}get asObject(){return{token:this.token,url:this.url,status:this.status,hash:this.hash,responseText:this.responseText,customer:this.customer,receiptURL:this.receiptURL,receipt_identifier:this.receipt_identifier,provider_reference:this.provider_reference,customData:this.customData,totalAmount:this.totalAmount}}}t.default=i},473:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResponseError=void 0;class n extends Error{data=void 0;constructor(e,t=void 0){super(e),this.data=t}}t.ResponseError=n},546:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Credentials=t.PaydunyaEnvironment=void 0,function(e){e.LIVE="live",e.TEST="test"}(n||(t.PaydunyaEnvironment=n={})),t.Credentials=class{masterKey;privateKey;publicKey;token;mode;constructor(e){this.masterKey=e.masterKey,this.privateKey=e.privateKey,this.publicKey=e.publicKey,this.token=e.token,this.mode=e.mode}extendRequestConfig(e){return e.headers.set("Content-Type","application/json").set("PAYDUNYA-MASTER-KEY",this.masterKey).set("PAYDUNYA-PRIVATE-KEY",this.privateKey).set("PAYDUNYA-TOKEN",this.token),e}}},568:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PaydunyaClient=void 0;const o=n(928),s=n(641),i=n(224),a=r(n(457)),c=n(423),u=n(546),l=n(94);class d{transport;constructor(e){this.transport=e}get store(){return this.transport.store}set store(e){this.transport.store=e}invoiceInstance(){return new l.Invoice(this.transport)}checkoutInvoiceInstance(){return new a.default(this.transport)}onsiteInvoiceInstance(){return new c.OnsiteInvoice(this.transport)}directpayInstance(){return new i.DirectPay(this.transport)}balanceInstance(){return new o.Balance(this.transport)}static fromCredentialsInstance(e){return new d(new s.Transport(e))}static fromCredentials(e){return new d(new s.Transport(new u.Credentials(e)))}static autoDetect(e=u.PaydunyaEnvironment.LIVE){if(void 0===globalThis.process)throw new Error("Auto detection of credentials is only available in NodeJS environment");return new d(new s.Transport(new u.Credentials({masterKey:process.env.PAYDUNYA_MASTER_KEY||"",privateKey:process.env.PAYDUNYA_PRIVATE_KEY||"",publicKey:process.env.PAYDUNYA_PUBLIC_KEY||"",token:process.env.PAYDUNYA_TOKEN||"",mode:process.env.PAYDUNYA_MODE||e})))}}t.PaydunyaClient=d},641:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Transport=void 0;const o=n(546),s=r(n(425));t.Transport=class{setup;store=void 0;client;constructor(e,t=void 0){this.setup=e,this.store=t,this.client=s.default.create({baseURL:this.baseURL}),this.client.interceptors.request.use(e=>this.setup.extendRequestConfig(e))}get baseURL(){return this.setup.mode===o.PaydunyaEnvironment.TEST?"https://app.paydunya.com/sandbox-api/v1":"https://app.paydunya.com/api/v1"}}},928:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Balance=void 0;const o=r(n(425)),s=n(149);class i{amount;currency;constructor(e,t){this.amount=e,this.currency=t}static parse(e){let[t,n]=e.split(" ");return new i(parseFloat(t||"0"),n?.trim()||"XOF")}}t.Balance=class{transport;axios;constructor(e){this.transport=e,this.axios=o.default.create({baseURL:"https://app.paydunya.com/api/v2"}),this.axios.interceptors.request.use(e=>this.transport.setup.extendRequestConfig(e))}async getAll(){return this.axios.get(s.Endpoints.CHECK_BALANCE).then(e=>{if(e.data.success){let t={};return Object.keys(s.SUPPORTED_COUNTRY_CODES).forEach(n=>{t[n]=i.parse(e.data[`Balance ${n}`])}),t}})}async getBalanceByCountry(e){let t=await this.getAll();if(t&&t[e])return t[e]}async getAccountBalance(e){return this.axios.get(`${s.Endpoints.CHECK_BALANCE}/${e}`).then(e=>{if(e.data.success)return e.data})}}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var s=t[r]={exports:{}};return e[r].call(s.exports,s,s.exports,n),s.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n(568)})(); \ No newline at end of file +(()=>{"use strict";var e={94:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Invoice=void 0,t.Invoice=class{transport;returnURL;cancelURL;callbackURL;description;items;customData;taxes;channels;totalAmount;constructor(e){this.transport=e,e.store?.return_url&&(this.returnURL=e.store.return_url),e.store?.cancel_url&&(this.cancelURL=e.store.cancel_url),e.store?.callback_url&&(this.callbackURL=e.store.callback_url),this.description="",this.items={},this.customData={},this.taxes={},this.channels=[],this.totalAmount=0}get store(){return this.transport.store}addItem(e,t,n,r,s){const o=Object.keys(this.items).length+1;return this.items["item_"+o]={name:e,quantity:t||0,unit_price:n||0,total_price:r||0},s&&(this.items["item_"+o].description=s),this}addTax(e,t){const n=Object.keys(this.taxes).length+1;return this.taxes["tax_"+n]={name:e,amount:Number(t)},this}addChannel(e){return this.channels.push(e),this}addChannels(e=[]){for(let t=0;t0&&(e.invoice.channels=this.channels),Object.keys(this.items).length>0&&(e.invoice.items=this.items),(this.returnURL||this.cancelURL||this.callbackURL)&&(e.actions={},this.returnURL&&(e.actions.return_url=this.returnURL),this.cancelURL&&(e.actions.cancel_url=this.cancelURL),this.callbackURL&&(e.actions.callback_url=this.callbackURL)),Object.keys(this.taxes).length>0&&(e.invoice.taxes=this.taxes),Object.keys(this.customData).length>0&&(e.custom_data=this.customData),e}}},125:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Store=void 0,t.Store=class{name;tagline;phone_number;postal_address;logo_url;website_url;cancel_url;return_url;callback_url;constructor(e){if(!e||!e.name)throw new Error("Invalid parameters.");this.name=e.name,e.tagline&&(this.tagline=e.tagline),e.phone_number&&(this.phone_number=e.phone_number),e.postal_address&&(this.postal_address=e.postal_address),e.logo_url&&(this.logo_url=e.logo_url),e.website_url&&(this.website_url=e.website_url),e.cancel_url&&(this.cancel_url=e.cancel_url),e.return_url&&(this.return_url=e.return_url),e.callback_url&&(this.callback_url=e.callback_url)}get asObject(){const e={name:this.name};return this.tagline&&(e.tagline=this.tagline),this.phone_number&&(e.phone_number=this.phone_number),this.postal_address&&(e.postal_address=this.postal_address),this.logo_url&&(e.logo_url=this.logo_url),this.website_url&&(e.website_url=this.website_url),this.cancel_url&&(e.cancel_url=this.cancel_url),this.return_url&&(e.return_url=this.return_url),this.callback_url&&(e.callback_url=this.callback_url),e}}},149:(e,t)=>{var n,r,s,o;Object.defineProperty(t,"__esModule",{value:!0}),t.SUPPORTED_COUNTRY_CODES=t.PaymentChannel=t.Endpoints=t.ResponseCode=t.InvoiceStatus=void 0,function(e){e.COMPLETED="completed",e.CANCELLED="cancelled",e.PENDING="pending",e.FAILED="failed"}(n||(t.InvoiceStatus=n={})),function(e){e.success="00"}(r||(t.ResponseCode=r={})),function(e){e.CREATE_INVOICE="/checkout-invoice/create",e.CONFIRM_INVOICE="/checkout-invoice/confirm/",e.CREATE_ONSITEINVOCE="/opr/create",e.CHARGE_ONSITEINVOCE="/opr/charge",e.CREDIT_ACCOUNT="/direct-pay/credit-account",e.CHECK_BALANCE="/disburse/check-balance"}(s||(t.Endpoints=s={})),function(e){e.Card="card",e.OrangeMoneySenegal="orange-money-senegal",e.WaveSenegal="wave-senegal",e.FreeMoneySenegal="free-money-senegal",e.ExpressoSn="expresso-sn",e.WizallSenegal="wizall-senegal",e.MtnBenin="mtn-benin",e.MoovBenin="moov-benin",e.OrangeMoneyCi="orange-money-ci",e.WaveCi="wave-ci",e.MtnCi="mtn-ci",e.MoovCi="moov-ci",e.TMoneyTogo="t-money-togo",e.MoovTogo="moov-togo",e.OrangeMoneyMali="orange-money-mali",e.MoovMl="moov-ml",e.OrangeMoneyBurkina="orange-money-burkina",e.MoovBurkinaFaso="moov-burkina-faso"}(o||(t.PaymentChannel=o={})),t.SUPPORTED_COUNTRY_CODES={SN:"SN",CI:"CI",BJ:"BJ",TG:"TG",ML:"ML",BF:"BF"}},224:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DirectPay=void 0;const r=n(473),s=n(149);t.DirectPay=class{transport;responseText;description;transactionID;constructor(e){this.transport=e}async creditAccount(e,t){const n={account_alias:e,amount:Number(t)};return this.transport.client.post(s.Endpoints.CREDIT_ACCOUNT,n).then(n=>{if(n.data.response_code===s.ResponseCode.success)return this.responseText=n.data.response_text,this.description=n.data.description,this.transactionID=n.data.transaction_id,{responseText:this.responseText,description:this.description,transactionID:this.transactionID};throw new r.ResponseError(`Failed to credit account. Please ensure ${e} and ${t} are valid OR check your account balance.`,n.data)})}}},423:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OnsiteInvoice=void 0;const r=n(149),s=n(473),o=n(94);class i extends o.Invoice{token;oprToken;responseText;status;receiptURL;customer;constructor(e){super(e)}async create(e){let t={invoice_data:this.asRequestBody(),opr_data:{account_alias:e}};return this.transport.client.post(r.Endpoints.CREATE_ONSITEINVOCE,t).then(e=>{if(e.data?.response_code===r.ResponseCode.success)return{token:e.data.invoice_token,oprToken:e.data.token,responseText:e.data.description};throw new s.ResponseError("Failed to create invoice",e.data)})}async charge(e,t){let n={token:e,confirm_token:t};return this.transport.client.post(r.Endpoints.CHARGE_ONSITEINVOCE,n).then(e=>{if(e.data?.response_code===r.ResponseCode.success)return{responseText:e.data.response_text,status:e.data.invoice_data.status,receiptURL:e.data.invoice_data.receipt_url,customer:e.data.invoice_data.customer};throw new s.ResponseError("Failed to charge invoice. Check OPR/confirm token and try again.",e.data)})}}t.OnsiteInvoice=i},425:(e,t,n)=>{function r(e,t){return function(){return e.apply(t,arguments)}}const{toString:s}=Object.prototype,{getPrototypeOf:o}=Object,{iterator:i,toStringTag:a}=Symbol,c=(u=Object.create(null),e=>{const t=s.call(e);return u[t]||(u[t]=t.slice(8,-1).toLowerCase())});var u;const l=e=>(e=e.toLowerCase(),t=>c(t)===e),d=e=>t=>typeof t===e,{isArray:h}=Array,f=d("undefined");function p(e){return null!==e&&!f(e)&&null!==e.constructor&&!f(e.constructor)&&b(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const m=l("ArrayBuffer"),y=d("string"),b=d("function"),g=d("number"),E=e=>null!==e&&"object"==typeof e,w=e=>{if("object"!==c(e))return!1;const t=o(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||a in e||i in e)},_=l("Date"),v=l("File"),O=l("Blob"),R=l("FileList"),T=l("URLSearchParams"),[S,C,A,x]=["ReadableStream","Request","Response","Headers"].map(l);function P(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,s;if("object"!=typeof e&&(e=[e]),h(e))for(r=0,s=e.length;r0;)if(r=n[s],t===r.toLowerCase())return r;return null}const U="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,k=e=>!f(e)&&e!==U,j=(L="undefined"!=typeof Uint8Array&&o(Uint8Array),e=>L&&e instanceof L);var L;const D=l("HTMLFormElement"),B=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),F=l("RegExp"),I=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};P(n,(n,s)=>{let o;!1!==(o=t(n,s,e))&&(r[s]=o||n)}),Object.defineProperties(e,r)},M=l("AsyncFunction"),q=(K="function"==typeof setImmediate,z=b(U.postMessage),K?setImmediate:z?(H=`axios@${Math.random()}`,V=[],U.addEventListener("message",({source:e,data:t})=>{e===U&&t===H&&V.length&&V.shift()()},!1),e=>{V.push(e),U.postMessage(H,"*")}):e=>setTimeout(e));var K,z,H,V;const Y="undefined"!=typeof queueMicrotask?queueMicrotask.bind(U):"undefined"!=typeof process&&process.nextTick||q;var J={isArray:h,isArrayBuffer:m,isBuffer:p,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||b(e.append)&&("formdata"===(t=c(e))||"object"===t&&b(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&m(e.buffer),t},isString:y,isNumber:g,isBoolean:e=>!0===e||!1===e,isObject:E,isPlainObject:w,isEmptyObject:e=>{if(!E(e)||p(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:S,isRequest:C,isResponse:A,isHeaders:x,isUndefined:f,isDate:_,isFile:v,isBlob:O,isRegExp:F,isFunction:b,isStream:e=>E(e)&&b(e.pipe),isURLSearchParams:T,isTypedArray:j,isFileList:R,forEach:P,merge:function e(){const{caseless:t,skipUndefined:n}=k(this)&&this||{},r={},s=(s,o)=>{const i=t&&N(r,o)||o;w(r[i])&&w(s)?r[i]=e(r[i],s):w(s)?r[i]=e({},s):h(s)?r[i]=s.slice():n&&f(s)||(r[i]=s)};for(let e=0,t=arguments.length;e(P(t,(t,s)=>{n&&b(t)?e[s]=r(t,n):e[s]=t},{allOwnKeys:s}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let s,i,a;const c={};if(t=t||{},null==e)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)a=s[i],r&&!r(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==n&&o(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:c,kindOfTest:l,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(h(e))return e;let t=e.length;if(!g(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[i]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:D,hasOwnProperty:B,hasOwnProp:B,reduceDescriptors:I,freezeMethods:e=>{I(e,(t,n)=>{if(b(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];b(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return h(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:N,global:U,isContextDefined:k,isSpecCompliantForm:function(e){return!!(e&&b(e.append)&&"FormData"===e[a]&&e[i])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(E(e)){if(t.indexOf(e)>=0)return;if(p(e))return e;if(!("toJSON"in e)){t[r]=e;const s=h(e)?[]:{};return P(e,(e,t)=>{const o=n(e,r+1);!f(o)&&(s[t]=o)}),t[r]=void 0,s}}return e};return n(e,0)},isAsyncFn:M,isThenable:e=>e&&(E(e)||b(e))&&b(e.then)&&b(e.catch),setImmediate:q,asap:Y,isIterable:e=>null!=e&&b(e[i])};function W(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}J.inherits(W,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:J.toJSONObject(this.config),code:this.code,status:this.status}}});const $=W.prototype,G={};function X(e){return J.isPlainObject(e)||J.isArray(e)}function Q(e){return J.endsWith(e,"[]")?e.slice(0,-2):e}function Z(e,t,n){return e?e.concat(t).map(function(e,t){return e=Q(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{G[e]={value:e}}),Object.defineProperties(W,G),Object.defineProperty($,"isAxiosError",{value:!0}),W.from=(e,t,n,r,s,o)=>{const i=Object.create($);J.toFlatObject(e,i,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const a=e&&e.message?e.message:"Error",c=null==t&&e?e.code:t;return W.call(i,a,c,n,r,s),e&&null==i.cause&&Object.defineProperty(i,"cause",{value:e,configurable:!0}),i.name=e&&e.name||"Error",o&&Object.assign(i,o),i};const ee=J.toFlatObject(J,{},null,function(e){return/^is[A-Z]/.test(e)});function te(e,t,n){if(!J.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=J.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!J.isUndefined(t[e])})).metaTokens,s=n.visitor||u,o=n.dots,i=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&J.isSpecCompliantForm(t);if(!J.isFunction(s))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(J.isDate(e))return e.toISOString();if(J.isBoolean(e))return e.toString();if(!a&&J.isBlob(e))throw new W("Blob is not supported. Use a Buffer instead.");return J.isArrayBuffer(e)||J.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,s){let a=e;if(e&&!s&&"object"==typeof e)if(J.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(J.isArray(e)&&function(e){return J.isArray(e)&&!e.some(X)}(e)||(J.isFileList(e)||J.endsWith(n,"[]"))&&(a=J.toArray(e)))return n=Q(n),a.forEach(function(e,r){!J.isUndefined(e)&&null!==e&&t.append(!0===i?Z([n],r,o):null===i?n:n+"[]",c(e))}),!1;return!!X(e)||(t.append(Z(s,n,o),c(e)),!1)}const l=[],d=Object.assign(ee,{defaultVisitor:u,convertValue:c,isVisitable:X});if(!J.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!J.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),J.forEach(n,function(n,o){!0===(!(J.isUndefined(n)||null===n)&&s.call(t,n,J.isString(o)?o.trim():o,r,d))&&e(n,r?r.concat(o):[o])}),l.pop()}}(e),t}function ne(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function re(e,t){this._pairs=[],e&&te(e,this,t)}const se=re.prototype;function oe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ie(e,t,n){if(!t)return e;const r=n&&n.encode||oe;J.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let o;if(o=s?s(t,n):J.isURLSearchParams(t)?t.toString():new re(t,n).toString(r),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}se.append=function(e,t){this._pairs.push([e,t])},se.toString=function(e){const t=e?function(t){return e.call(this,t,ne)}:ne;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var ae=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){J.forEach(this.handlers,function(t){null!==t&&e(t)})}},ce={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ue={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:re,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const le="undefined"!=typeof window&&"undefined"!=typeof document,de="object"==typeof navigator&&navigator||void 0,he=le&&(!de||["ReactNative","NativeScript","NS"].indexOf(de.product)<0),fe="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,pe=le&&window.location.href||"http://localhost";var me={...Object.freeze({__proto__:null,hasBrowserEnv:le,hasStandardBrowserWebWorkerEnv:fe,hasStandardBrowserEnv:he,navigator:de,origin:pe}),...ue};function ye(e){function t(e,n,r,s){let o=e[s++];if("__proto__"===o)return!0;const i=Number.isFinite(+o),a=s>=e.length;return o=!o&&J.isArray(r)?r.length:o,a?(J.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!i):(r[o]&&J.isObject(r[o])||(r[o]=[]),t(e,n,r[o],s)&&J.isArray(r[o])&&(r[o]=function(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r{t(function(e){return J.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null}const be={transitional:ce,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,s=J.isObject(e);if(s&&J.isHTMLForm(e)&&(e=new FormData(e)),J.isFormData(e))return r?JSON.stringify(ye(e)):e;if(J.isArrayBuffer(e)||J.isBuffer(e)||J.isStream(e)||J.isFile(e)||J.isBlob(e)||J.isReadableStream(e))return e;if(J.isArrayBufferView(e))return e.buffer;if(J.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return te(e,new me.classes.URLSearchParams,{visitor:function(e,t,n,r){return me.isNode&&J.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((o=J.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return te(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return s||r?(t.setContentType("application/json",!1),function(e){if(J.isString(e))try{return(0,JSON.parse)(e),J.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||be.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(J.isResponse(e)||J.isReadableStream(e))return e;if(e&&J.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw W.from(e,W.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:me.classes.FormData,Blob:me.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};J.forEach(["delete","get","head","post","put","patch"],e=>{be.headers[e]={}});var ge=be;const Ee=J.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),we=Symbol("internals");function _e(e){return e&&String(e).trim().toLowerCase()}function ve(e){return!1===e||null==e?e:J.isArray(e)?e.map(ve):String(e)}function Oe(e,t,n,r,s){return J.isFunction(r)?r.call(this,t,n):(s&&(t=n),J.isString(t)?J.isString(r)?-1!==t.indexOf(r):J.isRegExp(r)?r.test(t):void 0:void 0)}class Re{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function s(e,t,n){const s=_e(t);if(!s)throw new Error("header name must be a non-empty string");const o=J.findKey(r,s);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=ve(e))}const o=(e,t)=>J.forEach(e,(e,n)=>s(e,n,t));if(J.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(J.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((e=>{const t={};let n,r,s;return e&&e.split("\n").forEach(function(e){s=e.indexOf(":"),n=e.substring(0,s).trim().toLowerCase(),r=e.substring(s+1).trim(),!n||t[n]&&Ee[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(J.isObject(e)&&J.isIterable(e)){let n,r,s={};for(const t of e){if(!J.isArray(t))throw TypeError("Object iterator must return a key-value pair");s[r=t[0]]=(n=s[r])?J.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}o(s,t)}else null!=e&&s(t,e,n);return this}get(e,t){if(e=_e(e)){const n=J.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(J.isFunction(t))return t.call(this,e,n);if(J.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=_e(e)){const n=J.findKey(this,e);return!(!n||void 0===this[n]||t&&!Oe(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function s(e){if(e=_e(e)){const s=J.findKey(n,e);!s||t&&!Oe(0,n[s],s,t)||(delete n[s],r=!0)}}return J.isArray(e)?e.forEach(s):s(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const s=t[n];e&&!Oe(0,this[s],s,e,!0)||(delete this[s],r=!0)}return r}normalize(e){const t=this,n={};return J.forEach(this,(r,s)=>{const o=J.findKey(n,s);if(o)return t[o]=ve(r),void delete t[s];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(s):String(s).trim();i!==s&&delete t[s],t[i]=ve(r),n[i]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return J.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&J.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[we]=this[we]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=_e(e);t[r]||(function(e,t){const n=J.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,s){return this[r].call(this,t,e,n,s)},configurable:!0})})}(n,e),t[r]=!0)}return J.isArray(e)?e.forEach(r):r(e),this}}Re.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),J.reduceDescriptors(Re.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),J.freezeMethods(Re);var Te=Re;function Se(e,t){const n=this||ge,r=t||n,s=Te.from(r.headers);let o=r.data;return J.forEach(e,function(e){o=e.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function Ce(e){return!(!e||!e.__CANCEL__)}function Ae(e,t,n){W.call(this,null==e?"canceled":e,W.ERR_CANCELED,t,n),this.name="CanceledError"}function xe(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new W("Request failed with status code "+n.status,[W.ERR_BAD_REQUEST,W.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}J.inherits(Ae,W,{__CANCEL__:!0});const Pe=(e,t,n=3)=>{let r=0;const s=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s,o=0,i=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=r[i];s||(s=c),n[o]=a,r[o]=c;let l=i,d=0;for(;l!==o;)d+=n[l++],l%=e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),c-s{c=o,i=null,a&&(clearTimeout(a),a=null),(n=>{const o=n.loaded,i=n.lengthComputable?n.total:void 0,a=o-r,c=s(a);r=o,e({loaded:o,total:i,progress:i?o/i:void 0,bytes:a,rate:c||void 0,estimated:c&&i&&o<=i?(i-o)/c:void 0,event:n,lengthComputable:null!=i,[t?"download":"upload"]:!0})})(...n)};return[(...e)=>{const t=Date.now(),n=t-c;n>=u?l(e,t):(i=e,a||(a=setTimeout(()=>{a=null,l(i)},u-n)))},()=>i&&l(i)]}(0,n)},Ne=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ue=e=>(...t)=>J.asap(()=>e(...t));var ke=me.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,me.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(me.origin),me.navigator&&/(msie|trident)/i.test(me.navigator.userAgent)):()=>!0,je=me.hasStandardBrowserEnv?{write(e,t,n,r,s,o){const i=[e+"="+encodeURIComponent(t)];J.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),J.isString(r)&&i.push("path="+r),J.isString(s)&&i.push("domain="+s),!0===o&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Le(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const De=e=>e instanceof Te?{...e}:e;function Be(e,t){t=t||{};const n={};function r(e,t,n,r){return J.isPlainObject(e)&&J.isPlainObject(t)?J.merge.call({caseless:r},e,t):J.isPlainObject(t)?J.merge({},t):J.isArray(t)?t.slice():t}function s(e,t,n,s){return J.isUndefined(t)?J.isUndefined(e)?void 0:r(void 0,e,0,s):r(e,t,0,s)}function o(e,t){if(!J.isUndefined(t))return r(void 0,t)}function i(e,t){return J.isUndefined(t)?J.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,s,o){return o in t?r(n,s):o in e?r(void 0,n):void 0}const c={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(e,t,n)=>s(De(e),De(t),0,!0)};return J.forEach(Object.keys({...e,...t}),function(r){const o=c[r]||s,i=o(e[r],t[r],r);J.isUndefined(i)&&o!==a||(n[r]=i)}),n}var Fe=e=>{const t=Be({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:a}=t;if(t.headers=i=Te.from(i),t.url=ie(Le(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),J.isFormData(n))if(me.hasStandardBrowserEnv||me.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(J.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&i.set(e,n)})}if(me.hasStandardBrowserEnv&&(r&&J.isFunction(r)&&(r=r(t)),r||!1!==r&&ke(t.url))){const e=s&&o&&je.read(o);e&&i.set(s,e)}return t},Ie="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=Fe(e);let s=r.data;const o=Te.from(r.headers).normalize();let i,a,c,u,l,{responseType:d,onUploadProgress:h,onDownloadProgress:f}=r;function p(){u&&u(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(i),r.signal&&r.signal.removeEventListener("abort",i)}let m=new XMLHttpRequest;function y(){if(!m)return;const r=Te.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());xe(function(e){t(e),p()},function(e){n(e),p()},{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=y:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(y)},m.onabort=function(){m&&(n(new W("Request aborted",W.ECONNABORTED,e,m)),m=null)},m.onerror=function(t){const r=new W(t&&t.message?t.message:"Network Error",W.ERR_NETWORK,e,m);r.event=t||null,n(r),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const s=r.transitional||ce;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new W(t,s.clarifyTimeoutError?W.ETIMEDOUT:W.ECONNABORTED,e,m)),m=null},void 0===s&&o.setContentType(null),"setRequestHeader"in m&&J.forEach(o.toJSON(),function(e,t){m.setRequestHeader(t,e)}),J.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),f&&([c,l]=Pe(f,!0),m.addEventListener("progress",c)),h&&m.upload&&([a,u]=Pe(h),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(i=t=>{m&&(n(!t||t.type?new Ae(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(i),r.signal&&(r.signal.aborted?i():r.signal.addEventListener("abort",i)));const b=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);b&&-1===me.protocols.indexOf(b)?n(new W("Unsupported protocol "+b+":",W.ERR_BAD_REQUEST,e)):m.send(s||null)})},Me=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const s=function(e){if(!n){n=!0,i();const t=e instanceof Error?e:this.reason;r.abort(t instanceof W?t:new Ae(t instanceof Error?t.message:t))}};let o=t&&setTimeout(()=>{o=null,s(new W(`timeout ${t} of ms exceeded`,W.ETIMEDOUT))},t);const i=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(s):e.removeEventListener("abort",s)}),e=null)};e.forEach(e=>e.addEventListener("abort",s));const{signal:a}=r;return a.unsubscribe=()=>J.asap(i),a}};const qe=function*(e,t){let n=e.byteLength;if(!t||n{const s=async function*(e,t){for await(const n of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}}(e))yield*qe(n,t)}(e,t);let o,i=0,a=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await s.next();if(t)return a(),void e.close();let o=r.byteLength;if(n){let e=i+=o;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),s.return())},{highWaterMark:2})},{isFunction:ze}=J,He=(({Request:e,Response:t})=>({Request:e,Response:t}))(J.global),{ReadableStream:Ve,TextEncoder:Ye}=J.global,Je=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},We=e=>{e=J.merge.call({skipUndefined:!0},He,e);const{fetch:t,Request:n,Response:r}=e,s=t?ze(t):"function"==typeof fetch,o=ze(n),i=ze(r);if(!s)return!1;const a=s&&ze(Ve),c=s&&("function"==typeof Ye?(u=new Ye,e=>u.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var u;const l=o&&a&&Je(()=>{let e=!1;const t=new n(me.origin,{body:new Ve,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),d=i&&a&&Je(()=>J.isReadableStream(new r("").body)),h={stream:d&&(e=>e.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!h[e]&&(h[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new W(`Response type '${e}' is not supported`,W.ERR_NOT_SUPPORT,n)})});return async e=>{let{url:s,method:i,data:a,signal:u,cancelToken:f,timeout:p,onDownloadProgress:m,onUploadProgress:y,responseType:b,headers:g,withCredentials:E="same-origin",fetchOptions:w}=Fe(e),_=t||fetch;b=b?(b+"").toLowerCase():"text";let v=Me([u,f&&f.toAbortSignal()],p),O=null;const R=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let T;try{if(y&&l&&"get"!==i&&"head"!==i&&0!==(T=await(async(e,t)=>{const r=J.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(J.isBlob(e))return e.size;if(J.isSpecCompliantForm(e)){const t=new n(me.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return J.isArrayBufferView(e)||J.isArrayBuffer(e)?e.byteLength:(J.isURLSearchParams(e)&&(e+=""),J.isString(e)?(await c(e)).byteLength:void 0)})(t):r})(g,a))){let e,t=new n(s,{method:"POST",body:a,duplex:"half"});if(J.isFormData(a)&&(e=t.headers.get("content-type"))&&g.setContentType(e),t.body){const[e,n]=Ne(T,Pe(Ue(y)));a=Ke(t.body,65536,e,n)}}J.isString(E)||(E=E?"include":"omit");const t=o&&"credentials"in n.prototype,u={...w,signal:v,method:i.toUpperCase(),headers:g.normalize().toJSON(),body:a,duplex:"half",credentials:t?E:void 0};O=o&&new n(s,u);let f=await(o?_(O,w):_(s,u));const p=d&&("stream"===b||"response"===b);if(d&&(m||p&&R)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=f[t]});const t=J.toFiniteNumber(f.headers.get("content-length")),[n,s]=m&&Ne(t,Pe(Ue(m),!0))||[];f=new r(Ke(f.body,65536,n,()=>{s&&s(),R&&R()}),e)}b=b||"text";let S=await h[J.findKey(h,b)||"text"](f,e);return!p&&R&&R(),await new Promise((t,n)=>{xe(t,n,{data:S,headers:Te.from(f.headers),status:f.status,statusText:f.statusText,config:e,request:O})})}catch(t){if(R&&R(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new W("Network Error",W.ERR_NETWORK,e,O),{cause:t.cause||t});throw W.from(t,t&&t.code,e,O)}}},$e=new Map,Ge=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:s}=t,o=[r,s,n];let i,a,c=o.length,u=$e;for(;c--;)i=o[c],a=u.get(i),void 0===a&&u.set(i,a=c?new Map:We(t)),u=a;return a};Ge();const Xe={http:null,xhr:Ie,fetch:{get:Ge}};J.forEach(Xe,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const Qe=e=>`- ${e}`,Ze=e=>J.isFunction(e)||null===e||!1===e;var et=(e,t)=>{e=J.isArray(e)?e:[e];const{length:n}=e;let r,s;const o={};for(let i=0;i`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new W("There is no suitable adapter to dispatch the request "+(n?e.length>1?"since :\n"+e.map(Qe).join("\n"):" "+Qe(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return s};function tt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ae(null,e)}function nt(e){return tt(e),e.headers=Te.from(e.headers),e.data=Se.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),et(e.adapter||ge.adapter,e)(e).then(function(t){return tt(e),t.data=Se.call(e,e.transformResponse,t),t.headers=Te.from(t.headers),t},function(t){return Ce(t)||(tt(e),t&&t.response&&(t.response.data=Se.call(e,e.transformResponse,t.response),t.response.headers=Te.from(t.response.headers))),Promise.reject(t)})}const rt="1.12.2",st={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{st[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const ot={};st.transitional=function(e,t,n){function r(e,t){return"[Axios v"+rt+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,s,o)=>{if(!1===e)throw new W(r(s," has been removed"+(t?" in "+t:"")),W.ERR_DEPRECATED);return t&&!ot[s]&&(ot[s]=!0,console.warn(r(s," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,s,o)}},st.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var it={assertOptions:function(e,t,n){if("object"!=typeof e)throw new W("options must be an object",W.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const t=e[o],n=void 0===t||i(t,o,e);if(!0!==n)throw new W("option "+o+" must be "+n,W.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new W("Unknown option "+o,W.ERR_BAD_OPTION)}},validators:st};const at=it.validators;class ct{constructor(e){this.defaults=e||{},this.interceptors={request:new ae,response:new ae}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Be(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:s}=t;void 0!==n&&it.assertOptions(n,{silentJSONParsing:at.transitional(at.boolean),forcedJSONParsing:at.transitional(at.boolean),clarifyTimeoutError:at.transitional(at.boolean)},!1),null!=r&&(J.isFunction(r)?t.paramsSerializer={serialize:r}:it.assertOptions(r,{encode:at.function,serialize:at.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),it.assertOptions(t,{baseUrl:at.spelling("baseURL"),withXsrfToken:at.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=s&&J.merge(s.common,s[t.method]);s&&J.forEach(["delete","get","head","post","put","patch","common"],e=>{delete s[e]}),t.headers=Te.concat(o,s);const i=[];let a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,i.unshift(e.fulfilled,e.rejected))});const c=[];let u;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,d=0;if(!a){const e=[nt.bind(this),void 0];for(e.unshift(...i),e.push(...c),l=e.length,u=Promise.resolve(t);d{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,s){n.reason||(n.reason=new Ae(e,r,s),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new lt(function(t){e=t}),cancel:e}}}var dt=lt;const ht={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ht).forEach(([e,t])=>{ht[t]=e});var ft=ht;const pt=function e(t){const n=new ut(t),s=r(ut.prototype.request,n);return J.extend(s,ut.prototype,n,{allOwnKeys:!0}),J.extend(s,n,null,{allOwnKeys:!0}),s.create=function(n){return e(Be(t,n))},s}(ge);pt.Axios=ut,pt.CanceledError=Ae,pt.CancelToken=dt,pt.isCancel=Ce,pt.VERSION=rt,pt.toFormData=te,pt.AxiosError=W,pt.Cancel=pt.CanceledError,pt.all=function(e){return Promise.all(e)},pt.spread=function(e){return function(t){return e.apply(null,t)}},pt.isAxiosError=function(e){return J.isObject(e)&&!0===e.isAxiosError},pt.mergeConfig=Be,pt.AxiosHeaders=Te,pt.formToJSON=e=>ye(J.isHTMLForm(e)?new FormData(e):e),pt.getAdapter=et,pt.HttpStatusCode=ft,pt.default=pt,e.exports=pt},457:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=n(94),s=n(473),o=n(149);class i extends r.Invoice{token;url;status;responseText;customer;receiptURL;receipt_identifier;provider_reference;hash;constructor(e){super(e)}async create(){const e=this.asRequestBody();return this.transport.client.post(o.Endpoints.CREATE_INVOICE,e).then(e=>{if(e.data.response_code===o.ResponseCode.success)return this.token=e.data.token,this.url=e.data.response_text,this.getTokenStatus(this.token);throw new s.ResponseError("Failed to create invoice.",e.data)})}async getTokenStatus(e){const t=e||this.token;return this.transport.client.get(`${o.Endpoints.CONFIRM_INVOICE}${t}`).then(e=>{const t=e.data;if(t.response_code===o.ResponseCode.success)return this.status=t.status,this.responseText=t.response_text,this.hash=t?.hash,this.items=t.invoice.items,this.taxes=t.taxes,this.description=t.description,t.actions&&(this.cancelURL=t.actions.cancel_url,this.callbackURL=t.actions.callback_url,this.returnURL=t.actions.return_url),this.totalAmount=t.invoice.total_amount,this.status===o.InvoiceStatus.COMPLETED&&(this.customer=t.customer,this.receiptURL=t.receipt_url,this.receipt_identifier=t.receipt_identifier,this.provider_reference=t.provider_reference,t.custom_data&&Object.keys(t.custom_data).length>0&&(this.customData=t.custom_data)),this.asObject;throw new s.ResponseError("Could not confirm invoice status.",e.data)})}get asObject(){return{token:this.token,url:this.url,status:this.status,hash:this.hash,responseText:this.responseText,customer:this.customer,receiptURL:this.receiptURL,receipt_identifier:this.receipt_identifier,provider_reference:this.provider_reference,customData:this.customData,totalAmount:this.totalAmount}}}t.default=i},473:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResponseError=void 0;class n extends Error{data=void 0;constructor(e,t=void 0){super(e),this.data=t}}t.ResponseError=n},546:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Credentials=t.PaydunyaEnvironment=void 0,function(e){e.LIVE="live",e.TEST="test"}(n||(t.PaydunyaEnvironment=n={})),t.Credentials=class{masterKey;privateKey;publicKey;token;mode;constructor(e){this.masterKey=e.masterKey,this.privateKey=e.privateKey,this.publicKey=e.publicKey,this.token=e.token,this.mode=e.mode}extendRequestConfig(e){return e.headers.set("Content-Type","application/json").set("PAYDUNYA-MASTER-KEY",this.masterKey).set("PAYDUNYA-PRIVATE-KEY",this.privateKey).set("PAYDUNYA-TOKEN",this.token),e}}},568:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,s)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PaydunyaClient=void 0;const i=n(928),a=n(641),c=n(224),u=o(n(457)),l=n(423),d=n(546),h=n(94);class f{transport;constructor(e){this.transport=e}get store(){return this.transport.store}set store(e){this.transport.store=e}invoiceInstance(){return new h.Invoice(this.transport)}checkoutInvoiceInstance(){return new u.default(this.transport)}onsiteInvoiceInstance(){return new l.OnsiteInvoice(this.transport)}directpayInstance(){return new c.DirectPay(this.transport)}balanceInstance(){return new i.Balance(this.transport)}static fromCredentialsInstance(e){return new f(new a.Transport(e))}static fromCredentials(e){return new f(new a.Transport(new d.Credentials(e)))}static autoDetect(e=d.PaydunyaEnvironment.LIVE){if(void 0===globalThis.process)throw new Error("Auto detection of credentials is only available in NodeJS environment");return new f(new a.Transport(new d.Credentials({masterKey:process.env.PAYDUNYA_MASTER_KEY||"",privateKey:process.env.PAYDUNYA_PRIVATE_KEY||"",publicKey:process.env.PAYDUNYA_PUBLIC_KEY||"",token:process.env.PAYDUNYA_TOKEN||"",mode:process.env.PAYDUNYA_MODE||e})))}}t.PaydunyaClient=f,s(n(928),t),s(n(546),t),s(n(473),t),s(n(457),t),s(n(94),t),s(n(125),t),s(n(641),t)},641:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Transport=void 0;const s=n(546),o=r(n(425));t.Transport=class{setup;store=void 0;client;constructor(e,t=void 0){this.setup=e,this.store=t,this.client=o.default.create({baseURL:this.baseURL}),this.client.interceptors.request.use(e=>this.setup.extendRequestConfig(e))}get baseURL(){return this.setup.mode===s.PaydunyaEnvironment.TEST?"https://app.paydunya.com/sandbox-api/v1":"https://app.paydunya.com/api/v1"}}},928:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Balance=void 0;const s=r(n(425)),o=n(149);class i{amount;currency;constructor(e,t){this.amount=e,this.currency=t}static parse(e){let[t,n]=e.split(" ");return new i(parseFloat(t||"0"),n?.trim()||"XOF")}}t.Balance=class{transport;axios;constructor(e){this.transport=e,this.axios=s.default.create({baseURL:"https://app.paydunya.com/api/v2"}),this.axios.interceptors.request.use(e=>this.transport.setup.extendRequestConfig(e))}async getAll(){return this.axios.get(o.Endpoints.CHECK_BALANCE).then(e=>{if(e.data.success){let t={};return Object.keys(o.SUPPORTED_COUNTRY_CODES).forEach(n=>{t[n]=i.parse(e.data[`Balance ${n}`])}),t}})}async getBalanceByCountry(e){let t=await this.getAll();if(t&&t[e])return t[e]}async getAccountBalance(e){return this.axios.get(`${o.Endpoints.CHECK_BALANCE}/${e}`).then(e=>{if(e.data.success)return e.data})}}}},t={};function n(r){var s=t[r];if(void 0!==s)return s.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n(568)})(); \ No newline at end of file diff --git a/dist/store.js b/dist/store.js index 1d3b45d..3d0e90f 100644 --- a/dist/store.js +++ b/dist/store.js @@ -55,4 +55,3 @@ class Store { } } exports.Store = Store; -//# sourceMappingURL=store.js.map \ No newline at end of file diff --git a/dist/store.js.map b/dist/store.js.map deleted file mode 100644 index f872f97..0000000 --- a/dist/store.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"store.js","sourceRoot":"","sources":["../src/lib/store.ts"],"names":[],"mappings":";;;AAeA,MAAa,KAAK;IAEd,IAAI,CAAS;IACb,OAAO,CAAU;IACjB,YAAY,CAAU;IACtB,cAAc,CAAU;IACxB,QAAQ,CAAU;IAClB,WAAW,CAAU;IACrB,UAAU,CAAU;IACpB,UAAU,CAAU;IACpB,YAAY,CAAU;IAEtB,YAAY,MAA0B;QAClC,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAC3C,CAAC;QACD,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,MAAM,CAAC,OAAO;YAAE,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;QAClD,IAAI,MAAM,CAAC,YAAY;YAAE,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;QACjE,IAAI,MAAM,CAAC,cAAc;YAAE,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;QACvE,IAAI,MAAM,CAAC,QAAQ;YAAE,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;QACrD,IAAI,MAAM,CAAC,WAAW;YAAE,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;QAC9D,IAAI,MAAM,CAAC,UAAU;YAAE,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QAC3D,IAAI,MAAM,CAAC,UAAU;YAAE,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QAC3D,IAAI,MAAM,CAAC,YAAY;YAAE,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;IACrE,CAAC;IAED,IAAI,QAAQ;QACR,MAAM,GAAG,GAA2B,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;QACxD,IAAI,IAAI,CAAC,OAAO;YAAE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC7C,IAAI,IAAI,CAAC,YAAY;YAAE,GAAG,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;QAC5D,IAAI,IAAI,CAAC,cAAc;YAAE,GAAG,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC;QAClE,IAAI,IAAI,CAAC,QAAQ;YAAE,GAAG,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAChD,IAAI,IAAI,CAAC,WAAW;YAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QACzD,IAAI,IAAI,CAAC,UAAU;YAAE,GAAG,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QACtD,IAAI,IAAI,CAAC,UAAU;YAAE,GAAG,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QACtD,IAAI,IAAI,CAAC,YAAY;YAAE,GAAG,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;QAC5D,OAAO,GAAG,CAAC;IACf,CAAC;CACJ;AAvCD,sBAuCC"} \ No newline at end of file diff --git a/dist/transport.js b/dist/transport.js index 9afe135..2495434 100644 --- a/dist/transport.js +++ b/dist/transport.js @@ -25,4 +25,3 @@ class Transport { } } exports.Transport = Transport; -//# sourceMappingURL=transport.js.map \ No newline at end of file diff --git a/dist/transport.js.map b/dist/transport.js.map deleted file mode 100644 index 4f8feed..0000000 --- a/dist/transport.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"transport.js","sourceRoot":"","sources":["../src/lib/transport.ts"],"names":[],"mappings":";;;;;;AAAA,+CAAiE;AACjE,kDAA0C;AAG1C,MAAa,SAAS;IAClB,KAAK,CAAc;IACnB,KAAK,GAAsB,SAAS,CAAC;IACrC,MAAM,CAAgB;IAEtB,YAAY,KAAkB,EAAE,QAA2B,SAAS;QAChE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,IAAI,CAAC,MAAM,GAAG,eAAK,CAAC,MAAM,CAAC;YACvB,OAAO,EAAE,IAAI,CAAC,OAAO;SACxB,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;YAC5C,OAAO,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAA;QACjD,CAAC,CAAC,CAAC;IACP,CAAC;IAED,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,iCAAmB,CAAC,IAAI,CAAC,CAAC,CAAC,yCAAyC,CAAA,CAAC,CAAC,iCAAiC,CAAA;IACtI,CAAC;CAEJ;AAtBD,8BAsBC"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 6705e3f..7d5f98c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { - "name": "paydunya-sdk", - "version": "1.0.13", + "name": "paydunya", + "version": "1.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "paydunya-sdk", - "version": "1.0.13", + "name": "paydunya", + "version": "1.1.0", "license": "MIT", "dependencies": { "axios": "^1.12.2" diff --git a/src/lib/index.ts b/src/lib/index.ts index 4ce3f28..d11bfc8 100644 --- a/src/lib/index.ts +++ b/src/lib/index.ts @@ -30,10 +30,16 @@ export class PaydunyaClient { return new CheckoutInvoice(this.transport); } + /** + * @deprecated - OnsiteInvoice endpoint seems to be deprecated + */ onsiteInvoiceInstance() { return new OnsiteInvoice(this.transport); } + /** + * @deprecated - Direct Pay endpoint seems to be deprecated + */ directpayInstance() { return new DirectPay(this.transport); } @@ -78,4 +84,12 @@ export class PaydunyaClient { return client; } -} \ No newline at end of file +} + +export * from "./balance"; +export * from "./credentials"; +export * from "./errors"; +export * from "./invoices/checkout"; +export * from "./invoices/invoice"; +export * from "./store"; +export * from "./transport"; \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 7c90cd3..38799a7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,7 +11,7 @@ // For nodejs: "lib": ["esnext"], "types": ["node", "jest"], - "sourceMap": true, + "sourceMap": false, // Stricter Typechecking Options "noUncheckedIndexedAccess": true, "exactOptionalPropertyTypes": true, From 47a1c454da9a818486804aabbfa569e19abbc7b6 Mon Sep 17 00:00:00 2001 From: Maximilien COMLAN Date: Wed, 15 Oct 2025 22:57:39 +0100 Subject: [PATCH 19/20] updated readme doc --- README.md | 47 ++++++++++++++++++----------------------------- 1 file changed, 18 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 613ac7b..4a7dd89 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Built on the PAYDUNYA HTTP API. ## Installation ```typescript -npm install --save paydunya-sdk +npm install --save paydunya ``` ## API configuration @@ -17,13 +17,14 @@ npm install --save paydunya-sdk Setup paydunya API keys. ```typescript -import { PaydunyaClient } from "paydunya-sdk" +import { PaydunyaClient, PaydunyaEnvironment } from "paydunya" + let client = PaydunyaClient.fromCredentials({ masterKey: "your-master-key", privateKey: "your-private-key", publicKey: "your-public-key", token: "your-token", - mode: "test" // or "live" + mode: PaydunyaEnvironment.TEST // or PaydunyaEnvironment.LIVE }) ``` @@ -32,8 +33,12 @@ It might be suitable for you to put your API configuration in environment variab In that case, instantiate your client with these parameters. ```typescript -import { PaydunyaClient } from "paydunya-sdk" -let client = PaydunyaClient.autoDetect() +import { PaydunyaClient, PaydunyaEnvironment } from "paydunya" + +// if you want automatic environment detection +let client = PaydunyaClient.autoDetect() +// if you want manual environment configuration +let client = PaydunyaClient.autoDetect(PaydunyaEnvironment.LIVE) // Or PaydunyaEnvironment.TEST ``` In that case please pass the following keys in your environment: @@ -47,13 +52,13 @@ In that case please pass the following keys in your environment: ## Checkout Store Configuration ```typescript -import {Store} from "paydunya-sdk/store" +import { Store } from "paydunya" let store = new Store({ - name: 'Magasin Chez Sandra', // only name is required - tagline: "L'élégance n'a pas de prix", - phoneNumber: '336530583', - postalAddress: 'Dakar Plateau - Etablissement kheweul', - logoURL: 'http://www.chez-sandra.sn/logo.png' + name: 'Magasin Chez Sandra', // only name is required + tagline: "L'élégance n'a pas de prix", + phone_number: '336530583', + postal_address: 'Dakar Plateau - Etablissement kheweul', + logo_url: 'http://www.chez-sandra.sn/logo.png' }); ``` @@ -201,30 +206,14 @@ invoice.confirm(token) }); ``` -## DirectPay -You can pay any paydunya account directly via your third party apps. This is particularly excellent for implementing your own Adaptive payment solutions on top of paydunya. - -```typescript -var directPay = new client.directpayInstance(setup); -directPay.creditAccount('alioune@gmail.com', 5000) - .then(function (result){ - result.description; - result.responseText; - result.transactionID; - }) - .catch(function (e) { - console.log(e); - }); -``` - # Running Tests To run tests just setup the API configuration environment variables. An internet connection is required for some of the tests to pass. ```typescript -npm install -g mocha +npm install ``` Then -`npm test` or `mocha` +`npm test` ## License MIT \ No newline at end of file From e46918f3907e4e93944bd0b0264017f6250cfb8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilien=20Th=C3=A9ophane=20COMLAN?= <53523971+theophane05@users.noreply.github.com> Date: Thu, 16 Oct 2025 09:00:16 +0100 Subject: [PATCH 20/20] Update .env.local --- __tests__/.env.local | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/__tests__/.env.local b/__tests__/.env.local index 8d74cda..4b5f6b7 100644 --- a/__tests__/.env.local +++ b/__tests__/.env.local @@ -1,4 +1,4 @@ -PAYDUNYA_MASTER_KEY=JhByj8C1-PTtU-ucie-NFOP-M0TEug8grSsf -PAYDUNYA_PRIVATE_KEY=test_private_MrduDEpcRR0UdKaXyALrtHD0JAH -PAYDUNYA_PUBLIC_KEY=test_public_dtUH0u5ARkmCGFGaJEons9jnVfB -PAYDUNYA_TOKEN=Fo2285p8dhbg4WIViNFo \ No newline at end of file +PAYDUNYA_MASTER_KEY= +PAYDUNYA_PRIVATE_KEY= +PAYDUNYA_PUBLIC_KEY= +PAYDUNYA_TOKEN= \ No newline at end of file