deepline 0.3.50 → 0.3.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli/index.js CHANGED
@@ -6,10 +6,6 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
7
  var __getProtoOf = Object.getPrototypeOf;
8
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __export = (target, all) => {
10
- for (var name in all)
11
- __defProp(target, name, { get: all[name], enumerable: true });
12
- };
13
9
  var __copyProps = (to, from, except, desc) => {
14
10
  if (from && typeof from === "object" || typeof from === "function") {
15
11
  for (let key of __getOwnPropNames(from))
@@ -1079,7 +1075,7 @@ var SDK_RELEASE = {
1079
1075
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
1080
1076
  // getters keep their established compatibility behavior.
1081
1077
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
1082
- version: "0.3.50",
1078
+ version: "0.3.52",
1083
1079
  updateSummary: "Automatic CLI updates are now enabled by default. To opt out, run `deepline settings autoupdate off`; use `deepline settings autoupdate on` to re-enable updates or `deepline settings autoupdate pin <version>` to hold an exact release. This release also adds raw-v2 tool responses at toolResponse.rawV2 while preserving existing toolResponse.raw and declared getters.",
1084
1080
  packageCapabilities: {
1085
1081
  updatePreferences: 1
@@ -13473,2656 +13469,52 @@ var import_node_module = require("module");
13473
13469
  var import_acorn2 = require("acorn");
13474
13470
  var import_esbuild = require("esbuild");
13475
13471
 
13476
- // ../../node_modules/@sinclair/typebox/build/esm/type/guard/value.mjs
13477
- var value_exports = {};
13478
- __export(value_exports, {
13479
- HasPropertyKey: () => HasPropertyKey,
13480
- IsArray: () => IsArray,
13481
- IsAsyncIterator: () => IsAsyncIterator,
13482
- IsBigInt: () => IsBigInt,
13483
- IsBoolean: () => IsBoolean,
13484
- IsDate: () => IsDate,
13485
- IsFunction: () => IsFunction,
13486
- IsIterator: () => IsIterator,
13487
- IsNull: () => IsNull,
13488
- IsNumber: () => IsNumber,
13489
- IsObject: () => IsObject,
13490
- IsRegExp: () => IsRegExp,
13491
- IsString: () => IsString,
13492
- IsSymbol: () => IsSymbol,
13493
- IsUint8Array: () => IsUint8Array,
13494
- IsUndefined: () => IsUndefined
13495
- });
13496
- function HasPropertyKey(value, key) {
13497
- return key in value;
13498
- }
13499
- function IsAsyncIterator(value) {
13500
- return IsObject(value) && !IsArray(value) && !IsUint8Array(value) && Symbol.asyncIterator in value;
13501
- }
13502
- function IsArray(value) {
13503
- return Array.isArray(value);
13504
- }
13505
- function IsBigInt(value) {
13506
- return typeof value === "bigint";
13507
- }
13508
- function IsBoolean(value) {
13509
- return typeof value === "boolean";
13510
- }
13511
- function IsDate(value) {
13512
- return value instanceof globalThis.Date;
13513
- }
13514
- function IsFunction(value) {
13515
- return typeof value === "function";
13516
- }
13517
- function IsIterator(value) {
13518
- return IsObject(value) && !IsArray(value) && !IsUint8Array(value) && Symbol.iterator in value;
13519
- }
13520
- function IsNull(value) {
13521
- return value === null;
13522
- }
13523
- function IsNumber(value) {
13524
- return typeof value === "number";
13525
- }
13526
- function IsObject(value) {
13527
- return typeof value === "object" && value !== null;
13528
- }
13529
- function IsRegExp(value) {
13530
- return value instanceof globalThis.RegExp;
13531
- }
13532
- function IsString(value) {
13533
- return typeof value === "string";
13534
- }
13535
- function IsSymbol(value) {
13536
- return typeof value === "symbol";
13537
- }
13538
- function IsUint8Array(value) {
13539
- return value instanceof globalThis.Uint8Array;
13540
- }
13541
- function IsUndefined(value) {
13542
- return value === void 0;
13543
- }
13544
-
13545
- // ../../node_modules/@sinclair/typebox/build/esm/type/clone/value.mjs
13546
- function ArrayType(value) {
13547
- return value.map((value2) => Visit(value2));
13548
- }
13549
- function DateType(value) {
13550
- return new Date(value.getTime());
13551
- }
13552
- function Uint8ArrayType(value) {
13553
- return new Uint8Array(value);
13554
- }
13555
- function RegExpType(value) {
13556
- return new RegExp(value.source, value.flags);
13557
- }
13558
- function ObjectType(value) {
13559
- const result = {};
13560
- for (const key of Object.getOwnPropertyNames(value)) {
13561
- result[key] = Visit(value[key]);
13562
- }
13563
- for (const key of Object.getOwnPropertySymbols(value)) {
13564
- result[key] = Visit(value[key]);
13565
- }
13566
- return result;
13567
- }
13568
- function Visit(value) {
13569
- return IsArray(value) ? ArrayType(value) : IsDate(value) ? DateType(value) : IsUint8Array(value) ? Uint8ArrayType(value) : IsRegExp(value) ? RegExpType(value) : IsObject(value) ? ObjectType(value) : value;
13570
- }
13571
- function Clone(value) {
13572
- return Visit(value);
13573
- }
13574
-
13575
- // ../../node_modules/@sinclair/typebox/build/esm/type/clone/type.mjs
13576
- function CloneType(schema, options) {
13577
- return options === void 0 ? Clone(schema) : Clone({ ...options, ...schema });
13578
- }
13579
-
13580
- // ../../node_modules/@sinclair/typebox/build/esm/value/guard/guard.mjs
13581
- function IsObject2(value) {
13582
- return value !== null && typeof value === "object";
13583
- }
13584
- function IsArray2(value) {
13585
- return globalThis.Array.isArray(value) && !globalThis.ArrayBuffer.isView(value);
13586
- }
13587
- function IsUndefined2(value) {
13588
- return value === void 0;
13589
- }
13590
- function IsNumber2(value) {
13591
- return typeof value === "number";
13592
- }
13593
-
13594
- // ../../node_modules/@sinclair/typebox/build/esm/system/policy.mjs
13595
- var TypeSystemPolicy;
13596
- (function(TypeSystemPolicy2) {
13597
- TypeSystemPolicy2.InstanceMode = "default";
13598
- TypeSystemPolicy2.ExactOptionalPropertyTypes = false;
13599
- TypeSystemPolicy2.AllowArrayObject = false;
13600
- TypeSystemPolicy2.AllowNaN = false;
13601
- TypeSystemPolicy2.AllowNullVoid = false;
13602
- function IsExactOptionalProperty(value, key) {
13603
- return TypeSystemPolicy2.ExactOptionalPropertyTypes ? key in value : value[key] !== void 0;
13604
- }
13605
- TypeSystemPolicy2.IsExactOptionalProperty = IsExactOptionalProperty;
13606
- function IsObjectLike(value) {
13607
- const isObject = IsObject2(value);
13608
- return TypeSystemPolicy2.AllowArrayObject ? isObject : isObject && !IsArray2(value);
13609
- }
13610
- TypeSystemPolicy2.IsObjectLike = IsObjectLike;
13611
- function IsRecordLike(value) {
13612
- return IsObjectLike(value) && !(value instanceof Date) && !(value instanceof Uint8Array);
13613
- }
13614
- TypeSystemPolicy2.IsRecordLike = IsRecordLike;
13615
- function IsNumberLike(value) {
13616
- return TypeSystemPolicy2.AllowNaN ? IsNumber2(value) : Number.isFinite(value);
13617
- }
13618
- TypeSystemPolicy2.IsNumberLike = IsNumberLike;
13619
- function IsVoidLike(value) {
13620
- const isUndefined = IsUndefined2(value);
13621
- return TypeSystemPolicy2.AllowNullVoid ? isUndefined || value === null : isUndefined;
13622
- }
13623
- TypeSystemPolicy2.IsVoidLike = IsVoidLike;
13624
- })(TypeSystemPolicy || (TypeSystemPolicy = {}));
13625
-
13626
- // ../../node_modules/@sinclair/typebox/build/esm/type/create/immutable.mjs
13627
- function ImmutableArray(value) {
13628
- return globalThis.Object.freeze(value).map((value2) => Immutable(value2));
13629
- }
13630
- function ImmutableDate(value) {
13631
- return value;
13632
- }
13633
- function ImmutableUint8Array(value) {
13634
- return value;
13635
- }
13636
- function ImmutableRegExp(value) {
13637
- return value;
13638
- }
13639
- function ImmutableObject(value) {
13640
- const result = {};
13641
- for (const key of Object.getOwnPropertyNames(value)) {
13642
- result[key] = Immutable(value[key]);
13643
- }
13644
- for (const key of Object.getOwnPropertySymbols(value)) {
13645
- result[key] = Immutable(value[key]);
13646
- }
13647
- return globalThis.Object.freeze(result);
13648
- }
13649
- function Immutable(value) {
13650
- return IsArray(value) ? ImmutableArray(value) : IsDate(value) ? ImmutableDate(value) : IsUint8Array(value) ? ImmutableUint8Array(value) : IsRegExp(value) ? ImmutableRegExp(value) : IsObject(value) ? ImmutableObject(value) : value;
13651
- }
13652
-
13653
- // ../../node_modules/@sinclair/typebox/build/esm/type/create/type.mjs
13654
- function CreateType(schema, options) {
13655
- const result = options !== void 0 ? { ...options, ...schema } : schema;
13656
- switch (TypeSystemPolicy.InstanceMode) {
13657
- case "freeze":
13658
- return Immutable(result);
13659
- case "clone":
13660
- return Clone(result);
13661
- default:
13662
- return result;
13663
- }
13664
- }
13665
-
13666
- // ../../node_modules/@sinclair/typebox/build/esm/type/error/error.mjs
13667
- var TypeBoxError = class extends Error {
13668
- constructor(message) {
13669
- super(message);
13670
- }
13671
- };
13672
-
13673
- // ../../node_modules/@sinclair/typebox/build/esm/type/symbols/symbols.mjs
13674
- var TransformKind = Symbol.for("TypeBox.Transform");
13675
- var ReadonlyKind = Symbol.for("TypeBox.Readonly");
13676
- var OptionalKind = Symbol.for("TypeBox.Optional");
13677
- var Hint = Symbol.for("TypeBox.Hint");
13678
- var Kind = Symbol.for("TypeBox.Kind");
13679
-
13680
- // ../../node_modules/@sinclair/typebox/build/esm/type/guard/kind.mjs
13681
- function IsReadonly(value) {
13682
- return IsObject(value) && value[ReadonlyKind] === "Readonly";
13683
- }
13684
- function IsOptional(value) {
13685
- return IsObject(value) && value[OptionalKind] === "Optional";
13686
- }
13687
- function IsAny(value) {
13688
- return IsKindOf(value, "Any");
13689
- }
13690
- function IsArgument(value) {
13691
- return IsKindOf(value, "Argument");
13692
- }
13693
- function IsArray3(value) {
13694
- return IsKindOf(value, "Array");
13695
- }
13696
- function IsAsyncIterator2(value) {
13697
- return IsKindOf(value, "AsyncIterator");
13698
- }
13699
- function IsBigInt2(value) {
13700
- return IsKindOf(value, "BigInt");
13701
- }
13702
- function IsBoolean2(value) {
13703
- return IsKindOf(value, "Boolean");
13704
- }
13705
- function IsComputed(value) {
13706
- return IsKindOf(value, "Computed");
13707
- }
13708
- function IsConstructor(value) {
13709
- return IsKindOf(value, "Constructor");
13710
- }
13711
- function IsDate2(value) {
13712
- return IsKindOf(value, "Date");
13713
- }
13714
- function IsFunction2(value) {
13715
- return IsKindOf(value, "Function");
13716
- }
13717
- function IsInteger(value) {
13718
- return IsKindOf(value, "Integer");
13719
- }
13720
- function IsIntersect(value) {
13721
- return IsKindOf(value, "Intersect");
13722
- }
13723
- function IsIterator2(value) {
13724
- return IsKindOf(value, "Iterator");
13725
- }
13726
- function IsKindOf(value, kind) {
13727
- return IsObject(value) && Kind in value && value[Kind] === kind;
13728
- }
13729
- function IsLiteralValue(value) {
13730
- return IsBoolean(value) || IsNumber(value) || IsString(value);
13731
- }
13732
- function IsLiteral(value) {
13733
- return IsKindOf(value, "Literal");
13734
- }
13735
- function IsMappedKey(value) {
13736
- return IsKindOf(value, "MappedKey");
13737
- }
13738
- function IsMappedResult(value) {
13739
- return IsKindOf(value, "MappedResult");
13740
- }
13741
- function IsNever(value) {
13742
- return IsKindOf(value, "Never");
13743
- }
13744
- function IsNot(value) {
13745
- return IsKindOf(value, "Not");
13746
- }
13747
- function IsNull2(value) {
13748
- return IsKindOf(value, "Null");
13749
- }
13750
- function IsNumber3(value) {
13751
- return IsKindOf(value, "Number");
13752
- }
13753
- function IsObject3(value) {
13754
- return IsKindOf(value, "Object");
13755
- }
13756
- function IsPromise(value) {
13757
- return IsKindOf(value, "Promise");
13758
- }
13759
- function IsRecord(value) {
13760
- return IsKindOf(value, "Record");
13761
- }
13762
- function IsRef(value) {
13763
- return IsKindOf(value, "Ref");
13764
- }
13765
- function IsRegExp2(value) {
13766
- return IsKindOf(value, "RegExp");
13767
- }
13768
- function IsString2(value) {
13769
- return IsKindOf(value, "String");
13770
- }
13771
- function IsSymbol2(value) {
13772
- return IsKindOf(value, "Symbol");
13773
- }
13774
- function IsTemplateLiteral(value) {
13775
- return IsKindOf(value, "TemplateLiteral");
13776
- }
13777
- function IsThis(value) {
13778
- return IsKindOf(value, "This");
13779
- }
13780
- function IsTransform(value) {
13781
- return IsObject(value) && TransformKind in value;
13782
- }
13783
- function IsTuple(value) {
13784
- return IsKindOf(value, "Tuple");
13785
- }
13786
- function IsUndefined3(value) {
13787
- return IsKindOf(value, "Undefined");
13788
- }
13789
- function IsUnion(value) {
13790
- return IsKindOf(value, "Union");
13791
- }
13792
- function IsUint8Array2(value) {
13793
- return IsKindOf(value, "Uint8Array");
13794
- }
13795
- function IsUnknown(value) {
13796
- return IsKindOf(value, "Unknown");
13797
- }
13798
- function IsUnsafe(value) {
13799
- return IsKindOf(value, "Unsafe");
13800
- }
13801
- function IsVoid(value) {
13802
- return IsKindOf(value, "Void");
13803
- }
13804
- function IsKind(value) {
13805
- return IsObject(value) && Kind in value && IsString(value[Kind]);
13806
- }
13807
- function IsSchema(value) {
13808
- 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);
13809
- }
13810
-
13811
- // ../../node_modules/@sinclair/typebox/build/esm/type/guard/type.mjs
13812
- var type_exports = {};
13813
- __export(type_exports, {
13814
- IsAny: () => IsAny2,
13815
- IsArgument: () => IsArgument2,
13816
- IsArray: () => IsArray4,
13817
- IsAsyncIterator: () => IsAsyncIterator3,
13818
- IsBigInt: () => IsBigInt3,
13819
- IsBoolean: () => IsBoolean3,
13820
- IsComputed: () => IsComputed2,
13821
- IsConstructor: () => IsConstructor2,
13822
- IsDate: () => IsDate3,
13823
- IsFunction: () => IsFunction3,
13824
- IsImport: () => IsImport,
13825
- IsInteger: () => IsInteger2,
13826
- IsIntersect: () => IsIntersect2,
13827
- IsIterator: () => IsIterator3,
13828
- IsKind: () => IsKind2,
13829
- IsKindOf: () => IsKindOf2,
13830
- IsLiteral: () => IsLiteral2,
13831
- IsLiteralBoolean: () => IsLiteralBoolean,
13832
- IsLiteralNumber: () => IsLiteralNumber,
13833
- IsLiteralString: () => IsLiteralString,
13834
- IsLiteralValue: () => IsLiteralValue2,
13835
- IsMappedKey: () => IsMappedKey2,
13836
- IsMappedResult: () => IsMappedResult2,
13837
- IsNever: () => IsNever2,
13838
- IsNot: () => IsNot2,
13839
- IsNull: () => IsNull3,
13840
- IsNumber: () => IsNumber4,
13841
- IsObject: () => IsObject4,
13842
- IsOptional: () => IsOptional2,
13843
- IsPromise: () => IsPromise2,
13844
- IsProperties: () => IsProperties,
13845
- IsReadonly: () => IsReadonly2,
13846
- IsRecord: () => IsRecord2,
13847
- IsRecursive: () => IsRecursive,
13848
- IsRef: () => IsRef2,
13849
- IsRegExp: () => IsRegExp3,
13850
- IsSchema: () => IsSchema2,
13851
- IsString: () => IsString3,
13852
- IsSymbol: () => IsSymbol3,
13853
- IsTemplateLiteral: () => IsTemplateLiteral2,
13854
- IsThis: () => IsThis2,
13855
- IsTransform: () => IsTransform2,
13856
- IsTuple: () => IsTuple2,
13857
- IsUint8Array: () => IsUint8Array3,
13858
- IsUndefined: () => IsUndefined4,
13859
- IsUnion: () => IsUnion2,
13860
- IsUnionLiteral: () => IsUnionLiteral,
13861
- IsUnknown: () => IsUnknown2,
13862
- IsUnsafe: () => IsUnsafe2,
13863
- IsVoid: () => IsVoid2,
13864
- TypeGuardUnknownTypeError: () => TypeGuardUnknownTypeError
13865
- });
13866
- var TypeGuardUnknownTypeError = class extends TypeBoxError {
13867
- };
13868
- var KnownTypes = [
13869
- "Argument",
13870
- "Any",
13871
- "Array",
13872
- "AsyncIterator",
13873
- "BigInt",
13874
- "Boolean",
13875
- "Computed",
13876
- "Constructor",
13877
- "Date",
13878
- "Enum",
13879
- "Function",
13880
- "Integer",
13881
- "Intersect",
13882
- "Iterator",
13883
- "Literal",
13884
- "MappedKey",
13885
- "MappedResult",
13886
- "Not",
13887
- "Null",
13888
- "Number",
13889
- "Object",
13890
- "Promise",
13891
- "Record",
13892
- "Ref",
13893
- "RegExp",
13894
- "String",
13895
- "Symbol",
13896
- "TemplateLiteral",
13897
- "This",
13898
- "Tuple",
13899
- "Undefined",
13900
- "Union",
13901
- "Uint8Array",
13902
- "Unknown",
13903
- "Void"
13472
+ // ../plays/authoring-contract.ts
13473
+ var import_typebox = require("@sinclair/typebox");
13474
+ var import_value = require("@sinclair/typebox/value");
13475
+ var PLAY_SQL_LISTENER_WHERE_OPERATORS = [
13476
+ "eq",
13477
+ "neq",
13478
+ "in",
13479
+ "notIn",
13480
+ "isNull",
13481
+ "isNotNull",
13482
+ "ilike"
13904
13483
  ];
13905
- function IsPattern(value) {
13906
- try {
13907
- new RegExp(value);
13908
- return true;
13909
- } catch {
13910
- return false;
13911
- }
13912
- }
13913
- function IsControlCharacterFree(value) {
13914
- if (!IsString(value))
13915
- return false;
13916
- for (let i = 0; i < value.length; i++) {
13917
- const code = value.charCodeAt(i);
13918
- if (code >= 7 && code <= 13 || code === 27 || code === 127) {
13919
- return false;
13920
- }
13921
- }
13922
- return true;
13923
- }
13924
- function IsAdditionalProperties(value) {
13925
- return IsOptionalBoolean(value) || IsSchema2(value);
13926
- }
13927
- function IsOptionalBigInt(value) {
13928
- return IsUndefined(value) || IsBigInt(value);
13929
- }
13930
- function IsOptionalNumber(value) {
13931
- return IsUndefined(value) || IsNumber(value);
13932
- }
13933
- function IsOptionalBoolean(value) {
13934
- return IsUndefined(value) || IsBoolean(value);
13935
- }
13936
- function IsOptionalString(value) {
13937
- return IsUndefined(value) || IsString(value);
13938
- }
13939
- function IsOptionalPattern(value) {
13940
- return IsUndefined(value) || IsString(value) && IsControlCharacterFree(value) && IsPattern(value);
13941
- }
13942
- function IsOptionalFormat(value) {
13943
- return IsUndefined(value) || IsString(value) && IsControlCharacterFree(value);
13944
- }
13945
- function IsOptionalSchema(value) {
13946
- return IsUndefined(value) || IsSchema2(value);
13947
- }
13948
- function IsReadonly2(value) {
13949
- return IsObject(value) && value[ReadonlyKind] === "Readonly";
13950
- }
13951
- function IsOptional2(value) {
13952
- return IsObject(value) && value[OptionalKind] === "Optional";
13953
- }
13954
- function IsAny2(value) {
13955
- return IsKindOf2(value, "Any") && IsOptionalString(value.$id);
13956
- }
13957
- function IsArgument2(value) {
13958
- return IsKindOf2(value, "Argument") && IsNumber(value.index);
13959
- }
13960
- function IsArray4(value) {
13961
- 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);
13962
- }
13963
- function IsAsyncIterator3(value) {
13964
- return IsKindOf2(value, "AsyncIterator") && value.type === "AsyncIterator" && IsOptionalString(value.$id) && IsSchema2(value.items);
13965
- }
13966
- function IsBigInt3(value) {
13967
- 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);
13968
- }
13969
- function IsBoolean3(value) {
13970
- return IsKindOf2(value, "Boolean") && value.type === "boolean" && IsOptionalString(value.$id);
13971
- }
13972
- function IsComputed2(value) {
13973
- return IsKindOf2(value, "Computed") && IsString(value.target) && IsArray(value.parameters) && value.parameters.every((schema) => IsSchema2(schema));
13974
- }
13975
- function IsConstructor2(value) {
13976
- return IsKindOf2(value, "Constructor") && value.type === "Constructor" && IsOptionalString(value.$id) && IsArray(value.parameters) && value.parameters.every((schema) => IsSchema2(schema)) && IsSchema2(value.returns);
13977
- }
13978
- function IsDate3(value) {
13979
- 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);
13980
- }
13981
- function IsFunction3(value) {
13982
- return IsKindOf2(value, "Function") && value.type === "Function" && IsOptionalString(value.$id) && IsArray(value.parameters) && value.parameters.every((schema) => IsSchema2(schema)) && IsSchema2(value.returns);
13983
- }
13984
- function IsImport(value) {
13985
- return IsKindOf2(value, "Import") && HasPropertyKey(value, "$defs") && IsObject(value.$defs) && IsProperties(value.$defs) && HasPropertyKey(value, "$ref") && IsString(value.$ref) && value.$ref in value.$defs;
13986
- }
13987
- function IsInteger2(value) {
13988
- 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);
13989
- }
13990
- function IsProperties(value) {
13991
- return IsObject(value) && Object.entries(value).every(([key, schema]) => IsControlCharacterFree(key) && IsSchema2(schema));
13992
- }
13993
- function IsIntersect2(value) {
13994
- 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);
13995
- }
13996
- function IsIterator3(value) {
13997
- return IsKindOf2(value, "Iterator") && value.type === "Iterator" && IsOptionalString(value.$id) && IsSchema2(value.items);
13998
- }
13999
- function IsKindOf2(value, kind) {
14000
- return IsObject(value) && Kind in value && value[Kind] === kind;
14001
- }
14002
- function IsLiteralString(value) {
14003
- return IsLiteral2(value) && IsString(value.const);
14004
- }
14005
- function IsLiteralNumber(value) {
14006
- return IsLiteral2(value) && IsNumber(value.const);
14007
- }
14008
- function IsLiteralBoolean(value) {
14009
- return IsLiteral2(value) && IsBoolean(value.const);
14010
- }
14011
- function IsLiteral2(value) {
14012
- return IsKindOf2(value, "Literal") && IsOptionalString(value.$id) && IsLiteralValue2(value.const);
14013
- }
14014
- function IsLiteralValue2(value) {
14015
- return IsBoolean(value) || IsNumber(value) || IsString(value);
14016
- }
14017
- function IsMappedKey2(value) {
14018
- return IsKindOf2(value, "MappedKey") && IsArray(value.keys) && value.keys.every((key) => IsNumber(key) || IsString(key));
14019
- }
14020
- function IsMappedResult2(value) {
14021
- return IsKindOf2(value, "MappedResult") && IsProperties(value.properties);
14022
- }
14023
- function IsNever2(value) {
14024
- return IsKindOf2(value, "Never") && IsObject(value.not) && Object.getOwnPropertyNames(value.not).length === 0;
14025
- }
14026
- function IsNot2(value) {
14027
- return IsKindOf2(value, "Not") && IsSchema2(value.not);
14028
- }
14029
- function IsNull3(value) {
14030
- return IsKindOf2(value, "Null") && value.type === "null" && IsOptionalString(value.$id);
14031
- }
14032
- function IsNumber4(value) {
14033
- 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);
14034
- }
14035
- function IsObject4(value) {
14036
- return IsKindOf2(value, "Object") && value.type === "object" && IsOptionalString(value.$id) && IsProperties(value.properties) && IsAdditionalProperties(value.additionalProperties) && IsOptionalNumber(value.minProperties) && IsOptionalNumber(value.maxProperties);
14037
- }
14038
- function IsPromise2(value) {
14039
- return IsKindOf2(value, "Promise") && value.type === "Promise" && IsOptionalString(value.$id) && IsSchema2(value.item);
14040
- }
14041
- function IsRecord2(value) {
14042
- return IsKindOf2(value, "Record") && value.type === "object" && IsOptionalString(value.$id) && IsAdditionalProperties(value.additionalProperties) && IsObject(value.patternProperties) && ((schema) => {
14043
- const keys = Object.getOwnPropertyNames(schema.patternProperties);
14044
- return keys.length === 1 && IsPattern(keys[0]) && IsObject(schema.patternProperties) && IsSchema2(schema.patternProperties[keys[0]]);
14045
- })(value);
14046
- }
14047
- function IsRecursive(value) {
14048
- return IsObject(value) && Hint in value && value[Hint] === "Recursive";
14049
- }
14050
- function IsRef2(value) {
14051
- return IsKindOf2(value, "Ref") && IsOptionalString(value.$id) && IsString(value.$ref);
14052
- }
14053
- function IsRegExp3(value) {
14054
- return IsKindOf2(value, "RegExp") && IsOptionalString(value.$id) && IsString(value.source) && IsString(value.flags) && IsOptionalNumber(value.maxLength) && IsOptionalNumber(value.minLength);
14055
- }
14056
- function IsString3(value) {
14057
- return IsKindOf2(value, "String") && value.type === "string" && IsOptionalString(value.$id) && IsOptionalNumber(value.minLength) && IsOptionalNumber(value.maxLength) && IsOptionalPattern(value.pattern) && IsOptionalFormat(value.format);
14058
- }
14059
- function IsSymbol3(value) {
14060
- return IsKindOf2(value, "Symbol") && value.type === "symbol" && IsOptionalString(value.$id);
14061
- }
14062
- function IsTemplateLiteral2(value) {
14063
- return IsKindOf2(value, "TemplateLiteral") && value.type === "string" && IsString(value.pattern) && value.pattern[0] === "^" && value.pattern[value.pattern.length - 1] === "$";
14064
- }
14065
- function IsThis2(value) {
14066
- return IsKindOf2(value, "This") && IsOptionalString(value.$id) && IsString(value.$ref);
14067
- }
14068
- function IsTransform2(value) {
14069
- return IsObject(value) && TransformKind in value;
14070
- }
14071
- function IsTuple2(value) {
14072
- return IsKindOf2(value, "Tuple") && value.type === "array" && IsOptionalString(value.$id) && IsNumber(value.minItems) && IsNumber(value.maxItems) && value.minItems === value.maxItems && // empty
14073
- (IsUndefined(value.items) && IsUndefined(value.additionalItems) && value.minItems === 0 || IsArray(value.items) && value.items.every((schema) => IsSchema2(schema)));
14074
- }
14075
- function IsUndefined4(value) {
14076
- return IsKindOf2(value, "Undefined") && value.type === "undefined" && IsOptionalString(value.$id);
14077
- }
14078
- function IsUnionLiteral(value) {
14079
- return IsUnion2(value) && value.anyOf.every((schema) => IsLiteralString(schema) || IsLiteralNumber(schema));
14080
- }
14081
- function IsUnion2(value) {
14082
- return IsKindOf2(value, "Union") && IsOptionalString(value.$id) && IsObject(value) && IsArray(value.anyOf) && value.anyOf.every((schema) => IsSchema2(schema));
14083
- }
14084
- function IsUint8Array3(value) {
14085
- return IsKindOf2(value, "Uint8Array") && value.type === "Uint8Array" && IsOptionalString(value.$id) && IsOptionalNumber(value.minByteLength) && IsOptionalNumber(value.maxByteLength);
14086
- }
14087
- function IsUnknown2(value) {
14088
- return IsKindOf2(value, "Unknown") && IsOptionalString(value.$id);
14089
- }
14090
- function IsUnsafe2(value) {
14091
- return IsKindOf2(value, "Unsafe");
14092
- }
14093
- function IsVoid2(value) {
14094
- return IsKindOf2(value, "Void") && value.type === "void" && IsOptionalString(value.$id);
14095
- }
14096
- function IsKind2(value) {
14097
- return IsObject(value) && Kind in value && IsString(value[Kind]) && !KnownTypes.includes(value[Kind]);
14098
- }
14099
- function IsSchema2(value) {
14100
- 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));
14101
- }
14102
-
14103
- // ../../node_modules/@sinclair/typebox/build/esm/type/patterns/patterns.mjs
14104
- var PatternBoolean = "(true|false)";
14105
- var PatternNumber = "(0|[1-9][0-9]*)";
14106
- var PatternString = "(.*)";
14107
- var PatternNever = "(?!.*)";
14108
- var PatternBooleanExact = `^${PatternBoolean}$`;
14109
- var PatternNumberExact = `^${PatternNumber}$`;
14110
- var PatternStringExact = `^${PatternString}$`;
14111
- var PatternNeverExact = `^${PatternNever}$`;
14112
-
14113
- // ../../node_modules/@sinclair/typebox/build/esm/type/sets/set.mjs
14114
- function SetIncludes(T, S) {
14115
- return T.includes(S);
14116
- }
14117
- function SetDistinct(T) {
14118
- return [...new Set(T)];
14119
- }
14120
- function SetIntersect(T, S) {
14121
- return T.filter((L) => S.includes(L));
14122
- }
14123
- function SetIntersectManyResolve(T, Init) {
14124
- return T.reduce((Acc, L) => {
14125
- return SetIntersect(Acc, L);
14126
- }, Init);
14127
- }
14128
- function SetIntersectMany(T) {
14129
- return T.length === 1 ? T[0] : T.length > 1 ? SetIntersectManyResolve(T.slice(1), T[0]) : [];
14130
- }
14131
- function SetUnionMany(T) {
14132
- const Acc = [];
14133
- for (const L of T)
14134
- Acc.push(...L);
14135
- return Acc;
14136
- }
14137
-
14138
- // ../../node_modules/@sinclair/typebox/build/esm/type/any/any.mjs
14139
- function Any(options) {
14140
- return CreateType({ [Kind]: "Any" }, options);
14141
- }
14142
-
14143
- // ../../node_modules/@sinclair/typebox/build/esm/type/array/array.mjs
14144
- function Array2(items, options) {
14145
- return CreateType({ [Kind]: "Array", type: "array", items }, options);
14146
- }
14147
-
14148
- // ../../node_modules/@sinclair/typebox/build/esm/type/argument/argument.mjs
14149
- function Argument(index) {
14150
- return CreateType({ [Kind]: "Argument", index });
14151
- }
14152
-
14153
- // ../../node_modules/@sinclair/typebox/build/esm/type/async-iterator/async-iterator.mjs
14154
- function AsyncIterator(items, options) {
14155
- return CreateType({ [Kind]: "AsyncIterator", type: "AsyncIterator", items }, options);
14156
- }
14157
-
14158
- // ../../node_modules/@sinclair/typebox/build/esm/type/computed/computed.mjs
14159
- function Computed(target, parameters, options) {
14160
- return CreateType({ [Kind]: "Computed", target, parameters }, options);
14161
- }
14162
-
14163
- // ../../node_modules/@sinclair/typebox/build/esm/type/discard/discard.mjs
14164
- function DiscardKey(value, key) {
14165
- const { [key]: _, ...rest } = value;
14166
- return rest;
14167
- }
14168
- function Discard(value, keys) {
14169
- return keys.reduce((acc, key) => DiscardKey(acc, key), value);
14170
- }
14171
-
14172
- // ../../node_modules/@sinclair/typebox/build/esm/type/never/never.mjs
14173
- function Never(options) {
14174
- return CreateType({ [Kind]: "Never", not: {} }, options);
14175
- }
14176
-
14177
- // ../../node_modules/@sinclair/typebox/build/esm/type/mapped/mapped-result.mjs
14178
- function MappedResult(properties) {
14179
- return CreateType({
14180
- [Kind]: "MappedResult",
14181
- properties
14182
- });
14183
- }
14184
-
14185
- // ../../node_modules/@sinclair/typebox/build/esm/type/constructor/constructor.mjs
14186
- function Constructor(parameters, returns, options) {
14187
- return CreateType({ [Kind]: "Constructor", type: "Constructor", parameters, returns }, options);
14188
- }
14189
-
14190
- // ../../node_modules/@sinclair/typebox/build/esm/type/function/function.mjs
14191
- function Function2(parameters, returns, options) {
14192
- return CreateType({ [Kind]: "Function", type: "Function", parameters, returns }, options);
14193
- }
14194
-
14195
- // ../../node_modules/@sinclair/typebox/build/esm/type/union/union-create.mjs
14196
- function UnionCreate(T, options) {
14197
- return CreateType({ [Kind]: "Union", anyOf: T }, options);
14198
- }
14199
-
14200
- // ../../node_modules/@sinclair/typebox/build/esm/type/union/union-evaluated.mjs
14201
- function IsUnionOptional(types) {
14202
- return types.some((type) => IsOptional(type));
14203
- }
14204
- function RemoveOptionalFromRest(types) {
14205
- return types.map((left) => IsOptional(left) ? RemoveOptionalFromType(left) : left);
14206
- }
14207
- function RemoveOptionalFromType(T) {
14208
- return Discard(T, [OptionalKind]);
14209
- }
14210
- function ResolveUnion(types, options) {
14211
- const isOptional = IsUnionOptional(types);
14212
- return isOptional ? Optional(UnionCreate(RemoveOptionalFromRest(types), options)) : UnionCreate(RemoveOptionalFromRest(types), options);
14213
- }
14214
- function UnionEvaluated(T, options) {
14215
- return T.length === 1 ? CreateType(T[0], options) : T.length === 0 ? Never(options) : ResolveUnion(T, options);
14216
- }
14217
-
14218
- // ../../node_modules/@sinclair/typebox/build/esm/type/union/union.mjs
14219
- function Union(types, options) {
14220
- return types.length === 0 ? Never(options) : types.length === 1 ? CreateType(types[0], options) : UnionCreate(types, options);
14221
- }
14222
-
14223
- // ../../node_modules/@sinclair/typebox/build/esm/type/template-literal/parse.mjs
14224
- var TemplateLiteralParserError = class extends TypeBoxError {
14225
- };
14226
- function Unescape(pattern) {
14227
- return pattern.replace(/\\\$/g, "$").replace(/\\\*/g, "*").replace(/\\\^/g, "^").replace(/\\\|/g, "|").replace(/\\\(/g, "(").replace(/\\\)/g, ")");
14228
- }
14229
- function IsNonEscaped(pattern, index, char) {
14230
- return pattern[index] === char && pattern.charCodeAt(index - 1) !== 92;
14231
- }
14232
- function IsOpenParen(pattern, index) {
14233
- return IsNonEscaped(pattern, index, "(");
14234
- }
14235
- function IsCloseParen(pattern, index) {
14236
- return IsNonEscaped(pattern, index, ")");
14237
- }
14238
- function IsSeparator(pattern, index) {
14239
- return IsNonEscaped(pattern, index, "|");
14240
- }
14241
- function IsGroup(pattern) {
14242
- if (!(IsOpenParen(pattern, 0) && IsCloseParen(pattern, pattern.length - 1)))
14243
- return false;
14244
- let count = 0;
14245
- for (let index = 0; index < pattern.length; index++) {
14246
- if (IsOpenParen(pattern, index))
14247
- count += 1;
14248
- if (IsCloseParen(pattern, index))
14249
- count -= 1;
14250
- if (count === 0 && index !== pattern.length - 1)
14251
- return false;
14252
- }
14253
- return true;
14254
- }
14255
- function InGroup(pattern) {
14256
- return pattern.slice(1, pattern.length - 1);
14257
- }
14258
- function IsPrecedenceOr(pattern) {
14259
- let count = 0;
14260
- for (let index = 0; index < pattern.length; index++) {
14261
- if (IsOpenParen(pattern, index))
14262
- count += 1;
14263
- if (IsCloseParen(pattern, index))
14264
- count -= 1;
14265
- if (IsSeparator(pattern, index) && count === 0)
14266
- return true;
14267
- }
14268
- return false;
14269
- }
14270
- function IsPrecedenceAnd(pattern) {
14271
- for (let index = 0; index < pattern.length; index++) {
14272
- if (IsOpenParen(pattern, index))
14273
- return true;
14274
- }
14275
- return false;
14276
- }
14277
- function Or(pattern) {
14278
- let [count, start] = [0, 0];
14279
- const expressions = [];
14280
- for (let index = 0; index < pattern.length; index++) {
14281
- if (IsOpenParen(pattern, index))
14282
- count += 1;
14283
- if (IsCloseParen(pattern, index))
14284
- count -= 1;
14285
- if (IsSeparator(pattern, index) && count === 0) {
14286
- const range2 = pattern.slice(start, index);
14287
- if (range2.length > 0)
14288
- expressions.push(TemplateLiteralParse(range2));
14289
- start = index + 1;
14290
- }
14291
- }
14292
- const range = pattern.slice(start);
14293
- if (range.length > 0)
14294
- expressions.push(TemplateLiteralParse(range));
14295
- if (expressions.length === 0)
14296
- return { type: "const", const: "" };
14297
- if (expressions.length === 1)
14298
- return expressions[0];
14299
- return { type: "or", expr: expressions };
14300
- }
14301
- function And(pattern) {
14302
- function Group(value, index) {
14303
- if (!IsOpenParen(value, index))
14304
- throw new TemplateLiteralParserError(`TemplateLiteralParser: Index must point to open parens`);
14305
- let count = 0;
14306
- for (let scan = index; scan < value.length; scan++) {
14307
- if (IsOpenParen(value, scan))
14308
- count += 1;
14309
- if (IsCloseParen(value, scan))
14310
- count -= 1;
14311
- if (count === 0)
14312
- return [index, scan];
14313
- }
14314
- throw new TemplateLiteralParserError(`TemplateLiteralParser: Unclosed group parens in expression`);
14315
- }
14316
- function Range(pattern2, index) {
14317
- for (let scan = index; scan < pattern2.length; scan++) {
14318
- if (IsOpenParen(pattern2, scan))
14319
- return [index, scan];
14320
- }
14321
- return [index, pattern2.length];
14322
- }
14323
- const expressions = [];
14324
- for (let index = 0; index < pattern.length; index++) {
14325
- if (IsOpenParen(pattern, index)) {
14326
- const [start, end] = Group(pattern, index);
14327
- const range = pattern.slice(start, end + 1);
14328
- expressions.push(TemplateLiteralParse(range));
14329
- index = end;
14330
- } else {
14331
- const [start, end] = Range(pattern, index);
14332
- const range = pattern.slice(start, end);
14333
- if (range.length > 0)
14334
- expressions.push(TemplateLiteralParse(range));
14335
- index = end - 1;
14336
- }
14337
- }
14338
- return expressions.length === 0 ? { type: "const", const: "" } : expressions.length === 1 ? expressions[0] : { type: "and", expr: expressions };
14339
- }
14340
- function TemplateLiteralParse(pattern) {
14341
- return IsGroup(pattern) ? TemplateLiteralParse(InGroup(pattern)) : IsPrecedenceOr(pattern) ? Or(pattern) : IsPrecedenceAnd(pattern) ? And(pattern) : { type: "const", const: Unescape(pattern) };
14342
- }
14343
- function TemplateLiteralParseExact(pattern) {
14344
- return TemplateLiteralParse(pattern.slice(1, pattern.length - 1));
14345
- }
14346
-
14347
- // ../../node_modules/@sinclair/typebox/build/esm/type/template-literal/finite.mjs
14348
- var TemplateLiteralFiniteError = class extends TypeBoxError {
14349
- };
14350
- function IsNumberExpression(expression) {
14351
- 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]*";
14352
- }
14353
- function IsBooleanExpression(expression) {
14354
- 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";
14355
- }
14356
- function IsStringExpression(expression) {
14357
- return expression.type === "const" && expression.const === ".*";
14358
- }
14359
- function IsTemplateLiteralExpressionFinite(expression) {
14360
- 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 : (() => {
14361
- throw new TemplateLiteralFiniteError(`Unknown expression type`);
14362
- })();
14363
- }
14364
- function IsTemplateLiteralFinite(schema) {
14365
- const expression = TemplateLiteralParseExact(schema.pattern);
14366
- return IsTemplateLiteralExpressionFinite(expression);
14367
- }
14368
-
14369
- // ../../node_modules/@sinclair/typebox/build/esm/type/template-literal/generate.mjs
14370
- var TemplateLiteralGenerateError = class extends TypeBoxError {
14371
- };
14372
- function* GenerateReduce(buffer) {
14373
- if (buffer.length === 1)
14374
- return yield* buffer[0];
14375
- for (const left of buffer[0]) {
14376
- for (const right of GenerateReduce(buffer.slice(1))) {
14377
- yield `${left}${right}`;
14378
- }
14379
- }
14380
- }
14381
- function* GenerateAnd(expression) {
14382
- return yield* GenerateReduce(expression.expr.map((expr) => [...TemplateLiteralExpressionGenerate(expr)]));
14383
- }
14384
- function* GenerateOr(expression) {
14385
- for (const expr of expression.expr)
14386
- yield* TemplateLiteralExpressionGenerate(expr);
14387
- }
14388
- function* GenerateConst(expression) {
14389
- return yield expression.const;
14390
- }
14391
- function* TemplateLiteralExpressionGenerate(expression) {
14392
- return expression.type === "and" ? yield* GenerateAnd(expression) : expression.type === "or" ? yield* GenerateOr(expression) : expression.type === "const" ? yield* GenerateConst(expression) : (() => {
14393
- throw new TemplateLiteralGenerateError("Unknown expression");
14394
- })();
14395
- }
14396
- function TemplateLiteralGenerate(schema) {
14397
- const expression = TemplateLiteralParseExact(schema.pattern);
14398
- return IsTemplateLiteralExpressionFinite(expression) ? [...TemplateLiteralExpressionGenerate(expression)] : [];
14399
- }
14400
-
14401
- // ../../node_modules/@sinclair/typebox/build/esm/type/literal/literal.mjs
14402
- function Literal(value, options) {
14403
- return CreateType({
14404
- [Kind]: "Literal",
14405
- const: value,
14406
- type: typeof value
14407
- }, options);
14408
- }
14409
-
14410
- // ../../node_modules/@sinclair/typebox/build/esm/type/boolean/boolean.mjs
14411
- function Boolean2(options) {
14412
- return CreateType({ [Kind]: "Boolean", type: "boolean" }, options);
14413
- }
14414
-
14415
- // ../../node_modules/@sinclair/typebox/build/esm/type/bigint/bigint.mjs
14416
- function BigInt(options) {
14417
- return CreateType({ [Kind]: "BigInt", type: "bigint" }, options);
14418
- }
14419
-
14420
- // ../../node_modules/@sinclair/typebox/build/esm/type/number/number.mjs
14421
- function Number2(options) {
14422
- return CreateType({ [Kind]: "Number", type: "number" }, options);
14423
- }
14424
-
14425
- // ../../node_modules/@sinclair/typebox/build/esm/type/string/string.mjs
14426
- function String2(options) {
14427
- return CreateType({ [Kind]: "String", type: "string" }, options);
14428
- }
14429
-
14430
- // ../../node_modules/@sinclair/typebox/build/esm/type/template-literal/syntax.mjs
14431
- function* FromUnion(syntax) {
14432
- const trim = syntax.trim().replace(/"|'/g, "");
14433
- return trim === "boolean" ? yield Boolean2() : trim === "number" ? yield Number2() : trim === "bigint" ? yield BigInt() : trim === "string" ? yield String2() : yield (() => {
14434
- const literals = trim.split("|").map((literal) => Literal(literal.trim()));
14435
- return literals.length === 0 ? Never() : literals.length === 1 ? literals[0] : UnionEvaluated(literals);
14436
- })();
14437
- }
14438
- function* FromTerminal(syntax) {
14439
- if (syntax[1] !== "{") {
14440
- const L = Literal("$");
14441
- const R = FromSyntax(syntax.slice(1));
14442
- return yield* [L, ...R];
14443
- }
14444
- for (let i = 2; i < syntax.length; i++) {
14445
- if (syntax[i] === "}") {
14446
- const L = FromUnion(syntax.slice(2, i));
14447
- const R = FromSyntax(syntax.slice(i + 1));
14448
- return yield* [...L, ...R];
14449
- }
14450
- }
14451
- yield Literal(syntax);
14452
- }
14453
- function* FromSyntax(syntax) {
14454
- for (let i = 0; i < syntax.length; i++) {
14455
- if (syntax[i] === "$") {
14456
- const L = Literal(syntax.slice(0, i));
14457
- const R = FromTerminal(syntax.slice(i));
14458
- return yield* [L, ...R];
14459
- }
14460
- }
14461
- yield Literal(syntax);
14462
- }
14463
- function TemplateLiteralSyntax(syntax) {
14464
- return [...FromSyntax(syntax)];
14465
- }
14466
-
14467
- // ../../node_modules/@sinclair/typebox/build/esm/type/template-literal/pattern.mjs
14468
- var TemplateLiteralPatternError = class extends TypeBoxError {
14469
- };
14470
- function Escape(value) {
14471
- return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
14472
- }
14473
- function Visit2(schema, acc) {
14474
- 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}` : (() => {
14475
- throw new TemplateLiteralPatternError(`Unexpected Kind '${schema[Kind]}'`);
14476
- })();
14477
- }
14478
- function TemplateLiteralPattern(kinds) {
14479
- return `^${kinds.map((schema) => Visit2(schema, "")).join("")}$`;
14480
- }
14481
-
14482
- // ../../node_modules/@sinclair/typebox/build/esm/type/template-literal/union.mjs
14483
- function TemplateLiteralToUnion(schema) {
14484
- const R = TemplateLiteralGenerate(schema);
14485
- const L = R.map((S) => Literal(S));
14486
- return UnionEvaluated(L);
14487
- }
14488
-
14489
- // ../../node_modules/@sinclair/typebox/build/esm/type/template-literal/template-literal.mjs
14490
- function TemplateLiteral(unresolved, options) {
14491
- const pattern = IsString(unresolved) ? TemplateLiteralPattern(TemplateLiteralSyntax(unresolved)) : TemplateLiteralPattern(unresolved);
14492
- return CreateType({ [Kind]: "TemplateLiteral", type: "string", pattern }, options);
14493
- }
14494
-
14495
- // ../../node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-property-keys.mjs
14496
- function FromTemplateLiteral(templateLiteral) {
14497
- const keys = TemplateLiteralGenerate(templateLiteral);
14498
- return keys.map((key) => key.toString());
14499
- }
14500
- function FromUnion2(types) {
14501
- const result = [];
14502
- for (const type of types)
14503
- result.push(...IndexPropertyKeys(type));
14504
- return result;
14505
- }
14506
- function FromLiteral(literalValue) {
14507
- return [literalValue.toString()];
14508
- }
14509
- function IndexPropertyKeys(type) {
14510
- return [...new Set(IsTemplateLiteral(type) ? FromTemplateLiteral(type) : IsUnion(type) ? FromUnion2(type.anyOf) : IsLiteral(type) ? FromLiteral(type.const) : IsNumber3(type) ? ["[number]"] : IsInteger(type) ? ["[number]"] : [])];
14511
- }
14512
-
14513
- // ../../node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-result.mjs
14514
- function FromProperties(type, properties, options) {
14515
- const result = {};
14516
- for (const K2 of Object.getOwnPropertyNames(properties)) {
14517
- result[K2] = Index(type, IndexPropertyKeys(properties[K2]), options);
14518
- }
14519
- return result;
14520
- }
14521
- function FromMappedResult(type, mappedResult, options) {
14522
- return FromProperties(type, mappedResult.properties, options);
14523
- }
14524
- function IndexFromMappedResult(type, mappedResult, options) {
14525
- const properties = FromMappedResult(type, mappedResult, options);
14526
- return MappedResult(properties);
14527
- }
14528
-
14529
- // ../../node_modules/@sinclair/typebox/build/esm/type/indexed/indexed.mjs
14530
- function FromRest(types, key) {
14531
- return types.map((type) => IndexFromPropertyKey(type, key));
14532
- }
14533
- function FromIntersectRest(types) {
14534
- return types.filter((type) => !IsNever(type));
14535
- }
14536
- function FromIntersect(types, key) {
14537
- return IntersectEvaluated(FromIntersectRest(FromRest(types, key)));
14538
- }
14539
- function FromUnionRest(types) {
14540
- return types.some((L) => IsNever(L)) ? [] : types;
14541
- }
14542
- function FromUnion3(types, key) {
14543
- return UnionEvaluated(FromUnionRest(FromRest(types, key)));
14544
- }
14545
- function FromTuple(types, key) {
14546
- return key in types ? types[key] : key === "[number]" ? UnionEvaluated(types) : Never();
14547
- }
14548
- function FromArray(type, key) {
14549
- return key === "[number]" ? type : Never();
14550
- }
14551
- function FromProperty(properties, propertyKey) {
14552
- return propertyKey in properties ? properties[propertyKey] : Never();
14553
- }
14554
- function IndexFromPropertyKey(type, propertyKey) {
14555
- 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();
14556
- }
14557
- function IndexFromPropertyKeys(type, propertyKeys) {
14558
- return propertyKeys.map((propertyKey) => IndexFromPropertyKey(type, propertyKey));
14559
- }
14560
- function FromSchema(type, propertyKeys) {
14561
- return UnionEvaluated(IndexFromPropertyKeys(type, propertyKeys));
14562
- }
14563
- function Index(type, key, options) {
14564
- if (IsRef(type) || IsRef(key)) {
14565
- const error = `Index types using Ref parameters require both Type and Key to be of TSchema`;
14566
- if (!IsSchema(type) || !IsSchema(key))
14567
- throw new TypeBoxError(error);
14568
- return Computed("Index", [type, key]);
14569
- }
14570
- if (IsMappedResult(key))
14571
- return IndexFromMappedResult(type, key, options);
14572
- if (IsMappedKey(key))
14573
- return IndexFromMappedKey(type, key, options);
14574
- return CreateType(IsSchema(key) ? FromSchema(type, IndexPropertyKeys(key)) : FromSchema(type, key), options);
14575
- }
14576
-
14577
- // ../../node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-key.mjs
14578
- function MappedIndexPropertyKey(type, key, options) {
14579
- return { [key]: Index(type, [key], Clone(options)) };
14580
- }
14581
- function MappedIndexPropertyKeys(type, propertyKeys, options) {
14582
- return propertyKeys.reduce((result, left) => {
14583
- return { ...result, ...MappedIndexPropertyKey(type, left, options) };
14584
- }, {});
14585
- }
14586
- function MappedIndexProperties(type, mappedKey, options) {
14587
- return MappedIndexPropertyKeys(type, mappedKey.keys, options);
14588
- }
14589
- function IndexFromMappedKey(type, mappedKey, options) {
14590
- const properties = MappedIndexProperties(type, mappedKey, options);
14591
- return MappedResult(properties);
14592
- }
14593
-
14594
- // ../../node_modules/@sinclair/typebox/build/esm/type/iterator/iterator.mjs
14595
- function Iterator(items, options) {
14596
- return CreateType({ [Kind]: "Iterator", type: "Iterator", items }, options);
14597
- }
14598
-
14599
- // ../../node_modules/@sinclair/typebox/build/esm/type/object/object.mjs
14600
- function RequiredArray(properties) {
14601
- return globalThis.Object.keys(properties).filter((key) => !IsOptional(properties[key]));
14602
- }
14603
- function _Object(properties, options) {
14604
- const required = RequiredArray(properties);
14605
- const schema = required.length > 0 ? { [Kind]: "Object", type: "object", required, properties } : { [Kind]: "Object", type: "object", properties };
14606
- return CreateType(schema, options);
14607
- }
14608
- var Object2 = _Object;
14609
-
14610
- // ../../node_modules/@sinclair/typebox/build/esm/type/promise/promise.mjs
14611
- function Promise2(item, options) {
14612
- return CreateType({ [Kind]: "Promise", type: "Promise", item }, options);
14613
- }
14614
-
14615
- // ../../node_modules/@sinclair/typebox/build/esm/type/readonly/readonly.mjs
14616
- function RemoveReadonly(schema) {
14617
- return CreateType(Discard(schema, [ReadonlyKind]));
14618
- }
14619
- function AddReadonly(schema) {
14620
- return CreateType({ ...schema, [ReadonlyKind]: "Readonly" });
14621
- }
14622
- function ReadonlyWithFlag(schema, F) {
14623
- return F === false ? RemoveReadonly(schema) : AddReadonly(schema);
14624
- }
14625
- function Readonly(schema, enable) {
14626
- const F = enable ?? true;
14627
- return IsMappedResult(schema) ? ReadonlyFromMappedResult(schema, F) : ReadonlyWithFlag(schema, F);
14628
- }
14629
-
14630
- // ../../node_modules/@sinclair/typebox/build/esm/type/readonly/readonly-from-mapped-result.mjs
14631
- function FromProperties2(K, F) {
14632
- const Acc = {};
14633
- for (const K2 of globalThis.Object.getOwnPropertyNames(K))
14634
- Acc[K2] = Readonly(K[K2], F);
14635
- return Acc;
14636
- }
14637
- function FromMappedResult2(R, F) {
14638
- return FromProperties2(R.properties, F);
14639
- }
14640
- function ReadonlyFromMappedResult(R, F) {
14641
- const P = FromMappedResult2(R, F);
14642
- return MappedResult(P);
14643
- }
14644
-
14645
- // ../../node_modules/@sinclair/typebox/build/esm/type/tuple/tuple.mjs
14646
- function Tuple(types, options) {
14647
- 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);
14648
- }
14649
-
14650
- // ../../node_modules/@sinclair/typebox/build/esm/type/mapped/mapped.mjs
14651
- function FromMappedResult3(K, P) {
14652
- return K in P ? FromSchemaType(K, P[K]) : MappedResult(P);
14653
- }
14654
- function MappedKeyToKnownMappedResultProperties(K) {
14655
- return { [K]: Literal(K) };
14656
- }
14657
- function MappedKeyToUnknownMappedResultProperties(P) {
14658
- const Acc = {};
14659
- for (const L of P)
14660
- Acc[L] = Literal(L);
14661
- return Acc;
14662
- }
14663
- function MappedKeyToMappedResultProperties(K, P) {
14664
- return SetIncludes(P, K) ? MappedKeyToKnownMappedResultProperties(K) : MappedKeyToUnknownMappedResultProperties(P);
14665
- }
14666
- function FromMappedKey(K, P) {
14667
- const R = MappedKeyToMappedResultProperties(K, P);
14668
- return FromMappedResult3(K, R);
14669
- }
14670
- function FromRest2(K, T) {
14671
- return T.map((L) => FromSchemaType(K, L));
14672
- }
14673
- function FromProperties3(K, T) {
14674
- const Acc = {};
14675
- for (const K2 of globalThis.Object.getOwnPropertyNames(T))
14676
- Acc[K2] = FromSchemaType(K, T[K2]);
14677
- return Acc;
14678
- }
14679
- function FromSchemaType(K, T) {
14680
- const options = { ...T };
14681
- return (
14682
- // unevaluated modifier types
14683
- IsOptional(T) ? Optional(FromSchemaType(K, Discard(T, [OptionalKind]))) : IsReadonly(T) ? Readonly(FromSchemaType(K, Discard(T, [ReadonlyKind]))) : (
14684
- // unevaluated mapped types
14685
- IsMappedResult(T) ? FromMappedResult3(K, T.properties) : IsMappedKey(T) ? FromMappedKey(K, T.keys) : (
14686
- // unevaluated types
14687
- IsConstructor(T) ? Constructor(FromRest2(K, T.parameters), FromSchemaType(K, T.returns), options) : IsFunction2(T) ? Function2(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
14688
- )
14689
- )
14690
- );
14691
- }
14692
- function MappedFunctionReturnType(K, T) {
14693
- const Acc = {};
14694
- for (const L of K)
14695
- Acc[L] = FromSchemaType(L, T);
14696
- return Acc;
14697
- }
14698
- function Mapped(key, map, options) {
14699
- const K = IsSchema(key) ? IndexPropertyKeys(key) : key;
14700
- const RT = map({ [Kind]: "MappedKey", keys: K });
14701
- const R = MappedFunctionReturnType(K, RT);
14702
- return Object2(R, options);
14703
- }
14704
-
14705
- // ../../node_modules/@sinclair/typebox/build/esm/type/optional/optional.mjs
14706
- function RemoveOptional(schema) {
14707
- return CreateType(Discard(schema, [OptionalKind]));
14708
- }
14709
- function AddOptional(schema) {
14710
- return CreateType({ ...schema, [OptionalKind]: "Optional" });
14711
- }
14712
- function OptionalWithFlag(schema, F) {
14713
- return F === false ? RemoveOptional(schema) : AddOptional(schema);
14714
- }
14715
- function Optional(schema, enable) {
14716
- const F = enable ?? true;
14717
- return IsMappedResult(schema) ? OptionalFromMappedResult(schema, F) : OptionalWithFlag(schema, F);
14718
- }
14719
-
14720
- // ../../node_modules/@sinclair/typebox/build/esm/type/optional/optional-from-mapped-result.mjs
14721
- function FromProperties4(P, F) {
14722
- const Acc = {};
14723
- for (const K2 of globalThis.Object.getOwnPropertyNames(P))
14724
- Acc[K2] = Optional(P[K2], F);
14725
- return Acc;
14726
- }
14727
- function FromMappedResult4(R, F) {
14728
- return FromProperties4(R.properties, F);
14729
- }
14730
- function OptionalFromMappedResult(R, F) {
14731
- const P = FromMappedResult4(R, F);
14732
- return MappedResult(P);
14733
- }
14734
-
14735
- // ../../node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-create.mjs
14736
- function IntersectCreate(T, options = {}) {
14737
- const allObjects = T.every((schema) => IsObject3(schema));
14738
- const clonedUnevaluatedProperties = IsSchema(options.unevaluatedProperties) ? { unevaluatedProperties: options.unevaluatedProperties } : {};
14739
- return CreateType(options.unevaluatedProperties === false || IsSchema(options.unevaluatedProperties) || allObjects ? { ...clonedUnevaluatedProperties, [Kind]: "Intersect", type: "object", allOf: T } : { ...clonedUnevaluatedProperties, [Kind]: "Intersect", allOf: T }, options);
14740
- }
14741
-
14742
- // ../../node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-evaluated.mjs
14743
- function IsIntersectOptional(types) {
14744
- return types.every((left) => IsOptional(left));
14745
- }
14746
- function RemoveOptionalFromType2(type) {
14747
- return Discard(type, [OptionalKind]);
14748
- }
14749
- function RemoveOptionalFromRest2(types) {
14750
- return types.map((left) => IsOptional(left) ? RemoveOptionalFromType2(left) : left);
14751
- }
14752
- function ResolveIntersect(types, options) {
14753
- return IsIntersectOptional(types) ? Optional(IntersectCreate(RemoveOptionalFromRest2(types), options)) : IntersectCreate(RemoveOptionalFromRest2(types), options);
14754
- }
14755
- function IntersectEvaluated(types, options = {}) {
14756
- if (types.length === 1)
14757
- return CreateType(types[0], options);
14758
- if (types.length === 0)
14759
- return Never(options);
14760
- if (types.some((schema) => IsTransform(schema)))
14761
- throw new Error("Cannot intersect transform types");
14762
- return ResolveIntersect(types, options);
14763
- }
14764
-
14765
- // ../../node_modules/@sinclair/typebox/build/esm/type/intersect/intersect.mjs
14766
- function Intersect(types, options) {
14767
- if (types.length === 1)
14768
- return CreateType(types[0], options);
14769
- if (types.length === 0)
14770
- return Never(options);
14771
- if (types.some((schema) => IsTransform(schema)))
14772
- throw new Error("Cannot intersect transform types");
14773
- return IntersectCreate(types, options);
14774
- }
14775
-
14776
- // ../../node_modules/@sinclair/typebox/build/esm/type/ref/ref.mjs
14777
- function Ref(...args) {
14778
- const [$ref, options] = typeof args[0] === "string" ? [args[0], args[1]] : [args[0].$id, args[1]];
14779
- if (typeof $ref !== "string")
14780
- throw new TypeBoxError("Ref: $ref must be a string");
14781
- return CreateType({ [Kind]: "Ref", $ref }, options);
14782
- }
14783
-
14784
- // ../../node_modules/@sinclair/typebox/build/esm/type/awaited/awaited.mjs
14785
- function FromComputed(target, parameters) {
14786
- return Computed("Awaited", [Computed(target, parameters)]);
14787
- }
14788
- function FromRef($ref) {
14789
- return Computed("Awaited", [Ref($ref)]);
14790
- }
14791
- function FromIntersect2(types) {
14792
- return Intersect(FromRest3(types));
14793
- }
14794
- function FromUnion4(types) {
14795
- return Union(FromRest3(types));
14796
- }
14797
- function FromPromise(type) {
14798
- return Awaited(type);
14799
- }
14800
- function FromRest3(types) {
14801
- return types.map((type) => Awaited(type));
14802
- }
14803
- function Awaited(type, options) {
14804
- 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);
14805
- }
14806
-
14807
- // ../../node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-property-keys.mjs
14808
- function FromRest4(types) {
14809
- const result = [];
14810
- for (const L of types)
14811
- result.push(KeyOfPropertyKeys(L));
14812
- return result;
14813
- }
14814
- function FromIntersect3(types) {
14815
- const propertyKeysArray = FromRest4(types);
14816
- const propertyKeys = SetUnionMany(propertyKeysArray);
14817
- return propertyKeys;
14818
- }
14819
- function FromUnion5(types) {
14820
- const propertyKeysArray = FromRest4(types);
14821
- const propertyKeys = SetIntersectMany(propertyKeysArray);
14822
- return propertyKeys;
14823
- }
14824
- function FromTuple2(types) {
14825
- return types.map((_, indexer) => indexer.toString());
14826
- }
14827
- function FromArray2(_) {
14828
- return ["[number]"];
14829
- }
14830
- function FromProperties5(T) {
14831
- return globalThis.Object.getOwnPropertyNames(T);
14832
- }
14833
- function FromPatternProperties(patternProperties) {
14834
- if (!includePatternProperties)
14835
- return [];
14836
- const patternPropertyKeys = globalThis.Object.getOwnPropertyNames(patternProperties);
14837
- return patternPropertyKeys.map((key) => {
14838
- return key[0] === "^" && key[key.length - 1] === "$" ? key.slice(1, key.length - 1) : key;
14839
- });
14840
- }
14841
- function KeyOfPropertyKeys(type) {
14842
- 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) : [];
14843
- }
14844
- var includePatternProperties = false;
14845
-
14846
- // ../../node_modules/@sinclair/typebox/build/esm/type/keyof/keyof.mjs
14847
- function FromComputed2(target, parameters) {
14848
- return Computed("KeyOf", [Computed(target, parameters)]);
14849
- }
14850
- function FromRef2($ref) {
14851
- return Computed("KeyOf", [Ref($ref)]);
14852
- }
14853
- function KeyOfFromType(type, options) {
14854
- const propertyKeys = KeyOfPropertyKeys(type);
14855
- const propertyKeyTypes = KeyOfPropertyKeysToRest(propertyKeys);
14856
- const result = UnionEvaluated(propertyKeyTypes);
14857
- return CreateType(result, options);
14858
- }
14859
- function KeyOfPropertyKeysToRest(propertyKeys) {
14860
- return propertyKeys.map((L) => L === "[number]" ? Number2() : Literal(L));
14861
- }
14862
- function KeyOf(type, options) {
14863
- return IsComputed(type) ? FromComputed2(type.target, type.parameters) : IsRef(type) ? FromRef2(type.$ref) : IsMappedResult(type) ? KeyOfFromMappedResult(type, options) : KeyOfFromType(type, options);
14864
- }
14865
-
14866
- // ../../node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-from-mapped-result.mjs
14867
- function FromProperties6(properties, options) {
14868
- const result = {};
14869
- for (const K2 of globalThis.Object.getOwnPropertyNames(properties))
14870
- result[K2] = KeyOf(properties[K2], Clone(options));
14871
- return result;
14872
- }
14873
- function FromMappedResult5(mappedResult, options) {
14874
- return FromProperties6(mappedResult.properties, options);
14875
- }
14876
- function KeyOfFromMappedResult(mappedResult, options) {
14877
- const properties = FromMappedResult5(mappedResult, options);
14878
- return MappedResult(properties);
14879
- }
14880
-
14881
- // ../../node_modules/@sinclair/typebox/build/esm/type/composite/composite.mjs
14882
- function CompositeKeys(T) {
14883
- const Acc = [];
14884
- for (const L of T)
14885
- Acc.push(...KeyOfPropertyKeys(L));
14886
- return SetDistinct(Acc);
14887
- }
14888
- function FilterNever(T) {
14889
- return T.filter((L) => !IsNever(L));
14890
- }
14891
- function CompositeProperty(T, K) {
14892
- const Acc = [];
14893
- for (const L of T)
14894
- Acc.push(...IndexFromPropertyKeys(L, [K]));
14895
- return FilterNever(Acc);
14896
- }
14897
- function CompositeProperties(T, K) {
14898
- const Acc = {};
14899
- for (const L of K) {
14900
- Acc[L] = IntersectEvaluated(CompositeProperty(T, L));
14901
- }
14902
- return Acc;
14903
- }
14904
- function Composite(T, options) {
14905
- const K = CompositeKeys(T);
14906
- const P = CompositeProperties(T, K);
14907
- const R = Object2(P, options);
14908
- return R;
14909
- }
14910
-
14911
- // ../../node_modules/@sinclair/typebox/build/esm/type/date/date.mjs
14912
- function Date2(options) {
14913
- return CreateType({ [Kind]: "Date", type: "Date" }, options);
14914
- }
14915
-
14916
- // ../../node_modules/@sinclair/typebox/build/esm/type/null/null.mjs
14917
- function Null(options) {
14918
- return CreateType({ [Kind]: "Null", type: "null" }, options);
14919
- }
14920
-
14921
- // ../../node_modules/@sinclair/typebox/build/esm/type/symbol/symbol.mjs
14922
- function Symbol2(options) {
14923
- return CreateType({ [Kind]: "Symbol", type: "symbol" }, options);
14924
- }
14925
-
14926
- // ../../node_modules/@sinclair/typebox/build/esm/type/undefined/undefined.mjs
14927
- function Undefined(options) {
14928
- return CreateType({ [Kind]: "Undefined", type: "undefined" }, options);
14929
- }
14930
-
14931
- // ../../node_modules/@sinclair/typebox/build/esm/type/uint8array/uint8array.mjs
14932
- function Uint8Array2(options) {
14933
- return CreateType({ [Kind]: "Uint8Array", type: "Uint8Array" }, options);
14934
- }
14935
-
14936
- // ../../node_modules/@sinclair/typebox/build/esm/type/unknown/unknown.mjs
14937
- function Unknown(options) {
14938
- return CreateType({ [Kind]: "Unknown" }, options);
14939
- }
14940
-
14941
- // ../../node_modules/@sinclair/typebox/build/esm/type/const/const.mjs
14942
- function FromArray3(T) {
14943
- return T.map((L) => FromValue(L, false));
14944
- }
14945
- function FromProperties7(value) {
14946
- const Acc = {};
14947
- for (const K of globalThis.Object.getOwnPropertyNames(value))
14948
- Acc[K] = Readonly(FromValue(value[K], false));
14949
- return Acc;
14950
- }
14951
- function ConditionalReadonly(T, root) {
14952
- return root === true ? T : Readonly(T);
14953
- }
14954
- function FromValue(value, root) {
14955
- 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(Function2([], 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({});
14956
- }
14957
- function Const(T, options) {
14958
- return CreateType(FromValue(T, true), options);
14959
- }
14960
-
14961
- // ../../node_modules/@sinclair/typebox/build/esm/type/constructor-parameters/constructor-parameters.mjs
14962
- function ConstructorParameters(schema, options) {
14963
- return IsConstructor(schema) ? Tuple(schema.parameters, options) : Never(options);
14964
- }
14965
-
14966
- // ../../node_modules/@sinclair/typebox/build/esm/type/enum/enum.mjs
14967
- function Enum(item, options) {
14968
- if (IsUndefined(item))
14969
- throw new Error("Enum undefined or empty");
14970
- const values1 = globalThis.Object.getOwnPropertyNames(item).filter((key) => isNaN(key)).map((key) => item[key]);
14971
- const values2 = [...new Set(values1)];
14972
- const anyOf = values2.map((value) => Literal(value));
14973
- return Union(anyOf, { ...options, [Hint]: "Enum" });
14974
- }
14975
-
14976
- // ../../node_modules/@sinclair/typebox/build/esm/type/extends/extends-check.mjs
14977
- var ExtendsResolverError = class extends TypeBoxError {
14978
- };
14979
- var ExtendsResult;
14980
- (function(ExtendsResult2) {
14981
- ExtendsResult2[ExtendsResult2["Union"] = 0] = "Union";
14982
- ExtendsResult2[ExtendsResult2["True"] = 1] = "True";
14983
- ExtendsResult2[ExtendsResult2["False"] = 2] = "False";
14984
- })(ExtendsResult || (ExtendsResult = {}));
14985
- function IntoBooleanResult(result) {
14986
- return result === ExtendsResult.False ? result : ExtendsResult.True;
14987
- }
14988
- function Throw(message) {
14989
- throw new ExtendsResolverError(message);
14990
- }
14991
- function IsStructuralRight(right) {
14992
- return type_exports.IsNever(right) || type_exports.IsIntersect(right) || type_exports.IsUnion(right) || type_exports.IsUnknown(right) || type_exports.IsAny(right);
14993
- }
14994
- function StructuralRight(left, right) {
14995
- 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");
14996
- }
14997
- function FromAnyRight(left, right) {
14998
- return ExtendsResult.True;
14999
- }
15000
- function FromAny(left, right) {
15001
- 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;
15002
- }
15003
- function FromArrayRight(left, right) {
15004
- return type_exports.IsUnknown(left) ? ExtendsResult.False : type_exports.IsAny(left) ? ExtendsResult.Union : type_exports.IsNever(left) ? ExtendsResult.True : ExtendsResult.False;
15005
- }
15006
- function FromArray4(left, right) {
15007
- 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));
15008
- }
15009
- function FromAsyncIterator(left, right) {
15010
- return IsStructuralRight(right) ? StructuralRight(left, right) : !type_exports.IsAsyncIterator(right) ? ExtendsResult.False : IntoBooleanResult(Visit3(left.items, right.items));
15011
- }
15012
- function FromBigInt(left, right) {
15013
- 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;
15014
- }
15015
- function FromBooleanRight(left, right) {
15016
- return type_exports.IsLiteralBoolean(left) ? ExtendsResult.True : type_exports.IsBoolean(left) ? ExtendsResult.True : ExtendsResult.False;
15017
- }
15018
- function FromBoolean(left, right) {
15019
- 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;
15020
- }
15021
- function FromConstructor(left, right) {
15022
- 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));
15023
- }
15024
- function FromDate(left, right) {
15025
- 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;
15026
- }
15027
- function FromFunction(left, right) {
15028
- 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));
15029
- }
15030
- function FromIntegerRight(left, right) {
15031
- return type_exports.IsLiteral(left) && value_exports.IsNumber(left.const) ? ExtendsResult.True : type_exports.IsNumber(left) || type_exports.IsInteger(left) ? ExtendsResult.True : ExtendsResult.False;
15032
- }
15033
- function FromInteger(left, right) {
15034
- 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;
15035
- }
15036
- function FromIntersectRight(left, right) {
15037
- return right.allOf.every((schema) => Visit3(left, schema) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False;
15038
- }
15039
- function FromIntersect4(left, right) {
15040
- return left.allOf.some((schema) => Visit3(schema, right) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False;
15041
- }
15042
- function FromIterator(left, right) {
15043
- return IsStructuralRight(right) ? StructuralRight(left, right) : !type_exports.IsIterator(right) ? ExtendsResult.False : IntoBooleanResult(Visit3(left.items, right.items));
15044
- }
15045
- function FromLiteral2(left, right) {
15046
- 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;
15047
- }
15048
- function FromNeverRight(left, right) {
15049
- return ExtendsResult.False;
15050
- }
15051
- function FromNever(left, right) {
15052
- return ExtendsResult.True;
15053
- }
15054
- function UnwrapTNot(schema) {
15055
- let [current, depth] = [schema, 0];
15056
- while (true) {
15057
- if (!type_exports.IsNot(current))
15058
- break;
15059
- current = current.not;
15060
- depth += 1;
15061
- }
15062
- return depth % 2 === 0 ? current : Unknown();
15063
- }
15064
- function FromNot(left, right) {
15065
- return type_exports.IsNot(left) ? Visit3(UnwrapTNot(left), right) : type_exports.IsNot(right) ? Visit3(left, UnwrapTNot(right)) : Throw("Invalid fallthrough for Not");
15066
- }
15067
- function FromNull(left, right) {
15068
- 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;
15069
- }
15070
- function FromNumberRight(left, right) {
15071
- return type_exports.IsLiteralNumber(left) ? ExtendsResult.True : type_exports.IsNumber(left) || type_exports.IsInteger(left) ? ExtendsResult.True : ExtendsResult.False;
15072
- }
15073
- function FromNumber(left, right) {
15074
- 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;
15075
- }
15076
- function IsObjectPropertyCount(schema, count) {
15077
- return Object.getOwnPropertyNames(schema.properties).length === count;
15078
- }
15079
- function IsObjectStringLike(schema) {
15080
- return IsObjectArrayLike(schema);
15081
- }
15082
- function IsObjectSymbolLike(schema) {
15083
- 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]));
15084
- }
15085
- function IsObjectNumberLike(schema) {
15086
- return IsObjectPropertyCount(schema, 0);
15087
- }
15088
- function IsObjectBooleanLike(schema) {
15089
- return IsObjectPropertyCount(schema, 0);
15090
- }
15091
- function IsObjectBigIntLike(schema) {
15092
- return IsObjectPropertyCount(schema, 0);
15093
- }
15094
- function IsObjectDateLike(schema) {
15095
- return IsObjectPropertyCount(schema, 0);
15096
- }
15097
- function IsObjectUint8ArrayLike(schema) {
15098
- return IsObjectArrayLike(schema);
15099
- }
15100
- function IsObjectFunctionLike(schema) {
15101
- const length = Number2();
15102
- return IsObjectPropertyCount(schema, 0) || IsObjectPropertyCount(schema, 1) && "length" in schema.properties && IntoBooleanResult(Visit3(schema.properties["length"], length)) === ExtendsResult.True;
15103
- }
15104
- function IsObjectConstructorLike(schema) {
15105
- return IsObjectPropertyCount(schema, 0);
15106
- }
15107
- function IsObjectArrayLike(schema) {
15108
- const length = Number2();
15109
- return IsObjectPropertyCount(schema, 0) || IsObjectPropertyCount(schema, 1) && "length" in schema.properties && IntoBooleanResult(Visit3(schema.properties["length"], length)) === ExtendsResult.True;
15110
- }
15111
- function IsObjectPromiseLike(schema) {
15112
- const then = Function2([Any()], Any());
15113
- return IsObjectPropertyCount(schema, 0) || IsObjectPropertyCount(schema, 1) && "then" in schema.properties && IntoBooleanResult(Visit3(schema.properties["then"], then)) === ExtendsResult.True;
15114
- }
15115
- function Property(left, right) {
15116
- return Visit3(left, right) === ExtendsResult.False ? ExtendsResult.False : type_exports.IsOptional(left) && !type_exports.IsOptional(right) ? ExtendsResult.False : ExtendsResult.True;
15117
- }
15118
- function FromObjectRight(left, right) {
15119
- 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)) ? (() => {
15120
- return right[Hint] === "Record" ? ExtendsResult.True : ExtendsResult.False;
15121
- })() : type_exports.IsRecord(left) && type_exports.IsNumber(RecordKey(left)) ? (() => {
15122
- return IsObjectPropertyCount(right, 0) ? ExtendsResult.True : ExtendsResult.False;
15123
- })() : ExtendsResult.False;
15124
- }
15125
- function FromObject(left, right) {
15126
- return IsStructuralRight(right) ? StructuralRight(left, right) : type_exports.IsRecord(right) ? FromRecordRight(left, right) : !type_exports.IsObject(right) ? ExtendsResult.False : (() => {
15127
- for (const key of Object.getOwnPropertyNames(right.properties)) {
15128
- if (!(key in left.properties) && !type_exports.IsOptional(right.properties[key])) {
15129
- return ExtendsResult.False;
15130
- }
15131
- if (type_exports.IsOptional(right.properties[key])) {
15132
- return ExtendsResult.True;
15133
- }
15134
- if (Property(left.properties[key], right.properties[key]) === ExtendsResult.False) {
15135
- return ExtendsResult.False;
15136
- }
15137
- }
15138
- return ExtendsResult.True;
15139
- })();
15140
- }
15141
- function FromPromise2(left, right) {
15142
- 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));
15143
- }
15144
- function RecordKey(schema) {
15145
- return PatternNumberExact in schema.patternProperties ? Number2() : PatternStringExact in schema.patternProperties ? String2() : Throw("Unknown record key pattern");
15146
- }
15147
- function RecordValue(schema) {
15148
- return PatternNumberExact in schema.patternProperties ? schema.patternProperties[PatternNumberExact] : PatternStringExact in schema.patternProperties ? schema.patternProperties[PatternStringExact] : Throw("Unable to get record value schema");
15149
- }
15150
- function FromRecordRight(left, right) {
15151
- const [Key, Value] = [RecordKey(right), RecordValue(right)];
15152
- 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) ? (() => {
15153
- for (const key of Object.getOwnPropertyNames(left.properties)) {
15154
- if (Property(Value, left.properties[key]) === ExtendsResult.False) {
15155
- return ExtendsResult.False;
15156
- }
15157
- }
15158
- return ExtendsResult.True;
15159
- })() : ExtendsResult.False;
15160
- }
15161
- function FromRecord(left, right) {
15162
- return IsStructuralRight(right) ? StructuralRight(left, right) : type_exports.IsObject(right) ? FromObjectRight(left, right) : !type_exports.IsRecord(right) ? ExtendsResult.False : Visit3(RecordValue(left), RecordValue(right));
15163
- }
15164
- function FromRegExp(left, right) {
15165
- const L = type_exports.IsRegExp(left) ? String2() : left;
15166
- const R = type_exports.IsRegExp(right) ? String2() : right;
15167
- return Visit3(L, R);
15168
- }
15169
- function FromStringRight(left, right) {
15170
- return type_exports.IsLiteral(left) && value_exports.IsString(left.const) ? ExtendsResult.True : type_exports.IsString(left) ? ExtendsResult.True : ExtendsResult.False;
15171
- }
15172
- function FromString(left, right) {
15173
- 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;
15174
- }
15175
- function FromSymbol(left, right) {
15176
- 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;
15177
- }
15178
- function FromTemplateLiteral2(left, right) {
15179
- return type_exports.IsTemplateLiteral(left) ? Visit3(TemplateLiteralToUnion(left), right) : type_exports.IsTemplateLiteral(right) ? Visit3(left, TemplateLiteralToUnion(right)) : Throw("Invalid fallthrough for TemplateLiteral");
15180
- }
15181
- function IsArrayOfTuple(left, right) {
15182
- return type_exports.IsArray(right) && left.items !== void 0 && left.items.every((schema) => Visit3(schema, right.items) === ExtendsResult.True);
15183
- }
15184
- function FromTupleRight(left, right) {
15185
- return type_exports.IsNever(left) ? ExtendsResult.True : type_exports.IsUnknown(left) ? ExtendsResult.False : type_exports.IsAny(left) ? ExtendsResult.Union : ExtendsResult.False;
15186
- }
15187
- function FromTuple3(left, right) {
15188
- 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;
15189
- }
15190
- function FromUint8Array(left, right) {
15191
- 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;
15192
- }
15193
- function FromUndefined(left, right) {
15194
- 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;
15195
- }
15196
- function FromUnionRight(left, right) {
15197
- return right.anyOf.some((schema) => Visit3(left, schema) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False;
15198
- }
15199
- function FromUnion6(left, right) {
15200
- return left.anyOf.every((schema) => Visit3(schema, right) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False;
15201
- }
15202
- function FromUnknownRight(left, right) {
15203
- return ExtendsResult.True;
15204
- }
15205
- function FromUnknown(left, right) {
15206
- 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;
15207
- }
15208
- function FromVoidRight(left, right) {
15209
- return type_exports.IsUndefined(left) ? ExtendsResult.True : type_exports.IsUndefined(left) ? ExtendsResult.True : ExtendsResult.False;
15210
- }
15211
- function FromVoid(left, right) {
15212
- 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;
15213
- }
15214
- function Visit3(left, right) {
15215
- return (
15216
- // resolvable
15217
- 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) : (
15218
- // standard
15219
- 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]}'`)
15220
- )
15221
- );
15222
- }
15223
- function ExtendsCheck(left, right) {
15224
- return Visit3(left, right);
15225
- }
15226
-
15227
- // ../../node_modules/@sinclair/typebox/build/esm/type/extends/extends-from-mapped-result.mjs
15228
- function FromProperties8(P, Right, True, False, options) {
15229
- const Acc = {};
15230
- for (const K2 of globalThis.Object.getOwnPropertyNames(P))
15231
- Acc[K2] = Extends(P[K2], Right, True, False, Clone(options));
15232
- return Acc;
15233
- }
15234
- function FromMappedResult6(Left, Right, True, False, options) {
15235
- return FromProperties8(Left.properties, Right, True, False, options);
15236
- }
15237
- function ExtendsFromMappedResult(Left, Right, True, False, options) {
15238
- const P = FromMappedResult6(Left, Right, True, False, options);
15239
- return MappedResult(P);
15240
- }
15241
-
15242
- // ../../node_modules/@sinclair/typebox/build/esm/type/extends/extends.mjs
15243
- function ExtendsResolve(left, right, trueType, falseType) {
15244
- const R = ExtendsCheck(left, right);
15245
- return R === ExtendsResult.Union ? Union([trueType, falseType]) : R === ExtendsResult.True ? trueType : falseType;
15246
- }
15247
- function Extends(L, R, T, F, options) {
15248
- 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);
15249
- }
15250
-
15251
- // ../../node_modules/@sinclair/typebox/build/esm/type/extends/extends-from-mapped-key.mjs
15252
- function FromPropertyKey(K, U, L, R, options) {
15253
- return {
15254
- [K]: Extends(Literal(K), U, L, R, Clone(options))
15255
- };
15256
- }
15257
- function FromPropertyKeys(K, U, L, R, options) {
15258
- return K.reduce((Acc, LK) => {
15259
- return { ...Acc, ...FromPropertyKey(LK, U, L, R, options) };
15260
- }, {});
15261
- }
15262
- function FromMappedKey2(K, U, L, R, options) {
15263
- return FromPropertyKeys(K.keys, U, L, R, options);
15264
- }
15265
- function ExtendsFromMappedKey(T, U, L, R, options) {
15266
- const P = FromMappedKey2(T, U, L, R, options);
15267
- return MappedResult(P);
15268
- }
15269
-
15270
- // ../../node_modules/@sinclair/typebox/build/esm/type/exclude/exclude-from-template-literal.mjs
15271
- function ExcludeFromTemplateLiteral(L, R) {
15272
- return Exclude(TemplateLiteralToUnion(L), R);
15273
- }
15274
-
15275
- // ../../node_modules/@sinclair/typebox/build/esm/type/exclude/exclude.mjs
15276
- function ExcludeRest(L, R) {
15277
- const excluded = L.filter((inner) => ExtendsCheck(inner, R) === ExtendsResult.False);
15278
- return excluded.length === 1 ? excluded[0] : Union(excluded);
15279
- }
15280
- function Exclude(L, R, options = {}) {
15281
- if (IsTemplateLiteral(L))
15282
- return CreateType(ExcludeFromTemplateLiteral(L, R), options);
15283
- if (IsMappedResult(L))
15284
- return CreateType(ExcludeFromMappedResult(L, R), options);
15285
- return CreateType(IsUnion(L) ? ExcludeRest(L.anyOf, R) : ExtendsCheck(L, R) !== ExtendsResult.False ? Never() : L, options);
15286
- }
15287
-
15288
- // ../../node_modules/@sinclair/typebox/build/esm/type/exclude/exclude-from-mapped-result.mjs
15289
- function FromProperties9(P, U) {
15290
- const Acc = {};
15291
- for (const K2 of globalThis.Object.getOwnPropertyNames(P))
15292
- Acc[K2] = Exclude(P[K2], U);
15293
- return Acc;
15294
- }
15295
- function FromMappedResult7(R, T) {
15296
- return FromProperties9(R.properties, T);
15297
- }
15298
- function ExcludeFromMappedResult(R, T) {
15299
- const P = FromMappedResult7(R, T);
15300
- return MappedResult(P);
15301
- }
15302
-
15303
- // ../../node_modules/@sinclair/typebox/build/esm/type/extract/extract-from-template-literal.mjs
15304
- function ExtractFromTemplateLiteral(L, R) {
15305
- return Extract(TemplateLiteralToUnion(L), R);
15306
- }
15307
-
15308
- // ../../node_modules/@sinclair/typebox/build/esm/type/extract/extract.mjs
15309
- function ExtractRest(L, R) {
15310
- const extracted = L.filter((inner) => ExtendsCheck(inner, R) !== ExtendsResult.False);
15311
- return extracted.length === 1 ? extracted[0] : Union(extracted);
15312
- }
15313
- function Extract(L, R, options) {
15314
- if (IsTemplateLiteral(L))
15315
- return CreateType(ExtractFromTemplateLiteral(L, R), options);
15316
- if (IsMappedResult(L))
15317
- return CreateType(ExtractFromMappedResult(L, R), options);
15318
- return CreateType(IsUnion(L) ? ExtractRest(L.anyOf, R) : ExtendsCheck(L, R) !== ExtendsResult.False ? L : Never(), options);
15319
- }
15320
-
15321
- // ../../node_modules/@sinclair/typebox/build/esm/type/extract/extract-from-mapped-result.mjs
15322
- function FromProperties10(P, T) {
15323
- const Acc = {};
15324
- for (const K2 of globalThis.Object.getOwnPropertyNames(P))
15325
- Acc[K2] = Extract(P[K2], T);
15326
- return Acc;
15327
- }
15328
- function FromMappedResult8(R, T) {
15329
- return FromProperties10(R.properties, T);
15330
- }
15331
- function ExtractFromMappedResult(R, T) {
15332
- const P = FromMappedResult8(R, T);
15333
- return MappedResult(P);
15334
- }
15335
-
15336
- // ../../node_modules/@sinclair/typebox/build/esm/type/instance-type/instance-type.mjs
15337
- function InstanceType(schema, options) {
15338
- return IsConstructor(schema) ? CreateType(schema.returns, options) : Never(options);
15339
- }
15340
-
15341
- // ../../node_modules/@sinclair/typebox/build/esm/type/readonly-optional/readonly-optional.mjs
15342
- function ReadonlyOptional(schema) {
15343
- return Readonly(Optional(schema));
15344
- }
15345
-
15346
- // ../../node_modules/@sinclair/typebox/build/esm/type/record/record.mjs
15347
- function RecordCreateFromPattern(pattern, T, options) {
15348
- return CreateType({ [Kind]: "Record", type: "object", patternProperties: { [pattern]: T } }, options);
15349
- }
15350
- function RecordCreateFromKeys(K, T, options) {
15351
- const result = {};
15352
- for (const K2 of K)
15353
- result[K2] = T;
15354
- return Object2(result, { ...options, [Hint]: "Record" });
15355
- }
15356
- function FromTemplateLiteralKey(K, T, options) {
15357
- return IsTemplateLiteralFinite(K) ? RecordCreateFromKeys(IndexPropertyKeys(K), T, options) : RecordCreateFromPattern(K.pattern, T, options);
15358
- }
15359
- function FromUnionKey(key, type, options) {
15360
- return RecordCreateFromKeys(IndexPropertyKeys(Union(key)), type, options);
15361
- }
15362
- function FromLiteralKey(key, type, options) {
15363
- return RecordCreateFromKeys([key.toString()], type, options);
15364
- }
15365
- function FromRegExpKey(key, type, options) {
15366
- return RecordCreateFromPattern(key.source, type, options);
15367
- }
15368
- function FromStringKey(key, type, options) {
15369
- const pattern = IsUndefined(key.pattern) ? PatternStringExact : key.pattern;
15370
- return RecordCreateFromPattern(pattern, type, options);
15371
- }
15372
- function FromAnyKey(_, type, options) {
15373
- return RecordCreateFromPattern(PatternStringExact, type, options);
15374
- }
15375
- function FromNeverKey(_key, type, options) {
15376
- return RecordCreateFromPattern(PatternNeverExact, type, options);
15377
- }
15378
- function FromBooleanKey(_key, type, options) {
15379
- return Object2({ true: type, false: type }, options);
15380
- }
15381
- function FromIntegerKey(_key, type, options) {
15382
- return RecordCreateFromPattern(PatternNumberExact, type, options);
15383
- }
15384
- function FromNumberKey(_, type, options) {
15385
- return RecordCreateFromPattern(PatternNumberExact, type, options);
15386
- }
15387
- function Record(key, type, options = {}) {
15388
- 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);
15389
- }
15390
- function RecordPattern(record) {
15391
- return globalThis.Object.getOwnPropertyNames(record.patternProperties)[0];
15392
- }
15393
- function RecordKey2(type) {
15394
- const pattern = RecordPattern(type);
15395
- return pattern === PatternStringExact ? String2() : pattern === PatternNumberExact ? Number2() : String2({ pattern });
15396
- }
15397
- function RecordValue2(type) {
15398
- return type.patternProperties[RecordPattern(type)];
15399
- }
15400
-
15401
- // ../../node_modules/@sinclair/typebox/build/esm/type/instantiate/instantiate.mjs
15402
- function FromConstructor2(args, type) {
15403
- type.parameters = FromTypes(args, type.parameters);
15404
- type.returns = FromType(args, type.returns);
15405
- return type;
15406
- }
15407
- function FromFunction2(args, type) {
15408
- type.parameters = FromTypes(args, type.parameters);
15409
- type.returns = FromType(args, type.returns);
15410
- return type;
15411
- }
15412
- function FromIntersect5(args, type) {
15413
- type.allOf = FromTypes(args, type.allOf);
15414
- return type;
15415
- }
15416
- function FromUnion7(args, type) {
15417
- type.anyOf = FromTypes(args, type.anyOf);
15418
- return type;
15419
- }
15420
- function FromTuple4(args, type) {
15421
- if (IsUndefined(type.items))
15422
- return type;
15423
- type.items = FromTypes(args, type.items);
15424
- return type;
15425
- }
15426
- function FromArray5(args, type) {
15427
- type.items = FromType(args, type.items);
15428
- return type;
15429
- }
15430
- function FromAsyncIterator2(args, type) {
15431
- type.items = FromType(args, type.items);
15432
- return type;
15433
- }
15434
- function FromIterator2(args, type) {
15435
- type.items = FromType(args, type.items);
15436
- return type;
15437
- }
15438
- function FromPromise3(args, type) {
15439
- type.item = FromType(args, type.item);
15440
- return type;
15441
- }
15442
- function FromObject2(args, type) {
15443
- const mappedProperties = FromProperties11(args, type.properties);
15444
- return { ...type, ...Object2(mappedProperties) };
15445
- }
15446
- function FromRecord2(args, type) {
15447
- const mappedKey = FromType(args, RecordKey2(type));
15448
- const mappedValue = FromType(args, RecordValue2(type));
15449
- const result = Record(mappedKey, mappedValue);
15450
- return { ...type, ...result };
15451
- }
15452
- function FromArgument(args, argument) {
15453
- return argument.index in args ? args[argument.index] : Unknown();
15454
- }
15455
- function FromProperty2(args, type) {
15456
- const isReadonly = IsReadonly(type);
15457
- const isOptional = IsOptional(type);
15458
- const mapped = FromType(args, type);
15459
- return isReadonly && isOptional ? ReadonlyOptional(mapped) : isReadonly && !isOptional ? Readonly(mapped) : !isReadonly && isOptional ? Optional(mapped) : mapped;
15460
- }
15461
- function FromProperties11(args, properties) {
15462
- return globalThis.Object.getOwnPropertyNames(properties).reduce((result, key) => {
15463
- return { ...result, [key]: FromProperty2(args, properties[key]) };
15464
- }, {});
15465
- }
15466
- function FromTypes(args, types) {
15467
- return types.map((type) => FromType(args, type));
15468
- }
15469
- function FromType(args, type) {
15470
- 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;
15471
- }
15472
- function Instantiate(type, args) {
15473
- return FromType(args, CloneType(type));
15474
- }
15475
-
15476
- // ../../node_modules/@sinclair/typebox/build/esm/type/integer/integer.mjs
15477
- function Integer(options) {
15478
- return CreateType({ [Kind]: "Integer", type: "integer" }, options);
15479
- }
15480
-
15481
- // ../../node_modules/@sinclair/typebox/build/esm/type/intrinsic/intrinsic-from-mapped-key.mjs
15482
- function MappedIntrinsicPropertyKey(K, M, options) {
15483
- return {
15484
- [K]: Intrinsic(Literal(K), M, Clone(options))
15485
- };
15486
- }
15487
- function MappedIntrinsicPropertyKeys(K, M, options) {
15488
- const result = K.reduce((Acc, L) => {
15489
- return { ...Acc, ...MappedIntrinsicPropertyKey(L, M, options) };
15490
- }, {});
15491
- return result;
15492
- }
15493
- function MappedIntrinsicProperties(T, M, options) {
15494
- return MappedIntrinsicPropertyKeys(T["keys"], M, options);
15495
- }
15496
- function IntrinsicFromMappedKey(T, M, options) {
15497
- const P = MappedIntrinsicProperties(T, M, options);
15498
- return MappedResult(P);
15499
- }
15500
-
15501
- // ../../node_modules/@sinclair/typebox/build/esm/type/intrinsic/intrinsic.mjs
15502
- function ApplyUncapitalize(value) {
15503
- const [first, rest] = [value.slice(0, 1), value.slice(1)];
15504
- return [first.toLowerCase(), rest].join("");
15505
- }
15506
- function ApplyCapitalize(value) {
15507
- const [first, rest] = [value.slice(0, 1), value.slice(1)];
15508
- return [first.toUpperCase(), rest].join("");
15509
- }
15510
- function ApplyUppercase(value) {
15511
- return value.toUpperCase();
15512
- }
15513
- function ApplyLowercase(value) {
15514
- return value.toLowerCase();
15515
- }
15516
- function FromTemplateLiteral3(schema, mode, options) {
15517
- const expression = TemplateLiteralParseExact(schema.pattern);
15518
- const finite = IsTemplateLiteralExpressionFinite(expression);
15519
- if (!finite)
15520
- return { ...schema, pattern: FromLiteralValue(schema.pattern, mode) };
15521
- const strings = [...TemplateLiteralExpressionGenerate(expression)];
15522
- const literals = strings.map((value) => Literal(value));
15523
- const mapped = FromRest5(literals, mode);
15524
- const union = Union(mapped);
15525
- return TemplateLiteral([union], options);
15526
- }
15527
- function FromLiteralValue(value, mode) {
15528
- return typeof value === "string" ? mode === "Uncapitalize" ? ApplyUncapitalize(value) : mode === "Capitalize" ? ApplyCapitalize(value) : mode === "Uppercase" ? ApplyUppercase(value) : mode === "Lowercase" ? ApplyLowercase(value) : value : value.toString();
15529
- }
15530
- function FromRest5(T, M) {
15531
- return T.map((L) => Intrinsic(L, M));
15532
- }
15533
- function Intrinsic(schema, mode, options = {}) {
15534
- return (
15535
- // Intrinsic-Mapped-Inference
15536
- IsMappedKey(schema) ? IntrinsicFromMappedKey(schema, mode, options) : (
15537
- // Standard-Inference
15538
- IsTemplateLiteral(schema) ? FromTemplateLiteral3(schema, mode, options) : IsUnion(schema) ? Union(FromRest5(schema.anyOf, mode), options) : IsLiteral(schema) ? Literal(FromLiteralValue(schema.const, mode), options) : (
15539
- // Default Type
15540
- CreateType(schema, options)
15541
- )
15542
- )
15543
- );
15544
- }
15545
-
15546
- // ../../node_modules/@sinclair/typebox/build/esm/type/intrinsic/capitalize.mjs
15547
- function Capitalize(T, options = {}) {
15548
- return Intrinsic(T, "Capitalize", options);
15549
- }
15550
-
15551
- // ../../node_modules/@sinclair/typebox/build/esm/type/intrinsic/lowercase.mjs
15552
- function Lowercase(T, options = {}) {
15553
- return Intrinsic(T, "Lowercase", options);
15554
- }
15555
-
15556
- // ../../node_modules/@sinclair/typebox/build/esm/type/intrinsic/uncapitalize.mjs
15557
- function Uncapitalize(T, options = {}) {
15558
- return Intrinsic(T, "Uncapitalize", options);
15559
- }
15560
-
15561
- // ../../node_modules/@sinclair/typebox/build/esm/type/intrinsic/uppercase.mjs
15562
- function Uppercase(T, options = {}) {
15563
- return Intrinsic(T, "Uppercase", options);
15564
- }
15565
-
15566
- // ../../node_modules/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-result.mjs
15567
- function FromProperties12(properties, propertyKeys, options) {
15568
- const result = {};
15569
- for (const K2 of globalThis.Object.getOwnPropertyNames(properties))
15570
- result[K2] = Omit(properties[K2], propertyKeys, Clone(options));
15571
- return result;
15572
- }
15573
- function FromMappedResult9(mappedResult, propertyKeys, options) {
15574
- return FromProperties12(mappedResult.properties, propertyKeys, options);
15575
- }
15576
- function OmitFromMappedResult(mappedResult, propertyKeys, options) {
15577
- const properties = FromMappedResult9(mappedResult, propertyKeys, options);
15578
- return MappedResult(properties);
15579
- }
15580
-
15581
- // ../../node_modules/@sinclair/typebox/build/esm/type/omit/omit.mjs
15582
- function FromIntersect6(types, propertyKeys) {
15583
- return types.map((type) => OmitResolve(type, propertyKeys));
15584
- }
15585
- function FromUnion8(types, propertyKeys) {
15586
- return types.map((type) => OmitResolve(type, propertyKeys));
15587
- }
15588
- function FromProperty3(properties, key) {
15589
- const { [key]: _, ...R } = properties;
15590
- return R;
15591
- }
15592
- function FromProperties13(properties, propertyKeys) {
15593
- return propertyKeys.reduce((T, K2) => FromProperty3(T, K2), properties);
15594
- }
15595
- function FromObject3(type, propertyKeys, properties) {
15596
- const options = Discard(type, [TransformKind, "$id", "required", "properties"]);
15597
- const mappedProperties = FromProperties13(properties, propertyKeys);
15598
- return Object2(mappedProperties, options);
15599
- }
15600
- function UnionFromPropertyKeys(propertyKeys) {
15601
- const result = propertyKeys.reduce((result2, key) => IsLiteralValue(key) ? [...result2, Literal(key)] : result2, []);
15602
- return Union(result);
15603
- }
15604
- function OmitResolve(type, propertyKeys) {
15605
- return IsIntersect(type) ? Intersect(FromIntersect6(type.allOf, propertyKeys)) : IsUnion(type) ? Union(FromUnion8(type.anyOf, propertyKeys)) : IsObject3(type) ? FromObject3(type, propertyKeys, type.properties) : Object2({});
15606
- }
15607
- function Omit(type, key, options) {
15608
- const typeKey = IsArray(key) ? UnionFromPropertyKeys(key) : key;
15609
- const propertyKeys = IsSchema(key) ? IndexPropertyKeys(key) : key;
15610
- const isTypeRef = IsRef(type);
15611
- const isKeyRef = IsRef(key);
15612
- 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 });
15613
- }
15614
-
15615
- // ../../node_modules/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-key.mjs
15616
- function FromPropertyKey2(type, key, options) {
15617
- return { [key]: Omit(type, [key], Clone(options)) };
15618
- }
15619
- function FromPropertyKeys2(type, propertyKeys, options) {
15620
- return propertyKeys.reduce((Acc, LK) => {
15621
- return { ...Acc, ...FromPropertyKey2(type, LK, options) };
15622
- }, {});
15623
- }
15624
- function FromMappedKey3(type, mappedKey, options) {
15625
- return FromPropertyKeys2(type, mappedKey.keys, options);
15626
- }
15627
- function OmitFromMappedKey(type, mappedKey, options) {
15628
- const properties = FromMappedKey3(type, mappedKey, options);
15629
- return MappedResult(properties);
15630
- }
15631
-
15632
- // ../../node_modules/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-result.mjs
15633
- function FromProperties14(properties, propertyKeys, options) {
15634
- const result = {};
15635
- for (const K2 of globalThis.Object.getOwnPropertyNames(properties))
15636
- result[K2] = Pick(properties[K2], propertyKeys, Clone(options));
15637
- return result;
15638
- }
15639
- function FromMappedResult10(mappedResult, propertyKeys, options) {
15640
- return FromProperties14(mappedResult.properties, propertyKeys, options);
15641
- }
15642
- function PickFromMappedResult(mappedResult, propertyKeys, options) {
15643
- const properties = FromMappedResult10(mappedResult, propertyKeys, options);
15644
- return MappedResult(properties);
15645
- }
15646
-
15647
- // ../../node_modules/@sinclair/typebox/build/esm/type/pick/pick.mjs
15648
- function FromIntersect7(types, propertyKeys) {
15649
- return types.map((type) => PickResolve(type, propertyKeys));
15650
- }
15651
- function FromUnion9(types, propertyKeys) {
15652
- return types.map((type) => PickResolve(type, propertyKeys));
15653
- }
15654
- function FromProperties15(properties, propertyKeys) {
15655
- const result = {};
15656
- for (const K2 of propertyKeys)
15657
- if (K2 in properties)
15658
- result[K2] = properties[K2];
15659
- return result;
15660
- }
15661
- function FromObject4(Type2, keys, properties) {
15662
- const options = Discard(Type2, [TransformKind, "$id", "required", "properties"]);
15663
- const mappedProperties = FromProperties15(properties, keys);
15664
- return Object2(mappedProperties, options);
15665
- }
15666
- function UnionFromPropertyKeys2(propertyKeys) {
15667
- const result = propertyKeys.reduce((result2, key) => IsLiteralValue(key) ? [...result2, Literal(key)] : result2, []);
15668
- return Union(result);
15669
- }
15670
- function PickResolve(type, propertyKeys) {
15671
- return IsIntersect(type) ? Intersect(FromIntersect7(type.allOf, propertyKeys)) : IsUnion(type) ? Union(FromUnion9(type.anyOf, propertyKeys)) : IsObject3(type) ? FromObject4(type, propertyKeys, type.properties) : Object2({});
15672
- }
15673
- function Pick(type, key, options) {
15674
- const typeKey = IsArray(key) ? UnionFromPropertyKeys2(key) : key;
15675
- const propertyKeys = IsSchema(key) ? IndexPropertyKeys(key) : key;
15676
- const isTypeRef = IsRef(type);
15677
- const isKeyRef = IsRef(key);
15678
- 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 });
15679
- }
15680
-
15681
- // ../../node_modules/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-key.mjs
15682
- function FromPropertyKey3(type, key, options) {
15683
- return {
15684
- [key]: Pick(type, [key], Clone(options))
15685
- };
15686
- }
15687
- function FromPropertyKeys3(type, propertyKeys, options) {
15688
- return propertyKeys.reduce((result, leftKey) => {
15689
- return { ...result, ...FromPropertyKey3(type, leftKey, options) };
15690
- }, {});
15691
- }
15692
- function FromMappedKey4(type, mappedKey, options) {
15693
- return FromPropertyKeys3(type, mappedKey.keys, options);
15694
- }
15695
- function PickFromMappedKey(type, mappedKey, options) {
15696
- const properties = FromMappedKey4(type, mappedKey, options);
15697
- return MappedResult(properties);
15698
- }
15699
-
15700
- // ../../node_modules/@sinclair/typebox/build/esm/type/partial/partial.mjs
15701
- function FromComputed3(target, parameters) {
15702
- return Computed("Partial", [Computed(target, parameters)]);
15703
- }
15704
- function FromRef3($ref) {
15705
- return Computed("Partial", [Ref($ref)]);
15706
- }
15707
- function FromProperties16(properties) {
15708
- const partialProperties = {};
15709
- for (const K of globalThis.Object.getOwnPropertyNames(properties))
15710
- partialProperties[K] = Optional(properties[K]);
15711
- return partialProperties;
15712
- }
15713
- function FromObject5(type, properties) {
15714
- const options = Discard(type, [TransformKind, "$id", "required", "properties"]);
15715
- const mappedProperties = FromProperties16(properties);
15716
- return Object2(mappedProperties, options);
15717
- }
15718
- function FromRest6(types) {
15719
- return types.map((type) => PartialResolve(type));
15720
- }
15721
- function PartialResolve(type) {
15722
- return (
15723
- // Mappable
15724
- 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) : (
15725
- // Intrinsic
15726
- 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 : (
15727
- // Passthrough
15728
- Object2({})
15729
- )
15730
- )
15731
- );
15732
- }
15733
- function Partial(type, options) {
15734
- if (IsMappedResult(type)) {
15735
- return PartialFromMappedResult(type, options);
15736
- } else {
15737
- return CreateType({ ...PartialResolve(type), ...options });
15738
- }
15739
- }
15740
-
15741
- // ../../node_modules/@sinclair/typebox/build/esm/type/partial/partial-from-mapped-result.mjs
15742
- function FromProperties17(K, options) {
15743
- const Acc = {};
15744
- for (const K2 of globalThis.Object.getOwnPropertyNames(K))
15745
- Acc[K2] = Partial(K[K2], Clone(options));
15746
- return Acc;
15747
- }
15748
- function FromMappedResult11(R, options) {
15749
- return FromProperties17(R.properties, options);
15750
- }
15751
- function PartialFromMappedResult(R, options) {
15752
- const P = FromMappedResult11(R, options);
15753
- return MappedResult(P);
15754
- }
15755
-
15756
- // ../../node_modules/@sinclair/typebox/build/esm/type/required/required.mjs
15757
- function FromComputed4(target, parameters) {
15758
- return Computed("Required", [Computed(target, parameters)]);
15759
- }
15760
- function FromRef4($ref) {
15761
- return Computed("Required", [Ref($ref)]);
15762
- }
15763
- function FromProperties18(properties) {
15764
- const requiredProperties = {};
15765
- for (const K of globalThis.Object.getOwnPropertyNames(properties))
15766
- requiredProperties[K] = Discard(properties[K], [OptionalKind]);
15767
- return requiredProperties;
15768
- }
15769
- function FromObject6(type, properties) {
15770
- const options = Discard(type, [TransformKind, "$id", "required", "properties"]);
15771
- const mappedProperties = FromProperties18(properties);
15772
- return Object2(mappedProperties, options);
15773
- }
15774
- function FromRest7(types) {
15775
- return types.map((type) => RequiredResolve(type));
15776
- }
15777
- function RequiredResolve(type) {
15778
- return (
15779
- // Mappable
15780
- 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) : (
15781
- // Intrinsic
15782
- 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 : (
15783
- // Passthrough
15784
- Object2({})
15785
- )
15786
- )
15787
- );
15788
- }
15789
- function Required(type, options) {
15790
- if (IsMappedResult(type)) {
15791
- return RequiredFromMappedResult(type, options);
15792
- } else {
15793
- return CreateType({ ...RequiredResolve(type), ...options });
15794
- }
15795
- }
15796
-
15797
- // ../../node_modules/@sinclair/typebox/build/esm/type/required/required-from-mapped-result.mjs
15798
- function FromProperties19(P, options) {
15799
- const Acc = {};
15800
- for (const K2 of globalThis.Object.getOwnPropertyNames(P))
15801
- Acc[K2] = Required(P[K2], options);
15802
- return Acc;
15803
- }
15804
- function FromMappedResult12(R, options) {
15805
- return FromProperties19(R.properties, options);
15806
- }
15807
- function RequiredFromMappedResult(R, options) {
15808
- const P = FromMappedResult12(R, options);
15809
- return MappedResult(P);
15810
- }
15811
-
15812
- // ../../node_modules/@sinclair/typebox/build/esm/type/module/compute.mjs
15813
- function DereferenceParameters(moduleProperties, types) {
15814
- return types.map((type) => {
15815
- return IsRef(type) ? Dereference(moduleProperties, type.$ref) : FromType2(moduleProperties, type);
15816
- });
15817
- }
15818
- function Dereference(moduleProperties, ref) {
15819
- return ref in moduleProperties ? IsRef(moduleProperties[ref]) ? Dereference(moduleProperties, moduleProperties[ref].$ref) : FromType2(moduleProperties, moduleProperties[ref]) : Never();
15820
- }
15821
- function FromAwaited(parameters) {
15822
- return Awaited(parameters[0]);
15823
- }
15824
- function FromIndex(parameters) {
15825
- return Index(parameters[0], parameters[1]);
15826
- }
15827
- function FromKeyOf(parameters) {
15828
- return KeyOf(parameters[0]);
15829
- }
15830
- function FromPartial(parameters) {
15831
- return Partial(parameters[0]);
15832
- }
15833
- function FromOmit(parameters) {
15834
- return Omit(parameters[0], parameters[1]);
15835
- }
15836
- function FromPick(parameters) {
15837
- return Pick(parameters[0], parameters[1]);
15838
- }
15839
- function FromRequired(parameters) {
15840
- return Required(parameters[0]);
15841
- }
15842
- function FromComputed5(moduleProperties, target, parameters) {
15843
- const dereferenced = DereferenceParameters(moduleProperties, parameters);
15844
- 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();
15845
- }
15846
- function FromArray6(moduleProperties, type) {
15847
- return Array2(FromType2(moduleProperties, type));
15848
- }
15849
- function FromAsyncIterator3(moduleProperties, type) {
15850
- return AsyncIterator(FromType2(moduleProperties, type));
15851
- }
15852
- function FromConstructor3(moduleProperties, parameters, instanceType) {
15853
- return Constructor(FromTypes2(moduleProperties, parameters), FromType2(moduleProperties, instanceType));
15854
- }
15855
- function FromFunction3(moduleProperties, parameters, returnType) {
15856
- return Function2(FromTypes2(moduleProperties, parameters), FromType2(moduleProperties, returnType));
15857
- }
15858
- function FromIntersect8(moduleProperties, types) {
15859
- return Intersect(FromTypes2(moduleProperties, types));
15860
- }
15861
- function FromIterator3(moduleProperties, type) {
15862
- return Iterator(FromType2(moduleProperties, type));
15863
- }
15864
- function FromObject7(moduleProperties, properties) {
15865
- return Object2(globalThis.Object.keys(properties).reduce((result, key) => {
15866
- return { ...result, [key]: FromType2(moduleProperties, properties[key]) };
15867
- }, {}));
15868
- }
15869
- function FromRecord3(moduleProperties, type) {
15870
- const [value, pattern] = [FromType2(moduleProperties, RecordValue2(type)), RecordPattern(type)];
15871
- const result = CloneType(type);
15872
- result.patternProperties[pattern] = value;
15873
- return result;
15874
- }
15875
- function FromTransform(moduleProperties, transform) {
15876
- return IsRef(transform) ? { ...Dereference(moduleProperties, transform.$ref), [TransformKind]: transform[TransformKind] } : transform;
15877
- }
15878
- function FromTuple5(moduleProperties, types) {
15879
- return Tuple(FromTypes2(moduleProperties, types));
15880
- }
15881
- function FromUnion10(moduleProperties, types) {
15882
- return Union(FromTypes2(moduleProperties, types));
15883
- }
15884
- function FromTypes2(moduleProperties, types) {
15885
- return types.map((type) => FromType2(moduleProperties, type));
15886
- }
15887
- function FromType2(moduleProperties, type) {
15888
- return (
15889
- // Modifiers
15890
- IsOptional(type) ? CreateType(FromType2(moduleProperties, Discard(type, [OptionalKind])), type) : IsReadonly(type) ? CreateType(FromType2(moduleProperties, Discard(type, [ReadonlyKind])), type) : (
15891
- // Transform
15892
- IsTransform(type) ? CreateType(FromTransform(moduleProperties, type), type) : (
15893
- // Types
15894
- 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
15895
- )
15896
- )
15897
- );
15898
- }
15899
- function ComputeType(moduleProperties, key) {
15900
- return key in moduleProperties ? FromType2(moduleProperties, moduleProperties[key]) : Never();
15901
- }
15902
- function ComputeModuleProperties(moduleProperties) {
15903
- return globalThis.Object.getOwnPropertyNames(moduleProperties).reduce((result, key) => {
15904
- return { ...result, [key]: ComputeType(moduleProperties, key) };
15905
- }, {});
15906
- }
15907
-
15908
- // ../../node_modules/@sinclair/typebox/build/esm/type/module/module.mjs
15909
- var TModule = class {
15910
- constructor($defs) {
15911
- const computed = ComputeModuleProperties($defs);
15912
- const identified = this.WithIdentifiers(computed);
15913
- this.$defs = identified;
15914
- }
15915
- /** `[Json]` Imports a Type by Key. */
15916
- Import(key, options) {
15917
- const $defs = { ...this.$defs, [key]: CreateType(this.$defs[key], options) };
15918
- return CreateType({ [Kind]: "Import", $defs, $ref: key });
15919
- }
15920
- // prettier-ignore
15921
- WithIdentifiers($defs) {
15922
- return globalThis.Object.getOwnPropertyNames($defs).reduce((result, key) => {
15923
- return { ...result, [key]: { ...$defs[key], $id: key } };
15924
- }, {});
15925
- }
15926
- };
15927
- function Module(properties) {
15928
- return new TModule(properties);
15929
- }
15930
-
15931
- // ../../node_modules/@sinclair/typebox/build/esm/type/not/not.mjs
15932
- function Not(type, options) {
15933
- return CreateType({ [Kind]: "Not", not: type }, options);
15934
- }
15935
-
15936
- // ../../node_modules/@sinclair/typebox/build/esm/type/parameters/parameters.mjs
15937
- function Parameters(schema, options) {
15938
- return IsFunction2(schema) ? Tuple(schema.parameters, options) : Never();
15939
- }
15940
-
15941
- // ../../node_modules/@sinclair/typebox/build/esm/type/recursive/recursive.mjs
15942
- var Ordinal = 0;
15943
- function Recursive(callback, options = {}) {
15944
- if (IsUndefined(options.$id))
15945
- options.$id = `T${Ordinal++}`;
15946
- const thisType = CloneType(callback({ [Kind]: "This", $ref: `${options.$id}` }));
15947
- thisType.$id = options.$id;
15948
- return CreateType({ [Hint]: "Recursive", ...thisType }, options);
15949
- }
15950
-
15951
- // ../../node_modules/@sinclair/typebox/build/esm/type/regexp/regexp.mjs
15952
- function RegExp2(unresolved, options) {
15953
- const expr = IsString(unresolved) ? new globalThis.RegExp(unresolved) : unresolved;
15954
- return CreateType({ [Kind]: "RegExp", type: "RegExp", source: expr.source, flags: expr.flags }, options);
15955
- }
15956
-
15957
- // ../../node_modules/@sinclair/typebox/build/esm/type/rest/rest.mjs
15958
- function RestResolve(T) {
15959
- return IsIntersect(T) ? T.allOf : IsUnion(T) ? T.anyOf : IsTuple(T) ? T.items ?? [] : [];
15960
- }
15961
- function Rest(T) {
15962
- return RestResolve(T);
15963
- }
15964
-
15965
- // ../../node_modules/@sinclair/typebox/build/esm/type/return-type/return-type.mjs
15966
- function ReturnType(schema, options) {
15967
- return IsFunction2(schema) ? CreateType(schema.returns, options) : Never(options);
15968
- }
15969
-
15970
- // ../../node_modules/@sinclair/typebox/build/esm/type/transform/transform.mjs
15971
- var TransformDecodeBuilder = class {
15972
- constructor(schema) {
15973
- this.schema = schema;
15974
- }
15975
- Decode(decode) {
15976
- return new TransformEncodeBuilder(this.schema, decode);
15977
- }
15978
- };
15979
- var TransformEncodeBuilder = class {
15980
- constructor(schema, decode) {
15981
- this.schema = schema;
15982
- this.decode = decode;
15983
- }
15984
- EncodeTransform(encode, schema) {
15985
- const Encode = (value) => schema[TransformKind].Encode(encode(value));
15986
- const Decode = (value) => this.decode(schema[TransformKind].Decode(value));
15987
- const Codec = { Encode, Decode };
15988
- return { ...schema, [TransformKind]: Codec };
15989
- }
15990
- EncodeSchema(encode, schema) {
15991
- const Codec = { Decode: this.decode, Encode: encode };
15992
- return { ...schema, [TransformKind]: Codec };
15993
- }
15994
- Encode(encode) {
15995
- return IsTransform(this.schema) ? this.EncodeTransform(encode, this.schema) : this.EncodeSchema(encode, this.schema);
15996
- }
15997
- };
15998
- function Transform(schema) {
15999
- return new TransformDecodeBuilder(schema);
16000
- }
16001
-
16002
- // ../../node_modules/@sinclair/typebox/build/esm/type/unsafe/unsafe.mjs
16003
- function Unsafe(options = {}) {
16004
- return CreateType({ [Kind]: options[Kind] ?? "Unsafe" }, options);
16005
- }
16006
-
16007
- // ../../node_modules/@sinclair/typebox/build/esm/type/void/void.mjs
16008
- function Void(options) {
16009
- return CreateType({ [Kind]: "Void", type: "void" }, options);
16010
- }
16011
-
16012
- // ../../node_modules/@sinclair/typebox/build/esm/type/type/type.mjs
16013
- var type_exports2 = {};
16014
- __export(type_exports2, {
16015
- Any: () => Any,
16016
- Argument: () => Argument,
16017
- Array: () => Array2,
16018
- AsyncIterator: () => AsyncIterator,
16019
- Awaited: () => Awaited,
16020
- BigInt: () => BigInt,
16021
- Boolean: () => Boolean2,
16022
- Capitalize: () => Capitalize,
16023
- Composite: () => Composite,
16024
- Const: () => Const,
16025
- Constructor: () => Constructor,
16026
- ConstructorParameters: () => ConstructorParameters,
16027
- Date: () => Date2,
16028
- Enum: () => Enum,
16029
- Exclude: () => Exclude,
16030
- Extends: () => Extends,
16031
- Extract: () => Extract,
16032
- Function: () => Function2,
16033
- Index: () => Index,
16034
- InstanceType: () => InstanceType,
16035
- Instantiate: () => Instantiate,
16036
- Integer: () => Integer,
16037
- Intersect: () => Intersect,
16038
- Iterator: () => Iterator,
16039
- KeyOf: () => KeyOf,
16040
- Literal: () => Literal,
16041
- Lowercase: () => Lowercase,
16042
- Mapped: () => Mapped,
16043
- Module: () => Module,
16044
- Never: () => Never,
16045
- Not: () => Not,
16046
- Null: () => Null,
16047
- Number: () => Number2,
16048
- Object: () => Object2,
16049
- Omit: () => Omit,
16050
- Optional: () => Optional,
16051
- Parameters: () => Parameters,
16052
- Partial: () => Partial,
16053
- Pick: () => Pick,
16054
- Promise: () => Promise2,
16055
- Readonly: () => Readonly,
16056
- ReadonlyOptional: () => ReadonlyOptional,
16057
- Record: () => Record,
16058
- Recursive: () => Recursive,
16059
- Ref: () => Ref,
16060
- RegExp: () => RegExp2,
16061
- Required: () => Required,
16062
- Rest: () => Rest,
16063
- ReturnType: () => ReturnType,
16064
- String: () => String2,
16065
- Symbol: () => Symbol2,
16066
- TemplateLiteral: () => TemplateLiteral,
16067
- Transform: () => Transform,
16068
- Tuple: () => Tuple,
16069
- Uint8Array: () => Uint8Array2,
16070
- Uncapitalize: () => Uncapitalize,
16071
- Undefined: () => Undefined,
16072
- Union: () => Union,
16073
- Unknown: () => Unknown,
16074
- Unsafe: () => Unsafe,
16075
- Uppercase: () => Uppercase,
16076
- Void: () => Void
16077
- });
16078
-
16079
- // ../../node_modules/@sinclair/typebox/build/esm/type/type/index.mjs
16080
- var Type = type_exports2;
16081
-
16082
- // ../plays/authoring-contract.ts
16083
- var PLAY_SQL_LISTENER_WHERE_OPERATORS = [
16084
- "eq",
16085
- "neq",
16086
- "in",
16087
- "notIn",
16088
- "isNull",
16089
- "isNotNull",
16090
- "ilike"
16091
- ];
16092
- var PLAY_SQL_LISTENER_ID_PATTERN = /^[a-zA-Z][a-zA-Z0-9_-]*$/;
16093
- var PLAY_SQL_LISTENER_TOOL_PATTERN = /^[a-zA-Z][a-zA-Z0-9_-]*\.[a-zA-Z][a-zA-Z0-9_-]*$/;
16094
- var PLAY_SQL_LISTENER_WHERE_OPERATOR_SET = new Set(
16095
- PLAY_SQL_LISTENER_WHERE_OPERATORS
16096
- );
16097
- var PLAY_AUTHORING_DOCUMENTATION = {
16098
- fetchBatching: {
16099
- warning: "A static ctx.fetch key inside a loop is a warning because every iteration must still have distinct method, URL, body, or safe headers. One durable receipt must never stand in for every request.",
16100
- guidance: "Keep the static fetch label. For a mutating batch, make the body distinct and use a replay-stable external Idempotency-Key such as `${ctx.run.id}:signals:${batchIndex}`."
16101
- },
16102
- runId: {
16103
- semantics: "ctx.run.id is stable while Deepline retries or resumes one durable run. A separately submitted run receives a new id.",
16104
- use: "Use it when deriving an external idempotency key for a sequence of batches."
16105
- },
16106
- staticCallKeys: {
16107
- constraint: "Durable call keys \u2014 the ctx.fetch key, the ctx.dataset key, the ctx.step id \u2014 must be static string literals. The key names a durable receipt, so check, publish, and replay have to agree on it before the body runs. A key computed at runtime cannot be resolved at check time and is rejected.",
16108
- consequence: "This is an architectural constraint, not a style rule. A play cannot loop over a computed key, so it cannot page a large table with a helper like page(pageNumber). Unrolling one literal key per page is not a design at any real page count.",
16109
- workaround: "Push the aggregation server-side and call it once: a SQL function, a view, or a provider endpoint that returns the whole result. Keep unrolled literal keys only for a handful of genuinely distinct calls. To fan out over rows, use ctx.dataset with a static key \u2014 the per-row receipt identity comes from the row, not from the key."
13484
+ var PLAY_SQL_LISTENER_ID_PATTERN = /^[a-zA-Z][a-zA-Z0-9_-]*$/;
13485
+ var PLAY_SQL_LISTENER_TOOL_PATTERN = /^[a-zA-Z][a-zA-Z0-9_-]*\.[a-zA-Z][a-zA-Z0-9_-]*$/;
13486
+ var PLAY_SQL_LISTENER_WHERE_OPERATOR_SET = new Set(
13487
+ PLAY_SQL_LISTENER_WHERE_OPERATORS
13488
+ );
13489
+ var PLAY_AUTHORING_DOCUMENTATION = {
13490
+ fetchBatching: {
13491
+ warning: "A static ctx.fetch key inside a loop is a warning because every iteration must still have distinct method, URL, body, or safe headers. One durable receipt must never stand in for every request.",
13492
+ guidance: "Keep the static fetch label. For a mutating batch, make the body distinct and use a replay-stable external Idempotency-Key such as `${ctx.run.id}:signals:${batchIndex}`."
13493
+ },
13494
+ runId: {
13495
+ semantics: "ctx.run.id is stable while Deepline retries or resumes one durable run. A separately submitted run receives a new id.",
13496
+ use: "Use it when deriving an external idempotency key for a sequence of batches."
13497
+ },
13498
+ staticCallKeys: {
13499
+ constraint: "Durable call keys \u2014 the ctx.fetch key, the ctx.dataset key, the ctx.step id \u2014 must be static string literals. The key names a durable receipt, so check, publish, and replay have to agree on it before the body runs. A key computed at runtime cannot be resolved at check time and is rejected.",
13500
+ consequence: "This is an architectural constraint, not a style rule. A play cannot loop over a computed key, so it cannot page a large table with a helper like page(pageNumber). Unrolling one literal key per page is not a design at any real page count.",
13501
+ workaround: "Push the aggregation server-side and call it once: a SQL function, a view, or a provider endpoint that returns the whole result. Keep unrolled literal keys only for a handful of genuinely distinct calls. To fan out over rows, use ctx.dataset with a static key \u2014 the per-row receipt identity comes from the row, not from the key."
16110
13502
  }
16111
13503
  };
16112
13504
  var PLAY_AUTHORING_STATIC_FETCH_KEY_HINT = `${PLAY_AUTHORING_DOCUMENTATION.staticCallKeys.workaround} Do not compute the key.`;
16113
- var SecretEnvironmentNameSchema = Type.String({
13505
+ var SecretEnvironmentNameSchema = import_typebox.Type.String({
16114
13506
  pattern: "^[A-Z][A-Z0-9_]{1,63}$",
16115
13507
  description: "An uppercase environment variable name beginning with a letter."
16116
13508
  });
16117
- var SqlListenerFilterScalarSchema = Type.Union([
16118
- Type.String(),
16119
- Type.Number(),
16120
- Type.Boolean(),
16121
- Type.Null()
13509
+ var SqlListenerFilterScalarSchema = import_typebox.Type.Union([
13510
+ import_typebox.Type.String(),
13511
+ import_typebox.Type.Number(),
13512
+ import_typebox.Type.Boolean(),
13513
+ import_typebox.Type.Null()
16122
13514
  ]);
16123
13515
  var PLAY_AUTHORING_FIELD_REGISTRY = {
16124
13516
  description: {
16125
- schema: Type.String({ minLength: 1 }),
13517
+ schema: import_typebox.Type.String({ minLength: 1 }),
16126
13518
  fixtures: {
16127
13519
  valid: "Enrich a company.",
16128
13520
  invalid: "",
@@ -16138,7 +13530,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16138
13530
  errorMessage: "description must be a non-empty static string."
16139
13531
  },
16140
13532
  "compatibility.toolErrorSchemaVersion": {
16141
- schema: Type.Union([Type.Literal(0), Type.Literal(1)]),
13533
+ schema: import_typebox.Type.Union([import_typebox.Type.Literal(0), import_typebox.Type.Literal(1)]),
16142
13534
  fixtures: {
16143
13535
  valid: 1,
16144
13536
  invalid: 2,
@@ -16154,7 +13546,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16154
13546
  errorMessage: "compatibility.toolErrorSchemaVersion must be the static literal 0 or 1."
16155
13547
  },
16156
13548
  "compatibility.toolResponseReceiptRevision": {
16157
- schema: Type.String({
13549
+ schema: import_typebox.Type.String({
16158
13550
  minLength: 1,
16159
13551
  maxLength: 64,
16160
13552
  pattern: "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"
@@ -16174,7 +13566,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16174
13566
  errorMessage: "compatibility.toolResponseReceiptRevision must be a non-empty static identifier using letters, numbers, dots, underscores, or hyphens."
16175
13567
  },
16176
13568
  inline: {
16177
- schema: Type.Boolean(),
13569
+ schema: import_typebox.Type.Boolean(),
16178
13570
  fixtures: {
16179
13571
  valid: true,
16180
13572
  invalid: "true",
@@ -16190,7 +13582,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16190
13582
  errorMessage: "inline must be a static boolean."
16191
13583
  },
16192
13584
  "billing.maxCreditsPerRun": {
16193
- schema: Type.Number({ exclusiveMinimum: 0 }),
13585
+ schema: import_typebox.Type.Number({ exclusiveMinimum: 0 }),
16194
13586
  fixtures: {
16195
13587
  valid: 1,
16196
13588
  invalid: 0,
@@ -16222,7 +13614,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16222
13614
  errorMessage: "bindings.webhook.hmac.secretEnv must be an uppercase environment variable name beginning with a letter."
16223
13615
  },
16224
13616
  "bindings.webhook.hmac.algorithm": {
16225
- schema: Type.Literal("sha256"),
13617
+ schema: import_typebox.Type.Literal("sha256"),
16226
13618
  fixtures: {
16227
13619
  valid: "sha256",
16228
13620
  invalid: "sha1",
@@ -16238,7 +13630,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16238
13630
  errorMessage: 'bindings.webhook.hmac.algorithm must be the static literal "sha256".'
16239
13631
  },
16240
13632
  "bindings.webhook.hmac.header": {
16241
- schema: Type.String({ minLength: 1 }),
13633
+ schema: import_typebox.Type.String({ minLength: 1 }),
16242
13634
  fixtures: {
16243
13635
  valid: "x-signature",
16244
13636
  invalid: "",
@@ -16254,7 +13646,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16254
13646
  errorMessage: "bindings.webhook.hmac.header must be a non-empty static string."
16255
13647
  },
16256
13648
  "bindings.webhook.auth.type": {
16257
- schema: Type.Literal("standard-webhooks"),
13649
+ schema: import_typebox.Type.Literal("standard-webhooks"),
16258
13650
  fixtures: {
16259
13651
  valid: "standard-webhooks",
16260
13652
  invalid: "svix",
@@ -16272,7 +13664,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16272
13664
  errorMessage: 'bindings.webhook.auth.type must be the static literal "standard-webhooks".'
16273
13665
  },
16274
13666
  "bindings.webhook.auth.headerFamily": {
16275
- schema: Type.Union([Type.Literal("standard"), Type.Literal("svix")]),
13667
+ schema: import_typebox.Type.Union([import_typebox.Type.Literal("standard"), import_typebox.Type.Literal("svix")]),
16276
13668
  fixtures: {
16277
13669
  valid: "svix",
16278
13670
  invalid: "webhook",
@@ -16308,7 +13700,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16308
13700
  errorMessage: "bindings.webhook.auth.signingSecrets entries must be uppercase Deepline Secret names beginning with a letter."
16309
13701
  },
16310
13702
  "bindings.webhook.auth.toleranceSeconds": {
16311
- schema: Type.Integer({ minimum: 1, maximum: 3600 }),
13703
+ schema: import_typebox.Type.Integer({ minimum: 1, maximum: 3600 }),
16312
13704
  fixtures: {
16313
13705
  valid: 300,
16314
13706
  invalid: 0,
@@ -16324,7 +13716,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16324
13716
  errorMessage: "bindings.webhook.auth.toleranceSeconds must be a static whole number from 1 through 3600."
16325
13717
  },
16326
13718
  "bindings.cron.schedule": {
16327
- schema: Type.String({ minLength: 1 }),
13719
+ schema: import_typebox.Type.String({ minLength: 1 }),
16328
13720
  fixtures: {
16329
13721
  valid: "0 9 * * *",
16330
13722
  invalid: "",
@@ -16340,7 +13732,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16340
13732
  errorMessage: "bindings.cron.schedule must be a non-empty static string."
16341
13733
  },
16342
13734
  "bindings.cron.timezone": {
16343
- schema: Type.String({ minLength: 1 }),
13735
+ schema: import_typebox.Type.String({ minLength: 1 }),
16344
13736
  fixtures: {
16345
13737
  valid: "UTC",
16346
13738
  invalid: "",
@@ -16356,7 +13748,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16356
13748
  errorMessage: "bindings.cron.timezone must be a valid non-empty IANA timezone string."
16357
13749
  },
16358
13750
  "bindings.sqlListeners": {
16359
- schema: Type.Array(Type.Object({}, { additionalProperties: true })),
13751
+ schema: import_typebox.Type.Array(import_typebox.Type.Object({}, { additionalProperties: true })),
16360
13752
  fixtures: {
16361
13753
  valid: [],
16362
13754
  invalid: "listeners",
@@ -16372,7 +13764,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16372
13764
  errorMessage: "bindings.sqlListeners must be a static array of objects."
16373
13765
  },
16374
13766
  "bindings.sqlListeners[].id": {
16375
- schema: Type.String({ pattern: PLAY_SQL_LISTENER_ID_PATTERN.source }),
13767
+ schema: import_typebox.Type.String({ pattern: PLAY_SQL_LISTENER_ID_PATTERN.source }),
16376
13768
  fixtures: {
16377
13769
  valid: "job-openings",
16378
13770
  invalid: "1-job-openings",
@@ -16388,7 +13780,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16388
13780
  errorMessage: "bindings.sqlListeners[].id must begin with a letter and contain only letters, numbers, underscores, or hyphens."
16389
13781
  },
16390
13782
  "bindings.sqlListeners[].tool": {
16391
- schema: Type.String({ pattern: PLAY_SQL_LISTENER_TOOL_PATTERN.source }),
13783
+ schema: import_typebox.Type.String({ pattern: PLAY_SQL_LISTENER_TOOL_PATTERN.source }),
16392
13784
  fixtures: {
16393
13785
  valid: "deepline_native.company_radar",
16394
13786
  invalid: "company_radar",
@@ -16404,7 +13796,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16404
13796
  errorMessage: "bindings.sqlListeners[].tool must use static provider.tool syntax."
16405
13797
  },
16406
13798
  "bindings.sqlListeners[].stream": {
16407
- schema: Type.String({ pattern: PLAY_SQL_LISTENER_ID_PATTERN.source }),
13799
+ schema: import_typebox.Type.String({ pattern: PLAY_SQL_LISTENER_ID_PATTERN.source }),
16408
13800
  fixtures: {
16409
13801
  valid: "company_job_openings",
16410
13802
  invalid: "1-company-job-openings",
@@ -16420,10 +13812,10 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16420
13812
  errorMessage: "bindings.sqlListeners[].stream must be a static stream identifier."
16421
13813
  },
16422
13814
  "bindings.sqlListeners[].operations[]": {
16423
- schema: Type.Union([
16424
- Type.Literal("INSERT"),
16425
- Type.Literal("UPDATE"),
16426
- Type.Literal("DELETE")
13815
+ schema: import_typebox.Type.Union([
13816
+ import_typebox.Type.Literal("INSERT"),
13817
+ import_typebox.Type.Literal("UPDATE"),
13818
+ import_typebox.Type.Literal("DELETE")
16427
13819
  ]),
16428
13820
  fixtures: {
16429
13821
  valid: "INSERT",
@@ -16440,7 +13832,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16440
13832
  errorMessage: "bindings.sqlListeners[].operations entries must be INSERT, UPDATE, or DELETE."
16441
13833
  },
16442
13834
  "bindings.sqlListeners[].where.before": {
16443
- schema: Type.Record(Type.String(), Type.Unknown()),
13835
+ schema: import_typebox.Type.Record(import_typebox.Type.String(), import_typebox.Type.Unknown()),
16444
13836
  fixtures: {
16445
13837
  valid: { status: { eq: "open" } },
16446
13838
  invalid: "status=open",
@@ -16456,7 +13848,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16456
13848
  errorMessage: "bindings.sqlListeners[].where.before must be a static object keyed by column."
16457
13849
  },
16458
13850
  "bindings.sqlListeners[].where.after": {
16459
- schema: Type.Record(Type.String(), Type.Unknown()),
13851
+ schema: import_typebox.Type.Record(import_typebox.Type.String(), import_typebox.Type.Unknown()),
16460
13852
  fixtures: {
16461
13853
  valid: { status: { eq: "open" } },
16462
13854
  invalid: "status=open",
@@ -16504,7 +13896,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16504
13896
  errorMessage: "SQL listener neq must compare a scalar value."
16505
13897
  },
16506
13898
  "bindings.sqlListeners[].where.*.*.in": {
16507
- schema: Type.Array(SqlListenerFilterScalarSchema, { minItems: 1 }),
13899
+ schema: import_typebox.Type.Array(SqlListenerFilterScalarSchema, { minItems: 1 }),
16508
13900
  fixtures: {
16509
13901
  valid: ["open", "pending"],
16510
13902
  invalid: [],
@@ -16520,7 +13912,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16520
13912
  errorMessage: "SQL listener in must contain at least one scalar value."
16521
13913
  },
16522
13914
  "bindings.sqlListeners[].where.*.*.notIn": {
16523
- schema: Type.Array(SqlListenerFilterScalarSchema, { minItems: 1 }),
13915
+ schema: import_typebox.Type.Array(SqlListenerFilterScalarSchema, { minItems: 1 }),
16524
13916
  fixtures: {
16525
13917
  valid: ["closed"],
16526
13918
  invalid: [],
@@ -16536,7 +13928,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16536
13928
  errorMessage: "SQL listener notIn must contain at least one scalar value."
16537
13929
  },
16538
13930
  "bindings.sqlListeners[].where.*.*.isNull": {
16539
- schema: Type.Literal(true),
13931
+ schema: import_typebox.Type.Literal(true),
16540
13932
  fixtures: {
16541
13933
  valid: true,
16542
13934
  invalid: false,
@@ -16552,7 +13944,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16552
13944
  errorMessage: "SQL listener isNull must be the static literal true."
16553
13945
  },
16554
13946
  "bindings.sqlListeners[].where.*.*.isNotNull": {
16555
- schema: Type.Literal(true),
13947
+ schema: import_typebox.Type.Literal(true),
16556
13948
  fixtures: {
16557
13949
  valid: true,
16558
13950
  invalid: false,
@@ -16568,7 +13960,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16568
13960
  errorMessage: "SQL listener isNotNull must be the static literal true."
16569
13961
  },
16570
13962
  "bindings.sqlListeners[].where.*.*.ilike": {
16571
- schema: Type.String(),
13963
+ schema: import_typebox.Type.String(),
16572
13964
  fixtures: {
16573
13965
  valid: "%software%",
16574
13966
  invalid: 1,
@@ -16600,7 +13992,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16600
13992
  errorMessage: "bindings.secrets entries must be uppercase environment variable names beginning with a letter."
16601
13993
  },
16602
13994
  "ctx.tools.execute.staleAfterSeconds": {
16603
- schema: Type.Union([Type.Null(), Type.Integer({ minimum: 0 })]),
13995
+ schema: import_typebox.Type.Union([import_typebox.Type.Null(), import_typebox.Type.Integer({ minimum: 0 })]),
16604
13996
  fixtures: {
16605
13997
  valid: 0,
16606
13998
  invalid: -1,
@@ -16616,7 +14008,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16616
14008
  errorMessage: "staleAfterSeconds must be null, 0 (always execute), or a positive whole number of seconds."
16617
14009
  },
16618
14010
  "ctx.tools.execute.id": {
16619
- schema: Type.String({ pattern: "\\S" }),
14011
+ schema: import_typebox.Type.String({ pattern: "\\S" }),
16620
14012
  fixtures: {
16621
14013
  valid: "company-enrichment",
16622
14014
  invalid: "",
@@ -16632,7 +14024,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16632
14024
  errorMessage: "ctx.tools.execute id must be a non-empty string."
16633
14025
  },
16634
14026
  "ctx.tools.execute.tool": {
16635
- schema: Type.String({ pattern: "\\S" }),
14027
+ schema: import_typebox.Type.String({ pattern: "\\S" }),
16636
14028
  fixtures: {
16637
14029
  valid: "openmart_enrich_company",
16638
14030
  invalid: "",
@@ -16648,7 +14040,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16648
14040
  errorMessage: "ctx.tools.execute tool must be a non-empty tool id."
16649
14041
  },
16650
14042
  "ctx.tools.execute.input": {
16651
- schema: Type.Record(Type.String(), Type.Unknown()),
14043
+ schema: import_typebox.Type.Record(import_typebox.Type.String(), import_typebox.Type.Unknown()),
16652
14044
  fixtures: {
16653
14045
  valid: { domain: "example.com" },
16654
14046
  invalid: "example.com",
@@ -16664,7 +14056,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16664
14056
  errorMessage: "ctx.tools.execute input must be an object."
16665
14057
  },
16666
14058
  "ctx.tools.execute.description": {
16667
- schema: Type.String(),
14059
+ schema: import_typebox.Type.String(),
16668
14060
  fixtures: {
16669
14061
  valid: "Enrich the company.",
16670
14062
  invalid: 1,
@@ -16680,7 +14072,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16680
14072
  errorMessage: "ctx.tools.execute description must be a string."
16681
14073
  },
16682
14074
  "ctx.tools.execute.force": {
16683
- schema: Type.Boolean(),
14075
+ schema: import_typebox.Type.Boolean(),
16684
14076
  fixtures: {
16685
14077
  valid: true,
16686
14078
  invalid: "true",
@@ -16696,7 +14088,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16696
14088
  errorMessage: "ctx.tools.execute force must be a boolean."
16697
14089
  },
16698
14090
  "ctx.tools.execute.timeoutMs": {
16699
- schema: Type.Integer({ minimum: 1 }),
14091
+ schema: import_typebox.Type.Integer({ minimum: 1 }),
16700
14092
  fixtures: {
16701
14093
  valid: 1,
16702
14094
  invalid: 0,
@@ -16712,7 +14104,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16712
14104
  errorMessage: "timeoutMs must be a positive whole number of milliseconds."
16713
14105
  },
16714
14106
  "ctx.tools.execute.receiptWaitMs": {
16715
- schema: Type.Integer({ minimum: 1 }),
14107
+ schema: import_typebox.Type.Integer({ minimum: 1 }),
16716
14108
  fixtures: {
16717
14109
  valid: 1,
16718
14110
  invalid: 0,
@@ -16728,7 +14120,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16728
14120
  errorMessage: "receiptWaitMs must be a positive whole number of milliseconds."
16729
14121
  },
16730
14122
  "ctx.csv.options.description": {
16731
- schema: Type.String({ minLength: 1 }),
14123
+ schema: import_typebox.Type.String({ minLength: 1 }),
16732
14124
  fixtures: {
16733
14125
  valid: "Load account rows.",
16734
14126
  invalid: "",
@@ -16744,11 +14136,11 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16744
14136
  errorMessage: "ctx.csv options.description must be non-empty."
16745
14137
  },
16746
14138
  "ctx.csv.options.columns": {
16747
- schema: Type.Record(
16748
- Type.String(),
16749
- Type.Union([
16750
- Type.String({ minLength: 1 }),
16751
- Type.Array(Type.String({ minLength: 1 }), { minItems: 1 })
14139
+ schema: import_typebox.Type.Record(
14140
+ import_typebox.Type.String(),
14141
+ import_typebox.Type.Union([
14142
+ import_typebox.Type.String({ minLength: 1 }),
14143
+ import_typebox.Type.Array(import_typebox.Type.String({ minLength: 1 }), { minItems: 1 })
16752
14144
  ])
16753
14145
  ),
16754
14146
  fixtures: {
@@ -16766,11 +14158,11 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16766
14158
  errorMessage: "ctx.csv options.columns values must be a non-empty header or alias list."
16767
14159
  },
16768
14160
  "ctx.csv.options.rename": {
16769
- schema: Type.Record(
16770
- Type.String(),
16771
- Type.Union([
16772
- Type.String({ minLength: 1 }),
16773
- Type.Array(Type.String({ minLength: 1 }), { minItems: 1 })
14161
+ schema: import_typebox.Type.Record(
14162
+ import_typebox.Type.String(),
14163
+ import_typebox.Type.Union([
14164
+ import_typebox.Type.String({ minLength: 1 }),
14165
+ import_typebox.Type.Array(import_typebox.Type.String({ minLength: 1 }), { minItems: 1 })
16774
14166
  ])
16775
14167
  ),
16776
14168
  fixtures: {
@@ -16788,7 +14180,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16788
14180
  errorMessage: "ctx.csv options.rename values must be a non-empty header or alias list."
16789
14181
  },
16790
14182
  "ctx.csv.options.required": {
16791
- schema: Type.Array(Type.String({ minLength: 1 })),
14183
+ schema: import_typebox.Type.Array(import_typebox.Type.String({ minLength: 1 })),
16792
14184
  fixtures: {
16793
14185
  valid: ["domain"],
16794
14186
  invalid: [""],
@@ -16804,7 +14196,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16804
14196
  errorMessage: "ctx.csv options.required entries must be non-empty column names."
16805
14197
  },
16806
14198
  "ctx.dataset.key": {
16807
- schema: Type.String({ minLength: 1 }),
14199
+ schema: import_typebox.Type.String({ minLength: 1 }),
16808
14200
  fixtures: {
16809
14201
  valid: "accounts",
16810
14202
  invalid: "",
@@ -16820,7 +14212,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16820
14212
  errorMessage: "ctx.dataset key must be a non-empty static string."
16821
14213
  },
16822
14214
  "ctx.dataset.run.description": {
16823
- schema: Type.String({ minLength: 1 }),
14215
+ schema: import_typebox.Type.String({ minLength: 1 }),
16824
14216
  fixtures: {
16825
14217
  valid: "Enrich account rows.",
16826
14218
  invalid: "",
@@ -16836,15 +14228,15 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16836
14228
  errorMessage: "ctx.dataset run description must be non-empty."
16837
14229
  },
16838
14230
  "ctx.dataset.run.key": {
16839
- schema: Type.Union([
16840
- Type.String({ minLength: 1 }),
16841
- Type.Array(Type.String({ minLength: 1 }), { minItems: 1 }),
16842
- Type.Function(
16843
- [Type.Record(Type.String(), Type.Unknown()), Type.Integer()],
16844
- Type.Union([
16845
- Type.String(),
16846
- Type.Number(),
16847
- Type.Readonly(Type.Array(Type.Unknown()))
14231
+ schema: import_typebox.Type.Union([
14232
+ import_typebox.Type.String({ minLength: 1 }),
14233
+ import_typebox.Type.Array(import_typebox.Type.String({ minLength: 1 }), { minItems: 1 }),
14234
+ import_typebox.Type.Function(
14235
+ [import_typebox.Type.Record(import_typebox.Type.String(), import_typebox.Type.Unknown()), import_typebox.Type.Integer()],
14236
+ import_typebox.Type.Union([
14237
+ import_typebox.Type.String(),
14238
+ import_typebox.Type.Number(),
14239
+ import_typebox.Type.Readonly(import_typebox.Type.Array(import_typebox.Type.Unknown()))
16848
14240
  ])
16849
14241
  )
16850
14242
  ]),
@@ -16863,7 +14255,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16863
14255
  errorMessage: "ctx.dataset run key must be a non-empty field, field list, or key function."
16864
14256
  },
16865
14257
  "ctx.dataset.run.onRowError": {
16866
- schema: Type.Union([Type.Literal("isolate"), Type.Literal("fail")]),
14258
+ schema: import_typebox.Type.Union([import_typebox.Type.Literal("isolate"), import_typebox.Type.Literal("fail")]),
16867
14259
  fixtures: {
16868
14260
  valid: "isolate",
16869
14261
  invalid: "continue",
@@ -16879,7 +14271,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16879
14271
  errorMessage: 'ctx.dataset run onRowError must be "isolate" or "fail".'
16880
14272
  },
16881
14273
  "ctx.dataset.run.mode": {
16882
- schema: Type.Union([Type.Literal("upsert"), Type.Literal("net_new")]),
14274
+ schema: import_typebox.Type.Union([import_typebox.Type.Literal("upsert"), import_typebox.Type.Literal("net_new")]),
16883
14275
  fixtures: {
16884
14276
  valid: "upsert",
16885
14277
  invalid: "append",
@@ -16895,7 +14287,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16895
14287
  errorMessage: 'ctx.dataset run mode must be "upsert" or "net_new".'
16896
14288
  },
16897
14289
  "ctx.dataset.run.undrawnColumns": {
16898
- schema: Type.Array(Type.String({ minLength: 1 }), { minItems: 1 }),
14290
+ schema: import_typebox.Type.Array(import_typebox.Type.String({ minLength: 1 }), { minItems: 1 }),
16899
14291
  fixtures: {
16900
14292
  valid: ["miss_reason"],
16901
14293
  invalid: [],
@@ -16911,7 +14303,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16911
14303
  errorMessage: "ctx.dataset run undrawnColumns must be a non-empty array of static column-name strings."
16912
14304
  },
16913
14305
  "ctx.step.id": {
16914
- schema: Type.String({ minLength: 1 }),
14306
+ schema: import_typebox.Type.String({ minLength: 1 }),
16915
14307
  fixtures: {
16916
14308
  valid: "load-settings",
16917
14309
  invalid: "",
@@ -16927,7 +14319,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16927
14319
  errorMessage: "ctx.step id must be a non-empty static string."
16928
14320
  },
16929
14321
  "ctx.step.semanticKey": {
16930
- schema: Type.String({ minLength: 1 }),
14322
+ schema: import_typebox.Type.String({ minLength: 1 }),
16931
14323
  fixtures: {
16932
14324
  valid: "account:stripe.com",
16933
14325
  invalid: "",
@@ -16943,7 +14335,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16943
14335
  errorMessage: "ctx.step semanticKey must be a non-empty string."
16944
14336
  },
16945
14337
  "ctx.step.staleAfterSeconds": {
16946
- schema: Type.Union([Type.Null(), Type.Integer({ minimum: 0 })]),
14338
+ schema: import_typebox.Type.Union([import_typebox.Type.Null(), import_typebox.Type.Integer({ minimum: 0 })]),
16947
14339
  fixtures: {
16948
14340
  valid: 0,
16949
14341
  invalid: -1,
@@ -16959,7 +14351,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16959
14351
  errorMessage: "staleAfterSeconds must be null, 0 (always execute), or a positive whole number of seconds."
16960
14352
  },
16961
14353
  "ctx.fetch.key": {
16962
- schema: Type.String({ minLength: 1 }),
14354
+ schema: import_typebox.Type.String({ minLength: 1 }),
16963
14355
  fixtures: {
16964
14356
  valid: "notify-crm",
16965
14357
  invalid: "",
@@ -16976,7 +14368,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16976
14368
  unresolvedHint: PLAY_AUTHORING_STATIC_FETCH_KEY_HINT
16977
14369
  },
16978
14370
  "ctx.fetch.staleAfterSeconds": {
16979
- schema: Type.Union([Type.Null(), Type.Integer({ minimum: 0 })]),
14371
+ schema: import_typebox.Type.Union([import_typebox.Type.Null(), import_typebox.Type.Integer({ minimum: 0 })]),
16980
14372
  fixtures: {
16981
14373
  valid: null,
16982
14374
  invalid: 1.5,
@@ -16992,7 +14384,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
16992
14384
  errorMessage: "staleAfterSeconds must be null, 0 (always execute), or a positive whole number of seconds."
16993
14385
  },
16994
14386
  "ctx.runPlay.key": {
16995
- schema: Type.String({ minLength: 1 }),
14387
+ schema: import_typebox.Type.String({ minLength: 1 }),
16996
14388
  fixtures: {
16997
14389
  valid: "enrich-company",
16998
14390
  invalid: "",
@@ -17008,15 +14400,15 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
17008
14400
  errorMessage: "ctx.runPlay key must be a non-empty string."
17009
14401
  },
17010
14402
  "ctx.runPlay.playRef": {
17011
- schema: Type.Union([
17012
- Type.String({ minLength: 1 }),
17013
- Type.Union([
17014
- Type.Object(
17015
- { playName: Type.String({ minLength: 1 }) },
14403
+ schema: import_typebox.Type.Union([
14404
+ import_typebox.Type.String({ minLength: 1 }),
14405
+ import_typebox.Type.Union([
14406
+ import_typebox.Type.Object(
14407
+ { playName: import_typebox.Type.String({ minLength: 1 }) },
17016
14408
  { additionalProperties: true }
17017
14409
  ),
17018
- Type.Object(
17019
- { name: Type.String({ minLength: 1 }) },
14410
+ import_typebox.Type.Object(
14411
+ { name: import_typebox.Type.String({ minLength: 1 }) },
17020
14412
  { additionalProperties: true }
17021
14413
  )
17022
14414
  ])
@@ -17036,7 +14428,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
17036
14428
  errorMessage: "ctx.runPlay playRef must be a non-empty Play name or definition handle."
17037
14429
  },
17038
14430
  "ctx.runPlay.input": {
17039
- schema: Type.Record(Type.String(), Type.Unknown()),
14431
+ schema: import_typebox.Type.Record(import_typebox.Type.String(), import_typebox.Type.Unknown()),
17040
14432
  fixtures: {
17041
14433
  valid: { domain: "example.com" },
17042
14434
  invalid: "example.com",
@@ -17052,7 +14444,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
17052
14444
  errorMessage: "ctx.runPlay input must be an object."
17053
14445
  },
17054
14446
  "ctx.runPlay.options.description": {
17055
- schema: Type.String({ minLength: 1 }),
14447
+ schema: import_typebox.Type.String({ minLength: 1 }),
17056
14448
  fixtures: {
17057
14449
  valid: "Enrich the company.",
17058
14450
  invalid: "",
@@ -17068,7 +14460,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
17068
14460
  errorMessage: "ctx.runPlay options.description must be non-empty."
17069
14461
  },
17070
14462
  "ctx.runPlay.options.execution": {
17071
- schema: Type.Literal("inline"),
14463
+ schema: import_typebox.Type.Literal("inline"),
17072
14464
  fixtures: {
17073
14465
  valid: "inline",
17074
14466
  invalid: "child-workflow",
@@ -17084,7 +14476,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
17084
14476
  errorMessage: 'ctx.runPlay execution must be "inline".'
17085
14477
  },
17086
14478
  "ctx.runPlay.options.timeoutMs": {
17087
- schema: Type.Undefined(),
14479
+ schema: import_typebox.Type.Undefined(),
17088
14480
  fixtures: {
17089
14481
  valid: void 0,
17090
14482
  invalid: 1e3,
@@ -17100,7 +14492,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
17100
14492
  errorMessage: "ctx.runPlay timeoutMs is unsupported because child Plays execute inline."
17101
14493
  },
17102
14494
  "runtime.timeout": {
17103
- schema: Type.String({ pattern: "^\\d+\\s*[mh]$" }),
14495
+ schema: import_typebox.Type.String({ pattern: "^\\d+\\s*[mh]$" }),
17104
14496
  fixtures: {
17105
14497
  valid: "90m",
17106
14498
  invalid: "90s",
@@ -17116,7 +14508,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
17116
14508
  errorMessage: 'runtime.timeout must be a static duration such as "90m" or "2h".'
17117
14509
  },
17118
14510
  "runtime.size": {
17119
- schema: Type.Literal("standard"),
14511
+ schema: import_typebox.Type.Literal("standard"),
17120
14512
  fixtures: {
17121
14513
  valid: "standard",
17122
14514
  invalid: "large",
@@ -17132,13 +14524,13 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
17132
14524
  errorMessage: 'runtime.size must be the static literal "standard".'
17133
14525
  },
17134
14526
  "ctx.customerDb.query.statement": {
17135
- schema: Type.Union([
17136
- Type.String({ minLength: 1 }),
17137
- Type.Object(
14527
+ schema: import_typebox.Type.Union([
14528
+ import_typebox.Type.String({ minLength: 1 }),
14529
+ import_typebox.Type.Object(
17138
14530
  {
17139
- kind: Type.Optional(Type.Literal("sql.query")),
17140
- text: Type.String({ minLength: 1 }),
17141
- values: Type.Optional(Type.Array(Type.Unknown(), { maxItems: 0 }))
14531
+ kind: import_typebox.Type.Optional(import_typebox.Type.Literal("sql.query")),
14532
+ text: import_typebox.Type.String({ minLength: 1 }),
14533
+ values: import_typebox.Type.Optional(import_typebox.Type.Array(import_typebox.Type.Unknown(), { maxItems: 0 }))
17142
14534
  },
17143
14535
  { additionalProperties: false }
17144
14536
  )
@@ -17158,7 +14550,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
17158
14550
  errorMessage: "ctx.customerDb.query statement must be a non-empty SQL string. Deprecated SqlQuery objects cannot contain parameter values."
17159
14551
  },
17160
14552
  "ctx.customerDb.query.options.maxRows": {
17161
- schema: Type.Integer({ minimum: 1 }),
14553
+ schema: import_typebox.Type.Integer({ minimum: 1 }),
17162
14554
  fixtures: {
17163
14555
  valid: 100,
17164
14556
  invalid: 0,
@@ -17174,7 +14566,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
17174
14566
  errorMessage: "ctx.customerDb.query options.maxRows must be a positive whole number."
17175
14567
  },
17176
14568
  "ctx.customerDb.query.options.timeoutMs": {
17177
- schema: Type.Integer({ minimum: 1 }),
14569
+ schema: import_typebox.Type.Integer({ minimum: 1 }),
17178
14570
  fixtures: {
17179
14571
  valid: 1e3,
17180
14572
  invalid: 0,
@@ -17190,7 +14582,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
17190
14582
  errorMessage: "ctx.customerDb.query options.timeoutMs must be a positive whole number of milliseconds."
17191
14583
  },
17192
14584
  "ctx.tool.key": {
17193
- schema: Type.String({ minLength: 1 }),
14585
+ schema: import_typebox.Type.String({ minLength: 1 }),
17194
14586
  fixtures: {
17195
14587
  valid: "company",
17196
14588
  invalid: "",
@@ -17206,7 +14598,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
17206
14598
  errorMessage: "ctx.tool key must be a non-empty string."
17207
14599
  },
17208
14600
  "ctx.tool.tool": {
17209
- schema: Type.String({ minLength: 1 }),
14601
+ schema: import_typebox.Type.String({ minLength: 1 }),
17210
14602
  fixtures: {
17211
14603
  valid: "openmart_enrich_company",
17212
14604
  invalid: "",
@@ -17222,7 +14614,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
17222
14614
  errorMessage: "ctx.tool tool must be a non-empty tool id."
17223
14615
  },
17224
14616
  "ctx.tool.input": {
17225
- schema: Type.Record(Type.String(), Type.Unknown()),
14617
+ schema: import_typebox.Type.Record(import_typebox.Type.String(), import_typebox.Type.Unknown()),
17226
14618
  fixtures: {
17227
14619
  valid: { domain: "example.com" },
17228
14620
  invalid: "example.com",
@@ -17238,7 +14630,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
17238
14630
  errorMessage: "ctx.tool input must be an object."
17239
14631
  },
17240
14632
  "ctx.tool.options.description": {
17241
- schema: Type.String({ minLength: 1 }),
14633
+ schema: import_typebox.Type.String({ minLength: 1 }),
17242
14634
  fixtures: {
17243
14635
  valid: "Enrich the company.",
17244
14636
  invalid: "",
@@ -17254,7 +14646,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
17254
14646
  errorMessage: "ctx.tool options.description must be non-empty."
17255
14647
  },
17256
14648
  "ctx.runSteps.options.description": {
17257
- schema: Type.String({ minLength: 1 }),
14649
+ schema: import_typebox.Type.String({ minLength: 1 }),
17258
14650
  fixtures: {
17259
14651
  valid: "Score the account.",
17260
14652
  invalid: "",
@@ -17270,7 +14662,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
17270
14662
  errorMessage: "ctx.runSteps options.description must be non-empty."
17271
14663
  },
17272
14664
  "ctx.sleep.ms": {
17273
- schema: Type.Integer({ minimum: 0 }),
14665
+ schema: import_typebox.Type.Integer({ minimum: 0 }),
17274
14666
  fixtures: {
17275
14667
  valid: 0,
17276
14668
  invalid: -1,
@@ -17286,7 +14678,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
17286
14678
  errorMessage: "ctx.sleep ms must be a non-negative whole number."
17287
14679
  },
17288
14680
  "ctx.fetch.url": {
17289
- schema: Type.String({ minLength: 1 }),
14681
+ schema: import_typebox.Type.String({ minLength: 1 }),
17290
14682
  fixtures: {
17291
14683
  valid: "https://example.com",
17292
14684
  invalid: "",
@@ -17302,7 +14694,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
17302
14694
  errorMessage: "ctx.fetch URL must be a non-empty URL string."
17303
14695
  },
17304
14696
  "ctx.fetch.init.method": {
17305
- schema: Type.String({ minLength: 1 }),
14697
+ schema: import_typebox.Type.String({ minLength: 1 }),
17306
14698
  fixtures: {
17307
14699
  valid: "GET",
17308
14700
  invalid: "",
@@ -17318,7 +14710,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
17318
14710
  errorMessage: "ctx.fetch method must be a non-empty string."
17319
14711
  },
17320
14712
  "ctx.fetch.init.headers.Idempotency-Key": {
17321
- schema: Type.String({ minLength: 1 }),
14713
+ schema: import_typebox.Type.String({ minLength: 1 }),
17322
14714
  fixtures: {
17323
14715
  valid: "contact-123-update",
17324
14716
  invalid: "",
@@ -17386,8 +14778,9 @@ var PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
17386
14778
  "export type PlayCallExecution = 'inline';",
17387
14779
  `export type PlayCallOptions = { description: ${cloudReferenceType("ctx.runPlay.options.description")}; execution?: ${cloudReferenceType("ctx.runPlay.options.execution")}; timeoutMs?: ${cloudReferenceType("ctx.runPlay.options.timeoutMs")} };`,
17388
14780
  `export type RuntimeStepOptions = { semanticKey?: ${cloudReferenceType("ctx.step.semanticKey")}; staleAfterSeconds?: ${cloudReferenceType("ctx.step.staleAfterSeconds")} };`,
17389
- `export type FetchOptions = { staleAfterSeconds?: ${cloudReferenceType("ctx.fetch.staleAfterSeconds")} };`,
14781
+ `export type FetchOptions = { staleAfterSeconds?: ${cloudReferenceType("ctx.fetch.staleAfterSeconds")}; transient?: boolean };`,
17390
14782
  "export type PlayFetchResponse = { ok: boolean; status: number; statusText: string; url: string; headers: Record<string, string>; bodyText: string; json: unknown | null };",
14783
+ "export declare class CtxFetchHttpError extends Error { readonly code: 'CTX_FETCH_HTTP_ERROR'; readonly response: PlayFetchResponse; readonly status: number; readonly statusText: string; readonly url: string; readonly headers: Record<string, string>; readonly bodyText: string; readonly json: unknown | null; }",
17391
14784
  "export type StepResolver<Row, Value> = (row: Row, ctx: DeeplinePlayRuntimeContext, index: number, previousCell?: PreviousCell<Value>) => Value | Promise<Value>;",
17392
14785
  "export type DatasetColumnRunInput<Row, Value> = { readonly row: Row; readonly ctx: DeeplinePlayRuntimeContext; readonly index: number; readonly previousCell?: PreviousCell<Value> };",
17393
14786
  "export type DatasetColumnDefinition<Row, Value> = { readonly run: (input: DatasetColumnRunInput<Row, Value>) => Value | Promise<Value>; readonly runIf?: (row: Row, index: number) => boolean | Promise<boolean> };",
@@ -20282,11 +17675,17 @@ async function collectBundledPlayGraph(entryFile, profile = null, entryExportNam
20282
17675
  )
20283
17676
  );
20284
17677
  }
20285
- nodes.set(absolutePath, bundleResult);
20286
- for (const dependency of bundleResult.importedPlayDependencies) {
17678
+ const bundledNode = {
17679
+ ...bundleResult,
17680
+ artifact: artifactForProductionCompatibilityCheck(
17681
+ bundleResult.artifact
17682
+ )
17683
+ };
17684
+ nodes.set(absolutePath, bundledNode);
17685
+ for (const dependency of bundledNode.importedPlayDependencies) {
20287
17686
  await visit(dependency.filePath);
20288
17687
  }
20289
- return bundleResult;
17688
+ return bundledNode;
20290
17689
  } finally {
20291
17690
  visiting.delete(absolutePath);
20292
17691
  }