@weaxs/openclaw-stock-analysis 0.2.9 → 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/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/string.mjs
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[clusterEnd] === "\u200D") {
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
- function IsMinLength(value, minLength) {
236
- if (minLength === 0)
237
- return true;
238
- let count = 0;
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
- index = NextGraphemeClusterIndex(value, index);
242
- count++;
243
- if (count >= minLength)
244
- return true;
228
+ const next = value.charCodeAt(index++) >> 10;
229
+ result += +((prev << 8 | next) !== 13879);
230
+ prev = next;
245
231
  }
246
- return false;
232
+ return result;
247
233
  }
248
234
  function IsMaxLength(value, maxLength) {
249
- let count = 0;
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;
235
+ return value.length <= maxLength || value.length <= maxLength << 1 && CodePointCount(value) <= maxLength;
258
236
  }
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;
272
- }
273
- function IsMaxLengthFast(value, maxLength) {
274
- let index = 0;
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 IsMaxLength2(value, length) {
375
- return IsMaxLengthFast(value, length);
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, length) {
378
- return IsMinLengthFast(value, length);
335
+ function IsMinLength2(value, minLength) {
336
+ return IsMinLength(value, minLength);
379
337
  }
380
338
  function Every(value, offset, callback) {
381
- for (let index = offset; index < value.length; index++) {
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
- for (let index = offset; index < value.length; index++) {
390
- if (!callback(value[index], index))
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
- for (let index = 0; index < value.length; index++) {
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
- for (let index = 0; index < value.length; index++) {
405
- if (callback(value[index], index))
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 MergeHidden(left, right) {
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 settings2 = settings_exports.Get();
646
- const withOptions = Merge(enumerable, options);
647
- const withHidden = settings2.enumerableKind ? Merge(withOptions, hidden) : MergeHidden(withOptions, hidden);
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 descriptors = Object.getOwnPropertyDescriptors(Clone(value));
656
- const keysToDiscard = new Set(propertyKeys);
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.defineProperty(result, key, descriptors[key]);
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 Update(current, hidden, enumerable) {
667
- Metrics.update += 1;
668
- const settings2 = settings_exports.Get();
669
- const result = Clone(current);
670
- for (const key of Object.keys(hidden)) {
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: settings2.enumerableKind,
551
+ enumerable: enumerableKind,
675
552
  value: hidden[key]
676
553
  });
677
554
  }
678
- for (const key of Object.keys(enumerable)) {
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
- return result;
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(AddReadonlyOperation(type), {}, options);
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(AddOptionalOperation(type), {}, options);
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 IsBoolean3(value) {
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 IsNumber3(value) {
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 IsString3(value) {
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/readonly/instantiate_remove.mjs
1275
- function RemoveReadonlyOperation(type) {
1276
- return memory_exports.Discard(type, ["~readonly"]);
1277
- }
1278
- function RemoveReadonlyAction(type, options) {
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 RemoveReadonlyInstantiate(context, state, type, options) {
1283
- const instantiatedType = InstantiateType(context, state, type);
1284
- return RemoveReadonlyAction(instantiatedType, options);
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/action/_remove_optional.mjs
1309
- function RemoveOptionalDeferred(type, options = {}) {
1310
- return Deferred("RemoveOptional", [type], options);
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
- // node_modules/typebox/build/type/engine/tuple/to_object.mjs
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 TupleToObject(type) {
1324
- const properties = TupleElementsToProperties(type.items);
1325
- const result = _Object_(properties);
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/composite.mjs
1330
- function IsReadonlyProperty(left, right) {
1331
- return IsReadonly(left) ? IsReadonly(right) ? true : false : false;
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 = RemoveReadonly(RemoveOptional(evaluated));
1341
- return isReadonly && isOptional ? AddReadonly(AddOptional(property)) : isReadonly && !isOptional ? AddReadonly(property) : !isReadonly && isOptional ? AddOptional(property) : property;
1177
+ const property = RemoveReadonlyAction(RemoveOptionalAction(evaluated, {}), {});
1178
+ return isReadonly && isOptional ? AddReadonlyAction(AddOptionalAction(property, {}), {}) : isReadonly ? AddReadonlyAction(property, {}) : isOptional ? AddOptionalAction(property, {}) : property;
1342
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;
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 ? CompositeProperty(left[key], right[key]) : left[key] : key in right ? right[key] : Never();
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(right), ...guard_exports.Keys(left)]);
1348
- return [...keys].reduce((result, key) => {
1349
- return { ...result, [key]: CompositePropertyKey(left, right, key) };
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) : Unreachable();
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
- return _Object_(properties);
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 Narrow(left, right) {
1213
+ function NarrowCompareRule(left, right) {
1365
1214
  const result = Compare(left, right);
1366
- return guard_exports.IsEqual(result, ResultLeftInside) ? left : guard_exports.IsEqual(result, ResultRightInside) ? right : guard_exports.IsEqual(result, ResultEqual) ? right : Never();
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 IsUnionOperand(left, right) {
1374
- const isUnionLeft = IsUnion(left);
1375
- const isUnionRight = IsUnion(right);
1376
- const result = isUnionLeft || isUnionRight;
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 isUnionOperand = IsUnionOperand(evaluatedLeft, evaluatedRight);
1383
- const isObjectLeft = IsObjectLike(evaluatedLeft);
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(type, left)]), () => guard_exports.IsEqual(result.length, 0) ? [type] : result);
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(types, right) {
1405
- return types.reduce((result, head) => {
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 intersect = Intersect([if_, then_]);
1270
+ const intersected = EvaluateIntersect([if_, then_]);
1420
1271
  const excluded = ExcludeOperation(else_, if_);
1421
- const result = EvaluateUnion([intersect, excluded]);
1272
+ const result = EvaluateUnion([intersected, excluded]);
1422
1273
  return result;
1423
1274
  }
1424
- function EvaluateEnum(values) {
1425
- const result = values.map((value) => Literal(value));
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 = EvaluateUnionFast(broadend);
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
- return 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;
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 types.reduce((result, type) => {
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) => IsString3(type) || IsNumber3(type) || IsInteger2(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) : IsBoolean3(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) : IsNumber3(key) ? FromNumberKey(key, value) : IsUnion(key) ? FromUnionKey(key.anyOf, value) : IsString3(key) ? FromStringKey(key, value) : IsTemplateLiteral(key) ? FromTemplateKey(key.pattern, value) : _Object_({});
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 : IsNumber3(input[3]) ? NumberKey : IsSymbol2(input[3]) ? StringKey : IsString3(input[3]) ? StringKey : Unreachable2();
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) : IsBoolean3(type) ? EncodeBoolean(right, pattern) : IsNumber3(type) ? EncodeNumber(right, pattern) : IsString3(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;
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 IsBoolean3(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
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) : IsNumber3(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
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) : IsBoolean3(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, Literal(left), right);
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) : IsNumber3(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, Literal(left), right);
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) : IsString3(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, Literal(left), right);
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 IsNumber3(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
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 FromObject2(inferred, properties) {
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) ? FromObject2(inferred, right.properties) : IsAny(right) ? ExtendsTrue(inferred) : IsUnknown(right) ? ExtendsTrue(inferred) : ExtendsFalse();
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 IsString3(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
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, result = []) {
2813
- return guard_exports.ShiftLeft(rest, (head, tail) => Match3(ExtendsLeft({}, head, right), () => TryInferResults(tail, right, [...result, head]), () => void 0), () => result);
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"]) : guard_exports.ShiftLeft(left, (head, tail) => Match3(ExtendsLeft(inferred, head, right), (inferred2) => ExtendsTupleToArray(inferred2, tail, right), () => ExtendsFalse()), () => ExtendsTrue(inferred));
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) : IsBoolean3(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) : IsNumber3(left) ? ExtendsNumber(inferred, left, right) : IsObject2(left) ? ExtendsObject(inferred, left.properties, right) : IsRecord(left) ? ExtendsRecord(inferred, RecordPattern(left), RecordValue(left), right) : IsString3(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();
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 ResultEqual = "equal";
3043
- var ResultDisjoint = "disjoint";
3044
- var ResultLeftInside = "left-inside";
3045
- var ResultRightInside = "right-inside";
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
- IsUnknown(left) ? result_exports.ExtendsFalse() : Extends({}, left, right),
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 BroadFilter(type, types) {
3056
- return types.filter((left) => {
3057
- return Compare(type, left) === ResultRightInside ? false : true;
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] : IsBroadestType(evaluated, types) ? [...BroadFilter(evaluated, types), evaluated] : types;
3070
- }
3071
- function BroadenTypes(types) {
3072
- return types.reduce((result, left) => {
3073
- return IsObject2(left) ? [...result, left] : (
3074
- // push
3075
- IsNever(left) ? result : (
3076
- // ignore
3077
- BroadenType(left, result)
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(types, right) {
3442
- return types.reduce((result, head) => {
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]: EvaluateIntersect([left[key], right[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 FromObject3(properties) {
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]: EvaluateUnion([left[key], right[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) ? FromObject3(type.properties) : {};
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 FromArray2(type, indexer) {
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 FromObject4(properties, indexer) {
3685
- const result = IsNumber3(indexer) ? FromIndexerNumber(properties) : FromIndexer(properties, indexer);
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) : IsNumber3(indexer) || IsInteger2(indexer) ? FromTupleWithoutIndexer(types) : FromTupleWithIndexer(types, indexer)
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) ? FromArray2(type.items, indexer) : IsObject2(type) ? FromObject4(type.properties, indexer) : IsTuple(type) ? FromTuple2(type.items, indexer) : Never();
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 FromArray3(_type) {
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 FromObject5(properties) {
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) ? FromArray3(type.items) : IsObject2(type) ? FromObject5(type.properties) : IsRecord(type) ? FromRecord2(type) : IsTuple(type) ? FromTuple3(type.items) : Never();
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 FromObject6(properties) {
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) ? FromObject6(type.properties) : _Object_({});
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 FromArray4(type) {
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 FromObject7(properties) {
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) ? FromArray4(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) ? FromObject7(type.properties) : IsTuple(type) ? FromTuple4(type.items) : IsUnion(type) ? FromUnion7(type.anyOf) : 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 FromObject8(properties) {
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) ? FromObject8(type.properties) : _Object_({});
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(AddImmutableOperation(type), {}, options);
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: () => IsBoolean3,
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: () => IsNumber3,
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: () => IsString3,
4332
+ IsString: () => IsString2,
4466
4333
  IsSymbol: () => IsSymbol2,
4467
4334
  IsTemplateLiteral: () => IsTemplateLiteral,
4468
4335
  IsThis: () => IsThis,
@@ -4627,7 +4494,7 @@ var index_default = definePluginEntry({
4627
4494
  });
4628
4495
  api.registerTool({
4629
4496
  name: "analyze_portfolio_risk",
4630
- description: "\u65E0\u72B6\u6001\u73B0\u8D27\u591A\u5934\u7EC4\u5408\u98CE\u9669\uFF1A\u8F93\u5165\u6301\u4ED3\u3001\u57FA\u51C6\u5E01\u79CD\u73B0\u91D1\u4E0E\u6C47\u7387\uFF0C\u8FD4\u56DE\u96C6\u4E2D\u5EA6\u3001\u5E01\u79CD/\u884C\u4E1A\u655E\u53E3\u3001\u4EF7\u683C\u76C8\u4E8F\u548C\u6B62\u635F\u60C5\u666F\u3002\u7F3A\u6C47\u7387\u62A5\u9519\uFF1B\u4E0D\u4FDD\u5B58\u8D26\u6237\u3002",
4497
+ description: "\u65E0\u72B6\u6001\u73B0\u8D27\u591A\u5934\u7EC4\u5408\u98CE\u9669\u4E0E\u538B\u529B\u6D4B\u8BD5\uFF1A\u8F93\u5165\u6301\u4ED3\u3001\u57FA\u51C6\u5E01\u79CD\u73B0\u91D1\u4E0E\u6C47\u7387\uFF0C\u8FD4\u56DE\u96C6\u4E2D\u5EA6\u3001\u5E01\u79CD/\u884C\u4E1A\u655E\u53E3\u3001\u4EF7\u683C\u76C8\u4E8F\u3001\u6B62\u635F\u60C5\u666F\u53CA\u53EF\u9009\u5E02\u573A/\u884C\u4E1A/\u4E2A\u80A1/\u6C47\u7387\u51B2\u51FB\u635F\u76CA\u3002\u7F3A\u6C47\u7387\u62A5\u9519\uFF1B\u4E0D\u4FDD\u5B58\u8D26\u6237\u3002",
4631
4498
  parameters: typebox_exports.Object({
4632
4499
  positions: typebox_exports.Array(typebox_exports.Object({
4633
4500
  symbol: typebox_exports.String({ "description": "\u552F\u4E00\u4EE3\u7801\uFF0C\u91CD\u590D\u6301\u4ED3\u5148\u6C47\u603B" }),
@@ -4651,12 +4518,65 @@ var index_default = definePluginEntry({
4651
4518
  date: typebox_exports.String({ "description": "YYYY-MM-DD\uFF0C\u552F\u4E00\u65E5\u671F" }),
4652
4519
  close: typebox_exports.Number({ "description": "\u6B63\u6709\u9650\u6536\u76D8\u4EF7" })
4653
4520
  }, { "additionalProperties": false }), { "description": "\u5B8C\u6574\u65E5K\u6536\u76D8\u5E8F\u5217\uFF0C2..20000\u6761\uFF0C\u4E0D\u5F97\u8DE8\u80A1\u7968\u6216\u6DF7\u7528\u590D\u6743\u53E3\u5F84" })
4654
- }, { "additionalProperties": false }), { "description": "\u53EF\u9009\u5386\u53F2\uFF0C\u5171\u540C\u65E5\u671F\u672C\u5E01\u4EF7\u683C\u6536\u76CA\u76F8\u5173\u6027\uFF0C\u4E0D\u8BA1\u6C47\u7387" }))
4521
+ }, { "additionalProperties": false }), { "description": "\u53EF\u9009\u5386\u53F2\uFF0C\u5171\u540C\u65E5\u671F\u672C\u5E01\u4EF7\u683C\u6536\u76CA\u76F8\u5173\u6027\uFF0C\u4E0D\u8BA1\u6C47\u7387" })),
4522
+ stress_scenarios: typebox_exports.Optional(typebox_exports.Array(typebox_exports.Object({
4523
+ name: typebox_exports.String({ "description": "\u60C5\u666F\u540D\u79F0" }),
4524
+ market_shock: typebox_exports.Optional(typebox_exports.Number({ "description": "\u5168\u5E02\u573A\u8D44\u4EA7\u4EF7\u683C\u51B2\u51FB\u6BD4\u4F8B\uFF0C\u5982-0.1" })),
4525
+ sector_shocks: typebox_exports.Optional(typebox_exports.Array(typebox_exports.Object({
4526
+ sector: typebox_exports.String({ "description": "\u4E0E\u6301\u4ED3\u4E00\u81F4\u7684\u884C\u4E1A\u540D\u79F0" }),
4527
+ shock: typebox_exports.Number({ "description": "\u884C\u4E1A\u4EF7\u683C\u51B2\u51FB\u6BD4\u4F8B" })
4528
+ }, { "additionalProperties": false }), { "description": "\u53EF\u9009\u884C\u4E1A\u51B2\u51FB" })),
4529
+ symbol_shocks: typebox_exports.Optional(typebox_exports.Array(typebox_exports.Object({
4530
+ symbol: typebox_exports.String({ "description": "\u6301\u4ED3\u6807\u7684\u4EE3\u7801" }),
4531
+ shock: typebox_exports.Number({ "description": "\u6807\u7684\u4EF7\u683C\u51B2\u51FB\u6BD4\u4F8B" })
4532
+ }, { "additionalProperties": false }), { "description": "\u53EF\u9009\u4E2A\u80A1\u51B2\u51FB" })),
4533
+ currency_shocks: typebox_exports.Optional(typebox_exports.Array(typebox_exports.Object({
4534
+ currency: typebox_exports.String({ "description": "\u6301\u4ED3\u4E2D\u7684\u975E\u57FA\u51C6\u5E01\u79CD\uFF1B\u57FA\u51C6\u5E01\u79CD\u4E0D\u53EF\u76F8\u5BF9\u81EA\u8EAB\u51B2\u51FB" }),
4535
+ shock: typebox_exports.Number({ "description": "\u76F8\u5BF9\u57FA\u51C6\u5E01\u79CD\u7684\u6C47\u7387\u51B2\u51FB\u6BD4\u4F8B" })
4536
+ }, { "additionalProperties": false }), { "description": "\u53EF\u9009\u6C47\u7387\u51B2\u51FB" }))
4537
+ }, { "additionalProperties": false }), { "description": "\u53EF\u9009\u538B\u529B\u60C5\u666F\uFF1B\u6240\u6709\u51B2\u51FB\u5747\u4E3A\u6BD4\u4F8B\uFF0C\u7531\u5171\u4EAB\u6838\u5FC3\u8BA1\u7B97" }))
4655
4538
  }, { "additionalProperties": false }),
4656
4539
  async execute(_id, params) {
4657
4540
  return asText(await withJsonInput(params, (path) => runPy("stateless_analysis.py", ["portfolio", "--input", path])));
4658
4541
  }
4659
4542
  });
4543
+ api.registerTool({
4544
+ name: "plan_portfolio_rebalance",
4545
+ description: "\u65E0\u72B6\u6001\u7EC4\u5408\u8C03\u4ED3\u8BA1\u5212\uFF1A\u6309\u5F53\u524D\u6301\u4ED3\u3001\u76EE\u6807\u6743\u91CD\u3001\u73B0\u91D1\u3001\u6C47\u7387\u3001\u6574\u624B\u3001\u8D39\u7528\u548C\u6362\u624B\u7EA6\u675F\u751F\u6210\u5148\u5356\u540E\u4E70\u6E05\u5355\uFF1B\u4E0D\u4FDD\u5B58\u8D26\u6237\u6216\u63D0\u4EA4\u8BA2\u5355\u3002",
4546
+ parameters: typebox_exports.Object({
4547
+ base_currency: typebox_exports.String({ "description": "\u57FA\u51C6\u5E01\u79CD" }),
4548
+ cash: typebox_exports.Number({ "description": "\u57FA\u51C6\u5E01\u79CD\u73B0\u91D1\uFF0C\u975E\u8D1F" }),
4549
+ positions: typebox_exports.Array(typebox_exports.Object({
4550
+ symbol: typebox_exports.String({ "description": "\u552F\u4E00\u4EE3\u7801\uFF0C\u91CD\u590D\u6301\u4ED3\u5148\u6C47\u603B" }),
4551
+ quantity: typebox_exports.Number({ "description": "\u6B63\u6301\u4ED3\u6570\u91CF" }),
4552
+ price: typebox_exports.Number({ "description": "\u6B63\u73B0\u4EF7" }),
4553
+ currency: typebox_exports.String({ "description": "\u6301\u4ED3\u5E01\u79CD\uFF0C\u5982CNY/USD/HKD" }),
4554
+ cost: typebox_exports.Optional(typebox_exports.Number({ "description": "\u540C\u5E01\u79CD\u6B63\u6210\u672C\u4EF7\uFF0C\u53EF\u9009\uFF1B\u8C03\u4ED3\u8BA1\u7B97\u4E0D\u4F7F\u7528" })),
4555
+ stop_price: typebox_exports.Optional(typebox_exports.Number({ "description": "\u540C\u5E01\u79CD\u6B63\u6B62\u635F\u4EF7\uFF0C\u53EF\u9009\uFF1B\u8C03\u4ED3\u8BA1\u7B97\u4E0D\u4F7F\u7528" })),
4556
+ sector: typebox_exports.Optional(typebox_exports.String({ "description": "\u7EDF\u4E00\u884C\u4E1A\u5206\u7C7B\uFF0C\u53EF\u9009" })),
4557
+ as_of: typebox_exports.Optional(typebox_exports.String({ "description": "\u5B9E\u9645\u4F30\u503C\u65F6\u70B9\uFF0C\u5EFA\u8BAEISO8601" }))
4558
+ }, { "additionalProperties": false }), { "description": "0..100\u4E2A\u73B0\u8D27\u591A\u5934\u6301\u4ED3\uFF0C\u7A7A\u6570\u7EC4\u8868\u793A\u7EAF\u73B0\u91D1\u5EFA\u4ED3" }),
4559
+ targets: typebox_exports.Array(typebox_exports.Object({
4560
+ symbol: typebox_exports.String({ "description": "\u76EE\u6807\u6807\u7684\u4EE3\u7801" }),
4561
+ weight: typebox_exports.Number({ "description": "\u76EE\u6807\u6743\u91CD\uFF1B\u5927\u4E8E0\u65F6lot_size\u5FC5\u586B" }),
4562
+ price: typebox_exports.Optional(typebox_exports.Number({ "description": "\u6B63\u76EE\u6807\u4EF7\u683C\uFF1B\u5F53\u524D\u672A\u6301\u6709\u7684\u65B0\u6807\u7684\u5FC5\u586B" })),
4563
+ currency: typebox_exports.Optional(typebox_exports.String({ "description": "\u76EE\u6807\u5E01\u79CD\uFF1B\u5F53\u524D\u672A\u6301\u6709\u7684\u65B0\u6807\u7684\u5FC5\u586B" })),
4564
+ sector: typebox_exports.Optional(typebox_exports.String({ "description": "\u7EDF\u4E00\u884C\u4E1A\u5206\u7C7B\uFF0C\u53EF\u9009" })),
4565
+ as_of: typebox_exports.Optional(typebox_exports.String({ "description": "\u5B9E\u9645\u4F30\u503C\u65F6\u70B9\uFF0C\u5EFA\u8BAEISO8601" })),
4566
+ lot_size: typebox_exports.Optional(typebox_exports.Number({ "description": "\u6B63\u6574\u6570\u4EA4\u6613\u5355\u4F4D\uFF1Bweight>0\u65F6\u5FC5\u586B" }))
4567
+ }, { "additionalProperties": false }), { "description": "1..100\u4E2A\u76EE\u6807\uFF1B\u65B0\u6807\u7684price/currency\u5FC5\u586B" }),
4568
+ fx_rates: typebox_exports.Optional(typebox_exports.Array(typebox_exports.Object({
4569
+ currency: typebox_exports.String({ "description": "\u552F\u4E00\u975E\u57FA\u51C6\u5E01\u79CD" }),
4570
+ rate: typebox_exports.Number({ "description": "\u4E00\u5355\u4F4D\u8BE5\u5E01\u79CD\u5BF9\u5E94\u591A\u5C11\u57FA\u51C6\u5E01\u79CD\uFF0C\u6B63\u6570" })
4571
+ }, { "additionalProperties": false }), { "description": "\u663E\u5F0F\u73B0\u4EF7\u6C47\u7387\uFF1B\u57FA\u51C6\u5E01\u79CD\u9690\u542B1\uFF0C\u4E0D\u5F97\u91CD\u590D" })),
4572
+ fee_rate: typebox_exports.Optional(typebox_exports.Number({ "description": "\u6BCF\u8FB9\u6BD4\u4F8B\u8D39\u75280..0.1\uFF0C\u9ED8\u8BA40\uFF1B\u4E0D\u542B\u672A\u63D0\u4F9B\u7A0E\u8D39/\u6700\u4F4E\u6536\u8D39" })),
4573
+ slippage_rate: typebox_exports.Optional(typebox_exports.Number({ "description": "\u6BCF\u8FB9\u6ED1\u70B90..0.1\uFF0C\u9ED8\u8BA40" })),
4574
+ max_turnover_fraction: typebox_exports.Optional(typebox_exports.Number({ "description": "\u975E\u8D1F\u6700\u5927\u603B\u6362\u624B\uFF0C\u6309\u4E70\u5356\u53C2\u8003\u91D1\u989D\u5408\u8BA1/\u521D\u59CB\u6743\u76CA\uFF1B\u9ED8\u8BA4\u4E0D\u9650\u5236\uFF0C\u53EF\u5927\u4E8E1" }))
4575
+ }, { "additionalProperties": false }),
4576
+ async execute(_id, params) {
4577
+ return asText(await withJsonInput(params, (path) => runPy("stateless_analysis.py", ["rebalance", "--input", path])));
4578
+ }
4579
+ });
4660
4580
  api.registerTool({
4661
4581
  name: "calculate_position_size",
4662
4582
  description: "\u65E0\u72B6\u6001\u591A\u5934\u4ED3\u4F4D\u9884\u7B97\uFF1A\u540C\u5E01\u79CD\u91D1\u989D\uFF0C\u6309\u73B0\u91D1/\u98CE\u9669\u9884\u7B97/\u6700\u5927\u4ED3\u4F4D/\u4EA4\u6613\u5355\u4F4D\u53D6\u6700\u5C0F\u6570\u91CF\uFF0C\u53CC\u8FB9\u8D39\u7528\u548C\u6ED1\u70B9\u53C2\u4E0E\u6B62\u635F\u60C5\u666F\uFF1B\u4E0D\u6267\u884C\u4EA4\u6613\u3002",
@@ -4889,7 +4809,7 @@ var index_default = definePluginEntry({
4889
4809
  });
4890
4810
  api.registerTool({
4891
4811
  name: "get_quote",
4892
- 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",
4893
4813
  parameters: typebox_exports.Object({
4894
4814
  symbol: typebox_exports.String({ description: "\u80A1\u7968\u4EE3\u7801\uFF08A\u80A1\u5982600519\uFF0C\u7F8E\u80A1\u5982AAPL\uFF0C\u6E2F\u80A1\u598200700.HK\uFF09" })
4895
4815
  }),
@@ -4898,6 +4818,17 @@ var index_default = definePluginEntry({
4898
4818
  return asText(out);
4899
4819
  }
4900
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
+ });
4901
4832
  api.registerTool({
4902
4833
  name: "get_capital_flow",
4903
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",