From ec0f4d6c5c73c3cbf708a6679eeb049e0a06b2c5 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Mon, 14 Apr 2025 15:26:47 -0700 Subject: [PATCH 01/35] feat: add array and value with ids (claude) --- src/js/ArrayWithIds.ts | 241 +++++++++++++++++++++++++++++++++++++++++ src/js/ValueWithId.ts | 56 ++++++++++ 2 files changed, 297 insertions(+) create mode 100644 src/js/ArrayWithIds.ts create mode 100644 src/js/ValueWithId.ts diff --git a/src/js/ArrayWithIds.ts b/src/js/ArrayWithIds.ts new file mode 100644 index 00000000..7b18ccb3 --- /dev/null +++ b/src/js/ArrayWithIds.ts @@ -0,0 +1,241 @@ +import { ValueWithId } from "./ValueWithId"; + +/** + * Represents an array of values with associated IDs. + */ +export class ArrayWithIds { + constructor(public values: T[] = [], public ids: number[] = []) { + // Ensure ids array is the same length as values array + if (values.length !== ids.length) { + throw new Error("Values and IDs arrays must have the same length"); + } + } + + /** + * Creates an ArrayWithIds instance from a list of values. + * Automatically assigns sequential IDs starting from 0. + */ + static fromValues(values: T[]): ArrayWithIds { + try { + const ids = Array.from({ length: values.length }, (_, i) => i); + return new ArrayWithIds(values, ids); + } catch (error) { + throw new Error("Values must be an array"); + } + } + + /** + * Extracts values and ids from an array of objects with 'id' and 'value' properties. + */ + static getValuesAndIdsFromListOfDicts( + listOfDicts: Array<{ id: number; value: T }>, + ): [T[], number[]] { + try { + const values = listOfDicts.map((item) => item.value); + const ids = listOfDicts.map((item) => item.id); + return [values, ids]; + } catch (error) { + throw new Error("List of dictionaries must contain 'id' and 'value' keys"); + } + } + + /** + * Creates an ArrayWithIds instance from an array of objects with 'id' and 'value' properties. + */ + static fromListOfDicts(listOfDicts: Array<{ id: number; value: T }>): ArrayWithIds { + try { + const [values, ids] = ArrayWithIds.getValuesAndIdsFromListOfDicts(listOfDicts); + return new ArrayWithIds(values, ids); + } catch (error) { + throw new Error("List of dictionaries must contain 'id' and 'value' keys"); + } + } + + /** + * Converts the instance to an array of objects with 'id' and 'value' properties. + */ + toDict(): Array<{ id: number; value: any }> { + return this.toArrayOfValuesWithIds().map((x) => x.toDict()); + } + + /** + * Converts the instance to a JSON string. + */ + toJson(): string { + return JSON.stringify(this.toDict()); + } + + /** + * Converts the instance to an array of ValueWithId objects. + */ + toArrayOfValuesWithIds(): ValueWithId[] { + return this.values.map((value, index) => new ValueWithId(this.ids[index], value)); + } + + /** + * Gets the value at the specified index. + */ + getElementValueByIndex(index: number): T | undefined { + return index < this.values.length ? this.values[index] : undefined; + } + + /** + * Gets the ID associated with a specific value. + */ + getElementIdByValue(value: T): number | undefined { + const index = this.values.findIndex((v) => { + if (Array.isArray(v) && Array.isArray(value)) { + if (v.length !== (value as any).length) return false; + for (let i = 0; i < v.length; i++) { + if (v[i] !== (value as any)[i]) return false; + } + return true; + } + return v === value; + }); + + return index !== -1 ? this.ids[index] : undefined; + } + + /** + * Filters the instance to only include items with values in the specified list. + */ + filterByValues(valuesToKeep: T | T[]): void { + const makeHashable = (value: any): string => { + return Array.isArray(value) ? JSON.stringify(value) : String(value); + }; + + const valuesToKeepSet = new Set( + Array.isArray(valuesToKeep) + ? valuesToKeep.map(makeHashable) + : [makeHashable(valuesToKeep)], + ); + + const filteredItems: [T, number][] = []; + + for (let i = 0; i < this.values.length; i++) { + const hashedValue = makeHashable(this.values[i]); + if (valuesToKeepSet.has(hashedValue)) { + filteredItems.push([this.values[i], this.ids[i]]); + } + } + + if (filteredItems.length > 0) { + this.values = filteredItems.map(([value]) => value); + this.ids = filteredItems.map(([_, id]) => id); + } else { + this.values = []; + this.ids = []; + } + } + + /** + * Filters the instance to only include items at the specified indices. + */ + filterByIndices(indices: number | number[]): void { + const indexSet = new Set(Array.isArray(indices) ? indices : [indices]); + const newValues: T[] = []; + const newIds: number[] = []; + + for (let i = 0; i < this.values.length; i++) { + if (indexSet.has(i)) { + newValues.push(this.values[i]); + newIds.push(this.ids[i]); + } + } + + this.values = newValues; + this.ids = newIds; + } + + /** + * Filters the instance to only include items with the specified IDs. + */ + filterByIds(ids: number | number[], invert = false): void { + const idsArray = Array.isArray(ids) ? ids : [ids]; + const idsSet = invert + ? new Set(this.ids.filter((id) => !idsArray.includes(id))) + : new Set(idsArray); + + const keepIndices = this.ids + .map((id, index) => (idsSet.has(id) ? index : -1)) + .filter((index) => index !== -1); + + this.values = keepIndices.map((index) => this.values[index]); + this.ids = keepIndices.map((index) => this.ids[index]); + } + + /** + * Checks if this instance is equal to another ArrayWithIds. + */ + equals(other: ArrayWithIds): boolean { + if (!(other instanceof ArrayWithIds)) { + return false; + } + + if (this.values.length !== other.values.length || this.ids.length !== other.ids.length) { + return false; + } + + for (let i = 0; i < this.values.length; i++) { + // Compare arrays element by element + if (Array.isArray(this.values[i]) && Array.isArray(other.values[i])) { + const a = this.values[i] as any[]; + const b = other.values[i] as any[]; + + if (a.length !== b.length) { + return false; + } + + for (let j = 0; j < a.length; j++) { + if (a[j] !== b[j]) { + return false; + } + } + } else if (this.values[i] !== other.values[i]) { + return false; + } + + if (this.ids[i] !== other.ids[i]) { + return false; + } + } + + return true; + } + + /** + * Applies a transformation function to all values in place. + */ + mapArrayInPlace(func: (value: T) => T): void { + this.values = this.values.map(func); + } + + /** + * Adds a new item to the array. + */ + addItem(element: T, id?: number): void { + const newId = id !== undefined ? id : Math.max(...this.ids, -1) + 1; + this.values.push(element); + this.ids.push(newId); + } + + /** + * Removes an item by index or ID. + */ + removeItem(index: number, id?: number): void { + if (id !== undefined) { + index = this.ids.indexOf(id); + if (index === -1) { + throw new Error("ID not found in the list"); + } + } + + if (index < this.values.length) { + this.values.splice(index, 1); + this.ids.splice(index, 1); + } else { + throw new Error("Index out of range"); + } + } +} diff --git a/src/js/ValueWithId.ts b/src/js/ValueWithId.ts new file mode 100644 index 00000000..0b156bab --- /dev/null +++ b/src/js/ValueWithId.ts @@ -0,0 +1,56 @@ +/** + * Represents a value with an associated ID. + */ +export class ValueWithId { + constructor(public id: number = 0, public value: T = null as unknown as T) {} + + /** + * Converts the instance to a plain object. + */ + toDict(): { id: number; value: any } { + // If value has a toDict method, call it + if ( + this.value !== null && + typeof this.value === "object" && + "toDict" in this.value && + typeof (this.value as any).toDict === "function" + ) { + return { id: this.id, value: (this.value as any).toDict() }; + } + return { id: this.id, value: this.value }; + } + + /** + * Converts the instance to a JSON string. + */ + toJson(): string { + return JSON.stringify(this.toDict()); + } + + /** + * Checks if this instance is equal to another ValueWithId. + */ + equals(other: ValueWithId): boolean { + if (!(other instanceof ValueWithId)) { + return false; + } + + // Handle array comparison + if (Array.isArray(this.value) && Array.isArray(other.value)) { + if (this.value.length !== other.value.length) { + return false; + } + + for (let i = 0; i < this.value.length; i++) { + if (this.value[i] !== other.value[i]) { + return false; + } + } + + return this.id === other.id; + } + + // Handle regular value comparison + return this.id === other.id && this.value === other.value; + } +} From 84bdf4e407c0d82e2d1d7821bc89c725d822d7d0 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Mon, 14 Apr 2025 16:45:47 -0700 Subject: [PATCH 02/35] update: adjust value with id + add tests --- src/js/ValueWithId.ts | 32 +++++++++------------- tests/js/valueWithId.tests.ts | 50 +++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 19 deletions(-) create mode 100644 tests/js/valueWithId.tests.ts diff --git a/src/js/ValueWithId.ts b/src/js/ValueWithId.ts index 0b156bab..412e9163 100644 --- a/src/js/ValueWithId.ts +++ b/src/js/ValueWithId.ts @@ -1,32 +1,28 @@ -/** - * Represents a value with an associated ID. - */ export class ValueWithId { - constructor(public id: number = 0, public value: T = null as unknown as T) {} + id: number; + + value: T | null; + + constructor(id = 0, value: T | null = null) { + this.id = id; + this.value = value; + } /** - * Converts the instance to a plain object. + * Converts the instance to a plain JavaScript object. */ - toDict(): { id: number; value: any } { - // If value has a toDict method, call it + toJSON(): object { if ( this.value !== null && typeof this.value === "object" && - "toDict" in this.value && - typeof (this.value as any).toDict === "function" + "toJSON" in this.value && + typeof (this.value as any).toJSON === "function" ) { - return { id: this.id, value: (this.value as any).toDict() }; + return { id: this.id, value: (this.value as any).toJSON() }; } return { id: this.id, value: this.value }; } - /** - * Converts the instance to a JSON string. - */ - toJson(): string { - return JSON.stringify(this.toDict()); - } - /** * Checks if this instance is equal to another ValueWithId. */ @@ -35,7 +31,6 @@ export class ValueWithId { return false; } - // Handle array comparison if (Array.isArray(this.value) && Array.isArray(other.value)) { if (this.value.length !== other.value.length) { return false; @@ -50,7 +45,6 @@ export class ValueWithId { return this.id === other.id; } - // Handle regular value comparison return this.id === other.id && this.value === other.value; } } diff --git a/tests/js/valueWithId.tests.ts b/tests/js/valueWithId.tests.ts new file mode 100644 index 00000000..0ff7db1c --- /dev/null +++ b/tests/js/valueWithId.tests.ts @@ -0,0 +1,50 @@ +import { expect } from "chai"; + +import { ValueWithId } from "../../src/js/ValueWithId"; + +const defaultId = 0; +const defaultValue = null; + +const testId = 1; +const testValue = "testValue"; +const differentValue = "differentValue"; + +describe("ValueWithId Tests", () => { + it("should create with default values", () => { + const valueWithId = new ValueWithId(); + expect(valueWithId.id).to.equal(defaultId); + expect(valueWithId.value).to.be.equal(defaultValue); + }); + + it("should create with specified id and value", () => { + const valueWithId = new ValueWithId(testId, testValue); + expect(valueWithId.id).to.equal(testId); + expect(valueWithId.value).to.be.equal(testValue); + }); + + it("should convert to JSON format", () => { + const valueWithId = new ValueWithId(testId, testValue); + const jsonResult = valueWithId.toJSON(); + expect(jsonResult).to.deep.equal({ id: testId, value: testValue }); + }); + + it("should correctly compare equality with primitive values", () => { + const a = new ValueWithId(testId, testValue); + const b = new ValueWithId(testId, testValue); + const c = new ValueWithId(testId, differentValue); + + expect(a.equals(b)).to.equal(true); + expect(a.equals(c)).to.equal(false); + }); + + it("should correctly compare equality with array values", () => { + const a = new ValueWithId(5, [1, 2, 3]); + const b = new ValueWithId(5, [1, 2, 3]); + const c = new ValueWithId(5, [1, 2, 4]); + const d = new ValueWithId(5, [1, 2]); + + expect(a.equals(b)).to.equal(true); + expect(a.equals(c)).to.equal(false); + expect(a.equals(d)).to.equal(false); + }); +}); From abcc843e0bedf6edb9de0c73e570090998f62821 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Mon, 14 Apr 2025 16:51:31 -0700 Subject: [PATCH 03/35] chore: value, id order --- src/js/ValueWithId.ts | 8 ++++---- tests/js/valueWithId.tests.ts | 18 +++++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/js/ValueWithId.ts b/src/js/ValueWithId.ts index 412e9163..6104bc41 100644 --- a/src/js/ValueWithId.ts +++ b/src/js/ValueWithId.ts @@ -1,11 +1,11 @@ export class ValueWithId { - id: number; - value: T | null; - constructor(id = 0, value: T | null = null) { - this.id = id; + id: number; + + constructor(value: T | null = null, id = 0) { this.value = value; + this.id = id; } /** diff --git a/tests/js/valueWithId.tests.ts b/tests/js/valueWithId.tests.ts index 0ff7db1c..b396782c 100644 --- a/tests/js/valueWithId.tests.ts +++ b/tests/js/valueWithId.tests.ts @@ -17,31 +17,31 @@ describe("ValueWithId Tests", () => { }); it("should create with specified id and value", () => { - const valueWithId = new ValueWithId(testId, testValue); + const valueWithId = new ValueWithId(testValue, testId); expect(valueWithId.id).to.equal(testId); expect(valueWithId.value).to.be.equal(testValue); }); it("should convert to JSON format", () => { - const valueWithId = new ValueWithId(testId, testValue); + const valueWithId = new ValueWithId(testValue, testId); const jsonResult = valueWithId.toJSON(); expect(jsonResult).to.deep.equal({ id: testId, value: testValue }); }); it("should correctly compare equality with primitive values", () => { - const a = new ValueWithId(testId, testValue); - const b = new ValueWithId(testId, testValue); - const c = new ValueWithId(testId, differentValue); + const a = new ValueWithId(testValue, testId); + const b = new ValueWithId(testValue, testId); + const c = new ValueWithId(differentValue, testId); expect(a.equals(b)).to.equal(true); expect(a.equals(c)).to.equal(false); }); it("should correctly compare equality with array values", () => { - const a = new ValueWithId(5, [1, 2, 3]); - const b = new ValueWithId(5, [1, 2, 3]); - const c = new ValueWithId(5, [1, 2, 4]); - const d = new ValueWithId(5, [1, 2]); + const a = new ValueWithId([1, 2, 3], testId); + const b = new ValueWithId([1, 2, 3], testId); + const c = new ValueWithId([1, 2, 4], testId); + const d = new ValueWithId([1, 2, 3], testId + 1); expect(a.equals(b)).to.equal(true); expect(a.equals(c)).to.equal(false); From 8847c2fd7d456e703848deb3793edd266405d3e2 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Mon, 14 Apr 2025 17:27:42 -0700 Subject: [PATCH 04/35] update: adjust array with ids --- src/js/ArrayWithIds.ts | 256 +++++++++++------------------------------ 1 file changed, 70 insertions(+), 186 deletions(-) diff --git a/src/js/ArrayWithIds.ts b/src/js/ArrayWithIds.ts index 7b18ccb3..9a111591 100644 --- a/src/js/ArrayWithIds.ts +++ b/src/js/ArrayWithIds.ts @@ -1,241 +1,125 @@ import { ValueWithId } from "./ValueWithId"; -/** - * Represents an array of values with associated IDs. - */ export class ArrayWithIds { - constructor(public values: T[] = [], public ids: number[] = []) { - // Ensure ids array is the same length as values array - if (values.length !== ids.length) { - throw new Error("Values and IDs arrays must have the same length"); - } - } + values: T[]; - /** - * Creates an ArrayWithIds instance from a list of values. - * Automatically assigns sequential IDs starting from 0. - */ - static fromValues(values: T[]): ArrayWithIds { - try { - const ids = Array.from({ length: values.length }, (_, i) => i); - return new ArrayWithIds(values, ids); - } catch (error) { - throw new Error("Values must be an array"); - } - } + ids: number[]; - /** - * Extracts values and ids from an array of objects with 'id' and 'value' properties. - */ - static getValuesAndIdsFromListOfDicts( - listOfDicts: Array<{ id: number; value: T }>, - ): [T[], number[]] { - try { - const values = listOfDicts.map((item) => item.value); - const ids = listOfDicts.map((item) => item.id); - return [values, ids]; - } catch (error) { - throw new Error("List of dictionaries must contain 'id' and 'value' keys"); + constructor(values: T[] = [], ids: number[] = []) { + if (values.length !== ids.length) { + throw new Error("Values and IDs must have the same length"); } + this.values = values; + this.ids = ids; } - /** - * Creates an ArrayWithIds instance from an array of objects with 'id' and 'value' properties. - */ - static fromListOfDicts(listOfDicts: Array<{ id: number; value: T }>): ArrayWithIds { - try { - const [values, ids] = ArrayWithIds.getValuesAndIdsFromListOfDicts(listOfDicts); - return new ArrayWithIds(values, ids); - } catch (error) { - throw new Error("List of dictionaries must contain 'id' and 'value' keys"); - } + static fromValues(values: T[]): ArrayWithIds { + const ids = values.map((_, i) => i); + return new ArrayWithIds(values, ids); } - /** - * Converts the instance to an array of objects with 'id' and 'value' properties. - */ - toDict(): Array<{ id: number; value: any }> { - return this.toArrayOfValuesWithIds().map((x) => x.toDict()); + static fromObjects(objects: Array<{ id: number; value: T }>): ArrayWithIds { + const values = objects.map((item) => item.value); + const ids = objects.map((item) => item.id); + return new ArrayWithIds(values, ids); } - /** - * Converts the instance to a JSON string. - */ - toJson(): string { - return JSON.stringify(this.toDict()); + toJSON(): object[] { + return this.values.map((value, index) => ({ + id: this.ids[index], + value: + value !== null && + typeof value === "object" && + "toJSON" in value && + typeof (value as any).toJSON === "function" + ? (value as any).toJSON() + : value, + })); } - /** - * Converts the instance to an array of ValueWithId objects. - */ - toArrayOfValuesWithIds(): ValueWithId[] { - return this.values.map((value, index) => new ValueWithId(this.ids[index], value)); + toValueWithIdArray(): ValueWithId[] { + return this.values.map((value, index) => new ValueWithId(value, this.ids[index])); } - /** - * Gets the value at the specified index. - */ getElementValueByIndex(index: number): T | undefined { - return index < this.values.length ? this.values[index] : undefined; + return this.values[index]; } - /** - * Gets the ID associated with a specific value. - */ getElementIdByValue(value: T): number | undefined { - const index = this.values.findIndex((v) => { - if (Array.isArray(v) && Array.isArray(value)) { - if (v.length !== (value as any).length) return false; - for (let i = 0; i < v.length; i++) { - if (v[i] !== (value as any)[i]) return false; - } - return true; - } - return v === value; - }); - + const index = this.values.findIndex((v) => + Array.isArray(v) && Array.isArray(value) + ? v.length === value.length && v.every((val, idx) => val === value[idx]) + : v === value, + ); return index !== -1 ? this.ids[index] : undefined; } - /** - * Filters the instance to only include items with values in the specified list. - */ filterByValues(valuesToKeep: T | T[]): void { - const makeHashable = (value: any): string => { - return Array.isArray(value) ? JSON.stringify(value) : String(value); - }; - - const valuesToKeepSet = new Set( - Array.isArray(valuesToKeep) - ? valuesToKeep.map(makeHashable) - : [makeHashable(valuesToKeep)], + const toHash = (v: any) => (Array.isArray(v) ? JSON.stringify(v) : String(v)); + const keepSet = new Set( + Array.isArray(valuesToKeep) ? valuesToKeep.map(toHash) : [toHash(valuesToKeep)], ); - const filteredItems: [T, number][] = []; - - for (let i = 0; i < this.values.length; i++) { - const hashedValue = makeHashable(this.values[i]); - if (valuesToKeepSet.has(hashedValue)) { - filteredItems.push([this.values[i], this.ids[i]]); - } - } + const filtered = this.values + .map((value, i) => [value, this.ids[i]] as [T, number]) + .filter(([value]) => keepSet.has(toHash(value))); - if (filteredItems.length > 0) { - this.values = filteredItems.map(([value]) => value); - this.ids = filteredItems.map(([_, id]) => id); - } else { - this.values = []; - this.ids = []; - } + this.values = filtered.map(([v]) => v); + this.ids = filtered.map(([_, id]) => id); } - /** - * Filters the instance to only include items at the specified indices. - */ filterByIndices(indices: number | number[]): void { - const indexSet = new Set(Array.isArray(indices) ? indices : [indices]); - const newValues: T[] = []; - const newIds: number[] = []; - - for (let i = 0; i < this.values.length; i++) { - if (indexSet.has(i)) { - newValues.push(this.values[i]); - newIds.push(this.ids[i]); - } - } - - this.values = newValues; - this.ids = newIds; + const keepSet = new Set(Array.isArray(indices) ? indices : [indices]); + this.values = this.values.filter((_, i) => keepSet.has(i)); + this.ids = this.ids.filter((_, i) => keepSet.has(i)); } - /** - * Filters the instance to only include items with the specified IDs. - */ filterByIds(ids: number | number[], invert = false): void { - const idsArray = Array.isArray(ids) ? ids : [ids]; - const idsSet = invert - ? new Set(this.ids.filter((id) => !idsArray.includes(id))) - : new Set(idsArray); + const idSet = new Set(Array.isArray(ids) ? ids : [ids]); + const keep = invert + ? this.ids.map((id, i) => (idSet.has(id) ? -1 : i)).filter((i) => i >= 0) + : this.ids.map((id, i) => (idSet.has(id) ? i : -1)).filter((i) => i >= 0); - const keepIndices = this.ids - .map((id, index) => (idsSet.has(id) ? index : -1)) - .filter((index) => index !== -1); - - this.values = keepIndices.map((index) => this.values[index]); - this.ids = keepIndices.map((index) => this.ids[index]); + this.values = keep.map((i) => this.values[i]); + this.ids = keep.map((i) => this.ids[i]); } - /** - * Checks if this instance is equal to another ArrayWithIds. - */ equals(other: ArrayWithIds): boolean { - if (!(other instanceof ArrayWithIds)) { - return false; - } - - if (this.values.length !== other.values.length || this.ids.length !== other.ids.length) { - return false; - } - - for (let i = 0; i < this.values.length; i++) { - // Compare arrays element by element - if (Array.isArray(this.values[i]) && Array.isArray(other.values[i])) { - const a = this.values[i] as any[]; - const b = other.values[i] as any[]; - - if (a.length !== b.length) { - return false; - } - - for (let j = 0; j < a.length; j++) { - if (a[j] !== b[j]) { - return false; - } - } - } else if (this.values[i] !== other.values[i]) { - return false; - } - - if (this.ids[i] !== other.ids[i]) { - return false; - } - } - - return true; + if (!(other instanceof ArrayWithIds)) return false; + if (this.values.length !== other.values.length) return false; + if (this.ids.length !== other.ids.length) return false; + + return ( + this.values.every((v, i) => { + const ov = other.values[i]; + return Array.isArray(v) && Array.isArray(ov) + ? v.length === ov.length && v.every((val, idx) => val === ov[idx]) + : v === ov; + }) && this.ids.every((id, i) => id === other.ids[i]) + ); } - /** - * Applies a transformation function to all values in place. - */ mapArrayInPlace(func: (value: T) => T): void { this.values = this.values.map(func); } - /** - * Adds a new item to the array. - */ - addItem(element: T, id?: number): void { - const newId = id !== undefined ? id : Math.max(...this.ids, -1) + 1; - this.values.push(element); + addItem(value: T, id?: number): void { + const newId = id ?? Math.max(-1, ...this.ids) + 1; + this.values.push(value); this.ids.push(newId); } - /** - * Removes an item by index or ID. - */ removeItem(index: number, id?: number): void { if (id !== undefined) { index = this.ids.indexOf(id); - if (index === -1) { - throw new Error("ID not found in the list"); - } + if (index === -1) throw new Error("ID not found"); } - if (index < this.values.length) { - this.values.splice(index, 1); - this.ids.splice(index, 1); - } else { + if (index < 0 || index >= this.values.length) { throw new Error("Index out of range"); } + + this.values.splice(index, 1); + this.ids.splice(index, 1); } } From 6d2ca01a04c7dc0103e242eabace0db546af7f2c Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Mon, 14 Apr 2025 17:28:12 -0700 Subject: [PATCH 05/35] update: add tests for array with ids --- tests/js/arrayWithIds.tests.ts | 144 +++++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 tests/js/arrayWithIds.tests.ts diff --git a/tests/js/arrayWithIds.tests.ts b/tests/js/arrayWithIds.tests.ts new file mode 100644 index 00000000..4c808a65 --- /dev/null +++ b/tests/js/arrayWithIds.tests.ts @@ -0,0 +1,144 @@ +import { expect } from "chai"; + +import { ArrayWithIds } from "../../src/js/ArrayWithIds"; +import { ValueWithId } from "../../src/js/ValueWithId"; + +const NUMBERS = [1, 2, 3, 4, 5]; +const STRINGS = ["value1", "value2", "value3", "value4", "value5"]; + +const OBJECTS_WITH_IDS = [ + { id: 10, value: "value1" }, + { id: 20, value: "value2" }, + { id: 30, value: "value3" }, +]; + +const ARRAY_VALUES = [ + [1, 2], + [3, 4], + [5, 6], +]; + +describe("ArrayWithIds Tests", () => { + it("should create from values with sequential IDs", () => { + const arrayWithIds = ArrayWithIds.fromValues(NUMBERS.slice(0, 3)); + expect(arrayWithIds.values).to.deep.equal([1, 2, 3]); + expect(arrayWithIds.ids).to.deep.equal([0, 1, 2]); + }); + + it("should create from objects with id and value properties", () => { + const arrayWithIds = ArrayWithIds.fromObjects(OBJECTS_WITH_IDS); + expect(arrayWithIds.values).to.deep.equal(["value1", "value2", "value3"]); + expect(arrayWithIds.ids).to.deep.equal([10, 20, 30]); + }); + + it("should convert to JSON format", () => { + const arrayWithIds = ArrayWithIds.fromObjects(OBJECTS_WITH_IDS); + expect(arrayWithIds.toJSON()).to.deep.equal(OBJECTS_WITH_IDS); + }); + + it("should get element value by index", () => { + const arrayWithIds = ArrayWithIds.fromValues(STRINGS.slice(0, 3)); + expect(arrayWithIds.getElementValueByIndex(1)).to.equal("value2"); + expect(arrayWithIds.getElementValueByIndex(10)).to.equal(undefined); + }); + + it("should get element ID by value", () => { + const arrayWithIds = ArrayWithIds.fromValues(STRINGS.slice(0, 3)); + expect(arrayWithIds.getElementIdByValue("value3")).to.equal(2); + expect(arrayWithIds.getElementIdByValue("valueX")).to.equal(undefined); + }); + + it("should filter by values", () => { + const arrayWithIds = ArrayWithIds.fromValues(ARRAY_VALUES); + const filterValues = [ + [1, 2], + [5, 6], + ]; + arrayWithIds.filterByValues(filterValues); + expect(arrayWithIds.values).to.deep.equal(filterValues); + expect(arrayWithIds.ids).to.deep.equal([0, 2]); + }); + + it("should filter by indices", () => { + const arrayWithIds = ArrayWithIds.fromValues(NUMBERS); + arrayWithIds.filterByIndices([1, 3]); + expect(arrayWithIds.values).to.deep.equal([2, 4]); + expect(arrayWithIds.ids).to.deep.equal([1, 3]); + }); + + it("should filter by IDs", () => { + const arrayWithIds = ArrayWithIds.fromValues(STRINGS); + arrayWithIds.filterByIds([0, 2, 4]); + expect(arrayWithIds.values).to.deep.equal(["value1", "value3", "value5"]); + expect(arrayWithIds.ids).to.deep.equal([0, 2, 4]); + }); + + it("should map array in-place", () => { + const arrayWithIds = ArrayWithIds.fromValues(STRINGS.slice(0, 3)); + arrayWithIds.mapArrayInPlace((v) => v.toUpperCase()); + expect(arrayWithIds.values).to.deep.equal(["VALUE1", "VALUE2", "VALUE3"]); + }); + + it("should add items with auto-incrementing IDs", () => { + const arrayWithIds = ArrayWithIds.fromValues(STRINGS.slice(0, 3)); + arrayWithIds.addItem("value4"); + expect(arrayWithIds.values).to.deep.equal(["value1", "value2", "value3", "value4"]); + expect(arrayWithIds.ids).to.deep.equal([0, 1, 2, 3]); + }); + + it("should add items with specified IDs", () => { + const arrayWithIds = ArrayWithIds.fromValues(STRINGS.slice(0, 3)); + arrayWithIds.addItem("value4", 99); + expect(arrayWithIds.values).to.deep.equal(["value1", "value2", "value3", "value4"]); + expect(arrayWithIds.ids).to.deep.equal([0, 1, 2, 99]); + }); + + it("should remove item by index", () => { + const arrayWithIds = ArrayWithIds.fromValues(STRINGS.slice(0, 3)); + arrayWithIds.removeItem(1); + expect(arrayWithIds.values).to.deep.equal(["value1", "value3"]); + expect(arrayWithIds.ids).to.deep.equal([0, 2]); + }); + + it("should remove item by ID", () => { + const arrayWithIds = ArrayWithIds.fromValues(STRINGS.slice(0, 3)); + arrayWithIds.removeItem(0, 1); + expect(arrayWithIds.values).to.deep.equal(["value1", "value3"]); + expect(arrayWithIds.ids).to.deep.equal([0, 2]); + }); + + it("should throw error when removing by non-existent ID", () => { + const arrayWithIds = ArrayWithIds.fromValues(STRINGS.slice(0, 3)); + expect(() => arrayWithIds.removeItem(0, 99)).to.throw("ID not found"); + }); + + it("should throw error when removing by out-of-range index", () => { + const arrayWithIds = ArrayWithIds.fromValues(STRINGS.slice(0, 3)); + expect(() => arrayWithIds.removeItem(99)).to.throw("Index out of range"); + }); + + it("should correctly compare equality", () => { + const a = ArrayWithIds.fromValues(NUMBERS.slice(0, 3)); + const b = ArrayWithIds.fromValues(NUMBERS.slice(0, 3)); + const c = ArrayWithIds.fromValues([1, 2, 4]); + + expect(a.equals(b)).to.equal(true); + expect(a.equals(c)).to.equal(false); + + const d = new ArrayWithIds([1, 2, 3], [0, 1, 2]); + expect(a.equals(d)).to.equal(true); + + const e = new ArrayWithIds([1, 2, 3], [10, 20, 30]); + expect(a.equals(e)).to.equal(false); + }); + + it("should convert to array of ValueWithId objects", () => { + const arrayWithIds = ArrayWithIds.fromValues(NUMBERS.slice(0, 3)); + const valueWithIdArray = arrayWithIds.toValueWithIdArray(); + + expect(valueWithIdArray.length).to.equal(3); + expect(valueWithIdArray[0]).to.be.instanceOf(ValueWithId); + expect(valueWithIdArray[0].id).to.equal(0); + expect(valueWithIdArray[0].value).to.equal(1); + }); +}); From f77412b764c38a693ce24c1dd22e0fd6867290b9 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Mon, 14 Apr 2025 19:59:17 -0700 Subject: [PATCH 06/35] update: add rounded class --- src/js/ValueWithId.ts | 42 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/src/js/ValueWithId.ts b/src/js/ValueWithId.ts index 6104bc41..41b983c6 100644 --- a/src/js/ValueWithId.ts +++ b/src/js/ValueWithId.ts @@ -1,11 +1,13 @@ -export class ValueWithId { - value: T | null; +import { math, RoundingMethodEnum } from "./math"; +export class ValueWithId { id: number; - constructor(value: T | null = null, id = 0) { - this.value = value; + value: T | null; + + constructor(id = 0, value: T | null = null) { this.id = id; + this.value = value; } /** @@ -48,3 +50,35 @@ export class ValueWithId { return this.id === other.id && this.value === other.value; } } + +export interface RoundingOptions { + precision: number; + roundingMethod: RoundingMethodEnum; +} + +export const defaultRoundingOptions: RoundingOptions = { + precision: 9, + roundingMethod: RoundingMethodEnum.HalfAwayFromZero, +}; + +export class RoundedValueWithId extends ValueWithId { + readonly precision: number; + + readonly roundingMethod: RoundingMethodEnum; + + constructor(id: number, value: T, options: RoundingOptions = defaultRoundingOptions) { + super(id, value); + this.precision = options.precision; + this.roundingMethod = options.roundingMethod; + } + + override toJSON(): object { + const roundFn = (v: number) => math.roundCustom(v, this.precision, this.roundingMethod); + + const roundedValue = Array.isArray(this.value) + ? this.value.map(roundFn) + : roundFn(this.value as number); + + return { id: this.id, value: roundedValue }; + } +} From 4d5ab3947b61690095ba50af07bdc22f8cfbb02b Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Mon, 14 Apr 2025 20:07:44 -0700 Subject: [PATCH 07/35] update: add rounded array class --- src/js/ArrayWithIds.ts | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/src/js/ArrayWithIds.ts b/src/js/ArrayWithIds.ts index 9a111591..65e78661 100644 --- a/src/js/ArrayWithIds.ts +++ b/src/js/ArrayWithIds.ts @@ -1,4 +1,9 @@ -import { ValueWithId } from "./ValueWithId"; +import { + defaultRoundingOptions, + RoundedValueWithId, + RoundingOptions, + ValueWithId, +} from "./ValueWithId"; export class ArrayWithIds { values: T[]; @@ -38,7 +43,7 @@ export class ArrayWithIds { } toValueWithIdArray(): ValueWithId[] { - return this.values.map((value, index) => new ValueWithId(value, this.ids[index])); + return this.values.map((value, index) => new ValueWithId(this.ids[index], value)); } getElementValueByIndex(index: number): T | undefined { @@ -123,3 +128,22 @@ export class ArrayWithIds { this.ids.splice(index, 1); } } + +export class RoundedArrayWithIds extends ArrayWithIds { + readonly roundingOptions: RoundingOptions; + + constructor( + values: T[] = [], + ids: number[] = [], + options: RoundingOptions = defaultRoundingOptions, + ) { + super(values, ids); + this.roundingOptions = options; + } + + override toJSON(): object[] { + return this.values.map((value, index) => + new RoundedValueWithId(this.ids[index], value, this.roundingOptions).toJSON(), + ); + } +} From 4006319dfce9fddf28c3e762ff130697d5118297 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Mon, 14 Apr 2025 20:10:01 -0700 Subject: [PATCH 08/35] chore: revert order --- tests/js/valueWithId.tests.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/js/valueWithId.tests.ts b/tests/js/valueWithId.tests.ts index b396782c..042ad1e0 100644 --- a/tests/js/valueWithId.tests.ts +++ b/tests/js/valueWithId.tests.ts @@ -17,31 +17,31 @@ describe("ValueWithId Tests", () => { }); it("should create with specified id and value", () => { - const valueWithId = new ValueWithId(testValue, testId); + const valueWithId = new ValueWithId(testId, testValue); expect(valueWithId.id).to.equal(testId); expect(valueWithId.value).to.be.equal(testValue); }); it("should convert to JSON format", () => { - const valueWithId = new ValueWithId(testValue, testId); + const valueWithId = new ValueWithId(testId, testValue); const jsonResult = valueWithId.toJSON(); expect(jsonResult).to.deep.equal({ id: testId, value: testValue }); }); it("should correctly compare equality with primitive values", () => { - const a = new ValueWithId(testValue, testId); - const b = new ValueWithId(testValue, testId); - const c = new ValueWithId(differentValue, testId); + const a = new ValueWithId(testId, testValue); + const b = new ValueWithId(testId, testValue); + const c = new ValueWithId(testId, differentValue); expect(a.equals(b)).to.equal(true); expect(a.equals(c)).to.equal(false); }); it("should correctly compare equality with array values", () => { - const a = new ValueWithId([1, 2, 3], testId); - const b = new ValueWithId([1, 2, 3], testId); - const c = new ValueWithId([1, 2, 4], testId); - const d = new ValueWithId([1, 2, 3], testId + 1); + const a = new ValueWithId(testId, [1, 2, 3]); + const b = new ValueWithId(testId, [1, 2, 3]); + const c = new ValueWithId(testId, [1, 2, 4]); + const d = new ValueWithId(testId, [1, 2]); expect(a.equals(b)).to.equal(true); expect(a.equals(c)).to.equal(false); From 0ac5519cc45673b007cdbdfa0ec90bcafa815ad4 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Mon, 14 Apr 2025 20:30:35 -0700 Subject: [PATCH 09/35] update: add rounding to math --- src/js/ValueWithId.ts | 11 ++++------- src/js/math.ts | 21 ++++++++++++++++++--- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/js/ValueWithId.ts b/src/js/ValueWithId.ts index 41b983c6..36b3a190 100644 --- a/src/js/ValueWithId.ts +++ b/src/js/ValueWithId.ts @@ -73,12 +73,9 @@ export class RoundedValueWithId extends ValueWithId { } override toJSON(): object { - const roundFn = (v: number) => math.roundCustom(v, this.precision, this.roundingMethod); - - const roundedValue = Array.isArray(this.value) - ? this.value.map(roundFn) - : roundFn(this.value as number); - - return { id: this.id, value: roundedValue }; + return { + id: this.id, + value: math.roundArrayOrNumber(this.value, this.precision, this.roundingMethod), + }; } } diff --git a/src/js/math.ts b/src/js/math.ts index 2d9c6024..2e1fc844 100644 --- a/src/js/math.ts +++ b/src/js/math.ts @@ -2,7 +2,7 @@ import mathjs from "mathjs"; import _ from "underscore"; -import { tolerance as TOLERANCE } from "./constants"; +import {tolerance as TOLERANCE} from "./constants"; /** * This module is intended to be used instead of the original mathjs package, hence we need to reexport all original functions and all TS types. @@ -259,6 +259,20 @@ export const roundCustom = ( return (roundedAbs * sign) / factor; }; +export const roundArrayOrNumber = ( + value: unknown, + decimals = 9, + method = RoundingMethodEnum.HalfAwayFromZero, +) => { + if (Array.isArray(value)) { + return value.map((v) => + typeof v === "number" ? roundCustom(v, decimals, method) : v + ); + } + return typeof value === "number" ? roundCustom(value, decimals, method) : value; +}; + + /** * @summary Returns n splits of the passed segment. */ @@ -312,8 +326,6 @@ export const math = { angleUpTo90, vDist, vEqualWithTolerance, - roundToZero, - precise, mod, isBetweenZeroInclusiveAndOne, cartesianProduct, @@ -321,8 +333,11 @@ export const math = { combinations, combinationsFromIntervals, calculateSegmentsBetweenPoints3D, + roundToZero, + precise, roundValueToNDecimals, numberToPrecision, roundCustom, RoundingMethod: RoundingMethodEnum, + roundArrayOrNumber, }; From 82e5099433bcf8965dbadad4b93249f6dc9d26bb Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Mon, 14 Apr 2025 21:03:18 -0700 Subject: [PATCH 10/35] update: add tests for rounding: --- tests/js/arrayWithIds.tests.ts | 57 +++++++++++++++++++++++++++++++++- tests/js/valueWithId.tests.ts | 48 +++++++++++++++++++++++++++- 2 files changed, 103 insertions(+), 2 deletions(-) diff --git a/tests/js/arrayWithIds.tests.ts b/tests/js/arrayWithIds.tests.ts index 4c808a65..d0108fa8 100644 --- a/tests/js/arrayWithIds.tests.ts +++ b/tests/js/arrayWithIds.tests.ts @@ -1,6 +1,7 @@ import { expect } from "chai"; -import { ArrayWithIds } from "../../src/js/ArrayWithIds"; +import { ArrayWithIds, RoundedArrayWithIds } from "../../src/js/ArrayWithIds"; +import { RoundingMethodEnum } from "../../src/js/math"; import { ValueWithId } from "../../src/js/ValueWithId"; const NUMBERS = [1, 2, 3, 4, 5]; @@ -142,3 +143,57 @@ describe("ArrayWithIds Tests", () => { expect(valueWithIdArray[0].value).to.equal(1); }); }); + +describe("RoundedArrayWithIds Tests", () => { + it("should round values when converting to JSON", () => { + const values = [1.23456789, 2.34567891, 3.45678912]; + const ids = [1, 2, 3]; + + const roundedArray = new RoundedArrayWithIds(values, ids, { + precision: 2, + roundingMethod: RoundingMethodEnum.HalfAwayFromZero, + }); + + const result = roundedArray.toJSON(); + + expect(result).to.deep.equal([ + { id: 1, value: 1.23 }, + { id: 2, value: 2.35 }, + { id: 3, value: 3.46 }, + ]); + }); + + it("should round array values when converting to JSON", () => { + const values = [ + [1.23456789, 4.56789123], + [2.34567891, 5.67891234], + ]; + const ids = [1, 2]; + + const roundedArray = new RoundedArrayWithIds(values, ids, { + precision: 2, + roundingMethod: RoundingMethodEnum.HalfAwayFromZero, + }); + + const result = roundedArray.toJSON(); + + expect(result).to.deep.equal([ + { id: 1, value: [1.23, 4.57] }, + { id: 2, value: [2.35, 5.68] }, + ]); + }); + + it("should inherit methods from ArrayWithIds", () => { + const values = [1.23, 2.34, 3.45]; + const ids = [1, 2, 3]; + + const roundedArray = new RoundedArrayWithIds(values, ids); + + roundedArray.filterByIds([1, 3]); + expect(roundedArray.values).to.deep.equal([1.23, 3.45]); + expect(roundedArray.ids).to.deep.equal([1, 3]); + + const arrayWithIds = new ArrayWithIds([1.23, 3.45], [1, 3]); + expect(roundedArray.equals(arrayWithIds)).to.be.true; + }); +}); diff --git a/tests/js/valueWithId.tests.ts b/tests/js/valueWithId.tests.ts index 042ad1e0..c2715569 100644 --- a/tests/js/valueWithId.tests.ts +++ b/tests/js/valueWithId.tests.ts @@ -1,6 +1,7 @@ import { expect } from "chai"; -import { ValueWithId } from "../../src/js/ValueWithId"; +import { RoundingMethodEnum } from "../../src/js/math"; +import { RoundedValueWithId, ValueWithId } from "../../src/js/ValueWithId"; const defaultId = 0; const defaultValue = null; @@ -48,3 +49,48 @@ describe("ValueWithId Tests", () => { expect(a.equals(d)).to.equal(false); }); }); + +describe("RoundedValueWithId Tests", () => { + it("should round numeric values with specified precision", () => { + const value = 1.23456789; + const id = 1; + + const roundedValueWithId = new RoundedValueWithId(id, value, { + precision: 3, + roundingMethod: RoundingMethodEnum.HalfAwayFromZero, + }); + const result = roundedValueWithId.toJSON() as { id: number; value: number }; + + expect(result).to.deep.equal({ id: 1, value: 1.235 }); + }); + + it("should round array values with specified precision", () => { + const value = [1.23456789, 2.34567891, 3.45678912]; + const id = 1; + + const roundedValueWithId = new RoundedValueWithId(id, value, { + precision: 2, + roundingMethod: RoundingMethodEnum.HalfAwayFromZero, + }); + const result = roundedValueWithId.toJSON() as { id: number; value: number[] }; + + expect(result).to.deep.equal({ id: 1, value: [1.23, 2.35, 3.46] }); + }); + + it("should properly apply bankers rounding when specified", () => { + // Bankers rounding rounds to the nearest even number when exactly at .5 + const roundToEvenCase1 = new RoundedValueWithId(1, 2.5, { + precision: 0, + roundingMethod: RoundingMethodEnum.Bankers, + }); + const result1 = roundToEvenCase1.toJSON() as { id: number; value: number }; + expect(result1.value).to.equal(2); // Round down to even + + const roundToEvenCase2 = new RoundedValueWithId(1, 3.5, { + precision: 0, + roundingMethod: RoundingMethodEnum.Bankers, + }); + const result2 = roundToEvenCase2.toJSON() as { id: number; value: number }; + expect(result2.value).to.equal(4); // Round up to even + }); +}); From 4bb90d2bf7898455d9bf86718a9206cd53bb3518 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Tue, 15 Apr 2025 21:20:22 -0700 Subject: [PATCH 11/35] chore: name consts humanly --- tests/js/arrayWithIds.tests.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/js/arrayWithIds.tests.ts b/tests/js/arrayWithIds.tests.ts index d0108fa8..b21ced6d 100644 --- a/tests/js/arrayWithIds.tests.ts +++ b/tests/js/arrayWithIds.tests.ts @@ -6,6 +6,9 @@ import { ValueWithId } from "../../src/js/ValueWithId"; const NUMBERS = [1, 2, 3, 4, 5]; const STRINGS = ["value1", "value2", "value3", "value4", "value5"]; +const IDS_SELECTED_3 = [0, 1, 2]; +const NUMBERS_SELECTED_3 = [1, 2, 3]; +const STRINGS_SELECTED_3 = ["value1", "value2", "value3"]; const OBJECTS_WITH_IDS = [ { id: 10, value: "value1" }, @@ -21,14 +24,14 @@ const ARRAY_VALUES = [ describe("ArrayWithIds Tests", () => { it("should create from values with sequential IDs", () => { - const arrayWithIds = ArrayWithIds.fromValues(NUMBERS.slice(0, 3)); - expect(arrayWithIds.values).to.deep.equal([1, 2, 3]); - expect(arrayWithIds.ids).to.deep.equal([0, 1, 2]); + const arrayWithIds = ArrayWithIds.fromValues(NUMBERS_SELECTED_3); + expect(arrayWithIds.values).to.deep.equal(NUMBERS_SELECTED_3); + expect(arrayWithIds.ids).to.deep.equal(IDS_SELECTED_3); }); it("should create from objects with id and value properties", () => { const arrayWithIds = ArrayWithIds.fromObjects(OBJECTS_WITH_IDS); - expect(arrayWithIds.values).to.deep.equal(["value1", "value2", "value3"]); + expect(arrayWithIds.values).to.deep.equal(STRINGS_SELECTED_3); expect(arrayWithIds.ids).to.deep.equal([10, 20, 30]); }); From 9925fff41fa11ff8e1a089648897b3608c1caa85 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Tue, 15 Apr 2025 21:51:23 -0700 Subject: [PATCH 12/35] chore: name consts humanly 2 --- tests/js/arrayWithIds.tests.ts | 179 ++++++++++++++++++--------------- 1 file changed, 100 insertions(+), 79 deletions(-) diff --git a/tests/js/arrayWithIds.tests.ts b/tests/js/arrayWithIds.tests.ts index b21ced6d..59085700 100644 --- a/tests/js/arrayWithIds.tests.ts +++ b/tests/js/arrayWithIds.tests.ts @@ -4,35 +4,87 @@ import { ArrayWithIds, RoundedArrayWithIds } from "../../src/js/ArrayWithIds"; import { RoundingMethodEnum } from "../../src/js/math"; import { ValueWithId } from "../../src/js/ValueWithId"; +// Base dataset const NUMBERS = [1, 2, 3, 4, 5]; const STRINGS = ["value1", "value2", "value3", "value4", "value5"]; -const IDS_SELECTED_3 = [0, 1, 2]; -const NUMBERS_SELECTED_3 = [1, 2, 3]; -const STRINGS_SELECTED_3 = ["value1", "value2", "value3"]; +// Slices and subsets +const FIRST_THREE_NUMBERS = [1, 2, 3]; +const FIRST_THREE_STRINGS = ["value1", "value2", "value3"]; +const FIRST_THREE_IDS = [0, 1, 2]; + +// Boundary and error cases +const OUT_OF_RANGE_INDEX = 99; +const NON_EXISTENT_ID = 99; + +// Filtering criteria +const INDEX_FILTER = [1, 3]; +const ID_FILTER = [0, 2, 4]; +const EXPECTED_VALUES_BY_INDEX_FILTER = [2, 4]; +const EXPECTED_IDS_BY_INDEX_FILTER = [1, 3]; +const EXPECTED_VALUES_BY_ID_FILTER = ["value1", "value3", "value5"]; +const EXPECTED_IDS_BY_ID_FILTER = ID_FILTER; + +// Additions +const VALUE_TO_ADD = "value4"; +const MANUAL_ID_TO_ADD = 99; +const VALUES_AFTER_ADD = STRINGS.slice(0, 4); +const IDS_AFTER_ADD = [0, 1, 2, 3]; + +// ID+value objects +const EXPECTED_IDS_FROM_OBJECTS = [10, 20, 30]; const OBJECTS_WITH_IDS = [ { id: 10, value: "value1" }, { id: 20, value: "value2" }, { id: 30, value: "value3" }, ]; +// Nested array values const ARRAY_VALUES = [ [1, 2], [3, 4], [5, 6], ]; +const ARRAY_VALUES_TO_KEEP = [ + [1, 2], + [5, 6], +]; +const ARRAY_IDS_TO_KEEP = [0, 2]; + +// Rounding +const FLOAT_VALUES = [1.23456789, 2.34567891, 3.45678912]; +const FLOAT_ARRAYS = [ + [1.23456789, 4.56789123], + [2.34567891, 5.67891234], +]; +const DEFAULT_ROUNDED_IDS = [1, 2, 3]; +const ROUNDED_RESULT_2DP = [ + { id: 1, value: 1.23 }, + { id: 2, value: 2.35 }, + { id: 3, value: 3.46 }, +]; +const ROUNDED_ARRAY_RESULT_2DP = [ + { id: 1, value: [1.23, 4.57] }, + { id: 2, value: [2.35, 5.68] }, +]; + +// Rounding + filtering +const ROUNDED_NUMBERS_EXAMPLE = [1.23, 2.34, 3.45]; +const FILTER_IDS_ROUNDED = [1, 3]; +const ROUNDED_VALUES_AFTER_FILTER = [1.23, 3.45]; +const ROUNDED_IDS_AFTER_FILTER = [1, 3]; describe("ArrayWithIds Tests", () => { it("should create from values with sequential IDs", () => { - const arrayWithIds = ArrayWithIds.fromValues(NUMBERS_SELECTED_3); - expect(arrayWithIds.values).to.deep.equal(NUMBERS_SELECTED_3); - expect(arrayWithIds.ids).to.deep.equal(IDS_SELECTED_3); + const arrayWithIds = ArrayWithIds.fromValues(FIRST_THREE_NUMBERS); + expect(arrayWithIds.values).to.deep.equal(FIRST_THREE_NUMBERS); + expect(arrayWithIds.ids).to.deep.equal(FIRST_THREE_IDS); }); it("should create from objects with id and value properties", () => { const arrayWithIds = ArrayWithIds.fromObjects(OBJECTS_WITH_IDS); - expect(arrayWithIds.values).to.deep.equal(STRINGS_SELECTED_3); - expect(arrayWithIds.ids).to.deep.equal([10, 20, 30]); + expect(arrayWithIds.values).to.deep.equal(FIRST_THREE_STRINGS); + expect(arrayWithIds.ids).to.deep.equal(EXPECTED_IDS_FROM_OBJECTS); }); it("should convert to JSON format", () => { @@ -41,91 +93,86 @@ describe("ArrayWithIds Tests", () => { }); it("should get element value by index", () => { - const arrayWithIds = ArrayWithIds.fromValues(STRINGS.slice(0, 3)); + const arrayWithIds = ArrayWithIds.fromValues(FIRST_THREE_STRINGS); expect(arrayWithIds.getElementValueByIndex(1)).to.equal("value2"); - expect(arrayWithIds.getElementValueByIndex(10)).to.equal(undefined); + expect(arrayWithIds.getElementValueByIndex(OUT_OF_RANGE_INDEX)).to.equal(undefined); }); it("should get element ID by value", () => { - const arrayWithIds = ArrayWithIds.fromValues(STRINGS.slice(0, 3)); + const arrayWithIds = ArrayWithIds.fromValues(FIRST_THREE_STRINGS); expect(arrayWithIds.getElementIdByValue("value3")).to.equal(2); expect(arrayWithIds.getElementIdByValue("valueX")).to.equal(undefined); }); it("should filter by values", () => { const arrayWithIds = ArrayWithIds.fromValues(ARRAY_VALUES); - const filterValues = [ - [1, 2], - [5, 6], - ]; - arrayWithIds.filterByValues(filterValues); - expect(arrayWithIds.values).to.deep.equal(filterValues); - expect(arrayWithIds.ids).to.deep.equal([0, 2]); + arrayWithIds.filterByValues(ARRAY_VALUES_TO_KEEP); + expect(arrayWithIds.values).to.deep.equal(ARRAY_VALUES_TO_KEEP); + expect(arrayWithIds.ids).to.deep.equal(ARRAY_IDS_TO_KEEP); }); it("should filter by indices", () => { const arrayWithIds = ArrayWithIds.fromValues(NUMBERS); - arrayWithIds.filterByIndices([1, 3]); - expect(arrayWithIds.values).to.deep.equal([2, 4]); - expect(arrayWithIds.ids).to.deep.equal([1, 3]); + arrayWithIds.filterByIndices(INDEX_FILTER); + expect(arrayWithIds.values).to.deep.equal(EXPECTED_VALUES_BY_INDEX_FILTER); + expect(arrayWithIds.ids).to.deep.equal(EXPECTED_IDS_BY_INDEX_FILTER); }); it("should filter by IDs", () => { const arrayWithIds = ArrayWithIds.fromValues(STRINGS); - arrayWithIds.filterByIds([0, 2, 4]); - expect(arrayWithIds.values).to.deep.equal(["value1", "value3", "value5"]); - expect(arrayWithIds.ids).to.deep.equal([0, 2, 4]); + arrayWithIds.filterByIds(ID_FILTER); + expect(arrayWithIds.values).to.deep.equal(EXPECTED_VALUES_BY_ID_FILTER); + expect(arrayWithIds.ids).to.deep.equal(EXPECTED_IDS_BY_ID_FILTER); }); it("should map array in-place", () => { - const arrayWithIds = ArrayWithIds.fromValues(STRINGS.slice(0, 3)); + const arrayWithIds = ArrayWithIds.fromValues(FIRST_THREE_STRINGS); arrayWithIds.mapArrayInPlace((v) => v.toUpperCase()); expect(arrayWithIds.values).to.deep.equal(["VALUE1", "VALUE2", "VALUE3"]); }); it("should add items with auto-incrementing IDs", () => { - const arrayWithIds = ArrayWithIds.fromValues(STRINGS.slice(0, 3)); - arrayWithIds.addItem("value4"); - expect(arrayWithIds.values).to.deep.equal(["value1", "value2", "value3", "value4"]); - expect(arrayWithIds.ids).to.deep.equal([0, 1, 2, 3]); + const arrayWithIds = ArrayWithIds.fromValues(FIRST_THREE_STRINGS); + arrayWithIds.addItem(VALUE_TO_ADD); + expect(arrayWithIds.values).to.deep.equal(VALUES_AFTER_ADD); + expect(arrayWithIds.ids).to.deep.equal(IDS_AFTER_ADD); }); it("should add items with specified IDs", () => { - const arrayWithIds = ArrayWithIds.fromValues(STRINGS.slice(0, 3)); - arrayWithIds.addItem("value4", 99); - expect(arrayWithIds.values).to.deep.equal(["value1", "value2", "value3", "value4"]); - expect(arrayWithIds.ids).to.deep.equal([0, 1, 2, 99]); + const arrayWithIds = ArrayWithIds.fromValues(FIRST_THREE_STRINGS); + arrayWithIds.addItem(VALUE_TO_ADD, MANUAL_ID_TO_ADD); + expect(arrayWithIds.values).to.deep.equal([...FIRST_THREE_STRINGS, VALUE_TO_ADD]); + expect(arrayWithIds.ids).to.deep.equal([0, 1, 2, MANUAL_ID_TO_ADD]); }); it("should remove item by index", () => { - const arrayWithIds = ArrayWithIds.fromValues(STRINGS.slice(0, 3)); + const arrayWithIds = ArrayWithIds.fromValues(FIRST_THREE_STRINGS); arrayWithIds.removeItem(1); expect(arrayWithIds.values).to.deep.equal(["value1", "value3"]); expect(arrayWithIds.ids).to.deep.equal([0, 2]); }); it("should remove item by ID", () => { - const arrayWithIds = ArrayWithIds.fromValues(STRINGS.slice(0, 3)); + const arrayWithIds = ArrayWithIds.fromValues(FIRST_THREE_STRINGS); arrayWithIds.removeItem(0, 1); expect(arrayWithIds.values).to.deep.equal(["value1", "value3"]); expect(arrayWithIds.ids).to.deep.equal([0, 2]); }); it("should throw error when removing by non-existent ID", () => { - const arrayWithIds = ArrayWithIds.fromValues(STRINGS.slice(0, 3)); - expect(() => arrayWithIds.removeItem(0, 99)).to.throw("ID not found"); + const arrayWithIds = ArrayWithIds.fromValues(FIRST_THREE_STRINGS); + expect(() => arrayWithIds.removeItem(0, NON_EXISTENT_ID)).to.throw("ID not found"); }); it("should throw error when removing by out-of-range index", () => { - const arrayWithIds = ArrayWithIds.fromValues(STRINGS.slice(0, 3)); - expect(() => arrayWithIds.removeItem(99)).to.throw("Index out of range"); + const arrayWithIds = ArrayWithIds.fromValues(FIRST_THREE_STRINGS); + expect(() => arrayWithIds.removeItem(OUT_OF_RANGE_INDEX)).to.throw("Index out of range"); }); it("should correctly compare equality", () => { - const a = ArrayWithIds.fromValues(NUMBERS.slice(0, 3)); - const b = ArrayWithIds.fromValues(NUMBERS.slice(0, 3)); + const a = ArrayWithIds.fromValues(FIRST_THREE_NUMBERS); + const b = ArrayWithIds.fromValues(FIRST_THREE_NUMBERS); const c = ArrayWithIds.fromValues([1, 2, 4]); - expect(a.equals(b)).to.equal(true); expect(a.equals(c)).to.equal(false); @@ -137,7 +184,7 @@ describe("ArrayWithIds Tests", () => { }); it("should convert to array of ValueWithId objects", () => { - const arrayWithIds = ArrayWithIds.fromValues(NUMBERS.slice(0, 3)); + const arrayWithIds = ArrayWithIds.fromValues(FIRST_THREE_NUMBERS); const valueWithIdArray = arrayWithIds.toValueWithIdArray(); expect(valueWithIdArray.length).to.equal(3); @@ -149,54 +196,28 @@ describe("ArrayWithIds Tests", () => { describe("RoundedArrayWithIds Tests", () => { it("should round values when converting to JSON", () => { - const values = [1.23456789, 2.34567891, 3.45678912]; - const ids = [1, 2, 3]; - - const roundedArray = new RoundedArrayWithIds(values, ids, { + const roundedArray = new RoundedArrayWithIds(FLOAT_VALUES, DEFAULT_ROUNDED_IDS, { precision: 2, roundingMethod: RoundingMethodEnum.HalfAwayFromZero, }); - - const result = roundedArray.toJSON(); - - expect(result).to.deep.equal([ - { id: 1, value: 1.23 }, - { id: 2, value: 2.35 }, - { id: 3, value: 3.46 }, - ]); + expect(roundedArray.toJSON()).to.deep.equal(ROUNDED_RESULT_2DP); }); it("should round array values when converting to JSON", () => { - const values = [ - [1.23456789, 4.56789123], - [2.34567891, 5.67891234], - ]; - const ids = [1, 2]; - - const roundedArray = new RoundedArrayWithIds(values, ids, { + const roundedArray = new RoundedArrayWithIds(FLOAT_ARRAYS, [1, 2], { precision: 2, roundingMethod: RoundingMethodEnum.HalfAwayFromZero, }); - - const result = roundedArray.toJSON(); - - expect(result).to.deep.equal([ - { id: 1, value: [1.23, 4.57] }, - { id: 2, value: [2.35, 5.68] }, - ]); + expect(roundedArray.toJSON()).to.deep.equal(ROUNDED_ARRAY_RESULT_2DP); }); it("should inherit methods from ArrayWithIds", () => { - const values = [1.23, 2.34, 3.45]; - const ids = [1, 2, 3]; - - const roundedArray = new RoundedArrayWithIds(values, ids); - - roundedArray.filterByIds([1, 3]); - expect(roundedArray.values).to.deep.equal([1.23, 3.45]); - expect(roundedArray.ids).to.deep.equal([1, 3]); + const roundedArray = new RoundedArrayWithIds(ROUNDED_NUMBERS_EXAMPLE, DEFAULT_ROUNDED_IDS); + roundedArray.filterByIds(FILTER_IDS_ROUNDED); + expect(roundedArray.values).to.deep.equal(ROUNDED_VALUES_AFTER_FILTER); + expect(roundedArray.ids).to.deep.equal(ROUNDED_IDS_AFTER_FILTER); - const arrayWithIds = new ArrayWithIds([1.23, 3.45], [1, 3]); - expect(roundedArray.equals(arrayWithIds)).to.be.true; + const expected = new ArrayWithIds(ROUNDED_VALUES_AFTER_FILTER, ROUNDED_IDS_AFTER_FILTER); + expect(roundedArray.equals(expected)).to.be.true; }); }); From 3b6957fb95c06d8abae15333d93bcd538989bda2 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Tue, 15 Apr 2025 21:51:45 -0700 Subject: [PATCH 13/35] update: fix mistake caught by tests --- src/js/ArrayWithIds.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/ArrayWithIds.ts b/src/js/ArrayWithIds.ts index 65e78661..bbbee6fa 100644 --- a/src/js/ArrayWithIds.ts +++ b/src/js/ArrayWithIds.ts @@ -14,8 +14,8 @@ export class ArrayWithIds { if (values.length !== ids.length) { throw new Error("Values and IDs must have the same length"); } - this.values = values; - this.ids = ids; + this.values = [...values]; + this.ids = [...ids]; } static fromValues(values: T[]): ArrayWithIds { From fd6d1b754b4bc23275863c90f42b7386daedd2e1 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Tue, 15 Apr 2025 21:53:39 -0700 Subject: [PATCH 14/35] chore: name consts humanly 3 --- tests/js/valueWithId.tests.ts | 89 ++++++++++++++++++++--------------- 1 file changed, 52 insertions(+), 37 deletions(-) diff --git a/tests/js/valueWithId.tests.ts b/tests/js/valueWithId.tests.ts index c2715569..547f9467 100644 --- a/tests/js/valueWithId.tests.ts +++ b/tests/js/valueWithId.tests.ts @@ -3,46 +3,68 @@ import { expect } from "chai"; import { RoundingMethodEnum } from "../../src/js/math"; import { RoundedValueWithId, ValueWithId } from "../../src/js/ValueWithId"; -const defaultId = 0; -const defaultValue = null; - -const testId = 1; -const testValue = "testValue"; -const differentValue = "differentValue"; +// default constructor values +const DEFAULT_ID = 0; +const DEFAULT_VALUE = null; + +// test values for primitives +const TEST_ID = 1; +const TEST_VALUE = "testValue"; +const DIFFERENT_VALUE = "differentValue"; + +// test values for arrays +const ARRAY_VALUE = [1, 2, 3]; +const ARRAY_VALUE_EQUAL = [1, 2, 3]; +const ARRAY_VALUE_DIFF = [1, 2, 4]; +const ARRAY_VALUE_SHORTER = [1, 2]; + +// rounding input values +const FLOAT_VALUE_TO_ROUND = 1.23456789; +const ARRAY_OF_FLOATS = [1.23456789, 2.34567891, 3.45678912]; + +// expected results +const ROUNDED_SINGLE_VALUE = 1.235; +const ROUNDED_ARRAY_VALUES = [1.23, 2.35, 3.46]; + +// bankers rounding edge cases +const VALUE_AT_HALF_TO_EVEN_DOWN = 2.5; // should round to 2 +const VALUE_AT_HALF_TO_EVEN_UP = 3.5; // should round to 4 +const EXPECTED_EVEN_DOWN = 2; +const EXPECTED_EVEN_UP = 4; describe("ValueWithId Tests", () => { it("should create with default values", () => { const valueWithId = new ValueWithId(); - expect(valueWithId.id).to.equal(defaultId); - expect(valueWithId.value).to.be.equal(defaultValue); + expect(valueWithId.id).to.equal(DEFAULT_ID); + expect(valueWithId.value).to.be.equal(DEFAULT_VALUE); }); it("should create with specified id and value", () => { - const valueWithId = new ValueWithId(testId, testValue); - expect(valueWithId.id).to.equal(testId); - expect(valueWithId.value).to.be.equal(testValue); + const valueWithId = new ValueWithId(TEST_ID, TEST_VALUE); + expect(valueWithId.id).to.equal(TEST_ID); + expect(valueWithId.value).to.be.equal(TEST_VALUE); }); it("should convert to JSON format", () => { - const valueWithId = new ValueWithId(testId, testValue); + const valueWithId = new ValueWithId(TEST_ID, TEST_VALUE); const jsonResult = valueWithId.toJSON(); - expect(jsonResult).to.deep.equal({ id: testId, value: testValue }); + expect(jsonResult).to.deep.equal({ id: TEST_ID, value: TEST_VALUE }); }); it("should correctly compare equality with primitive values", () => { - const a = new ValueWithId(testId, testValue); - const b = new ValueWithId(testId, testValue); - const c = new ValueWithId(testId, differentValue); + const a = new ValueWithId(TEST_ID, TEST_VALUE); + const b = new ValueWithId(TEST_ID, TEST_VALUE); + const c = new ValueWithId(TEST_ID, DIFFERENT_VALUE); expect(a.equals(b)).to.equal(true); expect(a.equals(c)).to.equal(false); }); it("should correctly compare equality with array values", () => { - const a = new ValueWithId(testId, [1, 2, 3]); - const b = new ValueWithId(testId, [1, 2, 3]); - const c = new ValueWithId(testId, [1, 2, 4]); - const d = new ValueWithId(testId, [1, 2]); + const a = new ValueWithId(TEST_ID, ARRAY_VALUE); + const b = new ValueWithId(TEST_ID, ARRAY_VALUE_EQUAL); + const c = new ValueWithId(TEST_ID, ARRAY_VALUE_DIFF); + const d = new ValueWithId(TEST_ID, ARRAY_VALUE_SHORTER); expect(a.equals(b)).to.equal(true); expect(a.equals(c)).to.equal(false); @@ -52,45 +74,38 @@ describe("ValueWithId Tests", () => { describe("RoundedValueWithId Tests", () => { it("should round numeric values with specified precision", () => { - const value = 1.23456789; - const id = 1; - - const roundedValueWithId = new RoundedValueWithId(id, value, { + const roundedValueWithId = new RoundedValueWithId(TEST_ID, FLOAT_VALUE_TO_ROUND, { precision: 3, roundingMethod: RoundingMethodEnum.HalfAwayFromZero, }); - const result = roundedValueWithId.toJSON() as { id: number; value: number }; - expect(result).to.deep.equal({ id: 1, value: 1.235 }); + const result = roundedValueWithId.toJSON() as { id: number; value: number }; + expect(result).to.deep.equal({ id: TEST_ID, value: ROUNDED_SINGLE_VALUE }); }); it("should round array values with specified precision", () => { - const value = [1.23456789, 2.34567891, 3.45678912]; - const id = 1; - - const roundedValueWithId = new RoundedValueWithId(id, value, { + const roundedValueWithId = new RoundedValueWithId(TEST_ID, ARRAY_OF_FLOATS, { precision: 2, roundingMethod: RoundingMethodEnum.HalfAwayFromZero, }); - const result = roundedValueWithId.toJSON() as { id: number; value: number[] }; - expect(result).to.deep.equal({ id: 1, value: [1.23, 2.35, 3.46] }); + const result = roundedValueWithId.toJSON() as { id: number; value: number[] }; + expect(result).to.deep.equal({ id: TEST_ID, value: ROUNDED_ARRAY_VALUES }); }); it("should properly apply bankers rounding when specified", () => { - // Bankers rounding rounds to the nearest even number when exactly at .5 - const roundToEvenCase1 = new RoundedValueWithId(1, 2.5, { + const roundToEvenCase1 = new RoundedValueWithId(TEST_ID, VALUE_AT_HALF_TO_EVEN_DOWN, { precision: 0, roundingMethod: RoundingMethodEnum.Bankers, }); const result1 = roundToEvenCase1.toJSON() as { id: number; value: number }; - expect(result1.value).to.equal(2); // Round down to even + expect(result1.value).to.equal(EXPECTED_EVEN_DOWN); - const roundToEvenCase2 = new RoundedValueWithId(1, 3.5, { + const roundToEvenCase2 = new RoundedValueWithId(TEST_ID, VALUE_AT_HALF_TO_EVEN_UP, { precision: 0, roundingMethod: RoundingMethodEnum.Bankers, }); const result2 = roundToEvenCase2.toJSON() as { id: number; value: number }; - expect(result2.value).to.equal(4); // Round up to even + expect(result2.value).to.equal(EXPECTED_EVEN_UP); }); }); From a54cf3e8304373ed903a914faa9a24f2d7919041 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Wed, 16 Apr 2025 13:47:56 -0700 Subject: [PATCH 15/35] chore: ubuntu to 24.04 --- .github/workflows/cicd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 82725611..de123ce5 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -8,7 +8,7 @@ concurrency: jobs: run-py-linter: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 strategy: matrix: python-version: [3.10.13] @@ -33,7 +33,7 @@ jobs: run-py-tests: needs: run-py-linter - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 strategy: matrix: python-version: From f0d22712c373379722787b067fd58d87dcd3e389 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Wed, 16 Apr 2025 21:08:22 -0700 Subject: [PATCH 16/35] chore: generate dist --- dist/js/ArrayWithIds.d.ts | 27 +++++++++ dist/js/ArrayWithIds.js | 123 ++++++++++++++++++++++++++++++++++++++ dist/js/ValueWithId.d.ts | 25 ++++++++ dist/js/ValueWithId.js | 63 +++++++++++++++++++ dist/js/math.d.ts | 6 +- dist/js/math.js | 47 +++++++++++---- 6 files changed, 276 insertions(+), 15 deletions(-) create mode 100644 dist/js/ArrayWithIds.d.ts create mode 100644 dist/js/ArrayWithIds.js create mode 100644 dist/js/ValueWithId.d.ts create mode 100644 dist/js/ValueWithId.js diff --git a/dist/js/ArrayWithIds.d.ts b/dist/js/ArrayWithIds.d.ts new file mode 100644 index 00000000..65184a75 --- /dev/null +++ b/dist/js/ArrayWithIds.d.ts @@ -0,0 +1,27 @@ +import { RoundingOptions, ValueWithId } from "./ValueWithId"; +export declare class ArrayWithIds { + values: T[]; + ids: number[]; + constructor(values?: T[], ids?: number[]); + static fromValues(values: T[]): ArrayWithIds; + static fromObjects(objects: Array<{ + id: number; + value: T; + }>): ArrayWithIds; + toJSON(): object[]; + toValueWithIdArray(): ValueWithId[]; + getElementValueByIndex(index: number): T | undefined; + getElementIdByValue(value: T): number | undefined; + filterByValues(valuesToKeep: T | T[]): void; + filterByIndices(indices: number | number[]): void; + filterByIds(ids: number | number[], invert?: boolean): void; + equals(other: ArrayWithIds): boolean; + mapArrayInPlace(func: (value: T) => T): void; + addItem(value: T, id?: number): void; + removeItem(index: number, id?: number): void; +} +export declare class RoundedArrayWithIds extends ArrayWithIds { + readonly roundingOptions: RoundingOptions; + constructor(values?: T[], ids?: number[], options?: RoundingOptions); + toJSON(): object[]; +} diff --git a/dist/js/ArrayWithIds.js b/dist/js/ArrayWithIds.js new file mode 100644 index 00000000..59ea796e --- /dev/null +++ b/dist/js/ArrayWithIds.js @@ -0,0 +1,123 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.RoundedArrayWithIds = exports.ArrayWithIds = void 0; +const ValueWithId_1 = require("./ValueWithId"); +class ArrayWithIds { + constructor(values = [], ids = []) { + if (values.length !== ids.length) { + throw new Error("Values and IDs must have the same length"); + } + this.values = [...values]; + this.ids = [...ids]; + } + static fromValues(values) { + const ids = values.map((_, i) => i); + return new ArrayWithIds(values, ids); + } + static fromObjects(objects) { + const values = objects.map((item) => item.value); + const ids = objects.map((item) => item.id); + return new ArrayWithIds(values, ids); + } + toJSON() { + return this.values.map((value, index) => ({ + id: this.ids[index], + value: + value !== null && + typeof value === "object" && + "toJSON" in value && + typeof value.toJSON === "function" + ? value.toJSON() + : value, + })); + } + toValueWithIdArray() { + return this.values.map( + (value, index) => new ValueWithId_1.ValueWithId(this.ids[index], value), + ); + } + getElementValueByIndex(index) { + return this.values[index]; + } + getElementIdByValue(value) { + const index = this.values.findIndex((v) => + Array.isArray(v) && Array.isArray(value) + ? v.length === value.length && v.every((val, idx) => val === value[idx]) + : v === value, + ); + return index !== -1 ? this.ids[index] : undefined; + } + filterByValues(valuesToKeep) { + const toHash = (v) => (Array.isArray(v) ? JSON.stringify(v) : String(v)); + const keepSet = new Set( + Array.isArray(valuesToKeep) ? valuesToKeep.map(toHash) : [toHash(valuesToKeep)], + ); + const filtered = this.values + .map((value, i) => [value, this.ids[i]]) + .filter(([value]) => keepSet.has(toHash(value))); + this.values = filtered.map(([v]) => v); + this.ids = filtered.map(([_, id]) => id); + } + filterByIndices(indices) { + const keepSet = new Set(Array.isArray(indices) ? indices : [indices]); + this.values = this.values.filter((_, i) => keepSet.has(i)); + this.ids = this.ids.filter((_, i) => keepSet.has(i)); + } + filterByIds(ids, invert = false) { + const idSet = new Set(Array.isArray(ids) ? ids : [ids]); + const keep = invert + ? this.ids.map((id, i) => (idSet.has(id) ? -1 : i)).filter((i) => i >= 0) + : this.ids.map((id, i) => (idSet.has(id) ? i : -1)).filter((i) => i >= 0); + this.values = keep.map((i) => this.values[i]); + this.ids = keep.map((i) => this.ids[i]); + } + equals(other) { + if (!(other instanceof ArrayWithIds)) return false; + if (this.values.length !== other.values.length) return false; + if (this.ids.length !== other.ids.length) return false; + return ( + this.values.every((v, i) => { + const ov = other.values[i]; + return Array.isArray(v) && Array.isArray(ov) + ? v.length === ov.length && v.every((val, idx) => val === ov[idx]) + : v === ov; + }) && this.ids.every((id, i) => id === other.ids[i]) + ); + } + mapArrayInPlace(func) { + this.values = this.values.map(func); + } + addItem(value, id) { + const newId = id !== null && id !== void 0 ? id : Math.max(-1, ...this.ids) + 1; + this.values.push(value); + this.ids.push(newId); + } + removeItem(index, id) { + if (id !== undefined) { + index = this.ids.indexOf(id); + if (index === -1) throw new Error("ID not found"); + } + if (index < 0 || index >= this.values.length) { + throw new Error("Index out of range"); + } + this.values.splice(index, 1); + this.ids.splice(index, 1); + } +} +exports.ArrayWithIds = ArrayWithIds; +class RoundedArrayWithIds extends ArrayWithIds { + constructor(values = [], ids = [], options = ValueWithId_1.defaultRoundingOptions) { + super(values, ids); + this.roundingOptions = options; + } + toJSON() { + return this.values.map((value, index) => + new ValueWithId_1.RoundedValueWithId( + this.ids[index], + value, + this.roundingOptions, + ).toJSON(), + ); + } +} +exports.RoundedArrayWithIds = RoundedArrayWithIds; diff --git a/dist/js/ValueWithId.d.ts b/dist/js/ValueWithId.d.ts new file mode 100644 index 00000000..17ca7222 --- /dev/null +++ b/dist/js/ValueWithId.d.ts @@ -0,0 +1,25 @@ +import { RoundingMethodEnum } from "./math"; +export declare class ValueWithId { + id: number; + value: T | null; + constructor(id?: number, value?: T | null); + /** + * Converts the instance to a plain JavaScript object. + */ + toJSON(): object; + /** + * Checks if this instance is equal to another ValueWithId. + */ + equals(other: ValueWithId): boolean; +} +export interface RoundingOptions { + precision: number; + roundingMethod: RoundingMethodEnum; +} +export declare const defaultRoundingOptions: RoundingOptions; +export declare class RoundedValueWithId extends ValueWithId { + readonly precision: number; + readonly roundingMethod: RoundingMethodEnum; + constructor(id: number, value: T, options?: RoundingOptions); + toJSON(): object; +} diff --git a/dist/js/ValueWithId.js b/dist/js/ValueWithId.js new file mode 100644 index 00000000..7faa05a3 --- /dev/null +++ b/dist/js/ValueWithId.js @@ -0,0 +1,63 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.RoundedValueWithId = exports.defaultRoundingOptions = exports.ValueWithId = void 0; +const math_1 = require("./math"); +class ValueWithId { + constructor(id = 0, value = null) { + this.id = id; + this.value = value; + } + /** + * Converts the instance to a plain JavaScript object. + */ + toJSON() { + if ( + this.value !== null && + typeof this.value === "object" && + "toJSON" in this.value && + typeof this.value.toJSON === "function" + ) { + return { id: this.id, value: this.value.toJSON() }; + } + return { id: this.id, value: this.value }; + } + /** + * Checks if this instance is equal to another ValueWithId. + */ + equals(other) { + if (!(other instanceof ValueWithId)) { + return false; + } + if (Array.isArray(this.value) && Array.isArray(other.value)) { + if (this.value.length !== other.value.length) { + return false; + } + for (let i = 0; i < this.value.length; i++) { + if (this.value[i] !== other.value[i]) { + return false; + } + } + return this.id === other.id; + } + return this.id === other.id && this.value === other.value; + } +} +exports.ValueWithId = ValueWithId; +exports.defaultRoundingOptions = { + precision: 9, + roundingMethod: math_1.RoundingMethodEnum.HalfAwayFromZero, +}; +class RoundedValueWithId extends ValueWithId { + constructor(id, value, options = exports.defaultRoundingOptions) { + super(id, value); + this.precision = options.precision; + this.roundingMethod = options.roundingMethod; + } + toJSON() { + return { + id: this.id, + value: math_1.math.roundArrayOrNumber(this.value, this.precision, this.roundingMethod), + }; + } +} +exports.RoundedValueWithId = RoundedValueWithId; diff --git a/dist/js/math.d.ts b/dist/js/math.d.ts index 4dc8643e..92c65601 100644 --- a/dist/js/math.d.ts +++ b/dist/js/math.d.ts @@ -31,6 +31,7 @@ export declare enum RoundingMethodEnum { HalfAwayFromZero = "halfAwayFromZero" } export declare const roundCustom: (value: number, decimals?: number, method?: RoundingMethodEnum) => number; +export declare const roundArrayOrNumber: (value: unknown, decimals?: number, method?: RoundingMethodEnum) => unknown; /** * @summary Wrapper for native [Number.toPrecision](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_objects/Number/toPrecision) method. * Returns a string representing the Number object to the specified precision. @@ -52,8 +53,6 @@ export declare const math: { angleUpTo90: (a: number[], b: number[], unit: string) => number; vDist: (v1: number[], v2: number[]) => number | undefined; vEqualWithTolerance: (vec1: number[], vec2: number[], tolerance?: number) => boolean; - roundToZero: (n: number) => number; - precise: (x: number, n?: number) => number; mod: (num: number, tolerance?: number) => number; isBetweenZeroInclusiveAndOne: (number: number, tolerance?: number) => boolean; cartesianProduct: (...arg: number[][]) => number[][]; @@ -61,10 +60,13 @@ export declare const math: { combinations: (a: number, b: number, c: number) => number[][]; combinationsFromIntervals: (arrA: number[], arrB: number[], arrC: number[]) => number[][]; calculateSegmentsBetweenPoints3D: (point1: (string | number)[], point2: (string | number)[], n: number | string) => number[][]; + roundToZero: (n: number) => number; + precise: (x: number, n?: number) => number; roundValueToNDecimals: (value: number, decimals?: number) => number; numberToPrecision: typeof numberToPrecision; roundCustom: (value: number, decimals?: number, method?: RoundingMethodEnum) => number; RoundingMethod: typeof RoundingMethodEnum; + roundArrayOrNumber: (value: unknown, decimals?: number, method?: RoundingMethodEnum) => unknown; e: number; pi: number; i: number; diff --git a/dist/js/math.js b/dist/js/math.js index 73ae1008..19c7bc55 100644 --- a/dist/js/math.js +++ b/dist/js/math.js @@ -1,9 +1,15 @@ "use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; +var __importDefault = + (this && this.__importDefault) || + function (mod) { + return mod && mod.__esModule ? mod : { default: mod }; + }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.math = exports.roundCustom = exports.RoundingMethodEnum = void 0; +exports.math = + exports.roundArrayOrNumber = + exports.roundCustom = + exports.RoundingMethodEnum = + void 0; exports.numberToPrecision = numberToPrecision; /* eslint-disable */ const mathjs_1 = __importDefault(require("mathjs")); @@ -42,7 +48,9 @@ const angle = (a, b, unit) => { const lenA = vlen(a); const lenB = vlen(b); // @ts-ignore - return exports.math.unit(exports.math.acos(product(a, b) / (lenA * lenB)), "rad").toNumber(unit || "deg"); + return exports.math + .unit(exports.math.acos(product(a, b) / (lenA * lenB)), "rad") + .toNumber(unit || "deg"); }; const angleUpTo90 = (a, b, unit) => { const angleUpTo180 = angle(a, b, unit); @@ -56,7 +64,9 @@ const angleUpTo90 = (a, b, unit) => { */ const vDist = (v1, v2) => { if (v1.length !== v2.length) { - console.error("Attempting to calculate distance between vectors of different dimensionality"); + console.error( + "Attempting to calculate distance between vectors of different dimensionality", + ); return; } return vlen(v1.map((coordinate, index) => coordinate - v2[index])); @@ -96,7 +106,10 @@ const precise = (x, n = 7) => { const mod = (num, tolerance = 0.001) => { const m = num % 1; const x = num >= 0 ? m : 1 + m; - if (exports.math.smallerEq(Math.abs(x - 1), tolerance) || exports.math.smallerEq(Math.abs(x), tolerance)) { + if ( + exports.math.smallerEq(Math.abs(x - 1), tolerance) || + exports.math.smallerEq(Math.abs(x), tolerance) + ) { return 0; } return x; @@ -114,8 +127,7 @@ const cartesianProduct = (...arg) => { a.push(arg[i][j]); if (i === max) { r.push(a); - } - else { + } else { helper(a, i + 1); } } @@ -195,8 +207,7 @@ const roundCustom = (value, decimals = 0, method = RoundingMethodEnum.HalfAwayFr if (Math.abs(fractional - 0.5) < Number.EPSILON) { // Round to even roundedAbs = floorValue % 2 === 0 ? floorValue : floorValue + 1; - } - else { + } else { roundedAbs = Math.round(absValue); } break; @@ -206,6 +217,15 @@ const roundCustom = (value, decimals = 0, method = RoundingMethodEnum.HalfAwayFr return (roundedAbs * sign) / factor; }; exports.roundCustom = roundCustom; +const roundArrayOrNumber = (value, decimals = 9, method = RoundingMethodEnum.HalfAwayFromZero) => { + if (Array.isArray(value)) { + return value.map((v) => + typeof v === "number" ? (0, exports.roundCustom)(v, decimals, method) : v, + ); + } + return typeof value === "number" ? (0, exports.roundCustom)(value, decimals, method) : value; +}; +exports.roundArrayOrNumber = roundArrayOrNumber; /** * @summary Returns n splits of the passed segment. */ @@ -252,8 +272,6 @@ exports.math = { angleUpTo90, vDist, vEqualWithTolerance, - roundToZero, - precise, mod, isBetweenZeroInclusiveAndOne, cartesianProduct, @@ -261,8 +279,11 @@ exports.math = { combinations, combinationsFromIntervals, calculateSegmentsBetweenPoints3D, + roundToZero, + precise, roundValueToNDecimals, numberToPrecision, roundCustom: exports.roundCustom, RoundingMethod: RoundingMethodEnum, + roundArrayOrNumber: exports.roundArrayOrNumber, }; From 1b60b7cf4bf8955d151fb28f1ae7f91d868f478d Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Thu, 17 Apr 2025 14:09:31 -0700 Subject: [PATCH 17/35] chore: export classes --- dist/js/constants.d.ts | 79 +++++++++++++++--------- dist/js/index.d.ts | 4 ++ dist/js/index.js | 88 +++++++++++++++++---------- src/js/{constants.js => constants.ts} | 0 src/js/index.ts | 4 ++ 5 files changed, 114 insertions(+), 61 deletions(-) rename src/js/{constants.js => constants.ts} (100%) diff --git a/dist/js/constants.d.ts b/dist/js/constants.d.ts index 0878c4eb..a2041a4d 100644 --- a/dist/js/constants.d.ts +++ b/dist/js/constants.d.ts @@ -1,30 +1,51 @@ -export namespace coefficients { - let EV_TO_RY: number; - let BOHR_TO_ANGSTROM: number; - let ANGSTROM_TO_BOHR: number; - let EV_A_TO_RY_BOHR: number; -} -export namespace tolerance { - let length: number; - let lengthAngstrom: number; - let pointsDistance: number; -} -export namespace units { - let bohr: string; - let angstrom: string; - let degree: string; - let radian: string; - let alat: string; -} -export namespace ATOMIC_COORD_UNITS { - let crystal: string; - let cartesian: string; -} -export const HASH_TOLERANCE: 3; -declare namespace _default { - export { coefficients }; - export { tolerance }; - export { units }; - export { ATOMIC_COORD_UNITS }; -} +export declare const coefficients: { + EV_TO_RY: number; + BOHR_TO_ANGSTROM: number; + ANGSTROM_TO_BOHR: number; + EV_A_TO_RY_BOHR: number; +}; +export declare const tolerance: { + length: number; + lengthAngstrom: number; + pointsDistance: number; +}; +export declare const units: { + bohr: string; + angstrom: string; + degree: string; + radian: string; + alat: string; +}; +/** + * @summary Coordinates units for a material's basis. + */ +export declare const ATOMIC_COORD_UNITS: { + crystal: string; + cartesian: string; +}; +export declare const HASH_TOLERANCE = 3; +declare const _default: { + coefficients: { + EV_TO_RY: number; + BOHR_TO_ANGSTROM: number; + ANGSTROM_TO_BOHR: number; + EV_A_TO_RY_BOHR: number; + }; + tolerance: { + length: number; + lengthAngstrom: number; + pointsDistance: number; + }; + units: { + bohr: string; + angstrom: string; + degree: string; + radian: string; + alat: string; + }; + ATOMIC_COORD_UNITS: { + crystal: string; + cartesian: string; + }; +}; export default _default; diff --git a/dist/js/index.d.ts b/dist/js/index.d.ts index 26cab50e..56444c4d 100644 --- a/dist/js/index.d.ts +++ b/dist/js/index.d.ts @@ -1,8 +1,12 @@ +import { ArrayWithIds } from "./ArrayWithIds"; import * as context from "./context"; import * as entity from "./entity"; import * as utils from "./utils"; +import { ValueWithId } from "./ValueWithId"; export declare const Code: { entity: typeof entity; context: typeof context; utils: typeof utils; + ValueWithId: typeof ValueWithId; + ArrayWithIds: typeof ArrayWithIds; }; diff --git a/dist/js/index.js b/dist/js/index.js index 4fbad54c..ecd7fca8 100644 --- a/dist/js/index.js +++ b/dist/js/index.js @@ -1,44 +1,68 @@ "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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; +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 __setModuleDefault = + (this && this.__setModuleDefault) || + (Object.create + ? function (o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } + : function (o, v) { + o["default"] = v; + }); +var __importStar = + (this && this.__importStar) || + (function () { + var ownKeys = function (o) { + ownKeys = + Object.getOwnPropertyNames || + function (o) { + var ar = []; + for (var k in o) + if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) + for (var k = ownKeys(mod), i = 0; i < k.length; i++) + if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; + })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.Code = void 0; +const ArrayWithIds_1 = require("./ArrayWithIds"); const context = __importStar(require("./context")); const entity = __importStar(require("./entity")); const utils = __importStar(require("./utils")); +const ValueWithId_1 = require("./ValueWithId"); exports.Code = { entity, context, utils, + ValueWithId: ValueWithId_1.ValueWithId, + ArrayWithIds: ArrayWithIds_1.ArrayWithIds, }; diff --git a/src/js/constants.js b/src/js/constants.ts similarity index 100% rename from src/js/constants.js rename to src/js/constants.ts diff --git a/src/js/index.ts b/src/js/index.ts index c27c9098..6565302f 100644 --- a/src/js/index.ts +++ b/src/js/index.ts @@ -1,9 +1,13 @@ +import { ArrayWithIds } from "./ArrayWithIds"; import * as context from "./context"; import * as entity from "./entity"; import * as utils from "./utils"; +import { ValueWithId } from "./ValueWithId"; export const Code = { entity, context, utils, + ValueWithId, + ArrayWithIds, }; From d85021ab923c8a8f052f7f8fb172380c0d6022f3 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Thu, 17 Apr 2025 14:50:58 -0700 Subject: [PATCH 18/35] chore: export classes --- dist/js/index.d.ts | 3 ++- dist/js/index.js | 4 ++-- src/js/index.ts | 4 +++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dist/js/index.d.ts b/dist/js/index.d.ts index 56444c4d..458dac3a 100644 --- a/dist/js/index.d.ts +++ b/dist/js/index.d.ts @@ -3,10 +3,11 @@ import * as context from "./context"; import * as entity from "./entity"; import * as utils from "./utils"; import { ValueWithId } from "./ValueWithId"; -export declare const Code: { +declare const Code: { entity: typeof entity; context: typeof context; utils: typeof utils; ValueWithId: typeof ValueWithId; ArrayWithIds: typeof ArrayWithIds; }; +export default Code; diff --git a/dist/js/index.js b/dist/js/index.js index ecd7fca8..99181c02 100644 --- a/dist/js/index.js +++ b/dist/js/index.js @@ -53,16 +53,16 @@ var __importStar = }; })(); Object.defineProperty(exports, "__esModule", { value: true }); -exports.Code = void 0; const ArrayWithIds_1 = require("./ArrayWithIds"); const context = __importStar(require("./context")); const entity = __importStar(require("./entity")); const utils = __importStar(require("./utils")); const ValueWithId_1 = require("./ValueWithId"); -exports.Code = { +const Code = { entity, context, utils, ValueWithId: ValueWithId_1.ValueWithId, ArrayWithIds: ArrayWithIds_1.ArrayWithIds, }; +exports.default = Code; diff --git a/src/js/index.ts b/src/js/index.ts index 6565302f..9d00395e 100644 --- a/src/js/index.ts +++ b/src/js/index.ts @@ -4,10 +4,12 @@ import * as entity from "./entity"; import * as utils from "./utils"; import { ValueWithId } from "./ValueWithId"; -export const Code = { +const Code = { entity, context, utils, ValueWithId, ArrayWithIds, }; + +export default Code; From 0201b29811f57d8cec78aa867548f564f91d214b Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Thu, 17 Apr 2025 14:57:26 -0700 Subject: [PATCH 19/35] try: adjsut export --- package.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package.json b/package.json index e8824c0f..81848c92 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,10 @@ }, "main": "dist/index.js", "exports": { + ".": { + "import": "./dist/js/index.js", + "types": "./dist/js/index.d.ts" + }, "./dist/js/context": "./dist/js/context/index.js", "./dist/js/entity": "./dist/js/entity/index.js", "./dist/js/utils": "./dist/js/utils/index.js", From 89cb2599f7fc97029fe044e655f09b6a28674b0a Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Thu, 17 Apr 2025 17:54:10 -0700 Subject: [PATCH 20/35] try: reexport --- dist/js/index.d.ts | 7 +++++-- dist/js/index.js | 25 +++++++++++++++++++++++-- src/js/index.ts | 8 ++++++-- 3 files changed, 34 insertions(+), 6 deletions(-) diff --git a/dist/js/index.d.ts b/dist/js/index.d.ts index 458dac3a..6a515d87 100644 --- a/dist/js/index.d.ts +++ b/dist/js/index.d.ts @@ -3,11 +3,14 @@ import * as context from "./context"; import * as entity from "./entity"; import * as utils from "./utils"; import { ValueWithId } from "./ValueWithId"; +export { ArrayWithIds, ValueWithId }; +export { entity, context, utils }; declare const Code: { + ArrayWithIds: typeof ArrayWithIds; + ValueWithId: typeof ValueWithId; entity: typeof entity; context: typeof context; utils: typeof utils; - ValueWithId: typeof ValueWithId; - ArrayWithIds: typeof ArrayWithIds; }; +export type CodeType = typeof Code; export default Code; diff --git a/dist/js/index.js b/dist/js/index.js index 99181c02..b1a5105d 100644 --- a/dist/js/index.js +++ b/dist/js/index.js @@ -53,16 +53,37 @@ var __importStar = }; })(); Object.defineProperty(exports, "__esModule", { value: true }); +exports.utils = + exports.context = + exports.entity = + exports.ValueWithId = + exports.ArrayWithIds = + void 0; const ArrayWithIds_1 = require("./ArrayWithIds"); +Object.defineProperty(exports, "ArrayWithIds", { + enumerable: true, + get: function () { + return ArrayWithIds_1.ArrayWithIds; + }, +}); const context = __importStar(require("./context")); +exports.context = context; const entity = __importStar(require("./entity")); +exports.entity = entity; const utils = __importStar(require("./utils")); +exports.utils = utils; const ValueWithId_1 = require("./ValueWithId"); +Object.defineProperty(exports, "ValueWithId", { + enumerable: true, + get: function () { + return ValueWithId_1.ValueWithId; + }, +}); const Code = { + ArrayWithIds: ArrayWithIds_1.ArrayWithIds, + ValueWithId: ValueWithId_1.ValueWithId, entity, context, utils, - ValueWithId: ValueWithId_1.ValueWithId, - ArrayWithIds: ArrayWithIds_1.ArrayWithIds, }; exports.default = Code; diff --git a/src/js/index.ts b/src/js/index.ts index 9d00395e..93ad5c67 100644 --- a/src/js/index.ts +++ b/src/js/index.ts @@ -4,12 +4,16 @@ import * as entity from "./entity"; import * as utils from "./utils"; import { ValueWithId } from "./ValueWithId"; +export { ArrayWithIds, ValueWithId }; +export { entity, context, utils }; + const Code = { + ArrayWithIds, + ValueWithId, entity, context, utils, - ValueWithId, - ArrayWithIds, }; +export type CodeType = typeof Code; export default Code; From f7565e6257b439031a915bb4cc88c26c99e28f86 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Thu, 17 Apr 2025 19:52:07 -0700 Subject: [PATCH 21/35] update: rounded classes --- dist/js/index.d.ts | 8 +++++--- dist/js/index.js | 16 ++++++++++++++++ src/js/index.ts | 8 +++++--- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/dist/js/index.d.ts b/dist/js/index.d.ts index 6a515d87..1ed95c50 100644 --- a/dist/js/index.d.ts +++ b/dist/js/index.d.ts @@ -1,13 +1,15 @@ -import { ArrayWithIds } from "./ArrayWithIds"; +import { ArrayWithIds, RoundedArrayWithIds } from "./ArrayWithIds"; import * as context from "./context"; import * as entity from "./entity"; import * as utils from "./utils"; -import { ValueWithId } from "./ValueWithId"; -export { ArrayWithIds, ValueWithId }; +import { RoundedValueWithId, ValueWithId } from "./ValueWithId"; +export { ArrayWithIds, ValueWithId, RoundedValueWithId, RoundedArrayWithIds }; export { entity, context, utils }; declare const Code: { ArrayWithIds: typeof ArrayWithIds; ValueWithId: typeof ValueWithId; + RoundedArrayWithIds: typeof RoundedArrayWithIds; + RoundedValueWithId: typeof RoundedValueWithId; entity: typeof entity; context: typeof context; utils: typeof utils; diff --git a/dist/js/index.js b/dist/js/index.js index b1a5105d..47df3907 100644 --- a/dist/js/index.js +++ b/dist/js/index.js @@ -56,6 +56,8 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.utils = exports.context = exports.entity = + exports.RoundedArrayWithIds = + exports.RoundedValueWithId = exports.ValueWithId = exports.ArrayWithIds = void 0; @@ -66,6 +68,12 @@ Object.defineProperty(exports, "ArrayWithIds", { return ArrayWithIds_1.ArrayWithIds; }, }); +Object.defineProperty(exports, "RoundedArrayWithIds", { + enumerable: true, + get: function () { + return ArrayWithIds_1.RoundedArrayWithIds; + }, +}); const context = __importStar(require("./context")); exports.context = context; const entity = __importStar(require("./entity")); @@ -73,6 +81,12 @@ exports.entity = entity; const utils = __importStar(require("./utils")); exports.utils = utils; const ValueWithId_1 = require("./ValueWithId"); +Object.defineProperty(exports, "RoundedValueWithId", { + enumerable: true, + get: function () { + return ValueWithId_1.RoundedValueWithId; + }, +}); Object.defineProperty(exports, "ValueWithId", { enumerable: true, get: function () { @@ -82,6 +96,8 @@ Object.defineProperty(exports, "ValueWithId", { const Code = { ArrayWithIds: ArrayWithIds_1.ArrayWithIds, ValueWithId: ValueWithId_1.ValueWithId, + RoundedArrayWithIds: ArrayWithIds_1.RoundedArrayWithIds, + RoundedValueWithId: ValueWithId_1.RoundedValueWithId, entity, context, utils, diff --git a/src/js/index.ts b/src/js/index.ts index 93ad5c67..df54cfc5 100644 --- a/src/js/index.ts +++ b/src/js/index.ts @@ -1,15 +1,17 @@ -import { ArrayWithIds } from "./ArrayWithIds"; +import { ArrayWithIds, RoundedArrayWithIds } from "./ArrayWithIds"; import * as context from "./context"; import * as entity from "./entity"; import * as utils from "./utils"; -import { ValueWithId } from "./ValueWithId"; +import { RoundedValueWithId, ValueWithId } from "./ValueWithId"; -export { ArrayWithIds, ValueWithId }; +export { ArrayWithIds, ValueWithId, RoundedValueWithId, RoundedArrayWithIds }; export { entity, context, utils }; const Code = { ArrayWithIds, ValueWithId, + RoundedArrayWithIds, + RoundedValueWithId, entity, context, utils, From f28c50537a8db81bc86923e4f60181f859a8292b Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Thu, 17 Apr 2025 21:30:05 -0700 Subject: [PATCH 22/35] feat: add vector and roudned vector --- src/js/vector.ts | 92 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 src/js/vector.ts diff --git a/src/js/vector.ts b/src/js/vector.ts new file mode 100644 index 00000000..fe0d0646 --- /dev/null +++ b/src/js/vector.ts @@ -0,0 +1,92 @@ +import { PointSchema } from "@mat3ra/esse/dist/js/types"; + +import { math } from "./math"; + +export class Vector3D { + static atol = 1e-8; + + private _value: PointSchema; + + constructor(value: number[] | PointSchema) { + if ( + !Array.isArray(value) || + value.length !== 3 || + !value.every((v) => typeof v === "number") + ) { + throw new Error("Vector3D must be a tuple of exactly 3 numbers."); + } + this._value = value as PointSchema; + } + + get value(): PointSchema { + return this._value; + } + + get x(): number { + return this._value[0]; + } + + get y(): number { + return this._value[1]; + } + + get z(): number { + return this._value[2]; + } + + equals(other: number[] | PointSchema | Vector3D): boolean { + if (Array.isArray(other)) { + if (other.length !== 3) { + throw new Error("Input must be a 3-element array."); + } + other = other as PointSchema; + } + const arr1 = this._value; + const arr2 = other instanceof Vector3D ? other.value : other; + return math.vEqualWithTolerance(arr1, arr2, Vector3D.atol); + } + + get norm(): number { + return math.vlen(this._value); + } +} + +export class RoundedVector3D extends Vector3D { + static roundPrecision = 9; + + toJSON(skipRounding = false): PointSchema { + const rounded = skipRounding + ? this.value + : (math.roundArrayOrNumber(this.value, RoundedVector3D.roundPrecision) as PointSchema); + return rounded; + } + + get value_rounded(): PointSchema { + return this.toJSON(); + } + + get x_rounded(): number { + return this.value_rounded[0]; + } + + get y_rounded(): number { + return this.value_rounded[1]; + } + + get z_rounded(): number { + return this.value_rounded[2]; + } + + override equals(other: PointSchema | RoundedVector3D): boolean { + const arr1 = this.value_rounded; + const arr2 = Array.isArray(other) + ? new RoundedVector3D(other).value_rounded + : other.value_rounded; + const atol = RoundedVector3D.atol || 10 ** -RoundedVector3D.roundPrecision; + return math.vEqualWithTolerance(arr1, arr2, atol); + } + + get norm_rounded(): number { + return math.roundArrayOrNumber(this.norm, RoundedVector3D.roundPrecision) as number; + } +} From 865c53016152bc55c911463b0a0a1f6e19872074 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Thu, 17 Apr 2025 21:30:17 -0700 Subject: [PATCH 23/35] update: add tests for vector --- tests/js/vector.ts | 86 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 tests/js/vector.ts diff --git a/tests/js/vector.ts b/tests/js/vector.ts new file mode 100644 index 00000000..6f70fbe6 --- /dev/null +++ b/tests/js/vector.ts @@ -0,0 +1,86 @@ +import { expect } from "chai"; + +import { RoundedVector3D, Vector3D } from "../../src/js/vector"; + +const VECTOR_FLOAT: [number, number, number] = [1.23456789, 2.345678901, 3.456789012]; +const VECTOR_FLOAT_NORM = 4.3561172682906; +const FLOAT_PRECISION = 1e-8; + +const VECTOR_FLOAT_DIFFERENT_WITHIN_TOL: [number, number, number] = [ + 1.23456789999, 2.345678901, 3.456789012, +]; +const VECTOR_FLOAT_DIFFERENT_OUTSIDE_TOL: [number, number, number] = [ + 1.2345699999, 2.345678901, 3.456789012, +]; + +const VECTOR_FLOAT_ROUNDED_4: [number, number, number] = [1.2346, 2.3457, 3.4568]; +const VECTOR_FLOAT_ROUNDED_3: [number, number, number] = [1.235, 2.346, 3.457]; + +describe("Vector3D", () => { + it("should do init and value access", () => { + const vector = new Vector3D(VECTOR_FLOAT); + expect(vector.value).to.equal(VECTOR_FLOAT); + expect(vector.x).to.be.closeTo(1.23456789, FLOAT_PRECISION); + expect(vector.y).to.be.closeTo(2.345678901, FLOAT_PRECISION); + expect(vector.z).to.be.closeTo(3.456789012, FLOAT_PRECISION); + }); + + it("should do init with wrong type throws", () => { + expect(() => new Vector3D([1, 2, "3"] as any)).to.throw(); + }); + + it("should do init with wrong size throws", () => { + expect(() => new Vector3D([1, 2] as any)).to.throw(); + }); + + it("should do equality", () => { + const vector = new Vector3D(VECTOR_FLOAT); + expect(vector.equals(VECTOR_FLOAT)).to.equal(true); + expect(vector.equals(VECTOR_FLOAT_DIFFERENT_WITHIN_TOL)).to.equal(true); + expect(vector.equals(VECTOR_FLOAT_DIFFERENT_OUTSIDE_TOL)).to.equal(false); + }); + + it("should do norm is close to expected", () => { + const vector = new Vector3D(VECTOR_FLOAT); + expect(Math.abs(vector.norm - VECTOR_FLOAT_NORM)).to.be.lessThan(FLOAT_PRECISION); + }); +}); + +describe("RoundedVector3D", () => { + it("should do init and default value access", () => { + const vector = new RoundedVector3D(VECTOR_FLOAT); + expect(vector.value).to.equal(VECTOR_FLOAT); + }); + + it("should do serialization with precision 4", () => { + RoundedVector3D.roundPrecision = 4; + const vector = new RoundedVector3D(VECTOR_FLOAT); + + expect(vector.toJSON()).to.equal(VECTOR_FLOAT_ROUNDED_4); + expect(vector.value_rounded).to.equal(VECTOR_FLOAT_ROUNDED_4); + expect(vector.x_rounded).to.be.equal(VECTOR_FLOAT_ROUNDED_4[0]); + expect(vector.y_rounded).to.be.equal(VECTOR_FLOAT_ROUNDED_4[1]); + expect(vector.z_rounded).to.be.equal(VECTOR_FLOAT_ROUNDED_4[2]); + }); + + it("should do serialization with precision 3", () => { + RoundedVector3D.roundPrecision = 3; + const vector = new RoundedVector3D(VECTOR_FLOAT); + + expect(vector.toJSON()).to.equal(VECTOR_FLOAT_ROUNDED_3); + expect(vector.value_rounded).to.equal(VECTOR_FLOAT_ROUNDED_3); + }); + + it("should do equality changes with precision", () => { + RoundedVector3D.roundPrecision = 4; + let vector = new RoundedVector3D(VECTOR_FLOAT); + expect(vector.equals(VECTOR_FLOAT)).to.equal(true); + expect(vector.equals(VECTOR_FLOAT_ROUNDED_4)).to.equal(true); + expect(vector.equals(VECTOR_FLOAT_ROUNDED_3)).to.equal(false); + + RoundedVector3D.roundPrecision = 3; + vector = new RoundedVector3D(VECTOR_FLOAT); + expect(vector.equals(VECTOR_FLOAT_ROUNDED_4)).to.equal(true); + expect(vector.equals(VECTOR_FLOAT_ROUNDED_3)).to.equal(true); + }); +}); From 77e4cdb3511820534ff4bf5e4d4f662eaecb1e05 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Thu, 17 Apr 2025 21:36:47 -0700 Subject: [PATCH 24/35] update: add defensive assignment --- src/js/vector.ts | 4 ++-- tests/js/vector.ts | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/js/vector.ts b/src/js/vector.ts index fe0d0646..b99d9506 100644 --- a/src/js/vector.ts +++ b/src/js/vector.ts @@ -15,7 +15,7 @@ export class Vector3D { ) { throw new Error("Vector3D must be a tuple of exactly 3 numbers."); } - this._value = value as PointSchema; + this._value = [...value] as PointSchema; } get value(): PointSchema { @@ -58,7 +58,7 @@ export class RoundedVector3D extends Vector3D { const rounded = skipRounding ? this.value : (math.roundArrayOrNumber(this.value, RoundedVector3D.roundPrecision) as PointSchema); - return rounded; + return [...rounded] as PointSchema; } get value_rounded(): PointSchema { diff --git a/tests/js/vector.ts b/tests/js/vector.ts index 6f70fbe6..ef3df070 100644 --- a/tests/js/vector.ts +++ b/tests/js/vector.ts @@ -19,7 +19,7 @@ const VECTOR_FLOAT_ROUNDED_3: [number, number, number] = [1.235, 2.346, 3.457]; describe("Vector3D", () => { it("should do init and value access", () => { const vector = new Vector3D(VECTOR_FLOAT); - expect(vector.value).to.equal(VECTOR_FLOAT); + expect(vector.value).to.deep.equal(VECTOR_FLOAT); expect(vector.x).to.be.closeTo(1.23456789, FLOAT_PRECISION); expect(vector.y).to.be.closeTo(2.345678901, FLOAT_PRECISION); expect(vector.z).to.be.closeTo(3.456789012, FLOAT_PRECISION); @@ -49,26 +49,26 @@ describe("Vector3D", () => { describe("RoundedVector3D", () => { it("should do init and default value access", () => { const vector = new RoundedVector3D(VECTOR_FLOAT); - expect(vector.value).to.equal(VECTOR_FLOAT); + expect(vector.value).to.deep.equal(VECTOR_FLOAT); }); it("should do serialization with precision 4", () => { RoundedVector3D.roundPrecision = 4; const vector = new RoundedVector3D(VECTOR_FLOAT); - expect(vector.toJSON()).to.equal(VECTOR_FLOAT_ROUNDED_4); - expect(vector.value_rounded).to.equal(VECTOR_FLOAT_ROUNDED_4); - expect(vector.x_rounded).to.be.equal(VECTOR_FLOAT_ROUNDED_4[0]); - expect(vector.y_rounded).to.be.equal(VECTOR_FLOAT_ROUNDED_4[1]); - expect(vector.z_rounded).to.be.equal(VECTOR_FLOAT_ROUNDED_4[2]); + expect(vector.toJSON()).to.deep.equal(VECTOR_FLOAT_ROUNDED_4); + expect(vector.value_rounded).to.deep.equal(VECTOR_FLOAT_ROUNDED_4); + expect(vector.x_rounded).to.be.deep.equal(VECTOR_FLOAT_ROUNDED_4[0]); + expect(vector.y_rounded).to.be.deep.equal(VECTOR_FLOAT_ROUNDED_4[1]); + expect(vector.z_rounded).to.be.deep.equal(VECTOR_FLOAT_ROUNDED_4[2]); }); it("should do serialization with precision 3", () => { RoundedVector3D.roundPrecision = 3; const vector = new RoundedVector3D(VECTOR_FLOAT); - expect(vector.toJSON()).to.equal(VECTOR_FLOAT_ROUNDED_3); - expect(vector.value_rounded).to.equal(VECTOR_FLOAT_ROUNDED_3); + expect(vector.toJSON()).to.deep.equal(VECTOR_FLOAT_ROUNDED_3); + expect(vector.value_rounded).to.deep.equal(VECTOR_FLOAT_ROUNDED_3); }); it("should do equality changes with precision", () => { From 1a5117c1c0fb5f2b0c5cf568ef63ad0a2a90b4bc Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Thu, 17 Apr 2025 21:45:17 -0700 Subject: [PATCH 25/35] update: add export --- dist/js/index.d.ts | 5 ++- dist/js/index.js | 17 ++++++++++ dist/js/vector.d.ts | 22 +++++++++++++ dist/js/vector.js | 77 +++++++++++++++++++++++++++++++++++++++++++++ src/js/index.ts | 12 ++++++- 5 files changed, 131 insertions(+), 2 deletions(-) create mode 100644 dist/js/vector.d.ts create mode 100644 dist/js/vector.js diff --git a/dist/js/index.d.ts b/dist/js/index.d.ts index 1ed95c50..d52bc1d8 100644 --- a/dist/js/index.d.ts +++ b/dist/js/index.d.ts @@ -3,13 +3,16 @@ import * as context from "./context"; import * as entity from "./entity"; import * as utils from "./utils"; import { RoundedValueWithId, ValueWithId } from "./ValueWithId"; -export { ArrayWithIds, ValueWithId, RoundedValueWithId, RoundedArrayWithIds }; +import { RoundedVector3D, Vector3D } from "./vector"; +export { ArrayWithIds, ValueWithId, RoundedValueWithId, RoundedArrayWithIds, RoundedVector3D, Vector3D, }; export { entity, context, utils }; declare const Code: { ArrayWithIds: typeof ArrayWithIds; ValueWithId: typeof ValueWithId; RoundedArrayWithIds: typeof RoundedArrayWithIds; RoundedValueWithId: typeof RoundedValueWithId; + RoundedVector3D: typeof RoundedVector3D; + Vector3D: typeof Vector3D; entity: typeof entity; context: typeof context; utils: typeof utils; diff --git a/dist/js/index.js b/dist/js/index.js index 47df3907..c877fb64 100644 --- a/dist/js/index.js +++ b/dist/js/index.js @@ -56,6 +56,8 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.utils = exports.context = exports.entity = + exports.Vector3D = + exports.RoundedVector3D = exports.RoundedArrayWithIds = exports.RoundedValueWithId = exports.ValueWithId = @@ -93,11 +95,26 @@ Object.defineProperty(exports, "ValueWithId", { return ValueWithId_1.ValueWithId; }, }); +const vector_1 = require("./vector"); +Object.defineProperty(exports, "RoundedVector3D", { + enumerable: true, + get: function () { + return vector_1.RoundedVector3D; + }, +}); +Object.defineProperty(exports, "Vector3D", { + enumerable: true, + get: function () { + return vector_1.Vector3D; + }, +}); const Code = { ArrayWithIds: ArrayWithIds_1.ArrayWithIds, ValueWithId: ValueWithId_1.ValueWithId, RoundedArrayWithIds: ArrayWithIds_1.RoundedArrayWithIds, RoundedValueWithId: ValueWithId_1.RoundedValueWithId, + RoundedVector3D: vector_1.RoundedVector3D, + Vector3D: vector_1.Vector3D, entity, context, utils, diff --git a/dist/js/vector.d.ts b/dist/js/vector.d.ts new file mode 100644 index 00000000..ed9c0c67 --- /dev/null +++ b/dist/js/vector.d.ts @@ -0,0 +1,22 @@ +import { PointSchema } from "@mat3ra/esse/dist/js/types"; +export declare class Vector3D { + static atol: number; + private _value; + constructor(value: number[] | PointSchema); + get value(): PointSchema; + get x(): number; + get y(): number; + get z(): number; + equals(other: number[] | PointSchema | Vector3D): boolean; + get norm(): number; +} +export declare class RoundedVector3D extends Vector3D { + static roundPrecision: number; + toJSON(skipRounding?: boolean): PointSchema; + get value_rounded(): PointSchema; + get x_rounded(): number; + get y_rounded(): number; + get z_rounded(): number; + equals(other: PointSchema | RoundedVector3D): boolean; + get norm_rounded(): number; +} diff --git a/dist/js/vector.js b/dist/js/vector.js new file mode 100644 index 00000000..f5d52d90 --- /dev/null +++ b/dist/js/vector.js @@ -0,0 +1,77 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.RoundedVector3D = exports.Vector3D = void 0; +const math_1 = require("./math"); +class Vector3D { + constructor(value) { + if ( + !Array.isArray(value) || + value.length !== 3 || + !value.every((v) => typeof v === "number") + ) { + throw new Error("Vector3D must be a tuple of exactly 3 numbers."); + } + this._value = [...value]; + } + get value() { + return this._value; + } + get x() { + return this._value[0]; + } + get y() { + return this._value[1]; + } + get z() { + return this._value[2]; + } + equals(other) { + if (Array.isArray(other)) { + if (other.length !== 3) { + throw new Error("Input must be a 3-element array."); + } + other = other; + } + const arr1 = this._value; + const arr2 = other instanceof Vector3D ? other.value : other; + return math_1.math.vEqualWithTolerance(arr1, arr2, Vector3D.atol); + } + get norm() { + return math_1.math.vlen(this._value); + } +} +exports.Vector3D = Vector3D; +Vector3D.atol = 1e-8; +class RoundedVector3D extends Vector3D { + toJSON(skipRounding = false) { + const rounded = skipRounding + ? this.value + : math_1.math.roundArrayOrNumber(this.value, RoundedVector3D.roundPrecision); + return [...rounded]; + } + get value_rounded() { + return this.toJSON(); + } + get x_rounded() { + return this.value_rounded[0]; + } + get y_rounded() { + return this.value_rounded[1]; + } + get z_rounded() { + return this.value_rounded[2]; + } + equals(other) { + const arr1 = this.value_rounded; + const arr2 = Array.isArray(other) + ? new RoundedVector3D(other).value_rounded + : other.value_rounded; + const atol = RoundedVector3D.atol || 10 ** -RoundedVector3D.roundPrecision; + return math_1.math.vEqualWithTolerance(arr1, arr2, atol); + } + get norm_rounded() { + return math_1.math.roundArrayOrNumber(this.norm, RoundedVector3D.roundPrecision); + } +} +exports.RoundedVector3D = RoundedVector3D; +RoundedVector3D.roundPrecision = 9; diff --git a/src/js/index.ts b/src/js/index.ts index df54cfc5..0894b9f7 100644 --- a/src/js/index.ts +++ b/src/js/index.ts @@ -3,8 +3,16 @@ import * as context from "./context"; import * as entity from "./entity"; import * as utils from "./utils"; import { RoundedValueWithId, ValueWithId } from "./ValueWithId"; +import { RoundedVector3D, Vector3D } from "./vector"; -export { ArrayWithIds, ValueWithId, RoundedValueWithId, RoundedArrayWithIds }; +export { + ArrayWithIds, + ValueWithId, + RoundedValueWithId, + RoundedArrayWithIds, + RoundedVector3D, + Vector3D, +}; export { entity, context, utils }; const Code = { @@ -12,6 +20,8 @@ const Code = { ValueWithId, RoundedArrayWithIds, RoundedValueWithId, + RoundedVector3D, + Vector3D, entity, context, utils, From 0ca1b30f4019ae0e8aa040c4f682a4568bb8f252 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Fri, 18 Apr 2025 17:36:11 -0700 Subject: [PATCH 26/35] chore: main export --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 81848c92..9efe698c 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "type": "git", "url": "https://github.com/Exabyte-io/code.js.git" }, - "main": "dist/index.js", + "main": "./dist/js/index.js", "exports": { ".": { "import": "./dist/js/index.js", From 27b58966f04e858dcf072b2d015aae99269bd07e Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Fri, 18 Apr 2025 17:58:06 -0700 Subject: [PATCH 27/35] wip: export math --- package-lock.json | 3 ++- package.json | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5f36469a..726c13bf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,7 +47,7 @@ "@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/parser": "^5.62.0", "chai": "^4.5.0", - "eslint": "7.32.0", + "eslint": "^7.32.0", "eslint-config-airbnb": "19.0.4", "eslint-config-prettier": "^8.10.0", "eslint-import-resolver-exports": "^1.0.0-beta.5", @@ -5198,6 +5198,7 @@ "version": "7.32.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", + "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "dev": true, "dependencies": { "@babel/code-frame": "7.12.11", diff --git a/package.json b/package.json index 9efe698c..7a3793d5 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,10 @@ "./dist/js/entity": "./dist/js/entity/index.js", "./dist/js/utils": "./dist/js/utils/index.js", "./dist/js/constants": "./dist/js/constants.js", - "./dist/js/math": "./dist/js/math.js", + "./dist/js/math": { + "import": "./dist/js/math.js", + "types": "./dist/js/math.d.ts" + }, "./dist/js/utils/schemas": "./dist/js/utils/schemas.js" }, "files": [ From 88e9d2ca3b06f2c09f6b3e4ab0e8046817533e3d Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Fri, 18 Apr 2025 18:08:08 -0700 Subject: [PATCH 28/35] update: fix generic --- dist/js/ArrayWithIds.d.ts | 8 ++++---- dist/js/ArrayWithIds.js | 8 ++++---- package.json | 15 --------------- src/js/ArrayWithIds.ts | 18 ++++++++++++------ 4 files changed, 20 insertions(+), 29 deletions(-) diff --git a/dist/js/ArrayWithIds.d.ts b/dist/js/ArrayWithIds.d.ts index 65184a75..06dd7a96 100644 --- a/dist/js/ArrayWithIds.d.ts +++ b/dist/js/ArrayWithIds.d.ts @@ -3,11 +3,11 @@ export declare class ArrayWithIds { values: T[]; ids: number[]; constructor(values?: T[], ids?: number[]); - static fromValues(values: T[]): ArrayWithIds; - static fromObjects(objects: Array<{ + static fromValues>(this: new (values: U[], ids: number[]) => C, values: U[]): C; + static fromObjects>(this: new (values: U[], ids: number[]) => C, objects: { id: number; - value: T; - }>): ArrayWithIds; + value: U; + }[]): C; toJSON(): object[]; toValueWithIdArray(): ValueWithId[]; getElementValueByIndex(index: number): T | undefined; diff --git a/dist/js/ArrayWithIds.js b/dist/js/ArrayWithIds.js index 59ea796e..242e6d1f 100644 --- a/dist/js/ArrayWithIds.js +++ b/dist/js/ArrayWithIds.js @@ -12,12 +12,12 @@ class ArrayWithIds { } static fromValues(values) { const ids = values.map((_, i) => i); - return new ArrayWithIds(values, ids); + return new this(values, ids); } static fromObjects(objects) { - const values = objects.map((item) => item.value); - const ids = objects.map((item) => item.id); - return new ArrayWithIds(values, ids); + const values = objects.map((obj) => obj.value); + const ids = objects.map((obj) => obj.id); + return new this(values, ids); } toJSON() { return this.values.map((value, index) => ({ diff --git a/package.json b/package.json index 7a3793d5..7d8b2ee2 100644 --- a/package.json +++ b/package.json @@ -16,21 +16,6 @@ "url": "https://github.com/Exabyte-io/code.js.git" }, "main": "./dist/js/index.js", - "exports": { - ".": { - "import": "./dist/js/index.js", - "types": "./dist/js/index.d.ts" - }, - "./dist/js/context": "./dist/js/context/index.js", - "./dist/js/entity": "./dist/js/entity/index.js", - "./dist/js/utils": "./dist/js/utils/index.js", - "./dist/js/constants": "./dist/js/constants.js", - "./dist/js/math": { - "import": "./dist/js/math.js", - "types": "./dist/js/math.d.ts" - }, - "./dist/js/utils/schemas": "./dist/js/utils/schemas.js" - }, "files": [ "/dist", "/src/js", diff --git a/src/js/ArrayWithIds.ts b/src/js/ArrayWithIds.ts index bbbee6fa..27e2677f 100644 --- a/src/js/ArrayWithIds.ts +++ b/src/js/ArrayWithIds.ts @@ -18,15 +18,21 @@ export class ArrayWithIds { this.ids = [...ids]; } - static fromValues(values: T[]): ArrayWithIds { + static fromValues>( + this: new (values: U[], ids: number[]) => C, + values: U[], + ): C { const ids = values.map((_, i) => i); - return new ArrayWithIds(values, ids); + return new this(values, ids); } - static fromObjects(objects: Array<{ id: number; value: T }>): ArrayWithIds { - const values = objects.map((item) => item.value); - const ids = objects.map((item) => item.id); - return new ArrayWithIds(values, ids); + static fromObjects>( + this: new (values: U[], ids: number[]) => C, + objects: { id: number; value: U }[], + ): C { + const values = objects.map((obj) => obj.value); + const ids = objects.map((obj) => obj.id); + return new this(values, ids); } toJSON(): object[] { From 762ea8c75c325891f6da1680119a85e678b3ec3e Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Sat, 19 Apr 2025 18:43:29 -0700 Subject: [PATCH 29/35] update: vector --- dist/js/ArrayWithIds.js | 57 +- dist/js/ValueWithId.js | 6 +- dist/js/index.js | 137 +-- dist/js/math.js | 37 +- dist/js/vector.d.ts | 14 +- dist/js/vector.js | 6 +- package-lock.json | 1640 +++++++++++++--------------------- package.json | 2 +- src/js/vector.ts | 27 +- src/py/mat3ra/code/vector.py | 2 +- 10 files changed, 722 insertions(+), 1206 deletions(-) diff --git a/dist/js/ArrayWithIds.js b/dist/js/ArrayWithIds.js index 242e6d1f..ad691d7c 100644 --- a/dist/js/ArrayWithIds.js +++ b/dist/js/ArrayWithIds.js @@ -22,36 +22,29 @@ class ArrayWithIds { toJSON() { return this.values.map((value, index) => ({ id: this.ids[index], - value: - value !== null && + value: value !== null && typeof value === "object" && "toJSON" in value && typeof value.toJSON === "function" - ? value.toJSON() - : value, + ? value.toJSON() + : value, })); } toValueWithIdArray() { - return this.values.map( - (value, index) => new ValueWithId_1.ValueWithId(this.ids[index], value), - ); + return this.values.map((value, index) => new ValueWithId_1.ValueWithId(this.ids[index], value)); } getElementValueByIndex(index) { return this.values[index]; } getElementIdByValue(value) { - const index = this.values.findIndex((v) => - Array.isArray(v) && Array.isArray(value) - ? v.length === value.length && v.every((val, idx) => val === value[idx]) - : v === value, - ); + const index = this.values.findIndex((v) => Array.isArray(v) && Array.isArray(value) + ? v.length === value.length && v.every((val, idx) => val === value[idx]) + : v === value); return index !== -1 ? this.ids[index] : undefined; } filterByValues(valuesToKeep) { const toHash = (v) => (Array.isArray(v) ? JSON.stringify(v) : String(v)); - const keepSet = new Set( - Array.isArray(valuesToKeep) ? valuesToKeep.map(toHash) : [toHash(valuesToKeep)], - ); + const keepSet = new Set(Array.isArray(valuesToKeep) ? valuesToKeep.map(toHash) : [toHash(valuesToKeep)]); const filtered = this.values .map((value, i) => [value, this.ids[i]]) .filter(([value]) => keepSet.has(toHash(value))); @@ -72,17 +65,18 @@ class ArrayWithIds { this.ids = keep.map((i) => this.ids[i]); } equals(other) { - if (!(other instanceof ArrayWithIds)) return false; - if (this.values.length !== other.values.length) return false; - if (this.ids.length !== other.ids.length) return false; - return ( - this.values.every((v, i) => { - const ov = other.values[i]; - return Array.isArray(v) && Array.isArray(ov) - ? v.length === ov.length && v.every((val, idx) => val === ov[idx]) - : v === ov; - }) && this.ids.every((id, i) => id === other.ids[i]) - ); + if (!(other instanceof ArrayWithIds)) + return false; + if (this.values.length !== other.values.length) + return false; + if (this.ids.length !== other.ids.length) + return false; + return (this.values.every((v, i) => { + const ov = other.values[i]; + return Array.isArray(v) && Array.isArray(ov) + ? v.length === ov.length && v.every((val, idx) => val === ov[idx]) + : v === ov; + }) && this.ids.every((id, i) => id === other.ids[i])); } mapArrayInPlace(func) { this.values = this.values.map(func); @@ -95,7 +89,8 @@ class ArrayWithIds { removeItem(index, id) { if (id !== undefined) { index = this.ids.indexOf(id); - if (index === -1) throw new Error("ID not found"); + if (index === -1) + throw new Error("ID not found"); } if (index < 0 || index >= this.values.length) { throw new Error("Index out of range"); @@ -111,13 +106,7 @@ class RoundedArrayWithIds extends ArrayWithIds { this.roundingOptions = options; } toJSON() { - return this.values.map((value, index) => - new ValueWithId_1.RoundedValueWithId( - this.ids[index], - value, - this.roundingOptions, - ).toJSON(), - ); + return this.values.map((value, index) => new ValueWithId_1.RoundedValueWithId(this.ids[index], value, this.roundingOptions).toJSON()); } } exports.RoundedArrayWithIds = RoundedArrayWithIds; diff --git a/dist/js/ValueWithId.js b/dist/js/ValueWithId.js index 7faa05a3..1adb243d 100644 --- a/dist/js/ValueWithId.js +++ b/dist/js/ValueWithId.js @@ -11,12 +11,10 @@ class ValueWithId { * Converts the instance to a plain JavaScript object. */ toJSON() { - if ( - this.value !== null && + if (this.value !== null && typeof this.value === "object" && "toJSON" in this.value && - typeof this.value.toJSON === "function" - ) { + typeof this.value.toJSON === "function") { return { id: this.id, value: this.value.toJSON() }; } return { id: this.id, value: this.value }; diff --git a/dist/js/index.js b/dist/js/index.js index c877fb64..846b45f8 100644 --- a/dist/js/index.js +++ b/dist/js/index.js @@ -1,81 +1,42 @@ "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 __setModuleDefault = - (this && this.__setModuleDefault) || - (Object.create - ? function (o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } - : function (o, v) { - o["default"] = v; - }); -var __importStar = - (this && this.__importStar) || - (function () { - var ownKeys = function (o) { - ownKeys = - Object.getOwnPropertyNames || - function (o) { - var ar = []; - for (var k in o) - if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) - for (var k = ownKeys(mod), i = 0; i < k.length; i++) - if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; +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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; }; - })(); + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); Object.defineProperty(exports, "__esModule", { value: true }); -exports.utils = - exports.context = - exports.entity = - exports.Vector3D = - exports.RoundedVector3D = - exports.RoundedArrayWithIds = - exports.RoundedValueWithId = - exports.ValueWithId = - exports.ArrayWithIds = - void 0; +exports.utils = exports.context = exports.entity = exports.Vector3D = exports.RoundedVector3D = exports.RoundedArrayWithIds = exports.RoundedValueWithId = exports.ValueWithId = exports.ArrayWithIds = void 0; const ArrayWithIds_1 = require("./ArrayWithIds"); -Object.defineProperty(exports, "ArrayWithIds", { - enumerable: true, - get: function () { - return ArrayWithIds_1.ArrayWithIds; - }, -}); -Object.defineProperty(exports, "RoundedArrayWithIds", { - enumerable: true, - get: function () { - return ArrayWithIds_1.RoundedArrayWithIds; - }, -}); +Object.defineProperty(exports, "ArrayWithIds", { enumerable: true, get: function () { return ArrayWithIds_1.ArrayWithIds; } }); +Object.defineProperty(exports, "RoundedArrayWithIds", { enumerable: true, get: function () { return ArrayWithIds_1.RoundedArrayWithIds; } }); const context = __importStar(require("./context")); exports.context = context; const entity = __importStar(require("./entity")); @@ -83,31 +44,11 @@ exports.entity = entity; const utils = __importStar(require("./utils")); exports.utils = utils; const ValueWithId_1 = require("./ValueWithId"); -Object.defineProperty(exports, "RoundedValueWithId", { - enumerable: true, - get: function () { - return ValueWithId_1.RoundedValueWithId; - }, -}); -Object.defineProperty(exports, "ValueWithId", { - enumerable: true, - get: function () { - return ValueWithId_1.ValueWithId; - }, -}); +Object.defineProperty(exports, "RoundedValueWithId", { enumerable: true, get: function () { return ValueWithId_1.RoundedValueWithId; } }); +Object.defineProperty(exports, "ValueWithId", { enumerable: true, get: function () { return ValueWithId_1.ValueWithId; } }); const vector_1 = require("./vector"); -Object.defineProperty(exports, "RoundedVector3D", { - enumerable: true, - get: function () { - return vector_1.RoundedVector3D; - }, -}); -Object.defineProperty(exports, "Vector3D", { - enumerable: true, - get: function () { - return vector_1.Vector3D; - }, -}); +Object.defineProperty(exports, "RoundedVector3D", { enumerable: true, get: function () { return vector_1.RoundedVector3D; } }); +Object.defineProperty(exports, "Vector3D", { enumerable: true, get: function () { return vector_1.Vector3D; } }); const Code = { ArrayWithIds: ArrayWithIds_1.ArrayWithIds, ValueWithId: ValueWithId_1.ValueWithId, diff --git a/dist/js/math.js b/dist/js/math.js index 19c7bc55..e92525c5 100644 --- a/dist/js/math.js +++ b/dist/js/math.js @@ -1,15 +1,9 @@ "use strict"; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; Object.defineProperty(exports, "__esModule", { value: true }); -exports.math = - exports.roundArrayOrNumber = - exports.roundCustom = - exports.RoundingMethodEnum = - void 0; +exports.math = exports.roundArrayOrNumber = exports.roundCustom = exports.RoundingMethodEnum = void 0; exports.numberToPrecision = numberToPrecision; /* eslint-disable */ const mathjs_1 = __importDefault(require("mathjs")); @@ -48,9 +42,7 @@ const angle = (a, b, unit) => { const lenA = vlen(a); const lenB = vlen(b); // @ts-ignore - return exports.math - .unit(exports.math.acos(product(a, b) / (lenA * lenB)), "rad") - .toNumber(unit || "deg"); + return exports.math.unit(exports.math.acos(product(a, b) / (lenA * lenB)), "rad").toNumber(unit || "deg"); }; const angleUpTo90 = (a, b, unit) => { const angleUpTo180 = angle(a, b, unit); @@ -64,9 +56,7 @@ const angleUpTo90 = (a, b, unit) => { */ const vDist = (v1, v2) => { if (v1.length !== v2.length) { - console.error( - "Attempting to calculate distance between vectors of different dimensionality", - ); + console.error("Attempting to calculate distance between vectors of different dimensionality"); return; } return vlen(v1.map((coordinate, index) => coordinate - v2[index])); @@ -106,10 +96,7 @@ const precise = (x, n = 7) => { const mod = (num, tolerance = 0.001) => { const m = num % 1; const x = num >= 0 ? m : 1 + m; - if ( - exports.math.smallerEq(Math.abs(x - 1), tolerance) || - exports.math.smallerEq(Math.abs(x), tolerance) - ) { + if (exports.math.smallerEq(Math.abs(x - 1), tolerance) || exports.math.smallerEq(Math.abs(x), tolerance)) { return 0; } return x; @@ -127,7 +114,8 @@ const cartesianProduct = (...arg) => { a.push(arg[i][j]); if (i === max) { r.push(a); - } else { + } + else { helper(a, i + 1); } } @@ -207,7 +195,8 @@ const roundCustom = (value, decimals = 0, method = RoundingMethodEnum.HalfAwayFr if (Math.abs(fractional - 0.5) < Number.EPSILON) { // Round to even roundedAbs = floorValue % 2 === 0 ? floorValue : floorValue + 1; - } else { + } + else { roundedAbs = Math.round(absValue); } break; @@ -219,9 +208,7 @@ const roundCustom = (value, decimals = 0, method = RoundingMethodEnum.HalfAwayFr exports.roundCustom = roundCustom; const roundArrayOrNumber = (value, decimals = 9, method = RoundingMethodEnum.HalfAwayFromZero) => { if (Array.isArray(value)) { - return value.map((v) => - typeof v === "number" ? (0, exports.roundCustom)(v, decimals, method) : v, - ); + return value.map((v) => (typeof v === "number" ? (0, exports.roundCustom)(v, decimals, method) : v)); } return typeof value === "number" ? (0, exports.roundCustom)(value, decimals, method) : value; }; diff --git a/dist/js/vector.d.ts b/dist/js/vector.d.ts index ed9c0c67..f86cefa4 100644 --- a/dist/js/vector.d.ts +++ b/dist/js/vector.d.ts @@ -1,22 +1,22 @@ -import { PointSchema } from "@mat3ra/esse/dist/js/types"; +import { Vector3DSchema } from "@mat3ra/esse/dist/js/types"; export declare class Vector3D { static atol: number; private _value; - constructor(value: number[] | PointSchema); - get value(): PointSchema; + constructor(value: number[] | Vector3DSchema); + get value(): Vector3DSchema; get x(): number; get y(): number; get z(): number; - equals(other: number[] | PointSchema | Vector3D): boolean; + equals(other: number[] | Vector3DSchema | Vector3D): boolean; get norm(): number; } export declare class RoundedVector3D extends Vector3D { static roundPrecision: number; - toJSON(skipRounding?: boolean): PointSchema; - get value_rounded(): PointSchema; + toJSON(skipRounding?: boolean): Vector3DSchema; + get value_rounded(): Vector3DSchema; get x_rounded(): number; get y_rounded(): number; get z_rounded(): number; - equals(other: PointSchema | RoundedVector3D): boolean; + equals(other: Vector3DSchema | RoundedVector3D): boolean; get norm_rounded(): number; } diff --git a/dist/js/vector.js b/dist/js/vector.js index f5d52d90..82d2ad41 100644 --- a/dist/js/vector.js +++ b/dist/js/vector.js @@ -4,11 +4,9 @@ exports.RoundedVector3D = exports.Vector3D = void 0; const math_1 = require("./math"); class Vector3D { constructor(value) { - if ( - !Array.isArray(value) || + if (!Array.isArray(value) || value.length !== 3 || - !value.every((v) => typeof v === "number") - ) { + !value.every((v) => typeof v === "number")) { throw new Error("Vector3D must be a tuple of exactly 3 numbers."); } this._value = [...value]; diff --git a/package-lock.json b/package-lock.json index 726c13bf..fe4accab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,7 +34,7 @@ "@babel/register": "^7.25.7", "@babel/runtime-corejs3": "7.25.7", "@exabyte-io/eslint-config": "2025.1.15-0", - "@mat3ra/esse": "2025.1.27-0", + "@mat3ra/esse": "git+https://git@github.com/Exabyte-io/esse.git#dae2d3682c4cade747762ae12bc28896513ec555", "@mat3ra/tsconfig": "2024.6.3-0", "@types/chai": "^4.3.20", "@types/crypto-js": "^4.2.2", @@ -47,7 +47,7 @@ "@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/parser": "^5.62.0", "chai": "^4.5.0", - "eslint": "^7.32.0", + "eslint": "7.32.0", "eslint-config-airbnb": "19.0.4", "eslint-config-prettier": "^8.10.0", "eslint-import-resolver-exports": "^1.0.0-beta.5", @@ -125,12 +125,13 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.25.7.tgz", - "integrity": "sha512-0xZJFNE5XMpENsgfHYTw8FbX4kv53mFLn2i3XPoq69LyhYSCBJtitaHx9QnsVTrsogI4Z3+HtEfZ2/GFPOtf5g==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", "dev": true, "dependencies": { - "@babel/highlight": "^7.25.7", + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", "picocolors": "^1.0.0" }, "engines": { @@ -138,9 +139,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.7.tgz", - "integrity": "sha512-9ickoLz+hcXCeh7jrcin+/SLWm+GkxE2kTvoYyp38p4WkdFXfQJxDFGWp/YHjiKLPx06z2A7W8XKuqbReXDzsw==", + "version": "7.26.8", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.8.tgz", + "integrity": "sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ==", "dev": true, "engines": { "node": ">=6.9.0" @@ -213,12 +214,13 @@ } }, "node_modules/@babel/generator": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.7.tgz", - "integrity": "sha512-5Dqpl5fyV9pIAD62yK9P7fcA768uVPUyrQmqpqstHWgMma4feF1x/oFysBCVZLY5wJ2GkMUCdsNDnGZrPoR6rA==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.0.tgz", + "integrity": "sha512-VybsKvpiN1gU1sdMZIp7FcqphVVKEwcuj02x73uvcHE0PTihx1nlBcowYWhDwjpoAXRv43+gDzyggGnn1XZhVw==", "dev": true, "dependencies": { - "@babel/types": "^7.25.7", + "@babel/parser": "^7.27.0", + "@babel/types": "^7.27.0", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^3.0.2" @@ -228,38 +230,25 @@ } }, "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.25.7.tgz", - "integrity": "sha512-4xwU8StnqnlIhhioZf1tqnVWeQ9pvH/ujS8hRfw/WOza+/a+1qv69BWNy+oY231maTCWgKWhfBU7kDpsds6zAA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.25.9.tgz", + "integrity": "sha512-gv7320KBUFJz1RnylIg5WWYPRXKZ884AGkYpgpWW02TH66Dl+HaC1t1CKd0z3R4b6hdYEcmrNZHUmfCP+1u3/g==", "dev": true, "dependencies": { - "@babel/types": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.25.7.tgz", - "integrity": "sha512-12xfNeKNH7jubQNm7PAkzlLwEmCs1tfuX3UjIw6vP6QXi+leKh6+LyC/+Ed4EIQermwd58wsyh070yjDHFlNGg==", - "dev": true, - "dependencies": { - "@babel/traverse": "^7.25.7", - "@babel/types": "^7.25.7" + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.7.tgz", - "integrity": "sha512-DniTEax0sv6isaw6qSQSfV4gVRNtw2rte8HHM45t9ZR0xILaufBRNkpMifCRiAPyvL4ACD6v0gfCwCmtOQaV4A==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.0.tgz", + "integrity": "sha512-LVk7fbXml0H2xH34dFzKQ7TDZ2G4/rVTOrq9V+icbbadjbVxxeFeDsNHv2SrZeWoA+6ZiTyWYWtScEIW07EAcA==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.25.7", - "@babel/helper-validator-option": "^7.25.7", + "@babel/compat-data": "^7.26.8", + "@babel/helper-validator-option": "^7.25.9", "browserslist": "^4.24.0", "lru-cache": "^5.1.1", "semver": "^6.3.1" @@ -278,17 +267,17 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.25.7.tgz", - "integrity": "sha512-bD4WQhbkx80mAyj/WCm4ZHcF4rDxkoLFO6ph8/5/mQ3z4vAzltQXAmbc7GvVJx5H+lk5Mi5EmbTeox5nMGCsbw==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.27.0.tgz", + "integrity": "sha512-vSGCvMecvFCd/BdpGlhpXYNhhC4ccxyvQWpbGL4CWbvfEoLFWUZuSuf7s9Aw70flgQF+6vptvgK2IfOnKlRmBg==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.25.7", - "@babel/helper-member-expression-to-functions": "^7.25.7", - "@babel/helper-optimise-call-expression": "^7.25.7", - "@babel/helper-replace-supers": "^7.25.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.25.7", - "@babel/traverse": "^7.25.7", + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-member-expression-to-functions": "^7.25.9", + "@babel/helper-optimise-call-expression": "^7.25.9", + "@babel/helper-replace-supers": "^7.26.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9", + "@babel/traverse": "^7.27.0", "semver": "^6.3.1" }, "engines": { @@ -308,13 +297,13 @@ } }, "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.25.7.tgz", - "integrity": "sha512-byHhumTj/X47wJ6C6eLpK7wW/WBEcnUeb7D0FNc/jFQnQVw7DOso3Zz5u9x/zLrFVkHa89ZGDbkAa1D54NdrCQ==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.27.0.tgz", + "integrity": "sha512-fO8l08T76v48BhpNRW/nQ0MxfnSdoSKUJBMjubOAYffsVuGG5qOfMq7N6Es7UJvi7Y8goXXo07EfcHZXDPuELQ==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.25.7", - "regexpu-core": "^6.1.1", + "@babel/helper-annotate-as-pure": "^7.25.9", + "regexpu-core": "^6.2.0", "semver": "^6.3.1" }, "engines": { @@ -334,9 +323,9 @@ } }, "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.2.tgz", - "integrity": "sha512-LV76g+C502biUK6AyZ3LK10vDpDyCzZnhZFXkH1L75zHPj68+qc8Zfpx2th+gzwA2MzyK+1g/3EPl62yFnVttQ==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.4.tgz", + "integrity": "sha512-jljfR1rGnXXNWnmQg2K3+bvhkxB51Rl32QRaOTuwwjviGrHzIbSc8+x9CpraDtbT7mfyjXObULP4w/adunNwAw==", "dev": true, "dependencies": { "@babel/helper-compilation-targets": "^7.22.6", @@ -349,54 +338,41 @@ "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", - "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.25.7.tgz", - "integrity": "sha512-O31Ssjd5K6lPbTX9AAYpSKrZmLeagt9uwschJd+Ixo6QiRyfpvgtVQp8qrDR9UNFjZ8+DO34ZkdrN+BnPXemeA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.25.9.tgz", + "integrity": "sha512-wbfdZ9w5vk0C0oyHqAJbc62+vet5prjj01jjJ8sKn3j9h3MQQlflEdXYvuqRWjHnM12coDEqiC1IRCi0U/EKwQ==", "dev": true, "dependencies": { - "@babel/traverse": "^7.25.7", - "@babel/types": "^7.25.7" + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.7.tgz", - "integrity": "sha512-o0xCgpNmRohmnoWKQ0Ij8IdddjyBFE4T2kagL/x6M3+4zUgc+4qTOUBoNe4XxDskt1HPKO007ZPiMgLDq2s7Kw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", + "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", "dev": true, "dependencies": { - "@babel/traverse": "^7.25.7", - "@babel/types": "^7.25.7" + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.25.7.tgz", - "integrity": "sha512-k/6f8dKG3yDz/qCwSM+RKovjMix563SLxQFo0UhRNo239SP6n9u5/eLtKD6EAjwta2JHJ49CsD8pms2HdNiMMQ==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", + "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", "dev": true, "dependencies": { - "@babel/helper-module-imports": "^7.25.7", - "@babel/helper-simple-access": "^7.25.7", - "@babel/helper-validator-identifier": "^7.25.7", - "@babel/traverse": "^7.25.7" + "@babel/helper-module-imports": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9", + "@babel/traverse": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -406,35 +382,35 @@ } }, "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.25.7.tgz", - "integrity": "sha512-VAwcwuYhv/AT+Vfr28c9y6SHzTan1ryqrydSTFGjU0uDJHw3uZ+PduI8plCLkRsDnqK2DMEDmwrOQRsK/Ykjng==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.25.9.tgz", + "integrity": "sha512-FIpuNaz5ow8VyrYcnXQTDRGvV6tTjkNtCK/RYNDXGSLlUD6cBuQTSw43CShGxjvfBTfcUA/r6UhUCbtYqkhcuQ==", "dev": true, "dependencies": { - "@babel/types": "^7.25.7" + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.7.tgz", - "integrity": "sha512-eaPZai0PiqCi09pPs3pAFfl/zYgGaE6IdXtYvmf0qlcDTd3WCtO7JWCcRd64e0EQrcYgiHibEZnOGsSY4QSgaw==", + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.26.5.tgz", + "integrity": "sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.25.7.tgz", - "integrity": "sha512-kRGE89hLnPfcz6fTrlNU+uhgcwv0mBE4Gv3P9Ke9kLVJYpi4AMVVEElXvB5CabrPZW4nCM8P8UyyjrzCM0O2sw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.25.9.tgz", + "integrity": "sha512-IZtukuUeBbhgOcaW2s06OXTzVNJR0ybm4W5xC1opWFFJMZbwRj5LCk+ByYH7WdZPZTt8KnFwA8pvjN2yqcPlgw==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.25.7", - "@babel/helper-wrap-function": "^7.25.7", - "@babel/traverse": "^7.25.7" + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-wrap-function": "^7.25.9", + "@babel/traverse": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -444,14 +420,14 @@ } }, "node_modules/@babel/helper-replace-supers": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.25.7.tgz", - "integrity": "sha512-iy8JhqlUW9PtZkd4pHM96v6BdJ66Ba9yWSE4z0W4TvSZwLBPkyDsiIU3ENe4SmrzRBs76F7rQXTy1lYC49n6Lw==", + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.26.5.tgz", + "integrity": "sha512-bJ6iIVdYX1YooY2X7w1q6VITt+LnUILtNk7zT78ykuwStx8BauCzxvFqFaHjOpW1bVnSUM1PN1f0p5P21wHxvg==", "dev": true, "dependencies": { - "@babel/helper-member-expression-to-functions": "^7.25.7", - "@babel/helper-optimise-call-expression": "^7.25.7", - "@babel/traverse": "^7.25.7" + "@babel/helper-member-expression-to-functions": "^7.25.9", + "@babel/helper-optimise-call-expression": "^7.25.9", + "@babel/traverse": "^7.26.5" }, "engines": { "node": ">=6.9.0" @@ -460,81 +436,68 @@ "@babel/core": "^7.0.0" } }, - "node_modules/@babel/helper-simple-access": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.25.7.tgz", - "integrity": "sha512-FPGAkJmyoChQeM+ruBGIDyrT2tKfZJO8NcxdC+CWNJi7N8/rZpSxK7yvBJ5O/nF1gfu5KzN7VKG3YVSLFfRSxQ==", - "dev": true, - "dependencies": { - "@babel/traverse": "^7.25.7", - "@babel/types": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.25.7.tgz", - "integrity": "sha512-pPbNbchZBkPMD50K0p3JGcFMNLVUCuU/ABybm/PGNj4JiHrpmNyqqCphBk4i19xXtNV0JhldQJJtbSW5aUvbyA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.25.9.tgz", + "integrity": "sha512-K4Du3BFa3gvyhzgPcntrkDgZzQaq6uozzcpGbOO1OEJaI+EJdqWIMTLgFgQf6lrfiDFo5FU+BxKepI9RmZqahA==", "dev": true, "dependencies": { - "@babel/traverse": "^7.25.7", - "@babel/types": "^7.25.7" + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.7.tgz", - "integrity": "sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.7.tgz", - "integrity": "sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.7.tgz", - "integrity": "sha512-ytbPLsm+GjArDYXJ8Ydr1c/KJuutjF2besPNbIZnZ6MKUxi/uTA22t2ymmA4WFjZFpjiAMO0xuuJPqK2nvDVfQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", + "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-wrap-function": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.25.7.tgz", - "integrity": "sha512-MA0roW3JF2bD1ptAaJnvcabsVlNQShUaThyJbCDD4bCp8NEgiFvpoqRI2YS22hHlc2thjO/fTg2ShLMC3jygAg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.25.9.tgz", + "integrity": "sha512-ETzz9UTjQSTmw39GboatdymDq4XIQbR8ySgVrylRhPOFpsd+JrKHIuF0de7GCWmem+T4uC5z7EZguod7Wj4A4g==", "dev": true, "dependencies": { - "@babel/template": "^7.25.7", - "@babel/traverse": "^7.25.7", - "@babel/types": "^7.25.7" + "@babel/template": "^7.25.9", + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.25.7.tgz", - "integrity": "sha512-Sv6pASx7Esm38KQpF/U/OXLwPPrdGHNKoeblRxgZRLXnAtnkEe4ptJPDtAZM7fBLadbc1Q07kQpSiGQ0Jg6tRA==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.0.tgz", + "integrity": "sha512-U5eyP/CTFPuNE3qk+WZMxFkp/4zUzdceQlfzf7DdGdhp+Fezd7HD+i8Y24ZuTMKX3wQBld449jijbGq6OdGNQg==", "dev": true, "dependencies": { - "@babel/template": "^7.25.7", - "@babel/types": "^7.25.7" + "@babel/template": "^7.27.0", + "@babel/types": "^7.27.0" }, "engines": { "node": ">=6.9.0" @@ -556,12 +519,12 @@ } }, "node_modules/@babel/parser": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.7.tgz", - "integrity": "sha512-aZn7ETtQsjjGG5HruveUK06cU3Hljuhd9Iojm4M8WWv3wLE6OkE5PWbDUkItmMgegmccaITudyuW5RPYrYlgWw==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.0.tgz", + "integrity": "sha512-iaepho73/2Pz7w2eMS0Q5f83+0RKI7i4xmiYeBmDzfRVbQtTOG7Ts0S4HzJVsTMGI9keU8rNfuZr8DKfSt7Yyg==", "dev": true, "dependencies": { - "@babel/types": "^7.25.7" + "@babel/types": "^7.27.0" }, "bin": { "parser": "bin/babel-parser.js" @@ -571,13 +534,13 @@ } }, "node_modules/@babel/plugin-bugfix-firefox-class-in-computed-class-key": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.25.7.tgz", - "integrity": "sha512-UV9Lg53zyebzD1DwQoT9mzkEKa922LNUp5YkTJ6Uta0RbyXaQNUgcvSt7qIu1PpPzVb6rd10OVNTzkyBGeVmxQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.25.9.tgz", + "integrity": "sha512-ZkRyVkThtxQ/J6nv3JFYv1RYY+JT5BvU0y3k5bWrmuG4woXypRa4PXmm9RhOwodRkYFWqC0C0cqcJ4OqR7kW+g==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/traverse": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/traverse": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -587,12 +550,12 @@ } }, "node_modules/@babel/plugin-bugfix-safari-class-field-initializer-scope": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-class-field-initializer-scope/-/plugin-bugfix-safari-class-field-initializer-scope-7.25.7.tgz", - "integrity": "sha512-GDDWeVLNxRIkQTnJn2pDOM1pkCgYdSqPeT1a9vh9yIqu2uzzgw1zcqEb+IJOhy+dTBMlNdThrDIksr2o09qrrQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-class-field-initializer-scope/-/plugin-bugfix-safari-class-field-initializer-scope-7.25.9.tgz", + "integrity": "sha512-MrGRLZxLD/Zjj0gdU15dfs+HH/OXvnw/U4jJD8vpcP2CJQapPEv1IWwjc/qMg7ItBlPwSv1hRBbb7LeuANdcnw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -602,12 +565,12 @@ } }, "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.25.7.tgz", - "integrity": "sha512-wxyWg2RYaSUYgmd9MR0FyRGyeOMQE/Uzr1wzd/g5cf5bwi9A4v6HFdDm7y1MgDtod/fLOSTZY6jDgV0xU9d5bA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.25.9.tgz", + "integrity": "sha512-2qUwwfAFpJLZqxd02YW9btUCZHl+RFvdDkNfZwaIJrvB8Tesjsk8pEQkTvGwZXLqXUx/2oyY3ySRhm6HOXuCug==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -617,14 +580,14 @@ } }, "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.25.7.tgz", - "integrity": "sha512-Xwg6tZpLxc4iQjorYsyGMyfJE7nP5MV8t/Ka58BgiA7Jw0fRqQNcANlLfdJ/yvBt9z9LD2We+BEkT7vLqZRWng==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.25.9.tgz", + "integrity": "sha512-6xWgLZTJXwilVjlnV7ospI3xi+sl8lN8rXXbBD6vYn3UYDlGsag8wrZkKcSI8G6KgqKP7vNFaDgeDnfAABq61g==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.25.7", - "@babel/plugin-transform-optional-chaining": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9", + "@babel/plugin-transform-optional-chaining": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -634,13 +597,13 @@ } }, "node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.25.7.tgz", - "integrity": "sha512-UVATLMidXrnH+GMUIuxq55nejlj02HP7F5ETyBONzP6G87fPBogG4CH6kxrSrdIuAjdwNO9VzyaYsrZPscWUrw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.25.9.tgz", + "integrity": "sha512-aLnMXYPnzwwqhYSCyXfKkIkYgJ8zv9RK+roo9DkTXz38ynIhd9XCbN08s3MGvqL2MYGVUGdRQLL/JqBIeJhJBg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/traverse": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/traverse": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -649,25 +612,6 @@ "@babel/core": "^7.0.0" } }, - "node_modules/@babel/plugin-proposal-async-generator-functions": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.20.7.tgz", - "integrity": "sha512-xMbiLsn/8RK7Wq7VeVytytS2L6qE69bXPB10YCmMdDZbKF4okCqY74pI/jJQ/8U0b/F6NrT2+14b8/P9/3AMGA==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-async-generator-functions instead.", - "dev": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-remap-async-to-generator": "^7.18.9", - "@babel/plugin-syntax-async-generators": "^7.8.4" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-proposal-class-properties": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz", @@ -685,198 +629,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-class-static-block": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.21.0.tgz", - "integrity": "sha512-XP5G9MWNUskFuP30IfFSEFB0Z6HzLIUcjYM4bYOPHXl7eiJ9HFv8tWj6TXTN5QODiEhDZAeI4hLok2iHFFV4hw==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-static-block instead.", - "dev": true, - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.21.0", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/plugin-syntax-class-static-block": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.12.0" - } - }, - "node_modules/@babel/plugin-proposal-dynamic-import": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz", - "integrity": "sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-dynamic-import instead.", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-dynamic-import": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-export-namespace-from": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz", - "integrity": "sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-export-namespace-from instead.", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-json-strings": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz", - "integrity": "sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-json-strings instead.", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-json-strings": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-logical-assignment-operators": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.20.7.tgz", - "integrity": "sha512-y7C7cZgpMIjWlKE5T7eJwp+tnRYM89HmRvWM5EQuB5BoHEONjmQ8lSNmBUwOyy/GFRsohJED51YBF79hE1djug==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-logical-assignment-operators instead.", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz", - "integrity": "sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-numeric-separator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz", - "integrity": "sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead.", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-numeric-separator": "^7.10.4" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-object-rest-spread": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz", - "integrity": "sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead.", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-compilation-targets": "^7.20.7", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.20.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-optional-catch-binding": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz", - "integrity": "sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-catch-binding instead.", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-optional-chaining": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.21.0.tgz", - "integrity": "sha512-p4zeefM72gpmEe2fkUr/OnOXpWEf8nAgk7ZYVqqfFiyIG7oFfVZcCrU64hWn5xp4tQ9LkV4bTIa5rD0KANpKNA==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead.", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0", - "@babel/plugin-syntax-optional-chaining": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-private-methods": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz", - "integrity": "sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-methods instead.", - "dev": true, - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-proposal-private-property-in-object": { "version": "7.21.0-placeholder-for-preset-env.2", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", @@ -889,23 +641,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-unicode-property-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz", - "integrity": "sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-unicode-property-regex instead.", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "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", @@ -970,12 +705,12 @@ } }, "node_modules/@babel/plugin-syntax-import-assertions": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.25.7.tgz", - "integrity": "sha512-ZvZQRmME0zfJnDQnVBKYzHxXT7lYBB3Revz1GuS7oLXWMgqUPX4G+DDbT30ICClht9WKV34QVrZhSw6WdklwZQ==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.26.0.tgz", + "integrity": "sha512-QCWT5Hh830hK5EQa7XzuqIkQU9tT/whqbDz7kuaZMHFl1inRRg7JnuAEOQ0Ur0QUl0NufCk1msK2BeY79Aj/eg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -985,12 +720,12 @@ } }, "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.25.7.tgz", - "integrity": "sha512-AqVo+dguCgmpi/3mYBdu9lkngOBlQ2w2vnNpa6gfiCxQZLzV4ZbhsXitJ2Yblkoe1VQwtHSaNmIaGll/26YWRw==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.26.0.tgz", + "integrity": "sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1024,12 +759,12 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.7.tgz", - "integrity": "sha512-ruZOnKO+ajVL/MVx+PwNBPOkrnXTXoWMtte1MBpegfCArhqOe3Bj52avVj1huLLxNKYKXYaSxZ2F+woK1ekXfw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.9.tgz", + "integrity": "sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1141,12 +876,12 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.7.tgz", - "integrity": "sha512-rR+5FDjpCHqqZN2bzZm18bVYGaejGq5ZkpVCJLXor/+zlSrSoc4KWcHI0URVWjl/68Dyr1uwZUz/1njycEAv9g==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.9.tgz", + "integrity": "sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1172,12 +907,12 @@ } }, "node_modules/@babel/plugin-transform-arrow-functions": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.25.7.tgz", - "integrity": "sha512-EJN2mKxDwfOUCPxMO6MUI58RN3ganiRAG/MS/S3HfB6QFNjroAMelQo/gybyYq97WerCBAZoyrAoW8Tzdq2jWg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.25.9.tgz", + "integrity": "sha512-6jmooXYIwn9ca5/RylZADJ+EnSxVUS5sjeJ9UPk6RWRzXCmOJCy6dqItPJFpw2cuCangPK4OYr5uhGKcmrm5Qg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1187,15 +922,14 @@ } }, "node_modules/@babel/plugin-transform-async-generator-functions": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.25.7.tgz", - "integrity": "sha512-4B6OhTrwYKHYYgcwErvZjbmH9X5TxQBsaBHdzEIB4l71gR5jh/tuHGlb9in47udL2+wVUcOz5XXhhfhVJwEpEg==", + "version": "7.26.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.26.8.tgz", + "integrity": "sha512-He9Ej2X7tNf2zdKMAGOsmg2MrFc+hfoAhd3po4cWfo/NWjzEAKa0oQruj1ROVUdl0e6fb6/kE/G3SSxE0lRJOg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/helper-remap-async-to-generator": "^7.25.7", - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/traverse": "^7.25.7" + "@babel/helper-plugin-utils": "^7.26.5", + "@babel/helper-remap-async-to-generator": "^7.25.9", + "@babel/traverse": "^7.26.8" }, "engines": { "node": ">=6.9.0" @@ -1205,14 +939,14 @@ } }, "node_modules/@babel/plugin-transform-async-to-generator": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.25.7.tgz", - "integrity": "sha512-ZUCjAavsh5CESCmi/xCpX1qcCaAglzs/7tmuvoFnJgA1dM7gQplsguljoTg+Ru8WENpX89cQyAtWoaE0I3X3Pg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.25.9.tgz", + "integrity": "sha512-NT7Ejn7Z/LjUH0Gv5KsBCxh7BH3fbLTV0ptHvpeMvrt3cPThHfJfst9Wrb7S8EvJ7vRTFI7z+VAvFVEQn/m5zQ==", "dev": true, "dependencies": { - "@babel/helper-module-imports": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/helper-remap-async-to-generator": "^7.25.7" + "@babel/helper-module-imports": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-remap-async-to-generator": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1222,12 +956,12 @@ } }, "node_modules/@babel/plugin-transform-block-scoped-functions": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.25.7.tgz", - "integrity": "sha512-xHttvIM9fvqW+0a3tZlYcZYSBpSWzGBFIt/sYG3tcdSzBB8ZeVgz2gBP7Df+sM0N1850jrviYSSeUuc+135dmQ==", + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.26.5.tgz", + "integrity": "sha512-chuTSY+hq09+/f5lMj8ZSYgCFpppV2CbYrhNFJ1BFoXpiWPnnAb7R0MqrafCpN8E1+YRrtM1MXZHJdIx8B6rMQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.26.5" }, "engines": { "node": ">=6.9.0" @@ -1237,12 +971,12 @@ } }, "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.25.7.tgz", - "integrity": "sha512-ZEPJSkVZaeTFG/m2PARwLZQ+OG0vFIhPlKHK/JdIMy8DbRJ/htz6LRrTFtdzxi9EHmcwbNPAKDnadpNSIW+Aow==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.27.0.tgz", + "integrity": "sha512-u1jGphZ8uDI2Pj/HJj6YQ6XQLZCNjOlprjxB5SVz6rq2T6SwAR+CdrWK0CP7F+9rDVMXdB0+r6Am5G5aobOjAQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.26.5" }, "engines": { "node": ">=6.9.0" @@ -1252,13 +986,13 @@ } }, "node_modules/@babel/plugin-transform-class-properties": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.25.7.tgz", - "integrity": "sha512-mhyfEW4gufjIqYFo9krXHJ3ElbFLIze5IDp+wQTxoPd+mwFb1NxatNAwmv8Q8Iuxv7Zc+q8EkiMQwc9IhyGf4g==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.25.9.tgz", + "integrity": "sha512-bbMAII8GRSkcd0h0b4X+36GksxuheLFjP65ul9w6C3KgAamI3JqErNgSrosX6ZPj+Mpim5VvEbawXxJCyEUV3Q==", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-create-class-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1268,14 +1002,13 @@ } }, "node_modules/@babel/plugin-transform-class-static-block": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.25.7.tgz", - "integrity": "sha512-rvUUtoVlkDWtDWxGAiiQj0aNktTPn3eFynBcMC2IhsXweehwgdI9ODe+XjWw515kEmv22sSOTp/rxIRuTiB7zg==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.26.0.tgz", + "integrity": "sha512-6J2APTs7BDDm+UMqP1useWqhcRAXo0WIoVj26N7kPFB6S73Lgvyka4KTZYIxtgYXiN5HTyRObA72N2iu628iTQ==", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-class-static-block": "^7.14.5" + "@babel/helper-create-class-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1285,16 +1018,16 @@ } }, "node_modules/@babel/plugin-transform-classes": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.25.7.tgz", - "integrity": "sha512-9j9rnl+YCQY0IGoeipXvnk3niWicIB6kCsWRGLwX241qSXpbA4MKxtp/EdvFxsc4zI5vqfLxzOd0twIJ7I99zg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.25.9.tgz", + "integrity": "sha512-mD8APIXmseE7oZvZgGABDyM34GUmK45Um2TXiBUt7PnuAxrgoSVf123qUzPxEr/+/BHrRn5NMZCdE2m/1F8DGg==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.25.7", - "@babel/helper-compilation-targets": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/helper-replace-supers": "^7.25.7", - "@babel/traverse": "^7.25.7", + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-compilation-targets": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-replace-supers": "^7.25.9", + "@babel/traverse": "^7.25.9", "globals": "^11.1.0" }, "engines": { @@ -1305,13 +1038,13 @@ } }, "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.25.7.tgz", - "integrity": "sha512-QIv+imtM+EtNxg/XBKL3hiWjgdLjMOmZ+XzQwSgmBfKbfxUjBzGgVPklUuE55eq5/uVoh8gg3dqlrwR/jw3ZeA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.25.9.tgz", + "integrity": "sha512-HnBegGqXZR12xbcTHlJ9HGxw1OniltT26J5YpfruGqtUHlz/xKf/G2ak9e+t0rVqrjXa9WOhvYPz1ERfMj23AA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/template": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/template": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1321,12 +1054,12 @@ } }, "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.25.7.tgz", - "integrity": "sha512-xKcfLTlJYUczdaM1+epcdh1UGewJqr9zATgrNHcLBcV2QmfvPPEixo/sK/syql9cEmbr7ulu5HMFG5vbbt/sEA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.25.9.tgz", + "integrity": "sha512-WkCGb/3ZxXepmMiX101nnGiU+1CAdut8oHyEOHxkKuS1qKpU2SMXE2uSvfz8PBuLd49V6LEsbtyPhWC7fnkgvQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1336,13 +1069,13 @@ } }, "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.25.7.tgz", - "integrity": "sha512-kXzXMMRzAtJdDEgQBLF4oaiT6ZCU3oWHgpARnTKDAqPkDJ+bs3NrZb310YYevR5QlRo3Kn7dzzIdHbZm1VzJdQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.25.9.tgz", + "integrity": "sha512-t7ZQ7g5trIgSRYhI9pIJtRl64KHotutUJsh4Eze5l7olJv+mRSg4/MmbZ0tv1eeqRbdvo/+trvJD/Oc5DmW2cA==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1352,12 +1085,12 @@ } }, "node_modules/@babel/plugin-transform-duplicate-keys": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.25.7.tgz", - "integrity": "sha512-by+v2CjoL3aMnWDOyCIg+yxU9KXSRa9tN6MbqggH5xvymmr9p4AMjYkNlQy4brMceBnUyHZ9G8RnpvT8wP7Cfg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.25.9.tgz", + "integrity": "sha512-LZxhJ6dvBb/f3x8xwWIuyiAHy56nrRG3PeYTpBkkzkYRRQ6tJLu68lEF5VIqMUZiAV7a8+Tb78nEoMCMcqjXBw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1367,13 +1100,13 @@ } }, "node_modules/@babel/plugin-transform-duplicate-named-capturing-groups-regex": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-named-capturing-groups-regex/-/plugin-transform-duplicate-named-capturing-groups-regex-7.25.7.tgz", - "integrity": "sha512-HvS6JF66xSS5rNKXLqkk7L9c/jZ/cdIVIcoPVrnl8IsVpLggTjXs8OWekbLHs/VtYDDh5WXnQyeE3PPUGm22MA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-named-capturing-groups-regex/-/plugin-transform-duplicate-named-capturing-groups-regex-7.25.9.tgz", + "integrity": "sha512-0UfuJS0EsXbRvKnwcLjFtJy/Sxc5J5jhLHnFhy7u4zih97Hz6tJkLU+O+FMMrNZrosUPxDi6sYxJ/EA8jDiAog==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1383,13 +1116,12 @@ } }, "node_modules/@babel/plugin-transform-dynamic-import": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.25.7.tgz", - "integrity": "sha512-UvcLuual4h7/GfylKm2IAA3aph9rwvAM2XBA0uPKU3lca+Maai4jBjjEVUS568ld6kJcgbouuumCBhMd/Yz17w==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.25.9.tgz", + "integrity": "sha512-GCggjexbmSLaFhqsojeugBpeaRIgWNTcgKVq/0qIteFEqY2A+b9QidYadrWlnbWQUrW5fn+mCvf3tr7OeBFTyg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-dynamic-import": "^7.8.3" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1399,13 +1131,12 @@ } }, "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.25.7.tgz", - "integrity": "sha512-yjqtpstPfZ0h/y40fAXRv2snciYr0OAoMXY/0ClC7tm4C/nG5NJKmIItlaYlLbIVAWNfrYuy9dq1bE0SbX0PEg==", + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.26.3.tgz", + "integrity": "sha512-7CAHcQ58z2chuXPWblnn1K6rLDnDWieghSOEmqQsrBenH0P9InCUtOJYD89pvngljmZlJcz3fcmgYsXFNGa1ZQ==", "dev": true, "dependencies": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1415,13 +1146,12 @@ } }, "node_modules/@babel/plugin-transform-export-namespace-from": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.25.7.tgz", - "integrity": "sha512-h3MDAP5l34NQkkNulsTNyjdaR+OiB0Im67VU//sFupouP8Q6m9Spy7l66DcaAQxtmCqGdanPByLsnwFttxKISQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.25.9.tgz", + "integrity": "sha512-2NsEz+CxzJIVOPx2o9UsW1rXLqtChtLoVnwYHHiB04wS5sgn7mrV45fWMBX0Kk+ub9uXytVYfNP2HjbVbCB3Ww==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1431,13 +1161,13 @@ } }, "node_modules/@babel/plugin-transform-for-of": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.25.7.tgz", - "integrity": "sha512-n/TaiBGJxYFWvpJDfsxSj9lEEE44BFM1EPGz4KEiTipTgkoFVVcCmzAL3qA7fdQU96dpo4gGf5HBx/KnDvqiHw==", + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.26.9.tgz", + "integrity": "sha512-Hry8AusVm8LW5BVFgiyUReuoGzPUpdHQQqJY5bZnbbf+ngOHWuCuYFKw/BqaaWlvEUrF91HMhDtEaI1hZzNbLg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.25.7" + "@babel/helper-plugin-utils": "^7.26.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1447,14 +1177,14 @@ } }, "node_modules/@babel/plugin-transform-function-name": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.25.7.tgz", - "integrity": "sha512-5MCTNcjCMxQ63Tdu9rxyN6cAWurqfrDZ76qvVPrGYdBxIj+EawuuxTu/+dgJlhK5eRz3v1gLwp6XwS8XaX2NiQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.25.9.tgz", + "integrity": "sha512-8lP+Yxjv14Vc5MuWBpJsoUCd3hD6V9DgBon2FVYL4jJgbnVQ9fTgYmonchzZJOVNgzEgbxp4OwAf6xz6M/14XA==", "dev": true, "dependencies": { - "@babel/helper-compilation-targets": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/traverse": "^7.25.7" + "@babel/helper-compilation-targets": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/traverse": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1464,13 +1194,12 @@ } }, "node_modules/@babel/plugin-transform-json-strings": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.25.7.tgz", - "integrity": "sha512-Ot43PrL9TEAiCe8C/2erAjXMeVSnE/BLEx6eyrKLNFCCw5jvhTHKyHxdI1pA0kz5njZRYAnMO2KObGqOCRDYSA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.25.9.tgz", + "integrity": "sha512-xoTMk0WXceiiIvsaquQQUaLLXSW1KJ159KP87VilruQm0LNNGxWzahxSS6T6i4Zg3ezp4vA4zuwiNUR53qmQAw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-json-strings": "^7.8.3" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1480,12 +1209,12 @@ } }, "node_modules/@babel/plugin-transform-literals": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.25.7.tgz", - "integrity": "sha512-fwzkLrSu2fESR/cm4t6vqd7ebNIopz2QHGtjoU+dswQo/P6lwAG04Q98lliE3jkz/XqnbGFLnUcE0q0CVUf92w==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.25.9.tgz", + "integrity": "sha512-9N7+2lFziW8W9pBl2TzaNht3+pgMIRP74zizeCSrtnSKVdUl8mAjjOP2OOVQAfZ881P2cNjDj1uAMEdeD50nuQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1495,13 +1224,12 @@ } }, "node_modules/@babel/plugin-transform-logical-assignment-operators": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.25.7.tgz", - "integrity": "sha512-iImzbA55BjiovLyG2bggWS+V+OLkaBorNvc/yJoeeDQGztknRnDdYfp2d/UPmunZYEnZi6Lg8QcTmNMHOB0lGA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.25.9.tgz", + "integrity": "sha512-wI4wRAzGko551Y8eVf6iOY9EouIDTtPb0ByZx+ktDGHwv6bHFimrgJM/2T021txPZ2s4c7bqvHbd+vXG6K948Q==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1511,12 +1239,12 @@ } }, "node_modules/@babel/plugin-transform-member-expression-literals": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.25.7.tgz", - "integrity": "sha512-Std3kXwpXfRV0QtQy5JJcRpkqP8/wG4XL7hSKZmGlxPlDqmpXtEPRmhF7ztnlTCtUN3eXRUJp+sBEZjaIBVYaw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.25.9.tgz", + "integrity": "sha512-PYazBVfofCQkkMzh2P6IdIUaCEWni3iYEerAsRWuVd8+jlM1S9S9cz1dF9hIzyoZ8IA3+OwVYIp9v9e+GbgZhA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1526,13 +1254,13 @@ } }, "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.25.7.tgz", - "integrity": "sha512-CgselSGCGzjQvKzghCvDTxKHP3iooenLpJDO842ehn5D2G5fJB222ptnDwQho0WjEvg7zyoxb9P+wiYxiJX5yA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.25.9.tgz", + "integrity": "sha512-g5T11tnI36jVClQlMlt4qKDLlWnG5pP9CSM4GhdRciTNMRgkfpo5cR6b4rGIOYPgRRuFAvwjPQ/Yk+ql4dyhbw==", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-module-transforms": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1542,14 +1270,13 @@ } }, "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.25.7.tgz", - "integrity": "sha512-L9Gcahi0kKFYXvweO6n0wc3ZG1ChpSFdgG+eV1WYZ3/dGbJK7vvk91FgGgak8YwRgrCuihF8tE/Xg07EkL5COg==", + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.26.3.tgz", + "integrity": "sha512-MgR55l4q9KddUDITEzEFYn5ZsGDXMSsU9E+kh7fjRXTIC3RHqfCo8RPRbyReYJh44HQ/yomFkqbOFohXvDCiIQ==", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/helper-simple-access": "^7.25.7" + "@babel/helper-module-transforms": "^7.26.0", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1559,15 +1286,15 @@ } }, "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.25.7.tgz", - "integrity": "sha512-t9jZIvBmOXJsiuyOwhrIGs8dVcD6jDyg2icw1VL4A/g+FnWyJKwUfSSU2nwJuMV2Zqui856El9u+ElB+j9fV1g==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.25.9.tgz", + "integrity": "sha512-hyss7iIlH/zLHaehT+xwiymtPOpsiwIIRlCAOwBB04ta5Tt+lNItADdlXw3jAWZ96VJ2jlhl/c+PNIQPKNfvcA==", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/helper-validator-identifier": "^7.25.7", - "@babel/traverse": "^7.25.7" + "@babel/helper-module-transforms": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9", + "@babel/traverse": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1577,13 +1304,13 @@ } }, "node_modules/@babel/plugin-transform-modules-umd": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.25.7.tgz", - "integrity": "sha512-p88Jg6QqsaPh+EB7I9GJrIqi1Zt4ZBHUQtjw3z1bzEXcLh6GfPqzZJ6G+G1HBGKUNukT58MnKG7EN7zXQBCODw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.25.9.tgz", + "integrity": "sha512-bS9MVObUgE7ww36HEfwe6g9WakQ0KF07mQF74uuXdkoziUPfKyu/nIm663kz//e5O1nPInPFx36z7WJmJ4yNEw==", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-module-transforms": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1593,13 +1320,13 @@ } }, "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.25.7.tgz", - "integrity": "sha512-BtAT9LzCISKG3Dsdw5uso4oV1+v2NlVXIIomKJgQybotJY3OwCwJmkongjHgwGKoZXd0qG5UZ12JUlDQ07W6Ow==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.25.9.tgz", + "integrity": "sha512-oqB6WHdKTGl3q/ItQhpLSnWWOpjUJLsOCLVyeFgeTktkBSCiurvPOsyt93gibI9CmuKvTUEtWmG5VhZD+5T/KA==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1609,12 +1336,12 @@ } }, "node_modules/@babel/plugin-transform-new-target": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.25.7.tgz", - "integrity": "sha512-CfCS2jDsbcZaVYxRFo2qtavW8SpdzmBXC2LOI4oO0rP+JSRDxxF3inF4GcPsLgfb5FjkhXG5/yR/lxuRs2pySA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.25.9.tgz", + "integrity": "sha512-U/3p8X1yCSoKyUj2eOBIx3FOn6pElFOKvAAGf8HTtItuPyB+ZeOqfn+mvTtg9ZlOAjsPdK3ayQEjqHjU/yLeVQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1624,13 +1351,12 @@ } }, "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.25.7.tgz", - "integrity": "sha512-FbuJ63/4LEL32mIxrxwYaqjJxpbzxPVQj5a+Ebrc8JICV6YX8nE53jY+K0RZT3um56GoNWgkS2BQ/uLGTjtwfw==", + "version": "7.26.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.26.6.tgz", + "integrity": "sha512-CKW8Vu+uUZneQCPtXmSBUC6NCAUdya26hWCElAWh5mVSlSRsmiCPUUDKb3Z0szng1hiAJa098Hkhg9o4SE35Qw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + "@babel/helper-plugin-utils": "^7.26.5" }, "engines": { "node": ">=6.9.0" @@ -1640,13 +1366,12 @@ } }, "node_modules/@babel/plugin-transform-numeric-separator": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.25.7.tgz", - "integrity": "sha512-8CbutzSSh4hmD+jJHIA8vdTNk15kAzOnFLVVgBSMGr28rt85ouT01/rezMecks9pkU939wDInImwCKv4ahU4IA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.25.9.tgz", + "integrity": "sha512-TlprrJ1GBZ3r6s96Yq8gEQv82s8/5HnCVHtEJScUj90thHQbwe+E5MLhi2bbNHBEJuzrvltXSru+BUxHDoog7Q==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-numeric-separator": "^7.10.4" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1656,15 +1381,14 @@ } }, "node_modules/@babel/plugin-transform-object-rest-spread": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.25.7.tgz", - "integrity": "sha512-1JdVKPhD7Y5PvgfFy0Mv2brdrolzpzSoUq2pr6xsR+m+3viGGeHEokFKsCgOkbeFOQxfB1Vt2F0cPJLRpFI4Zg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.25.9.tgz", + "integrity": "sha512-fSaXafEE9CVHPweLYw4J0emp1t8zYTXyzN3UuG+lylqkvYd7RMrsOQ8TYx5RF231be0vqtFC6jnx3UmpJmKBYg==", "dev": true, "dependencies": { - "@babel/helper-compilation-targets": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.25.7" + "@babel/helper-compilation-targets": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/plugin-transform-parameters": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1674,13 +1398,13 @@ } }, "node_modules/@babel/plugin-transform-object-super": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.25.7.tgz", - "integrity": "sha512-pWT6UXCEW3u1t2tcAGtE15ornCBvopHj9Bps9D2DsH15APgNVOTwwczGckX+WkAvBmuoYKRCFa4DK+jM8vh5AA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.25.9.tgz", + "integrity": "sha512-Kj/Gh+Rw2RNLbCK1VAWj2U48yxxqL2x0k10nPtSdRa0O2xnHXalD0s+o1A6a0W43gJ00ANo38jxkQreckOzv5A==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/helper-replace-supers": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-replace-supers": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1690,13 +1414,12 @@ } }, "node_modules/@babel/plugin-transform-optional-catch-binding": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.25.7.tgz", - "integrity": "sha512-m9obYBA39mDPN7lJzD5WkGGb0GO54PPLXsbcnj1Hyeu8mSRz7Gb4b1A6zxNX32ZuUySDK4G6it8SDFWD1nCnqg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.25.9.tgz", + "integrity": "sha512-qM/6m6hQZzDcZF3onzIhZeDHDO43bkNNlOX0i8n3lR6zLbu0GN2d8qfM/IERJZYauhAHSLHy39NF0Ctdvcid7g==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1706,14 +1429,13 @@ } }, "node_modules/@babel/plugin-transform-optional-chaining": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.25.7.tgz", - "integrity": "sha512-h39agClImgPWg4H8mYVAbD1qP9vClFbEjqoJmt87Zen8pjqK8FTPUwrOXAvqu5soytwxrLMd2fx2KSCp2CHcNg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.25.9.tgz", + "integrity": "sha512-6AvV0FsLULbpnXeBjrY4dmWF8F7gf8QnvTEoO/wX/5xm/xE1Xo8oPuD3MPS+KS9f9XBEAWN7X1aWr4z9HdOr7A==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.25.7", - "@babel/plugin-syntax-optional-chaining": "^7.8.3" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1723,12 +1445,12 @@ } }, "node_modules/@babel/plugin-transform-parameters": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.25.7.tgz", - "integrity": "sha512-FYiTvku63me9+1Nz7TOx4YMtW3tWXzfANZtrzHhUZrz4d47EEtMQhzFoZWESfXuAMMT5mwzD4+y1N8ONAX6lMQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.25.9.tgz", + "integrity": "sha512-wzz6MKwpnshBAiRmn4jR8LYz/g8Ksg0o80XmwZDlordjwEk9SxBzTWC7F5ef1jhbrbOW2DJ5J6ayRukrJmnr0g==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1738,13 +1460,13 @@ } }, "node_modules/@babel/plugin-transform-private-methods": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.25.7.tgz", - "integrity": "sha512-KY0hh2FluNxMLwOCHbxVOKfdB5sjWG4M183885FmaqWWiGMhRZq4DQRKH6mHdEucbJnyDyYiZNwNG424RymJjA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.25.9.tgz", + "integrity": "sha512-D/JUozNpQLAPUVusvqMxyvjzllRaF8/nSrP1s2YGQT/W4LHK4xxsMcHjhOGTS01mp9Hda8nswb+FblLdJornQw==", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-create-class-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1754,15 +1476,14 @@ } }, "node_modules/@babel/plugin-transform-private-property-in-object": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.25.7.tgz", - "integrity": "sha512-LzA5ESzBy7tqj00Yjey9yWfs3FKy4EmJyKOSWld144OxkTji81WWnUT8nkLUn+imN/zHL8ZQlOu/MTUAhHaX3g==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.25.9.tgz", + "integrity": "sha512-Evf3kcMqzXA3xfYJmZ9Pg1OvKdtqsDMSWBDzZOPLvHiTt36E75jLDQo5w1gtRU95Q4E5PDttrTf25Fw8d/uWLw==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.25.7", - "@babel/helper-create-class-features-plugin": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-create-class-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1772,12 +1493,12 @@ } }, "node_modules/@babel/plugin-transform-property-literals": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.25.7.tgz", - "integrity": "sha512-lQEeetGKfFi0wHbt8ClQrUSUMfEeI3MMm74Z73T9/kuz990yYVtfofjf3NuA42Jy3auFOpbjDyCSiIkTs1VIYw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.25.9.tgz", + "integrity": "sha512-IvIUeV5KrS/VPavfSM/Iu+RE6llrHrYIKY1yfCzyO/lMXHQ+p7uGhonmGVisv6tSBSVgWzMBohTcvkC9vQcQFA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1787,12 +1508,12 @@ } }, "node_modules/@babel/plugin-transform-react-display-name": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.25.7.tgz", - "integrity": "sha512-r0QY7NVU8OnrwE+w2IWiRom0wwsTbjx4+xH2RTd7AVdof3uurXOF+/mXHQDRk+2jIvWgSaCHKMgggfvM4dyUGA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.25.9.tgz", + "integrity": "sha512-KJfMlYIUxQB1CJfO3e0+h0ZHWOTLCPP115Awhaz8U0Zpq36Gl/cXlpoyMRnUWlhNUBAzldnCiAZNvCDj7CrKxQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1802,16 +1523,16 @@ } }, "node_modules/@babel/plugin-transform-react-jsx": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.25.7.tgz", - "integrity": "sha512-vILAg5nwGlR9EXE8JIOX4NHXd49lrYbN8hnjffDtoULwpL9hUx/N55nqh2qd0q6FyNDfjl9V79ecKGvFbcSA0Q==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.25.9.tgz", + "integrity": "sha512-s5XwpQYCqGerXl+Pu6VDL3x0j2d82eiV77UJ8a2mDHAW7j9SWRqQ2y1fNo1Z74CdcYipl5Z41zvjj4Nfzq36rw==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.25.7", - "@babel/helper-module-imports": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/plugin-syntax-jsx": "^7.25.7", - "@babel/types": "^7.25.7" + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-module-imports": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/plugin-syntax-jsx": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1821,12 +1542,12 @@ } }, "node_modules/@babel/plugin-transform-react-jsx-development": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.25.7.tgz", - "integrity": "sha512-5yd3lH1PWxzW6IZj+p+Y4OLQzz0/LzlOG8vGqonHfVR3euf1vyzyMUJk9Ac+m97BH46mFc/98t9PmYLyvgL3qg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.25.9.tgz", + "integrity": "sha512-9mj6rm7XVYs4mdLIpbZnHOYdpW42uoiBCTVowg7sP1thUOiANgMb4UtpRivR0pp5iL+ocvUv7X4mZgFRpJEzGw==", "dev": true, "dependencies": { - "@babel/plugin-transform-react-jsx": "^7.25.7" + "@babel/plugin-transform-react-jsx": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1836,13 +1557,13 @@ } }, "node_modules/@babel/plugin-transform-react-pure-annotations": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.25.7.tgz", - "integrity": "sha512-6YTHJ7yjjgYqGc8S+CbEXhLICODk0Tn92j+vNJo07HFk9t3bjFgAKxPLFhHwF2NjmQVSI1zBRfBWUeVBa2osfA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.25.9.tgz", + "integrity": "sha512-KQ/Takk3T8Qzj5TppkS1be588lkbTp5uj7w6a0LeQaTMSckU/wK0oJ/pih+T690tkgI5jfmg2TqDJvd41Sj1Cg==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1852,12 +1573,12 @@ } }, "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.25.7.tgz", - "integrity": "sha512-mgDoQCRjrY3XK95UuV60tZlFCQGXEtMg8H+IsW72ldw1ih1jZhzYXbJvghmAEpg5UVhhnCeia1CkGttUvCkiMQ==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.27.0.tgz", + "integrity": "sha512-LX/vCajUJQDqE7Aum/ELUMZAY19+cDpghxrnyt5I1tV6X5PyC86AOoWXWFYFeIvauyeSA6/ktn4tQVn/3ZifsA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", + "@babel/helper-plugin-utils": "^7.26.5", "regenerator-transform": "^0.15.2" }, "engines": { @@ -1867,13 +1588,29 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-transform-regexp-modifiers": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regexp-modifiers/-/plugin-transform-regexp-modifiers-7.26.0.tgz", + "integrity": "sha512-vN6saax7lrA2yA/Pak3sCxuD6F5InBjn9IcrIKQPjpsLvuHYLVroTxjdlVRHjjBWxKOqIwpTXDkOssYT4BFdRw==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, "node_modules/@babel/plugin-transform-reserved-words": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.25.7.tgz", - "integrity": "sha512-3OfyfRRqiGeOvIWSagcwUTVk2hXBsr/ww7bLn6TRTuXnexA+Udov2icFOxFX9abaj4l96ooYkcNN1qi2Zvqwng==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.25.9.tgz", + "integrity": "sha512-7DL7DKYjn5Su++4RXu8puKZm2XBPHyjWLUidaPEkCUBbE7IPcsrkRHggAOOKydH1dASWdcUBxrkOGNxUv5P3Jg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1883,12 +1620,12 @@ } }, "node_modules/@babel/plugin-transform-shorthand-properties": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.25.7.tgz", - "integrity": "sha512-uBbxNwimHi5Bv3hUccmOFlUy3ATO6WagTApenHz9KzoIdn0XeACdB12ZJ4cjhuB2WSi80Ez2FWzJnarccriJeA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.25.9.tgz", + "integrity": "sha512-MUv6t0FhO5qHnS/W8XCbHmiRWOphNufpE1IVxhK5kuN3Td9FT1x4rx4K42s3RYdMXCXpfWkGSbCSd0Z64xA7Ng==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1898,13 +1635,13 @@ } }, "node_modules/@babel/plugin-transform-spread": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.25.7.tgz", - "integrity": "sha512-Mm6aeymI0PBh44xNIv/qvo8nmbkpZze1KvR8MkEqbIREDxoiWTi18Zr2jryfRMwDfVZF9foKh060fWgni44luw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.25.9.tgz", + "integrity": "sha512-oNknIB0TbURU5pqJFVbOOFspVlrpVwo2H1+HUIsVDvp5VauGGDP1ZEvO8Nn5xyMEs3dakajOxlmkNW7kNgSm6A==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1914,12 +1651,12 @@ } }, "node_modules/@babel/plugin-transform-sticky-regex": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.25.7.tgz", - "integrity": "sha512-ZFAeNkpGuLnAQ/NCsXJ6xik7Id+tHuS+NT+ue/2+rn/31zcdnupCdmunOizEaP0JsUmTFSTOPoQY7PkK2pttXw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.25.9.tgz", + "integrity": "sha512-WqBUSgeVwucYDP9U/xNRQam7xV8W5Zf+6Eo7T2SRVUFlhRiMNFdFz58u0KZmCVVqs2i7SHgpRnAhzRNmKfi2uA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1929,12 +1666,12 @@ } }, "node_modules/@babel/plugin-transform-template-literals": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.25.7.tgz", - "integrity": "sha512-SI274k0nUsFFmyQupiO7+wKATAmMFf8iFgq2O+vVFXZ0SV9lNfT1NGzBEhjquFmD8I9sqHLguH+gZVN3vww2AA==", + "version": "7.26.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.26.8.tgz", + "integrity": "sha512-OmGDL5/J0CJPJZTHZbi2XpO0tyT2Ia7fzpW5GURwdtp2X3fMmN8au/ej6peC/T33/+CRiIpA8Krse8hFGVmT5Q==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.26.5" }, "engines": { "node": ">=6.9.0" @@ -1944,12 +1681,12 @@ } }, "node_modules/@babel/plugin-transform-typeof-symbol": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.25.7.tgz", - "integrity": "sha512-OmWmQtTHnO8RSUbL0NTdtpbZHeNTnm68Gj5pA4Y2blFNh+V4iZR68V1qL9cI37J21ZN7AaCnkfdHtLExQPf2uA==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.27.0.tgz", + "integrity": "sha512-+LLkxA9rKJpNoGsbLnAgOCdESl73vwYn+V6b+5wHbrE7OGKVDPHIQvbFSzqE6rwqaCw2RE+zdJrlLkcf8YOA0w==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.26.5" }, "engines": { "node": ">=6.9.0" @@ -1959,16 +1696,16 @@ } }, "node_modules/@babel/plugin-transform-typescript": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.25.7.tgz", - "integrity": "sha512-VKlgy2vBzj8AmEzunocMun2fF06bsSWV+FvVXohtL6FGve/+L217qhHxRTVGHEDO/YR8IANcjzgJsd04J8ge5Q==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.27.0.tgz", + "integrity": "sha512-fRGGjO2UEGPjvEcyAZXRXAS8AfdaQoq7HnxAbJoAoW10B9xOKesmmndJv+Sym2a+9FHWZ9KbyyLCe9s0Sn5jtg==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.25.7", - "@babel/helper-create-class-features-plugin": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.25.7", - "@babel/plugin-syntax-typescript": "^7.25.7" + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-create-class-features-plugin": "^7.27.0", + "@babel/helper-plugin-utils": "^7.26.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9", + "@babel/plugin-syntax-typescript": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1978,12 +1715,12 @@ } }, "node_modules/@babel/plugin-transform-unicode-escapes": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.25.7.tgz", - "integrity": "sha512-BN87D7KpbdiABA+t3HbVqHzKWUDN3dymLaTnPFAMyc8lV+KN3+YzNhVRNdinaCPA4AUqx7ubXbQ9shRjYBl3SQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.25.9.tgz", + "integrity": "sha512-s5EDrE6bW97LtxOcGj1Khcx5AaXwiMmi4toFWRDP9/y0Woo6pXC+iyPu/KuhKtfSrNFd7jJB+/fkOtZy6aIC6Q==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1993,13 +1730,13 @@ } }, "node_modules/@babel/plugin-transform-unicode-property-regex": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.25.7.tgz", - "integrity": "sha512-IWfR89zcEPQGB/iB408uGtSPlQd3Jpq11Im86vUgcmSTcoWAiQMCTOa2K2yNNqFJEBVICKhayctee65Ka8OB0w==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.25.9.tgz", + "integrity": "sha512-Jt2d8Ga+QwRluxRQ307Vlxa6dMrYEMZCgGxoPR8V52rxPyldHu3hdlHspxaqYmE7oID5+kB+UKUB/eWS+DkkWg==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -2009,13 +1746,13 @@ } }, "node_modules/@babel/plugin-transform-unicode-regex": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.25.7.tgz", - "integrity": "sha512-8JKfg/hiuA3qXnlLx8qtv5HWRbgyFx2hMMtpDDuU2rTckpKkGu4ycK5yYHwuEa16/quXfoxHBIApEsNyMWnt0g==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.25.9.tgz", + "integrity": "sha512-yoxstj7Rg9dlNn9UQxzk4fcNivwv4nUYz7fYXBaKxvw/lnmPuOm/ikoELygbYq68Bls3D/D+NBPHiLwZdZZ4HA==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -2025,13 +1762,13 @@ } }, "node_modules/@babel/plugin-transform-unicode-sets-regex": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.25.7.tgz", - "integrity": "sha512-YRW8o9vzImwmh4Q3Rffd09bH5/hvY0pxg+1H1i0f7APoUeg12G7+HhLj9ZFNIrYkgBXhIijPJ+IXypN0hLTIbw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.25.9.tgz", + "integrity": "sha512-8BYqO3GeVNHtx69fdPshN3fnzUNLrWdHhk/icSwigksJGczKSizZ+Z6SBCxTs723Fr5VSNorTIK7a+R2tISvwQ==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.25.7", - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -2181,16 +1918,16 @@ } }, "node_modules/@babel/preset-typescript": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.25.7.tgz", - "integrity": "sha512-rkkpaXJZOFN45Fb+Gki0c+KMIglk4+zZXOoMJuyEK8y8Kkc8Jd3BDmP7qPsz0zQMJj+UD7EprF+AqAXcILnexw==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.27.0.tgz", + "integrity": "sha512-vxaPFfJtHhgeOVXRKuHpHPAOgymmy8V8I65T1q53R7GCZlefKeCaTyDs3zOPHTTbmquvNlQYC5klEvWsBAtrBQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7", - "@babel/helper-validator-option": "^7.25.7", - "@babel/plugin-syntax-jsx": "^7.25.7", - "@babel/plugin-transform-modules-commonjs": "^7.25.7", - "@babel/plugin-transform-typescript": "^7.25.7" + "@babel/helper-plugin-utils": "^7.26.5", + "@babel/helper-validator-option": "^7.25.9", + "@babel/plugin-syntax-jsx": "^7.25.9", + "@babel/plugin-transform-modules-commonjs": "^7.26.3", + "@babel/plugin-transform-typescript": "^7.27.0" }, "engines": { "node": ">=6.9.0" @@ -2200,9 +1937,9 @@ } }, "node_modules/@babel/register": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.25.7.tgz", - "integrity": "sha512-qHTd2Rhn/rKhSUwdY6+n98FmwXN+N+zxSVx3zWqRe9INyvTpv+aQ5gDV2+43ACd3VtMBzPPljbb0gZb8u5ma6Q==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.25.9.tgz", + "integrity": "sha512-8D43jXtGsYmEeDvm4MWHYUpWf8iiXgWYx3fW7E7Wb7Oe6FWqJPl5K6TuFW0dOwNZzEE5rjlaSJYH9JjrUKJszA==", "dev": true, "dependencies": { "clone-deep": "^4.0.1", @@ -2256,30 +1993,30 @@ } }, "node_modules/@babel/template": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.7.tgz", - "integrity": "sha512-wRwtAgI3bAS+JGU2upWNL9lSlDcRCqD05BZ1n3X2ONLH1WilFP6O1otQjeMK/1g0pvYcXC7b/qVUB1keofjtZA==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.0.tgz", + "integrity": "sha512-2ncevenBqXI6qRMukPlXwHKHchC7RyMuu4xv5JBXRfOGVcTy1mXCD12qrp7Jsoxll1EV3+9sE4GugBVRjT2jFA==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.25.7", - "@babel/parser": "^7.25.7", - "@babel/types": "^7.25.7" + "@babel/code-frame": "^7.26.2", + "@babel/parser": "^7.27.0", + "@babel/types": "^7.27.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.7.tgz", - "integrity": "sha512-jatJPT1Zjqvh/1FyJs6qAHL+Dzb7sTb+xr7Q+gM1b+1oBsMsQQ4FkVKb6dFlJvLlVssqkRzV05Jzervt9yhnzg==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.0.tgz", + "integrity": "sha512-19lYZFzYVQkkHkl4Cy4WrAVcqBkgvV2YM2TU3xG6DIwO7O3ecbDPfW3yM3bjAGcqcQHi+CCtjMR3dIEHxsd6bA==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.25.7", - "@babel/generator": "^7.25.7", - "@babel/parser": "^7.25.7", - "@babel/template": "^7.25.7", - "@babel/types": "^7.25.7", + "@babel/code-frame": "^7.26.2", + "@babel/generator": "^7.27.0", + "@babel/parser": "^7.27.0", + "@babel/template": "^7.27.0", + "@babel/types": "^7.27.0", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -2288,14 +2025,13 @@ } }, "node_modules/@babel/types": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.7.tgz", - "integrity": "sha512-vwIVdXG+j+FOpkwqHRcBgHLYNL7XMkufrlaFvL9o6Ai9sJn9+PdyIL5qa0XzTZw084c+u9LOls53eoZWP/W5WQ==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.0.tgz", + "integrity": "sha512-H45s8fVLYjbhFH62dIJ3WtmJ6RSPt/3DRO0ZcT2SUiYiQyz3BLVb9ADEnLl91m74aQPS3AzzeajZHYOalWe3bg==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.25.7", - "@babel/helper-validator-identifier": "^7.25.7", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -2691,26 +2427,26 @@ "dev": true }, "node_modules/@mat3ra/esse": { - "version": "2025.1.27-0", - "resolved": "https://registry.npmjs.org/@mat3ra/esse/-/esse-2025.1.27-0.tgz", - "integrity": "sha512-mGUZLRg2d0zBZCFVwDqMHXURZhy1H49Kzv7nHAvfm+ib+DibSOpCj/1l8d0ytEAFbXEnaLRJPb1xbENVK/FFIA==", + "version": "0.0.0", + "resolved": "git+https://git@github.com/Exabyte-io/esse.git#dae2d3682c4cade747762ae12bc28896513ec555", + "integrity": "sha512-CdlWVBBwx9tmPQplsJmcA0sWJXxXiwC74XsUJJIPKG4AebA3B1BXnY+f+94pGxrTRqzuDdr8xu7sn/3u/W4tYw==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@babel/cli": "7.16.0", - "@babel/core": "7.24.1", - "@babel/eslint-parser": "7.16.3", - "@babel/plugin-proposal-class-properties": "7.16.0", - "@babel/preset-env": "7.16.4", - "@babel/preset-react": "7.16.7", - "@babel/preset-typescript": "^7.22.5", - "@babel/register": "^7.16.0", - "@babel/runtime-corejs3": "7.16.8", - "@types/chai": "^4.3.11", + "@babel/cli": "^7.27.0", + "@babel/core": "^7.26.10", + "@babel/eslint-parser": "^7.27.0", + "@babel/plugin-proposal-class-properties": "^7.18.6", + "@babel/preset-env": "^7.26.9", + "@babel/preset-react": "^7.26.3", + "@babel/preset-typescript": "^7.27.0", + "@babel/register": "^7.25.9", + "@babel/runtime-corejs3": "^7.27.0", + "@types/chai": "^4.3.20", "@types/js-yaml": "^4.0.9", "@types/json-schema-merge-allof": "^0.6.5", - "@types/mocha": "^10.0.6", - "ajv": "^8.12.0", + "@types/mocha": "^10.0.10", + "ajv": "^8.17.1", "ajv-formats": "^2.1.1", "js-yaml": "^4.1.0", "json-schema": "^0.4.0", @@ -2724,18 +2460,18 @@ } }, "node_modules/@mat3ra/esse/node_modules/@babel/cli": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.16.0.tgz", - "integrity": "sha512-WLrM42vKX/4atIoQB+eb0ovUof53UUvecb4qGjU2PDDWRiZr50ZpiV8NpcLo7iSxeGYrRG0Mqembsa+UrTAV6Q==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.27.0.tgz", + "integrity": "sha512-bZfxn8DRxwiVzDO5CEeV+7IqXeCkzI4yYnrQbpwjT76CUyossQc6RYE7n+xfm0/2k40lPaCpW0FhxYs7EBAetw==", "dev": true, "dependencies": { - "commander": "^4.0.1", - "convert-source-map": "^1.1.0", + "@jridgewell/trace-mapping": "^0.3.25", + "commander": "^6.2.0", + "convert-source-map": "^2.0.0", "fs-readdir-recursive": "^1.1.0", - "glob": "^7.0.0", + "glob": "^7.2.0", "make-dir": "^2.1.0", - "slash": "^2.0.0", - "source-map": "^0.5.0" + "slash": "^2.0.0" }, "bin": { "babel": "bin/babel.js", @@ -2746,28 +2482,28 @@ }, "optionalDependencies": { "@nicolo-ribaudo/chokidar-2": "2.1.8-no-fsevents.3", - "chokidar": "^3.4.0" + "chokidar": "^3.6.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "node_modules/@mat3ra/esse/node_modules/@babel/core": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.1.tgz", - "integrity": "sha512-F82udohVyIgGAY2VVj/g34TpFUG606rumIHjTfVbssPg2zTR7PuuEpZcX8JA6sgBfIYmJrFtWgPvHQuJamVqZQ==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.10.tgz", + "integrity": "sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.24.1", - "@babel/generator": "^7.24.1", - "@babel/helper-compilation-targets": "^7.23.6", - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.24.1", - "@babel/parser": "^7.24.1", - "@babel/template": "^7.24.0", - "@babel/traverse": "^7.24.1", - "@babel/types": "^7.24.0", + "@babel/code-frame": "^7.26.2", + "@babel/generator": "^7.26.10", + "@babel/helper-compilation-targets": "^7.26.5", + "@babel/helper-module-transforms": "^7.26.0", + "@babel/helpers": "^7.26.10", + "@babel/parser": "^7.26.10", + "@babel/template": "^7.26.9", + "@babel/traverse": "^7.26.10", + "@babel/types": "^7.26.10", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -2782,163 +2518,99 @@ "url": "https://opencollective.com/babel" } }, - "node_modules/@mat3ra/esse/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 - }, "node_modules/@mat3ra/esse/node_modules/@babel/eslint-parser": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.16.3.tgz", - "integrity": "sha512-iB4ElZT0jAt7PKVaeVulOECdGe6UnmA/O0P9jlF5g5GBOwDVbna8AXhHRu4s27xQf6OkveyA8iTDv1jHdDejgQ==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.27.0.tgz", + "integrity": "sha512-dtnzmSjXfgL/HDgMcmsLSzyGbEosi4DrGWoCNfuI+W4IkVJw6izpTe7LtOdwAXnkDqw5yweboYCTkM2rQizCng==", "dev": true, "dependencies": { - "eslint-scope": "^5.1.1", + "@nicolo-ribaudo/eslint-scope-5-internals": "5.1.1-v1", "eslint-visitor-keys": "^2.1.0", - "semver": "^6.3.0" + "semver": "^6.3.1" }, "engines": { "node": "^10.13.0 || ^12.13.0 || >=14.0.0" }, "peerDependencies": { - "@babel/core": ">=7.11.0", - "eslint": "^7.5.0 || ^8.0.0" - } - }, - "node_modules/@mat3ra/esse/node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.3.tgz", - "integrity": "sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww==", - "dev": true, - "dependencies": { - "@babel/helper-compilation-targets": "^7.17.7", - "@babel/helper-plugin-utils": "^7.16.7", - "debug": "^4.1.1", - "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2", - "semver": "^6.1.2" - }, - "peerDependencies": { - "@babel/core": "^7.4.0-0" - } - }, - "node_modules/@mat3ra/esse/node_modules/@babel/plugin-proposal-class-properties": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.16.0.tgz", - "integrity": "sha512-mCF3HcuZSY9Fcx56Lbn+CGdT44ioBMMvjNVldpKtj8tpniETdLjnxdHI1+sDWXIM1nNt+EanJOZ3IG9lzVjs7A==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.", - "dev": true, - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@mat3ra/esse/node_modules/@babel/plugin-proposal-private-property-in-object": { - "version": "7.21.11", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.11.tgz", - "integrity": "sha512-0QZ8qP/3RLDVBwBFoWAwCtgcDZJVwA5LUJRZU8x2YFfKNuFq161wK3cuGrALu5yiPu+vzwTAg/sMWVNeWeNyaw==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-property-in-object instead.", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-create-class-features-plugin": "^7.21.0", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@babel/core": "^7.11.0", + "eslint": "^7.5.0 || ^8.0.0 || ^9.0.0" } }, "node_modules/@mat3ra/esse/node_modules/@babel/preset-env": { - "version": "7.16.4", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.16.4.tgz", - "integrity": "sha512-v0QtNd81v/xKj4gNKeuAerQ/azeNn/G1B1qMLeXOcV8+4TWlD2j3NV1u8q29SDFBXx/NBq5kyEAO+0mpRgacjA==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.16.4", - "@babel/helper-compilation-targets": "^7.16.3", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-validator-option": "^7.14.5", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.16.2", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.16.0", - "@babel/plugin-proposal-async-generator-functions": "^7.16.4", - "@babel/plugin-proposal-class-properties": "^7.16.0", - "@babel/plugin-proposal-class-static-block": "^7.16.0", - "@babel/plugin-proposal-dynamic-import": "^7.16.0", - "@babel/plugin-proposal-export-namespace-from": "^7.16.0", - "@babel/plugin-proposal-json-strings": "^7.16.0", - "@babel/plugin-proposal-logical-assignment-operators": "^7.16.0", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.0", - "@babel/plugin-proposal-numeric-separator": "^7.16.0", - "@babel/plugin-proposal-object-rest-spread": "^7.16.0", - "@babel/plugin-proposal-optional-catch-binding": "^7.16.0", - "@babel/plugin-proposal-optional-chaining": "^7.16.0", - "@babel/plugin-proposal-private-methods": "^7.16.0", - "@babel/plugin-proposal-private-property-in-object": "^7.16.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.16.0", - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-class-properties": "^7.12.13", - "@babel/plugin-syntax-class-static-block": "^7.14.5", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@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", - "@babel/plugin-transform-arrow-functions": "^7.16.0", - "@babel/plugin-transform-async-to-generator": "^7.16.0", - "@babel/plugin-transform-block-scoped-functions": "^7.16.0", - "@babel/plugin-transform-block-scoping": "^7.16.0", - "@babel/plugin-transform-classes": "^7.16.0", - "@babel/plugin-transform-computed-properties": "^7.16.0", - "@babel/plugin-transform-destructuring": "^7.16.0", - "@babel/plugin-transform-dotall-regex": "^7.16.0", - "@babel/plugin-transform-duplicate-keys": "^7.16.0", - "@babel/plugin-transform-exponentiation-operator": "^7.16.0", - "@babel/plugin-transform-for-of": "^7.16.0", - "@babel/plugin-transform-function-name": "^7.16.0", - "@babel/plugin-transform-literals": "^7.16.0", - "@babel/plugin-transform-member-expression-literals": "^7.16.0", - "@babel/plugin-transform-modules-amd": "^7.16.0", - "@babel/plugin-transform-modules-commonjs": "^7.16.0", - "@babel/plugin-transform-modules-systemjs": "^7.16.0", - "@babel/plugin-transform-modules-umd": "^7.16.0", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.16.0", - "@babel/plugin-transform-new-target": "^7.16.0", - "@babel/plugin-transform-object-super": "^7.16.0", - "@babel/plugin-transform-parameters": "^7.16.3", - "@babel/plugin-transform-property-literals": "^7.16.0", - "@babel/plugin-transform-regenerator": "^7.16.0", - "@babel/plugin-transform-reserved-words": "^7.16.0", - "@babel/plugin-transform-shorthand-properties": "^7.16.0", - "@babel/plugin-transform-spread": "^7.16.0", - "@babel/plugin-transform-sticky-regex": "^7.16.0", - "@babel/plugin-transform-template-literals": "^7.16.0", - "@babel/plugin-transform-typeof-symbol": "^7.16.0", - "@babel/plugin-transform-unicode-escapes": "^7.16.0", - "@babel/plugin-transform-unicode-regex": "^7.16.0", - "@babel/preset-modules": "^0.1.5", - "@babel/types": "^7.16.0", - "babel-plugin-polyfill-corejs2": "^0.3.0", - "babel-plugin-polyfill-corejs3": "^0.4.0", - "babel-plugin-polyfill-regenerator": "^0.3.0", - "core-js-compat": "^3.19.1", - "semver": "^6.3.0" + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.26.9.tgz", + "integrity": "sha512-vX3qPGE8sEKEAZCWk05k3cpTAE3/nOYca++JA+Rd0z2NCNzabmYvEiSShKzm10zdquOIAVXsy2Ei/DTW34KlKQ==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.26.8", + "@babel/helper-compilation-targets": "^7.26.5", + "@babel/helper-plugin-utils": "^7.26.5", + "@babel/helper-validator-option": "^7.25.9", + "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.25.9", + "@babel/plugin-bugfix-safari-class-field-initializer-scope": "^7.25.9", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.25.9", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.25.9", + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.25.9", + "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", + "@babel/plugin-syntax-import-assertions": "^7.26.0", + "@babel/plugin-syntax-import-attributes": "^7.26.0", + "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", + "@babel/plugin-transform-arrow-functions": "^7.25.9", + "@babel/plugin-transform-async-generator-functions": "^7.26.8", + "@babel/plugin-transform-async-to-generator": "^7.25.9", + "@babel/plugin-transform-block-scoped-functions": "^7.26.5", + "@babel/plugin-transform-block-scoping": "^7.25.9", + "@babel/plugin-transform-class-properties": "^7.25.9", + "@babel/plugin-transform-class-static-block": "^7.26.0", + "@babel/plugin-transform-classes": "^7.25.9", + "@babel/plugin-transform-computed-properties": "^7.25.9", + "@babel/plugin-transform-destructuring": "^7.25.9", + "@babel/plugin-transform-dotall-regex": "^7.25.9", + "@babel/plugin-transform-duplicate-keys": "^7.25.9", + "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^7.25.9", + "@babel/plugin-transform-dynamic-import": "^7.25.9", + "@babel/plugin-transform-exponentiation-operator": "^7.26.3", + "@babel/plugin-transform-export-namespace-from": "^7.25.9", + "@babel/plugin-transform-for-of": "^7.26.9", + "@babel/plugin-transform-function-name": "^7.25.9", + "@babel/plugin-transform-json-strings": "^7.25.9", + "@babel/plugin-transform-literals": "^7.25.9", + "@babel/plugin-transform-logical-assignment-operators": "^7.25.9", + "@babel/plugin-transform-member-expression-literals": "^7.25.9", + "@babel/plugin-transform-modules-amd": "^7.25.9", + "@babel/plugin-transform-modules-commonjs": "^7.26.3", + "@babel/plugin-transform-modules-systemjs": "^7.25.9", + "@babel/plugin-transform-modules-umd": "^7.25.9", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.25.9", + "@babel/plugin-transform-new-target": "^7.25.9", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.26.6", + "@babel/plugin-transform-numeric-separator": "^7.25.9", + "@babel/plugin-transform-object-rest-spread": "^7.25.9", + "@babel/plugin-transform-object-super": "^7.25.9", + "@babel/plugin-transform-optional-catch-binding": "^7.25.9", + "@babel/plugin-transform-optional-chaining": "^7.25.9", + "@babel/plugin-transform-parameters": "^7.25.9", + "@babel/plugin-transform-private-methods": "^7.25.9", + "@babel/plugin-transform-private-property-in-object": "^7.25.9", + "@babel/plugin-transform-property-literals": "^7.25.9", + "@babel/plugin-transform-regenerator": "^7.25.9", + "@babel/plugin-transform-regexp-modifiers": "^7.26.0", + "@babel/plugin-transform-reserved-words": "^7.25.9", + "@babel/plugin-transform-shorthand-properties": "^7.25.9", + "@babel/plugin-transform-spread": "^7.25.9", + "@babel/plugin-transform-sticky-regex": "^7.25.9", + "@babel/plugin-transform-template-literals": "^7.26.8", + "@babel/plugin-transform-typeof-symbol": "^7.26.7", + "@babel/plugin-transform-unicode-escapes": "^7.25.9", + "@babel/plugin-transform-unicode-property-regex": "^7.25.9", + "@babel/plugin-transform-unicode-regex": "^7.25.9", + "@babel/plugin-transform-unicode-sets-regex": "^7.25.9", + "@babel/preset-modules": "0.1.6-no-external-plugins", + "babel-plugin-polyfill-corejs2": "^0.4.10", + "babel-plugin-polyfill-corejs3": "^0.11.0", + "babel-plugin-polyfill-regenerator": "^0.6.1", + "core-js-compat": "^3.40.0", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" @@ -2947,34 +2619,18 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@mat3ra/esse/node_modules/@babel/preset-modules": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.6.tgz", - "integrity": "sha512-ID2yj6K/4lKfhuU3+EX4UvNbIt7eACFbHmNUjzA+ep+B5971CknnA/9DEWKbRokfbbtblxxxXFJJrH47UEAMVg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", - "@babel/plugin-transform-dotall-regex": "^7.4.4", - "@babel/types": "^7.4.4", - "esutils": "^2.0.2" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0 || ^8.0.0-0 <8.0.0" - } - }, "node_modules/@mat3ra/esse/node_modules/@babel/preset-react": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.16.7.tgz", - "integrity": "sha512-fWpyI8UM/HE6DfPBzD8LnhQ/OcH8AgTaqcqP2nGOXEUV+VKBR5JRN9hCk9ai+zQQ57vtm9oWeXguBCPNUjytgA==", + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.26.3.tgz", + "integrity": "sha512-Nl03d6T9ky516DGK2YMxrTqvnpUW63TnJMOMonj+Zae0JiPC5BC9xPMSL6L8fiSpA5vP88qfygavVQvnLp+6Cw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-validator-option": "^7.16.7", - "@babel/plugin-transform-react-display-name": "^7.16.7", - "@babel/plugin-transform-react-jsx": "^7.16.7", - "@babel/plugin-transform-react-jsx-development": "^7.16.7", - "@babel/plugin-transform-react-pure-annotations": "^7.16.7" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-validator-option": "^7.25.9", + "@babel/plugin-transform-react-display-name": "^7.25.9", + "@babel/plugin-transform-react-jsx": "^7.25.9", + "@babel/plugin-transform-react-jsx-development": "^7.25.9", + "@babel/plugin-transform-react-pure-annotations": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -2984,13 +2640,13 @@ } }, "node_modules/@mat3ra/esse/node_modules/@babel/runtime-corejs3": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.16.8.tgz", - "integrity": "sha512-3fKhuICS1lMz0plI5ktOE/yEtBRMVxplzRkdn6mJQ197XiY0JnrzYV0+Mxozq3JZ8SBV9Ecurmw1XsGbwOf+Sg==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.27.0.tgz", + "integrity": "sha512-UWjX6t+v+0ckwZ50Y5ShZLnlk95pP5MyW/pon9tiYzl3+18pkTHTFNTKr7rQbfRXPkowt2QAn30o1b6oswszew==", "dev": true, "dependencies": { - "core-js-pure": "^3.20.2", - "regenerator-runtime": "^0.13.4" + "core-js-pure": "^3.30.2", + "regenerator-runtime": "^0.14.0" }, "engines": { "node": ">=6.9.0" @@ -3012,72 +2668,34 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/@mat3ra/esse/node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz", - "integrity": "sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.17.7", - "@babel/helper-define-polyfill-provider": "^0.3.3", - "semver": "^6.1.1" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@mat3ra/esse/node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.4.0.tgz", - "integrity": "sha512-YxFreYwUfglYKdLUGvIF2nJEsGwj+RhWSX/ije3D2vQPOXuyMLMtg/cCGMDpOA7Nd+MwlNdnGODbd2EwUZPlsw==", + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.11.1.tgz", + "integrity": "sha512-yGCqvBT4rwMczo28xkH/noxJ6MZ4nJfkVYdoDaC/utLtWrXxv27HVrzAeSbqR8SxDsp46n0YF47EbHoixy6rXQ==", "dev": true, "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.3.0", - "core-js-compat": "^3.18.0" + "@babel/helper-define-polyfill-provider": "^0.6.3", + "core-js-compat": "^3.40.0" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@mat3ra/esse/node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.1.tgz", - "integrity": "sha512-Y2B06tvgHYt1x0yz17jGkGeeMr5FeKUu+ASJ+N6nB5lQ8Dapfg42i0OVrf8PNGJ3zKL4A23snMi1IRwrqqND7A==", - "dev": true, - "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.3.1" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, "node_modules/@mat3ra/esse/node_modules/commander": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", - "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", "dev": true, "engines": { "node": ">= 6" } }, - "node_modules/@mat3ra/esse/node_modules/convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true - }, "node_modules/@mat3ra/esse/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 }, - "node_modules/@mat3ra/esse/node_modules/regenerator-runtime": { - "version": "0.13.11", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", - "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", - "dev": true - }, "node_modules/@mat3ra/esse/node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -3087,15 +2705,6 @@ "semver": "bin/semver.js" } }, - "node_modules/@mat3ra/esse/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, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/@mat3ra/tsconfig": { "version": "2024.6.3-0", "resolved": "https://registry.npmjs.org/@mat3ra/tsconfig/-/tsconfig-2024.6.3-0.tgz", @@ -3269,9 +2878,9 @@ "dev": true }, "node_modules/@types/mocha": { - "version": "10.0.8", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.8.tgz", - "integrity": "sha512-HfMcUmy9hTMJh66VNcmeC9iVErIZJli2bszuXc6julh5YGuRb/W5OnkHjwLNYdFlMis0sY3If5SEAp+PktdJjw==", + "version": "10.0.10", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.10.tgz", + "integrity": "sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==", "dev": true }, "node_modules/@types/node": { @@ -4084,9 +3693,9 @@ "dev": true }, "node_modules/browserslist": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz", - "integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==", + "version": "4.24.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz", + "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==", "dev": true, "funding": [ { @@ -4103,10 +3712,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001663", - "electron-to-chromium": "^1.5.28", - "node-releases": "^2.0.18", - "update-browserslist-db": "^1.1.0" + "caniuse-lite": "^1.0.30001688", + "electron-to-chromium": "^1.5.73", + "node-releases": "^2.0.19", + "update-browserslist-db": "^1.1.1" }, "bin": { "browserslist": "cli.js" @@ -4207,9 +3816,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001666", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001666.tgz", - "integrity": "sha512-gD14ICmoV5ZZM1OdzPWmpx+q4GyefaK06zi8hmfHV5xe4/2nOQX3+Dw5o+fSqOws2xVwL9j+anOPFwHzdEdV4g==", + "version": "1.0.30001715", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001715.tgz", + "integrity": "sha512-7ptkFGMm2OAOgvZpwgA4yjQ5SQbrNVGdRjzH0pBdy1Fasvcr+KAeECmbCAECzTuDuoX0FCY8KzUxjf9+9kfZEw==", "dev": true, "funding": [ { @@ -4582,12 +4191,12 @@ "hasInstallScript": true }, "node_modules/core-js-compat": { - "version": "3.38.1", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.38.1.tgz", - "integrity": "sha512-JRH6gfXxGmrzF3tZ57lFx97YARxCXPaMzPo6jELZhv88pBH5VXpQ+y0znKGlFnzuaihqhLbefxSJxWJMPtfDzw==", + "version": "3.41.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.41.0.tgz", + "integrity": "sha512-RFsU9LySVue9RTwdDVX/T0e2Y6jRYWXERKElIjpuEOEnxaXffI0X7RUwVzfYLfzuLXSNJDYoRYUAmRUcyln20A==", "dev": true, "dependencies": { - "browserslist": "^4.23.3" + "browserslist": "^4.24.4" }, "funding": { "type": "opencollective", @@ -4904,9 +4513,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.5.31", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.31.tgz", - "integrity": "sha512-QcDoBbQeYt0+3CWcK/rEbuHvwpbT/8SV9T3OSgs6cX1FlcUAkgrkqbg9zLnDrMM/rLamzQwal4LYFCiWk861Tg==", + "version": "1.5.139", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.139.tgz", + "integrity": "sha512-GGnRYOTdN5LYpwbIr0rwP/ZHOQSvAF6TG0LSzp28uCBb9JiXHJGmaaKw29qjNJc5bGnnp6kXJqRnGMQoELwi5w==", "dev": true }, "node_modules/emoji-regex": { @@ -8414,9 +8023,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", - "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", + "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", "dev": true }, "node_modules/normalize-path": { @@ -9373,15 +8982,15 @@ } }, "node_modules/regexpu-core": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.1.1.tgz", - "integrity": "sha512-k67Nb9jvwJcJmVpw0jPttR1/zVfnKf8Km0IPatrU/zJ5XeG3+Slx0xLXs9HByJSzXzrlz5EDvN6yLNMDc2qdnw==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.2.0.tgz", + "integrity": "sha512-H66BPQMrv+V16t8xtmq+UC0CBpiTBA60V8ibS1QVReIp8T1z8hwFxqcGzm9K6lgsN7sB5edVH8a+ze6Fqm4weA==", "dev": true, "dependencies": { "regenerate": "^1.4.2", "regenerate-unicode-properties": "^10.2.0", "regjsgen": "^0.8.0", - "regjsparser": "^0.11.0", + "regjsparser": "^0.12.0", "unicode-match-property-ecmascript": "^2.0.0", "unicode-match-property-value-ecmascript": "^2.1.0" }, @@ -9396,9 +9005,9 @@ "dev": true }, "node_modules/regjsparser": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.11.0.tgz", - "integrity": "sha512-vTbzVAjQDzwQdKuvj7qEq6OlAprCjE656khuGQ4QaBLg7abQ9I9ISpmLuc6inWe7zP75AECjqUa4g4sdQvOXhg==", + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.12.0.tgz", + "integrity": "sha512-cnE+y8bz4NhMjISKbgeVJtqNbtf5QpjZP+Bslo+UqkIt9QPnX9q095eiRRASJG1/tz6dlNr6Z5NsBiWYokp6EQ==", "dev": true, "dependencies": { "jsesc": "~3.0.2" @@ -10233,15 +9842,6 @@ "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==" }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", diff --git a/package.json b/package.json index 7d8b2ee2..83174e79 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "@babel/register": "^7.25.7", "@babel/runtime-corejs3": "7.25.7", "@exabyte-io/eslint-config": "2025.1.15-0", - "@mat3ra/esse": "2025.1.27-0", + "@mat3ra/esse": "git+https://git@github.com/Exabyte-io/esse.git#dae2d3682c4cade747762ae12bc28896513ec555", "@mat3ra/tsconfig": "2024.6.3-0", "@types/chai": "^4.3.20", "@types/crypto-js": "^4.2.2", diff --git a/src/js/vector.ts b/src/js/vector.ts index b99d9506..2952f6c7 100644 --- a/src/js/vector.ts +++ b/src/js/vector.ts @@ -1,13 +1,13 @@ -import { PointSchema } from "@mat3ra/esse/dist/js/types"; +import { Vector3DSchema } from "@mat3ra/esse/dist/js/types"; import { math } from "./math"; export class Vector3D { static atol = 1e-8; - private _value: PointSchema; + private _value: Vector3DSchema; - constructor(value: number[] | PointSchema) { + constructor(value: number[] | Vector3DSchema) { if ( !Array.isArray(value) || value.length !== 3 || @@ -15,10 +15,10 @@ export class Vector3D { ) { throw new Error("Vector3D must be a tuple of exactly 3 numbers."); } - this._value = [...value] as PointSchema; + this._value = [...value] as Vector3DSchema; } - get value(): PointSchema { + get value(): Vector3DSchema { return this._value; } @@ -34,12 +34,12 @@ export class Vector3D { return this._value[2]; } - equals(other: number[] | PointSchema | Vector3D): boolean { + equals(other: number[] | Vector3DSchema | Vector3D): boolean { if (Array.isArray(other)) { if (other.length !== 3) { throw new Error("Input must be a 3-element array."); } - other = other as PointSchema; + other = other as Vector3DSchema; } const arr1 = this._value; const arr2 = other instanceof Vector3D ? other.value : other; @@ -54,14 +54,17 @@ export class Vector3D { export class RoundedVector3D extends Vector3D { static roundPrecision = 9; - toJSON(skipRounding = false): PointSchema { + toJSON(skipRounding = false): Vector3DSchema { const rounded = skipRounding ? this.value - : (math.roundArrayOrNumber(this.value, RoundedVector3D.roundPrecision) as PointSchema); - return [...rounded] as PointSchema; + : (math.roundArrayOrNumber( + this.value, + RoundedVector3D.roundPrecision, + ) as Vector3DSchema); + return [...rounded] as Vector3DSchema; } - get value_rounded(): PointSchema { + get value_rounded(): Vector3DSchema { return this.toJSON(); } @@ -77,7 +80,7 @@ export class RoundedVector3D extends Vector3D { return this.value_rounded[2]; } - override equals(other: PointSchema | RoundedVector3D): boolean { + override equals(other: Vector3DSchema | RoundedVector3D): boolean { const arr1 = this.value_rounded; const arr2 = Array.isArray(other) ? new RoundedVector3D(other).value_rounded diff --git a/src/py/mat3ra/code/vector.py b/src/py/mat3ra/code/vector.py index 7afd30c4..265d5530 100644 --- a/src/py/mat3ra/code/vector.py +++ b/src/py/mat3ra/code/vector.py @@ -1,7 +1,7 @@ from typing import List import numpy as np -from mat3ra.esse.models.core.abstract.point import PointSchema as Vector3DSchema +from mat3ra.esse.models.core.abstract.point import Coordinate3DSchema as Vector3DSchema from mat3ra.utils.mixins import RoundNumericValuesMixin from pydantic import model_serializer From 82e0c6272f6dde68cab475a61c44a3168de90fb6 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Sat, 19 Apr 2025 19:13:23 -0700 Subject: [PATCH 30/35] update: adjust valuwithid --- dist/js/ArrayWithIds.js | 2 +- dist/js/ValueWithId.d.ts | 13 ++++++++++++- dist/js/ValueWithId.js | 11 +++++++++-- src/js/ArrayWithIds.ts | 4 +++- src/js/ValueWithId.ts | 20 ++++++++++++++++++-- src/js/math.ts | 7 ++----- tests/js/valueWithId.tests.ts | 18 +++++++++--------- 7 files changed, 54 insertions(+), 21 deletions(-) diff --git a/dist/js/ArrayWithIds.js b/dist/js/ArrayWithIds.js index ad691d7c..04631e22 100644 --- a/dist/js/ArrayWithIds.js +++ b/dist/js/ArrayWithIds.js @@ -31,7 +31,7 @@ class ArrayWithIds { })); } toValueWithIdArray() { - return this.values.map((value, index) => new ValueWithId_1.ValueWithId(this.ids[index], value)); + return this.values.map((value, index) => ValueWithId_1.ValueWithId.fromValueAndId(value, this.ids[index])); } getElementValueByIndex(index) { return this.values[index]; diff --git a/dist/js/ValueWithId.d.ts b/dist/js/ValueWithId.d.ts index 17ca7222..dce31f56 100644 --- a/dist/js/ValueWithId.d.ts +++ b/dist/js/ValueWithId.d.ts @@ -1,8 +1,18 @@ +import { ObjectWithIdAndValueSchema } from "@mat3ra/esse/dist/js/types"; import { RoundingMethodEnum } from "./math"; +interface ValueWithIdSchema { + id: ObjectWithIdAndValueSchema["id"]; + value: T | null; +} export declare class ValueWithId { id: number; value: T | null; - constructor(id?: number, value?: T | null); + static defaultConfig: { + id: number; + value: null; + }; + static fromValueAndId(value: U, id?: number): ValueWithId; + constructor({ id, value }?: ValueWithIdSchema); /** * Converts the instance to a plain JavaScript object. */ @@ -23,3 +33,4 @@ export declare class RoundedValueWithId extends ValueWithId { constructor(id: number, value: T, options?: RoundingOptions); toJSON(): object; } +export {}; diff --git a/dist/js/ValueWithId.js b/dist/js/ValueWithId.js index 1adb243d..0971ba94 100644 --- a/dist/js/ValueWithId.js +++ b/dist/js/ValueWithId.js @@ -3,7 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.RoundedValueWithId = exports.defaultRoundingOptions = exports.ValueWithId = void 0; const math_1 = require("./math"); class ValueWithId { - constructor(id = 0, value = null) { + static fromValueAndId(value, id = 0) { + return new ValueWithId({ id, value }); + } + constructor({ id, value } = ValueWithId.defaultConfig) { this.id = id; this.value = value; } @@ -41,13 +44,17 @@ class ValueWithId { } } exports.ValueWithId = ValueWithId; +ValueWithId.defaultConfig = { + id: 0, + value: null, +}; exports.defaultRoundingOptions = { precision: 9, roundingMethod: math_1.RoundingMethodEnum.HalfAwayFromZero, }; class RoundedValueWithId extends ValueWithId { constructor(id, value, options = exports.defaultRoundingOptions) { - super(id, value); + super({ id, value }); this.precision = options.precision; this.roundingMethod = options.roundingMethod; } diff --git a/src/js/ArrayWithIds.ts b/src/js/ArrayWithIds.ts index 27e2677f..3938d366 100644 --- a/src/js/ArrayWithIds.ts +++ b/src/js/ArrayWithIds.ts @@ -49,7 +49,9 @@ export class ArrayWithIds { } toValueWithIdArray(): ValueWithId[] { - return this.values.map((value, index) => new ValueWithId(this.ids[index], value)); + return this.values.map((value, index) => + ValueWithId.fromValueAndId(value, this.ids[index]), + ); } getElementValueByIndex(index: number): T | undefined { diff --git a/src/js/ValueWithId.ts b/src/js/ValueWithId.ts index 36b3a190..0f84afdd 100644 --- a/src/js/ValueWithId.ts +++ b/src/js/ValueWithId.ts @@ -1,11 +1,27 @@ +import { ObjectWithIdAndValueSchema } from "@mat3ra/esse/dist/js/types"; + import { math, RoundingMethodEnum } from "./math"; +interface ValueWithIdSchema { + id: ObjectWithIdAndValueSchema["id"]; + value: T | null; +} + export class ValueWithId { id: number; value: T | null; - constructor(id = 0, value: T | null = null) { + static defaultConfig = { + id: 0, + value: null, + }; + + static fromValueAndId(value: U, id = 0): ValueWithId { + return new ValueWithId({ id, value }); + } + + constructor({ id, value }: ValueWithIdSchema = ValueWithId.defaultConfig) { this.id = id; this.value = value; } @@ -67,7 +83,7 @@ export class RoundedValueWithId extends ValueWithId { readonly roundingMethod: RoundingMethodEnum; constructor(id: number, value: T, options: RoundingOptions = defaultRoundingOptions) { - super(id, value); + super({ id, value }); this.precision = options.precision; this.roundingMethod = options.roundingMethod; } diff --git a/src/js/math.ts b/src/js/math.ts index 2e1fc844..2ab927d7 100644 --- a/src/js/math.ts +++ b/src/js/math.ts @@ -2,7 +2,7 @@ import mathjs from "mathjs"; import _ from "underscore"; -import {tolerance as TOLERANCE} from "./constants"; +import { tolerance as TOLERANCE } from "./constants"; /** * This module is intended to be used instead of the original mathjs package, hence we need to reexport all original functions and all TS types. @@ -265,14 +265,11 @@ export const roundArrayOrNumber = ( method = RoundingMethodEnum.HalfAwayFromZero, ) => { if (Array.isArray(value)) { - return value.map((v) => - typeof v === "number" ? roundCustom(v, decimals, method) : v - ); + return value.map((v) => (typeof v === "number" ? roundCustom(v, decimals, method) : v)); } return typeof value === "number" ? roundCustom(value, decimals, method) : value; }; - /** * @summary Returns n splits of the passed segment. */ diff --git a/tests/js/valueWithId.tests.ts b/tests/js/valueWithId.tests.ts index 547f9467..71352ccf 100644 --- a/tests/js/valueWithId.tests.ts +++ b/tests/js/valueWithId.tests.ts @@ -40,31 +40,31 @@ describe("ValueWithId Tests", () => { }); it("should create with specified id and value", () => { - const valueWithId = new ValueWithId(TEST_ID, TEST_VALUE); + const valueWithId = ValueWithId.fromValueAndId(TEST_VALUE, TEST_ID); expect(valueWithId.id).to.equal(TEST_ID); expect(valueWithId.value).to.be.equal(TEST_VALUE); }); it("should convert to JSON format", () => { - const valueWithId = new ValueWithId(TEST_ID, TEST_VALUE); + const valueWithId = ValueWithId.fromValueAndId(TEST_VALUE, TEST_ID); const jsonResult = valueWithId.toJSON(); expect(jsonResult).to.deep.equal({ id: TEST_ID, value: TEST_VALUE }); }); it("should correctly compare equality with primitive values", () => { - const a = new ValueWithId(TEST_ID, TEST_VALUE); - const b = new ValueWithId(TEST_ID, TEST_VALUE); - const c = new ValueWithId(TEST_ID, DIFFERENT_VALUE); + const a = ValueWithId.fromValueAndId(TEST_VALUE, TEST_ID); + const b = ValueWithId.fromValueAndId(TEST_VALUE, TEST_ID); + const c = ValueWithId.fromValueAndId(DIFFERENT_VALUE, TEST_ID); expect(a.equals(b)).to.equal(true); expect(a.equals(c)).to.equal(false); }); it("should correctly compare equality with array values", () => { - const a = new ValueWithId(TEST_ID, ARRAY_VALUE); - const b = new ValueWithId(TEST_ID, ARRAY_VALUE_EQUAL); - const c = new ValueWithId(TEST_ID, ARRAY_VALUE_DIFF); - const d = new ValueWithId(TEST_ID, ARRAY_VALUE_SHORTER); + const a = ValueWithId.fromValueAndId(ARRAY_VALUE, TEST_ID); + const b = ValueWithId.fromValueAndId(ARRAY_VALUE_EQUAL, TEST_ID); + const c = ValueWithId.fromValueAndId(ARRAY_VALUE_DIFF, TEST_ID); + const d = ValueWithId.fromValueAndId(ARRAY_VALUE_SHORTER, TEST_ID); expect(a.equals(b)).to.equal(true); expect(a.equals(c)).to.equal(false); From 324e8ff4949c7a655e6d660e3fb22d3854f74bcd Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Sat, 19 Apr 2025 19:33:21 -0700 Subject: [PATCH 31/35] update: fix equlaity: --- dist/js/ValueWithId.d.ts | 7 +++++-- dist/js/ValueWithId.js | 20 ++++++++++---------- src/js/ValueWithId.ts | 32 ++++++++++++++++---------------- 3 files changed, 31 insertions(+), 28 deletions(-) diff --git a/dist/js/ValueWithId.d.ts b/dist/js/ValueWithId.d.ts index dce31f56..70273a02 100644 --- a/dist/js/ValueWithId.d.ts +++ b/dist/js/ValueWithId.d.ts @@ -11,7 +11,10 @@ export declare class ValueWithId { id: number; value: null; }; - static fromValueAndId(value: U, id?: number): ValueWithId; + static fromValueAndId>(this: new (args: { + id: number; + value: U | null; + }) => C, value: U, id?: number): C; constructor({ id, value }?: ValueWithIdSchema); /** * Converts the instance to a plain JavaScript object. @@ -20,7 +23,7 @@ export declare class ValueWithId { /** * Checks if this instance is equal to another ValueWithId. */ - equals(other: ValueWithId): boolean; + equals(other: ValueWithId): boolean; } export interface RoundingOptions { precision: number; diff --git a/dist/js/ValueWithId.js b/dist/js/ValueWithId.js index 0971ba94..0f4d19ba 100644 --- a/dist/js/ValueWithId.js +++ b/dist/js/ValueWithId.js @@ -4,7 +4,7 @@ exports.RoundedValueWithId = exports.defaultRoundingOptions = exports.ValueWithI const math_1 = require("./math"); class ValueWithId { static fromValueAndId(value, id = 0) { - return new ValueWithId({ id, value }); + return new this({ id, value }); } constructor({ id, value } = ValueWithId.defaultConfig) { this.id = id; @@ -26,21 +26,21 @@ class ValueWithId { * Checks if this instance is equal to another ValueWithId. */ equals(other) { - if (!(other instanceof ValueWithId)) { + if (!(other instanceof ValueWithId)) return false; - } - if (Array.isArray(this.value) && Array.isArray(other.value)) { - if (this.value.length !== other.value.length) { + // because U may differ from T, we cast to unknown when comparing + const v1 = this.value; + const v2 = other.value; + if (Array.isArray(v1) && Array.isArray(v2)) { + if (v1.length !== v2.length) return false; - } - for (let i = 0; i < this.value.length; i++) { - if (this.value[i] !== other.value[i]) { + for (let i = 0; i < v1.length; i++) { + if (v1[i] !== v2[i]) return false; - } } return this.id === other.id; } - return this.id === other.id && this.value === other.value; + return this.id === other.id && v1 === v2; } } exports.ValueWithId = ValueWithId; diff --git a/src/js/ValueWithId.ts b/src/js/ValueWithId.ts index 0f84afdd..f1f2620e 100644 --- a/src/js/ValueWithId.ts +++ b/src/js/ValueWithId.ts @@ -17,8 +17,12 @@ export class ValueWithId { value: null, }; - static fromValueAndId(value: U, id = 0): ValueWithId { - return new ValueWithId({ id, value }); + static fromValueAndId>( + this: new (args: { id: number; value: U | null }) => C, + value: U, + id = 0, + ): C { + return new this({ id, value }); } constructor({ id, value }: ValueWithIdSchema = ValueWithId.defaultConfig) { @@ -44,26 +48,22 @@ export class ValueWithId { /** * Checks if this instance is equal to another ValueWithId. */ - equals(other: ValueWithId): boolean { - if (!(other instanceof ValueWithId)) { - return false; - } + equals(other: ValueWithId): boolean { + if (!(other instanceof ValueWithId)) return false; - if (Array.isArray(this.value) && Array.isArray(other.value)) { - if (this.value.length !== other.value.length) { - return false; - } + // because U may differ from T, we cast to unknown when comparing + const v1 = this.value as unknown; + const v2 = other.value as unknown; - for (let i = 0; i < this.value.length; i++) { - if (this.value[i] !== other.value[i]) { - return false; - } + if (Array.isArray(v1) && Array.isArray(v2)) { + if (v1.length !== v2.length) return false; + for (let i = 0; i < v1.length; i++) { + if (v1[i] !== v2[i]) return false; } - return this.id === other.id; } - return this.id === other.id && this.value === other.value; + return this.id === other.id && v1 === v2; } } From bf514e486a559d1141c43eb73085862b0fa18a04 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Sat, 19 Apr 2025 19:39:37 -0700 Subject: [PATCH 32/35] update: fix from value and id --- dist/js/ValueWithId.d.ts | 2 +- src/js/ValueWithId.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/js/ValueWithId.d.ts b/dist/js/ValueWithId.d.ts index 70273a02..2e3c67a2 100644 --- a/dist/js/ValueWithId.d.ts +++ b/dist/js/ValueWithId.d.ts @@ -13,7 +13,7 @@ export declare class ValueWithId { }; static fromValueAndId>(this: new (args: { id: number; - value: U | null; + value: U; }) => C, value: U, id?: number): C; constructor({ id, value }?: ValueWithIdSchema); /** diff --git a/src/js/ValueWithId.ts b/src/js/ValueWithId.ts index f1f2620e..747ada7f 100644 --- a/src/js/ValueWithId.ts +++ b/src/js/ValueWithId.ts @@ -18,7 +18,7 @@ export class ValueWithId { }; static fromValueAndId>( - this: new (args: { id: number; value: U | null }) => C, + this: new (args: { id: number; value: U }) => C, value: U, id = 0, ): C { From c68df7fcfb1508243492afe0c1aabfcfa9d8c3f4 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Mon, 21 Apr 2025 19:05:15 -0700 Subject: [PATCH 33/35] update: mathjs types --- dist/js/math.d.ts | 203 ++++++++++++++++++++++++++++++---------------- package-lock.json | 8 +- package.json | 2 +- 3 files changed, 137 insertions(+), 76 deletions(-) diff --git a/dist/js/math.d.ts b/dist/js/math.d.ts index 92c65601..6abf0ed7 100644 --- a/dist/js/math.d.ts +++ b/dist/js/math.d.ts @@ -85,11 +85,60 @@ export declare const math: { version: string; expression: mathjs.MathNode; json: mathjs.MathJsJson; - config: (options: any) => void; + config: (options: mathjs.ConfigOptions) => mathjs.ConfigOptions; + typed: (name: string, signatures: Record any>) => ((...args: any[]) => any); + bignumber(x?: number | string | mathjs.Fraction | mathjs.BigNumber | mathjs.MathArray | mathjs.Matrix | boolean | mathjs.Fraction | null): mathjs.BigNumber; + boolean(x: string | number | boolean | mathjs.MathArray | mathjs.Matrix | null): boolean | mathjs.MathArray | mathjs.Matrix; + chain(value?: any): mathjs.MathJsChain; + complex(arg?: mathjs.Complex | string | mathjs.PolarCoordinates): mathjs.Complex; + complex(arg?: mathjs.MathArray | mathjs.Matrix): mathjs.MathArray | mathjs.Matrix; + complex(re: number, im: number): mathjs.Complex; + createUnit(name: string, definition?: string | mathjs.UnitDefinition, options?: mathjs.CreateUnitOptions): mathjs.Unit; + createUnit(units: Record, options?: mathjs.CreateUnitOptions): mathjs.Unit; + fraction(args: mathjs.Fraction | mathjs.MathArray | mathjs.Matrix): mathjs.Fraction | mathjs.MathArray | mathjs.Matrix; + fraction(numerator: number | string | mathjs.MathArray | mathjs.Matrix, denominator?: number | string | mathjs.MathArray | mathjs.Matrix): mathjs.Fraction | mathjs.MathArray | mathjs.Matrix; + index(...ranges: any[]): mathjs.Index; + matrix(format?: "sparse" | "dense"): mathjs.Matrix; + matrix(data: mathjs.MathArray | mathjs.Matrix, format?: "sparse" | "dense", dataType?: string): mathjs.Matrix; + number(value?: string | number | mathjs.BigNumber | mathjs.Fraction | boolean | mathjs.MathArray | mathjs.Matrix | mathjs.Unit | null): number | mathjs.MathArray | mathjs.Matrix; + number(unit: mathjs.Unit, valuelessUnit: mathjs.Unit | string): number; + sparse(data?: mathjs.MathArray | mathjs.Matrix, dataType?: string): mathjs.Matrix; + splitUnit(unit: mathjs.Unit, parts: mathjs.Unit[]): mathjs.Unit[]; + string(value: mathjs.MathType | null): string | mathjs.MathArray | mathjs.Matrix; + unit(unit: string): mathjs.Unit; + unit(value: number | mathjs.MathArray | mathjs.Matrix, unit: string): mathjs.Unit; + compile(expr: mathjs.MathExpression): mathjs.EvalFunction; + compile(exprs: mathjs.MathExpression[]): mathjs.EvalFunction[]; + eval(expr: mathjs.MathExpression | mathjs.MathExpression[] | mathjs.Matrix, scope?: object): any; + help(search: () => any): mathjs.Help; + parse(expr: mathjs.MathExpression, options?: any): mathjs.MathNode; + parse(exprs: mathjs.MathExpression[], options?: any): mathjs.MathNode[]; + parser(): mathjs.Parser; + derivative(expr: mathjs.MathNode | string, variable: mathjs.MathNode | string, options?: { + simplify: boolean; + }): mathjs.MathNode; lsolve(L: mathjs.Matrix | mathjs.MathArray, b: mathjs.Matrix | mathjs.MathArray): mathjs.Matrix | mathjs.MathArray; - lup(A?: mathjs.Matrix | mathjs.MathArray): mathjs.MathArray; - lusolve(A: mathjs.Matrix | mathjs.MathArray | number, b: mathjs.Matrix | mathjs.MathArray): mathjs.Matrix | mathjs.MathArray; - slu(A: mathjs.Matrix, order: number, threshold: number): any; + lup(A?: mathjs.Matrix | mathjs.MathArray): { + L: mathjs.MathArray | mathjs.Matrix; + U: mathjs.MathArray | mathjs.Matrix; + P: number[]; + }; + lusolve(A: mathjs.Matrix | mathjs.MathArray | number, b: mathjs.Matrix | mathjs.MathArray, order?: number, threshold?: number): mathjs.Matrix | mathjs.MathArray; + qr(A: mathjs.Matrix | mathjs.MathArray): { + Q: mathjs.MathArray | mathjs.Matrix; + R: mathjs.MathArray | mathjs.Matrix; + }; + rationalize(expr: mathjs.MathNode | string, optional?: object | boolean, detailed?: true): { + expression: mathjs.MathNode | string; + variables: string[]; + coefficients: mathjs.MathType[]; + }; + rationalize(expr: mathjs.MathNode | string, optional?: object | boolean, detailed?: false): mathjs.MathNode; + simplify(expr: mathjs.MathNode | string, rules?: Array<({ + l: string; + r: string; + } | string | ((node: mathjs.MathNode) => mathjs.MathNode))>, scope?: object): mathjs.MathNode; + slu(A: mathjs.Matrix, order: number, threshold: number): object; usolve(U: mathjs.Matrix | mathjs.MathArray, b: mathjs.Matrix | mathjs.MathArray): mathjs.Matrix | mathjs.MathArray; abs(x: number): number; abs(x: mathjs.BigNumber): mathjs.BigNumber; @@ -131,6 +180,11 @@ export declare const math: { exp(x: mathjs.Complex): mathjs.Complex; exp(x: mathjs.MathArray): mathjs.MathArray; exp(x: mathjs.Matrix): mathjs.Matrix; + expm1(x: number): number; + expm1(x: mathjs.BigNumber): mathjs.BigNumber; + expm1(x: mathjs.Complex): mathjs.Complex; + expm1(x: mathjs.MathArray): mathjs.MathArray; + expm1(x: mathjs.Matrix): mathjs.Matrix; fix(x: number): number; fix(x: mathjs.BigNumber): mathjs.BigNumber; fix(x: mathjs.Fraction): mathjs.Fraction; @@ -150,7 +204,6 @@ export declare const math: { gcd(...args: mathjs.Matrix[]): mathjs.Matrix; hypot(...args: number[]): number; hypot(...args: mathjs.BigNumber[]): mathjs.BigNumber; - kron(x: mathjs.Matrix | mathjs.MathArray, y: mathjs.Matrix | mathjs.MathArray): mathjs.Matrix; lcm(a: number, b: number): number; lcm(a: mathjs.BigNumber, b: mathjs.BigNumber): mathjs.BigNumber; lcm(a: mathjs.MathArray, b: mathjs.MathArray): mathjs.MathArray; @@ -161,7 +214,17 @@ export declare const math: { log10(x: mathjs.Complex): mathjs.Complex; log10(x: mathjs.MathArray): mathjs.MathArray; log10(x: mathjs.Matrix): mathjs.Matrix; - multiply(x: mathjs.MathArray | mathjs.Matrix, y: mathjs.MathType): mathjs.Matrix; + log1p(x: number, base?: number | mathjs.BigNumber | mathjs.Complex): number; + log1p(x: mathjs.BigNumber, base?: number | mathjs.BigNumber | mathjs.Complex): mathjs.BigNumber; + log1p(x: mathjs.Complex, base?: number | mathjs.BigNumber | mathjs.Complex): mathjs.Complex; + log1p(x: mathjs.MathArray, base?: number | mathjs.BigNumber | mathjs.Complex): mathjs.MathArray; + log1p(x: mathjs.Matrix, base?: number | mathjs.BigNumber | mathjs.Complex): mathjs.Matrix; + log2(x: number): number; + log2(x: mathjs.BigNumber): mathjs.BigNumber; + log2(x: mathjs.Complex): mathjs.Complex; + log2(x: mathjs.MathArray): mathjs.MathArray; + log2(x: mathjs.Matrix): mathjs.Matrix; + multiply(x: mathjs.Matrix | mathjs.MathArray, y: mathjs.MathType): mathjs.Matrix | mathjs.MathArray; multiply(x: mathjs.Unit, y: mathjs.Unit): mathjs.Unit; multiply(x: number, y: number): number; multiply(x: mathjs.MathType, y: mathjs.MathType): mathjs.MathType; @@ -211,10 +274,10 @@ export declare const math: { bitNot(x: mathjs.BigNumber): mathjs.BigNumber; bitNot(x: mathjs.MathArray): mathjs.MathArray; bitNot(x: mathjs.Matrix): mathjs.Matrix; - bitOr(x: number): number; - bitOr(x: mathjs.BigNumber): mathjs.BigNumber; - bitOr(x: mathjs.MathArray): mathjs.MathArray; - bitOr(x: mathjs.Matrix): mathjs.Matrix; + bitOr(x: number, y: number): number; + bitOr(x: mathjs.BigNumber, y: mathjs.BigNumber): mathjs.BigNumber; + bitOr(x: mathjs.MathArray, y: mathjs.MathArray): mathjs.MathArray; + bitOr(x: mathjs.Matrix, y: mathjs.Matrix): mathjs.Matrix; bitXor(x: number | mathjs.BigNumber | mathjs.MathArray | mathjs.Matrix, y: number | mathjs.BigNumber | mathjs.MathArray | mathjs.Matrix): number | mathjs.BigNumber | mathjs.MathArray | mathjs.Matrix; leftShift(x: number | mathjs.BigNumber | mathjs.MathArray | mathjs.Matrix, y: number | mathjs.BigNumber): number | mathjs.BigNumber | mathjs.MathArray | mathjs.Matrix; rightArithShift(x: number | mathjs.BigNumber | mathjs.MathArray | mathjs.Matrix, y: number | mathjs.BigNumber): number | mathjs.BigNumber | mathjs.MathArray | mathjs.Matrix; @@ -226,83 +289,83 @@ export declare const math: { composition(n: number | mathjs.BigNumber, k: number | mathjs.BigNumber): number | mathjs.BigNumber; stirlingS2(n: number | mathjs.BigNumber, k: number | mathjs.BigNumber): number | mathjs.BigNumber; arg(x: number | mathjs.Complex): number; + arg(x: mathjs.BigNumber | mathjs.Complex): mathjs.BigNumber; arg(x: mathjs.MathArray): mathjs.MathArray; arg(x: mathjs.Matrix): mathjs.Matrix; conj(x: number | mathjs.BigNumber | mathjs.Complex | mathjs.MathArray | mathjs.Matrix): number | mathjs.BigNumber | mathjs.Complex | mathjs.MathArray | mathjs.Matrix; im(x: number | mathjs.BigNumber | mathjs.Complex | mathjs.MathArray | mathjs.Matrix): number | mathjs.BigNumber | mathjs.MathArray | mathjs.Matrix; re(x: number | mathjs.BigNumber | mathjs.Complex | mathjs.MathArray | mathjs.Matrix): number | mathjs.BigNumber | mathjs.MathArray | mathjs.Matrix; - bignumber(x?: number | string | mathjs.MathArray | mathjs.Matrix | boolean): mathjs.BigNumber; - boolean(x: string | number | boolean | mathjs.MathArray | mathjs.Matrix): boolean | mathjs.MathArray | mathjs.Matrix; - chain(value?: any): mathjs.MathJsChain; - complex(arg?: mathjs.Complex | string | mathjs.MathArray | mathjs.PolarCoordinates): mathjs.Complex; - complex(re: number, im: number): mathjs.Complex; - fraction(numerator: number | string | mathjs.MathArray | mathjs.Matrix, denominator?: number | string | mathjs.MathArray | mathjs.Matrix): mathjs.Fraction | mathjs.MathArray | mathjs.Matrix; - index(...ranges: any[]): mathjs.Index; - matrix(format?: "sparse" | "dense"): mathjs.Matrix; - matrix(data: mathjs.MathArray | mathjs.Matrix, format?: "sparse" | "dense", dataType?: string): mathjs.Matrix; - number(value?: string | number | boolean | mathjs.MathArray | mathjs.Matrix | mathjs.Unit | mathjs.BigNumber | mathjs.Fraction): number | mathjs.MathArray | mathjs.Matrix; - number(unit: mathjs.Unit, valuelessUnit: mathjs.Unit | string): number | mathjs.MathArray | mathjs.Matrix; - sparse(data?: mathjs.MathArray | mathjs.Matrix, dataType?: string): mathjs.Matrix; - string(value: any): string | mathjs.MathArray | mathjs.Matrix; - unit(unit: string): mathjs.Unit; - unit(value: number, unit: string): mathjs.Unit; - createUnit(name: string, definition?: string | mathjs.UnitDefinition, options?: mathjs.CreateUnitOptions): mathjs.Unit; - createUnit(units: Record, options?: mathjs.CreateUnitOptions): mathjs.Unit; - compile(expr: mathjs.MathExpression): mathjs.EvalFunction; - compile(exprs: mathjs.MathExpression[]): mathjs.EvalFunction[]; - eval(expr: mathjs.MathExpression | mathjs.MathExpression[], scope?: any): any; - help(search: any): mathjs.Help; - parse(expr: mathjs.MathExpression, options?: any): mathjs.MathNode; - parse(exprs: mathjs.MathExpression[], options?: any): mathjs.MathNode[]; - parser(): mathjs.Parser; - distance(x: mathjs.MathType, y: mathjs.MathType): number | mathjs.BigNumber; + distance(x: mathjs.MathArray | mathjs.Matrix | object, y: mathjs.MathArray | mathjs.Matrix | object): number | mathjs.BigNumber; intersect(w: mathjs.MathArray | mathjs.Matrix, x: mathjs.MathArray | mathjs.Matrix, y: mathjs.MathArray | mathjs.Matrix, z: mathjs.MathArray | mathjs.Matrix): mathjs.MathArray; and(x: number | mathjs.BigNumber | mathjs.Complex | mathjs.Unit | mathjs.MathArray | mathjs.Matrix, y: number | mathjs.BigNumber | mathjs.Complex | mathjs.Unit | mathjs.MathArray | mathjs.Matrix): boolean | mathjs.MathArray | mathjs.Matrix; not(x: number | mathjs.BigNumber | mathjs.Complex | mathjs.Unit | mathjs.MathArray | mathjs.Matrix): boolean | mathjs.MathArray | mathjs.Matrix; or(x: number | mathjs.BigNumber | mathjs.Complex | mathjs.Unit | mathjs.MathArray | mathjs.Matrix, y: number | mathjs.BigNumber | mathjs.Complex | mathjs.Unit | mathjs.MathArray | mathjs.Matrix): boolean | mathjs.MathArray | mathjs.Matrix; xor(x: number | mathjs.BigNumber | mathjs.Complex | mathjs.Unit | mathjs.MathArray | mathjs.Matrix, y: number | mathjs.BigNumber | mathjs.Complex | mathjs.Unit | mathjs.MathArray | mathjs.Matrix): boolean | mathjs.MathArray | mathjs.Matrix; - concat(...args: Array): mathjs.MathArray | mathjs.Matrix; - cross(x: mathjs.MathArray | mathjs.Matrix, y: mathjs.MathArray | mathjs.Matrix): mathjs.Matrix; + concat(...args: Array): mathjs.MathArray | mathjs.Matrix; + cross(x: mathjs.MathArray | mathjs.Matrix, y: mathjs.MathArray | mathjs.Matrix): mathjs.Matrix | mathjs.MathArray; det(x: mathjs.MathArray | mathjs.Matrix): number; diag(X: mathjs.MathArray | mathjs.Matrix, format?: string): mathjs.Matrix; - diag(X: mathjs.MathArray | mathjs.Matrix, k: number | mathjs.BigNumber, format?: string): mathjs.Matrix; + diag(X: mathjs.MathArray | mathjs.Matrix, k: number | mathjs.BigNumber, format?: string): mathjs.Matrix | mathjs.MathArray; dot(x: mathjs.MathArray | mathjs.Matrix, y: mathjs.MathArray | mathjs.Matrix): number; - eye(n: number | number[], format?: string): mathjs.Matrix; - eye(m: number, n: number, format?: string): mathjs.Matrix; + expm(x: mathjs.Matrix): mathjs.Matrix; + identity(size: number | number[] | mathjs.Matrix | mathjs.MathArray, format?: string): mathjs.Matrix | mathjs.MathArray | number; + identity(m: number, n: number, format?: string): mathjs.Matrix | mathjs.MathArray | number; + filter(x: mathjs.Matrix | mathjs.MathArray | string[], test: ((value: any, index: any, matrix: mathjs.Matrix | mathjs.MathArray | string[]) => boolean) | RegExp): mathjs.Matrix | mathjs.MathArray; flatten(x: mathjs.MathArray | mathjs.Matrix): mathjs.MathArray | mathjs.Matrix; + forEach(x: mathjs.Matrix | mathjs.MathArray, callback: ((value: any, index: any, matrix: mathjs.Matrix | mathjs.MathArray) => void)): void; inv(x: number | mathjs.Complex | mathjs.MathArray | mathjs.Matrix): number | mathjs.Complex | mathjs.MathArray | mathjs.Matrix; - ones(n: number | number[], format?: string): mathjs.MathArray | mathjs.Matrix; + kron(x: mathjs.Matrix | mathjs.MathArray, y: mathjs.Matrix | mathjs.MathArray): mathjs.Matrix; + map(x: mathjs.Matrix | mathjs.MathArray, callback: ((value: any, index: any, matrix: mathjs.Matrix | mathjs.MathArray) => mathjs.MathType | string)): mathjs.Matrix | mathjs.MathArray; + ones(size: number | number[], format?: string): mathjs.MathArray | mathjs.Matrix; ones(m: number, n: number, format?: string): mathjs.MathArray | mathjs.Matrix; + partitionSelect(x: mathjs.MathArray | mathjs.Matrix, k: number, compare?: "asc" | "desc" | ((a: any, b: any) => number)): any; range(str: string, includeEnd?: boolean): mathjs.Matrix; range(start: number | mathjs.BigNumber, end: number | mathjs.BigNumber, includeEnd?: boolean): mathjs.Matrix; range(start: number | mathjs.BigNumber, end: number | mathjs.BigNumber, step: number | mathjs.BigNumber, includeEnd?: boolean): mathjs.Matrix; + reshape(x: mathjs.MathArray | mathjs.Matrix, sizes: number[]): mathjs.MathArray | mathjs.Matrix; resize(x: mathjs.MathArray | mathjs.Matrix, size: mathjs.MathArray | mathjs.Matrix, defaultValue?: number | string): mathjs.MathArray | mathjs.Matrix; size(x: boolean | number | mathjs.Complex | mathjs.Unit | string | mathjs.MathArray | mathjs.Matrix): mathjs.MathArray | mathjs.Matrix; + sort(x: mathjs.Matrix | mathjs.MathArray, compare: ((a: any, b: any) => number) | "asc" | "desc" | "natural"): mathjs.Matrix | mathjs.MathArray; + sqrtm(A: mathjs.MathArray | mathjs.Matrix): mathjs.MathArray | mathjs.Matrix; squeeze(x: mathjs.MathArray | mathjs.Matrix): mathjs.Matrix | mathjs.MathArray; subset(value: mathjs.MathArray | mathjs.Matrix | string, index: mathjs.Index, replacement?: any, defaultValue?: any): mathjs.MathArray | mathjs.Matrix | string; trace(x: mathjs.MathArray | mathjs.Matrix): number; transpose(x: mathjs.MathArray | mathjs.Matrix): mathjs.MathArray | mathjs.Matrix; - zeros(n: number | number[], format?: string): mathjs.MathArray | mathjs.Matrix; + zeros(size: number | number[], format?: string): mathjs.MathArray | mathjs.Matrix; zeros(m: number, n: number, format?: string): mathjs.MathArray | mathjs.Matrix; - distribution(name: string): mathjs.Distribution; factorial(n: number | mathjs.BigNumber | mathjs.MathArray | mathjs.Matrix): number | mathjs.BigNumber | mathjs.MathArray | mathjs.Matrix; gamma(n: number | mathjs.MathArray | mathjs.Matrix): number | mathjs.MathArray | mathjs.Matrix; - kldivergence(x: mathjs.MathArray | mathjs.Matrix, y: mathjs.MathArray | mathjs.Matrix): number; + kldivergence(q: mathjs.MathArray | mathjs.Matrix, p: mathjs.MathArray | mathjs.Matrix): number; multinomial(a: number[] | mathjs.BigNumber[]): number | mathjs.BigNumber; permutations(n: number | mathjs.BigNumber, k?: number | mathjs.BigNumber): number | mathjs.BigNumber; - pickRandom(array: number[]): number; + pickRandom(array: number[], number?: number, weights?: number[]): number; random(min?: number, max?: number): number; random(size: mathjs.MathArray | mathjs.Matrix, min?: number, max?: number): mathjs.MathArray | mathjs.Matrix; randomInt(min: number, max?: number): number; randomInt(size: mathjs.MathArray | mathjs.Matrix, min?: number, max?: number): mathjs.MathArray | mathjs.Matrix; - compare(x: mathjs.MathType, y: mathjs.MathType): number | mathjs.BigNumber | mathjs.Fraction | mathjs.MathArray | mathjs.Matrix; + compare(x: mathjs.MathType | string, y: mathjs.MathType | string): number | mathjs.BigNumber | mathjs.Fraction | mathjs.MathArray | mathjs.Matrix; + compareNatural(x: any, y: any): number; + compareText(x: string | mathjs.MathArray | mathjs.Matrix, y: string | mathjs.MathArray | mathjs.Matrix): number | mathjs.MathArray | mathjs.Matrix; deepEqual(x: mathjs.MathType, y: mathjs.MathType): number | mathjs.BigNumber | mathjs.Fraction | mathjs.Complex | mathjs.Unit | mathjs.MathArray | mathjs.Matrix; - equal(x: mathjs.MathType, y: mathjs.MathType): boolean | mathjs.MathArray | mathjs.Matrix; - larger(x: mathjs.MathType, y: mathjs.MathType): boolean | mathjs.MathArray | mathjs.Matrix; - largerEq(x: mathjs.MathType, y: mathjs.MathType): boolean | mathjs.MathArray | mathjs.Matrix; - smaller(x: mathjs.MathType, y: mathjs.MathType): boolean | mathjs.MathArray | mathjs.Matrix; - smallerEq(x: mathjs.MathType, y: mathjs.MathType): boolean | mathjs.MathArray | mathjs.Matrix; - unequal(x: mathjs.MathType, y: mathjs.MathType): boolean | mathjs.MathArray | mathjs.Matrix; + equal(x: mathjs.MathType | string, y: mathjs.MathType | string): boolean | mathjs.MathArray | mathjs.Matrix; + equalText(x: string | mathjs.MathArray | mathjs.Matrix, y: string | mathjs.MathArray | mathjs.Matrix): number | mathjs.MathArray | mathjs.Matrix; + larger(x: mathjs.MathType | string, y: mathjs.MathType | string): boolean | mathjs.MathArray | mathjs.Matrix; + largerEq(x: mathjs.MathType | string, y: mathjs.MathType | string): boolean | mathjs.MathArray | mathjs.Matrix; + smaller(x: mathjs.MathType | string, y: mathjs.MathType | string): boolean | mathjs.MathArray | mathjs.Matrix; + smallerEq(x: mathjs.MathType | string, y: mathjs.MathType | string): boolean | mathjs.MathArray | mathjs.Matrix; + unequal(x: mathjs.MathType | string, y: mathjs.MathType | string): boolean | mathjs.MathArray | mathjs.Matrix; + setCartesian(a1: mathjs.MathArray | mathjs.Matrix, a2: mathjs.MathArray | mathjs.Matrix): mathjs.MathArray | mathjs.Matrix; + setDifference(a1: mathjs.MathArray | mathjs.Matrix, a2: mathjs.MathArray | mathjs.Matrix): mathjs.MathArray | mathjs.Matrix; + setDistinct(a: mathjs.MathArray | mathjs.Matrix): mathjs.MathArray | mathjs.Matrix; + setIntersect(a1: mathjs.MathArray | mathjs.Matrix, a2: mathjs.MathArray | mathjs.Matrix): mathjs.MathArray | mathjs.Matrix; + setIsSubset(a1: mathjs.MathArray | mathjs.Matrix, a2: mathjs.MathArray | mathjs.Matrix): boolean; + setMultiplicity(e: number | mathjs.BigNumber | mathjs.Fraction | mathjs.Complex, a: mathjs.MathArray | mathjs.Matrix): number; + setPowerset(a: mathjs.MathArray | mathjs.Matrix): mathjs.MathArray | mathjs.Matrix; + setSize(a: mathjs.MathArray | mathjs.Matrix): number; + setSymDifference(a1: mathjs.MathArray | mathjs.Matrix, a2: mathjs.MathArray | mathjs.Matrix): mathjs.MathArray | mathjs.Matrix; + setUnion(a1: mathjs.MathArray | mathjs.Matrix, a2: mathjs.MathArray | mathjs.Matrix): mathjs.MathArray | mathjs.Matrix; + erf(x: number | mathjs.MathArray | mathjs.Matrix): number | mathjs.MathArray | mathjs.Matrix; + mad(array: mathjs.MathArray | mathjs.Matrix): any; max(...args: mathjs.MathType[]): any; max(A: mathjs.MathArray | mathjs.Matrix, dim?: number): any; mean(...args: mathjs.MathType[]): any; @@ -313,11 +376,13 @@ export declare const math: { mode(...args: mathjs.MathType[]): any; prod(...args: mathjs.MathType[]): any; quantileSeq(A: mathjs.MathArray | mathjs.Matrix, prob: number | mathjs.BigNumber | mathjs.MathArray, sorted?: boolean): number | mathjs.BigNumber | mathjs.Unit | mathjs.MathArray; - std(array: mathjs.MathArray | mathjs.Matrix, normalization?: string): number; + std(array: mathjs.MathArray | mathjs.Matrix, normalization?: "unbiased" | "uncorrected" | "biased" | "unbiased"): number; sum(...args: Array): any; sum(array: mathjs.MathArray | mathjs.Matrix): any; var(...args: Array): any; - var(array: mathjs.MathArray | mathjs.Matrix, normalization?: string): any; + var(array: mathjs.MathArray | mathjs.Matrix, normalization?: "unbiased" | "uncorrected" | "biased" | "unbiased"): any; + format(value: any, options?: mathjs.FormatOptions | number | ((item: any) => string), callback?: ((value: any) => string)): string; + print(template: string, values: any, precision?: number, options?: number | object): void; acos(x: number): number; acos(x: mathjs.BigNumber): mathjs.BigNumber; acos(x: mathjs.Complex): mathjs.Complex; @@ -371,6 +436,11 @@ export declare const math: { atanh(x: mathjs.BigNumber): mathjs.BigNumber; atanh(x: mathjs.MathArray): mathjs.MathArray; atanh(x: mathjs.Matrix): mathjs.Matrix; + cos(x: number | mathjs.Unit): number; + cos(x: mathjs.BigNumber): mathjs.BigNumber; + cos(x: mathjs.Complex): mathjs.Complex; + cos(x: mathjs.MathArray): mathjs.MathArray; + cos(x: mathjs.Matrix): mathjs.Matrix; cosh(x: number | mathjs.Unit): number; cosh(x: mathjs.BigNumber): mathjs.BigNumber; cosh(x: mathjs.Complex): mathjs.Complex; @@ -405,11 +475,6 @@ export declare const math: { sin(x: mathjs.Complex): mathjs.Complex; sin(x: mathjs.MathArray): mathjs.MathArray; sin(x: mathjs.Matrix): mathjs.Matrix; - cos(x: number | mathjs.Unit): number; - cos(x: mathjs.BigNumber): mathjs.BigNumber; - cos(x: mathjs.Complex): mathjs.Complex; - cos(x: mathjs.MathArray): mathjs.MathArray; - cos(x: mathjs.Matrix): mathjs.Matrix; sinh(x: number | mathjs.Unit): number; sinh(x: mathjs.BigNumber): mathjs.BigNumber; sinh(x: mathjs.Complex): mathjs.Complex; @@ -427,17 +492,13 @@ export declare const math: { tanh(x: mathjs.Matrix): mathjs.Matrix; to(x: mathjs.Unit | mathjs.MathArray | mathjs.Matrix, unit: mathjs.Unit | string): mathjs.Unit | mathjs.MathArray | mathjs.Matrix; clone(x: any): any; - filter(x: mathjs.MathArray | mathjs.Matrix, test: RegExp | ((item: any) => boolean)): mathjs.MathArray | mathjs.Matrix; - forEach: (x: mathjs.MathArray | mathjs.Matrix, callback: (item: any) => any) => void; - format(value: any, options?: mathjs.FormatOptions | number | ((item: any) => string)): string; - isInteger(x: any): boolean; - isNegative(x: any): boolean; - isNumeric(x: any): boolean; - isPositive(x: any): boolean; - isZero(x: any): boolean; - map(x: mathjs.MathArray | mathjs.Matrix, callback: (item: any) => any): mathjs.MathArray | mathjs.Matrix; - partitionSelect(x: mathjs.MathArray | mathjs.Matrix, k: number, compare?: string | ((a: any, b: any) => number)): any; - print: (template: string, values: any, precision?: number) => void; - sort(x: mathjs.MathArray | mathjs.Matrix, compare?: string | ((a: any, b: any) => number)): mathjs.MathArray | mathjs.Matrix; + isInteger(x: number | mathjs.BigNumber | mathjs.Fraction | mathjs.MathArray | mathjs.Matrix): boolean; + isNaN(x: number | mathjs.BigNumber | mathjs.Fraction | mathjs.MathArray | mathjs.Matrix | mathjs.Unit): boolean; + isNegative(x: number | mathjs.BigNumber | mathjs.Fraction | mathjs.MathArray | mathjs.Matrix | mathjs.Unit): boolean; + isNumeric(x: any): x is number | mathjs.BigNumber | mathjs.Fraction | boolean; + isPositive(x: number | mathjs.BigNumber | mathjs.Fraction | mathjs.MathArray | mathjs.Matrix | mathjs.Unit): boolean; + isPrime(x: number | mathjs.BigNumber | mathjs.MathArray | mathjs.Matrix): boolean; + isZero(x: number | mathjs.BigNumber | mathjs.Fraction | mathjs.MathArray | mathjs.Matrix | mathjs.Unit | mathjs.Complex): boolean; typeof(x: any): string; + import(object: mathjs.ImportObject | mathjs.ImportObject[], options: mathjs.ImportOptions): void; }; diff --git a/package-lock.json b/package-lock.json index fe4accab..773c6ee6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.0", "license": "Apache-2.0", "dependencies": { - "@types/mathjs": "^3.21.1", + "@types/mathjs": "^5.0.1", "crypto-js": "^4.2.0", "js-yaml": "^4.1.0", "json-schema": "^0.4.0", @@ -2864,9 +2864,9 @@ "dev": true }, "node_modules/@types/mathjs": { - "version": "3.21.1", - "resolved": "https://registry.npmjs.org/@types/mathjs/-/mathjs-3.21.1.tgz", - "integrity": "sha512-2q5o+7V6/aJqvaap6jmQPQddIwDh35KFx61SbKfoT8dkchL+AsqtQhrpxo99by0L4uXehZTl4gSyiJMjyA0kRg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@types/mathjs/-/mathjs-5.0.1.tgz", + "integrity": "sha512-EFBuueI+BRed9bnUO6/9my55b4FH+VQIvqMm58h9JGbtaGCkqr3YSDhnmVbM1SJjF//8SURERSypzNwejOk7lA==", "dependencies": { "decimal.js": "^10.0.0" } diff --git a/package.json b/package.json index 83174e79..e1bfe2f5 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "underscore": "^1.13.7", "underscore.string": "^3.3.6", "uuid": "8.3.2", - "@types/mathjs": "^3.21.1" + "@types/mathjs": "^5.0.1" }, "devDependencies": { "@babel/cli": "7.25.7", From 4b90f08e2e3207cf19085df38f04b0ac9b6da99c Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Mon, 21 Apr 2025 21:44:23 -0700 Subject: [PATCH 34/35] chore: correct import --- src/py/mat3ra/code/vector.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/py/mat3ra/code/vector.py b/src/py/mat3ra/code/vector.py index 265d5530..7afd30c4 100644 --- a/src/py/mat3ra/code/vector.py +++ b/src/py/mat3ra/code/vector.py @@ -1,7 +1,7 @@ from typing import List import numpy as np -from mat3ra.esse.models.core.abstract.point import Coordinate3DSchema as Vector3DSchema +from mat3ra.esse.models.core.abstract.point import PointSchema as Vector3DSchema from mat3ra.utils.mixins import RoundNumericValuesMixin from pydantic import model_serializer From f9e974a9fcd0a3bbc9cce596fe733988b7a13331 Mon Sep 17 00:00:00 2001 From: VsevolodX Date: Mon, 21 Apr 2025 22:27:11 -0700 Subject: [PATCH 35/35] chore: esse --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e1bfe2f5..54b610ac 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "@babel/register": "^7.25.7", "@babel/runtime-corejs3": "7.25.7", "@exabyte-io/eslint-config": "2025.1.15-0", - "@mat3ra/esse": "git+https://git@github.com/Exabyte-io/esse.git#dae2d3682c4cade747762ae12bc28896513ec555", + "@mat3ra/esse": "2025.4.22-0", "@mat3ra/tsconfig": "2024.6.3-0", "@types/chai": "^4.3.20", "@types/crypto-js": "^4.2.2",