@fuzdev/fuz_util 0.42.0
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/LICENSE +21 -0
- package/README.md +83 -0
- package/dist/array.d.ts +15 -0
- package/dist/array.d.ts.map +1 -0
- package/dist/array.js +25 -0
- package/dist/async.d.ts +62 -0
- package/dist/async.d.ts.map +1 -0
- package/dist/async.js +147 -0
- package/dist/colors.d.ts +41 -0
- package/dist/colors.d.ts.map +1 -0
- package/dist/colors.js +106 -0
- package/dist/counter.d.ts +7 -0
- package/dist/counter.d.ts.map +1 -0
- package/dist/counter.js +7 -0
- package/dist/deep_equal.d.ts +18 -0
- package/dist/deep_equal.d.ts.map +1 -0
- package/dist/deep_equal.js +152 -0
- package/dist/dom.d.ts +35 -0
- package/dist/dom.d.ts.map +1 -0
- package/dist/dom.js +95 -0
- package/dist/error.d.ts +15 -0
- package/dist/error.d.ts.map +1 -0
- package/dist/error.js +18 -0
- package/dist/fetch.d.ts +81 -0
- package/dist/fetch.d.ts.map +1 -0
- package/dist/fetch.js +162 -0
- package/dist/fs.d.ts +34 -0
- package/dist/fs.d.ts.map +1 -0
- package/dist/fs.js +73 -0
- package/dist/function.d.ts +27 -0
- package/dist/function.d.ts.map +1 -0
- package/dist/function.js +21 -0
- package/dist/git.d.ts +132 -0
- package/dist/git.d.ts.map +1 -0
- package/dist/git.js +288 -0
- package/dist/id.d.ts +18 -0
- package/dist/id.d.ts.map +1 -0
- package/dist/id.js +18 -0
- package/dist/iterator.d.ts +5 -0
- package/dist/iterator.d.ts.map +1 -0
- package/dist/iterator.js +9 -0
- package/dist/json.d.ts +30 -0
- package/dist/json.d.ts.map +1 -0
- package/dist/json.js +44 -0
- package/dist/library_json.d.ts +42 -0
- package/dist/library_json.d.ts.map +1 -0
- package/dist/library_json.js +76 -0
- package/dist/log.d.ts +188 -0
- package/dist/log.d.ts.map +1 -0
- package/dist/log.js +393 -0
- package/dist/map.d.ts +12 -0
- package/dist/map.d.ts.map +1 -0
- package/dist/map.js +14 -0
- package/dist/maths.d.ts +85 -0
- package/dist/maths.d.ts.map +1 -0
- package/dist/maths.js +87 -0
- package/dist/object.d.ts +46 -0
- package/dist/object.d.ts.map +1 -0
- package/dist/object.js +89 -0
- package/dist/package_json.d.ts +90 -0
- package/dist/package_json.d.ts.map +1 -0
- package/dist/package_json.js +112 -0
- package/dist/path.d.ts +63 -0
- package/dist/path.d.ts.map +1 -0
- package/dist/path.js +83 -0
- package/dist/print.d.ts +52 -0
- package/dist/print.d.ts.map +1 -0
- package/dist/print.js +89 -0
- package/dist/process.d.ts +77 -0
- package/dist/process.d.ts.map +1 -0
- package/dist/process.js +148 -0
- package/dist/random.d.ts +25 -0
- package/dist/random.d.ts.map +1 -0
- package/dist/random.js +35 -0
- package/dist/random_alea.d.ts +23 -0
- package/dist/random_alea.d.ts.map +1 -0
- package/dist/random_alea.js +95 -0
- package/dist/regexp.d.ts +12 -0
- package/dist/regexp.d.ts.map +1 -0
- package/dist/regexp.js +16 -0
- package/dist/result.d.ts +64 -0
- package/dist/result.d.ts.map +1 -0
- package/dist/result.js +48 -0
- package/dist/source_json.d.ts +375 -0
- package/dist/source_json.d.ts.map +1 -0
- package/dist/source_json.js +189 -0
- package/dist/string.d.ts +51 -0
- package/dist/string.d.ts.map +1 -0
- package/dist/string.js +92 -0
- package/dist/throttle.d.ts +26 -0
- package/dist/throttle.d.ts.map +1 -0
- package/dist/throttle.js +53 -0
- package/dist/timings.d.ts +33 -0
- package/dist/timings.d.ts.map +1 -0
- package/dist/timings.js +75 -0
- package/dist/types.d.ts +77 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +10 -0
- package/dist/url.d.ts +10 -0
- package/dist/url.d.ts.map +1 -0
- package/dist/url.js +8 -0
- package/package.json +125 -0
- package/src/lib/array.ts +30 -0
- package/src/lib/async.ts +182 -0
- package/src/lib/colors.ts +132 -0
- package/src/lib/counter.ts +11 -0
- package/src/lib/deep_equal.ts +155 -0
- package/src/lib/dom.ts +108 -0
- package/src/lib/error.ts +22 -0
- package/src/lib/fetch.ts +231 -0
- package/src/lib/fs.ts +128 -0
- package/src/lib/function.ts +32 -0
- package/src/lib/git.ts +390 -0
- package/src/lib/id.ts +30 -0
- package/src/lib/iterator.ts +8 -0
- package/src/lib/json.ts +61 -0
- package/src/lib/library_json.ts +122 -0
- package/src/lib/log.ts +469 -0
- package/src/lib/map.ts +18 -0
- package/src/lib/maths.ts +91 -0
- package/src/lib/object.ts +110 -0
- package/src/lib/package_json.ts +135 -0
- package/src/lib/path.ts +137 -0
- package/src/lib/print.ts +111 -0
- package/src/lib/process.ts +207 -0
- package/src/lib/random.ts +48 -0
- package/src/lib/random_alea.ts +107 -0
- package/src/lib/regexp.ts +17 -0
- package/src/lib/result.ts +67 -0
- package/src/lib/source_json.ts +209 -0
- package/src/lib/string.ts +99 -0
- package/src/lib/throttle.ts +70 -0
- package/src/lib/timings.ts +93 -0
- package/src/lib/types.ts +99 -0
- package/src/lib/url.ts +14 -0
package/dist/log.js
ADDED
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
import { styleText } from 'node:util';
|
|
2
|
+
import { DEV } from 'esm-env';
|
|
3
|
+
const CHAR_ERROR = '🞩';
|
|
4
|
+
const CHAR_WARN = '⚑';
|
|
5
|
+
// Info logs have no character prefix - they only show the label.
|
|
6
|
+
// This is by design: info is the "default" log level for standard output,
|
|
7
|
+
// so it gets minimal visual noise. Error, warn, and debug have distinctive
|
|
8
|
+
// prefixes to make them stand out from normal info logs.
|
|
9
|
+
const CHAR_DEBUG = '┆';
|
|
10
|
+
// Pre-computed method prefix strings
|
|
11
|
+
const PREFIX_ERROR = `${CHAR_ERROR}error${CHAR_ERROR}`;
|
|
12
|
+
const PREFIX_WARN = `${CHAR_WARN}warn${CHAR_WARN}`;
|
|
13
|
+
// Info has no prefix - see CHAR_DEBUG comment above
|
|
14
|
+
const PREFIX_DEBUG = `${CHAR_DEBUG}debug${CHAR_DEBUG}`;
|
|
15
|
+
const LOG_LEVEL_VALUES = {
|
|
16
|
+
off: 0,
|
|
17
|
+
error: 1,
|
|
18
|
+
warn: 2,
|
|
19
|
+
info: 3,
|
|
20
|
+
debug: 4,
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Converts a log level to its numeric value for comparison.
|
|
24
|
+
* Higher numbers indicate more verbose logging.
|
|
25
|
+
* @param level The log level to convert
|
|
26
|
+
* @returns Numeric value (0-4)
|
|
27
|
+
*/
|
|
28
|
+
export const log_level_to_number = (level) => LOG_LEVEL_VALUES[level];
|
|
29
|
+
/**
|
|
30
|
+
* Parses and validates a log level string.
|
|
31
|
+
* @param value The value to parse as a log level
|
|
32
|
+
* @returns The validated log level, or undefined if value is undefined
|
|
33
|
+
* @throws Error if value is provided but invalid
|
|
34
|
+
*/
|
|
35
|
+
export const log_level_parse = (value) => {
|
|
36
|
+
if (!value)
|
|
37
|
+
return undefined;
|
|
38
|
+
if (value in LOG_LEVEL_VALUES)
|
|
39
|
+
return value;
|
|
40
|
+
throw new Error(`Invalid log level: '${value}'`);
|
|
41
|
+
};
|
|
42
|
+
const DEFAULT_LOG_LEVEL = (typeof process === 'undefined' ? undefined : log_level_parse(process.env.PUBLIC_LOG_LEVEL)) ??
|
|
43
|
+
(process.env.VITEST ? 'off' : DEV ? 'debug' : 'info');
|
|
44
|
+
// Identity function for when colors are disabled
|
|
45
|
+
const NO_COLOR_ST = (_, s) => s;
|
|
46
|
+
/**
|
|
47
|
+
* Simple, flexible logger with support for child loggers and automatic context.
|
|
48
|
+
*
|
|
49
|
+
* Features:
|
|
50
|
+
* - Instance-based configuration (no global state)
|
|
51
|
+
* - Child loggers with automatic label concatenation
|
|
52
|
+
* - Parent chain inheritance for level, console, and colors
|
|
53
|
+
* - Respects NO_COLOR environment variable
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* // Basic logger
|
|
58
|
+
* const log = new Logger('app');
|
|
59
|
+
* log.info('starting'); // [app] ➤ starting
|
|
60
|
+
*
|
|
61
|
+
* // Child logger
|
|
62
|
+
* const db_log = log.child('db');
|
|
63
|
+
* db_log.info('connected'); // [app:db] ➤ connected
|
|
64
|
+
*
|
|
65
|
+
* // Custom configuration
|
|
66
|
+
* const verbose_log = new Logger('debug', { level: 'debug', colors: true });
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
export class Logger {
|
|
70
|
+
label;
|
|
71
|
+
parent;
|
|
72
|
+
// Private override fields (undefined = inherit from parent)
|
|
73
|
+
#level_override;
|
|
74
|
+
#colors_override;
|
|
75
|
+
#console_override;
|
|
76
|
+
// Lazy cache for formatted prefixes (individually cached and invalidated when colors change)
|
|
77
|
+
#cached_colors;
|
|
78
|
+
#cached_st;
|
|
79
|
+
#cached_error;
|
|
80
|
+
#cached_warn;
|
|
81
|
+
#cached_info;
|
|
82
|
+
#cached_debug;
|
|
83
|
+
#cached_level_string;
|
|
84
|
+
#cached_level;
|
|
85
|
+
/**
|
|
86
|
+
* Creates a new Logger instance.
|
|
87
|
+
*
|
|
88
|
+
* @param label Optional label for this logger. Can be `undefined` for no label, or an
|
|
89
|
+
* empty string `''` which is functionally equivalent (both produce no brackets in output).
|
|
90
|
+
* Note: Empty strings are only allowed for root loggers - child loggers cannot have empty labels.
|
|
91
|
+
* @param options Optional configuration for level, colors, and console
|
|
92
|
+
*/
|
|
93
|
+
constructor(label, options = {}) {
|
|
94
|
+
this.label = label;
|
|
95
|
+
this.parent = options.parent;
|
|
96
|
+
// Set overrides if provided (undefined = inherit from parent)
|
|
97
|
+
if (options.level !== undefined) {
|
|
98
|
+
log_level_parse(options.level); // throws if invalid
|
|
99
|
+
this.#level_override = options.level;
|
|
100
|
+
}
|
|
101
|
+
if (options.colors !== undefined) {
|
|
102
|
+
this.#colors_override = options.colors;
|
|
103
|
+
}
|
|
104
|
+
if (options.console !== undefined) {
|
|
105
|
+
this.#console_override = options.console;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Dynamic getter for level - checks override, then parent, then default.
|
|
110
|
+
*/
|
|
111
|
+
get level() {
|
|
112
|
+
if (this.#level_override !== undefined) {
|
|
113
|
+
return this.#level_override;
|
|
114
|
+
}
|
|
115
|
+
if (this.parent) {
|
|
116
|
+
return this.parent.level;
|
|
117
|
+
}
|
|
118
|
+
return DEFAULT_LOG_LEVEL;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Setter for level - creates override.
|
|
122
|
+
*/
|
|
123
|
+
set level(value) {
|
|
124
|
+
log_level_parse(value); // throws if invalid
|
|
125
|
+
this.#level_override = value;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Dynamic getter for colors - checks override, then parent, then environment variables.
|
|
129
|
+
*
|
|
130
|
+
* Colors are disabled if either the `NO_COLOR` or `CLAUDECODE` environment variable is set.
|
|
131
|
+
* The `CLAUDECODE` check disables colors in Claude Code environments where ANSI color codes
|
|
132
|
+
* may not render correctly in the output.
|
|
133
|
+
*/
|
|
134
|
+
get colors() {
|
|
135
|
+
if (this.#colors_override !== undefined) {
|
|
136
|
+
return this.#colors_override;
|
|
137
|
+
}
|
|
138
|
+
if (this.parent) {
|
|
139
|
+
return this.parent.colors;
|
|
140
|
+
}
|
|
141
|
+
const has_no_color = typeof process !== 'undefined' &&
|
|
142
|
+
(process.env.NO_COLOR !== undefined || process.env.CLAUDECODE !== undefined);
|
|
143
|
+
return !has_no_color;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Setter for colors - creates override.
|
|
147
|
+
*/
|
|
148
|
+
set colors(value) {
|
|
149
|
+
this.#colors_override = value;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Dynamic getter for console - checks override, then parent, then global console.
|
|
153
|
+
*/
|
|
154
|
+
get console() {
|
|
155
|
+
if (this.#console_override !== undefined) {
|
|
156
|
+
return this.#console_override;
|
|
157
|
+
}
|
|
158
|
+
if (this.parent) {
|
|
159
|
+
return this.parent.console;
|
|
160
|
+
}
|
|
161
|
+
return console;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Setter for console - creates override.
|
|
165
|
+
*/
|
|
166
|
+
set console(value) {
|
|
167
|
+
this.#console_override = value;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Gets the root logger by walking up the parent chain.
|
|
171
|
+
* Useful for setting global configuration that affects all child loggers.
|
|
172
|
+
* @returns The root logger (the one without a parent)
|
|
173
|
+
*/
|
|
174
|
+
get root() {
|
|
175
|
+
let current = this; // eslint-disable-line consistent-this, @typescript-eslint/no-this-alias
|
|
176
|
+
while (current.parent) {
|
|
177
|
+
current = current.parent;
|
|
178
|
+
}
|
|
179
|
+
return current;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Clears the level override for this logger, restoring inheritance from parent.
|
|
183
|
+
* After calling this, the logger will dynamically inherit the level from its parent
|
|
184
|
+
* (or use the default level if it has no parent).
|
|
185
|
+
*/
|
|
186
|
+
clear_level_override() {
|
|
187
|
+
this.#level_override = undefined;
|
|
188
|
+
this.#cached_level_string = undefined;
|
|
189
|
+
this.#cached_level = undefined;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Clears the colors override for this logger, restoring inheritance from parent.
|
|
193
|
+
* After calling this, the logger will dynamically inherit colors from its parent
|
|
194
|
+
* (or use the default colors behavior if it has no parent).
|
|
195
|
+
*/
|
|
196
|
+
clear_colors_override() {
|
|
197
|
+
this.#colors_override = undefined;
|
|
198
|
+
// Invalidate prefix caches since colors affect them
|
|
199
|
+
this.#cached_colors = undefined;
|
|
200
|
+
this.#cached_error = undefined;
|
|
201
|
+
this.#cached_warn = undefined;
|
|
202
|
+
this.#cached_info = undefined;
|
|
203
|
+
this.#cached_debug = undefined;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Clears the console override for this logger, restoring inheritance from parent.
|
|
207
|
+
* After calling this, the logger will dynamically inherit the console from its parent
|
|
208
|
+
* (or use the global console if it has no parent).
|
|
209
|
+
*/
|
|
210
|
+
clear_console_override() {
|
|
211
|
+
this.#console_override = undefined;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Ensures prefix cache is valid by checking if colors configuration changed.
|
|
215
|
+
* Uses pull-based invalidation: checks colors on each access and invalidates cached
|
|
216
|
+
* prefixes if colors changed. This automatically handles inheritance changes since
|
|
217
|
+
* `this.colors` getter walks the parent chain on each access.
|
|
218
|
+
*
|
|
219
|
+
* Invalidates all 4 cached prefix strings when colors change, since they all depend
|
|
220
|
+
* on the color configuration.
|
|
221
|
+
*/
|
|
222
|
+
#ensure_cache_valid() {
|
|
223
|
+
const current_colors = this.colors;
|
|
224
|
+
if (this.#cached_colors !== current_colors) {
|
|
225
|
+
this.#cached_colors = current_colors;
|
|
226
|
+
this.#cached_st = current_colors ? styleText : NO_COLOR_ST;
|
|
227
|
+
this.#cached_error = undefined;
|
|
228
|
+
this.#cached_warn = undefined;
|
|
229
|
+
this.#cached_info = undefined;
|
|
230
|
+
this.#cached_debug = undefined;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Formats the label portion of log output with given styleText function.
|
|
235
|
+
* Applies color styling if enabled, otherwise returns plain bracketed label.
|
|
236
|
+
*/
|
|
237
|
+
#format_label(st, colored) {
|
|
238
|
+
if (!this.label)
|
|
239
|
+
return '';
|
|
240
|
+
return colored
|
|
241
|
+
? `${st('gray', '[')}${st('magenta', this.label)}${st('gray', ']')}`
|
|
242
|
+
: `[${this.label}]`;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Gets the formatted error prefix, lazily computing and caching if needed.
|
|
246
|
+
* Lazy computation means prefixes are only built when the corresponding log method
|
|
247
|
+
* is first called, avoiding work for unused log levels.
|
|
248
|
+
*/
|
|
249
|
+
#get_error_prefix() {
|
|
250
|
+
this.#ensure_cache_valid();
|
|
251
|
+
if (this.#cached_error === undefined) {
|
|
252
|
+
const st = this.#cached_st;
|
|
253
|
+
const prefix = st('red', PREFIX_ERROR);
|
|
254
|
+
const label = this.#format_label(st, this.#cached_colors);
|
|
255
|
+
this.#cached_error = label ? `${prefix} ${label}` : prefix;
|
|
256
|
+
}
|
|
257
|
+
return this.#cached_error;
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Gets the formatted warn prefix, lazily computing and caching if needed.
|
|
261
|
+
*/
|
|
262
|
+
#get_warn_prefix() {
|
|
263
|
+
this.#ensure_cache_valid();
|
|
264
|
+
if (this.#cached_warn === undefined) {
|
|
265
|
+
const st = this.#cached_st;
|
|
266
|
+
const prefix = st('yellow', PREFIX_WARN);
|
|
267
|
+
const label = this.#format_label(st, this.#cached_colors);
|
|
268
|
+
this.#cached_warn = label ? `${prefix} ${label}` : prefix;
|
|
269
|
+
}
|
|
270
|
+
return this.#cached_warn;
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Gets the formatted info prefix, lazily computing and caching if needed.
|
|
274
|
+
* Note: info has no colored prefix character, only the label.
|
|
275
|
+
*/
|
|
276
|
+
#get_info_prefix() {
|
|
277
|
+
this.#ensure_cache_valid();
|
|
278
|
+
if (this.#cached_info === undefined) {
|
|
279
|
+
const st = this.#cached_st;
|
|
280
|
+
const label = this.#format_label(st, this.#cached_colors);
|
|
281
|
+
this.#cached_info = label || '';
|
|
282
|
+
}
|
|
283
|
+
return this.#cached_info;
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Gets the formatted debug prefix, lazily computing and caching if needed.
|
|
287
|
+
*/
|
|
288
|
+
#get_debug_prefix() {
|
|
289
|
+
this.#ensure_cache_valid();
|
|
290
|
+
if (this.#cached_debug === undefined) {
|
|
291
|
+
const st = this.#cached_st;
|
|
292
|
+
const prefix = st('gray', PREFIX_DEBUG);
|
|
293
|
+
const label = this.#format_label(st, this.#cached_colors);
|
|
294
|
+
this.#cached_debug = label ? `${prefix} ${label}` : prefix;
|
|
295
|
+
}
|
|
296
|
+
return this.#cached_debug;
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Gets the cached numeric level value, updating cache if level changed.
|
|
300
|
+
* Called on every log method invocation to check if the message should be filtered.
|
|
301
|
+
* Caches the numeric value (from LOG_LEVEL_VALUES dictionary) to avoid repeated lookups.
|
|
302
|
+
* Uses pull-based invalidation: checks `this.level` getter which handles inheritance.
|
|
303
|
+
*/
|
|
304
|
+
#get_cached_level() {
|
|
305
|
+
const current_level_string = this.level;
|
|
306
|
+
if (this.#cached_level_string !== current_level_string) {
|
|
307
|
+
this.#cached_level_string = current_level_string;
|
|
308
|
+
this.#cached_level = LOG_LEVEL_VALUES[current_level_string];
|
|
309
|
+
}
|
|
310
|
+
return this.#cached_level;
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Creates a child logger with automatic label concatenation.
|
|
314
|
+
* Children inherit parent configuration unless overridden.
|
|
315
|
+
*
|
|
316
|
+
* @param label Child label (will be concatenated with parent label using `:`).
|
|
317
|
+
* Cannot be an empty string - empty labels would result in confusing output like `parent:`
|
|
318
|
+
* with a trailing colon. Use `undefined` or `''` only for root loggers.
|
|
319
|
+
* @param options Optional configuration overrides
|
|
320
|
+
* @returns New Logger instance with concatenated label
|
|
321
|
+
* @throws Error if label is an empty string
|
|
322
|
+
*
|
|
323
|
+
* @example
|
|
324
|
+
* ```ts
|
|
325
|
+
* const app_log = new Logger('app');
|
|
326
|
+
* const db_log = app_log.child('db'); // label: 'app:db'
|
|
327
|
+
* const query_log = db_log.child('query'); // label: 'app:db:query'
|
|
328
|
+
* ```
|
|
329
|
+
*/
|
|
330
|
+
child(label, options = {}) {
|
|
331
|
+
if (label === '') {
|
|
332
|
+
throw new Error('Logger label cannot be empty when creating child');
|
|
333
|
+
}
|
|
334
|
+
const child_label = this.label ? `${this.label}:${label}` : label;
|
|
335
|
+
// Pass parent reference and all config options
|
|
336
|
+
const internal_options = {
|
|
337
|
+
...options,
|
|
338
|
+
parent: this,
|
|
339
|
+
};
|
|
340
|
+
return new Logger(child_label, internal_options);
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Logs an error message with `🞩error🞩` prefix.
|
|
344
|
+
* Only outputs if current level is `error` or higher.
|
|
345
|
+
*/
|
|
346
|
+
error(...args) {
|
|
347
|
+
if (this.#get_cached_level() < LOG_LEVEL_VALUES.error)
|
|
348
|
+
return;
|
|
349
|
+
this.console.error(this.#get_error_prefix(), ...args);
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Logs a warning message with `⚑warn⚑` prefix.
|
|
353
|
+
* Only outputs if current level is `warn` or higher.
|
|
354
|
+
*/
|
|
355
|
+
warn(...args) {
|
|
356
|
+
if (this.#get_cached_level() < LOG_LEVEL_VALUES.warn)
|
|
357
|
+
return;
|
|
358
|
+
this.console.warn(this.#get_warn_prefix(), ...args);
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* Logs an informational message.
|
|
362
|
+
* Unlike error/warn/debug, info has no character prefix - only the label is shown.
|
|
363
|
+
* This keeps standard output clean since info is the default log level.
|
|
364
|
+
* Only outputs if current level is `info` or higher.
|
|
365
|
+
*/
|
|
366
|
+
info(...args) {
|
|
367
|
+
if (this.#get_cached_level() < LOG_LEVEL_VALUES.info)
|
|
368
|
+
return;
|
|
369
|
+
this.console.log(this.#get_info_prefix(), ...args);
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* Logs a debug message with `┆debug┆` prefix.
|
|
373
|
+
* Only outputs if current level is `debug`.
|
|
374
|
+
*/
|
|
375
|
+
debug(...args) {
|
|
376
|
+
if (this.#get_cached_level() < LOG_LEVEL_VALUES.debug)
|
|
377
|
+
return;
|
|
378
|
+
this.console.log(this.#get_debug_prefix(), ...args);
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* Logs raw output without any prefix, formatting, or level filtering.
|
|
382
|
+
* Bypasses the logger's level checking, prefix formatting, and color application entirely.
|
|
383
|
+
* Useful for outputting structured data or when you need full control over formatting.
|
|
384
|
+
*
|
|
385
|
+
* Note: This method ignores the configured log level - it always outputs regardless of
|
|
386
|
+
* whether the logger is set to 'off' or any other level.
|
|
387
|
+
*
|
|
388
|
+
* @param args Values to log directly to console
|
|
389
|
+
*/
|
|
390
|
+
raw(...args) {
|
|
391
|
+
this.console.log(...args);
|
|
392
|
+
}
|
|
393
|
+
}
|
package/dist/map.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sorts a map by `comparator`, a function that compares two entries,
|
|
3
|
+
* defaulting to using `localCompare` and `>`.
|
|
4
|
+
*/
|
|
5
|
+
export declare const sort_map: <T extends Map<any, any>>(map: T, comparator?: (a: [any, any], b: [any, any]) => number) => T;
|
|
6
|
+
/**
|
|
7
|
+
* Compares two map entries for sorting purposes.
|
|
8
|
+
* If the key is a string, it uses `localeCompare` for comparison.
|
|
9
|
+
* For other types, it uses `>`.
|
|
10
|
+
*/
|
|
11
|
+
export declare const compare_simple_map_entries: (a: [any, any], b: [any, any]) => number;
|
|
12
|
+
//# sourceMappingURL=map.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"map.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/map.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,EAC/C,KAAK,CAAC,EACN,iBAQ6C,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,KAAG,MAAM,AARxC,KACrC,CAA4C,CAAC;AAEhD;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,GAAI,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,KAAG,MAGzE,CAAC"}
|
package/dist/map.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sorts a map by `comparator`, a function that compares two entries,
|
|
3
|
+
* defaulting to using `localCompare` and `>`.
|
|
4
|
+
*/
|
|
5
|
+
export const sort_map = (map, comparator = compare_simple_map_entries) => new Map([...map].sort(comparator));
|
|
6
|
+
/**
|
|
7
|
+
* Compares two map entries for sorting purposes.
|
|
8
|
+
* If the key is a string, it uses `localeCompare` for comparison.
|
|
9
|
+
* For other types, it uses `>`.
|
|
10
|
+
*/
|
|
11
|
+
export const compare_simple_map_entries = (a, b) => {
|
|
12
|
+
const a_key = a[0];
|
|
13
|
+
return typeof a_key === 'string' ? a_key.localeCompare(b[0]) : a[0] > b[0] ? 1 : -1;
|
|
14
|
+
};
|
package/dist/maths.d.ts
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns `n` bounded to `min` and `max`.
|
|
3
|
+
*/
|
|
4
|
+
export declare const clamp: (n: number, min: number, max: number) => number;
|
|
5
|
+
/**
|
|
6
|
+
* Linear interpolation between `a` and `b` by `amount`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const lerp: (a: number, b: number, amount: number) => number;
|
|
9
|
+
/**
|
|
10
|
+
* Rounds a number to a specified number of decimal places.
|
|
11
|
+
*/
|
|
12
|
+
export declare const round: (n: number, decimals: number) => number;
|
|
13
|
+
/**
|
|
14
|
+
* golden ratio/mean constants, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
15
|
+
*/
|
|
16
|
+
export declare const GR = 1.618033988749895;
|
|
17
|
+
/**
|
|
18
|
+
* golden ratio/mean constants, `1/GR`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
19
|
+
*/
|
|
20
|
+
export declare const GR_i = 0.6180339887498948;
|
|
21
|
+
/**
|
|
22
|
+
* golden ratio/mean constants, `GR**2`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
23
|
+
*/
|
|
24
|
+
export declare const GR_2 = 2.618033988749895;
|
|
25
|
+
/**
|
|
26
|
+
* golden ratio/mean constants, `1/(GR**2)`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
27
|
+
*/
|
|
28
|
+
export declare const GR_2i = 0.38196601125010515;
|
|
29
|
+
/**
|
|
30
|
+
* golden ratio/mean constants, `GR**3`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
31
|
+
*/
|
|
32
|
+
export declare const GR_3 = 4.23606797749979;
|
|
33
|
+
/**
|
|
34
|
+
* golden ratio/mean constants, `1/(GR**3)`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
35
|
+
*/
|
|
36
|
+
export declare const GR_3i = 0.2360679774997897;
|
|
37
|
+
/**
|
|
38
|
+
* golden ratio/mean constants, `GR**4`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
39
|
+
*/
|
|
40
|
+
export declare const GR_4 = 6.854101966249686;
|
|
41
|
+
/**
|
|
42
|
+
* golden ratio/mean constants, `1/(GR**4)`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
43
|
+
*/
|
|
44
|
+
export declare const GR_4i = 0.14589803375031543;
|
|
45
|
+
/**
|
|
46
|
+
* golden ratio/mean constants, `GR**5`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
47
|
+
*/
|
|
48
|
+
export declare const GR_5 = 11.090169943749476;
|
|
49
|
+
/**
|
|
50
|
+
* golden ratio/mean constants, `1/(GR**5)`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
51
|
+
*/
|
|
52
|
+
export declare const GR_5i = 0.09016994374947422;
|
|
53
|
+
/**
|
|
54
|
+
* golden ratio/mean constants, `GR**6`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
55
|
+
*/
|
|
56
|
+
export declare const GR_6 = 17.944271909999163;
|
|
57
|
+
/**
|
|
58
|
+
* golden ratio/mean constants, `1/(GR**6)`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
59
|
+
*/
|
|
60
|
+
export declare const GR_6i = 0.0557280900008412;
|
|
61
|
+
/**
|
|
62
|
+
* golden ratio/mean constants, `GR**7`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
63
|
+
*/
|
|
64
|
+
export declare const GR_7 = 29.03444185374864;
|
|
65
|
+
/**
|
|
66
|
+
* golden ratio/mean constants, `1/(GR**7)`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
67
|
+
*/
|
|
68
|
+
export declare const GR_7i = 0.03444185374863302;
|
|
69
|
+
/**
|
|
70
|
+
* golden ratio/mean constants, `GR**8`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
71
|
+
*/
|
|
72
|
+
export declare const GR_8 = 46.978713763747805;
|
|
73
|
+
/**
|
|
74
|
+
* golden ratio/mean constants, `1/(GR**8)`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
75
|
+
*/
|
|
76
|
+
export declare const GR_8i = 0.02128623625220818;
|
|
77
|
+
/**
|
|
78
|
+
* golden ratio/mean constants, `GR**9`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
79
|
+
*/
|
|
80
|
+
export declare const GR_9 = 76.01315561749645;
|
|
81
|
+
/**
|
|
82
|
+
* golden ratio/mean constants, `1/(GR**9)`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
83
|
+
*/
|
|
84
|
+
export declare const GR_9i = 0.013155617496424835;
|
|
85
|
+
//# sourceMappingURL=maths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"maths.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/maths.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,KAAK,GAAI,GAAG,MAAM,EAAE,KAAK,MAAM,EAAE,KAAK,MAAM,KAAG,MAC5B,CAAC;AAEjC;;GAEG;AACH,eAAO,MAAM,IAAI,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,QAAQ,MAAM,KAAG,MAAuC,CAAC;AAEpG;;GAEG;AACH,eAAO,MAAM,KAAK,GAAI,GAAG,MAAM,EAAE,UAAU,MAAM,KAAG,MAGnD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,EAAE,oBAAoB,CAAC;AACpC;;GAEG;AACH,eAAO,MAAM,IAAI,qBAAqB,CAAC;AACvC;;GAEG;AACH,eAAO,MAAM,IAAI,oBAAoB,CAAC;AACtC;;GAEG;AACH,eAAO,MAAM,KAAK,sBAAsB,CAAC;AACzC;;GAEG;AACH,eAAO,MAAM,IAAI,mBAAmB,CAAC;AACrC;;GAEG;AACH,eAAO,MAAM,KAAK,qBAAqB,CAAC;AACxC;;GAEG;AACH,eAAO,MAAM,IAAI,oBAAoB,CAAC;AACtC;;GAEG;AACH,eAAO,MAAM,KAAK,sBAAsB,CAAC;AACzC;;GAEG;AACH,eAAO,MAAM,IAAI,qBAAqB,CAAC;AACvC;;GAEG;AACH,eAAO,MAAM,KAAK,sBAAsB,CAAC;AACzC;;GAEG;AACH,eAAO,MAAM,IAAI,qBAAqB,CAAC;AACvC;;GAEG;AACH,eAAO,MAAM,KAAK,qBAAqB,CAAC;AACxC;;GAEG;AACH,eAAO,MAAM,IAAI,oBAAoB,CAAC;AACtC;;GAEG;AACH,eAAO,MAAM,KAAK,sBAAsB,CAAC;AACzC;;GAEG;AACH,eAAO,MAAM,IAAI,qBAAqB,CAAC;AACvC;;GAEG;AACH,eAAO,MAAM,KAAK,sBAAsB,CAAC;AACzC;;GAEG;AACH,eAAO,MAAM,IAAI,oBAAoB,CAAC;AACtC;;GAEG;AACH,eAAO,MAAM,KAAK,uBAAuB,CAAC"}
|
package/dist/maths.js
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns `n` bounded to `min` and `max`.
|
|
3
|
+
*/
|
|
4
|
+
export const clamp = (n, min, max) => Math.min(Math.max(n, min), max);
|
|
5
|
+
/**
|
|
6
|
+
* Linear interpolation between `a` and `b` by `amount`.
|
|
7
|
+
*/
|
|
8
|
+
export const lerp = (a, b, amount) => (1 - amount) * a + amount * b;
|
|
9
|
+
/**
|
|
10
|
+
* Rounds a number to a specified number of decimal places.
|
|
11
|
+
*/
|
|
12
|
+
export const round = (n, decimals) => {
|
|
13
|
+
const mult = 10 ** decimals;
|
|
14
|
+
return Math.round(n * mult) / mult;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* golden ratio/mean constants, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
18
|
+
*/
|
|
19
|
+
export const GR = 1.618033988749895;
|
|
20
|
+
/**
|
|
21
|
+
* golden ratio/mean constants, `1/GR`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
22
|
+
*/
|
|
23
|
+
export const GR_i = 0.6180339887498948;
|
|
24
|
+
/**
|
|
25
|
+
* golden ratio/mean constants, `GR**2`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
26
|
+
*/
|
|
27
|
+
export const GR_2 = 2.618033988749895;
|
|
28
|
+
/**
|
|
29
|
+
* golden ratio/mean constants, `1/(GR**2)`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
30
|
+
*/
|
|
31
|
+
export const GR_2i = 0.38196601125010515;
|
|
32
|
+
/**
|
|
33
|
+
* golden ratio/mean constants, `GR**3`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
34
|
+
*/
|
|
35
|
+
export const GR_3 = 4.23606797749979;
|
|
36
|
+
/**
|
|
37
|
+
* golden ratio/mean constants, `1/(GR**3)`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
38
|
+
*/
|
|
39
|
+
export const GR_3i = 0.2360679774997897;
|
|
40
|
+
/**
|
|
41
|
+
* golden ratio/mean constants, `GR**4`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
42
|
+
*/
|
|
43
|
+
export const GR_4 = 6.854101966249686;
|
|
44
|
+
/**
|
|
45
|
+
* golden ratio/mean constants, `1/(GR**4)`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
46
|
+
*/
|
|
47
|
+
export const GR_4i = 0.14589803375031543;
|
|
48
|
+
/**
|
|
49
|
+
* golden ratio/mean constants, `GR**5`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
50
|
+
*/
|
|
51
|
+
export const GR_5 = 11.090169943749476;
|
|
52
|
+
/**
|
|
53
|
+
* golden ratio/mean constants, `1/(GR**5)`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
54
|
+
*/
|
|
55
|
+
export const GR_5i = 0.09016994374947422;
|
|
56
|
+
/**
|
|
57
|
+
* golden ratio/mean constants, `GR**6`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
58
|
+
*/
|
|
59
|
+
export const GR_6 = 17.944271909999163;
|
|
60
|
+
/**
|
|
61
|
+
* golden ratio/mean constants, `1/(GR**6)`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
62
|
+
*/
|
|
63
|
+
export const GR_6i = 0.0557280900008412;
|
|
64
|
+
/**
|
|
65
|
+
* golden ratio/mean constants, `GR**7`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
66
|
+
*/
|
|
67
|
+
export const GR_7 = 29.03444185374864;
|
|
68
|
+
/**
|
|
69
|
+
* golden ratio/mean constants, `1/(GR**7)`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
70
|
+
*/
|
|
71
|
+
export const GR_7i = 0.03444185374863302;
|
|
72
|
+
/**
|
|
73
|
+
* golden ratio/mean constants, `GR**8`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
74
|
+
*/
|
|
75
|
+
export const GR_8 = 46.978713763747805;
|
|
76
|
+
/**
|
|
77
|
+
* golden ratio/mean constants, `1/(GR**8)`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
78
|
+
*/
|
|
79
|
+
export const GR_8i = 0.02128623625220818;
|
|
80
|
+
/**
|
|
81
|
+
* golden ratio/mean constants, `GR**9`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
82
|
+
*/
|
|
83
|
+
export const GR_9 = 76.01315561749645;
|
|
84
|
+
/**
|
|
85
|
+
* golden ratio/mean constants, `1/(GR**9)`, useful for scaling: https://wikipedia.org/wiki/Golden_ratio
|
|
86
|
+
*/
|
|
87
|
+
export const GR_9i = 0.013155617496424835;
|
package/dist/object.d.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { OmitStrict } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Returns a boolean indicating if `value` is
|
|
4
|
+
* a plain object, possibly created with `Object.create(null)`.
|
|
5
|
+
* But warning! This fails for some obscure corner cases, use a proper library for weird things.
|
|
6
|
+
*/
|
|
7
|
+
export declare const is_plain_object: (value: any) => boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Iterated keys in `for..in` are always returned as strings,
|
|
10
|
+
* so to prevent usage errors the key type of `mapper` is always a string.
|
|
11
|
+
* Symbols are not enumerable as keys, so they're excluded.
|
|
12
|
+
*/
|
|
13
|
+
export declare const map_record: <T, K extends string | number, U>(obj: Record<K, T>, mapper: (value: T, key: string) => U) => Record<K, U>;
|
|
14
|
+
/**
|
|
15
|
+
* Creates a new object without the specified `keys`.
|
|
16
|
+
*/
|
|
17
|
+
export declare const omit: <T extends Record<K, any>, K extends keyof T>(obj: T, keys: Array<K>) => OmitStrict<T, K>;
|
|
18
|
+
/**
|
|
19
|
+
* Creates a new object with properties that pass the `should_pick` predicate.
|
|
20
|
+
*/
|
|
21
|
+
export declare const pick_by: <T extends Record<K, any>, K extends string | number>(obj: T, should_pick: (value: any, key: K) => boolean) => Partial<T>;
|
|
22
|
+
/**
|
|
23
|
+
* `omit_undefined` is a commonly used form of `pick_by`.
|
|
24
|
+
* See this issue for why it's used so much:
|
|
25
|
+
* https://github.com/Microsoft/TypeScript/issues/13195
|
|
26
|
+
* @param obj
|
|
27
|
+
* @returns `obj` with all `undefined` properties removed
|
|
28
|
+
*/
|
|
29
|
+
export declare const omit_undefined: <T extends Record<string | number, any>>(obj: T) => T;
|
|
30
|
+
/**
|
|
31
|
+
* A more explicit form of `{put_this_first: obj.put_this_first, ...obj}`.
|
|
32
|
+
*/
|
|
33
|
+
export declare const reorder: <T extends Record<K, any>, K extends string | number>(obj: T, keys: Array<K>) => T;
|
|
34
|
+
/**
|
|
35
|
+
* Frozen empty object with no properties, good for options default values.
|
|
36
|
+
*/
|
|
37
|
+
export declare const EMPTY_OBJECT: Record<string | number | symbol, undefined> & object;
|
|
38
|
+
/**
|
|
39
|
+
* Performs a depth-first traversal of an object's enumerable properties,
|
|
40
|
+
* calling `cb` for every key and value with the current `obj` context.
|
|
41
|
+
* @param obj - any object with enumerable properties
|
|
42
|
+
* @param cb - receives the key, value, and `obj` for every enumerable property on `obj` and its descendents
|
|
43
|
+
*/
|
|
44
|
+
export declare const traverse: (obj: any, cb: (key: string, value: any, obj: any) => void) => void;
|
|
45
|
+
export declare const transform_empty_object_to_undefined: <T>(obj: T) => T | undefined;
|
|
46
|
+
//# sourceMappingURL=object.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/object.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,YAAY,CAAC;AAE3C;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAAI,OAAO,GAAG,KAAG,OACmC,CAAC;AAEjF;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,CAAC,EACzD,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EACjB,QAAQ,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC,KAClC,MAAM,CAAC,CAAC,EAAE,CAAC,CAMb,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,IAAI,GAAI,CAAC,SAAS,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,EAC/D,KAAK,CAAC,EACN,MAAM,KAAK,CAAC,CAAC,CAAC,KACZ,UAAU,CAAC,CAAC,EAAE,CAAC,CAQjB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,OAAO,GAAI,CAAC,SAAS,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,EAC1E,KAAK,CAAC,EACN,aAAa,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,KAAK,OAAO,KAC1C,OAAO,CAAC,CAAC,CASX,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,CAAC,KAAG,CACtC,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,OAAO,GAAI,CAAC,SAAS,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,EAC1E,KAAK,CAAC,EACN,MAAM,KAAK,CAAC,CAAC,CAAC,KACZ,CAOF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,SAAS,CAAC,GAAG,MAA0B,CAAC;AAEpG;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,GAAI,KAAK,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,KAAK,IAAI,KAAG,IAOpF,CAAC;AAEF,eAAO,MAAM,mCAAmC,GAAI,CAAC,EAAE,KAAK,CAAC,KAAG,CAAC,GAAG,SAKnE,CAAC"}
|