@weaxs/openclaw-stock-analysis 0.2.10 → 0.2.11
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 +3 -2
- package/dist/index.js +313 -435
- package/index.ts +13 -1
- package/openclaw.plugin.json +1 -0
- package/package.json +3 -3
- package/skills/stock-analysis/SKILL.md +4 -1
- package/tools/alert_rules.py +63 -14
- package/tools/name_resolver.py +16 -14
- package/tools/requirements.txt +2 -2
- package/tools/search_intel.py +2 -2
- package/tools/signal_tracker.py +6 -5
- package/tools/stock_data.py +255 -24
- package/tools/tiaa_disclosures.py +263 -0
package/dist/index.js
CHANGED
|
@@ -124,15 +124,10 @@ var Metrics = {
|
|
|
124
124
|
update: 0
|
|
125
125
|
};
|
|
126
126
|
|
|
127
|
-
// node_modules/typebox/build/system/memory/assign.mjs
|
|
128
|
-
function Assign(left, right) {
|
|
129
|
-
Metrics.assign += 1;
|
|
130
|
-
return { ...left, ...right };
|
|
131
|
-
}
|
|
132
|
-
|
|
133
127
|
// node_modules/typebox/build/guard/guard.mjs
|
|
134
128
|
var guard_exports = {};
|
|
135
129
|
__export(guard_exports, {
|
|
130
|
+
CodePointCount: () => CodePointCount2,
|
|
136
131
|
Counted: () => Counted,
|
|
137
132
|
Entries: () => Entries,
|
|
138
133
|
EntriesRegExp: () => EntriesRegExp,
|
|
@@ -173,16 +168,13 @@ __export(guard_exports, {
|
|
|
173
168
|
Values: () => Values
|
|
174
169
|
});
|
|
175
170
|
|
|
176
|
-
// node_modules/typebox/build/guard/
|
|
171
|
+
// node_modules/typebox/build/guard/unicode/unicode_segment.mjs
|
|
177
172
|
function IsBetween(value, min, max) {
|
|
178
173
|
return value >= min && value <= max;
|
|
179
174
|
}
|
|
180
175
|
function IsZeroWidthJoiner(value) {
|
|
181
176
|
return value === 8205;
|
|
182
177
|
}
|
|
183
|
-
function IsHighSurrogate(value) {
|
|
184
|
-
return IsBetween(value, 55296, 56319);
|
|
185
|
-
}
|
|
186
178
|
function IsRegionalIndicator(value) {
|
|
187
179
|
return IsBetween(value, 127462, 127487);
|
|
188
180
|
}
|
|
@@ -210,7 +202,7 @@ function NextGraphemeClusterIndex(value, clusterStart) {
|
|
|
210
202
|
const startCP = value.codePointAt(clusterStart);
|
|
211
203
|
let clusterEnd = clusterStart + CodePointLength(startCP);
|
|
212
204
|
clusterEnd = ConsumeModifiers(value, clusterEnd);
|
|
213
|
-
while (clusterEnd < value.length - 1 && value
|
|
205
|
+
while (clusterEnd < value.length - 1 && IsZeroWidthJoiner(value.codePointAt(clusterEnd))) {
|
|
214
206
|
const nextCP = value.codePointAt(clusterEnd + 1);
|
|
215
207
|
clusterEnd += 1 + CodePointLength(nextCP);
|
|
216
208
|
clusterEnd = ConsumeModifiers(value, clusterEnd);
|
|
@@ -220,67 +212,30 @@ function NextGraphemeClusterIndex(value, clusterStart) {
|
|
|
220
212
|
}
|
|
221
213
|
return clusterEnd;
|
|
222
214
|
}
|
|
223
|
-
function IsGraphemeCodePoint(value) {
|
|
224
|
-
return IsHighSurrogate(value) || IsCombiningMark(value) || IsVariationSelector(value) || IsZeroWidthJoiner(value);
|
|
225
|
-
}
|
|
226
215
|
function GraphemeCount(value) {
|
|
227
|
-
let count = 0;
|
|
228
|
-
let index = 0;
|
|
216
|
+
let count = 0, index = 0;
|
|
229
217
|
while (index < value.length) {
|
|
230
218
|
index = NextGraphemeClusterIndex(value, index);
|
|
231
219
|
count++;
|
|
232
220
|
}
|
|
233
221
|
return count;
|
|
234
222
|
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
let
|
|
239
|
-
let index = 0;
|
|
223
|
+
|
|
224
|
+
// node_modules/typebox/build/guard/unicode/unicode.mjs
|
|
225
|
+
function CodePointCount(value) {
|
|
226
|
+
let result = 0, index = 0, prev = 0;
|
|
240
227
|
while (index < value.length) {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
return true;
|
|
228
|
+
const next = value.charCodeAt(index++) >> 10;
|
|
229
|
+
result += +((prev << 8 | next) !== 13879);
|
|
230
|
+
prev = next;
|
|
245
231
|
}
|
|
246
|
-
return
|
|
232
|
+
return result;
|
|
247
233
|
}
|
|
248
234
|
function IsMaxLength(value, maxLength) {
|
|
249
|
-
|
|
250
|
-
let index = 0;
|
|
251
|
-
while (index < value.length) {
|
|
252
|
-
index = NextGraphemeClusterIndex(value, index);
|
|
253
|
-
count++;
|
|
254
|
-
if (count > maxLength)
|
|
255
|
-
return false;
|
|
256
|
-
}
|
|
257
|
-
return true;
|
|
258
|
-
}
|
|
259
|
-
function IsMinLengthFast(value, minLength) {
|
|
260
|
-
if (minLength === 0)
|
|
261
|
-
return true;
|
|
262
|
-
let index = 0;
|
|
263
|
-
while (index < value.length) {
|
|
264
|
-
if (IsGraphemeCodePoint(value.charCodeAt(index))) {
|
|
265
|
-
return IsMinLength(value, minLength);
|
|
266
|
-
}
|
|
267
|
-
index++;
|
|
268
|
-
if (index >= minLength)
|
|
269
|
-
return true;
|
|
270
|
-
}
|
|
271
|
-
return false;
|
|
235
|
+
return value.length <= maxLength || value.length <= maxLength << 1 && CodePointCount(value) <= maxLength;
|
|
272
236
|
}
|
|
273
|
-
function
|
|
274
|
-
|
|
275
|
-
while (index < value.length) {
|
|
276
|
-
if (IsGraphemeCodePoint(value.charCodeAt(index))) {
|
|
277
|
-
return IsMaxLength(value, maxLength);
|
|
278
|
-
}
|
|
279
|
-
index++;
|
|
280
|
-
if (index > maxLength)
|
|
281
|
-
return false;
|
|
282
|
-
}
|
|
283
|
-
return true;
|
|
237
|
+
function IsMinLength(value, minLength) {
|
|
238
|
+
return value.length >= minLength << 1 || value.length >= minLength && CodePointCount(value) >= minLength;
|
|
284
239
|
}
|
|
285
240
|
|
|
286
241
|
// node_modules/typebox/build/guard/guard.mjs
|
|
@@ -371,40 +326,35 @@ function IsValueLike(value) {
|
|
|
371
326
|
function GraphemeCount2(value) {
|
|
372
327
|
return GraphemeCount(value);
|
|
373
328
|
}
|
|
374
|
-
function
|
|
375
|
-
return
|
|
329
|
+
function CodePointCount2(value) {
|
|
330
|
+
return CodePointCount(value);
|
|
331
|
+
}
|
|
332
|
+
function IsMaxLength2(value, maxLength) {
|
|
333
|
+
return IsMaxLength(value, maxLength);
|
|
376
334
|
}
|
|
377
|
-
function IsMinLength2(value,
|
|
378
|
-
return
|
|
335
|
+
function IsMinLength2(value, minLength) {
|
|
336
|
+
return IsMinLength(value, minLength);
|
|
379
337
|
}
|
|
380
338
|
function Every(value, offset, callback) {
|
|
381
|
-
|
|
382
|
-
if (!callback(value[index], index))
|
|
383
|
-
return false;
|
|
384
|
-
}
|
|
385
|
-
return true;
|
|
339
|
+
return value.every((item, index) => index < offset || callback(item, index));
|
|
386
340
|
}
|
|
387
341
|
function EveryAll(value, offset, callback) {
|
|
388
342
|
let result = true;
|
|
389
|
-
|
|
390
|
-
if (!callback(
|
|
343
|
+
value.forEach((item, index) => {
|
|
344
|
+
if (index >= offset && !callback(item, index))
|
|
391
345
|
result = false;
|
|
392
|
-
}
|
|
346
|
+
});
|
|
393
347
|
return result;
|
|
394
348
|
}
|
|
395
349
|
function Some(value, callback) {
|
|
396
|
-
|
|
397
|
-
if (callback(value[index], index))
|
|
398
|
-
return true;
|
|
399
|
-
}
|
|
400
|
-
return false;
|
|
350
|
+
return value.some((value2, index) => callback(value2, index));
|
|
401
351
|
}
|
|
402
352
|
function SomeAll(value, callback) {
|
|
403
353
|
let result = false;
|
|
404
|
-
|
|
405
|
-
if (callback(
|
|
354
|
+
value.forEach((item, index) => {
|
|
355
|
+
if (callback(item, index))
|
|
406
356
|
result = true;
|
|
407
|
-
}
|
|
357
|
+
});
|
|
408
358
|
return result;
|
|
409
359
|
}
|
|
410
360
|
function Counted(value, callback) {
|
|
@@ -447,145 +397,6 @@ function IsDeepEqual(left, right) {
|
|
|
447
397
|
return IsArray(left) ? DeepEqualArray(left, right) : IsObject(left) ? DeepEqualObject(left, right) : IsEqual(left, right);
|
|
448
398
|
}
|
|
449
399
|
|
|
450
|
-
// node_modules/typebox/build/guard/globals.mjs
|
|
451
|
-
var globals_exports = {};
|
|
452
|
-
__export(globals_exports, {
|
|
453
|
-
IsBigInt64Array: () => IsBigInt64Array,
|
|
454
|
-
IsBigUint64Array: () => IsBigUint64Array,
|
|
455
|
-
IsBoolean: () => IsBoolean2,
|
|
456
|
-
IsDate: () => IsDate,
|
|
457
|
-
IsFloat32Array: () => IsFloat32Array,
|
|
458
|
-
IsFloat64Array: () => IsFloat64Array,
|
|
459
|
-
IsInt16Array: () => IsInt16Array,
|
|
460
|
-
IsInt32Array: () => IsInt32Array,
|
|
461
|
-
IsInt8Array: () => IsInt8Array,
|
|
462
|
-
IsMap: () => IsMap,
|
|
463
|
-
IsNumber: () => IsNumber2,
|
|
464
|
-
IsRegExp: () => IsRegExp,
|
|
465
|
-
IsSet: () => IsSet,
|
|
466
|
-
IsString: () => IsString2,
|
|
467
|
-
IsTypeArray: () => IsTypeArray,
|
|
468
|
-
IsUint16Array: () => IsUint16Array,
|
|
469
|
-
IsUint32Array: () => IsUint32Array,
|
|
470
|
-
IsUint8Array: () => IsUint8Array,
|
|
471
|
-
IsUint8ClampedArray: () => IsUint8ClampedArray
|
|
472
|
-
});
|
|
473
|
-
function IsBoolean2(value) {
|
|
474
|
-
return value instanceof Boolean;
|
|
475
|
-
}
|
|
476
|
-
function IsNumber2(value) {
|
|
477
|
-
return value instanceof Number;
|
|
478
|
-
}
|
|
479
|
-
function IsString2(value) {
|
|
480
|
-
return value instanceof String;
|
|
481
|
-
}
|
|
482
|
-
function IsTypeArray(value) {
|
|
483
|
-
return globalThis.ArrayBuffer.isView(value);
|
|
484
|
-
}
|
|
485
|
-
function IsInt8Array(value) {
|
|
486
|
-
return value instanceof globalThis.Int8Array;
|
|
487
|
-
}
|
|
488
|
-
function IsUint8Array(value) {
|
|
489
|
-
return value instanceof globalThis.Uint8Array;
|
|
490
|
-
}
|
|
491
|
-
function IsUint8ClampedArray(value) {
|
|
492
|
-
return value instanceof globalThis.Uint8ClampedArray;
|
|
493
|
-
}
|
|
494
|
-
function IsInt16Array(value) {
|
|
495
|
-
return value instanceof globalThis.Int16Array;
|
|
496
|
-
}
|
|
497
|
-
function IsUint16Array(value) {
|
|
498
|
-
return value instanceof globalThis.Uint16Array;
|
|
499
|
-
}
|
|
500
|
-
function IsInt32Array(value) {
|
|
501
|
-
return value instanceof globalThis.Int32Array;
|
|
502
|
-
}
|
|
503
|
-
function IsUint32Array(value) {
|
|
504
|
-
return value instanceof globalThis.Uint32Array;
|
|
505
|
-
}
|
|
506
|
-
function IsFloat32Array(value) {
|
|
507
|
-
return value instanceof globalThis.Float32Array;
|
|
508
|
-
}
|
|
509
|
-
function IsFloat64Array(value) {
|
|
510
|
-
return value instanceof globalThis.Float64Array;
|
|
511
|
-
}
|
|
512
|
-
function IsBigInt64Array(value) {
|
|
513
|
-
return value instanceof globalThis.BigInt64Array;
|
|
514
|
-
}
|
|
515
|
-
function IsBigUint64Array(value) {
|
|
516
|
-
return value instanceof globalThis.BigUint64Array;
|
|
517
|
-
}
|
|
518
|
-
function IsRegExp(value) {
|
|
519
|
-
return value instanceof globalThis.RegExp;
|
|
520
|
-
}
|
|
521
|
-
function IsDate(value) {
|
|
522
|
-
return value instanceof globalThis.Date;
|
|
523
|
-
}
|
|
524
|
-
function IsSet(value) {
|
|
525
|
-
return value instanceof globalThis.Set;
|
|
526
|
-
}
|
|
527
|
-
function IsMap(value) {
|
|
528
|
-
return value instanceof globalThis.Map;
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
// node_modules/typebox/build/system/memory/clone.mjs
|
|
532
|
-
function FromClassInstance(value) {
|
|
533
|
-
return value;
|
|
534
|
-
}
|
|
535
|
-
function IsTypeObject(value) {
|
|
536
|
-
return guard_exports.HasPropertyKey(value, "~kind") || guard_exports.HasPropertyKey(value, "~unsafe");
|
|
537
|
-
}
|
|
538
|
-
function FromTypeObject(value) {
|
|
539
|
-
const result = {};
|
|
540
|
-
const descriptors = Object.getOwnPropertyDescriptors(value);
|
|
541
|
-
for (const key of Object.keys(descriptors)) {
|
|
542
|
-
if (guard_exports.IsUnsafePropertyKey(key))
|
|
543
|
-
continue;
|
|
544
|
-
const descriptor = descriptors[key];
|
|
545
|
-
if (guard_exports.HasPropertyKey(descriptor, "value")) {
|
|
546
|
-
Object.defineProperty(result, key, { ...descriptor, value: FromValue(descriptor.value) });
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
return result;
|
|
550
|
-
}
|
|
551
|
-
function FromPlainObject(value) {
|
|
552
|
-
const result = {};
|
|
553
|
-
for (const key of guard_exports.Keys(value)) {
|
|
554
|
-
if (guard_exports.IsUnsafePropertyKey(key))
|
|
555
|
-
continue;
|
|
556
|
-
result[key] = FromValue(value[key]);
|
|
557
|
-
}
|
|
558
|
-
for (const key of guard_exports.Symbols(value)) {
|
|
559
|
-
result[key] = FromValue(value[key]);
|
|
560
|
-
}
|
|
561
|
-
return result;
|
|
562
|
-
}
|
|
563
|
-
function FromObject(value) {
|
|
564
|
-
return guard_exports.IsClassInstance(value) ? FromClassInstance(value) : IsTypeObject(value) ? FromTypeObject(value) : FromPlainObject(value);
|
|
565
|
-
}
|
|
566
|
-
function FromArray(value) {
|
|
567
|
-
return value.map((element) => FromValue(element));
|
|
568
|
-
}
|
|
569
|
-
function FromTypedArray(value) {
|
|
570
|
-
return value.slice();
|
|
571
|
-
}
|
|
572
|
-
function FromRegExp(value) {
|
|
573
|
-
return new RegExp(value.source, value.flags);
|
|
574
|
-
}
|
|
575
|
-
function FromMap(value) {
|
|
576
|
-
return new Map(FromValue([...value.entries()]));
|
|
577
|
-
}
|
|
578
|
-
function FromSet(value) {
|
|
579
|
-
return new Set(FromValue([...value.values()]));
|
|
580
|
-
}
|
|
581
|
-
function FromValue(value) {
|
|
582
|
-
return globals_exports.IsTypeArray(value) ? FromTypedArray(value) : globals_exports.IsRegExp(value) ? FromRegExp(value) : globals_exports.IsMap(value) ? FromMap(value) : globals_exports.IsSet(value) ? FromSet(value) : guard_exports.IsArray(value) ? FromArray(value) : guard_exports.IsObject(value) ? FromObject(value) : value;
|
|
583
|
-
}
|
|
584
|
-
function Clone(value) {
|
|
585
|
-
Metrics.clone += 1;
|
|
586
|
-
return FromValue(value);
|
|
587
|
-
}
|
|
588
|
-
|
|
589
400
|
// node_modules/typebox/build/system/settings/settings.mjs
|
|
590
401
|
var settings_exports = {};
|
|
591
402
|
__export(settings_exports, {
|
|
@@ -596,6 +407,7 @@ __export(settings_exports, {
|
|
|
596
407
|
var settings = {
|
|
597
408
|
immutableTypes: false,
|
|
598
409
|
maxErrors: 8,
|
|
410
|
+
maxParseErrors: 1,
|
|
599
411
|
maxInstantiationCount: 128,
|
|
600
412
|
useAcceleration: true,
|
|
601
413
|
exactOptionalPropertyTypes: false,
|
|
@@ -606,6 +418,7 @@ var settings = {
|
|
|
606
418
|
function Reset() {
|
|
607
419
|
settings.immutableTypes = false;
|
|
608
420
|
settings.maxErrors = 8;
|
|
421
|
+
settings.maxParseErrors = 1;
|
|
609
422
|
settings.maxInstantiationCount = 128;
|
|
610
423
|
settings.useAcceleration = true;
|
|
611
424
|
settings.exactOptionalPropertyTypes = false;
|
|
@@ -625,8 +438,69 @@ function Get() {
|
|
|
625
438
|
return settings;
|
|
626
439
|
}
|
|
627
440
|
|
|
441
|
+
// node_modules/typebox/build/system/memory/keys.mjs
|
|
442
|
+
function Keys2(value) {
|
|
443
|
+
return [...guard_exports.Keys(value), ...guard_exports.Symbols(value)];
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
// node_modules/typebox/build/system/memory/finalize.mjs
|
|
447
|
+
function Freeze(value, seen) {
|
|
448
|
+
if (seen.has(value))
|
|
449
|
+
return;
|
|
450
|
+
seen.add(value);
|
|
451
|
+
for (const key of Keys2(value)) {
|
|
452
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
453
|
+
if (!descriptor || !("value" in descriptor))
|
|
454
|
+
continue;
|
|
455
|
+
if (guard_exports.IsObject(descriptor.value))
|
|
456
|
+
Freeze(descriptor.value, seen);
|
|
457
|
+
}
|
|
458
|
+
Object.freeze(value);
|
|
459
|
+
}
|
|
460
|
+
function Finalize(value) {
|
|
461
|
+
if (!settings_exports.Get().immutableTypes)
|
|
462
|
+
return value;
|
|
463
|
+
Freeze(value, /* @__PURE__ */ new WeakSet());
|
|
464
|
+
return value;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
// node_modules/typebox/build/system/memory/assign.mjs
|
|
468
|
+
function Assign(left, right) {
|
|
469
|
+
Metrics.assign += 1;
|
|
470
|
+
const result = {}, rightKeys = Keys2(right), leftKeys = Keys2(left);
|
|
471
|
+
for (const key of leftKeys) {
|
|
472
|
+
if (rightKeys.includes(key))
|
|
473
|
+
continue;
|
|
474
|
+
Object.defineProperty(result, key, Object.getOwnPropertyDescriptor(left, key));
|
|
475
|
+
}
|
|
476
|
+
for (const key of rightKeys) {
|
|
477
|
+
Object.defineProperty(result, key, Object.getOwnPropertyDescriptor(right, key));
|
|
478
|
+
}
|
|
479
|
+
return Finalize(result);
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
// node_modules/typebox/build/system/memory/clone.mjs
|
|
483
|
+
function Clone(value) {
|
|
484
|
+
Metrics.clone += 1;
|
|
485
|
+
const result = {};
|
|
486
|
+
for (const key of Keys2(value)) {
|
|
487
|
+
if (guard_exports.IsUnsafePropertyKey(key))
|
|
488
|
+
continue;
|
|
489
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
490
|
+
if (guard_exports.IsEqual(descriptor.enumerable, true)) {
|
|
491
|
+
result[key] = descriptor.value;
|
|
492
|
+
} else {
|
|
493
|
+
Object.defineProperty(result, key, descriptor);
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
return result;
|
|
497
|
+
}
|
|
498
|
+
|
|
628
499
|
// node_modules/typebox/build/system/memory/create.mjs
|
|
629
|
-
function
|
|
500
|
+
function WithEnumerable(left, right) {
|
|
501
|
+
return { ...left, ...right };
|
|
502
|
+
}
|
|
503
|
+
function WithHidden(left, right) {
|
|
630
504
|
for (const key of Object.keys(right)) {
|
|
631
505
|
Object.defineProperty(left, key, {
|
|
632
506
|
configurable: true,
|
|
@@ -637,45 +511,52 @@ function MergeHidden(left, right) {
|
|
|
637
511
|
}
|
|
638
512
|
return left;
|
|
639
513
|
}
|
|
640
|
-
function Merge(left, right) {
|
|
641
|
-
return { ...left, ...right };
|
|
642
|
-
}
|
|
643
514
|
function Create(hidden, enumerable, options = {}) {
|
|
644
515
|
Metrics.create += 1;
|
|
645
|
-
const
|
|
646
|
-
const
|
|
647
|
-
|
|
648
|
-
return settings2.immutableTypes ? Object.freeze(withHidden) : withHidden;
|
|
516
|
+
const withEnumerable = WithEnumerable(enumerable, options);
|
|
517
|
+
const withHidden = settings_exports.Get().enumerableKind ? WithEnumerable(withEnumerable, hidden) : WithHidden(withEnumerable, hidden);
|
|
518
|
+
return Finalize(withHidden);
|
|
649
519
|
}
|
|
650
520
|
|
|
651
521
|
// node_modules/typebox/build/system/memory/discard.mjs
|
|
652
522
|
function Discard(value, propertyKeys) {
|
|
653
523
|
Metrics.discard += 1;
|
|
654
524
|
const result = {};
|
|
655
|
-
const
|
|
656
|
-
|
|
657
|
-
for (const key of Object.keys(descriptors)) {
|
|
658
|
-
if (keysToDiscard.has(key))
|
|
525
|
+
for (const key of Keys2(value)) {
|
|
526
|
+
if (propertyKeys.includes(key))
|
|
659
527
|
continue;
|
|
660
|
-
Object.
|
|
528
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
529
|
+
Object.defineProperty(result, key, descriptor);
|
|
661
530
|
}
|
|
662
|
-
return result;
|
|
531
|
+
return Finalize(result);
|
|
663
532
|
}
|
|
664
533
|
|
|
665
534
|
// node_modules/typebox/build/system/memory/update.mjs
|
|
666
|
-
function
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
535
|
+
function WithCurrent(current, hiddenKeys, enumerableKeys, result) {
|
|
536
|
+
for (const key of Keys2(current)) {
|
|
537
|
+
if (guard_exports.IsUnsafePropertyKey(key) || hiddenKeys.includes(key) || enumerableKeys.includes(key))
|
|
538
|
+
continue;
|
|
539
|
+
const descriptor = Object.getOwnPropertyDescriptor(current, key);
|
|
540
|
+
Object.defineProperty(result, key, descriptor);
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
function WithHidden2(hidden, keys, result) {
|
|
544
|
+
const enumerableKind = settings_exports.Get().enumerableKind;
|
|
545
|
+
for (const key of keys) {
|
|
546
|
+
if (guard_exports.IsUnsafePropertyKey(key))
|
|
547
|
+
continue;
|
|
671
548
|
Object.defineProperty(result, key, {
|
|
672
549
|
configurable: true,
|
|
673
550
|
writable: true,
|
|
674
|
-
enumerable:
|
|
551
|
+
enumerable: enumerableKind,
|
|
675
552
|
value: hidden[key]
|
|
676
553
|
});
|
|
677
554
|
}
|
|
678
|
-
|
|
555
|
+
}
|
|
556
|
+
function WithEnumerable2(enumerable, keys, result) {
|
|
557
|
+
for (const key of keys) {
|
|
558
|
+
if (guard_exports.IsUnsafePropertyKey(key))
|
|
559
|
+
continue;
|
|
679
560
|
Object.defineProperty(result, key, {
|
|
680
561
|
configurable: true,
|
|
681
562
|
enumerable: true,
|
|
@@ -683,7 +564,14 @@ function Update(current, hidden, enumerable) {
|
|
|
683
564
|
value: enumerable[key]
|
|
684
565
|
});
|
|
685
566
|
}
|
|
686
|
-
|
|
567
|
+
}
|
|
568
|
+
function Update(current, hidden, enumerable) {
|
|
569
|
+
Metrics.update += 1;
|
|
570
|
+
const result = {}, hiddenKeys = Keys2(hidden), enumerableKeys = Keys2(enumerable);
|
|
571
|
+
WithCurrent(current, hiddenKeys, enumerableKeys, result);
|
|
572
|
+
WithHidden2(hidden, hiddenKeys, result);
|
|
573
|
+
WithEnumerable2(enumerable, enumerableKeys, result);
|
|
574
|
+
return Finalize(result);
|
|
687
575
|
}
|
|
688
576
|
|
|
689
577
|
// node_modules/typebox/build/type/types/schema.mjs
|
|
@@ -703,11 +591,8 @@ function IsDeferred(value) {
|
|
|
703
591
|
}
|
|
704
592
|
|
|
705
593
|
// node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs
|
|
706
|
-
function AddReadonlyOperation(type) {
|
|
707
|
-
return memory_exports.Update(type, { "~readonly": true }, {});
|
|
708
|
-
}
|
|
709
594
|
function AddReadonlyAction(type, options) {
|
|
710
|
-
const result = memory_exports.Update(
|
|
595
|
+
const result = memory_exports.Update(type, { "~readonly": true }, options);
|
|
711
596
|
return result;
|
|
712
597
|
}
|
|
713
598
|
function AddReadonlyInstantiate(context, state, type, options) {
|
|
@@ -716,11 +601,8 @@ function AddReadonlyInstantiate(context, state, type, options) {
|
|
|
716
601
|
}
|
|
717
602
|
|
|
718
603
|
// node_modules/typebox/build/type/engine/optional/instantiate_add.mjs
|
|
719
|
-
function AddOptionalOperation(type) {
|
|
720
|
-
return memory_exports.Update(type, { "~optional": true }, {});
|
|
721
|
-
}
|
|
722
604
|
function AddOptionalAction(type, options) {
|
|
723
|
-
const result = memory_exports.Update(
|
|
605
|
+
const result = memory_exports.Update(type, { "~optional": true }, options);
|
|
724
606
|
return result;
|
|
725
607
|
}
|
|
726
608
|
function AddOptionalInstantiate(context, state, type, options) {
|
|
@@ -933,29 +815,6 @@ function Unreachable() {
|
|
|
933
815
|
}
|
|
934
816
|
|
|
935
817
|
// node_modules/typebox/build/system/hashing/hash.mjs
|
|
936
|
-
var ByteMarker;
|
|
937
|
-
(function(ByteMarker2) {
|
|
938
|
-
ByteMarker2[ByteMarker2["Array"] = 0] = "Array";
|
|
939
|
-
ByteMarker2[ByteMarker2["BigInt"] = 1] = "BigInt";
|
|
940
|
-
ByteMarker2[ByteMarker2["Boolean"] = 2] = "Boolean";
|
|
941
|
-
ByteMarker2[ByteMarker2["Date"] = 3] = "Date";
|
|
942
|
-
ByteMarker2[ByteMarker2["Constructor"] = 4] = "Constructor";
|
|
943
|
-
ByteMarker2[ByteMarker2["Function"] = 5] = "Function";
|
|
944
|
-
ByteMarker2[ByteMarker2["Null"] = 6] = "Null";
|
|
945
|
-
ByteMarker2[ByteMarker2["Number"] = 7] = "Number";
|
|
946
|
-
ByteMarker2[ByteMarker2["Object"] = 8] = "Object";
|
|
947
|
-
ByteMarker2[ByteMarker2["RegExp"] = 9] = "RegExp";
|
|
948
|
-
ByteMarker2[ByteMarker2["String"] = 10] = "String";
|
|
949
|
-
ByteMarker2[ByteMarker2["Symbol"] = 11] = "Symbol";
|
|
950
|
-
ByteMarker2[ByteMarker2["TypeArray"] = 12] = "TypeArray";
|
|
951
|
-
ByteMarker2[ByteMarker2["Undefined"] = 13] = "Undefined";
|
|
952
|
-
})(ByteMarker || (ByteMarker = {}));
|
|
953
|
-
var Accumulator = BigInt("14695981039346656037");
|
|
954
|
-
var [Prime, Size] = [BigInt("1099511628211"), BigInt(
|
|
955
|
-
"18446744073709551616"
|
|
956
|
-
/* 2 ^ 64 */
|
|
957
|
-
)];
|
|
958
|
-
var Bytes = Array.from({ length: 256 }).map((_, i) => BigInt(i));
|
|
959
818
|
var F64 = new Float64Array(1);
|
|
960
819
|
var F64In = new DataView(F64.buffer);
|
|
961
820
|
var F64Out = new Uint8Array(F64.buffer);
|
|
@@ -1056,7 +915,7 @@ function IsBigInt2(value) {
|
|
|
1056
915
|
function Boolean2(options) {
|
|
1057
916
|
return memory_exports.Create({ "~kind": "Boolean" }, { type: "boolean" }, options);
|
|
1058
917
|
}
|
|
1059
|
-
function
|
|
918
|
+
function IsBoolean2(value) {
|
|
1060
919
|
return IsKind(value, "Boolean");
|
|
1061
920
|
}
|
|
1062
921
|
|
|
@@ -1123,7 +982,7 @@ var NumberPattern = "-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?";
|
|
|
1123
982
|
function Number2(options) {
|
|
1124
983
|
return memory_exports.Create({ "~kind": "Number" }, { type: "number" }, options);
|
|
1125
984
|
}
|
|
1126
|
-
function
|
|
985
|
+
function IsNumber2(value) {
|
|
1127
986
|
return IsKind(value, "Number");
|
|
1128
987
|
}
|
|
1129
988
|
|
|
@@ -1153,7 +1012,7 @@ var StringPattern = ".*";
|
|
|
1153
1012
|
function String2(options) {
|
|
1154
1013
|
return memory_exports.Create({ "~kind": "String" }, { type: "string" }, options);
|
|
1155
1014
|
}
|
|
1156
|
-
function
|
|
1015
|
+
function IsString2(value) {
|
|
1157
1016
|
return IsKind(value, "String");
|
|
1158
1017
|
}
|
|
1159
1018
|
|
|
@@ -1271,25 +1130,17 @@ function TupleOptions(type) {
|
|
|
1271
1130
|
return memory_exports.Discard(type, ["~kind", "type", "items", "minItems", "additionalItems"]);
|
|
1272
1131
|
}
|
|
1273
1132
|
|
|
1274
|
-
// node_modules/typebox/build/type/engine/
|
|
1275
|
-
function
|
|
1276
|
-
|
|
1277
|
-
}
|
|
1278
|
-
|
|
1279
|
-
const result = memory_exports.Update(RemoveReadonlyOperation(type), {}, options);
|
|
1133
|
+
// node_modules/typebox/build/type/engine/tuple/to_object.mjs
|
|
1134
|
+
function TupleElementsToProperties(types) {
|
|
1135
|
+
const result = types.reduceRight((result2, right, index) => {
|
|
1136
|
+
return { [index]: right, ...result2 };
|
|
1137
|
+
}, {});
|
|
1280
1138
|
return result;
|
|
1281
1139
|
}
|
|
1282
|
-
function
|
|
1283
|
-
const
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
// node_modules/typebox/build/type/action/_remove_readonly.mjs
|
|
1288
|
-
function RemoveReadonlyDeferred(type, options = {}) {
|
|
1289
|
-
return Deferred("RemoveReadonly", [type], options);
|
|
1290
|
-
}
|
|
1291
|
-
function RemoveReadonly(type, options = {}) {
|
|
1292
|
-
return RemoveReadonlyAction(type, options);
|
|
1140
|
+
function TupleToObject(type) {
|
|
1141
|
+
const properties = TupleElementsToProperties(type.items);
|
|
1142
|
+
const result = _Object_(properties);
|
|
1143
|
+
return result;
|
|
1293
1144
|
}
|
|
1294
1145
|
|
|
1295
1146
|
// node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs
|
|
@@ -1305,88 +1156,90 @@ function RemoveOptionalInstantiate(context, state, type, options) {
|
|
|
1305
1156
|
return RemoveOptionalAction(instantiatedType, options);
|
|
1306
1157
|
}
|
|
1307
1158
|
|
|
1308
|
-
// node_modules/typebox/build/type/
|
|
1309
|
-
function
|
|
1310
|
-
return
|
|
1311
|
-
}
|
|
1312
|
-
function RemoveOptional(type, options = {}) {
|
|
1313
|
-
return RemoveOptionalAction(type, options);
|
|
1159
|
+
// node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs
|
|
1160
|
+
function RemoveReadonlyOperation(type) {
|
|
1161
|
+
return memory_exports.Discard(type, ["~readonly"]);
|
|
1314
1162
|
}
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
function TupleElementsToProperties(types) {
|
|
1318
|
-
const result = types.reduceRight((result2, right, index) => {
|
|
1319
|
-
return { [index]: right, ...result2 };
|
|
1320
|
-
}, {});
|
|
1163
|
+
function RemoveReadonlyAction(type, options) {
|
|
1164
|
+
const result = memory_exports.Update(RemoveReadonlyOperation(type), {}, options);
|
|
1321
1165
|
return result;
|
|
1322
1166
|
}
|
|
1323
|
-
function
|
|
1324
|
-
const
|
|
1325
|
-
|
|
1326
|
-
return result;
|
|
1167
|
+
function RemoveReadonlyInstantiate(context, state, type, options) {
|
|
1168
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
1169
|
+
return RemoveReadonlyAction(instantiatedType, options);
|
|
1327
1170
|
}
|
|
1328
1171
|
|
|
1329
|
-
// node_modules/typebox/build/type/engine/evaluate/
|
|
1330
|
-
function
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
function IsOptionalProperty(left, right) {
|
|
1334
|
-
return IsOptional(left) ? IsOptional(right) ? true : false : false;
|
|
1335
|
-
}
|
|
1336
|
-
function CompositeProperty(left, right) {
|
|
1337
|
-
const isReadonly = IsReadonlyProperty(left, right);
|
|
1338
|
-
const isOptional = IsOptionalProperty(left, right);
|
|
1172
|
+
// node_modules/typebox/build/type/engine/evaluate/property.mjs
|
|
1173
|
+
function EvaluatePropertyIntersect(left, right) {
|
|
1174
|
+
const isReadonly = IsReadonly(left) && IsReadonly(right);
|
|
1175
|
+
const isOptional = IsOptional(left) && IsOptional(right);
|
|
1339
1176
|
const evaluated = EvaluateIntersect([left, right]);
|
|
1340
|
-
const property =
|
|
1341
|
-
return isReadonly && isOptional ?
|
|
1177
|
+
const property = RemoveReadonlyAction(RemoveOptionalAction(evaluated, {}), {});
|
|
1178
|
+
return isReadonly && isOptional ? AddReadonlyAction(AddOptionalAction(property, {}), {}) : isReadonly ? AddReadonlyAction(property, {}) : isOptional ? AddOptionalAction(property, {}) : property;
|
|
1179
|
+
}
|
|
1180
|
+
function EvaluatePropertyUnion(left, right) {
|
|
1181
|
+
const isReadonly = IsReadonly(left) || IsReadonly(right);
|
|
1182
|
+
const isOptional = IsOptional(left) || IsOptional(right);
|
|
1183
|
+
const leftProperty = RemoveReadonlyAction(RemoveOptionalAction(left, {}), {});
|
|
1184
|
+
const rightProperty = RemoveReadonlyAction(RemoveOptionalAction(right, {}), {});
|
|
1185
|
+
const property = EvaluateUnion([leftProperty, rightProperty]);
|
|
1186
|
+
return isReadonly && isOptional ? AddReadonlyAction(AddOptionalAction(property, {}), {}) : isReadonly ? AddReadonlyAction(property, {}) : isOptional ? AddOptionalAction(property, {}) : property;
|
|
1342
1187
|
}
|
|
1188
|
+
|
|
1189
|
+
// node_modules/typebox/build/type/engine/evaluate/composite.mjs
|
|
1343
1190
|
function CompositePropertyKey(left, right, key) {
|
|
1344
|
-
return key in left ? key in right ?
|
|
1191
|
+
return key in left ? key in right ? EvaluatePropertyIntersect(left[key], right[key]) : left[key] : key in right ? right[key] : Never();
|
|
1345
1192
|
}
|
|
1346
1193
|
function CompositeProperties(left, right) {
|
|
1347
|
-
const keys = /* @__PURE__ */ new Set([...guard_exports.Keys(
|
|
1348
|
-
|
|
1349
|
-
return { ...
|
|
1194
|
+
const keys = /* @__PURE__ */ new Set([...guard_exports.Keys(left), ...guard_exports.Keys(right)]);
|
|
1195
|
+
const result = [...keys].reduce((result2, key) => {
|
|
1196
|
+
return { ...result2, [key]: CompositePropertyKey(left, right, key) };
|
|
1350
1197
|
}, {});
|
|
1198
|
+
return result;
|
|
1351
1199
|
}
|
|
1352
1200
|
function GetProperties(type) {
|
|
1353
|
-
const result = IsObject2(type) ? type.properties : IsTuple(type) ? TupleElementsToProperties(type.items) :
|
|
1201
|
+
const result = IsObject2(type) ? type.properties : IsTuple(type) ? TupleElementsToProperties(type.items) : {};
|
|
1354
1202
|
return result;
|
|
1355
1203
|
}
|
|
1356
1204
|
function Composite(left, right) {
|
|
1357
1205
|
const leftProperties = GetProperties(left);
|
|
1358
1206
|
const rightProperties = GetProperties(right);
|
|
1359
1207
|
const properties = CompositeProperties(leftProperties, rightProperties);
|
|
1360
|
-
|
|
1208
|
+
const result = _Object_(properties);
|
|
1209
|
+
return result;
|
|
1361
1210
|
}
|
|
1362
1211
|
|
|
1363
1212
|
// node_modules/typebox/build/type/engine/evaluate/narrow.mjs
|
|
1364
|
-
function
|
|
1213
|
+
function NarrowCompareRule(left, right) {
|
|
1365
1214
|
const result = Compare(left, right);
|
|
1366
|
-
return guard_exports.IsEqual(result,
|
|
1215
|
+
return guard_exports.IsEqual(result, CompareResultLeftInside) ? left : guard_exports.IsEqual(result, CompareResultRightInside) ? right : guard_exports.IsEqual(result, CompareResultEqual) ? right : Never();
|
|
1367
1216
|
}
|
|
1368
|
-
|
|
1369
|
-
// node_modules/typebox/build/type/engine/evaluate/distribute.mjs
|
|
1370
|
-
function IsObjectLike(type) {
|
|
1217
|
+
function CanComposite(type) {
|
|
1371
1218
|
return IsObject2(type) || IsTuple(type);
|
|
1372
1219
|
}
|
|
1373
|
-
function
|
|
1374
|
-
const
|
|
1375
|
-
const
|
|
1376
|
-
|
|
1220
|
+
function NarrowCompositeRule(left, right) {
|
|
1221
|
+
const canCompositeLeft = CanComposite(left);
|
|
1222
|
+
const canCompositeRight = CanComposite(right);
|
|
1223
|
+
return canCompositeLeft && canCompositeRight ? Composite(left, right) : canCompositeLeft && !canCompositeRight ? left : !canCompositeLeft && canCompositeRight ? right : NarrowCompareRule(left, right);
|
|
1224
|
+
}
|
|
1225
|
+
function Narrow(left, right) {
|
|
1226
|
+
return IsNever(left) ? left : IsAny(left) ? left : IsUnknown(left) ? right : IsNever(right) ? right : IsAny(right) ? right : IsUnknown(right) ? left : NarrowCompositeRule(left, right);
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
// node_modules/typebox/build/type/engine/evaluate/distribute.mjs
|
|
1230
|
+
function ShouldEvaluate(left, right) {
|
|
1231
|
+
const result = IsUnion(left) || IsUnion(right);
|
|
1377
1232
|
return result;
|
|
1378
1233
|
}
|
|
1379
1234
|
function DistributeOperation(left, right) {
|
|
1380
1235
|
const evaluatedLeft = EvaluateType(left);
|
|
1381
1236
|
const evaluatedRight = EvaluateType(right);
|
|
1382
|
-
const
|
|
1383
|
-
const
|
|
1384
|
-
const IsObjectRight = IsObjectLike(evaluatedRight);
|
|
1385
|
-
const result = isUnionOperand ? EvaluateIntersect([evaluatedLeft, evaluatedRight]) : isObjectLeft && IsObjectRight ? Composite(evaluatedLeft, evaluatedRight) : isObjectLeft && !IsObjectRight ? evaluatedLeft : !isObjectLeft && IsObjectRight ? evaluatedRight : Narrow(evaluatedLeft, evaluatedRight);
|
|
1237
|
+
const shouldEvaluate = ShouldEvaluate(evaluatedLeft, evaluatedRight);
|
|
1238
|
+
const result = shouldEvaluate ? EvaluateIntersect([evaluatedLeft, evaluatedRight]) : Narrow(evaluatedLeft, evaluatedRight);
|
|
1386
1239
|
return result;
|
|
1387
1240
|
}
|
|
1388
1241
|
function DistributeType(type, types, result = []) {
|
|
1389
|
-
return guard_exports.ShiftLeft(types, (left, right) => DistributeType(type, right, [...result, DistributeOperation(
|
|
1242
|
+
return guard_exports.ShiftLeft(types, (left, right) => DistributeType(type, right, [...result, DistributeOperation(left, type)]), () => guard_exports.IsEqual(result.length, 0) ? [type] : result);
|
|
1390
1243
|
}
|
|
1391
1244
|
function DistributeUnion(types, distribution, result = []) {
|
|
1392
1245
|
return guard_exports.ShiftLeft(types, (left, right) => DistributeUnion(right, distribution, [...result, ...Distribute([left], distribution)]), () => result);
|
|
@@ -1401,10 +1254,8 @@ function ExcludeType(left, right) {
|
|
|
1401
1254
|
const result = result_exports.IsExtendsTrueLike(check) ? [] : [left];
|
|
1402
1255
|
return result;
|
|
1403
1256
|
}
|
|
1404
|
-
function ExcludeUnion(
|
|
1405
|
-
return
|
|
1406
|
-
return [...result, ...ExcludeType(head, right)];
|
|
1407
|
-
}, []);
|
|
1257
|
+
function ExcludeUnion(left, right, result = []) {
|
|
1258
|
+
return guard_exports.ShiftLeft(left, (head, tail) => ExcludeUnion(tail, right, [...result, ...ExcludeType(head, right)]), () => result);
|
|
1408
1259
|
}
|
|
1409
1260
|
function ExcludeOperation(left, right) {
|
|
1410
1261
|
const evaluated = EvaluateType(left);
|
|
@@ -1416,19 +1267,18 @@ function ExcludeOperation(left, right) {
|
|
|
1416
1267
|
|
|
1417
1268
|
// node_modules/typebox/build/type/engine/evaluate/evaluate.mjs
|
|
1418
1269
|
function EvaluateDependent(if_, then_, else_) {
|
|
1419
|
-
const
|
|
1270
|
+
const intersected = EvaluateIntersect([if_, then_]);
|
|
1420
1271
|
const excluded = ExcludeOperation(else_, if_);
|
|
1421
|
-
const result = EvaluateUnion([
|
|
1272
|
+
const result = EvaluateUnion([intersected, excluded]);
|
|
1422
1273
|
return result;
|
|
1423
1274
|
}
|
|
1424
|
-
function EvaluateEnum(values) {
|
|
1425
|
-
|
|
1426
|
-
return EvaluateUnion(result);
|
|
1275
|
+
function EvaluateEnum(values, result = []) {
|
|
1276
|
+
return guard_exports.ShiftLeft(values, (left, right) => EvaluateEnum(right, [...result, Literal(left)]), () => EvaluateUnion(result));
|
|
1427
1277
|
}
|
|
1428
1278
|
function EvaluateIntersect(types) {
|
|
1429
1279
|
const distribution = Distribute(types);
|
|
1430
1280
|
const broadend = Broaden(distribution);
|
|
1431
|
-
const result =
|
|
1281
|
+
const result = EvaluateUnion(broadend);
|
|
1432
1282
|
return result;
|
|
1433
1283
|
}
|
|
1434
1284
|
function EvaluateTemplateLiteral(pattern) {
|
|
@@ -1442,7 +1292,8 @@ function EvaluateUnion(types) {
|
|
|
1442
1292
|
return result;
|
|
1443
1293
|
}
|
|
1444
1294
|
function EvaluateType(type) {
|
|
1445
|
-
|
|
1295
|
+
const result = IsDependent(type) ? EvaluateDependent(type.if, type.then, type.else) : IsEnum(type) ? EvaluateEnum(type.enum) : IsIntersect(type) ? EvaluateIntersect(type.allOf) : IsTemplateLiteral(type) ? EvaluateTemplateLiteral(type.pattern) : IsUnion(type) ? EvaluateUnion(type.anyOf) : type;
|
|
1296
|
+
return result;
|
|
1446
1297
|
}
|
|
1447
1298
|
function EvaluateUnionFast(types) {
|
|
1448
1299
|
const result = guard_exports.IsEqual(types.length, 1) ? types[0] : guard_exports.IsEqual(types.length, 0) ? Never() : Union(types);
|
|
@@ -1498,15 +1349,13 @@ function FlattenType(type) {
|
|
|
1498
1349
|
const result = IsUnion(type) ? Flatten(type.anyOf) : [type];
|
|
1499
1350
|
return result;
|
|
1500
1351
|
}
|
|
1501
|
-
function Flatten(types) {
|
|
1502
|
-
return
|
|
1503
|
-
return [...result, ...FlattenType(type)];
|
|
1504
|
-
}, []);
|
|
1352
|
+
function Flatten(types, result = []) {
|
|
1353
|
+
return guard_exports.ShiftLeft(types, (left, right) => Flatten(right, [...result, ...FlattenType(left)]), () => result);
|
|
1505
1354
|
}
|
|
1506
1355
|
|
|
1507
1356
|
// node_modules/typebox/build/type/engine/record/from_key_union.mjs
|
|
1508
1357
|
function StringOrNumberCheck(types) {
|
|
1509
|
-
return types.some((type) =>
|
|
1358
|
+
return types.some((type) => IsString2(type) || IsNumber2(type) || IsInteger2(type));
|
|
1510
1359
|
}
|
|
1511
1360
|
function TryBuildRecord(types, value) {
|
|
1512
1361
|
return guard_exports.IsEqual(StringOrNumberCheck(types), true) ? CreateRecord(StringKey, value) : void 0;
|
|
@@ -1529,7 +1378,7 @@ function FromUnionKey(types, value) {
|
|
|
1529
1378
|
|
|
1530
1379
|
// node_modules/typebox/build/type/engine/record/from_key.mjs
|
|
1531
1380
|
function FromKey(key, value) {
|
|
1532
|
-
const result = IsAny(key) ? FromAnyKey(value) :
|
|
1381
|
+
const result = IsAny(key) ? FromAnyKey(value) : IsBoolean2(key) ? FromBooleanKey(value) : IsEnum(key) ? FromEnumKey(key.enum, value) : IsInteger2(key) ? FromIntegerKey(key, value) : IsIntersect(key) ? FromIntersectKey(key.allOf, value) : IsLiteral(key) ? FromLiteralKey(key.const, value) : IsNumber2(key) ? FromNumberKey(key, value) : IsUnion(key) ? FromUnionKey(key.anyOf, value) : IsString2(key) ? FromStringKey(key, value) : IsTemplateLiteral(key) ? FromTemplateKey(key.pattern, value) : _Object_({});
|
|
1533
1382
|
return result;
|
|
1534
1383
|
}
|
|
1535
1384
|
|
|
@@ -1811,7 +1660,7 @@ function PropertyKeyQuotedMapping(input) {
|
|
|
1811
1660
|
return input;
|
|
1812
1661
|
}
|
|
1813
1662
|
function PropertyKeyIndexMapping(input) {
|
|
1814
|
-
return IsInteger2(input[3]) ? IntegerKey :
|
|
1663
|
+
return IsInteger2(input[3]) ? IntegerKey : IsNumber2(input[3]) ? NumberKey : IsSymbol2(input[3]) ? StringKey : IsString2(input[3]) ? StringKey : Unreachable2();
|
|
1815
1664
|
}
|
|
1816
1665
|
function PropertyKeyMapping(input) {
|
|
1817
1666
|
return input;
|
|
@@ -2490,7 +2339,7 @@ function EncodeUnion(types, right, pattern, result = []) {
|
|
|
2490
2339
|
return guard_exports.ShiftLeft(types, (head, tail) => EncodeUnion(tail, right, pattern, [...result, EncodeType(head, [], "")]), () => EncodeTypes(right, `${pattern}(${JoinString(result)})`));
|
|
2491
2340
|
}
|
|
2492
2341
|
function EncodeType(type, right, pattern) {
|
|
2493
|
-
return IsEnum(type) ? EncodeEnum(type.enum, right, pattern) : IsInteger2(type) ? EncodeInteger(right, pattern) : IsLiteral(type) ? EncodeLiteral(type.const, right, pattern) : IsBigInt2(type) ? EncodeBigInt(right, pattern) :
|
|
2342
|
+
return IsEnum(type) ? EncodeEnum(type.enum, right, pattern) : IsInteger2(type) ? EncodeInteger(right, pattern) : IsLiteral(type) ? EncodeLiteral(type.const, right, pattern) : IsBigInt2(type) ? EncodeBigInt(right, pattern) : IsBoolean2(type) ? EncodeBoolean(right, pattern) : IsNumber2(type) ? EncodeNumber(right, pattern) : IsString2(type) ? EncodeString(right, pattern) : IsTemplateLiteral(type) ? EncodeTemplateLiteral(type.pattern, right, pattern) : IsTemplateLiteralDeferred(type) ? EncodeTemplateLiteralDeferred(type.parameters[0], right, pattern) : IsUnion(type) ? EncodeUnion(type.anyOf, right, pattern) : NeverPattern;
|
|
2494
2343
|
}
|
|
2495
2344
|
function EncodeTypes(types, pattern) {
|
|
2496
2345
|
return guard_exports.ShiftLeft(types, (left, right) => EncodeType(left, right, pattern), () => pattern);
|
|
@@ -2625,7 +2474,7 @@ function ExtendsBigInt(inferred, left, right) {
|
|
|
2625
2474
|
|
|
2626
2475
|
// node_modules/typebox/build/type/extends/boolean.mjs
|
|
2627
2476
|
function ExtendsBoolean(inferred, left, right) {
|
|
2628
|
-
return
|
|
2477
|
+
return IsBoolean2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
2629
2478
|
}
|
|
2630
2479
|
|
|
2631
2480
|
// node_modules/typebox/build/type/extends/parameters.mjs
|
|
@@ -2674,7 +2523,7 @@ function ExtendsFunction(inferred, parameters, returnType, right) {
|
|
|
2674
2523
|
|
|
2675
2524
|
// node_modules/typebox/build/type/extends/integer.mjs
|
|
2676
2525
|
function ExtendsInteger(inferred, left, right) {
|
|
2677
|
-
return IsInteger2(right) ? ExtendsTrue(inferred) :
|
|
2526
|
+
return IsInteger2(right) ? ExtendsTrue(inferred) : IsNumber2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
2678
2527
|
}
|
|
2679
2528
|
|
|
2680
2529
|
// node_modules/typebox/build/type/extends/intersect.mjs
|
|
@@ -2691,13 +2540,13 @@ function ExtendsLiteralBigInt(inferred, left, right) {
|
|
|
2691
2540
|
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) : IsBigInt2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, Literal(left), right);
|
|
2692
2541
|
}
|
|
2693
2542
|
function ExtendsLiteralBoolean(inferred, left, right) {
|
|
2694
|
-
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) :
|
|
2543
|
+
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) : IsBoolean2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, Literal(left), right);
|
|
2695
2544
|
}
|
|
2696
2545
|
function ExtendsLiteralNumber(inferred, left, right) {
|
|
2697
|
-
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) :
|
|
2546
|
+
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) : IsNumber2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, Literal(left), right);
|
|
2698
2547
|
}
|
|
2699
2548
|
function ExtendsLiteralString(inferred, left, right) {
|
|
2700
|
-
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) :
|
|
2549
|
+
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) : IsString2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, Literal(left), right);
|
|
2701
2550
|
}
|
|
2702
2551
|
function ExtendsLiteral(inferred, left, right) {
|
|
2703
2552
|
return guard_exports.IsBigInt(left.const) ? ExtendsLiteralBigInt(inferred, left.const, right) : guard_exports.IsBoolean(left.const) ? ExtendsLiteralBoolean(inferred, left.const, right) : guard_exports.IsNumber(left.const) ? ExtendsLiteralNumber(inferred, left.const, right) : guard_exports.IsString(left.const) ? ExtendsLiteralString(inferred, left.const, right) : Unreachable();
|
|
@@ -2715,7 +2564,7 @@ function ExtendsNull(inferred, left, right) {
|
|
|
2715
2564
|
|
|
2716
2565
|
// node_modules/typebox/build/type/extends/number.mjs
|
|
2717
2566
|
function ExtendsNumber(inferred, left, right) {
|
|
2718
|
-
return
|
|
2567
|
+
return IsNumber2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
2719
2568
|
}
|
|
2720
2569
|
|
|
2721
2570
|
// node_modules/typebox/build/type/extends/object.mjs
|
|
@@ -2770,19 +2619,19 @@ function ExtendsObject(inferred, left, right) {
|
|
|
2770
2619
|
}
|
|
2771
2620
|
|
|
2772
2621
|
// node_modules/typebox/build/type/extends/record.mjs
|
|
2773
|
-
function
|
|
2622
|
+
function FromObject(inferred, properties) {
|
|
2774
2623
|
return guard_exports.IsEqual(guard_exports.Keys(properties).length, 0) ? ExtendsTrue(inferred) : ExtendsFalse();
|
|
2775
2624
|
}
|
|
2776
2625
|
function FromRecord(inferred, _leftKey, leftValue, _rightKey, rightValue) {
|
|
2777
2626
|
return ExtendsLeft(inferred, leftValue, rightValue);
|
|
2778
2627
|
}
|
|
2779
2628
|
function ExtendsRecord(inferred, leftPattern, leftValue, right) {
|
|
2780
|
-
return IsRecord(right) ? FromRecord(inferred, RecordPatternToType(leftPattern), leftValue, RecordPatternToType(RecordPattern(right)), RecordValue(right)) : IsObject2(right) ?
|
|
2629
|
+
return IsRecord(right) ? FromRecord(inferred, RecordPatternToType(leftPattern), leftValue, RecordPatternToType(RecordPattern(right)), RecordValue(right)) : IsObject2(right) ? FromObject(inferred, right.properties) : IsAny(right) ? ExtendsTrue(inferred) : IsUnknown(right) ? ExtendsTrue(inferred) : ExtendsFalse();
|
|
2781
2630
|
}
|
|
2782
2631
|
|
|
2783
2632
|
// node_modules/typebox/build/type/extends/string.mjs
|
|
2784
2633
|
function ExtendsString(inferred, left, right) {
|
|
2785
|
-
return
|
|
2634
|
+
return IsString2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
2786
2635
|
}
|
|
2787
2636
|
|
|
2788
2637
|
// node_modules/typebox/build/type/extends/symbol.mjs
|
|
@@ -2809,8 +2658,14 @@ function TryRestInferable(type) {
|
|
|
2809
2658
|
function TryInferable(type) {
|
|
2810
2659
|
return IsInfer(type) ? Inferrable(type.name, type.extends) : void 0;
|
|
2811
2660
|
}
|
|
2812
|
-
function TryInferResults(rest, right
|
|
2813
|
-
|
|
2661
|
+
function TryInferResults(rest, right) {
|
|
2662
|
+
const result = [];
|
|
2663
|
+
for (const head of rest) {
|
|
2664
|
+
if (!IsExtendsTrueLike(ExtendsLeft({}, head, right)))
|
|
2665
|
+
return void 0;
|
|
2666
|
+
result.push(head);
|
|
2667
|
+
}
|
|
2668
|
+
return result;
|
|
2814
2669
|
}
|
|
2815
2670
|
function InferTupleResult(inferred, name, left, right) {
|
|
2816
2671
|
const results = TryInferResults(left, right);
|
|
@@ -2854,9 +2709,18 @@ function ExtendsTupleToTuple(inferred, left, right) {
|
|
|
2854
2709
|
const reversed = Reversed(instantiatedRight);
|
|
2855
2710
|
return Elements(inferred, reversed, ApplyReverse(left, reversed), ApplyReverse(instantiatedRight, reversed));
|
|
2856
2711
|
}
|
|
2712
|
+
function ExtendsTupleToArrayReduce(inferred, left, right) {
|
|
2713
|
+
for (const head of left) {
|
|
2714
|
+
const result = ExtendsLeft(inferred, head, right);
|
|
2715
|
+
if (!IsExtendsTrueLike(result))
|
|
2716
|
+
return result;
|
|
2717
|
+
inferred = result.inferred;
|
|
2718
|
+
}
|
|
2719
|
+
return ExtendsTrue(inferred);
|
|
2720
|
+
}
|
|
2857
2721
|
function ExtendsTupleToArray(inferred, left, right) {
|
|
2858
2722
|
const inferrable = TryInferable(right);
|
|
2859
|
-
return IsInferable(inferrable) ? InferUnionResult(inferred, inferrable["name"], left, inferrable["type"]) :
|
|
2723
|
+
return IsInferable(inferrable) ? InferUnionResult(inferred, inferrable["name"], left, inferrable["type"]) : ExtendsTupleToArrayReduce(inferred, left, right);
|
|
2860
2724
|
}
|
|
2861
2725
|
function ExtendsTuple(inferred, left, right) {
|
|
2862
2726
|
const instantiatedLeft = InstantiateElements(inferred, State([], []), left);
|
|
@@ -2892,7 +2756,7 @@ function ExtendsVoid(inferred, left, right) {
|
|
|
2892
2756
|
|
|
2893
2757
|
// node_modules/typebox/build/type/extends/extends_left.mjs
|
|
2894
2758
|
function ExtendsLeft(inferred, left, right) {
|
|
2895
|
-
return IsAny(left) ? ExtendsAny(inferred, left, right) : IsArray2(left) ? ExtendsArray(inferred, left, left.items, right) : IsBigInt2(left) ? ExtendsBigInt(inferred, left, right) :
|
|
2759
|
+
return IsAny(left) ? ExtendsAny(inferred, left, right) : IsArray2(left) ? ExtendsArray(inferred, left, left.items, right) : IsBigInt2(left) ? ExtendsBigInt(inferred, left, right) : IsBoolean2(left) ? ExtendsBoolean(inferred, left, right) : IsConstructor2(left) ? ExtendsConstructor(inferred, left.parameters, left.instanceType, right) : IsDependent(left) ? ExtendsDependent(inferred, left.if, left.then, left.else, right) : IsEnum(left) ? ExtendsEnum(inferred, left.enum, right) : IsFunction2(left) ? ExtendsFunction(inferred, left.parameters, left.returnType, right) : IsInteger2(left) ? ExtendsInteger(inferred, left, right) : IsIntersect(left) ? ExtendsIntersect(inferred, left.allOf, right) : IsLiteral(left) ? ExtendsLiteral(inferred, left, right) : IsNever(left) ? ExtendsNever(inferred, left, right) : IsNull2(left) ? ExtendsNull(inferred, left, right) : IsNumber2(left) ? ExtendsNumber(inferred, left, right) : IsObject2(left) ? ExtendsObject(inferred, left.properties, right) : IsRecord(left) ? ExtendsRecord(inferred, RecordPattern(left), RecordValue(left), right) : IsString2(left) ? ExtendsString(inferred, left, right) : IsSymbol2(left) ? ExtendsSymbol(inferred, left, right) : IsTemplateLiteral(left) ? ExtendsTemplateLiteral(inferred, left.pattern, right) : IsTuple(left) ? ExtendsTuple(inferred, left.items, right) : IsUndefined2(left) ? ExtendsUndefined(inferred, left, right) : IsUnion(left) ? ExtendsUnion2(inferred, left.anyOf, right) : IsUnknown(left) ? ExtendsUnknown(inferred, left, right) : IsVoid(left) ? ExtendsVoid(inferred, left, right) : ExtendsFalse();
|
|
2896
2760
|
}
|
|
2897
2761
|
|
|
2898
2762
|
// node_modules/typebox/build/type/engine/interface/instantiate.mjs
|
|
@@ -3039,45 +2903,40 @@ function Extends(inferred, left, right) {
|
|
|
3039
2903
|
}
|
|
3040
2904
|
|
|
3041
2905
|
// node_modules/typebox/build/type/engine/evaluate/compare.mjs
|
|
3042
|
-
var
|
|
3043
|
-
var
|
|
3044
|
-
var
|
|
3045
|
-
var
|
|
2906
|
+
var CompareResultEqual = 0;
|
|
2907
|
+
var CompareResultDisjoint = 1;
|
|
2908
|
+
var CompareResultLeftInside = 2;
|
|
2909
|
+
var CompareResultRightInside = 3;
|
|
3046
2910
|
function Compare(left, right) {
|
|
3047
|
-
const extendsCheck = [
|
|
3048
|
-
|
|
3049
|
-
IsUnknown(left) ? result_exports.ExtendsTrue({}) : Extends({}, right, left)
|
|
3050
|
-
];
|
|
3051
|
-
return result_exports.IsExtendsTrueLike(extendsCheck[0]) && result_exports.IsExtendsTrueLike(extendsCheck[1]) ? ResultEqual : result_exports.IsExtendsTrueLike(extendsCheck[0]) && result_exports.IsExtendsFalse(extendsCheck[1]) ? ResultLeftInside : result_exports.IsExtendsFalse(extendsCheck[0]) && result_exports.IsExtendsTrueLike(extendsCheck[1]) ? ResultRightInside : ResultDisjoint;
|
|
2911
|
+
const extendsCheck = [Extends({}, left, right), Extends({}, right, left)];
|
|
2912
|
+
return result_exports.IsExtendsTrueLike(extendsCheck[0]) && result_exports.IsExtendsTrueLike(extendsCheck[1]) ? CompareResultEqual : result_exports.IsExtendsTrueLike(extendsCheck[0]) && result_exports.IsExtendsFalse(extendsCheck[1]) ? CompareResultLeftInside : result_exports.IsExtendsFalse(extendsCheck[0]) && result_exports.IsExtendsTrueLike(extendsCheck[1]) ? CompareResultRightInside : CompareResultDisjoint;
|
|
3052
2913
|
}
|
|
3053
2914
|
|
|
3054
2915
|
// node_modules/typebox/build/type/engine/evaluate/broaden.mjs
|
|
3055
|
-
function
|
|
3056
|
-
return
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
}
|
|
3060
|
-
function IsBroadestType(type, types) {
|
|
3061
|
-
const result = types.some((left) => {
|
|
3062
|
-
const result2 = Compare(type, left);
|
|
3063
|
-
return guard_exports.IsEqual(result2, ResultLeftInside) || guard_exports.IsEqual(result2, ResultEqual);
|
|
3064
|
-
});
|
|
3065
|
-
return guard_exports.IsEqual(result, false);
|
|
2916
|
+
function BroadenFilter(type, types, result = [], all = types) {
|
|
2917
|
+
return guard_exports.ShiftLeft(types, (left, right) => {
|
|
2918
|
+
const compare = Compare(type, left);
|
|
2919
|
+
return guard_exports.IsEqual(compare, CompareResultLeftInside) || guard_exports.IsEqual(compare, CompareResultEqual) ? all : guard_exports.IsEqual(compare, CompareResultDisjoint) ? BroadenFilter(type, right, [...result, left], all) : BroadenFilter(type, right, result, all);
|
|
2920
|
+
}, () => [...result, type]);
|
|
3066
2921
|
}
|
|
3067
|
-
function BroadenType(type, types) {
|
|
2922
|
+
function BroadenType(type, types, result) {
|
|
3068
2923
|
const evaluated = EvaluateType(type);
|
|
3069
|
-
return IsAny(evaluated) ? [evaluated] :
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
2924
|
+
return IsAny(evaluated) ? [evaluated] : (
|
|
2925
|
+
// terminate (always the most broad)
|
|
2926
|
+
IsUnknown(evaluated) ? [evaluated] : (
|
|
2927
|
+
// terminate (always the most broad)
|
|
2928
|
+
IsNever(evaluated) ? BroadenTypes(types, result) : (
|
|
2929
|
+
// ignored: never is dropped
|
|
2930
|
+
IsObject2(evaluated) ? BroadenTypes(types, [...result, evaluated]) : (
|
|
2931
|
+
// objects are always considered (too expensive to compare)
|
|
2932
|
+
BroadenTypes(types, BroadenFilter(evaluated, result))
|
|
2933
|
+
)
|
|
3078
2934
|
)
|
|
3079
|
-
)
|
|
3080
|
-
|
|
2935
|
+
)
|
|
2936
|
+
);
|
|
2937
|
+
}
|
|
2938
|
+
function BroadenTypes(types, result = []) {
|
|
2939
|
+
return guard_exports.ShiftLeft(types, (left, right) => BroadenType(left, right, result), () => result);
|
|
3081
2940
|
}
|
|
3082
2941
|
function Broaden(types) {
|
|
3083
2942
|
const broadened = BroadenTypes(types);
|
|
@@ -3438,10 +3297,8 @@ function ExtractType(left, right) {
|
|
|
3438
3297
|
const result = result_exports.IsExtendsTrueLike(check) ? [left] : [];
|
|
3439
3298
|
return result;
|
|
3440
3299
|
}
|
|
3441
|
-
function ExtractUnion(
|
|
3442
|
-
return
|
|
3443
|
-
return [...result, ...ExtractType(head, right)];
|
|
3444
|
-
}, []);
|
|
3300
|
+
function ExtractUnion(left, right, result = []) {
|
|
3301
|
+
return guard_exports.ShiftLeft(left, (head, tail) => ExtractUnion(tail, right, [...result, ...ExtractType(head, right)]), () => result);
|
|
3445
3302
|
}
|
|
3446
3303
|
function ExtractOperation(left, right) {
|
|
3447
3304
|
const evaluated = EvaluateType(left);
|
|
@@ -3504,7 +3361,7 @@ function CollapseIntersectProperties(left, right) {
|
|
|
3504
3361
|
const sharedKeys = guard_exports.Keys(left).filter((key) => guard_exports.HasPropertyKey(right, key));
|
|
3505
3362
|
const leftProperties = leftKeys.reduce((result, key) => ({ ...result, [key]: left[key] }), {});
|
|
3506
3363
|
const rightProperties = rightKeys.reduce((result, key) => ({ ...result, [key]: right[key] }), {});
|
|
3507
|
-
const sharedProperties = sharedKeys.reduce((result, key) => ({ ...result, [key]:
|
|
3364
|
+
const sharedProperties = sharedKeys.reduce((result, key) => ({ ...result, [key]: EvaluatePropertyIntersect(left[key], right[key]) }), {});
|
|
3508
3365
|
const unique = memory_exports.Assign(leftProperties, rightProperties);
|
|
3509
3366
|
const shared = memory_exports.Assign(unique, sharedProperties);
|
|
3510
3367
|
return shared;
|
|
@@ -3516,7 +3373,7 @@ function FromIntersect(types) {
|
|
|
3516
3373
|
}
|
|
3517
3374
|
|
|
3518
3375
|
// node_modules/typebox/build/type/engine/object/from_object.mjs
|
|
3519
|
-
function
|
|
3376
|
+
function FromObject2(properties) {
|
|
3520
3377
|
return properties;
|
|
3521
3378
|
}
|
|
3522
3379
|
|
|
@@ -3531,7 +3388,7 @@ function FromTuple(types) {
|
|
|
3531
3388
|
function CollapseUnionProperties(left, right) {
|
|
3532
3389
|
const sharedKeys = guard_exports.Keys(left).filter((key) => key in right);
|
|
3533
3390
|
const result = sharedKeys.reduce((result2, key) => {
|
|
3534
|
-
return { ...result2, [key]:
|
|
3391
|
+
return { ...result2, [key]: EvaluatePropertyUnion(left[key], right[key]) };
|
|
3535
3392
|
}, {});
|
|
3536
3393
|
return result;
|
|
3537
3394
|
}
|
|
@@ -3544,7 +3401,7 @@ function FromUnion3(types) {
|
|
|
3544
3401
|
|
|
3545
3402
|
// node_modules/typebox/build/type/engine/object/from_type.mjs
|
|
3546
3403
|
function FromType8(type) {
|
|
3547
|
-
return IsCyclic(type) ? FromCyclic(type.$defs, type.$ref) : IsDependent(type) ? FromDependent(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect(type.allOf) : IsUnion(type) ? FromUnion3(type.anyOf) : IsTuple(type) ? FromTuple(type.items) : IsObject2(type) ?
|
|
3404
|
+
return IsCyclic(type) ? FromCyclic(type.$defs, type.$ref) : IsDependent(type) ? FromDependent(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect(type.allOf) : IsUnion(type) ? FromUnion3(type.anyOf) : IsTuple(type) ? FromTuple(type.items) : IsObject2(type) ? FromObject2(type.properties) : {};
|
|
3548
3405
|
}
|
|
3549
3406
|
|
|
3550
3407
|
// node_modules/typebox/build/type/engine/object/collapse.mjs
|
|
@@ -3571,7 +3428,7 @@ function NormalizeIndexerTypes(types) {
|
|
|
3571
3428
|
function NormalizeIndexer(type) {
|
|
3572
3429
|
return IsIntersect(type) ? Intersect(NormalizeIndexerTypes(type.allOf)) : IsUnion(type) ? Union(NormalizeIndexerTypes(type.anyOf)) : IsLiteral(type) ? NormalizeLiteral(type.const) : type;
|
|
3573
3430
|
}
|
|
3574
|
-
function
|
|
3431
|
+
function FromArray(type, indexer) {
|
|
3575
3432
|
const normalizedIndexer = NormalizeIndexer(indexer);
|
|
3576
3433
|
const check = Extends({}, normalizedIndexer, Number2());
|
|
3577
3434
|
const result = (
|
|
@@ -3681,8 +3538,8 @@ function FromIndexerNumber(properties) {
|
|
|
3681
3538
|
const result = EvaluateUnion(variants);
|
|
3682
3539
|
return result;
|
|
3683
3540
|
}
|
|
3684
|
-
function
|
|
3685
|
-
const result =
|
|
3541
|
+
function FromObject3(properties, indexer) {
|
|
3542
|
+
const result = IsNumber2(indexer) ? FromIndexerNumber(properties) : FromIndexer(properties, indexer);
|
|
3686
3543
|
return result;
|
|
3687
3544
|
}
|
|
3688
3545
|
|
|
@@ -3715,13 +3572,13 @@ function FromTupleWithoutIndexer(types) {
|
|
|
3715
3572
|
function FromTuple2(types, indexer) {
|
|
3716
3573
|
return (
|
|
3717
3574
|
// length (intrinsic)
|
|
3718
|
-
IsLiteral(indexer) && guard_exports.IsEqual(indexer.const, "length") ? Literal(types.length) :
|
|
3575
|
+
IsLiteral(indexer) && guard_exports.IsEqual(indexer.const, "length") ? Literal(types.length) : IsNumber2(indexer) || IsInteger2(indexer) ? FromTupleWithoutIndexer(types) : FromTupleWithIndexer(types, indexer)
|
|
3719
3576
|
);
|
|
3720
3577
|
}
|
|
3721
3578
|
|
|
3722
3579
|
// node_modules/typebox/build/type/engine/indexed/from_type.mjs
|
|
3723
3580
|
function FromType11(type, indexer) {
|
|
3724
|
-
return IsArray2(type) ?
|
|
3581
|
+
return IsArray2(type) ? FromArray(type.items, indexer) : IsObject2(type) ? FromObject3(type.properties, indexer) : IsTuple(type) ? FromTuple2(type.items, indexer) : Never();
|
|
3725
3582
|
}
|
|
3726
3583
|
|
|
3727
3584
|
// node_modules/typebox/build/type/engine/indexed/instantiate.mjs
|
|
@@ -3774,7 +3631,7 @@ function FromAny() {
|
|
|
3774
3631
|
}
|
|
3775
3632
|
|
|
3776
3633
|
// node_modules/typebox/build/type/engine/keyof/from_array.mjs
|
|
3777
|
-
function
|
|
3634
|
+
function FromArray2(_type) {
|
|
3778
3635
|
return Number2();
|
|
3779
3636
|
}
|
|
3780
3637
|
|
|
@@ -3785,7 +3642,7 @@ function FromPropertyKeys(keys) {
|
|
|
3785
3642
|
}, []);
|
|
3786
3643
|
return result;
|
|
3787
3644
|
}
|
|
3788
|
-
function
|
|
3645
|
+
function FromObject4(properties) {
|
|
3789
3646
|
const propertyKeys = guard_exports.Keys(properties);
|
|
3790
3647
|
const variants = FromPropertyKeys(propertyKeys);
|
|
3791
3648
|
const result = EvaluateUnionFast(variants);
|
|
@@ -3805,7 +3662,7 @@ function FromTuple3(types) {
|
|
|
3805
3662
|
|
|
3806
3663
|
// node_modules/typebox/build/type/engine/keyof/from_type.mjs
|
|
3807
3664
|
function FromType12(type) {
|
|
3808
|
-
return IsAny(type) ? FromAny() : IsArray2(type) ?
|
|
3665
|
+
return IsAny(type) ? FromAny() : IsArray2(type) ? FromArray2(type.items) : IsObject2(type) ? FromObject4(type.properties) : IsRecord(type) ? FromRecord2(type) : IsTuple(type) ? FromTuple3(type.items) : Never();
|
|
3809
3666
|
}
|
|
3810
3667
|
|
|
3811
3668
|
// node_modules/typebox/build/type/engine/keyof/instantiate.mjs
|
|
@@ -4050,7 +3907,7 @@ function FromUnion6(types) {
|
|
|
4050
3907
|
}
|
|
4051
3908
|
|
|
4052
3909
|
// node_modules/typebox/build/type/engine/partial/from_object.mjs
|
|
4053
|
-
function
|
|
3910
|
+
function FromObject5(properties) {
|
|
4054
3911
|
const mapped = guard_exports.Keys(properties).reduce((result2, left) => {
|
|
4055
3912
|
return { ...result2, [left]: AddOptional(properties[left]) };
|
|
4056
3913
|
}, {});
|
|
@@ -4060,7 +3917,7 @@ function FromObject6(properties) {
|
|
|
4060
3917
|
|
|
4061
3918
|
// node_modules/typebox/build/type/engine/partial/from_type.mjs
|
|
4062
3919
|
function FromType15(type) {
|
|
4063
|
-
return IsCyclic(type) ? FromCyclic3(type.$defs, type.$ref) : IsDependent(type) ? FromDependent3(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect3(type.allOf) : IsUnion(type) ? FromUnion6(type.anyOf) : IsObject2(type) ?
|
|
3920
|
+
return IsCyclic(type) ? FromCyclic3(type.$defs, type.$ref) : IsDependent(type) ? FromDependent3(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect3(type.allOf) : IsUnion(type) ? FromUnion6(type.anyOf) : IsObject2(type) ? FromObject5(type.properties) : _Object_({});
|
|
4064
3921
|
}
|
|
4065
3922
|
|
|
4066
3923
|
// node_modules/typebox/build/type/engine/partial/instantiate.mjs
|
|
@@ -4118,7 +3975,7 @@ function ReadonlyObject(type, options = {}) {
|
|
|
4118
3975
|
var ReadonlyType = ReadonlyObject;
|
|
4119
3976
|
|
|
4120
3977
|
// node_modules/typebox/build/type/engine/readonly_object/from_array.mjs
|
|
4121
|
-
function
|
|
3978
|
+
function FromArray3(type) {
|
|
4122
3979
|
const result = AddImmutable(_Array_(type));
|
|
4123
3980
|
return result;
|
|
4124
3981
|
}
|
|
@@ -4146,7 +4003,7 @@ function FromIntersect4(types) {
|
|
|
4146
4003
|
}
|
|
4147
4004
|
|
|
4148
4005
|
// node_modules/typebox/build/type/engine/readonly_object/from_object.mjs
|
|
4149
|
-
function
|
|
4006
|
+
function FromObject6(properties) {
|
|
4150
4007
|
const mapped = guard_exports.Keys(properties).reduce((result2, left) => {
|
|
4151
4008
|
return { ...result2, [left]: AddReadonly(properties[left]) };
|
|
4152
4009
|
}, {});
|
|
@@ -4168,7 +4025,7 @@ function FromUnion7(types) {
|
|
|
4168
4025
|
|
|
4169
4026
|
// node_modules/typebox/build/type/engine/readonly_object/from_type.mjs
|
|
4170
4027
|
function FromType17(type) {
|
|
4171
|
-
return IsArray2(type) ?
|
|
4028
|
+
return IsArray2(type) ? FromArray3(type.items) : IsCyclic(type) ? FromCyclic4(type.$defs, type.$ref) : IsDependent(type) ? FromDependent4(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect4(type.allOf) : IsObject2(type) ? FromObject6(type.properties) : IsTuple(type) ? FromTuple4(type.items) : IsUnion(type) ? FromUnion7(type.anyOf) : type;
|
|
4172
4029
|
}
|
|
4173
4030
|
|
|
4174
4031
|
// node_modules/typebox/build/type/engine/readonly_object/instantiate.mjs
|
|
@@ -4214,8 +4071,16 @@ function FromUnion8(types) {
|
|
|
4214
4071
|
return Union(result);
|
|
4215
4072
|
}
|
|
4216
4073
|
|
|
4074
|
+
// node_modules/typebox/build/type/action/_remove_optional.mjs
|
|
4075
|
+
function RemoveOptionalDeferred(type, options = {}) {
|
|
4076
|
+
return Deferred("RemoveOptional", [type], options);
|
|
4077
|
+
}
|
|
4078
|
+
function RemoveOptional(type, options = {}) {
|
|
4079
|
+
return RemoveOptionalAction(type, options);
|
|
4080
|
+
}
|
|
4081
|
+
|
|
4217
4082
|
// node_modules/typebox/build/type/engine/required/from_object.mjs
|
|
4218
|
-
function
|
|
4083
|
+
function FromObject7(properties) {
|
|
4219
4084
|
const mapped = guard_exports.Keys(properties).reduce((result2, left) => {
|
|
4220
4085
|
return { ...result2, [left]: RemoveOptional(properties[left]) };
|
|
4221
4086
|
}, {});
|
|
@@ -4225,7 +4090,7 @@ function FromObject8(properties) {
|
|
|
4225
4090
|
|
|
4226
4091
|
// node_modules/typebox/build/type/engine/required/from_type.mjs
|
|
4227
4092
|
function FromType18(type) {
|
|
4228
|
-
return IsCyclic(type) ? FromCyclic5(type.$defs, type.$ref) : IsDependent(type) ? FromDependent5(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect5(type.allOf) : IsUnion(type) ? FromUnion8(type.anyOf) : IsObject2(type) ?
|
|
4093
|
+
return IsCyclic(type) ? FromCyclic5(type.$defs, type.$ref) : IsDependent(type) ? FromDependent5(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect5(type.allOf) : IsUnion(type) ? FromUnion8(type.anyOf) : IsObject2(type) ? FromObject7(type.properties) : _Object_({});
|
|
4229
4094
|
}
|
|
4230
4095
|
|
|
4231
4096
|
// node_modules/typebox/build/type/action/required.mjs
|
|
@@ -4346,11 +4211,8 @@ function Instantiate(context, type) {
|
|
|
4346
4211
|
}
|
|
4347
4212
|
|
|
4348
4213
|
// node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs
|
|
4349
|
-
function AddImmutableOperation(type) {
|
|
4350
|
-
return memory_exports.Update(type, { "~immutable": true }, {});
|
|
4351
|
-
}
|
|
4352
4214
|
function AddImmutableAction(type, options) {
|
|
4353
|
-
const result = memory_exports.Update(
|
|
4215
|
+
const result = memory_exports.Update(type, { "~immutable": true }, options);
|
|
4354
4216
|
return result;
|
|
4355
4217
|
}
|
|
4356
4218
|
function AddImmutableInstantiate(context, state, type, options) {
|
|
@@ -4366,6 +4228,11 @@ function AddImmutable(type, options = {}) {
|
|
|
4366
4228
|
return AddImmutableAction(type, options);
|
|
4367
4229
|
}
|
|
4368
4230
|
|
|
4231
|
+
// node_modules/typebox/build/type/action/_remove_readonly.mjs
|
|
4232
|
+
function RemoveReadonlyDeferred(type, options = {}) {
|
|
4233
|
+
return Deferred("RemoveReadonly", [type], options);
|
|
4234
|
+
}
|
|
4235
|
+
|
|
4369
4236
|
// node_modules/typebox/build/type/action/evaluate.mjs
|
|
4370
4237
|
function EvaluateDeferred(type, options = {}) {
|
|
4371
4238
|
return Deferred("Evaluate", [type], options);
|
|
@@ -4433,7 +4300,7 @@ __export(typebox_exports, {
|
|
|
4433
4300
|
IsAny: () => IsAny,
|
|
4434
4301
|
IsArray: () => IsArray2,
|
|
4435
4302
|
IsBigInt: () => IsBigInt2,
|
|
4436
|
-
IsBoolean: () =>
|
|
4303
|
+
IsBoolean: () => IsBoolean2,
|
|
4437
4304
|
IsCall: () => IsCall,
|
|
4438
4305
|
IsCodec: () => IsCodec,
|
|
4439
4306
|
IsConstructor: () => IsConstructor2,
|
|
@@ -4452,7 +4319,7 @@ __export(typebox_exports, {
|
|
|
4452
4319
|
IsLiteral: () => IsLiteral,
|
|
4453
4320
|
IsNever: () => IsNever,
|
|
4454
4321
|
IsNull: () => IsNull2,
|
|
4455
|
-
IsNumber: () =>
|
|
4322
|
+
IsNumber: () => IsNumber2,
|
|
4456
4323
|
IsObject: () => IsObject2,
|
|
4457
4324
|
IsOptional: () => IsOptional,
|
|
4458
4325
|
IsParameter: () => IsParameter,
|
|
@@ -4462,7 +4329,7 @@ __export(typebox_exports, {
|
|
|
4462
4329
|
IsRefine: () => IsRefine,
|
|
4463
4330
|
IsRest: () => IsRest,
|
|
4464
4331
|
IsSchema: () => IsSchema,
|
|
4465
|
-
IsString: () =>
|
|
4332
|
+
IsString: () => IsString2,
|
|
4466
4333
|
IsSymbol: () => IsSymbol2,
|
|
4467
4334
|
IsTemplateLiteral: () => IsTemplateLiteral,
|
|
4468
4335
|
IsThis: () => IsThis,
|
|
@@ -4942,7 +4809,7 @@ var index_default = definePluginEntry({
|
|
|
4942
4809
|
});
|
|
4943
4810
|
api.registerTool({
|
|
4944
4811
|
name: "get_quote",
|
|
4945
|
-
description: "\u83B7\u53D6\u80A1\u7968\u5B9E\u65F6\u884C\u60C5\u62A5\u4EF7\uFF08\u73B0\u4EF7\u3001\u6DA8\u8DCC\u5E45\u3001\u91CF\u6BD4\u7B49\uFF09\u3002\u652F\u6301A\u80A1\u3001\u6E2F\u80A1\u3001\u7F8E\u80A1\u3001\u65E5\u80A1\u3001\u97E9\u80A1\u3001\u53F0\u80A1\uFF1B\u975E\u4EA4\u6613\u65F6\u6BB5\u8FD4\u56DE\u6700\u8FD1\u4EA4\u6613\u65E5\u6536\u76D8\u4EF7\u5E76\u4EE5 as_of/stale \u6807\u6CE8\uFF1BETF \u7684 premium_discount_rate \u4E3A\u6B63=\u6EA2\u4EF7\u3001\u8D1F=\u6298\u4EF7\u3002\u8FD4\u56DE source\u3001UTC fetched_at \u548C\u63D0\u4F9B\u65B9 data_as_of\uFF08\u672A\u77E5\u4E3Anull\uFF09\uFF1Bas_of_basis\u533A\u5206\u63D0\u4F9B\u65B9\u65F6\u95F4\u4E0E\u4EA4\u6613\u65E5\u5386\u63A8\u65AD\uFF0C\u91C7\u96C6\u65F6\u95F4\u4E0D\u7B49\u4E8E\u884C\u60C5\u65F6\u95F4\u3002",
|
|
4812
|
+
description: "\u83B7\u53D6\u80A1\u7968\u5B9E\u65F6\u884C\u60C5\u62A5\u4EF7\uFF08\u73B0\u4EF7\u3001\u6DA8\u8DCC\u5E45\u3001\u91CF\u6BD4\u7B49\uFF09\u3002\u652F\u6301A\u80A1\u3001\u6E2F\u80A1\u3001\u7F8E\u80A1\u3001\u65E5\u80A1\u3001\u97E9\u80A1\u3001\u53F0\u80A1\uFF1B\u975E\u4EA4\u6613\u65F6\u6BB5\u8FD4\u56DE\u6700\u8FD1\u4EA4\u6613\u65E5\u6536\u76D8\u4EF7\u5E76\u4EE5 as_of/stale \u6807\u6CE8\uFF1BETF \u7684 premium_discount_rate \u4E3A\u6B63=\u6EA2\u4EF7\u3001\u8D1F=\u6298\u4EF7\u3002\u8FD4\u56DE source\u3001UTC fetched_at \u548C\u63D0\u4F9B\u65B9 data_as_of\uFF08\u672A\u77E5\u4E3Anull\uFF09\uFF1Bas_of_basis\u533A\u5206\u63D0\u4F9B\u65B9\u65F6\u95F4\u4E0E\u4EA4\u6613\u65E5\u5386\u63A8\u65AD\uFF0C\u91C7\u96C6\u65F6\u95F4\u4E0D\u7B49\u4E8E\u884C\u60C5\u65F6\u95F4\u3002\u573A\u5916\u57FA\u91D1\u7528 get_fund_quote\uFF1BTIAAxxxxxx \u8FD4\u56DE\u6295\u987E\u7EC4\u5408\u8BC6\u522B\u3001advisor_org \u4E0E\u65E0\u7EDF\u4E00\u51C0\u503C\u63D0\u793A\uFF1B\u957F\u94B1/\u6D77\u5916\u957F\u94B1/\u7A33\u94B1\u53E6\u6709\u6709\u77E5\u6709\u884C official_disclosures\uFF08partial=true\uFF0C\u975E\u5B9E\u65F6\u5B8C\u6574\u6301\u4ED3\uFF09\uFF1B\u5176\u4ED6\u7EC4\u5408\u641C\u7D22\u53EF\u7528\u65F6\u4E3A search_partial\uFF0C\u5426\u5219 unsupported_provider\u3002",
|
|
4946
4813
|
parameters: typebox_exports.Object({
|
|
4947
4814
|
symbol: typebox_exports.String({ description: "\u80A1\u7968\u4EE3\u7801\uFF08A\u80A1\u5982600519\uFF0C\u7F8E\u80A1\u5982AAPL\uFF0C\u6E2F\u80A1\u598200700.HK\uFF09" })
|
|
4948
4815
|
}),
|
|
@@ -4951,6 +4818,17 @@ var index_default = definePluginEntry({
|
|
|
4951
4818
|
return asText(out);
|
|
4952
4819
|
}
|
|
4953
4820
|
});
|
|
4821
|
+
api.registerTool({
|
|
4822
|
+
name: "get_fund_quote",
|
|
4823
|
+
description: "\u83B7\u53D6\u573A\u5916\u516C\u52DF\u57FA\u91D1\u51C0\u503C\uFF086\u4F4D\u57FA\u91D1\u4EE3\u7801\uFF0C\u5982018147\uFF09\u3002nav \u662F\u5DF2\u62AB\u9732\u65E5\u7EC8\u51C0\u503C\uFF0C\u975E\u5B9E\u65F6\u4EF7\uFF1B\u8FD4\u56DE accumulated_nav\uFF08\u7D2F\u8BA1\u51C0\u503C\uFF09\u3001change_pct\uFF08\u65E5\u6DA8\u8DCC\u5E45\uFF09\u3001nav_date\uFF08\u51C0\u503C\u65E5\u671F\uFF09\u3002estimated_nav \u4E3A\u4F30\u7B97\u51C0\u503C\uFF0C\u53EF\u80FD\u4E3A null\uFF0C\u4E0D\u80FD\u5F53\u4F5C\u5B9E\u65F6\u4EF7\uFF1BQDII \u51C0\u503C\u53EF\u80FD\u6EDE\u540E 1-2 \u4EA4\u6613\u65E5\u3002",
|
|
4824
|
+
parameters: typebox_exports.Object({
|
|
4825
|
+
symbol: typebox_exports.String({ description: "6\u4F4D\u573A\u5916\u516C\u52DF\u57FA\u91D1\u4EE3\u7801\uFF0C\u5982 018147" })
|
|
4826
|
+
}),
|
|
4827
|
+
async execute(_id, params) {
|
|
4828
|
+
const out = await runPy("stock_data.py", ["fund_quote", params.symbol]);
|
|
4829
|
+
return asText(out);
|
|
4830
|
+
}
|
|
4831
|
+
});
|
|
4954
4832
|
api.registerTool({
|
|
4955
4833
|
name: "get_capital_flow",
|
|
4956
4834
|
description: "\u83B7\u53D6A\u80A1\u8D44\u91D1\u6D41\u5411\uFF08\u4E3B\u529B/\u8D85\u5927\u5355/\u5927\u5355/\u4E2D\u5355/\u5C0F\u5355\u51C0\u6D41\u5165\uFF09\u3002detail=\u4E2A\u80A1\u6BCF\u65E5\u660E\u7EC6\uFF0Csummary=\u591A\u65E5\u6C47\u603B+\u8D8B\u52BF\uFF0Csector_flow=\u677F\u5757\u8D44\u91D1\u6D41\u6392\u884C\u3002\u53EF\u914D\u5408 get_chip_distribution \u9A8C\u8BC1\u4E3B\u529B\u884C\u4E3A",
|