@unieai/cosmokit 1.8.2 → 1.8.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,24 +1,8 @@
1
- # cosmokit
1
+ # @unieai/cosmokit
2
2
 
3
- [![Codecov](https://img.shields.io/codecov/c/github/shigma/cosmokit?style=flat-square)](https://codecov.io/gh/shigma/cosmokit)
4
- [![npm](https://img.shields.io/npm/v/cosmokit?style=flat-square)](https://www.npmjs.com/package/cosmokit)
3
+ A collection of common utilities
5
4
 
6
- A collection of common utilities.
5
+ Part of Rabi, the agent harness UnieAI Code runs on. Installed as a dependency of `@unieai/rabi`;
6
+ not meant to be used on its own.
7
7
 
8
- ## Usage
9
-
10
- ### Node.js
11
-
12
- ```sh
13
- npm install cosmokit
14
- ```
15
-
16
- ```ts
17
- import cosmokit from 'cosmokit'
18
- ```
19
-
20
- ### Deno
21
-
22
- ```ts
23
- import cosmokit from 'npm:cosmokit@latest'
24
- ```
8
+ See LICENSE for the license and copyright of this package.
package/lib/index.js CHANGED
@@ -78,6 +78,78 @@ function makeArray(source) {
78
78
  return Array.isArray(source) ? source : isNullable(source) ? [] : [source];
79
79
  }
80
80
  //#endregion
81
+ //#region lib/types/volatile.js
82
+ /** Shared config references used by schema validators and plugin runtimes. */
83
+ const write = Symbol.for("cosmokit.volatile.write");
84
+ function snapshot(value, ancestors = /* @__PURE__ */ new Set()) {
85
+ if (typeof value === "function") throw new TypeError("volatile config cannot contain functions");
86
+ if (value === null || typeof value !== "object") return value;
87
+ if (ancestors.has(value)) throw new TypeError("volatile config cannot contain cycles");
88
+ ancestors.add(value);
89
+ try {
90
+ if (Array.isArray(value)) return Object.freeze(value.map((item) => snapshot(item, ancestors)));
91
+ if (Object.getPrototypeOf(value) !== Object.prototype && Object.getPrototypeOf(value) !== null) throw new TypeError("volatile config objects must be plain objects or arrays");
92
+ return Object.freeze(Object.fromEntries(Object.entries(value).map(([key, item]) => [key, snapshot(item, ancestors)])));
93
+ } finally {
94
+ ancestors.delete(value);
95
+ }
96
+ }
97
+ /**
98
+ * Create a detached reference containing an immutable copy of the supplied data.
99
+ * @param value - validated config data; class instances and functions are unsupported.
100
+ * @returns a reference whose value is updated only by its owning runtime.
101
+ */
102
+ function createVolatile(value) {
103
+ let current = snapshot(value);
104
+ return Object.freeze({
105
+ get: () => current,
106
+ [write]: (value) => {
107
+ current = value;
108
+ }
109
+ });
110
+ }
111
+ /**
112
+ * Identify references across ESM/CJS copies of the shared library.
113
+ * @param value - a parsed config value.
114
+ * @returns whether the value implements the shared reference protocol.
115
+ */
116
+ function isVolatile(value) {
117
+ return typeof value === "object" && value !== null && write in value;
118
+ }
119
+ /**
120
+ * Collect config references without descending into their snapshots or opaque objects.
121
+ * @internal
122
+ * @param value - parsed config; cyclic ordinary fields are visited once per path.
123
+ * @returns references and their object-key paths, including an empty path for a root reference.
124
+ */
125
+ function volatileEntries(value) {
126
+ const ancestors = /* @__PURE__ */ new Set();
127
+ function visit(value, path) {
128
+ if (isVolatile(value)) return [{
129
+ path,
130
+ ref: value
131
+ }];
132
+ if (!value || typeof value !== "object" || ancestors.has(value)) return [];
133
+ if (!Array.isArray(value) && Object.getPrototypeOf(value) !== Object.prototype && Object.getPrototypeOf(value) !== null) return [];
134
+ ancestors.add(value);
135
+ try {
136
+ return Object.entries(value).flatMap(([key, child]) => visit(child, [...path, key]));
137
+ } finally {
138
+ ancestors.delete(value);
139
+ }
140
+ }
141
+ return visit(value, []);
142
+ }
143
+ /**
144
+ * Commit an already validated immutable snapshot from another reference.
145
+ * @internal
146
+ * @param target - the owning plugin's stable reference.
147
+ * @param source - a newly parsed candidate reference.
148
+ */
149
+ function updateVolatile(target, source) {
150
+ target[write](source.get());
151
+ }
152
+ //#endregion
81
153
  //#region lib/types/types.js
82
154
  /** Test values using `instanceof` with a `toStringTag` fallback. */
83
155
  function is(type, value) {
@@ -163,26 +235,47 @@ function clone(source, refs = /* @__PURE__ */ new Map()) {
163
235
  }
164
236
  return result;
165
237
  }
166
- /** Deeply compare arrays, dates, regexps, buffers, and plain object fields. */
238
+ /**
239
+ * Compare values recursively, treating two volatile references as equal regardless of value.
240
+ * Strict comparison distinguishes null/undefined, treats opaque objects by identity,
241
+ * compares URLs by normalized href, treats array holes as undefined, and considers distinct cyclic structures unequal.
242
+ * @param a - first value.
243
+ * @param b - second value.
244
+ * @param strict - whether to require strict data equality outside volatile references.
245
+ * @returns whether the values compare equal.
246
+ */
167
247
  function deepEqual(a, b, strict) {
168
- if (a === b) return true;
169
- if (!strict && isNullable(a) && isNullable(b)) return true;
170
- if (typeof a !== typeof b) return false;
171
- if (typeof a !== "object") return false;
172
- if (!a || !b) return false;
173
- function check(test, then) {
174
- return test(a) ? test(b) ? then(a, b) : false : test(b) ? false : void 0;
248
+ const ancestors = /* @__PURE__ */ new Set();
249
+ function compare(a, b) {
250
+ if (a === b) return true;
251
+ if (isVolatile(a) || isVolatile(b)) return isVolatile(a) && isVolatile(b);
252
+ if (!strict && isNullable(a) && isNullable(b)) return true;
253
+ if (typeof a !== typeof b || typeof a !== "object" || !a || !b) return false;
254
+ if (ancestors.has(a)) return false;
255
+ function check(test, then) {
256
+ return test(a) ? test(b) ? then(a, b) : false : test(b) ? false : void 0;
257
+ }
258
+ ancestors.add(a);
259
+ try {
260
+ return check(Array.isArray, (a, b) => {
261
+ if (a.length !== b.length) return false;
262
+ for (let index = 0; index < a.length; index++) if (!compare(a[index], b[index])) return false;
263
+ return true;
264
+ }) ?? check(is("Date"), (a, b) => a.valueOf() === b.valueOf()) ?? check(is("URL"), (a, b) => a.href === b.href) ?? check(is("RegExp"), (a, b) => a.source === b.source && a.flags === b.flags) ?? check(isArrayBufferLike, (a, b) => {
265
+ if (a.byteLength !== b.byteLength) return false;
266
+ const viewA = new Uint8Array(a);
267
+ const viewB = new Uint8Array(b);
268
+ for (let i = 0; i < viewA.length; i++) if (viewA[i] !== viewB[i]) return false;
269
+ return true;
270
+ }) ?? ((!strict || [a, b].every((value) => Object.getPrototypeOf(value) === Object.prototype || Object.getPrototypeOf(value) === null)) && Object.keys({
271
+ ...a,
272
+ ...b
273
+ }).every((key) => compare(a[key], b[key])));
274
+ } finally {
275
+ ancestors.delete(a);
276
+ }
175
277
  }
176
- return check(Array.isArray, (a, b) => a.length === b.length && a.every((item, index) => deepEqual(item, b[index]))) ?? check(is("Date"), (a, b) => a.valueOf() === b.valueOf()) ?? check(is("RegExp"), (a, b) => a.source === b.source && a.flags === b.flags) ?? check(isArrayBufferLike, (a, b) => {
177
- if (a.byteLength !== b.byteLength) return false;
178
- const viewA = new Uint8Array(a);
179
- const viewB = new Uint8Array(b);
180
- for (let i = 0; i < viewA.length; i++) if (viewA[i] !== viewB[i]) return false;
181
- return true;
182
- }) ?? Object.keys({
183
- ...a,
184
- ...b
185
- }).every((key) => deepEqual(a[key], b[key], strict));
278
+ return compare(a, b);
186
279
  }
187
280
  //#endregion
188
281
  //#region lib/types/string.js
@@ -322,4 +415,4 @@ var Time;
322
415
  Time.template = template;
323
416
  })(Time || (Time = {}));
324
417
  //#endregion
325
- export { Binary, Time, arrayBufferToBase64, arrayBufferToHex, base64ToArrayBuffer, camelCase, camelize, capitalize, clone, contain, deduplicate, deepEqual, defineProperty, difference, filterKeys, formatProperty, hexToArrayBuffer, hyphenate, intersection, is, isNonNullable, isNullable, isPlainObject, makeArray, mapValues, mapValues as valueMap, noop, omit, paramCase, pick, remove, sanitize, snakeCase, trimSlash, uncapitalize, union };
418
+ export { Binary, Time, arrayBufferToBase64, arrayBufferToHex, base64ToArrayBuffer, camelCase, camelize, capitalize, clone, contain, createVolatile, deduplicate, deepEqual, defineProperty, difference, filterKeys, formatProperty, hexToArrayBuffer, hyphenate, intersection, is, isNonNullable, isNullable, isPlainObject, isVolatile, makeArray, mapValues, mapValues as valueMap, noop, omit, paramCase, pick, remove, sanitize, snakeCase, trimSlash, uncapitalize, union, updateVolatile, volatileEntries };
@@ -8,4 +8,6 @@ export * from './misc.ts';
8
8
  export * from './string.ts';
9
9
  /** Time constants, parsing, and formatting helpers. */
10
10
  export * from './time.ts';
11
+ /** Immutable config references shared by schema validators and runtimes. */
12
+ export * from './volatile.ts';
11
13
  //# sourceMappingURL=index.d.ts.map
@@ -28,7 +28,15 @@ export declare const hexToArrayBuffer: typeof Binary.fromHex;
28
28
  export declare const arrayBufferToHex: typeof Binary.toHex;
29
29
  /** Deep-clone common JavaScript values while preserving prototypes. */
30
30
  export declare function clone<T>(source: T): T;
31
- /** Deeply compare arrays, dates, regexps, buffers, and plain object fields. */
31
+ /**
32
+ * Compare values recursively, treating two volatile references as equal regardless of value.
33
+ * Strict comparison distinguishes null/undefined, treats opaque objects by identity,
34
+ * compares URLs by normalized href, treats array holes as undefined, and considers distinct cyclic structures unequal.
35
+ * @param a - first value.
36
+ * @param b - second value.
37
+ * @param strict - whether to require strict data equality outside volatile references.
38
+ * @returns whether the values compare equal.
39
+ */
32
40
  export declare function deepEqual(a: any, b: any, strict?: boolean): boolean;
33
41
  export {};
34
42
  //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,40 @@
1
+ /** Shared config references used by schema validators and plugin runtimes. */
2
+ /** Recursively readonly data returned by a volatile config reference. */
3
+ export type VolatileSnapshot<T> = T extends object ? {
4
+ readonly [K in keyof T]: VolatileSnapshot<T[K]>;
5
+ } : T;
6
+ /** A stable reference; keep the reference, or capture its value for one operation only. */
7
+ export interface Volatile<T> {
8
+ /** @returns the current immutable snapshot, including undefined for an absent value. */
9
+ get(): VolatileSnapshot<T>;
10
+ }
11
+ /**
12
+ * Create a detached reference containing an immutable copy of the supplied data.
13
+ * @param value - validated config data; class instances and functions are unsupported.
14
+ * @returns a reference whose value is updated only by its owning runtime.
15
+ */
16
+ export declare function createVolatile<T>(value: T): Volatile<T>;
17
+ /**
18
+ * Identify references across ESM/CJS copies of the shared library.
19
+ * @param value - a parsed config value.
20
+ * @returns whether the value implements the shared reference protocol.
21
+ */
22
+ export declare function isVolatile(value: unknown): value is Volatile<unknown>;
23
+ /**
24
+ * Collect config references without descending into their snapshots or opaque objects.
25
+ * @internal
26
+ * @param value - parsed config; cyclic ordinary fields are visited once per path.
27
+ * @returns references and their object-key paths, including an empty path for a root reference.
28
+ */
29
+ export declare function volatileEntries(value: unknown): {
30
+ path: string[];
31
+ ref: Volatile<unknown>;
32
+ }[];
33
+ /**
34
+ * Commit an already validated immutable snapshot from another reference.
35
+ * @internal
36
+ * @param target - the owning plugin's stable reference.
37
+ * @param source - a newly parsed candidate reference.
38
+ */
39
+ export declare function updateVolatile(target: Volatile<unknown>, source: Volatile<unknown>): void;
40
+ //# sourceMappingURL=volatile.d.ts.map
package/package.json CHANGED
@@ -1,15 +1,10 @@
1
1
  {
2
2
  "name": "@unieai/cosmokit",
3
3
  "description": "A collection of common utilities",
4
- "version": "1.8.2",
4
+ "version": "1.8.6",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
- "repository": {
9
- "type": "git",
10
- "url": "git+https://github.com/UnieAI/UnieAI-Agent-Desktop.git",
11
- "directory": "vendor/cosmokit"
12
- },
13
8
  "type": "module",
14
9
  "main": "lib/index.js",
15
10
  "types": "lib/types/index.d.ts",
@@ -25,8 +20,9 @@
25
20
  "lib/index.js",
26
21
  "lib/types/**/*.d.ts",
27
22
  "lib/types/**/*.d.ts.map",
28
- "src"
23
+ "src",
24
+ "README.md"
29
25
  ],
30
26
  "author": "Shigma <shigma10826@gmail.com>",
31
27
  "license": "MIT"
32
- }
28
+ }
package/src/index.ts CHANGED
@@ -8,3 +8,5 @@ export * from './misc.ts'
8
8
  export * from './string.ts'
9
9
  /** Time constants, parsing, and formatting helpers. */
10
10
  export * from './time.ts'
11
+ /** Immutable config references shared by schema validators and runtimes. */
12
+ export * from './volatile.ts'
package/src/types.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { isNullable } from './misc.ts'
2
+ import { isVolatile } from './volatile.ts'
2
3
 
3
4
  type GlobalConstructorNames = keyof {
4
5
  [K in keyof typeof globalThis as typeof globalThis[K] extends abstract new (...args: any) => any ? K : never]: K
@@ -114,29 +115,54 @@ export function clone(source: any, refs = new Map<any, any>()) {
114
115
  return result
115
116
  }
116
117
 
117
- /** Deeply compare arrays, dates, regexps, buffers, and plain object fields. */
118
+ /**
119
+ * Compare values recursively, treating two volatile references as equal regardless of value.
120
+ * Strict comparison distinguishes null/undefined, treats opaque objects by identity,
121
+ * compares URLs by normalized href, treats array holes as undefined, and considers distinct cyclic structures unequal.
122
+ * @param a - first value.
123
+ * @param b - second value.
124
+ * @param strict - whether to require strict data equality outside volatile references.
125
+ * @returns whether the values compare equal.
126
+ */
118
127
  export function deepEqual(a: any, b: any, strict?: boolean): boolean {
119
- if (a === b) return true
120
- if (!strict && isNullable(a) && isNullable(b)) return true
121
- if (typeof a !== typeof b) return false
122
- if (typeof a !== 'object') return false
123
- if (!a || !b) return false
124
-
125
- function check<T>(test: (x: any) => x is T, then: (a: T, b: T) => boolean) {
126
- return test(a) ? test(b) ? then(a, b) : false : test(b) ? false : undefined
127
- }
128
+ const ancestors = new Set<object>()
129
+ function compare(a: any, b: any): boolean {
130
+ if (a === b) return true
131
+ if (isVolatile(a) || isVolatile(b)) return isVolatile(a) && isVolatile(b)
132
+ if (!strict && isNullable(a) && isNullable(b)) return true
133
+ if (typeof a !== typeof b || typeof a !== 'object' || !a || !b) return false
134
+ if (ancestors.has(a)) return false
135
+
136
+ function check<T>(test: (x: any) => x is T, then: (a: T, b: T) => boolean) {
137
+ return test(a) ? test(b) ? then(a, b) : false : test(b) ? false : undefined
138
+ }
128
139
 
129
- return check(Array.isArray, (a, b) => a.length === b.length && a.every((item, index) => deepEqual(item, b[index])))
130
- ?? check(is('Date'), (a, b) => a.valueOf() === b.valueOf())
131
- ?? check(is('RegExp'), (a, b) => a.source === b.source && a.flags === b.flags)
132
- ?? check(isArrayBufferLike, (a, b) => {
133
- if (a.byteLength !== b.byteLength) return false
134
- const viewA = new Uint8Array(a)
135
- const viewB = new Uint8Array(b)
136
- for (let i = 0; i < viewA.length; i++) {
137
- if (viewA[i] !== viewB[i]) return false
138
- }
139
- return true
140
- })
141
- ?? Object.keys({ ...a, ...b }).every(key => deepEqual(a[key], b[key], strict))
140
+ ancestors.add(a)
141
+ try {
142
+ return check(Array.isArray, (a, b) => {
143
+ if (a.length !== b.length) return false
144
+ for (let index = 0; index < a.length; index++) {
145
+ if (!compare(a[index], b[index])) return false
146
+ }
147
+ return true
148
+ })
149
+ ?? check(is('Date'), (a, b) => a.valueOf() === b.valueOf())
150
+ ?? check(is('URL'), (a, b) => a.href === b.href)
151
+ ?? check(is('RegExp'), (a, b) => a.source === b.source && a.flags === b.flags)
152
+ ?? check(isArrayBufferLike, (a, b) => {
153
+ if (a.byteLength !== b.byteLength) return false
154
+ const viewA = new Uint8Array(a)
155
+ const viewB = new Uint8Array(b)
156
+ for (let i = 0; i < viewA.length; i++) {
157
+ if (viewA[i] !== viewB[i]) return false
158
+ }
159
+ return true
160
+ })
161
+ ?? ((!strict || [a, b].every(value => Object.getPrototypeOf(value) === Object.prototype || Object.getPrototypeOf(value) === null))
162
+ && Object.keys({ ...a, ...b }).every(key => compare(a[key], b[key])))
163
+ } finally {
164
+ ancestors.delete(a)
165
+ }
166
+ }
167
+ return compare(a, b)
142
168
  }
@@ -0,0 +1,86 @@
1
+ /** Shared config references used by schema validators and plugin runtimes. */
2
+
3
+ const write = Symbol.for('cosmokit.volatile.write')
4
+
5
+ /** Recursively readonly data returned by a volatile config reference. */
6
+ export type VolatileSnapshot<T> = T extends object ? { readonly [K in keyof T]: VolatileSnapshot<T[K]> } : T
7
+
8
+ /** A stable reference; keep the reference, or capture its value for one operation only. */
9
+ export interface Volatile<T> {
10
+ /** @returns the current immutable snapshot, including undefined for an absent value. */
11
+ get(): VolatileSnapshot<T>
12
+ }
13
+
14
+ interface WritableVolatile extends Volatile<unknown> {
15
+ [write](value: unknown): void
16
+ }
17
+
18
+ function snapshot(value: unknown, ancestors = new Set<object>()): unknown {
19
+ if (typeof value === 'function') throw new TypeError('volatile config cannot contain functions')
20
+ if (value === null || typeof value !== 'object') return value
21
+ if (ancestors.has(value)) throw new TypeError('volatile config cannot contain cycles')
22
+ ancestors.add(value)
23
+ try {
24
+ if (Array.isArray(value)) return Object.freeze(value.map(item => snapshot(item, ancestors)))
25
+ if (Object.getPrototypeOf(value) !== Object.prototype && Object.getPrototypeOf(value) !== null) {
26
+ throw new TypeError('volatile config objects must be plain objects or arrays')
27
+ }
28
+ return Object.freeze(Object.fromEntries(Object.entries(value).map(([key, item]) => [key, snapshot(item, ancestors)])))
29
+ } finally {
30
+ ancestors.delete(value)
31
+ }
32
+ }
33
+
34
+ /**
35
+ * Create a detached reference containing an immutable copy of the supplied data.
36
+ * @param value - validated config data; class instances and functions are unsupported.
37
+ * @returns a reference whose value is updated only by its owning runtime.
38
+ */
39
+ export function createVolatile<T>(value: T): Volatile<T> {
40
+ let current = snapshot(value)
41
+ return Object.freeze({
42
+ get: () => current,
43
+ [write]: (value: unknown) => { current = value },
44
+ }) as Volatile<T>
45
+ }
46
+
47
+ /**
48
+ * Identify references across ESM/CJS copies of the shared library.
49
+ * @param value - a parsed config value.
50
+ * @returns whether the value implements the shared reference protocol.
51
+ */
52
+ export function isVolatile(value: unknown): value is Volatile<unknown> {
53
+ return typeof value === 'object' && value !== null && write in value
54
+ }
55
+
56
+ /**
57
+ * Collect config references without descending into their snapshots or opaque objects.
58
+ * @internal
59
+ * @param value - parsed config; cyclic ordinary fields are visited once per path.
60
+ * @returns references and their object-key paths, including an empty path for a root reference.
61
+ */
62
+ export function volatileEntries(value: unknown): { path: string[]; ref: Volatile<unknown> }[] {
63
+ const ancestors = new Set<object>()
64
+ function visit(value: unknown, path: string[]): { path: string[]; ref: Volatile<unknown> }[] {
65
+ if (isVolatile(value)) return [{ path, ref: value }]
66
+ if (!value || typeof value !== 'object' || ancestors.has(value)) return []
67
+ if (!Array.isArray(value) && Object.getPrototypeOf(value) !== Object.prototype && Object.getPrototypeOf(value) !== null) return []
68
+ ancestors.add(value)
69
+ try {
70
+ return Object.entries(value).flatMap(([key, child]) => visit(child, [...path, key]))
71
+ } finally {
72
+ ancestors.delete(value)
73
+ }
74
+ }
75
+ return visit(value, [])
76
+ }
77
+
78
+ /**
79
+ * Commit an already validated immutable snapshot from another reference.
80
+ * @internal
81
+ * @param target - the owning plugin's stable reference.
82
+ * @param source - a newly parsed candidate reference.
83
+ */
84
+ export function updateVolatile(target: Volatile<unknown>, source: Volatile<unknown>): void {
85
+ ;(target as WritableVolatile)[write](source.get())
86
+ }
@@ -1 +0,0 @@
1
- {"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../src/array.ts"],"names":[],"mappings":"AAEA,sEAAsE;AACtE,wBAAgB,OAAO,CAAC,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,MAAM,EAAE,SAAS,GAAG,EAAE,WAErE;AAED,+CAA+C;AAC/C,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,OAEzE;AAED,iEAAiE;AACjE,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,GAAG,EAAE,OAEzE;AAED,kFAAkF;AAClF,wBAAgB,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,OAElE;AAED,uEAAuE;AACvE,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,OAEjD;AAED,qEAAqE;AACrE,wBAAgB,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,WAQ3C;AAED,6DAA6D;AAC7D,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,GAAG,SAAS,GAAG,CAAC,GAAG,CAAC,EAAE,OAE9D"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,cAAc,YAAY,CAAA;AAC1B,yDAAyD;AACzD,cAAc,YAAY,CAAA;AAC1B,+CAA+C;AAC/C,cAAc,WAAW,CAAA;AACzB,0DAA0D;AAC1D,cAAc,aAAa,CAAA;AAC3B,uDAAuD;AACvD,cAAc,WAAW,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"misc.d.ts","sourceRoot":"","sources":["../../src/misc.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,MAAM,MAAM,IAAI,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,IAAI;KAAG,GAAG,IAAI,CAAC,GAAG,CAAC;CAAE,CAAA;AACjF,0EAA0E;AAC1E,MAAM,MAAM,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAA;AACnE,qEAAqE;AACrE,MAAM,MAAM,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AAC1D,6EAA6E;AAC7E,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAA;AACjE,oFAAoF;AACpF,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAA;AACtE,+EAA+E;AAC/E,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,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