@cremini/skillpack 1.2.6 → 1.2.7

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.
Files changed (2) hide show
  1. package/dist/cli.js +18 -2624
  2. package/package.json +3 -1
package/dist/cli.js CHANGED
@@ -2500,2614 +2500,7 @@ import {
2500
2500
  // src/runtime/tools/send-file-tool.ts
2501
2501
  import fs7 from "fs";
2502
2502
  import path7 from "path";
2503
-
2504
- // node_modules/@sinclair/typebox/build/esm/type/guard/value.mjs
2505
- var value_exports = {};
2506
- __export(value_exports, {
2507
- HasPropertyKey: () => HasPropertyKey,
2508
- IsArray: () => IsArray,
2509
- IsAsyncIterator: () => IsAsyncIterator,
2510
- IsBigInt: () => IsBigInt,
2511
- IsBoolean: () => IsBoolean,
2512
- IsDate: () => IsDate,
2513
- IsFunction: () => IsFunction,
2514
- IsIterator: () => IsIterator,
2515
- IsNull: () => IsNull,
2516
- IsNumber: () => IsNumber,
2517
- IsObject: () => IsObject,
2518
- IsRegExp: () => IsRegExp,
2519
- IsString: () => IsString,
2520
- IsSymbol: () => IsSymbol,
2521
- IsUint8Array: () => IsUint8Array,
2522
- IsUndefined: () => IsUndefined
2523
- });
2524
- function HasPropertyKey(value, key) {
2525
- return key in value;
2526
- }
2527
- function IsAsyncIterator(value) {
2528
- return IsObject(value) && !IsArray(value) && !IsUint8Array(value) && Symbol.asyncIterator in value;
2529
- }
2530
- function IsArray(value) {
2531
- return Array.isArray(value);
2532
- }
2533
- function IsBigInt(value) {
2534
- return typeof value === "bigint";
2535
- }
2536
- function IsBoolean(value) {
2537
- return typeof value === "boolean";
2538
- }
2539
- function IsDate(value) {
2540
- return value instanceof globalThis.Date;
2541
- }
2542
- function IsFunction(value) {
2543
- return typeof value === "function";
2544
- }
2545
- function IsIterator(value) {
2546
- return IsObject(value) && !IsArray(value) && !IsUint8Array(value) && Symbol.iterator in value;
2547
- }
2548
- function IsNull(value) {
2549
- return value === null;
2550
- }
2551
- function IsNumber(value) {
2552
- return typeof value === "number";
2553
- }
2554
- function IsObject(value) {
2555
- return typeof value === "object" && value !== null;
2556
- }
2557
- function IsRegExp(value) {
2558
- return value instanceof globalThis.RegExp;
2559
- }
2560
- function IsString(value) {
2561
- return typeof value === "string";
2562
- }
2563
- function IsSymbol(value) {
2564
- return typeof value === "symbol";
2565
- }
2566
- function IsUint8Array(value) {
2567
- return value instanceof globalThis.Uint8Array;
2568
- }
2569
- function IsUndefined(value) {
2570
- return value === void 0;
2571
- }
2572
-
2573
- // node_modules/@sinclair/typebox/build/esm/type/clone/value.mjs
2574
- function ArrayType(value) {
2575
- return value.map((value2) => Visit(value2));
2576
- }
2577
- function DateType(value) {
2578
- return new Date(value.getTime());
2579
- }
2580
- function Uint8ArrayType(value) {
2581
- return new Uint8Array(value);
2582
- }
2583
- function RegExpType(value) {
2584
- return new RegExp(value.source, value.flags);
2585
- }
2586
- function ObjectType(value) {
2587
- const result = {};
2588
- for (const key of Object.getOwnPropertyNames(value)) {
2589
- result[key] = Visit(value[key]);
2590
- }
2591
- for (const key of Object.getOwnPropertySymbols(value)) {
2592
- result[key] = Visit(value[key]);
2593
- }
2594
- return result;
2595
- }
2596
- function Visit(value) {
2597
- return IsArray(value) ? ArrayType(value) : IsDate(value) ? DateType(value) : IsUint8Array(value) ? Uint8ArrayType(value) : IsRegExp(value) ? RegExpType(value) : IsObject(value) ? ObjectType(value) : value;
2598
- }
2599
- function Clone(value) {
2600
- return Visit(value);
2601
- }
2602
-
2603
- // node_modules/@sinclair/typebox/build/esm/type/clone/type.mjs
2604
- function CloneType(schema, options) {
2605
- return options === void 0 ? Clone(schema) : Clone({ ...options, ...schema });
2606
- }
2607
-
2608
- // node_modules/@sinclair/typebox/build/esm/value/guard/guard.mjs
2609
- function IsObject2(value) {
2610
- return value !== null && typeof value === "object";
2611
- }
2612
- function IsArray2(value) {
2613
- return globalThis.Array.isArray(value) && !globalThis.ArrayBuffer.isView(value);
2614
- }
2615
- function IsUndefined2(value) {
2616
- return value === void 0;
2617
- }
2618
- function IsNumber2(value) {
2619
- return typeof value === "number";
2620
- }
2621
-
2622
- // node_modules/@sinclair/typebox/build/esm/system/policy.mjs
2623
- var TypeSystemPolicy;
2624
- (function(TypeSystemPolicy2) {
2625
- TypeSystemPolicy2.InstanceMode = "default";
2626
- TypeSystemPolicy2.ExactOptionalPropertyTypes = false;
2627
- TypeSystemPolicy2.AllowArrayObject = false;
2628
- TypeSystemPolicy2.AllowNaN = false;
2629
- TypeSystemPolicy2.AllowNullVoid = false;
2630
- function IsExactOptionalProperty(value, key) {
2631
- return TypeSystemPolicy2.ExactOptionalPropertyTypes ? key in value : value[key] !== void 0;
2632
- }
2633
- TypeSystemPolicy2.IsExactOptionalProperty = IsExactOptionalProperty;
2634
- function IsObjectLike(value) {
2635
- const isObject = IsObject2(value);
2636
- return TypeSystemPolicy2.AllowArrayObject ? isObject : isObject && !IsArray2(value);
2637
- }
2638
- TypeSystemPolicy2.IsObjectLike = IsObjectLike;
2639
- function IsRecordLike(value) {
2640
- return IsObjectLike(value) && !(value instanceof Date) && !(value instanceof Uint8Array);
2641
- }
2642
- TypeSystemPolicy2.IsRecordLike = IsRecordLike;
2643
- function IsNumberLike(value) {
2644
- return TypeSystemPolicy2.AllowNaN ? IsNumber2(value) : Number.isFinite(value);
2645
- }
2646
- TypeSystemPolicy2.IsNumberLike = IsNumberLike;
2647
- function IsVoidLike(value) {
2648
- const isUndefined = IsUndefined2(value);
2649
- return TypeSystemPolicy2.AllowNullVoid ? isUndefined || value === null : isUndefined;
2650
- }
2651
- TypeSystemPolicy2.IsVoidLike = IsVoidLike;
2652
- })(TypeSystemPolicy || (TypeSystemPolicy = {}));
2653
-
2654
- // node_modules/@sinclair/typebox/build/esm/type/create/immutable.mjs
2655
- function ImmutableArray(value) {
2656
- return globalThis.Object.freeze(value).map((value2) => Immutable(value2));
2657
- }
2658
- function ImmutableDate(value) {
2659
- return value;
2660
- }
2661
- function ImmutableUint8Array(value) {
2662
- return value;
2663
- }
2664
- function ImmutableRegExp(value) {
2665
- return value;
2666
- }
2667
- function ImmutableObject(value) {
2668
- const result = {};
2669
- for (const key of Object.getOwnPropertyNames(value)) {
2670
- result[key] = Immutable(value[key]);
2671
- }
2672
- for (const key of Object.getOwnPropertySymbols(value)) {
2673
- result[key] = Immutable(value[key]);
2674
- }
2675
- return globalThis.Object.freeze(result);
2676
- }
2677
- function Immutable(value) {
2678
- return IsArray(value) ? ImmutableArray(value) : IsDate(value) ? ImmutableDate(value) : IsUint8Array(value) ? ImmutableUint8Array(value) : IsRegExp(value) ? ImmutableRegExp(value) : IsObject(value) ? ImmutableObject(value) : value;
2679
- }
2680
-
2681
- // node_modules/@sinclair/typebox/build/esm/type/create/type.mjs
2682
- function CreateType(schema, options) {
2683
- const result = options !== void 0 ? { ...options, ...schema } : schema;
2684
- switch (TypeSystemPolicy.InstanceMode) {
2685
- case "freeze":
2686
- return Immutable(result);
2687
- case "clone":
2688
- return Clone(result);
2689
- default:
2690
- return result;
2691
- }
2692
- }
2693
-
2694
- // node_modules/@sinclair/typebox/build/esm/type/error/error.mjs
2695
- var TypeBoxError = class extends Error {
2696
- constructor(message) {
2697
- super(message);
2698
- }
2699
- };
2700
-
2701
- // node_modules/@sinclair/typebox/build/esm/type/symbols/symbols.mjs
2702
- var TransformKind = /* @__PURE__ */ Symbol.for("TypeBox.Transform");
2703
- var ReadonlyKind = /* @__PURE__ */ Symbol.for("TypeBox.Readonly");
2704
- var OptionalKind = /* @__PURE__ */ Symbol.for("TypeBox.Optional");
2705
- var Hint = /* @__PURE__ */ Symbol.for("TypeBox.Hint");
2706
- var Kind = /* @__PURE__ */ Symbol.for("TypeBox.Kind");
2707
-
2708
- // node_modules/@sinclair/typebox/build/esm/type/guard/kind.mjs
2709
- function IsReadonly(value) {
2710
- return IsObject(value) && value[ReadonlyKind] === "Readonly";
2711
- }
2712
- function IsOptional(value) {
2713
- return IsObject(value) && value[OptionalKind] === "Optional";
2714
- }
2715
- function IsAny(value) {
2716
- return IsKindOf(value, "Any");
2717
- }
2718
- function IsArgument(value) {
2719
- return IsKindOf(value, "Argument");
2720
- }
2721
- function IsArray3(value) {
2722
- return IsKindOf(value, "Array");
2723
- }
2724
- function IsAsyncIterator2(value) {
2725
- return IsKindOf(value, "AsyncIterator");
2726
- }
2727
- function IsBigInt2(value) {
2728
- return IsKindOf(value, "BigInt");
2729
- }
2730
- function IsBoolean2(value) {
2731
- return IsKindOf(value, "Boolean");
2732
- }
2733
- function IsComputed(value) {
2734
- return IsKindOf(value, "Computed");
2735
- }
2736
- function IsConstructor(value) {
2737
- return IsKindOf(value, "Constructor");
2738
- }
2739
- function IsDate2(value) {
2740
- return IsKindOf(value, "Date");
2741
- }
2742
- function IsFunction2(value) {
2743
- return IsKindOf(value, "Function");
2744
- }
2745
- function IsInteger(value) {
2746
- return IsKindOf(value, "Integer");
2747
- }
2748
- function IsIntersect(value) {
2749
- return IsKindOf(value, "Intersect");
2750
- }
2751
- function IsIterator2(value) {
2752
- return IsKindOf(value, "Iterator");
2753
- }
2754
- function IsKindOf(value, kind) {
2755
- return IsObject(value) && Kind in value && value[Kind] === kind;
2756
- }
2757
- function IsLiteralValue(value) {
2758
- return IsBoolean(value) || IsNumber(value) || IsString(value);
2759
- }
2760
- function IsLiteral(value) {
2761
- return IsKindOf(value, "Literal");
2762
- }
2763
- function IsMappedKey(value) {
2764
- return IsKindOf(value, "MappedKey");
2765
- }
2766
- function IsMappedResult(value) {
2767
- return IsKindOf(value, "MappedResult");
2768
- }
2769
- function IsNever(value) {
2770
- return IsKindOf(value, "Never");
2771
- }
2772
- function IsNot(value) {
2773
- return IsKindOf(value, "Not");
2774
- }
2775
- function IsNull2(value) {
2776
- return IsKindOf(value, "Null");
2777
- }
2778
- function IsNumber3(value) {
2779
- return IsKindOf(value, "Number");
2780
- }
2781
- function IsObject3(value) {
2782
- return IsKindOf(value, "Object");
2783
- }
2784
- function IsPromise(value) {
2785
- return IsKindOf(value, "Promise");
2786
- }
2787
- function IsRecord(value) {
2788
- return IsKindOf(value, "Record");
2789
- }
2790
- function IsRef(value) {
2791
- return IsKindOf(value, "Ref");
2792
- }
2793
- function IsRegExp2(value) {
2794
- return IsKindOf(value, "RegExp");
2795
- }
2796
- function IsString2(value) {
2797
- return IsKindOf(value, "String");
2798
- }
2799
- function IsSymbol2(value) {
2800
- return IsKindOf(value, "Symbol");
2801
- }
2802
- function IsTemplateLiteral(value) {
2803
- return IsKindOf(value, "TemplateLiteral");
2804
- }
2805
- function IsThis(value) {
2806
- return IsKindOf(value, "This");
2807
- }
2808
- function IsTransform(value) {
2809
- return IsObject(value) && TransformKind in value;
2810
- }
2811
- function IsTuple(value) {
2812
- return IsKindOf(value, "Tuple");
2813
- }
2814
- function IsUndefined3(value) {
2815
- return IsKindOf(value, "Undefined");
2816
- }
2817
- function IsUnion(value) {
2818
- return IsKindOf(value, "Union");
2819
- }
2820
- function IsUint8Array2(value) {
2821
- return IsKindOf(value, "Uint8Array");
2822
- }
2823
- function IsUnknown(value) {
2824
- return IsKindOf(value, "Unknown");
2825
- }
2826
- function IsUnsafe(value) {
2827
- return IsKindOf(value, "Unsafe");
2828
- }
2829
- function IsVoid(value) {
2830
- return IsKindOf(value, "Void");
2831
- }
2832
- function IsKind(value) {
2833
- return IsObject(value) && Kind in value && IsString(value[Kind]);
2834
- }
2835
- function IsSchema(value) {
2836
- return IsAny(value) || IsArgument(value) || IsArray3(value) || IsBoolean2(value) || IsBigInt2(value) || IsAsyncIterator2(value) || IsComputed(value) || IsConstructor(value) || IsDate2(value) || IsFunction2(value) || IsInteger(value) || IsIntersect(value) || IsIterator2(value) || IsLiteral(value) || IsMappedKey(value) || IsMappedResult(value) || IsNever(value) || IsNot(value) || IsNull2(value) || IsNumber3(value) || IsObject3(value) || IsPromise(value) || IsRecord(value) || IsRef(value) || IsRegExp2(value) || IsString2(value) || IsSymbol2(value) || IsTemplateLiteral(value) || IsThis(value) || IsTuple(value) || IsUndefined3(value) || IsUnion(value) || IsUint8Array2(value) || IsUnknown(value) || IsUnsafe(value) || IsVoid(value) || IsKind(value);
2837
- }
2838
-
2839
- // node_modules/@sinclair/typebox/build/esm/type/guard/type.mjs
2840
- var type_exports = {};
2841
- __export(type_exports, {
2842
- IsAny: () => IsAny2,
2843
- IsArgument: () => IsArgument2,
2844
- IsArray: () => IsArray4,
2845
- IsAsyncIterator: () => IsAsyncIterator3,
2846
- IsBigInt: () => IsBigInt3,
2847
- IsBoolean: () => IsBoolean3,
2848
- IsComputed: () => IsComputed2,
2849
- IsConstructor: () => IsConstructor2,
2850
- IsDate: () => IsDate3,
2851
- IsFunction: () => IsFunction3,
2852
- IsImport: () => IsImport,
2853
- IsInteger: () => IsInteger2,
2854
- IsIntersect: () => IsIntersect2,
2855
- IsIterator: () => IsIterator3,
2856
- IsKind: () => IsKind2,
2857
- IsKindOf: () => IsKindOf2,
2858
- IsLiteral: () => IsLiteral2,
2859
- IsLiteralBoolean: () => IsLiteralBoolean,
2860
- IsLiteralNumber: () => IsLiteralNumber,
2861
- IsLiteralString: () => IsLiteralString,
2862
- IsLiteralValue: () => IsLiteralValue2,
2863
- IsMappedKey: () => IsMappedKey2,
2864
- IsMappedResult: () => IsMappedResult2,
2865
- IsNever: () => IsNever2,
2866
- IsNot: () => IsNot2,
2867
- IsNull: () => IsNull3,
2868
- IsNumber: () => IsNumber4,
2869
- IsObject: () => IsObject4,
2870
- IsOptional: () => IsOptional2,
2871
- IsPromise: () => IsPromise2,
2872
- IsProperties: () => IsProperties,
2873
- IsReadonly: () => IsReadonly2,
2874
- IsRecord: () => IsRecord2,
2875
- IsRecursive: () => IsRecursive,
2876
- IsRef: () => IsRef2,
2877
- IsRegExp: () => IsRegExp3,
2878
- IsSchema: () => IsSchema2,
2879
- IsString: () => IsString3,
2880
- IsSymbol: () => IsSymbol3,
2881
- IsTemplateLiteral: () => IsTemplateLiteral2,
2882
- IsThis: () => IsThis2,
2883
- IsTransform: () => IsTransform2,
2884
- IsTuple: () => IsTuple2,
2885
- IsUint8Array: () => IsUint8Array3,
2886
- IsUndefined: () => IsUndefined4,
2887
- IsUnion: () => IsUnion2,
2888
- IsUnionLiteral: () => IsUnionLiteral,
2889
- IsUnknown: () => IsUnknown2,
2890
- IsUnsafe: () => IsUnsafe2,
2891
- IsVoid: () => IsVoid2,
2892
- TypeGuardUnknownTypeError: () => TypeGuardUnknownTypeError
2893
- });
2894
- var TypeGuardUnknownTypeError = class extends TypeBoxError {
2895
- };
2896
- var KnownTypes = [
2897
- "Argument",
2898
- "Any",
2899
- "Array",
2900
- "AsyncIterator",
2901
- "BigInt",
2902
- "Boolean",
2903
- "Computed",
2904
- "Constructor",
2905
- "Date",
2906
- "Enum",
2907
- "Function",
2908
- "Integer",
2909
- "Intersect",
2910
- "Iterator",
2911
- "Literal",
2912
- "MappedKey",
2913
- "MappedResult",
2914
- "Not",
2915
- "Null",
2916
- "Number",
2917
- "Object",
2918
- "Promise",
2919
- "Record",
2920
- "Ref",
2921
- "RegExp",
2922
- "String",
2923
- "Symbol",
2924
- "TemplateLiteral",
2925
- "This",
2926
- "Tuple",
2927
- "Undefined",
2928
- "Union",
2929
- "Uint8Array",
2930
- "Unknown",
2931
- "Void"
2932
- ];
2933
- function IsPattern(value) {
2934
- try {
2935
- new RegExp(value);
2936
- return true;
2937
- } catch {
2938
- return false;
2939
- }
2940
- }
2941
- function IsControlCharacterFree(value) {
2942
- if (!IsString(value))
2943
- return false;
2944
- for (let i = 0; i < value.length; i++) {
2945
- const code = value.charCodeAt(i);
2946
- if (code >= 7 && code <= 13 || code === 27 || code === 127) {
2947
- return false;
2948
- }
2949
- }
2950
- return true;
2951
- }
2952
- function IsAdditionalProperties(value) {
2953
- return IsOptionalBoolean(value) || IsSchema2(value);
2954
- }
2955
- function IsOptionalBigInt(value) {
2956
- return IsUndefined(value) || IsBigInt(value);
2957
- }
2958
- function IsOptionalNumber(value) {
2959
- return IsUndefined(value) || IsNumber(value);
2960
- }
2961
- function IsOptionalBoolean(value) {
2962
- return IsUndefined(value) || IsBoolean(value);
2963
- }
2964
- function IsOptionalString(value) {
2965
- return IsUndefined(value) || IsString(value);
2966
- }
2967
- function IsOptionalPattern(value) {
2968
- return IsUndefined(value) || IsString(value) && IsControlCharacterFree(value) && IsPattern(value);
2969
- }
2970
- function IsOptionalFormat(value) {
2971
- return IsUndefined(value) || IsString(value) && IsControlCharacterFree(value);
2972
- }
2973
- function IsOptionalSchema(value) {
2974
- return IsUndefined(value) || IsSchema2(value);
2975
- }
2976
- function IsReadonly2(value) {
2977
- return IsObject(value) && value[ReadonlyKind] === "Readonly";
2978
- }
2979
- function IsOptional2(value) {
2980
- return IsObject(value) && value[OptionalKind] === "Optional";
2981
- }
2982
- function IsAny2(value) {
2983
- return IsKindOf2(value, "Any") && IsOptionalString(value.$id);
2984
- }
2985
- function IsArgument2(value) {
2986
- return IsKindOf2(value, "Argument") && IsNumber(value.index);
2987
- }
2988
- function IsArray4(value) {
2989
- return IsKindOf2(value, "Array") && value.type === "array" && IsOptionalString(value.$id) && IsSchema2(value.items) && IsOptionalNumber(value.minItems) && IsOptionalNumber(value.maxItems) && IsOptionalBoolean(value.uniqueItems) && IsOptionalSchema(value.contains) && IsOptionalNumber(value.minContains) && IsOptionalNumber(value.maxContains);
2990
- }
2991
- function IsAsyncIterator3(value) {
2992
- return IsKindOf2(value, "AsyncIterator") && value.type === "AsyncIterator" && IsOptionalString(value.$id) && IsSchema2(value.items);
2993
- }
2994
- function IsBigInt3(value) {
2995
- return IsKindOf2(value, "BigInt") && value.type === "bigint" && IsOptionalString(value.$id) && IsOptionalBigInt(value.exclusiveMaximum) && IsOptionalBigInt(value.exclusiveMinimum) && IsOptionalBigInt(value.maximum) && IsOptionalBigInt(value.minimum) && IsOptionalBigInt(value.multipleOf);
2996
- }
2997
- function IsBoolean3(value) {
2998
- return IsKindOf2(value, "Boolean") && value.type === "boolean" && IsOptionalString(value.$id);
2999
- }
3000
- function IsComputed2(value) {
3001
- return IsKindOf2(value, "Computed") && IsString(value.target) && IsArray(value.parameters) && value.parameters.every((schema) => IsSchema2(schema));
3002
- }
3003
- function IsConstructor2(value) {
3004
- return IsKindOf2(value, "Constructor") && value.type === "Constructor" && IsOptionalString(value.$id) && IsArray(value.parameters) && value.parameters.every((schema) => IsSchema2(schema)) && IsSchema2(value.returns);
3005
- }
3006
- function IsDate3(value) {
3007
- return IsKindOf2(value, "Date") && value.type === "Date" && IsOptionalString(value.$id) && IsOptionalNumber(value.exclusiveMaximumTimestamp) && IsOptionalNumber(value.exclusiveMinimumTimestamp) && IsOptionalNumber(value.maximumTimestamp) && IsOptionalNumber(value.minimumTimestamp) && IsOptionalNumber(value.multipleOfTimestamp);
3008
- }
3009
- function IsFunction3(value) {
3010
- return IsKindOf2(value, "Function") && value.type === "Function" && IsOptionalString(value.$id) && IsArray(value.parameters) && value.parameters.every((schema) => IsSchema2(schema)) && IsSchema2(value.returns);
3011
- }
3012
- function IsImport(value) {
3013
- return IsKindOf2(value, "Import") && HasPropertyKey(value, "$defs") && IsObject(value.$defs) && IsProperties(value.$defs) && HasPropertyKey(value, "$ref") && IsString(value.$ref) && value.$ref in value.$defs;
3014
- }
3015
- function IsInteger2(value) {
3016
- return IsKindOf2(value, "Integer") && value.type === "integer" && IsOptionalString(value.$id) && IsOptionalNumber(value.exclusiveMaximum) && IsOptionalNumber(value.exclusiveMinimum) && IsOptionalNumber(value.maximum) && IsOptionalNumber(value.minimum) && IsOptionalNumber(value.multipleOf);
3017
- }
3018
- function IsProperties(value) {
3019
- return IsObject(value) && Object.entries(value).every(([key, schema]) => IsControlCharacterFree(key) && IsSchema2(schema));
3020
- }
3021
- function IsIntersect2(value) {
3022
- return IsKindOf2(value, "Intersect") && (IsString(value.type) && value.type !== "object" ? false : true) && IsArray(value.allOf) && value.allOf.every((schema) => IsSchema2(schema) && !IsTransform2(schema)) && IsOptionalString(value.type) && (IsOptionalBoolean(value.unevaluatedProperties) || IsOptionalSchema(value.unevaluatedProperties)) && IsOptionalString(value.$id);
3023
- }
3024
- function IsIterator3(value) {
3025
- return IsKindOf2(value, "Iterator") && value.type === "Iterator" && IsOptionalString(value.$id) && IsSchema2(value.items);
3026
- }
3027
- function IsKindOf2(value, kind) {
3028
- return IsObject(value) && Kind in value && value[Kind] === kind;
3029
- }
3030
- function IsLiteralString(value) {
3031
- return IsLiteral2(value) && IsString(value.const);
3032
- }
3033
- function IsLiteralNumber(value) {
3034
- return IsLiteral2(value) && IsNumber(value.const);
3035
- }
3036
- function IsLiteralBoolean(value) {
3037
- return IsLiteral2(value) && IsBoolean(value.const);
3038
- }
3039
- function IsLiteral2(value) {
3040
- return IsKindOf2(value, "Literal") && IsOptionalString(value.$id) && IsLiteralValue2(value.const);
3041
- }
3042
- function IsLiteralValue2(value) {
3043
- return IsBoolean(value) || IsNumber(value) || IsString(value);
3044
- }
3045
- function IsMappedKey2(value) {
3046
- return IsKindOf2(value, "MappedKey") && IsArray(value.keys) && value.keys.every((key) => IsNumber(key) || IsString(key));
3047
- }
3048
- function IsMappedResult2(value) {
3049
- return IsKindOf2(value, "MappedResult") && IsProperties(value.properties);
3050
- }
3051
- function IsNever2(value) {
3052
- return IsKindOf2(value, "Never") && IsObject(value.not) && Object.getOwnPropertyNames(value.not).length === 0;
3053
- }
3054
- function IsNot2(value) {
3055
- return IsKindOf2(value, "Not") && IsSchema2(value.not);
3056
- }
3057
- function IsNull3(value) {
3058
- return IsKindOf2(value, "Null") && value.type === "null" && IsOptionalString(value.$id);
3059
- }
3060
- function IsNumber4(value) {
3061
- return IsKindOf2(value, "Number") && value.type === "number" && IsOptionalString(value.$id) && IsOptionalNumber(value.exclusiveMaximum) && IsOptionalNumber(value.exclusiveMinimum) && IsOptionalNumber(value.maximum) && IsOptionalNumber(value.minimum) && IsOptionalNumber(value.multipleOf);
3062
- }
3063
- function IsObject4(value) {
3064
- return IsKindOf2(value, "Object") && value.type === "object" && IsOptionalString(value.$id) && IsProperties(value.properties) && IsAdditionalProperties(value.additionalProperties) && IsOptionalNumber(value.minProperties) && IsOptionalNumber(value.maxProperties);
3065
- }
3066
- function IsPromise2(value) {
3067
- return IsKindOf2(value, "Promise") && value.type === "Promise" && IsOptionalString(value.$id) && IsSchema2(value.item);
3068
- }
3069
- function IsRecord2(value) {
3070
- return IsKindOf2(value, "Record") && value.type === "object" && IsOptionalString(value.$id) && IsAdditionalProperties(value.additionalProperties) && IsObject(value.patternProperties) && ((schema) => {
3071
- const keys = Object.getOwnPropertyNames(schema.patternProperties);
3072
- return keys.length === 1 && IsPattern(keys[0]) && IsObject(schema.patternProperties) && IsSchema2(schema.patternProperties[keys[0]]);
3073
- })(value);
3074
- }
3075
- function IsRecursive(value) {
3076
- return IsObject(value) && Hint in value && value[Hint] === "Recursive";
3077
- }
3078
- function IsRef2(value) {
3079
- return IsKindOf2(value, "Ref") && IsOptionalString(value.$id) && IsString(value.$ref);
3080
- }
3081
- function IsRegExp3(value) {
3082
- return IsKindOf2(value, "RegExp") && IsOptionalString(value.$id) && IsString(value.source) && IsString(value.flags) && IsOptionalNumber(value.maxLength) && IsOptionalNumber(value.minLength);
3083
- }
3084
- function IsString3(value) {
3085
- return IsKindOf2(value, "String") && value.type === "string" && IsOptionalString(value.$id) && IsOptionalNumber(value.minLength) && IsOptionalNumber(value.maxLength) && IsOptionalPattern(value.pattern) && IsOptionalFormat(value.format);
3086
- }
3087
- function IsSymbol3(value) {
3088
- return IsKindOf2(value, "Symbol") && value.type === "symbol" && IsOptionalString(value.$id);
3089
- }
3090
- function IsTemplateLiteral2(value) {
3091
- return IsKindOf2(value, "TemplateLiteral") && value.type === "string" && IsString(value.pattern) && value.pattern[0] === "^" && value.pattern[value.pattern.length - 1] === "$";
3092
- }
3093
- function IsThis2(value) {
3094
- return IsKindOf2(value, "This") && IsOptionalString(value.$id) && IsString(value.$ref);
3095
- }
3096
- function IsTransform2(value) {
3097
- return IsObject(value) && TransformKind in value;
3098
- }
3099
- function IsTuple2(value) {
3100
- return IsKindOf2(value, "Tuple") && value.type === "array" && IsOptionalString(value.$id) && IsNumber(value.minItems) && IsNumber(value.maxItems) && value.minItems === value.maxItems && // empty
3101
- (IsUndefined(value.items) && IsUndefined(value.additionalItems) && value.minItems === 0 || IsArray(value.items) && value.items.every((schema) => IsSchema2(schema)));
3102
- }
3103
- function IsUndefined4(value) {
3104
- return IsKindOf2(value, "Undefined") && value.type === "undefined" && IsOptionalString(value.$id);
3105
- }
3106
- function IsUnionLiteral(value) {
3107
- return IsUnion2(value) && value.anyOf.every((schema) => IsLiteralString(schema) || IsLiteralNumber(schema));
3108
- }
3109
- function IsUnion2(value) {
3110
- return IsKindOf2(value, "Union") && IsOptionalString(value.$id) && IsObject(value) && IsArray(value.anyOf) && value.anyOf.every((schema) => IsSchema2(schema));
3111
- }
3112
- function IsUint8Array3(value) {
3113
- return IsKindOf2(value, "Uint8Array") && value.type === "Uint8Array" && IsOptionalString(value.$id) && IsOptionalNumber(value.minByteLength) && IsOptionalNumber(value.maxByteLength);
3114
- }
3115
- function IsUnknown2(value) {
3116
- return IsKindOf2(value, "Unknown") && IsOptionalString(value.$id);
3117
- }
3118
- function IsUnsafe2(value) {
3119
- return IsKindOf2(value, "Unsafe");
3120
- }
3121
- function IsVoid2(value) {
3122
- return IsKindOf2(value, "Void") && value.type === "void" && IsOptionalString(value.$id);
3123
- }
3124
- function IsKind2(value) {
3125
- return IsObject(value) && Kind in value && IsString(value[Kind]) && !KnownTypes.includes(value[Kind]);
3126
- }
3127
- function IsSchema2(value) {
3128
- return IsObject(value) && (IsAny2(value) || IsArgument2(value) || IsArray4(value) || IsBoolean3(value) || IsBigInt3(value) || IsAsyncIterator3(value) || IsComputed2(value) || IsConstructor2(value) || IsDate3(value) || IsFunction3(value) || IsInteger2(value) || IsIntersect2(value) || IsIterator3(value) || IsLiteral2(value) || IsMappedKey2(value) || IsMappedResult2(value) || IsNever2(value) || IsNot2(value) || IsNull3(value) || IsNumber4(value) || IsObject4(value) || IsPromise2(value) || IsRecord2(value) || IsRef2(value) || IsRegExp3(value) || IsString3(value) || IsSymbol3(value) || IsTemplateLiteral2(value) || IsThis2(value) || IsTuple2(value) || IsUndefined4(value) || IsUnion2(value) || IsUint8Array3(value) || IsUnknown2(value) || IsUnsafe2(value) || IsVoid2(value) || IsKind2(value));
3129
- }
3130
-
3131
- // node_modules/@sinclair/typebox/build/esm/type/patterns/patterns.mjs
3132
- var PatternBoolean = "(true|false)";
3133
- var PatternNumber = "(0|[1-9][0-9]*)";
3134
- var PatternString = "(.*)";
3135
- var PatternNever = "(?!.*)";
3136
- var PatternBooleanExact = `^${PatternBoolean}$`;
3137
- var PatternNumberExact = `^${PatternNumber}$`;
3138
- var PatternStringExact = `^${PatternString}$`;
3139
- var PatternNeverExact = `^${PatternNever}$`;
3140
-
3141
- // node_modules/@sinclair/typebox/build/esm/type/sets/set.mjs
3142
- function SetIncludes(T, S) {
3143
- return T.includes(S);
3144
- }
3145
- function SetDistinct(T) {
3146
- return [...new Set(T)];
3147
- }
3148
- function SetIntersect(T, S) {
3149
- return T.filter((L) => S.includes(L));
3150
- }
3151
- function SetIntersectManyResolve(T, Init) {
3152
- return T.reduce((Acc, L) => {
3153
- return SetIntersect(Acc, L);
3154
- }, Init);
3155
- }
3156
- function SetIntersectMany(T) {
3157
- return T.length === 1 ? T[0] : T.length > 1 ? SetIntersectManyResolve(T.slice(1), T[0]) : [];
3158
- }
3159
- function SetUnionMany(T) {
3160
- const Acc = [];
3161
- for (const L of T)
3162
- Acc.push(...L);
3163
- return Acc;
3164
- }
3165
-
3166
- // node_modules/@sinclair/typebox/build/esm/type/any/any.mjs
3167
- function Any(options) {
3168
- return CreateType({ [Kind]: "Any" }, options);
3169
- }
3170
-
3171
- // node_modules/@sinclair/typebox/build/esm/type/array/array.mjs
3172
- function Array2(items, options) {
3173
- return CreateType({ [Kind]: "Array", type: "array", items }, options);
3174
- }
3175
-
3176
- // node_modules/@sinclair/typebox/build/esm/type/argument/argument.mjs
3177
- function Argument(index) {
3178
- return CreateType({ [Kind]: "Argument", index });
3179
- }
3180
-
3181
- // node_modules/@sinclair/typebox/build/esm/type/async-iterator/async-iterator.mjs
3182
- function AsyncIterator(items, options) {
3183
- return CreateType({ [Kind]: "AsyncIterator", type: "AsyncIterator", items }, options);
3184
- }
3185
-
3186
- // node_modules/@sinclair/typebox/build/esm/type/computed/computed.mjs
3187
- function Computed(target, parameters, options) {
3188
- return CreateType({ [Kind]: "Computed", target, parameters }, options);
3189
- }
3190
-
3191
- // node_modules/@sinclair/typebox/build/esm/type/discard/discard.mjs
3192
- function DiscardKey(value, key) {
3193
- const { [key]: _, ...rest } = value;
3194
- return rest;
3195
- }
3196
- function Discard(value, keys) {
3197
- return keys.reduce((acc, key) => DiscardKey(acc, key), value);
3198
- }
3199
-
3200
- // node_modules/@sinclair/typebox/build/esm/type/never/never.mjs
3201
- function Never(options) {
3202
- return CreateType({ [Kind]: "Never", not: {} }, options);
3203
- }
3204
-
3205
- // node_modules/@sinclair/typebox/build/esm/type/mapped/mapped-result.mjs
3206
- function MappedResult(properties) {
3207
- return CreateType({
3208
- [Kind]: "MappedResult",
3209
- properties
3210
- });
3211
- }
3212
-
3213
- // node_modules/@sinclair/typebox/build/esm/type/constructor/constructor.mjs
3214
- function Constructor(parameters, returns, options) {
3215
- return CreateType({ [Kind]: "Constructor", type: "Constructor", parameters, returns }, options);
3216
- }
3217
-
3218
- // node_modules/@sinclair/typebox/build/esm/type/function/function.mjs
3219
- function Function(parameters, returns, options) {
3220
- return CreateType({ [Kind]: "Function", type: "Function", parameters, returns }, options);
3221
- }
3222
-
3223
- // node_modules/@sinclair/typebox/build/esm/type/union/union-create.mjs
3224
- function UnionCreate(T, options) {
3225
- return CreateType({ [Kind]: "Union", anyOf: T }, options);
3226
- }
3227
-
3228
- // node_modules/@sinclair/typebox/build/esm/type/union/union-evaluated.mjs
3229
- function IsUnionOptional(types) {
3230
- return types.some((type) => IsOptional(type));
3231
- }
3232
- function RemoveOptionalFromRest(types) {
3233
- return types.map((left) => IsOptional(left) ? RemoveOptionalFromType(left) : left);
3234
- }
3235
- function RemoveOptionalFromType(T) {
3236
- return Discard(T, [OptionalKind]);
3237
- }
3238
- function ResolveUnion(types, options) {
3239
- const isOptional = IsUnionOptional(types);
3240
- return isOptional ? Optional(UnionCreate(RemoveOptionalFromRest(types), options)) : UnionCreate(RemoveOptionalFromRest(types), options);
3241
- }
3242
- function UnionEvaluated(T, options) {
3243
- return T.length === 1 ? CreateType(T[0], options) : T.length === 0 ? Never(options) : ResolveUnion(T, options);
3244
- }
3245
-
3246
- // node_modules/@sinclair/typebox/build/esm/type/union/union.mjs
3247
- function Union(types, options) {
3248
- return types.length === 0 ? Never(options) : types.length === 1 ? CreateType(types[0], options) : UnionCreate(types, options);
3249
- }
3250
-
3251
- // node_modules/@sinclair/typebox/build/esm/type/template-literal/parse.mjs
3252
- var TemplateLiteralParserError = class extends TypeBoxError {
3253
- };
3254
- function Unescape(pattern) {
3255
- return pattern.replace(/\\\$/g, "$").replace(/\\\*/g, "*").replace(/\\\^/g, "^").replace(/\\\|/g, "|").replace(/\\\(/g, "(").replace(/\\\)/g, ")");
3256
- }
3257
- function IsNonEscaped(pattern, index, char) {
3258
- return pattern[index] === char && pattern.charCodeAt(index - 1) !== 92;
3259
- }
3260
- function IsOpenParen(pattern, index) {
3261
- return IsNonEscaped(pattern, index, "(");
3262
- }
3263
- function IsCloseParen(pattern, index) {
3264
- return IsNonEscaped(pattern, index, ")");
3265
- }
3266
- function IsSeparator(pattern, index) {
3267
- return IsNonEscaped(pattern, index, "|");
3268
- }
3269
- function IsGroup(pattern) {
3270
- if (!(IsOpenParen(pattern, 0) && IsCloseParen(pattern, pattern.length - 1)))
3271
- return false;
3272
- let count = 0;
3273
- for (let index = 0; index < pattern.length; index++) {
3274
- if (IsOpenParen(pattern, index))
3275
- count += 1;
3276
- if (IsCloseParen(pattern, index))
3277
- count -= 1;
3278
- if (count === 0 && index !== pattern.length - 1)
3279
- return false;
3280
- }
3281
- return true;
3282
- }
3283
- function InGroup(pattern) {
3284
- return pattern.slice(1, pattern.length - 1);
3285
- }
3286
- function IsPrecedenceOr(pattern) {
3287
- let count = 0;
3288
- for (let index = 0; index < pattern.length; index++) {
3289
- if (IsOpenParen(pattern, index))
3290
- count += 1;
3291
- if (IsCloseParen(pattern, index))
3292
- count -= 1;
3293
- if (IsSeparator(pattern, index) && count === 0)
3294
- return true;
3295
- }
3296
- return false;
3297
- }
3298
- function IsPrecedenceAnd(pattern) {
3299
- for (let index = 0; index < pattern.length; index++) {
3300
- if (IsOpenParen(pattern, index))
3301
- return true;
3302
- }
3303
- return false;
3304
- }
3305
- function Or(pattern) {
3306
- let [count, start] = [0, 0];
3307
- const expressions = [];
3308
- for (let index = 0; index < pattern.length; index++) {
3309
- if (IsOpenParen(pattern, index))
3310
- count += 1;
3311
- if (IsCloseParen(pattern, index))
3312
- count -= 1;
3313
- if (IsSeparator(pattern, index) && count === 0) {
3314
- const range2 = pattern.slice(start, index);
3315
- if (range2.length > 0)
3316
- expressions.push(TemplateLiteralParse(range2));
3317
- start = index + 1;
3318
- }
3319
- }
3320
- const range = pattern.slice(start);
3321
- if (range.length > 0)
3322
- expressions.push(TemplateLiteralParse(range));
3323
- if (expressions.length === 0)
3324
- return { type: "const", const: "" };
3325
- if (expressions.length === 1)
3326
- return expressions[0];
3327
- return { type: "or", expr: expressions };
3328
- }
3329
- function And(pattern) {
3330
- function Group(value, index) {
3331
- if (!IsOpenParen(value, index))
3332
- throw new TemplateLiteralParserError(`TemplateLiteralParser: Index must point to open parens`);
3333
- let count = 0;
3334
- for (let scan = index; scan < value.length; scan++) {
3335
- if (IsOpenParen(value, scan))
3336
- count += 1;
3337
- if (IsCloseParen(value, scan))
3338
- count -= 1;
3339
- if (count === 0)
3340
- return [index, scan];
3341
- }
3342
- throw new TemplateLiteralParserError(`TemplateLiteralParser: Unclosed group parens in expression`);
3343
- }
3344
- function Range(pattern2, index) {
3345
- for (let scan = index; scan < pattern2.length; scan++) {
3346
- if (IsOpenParen(pattern2, scan))
3347
- return [index, scan];
3348
- }
3349
- return [index, pattern2.length];
3350
- }
3351
- const expressions = [];
3352
- for (let index = 0; index < pattern.length; index++) {
3353
- if (IsOpenParen(pattern, index)) {
3354
- const [start, end] = Group(pattern, index);
3355
- const range = pattern.slice(start, end + 1);
3356
- expressions.push(TemplateLiteralParse(range));
3357
- index = end;
3358
- } else {
3359
- const [start, end] = Range(pattern, index);
3360
- const range = pattern.slice(start, end);
3361
- if (range.length > 0)
3362
- expressions.push(TemplateLiteralParse(range));
3363
- index = end - 1;
3364
- }
3365
- }
3366
- return expressions.length === 0 ? { type: "const", const: "" } : expressions.length === 1 ? expressions[0] : { type: "and", expr: expressions };
3367
- }
3368
- function TemplateLiteralParse(pattern) {
3369
- return IsGroup(pattern) ? TemplateLiteralParse(InGroup(pattern)) : IsPrecedenceOr(pattern) ? Or(pattern) : IsPrecedenceAnd(pattern) ? And(pattern) : { type: "const", const: Unescape(pattern) };
3370
- }
3371
- function TemplateLiteralParseExact(pattern) {
3372
- return TemplateLiteralParse(pattern.slice(1, pattern.length - 1));
3373
- }
3374
-
3375
- // node_modules/@sinclair/typebox/build/esm/type/template-literal/finite.mjs
3376
- var TemplateLiteralFiniteError = class extends TypeBoxError {
3377
- };
3378
- function IsNumberExpression(expression) {
3379
- return expression.type === "or" && expression.expr.length === 2 && expression.expr[0].type === "const" && expression.expr[0].const === "0" && expression.expr[1].type === "const" && expression.expr[1].const === "[1-9][0-9]*";
3380
- }
3381
- function IsBooleanExpression(expression) {
3382
- return expression.type === "or" && expression.expr.length === 2 && expression.expr[0].type === "const" && expression.expr[0].const === "true" && expression.expr[1].type === "const" && expression.expr[1].const === "false";
3383
- }
3384
- function IsStringExpression(expression) {
3385
- return expression.type === "const" && expression.const === ".*";
3386
- }
3387
- function IsTemplateLiteralExpressionFinite(expression) {
3388
- return IsNumberExpression(expression) || IsStringExpression(expression) ? false : IsBooleanExpression(expression) ? true : expression.type === "and" ? expression.expr.every((expr) => IsTemplateLiteralExpressionFinite(expr)) : expression.type === "or" ? expression.expr.every((expr) => IsTemplateLiteralExpressionFinite(expr)) : expression.type === "const" ? true : (() => {
3389
- throw new TemplateLiteralFiniteError(`Unknown expression type`);
3390
- })();
3391
- }
3392
- function IsTemplateLiteralFinite(schema) {
3393
- const expression = TemplateLiteralParseExact(schema.pattern);
3394
- return IsTemplateLiteralExpressionFinite(expression);
3395
- }
3396
-
3397
- // node_modules/@sinclair/typebox/build/esm/type/template-literal/generate.mjs
3398
- var TemplateLiteralGenerateError = class extends TypeBoxError {
3399
- };
3400
- function* GenerateReduce(buffer) {
3401
- if (buffer.length === 1)
3402
- return yield* buffer[0];
3403
- for (const left of buffer[0]) {
3404
- for (const right of GenerateReduce(buffer.slice(1))) {
3405
- yield `${left}${right}`;
3406
- }
3407
- }
3408
- }
3409
- function* GenerateAnd(expression) {
3410
- return yield* GenerateReduce(expression.expr.map((expr) => [...TemplateLiteralExpressionGenerate(expr)]));
3411
- }
3412
- function* GenerateOr(expression) {
3413
- for (const expr of expression.expr)
3414
- yield* TemplateLiteralExpressionGenerate(expr);
3415
- }
3416
- function* GenerateConst(expression) {
3417
- return yield expression.const;
3418
- }
3419
- function* TemplateLiteralExpressionGenerate(expression) {
3420
- return expression.type === "and" ? yield* GenerateAnd(expression) : expression.type === "or" ? yield* GenerateOr(expression) : expression.type === "const" ? yield* GenerateConst(expression) : (() => {
3421
- throw new TemplateLiteralGenerateError("Unknown expression");
3422
- })();
3423
- }
3424
- function TemplateLiteralGenerate(schema) {
3425
- const expression = TemplateLiteralParseExact(schema.pattern);
3426
- return IsTemplateLiteralExpressionFinite(expression) ? [...TemplateLiteralExpressionGenerate(expression)] : [];
3427
- }
3428
-
3429
- // node_modules/@sinclair/typebox/build/esm/type/literal/literal.mjs
3430
- function Literal(value, options) {
3431
- return CreateType({
3432
- [Kind]: "Literal",
3433
- const: value,
3434
- type: typeof value
3435
- }, options);
3436
- }
3437
-
3438
- // node_modules/@sinclair/typebox/build/esm/type/boolean/boolean.mjs
3439
- function Boolean2(options) {
3440
- return CreateType({ [Kind]: "Boolean", type: "boolean" }, options);
3441
- }
3442
-
3443
- // node_modules/@sinclair/typebox/build/esm/type/bigint/bigint.mjs
3444
- function BigInt(options) {
3445
- return CreateType({ [Kind]: "BigInt", type: "bigint" }, options);
3446
- }
3447
-
3448
- // node_modules/@sinclair/typebox/build/esm/type/number/number.mjs
3449
- function Number2(options) {
3450
- return CreateType({ [Kind]: "Number", type: "number" }, options);
3451
- }
3452
-
3453
- // node_modules/@sinclair/typebox/build/esm/type/string/string.mjs
3454
- function String2(options) {
3455
- return CreateType({ [Kind]: "String", type: "string" }, options);
3456
- }
3457
-
3458
- // node_modules/@sinclair/typebox/build/esm/type/template-literal/syntax.mjs
3459
- function* FromUnion(syntax) {
3460
- const trim = syntax.trim().replace(/"|'/g, "");
3461
- return trim === "boolean" ? yield Boolean2() : trim === "number" ? yield Number2() : trim === "bigint" ? yield BigInt() : trim === "string" ? yield String2() : yield (() => {
3462
- const literals = trim.split("|").map((literal) => Literal(literal.trim()));
3463
- return literals.length === 0 ? Never() : literals.length === 1 ? literals[0] : UnionEvaluated(literals);
3464
- })();
3465
- }
3466
- function* FromTerminal(syntax) {
3467
- if (syntax[1] !== "{") {
3468
- const L = Literal("$");
3469
- const R = FromSyntax(syntax.slice(1));
3470
- return yield* [L, ...R];
3471
- }
3472
- for (let i = 2; i < syntax.length; i++) {
3473
- if (syntax[i] === "}") {
3474
- const L = FromUnion(syntax.slice(2, i));
3475
- const R = FromSyntax(syntax.slice(i + 1));
3476
- return yield* [...L, ...R];
3477
- }
3478
- }
3479
- yield Literal(syntax);
3480
- }
3481
- function* FromSyntax(syntax) {
3482
- for (let i = 0; i < syntax.length; i++) {
3483
- if (syntax[i] === "$") {
3484
- const L = Literal(syntax.slice(0, i));
3485
- const R = FromTerminal(syntax.slice(i));
3486
- return yield* [L, ...R];
3487
- }
3488
- }
3489
- yield Literal(syntax);
3490
- }
3491
- function TemplateLiteralSyntax(syntax) {
3492
- return [...FromSyntax(syntax)];
3493
- }
3494
-
3495
- // node_modules/@sinclair/typebox/build/esm/type/template-literal/pattern.mjs
3496
- var TemplateLiteralPatternError = class extends TypeBoxError {
3497
- };
3498
- function Escape(value) {
3499
- return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
3500
- }
3501
- function Visit2(schema, acc) {
3502
- return IsTemplateLiteral(schema) ? schema.pattern.slice(1, schema.pattern.length - 1) : IsUnion(schema) ? `(${schema.anyOf.map((schema2) => Visit2(schema2, acc)).join("|")})` : IsNumber3(schema) ? `${acc}${PatternNumber}` : IsInteger(schema) ? `${acc}${PatternNumber}` : IsBigInt2(schema) ? `${acc}${PatternNumber}` : IsString2(schema) ? `${acc}${PatternString}` : IsLiteral(schema) ? `${acc}${Escape(schema.const.toString())}` : IsBoolean2(schema) ? `${acc}${PatternBoolean}` : (() => {
3503
- throw new TemplateLiteralPatternError(`Unexpected Kind '${schema[Kind]}'`);
3504
- })();
3505
- }
3506
- function TemplateLiteralPattern(kinds) {
3507
- return `^${kinds.map((schema) => Visit2(schema, "")).join("")}$`;
3508
- }
3509
-
3510
- // node_modules/@sinclair/typebox/build/esm/type/template-literal/union.mjs
3511
- function TemplateLiteralToUnion(schema) {
3512
- const R = TemplateLiteralGenerate(schema);
3513
- const L = R.map((S) => Literal(S));
3514
- return UnionEvaluated(L);
3515
- }
3516
-
3517
- // node_modules/@sinclair/typebox/build/esm/type/template-literal/template-literal.mjs
3518
- function TemplateLiteral(unresolved, options) {
3519
- const pattern = IsString(unresolved) ? TemplateLiteralPattern(TemplateLiteralSyntax(unresolved)) : TemplateLiteralPattern(unresolved);
3520
- return CreateType({ [Kind]: "TemplateLiteral", type: "string", pattern }, options);
3521
- }
3522
-
3523
- // node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-property-keys.mjs
3524
- function FromTemplateLiteral(templateLiteral) {
3525
- const keys = TemplateLiteralGenerate(templateLiteral);
3526
- return keys.map((key) => key.toString());
3527
- }
3528
- function FromUnion2(types) {
3529
- const result = [];
3530
- for (const type of types)
3531
- result.push(...IndexPropertyKeys(type));
3532
- return result;
3533
- }
3534
- function FromLiteral(literalValue) {
3535
- return [literalValue.toString()];
3536
- }
3537
- function IndexPropertyKeys(type) {
3538
- return [...new Set(IsTemplateLiteral(type) ? FromTemplateLiteral(type) : IsUnion(type) ? FromUnion2(type.anyOf) : IsLiteral(type) ? FromLiteral(type.const) : IsNumber3(type) ? ["[number]"] : IsInteger(type) ? ["[number]"] : [])];
3539
- }
3540
-
3541
- // node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-result.mjs
3542
- function FromProperties(type, properties, options) {
3543
- const result = {};
3544
- for (const K2 of Object.getOwnPropertyNames(properties)) {
3545
- result[K2] = Index(type, IndexPropertyKeys(properties[K2]), options);
3546
- }
3547
- return result;
3548
- }
3549
- function FromMappedResult(type, mappedResult, options) {
3550
- return FromProperties(type, mappedResult.properties, options);
3551
- }
3552
- function IndexFromMappedResult(type, mappedResult, options) {
3553
- const properties = FromMappedResult(type, mappedResult, options);
3554
- return MappedResult(properties);
3555
- }
3556
-
3557
- // node_modules/@sinclair/typebox/build/esm/type/indexed/indexed.mjs
3558
- function FromRest(types, key) {
3559
- return types.map((type) => IndexFromPropertyKey(type, key));
3560
- }
3561
- function FromIntersectRest(types) {
3562
- return types.filter((type) => !IsNever(type));
3563
- }
3564
- function FromIntersect(types, key) {
3565
- return IntersectEvaluated(FromIntersectRest(FromRest(types, key)));
3566
- }
3567
- function FromUnionRest(types) {
3568
- return types.some((L) => IsNever(L)) ? [] : types;
3569
- }
3570
- function FromUnion3(types, key) {
3571
- return UnionEvaluated(FromUnionRest(FromRest(types, key)));
3572
- }
3573
- function FromTuple(types, key) {
3574
- return key in types ? types[key] : key === "[number]" ? UnionEvaluated(types) : Never();
3575
- }
3576
- function FromArray(type, key) {
3577
- return key === "[number]" ? type : Never();
3578
- }
3579
- function FromProperty(properties, propertyKey) {
3580
- return propertyKey in properties ? properties[propertyKey] : Never();
3581
- }
3582
- function IndexFromPropertyKey(type, propertyKey) {
3583
- return IsIntersect(type) ? FromIntersect(type.allOf, propertyKey) : IsUnion(type) ? FromUnion3(type.anyOf, propertyKey) : IsTuple(type) ? FromTuple(type.items ?? [], propertyKey) : IsArray3(type) ? FromArray(type.items, propertyKey) : IsObject3(type) ? FromProperty(type.properties, propertyKey) : Never();
3584
- }
3585
- function IndexFromPropertyKeys(type, propertyKeys) {
3586
- return propertyKeys.map((propertyKey) => IndexFromPropertyKey(type, propertyKey));
3587
- }
3588
- function FromSchema(type, propertyKeys) {
3589
- return UnionEvaluated(IndexFromPropertyKeys(type, propertyKeys));
3590
- }
3591
- function Index(type, key, options) {
3592
- if (IsRef(type) || IsRef(key)) {
3593
- const error = `Index types using Ref parameters require both Type and Key to be of TSchema`;
3594
- if (!IsSchema(type) || !IsSchema(key))
3595
- throw new TypeBoxError(error);
3596
- return Computed("Index", [type, key]);
3597
- }
3598
- if (IsMappedResult(key))
3599
- return IndexFromMappedResult(type, key, options);
3600
- if (IsMappedKey(key))
3601
- return IndexFromMappedKey(type, key, options);
3602
- return CreateType(IsSchema(key) ? FromSchema(type, IndexPropertyKeys(key)) : FromSchema(type, key), options);
3603
- }
3604
-
3605
- // node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-key.mjs
3606
- function MappedIndexPropertyKey(type, key, options) {
3607
- return { [key]: Index(type, [key], Clone(options)) };
3608
- }
3609
- function MappedIndexPropertyKeys(type, propertyKeys, options) {
3610
- return propertyKeys.reduce((result, left) => {
3611
- return { ...result, ...MappedIndexPropertyKey(type, left, options) };
3612
- }, {});
3613
- }
3614
- function MappedIndexProperties(type, mappedKey, options) {
3615
- return MappedIndexPropertyKeys(type, mappedKey.keys, options);
3616
- }
3617
- function IndexFromMappedKey(type, mappedKey, options) {
3618
- const properties = MappedIndexProperties(type, mappedKey, options);
3619
- return MappedResult(properties);
3620
- }
3621
-
3622
- // node_modules/@sinclair/typebox/build/esm/type/iterator/iterator.mjs
3623
- function Iterator(items, options) {
3624
- return CreateType({ [Kind]: "Iterator", type: "Iterator", items }, options);
3625
- }
3626
-
3627
- // node_modules/@sinclair/typebox/build/esm/type/object/object.mjs
3628
- function RequiredArray(properties) {
3629
- return globalThis.Object.keys(properties).filter((key) => !IsOptional(properties[key]));
3630
- }
3631
- function _Object(properties, options) {
3632
- const required = RequiredArray(properties);
3633
- const schema = required.length > 0 ? { [Kind]: "Object", type: "object", required, properties } : { [Kind]: "Object", type: "object", properties };
3634
- return CreateType(schema, options);
3635
- }
3636
- var Object2 = _Object;
3637
-
3638
- // node_modules/@sinclair/typebox/build/esm/type/promise/promise.mjs
3639
- function Promise2(item, options) {
3640
- return CreateType({ [Kind]: "Promise", type: "Promise", item }, options);
3641
- }
3642
-
3643
- // node_modules/@sinclair/typebox/build/esm/type/readonly/readonly.mjs
3644
- function RemoveReadonly(schema) {
3645
- return CreateType(Discard(schema, [ReadonlyKind]));
3646
- }
3647
- function AddReadonly(schema) {
3648
- return CreateType({ ...schema, [ReadonlyKind]: "Readonly" });
3649
- }
3650
- function ReadonlyWithFlag(schema, F) {
3651
- return F === false ? RemoveReadonly(schema) : AddReadonly(schema);
3652
- }
3653
- function Readonly(schema, enable) {
3654
- const F = enable ?? true;
3655
- return IsMappedResult(schema) ? ReadonlyFromMappedResult(schema, F) : ReadonlyWithFlag(schema, F);
3656
- }
3657
-
3658
- // node_modules/@sinclair/typebox/build/esm/type/readonly/readonly-from-mapped-result.mjs
3659
- function FromProperties2(K, F) {
3660
- const Acc = {};
3661
- for (const K2 of globalThis.Object.getOwnPropertyNames(K))
3662
- Acc[K2] = Readonly(K[K2], F);
3663
- return Acc;
3664
- }
3665
- function FromMappedResult2(R, F) {
3666
- return FromProperties2(R.properties, F);
3667
- }
3668
- function ReadonlyFromMappedResult(R, F) {
3669
- const P = FromMappedResult2(R, F);
3670
- return MappedResult(P);
3671
- }
3672
-
3673
- // node_modules/@sinclair/typebox/build/esm/type/tuple/tuple.mjs
3674
- function Tuple(types, options) {
3675
- return CreateType(types.length > 0 ? { [Kind]: "Tuple", type: "array", items: types, additionalItems: false, minItems: types.length, maxItems: types.length } : { [Kind]: "Tuple", type: "array", minItems: types.length, maxItems: types.length }, options);
3676
- }
3677
-
3678
- // node_modules/@sinclair/typebox/build/esm/type/mapped/mapped.mjs
3679
- function FromMappedResult3(K, P) {
3680
- return K in P ? FromSchemaType(K, P[K]) : MappedResult(P);
3681
- }
3682
- function MappedKeyToKnownMappedResultProperties(K) {
3683
- return { [K]: Literal(K) };
3684
- }
3685
- function MappedKeyToUnknownMappedResultProperties(P) {
3686
- const Acc = {};
3687
- for (const L of P)
3688
- Acc[L] = Literal(L);
3689
- return Acc;
3690
- }
3691
- function MappedKeyToMappedResultProperties(K, P) {
3692
- return SetIncludes(P, K) ? MappedKeyToKnownMappedResultProperties(K) : MappedKeyToUnknownMappedResultProperties(P);
3693
- }
3694
- function FromMappedKey(K, P) {
3695
- const R = MappedKeyToMappedResultProperties(K, P);
3696
- return FromMappedResult3(K, R);
3697
- }
3698
- function FromRest2(K, T) {
3699
- return T.map((L) => FromSchemaType(K, L));
3700
- }
3701
- function FromProperties3(K, T) {
3702
- const Acc = {};
3703
- for (const K2 of globalThis.Object.getOwnPropertyNames(T))
3704
- Acc[K2] = FromSchemaType(K, T[K2]);
3705
- return Acc;
3706
- }
3707
- function FromSchemaType(K, T) {
3708
- const options = { ...T };
3709
- return (
3710
- // unevaluated modifier types
3711
- IsOptional(T) ? Optional(FromSchemaType(K, Discard(T, [OptionalKind]))) : IsReadonly(T) ? Readonly(FromSchemaType(K, Discard(T, [ReadonlyKind]))) : (
3712
- // unevaluated mapped types
3713
- IsMappedResult(T) ? FromMappedResult3(K, T.properties) : IsMappedKey(T) ? FromMappedKey(K, T.keys) : (
3714
- // unevaluated types
3715
- IsConstructor(T) ? Constructor(FromRest2(K, T.parameters), FromSchemaType(K, T.returns), options) : IsFunction2(T) ? Function(FromRest2(K, T.parameters), FromSchemaType(K, T.returns), options) : IsAsyncIterator2(T) ? AsyncIterator(FromSchemaType(K, T.items), options) : IsIterator2(T) ? Iterator(FromSchemaType(K, T.items), options) : IsIntersect(T) ? Intersect(FromRest2(K, T.allOf), options) : IsUnion(T) ? Union(FromRest2(K, T.anyOf), options) : IsTuple(T) ? Tuple(FromRest2(K, T.items ?? []), options) : IsObject3(T) ? Object2(FromProperties3(K, T.properties), options) : IsArray3(T) ? Array2(FromSchemaType(K, T.items), options) : IsPromise(T) ? Promise2(FromSchemaType(K, T.item), options) : T
3716
- )
3717
- )
3718
- );
3719
- }
3720
- function MappedFunctionReturnType(K, T) {
3721
- const Acc = {};
3722
- for (const L of K)
3723
- Acc[L] = FromSchemaType(L, T);
3724
- return Acc;
3725
- }
3726
- function Mapped(key, map, options) {
3727
- const K = IsSchema(key) ? IndexPropertyKeys(key) : key;
3728
- const RT = map({ [Kind]: "MappedKey", keys: K });
3729
- const R = MappedFunctionReturnType(K, RT);
3730
- return Object2(R, options);
3731
- }
3732
-
3733
- // node_modules/@sinclair/typebox/build/esm/type/optional/optional.mjs
3734
- function RemoveOptional(schema) {
3735
- return CreateType(Discard(schema, [OptionalKind]));
3736
- }
3737
- function AddOptional(schema) {
3738
- return CreateType({ ...schema, [OptionalKind]: "Optional" });
3739
- }
3740
- function OptionalWithFlag(schema, F) {
3741
- return F === false ? RemoveOptional(schema) : AddOptional(schema);
3742
- }
3743
- function Optional(schema, enable) {
3744
- const F = enable ?? true;
3745
- return IsMappedResult(schema) ? OptionalFromMappedResult(schema, F) : OptionalWithFlag(schema, F);
3746
- }
3747
-
3748
- // node_modules/@sinclair/typebox/build/esm/type/optional/optional-from-mapped-result.mjs
3749
- function FromProperties4(P, F) {
3750
- const Acc = {};
3751
- for (const K2 of globalThis.Object.getOwnPropertyNames(P))
3752
- Acc[K2] = Optional(P[K2], F);
3753
- return Acc;
3754
- }
3755
- function FromMappedResult4(R, F) {
3756
- return FromProperties4(R.properties, F);
3757
- }
3758
- function OptionalFromMappedResult(R, F) {
3759
- const P = FromMappedResult4(R, F);
3760
- return MappedResult(P);
3761
- }
3762
-
3763
- // node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-create.mjs
3764
- function IntersectCreate(T, options = {}) {
3765
- const allObjects = T.every((schema) => IsObject3(schema));
3766
- const clonedUnevaluatedProperties = IsSchema(options.unevaluatedProperties) ? { unevaluatedProperties: options.unevaluatedProperties } : {};
3767
- return CreateType(options.unevaluatedProperties === false || IsSchema(options.unevaluatedProperties) || allObjects ? { ...clonedUnevaluatedProperties, [Kind]: "Intersect", type: "object", allOf: T } : { ...clonedUnevaluatedProperties, [Kind]: "Intersect", allOf: T }, options);
3768
- }
3769
-
3770
- // node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-evaluated.mjs
3771
- function IsIntersectOptional(types) {
3772
- return types.every((left) => IsOptional(left));
3773
- }
3774
- function RemoveOptionalFromType2(type) {
3775
- return Discard(type, [OptionalKind]);
3776
- }
3777
- function RemoveOptionalFromRest2(types) {
3778
- return types.map((left) => IsOptional(left) ? RemoveOptionalFromType2(left) : left);
3779
- }
3780
- function ResolveIntersect(types, options) {
3781
- return IsIntersectOptional(types) ? Optional(IntersectCreate(RemoveOptionalFromRest2(types), options)) : IntersectCreate(RemoveOptionalFromRest2(types), options);
3782
- }
3783
- function IntersectEvaluated(types, options = {}) {
3784
- if (types.length === 1)
3785
- return CreateType(types[0], options);
3786
- if (types.length === 0)
3787
- return Never(options);
3788
- if (types.some((schema) => IsTransform(schema)))
3789
- throw new Error("Cannot intersect transform types");
3790
- return ResolveIntersect(types, options);
3791
- }
3792
-
3793
- // node_modules/@sinclair/typebox/build/esm/type/intersect/intersect.mjs
3794
- function Intersect(types, options) {
3795
- if (types.length === 1)
3796
- return CreateType(types[0], options);
3797
- if (types.length === 0)
3798
- return Never(options);
3799
- if (types.some((schema) => IsTransform(schema)))
3800
- throw new Error("Cannot intersect transform types");
3801
- return IntersectCreate(types, options);
3802
- }
3803
-
3804
- // node_modules/@sinclair/typebox/build/esm/type/ref/ref.mjs
3805
- function Ref(...args) {
3806
- const [$ref, options] = typeof args[0] === "string" ? [args[0], args[1]] : [args[0].$id, args[1]];
3807
- if (typeof $ref !== "string")
3808
- throw new TypeBoxError("Ref: $ref must be a string");
3809
- return CreateType({ [Kind]: "Ref", $ref }, options);
3810
- }
3811
-
3812
- // node_modules/@sinclair/typebox/build/esm/type/awaited/awaited.mjs
3813
- function FromComputed(target, parameters) {
3814
- return Computed("Awaited", [Computed(target, parameters)]);
3815
- }
3816
- function FromRef($ref) {
3817
- return Computed("Awaited", [Ref($ref)]);
3818
- }
3819
- function FromIntersect2(types) {
3820
- return Intersect(FromRest3(types));
3821
- }
3822
- function FromUnion4(types) {
3823
- return Union(FromRest3(types));
3824
- }
3825
- function FromPromise(type) {
3826
- return Awaited(type);
3827
- }
3828
- function FromRest3(types) {
3829
- return types.map((type) => Awaited(type));
3830
- }
3831
- function Awaited(type, options) {
3832
- return CreateType(IsComputed(type) ? FromComputed(type.target, type.parameters) : IsIntersect(type) ? FromIntersect2(type.allOf) : IsUnion(type) ? FromUnion4(type.anyOf) : IsPromise(type) ? FromPromise(type.item) : IsRef(type) ? FromRef(type.$ref) : type, options);
3833
- }
3834
-
3835
- // node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-property-keys.mjs
3836
- function FromRest4(types) {
3837
- const result = [];
3838
- for (const L of types)
3839
- result.push(KeyOfPropertyKeys(L));
3840
- return result;
3841
- }
3842
- function FromIntersect3(types) {
3843
- const propertyKeysArray = FromRest4(types);
3844
- const propertyKeys = SetUnionMany(propertyKeysArray);
3845
- return propertyKeys;
3846
- }
3847
- function FromUnion5(types) {
3848
- const propertyKeysArray = FromRest4(types);
3849
- const propertyKeys = SetIntersectMany(propertyKeysArray);
3850
- return propertyKeys;
3851
- }
3852
- function FromTuple2(types) {
3853
- return types.map((_, indexer) => indexer.toString());
3854
- }
3855
- function FromArray2(_) {
3856
- return ["[number]"];
3857
- }
3858
- function FromProperties5(T) {
3859
- return globalThis.Object.getOwnPropertyNames(T);
3860
- }
3861
- function FromPatternProperties(patternProperties) {
3862
- if (!includePatternProperties)
3863
- return [];
3864
- const patternPropertyKeys = globalThis.Object.getOwnPropertyNames(patternProperties);
3865
- return patternPropertyKeys.map((key) => {
3866
- return key[0] === "^" && key[key.length - 1] === "$" ? key.slice(1, key.length - 1) : key;
3867
- });
3868
- }
3869
- function KeyOfPropertyKeys(type) {
3870
- return IsIntersect(type) ? FromIntersect3(type.allOf) : IsUnion(type) ? FromUnion5(type.anyOf) : IsTuple(type) ? FromTuple2(type.items ?? []) : IsArray3(type) ? FromArray2(type.items) : IsObject3(type) ? FromProperties5(type.properties) : IsRecord(type) ? FromPatternProperties(type.patternProperties) : [];
3871
- }
3872
- var includePatternProperties = false;
3873
-
3874
- // node_modules/@sinclair/typebox/build/esm/type/keyof/keyof.mjs
3875
- function FromComputed2(target, parameters) {
3876
- return Computed("KeyOf", [Computed(target, parameters)]);
3877
- }
3878
- function FromRef2($ref) {
3879
- return Computed("KeyOf", [Ref($ref)]);
3880
- }
3881
- function KeyOfFromType(type, options) {
3882
- const propertyKeys = KeyOfPropertyKeys(type);
3883
- const propertyKeyTypes = KeyOfPropertyKeysToRest(propertyKeys);
3884
- const result = UnionEvaluated(propertyKeyTypes);
3885
- return CreateType(result, options);
3886
- }
3887
- function KeyOfPropertyKeysToRest(propertyKeys) {
3888
- return propertyKeys.map((L) => L === "[number]" ? Number2() : Literal(L));
3889
- }
3890
- function KeyOf(type, options) {
3891
- return IsComputed(type) ? FromComputed2(type.target, type.parameters) : IsRef(type) ? FromRef2(type.$ref) : IsMappedResult(type) ? KeyOfFromMappedResult(type, options) : KeyOfFromType(type, options);
3892
- }
3893
-
3894
- // node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-from-mapped-result.mjs
3895
- function FromProperties6(properties, options) {
3896
- const result = {};
3897
- for (const K2 of globalThis.Object.getOwnPropertyNames(properties))
3898
- result[K2] = KeyOf(properties[K2], Clone(options));
3899
- return result;
3900
- }
3901
- function FromMappedResult5(mappedResult, options) {
3902
- return FromProperties6(mappedResult.properties, options);
3903
- }
3904
- function KeyOfFromMappedResult(mappedResult, options) {
3905
- const properties = FromMappedResult5(mappedResult, options);
3906
- return MappedResult(properties);
3907
- }
3908
-
3909
- // node_modules/@sinclair/typebox/build/esm/type/composite/composite.mjs
3910
- function CompositeKeys(T) {
3911
- const Acc = [];
3912
- for (const L of T)
3913
- Acc.push(...KeyOfPropertyKeys(L));
3914
- return SetDistinct(Acc);
3915
- }
3916
- function FilterNever(T) {
3917
- return T.filter((L) => !IsNever(L));
3918
- }
3919
- function CompositeProperty(T, K) {
3920
- const Acc = [];
3921
- for (const L of T)
3922
- Acc.push(...IndexFromPropertyKeys(L, [K]));
3923
- return FilterNever(Acc);
3924
- }
3925
- function CompositeProperties(T, K) {
3926
- const Acc = {};
3927
- for (const L of K) {
3928
- Acc[L] = IntersectEvaluated(CompositeProperty(T, L));
3929
- }
3930
- return Acc;
3931
- }
3932
- function Composite(T, options) {
3933
- const K = CompositeKeys(T);
3934
- const P = CompositeProperties(T, K);
3935
- const R = Object2(P, options);
3936
- return R;
3937
- }
3938
-
3939
- // node_modules/@sinclair/typebox/build/esm/type/date/date.mjs
3940
- function Date2(options) {
3941
- return CreateType({ [Kind]: "Date", type: "Date" }, options);
3942
- }
3943
-
3944
- // node_modules/@sinclair/typebox/build/esm/type/null/null.mjs
3945
- function Null(options) {
3946
- return CreateType({ [Kind]: "Null", type: "null" }, options);
3947
- }
3948
-
3949
- // node_modules/@sinclair/typebox/build/esm/type/symbol/symbol.mjs
3950
- function Symbol2(options) {
3951
- return CreateType({ [Kind]: "Symbol", type: "symbol" }, options);
3952
- }
3953
-
3954
- // node_modules/@sinclair/typebox/build/esm/type/undefined/undefined.mjs
3955
- function Undefined(options) {
3956
- return CreateType({ [Kind]: "Undefined", type: "undefined" }, options);
3957
- }
3958
-
3959
- // node_modules/@sinclair/typebox/build/esm/type/uint8array/uint8array.mjs
3960
- function Uint8Array2(options) {
3961
- return CreateType({ [Kind]: "Uint8Array", type: "Uint8Array" }, options);
3962
- }
3963
-
3964
- // node_modules/@sinclair/typebox/build/esm/type/unknown/unknown.mjs
3965
- function Unknown(options) {
3966
- return CreateType({ [Kind]: "Unknown" }, options);
3967
- }
3968
-
3969
- // node_modules/@sinclair/typebox/build/esm/type/const/const.mjs
3970
- function FromArray3(T) {
3971
- return T.map((L) => FromValue(L, false));
3972
- }
3973
- function FromProperties7(value) {
3974
- const Acc = {};
3975
- for (const K of globalThis.Object.getOwnPropertyNames(value))
3976
- Acc[K] = Readonly(FromValue(value[K], false));
3977
- return Acc;
3978
- }
3979
- function ConditionalReadonly(T, root) {
3980
- return root === true ? T : Readonly(T);
3981
- }
3982
- function FromValue(value, root) {
3983
- return IsAsyncIterator(value) ? ConditionalReadonly(Any(), root) : IsIterator(value) ? ConditionalReadonly(Any(), root) : IsArray(value) ? Readonly(Tuple(FromArray3(value))) : IsUint8Array(value) ? Uint8Array2() : IsDate(value) ? Date2() : IsObject(value) ? ConditionalReadonly(Object2(FromProperties7(value)), root) : IsFunction(value) ? ConditionalReadonly(Function([], Unknown()), root) : IsUndefined(value) ? Undefined() : IsNull(value) ? Null() : IsSymbol(value) ? Symbol2() : IsBigInt(value) ? BigInt() : IsNumber(value) ? Literal(value) : IsBoolean(value) ? Literal(value) : IsString(value) ? Literal(value) : Object2({});
3984
- }
3985
- function Const(T, options) {
3986
- return CreateType(FromValue(T, true), options);
3987
- }
3988
-
3989
- // node_modules/@sinclair/typebox/build/esm/type/constructor-parameters/constructor-parameters.mjs
3990
- function ConstructorParameters(schema, options) {
3991
- return IsConstructor(schema) ? Tuple(schema.parameters, options) : Never(options);
3992
- }
3993
-
3994
- // node_modules/@sinclair/typebox/build/esm/type/enum/enum.mjs
3995
- function Enum(item, options) {
3996
- if (IsUndefined(item))
3997
- throw new Error("Enum undefined or empty");
3998
- const values1 = globalThis.Object.getOwnPropertyNames(item).filter((key) => isNaN(key)).map((key) => item[key]);
3999
- const values2 = [...new Set(values1)];
4000
- const anyOf = values2.map((value) => Literal(value));
4001
- return Union(anyOf, { ...options, [Hint]: "Enum" });
4002
- }
4003
-
4004
- // node_modules/@sinclair/typebox/build/esm/type/extends/extends-check.mjs
4005
- var ExtendsResolverError = class extends TypeBoxError {
4006
- };
4007
- var ExtendsResult;
4008
- (function(ExtendsResult2) {
4009
- ExtendsResult2[ExtendsResult2["Union"] = 0] = "Union";
4010
- ExtendsResult2[ExtendsResult2["True"] = 1] = "True";
4011
- ExtendsResult2[ExtendsResult2["False"] = 2] = "False";
4012
- })(ExtendsResult || (ExtendsResult = {}));
4013
- function IntoBooleanResult(result) {
4014
- return result === ExtendsResult.False ? result : ExtendsResult.True;
4015
- }
4016
- function Throw(message) {
4017
- throw new ExtendsResolverError(message);
4018
- }
4019
- function IsStructuralRight(right) {
4020
- return type_exports.IsNever(right) || type_exports.IsIntersect(right) || type_exports.IsUnion(right) || type_exports.IsUnknown(right) || type_exports.IsAny(right);
4021
- }
4022
- function StructuralRight(left, right) {
4023
- return type_exports.IsNever(right) ? FromNeverRight(left, right) : type_exports.IsIntersect(right) ? FromIntersectRight(left, right) : type_exports.IsUnion(right) ? FromUnionRight(left, right) : type_exports.IsUnknown(right) ? FromUnknownRight(left, right) : type_exports.IsAny(right) ? FromAnyRight(left, right) : Throw("StructuralRight");
4024
- }
4025
- function FromAnyRight(left, right) {
4026
- return ExtendsResult.True;
4027
- }
4028
- function FromAny(left, right) {
4029
- return type_exports.IsIntersect(right) ? FromIntersectRight(left, right) : type_exports.IsUnion(right) && right.anyOf.some((schema) => type_exports.IsAny(schema) || type_exports.IsUnknown(schema)) ? ExtendsResult.True : type_exports.IsUnion(right) ? ExtendsResult.Union : type_exports.IsUnknown(right) ? ExtendsResult.True : type_exports.IsAny(right) ? ExtendsResult.True : ExtendsResult.Union;
4030
- }
4031
- function FromArrayRight(left, right) {
4032
- return type_exports.IsUnknown(left) ? ExtendsResult.False : type_exports.IsAny(left) ? ExtendsResult.Union : type_exports.IsNever(left) ? ExtendsResult.True : ExtendsResult.False;
4033
- }
4034
- function FromArray4(left, right) {
4035
- return type_exports.IsObject(right) && IsObjectArrayLike(right) ? ExtendsResult.True : IsStructuralRight(right) ? StructuralRight(left, right) : !type_exports.IsArray(right) ? ExtendsResult.False : IntoBooleanResult(Visit3(left.items, right.items));
4036
- }
4037
- function FromAsyncIterator(left, right) {
4038
- return IsStructuralRight(right) ? StructuralRight(left, right) : !type_exports.IsAsyncIterator(right) ? ExtendsResult.False : IntoBooleanResult(Visit3(left.items, right.items));
4039
- }
4040
- function FromBigInt(left, right) {
4041
- return IsStructuralRight(right) ? StructuralRight(left, right) : type_exports.IsObject(right) ? FromObjectRight(left, right) : type_exports.IsRecord(right) ? FromRecordRight(left, right) : type_exports.IsBigInt(right) ? ExtendsResult.True : ExtendsResult.False;
4042
- }
4043
- function FromBooleanRight(left, right) {
4044
- return type_exports.IsLiteralBoolean(left) ? ExtendsResult.True : type_exports.IsBoolean(left) ? ExtendsResult.True : ExtendsResult.False;
4045
- }
4046
- function FromBoolean(left, right) {
4047
- return IsStructuralRight(right) ? StructuralRight(left, right) : type_exports.IsObject(right) ? FromObjectRight(left, right) : type_exports.IsRecord(right) ? FromRecordRight(left, right) : type_exports.IsBoolean(right) ? ExtendsResult.True : ExtendsResult.False;
4048
- }
4049
- function FromConstructor(left, right) {
4050
- return IsStructuralRight(right) ? StructuralRight(left, right) : type_exports.IsObject(right) ? FromObjectRight(left, right) : !type_exports.IsConstructor(right) ? ExtendsResult.False : left.parameters.length > right.parameters.length ? ExtendsResult.False : !left.parameters.every((schema, index) => IntoBooleanResult(Visit3(right.parameters[index], schema)) === ExtendsResult.True) ? ExtendsResult.False : IntoBooleanResult(Visit3(left.returns, right.returns));
4051
- }
4052
- function FromDate(left, right) {
4053
- return IsStructuralRight(right) ? StructuralRight(left, right) : type_exports.IsObject(right) ? FromObjectRight(left, right) : type_exports.IsRecord(right) ? FromRecordRight(left, right) : type_exports.IsDate(right) ? ExtendsResult.True : ExtendsResult.False;
4054
- }
4055
- function FromFunction(left, right) {
4056
- return IsStructuralRight(right) ? StructuralRight(left, right) : type_exports.IsObject(right) ? FromObjectRight(left, right) : !type_exports.IsFunction(right) ? ExtendsResult.False : left.parameters.length > right.parameters.length ? ExtendsResult.False : !left.parameters.every((schema, index) => IntoBooleanResult(Visit3(right.parameters[index], schema)) === ExtendsResult.True) ? ExtendsResult.False : IntoBooleanResult(Visit3(left.returns, right.returns));
4057
- }
4058
- function FromIntegerRight(left, right) {
4059
- return type_exports.IsLiteral(left) && value_exports.IsNumber(left.const) ? ExtendsResult.True : type_exports.IsNumber(left) || type_exports.IsInteger(left) ? ExtendsResult.True : ExtendsResult.False;
4060
- }
4061
- function FromInteger(left, right) {
4062
- return type_exports.IsInteger(right) || type_exports.IsNumber(right) ? ExtendsResult.True : IsStructuralRight(right) ? StructuralRight(left, right) : type_exports.IsObject(right) ? FromObjectRight(left, right) : type_exports.IsRecord(right) ? FromRecordRight(left, right) : ExtendsResult.False;
4063
- }
4064
- function FromIntersectRight(left, right) {
4065
- return right.allOf.every((schema) => Visit3(left, schema) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False;
4066
- }
4067
- function FromIntersect4(left, right) {
4068
- return left.allOf.some((schema) => Visit3(schema, right) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False;
4069
- }
4070
- function FromIterator(left, right) {
4071
- return IsStructuralRight(right) ? StructuralRight(left, right) : !type_exports.IsIterator(right) ? ExtendsResult.False : IntoBooleanResult(Visit3(left.items, right.items));
4072
- }
4073
- function FromLiteral2(left, right) {
4074
- return type_exports.IsLiteral(right) && right.const === left.const ? ExtendsResult.True : IsStructuralRight(right) ? StructuralRight(left, right) : type_exports.IsObject(right) ? FromObjectRight(left, right) : type_exports.IsRecord(right) ? FromRecordRight(left, right) : type_exports.IsString(right) ? FromStringRight(left, right) : type_exports.IsNumber(right) ? FromNumberRight(left, right) : type_exports.IsInteger(right) ? FromIntegerRight(left, right) : type_exports.IsBoolean(right) ? FromBooleanRight(left, right) : ExtendsResult.False;
4075
- }
4076
- function FromNeverRight(left, right) {
4077
- return ExtendsResult.False;
4078
- }
4079
- function FromNever(left, right) {
4080
- return ExtendsResult.True;
4081
- }
4082
- function UnwrapTNot(schema) {
4083
- let [current, depth] = [schema, 0];
4084
- while (true) {
4085
- if (!type_exports.IsNot(current))
4086
- break;
4087
- current = current.not;
4088
- depth += 1;
4089
- }
4090
- return depth % 2 === 0 ? current : Unknown();
4091
- }
4092
- function FromNot(left, right) {
4093
- return type_exports.IsNot(left) ? Visit3(UnwrapTNot(left), right) : type_exports.IsNot(right) ? Visit3(left, UnwrapTNot(right)) : Throw("Invalid fallthrough for Not");
4094
- }
4095
- function FromNull(left, right) {
4096
- return IsStructuralRight(right) ? StructuralRight(left, right) : type_exports.IsObject(right) ? FromObjectRight(left, right) : type_exports.IsRecord(right) ? FromRecordRight(left, right) : type_exports.IsNull(right) ? ExtendsResult.True : ExtendsResult.False;
4097
- }
4098
- function FromNumberRight(left, right) {
4099
- return type_exports.IsLiteralNumber(left) ? ExtendsResult.True : type_exports.IsNumber(left) || type_exports.IsInteger(left) ? ExtendsResult.True : ExtendsResult.False;
4100
- }
4101
- function FromNumber(left, right) {
4102
- return IsStructuralRight(right) ? StructuralRight(left, right) : type_exports.IsObject(right) ? FromObjectRight(left, right) : type_exports.IsRecord(right) ? FromRecordRight(left, right) : type_exports.IsInteger(right) || type_exports.IsNumber(right) ? ExtendsResult.True : ExtendsResult.False;
4103
- }
4104
- function IsObjectPropertyCount(schema, count) {
4105
- return Object.getOwnPropertyNames(schema.properties).length === count;
4106
- }
4107
- function IsObjectStringLike(schema) {
4108
- return IsObjectArrayLike(schema);
4109
- }
4110
- function IsObjectSymbolLike(schema) {
4111
- return IsObjectPropertyCount(schema, 0) || IsObjectPropertyCount(schema, 1) && "description" in schema.properties && type_exports.IsUnion(schema.properties.description) && schema.properties.description.anyOf.length === 2 && (type_exports.IsString(schema.properties.description.anyOf[0]) && type_exports.IsUndefined(schema.properties.description.anyOf[1]) || type_exports.IsString(schema.properties.description.anyOf[1]) && type_exports.IsUndefined(schema.properties.description.anyOf[0]));
4112
- }
4113
- function IsObjectNumberLike(schema) {
4114
- return IsObjectPropertyCount(schema, 0);
4115
- }
4116
- function IsObjectBooleanLike(schema) {
4117
- return IsObjectPropertyCount(schema, 0);
4118
- }
4119
- function IsObjectBigIntLike(schema) {
4120
- return IsObjectPropertyCount(schema, 0);
4121
- }
4122
- function IsObjectDateLike(schema) {
4123
- return IsObjectPropertyCount(schema, 0);
4124
- }
4125
- function IsObjectUint8ArrayLike(schema) {
4126
- return IsObjectArrayLike(schema);
4127
- }
4128
- function IsObjectFunctionLike(schema) {
4129
- const length = Number2();
4130
- return IsObjectPropertyCount(schema, 0) || IsObjectPropertyCount(schema, 1) && "length" in schema.properties && IntoBooleanResult(Visit3(schema.properties["length"], length)) === ExtendsResult.True;
4131
- }
4132
- function IsObjectConstructorLike(schema) {
4133
- return IsObjectPropertyCount(schema, 0);
4134
- }
4135
- function IsObjectArrayLike(schema) {
4136
- const length = Number2();
4137
- return IsObjectPropertyCount(schema, 0) || IsObjectPropertyCount(schema, 1) && "length" in schema.properties && IntoBooleanResult(Visit3(schema.properties["length"], length)) === ExtendsResult.True;
4138
- }
4139
- function IsObjectPromiseLike(schema) {
4140
- const then = Function([Any()], Any());
4141
- return IsObjectPropertyCount(schema, 0) || IsObjectPropertyCount(schema, 1) && "then" in schema.properties && IntoBooleanResult(Visit3(schema.properties["then"], then)) === ExtendsResult.True;
4142
- }
4143
- function Property(left, right) {
4144
- return Visit3(left, right) === ExtendsResult.False ? ExtendsResult.False : type_exports.IsOptional(left) && !type_exports.IsOptional(right) ? ExtendsResult.False : ExtendsResult.True;
4145
- }
4146
- function FromObjectRight(left, right) {
4147
- return type_exports.IsUnknown(left) ? ExtendsResult.False : type_exports.IsAny(left) ? ExtendsResult.Union : type_exports.IsNever(left) || type_exports.IsLiteralString(left) && IsObjectStringLike(right) || type_exports.IsLiteralNumber(left) && IsObjectNumberLike(right) || type_exports.IsLiteralBoolean(left) && IsObjectBooleanLike(right) || type_exports.IsSymbol(left) && IsObjectSymbolLike(right) || type_exports.IsBigInt(left) && IsObjectBigIntLike(right) || type_exports.IsString(left) && IsObjectStringLike(right) || type_exports.IsSymbol(left) && IsObjectSymbolLike(right) || type_exports.IsNumber(left) && IsObjectNumberLike(right) || type_exports.IsInteger(left) && IsObjectNumberLike(right) || type_exports.IsBoolean(left) && IsObjectBooleanLike(right) || type_exports.IsUint8Array(left) && IsObjectUint8ArrayLike(right) || type_exports.IsDate(left) && IsObjectDateLike(right) || type_exports.IsConstructor(left) && IsObjectConstructorLike(right) || type_exports.IsFunction(left) && IsObjectFunctionLike(right) ? ExtendsResult.True : type_exports.IsRecord(left) && type_exports.IsString(RecordKey(left)) ? (() => {
4148
- return right[Hint] === "Record" ? ExtendsResult.True : ExtendsResult.False;
4149
- })() : type_exports.IsRecord(left) && type_exports.IsNumber(RecordKey(left)) ? (() => {
4150
- return IsObjectPropertyCount(right, 0) ? ExtendsResult.True : ExtendsResult.False;
4151
- })() : ExtendsResult.False;
4152
- }
4153
- function FromObject(left, right) {
4154
- return IsStructuralRight(right) ? StructuralRight(left, right) : type_exports.IsRecord(right) ? FromRecordRight(left, right) : !type_exports.IsObject(right) ? ExtendsResult.False : (() => {
4155
- for (const key of Object.getOwnPropertyNames(right.properties)) {
4156
- if (!(key in left.properties) && !type_exports.IsOptional(right.properties[key])) {
4157
- return ExtendsResult.False;
4158
- }
4159
- if (type_exports.IsOptional(right.properties[key])) {
4160
- return ExtendsResult.True;
4161
- }
4162
- if (Property(left.properties[key], right.properties[key]) === ExtendsResult.False) {
4163
- return ExtendsResult.False;
4164
- }
4165
- }
4166
- return ExtendsResult.True;
4167
- })();
4168
- }
4169
- function FromPromise2(left, right) {
4170
- return IsStructuralRight(right) ? StructuralRight(left, right) : type_exports.IsObject(right) && IsObjectPromiseLike(right) ? ExtendsResult.True : !type_exports.IsPromise(right) ? ExtendsResult.False : IntoBooleanResult(Visit3(left.item, right.item));
4171
- }
4172
- function RecordKey(schema) {
4173
- return PatternNumberExact in schema.patternProperties ? Number2() : PatternStringExact in schema.patternProperties ? String2() : Throw("Unknown record key pattern");
4174
- }
4175
- function RecordValue(schema) {
4176
- return PatternNumberExact in schema.patternProperties ? schema.patternProperties[PatternNumberExact] : PatternStringExact in schema.patternProperties ? schema.patternProperties[PatternStringExact] : Throw("Unable to get record value schema");
4177
- }
4178
- function FromRecordRight(left, right) {
4179
- const [Key, Value] = [RecordKey(right), RecordValue(right)];
4180
- return type_exports.IsLiteralString(left) && type_exports.IsNumber(Key) && IntoBooleanResult(Visit3(left, Value)) === ExtendsResult.True ? ExtendsResult.True : type_exports.IsUint8Array(left) && type_exports.IsNumber(Key) ? Visit3(left, Value) : type_exports.IsString(left) && type_exports.IsNumber(Key) ? Visit3(left, Value) : type_exports.IsArray(left) && type_exports.IsNumber(Key) ? Visit3(left, Value) : type_exports.IsObject(left) ? (() => {
4181
- for (const key of Object.getOwnPropertyNames(left.properties)) {
4182
- if (Property(Value, left.properties[key]) === ExtendsResult.False) {
4183
- return ExtendsResult.False;
4184
- }
4185
- }
4186
- return ExtendsResult.True;
4187
- })() : ExtendsResult.False;
4188
- }
4189
- function FromRecord(left, right) {
4190
- return IsStructuralRight(right) ? StructuralRight(left, right) : type_exports.IsObject(right) ? FromObjectRight(left, right) : !type_exports.IsRecord(right) ? ExtendsResult.False : Visit3(RecordValue(left), RecordValue(right));
4191
- }
4192
- function FromRegExp(left, right) {
4193
- const L = type_exports.IsRegExp(left) ? String2() : left;
4194
- const R = type_exports.IsRegExp(right) ? String2() : right;
4195
- return Visit3(L, R);
4196
- }
4197
- function FromStringRight(left, right) {
4198
- return type_exports.IsLiteral(left) && value_exports.IsString(left.const) ? ExtendsResult.True : type_exports.IsString(left) ? ExtendsResult.True : ExtendsResult.False;
4199
- }
4200
- function FromString(left, right) {
4201
- return IsStructuralRight(right) ? StructuralRight(left, right) : type_exports.IsObject(right) ? FromObjectRight(left, right) : type_exports.IsRecord(right) ? FromRecordRight(left, right) : type_exports.IsString(right) ? ExtendsResult.True : ExtendsResult.False;
4202
- }
4203
- function FromSymbol(left, right) {
4204
- return IsStructuralRight(right) ? StructuralRight(left, right) : type_exports.IsObject(right) ? FromObjectRight(left, right) : type_exports.IsRecord(right) ? FromRecordRight(left, right) : type_exports.IsSymbol(right) ? ExtendsResult.True : ExtendsResult.False;
4205
- }
4206
- function FromTemplateLiteral2(left, right) {
4207
- return type_exports.IsTemplateLiteral(left) ? Visit3(TemplateLiteralToUnion(left), right) : type_exports.IsTemplateLiteral(right) ? Visit3(left, TemplateLiteralToUnion(right)) : Throw("Invalid fallthrough for TemplateLiteral");
4208
- }
4209
- function IsArrayOfTuple(left, right) {
4210
- return type_exports.IsArray(right) && left.items !== void 0 && left.items.every((schema) => Visit3(schema, right.items) === ExtendsResult.True);
4211
- }
4212
- function FromTupleRight(left, right) {
4213
- return type_exports.IsNever(left) ? ExtendsResult.True : type_exports.IsUnknown(left) ? ExtendsResult.False : type_exports.IsAny(left) ? ExtendsResult.Union : ExtendsResult.False;
4214
- }
4215
- function FromTuple3(left, right) {
4216
- return IsStructuralRight(right) ? StructuralRight(left, right) : type_exports.IsObject(right) && IsObjectArrayLike(right) ? ExtendsResult.True : type_exports.IsArray(right) && IsArrayOfTuple(left, right) ? ExtendsResult.True : !type_exports.IsTuple(right) ? ExtendsResult.False : value_exports.IsUndefined(left.items) && !value_exports.IsUndefined(right.items) || !value_exports.IsUndefined(left.items) && value_exports.IsUndefined(right.items) ? ExtendsResult.False : value_exports.IsUndefined(left.items) && !value_exports.IsUndefined(right.items) ? ExtendsResult.True : left.items.every((schema, index) => Visit3(schema, right.items[index]) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False;
4217
- }
4218
- function FromUint8Array(left, right) {
4219
- return IsStructuralRight(right) ? StructuralRight(left, right) : type_exports.IsObject(right) ? FromObjectRight(left, right) : type_exports.IsRecord(right) ? FromRecordRight(left, right) : type_exports.IsUint8Array(right) ? ExtendsResult.True : ExtendsResult.False;
4220
- }
4221
- function FromUndefined(left, right) {
4222
- return IsStructuralRight(right) ? StructuralRight(left, right) : type_exports.IsObject(right) ? FromObjectRight(left, right) : type_exports.IsRecord(right) ? FromRecordRight(left, right) : type_exports.IsVoid(right) ? FromVoidRight(left, right) : type_exports.IsUndefined(right) ? ExtendsResult.True : ExtendsResult.False;
4223
- }
4224
- function FromUnionRight(left, right) {
4225
- return right.anyOf.some((schema) => Visit3(left, schema) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False;
4226
- }
4227
- function FromUnion6(left, right) {
4228
- return left.anyOf.every((schema) => Visit3(schema, right) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False;
4229
- }
4230
- function FromUnknownRight(left, right) {
4231
- return ExtendsResult.True;
4232
- }
4233
- function FromUnknown(left, right) {
4234
- return type_exports.IsNever(right) ? FromNeverRight(left, right) : type_exports.IsIntersect(right) ? FromIntersectRight(left, right) : type_exports.IsUnion(right) ? FromUnionRight(left, right) : type_exports.IsAny(right) ? FromAnyRight(left, right) : type_exports.IsString(right) ? FromStringRight(left, right) : type_exports.IsNumber(right) ? FromNumberRight(left, right) : type_exports.IsInteger(right) ? FromIntegerRight(left, right) : type_exports.IsBoolean(right) ? FromBooleanRight(left, right) : type_exports.IsArray(right) ? FromArrayRight(left, right) : type_exports.IsTuple(right) ? FromTupleRight(left, right) : type_exports.IsObject(right) ? FromObjectRight(left, right) : type_exports.IsUnknown(right) ? ExtendsResult.True : ExtendsResult.False;
4235
- }
4236
- function FromVoidRight(left, right) {
4237
- return type_exports.IsUndefined(left) ? ExtendsResult.True : type_exports.IsUndefined(left) ? ExtendsResult.True : ExtendsResult.False;
4238
- }
4239
- function FromVoid(left, right) {
4240
- return type_exports.IsIntersect(right) ? FromIntersectRight(left, right) : type_exports.IsUnion(right) ? FromUnionRight(left, right) : type_exports.IsUnknown(right) ? FromUnknownRight(left, right) : type_exports.IsAny(right) ? FromAnyRight(left, right) : type_exports.IsObject(right) ? FromObjectRight(left, right) : type_exports.IsVoid(right) ? ExtendsResult.True : ExtendsResult.False;
4241
- }
4242
- function Visit3(left, right) {
4243
- return (
4244
- // resolvable
4245
- type_exports.IsTemplateLiteral(left) || type_exports.IsTemplateLiteral(right) ? FromTemplateLiteral2(left, right) : type_exports.IsRegExp(left) || type_exports.IsRegExp(right) ? FromRegExp(left, right) : type_exports.IsNot(left) || type_exports.IsNot(right) ? FromNot(left, right) : (
4246
- // standard
4247
- type_exports.IsAny(left) ? FromAny(left, right) : type_exports.IsArray(left) ? FromArray4(left, right) : type_exports.IsBigInt(left) ? FromBigInt(left, right) : type_exports.IsBoolean(left) ? FromBoolean(left, right) : type_exports.IsAsyncIterator(left) ? FromAsyncIterator(left, right) : type_exports.IsConstructor(left) ? FromConstructor(left, right) : type_exports.IsDate(left) ? FromDate(left, right) : type_exports.IsFunction(left) ? FromFunction(left, right) : type_exports.IsInteger(left) ? FromInteger(left, right) : type_exports.IsIntersect(left) ? FromIntersect4(left, right) : type_exports.IsIterator(left) ? FromIterator(left, right) : type_exports.IsLiteral(left) ? FromLiteral2(left, right) : type_exports.IsNever(left) ? FromNever(left, right) : type_exports.IsNull(left) ? FromNull(left, right) : type_exports.IsNumber(left) ? FromNumber(left, right) : type_exports.IsObject(left) ? FromObject(left, right) : type_exports.IsRecord(left) ? FromRecord(left, right) : type_exports.IsString(left) ? FromString(left, right) : type_exports.IsSymbol(left) ? FromSymbol(left, right) : type_exports.IsTuple(left) ? FromTuple3(left, right) : type_exports.IsPromise(left) ? FromPromise2(left, right) : type_exports.IsUint8Array(left) ? FromUint8Array(left, right) : type_exports.IsUndefined(left) ? FromUndefined(left, right) : type_exports.IsUnion(left) ? FromUnion6(left, right) : type_exports.IsUnknown(left) ? FromUnknown(left, right) : type_exports.IsVoid(left) ? FromVoid(left, right) : Throw(`Unknown left type operand '${left[Kind]}'`)
4248
- )
4249
- );
4250
- }
4251
- function ExtendsCheck(left, right) {
4252
- return Visit3(left, right);
4253
- }
4254
-
4255
- // node_modules/@sinclair/typebox/build/esm/type/extends/extends-from-mapped-result.mjs
4256
- function FromProperties8(P, Right, True, False, options) {
4257
- const Acc = {};
4258
- for (const K2 of globalThis.Object.getOwnPropertyNames(P))
4259
- Acc[K2] = Extends(P[K2], Right, True, False, Clone(options));
4260
- return Acc;
4261
- }
4262
- function FromMappedResult6(Left, Right, True, False, options) {
4263
- return FromProperties8(Left.properties, Right, True, False, options);
4264
- }
4265
- function ExtendsFromMappedResult(Left, Right, True, False, options) {
4266
- const P = FromMappedResult6(Left, Right, True, False, options);
4267
- return MappedResult(P);
4268
- }
4269
-
4270
- // node_modules/@sinclair/typebox/build/esm/type/extends/extends.mjs
4271
- function ExtendsResolve(left, right, trueType, falseType) {
4272
- const R = ExtendsCheck(left, right);
4273
- return R === ExtendsResult.Union ? Union([trueType, falseType]) : R === ExtendsResult.True ? trueType : falseType;
4274
- }
4275
- function Extends(L, R, T, F, options) {
4276
- return IsMappedResult(L) ? ExtendsFromMappedResult(L, R, T, F, options) : IsMappedKey(L) ? CreateType(ExtendsFromMappedKey(L, R, T, F, options)) : CreateType(ExtendsResolve(L, R, T, F), options);
4277
- }
4278
-
4279
- // node_modules/@sinclair/typebox/build/esm/type/extends/extends-from-mapped-key.mjs
4280
- function FromPropertyKey(K, U, L, R, options) {
4281
- return {
4282
- [K]: Extends(Literal(K), U, L, R, Clone(options))
4283
- };
4284
- }
4285
- function FromPropertyKeys(K, U, L, R, options) {
4286
- return K.reduce((Acc, LK) => {
4287
- return { ...Acc, ...FromPropertyKey(LK, U, L, R, options) };
4288
- }, {});
4289
- }
4290
- function FromMappedKey2(K, U, L, R, options) {
4291
- return FromPropertyKeys(K.keys, U, L, R, options);
4292
- }
4293
- function ExtendsFromMappedKey(T, U, L, R, options) {
4294
- const P = FromMappedKey2(T, U, L, R, options);
4295
- return MappedResult(P);
4296
- }
4297
-
4298
- // node_modules/@sinclair/typebox/build/esm/type/exclude/exclude-from-template-literal.mjs
4299
- function ExcludeFromTemplateLiteral(L, R) {
4300
- return Exclude(TemplateLiteralToUnion(L), R);
4301
- }
4302
-
4303
- // node_modules/@sinclair/typebox/build/esm/type/exclude/exclude.mjs
4304
- function ExcludeRest(L, R) {
4305
- const excluded = L.filter((inner) => ExtendsCheck(inner, R) === ExtendsResult.False);
4306
- return excluded.length === 1 ? excluded[0] : Union(excluded);
4307
- }
4308
- function Exclude(L, R, options = {}) {
4309
- if (IsTemplateLiteral(L))
4310
- return CreateType(ExcludeFromTemplateLiteral(L, R), options);
4311
- if (IsMappedResult(L))
4312
- return CreateType(ExcludeFromMappedResult(L, R), options);
4313
- return CreateType(IsUnion(L) ? ExcludeRest(L.anyOf, R) : ExtendsCheck(L, R) !== ExtendsResult.False ? Never() : L, options);
4314
- }
4315
-
4316
- // node_modules/@sinclair/typebox/build/esm/type/exclude/exclude-from-mapped-result.mjs
4317
- function FromProperties9(P, U) {
4318
- const Acc = {};
4319
- for (const K2 of globalThis.Object.getOwnPropertyNames(P))
4320
- Acc[K2] = Exclude(P[K2], U);
4321
- return Acc;
4322
- }
4323
- function FromMappedResult7(R, T) {
4324
- return FromProperties9(R.properties, T);
4325
- }
4326
- function ExcludeFromMappedResult(R, T) {
4327
- const P = FromMappedResult7(R, T);
4328
- return MappedResult(P);
4329
- }
4330
-
4331
- // node_modules/@sinclair/typebox/build/esm/type/extract/extract-from-template-literal.mjs
4332
- function ExtractFromTemplateLiteral(L, R) {
4333
- return Extract(TemplateLiteralToUnion(L), R);
4334
- }
4335
-
4336
- // node_modules/@sinclair/typebox/build/esm/type/extract/extract.mjs
4337
- function ExtractRest(L, R) {
4338
- const extracted = L.filter((inner) => ExtendsCheck(inner, R) !== ExtendsResult.False);
4339
- return extracted.length === 1 ? extracted[0] : Union(extracted);
4340
- }
4341
- function Extract(L, R, options) {
4342
- if (IsTemplateLiteral(L))
4343
- return CreateType(ExtractFromTemplateLiteral(L, R), options);
4344
- if (IsMappedResult(L))
4345
- return CreateType(ExtractFromMappedResult(L, R), options);
4346
- return CreateType(IsUnion(L) ? ExtractRest(L.anyOf, R) : ExtendsCheck(L, R) !== ExtendsResult.False ? L : Never(), options);
4347
- }
4348
-
4349
- // node_modules/@sinclair/typebox/build/esm/type/extract/extract-from-mapped-result.mjs
4350
- function FromProperties10(P, T) {
4351
- const Acc = {};
4352
- for (const K2 of globalThis.Object.getOwnPropertyNames(P))
4353
- Acc[K2] = Extract(P[K2], T);
4354
- return Acc;
4355
- }
4356
- function FromMappedResult8(R, T) {
4357
- return FromProperties10(R.properties, T);
4358
- }
4359
- function ExtractFromMappedResult(R, T) {
4360
- const P = FromMappedResult8(R, T);
4361
- return MappedResult(P);
4362
- }
4363
-
4364
- // node_modules/@sinclair/typebox/build/esm/type/instance-type/instance-type.mjs
4365
- function InstanceType(schema, options) {
4366
- return IsConstructor(schema) ? CreateType(schema.returns, options) : Never(options);
4367
- }
4368
-
4369
- // node_modules/@sinclair/typebox/build/esm/type/readonly-optional/readonly-optional.mjs
4370
- function ReadonlyOptional(schema) {
4371
- return Readonly(Optional(schema));
4372
- }
4373
-
4374
- // node_modules/@sinclair/typebox/build/esm/type/record/record.mjs
4375
- function RecordCreateFromPattern(pattern, T, options) {
4376
- return CreateType({ [Kind]: "Record", type: "object", patternProperties: { [pattern]: T } }, options);
4377
- }
4378
- function RecordCreateFromKeys(K, T, options) {
4379
- const result = {};
4380
- for (const K2 of K)
4381
- result[K2] = T;
4382
- return Object2(result, { ...options, [Hint]: "Record" });
4383
- }
4384
- function FromTemplateLiteralKey(K, T, options) {
4385
- return IsTemplateLiteralFinite(K) ? RecordCreateFromKeys(IndexPropertyKeys(K), T, options) : RecordCreateFromPattern(K.pattern, T, options);
4386
- }
4387
- function FromUnionKey(key, type, options) {
4388
- return RecordCreateFromKeys(IndexPropertyKeys(Union(key)), type, options);
4389
- }
4390
- function FromLiteralKey(key, type, options) {
4391
- return RecordCreateFromKeys([key.toString()], type, options);
4392
- }
4393
- function FromRegExpKey(key, type, options) {
4394
- return RecordCreateFromPattern(key.source, type, options);
4395
- }
4396
- function FromStringKey(key, type, options) {
4397
- const pattern = IsUndefined(key.pattern) ? PatternStringExact : key.pattern;
4398
- return RecordCreateFromPattern(pattern, type, options);
4399
- }
4400
- function FromAnyKey(_, type, options) {
4401
- return RecordCreateFromPattern(PatternStringExact, type, options);
4402
- }
4403
- function FromNeverKey(_key, type, options) {
4404
- return RecordCreateFromPattern(PatternNeverExact, type, options);
4405
- }
4406
- function FromBooleanKey(_key, type, options) {
4407
- return Object2({ true: type, false: type }, options);
4408
- }
4409
- function FromIntegerKey(_key, type, options) {
4410
- return RecordCreateFromPattern(PatternNumberExact, type, options);
4411
- }
4412
- function FromNumberKey(_, type, options) {
4413
- return RecordCreateFromPattern(PatternNumberExact, type, options);
4414
- }
4415
- function Record(key, type, options = {}) {
4416
- return IsUnion(key) ? FromUnionKey(key.anyOf, type, options) : IsTemplateLiteral(key) ? FromTemplateLiteralKey(key, type, options) : IsLiteral(key) ? FromLiteralKey(key.const, type, options) : IsBoolean2(key) ? FromBooleanKey(key, type, options) : IsInteger(key) ? FromIntegerKey(key, type, options) : IsNumber3(key) ? FromNumberKey(key, type, options) : IsRegExp2(key) ? FromRegExpKey(key, type, options) : IsString2(key) ? FromStringKey(key, type, options) : IsAny(key) ? FromAnyKey(key, type, options) : IsNever(key) ? FromNeverKey(key, type, options) : Never(options);
4417
- }
4418
- function RecordPattern(record) {
4419
- return globalThis.Object.getOwnPropertyNames(record.patternProperties)[0];
4420
- }
4421
- function RecordKey2(type) {
4422
- const pattern = RecordPattern(type);
4423
- return pattern === PatternStringExact ? String2() : pattern === PatternNumberExact ? Number2() : String2({ pattern });
4424
- }
4425
- function RecordValue2(type) {
4426
- return type.patternProperties[RecordPattern(type)];
4427
- }
4428
-
4429
- // node_modules/@sinclair/typebox/build/esm/type/instantiate/instantiate.mjs
4430
- function FromConstructor2(args, type) {
4431
- type.parameters = FromTypes(args, type.parameters);
4432
- type.returns = FromType(args, type.returns);
4433
- return type;
4434
- }
4435
- function FromFunction2(args, type) {
4436
- type.parameters = FromTypes(args, type.parameters);
4437
- type.returns = FromType(args, type.returns);
4438
- return type;
4439
- }
4440
- function FromIntersect5(args, type) {
4441
- type.allOf = FromTypes(args, type.allOf);
4442
- return type;
4443
- }
4444
- function FromUnion7(args, type) {
4445
- type.anyOf = FromTypes(args, type.anyOf);
4446
- return type;
4447
- }
4448
- function FromTuple4(args, type) {
4449
- if (IsUndefined(type.items))
4450
- return type;
4451
- type.items = FromTypes(args, type.items);
4452
- return type;
4453
- }
4454
- function FromArray5(args, type) {
4455
- type.items = FromType(args, type.items);
4456
- return type;
4457
- }
4458
- function FromAsyncIterator2(args, type) {
4459
- type.items = FromType(args, type.items);
4460
- return type;
4461
- }
4462
- function FromIterator2(args, type) {
4463
- type.items = FromType(args, type.items);
4464
- return type;
4465
- }
4466
- function FromPromise3(args, type) {
4467
- type.item = FromType(args, type.item);
4468
- return type;
4469
- }
4470
- function FromObject2(args, type) {
4471
- const mappedProperties = FromProperties11(args, type.properties);
4472
- return { ...type, ...Object2(mappedProperties) };
4473
- }
4474
- function FromRecord2(args, type) {
4475
- const mappedKey = FromType(args, RecordKey2(type));
4476
- const mappedValue = FromType(args, RecordValue2(type));
4477
- const result = Record(mappedKey, mappedValue);
4478
- return { ...type, ...result };
4479
- }
4480
- function FromArgument(args, argument) {
4481
- return argument.index in args ? args[argument.index] : Unknown();
4482
- }
4483
- function FromProperty2(args, type) {
4484
- const isReadonly = IsReadonly(type);
4485
- const isOptional = IsOptional(type);
4486
- const mapped = FromType(args, type);
4487
- return isReadonly && isOptional ? ReadonlyOptional(mapped) : isReadonly && !isOptional ? Readonly(mapped) : !isReadonly && isOptional ? Optional(mapped) : mapped;
4488
- }
4489
- function FromProperties11(args, properties) {
4490
- return globalThis.Object.getOwnPropertyNames(properties).reduce((result, key) => {
4491
- return { ...result, [key]: FromProperty2(args, properties[key]) };
4492
- }, {});
4493
- }
4494
- function FromTypes(args, types) {
4495
- return types.map((type) => FromType(args, type));
4496
- }
4497
- function FromType(args, type) {
4498
- return IsConstructor(type) ? FromConstructor2(args, type) : IsFunction2(type) ? FromFunction2(args, type) : IsIntersect(type) ? FromIntersect5(args, type) : IsUnion(type) ? FromUnion7(args, type) : IsTuple(type) ? FromTuple4(args, type) : IsArray3(type) ? FromArray5(args, type) : IsAsyncIterator2(type) ? FromAsyncIterator2(args, type) : IsIterator2(type) ? FromIterator2(args, type) : IsPromise(type) ? FromPromise3(args, type) : IsObject3(type) ? FromObject2(args, type) : IsRecord(type) ? FromRecord2(args, type) : IsArgument(type) ? FromArgument(args, type) : type;
4499
- }
4500
- function Instantiate(type, args) {
4501
- return FromType(args, CloneType(type));
4502
- }
4503
-
4504
- // node_modules/@sinclair/typebox/build/esm/type/integer/integer.mjs
4505
- function Integer(options) {
4506
- return CreateType({ [Kind]: "Integer", type: "integer" }, options);
4507
- }
4508
-
4509
- // node_modules/@sinclair/typebox/build/esm/type/intrinsic/intrinsic-from-mapped-key.mjs
4510
- function MappedIntrinsicPropertyKey(K, M, options) {
4511
- return {
4512
- [K]: Intrinsic(Literal(K), M, Clone(options))
4513
- };
4514
- }
4515
- function MappedIntrinsicPropertyKeys(K, M, options) {
4516
- const result = K.reduce((Acc, L) => {
4517
- return { ...Acc, ...MappedIntrinsicPropertyKey(L, M, options) };
4518
- }, {});
4519
- return result;
4520
- }
4521
- function MappedIntrinsicProperties(T, M, options) {
4522
- return MappedIntrinsicPropertyKeys(T["keys"], M, options);
4523
- }
4524
- function IntrinsicFromMappedKey(T, M, options) {
4525
- const P = MappedIntrinsicProperties(T, M, options);
4526
- return MappedResult(P);
4527
- }
4528
-
4529
- // node_modules/@sinclair/typebox/build/esm/type/intrinsic/intrinsic.mjs
4530
- function ApplyUncapitalize(value) {
4531
- const [first, rest] = [value.slice(0, 1), value.slice(1)];
4532
- return [first.toLowerCase(), rest].join("");
4533
- }
4534
- function ApplyCapitalize(value) {
4535
- const [first, rest] = [value.slice(0, 1), value.slice(1)];
4536
- return [first.toUpperCase(), rest].join("");
4537
- }
4538
- function ApplyUppercase(value) {
4539
- return value.toUpperCase();
4540
- }
4541
- function ApplyLowercase(value) {
4542
- return value.toLowerCase();
4543
- }
4544
- function FromTemplateLiteral3(schema, mode, options) {
4545
- const expression = TemplateLiteralParseExact(schema.pattern);
4546
- const finite = IsTemplateLiteralExpressionFinite(expression);
4547
- if (!finite)
4548
- return { ...schema, pattern: FromLiteralValue(schema.pattern, mode) };
4549
- const strings = [...TemplateLiteralExpressionGenerate(expression)];
4550
- const literals = strings.map((value) => Literal(value));
4551
- const mapped = FromRest5(literals, mode);
4552
- const union = Union(mapped);
4553
- return TemplateLiteral([union], options);
4554
- }
4555
- function FromLiteralValue(value, mode) {
4556
- return typeof value === "string" ? mode === "Uncapitalize" ? ApplyUncapitalize(value) : mode === "Capitalize" ? ApplyCapitalize(value) : mode === "Uppercase" ? ApplyUppercase(value) : mode === "Lowercase" ? ApplyLowercase(value) : value : value.toString();
4557
- }
4558
- function FromRest5(T, M) {
4559
- return T.map((L) => Intrinsic(L, M));
4560
- }
4561
- function Intrinsic(schema, mode, options = {}) {
4562
- return (
4563
- // Intrinsic-Mapped-Inference
4564
- IsMappedKey(schema) ? IntrinsicFromMappedKey(schema, mode, options) : (
4565
- // Standard-Inference
4566
- IsTemplateLiteral(schema) ? FromTemplateLiteral3(schema, mode, options) : IsUnion(schema) ? Union(FromRest5(schema.anyOf, mode), options) : IsLiteral(schema) ? Literal(FromLiteralValue(schema.const, mode), options) : (
4567
- // Default Type
4568
- CreateType(schema, options)
4569
- )
4570
- )
4571
- );
4572
- }
4573
-
4574
- // node_modules/@sinclair/typebox/build/esm/type/intrinsic/capitalize.mjs
4575
- function Capitalize(T, options = {}) {
4576
- return Intrinsic(T, "Capitalize", options);
4577
- }
4578
-
4579
- // node_modules/@sinclair/typebox/build/esm/type/intrinsic/lowercase.mjs
4580
- function Lowercase(T, options = {}) {
4581
- return Intrinsic(T, "Lowercase", options);
4582
- }
4583
-
4584
- // node_modules/@sinclair/typebox/build/esm/type/intrinsic/uncapitalize.mjs
4585
- function Uncapitalize(T, options = {}) {
4586
- return Intrinsic(T, "Uncapitalize", options);
4587
- }
4588
-
4589
- // node_modules/@sinclair/typebox/build/esm/type/intrinsic/uppercase.mjs
4590
- function Uppercase(T, options = {}) {
4591
- return Intrinsic(T, "Uppercase", options);
4592
- }
4593
-
4594
- // node_modules/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-result.mjs
4595
- function FromProperties12(properties, propertyKeys, options) {
4596
- const result = {};
4597
- for (const K2 of globalThis.Object.getOwnPropertyNames(properties))
4598
- result[K2] = Omit(properties[K2], propertyKeys, Clone(options));
4599
- return result;
4600
- }
4601
- function FromMappedResult9(mappedResult, propertyKeys, options) {
4602
- return FromProperties12(mappedResult.properties, propertyKeys, options);
4603
- }
4604
- function OmitFromMappedResult(mappedResult, propertyKeys, options) {
4605
- const properties = FromMappedResult9(mappedResult, propertyKeys, options);
4606
- return MappedResult(properties);
4607
- }
4608
-
4609
- // node_modules/@sinclair/typebox/build/esm/type/omit/omit.mjs
4610
- function FromIntersect6(types, propertyKeys) {
4611
- return types.map((type) => OmitResolve(type, propertyKeys));
4612
- }
4613
- function FromUnion8(types, propertyKeys) {
4614
- return types.map((type) => OmitResolve(type, propertyKeys));
4615
- }
4616
- function FromProperty3(properties, key) {
4617
- const { [key]: _, ...R } = properties;
4618
- return R;
4619
- }
4620
- function FromProperties13(properties, propertyKeys) {
4621
- return propertyKeys.reduce((T, K2) => FromProperty3(T, K2), properties);
4622
- }
4623
- function FromObject3(type, propertyKeys, properties) {
4624
- const options = Discard(type, [TransformKind, "$id", "required", "properties"]);
4625
- const mappedProperties = FromProperties13(properties, propertyKeys);
4626
- return Object2(mappedProperties, options);
4627
- }
4628
- function UnionFromPropertyKeys(propertyKeys) {
4629
- const result = propertyKeys.reduce((result2, key) => IsLiteralValue(key) ? [...result2, Literal(key)] : result2, []);
4630
- return Union(result);
4631
- }
4632
- function OmitResolve(type, propertyKeys) {
4633
- return IsIntersect(type) ? Intersect(FromIntersect6(type.allOf, propertyKeys)) : IsUnion(type) ? Union(FromUnion8(type.anyOf, propertyKeys)) : IsObject3(type) ? FromObject3(type, propertyKeys, type.properties) : Object2({});
4634
- }
4635
- function Omit(type, key, options) {
4636
- const typeKey = IsArray(key) ? UnionFromPropertyKeys(key) : key;
4637
- const propertyKeys = IsSchema(key) ? IndexPropertyKeys(key) : key;
4638
- const isTypeRef = IsRef(type);
4639
- const isKeyRef = IsRef(key);
4640
- return IsMappedResult(type) ? OmitFromMappedResult(type, propertyKeys, options) : IsMappedKey(key) ? OmitFromMappedKey(type, key, options) : isTypeRef && isKeyRef ? Computed("Omit", [type, typeKey], options) : !isTypeRef && isKeyRef ? Computed("Omit", [type, typeKey], options) : isTypeRef && !isKeyRef ? Computed("Omit", [type, typeKey], options) : CreateType({ ...OmitResolve(type, propertyKeys), ...options });
4641
- }
4642
-
4643
- // node_modules/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-key.mjs
4644
- function FromPropertyKey2(type, key, options) {
4645
- return { [key]: Omit(type, [key], Clone(options)) };
4646
- }
4647
- function FromPropertyKeys2(type, propertyKeys, options) {
4648
- return propertyKeys.reduce((Acc, LK) => {
4649
- return { ...Acc, ...FromPropertyKey2(type, LK, options) };
4650
- }, {});
4651
- }
4652
- function FromMappedKey3(type, mappedKey, options) {
4653
- return FromPropertyKeys2(type, mappedKey.keys, options);
4654
- }
4655
- function OmitFromMappedKey(type, mappedKey, options) {
4656
- const properties = FromMappedKey3(type, mappedKey, options);
4657
- return MappedResult(properties);
4658
- }
4659
-
4660
- // node_modules/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-result.mjs
4661
- function FromProperties14(properties, propertyKeys, options) {
4662
- const result = {};
4663
- for (const K2 of globalThis.Object.getOwnPropertyNames(properties))
4664
- result[K2] = Pick(properties[K2], propertyKeys, Clone(options));
4665
- return result;
4666
- }
4667
- function FromMappedResult10(mappedResult, propertyKeys, options) {
4668
- return FromProperties14(mappedResult.properties, propertyKeys, options);
4669
- }
4670
- function PickFromMappedResult(mappedResult, propertyKeys, options) {
4671
- const properties = FromMappedResult10(mappedResult, propertyKeys, options);
4672
- return MappedResult(properties);
4673
- }
4674
-
4675
- // node_modules/@sinclair/typebox/build/esm/type/pick/pick.mjs
4676
- function FromIntersect7(types, propertyKeys) {
4677
- return types.map((type) => PickResolve(type, propertyKeys));
4678
- }
4679
- function FromUnion9(types, propertyKeys) {
4680
- return types.map((type) => PickResolve(type, propertyKeys));
4681
- }
4682
- function FromProperties15(properties, propertyKeys) {
4683
- const result = {};
4684
- for (const K2 of propertyKeys)
4685
- if (K2 in properties)
4686
- result[K2] = properties[K2];
4687
- return result;
4688
- }
4689
- function FromObject4(Type2, keys, properties) {
4690
- const options = Discard(Type2, [TransformKind, "$id", "required", "properties"]);
4691
- const mappedProperties = FromProperties15(properties, keys);
4692
- return Object2(mappedProperties, options);
4693
- }
4694
- function UnionFromPropertyKeys2(propertyKeys) {
4695
- const result = propertyKeys.reduce((result2, key) => IsLiteralValue(key) ? [...result2, Literal(key)] : result2, []);
4696
- return Union(result);
4697
- }
4698
- function PickResolve(type, propertyKeys) {
4699
- return IsIntersect(type) ? Intersect(FromIntersect7(type.allOf, propertyKeys)) : IsUnion(type) ? Union(FromUnion9(type.anyOf, propertyKeys)) : IsObject3(type) ? FromObject4(type, propertyKeys, type.properties) : Object2({});
4700
- }
4701
- function Pick(type, key, options) {
4702
- const typeKey = IsArray(key) ? UnionFromPropertyKeys2(key) : key;
4703
- const propertyKeys = IsSchema(key) ? IndexPropertyKeys(key) : key;
4704
- const isTypeRef = IsRef(type);
4705
- const isKeyRef = IsRef(key);
4706
- return IsMappedResult(type) ? PickFromMappedResult(type, propertyKeys, options) : IsMappedKey(key) ? PickFromMappedKey(type, key, options) : isTypeRef && isKeyRef ? Computed("Pick", [type, typeKey], options) : !isTypeRef && isKeyRef ? Computed("Pick", [type, typeKey], options) : isTypeRef && !isKeyRef ? Computed("Pick", [type, typeKey], options) : CreateType({ ...PickResolve(type, propertyKeys), ...options });
4707
- }
4708
-
4709
- // node_modules/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-key.mjs
4710
- function FromPropertyKey3(type, key, options) {
4711
- return {
4712
- [key]: Pick(type, [key], Clone(options))
4713
- };
4714
- }
4715
- function FromPropertyKeys3(type, propertyKeys, options) {
4716
- return propertyKeys.reduce((result, leftKey) => {
4717
- return { ...result, ...FromPropertyKey3(type, leftKey, options) };
4718
- }, {});
4719
- }
4720
- function FromMappedKey4(type, mappedKey, options) {
4721
- return FromPropertyKeys3(type, mappedKey.keys, options);
4722
- }
4723
- function PickFromMappedKey(type, mappedKey, options) {
4724
- const properties = FromMappedKey4(type, mappedKey, options);
4725
- return MappedResult(properties);
4726
- }
4727
-
4728
- // node_modules/@sinclair/typebox/build/esm/type/partial/partial.mjs
4729
- function FromComputed3(target, parameters) {
4730
- return Computed("Partial", [Computed(target, parameters)]);
4731
- }
4732
- function FromRef3($ref) {
4733
- return Computed("Partial", [Ref($ref)]);
4734
- }
4735
- function FromProperties16(properties) {
4736
- const partialProperties = {};
4737
- for (const K of globalThis.Object.getOwnPropertyNames(properties))
4738
- partialProperties[K] = Optional(properties[K]);
4739
- return partialProperties;
4740
- }
4741
- function FromObject5(type, properties) {
4742
- const options = Discard(type, [TransformKind, "$id", "required", "properties"]);
4743
- const mappedProperties = FromProperties16(properties);
4744
- return Object2(mappedProperties, options);
4745
- }
4746
- function FromRest6(types) {
4747
- return types.map((type) => PartialResolve(type));
4748
- }
4749
- function PartialResolve(type) {
4750
- return (
4751
- // Mappable
4752
- IsComputed(type) ? FromComputed3(type.target, type.parameters) : IsRef(type) ? FromRef3(type.$ref) : IsIntersect(type) ? Intersect(FromRest6(type.allOf)) : IsUnion(type) ? Union(FromRest6(type.anyOf)) : IsObject3(type) ? FromObject5(type, type.properties) : (
4753
- // Intrinsic
4754
- IsBigInt2(type) ? type : IsBoolean2(type) ? type : IsInteger(type) ? type : IsLiteral(type) ? type : IsNull2(type) ? type : IsNumber3(type) ? type : IsString2(type) ? type : IsSymbol2(type) ? type : IsUndefined3(type) ? type : (
4755
- // Passthrough
4756
- Object2({})
4757
- )
4758
- )
4759
- );
4760
- }
4761
- function Partial(type, options) {
4762
- if (IsMappedResult(type)) {
4763
- return PartialFromMappedResult(type, options);
4764
- } else {
4765
- return CreateType({ ...PartialResolve(type), ...options });
4766
- }
4767
- }
4768
-
4769
- // node_modules/@sinclair/typebox/build/esm/type/partial/partial-from-mapped-result.mjs
4770
- function FromProperties17(K, options) {
4771
- const Acc = {};
4772
- for (const K2 of globalThis.Object.getOwnPropertyNames(K))
4773
- Acc[K2] = Partial(K[K2], Clone(options));
4774
- return Acc;
4775
- }
4776
- function FromMappedResult11(R, options) {
4777
- return FromProperties17(R.properties, options);
4778
- }
4779
- function PartialFromMappedResult(R, options) {
4780
- const P = FromMappedResult11(R, options);
4781
- return MappedResult(P);
4782
- }
4783
-
4784
- // node_modules/@sinclair/typebox/build/esm/type/required/required.mjs
4785
- function FromComputed4(target, parameters) {
4786
- return Computed("Required", [Computed(target, parameters)]);
4787
- }
4788
- function FromRef4($ref) {
4789
- return Computed("Required", [Ref($ref)]);
4790
- }
4791
- function FromProperties18(properties) {
4792
- const requiredProperties = {};
4793
- for (const K of globalThis.Object.getOwnPropertyNames(properties))
4794
- requiredProperties[K] = Discard(properties[K], [OptionalKind]);
4795
- return requiredProperties;
4796
- }
4797
- function FromObject6(type, properties) {
4798
- const options = Discard(type, [TransformKind, "$id", "required", "properties"]);
4799
- const mappedProperties = FromProperties18(properties);
4800
- return Object2(mappedProperties, options);
4801
- }
4802
- function FromRest7(types) {
4803
- return types.map((type) => RequiredResolve(type));
4804
- }
4805
- function RequiredResolve(type) {
4806
- return (
4807
- // Mappable
4808
- IsComputed(type) ? FromComputed4(type.target, type.parameters) : IsRef(type) ? FromRef4(type.$ref) : IsIntersect(type) ? Intersect(FromRest7(type.allOf)) : IsUnion(type) ? Union(FromRest7(type.anyOf)) : IsObject3(type) ? FromObject6(type, type.properties) : (
4809
- // Intrinsic
4810
- IsBigInt2(type) ? type : IsBoolean2(type) ? type : IsInteger(type) ? type : IsLiteral(type) ? type : IsNull2(type) ? type : IsNumber3(type) ? type : IsString2(type) ? type : IsSymbol2(type) ? type : IsUndefined3(type) ? type : (
4811
- // Passthrough
4812
- Object2({})
4813
- )
4814
- )
4815
- );
4816
- }
4817
- function Required(type, options) {
4818
- if (IsMappedResult(type)) {
4819
- return RequiredFromMappedResult(type, options);
4820
- } else {
4821
- return CreateType({ ...RequiredResolve(type), ...options });
4822
- }
4823
- }
4824
-
4825
- // node_modules/@sinclair/typebox/build/esm/type/required/required-from-mapped-result.mjs
4826
- function FromProperties19(P, options) {
4827
- const Acc = {};
4828
- for (const K2 of globalThis.Object.getOwnPropertyNames(P))
4829
- Acc[K2] = Required(P[K2], options);
4830
- return Acc;
4831
- }
4832
- function FromMappedResult12(R, options) {
4833
- return FromProperties19(R.properties, options);
4834
- }
4835
- function RequiredFromMappedResult(R, options) {
4836
- const P = FromMappedResult12(R, options);
4837
- return MappedResult(P);
4838
- }
4839
-
4840
- // node_modules/@sinclair/typebox/build/esm/type/module/compute.mjs
4841
- function DereferenceParameters(moduleProperties, types) {
4842
- return types.map((type) => {
4843
- return IsRef(type) ? Dereference(moduleProperties, type.$ref) : FromType2(moduleProperties, type);
4844
- });
4845
- }
4846
- function Dereference(moduleProperties, ref) {
4847
- return ref in moduleProperties ? IsRef(moduleProperties[ref]) ? Dereference(moduleProperties, moduleProperties[ref].$ref) : FromType2(moduleProperties, moduleProperties[ref]) : Never();
4848
- }
4849
- function FromAwaited(parameters) {
4850
- return Awaited(parameters[0]);
4851
- }
4852
- function FromIndex(parameters) {
4853
- return Index(parameters[0], parameters[1]);
4854
- }
4855
- function FromKeyOf(parameters) {
4856
- return KeyOf(parameters[0]);
4857
- }
4858
- function FromPartial(parameters) {
4859
- return Partial(parameters[0]);
4860
- }
4861
- function FromOmit(parameters) {
4862
- return Omit(parameters[0], parameters[1]);
4863
- }
4864
- function FromPick(parameters) {
4865
- return Pick(parameters[0], parameters[1]);
4866
- }
4867
- function FromRequired(parameters) {
4868
- return Required(parameters[0]);
4869
- }
4870
- function FromComputed5(moduleProperties, target, parameters) {
4871
- const dereferenced = DereferenceParameters(moduleProperties, parameters);
4872
- return target === "Awaited" ? FromAwaited(dereferenced) : target === "Index" ? FromIndex(dereferenced) : target === "KeyOf" ? FromKeyOf(dereferenced) : target === "Partial" ? FromPartial(dereferenced) : target === "Omit" ? FromOmit(dereferenced) : target === "Pick" ? FromPick(dereferenced) : target === "Required" ? FromRequired(dereferenced) : Never();
4873
- }
4874
- function FromArray6(moduleProperties, type) {
4875
- return Array2(FromType2(moduleProperties, type));
4876
- }
4877
- function FromAsyncIterator3(moduleProperties, type) {
4878
- return AsyncIterator(FromType2(moduleProperties, type));
4879
- }
4880
- function FromConstructor3(moduleProperties, parameters, instanceType) {
4881
- return Constructor(FromTypes2(moduleProperties, parameters), FromType2(moduleProperties, instanceType));
4882
- }
4883
- function FromFunction3(moduleProperties, parameters, returnType) {
4884
- return Function(FromTypes2(moduleProperties, parameters), FromType2(moduleProperties, returnType));
4885
- }
4886
- function FromIntersect8(moduleProperties, types) {
4887
- return Intersect(FromTypes2(moduleProperties, types));
4888
- }
4889
- function FromIterator3(moduleProperties, type) {
4890
- return Iterator(FromType2(moduleProperties, type));
4891
- }
4892
- function FromObject7(moduleProperties, properties) {
4893
- return Object2(globalThis.Object.keys(properties).reduce((result, key) => {
4894
- return { ...result, [key]: FromType2(moduleProperties, properties[key]) };
4895
- }, {}));
4896
- }
4897
- function FromRecord3(moduleProperties, type) {
4898
- const [value, pattern] = [FromType2(moduleProperties, RecordValue2(type)), RecordPattern(type)];
4899
- const result = CloneType(type);
4900
- result.patternProperties[pattern] = value;
4901
- return result;
4902
- }
4903
- function FromTransform(moduleProperties, transform) {
4904
- return IsRef(transform) ? { ...Dereference(moduleProperties, transform.$ref), [TransformKind]: transform[TransformKind] } : transform;
4905
- }
4906
- function FromTuple5(moduleProperties, types) {
4907
- return Tuple(FromTypes2(moduleProperties, types));
4908
- }
4909
- function FromUnion10(moduleProperties, types) {
4910
- return Union(FromTypes2(moduleProperties, types));
4911
- }
4912
- function FromTypes2(moduleProperties, types) {
4913
- return types.map((type) => FromType2(moduleProperties, type));
4914
- }
4915
- function FromType2(moduleProperties, type) {
4916
- return (
4917
- // Modifiers
4918
- IsOptional(type) ? CreateType(FromType2(moduleProperties, Discard(type, [OptionalKind])), type) : IsReadonly(type) ? CreateType(FromType2(moduleProperties, Discard(type, [ReadonlyKind])), type) : (
4919
- // Transform
4920
- IsTransform(type) ? CreateType(FromTransform(moduleProperties, type), type) : (
4921
- // Types
4922
- IsArray3(type) ? CreateType(FromArray6(moduleProperties, type.items), type) : IsAsyncIterator2(type) ? CreateType(FromAsyncIterator3(moduleProperties, type.items), type) : IsComputed(type) ? CreateType(FromComputed5(moduleProperties, type.target, type.parameters)) : IsConstructor(type) ? CreateType(FromConstructor3(moduleProperties, type.parameters, type.returns), type) : IsFunction2(type) ? CreateType(FromFunction3(moduleProperties, type.parameters, type.returns), type) : IsIntersect(type) ? CreateType(FromIntersect8(moduleProperties, type.allOf), type) : IsIterator2(type) ? CreateType(FromIterator3(moduleProperties, type.items), type) : IsObject3(type) ? CreateType(FromObject7(moduleProperties, type.properties), type) : IsRecord(type) ? CreateType(FromRecord3(moduleProperties, type)) : IsTuple(type) ? CreateType(FromTuple5(moduleProperties, type.items || []), type) : IsUnion(type) ? CreateType(FromUnion10(moduleProperties, type.anyOf), type) : type
4923
- )
4924
- )
4925
- );
4926
- }
4927
- function ComputeType(moduleProperties, key) {
4928
- return key in moduleProperties ? FromType2(moduleProperties, moduleProperties[key]) : Never();
4929
- }
4930
- function ComputeModuleProperties(moduleProperties) {
4931
- return globalThis.Object.getOwnPropertyNames(moduleProperties).reduce((result, key) => {
4932
- return { ...result, [key]: ComputeType(moduleProperties, key) };
4933
- }, {});
4934
- }
4935
-
4936
- // node_modules/@sinclair/typebox/build/esm/type/module/module.mjs
4937
- var TModule = class {
4938
- constructor($defs) {
4939
- const computed = ComputeModuleProperties($defs);
4940
- const identified = this.WithIdentifiers(computed);
4941
- this.$defs = identified;
4942
- }
4943
- /** `[Json]` Imports a Type by Key. */
4944
- Import(key, options) {
4945
- const $defs = { ...this.$defs, [key]: CreateType(this.$defs[key], options) };
4946
- return CreateType({ [Kind]: "Import", $defs, $ref: key });
4947
- }
4948
- // prettier-ignore
4949
- WithIdentifiers($defs) {
4950
- return globalThis.Object.getOwnPropertyNames($defs).reduce((result, key) => {
4951
- return { ...result, [key]: { ...$defs[key], $id: key } };
4952
- }, {});
4953
- }
4954
- };
4955
- function Module(properties) {
4956
- return new TModule(properties);
4957
- }
4958
-
4959
- // node_modules/@sinclair/typebox/build/esm/type/not/not.mjs
4960
- function Not(type, options) {
4961
- return CreateType({ [Kind]: "Not", not: type }, options);
4962
- }
4963
-
4964
- // node_modules/@sinclair/typebox/build/esm/type/parameters/parameters.mjs
4965
- function Parameters(schema, options) {
4966
- return IsFunction2(schema) ? Tuple(schema.parameters, options) : Never();
4967
- }
4968
-
4969
- // node_modules/@sinclair/typebox/build/esm/type/recursive/recursive.mjs
4970
- var Ordinal = 0;
4971
- function Recursive(callback, options = {}) {
4972
- if (IsUndefined(options.$id))
4973
- options.$id = `T${Ordinal++}`;
4974
- const thisType = CloneType(callback({ [Kind]: "This", $ref: `${options.$id}` }));
4975
- thisType.$id = options.$id;
4976
- return CreateType({ [Hint]: "Recursive", ...thisType }, options);
4977
- }
4978
-
4979
- // node_modules/@sinclair/typebox/build/esm/type/regexp/regexp.mjs
4980
- function RegExp2(unresolved, options) {
4981
- const expr = IsString(unresolved) ? new globalThis.RegExp(unresolved) : unresolved;
4982
- return CreateType({ [Kind]: "RegExp", type: "RegExp", source: expr.source, flags: expr.flags }, options);
4983
- }
4984
-
4985
- // node_modules/@sinclair/typebox/build/esm/type/rest/rest.mjs
4986
- function RestResolve(T) {
4987
- return IsIntersect(T) ? T.allOf : IsUnion(T) ? T.anyOf : IsTuple(T) ? T.items ?? [] : [];
4988
- }
4989
- function Rest(T) {
4990
- return RestResolve(T);
4991
- }
4992
-
4993
- // node_modules/@sinclair/typebox/build/esm/type/return-type/return-type.mjs
4994
- function ReturnType(schema, options) {
4995
- return IsFunction2(schema) ? CreateType(schema.returns, options) : Never(options);
4996
- }
4997
-
4998
- // node_modules/@sinclair/typebox/build/esm/type/transform/transform.mjs
4999
- var TransformDecodeBuilder = class {
5000
- constructor(schema) {
5001
- this.schema = schema;
5002
- }
5003
- Decode(decode) {
5004
- return new TransformEncodeBuilder(this.schema, decode);
5005
- }
5006
- };
5007
- var TransformEncodeBuilder = class {
5008
- constructor(schema, decode) {
5009
- this.schema = schema;
5010
- this.decode = decode;
5011
- }
5012
- EncodeTransform(encode, schema) {
5013
- const Encode = (value) => schema[TransformKind].Encode(encode(value));
5014
- const Decode = (value) => this.decode(schema[TransformKind].Decode(value));
5015
- const Codec = { Encode, Decode };
5016
- return { ...schema, [TransformKind]: Codec };
5017
- }
5018
- EncodeSchema(encode, schema) {
5019
- const Codec = { Decode: this.decode, Encode: encode };
5020
- return { ...schema, [TransformKind]: Codec };
5021
- }
5022
- Encode(encode) {
5023
- return IsTransform(this.schema) ? this.EncodeTransform(encode, this.schema) : this.EncodeSchema(encode, this.schema);
5024
- }
5025
- };
5026
- function Transform(schema) {
5027
- return new TransformDecodeBuilder(schema);
5028
- }
5029
-
5030
- // node_modules/@sinclair/typebox/build/esm/type/unsafe/unsafe.mjs
5031
- function Unsafe(options = {}) {
5032
- return CreateType({ [Kind]: options[Kind] ?? "Unsafe" }, options);
5033
- }
5034
-
5035
- // node_modules/@sinclair/typebox/build/esm/type/void/void.mjs
5036
- function Void(options) {
5037
- return CreateType({ [Kind]: "Void", type: "void" }, options);
5038
- }
5039
-
5040
- // node_modules/@sinclair/typebox/build/esm/type/type/type.mjs
5041
- var type_exports2 = {};
5042
- __export(type_exports2, {
5043
- Any: () => Any,
5044
- Argument: () => Argument,
5045
- Array: () => Array2,
5046
- AsyncIterator: () => AsyncIterator,
5047
- Awaited: () => Awaited,
5048
- BigInt: () => BigInt,
5049
- Boolean: () => Boolean2,
5050
- Capitalize: () => Capitalize,
5051
- Composite: () => Composite,
5052
- Const: () => Const,
5053
- Constructor: () => Constructor,
5054
- ConstructorParameters: () => ConstructorParameters,
5055
- Date: () => Date2,
5056
- Enum: () => Enum,
5057
- Exclude: () => Exclude,
5058
- Extends: () => Extends,
5059
- Extract: () => Extract,
5060
- Function: () => Function,
5061
- Index: () => Index,
5062
- InstanceType: () => InstanceType,
5063
- Instantiate: () => Instantiate,
5064
- Integer: () => Integer,
5065
- Intersect: () => Intersect,
5066
- Iterator: () => Iterator,
5067
- KeyOf: () => KeyOf,
5068
- Literal: () => Literal,
5069
- Lowercase: () => Lowercase,
5070
- Mapped: () => Mapped,
5071
- Module: () => Module,
5072
- Never: () => Never,
5073
- Not: () => Not,
5074
- Null: () => Null,
5075
- Number: () => Number2,
5076
- Object: () => Object2,
5077
- Omit: () => Omit,
5078
- Optional: () => Optional,
5079
- Parameters: () => Parameters,
5080
- Partial: () => Partial,
5081
- Pick: () => Pick,
5082
- Promise: () => Promise2,
5083
- Readonly: () => Readonly,
5084
- ReadonlyOptional: () => ReadonlyOptional,
5085
- Record: () => Record,
5086
- Recursive: () => Recursive,
5087
- Ref: () => Ref,
5088
- RegExp: () => RegExp2,
5089
- Required: () => Required,
5090
- Rest: () => Rest,
5091
- ReturnType: () => ReturnType,
5092
- String: () => String2,
5093
- Symbol: () => Symbol2,
5094
- TemplateLiteral: () => TemplateLiteral,
5095
- Transform: () => Transform,
5096
- Tuple: () => Tuple,
5097
- Uint8Array: () => Uint8Array2,
5098
- Uncapitalize: () => Uncapitalize,
5099
- Undefined: () => Undefined,
5100
- Union: () => Union,
5101
- Unknown: () => Unknown,
5102
- Unsafe: () => Unsafe,
5103
- Uppercase: () => Uppercase,
5104
- Void: () => Void
5105
- });
5106
-
5107
- // node_modules/@sinclair/typebox/build/esm/type/type/index.mjs
5108
- var Type = type_exports2;
5109
-
5110
- // src/runtime/tools/send-file-tool.ts
2503
+ import { Type } from "@sinclair/typebox";
5111
2504
  var SendFileParams = Type.Object({
5112
2505
  filePath: Type.String({
5113
2506
  description: "Absolute path to the file to send to the user. The file must exist and be readable."
@@ -5193,35 +2586,36 @@ function createSendFileTool(fileOutputCallbackRef) {
5193
2586
  }
5194
2587
 
5195
2588
  // src/runtime/tools/manage-schedule-tool.ts
5196
- var ManageScheduleParams = Type.Object({
5197
- action: Type.Union(
2589
+ import { Type as Type2 } from "@sinclair/typebox";
2590
+ var ManageScheduleParams = Type2.Object({
2591
+ action: Type2.Union(
5198
2592
  [
5199
- Type.Literal("add"),
5200
- Type.Literal("list"),
5201
- Type.Literal("remove"),
5202
- Type.Literal("trigger"),
5203
- Type.Literal("enable"),
5204
- Type.Literal("disable")
2593
+ Type2.Literal("add"),
2594
+ Type2.Literal("list"),
2595
+ Type2.Literal("remove"),
2596
+ Type2.Literal("trigger"),
2597
+ Type2.Literal("enable"),
2598
+ Type2.Literal("disable")
5205
2599
  ],
5206
2600
  { description: "The action to perform." }
5207
2601
  ),
5208
- name: Type.Optional(
5209
- Type.String({
2602
+ name: Type2.Optional(
2603
+ Type2.String({
5210
2604
  description: "Unique name for the scheduled task. Required for add/remove/trigger/enable/disable."
5211
2605
  })
5212
2606
  ),
5213
- cron: Type.Optional(
5214
- Type.String({
2607
+ cron: Type2.Optional(
2608
+ Type2.String({
5215
2609
  description: "Cron expression (5 fields: minute hour day month weekday). Required for add."
5216
2610
  })
5217
2611
  ),
5218
- prompt: Type.Optional(
5219
- Type.String({
2612
+ prompt: Type2.Optional(
2613
+ Type2.String({
5220
2614
  description: "The work prompt to execute when the task triggers. Required for add. Describe only what to do each run; do not repeat timing, cron, or 'every N minutes' instructions here."
5221
2615
  })
5222
2616
  ),
5223
- timezone: Type.Optional(
5224
- Type.String({
2617
+ timezone: Type2.Optional(
2618
+ Type2.String({
5225
2619
  description: "Optional timezone for the cron schedule, e.g. 'Asia/Shanghai', 'America/New_York'."
5226
2620
  })
5227
2621
  )