openclaw-overlay-plugin 0.8.42 → 0.8.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -82415,7 +82415,7 @@ var require_streams = __commonJS({
82415
82415
  "../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/lib/streams.js"(exports, module) {
82416
82416
  "use strict";
82417
82417
  var Buffer2 = __require("buffer").Buffer;
82418
- var Transform = __require("stream").Transform;
82418
+ var Transform2 = __require("stream").Transform;
82419
82419
  module.exports = function(iconv) {
82420
82420
  iconv.encodeStream = function encodeStream(encoding, options) {
82421
82421
  return new IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options);
@@ -82432,9 +82432,9 @@ var require_streams = __commonJS({
82432
82432
  this.conv = conv;
82433
82433
  options = options || {};
82434
82434
  options.decodeStrings = false;
82435
- Transform.call(this, options);
82435
+ Transform2.call(this, options);
82436
82436
  }
82437
- IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, {
82437
+ IconvLiteEncoderStream.prototype = Object.create(Transform2.prototype, {
82438
82438
  constructor: { value: IconvLiteEncoderStream }
82439
82439
  });
82440
82440
  IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) {
@@ -82472,9 +82472,9 @@ var require_streams = __commonJS({
82472
82472
  this.conv = conv;
82473
82473
  options = options || {};
82474
82474
  options.encoding = this.encoding = "utf8";
82475
- Transform.call(this, options);
82475
+ Transform2.call(this, options);
82476
82476
  }
82477
- IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, {
82477
+ IconvLiteDecoderStream.prototype = Object.create(Transform2.prototype, {
82478
82478
  constructor: { value: IconvLiteDecoderStream }
82479
82479
  });
82480
82480
  IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) {
@@ -135103,6 +135103,2612 @@ async function deriveWalletAddress(privKey, network = NETWORK) {
135103
135103
  return { address, hash160: hash1602, pubKey };
135104
135104
  }
135105
135105
 
135106
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/guard/value.mjs
135107
+ var value_exports = {};
135108
+ __export(value_exports, {
135109
+ HasPropertyKey: () => HasPropertyKey,
135110
+ IsArray: () => IsArray,
135111
+ IsAsyncIterator: () => IsAsyncIterator,
135112
+ IsBigInt: () => IsBigInt,
135113
+ IsBoolean: () => IsBoolean,
135114
+ IsDate: () => IsDate,
135115
+ IsFunction: () => IsFunction,
135116
+ IsIterator: () => IsIterator,
135117
+ IsNull: () => IsNull,
135118
+ IsNumber: () => IsNumber,
135119
+ IsObject: () => IsObject,
135120
+ IsRegExp: () => IsRegExp,
135121
+ IsString: () => IsString,
135122
+ IsSymbol: () => IsSymbol,
135123
+ IsUint8Array: () => IsUint8Array,
135124
+ IsUndefined: () => IsUndefined
135125
+ });
135126
+ function HasPropertyKey(value, key) {
135127
+ return key in value;
135128
+ }
135129
+ function IsAsyncIterator(value) {
135130
+ return IsObject(value) && !IsArray(value) && !IsUint8Array(value) && Symbol.asyncIterator in value;
135131
+ }
135132
+ function IsArray(value) {
135133
+ return Array.isArray(value);
135134
+ }
135135
+ function IsBigInt(value) {
135136
+ return typeof value === "bigint";
135137
+ }
135138
+ function IsBoolean(value) {
135139
+ return typeof value === "boolean";
135140
+ }
135141
+ function IsDate(value) {
135142
+ return value instanceof globalThis.Date;
135143
+ }
135144
+ function IsFunction(value) {
135145
+ return typeof value === "function";
135146
+ }
135147
+ function IsIterator(value) {
135148
+ return IsObject(value) && !IsArray(value) && !IsUint8Array(value) && Symbol.iterator in value;
135149
+ }
135150
+ function IsNull(value) {
135151
+ return value === null;
135152
+ }
135153
+ function IsNumber(value) {
135154
+ return typeof value === "number";
135155
+ }
135156
+ function IsObject(value) {
135157
+ return typeof value === "object" && value !== null;
135158
+ }
135159
+ function IsRegExp(value) {
135160
+ return value instanceof globalThis.RegExp;
135161
+ }
135162
+ function IsString(value) {
135163
+ return typeof value === "string";
135164
+ }
135165
+ function IsSymbol(value) {
135166
+ return typeof value === "symbol";
135167
+ }
135168
+ function IsUint8Array(value) {
135169
+ return value instanceof globalThis.Uint8Array;
135170
+ }
135171
+ function IsUndefined(value) {
135172
+ return value === void 0;
135173
+ }
135174
+
135175
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/clone/value.mjs
135176
+ function ArrayType(value) {
135177
+ return value.map((value2) => Visit(value2));
135178
+ }
135179
+ function DateType(value) {
135180
+ return new Date(value.getTime());
135181
+ }
135182
+ function Uint8ArrayType(value) {
135183
+ return new Uint8Array(value);
135184
+ }
135185
+ function RegExpType(value) {
135186
+ return new RegExp(value.source, value.flags);
135187
+ }
135188
+ function ObjectType(value) {
135189
+ const result = {};
135190
+ for (const key of Object.getOwnPropertyNames(value)) {
135191
+ result[key] = Visit(value[key]);
135192
+ }
135193
+ for (const key of Object.getOwnPropertySymbols(value)) {
135194
+ result[key] = Visit(value[key]);
135195
+ }
135196
+ return result;
135197
+ }
135198
+ function Visit(value) {
135199
+ return IsArray(value) ? ArrayType(value) : IsDate(value) ? DateType(value) : IsUint8Array(value) ? Uint8ArrayType(value) : IsRegExp(value) ? RegExpType(value) : IsObject(value) ? ObjectType(value) : value;
135200
+ }
135201
+ function Clone(value) {
135202
+ return Visit(value);
135203
+ }
135204
+
135205
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/clone/type.mjs
135206
+ function CloneType(schema, options) {
135207
+ return options === void 0 ? Clone(schema) : Clone({ ...options, ...schema });
135208
+ }
135209
+
135210
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/value/guard/guard.mjs
135211
+ function IsObject2(value) {
135212
+ return value !== null && typeof value === "object";
135213
+ }
135214
+ function IsArray2(value) {
135215
+ return globalThis.Array.isArray(value) && !globalThis.ArrayBuffer.isView(value);
135216
+ }
135217
+ function IsUndefined2(value) {
135218
+ return value === void 0;
135219
+ }
135220
+ function IsNumber2(value) {
135221
+ return typeof value === "number";
135222
+ }
135223
+
135224
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/system/policy.mjs
135225
+ var TypeSystemPolicy;
135226
+ (function(TypeSystemPolicy2) {
135227
+ TypeSystemPolicy2.InstanceMode = "default";
135228
+ TypeSystemPolicy2.ExactOptionalPropertyTypes = false;
135229
+ TypeSystemPolicy2.AllowArrayObject = false;
135230
+ TypeSystemPolicy2.AllowNaN = false;
135231
+ TypeSystemPolicy2.AllowNullVoid = false;
135232
+ function IsExactOptionalProperty(value, key) {
135233
+ return TypeSystemPolicy2.ExactOptionalPropertyTypes ? key in value : value[key] !== void 0;
135234
+ }
135235
+ TypeSystemPolicy2.IsExactOptionalProperty = IsExactOptionalProperty;
135236
+ function IsObjectLike(value) {
135237
+ const isObject = IsObject2(value);
135238
+ return TypeSystemPolicy2.AllowArrayObject ? isObject : isObject && !IsArray2(value);
135239
+ }
135240
+ TypeSystemPolicy2.IsObjectLike = IsObjectLike;
135241
+ function IsRecordLike(value) {
135242
+ return IsObjectLike(value) && !(value instanceof Date) && !(value instanceof Uint8Array);
135243
+ }
135244
+ TypeSystemPolicy2.IsRecordLike = IsRecordLike;
135245
+ function IsNumberLike(value) {
135246
+ return TypeSystemPolicy2.AllowNaN ? IsNumber2(value) : Number.isFinite(value);
135247
+ }
135248
+ TypeSystemPolicy2.IsNumberLike = IsNumberLike;
135249
+ function IsVoidLike(value) {
135250
+ const isUndefined = IsUndefined2(value);
135251
+ return TypeSystemPolicy2.AllowNullVoid ? isUndefined || value === null : isUndefined;
135252
+ }
135253
+ TypeSystemPolicy2.IsVoidLike = IsVoidLike;
135254
+ })(TypeSystemPolicy || (TypeSystemPolicy = {}));
135255
+
135256
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/create/immutable.mjs
135257
+ function ImmutableArray(value) {
135258
+ return globalThis.Object.freeze(value).map((value2) => Immutable(value2));
135259
+ }
135260
+ function ImmutableDate(value) {
135261
+ return value;
135262
+ }
135263
+ function ImmutableUint8Array(value) {
135264
+ return value;
135265
+ }
135266
+ function ImmutableRegExp(value) {
135267
+ return value;
135268
+ }
135269
+ function ImmutableObject(value) {
135270
+ const result = {};
135271
+ for (const key of Object.getOwnPropertyNames(value)) {
135272
+ result[key] = Immutable(value[key]);
135273
+ }
135274
+ for (const key of Object.getOwnPropertySymbols(value)) {
135275
+ result[key] = Immutable(value[key]);
135276
+ }
135277
+ return globalThis.Object.freeze(result);
135278
+ }
135279
+ function Immutable(value) {
135280
+ return IsArray(value) ? ImmutableArray(value) : IsDate(value) ? ImmutableDate(value) : IsUint8Array(value) ? ImmutableUint8Array(value) : IsRegExp(value) ? ImmutableRegExp(value) : IsObject(value) ? ImmutableObject(value) : value;
135281
+ }
135282
+
135283
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/create/type.mjs
135284
+ function CreateType(schema, options) {
135285
+ const result = options !== void 0 ? { ...options, ...schema } : schema;
135286
+ switch (TypeSystemPolicy.InstanceMode) {
135287
+ case "freeze":
135288
+ return Immutable(result);
135289
+ case "clone":
135290
+ return Clone(result);
135291
+ default:
135292
+ return result;
135293
+ }
135294
+ }
135295
+
135296
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/error/error.mjs
135297
+ var TypeBoxError = class extends Error {
135298
+ constructor(message) {
135299
+ super(message);
135300
+ }
135301
+ };
135302
+
135303
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/symbols/symbols.mjs
135304
+ var TransformKind = /* @__PURE__ */ Symbol.for("TypeBox.Transform");
135305
+ var ReadonlyKind = /* @__PURE__ */ Symbol.for("TypeBox.Readonly");
135306
+ var OptionalKind = /* @__PURE__ */ Symbol.for("TypeBox.Optional");
135307
+ var Hint = /* @__PURE__ */ Symbol.for("TypeBox.Hint");
135308
+ var Kind = /* @__PURE__ */ Symbol.for("TypeBox.Kind");
135309
+
135310
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/guard/kind.mjs
135311
+ function IsReadonly(value) {
135312
+ return IsObject(value) && value[ReadonlyKind] === "Readonly";
135313
+ }
135314
+ function IsOptional(value) {
135315
+ return IsObject(value) && value[OptionalKind] === "Optional";
135316
+ }
135317
+ function IsAny(value) {
135318
+ return IsKindOf(value, "Any");
135319
+ }
135320
+ function IsArgument(value) {
135321
+ return IsKindOf(value, "Argument");
135322
+ }
135323
+ function IsArray3(value) {
135324
+ return IsKindOf(value, "Array");
135325
+ }
135326
+ function IsAsyncIterator2(value) {
135327
+ return IsKindOf(value, "AsyncIterator");
135328
+ }
135329
+ function IsBigInt2(value) {
135330
+ return IsKindOf(value, "BigInt");
135331
+ }
135332
+ function IsBoolean2(value) {
135333
+ return IsKindOf(value, "Boolean");
135334
+ }
135335
+ function IsComputed(value) {
135336
+ return IsKindOf(value, "Computed");
135337
+ }
135338
+ function IsConstructor(value) {
135339
+ return IsKindOf(value, "Constructor");
135340
+ }
135341
+ function IsDate2(value) {
135342
+ return IsKindOf(value, "Date");
135343
+ }
135344
+ function IsFunction2(value) {
135345
+ return IsKindOf(value, "Function");
135346
+ }
135347
+ function IsInteger(value) {
135348
+ return IsKindOf(value, "Integer");
135349
+ }
135350
+ function IsIntersect(value) {
135351
+ return IsKindOf(value, "Intersect");
135352
+ }
135353
+ function IsIterator2(value) {
135354
+ return IsKindOf(value, "Iterator");
135355
+ }
135356
+ function IsKindOf(value, kind) {
135357
+ return IsObject(value) && Kind in value && value[Kind] === kind;
135358
+ }
135359
+ function IsLiteralValue(value) {
135360
+ return IsBoolean(value) || IsNumber(value) || IsString(value);
135361
+ }
135362
+ function IsLiteral(value) {
135363
+ return IsKindOf(value, "Literal");
135364
+ }
135365
+ function IsMappedKey(value) {
135366
+ return IsKindOf(value, "MappedKey");
135367
+ }
135368
+ function IsMappedResult(value) {
135369
+ return IsKindOf(value, "MappedResult");
135370
+ }
135371
+ function IsNever(value) {
135372
+ return IsKindOf(value, "Never");
135373
+ }
135374
+ function IsNot(value) {
135375
+ return IsKindOf(value, "Not");
135376
+ }
135377
+ function IsNull2(value) {
135378
+ return IsKindOf(value, "Null");
135379
+ }
135380
+ function IsNumber3(value) {
135381
+ return IsKindOf(value, "Number");
135382
+ }
135383
+ function IsObject3(value) {
135384
+ return IsKindOf(value, "Object");
135385
+ }
135386
+ function IsPromise(value) {
135387
+ return IsKindOf(value, "Promise");
135388
+ }
135389
+ function IsRecord(value) {
135390
+ return IsKindOf(value, "Record");
135391
+ }
135392
+ function IsRef(value) {
135393
+ return IsKindOf(value, "Ref");
135394
+ }
135395
+ function IsRegExp2(value) {
135396
+ return IsKindOf(value, "RegExp");
135397
+ }
135398
+ function IsString2(value) {
135399
+ return IsKindOf(value, "String");
135400
+ }
135401
+ function IsSymbol2(value) {
135402
+ return IsKindOf(value, "Symbol");
135403
+ }
135404
+ function IsTemplateLiteral(value) {
135405
+ return IsKindOf(value, "TemplateLiteral");
135406
+ }
135407
+ function IsThis(value) {
135408
+ return IsKindOf(value, "This");
135409
+ }
135410
+ function IsTransform(value) {
135411
+ return IsObject(value) && TransformKind in value;
135412
+ }
135413
+ function IsTuple(value) {
135414
+ return IsKindOf(value, "Tuple");
135415
+ }
135416
+ function IsUndefined3(value) {
135417
+ return IsKindOf(value, "Undefined");
135418
+ }
135419
+ function IsUnion(value) {
135420
+ return IsKindOf(value, "Union");
135421
+ }
135422
+ function IsUint8Array2(value) {
135423
+ return IsKindOf(value, "Uint8Array");
135424
+ }
135425
+ function IsUnknown(value) {
135426
+ return IsKindOf(value, "Unknown");
135427
+ }
135428
+ function IsUnsafe(value) {
135429
+ return IsKindOf(value, "Unsafe");
135430
+ }
135431
+ function IsVoid(value) {
135432
+ return IsKindOf(value, "Void");
135433
+ }
135434
+ function IsKind(value) {
135435
+ return IsObject(value) && Kind in value && IsString(value[Kind]);
135436
+ }
135437
+ function IsSchema(value) {
135438
+ 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);
135439
+ }
135440
+
135441
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/guard/type.mjs
135442
+ var type_exports = {};
135443
+ __export(type_exports, {
135444
+ IsAny: () => IsAny2,
135445
+ IsArgument: () => IsArgument2,
135446
+ IsArray: () => IsArray4,
135447
+ IsAsyncIterator: () => IsAsyncIterator3,
135448
+ IsBigInt: () => IsBigInt3,
135449
+ IsBoolean: () => IsBoolean3,
135450
+ IsComputed: () => IsComputed2,
135451
+ IsConstructor: () => IsConstructor2,
135452
+ IsDate: () => IsDate3,
135453
+ IsFunction: () => IsFunction3,
135454
+ IsImport: () => IsImport,
135455
+ IsInteger: () => IsInteger2,
135456
+ IsIntersect: () => IsIntersect2,
135457
+ IsIterator: () => IsIterator3,
135458
+ IsKind: () => IsKind2,
135459
+ IsKindOf: () => IsKindOf2,
135460
+ IsLiteral: () => IsLiteral2,
135461
+ IsLiteralBoolean: () => IsLiteralBoolean,
135462
+ IsLiteralNumber: () => IsLiteralNumber,
135463
+ IsLiteralString: () => IsLiteralString,
135464
+ IsLiteralValue: () => IsLiteralValue2,
135465
+ IsMappedKey: () => IsMappedKey2,
135466
+ IsMappedResult: () => IsMappedResult2,
135467
+ IsNever: () => IsNever2,
135468
+ IsNot: () => IsNot2,
135469
+ IsNull: () => IsNull3,
135470
+ IsNumber: () => IsNumber4,
135471
+ IsObject: () => IsObject4,
135472
+ IsOptional: () => IsOptional2,
135473
+ IsPromise: () => IsPromise2,
135474
+ IsProperties: () => IsProperties,
135475
+ IsReadonly: () => IsReadonly2,
135476
+ IsRecord: () => IsRecord2,
135477
+ IsRecursive: () => IsRecursive,
135478
+ IsRef: () => IsRef2,
135479
+ IsRegExp: () => IsRegExp3,
135480
+ IsSchema: () => IsSchema2,
135481
+ IsString: () => IsString3,
135482
+ IsSymbol: () => IsSymbol3,
135483
+ IsTemplateLiteral: () => IsTemplateLiteral2,
135484
+ IsThis: () => IsThis2,
135485
+ IsTransform: () => IsTransform2,
135486
+ IsTuple: () => IsTuple2,
135487
+ IsUint8Array: () => IsUint8Array3,
135488
+ IsUndefined: () => IsUndefined4,
135489
+ IsUnion: () => IsUnion2,
135490
+ IsUnionLiteral: () => IsUnionLiteral,
135491
+ IsUnknown: () => IsUnknown2,
135492
+ IsUnsafe: () => IsUnsafe2,
135493
+ IsVoid: () => IsVoid2,
135494
+ TypeGuardUnknownTypeError: () => TypeGuardUnknownTypeError
135495
+ });
135496
+ var TypeGuardUnknownTypeError = class extends TypeBoxError {
135497
+ };
135498
+ var KnownTypes = [
135499
+ "Argument",
135500
+ "Any",
135501
+ "Array",
135502
+ "AsyncIterator",
135503
+ "BigInt",
135504
+ "Boolean",
135505
+ "Computed",
135506
+ "Constructor",
135507
+ "Date",
135508
+ "Enum",
135509
+ "Function",
135510
+ "Integer",
135511
+ "Intersect",
135512
+ "Iterator",
135513
+ "Literal",
135514
+ "MappedKey",
135515
+ "MappedResult",
135516
+ "Not",
135517
+ "Null",
135518
+ "Number",
135519
+ "Object",
135520
+ "Promise",
135521
+ "Record",
135522
+ "Ref",
135523
+ "RegExp",
135524
+ "String",
135525
+ "Symbol",
135526
+ "TemplateLiteral",
135527
+ "This",
135528
+ "Tuple",
135529
+ "Undefined",
135530
+ "Union",
135531
+ "Uint8Array",
135532
+ "Unknown",
135533
+ "Void"
135534
+ ];
135535
+ function IsPattern(value) {
135536
+ try {
135537
+ new RegExp(value);
135538
+ return true;
135539
+ } catch {
135540
+ return false;
135541
+ }
135542
+ }
135543
+ function IsControlCharacterFree(value) {
135544
+ if (!IsString(value))
135545
+ return false;
135546
+ for (let i = 0; i < value.length; i++) {
135547
+ const code = value.charCodeAt(i);
135548
+ if (code >= 7 && code <= 13 || code === 27 || code === 127) {
135549
+ return false;
135550
+ }
135551
+ }
135552
+ return true;
135553
+ }
135554
+ function IsAdditionalProperties(value) {
135555
+ return IsOptionalBoolean(value) || IsSchema2(value);
135556
+ }
135557
+ function IsOptionalBigInt(value) {
135558
+ return IsUndefined(value) || IsBigInt(value);
135559
+ }
135560
+ function IsOptionalNumber(value) {
135561
+ return IsUndefined(value) || IsNumber(value);
135562
+ }
135563
+ function IsOptionalBoolean(value) {
135564
+ return IsUndefined(value) || IsBoolean(value);
135565
+ }
135566
+ function IsOptionalString(value) {
135567
+ return IsUndefined(value) || IsString(value);
135568
+ }
135569
+ function IsOptionalPattern(value) {
135570
+ return IsUndefined(value) || IsString(value) && IsControlCharacterFree(value) && IsPattern(value);
135571
+ }
135572
+ function IsOptionalFormat(value) {
135573
+ return IsUndefined(value) || IsString(value) && IsControlCharacterFree(value);
135574
+ }
135575
+ function IsOptionalSchema(value) {
135576
+ return IsUndefined(value) || IsSchema2(value);
135577
+ }
135578
+ function IsReadonly2(value) {
135579
+ return IsObject(value) && value[ReadonlyKind] === "Readonly";
135580
+ }
135581
+ function IsOptional2(value) {
135582
+ return IsObject(value) && value[OptionalKind] === "Optional";
135583
+ }
135584
+ function IsAny2(value) {
135585
+ return IsKindOf2(value, "Any") && IsOptionalString(value.$id);
135586
+ }
135587
+ function IsArgument2(value) {
135588
+ return IsKindOf2(value, "Argument") && IsNumber(value.index);
135589
+ }
135590
+ function IsArray4(value) {
135591
+ 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);
135592
+ }
135593
+ function IsAsyncIterator3(value) {
135594
+ return IsKindOf2(value, "AsyncIterator") && value.type === "AsyncIterator" && IsOptionalString(value.$id) && IsSchema2(value.items);
135595
+ }
135596
+ function IsBigInt3(value) {
135597
+ 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);
135598
+ }
135599
+ function IsBoolean3(value) {
135600
+ return IsKindOf2(value, "Boolean") && value.type === "boolean" && IsOptionalString(value.$id);
135601
+ }
135602
+ function IsComputed2(value) {
135603
+ return IsKindOf2(value, "Computed") && IsString(value.target) && IsArray(value.parameters) && value.parameters.every((schema) => IsSchema2(schema));
135604
+ }
135605
+ function IsConstructor2(value) {
135606
+ return IsKindOf2(value, "Constructor") && value.type === "Constructor" && IsOptionalString(value.$id) && IsArray(value.parameters) && value.parameters.every((schema) => IsSchema2(schema)) && IsSchema2(value.returns);
135607
+ }
135608
+ function IsDate3(value) {
135609
+ 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);
135610
+ }
135611
+ function IsFunction3(value) {
135612
+ return IsKindOf2(value, "Function") && value.type === "Function" && IsOptionalString(value.$id) && IsArray(value.parameters) && value.parameters.every((schema) => IsSchema2(schema)) && IsSchema2(value.returns);
135613
+ }
135614
+ function IsImport(value) {
135615
+ return IsKindOf2(value, "Import") && HasPropertyKey(value, "$defs") && IsObject(value.$defs) && IsProperties(value.$defs) && HasPropertyKey(value, "$ref") && IsString(value.$ref) && value.$ref in value.$defs;
135616
+ }
135617
+ function IsInteger2(value) {
135618
+ 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);
135619
+ }
135620
+ function IsProperties(value) {
135621
+ return IsObject(value) && Object.entries(value).every(([key, schema]) => IsControlCharacterFree(key) && IsSchema2(schema));
135622
+ }
135623
+ function IsIntersect2(value) {
135624
+ 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);
135625
+ }
135626
+ function IsIterator3(value) {
135627
+ return IsKindOf2(value, "Iterator") && value.type === "Iterator" && IsOptionalString(value.$id) && IsSchema2(value.items);
135628
+ }
135629
+ function IsKindOf2(value, kind) {
135630
+ return IsObject(value) && Kind in value && value[Kind] === kind;
135631
+ }
135632
+ function IsLiteralString(value) {
135633
+ return IsLiteral2(value) && IsString(value.const);
135634
+ }
135635
+ function IsLiteralNumber(value) {
135636
+ return IsLiteral2(value) && IsNumber(value.const);
135637
+ }
135638
+ function IsLiteralBoolean(value) {
135639
+ return IsLiteral2(value) && IsBoolean(value.const);
135640
+ }
135641
+ function IsLiteral2(value) {
135642
+ return IsKindOf2(value, "Literal") && IsOptionalString(value.$id) && IsLiteralValue2(value.const);
135643
+ }
135644
+ function IsLiteralValue2(value) {
135645
+ return IsBoolean(value) || IsNumber(value) || IsString(value);
135646
+ }
135647
+ function IsMappedKey2(value) {
135648
+ return IsKindOf2(value, "MappedKey") && IsArray(value.keys) && value.keys.every((key) => IsNumber(key) || IsString(key));
135649
+ }
135650
+ function IsMappedResult2(value) {
135651
+ return IsKindOf2(value, "MappedResult") && IsProperties(value.properties);
135652
+ }
135653
+ function IsNever2(value) {
135654
+ return IsKindOf2(value, "Never") && IsObject(value.not) && Object.getOwnPropertyNames(value.not).length === 0;
135655
+ }
135656
+ function IsNot2(value) {
135657
+ return IsKindOf2(value, "Not") && IsSchema2(value.not);
135658
+ }
135659
+ function IsNull3(value) {
135660
+ return IsKindOf2(value, "Null") && value.type === "null" && IsOptionalString(value.$id);
135661
+ }
135662
+ function IsNumber4(value) {
135663
+ 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);
135664
+ }
135665
+ function IsObject4(value) {
135666
+ return IsKindOf2(value, "Object") && value.type === "object" && IsOptionalString(value.$id) && IsProperties(value.properties) && IsAdditionalProperties(value.additionalProperties) && IsOptionalNumber(value.minProperties) && IsOptionalNumber(value.maxProperties);
135667
+ }
135668
+ function IsPromise2(value) {
135669
+ return IsKindOf2(value, "Promise") && value.type === "Promise" && IsOptionalString(value.$id) && IsSchema2(value.item);
135670
+ }
135671
+ function IsRecord2(value) {
135672
+ return IsKindOf2(value, "Record") && value.type === "object" && IsOptionalString(value.$id) && IsAdditionalProperties(value.additionalProperties) && IsObject(value.patternProperties) && ((schema) => {
135673
+ const keys = Object.getOwnPropertyNames(schema.patternProperties);
135674
+ return keys.length === 1 && IsPattern(keys[0]) && IsObject(schema.patternProperties) && IsSchema2(schema.patternProperties[keys[0]]);
135675
+ })(value);
135676
+ }
135677
+ function IsRecursive(value) {
135678
+ return IsObject(value) && Hint in value && value[Hint] === "Recursive";
135679
+ }
135680
+ function IsRef2(value) {
135681
+ return IsKindOf2(value, "Ref") && IsOptionalString(value.$id) && IsString(value.$ref);
135682
+ }
135683
+ function IsRegExp3(value) {
135684
+ return IsKindOf2(value, "RegExp") && IsOptionalString(value.$id) && IsString(value.source) && IsString(value.flags) && IsOptionalNumber(value.maxLength) && IsOptionalNumber(value.minLength);
135685
+ }
135686
+ function IsString3(value) {
135687
+ return IsKindOf2(value, "String") && value.type === "string" && IsOptionalString(value.$id) && IsOptionalNumber(value.minLength) && IsOptionalNumber(value.maxLength) && IsOptionalPattern(value.pattern) && IsOptionalFormat(value.format);
135688
+ }
135689
+ function IsSymbol3(value) {
135690
+ return IsKindOf2(value, "Symbol") && value.type === "symbol" && IsOptionalString(value.$id);
135691
+ }
135692
+ function IsTemplateLiteral2(value) {
135693
+ return IsKindOf2(value, "TemplateLiteral") && value.type === "string" && IsString(value.pattern) && value.pattern[0] === "^" && value.pattern[value.pattern.length - 1] === "$";
135694
+ }
135695
+ function IsThis2(value) {
135696
+ return IsKindOf2(value, "This") && IsOptionalString(value.$id) && IsString(value.$ref);
135697
+ }
135698
+ function IsTransform2(value) {
135699
+ return IsObject(value) && TransformKind in value;
135700
+ }
135701
+ function IsTuple2(value) {
135702
+ return IsKindOf2(value, "Tuple") && value.type === "array" && IsOptionalString(value.$id) && IsNumber(value.minItems) && IsNumber(value.maxItems) && value.minItems === value.maxItems && // empty
135703
+ (IsUndefined(value.items) && IsUndefined(value.additionalItems) && value.minItems === 0 || IsArray(value.items) && value.items.every((schema) => IsSchema2(schema)));
135704
+ }
135705
+ function IsUndefined4(value) {
135706
+ return IsKindOf2(value, "Undefined") && value.type === "undefined" && IsOptionalString(value.$id);
135707
+ }
135708
+ function IsUnionLiteral(value) {
135709
+ return IsUnion2(value) && value.anyOf.every((schema) => IsLiteralString(schema) || IsLiteralNumber(schema));
135710
+ }
135711
+ function IsUnion2(value) {
135712
+ return IsKindOf2(value, "Union") && IsOptionalString(value.$id) && IsObject(value) && IsArray(value.anyOf) && value.anyOf.every((schema) => IsSchema2(schema));
135713
+ }
135714
+ function IsUint8Array3(value) {
135715
+ return IsKindOf2(value, "Uint8Array") && value.type === "Uint8Array" && IsOptionalString(value.$id) && IsOptionalNumber(value.minByteLength) && IsOptionalNumber(value.maxByteLength);
135716
+ }
135717
+ function IsUnknown2(value) {
135718
+ return IsKindOf2(value, "Unknown") && IsOptionalString(value.$id);
135719
+ }
135720
+ function IsUnsafe2(value) {
135721
+ return IsKindOf2(value, "Unsafe");
135722
+ }
135723
+ function IsVoid2(value) {
135724
+ return IsKindOf2(value, "Void") && value.type === "void" && IsOptionalString(value.$id);
135725
+ }
135726
+ function IsKind2(value) {
135727
+ return IsObject(value) && Kind in value && IsString(value[Kind]) && !KnownTypes.includes(value[Kind]);
135728
+ }
135729
+ function IsSchema2(value) {
135730
+ 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));
135731
+ }
135732
+
135733
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/patterns/patterns.mjs
135734
+ var PatternBoolean = "(true|false)";
135735
+ var PatternNumber = "(0|[1-9][0-9]*)";
135736
+ var PatternString = "(.*)";
135737
+ var PatternNever = "(?!.*)";
135738
+ var PatternBooleanExact = `^${PatternBoolean}$`;
135739
+ var PatternNumberExact = `^${PatternNumber}$`;
135740
+ var PatternStringExact = `^${PatternString}$`;
135741
+ var PatternNeverExact = `^${PatternNever}$`;
135742
+
135743
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/sets/set.mjs
135744
+ function SetIncludes(T, S) {
135745
+ return T.includes(S);
135746
+ }
135747
+ function SetDistinct(T) {
135748
+ return [...new Set(T)];
135749
+ }
135750
+ function SetIntersect(T, S) {
135751
+ return T.filter((L) => S.includes(L));
135752
+ }
135753
+ function SetIntersectManyResolve(T, Init) {
135754
+ return T.reduce((Acc, L) => {
135755
+ return SetIntersect(Acc, L);
135756
+ }, Init);
135757
+ }
135758
+ function SetIntersectMany(T) {
135759
+ return T.length === 1 ? T[0] : T.length > 1 ? SetIntersectManyResolve(T.slice(1), T[0]) : [];
135760
+ }
135761
+ function SetUnionMany(T) {
135762
+ const Acc = [];
135763
+ for (const L of T)
135764
+ Acc.push(...L);
135765
+ return Acc;
135766
+ }
135767
+
135768
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/any/any.mjs
135769
+ function Any(options) {
135770
+ return CreateType({ [Kind]: "Any" }, options);
135771
+ }
135772
+
135773
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/array/array.mjs
135774
+ function Array2(items, options) {
135775
+ return CreateType({ [Kind]: "Array", type: "array", items }, options);
135776
+ }
135777
+
135778
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/argument/argument.mjs
135779
+ function Argument(index) {
135780
+ return CreateType({ [Kind]: "Argument", index });
135781
+ }
135782
+
135783
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/async-iterator/async-iterator.mjs
135784
+ function AsyncIterator(items, options) {
135785
+ return CreateType({ [Kind]: "AsyncIterator", type: "AsyncIterator", items }, options);
135786
+ }
135787
+
135788
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/computed/computed.mjs
135789
+ function Computed(target, parameters, options) {
135790
+ return CreateType({ [Kind]: "Computed", target, parameters }, options);
135791
+ }
135792
+
135793
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/discard/discard.mjs
135794
+ function DiscardKey(value, key) {
135795
+ const { [key]: _, ...rest } = value;
135796
+ return rest;
135797
+ }
135798
+ function Discard(value, keys) {
135799
+ return keys.reduce((acc, key) => DiscardKey(acc, key), value);
135800
+ }
135801
+
135802
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/never/never.mjs
135803
+ function Never(options) {
135804
+ return CreateType({ [Kind]: "Never", not: {} }, options);
135805
+ }
135806
+
135807
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/mapped/mapped-result.mjs
135808
+ function MappedResult(properties) {
135809
+ return CreateType({
135810
+ [Kind]: "MappedResult",
135811
+ properties
135812
+ });
135813
+ }
135814
+
135815
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/constructor/constructor.mjs
135816
+ function Constructor(parameters, returns, options) {
135817
+ return CreateType({ [Kind]: "Constructor", type: "Constructor", parameters, returns }, options);
135818
+ }
135819
+
135820
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/function/function.mjs
135821
+ function Function2(parameters, returns, options) {
135822
+ return CreateType({ [Kind]: "Function", type: "Function", parameters, returns }, options);
135823
+ }
135824
+
135825
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/union/union-create.mjs
135826
+ function UnionCreate(T, options) {
135827
+ return CreateType({ [Kind]: "Union", anyOf: T }, options);
135828
+ }
135829
+
135830
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/union/union-evaluated.mjs
135831
+ function IsUnionOptional(types) {
135832
+ return types.some((type) => IsOptional(type));
135833
+ }
135834
+ function RemoveOptionalFromRest(types) {
135835
+ return types.map((left) => IsOptional(left) ? RemoveOptionalFromType(left) : left);
135836
+ }
135837
+ function RemoveOptionalFromType(T) {
135838
+ return Discard(T, [OptionalKind]);
135839
+ }
135840
+ function ResolveUnion(types, options) {
135841
+ const isOptional = IsUnionOptional(types);
135842
+ return isOptional ? Optional(UnionCreate(RemoveOptionalFromRest(types), options)) : UnionCreate(RemoveOptionalFromRest(types), options);
135843
+ }
135844
+ function UnionEvaluated(T, options) {
135845
+ return T.length === 1 ? CreateType(T[0], options) : T.length === 0 ? Never(options) : ResolveUnion(T, options);
135846
+ }
135847
+
135848
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/union/union.mjs
135849
+ function Union(types, options) {
135850
+ return types.length === 0 ? Never(options) : types.length === 1 ? CreateType(types[0], options) : UnionCreate(types, options);
135851
+ }
135852
+
135853
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/template-literal/parse.mjs
135854
+ var TemplateLiteralParserError = class extends TypeBoxError {
135855
+ };
135856
+ function Unescape(pattern) {
135857
+ return pattern.replace(/\\\$/g, "$").replace(/\\\*/g, "*").replace(/\\\^/g, "^").replace(/\\\|/g, "|").replace(/\\\(/g, "(").replace(/\\\)/g, ")");
135858
+ }
135859
+ function IsNonEscaped(pattern, index, char) {
135860
+ return pattern[index] === char && pattern.charCodeAt(index - 1) !== 92;
135861
+ }
135862
+ function IsOpenParen(pattern, index) {
135863
+ return IsNonEscaped(pattern, index, "(");
135864
+ }
135865
+ function IsCloseParen(pattern, index) {
135866
+ return IsNonEscaped(pattern, index, ")");
135867
+ }
135868
+ function IsSeparator(pattern, index) {
135869
+ return IsNonEscaped(pattern, index, "|");
135870
+ }
135871
+ function IsGroup(pattern) {
135872
+ if (!(IsOpenParen(pattern, 0) && IsCloseParen(pattern, pattern.length - 1)))
135873
+ return false;
135874
+ let count = 0;
135875
+ for (let index = 0; index < pattern.length; index++) {
135876
+ if (IsOpenParen(pattern, index))
135877
+ count += 1;
135878
+ if (IsCloseParen(pattern, index))
135879
+ count -= 1;
135880
+ if (count === 0 && index !== pattern.length - 1)
135881
+ return false;
135882
+ }
135883
+ return true;
135884
+ }
135885
+ function InGroup(pattern) {
135886
+ return pattern.slice(1, pattern.length - 1);
135887
+ }
135888
+ function IsPrecedenceOr(pattern) {
135889
+ let count = 0;
135890
+ for (let index = 0; index < pattern.length; index++) {
135891
+ if (IsOpenParen(pattern, index))
135892
+ count += 1;
135893
+ if (IsCloseParen(pattern, index))
135894
+ count -= 1;
135895
+ if (IsSeparator(pattern, index) && count === 0)
135896
+ return true;
135897
+ }
135898
+ return false;
135899
+ }
135900
+ function IsPrecedenceAnd(pattern) {
135901
+ for (let index = 0; index < pattern.length; index++) {
135902
+ if (IsOpenParen(pattern, index))
135903
+ return true;
135904
+ }
135905
+ return false;
135906
+ }
135907
+ function Or(pattern) {
135908
+ let [count, start] = [0, 0];
135909
+ const expressions = [];
135910
+ for (let index = 0; index < pattern.length; index++) {
135911
+ if (IsOpenParen(pattern, index))
135912
+ count += 1;
135913
+ if (IsCloseParen(pattern, index))
135914
+ count -= 1;
135915
+ if (IsSeparator(pattern, index) && count === 0) {
135916
+ const range2 = pattern.slice(start, index);
135917
+ if (range2.length > 0)
135918
+ expressions.push(TemplateLiteralParse(range2));
135919
+ start = index + 1;
135920
+ }
135921
+ }
135922
+ const range = pattern.slice(start);
135923
+ if (range.length > 0)
135924
+ expressions.push(TemplateLiteralParse(range));
135925
+ if (expressions.length === 0)
135926
+ return { type: "const", const: "" };
135927
+ if (expressions.length === 1)
135928
+ return expressions[0];
135929
+ return { type: "or", expr: expressions };
135930
+ }
135931
+ function And(pattern) {
135932
+ function Group(value, index) {
135933
+ if (!IsOpenParen(value, index))
135934
+ throw new TemplateLiteralParserError(`TemplateLiteralParser: Index must point to open parens`);
135935
+ let count = 0;
135936
+ for (let scan = index; scan < value.length; scan++) {
135937
+ if (IsOpenParen(value, scan))
135938
+ count += 1;
135939
+ if (IsCloseParen(value, scan))
135940
+ count -= 1;
135941
+ if (count === 0)
135942
+ return [index, scan];
135943
+ }
135944
+ throw new TemplateLiteralParserError(`TemplateLiteralParser: Unclosed group parens in expression`);
135945
+ }
135946
+ function Range(pattern2, index) {
135947
+ for (let scan = index; scan < pattern2.length; scan++) {
135948
+ if (IsOpenParen(pattern2, scan))
135949
+ return [index, scan];
135950
+ }
135951
+ return [index, pattern2.length];
135952
+ }
135953
+ const expressions = [];
135954
+ for (let index = 0; index < pattern.length; index++) {
135955
+ if (IsOpenParen(pattern, index)) {
135956
+ const [start, end] = Group(pattern, index);
135957
+ const range = pattern.slice(start, end + 1);
135958
+ expressions.push(TemplateLiteralParse(range));
135959
+ index = end;
135960
+ } else {
135961
+ const [start, end] = Range(pattern, index);
135962
+ const range = pattern.slice(start, end);
135963
+ if (range.length > 0)
135964
+ expressions.push(TemplateLiteralParse(range));
135965
+ index = end - 1;
135966
+ }
135967
+ }
135968
+ return expressions.length === 0 ? { type: "const", const: "" } : expressions.length === 1 ? expressions[0] : { type: "and", expr: expressions };
135969
+ }
135970
+ function TemplateLiteralParse(pattern) {
135971
+ return IsGroup(pattern) ? TemplateLiteralParse(InGroup(pattern)) : IsPrecedenceOr(pattern) ? Or(pattern) : IsPrecedenceAnd(pattern) ? And(pattern) : { type: "const", const: Unescape(pattern) };
135972
+ }
135973
+ function TemplateLiteralParseExact(pattern) {
135974
+ return TemplateLiteralParse(pattern.slice(1, pattern.length - 1));
135975
+ }
135976
+
135977
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/template-literal/finite.mjs
135978
+ var TemplateLiteralFiniteError = class extends TypeBoxError {
135979
+ };
135980
+ function IsNumberExpression(expression) {
135981
+ 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]*";
135982
+ }
135983
+ function IsBooleanExpression(expression) {
135984
+ 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";
135985
+ }
135986
+ function IsStringExpression(expression) {
135987
+ return expression.type === "const" && expression.const === ".*";
135988
+ }
135989
+ function IsTemplateLiteralExpressionFinite(expression) {
135990
+ 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 : (() => {
135991
+ throw new TemplateLiteralFiniteError(`Unknown expression type`);
135992
+ })();
135993
+ }
135994
+ function IsTemplateLiteralFinite(schema) {
135995
+ const expression = TemplateLiteralParseExact(schema.pattern);
135996
+ return IsTemplateLiteralExpressionFinite(expression);
135997
+ }
135998
+
135999
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/template-literal/generate.mjs
136000
+ var TemplateLiteralGenerateError = class extends TypeBoxError {
136001
+ };
136002
+ function* GenerateReduce(buffer) {
136003
+ if (buffer.length === 1)
136004
+ return yield* buffer[0];
136005
+ for (const left of buffer[0]) {
136006
+ for (const right of GenerateReduce(buffer.slice(1))) {
136007
+ yield `${left}${right}`;
136008
+ }
136009
+ }
136010
+ }
136011
+ function* GenerateAnd(expression) {
136012
+ return yield* GenerateReduce(expression.expr.map((expr) => [...TemplateLiteralExpressionGenerate(expr)]));
136013
+ }
136014
+ function* GenerateOr(expression) {
136015
+ for (const expr of expression.expr)
136016
+ yield* TemplateLiteralExpressionGenerate(expr);
136017
+ }
136018
+ function* GenerateConst(expression) {
136019
+ return yield expression.const;
136020
+ }
136021
+ function* TemplateLiteralExpressionGenerate(expression) {
136022
+ return expression.type === "and" ? yield* GenerateAnd(expression) : expression.type === "or" ? yield* GenerateOr(expression) : expression.type === "const" ? yield* GenerateConst(expression) : (() => {
136023
+ throw new TemplateLiteralGenerateError("Unknown expression");
136024
+ })();
136025
+ }
136026
+ function TemplateLiteralGenerate(schema) {
136027
+ const expression = TemplateLiteralParseExact(schema.pattern);
136028
+ return IsTemplateLiteralExpressionFinite(expression) ? [...TemplateLiteralExpressionGenerate(expression)] : [];
136029
+ }
136030
+
136031
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/literal/literal.mjs
136032
+ function Literal(value, options) {
136033
+ return CreateType({
136034
+ [Kind]: "Literal",
136035
+ const: value,
136036
+ type: typeof value
136037
+ }, options);
136038
+ }
136039
+
136040
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/boolean/boolean.mjs
136041
+ function Boolean2(options) {
136042
+ return CreateType({ [Kind]: "Boolean", type: "boolean" }, options);
136043
+ }
136044
+
136045
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/bigint/bigint.mjs
136046
+ function BigInt2(options) {
136047
+ return CreateType({ [Kind]: "BigInt", type: "bigint" }, options);
136048
+ }
136049
+
136050
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/number/number.mjs
136051
+ function Number2(options) {
136052
+ return CreateType({ [Kind]: "Number", type: "number" }, options);
136053
+ }
136054
+
136055
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/string/string.mjs
136056
+ function String2(options) {
136057
+ return CreateType({ [Kind]: "String", type: "string" }, options);
136058
+ }
136059
+
136060
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/template-literal/syntax.mjs
136061
+ function* FromUnion(syntax) {
136062
+ const trim = syntax.trim().replace(/"|'/g, "");
136063
+ return trim === "boolean" ? yield Boolean2() : trim === "number" ? yield Number2() : trim === "bigint" ? yield BigInt2() : trim === "string" ? yield String2() : yield (() => {
136064
+ const literals = trim.split("|").map((literal) => Literal(literal.trim()));
136065
+ return literals.length === 0 ? Never() : literals.length === 1 ? literals[0] : UnionEvaluated(literals);
136066
+ })();
136067
+ }
136068
+ function* FromTerminal(syntax) {
136069
+ if (syntax[1] !== "{") {
136070
+ const L = Literal("$");
136071
+ const R2 = FromSyntax(syntax.slice(1));
136072
+ return yield* [L, ...R2];
136073
+ }
136074
+ for (let i = 2; i < syntax.length; i++) {
136075
+ if (syntax[i] === "}") {
136076
+ const L = FromUnion(syntax.slice(2, i));
136077
+ const R2 = FromSyntax(syntax.slice(i + 1));
136078
+ return yield* [...L, ...R2];
136079
+ }
136080
+ }
136081
+ yield Literal(syntax);
136082
+ }
136083
+ function* FromSyntax(syntax) {
136084
+ for (let i = 0; i < syntax.length; i++) {
136085
+ if (syntax[i] === "$") {
136086
+ const L = Literal(syntax.slice(0, i));
136087
+ const R2 = FromTerminal(syntax.slice(i));
136088
+ return yield* [L, ...R2];
136089
+ }
136090
+ }
136091
+ yield Literal(syntax);
136092
+ }
136093
+ function TemplateLiteralSyntax(syntax) {
136094
+ return [...FromSyntax(syntax)];
136095
+ }
136096
+
136097
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/template-literal/pattern.mjs
136098
+ var TemplateLiteralPatternError = class extends TypeBoxError {
136099
+ };
136100
+ function Escape(value) {
136101
+ return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
136102
+ }
136103
+ function Visit2(schema, acc) {
136104
+ 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}` : (() => {
136105
+ throw new TemplateLiteralPatternError(`Unexpected Kind '${schema[Kind]}'`);
136106
+ })();
136107
+ }
136108
+ function TemplateLiteralPattern(kinds) {
136109
+ return `^${kinds.map((schema) => Visit2(schema, "")).join("")}$`;
136110
+ }
136111
+
136112
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/template-literal/union.mjs
136113
+ function TemplateLiteralToUnion(schema) {
136114
+ const R2 = TemplateLiteralGenerate(schema);
136115
+ const L = R2.map((S) => Literal(S));
136116
+ return UnionEvaluated(L);
136117
+ }
136118
+
136119
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/template-literal/template-literal.mjs
136120
+ function TemplateLiteral(unresolved, options) {
136121
+ const pattern = IsString(unresolved) ? TemplateLiteralPattern(TemplateLiteralSyntax(unresolved)) : TemplateLiteralPattern(unresolved);
136122
+ return CreateType({ [Kind]: "TemplateLiteral", type: "string", pattern }, options);
136123
+ }
136124
+
136125
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-property-keys.mjs
136126
+ function FromTemplateLiteral(templateLiteral) {
136127
+ const keys = TemplateLiteralGenerate(templateLiteral);
136128
+ return keys.map((key) => key.toString());
136129
+ }
136130
+ function FromUnion2(types) {
136131
+ const result = [];
136132
+ for (const type of types)
136133
+ result.push(...IndexPropertyKeys(type));
136134
+ return result;
136135
+ }
136136
+ function FromLiteral(literalValue) {
136137
+ return [literalValue.toString()];
136138
+ }
136139
+ function IndexPropertyKeys(type) {
136140
+ return [...new Set(IsTemplateLiteral(type) ? FromTemplateLiteral(type) : IsUnion(type) ? FromUnion2(type.anyOf) : IsLiteral(type) ? FromLiteral(type.const) : IsNumber3(type) ? ["[number]"] : IsInteger(type) ? ["[number]"] : [])];
136141
+ }
136142
+
136143
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-result.mjs
136144
+ function FromProperties(type, properties, options) {
136145
+ const result = {};
136146
+ for (const K2 of Object.getOwnPropertyNames(properties)) {
136147
+ result[K2] = Index(type, IndexPropertyKeys(properties[K2]), options);
136148
+ }
136149
+ return result;
136150
+ }
136151
+ function FromMappedResult(type, mappedResult, options) {
136152
+ return FromProperties(type, mappedResult.properties, options);
136153
+ }
136154
+ function IndexFromMappedResult(type, mappedResult, options) {
136155
+ const properties = FromMappedResult(type, mappedResult, options);
136156
+ return MappedResult(properties);
136157
+ }
136158
+
136159
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed.mjs
136160
+ function FromRest(types, key) {
136161
+ return types.map((type) => IndexFromPropertyKey(type, key));
136162
+ }
136163
+ function FromIntersectRest(types) {
136164
+ return types.filter((type) => !IsNever(type));
136165
+ }
136166
+ function FromIntersect(types, key) {
136167
+ return IntersectEvaluated(FromIntersectRest(FromRest(types, key)));
136168
+ }
136169
+ function FromUnionRest(types) {
136170
+ return types.some((L) => IsNever(L)) ? [] : types;
136171
+ }
136172
+ function FromUnion3(types, key) {
136173
+ return UnionEvaluated(FromUnionRest(FromRest(types, key)));
136174
+ }
136175
+ function FromTuple(types, key) {
136176
+ return key in types ? types[key] : key === "[number]" ? UnionEvaluated(types) : Never();
136177
+ }
136178
+ function FromArray(type, key) {
136179
+ return key === "[number]" ? type : Never();
136180
+ }
136181
+ function FromProperty(properties, propertyKey) {
136182
+ return propertyKey in properties ? properties[propertyKey] : Never();
136183
+ }
136184
+ function IndexFromPropertyKey(type, propertyKey) {
136185
+ 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();
136186
+ }
136187
+ function IndexFromPropertyKeys(type, propertyKeys) {
136188
+ return propertyKeys.map((propertyKey) => IndexFromPropertyKey(type, propertyKey));
136189
+ }
136190
+ function FromSchema(type, propertyKeys) {
136191
+ return UnionEvaluated(IndexFromPropertyKeys(type, propertyKeys));
136192
+ }
136193
+ function Index(type, key, options) {
136194
+ if (IsRef(type) || IsRef(key)) {
136195
+ const error = `Index types using Ref parameters require both Type and Key to be of TSchema`;
136196
+ if (!IsSchema(type) || !IsSchema(key))
136197
+ throw new TypeBoxError(error);
136198
+ return Computed("Index", [type, key]);
136199
+ }
136200
+ if (IsMappedResult(key))
136201
+ return IndexFromMappedResult(type, key, options);
136202
+ if (IsMappedKey(key))
136203
+ return IndexFromMappedKey(type, key, options);
136204
+ return CreateType(IsSchema(key) ? FromSchema(type, IndexPropertyKeys(key)) : FromSchema(type, key), options);
136205
+ }
136206
+
136207
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-key.mjs
136208
+ function MappedIndexPropertyKey(type, key, options) {
136209
+ return { [key]: Index(type, [key], Clone(options)) };
136210
+ }
136211
+ function MappedIndexPropertyKeys(type, propertyKeys, options) {
136212
+ return propertyKeys.reduce((result, left) => {
136213
+ return { ...result, ...MappedIndexPropertyKey(type, left, options) };
136214
+ }, {});
136215
+ }
136216
+ function MappedIndexProperties(type, mappedKey, options) {
136217
+ return MappedIndexPropertyKeys(type, mappedKey.keys, options);
136218
+ }
136219
+ function IndexFromMappedKey(type, mappedKey, options) {
136220
+ const properties = MappedIndexProperties(type, mappedKey, options);
136221
+ return MappedResult(properties);
136222
+ }
136223
+
136224
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/iterator/iterator.mjs
136225
+ function Iterator(items, options) {
136226
+ return CreateType({ [Kind]: "Iterator", type: "Iterator", items }, options);
136227
+ }
136228
+
136229
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/object/object.mjs
136230
+ function RequiredArray(properties) {
136231
+ return globalThis.Object.keys(properties).filter((key) => !IsOptional(properties[key]));
136232
+ }
136233
+ function _Object(properties, options) {
136234
+ const required = RequiredArray(properties);
136235
+ const schema = required.length > 0 ? { [Kind]: "Object", type: "object", required, properties } : { [Kind]: "Object", type: "object", properties };
136236
+ return CreateType(schema, options);
136237
+ }
136238
+ var Object2 = _Object;
136239
+
136240
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/promise/promise.mjs
136241
+ function Promise2(item, options) {
136242
+ return CreateType({ [Kind]: "Promise", type: "Promise", item }, options);
136243
+ }
136244
+
136245
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/readonly/readonly.mjs
136246
+ function RemoveReadonly(schema) {
136247
+ return CreateType(Discard(schema, [ReadonlyKind]));
136248
+ }
136249
+ function AddReadonly(schema) {
136250
+ return CreateType({ ...schema, [ReadonlyKind]: "Readonly" });
136251
+ }
136252
+ function ReadonlyWithFlag(schema, F) {
136253
+ return F === false ? RemoveReadonly(schema) : AddReadonly(schema);
136254
+ }
136255
+ function Readonly(schema, enable) {
136256
+ const F = enable ?? true;
136257
+ return IsMappedResult(schema) ? ReadonlyFromMappedResult(schema, F) : ReadonlyWithFlag(schema, F);
136258
+ }
136259
+
136260
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/readonly/readonly-from-mapped-result.mjs
136261
+ function FromProperties2(K2, F) {
136262
+ const Acc = {};
136263
+ for (const K22 of globalThis.Object.getOwnPropertyNames(K2))
136264
+ Acc[K22] = Readonly(K2[K22], F);
136265
+ return Acc;
136266
+ }
136267
+ function FromMappedResult2(R2, F) {
136268
+ return FromProperties2(R2.properties, F);
136269
+ }
136270
+ function ReadonlyFromMappedResult(R2, F) {
136271
+ const P2 = FromMappedResult2(R2, F);
136272
+ return MappedResult(P2);
136273
+ }
136274
+
136275
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/tuple/tuple.mjs
136276
+ function Tuple(types, options) {
136277
+ 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);
136278
+ }
136279
+
136280
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/mapped/mapped.mjs
136281
+ function FromMappedResult3(K2, P2) {
136282
+ return K2 in P2 ? FromSchemaType(K2, P2[K2]) : MappedResult(P2);
136283
+ }
136284
+ function MappedKeyToKnownMappedResultProperties(K2) {
136285
+ return { [K2]: Literal(K2) };
136286
+ }
136287
+ function MappedKeyToUnknownMappedResultProperties(P2) {
136288
+ const Acc = {};
136289
+ for (const L of P2)
136290
+ Acc[L] = Literal(L);
136291
+ return Acc;
136292
+ }
136293
+ function MappedKeyToMappedResultProperties(K2, P2) {
136294
+ return SetIncludes(P2, K2) ? MappedKeyToKnownMappedResultProperties(K2) : MappedKeyToUnknownMappedResultProperties(P2);
136295
+ }
136296
+ function FromMappedKey(K2, P2) {
136297
+ const R2 = MappedKeyToMappedResultProperties(K2, P2);
136298
+ return FromMappedResult3(K2, R2);
136299
+ }
136300
+ function FromRest2(K2, T) {
136301
+ return T.map((L) => FromSchemaType(K2, L));
136302
+ }
136303
+ function FromProperties3(K2, T) {
136304
+ const Acc = {};
136305
+ for (const K22 of globalThis.Object.getOwnPropertyNames(T))
136306
+ Acc[K22] = FromSchemaType(K2, T[K22]);
136307
+ return Acc;
136308
+ }
136309
+ function FromSchemaType(K2, T) {
136310
+ const options = { ...T };
136311
+ return (
136312
+ // unevaluated modifier types
136313
+ IsOptional(T) ? Optional(FromSchemaType(K2, Discard(T, [OptionalKind]))) : IsReadonly(T) ? Readonly(FromSchemaType(K2, Discard(T, [ReadonlyKind]))) : (
136314
+ // unevaluated mapped types
136315
+ IsMappedResult(T) ? FromMappedResult3(K2, T.properties) : IsMappedKey(T) ? FromMappedKey(K2, T.keys) : (
136316
+ // unevaluated types
136317
+ IsConstructor(T) ? Constructor(FromRest2(K2, T.parameters), FromSchemaType(K2, T.returns), options) : IsFunction2(T) ? Function2(FromRest2(K2, T.parameters), FromSchemaType(K2, T.returns), options) : IsAsyncIterator2(T) ? AsyncIterator(FromSchemaType(K2, T.items), options) : IsIterator2(T) ? Iterator(FromSchemaType(K2, T.items), options) : IsIntersect(T) ? Intersect(FromRest2(K2, T.allOf), options) : IsUnion(T) ? Union(FromRest2(K2, T.anyOf), options) : IsTuple(T) ? Tuple(FromRest2(K2, T.items ?? []), options) : IsObject3(T) ? Object2(FromProperties3(K2, T.properties), options) : IsArray3(T) ? Array2(FromSchemaType(K2, T.items), options) : IsPromise(T) ? Promise2(FromSchemaType(K2, T.item), options) : T
136318
+ )
136319
+ )
136320
+ );
136321
+ }
136322
+ function MappedFunctionReturnType(K2, T) {
136323
+ const Acc = {};
136324
+ for (const L of K2)
136325
+ Acc[L] = FromSchemaType(L, T);
136326
+ return Acc;
136327
+ }
136328
+ function Mapped(key, map, options) {
136329
+ const K2 = IsSchema(key) ? IndexPropertyKeys(key) : key;
136330
+ const RT = map({ [Kind]: "MappedKey", keys: K2 });
136331
+ const R2 = MappedFunctionReturnType(K2, RT);
136332
+ return Object2(R2, options);
136333
+ }
136334
+
136335
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/optional/optional.mjs
136336
+ function RemoveOptional(schema) {
136337
+ return CreateType(Discard(schema, [OptionalKind]));
136338
+ }
136339
+ function AddOptional(schema) {
136340
+ return CreateType({ ...schema, [OptionalKind]: "Optional" });
136341
+ }
136342
+ function OptionalWithFlag(schema, F) {
136343
+ return F === false ? RemoveOptional(schema) : AddOptional(schema);
136344
+ }
136345
+ function Optional(schema, enable) {
136346
+ const F = enable ?? true;
136347
+ return IsMappedResult(schema) ? OptionalFromMappedResult(schema, F) : OptionalWithFlag(schema, F);
136348
+ }
136349
+
136350
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/optional/optional-from-mapped-result.mjs
136351
+ function FromProperties4(P2, F) {
136352
+ const Acc = {};
136353
+ for (const K2 of globalThis.Object.getOwnPropertyNames(P2))
136354
+ Acc[K2] = Optional(P2[K2], F);
136355
+ return Acc;
136356
+ }
136357
+ function FromMappedResult4(R2, F) {
136358
+ return FromProperties4(R2.properties, F);
136359
+ }
136360
+ function OptionalFromMappedResult(R2, F) {
136361
+ const P2 = FromMappedResult4(R2, F);
136362
+ return MappedResult(P2);
136363
+ }
136364
+
136365
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-create.mjs
136366
+ function IntersectCreate(T, options = {}) {
136367
+ const allObjects = T.every((schema) => IsObject3(schema));
136368
+ const clonedUnevaluatedProperties = IsSchema(options.unevaluatedProperties) ? { unevaluatedProperties: options.unevaluatedProperties } : {};
136369
+ return CreateType(options.unevaluatedProperties === false || IsSchema(options.unevaluatedProperties) || allObjects ? { ...clonedUnevaluatedProperties, [Kind]: "Intersect", type: "object", allOf: T } : { ...clonedUnevaluatedProperties, [Kind]: "Intersect", allOf: T }, options);
136370
+ }
136371
+
136372
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-evaluated.mjs
136373
+ function IsIntersectOptional(types) {
136374
+ return types.every((left) => IsOptional(left));
136375
+ }
136376
+ function RemoveOptionalFromType2(type) {
136377
+ return Discard(type, [OptionalKind]);
136378
+ }
136379
+ function RemoveOptionalFromRest2(types) {
136380
+ return types.map((left) => IsOptional(left) ? RemoveOptionalFromType2(left) : left);
136381
+ }
136382
+ function ResolveIntersect(types, options) {
136383
+ return IsIntersectOptional(types) ? Optional(IntersectCreate(RemoveOptionalFromRest2(types), options)) : IntersectCreate(RemoveOptionalFromRest2(types), options);
136384
+ }
136385
+ function IntersectEvaluated(types, options = {}) {
136386
+ if (types.length === 1)
136387
+ return CreateType(types[0], options);
136388
+ if (types.length === 0)
136389
+ return Never(options);
136390
+ if (types.some((schema) => IsTransform(schema)))
136391
+ throw new Error("Cannot intersect transform types");
136392
+ return ResolveIntersect(types, options);
136393
+ }
136394
+
136395
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/intersect/intersect.mjs
136396
+ function Intersect(types, options) {
136397
+ if (types.length === 1)
136398
+ return CreateType(types[0], options);
136399
+ if (types.length === 0)
136400
+ return Never(options);
136401
+ if (types.some((schema) => IsTransform(schema)))
136402
+ throw new Error("Cannot intersect transform types");
136403
+ return IntersectCreate(types, options);
136404
+ }
136405
+
136406
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/ref/ref.mjs
136407
+ function Ref(...args) {
136408
+ const [$ref, options] = typeof args[0] === "string" ? [args[0], args[1]] : [args[0].$id, args[1]];
136409
+ if (typeof $ref !== "string")
136410
+ throw new TypeBoxError("Ref: $ref must be a string");
136411
+ return CreateType({ [Kind]: "Ref", $ref }, options);
136412
+ }
136413
+
136414
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/awaited/awaited.mjs
136415
+ function FromComputed(target, parameters) {
136416
+ return Computed("Awaited", [Computed(target, parameters)]);
136417
+ }
136418
+ function FromRef($ref) {
136419
+ return Computed("Awaited", [Ref($ref)]);
136420
+ }
136421
+ function FromIntersect2(types) {
136422
+ return Intersect(FromRest3(types));
136423
+ }
136424
+ function FromUnion4(types) {
136425
+ return Union(FromRest3(types));
136426
+ }
136427
+ function FromPromise(type) {
136428
+ return Awaited(type);
136429
+ }
136430
+ function FromRest3(types) {
136431
+ return types.map((type) => Awaited(type));
136432
+ }
136433
+ function Awaited(type, options) {
136434
+ 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);
136435
+ }
136436
+
136437
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-property-keys.mjs
136438
+ function FromRest4(types) {
136439
+ const result = [];
136440
+ for (const L of types)
136441
+ result.push(KeyOfPropertyKeys(L));
136442
+ return result;
136443
+ }
136444
+ function FromIntersect3(types) {
136445
+ const propertyKeysArray = FromRest4(types);
136446
+ const propertyKeys = SetUnionMany(propertyKeysArray);
136447
+ return propertyKeys;
136448
+ }
136449
+ function FromUnion5(types) {
136450
+ const propertyKeysArray = FromRest4(types);
136451
+ const propertyKeys = SetIntersectMany(propertyKeysArray);
136452
+ return propertyKeys;
136453
+ }
136454
+ function FromTuple2(types) {
136455
+ return types.map((_, indexer) => indexer.toString());
136456
+ }
136457
+ function FromArray2(_) {
136458
+ return ["[number]"];
136459
+ }
136460
+ function FromProperties5(T) {
136461
+ return globalThis.Object.getOwnPropertyNames(T);
136462
+ }
136463
+ function FromPatternProperties(patternProperties) {
136464
+ if (!includePatternProperties)
136465
+ return [];
136466
+ const patternPropertyKeys = globalThis.Object.getOwnPropertyNames(patternProperties);
136467
+ return patternPropertyKeys.map((key) => {
136468
+ return key[0] === "^" && key[key.length - 1] === "$" ? key.slice(1, key.length - 1) : key;
136469
+ });
136470
+ }
136471
+ function KeyOfPropertyKeys(type) {
136472
+ 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) : [];
136473
+ }
136474
+ var includePatternProperties = false;
136475
+
136476
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/keyof/keyof.mjs
136477
+ function FromComputed2(target, parameters) {
136478
+ return Computed("KeyOf", [Computed(target, parameters)]);
136479
+ }
136480
+ function FromRef2($ref) {
136481
+ return Computed("KeyOf", [Ref($ref)]);
136482
+ }
136483
+ function KeyOfFromType(type, options) {
136484
+ const propertyKeys = KeyOfPropertyKeys(type);
136485
+ const propertyKeyTypes = KeyOfPropertyKeysToRest(propertyKeys);
136486
+ const result = UnionEvaluated(propertyKeyTypes);
136487
+ return CreateType(result, options);
136488
+ }
136489
+ function KeyOfPropertyKeysToRest(propertyKeys) {
136490
+ return propertyKeys.map((L) => L === "[number]" ? Number2() : Literal(L));
136491
+ }
136492
+ function KeyOf(type, options) {
136493
+ return IsComputed(type) ? FromComputed2(type.target, type.parameters) : IsRef(type) ? FromRef2(type.$ref) : IsMappedResult(type) ? KeyOfFromMappedResult(type, options) : KeyOfFromType(type, options);
136494
+ }
136495
+
136496
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-from-mapped-result.mjs
136497
+ function FromProperties6(properties, options) {
136498
+ const result = {};
136499
+ for (const K2 of globalThis.Object.getOwnPropertyNames(properties))
136500
+ result[K2] = KeyOf(properties[K2], Clone(options));
136501
+ return result;
136502
+ }
136503
+ function FromMappedResult5(mappedResult, options) {
136504
+ return FromProperties6(mappedResult.properties, options);
136505
+ }
136506
+ function KeyOfFromMappedResult(mappedResult, options) {
136507
+ const properties = FromMappedResult5(mappedResult, options);
136508
+ return MappedResult(properties);
136509
+ }
136510
+
136511
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/composite/composite.mjs
136512
+ function CompositeKeys(T) {
136513
+ const Acc = [];
136514
+ for (const L of T)
136515
+ Acc.push(...KeyOfPropertyKeys(L));
136516
+ return SetDistinct(Acc);
136517
+ }
136518
+ function FilterNever(T) {
136519
+ return T.filter((L) => !IsNever(L));
136520
+ }
136521
+ function CompositeProperty(T, K2) {
136522
+ const Acc = [];
136523
+ for (const L of T)
136524
+ Acc.push(...IndexFromPropertyKeys(L, [K2]));
136525
+ return FilterNever(Acc);
136526
+ }
136527
+ function CompositeProperties(T, K2) {
136528
+ const Acc = {};
136529
+ for (const L of K2) {
136530
+ Acc[L] = IntersectEvaluated(CompositeProperty(T, L));
136531
+ }
136532
+ return Acc;
136533
+ }
136534
+ function Composite(T, options) {
136535
+ const K2 = CompositeKeys(T);
136536
+ const P2 = CompositeProperties(T, K2);
136537
+ const R2 = Object2(P2, options);
136538
+ return R2;
136539
+ }
136540
+
136541
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/date/date.mjs
136542
+ function Date2(options) {
136543
+ return CreateType({ [Kind]: "Date", type: "Date" }, options);
136544
+ }
136545
+
136546
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/null/null.mjs
136547
+ function Null(options) {
136548
+ return CreateType({ [Kind]: "Null", type: "null" }, options);
136549
+ }
136550
+
136551
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/symbol/symbol.mjs
136552
+ function Symbol2(options) {
136553
+ return CreateType({ [Kind]: "Symbol", type: "symbol" }, options);
136554
+ }
136555
+
136556
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/undefined/undefined.mjs
136557
+ function Undefined(options) {
136558
+ return CreateType({ [Kind]: "Undefined", type: "undefined" }, options);
136559
+ }
136560
+
136561
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/uint8array/uint8array.mjs
136562
+ function Uint8Array2(options) {
136563
+ return CreateType({ [Kind]: "Uint8Array", type: "Uint8Array" }, options);
136564
+ }
136565
+
136566
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/unknown/unknown.mjs
136567
+ function Unknown(options) {
136568
+ return CreateType({ [Kind]: "Unknown" }, options);
136569
+ }
136570
+
136571
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/const/const.mjs
136572
+ function FromArray3(T) {
136573
+ return T.map((L) => FromValue(L, false));
136574
+ }
136575
+ function FromProperties7(value) {
136576
+ const Acc = {};
136577
+ for (const K2 of globalThis.Object.getOwnPropertyNames(value))
136578
+ Acc[K2] = Readonly(FromValue(value[K2], false));
136579
+ return Acc;
136580
+ }
136581
+ function ConditionalReadonly(T, root) {
136582
+ return root === true ? T : Readonly(T);
136583
+ }
136584
+ function FromValue(value, root) {
136585
+ 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) ? BigInt2() : IsNumber(value) ? Literal(value) : IsBoolean(value) ? Literal(value) : IsString(value) ? Literal(value) : Object2({});
136586
+ }
136587
+ function Const(T, options) {
136588
+ return CreateType(FromValue(T, true), options);
136589
+ }
136590
+
136591
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/constructor-parameters/constructor-parameters.mjs
136592
+ function ConstructorParameters(schema, options) {
136593
+ return IsConstructor(schema) ? Tuple(schema.parameters, options) : Never(options);
136594
+ }
136595
+
136596
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/enum/enum.mjs
136597
+ function Enum(item, options) {
136598
+ if (IsUndefined(item))
136599
+ throw new Error("Enum undefined or empty");
136600
+ const values1 = globalThis.Object.getOwnPropertyNames(item).filter((key) => isNaN(key)).map((key) => item[key]);
136601
+ const values2 = [...new Set(values1)];
136602
+ const anyOf = values2.map((value) => Literal(value));
136603
+ return Union(anyOf, { ...options, [Hint]: "Enum" });
136604
+ }
136605
+
136606
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/extends/extends-check.mjs
136607
+ var ExtendsResolverError = class extends TypeBoxError {
136608
+ };
136609
+ var ExtendsResult;
136610
+ (function(ExtendsResult2) {
136611
+ ExtendsResult2[ExtendsResult2["Union"] = 0] = "Union";
136612
+ ExtendsResult2[ExtendsResult2["True"] = 1] = "True";
136613
+ ExtendsResult2[ExtendsResult2["False"] = 2] = "False";
136614
+ })(ExtendsResult || (ExtendsResult = {}));
136615
+ function IntoBooleanResult(result) {
136616
+ return result === ExtendsResult.False ? result : ExtendsResult.True;
136617
+ }
136618
+ function Throw(message) {
136619
+ throw new ExtendsResolverError(message);
136620
+ }
136621
+ function IsStructuralRight(right) {
136622
+ return type_exports.IsNever(right) || type_exports.IsIntersect(right) || type_exports.IsUnion(right) || type_exports.IsUnknown(right) || type_exports.IsAny(right);
136623
+ }
136624
+ function StructuralRight(left, right) {
136625
+ 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");
136626
+ }
136627
+ function FromAnyRight(left, right) {
136628
+ return ExtendsResult.True;
136629
+ }
136630
+ function FromAny(left, right) {
136631
+ 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;
136632
+ }
136633
+ function FromArrayRight(left, right) {
136634
+ return type_exports.IsUnknown(left) ? ExtendsResult.False : type_exports.IsAny(left) ? ExtendsResult.Union : type_exports.IsNever(left) ? ExtendsResult.True : ExtendsResult.False;
136635
+ }
136636
+ function FromArray4(left, right) {
136637
+ 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));
136638
+ }
136639
+ function FromAsyncIterator(left, right) {
136640
+ return IsStructuralRight(right) ? StructuralRight(left, right) : !type_exports.IsAsyncIterator(right) ? ExtendsResult.False : IntoBooleanResult(Visit3(left.items, right.items));
136641
+ }
136642
+ function FromBigInt(left, right) {
136643
+ 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;
136644
+ }
136645
+ function FromBooleanRight(left, right) {
136646
+ return type_exports.IsLiteralBoolean(left) ? ExtendsResult.True : type_exports.IsBoolean(left) ? ExtendsResult.True : ExtendsResult.False;
136647
+ }
136648
+ function FromBoolean(left, right) {
136649
+ 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;
136650
+ }
136651
+ function FromConstructor(left, right) {
136652
+ 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));
136653
+ }
136654
+ function FromDate(left, right) {
136655
+ 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;
136656
+ }
136657
+ function FromFunction(left, right) {
136658
+ 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));
136659
+ }
136660
+ function FromIntegerRight(left, right) {
136661
+ return type_exports.IsLiteral(left) && value_exports.IsNumber(left.const) ? ExtendsResult.True : type_exports.IsNumber(left) || type_exports.IsInteger(left) ? ExtendsResult.True : ExtendsResult.False;
136662
+ }
136663
+ function FromInteger(left, right) {
136664
+ 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;
136665
+ }
136666
+ function FromIntersectRight(left, right) {
136667
+ return right.allOf.every((schema) => Visit3(left, schema) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False;
136668
+ }
136669
+ function FromIntersect4(left, right) {
136670
+ return left.allOf.some((schema) => Visit3(schema, right) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False;
136671
+ }
136672
+ function FromIterator(left, right) {
136673
+ return IsStructuralRight(right) ? StructuralRight(left, right) : !type_exports.IsIterator(right) ? ExtendsResult.False : IntoBooleanResult(Visit3(left.items, right.items));
136674
+ }
136675
+ function FromLiteral2(left, right) {
136676
+ 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;
136677
+ }
136678
+ function FromNeverRight(left, right) {
136679
+ return ExtendsResult.False;
136680
+ }
136681
+ function FromNever(left, right) {
136682
+ return ExtendsResult.True;
136683
+ }
136684
+ function UnwrapTNot(schema) {
136685
+ let [current, depth] = [schema, 0];
136686
+ while (true) {
136687
+ if (!type_exports.IsNot(current))
136688
+ break;
136689
+ current = current.not;
136690
+ depth += 1;
136691
+ }
136692
+ return depth % 2 === 0 ? current : Unknown();
136693
+ }
136694
+ function FromNot(left, right) {
136695
+ return type_exports.IsNot(left) ? Visit3(UnwrapTNot(left), right) : type_exports.IsNot(right) ? Visit3(left, UnwrapTNot(right)) : Throw("Invalid fallthrough for Not");
136696
+ }
136697
+ function FromNull(left, right) {
136698
+ 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;
136699
+ }
136700
+ function FromNumberRight(left, right) {
136701
+ return type_exports.IsLiteralNumber(left) ? ExtendsResult.True : type_exports.IsNumber(left) || type_exports.IsInteger(left) ? ExtendsResult.True : ExtendsResult.False;
136702
+ }
136703
+ function FromNumber(left, right) {
136704
+ 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;
136705
+ }
136706
+ function IsObjectPropertyCount(schema, count) {
136707
+ return Object.getOwnPropertyNames(schema.properties).length === count;
136708
+ }
136709
+ function IsObjectStringLike(schema) {
136710
+ return IsObjectArrayLike(schema);
136711
+ }
136712
+ function IsObjectSymbolLike(schema) {
136713
+ 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]));
136714
+ }
136715
+ function IsObjectNumberLike(schema) {
136716
+ return IsObjectPropertyCount(schema, 0);
136717
+ }
136718
+ function IsObjectBooleanLike(schema) {
136719
+ return IsObjectPropertyCount(schema, 0);
136720
+ }
136721
+ function IsObjectBigIntLike(schema) {
136722
+ return IsObjectPropertyCount(schema, 0);
136723
+ }
136724
+ function IsObjectDateLike(schema) {
136725
+ return IsObjectPropertyCount(schema, 0);
136726
+ }
136727
+ function IsObjectUint8ArrayLike(schema) {
136728
+ return IsObjectArrayLike(schema);
136729
+ }
136730
+ function IsObjectFunctionLike(schema) {
136731
+ const length = Number2();
136732
+ return IsObjectPropertyCount(schema, 0) || IsObjectPropertyCount(schema, 1) && "length" in schema.properties && IntoBooleanResult(Visit3(schema.properties["length"], length)) === ExtendsResult.True;
136733
+ }
136734
+ function IsObjectConstructorLike(schema) {
136735
+ return IsObjectPropertyCount(schema, 0);
136736
+ }
136737
+ function IsObjectArrayLike(schema) {
136738
+ const length = Number2();
136739
+ return IsObjectPropertyCount(schema, 0) || IsObjectPropertyCount(schema, 1) && "length" in schema.properties && IntoBooleanResult(Visit3(schema.properties["length"], length)) === ExtendsResult.True;
136740
+ }
136741
+ function IsObjectPromiseLike(schema) {
136742
+ const then = Function2([Any()], Any());
136743
+ return IsObjectPropertyCount(schema, 0) || IsObjectPropertyCount(schema, 1) && "then" in schema.properties && IntoBooleanResult(Visit3(schema.properties["then"], then)) === ExtendsResult.True;
136744
+ }
136745
+ function Property(left, right) {
136746
+ return Visit3(left, right) === ExtendsResult.False ? ExtendsResult.False : type_exports.IsOptional(left) && !type_exports.IsOptional(right) ? ExtendsResult.False : ExtendsResult.True;
136747
+ }
136748
+ function FromObjectRight(left, right) {
136749
+ 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)) ? (() => {
136750
+ return right[Hint] === "Record" ? ExtendsResult.True : ExtendsResult.False;
136751
+ })() : type_exports.IsRecord(left) && type_exports.IsNumber(RecordKey(left)) ? (() => {
136752
+ return IsObjectPropertyCount(right, 0) ? ExtendsResult.True : ExtendsResult.False;
136753
+ })() : ExtendsResult.False;
136754
+ }
136755
+ function FromObject(left, right) {
136756
+ return IsStructuralRight(right) ? StructuralRight(left, right) : type_exports.IsRecord(right) ? FromRecordRight(left, right) : !type_exports.IsObject(right) ? ExtendsResult.False : (() => {
136757
+ for (const key of Object.getOwnPropertyNames(right.properties)) {
136758
+ if (!(key in left.properties) && !type_exports.IsOptional(right.properties[key])) {
136759
+ return ExtendsResult.False;
136760
+ }
136761
+ if (type_exports.IsOptional(right.properties[key])) {
136762
+ return ExtendsResult.True;
136763
+ }
136764
+ if (Property(left.properties[key], right.properties[key]) === ExtendsResult.False) {
136765
+ return ExtendsResult.False;
136766
+ }
136767
+ }
136768
+ return ExtendsResult.True;
136769
+ })();
136770
+ }
136771
+ function FromPromise2(left, right) {
136772
+ 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));
136773
+ }
136774
+ function RecordKey(schema) {
136775
+ return PatternNumberExact in schema.patternProperties ? Number2() : PatternStringExact in schema.patternProperties ? String2() : Throw("Unknown record key pattern");
136776
+ }
136777
+ function RecordValue(schema) {
136778
+ return PatternNumberExact in schema.patternProperties ? schema.patternProperties[PatternNumberExact] : PatternStringExact in schema.patternProperties ? schema.patternProperties[PatternStringExact] : Throw("Unable to get record value schema");
136779
+ }
136780
+ function FromRecordRight(left, right) {
136781
+ const [Key, Value] = [RecordKey(right), RecordValue(right)];
136782
+ 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) ? (() => {
136783
+ for (const key of Object.getOwnPropertyNames(left.properties)) {
136784
+ if (Property(Value, left.properties[key]) === ExtendsResult.False) {
136785
+ return ExtendsResult.False;
136786
+ }
136787
+ }
136788
+ return ExtendsResult.True;
136789
+ })() : ExtendsResult.False;
136790
+ }
136791
+ function FromRecord(left, right) {
136792
+ return IsStructuralRight(right) ? StructuralRight(left, right) : type_exports.IsObject(right) ? FromObjectRight(left, right) : !type_exports.IsRecord(right) ? ExtendsResult.False : Visit3(RecordValue(left), RecordValue(right));
136793
+ }
136794
+ function FromRegExp(left, right) {
136795
+ const L = type_exports.IsRegExp(left) ? String2() : left;
136796
+ const R2 = type_exports.IsRegExp(right) ? String2() : right;
136797
+ return Visit3(L, R2);
136798
+ }
136799
+ function FromStringRight(left, right) {
136800
+ return type_exports.IsLiteral(left) && value_exports.IsString(left.const) ? ExtendsResult.True : type_exports.IsString(left) ? ExtendsResult.True : ExtendsResult.False;
136801
+ }
136802
+ function FromString(left, right) {
136803
+ 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;
136804
+ }
136805
+ function FromSymbol(left, right) {
136806
+ 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;
136807
+ }
136808
+ function FromTemplateLiteral2(left, right) {
136809
+ return type_exports.IsTemplateLiteral(left) ? Visit3(TemplateLiteralToUnion(left), right) : type_exports.IsTemplateLiteral(right) ? Visit3(left, TemplateLiteralToUnion(right)) : Throw("Invalid fallthrough for TemplateLiteral");
136810
+ }
136811
+ function IsArrayOfTuple(left, right) {
136812
+ return type_exports.IsArray(right) && left.items !== void 0 && left.items.every((schema) => Visit3(schema, right.items) === ExtendsResult.True);
136813
+ }
136814
+ function FromTupleRight(left, right) {
136815
+ return type_exports.IsNever(left) ? ExtendsResult.True : type_exports.IsUnknown(left) ? ExtendsResult.False : type_exports.IsAny(left) ? ExtendsResult.Union : ExtendsResult.False;
136816
+ }
136817
+ function FromTuple3(left, right) {
136818
+ 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;
136819
+ }
136820
+ function FromUint8Array(left, right) {
136821
+ 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;
136822
+ }
136823
+ function FromUndefined(left, right) {
136824
+ 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;
136825
+ }
136826
+ function FromUnionRight(left, right) {
136827
+ return right.anyOf.some((schema) => Visit3(left, schema) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False;
136828
+ }
136829
+ function FromUnion6(left, right) {
136830
+ return left.anyOf.every((schema) => Visit3(schema, right) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False;
136831
+ }
136832
+ function FromUnknownRight(left, right) {
136833
+ return ExtendsResult.True;
136834
+ }
136835
+ function FromUnknown(left, right) {
136836
+ 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;
136837
+ }
136838
+ function FromVoidRight(left, right) {
136839
+ return type_exports.IsUndefined(left) ? ExtendsResult.True : type_exports.IsUndefined(left) ? ExtendsResult.True : ExtendsResult.False;
136840
+ }
136841
+ function FromVoid(left, right) {
136842
+ 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;
136843
+ }
136844
+ function Visit3(left, right) {
136845
+ return (
136846
+ // resolvable
136847
+ 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) : (
136848
+ // standard
136849
+ 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]}'`)
136850
+ )
136851
+ );
136852
+ }
136853
+ function ExtendsCheck(left, right) {
136854
+ return Visit3(left, right);
136855
+ }
136856
+
136857
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/extends/extends-from-mapped-result.mjs
136858
+ function FromProperties8(P2, Right, True, False, options) {
136859
+ const Acc = {};
136860
+ for (const K2 of globalThis.Object.getOwnPropertyNames(P2))
136861
+ Acc[K2] = Extends(P2[K2], Right, True, False, Clone(options));
136862
+ return Acc;
136863
+ }
136864
+ function FromMappedResult6(Left, Right, True, False, options) {
136865
+ return FromProperties8(Left.properties, Right, True, False, options);
136866
+ }
136867
+ function ExtendsFromMappedResult(Left, Right, True, False, options) {
136868
+ const P2 = FromMappedResult6(Left, Right, True, False, options);
136869
+ return MappedResult(P2);
136870
+ }
136871
+
136872
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/extends/extends.mjs
136873
+ function ExtendsResolve(left, right, trueType, falseType) {
136874
+ const R2 = ExtendsCheck(left, right);
136875
+ return R2 === ExtendsResult.Union ? Union([trueType, falseType]) : R2 === ExtendsResult.True ? trueType : falseType;
136876
+ }
136877
+ function Extends(L, R2, T, F, options) {
136878
+ return IsMappedResult(L) ? ExtendsFromMappedResult(L, R2, T, F, options) : IsMappedKey(L) ? CreateType(ExtendsFromMappedKey(L, R2, T, F, options)) : CreateType(ExtendsResolve(L, R2, T, F), options);
136879
+ }
136880
+
136881
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/extends/extends-from-mapped-key.mjs
136882
+ function FromPropertyKey(K2, U, L, R2, options) {
136883
+ return {
136884
+ [K2]: Extends(Literal(K2), U, L, R2, Clone(options))
136885
+ };
136886
+ }
136887
+ function FromPropertyKeys(K2, U, L, R2, options) {
136888
+ return K2.reduce((Acc, LK) => {
136889
+ return { ...Acc, ...FromPropertyKey(LK, U, L, R2, options) };
136890
+ }, {});
136891
+ }
136892
+ function FromMappedKey2(K2, U, L, R2, options) {
136893
+ return FromPropertyKeys(K2.keys, U, L, R2, options);
136894
+ }
136895
+ function ExtendsFromMappedKey(T, U, L, R2, options) {
136896
+ const P2 = FromMappedKey2(T, U, L, R2, options);
136897
+ return MappedResult(P2);
136898
+ }
136899
+
136900
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/exclude/exclude-from-template-literal.mjs
136901
+ function ExcludeFromTemplateLiteral(L, R2) {
136902
+ return Exclude(TemplateLiteralToUnion(L), R2);
136903
+ }
136904
+
136905
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/exclude/exclude.mjs
136906
+ function ExcludeRest(L, R2) {
136907
+ const excluded = L.filter((inner) => ExtendsCheck(inner, R2) === ExtendsResult.False);
136908
+ return excluded.length === 1 ? excluded[0] : Union(excluded);
136909
+ }
136910
+ function Exclude(L, R2, options = {}) {
136911
+ if (IsTemplateLiteral(L))
136912
+ return CreateType(ExcludeFromTemplateLiteral(L, R2), options);
136913
+ if (IsMappedResult(L))
136914
+ return CreateType(ExcludeFromMappedResult(L, R2), options);
136915
+ return CreateType(IsUnion(L) ? ExcludeRest(L.anyOf, R2) : ExtendsCheck(L, R2) !== ExtendsResult.False ? Never() : L, options);
136916
+ }
136917
+
136918
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/exclude/exclude-from-mapped-result.mjs
136919
+ function FromProperties9(P2, U) {
136920
+ const Acc = {};
136921
+ for (const K2 of globalThis.Object.getOwnPropertyNames(P2))
136922
+ Acc[K2] = Exclude(P2[K2], U);
136923
+ return Acc;
136924
+ }
136925
+ function FromMappedResult7(R2, T) {
136926
+ return FromProperties9(R2.properties, T);
136927
+ }
136928
+ function ExcludeFromMappedResult(R2, T) {
136929
+ const P2 = FromMappedResult7(R2, T);
136930
+ return MappedResult(P2);
136931
+ }
136932
+
136933
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/extract/extract-from-template-literal.mjs
136934
+ function ExtractFromTemplateLiteral(L, R2) {
136935
+ return Extract(TemplateLiteralToUnion(L), R2);
136936
+ }
136937
+
136938
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/extract/extract.mjs
136939
+ function ExtractRest(L, R2) {
136940
+ const extracted = L.filter((inner) => ExtendsCheck(inner, R2) !== ExtendsResult.False);
136941
+ return extracted.length === 1 ? extracted[0] : Union(extracted);
136942
+ }
136943
+ function Extract(L, R2, options) {
136944
+ if (IsTemplateLiteral(L))
136945
+ return CreateType(ExtractFromTemplateLiteral(L, R2), options);
136946
+ if (IsMappedResult(L))
136947
+ return CreateType(ExtractFromMappedResult(L, R2), options);
136948
+ return CreateType(IsUnion(L) ? ExtractRest(L.anyOf, R2) : ExtendsCheck(L, R2) !== ExtendsResult.False ? L : Never(), options);
136949
+ }
136950
+
136951
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/extract/extract-from-mapped-result.mjs
136952
+ function FromProperties10(P2, T) {
136953
+ const Acc = {};
136954
+ for (const K2 of globalThis.Object.getOwnPropertyNames(P2))
136955
+ Acc[K2] = Extract(P2[K2], T);
136956
+ return Acc;
136957
+ }
136958
+ function FromMappedResult8(R2, T) {
136959
+ return FromProperties10(R2.properties, T);
136960
+ }
136961
+ function ExtractFromMappedResult(R2, T) {
136962
+ const P2 = FromMappedResult8(R2, T);
136963
+ return MappedResult(P2);
136964
+ }
136965
+
136966
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/instance-type/instance-type.mjs
136967
+ function InstanceType(schema, options) {
136968
+ return IsConstructor(schema) ? CreateType(schema.returns, options) : Never(options);
136969
+ }
136970
+
136971
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/readonly-optional/readonly-optional.mjs
136972
+ function ReadonlyOptional(schema) {
136973
+ return Readonly(Optional(schema));
136974
+ }
136975
+
136976
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/record/record.mjs
136977
+ function RecordCreateFromPattern(pattern, T, options) {
136978
+ return CreateType({ [Kind]: "Record", type: "object", patternProperties: { [pattern]: T } }, options);
136979
+ }
136980
+ function RecordCreateFromKeys(K2, T, options) {
136981
+ const result = {};
136982
+ for (const K22 of K2)
136983
+ result[K22] = T;
136984
+ return Object2(result, { ...options, [Hint]: "Record" });
136985
+ }
136986
+ function FromTemplateLiteralKey(K2, T, options) {
136987
+ return IsTemplateLiteralFinite(K2) ? RecordCreateFromKeys(IndexPropertyKeys(K2), T, options) : RecordCreateFromPattern(K2.pattern, T, options);
136988
+ }
136989
+ function FromUnionKey(key, type, options) {
136990
+ return RecordCreateFromKeys(IndexPropertyKeys(Union(key)), type, options);
136991
+ }
136992
+ function FromLiteralKey(key, type, options) {
136993
+ return RecordCreateFromKeys([key.toString()], type, options);
136994
+ }
136995
+ function FromRegExpKey(key, type, options) {
136996
+ return RecordCreateFromPattern(key.source, type, options);
136997
+ }
136998
+ function FromStringKey(key, type, options) {
136999
+ const pattern = IsUndefined(key.pattern) ? PatternStringExact : key.pattern;
137000
+ return RecordCreateFromPattern(pattern, type, options);
137001
+ }
137002
+ function FromAnyKey(_, type, options) {
137003
+ return RecordCreateFromPattern(PatternStringExact, type, options);
137004
+ }
137005
+ function FromNeverKey(_key, type, options) {
137006
+ return RecordCreateFromPattern(PatternNeverExact, type, options);
137007
+ }
137008
+ function FromBooleanKey(_key, type, options) {
137009
+ return Object2({ true: type, false: type }, options);
137010
+ }
137011
+ function FromIntegerKey(_key, type, options) {
137012
+ return RecordCreateFromPattern(PatternNumberExact, type, options);
137013
+ }
137014
+ function FromNumberKey(_, type, options) {
137015
+ return RecordCreateFromPattern(PatternNumberExact, type, options);
137016
+ }
137017
+ function Record(key, type, options = {}) {
137018
+ 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);
137019
+ }
137020
+ function RecordPattern(record) {
137021
+ return globalThis.Object.getOwnPropertyNames(record.patternProperties)[0];
137022
+ }
137023
+ function RecordKey2(type) {
137024
+ const pattern = RecordPattern(type);
137025
+ return pattern === PatternStringExact ? String2() : pattern === PatternNumberExact ? Number2() : String2({ pattern });
137026
+ }
137027
+ function RecordValue2(type) {
137028
+ return type.patternProperties[RecordPattern(type)];
137029
+ }
137030
+
137031
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/instantiate/instantiate.mjs
137032
+ function FromConstructor2(args, type) {
137033
+ type.parameters = FromTypes(args, type.parameters);
137034
+ type.returns = FromType(args, type.returns);
137035
+ return type;
137036
+ }
137037
+ function FromFunction2(args, type) {
137038
+ type.parameters = FromTypes(args, type.parameters);
137039
+ type.returns = FromType(args, type.returns);
137040
+ return type;
137041
+ }
137042
+ function FromIntersect5(args, type) {
137043
+ type.allOf = FromTypes(args, type.allOf);
137044
+ return type;
137045
+ }
137046
+ function FromUnion7(args, type) {
137047
+ type.anyOf = FromTypes(args, type.anyOf);
137048
+ return type;
137049
+ }
137050
+ function FromTuple4(args, type) {
137051
+ if (IsUndefined(type.items))
137052
+ return type;
137053
+ type.items = FromTypes(args, type.items);
137054
+ return type;
137055
+ }
137056
+ function FromArray5(args, type) {
137057
+ type.items = FromType(args, type.items);
137058
+ return type;
137059
+ }
137060
+ function FromAsyncIterator2(args, type) {
137061
+ type.items = FromType(args, type.items);
137062
+ return type;
137063
+ }
137064
+ function FromIterator2(args, type) {
137065
+ type.items = FromType(args, type.items);
137066
+ return type;
137067
+ }
137068
+ function FromPromise3(args, type) {
137069
+ type.item = FromType(args, type.item);
137070
+ return type;
137071
+ }
137072
+ function FromObject2(args, type) {
137073
+ const mappedProperties = FromProperties11(args, type.properties);
137074
+ return { ...type, ...Object2(mappedProperties) };
137075
+ }
137076
+ function FromRecord2(args, type) {
137077
+ const mappedKey = FromType(args, RecordKey2(type));
137078
+ const mappedValue = FromType(args, RecordValue2(type));
137079
+ const result = Record(mappedKey, mappedValue);
137080
+ return { ...type, ...result };
137081
+ }
137082
+ function FromArgument(args, argument) {
137083
+ return argument.index in args ? args[argument.index] : Unknown();
137084
+ }
137085
+ function FromProperty2(args, type) {
137086
+ const isReadonly = IsReadonly(type);
137087
+ const isOptional = IsOptional(type);
137088
+ const mapped = FromType(args, type);
137089
+ return isReadonly && isOptional ? ReadonlyOptional(mapped) : isReadonly && !isOptional ? Readonly(mapped) : !isReadonly && isOptional ? Optional(mapped) : mapped;
137090
+ }
137091
+ function FromProperties11(args, properties) {
137092
+ return globalThis.Object.getOwnPropertyNames(properties).reduce((result, key) => {
137093
+ return { ...result, [key]: FromProperty2(args, properties[key]) };
137094
+ }, {});
137095
+ }
137096
+ function FromTypes(args, types) {
137097
+ return types.map((type) => FromType(args, type));
137098
+ }
137099
+ function FromType(args, type) {
137100
+ 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;
137101
+ }
137102
+ function Instantiate(type, args) {
137103
+ return FromType(args, CloneType(type));
137104
+ }
137105
+
137106
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/integer/integer.mjs
137107
+ function Integer(options) {
137108
+ return CreateType({ [Kind]: "Integer", type: "integer" }, options);
137109
+ }
137110
+
137111
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/intrinsic/intrinsic-from-mapped-key.mjs
137112
+ function MappedIntrinsicPropertyKey(K2, M, options) {
137113
+ return {
137114
+ [K2]: Intrinsic(Literal(K2), M, Clone(options))
137115
+ };
137116
+ }
137117
+ function MappedIntrinsicPropertyKeys(K2, M, options) {
137118
+ const result = K2.reduce((Acc, L) => {
137119
+ return { ...Acc, ...MappedIntrinsicPropertyKey(L, M, options) };
137120
+ }, {});
137121
+ return result;
137122
+ }
137123
+ function MappedIntrinsicProperties(T, M, options) {
137124
+ return MappedIntrinsicPropertyKeys(T["keys"], M, options);
137125
+ }
137126
+ function IntrinsicFromMappedKey(T, M, options) {
137127
+ const P2 = MappedIntrinsicProperties(T, M, options);
137128
+ return MappedResult(P2);
137129
+ }
137130
+
137131
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/intrinsic/intrinsic.mjs
137132
+ function ApplyUncapitalize(value) {
137133
+ const [first, rest] = [value.slice(0, 1), value.slice(1)];
137134
+ return [first.toLowerCase(), rest].join("");
137135
+ }
137136
+ function ApplyCapitalize(value) {
137137
+ const [first, rest] = [value.slice(0, 1), value.slice(1)];
137138
+ return [first.toUpperCase(), rest].join("");
137139
+ }
137140
+ function ApplyUppercase(value) {
137141
+ return value.toUpperCase();
137142
+ }
137143
+ function ApplyLowercase(value) {
137144
+ return value.toLowerCase();
137145
+ }
137146
+ function FromTemplateLiteral3(schema, mode, options) {
137147
+ const expression = TemplateLiteralParseExact(schema.pattern);
137148
+ const finite = IsTemplateLiteralExpressionFinite(expression);
137149
+ if (!finite)
137150
+ return { ...schema, pattern: FromLiteralValue(schema.pattern, mode) };
137151
+ const strings = [...TemplateLiteralExpressionGenerate(expression)];
137152
+ const literals = strings.map((value) => Literal(value));
137153
+ const mapped = FromRest5(literals, mode);
137154
+ const union = Union(mapped);
137155
+ return TemplateLiteral([union], options);
137156
+ }
137157
+ function FromLiteralValue(value, mode) {
137158
+ return typeof value === "string" ? mode === "Uncapitalize" ? ApplyUncapitalize(value) : mode === "Capitalize" ? ApplyCapitalize(value) : mode === "Uppercase" ? ApplyUppercase(value) : mode === "Lowercase" ? ApplyLowercase(value) : value : value.toString();
137159
+ }
137160
+ function FromRest5(T, M) {
137161
+ return T.map((L) => Intrinsic(L, M));
137162
+ }
137163
+ function Intrinsic(schema, mode, options = {}) {
137164
+ return (
137165
+ // Intrinsic-Mapped-Inference
137166
+ IsMappedKey(schema) ? IntrinsicFromMappedKey(schema, mode, options) : (
137167
+ // Standard-Inference
137168
+ IsTemplateLiteral(schema) ? FromTemplateLiteral3(schema, mode, options) : IsUnion(schema) ? Union(FromRest5(schema.anyOf, mode), options) : IsLiteral(schema) ? Literal(FromLiteralValue(schema.const, mode), options) : (
137169
+ // Default Type
137170
+ CreateType(schema, options)
137171
+ )
137172
+ )
137173
+ );
137174
+ }
137175
+
137176
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/intrinsic/capitalize.mjs
137177
+ function Capitalize(T, options = {}) {
137178
+ return Intrinsic(T, "Capitalize", options);
137179
+ }
137180
+
137181
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/intrinsic/lowercase.mjs
137182
+ function Lowercase(T, options = {}) {
137183
+ return Intrinsic(T, "Lowercase", options);
137184
+ }
137185
+
137186
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/intrinsic/uncapitalize.mjs
137187
+ function Uncapitalize(T, options = {}) {
137188
+ return Intrinsic(T, "Uncapitalize", options);
137189
+ }
137190
+
137191
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/intrinsic/uppercase.mjs
137192
+ function Uppercase(T, options = {}) {
137193
+ return Intrinsic(T, "Uppercase", options);
137194
+ }
137195
+
137196
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-result.mjs
137197
+ function FromProperties12(properties, propertyKeys, options) {
137198
+ const result = {};
137199
+ for (const K2 of globalThis.Object.getOwnPropertyNames(properties))
137200
+ result[K2] = Omit(properties[K2], propertyKeys, Clone(options));
137201
+ return result;
137202
+ }
137203
+ function FromMappedResult9(mappedResult, propertyKeys, options) {
137204
+ return FromProperties12(mappedResult.properties, propertyKeys, options);
137205
+ }
137206
+ function OmitFromMappedResult(mappedResult, propertyKeys, options) {
137207
+ const properties = FromMappedResult9(mappedResult, propertyKeys, options);
137208
+ return MappedResult(properties);
137209
+ }
137210
+
137211
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/omit/omit.mjs
137212
+ function FromIntersect6(types, propertyKeys) {
137213
+ return types.map((type) => OmitResolve(type, propertyKeys));
137214
+ }
137215
+ function FromUnion8(types, propertyKeys) {
137216
+ return types.map((type) => OmitResolve(type, propertyKeys));
137217
+ }
137218
+ function FromProperty3(properties, key) {
137219
+ const { [key]: _, ...R2 } = properties;
137220
+ return R2;
137221
+ }
137222
+ function FromProperties13(properties, propertyKeys) {
137223
+ return propertyKeys.reduce((T, K2) => FromProperty3(T, K2), properties);
137224
+ }
137225
+ function FromObject3(type, propertyKeys, properties) {
137226
+ const options = Discard(type, [TransformKind, "$id", "required", "properties"]);
137227
+ const mappedProperties = FromProperties13(properties, propertyKeys);
137228
+ return Object2(mappedProperties, options);
137229
+ }
137230
+ function UnionFromPropertyKeys(propertyKeys) {
137231
+ const result = propertyKeys.reduce((result2, key) => IsLiteralValue(key) ? [...result2, Literal(key)] : result2, []);
137232
+ return Union(result);
137233
+ }
137234
+ function OmitResolve(type, propertyKeys) {
137235
+ return IsIntersect(type) ? Intersect(FromIntersect6(type.allOf, propertyKeys)) : IsUnion(type) ? Union(FromUnion8(type.anyOf, propertyKeys)) : IsObject3(type) ? FromObject3(type, propertyKeys, type.properties) : Object2({});
137236
+ }
137237
+ function Omit(type, key, options) {
137238
+ const typeKey = IsArray(key) ? UnionFromPropertyKeys(key) : key;
137239
+ const propertyKeys = IsSchema(key) ? IndexPropertyKeys(key) : key;
137240
+ const isTypeRef = IsRef(type);
137241
+ const isKeyRef = IsRef(key);
137242
+ 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 });
137243
+ }
137244
+
137245
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-key.mjs
137246
+ function FromPropertyKey2(type, key, options) {
137247
+ return { [key]: Omit(type, [key], Clone(options)) };
137248
+ }
137249
+ function FromPropertyKeys2(type, propertyKeys, options) {
137250
+ return propertyKeys.reduce((Acc, LK) => {
137251
+ return { ...Acc, ...FromPropertyKey2(type, LK, options) };
137252
+ }, {});
137253
+ }
137254
+ function FromMappedKey3(type, mappedKey, options) {
137255
+ return FromPropertyKeys2(type, mappedKey.keys, options);
137256
+ }
137257
+ function OmitFromMappedKey(type, mappedKey, options) {
137258
+ const properties = FromMappedKey3(type, mappedKey, options);
137259
+ return MappedResult(properties);
137260
+ }
137261
+
137262
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-result.mjs
137263
+ function FromProperties14(properties, propertyKeys, options) {
137264
+ const result = {};
137265
+ for (const K2 of globalThis.Object.getOwnPropertyNames(properties))
137266
+ result[K2] = Pick(properties[K2], propertyKeys, Clone(options));
137267
+ return result;
137268
+ }
137269
+ function FromMappedResult10(mappedResult, propertyKeys, options) {
137270
+ return FromProperties14(mappedResult.properties, propertyKeys, options);
137271
+ }
137272
+ function PickFromMappedResult(mappedResult, propertyKeys, options) {
137273
+ const properties = FromMappedResult10(mappedResult, propertyKeys, options);
137274
+ return MappedResult(properties);
137275
+ }
137276
+
137277
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/pick/pick.mjs
137278
+ function FromIntersect7(types, propertyKeys) {
137279
+ return types.map((type) => PickResolve(type, propertyKeys));
137280
+ }
137281
+ function FromUnion9(types, propertyKeys) {
137282
+ return types.map((type) => PickResolve(type, propertyKeys));
137283
+ }
137284
+ function FromProperties15(properties, propertyKeys) {
137285
+ const result = {};
137286
+ for (const K2 of propertyKeys)
137287
+ if (K2 in properties)
137288
+ result[K2] = properties[K2];
137289
+ return result;
137290
+ }
137291
+ function FromObject4(Type2, keys, properties) {
137292
+ const options = Discard(Type2, [TransformKind, "$id", "required", "properties"]);
137293
+ const mappedProperties = FromProperties15(properties, keys);
137294
+ return Object2(mappedProperties, options);
137295
+ }
137296
+ function UnionFromPropertyKeys2(propertyKeys) {
137297
+ const result = propertyKeys.reduce((result2, key) => IsLiteralValue(key) ? [...result2, Literal(key)] : result2, []);
137298
+ return Union(result);
137299
+ }
137300
+ function PickResolve(type, propertyKeys) {
137301
+ return IsIntersect(type) ? Intersect(FromIntersect7(type.allOf, propertyKeys)) : IsUnion(type) ? Union(FromUnion9(type.anyOf, propertyKeys)) : IsObject3(type) ? FromObject4(type, propertyKeys, type.properties) : Object2({});
137302
+ }
137303
+ function Pick(type, key, options) {
137304
+ const typeKey = IsArray(key) ? UnionFromPropertyKeys2(key) : key;
137305
+ const propertyKeys = IsSchema(key) ? IndexPropertyKeys(key) : key;
137306
+ const isTypeRef = IsRef(type);
137307
+ const isKeyRef = IsRef(key);
137308
+ 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 });
137309
+ }
137310
+
137311
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-key.mjs
137312
+ function FromPropertyKey3(type, key, options) {
137313
+ return {
137314
+ [key]: Pick(type, [key], Clone(options))
137315
+ };
137316
+ }
137317
+ function FromPropertyKeys3(type, propertyKeys, options) {
137318
+ return propertyKeys.reduce((result, leftKey) => {
137319
+ return { ...result, ...FromPropertyKey3(type, leftKey, options) };
137320
+ }, {});
137321
+ }
137322
+ function FromMappedKey4(type, mappedKey, options) {
137323
+ return FromPropertyKeys3(type, mappedKey.keys, options);
137324
+ }
137325
+ function PickFromMappedKey(type, mappedKey, options) {
137326
+ const properties = FromMappedKey4(type, mappedKey, options);
137327
+ return MappedResult(properties);
137328
+ }
137329
+
137330
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/partial/partial.mjs
137331
+ function FromComputed3(target, parameters) {
137332
+ return Computed("Partial", [Computed(target, parameters)]);
137333
+ }
137334
+ function FromRef3($ref) {
137335
+ return Computed("Partial", [Ref($ref)]);
137336
+ }
137337
+ function FromProperties16(properties) {
137338
+ const partialProperties = {};
137339
+ for (const K2 of globalThis.Object.getOwnPropertyNames(properties))
137340
+ partialProperties[K2] = Optional(properties[K2]);
137341
+ return partialProperties;
137342
+ }
137343
+ function FromObject5(type, properties) {
137344
+ const options = Discard(type, [TransformKind, "$id", "required", "properties"]);
137345
+ const mappedProperties = FromProperties16(properties);
137346
+ return Object2(mappedProperties, options);
137347
+ }
137348
+ function FromRest6(types) {
137349
+ return types.map((type) => PartialResolve(type));
137350
+ }
137351
+ function PartialResolve(type) {
137352
+ return (
137353
+ // Mappable
137354
+ 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) : (
137355
+ // Intrinsic
137356
+ 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 : (
137357
+ // Passthrough
137358
+ Object2({})
137359
+ )
137360
+ )
137361
+ );
137362
+ }
137363
+ function Partial(type, options) {
137364
+ if (IsMappedResult(type)) {
137365
+ return PartialFromMappedResult(type, options);
137366
+ } else {
137367
+ return CreateType({ ...PartialResolve(type), ...options });
137368
+ }
137369
+ }
137370
+
137371
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/partial/partial-from-mapped-result.mjs
137372
+ function FromProperties17(K2, options) {
137373
+ const Acc = {};
137374
+ for (const K22 of globalThis.Object.getOwnPropertyNames(K2))
137375
+ Acc[K22] = Partial(K2[K22], Clone(options));
137376
+ return Acc;
137377
+ }
137378
+ function FromMappedResult11(R2, options) {
137379
+ return FromProperties17(R2.properties, options);
137380
+ }
137381
+ function PartialFromMappedResult(R2, options) {
137382
+ const P2 = FromMappedResult11(R2, options);
137383
+ return MappedResult(P2);
137384
+ }
137385
+
137386
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/required/required.mjs
137387
+ function FromComputed4(target, parameters) {
137388
+ return Computed("Required", [Computed(target, parameters)]);
137389
+ }
137390
+ function FromRef4($ref) {
137391
+ return Computed("Required", [Ref($ref)]);
137392
+ }
137393
+ function FromProperties18(properties) {
137394
+ const requiredProperties = {};
137395
+ for (const K2 of globalThis.Object.getOwnPropertyNames(properties))
137396
+ requiredProperties[K2] = Discard(properties[K2], [OptionalKind]);
137397
+ return requiredProperties;
137398
+ }
137399
+ function FromObject6(type, properties) {
137400
+ const options = Discard(type, [TransformKind, "$id", "required", "properties"]);
137401
+ const mappedProperties = FromProperties18(properties);
137402
+ return Object2(mappedProperties, options);
137403
+ }
137404
+ function FromRest7(types) {
137405
+ return types.map((type) => RequiredResolve(type));
137406
+ }
137407
+ function RequiredResolve(type) {
137408
+ return (
137409
+ // Mappable
137410
+ 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) : (
137411
+ // Intrinsic
137412
+ 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 : (
137413
+ // Passthrough
137414
+ Object2({})
137415
+ )
137416
+ )
137417
+ );
137418
+ }
137419
+ function Required(type, options) {
137420
+ if (IsMappedResult(type)) {
137421
+ return RequiredFromMappedResult(type, options);
137422
+ } else {
137423
+ return CreateType({ ...RequiredResolve(type), ...options });
137424
+ }
137425
+ }
137426
+
137427
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/required/required-from-mapped-result.mjs
137428
+ function FromProperties19(P2, options) {
137429
+ const Acc = {};
137430
+ for (const K2 of globalThis.Object.getOwnPropertyNames(P2))
137431
+ Acc[K2] = Required(P2[K2], options);
137432
+ return Acc;
137433
+ }
137434
+ function FromMappedResult12(R2, options) {
137435
+ return FromProperties19(R2.properties, options);
137436
+ }
137437
+ function RequiredFromMappedResult(R2, options) {
137438
+ const P2 = FromMappedResult12(R2, options);
137439
+ return MappedResult(P2);
137440
+ }
137441
+
137442
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/module/compute.mjs
137443
+ function DereferenceParameters(moduleProperties, types) {
137444
+ return types.map((type) => {
137445
+ return IsRef(type) ? Dereference(moduleProperties, type.$ref) : FromType2(moduleProperties, type);
137446
+ });
137447
+ }
137448
+ function Dereference(moduleProperties, ref) {
137449
+ return ref in moduleProperties ? IsRef(moduleProperties[ref]) ? Dereference(moduleProperties, moduleProperties[ref].$ref) : FromType2(moduleProperties, moduleProperties[ref]) : Never();
137450
+ }
137451
+ function FromAwaited(parameters) {
137452
+ return Awaited(parameters[0]);
137453
+ }
137454
+ function FromIndex(parameters) {
137455
+ return Index(parameters[0], parameters[1]);
137456
+ }
137457
+ function FromKeyOf(parameters) {
137458
+ return KeyOf(parameters[0]);
137459
+ }
137460
+ function FromPartial(parameters) {
137461
+ return Partial(parameters[0]);
137462
+ }
137463
+ function FromOmit(parameters) {
137464
+ return Omit(parameters[0], parameters[1]);
137465
+ }
137466
+ function FromPick(parameters) {
137467
+ return Pick(parameters[0], parameters[1]);
137468
+ }
137469
+ function FromRequired(parameters) {
137470
+ return Required(parameters[0]);
137471
+ }
137472
+ function FromComputed5(moduleProperties, target, parameters) {
137473
+ const dereferenced = DereferenceParameters(moduleProperties, parameters);
137474
+ 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();
137475
+ }
137476
+ function FromArray6(moduleProperties, type) {
137477
+ return Array2(FromType2(moduleProperties, type));
137478
+ }
137479
+ function FromAsyncIterator3(moduleProperties, type) {
137480
+ return AsyncIterator(FromType2(moduleProperties, type));
137481
+ }
137482
+ function FromConstructor3(moduleProperties, parameters, instanceType) {
137483
+ return Constructor(FromTypes2(moduleProperties, parameters), FromType2(moduleProperties, instanceType));
137484
+ }
137485
+ function FromFunction3(moduleProperties, parameters, returnType) {
137486
+ return Function2(FromTypes2(moduleProperties, parameters), FromType2(moduleProperties, returnType));
137487
+ }
137488
+ function FromIntersect8(moduleProperties, types) {
137489
+ return Intersect(FromTypes2(moduleProperties, types));
137490
+ }
137491
+ function FromIterator3(moduleProperties, type) {
137492
+ return Iterator(FromType2(moduleProperties, type));
137493
+ }
137494
+ function FromObject7(moduleProperties, properties) {
137495
+ return Object2(globalThis.Object.keys(properties).reduce((result, key) => {
137496
+ return { ...result, [key]: FromType2(moduleProperties, properties[key]) };
137497
+ }, {}));
137498
+ }
137499
+ function FromRecord3(moduleProperties, type) {
137500
+ const [value, pattern] = [FromType2(moduleProperties, RecordValue2(type)), RecordPattern(type)];
137501
+ const result = CloneType(type);
137502
+ result.patternProperties[pattern] = value;
137503
+ return result;
137504
+ }
137505
+ function FromTransform(moduleProperties, transform) {
137506
+ return IsRef(transform) ? { ...Dereference(moduleProperties, transform.$ref), [TransformKind]: transform[TransformKind] } : transform;
137507
+ }
137508
+ function FromTuple5(moduleProperties, types) {
137509
+ return Tuple(FromTypes2(moduleProperties, types));
137510
+ }
137511
+ function FromUnion10(moduleProperties, types) {
137512
+ return Union(FromTypes2(moduleProperties, types));
137513
+ }
137514
+ function FromTypes2(moduleProperties, types) {
137515
+ return types.map((type) => FromType2(moduleProperties, type));
137516
+ }
137517
+ function FromType2(moduleProperties, type) {
137518
+ return (
137519
+ // Modifiers
137520
+ IsOptional(type) ? CreateType(FromType2(moduleProperties, Discard(type, [OptionalKind])), type) : IsReadonly(type) ? CreateType(FromType2(moduleProperties, Discard(type, [ReadonlyKind])), type) : (
137521
+ // Transform
137522
+ IsTransform(type) ? CreateType(FromTransform(moduleProperties, type), type) : (
137523
+ // Types
137524
+ 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
137525
+ )
137526
+ )
137527
+ );
137528
+ }
137529
+ function ComputeType(moduleProperties, key) {
137530
+ return key in moduleProperties ? FromType2(moduleProperties, moduleProperties[key]) : Never();
137531
+ }
137532
+ function ComputeModuleProperties(moduleProperties) {
137533
+ return globalThis.Object.getOwnPropertyNames(moduleProperties).reduce((result, key) => {
137534
+ return { ...result, [key]: ComputeType(moduleProperties, key) };
137535
+ }, {});
137536
+ }
137537
+
137538
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/module/module.mjs
137539
+ var TModule = class {
137540
+ constructor($defs) {
137541
+ const computed = ComputeModuleProperties($defs);
137542
+ const identified = this.WithIdentifiers(computed);
137543
+ this.$defs = identified;
137544
+ }
137545
+ /** `[Json]` Imports a Type by Key. */
137546
+ Import(key, options) {
137547
+ const $defs = { ...this.$defs, [key]: CreateType(this.$defs[key], options) };
137548
+ return CreateType({ [Kind]: "Import", $defs, $ref: key });
137549
+ }
137550
+ // prettier-ignore
137551
+ WithIdentifiers($defs) {
137552
+ return globalThis.Object.getOwnPropertyNames($defs).reduce((result, key) => {
137553
+ return { ...result, [key]: { ...$defs[key], $id: key } };
137554
+ }, {});
137555
+ }
137556
+ };
137557
+ function Module(properties) {
137558
+ return new TModule(properties);
137559
+ }
137560
+
137561
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/not/not.mjs
137562
+ function Not(type, options) {
137563
+ return CreateType({ [Kind]: "Not", not: type }, options);
137564
+ }
137565
+
137566
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/parameters/parameters.mjs
137567
+ function Parameters(schema, options) {
137568
+ return IsFunction2(schema) ? Tuple(schema.parameters, options) : Never();
137569
+ }
137570
+
137571
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/recursive/recursive.mjs
137572
+ var Ordinal = 0;
137573
+ function Recursive(callback, options = {}) {
137574
+ if (IsUndefined(options.$id))
137575
+ options.$id = `T${Ordinal++}`;
137576
+ const thisType = CloneType(callback({ [Kind]: "This", $ref: `${options.$id}` }));
137577
+ thisType.$id = options.$id;
137578
+ return CreateType({ [Hint]: "Recursive", ...thisType }, options);
137579
+ }
137580
+
137581
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/regexp/regexp.mjs
137582
+ function RegExp2(unresolved, options) {
137583
+ const expr = IsString(unresolved) ? new globalThis.RegExp(unresolved) : unresolved;
137584
+ return CreateType({ [Kind]: "RegExp", type: "RegExp", source: expr.source, flags: expr.flags }, options);
137585
+ }
137586
+
137587
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/rest/rest.mjs
137588
+ function RestResolve(T) {
137589
+ return IsIntersect(T) ? T.allOf : IsUnion(T) ? T.anyOf : IsTuple(T) ? T.items ?? [] : [];
137590
+ }
137591
+ function Rest(T) {
137592
+ return RestResolve(T);
137593
+ }
137594
+
137595
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/return-type/return-type.mjs
137596
+ function ReturnType(schema, options) {
137597
+ return IsFunction2(schema) ? CreateType(schema.returns, options) : Never(options);
137598
+ }
137599
+
137600
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/transform/transform.mjs
137601
+ var TransformDecodeBuilder = class {
137602
+ constructor(schema) {
137603
+ this.schema = schema;
137604
+ }
137605
+ Decode(decode) {
137606
+ return new TransformEncodeBuilder(this.schema, decode);
137607
+ }
137608
+ };
137609
+ var TransformEncodeBuilder = class {
137610
+ constructor(schema, decode) {
137611
+ this.schema = schema;
137612
+ this.decode = decode;
137613
+ }
137614
+ EncodeTransform(encode2, schema) {
137615
+ const Encode = (value) => schema[TransformKind].Encode(encode2(value));
137616
+ const Decode = (value) => this.decode(schema[TransformKind].Decode(value));
137617
+ const Codec = { Encode, Decode };
137618
+ return { ...schema, [TransformKind]: Codec };
137619
+ }
137620
+ EncodeSchema(encode2, schema) {
137621
+ const Codec = { Decode: this.decode, Encode: encode2 };
137622
+ return { ...schema, [TransformKind]: Codec };
137623
+ }
137624
+ Encode(encode2) {
137625
+ return IsTransform(this.schema) ? this.EncodeTransform(encode2, this.schema) : this.EncodeSchema(encode2, this.schema);
137626
+ }
137627
+ };
137628
+ function Transform(schema) {
137629
+ return new TransformDecodeBuilder(schema);
137630
+ }
137631
+
137632
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/unsafe/unsafe.mjs
137633
+ function Unsafe(options = {}) {
137634
+ return CreateType({ [Kind]: options[Kind] ?? "Unsafe" }, options);
137635
+ }
137636
+
137637
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/void/void.mjs
137638
+ function Void(options) {
137639
+ return CreateType({ [Kind]: "Void", type: "void" }, options);
137640
+ }
137641
+
137642
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/type/type.mjs
137643
+ var type_exports2 = {};
137644
+ __export(type_exports2, {
137645
+ Any: () => Any,
137646
+ Argument: () => Argument,
137647
+ Array: () => Array2,
137648
+ AsyncIterator: () => AsyncIterator,
137649
+ Awaited: () => Awaited,
137650
+ BigInt: () => BigInt2,
137651
+ Boolean: () => Boolean2,
137652
+ Capitalize: () => Capitalize,
137653
+ Composite: () => Composite,
137654
+ Const: () => Const,
137655
+ Constructor: () => Constructor,
137656
+ ConstructorParameters: () => ConstructorParameters,
137657
+ Date: () => Date2,
137658
+ Enum: () => Enum,
137659
+ Exclude: () => Exclude,
137660
+ Extends: () => Extends,
137661
+ Extract: () => Extract,
137662
+ Function: () => Function2,
137663
+ Index: () => Index,
137664
+ InstanceType: () => InstanceType,
137665
+ Instantiate: () => Instantiate,
137666
+ Integer: () => Integer,
137667
+ Intersect: () => Intersect,
137668
+ Iterator: () => Iterator,
137669
+ KeyOf: () => KeyOf,
137670
+ Literal: () => Literal,
137671
+ Lowercase: () => Lowercase,
137672
+ Mapped: () => Mapped,
137673
+ Module: () => Module,
137674
+ Never: () => Never,
137675
+ Not: () => Not,
137676
+ Null: () => Null,
137677
+ Number: () => Number2,
137678
+ Object: () => Object2,
137679
+ Omit: () => Omit,
137680
+ Optional: () => Optional,
137681
+ Parameters: () => Parameters,
137682
+ Partial: () => Partial,
137683
+ Pick: () => Pick,
137684
+ Promise: () => Promise2,
137685
+ Readonly: () => Readonly,
137686
+ ReadonlyOptional: () => ReadonlyOptional,
137687
+ Record: () => Record,
137688
+ Recursive: () => Recursive,
137689
+ Ref: () => Ref,
137690
+ RegExp: () => RegExp2,
137691
+ Required: () => Required,
137692
+ Rest: () => Rest,
137693
+ ReturnType: () => ReturnType,
137694
+ String: () => String2,
137695
+ Symbol: () => Symbol2,
137696
+ TemplateLiteral: () => TemplateLiteral,
137697
+ Transform: () => Transform,
137698
+ Tuple: () => Tuple,
137699
+ Uint8Array: () => Uint8Array2,
137700
+ Uncapitalize: () => Uncapitalize,
137701
+ Undefined: () => Undefined,
137702
+ Union: () => Union,
137703
+ Unknown: () => Unknown,
137704
+ Unsafe: () => Unsafe,
137705
+ Uppercase: () => Uppercase,
137706
+ Void: () => Void
137707
+ });
137708
+
137709
+ // ../../node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/type/index.mjs
137710
+ var Type = type_exports2;
137711
+
135106
137712
  // ../plugin-core/dist/wallet.js
135107
137713
  init_mod();
135108
137714
  var import_wallet_toolbox3 = __toESM(require_src3(), 1);
@@ -135500,6 +138106,11 @@ var BSVAgentWallet = class _BSVAgentWallet {
135500
138106
  }
135501
138107
  };
135502
138108
 
138109
+ // ../plugin-core/dist/index.js
138110
+ function definePluginEntry(entry) {
138111
+ return entry;
138112
+ }
138113
+
135503
138114
  // src/scripts/wallet/setup.ts
135504
138115
  async function getBSVAgentWallet() {
135505
138116
  return BSVAgentWallet;
@@ -136870,12 +139481,12 @@ function checkBudget(walletDir, requestedSats, dailyLimit) {
136870
139481
  spent: spending.totalSats
136871
139482
  };
136872
139483
  }
136873
- var plugin = {
139484
+ var plugin = definePluginEntry({
136874
139485
  id: "openclaw-overlay-plugin",
136875
139486
  name: "BSV Overlay Network",
136876
139487
  description: "OpenClaw Overlay \u2014 decentralized agent marketplace with BSV micropayments",
136877
139488
  register(api) {
136878
- const version = "0.8.42";
139489
+ const version = "0.8.45";
136879
139490
  if (isInitialized) return;
136880
139491
  isInitialized = true;
136881
139492
  const config = api.pluginConfig || {};
@@ -137083,24 +139694,20 @@ ${JSON.stringify(event.result, null, 2)}`;
137083
139694
  api.registerTool({
137084
139695
  name: "overlay",
137085
139696
  description: "Access the BSV agent marketplace",
137086
- parameters: {
137087
- type: "object",
137088
- properties: {
137089
- action: { type: "string", enum: ["request", "discover", "balance", "status", "pay", "onboard", "pending-requests", "fulfill", "unregister", "import_utxo", "import_raw_tx"] },
137090
- service: { type: "string" },
137091
- input: { type: "object" },
137092
- identityKey: { type: "string" },
137093
- sats: { type: "number" },
137094
- requestId: { type: "string" },
137095
- recipientKey: { type: "string" },
137096
- serviceId: { type: "string" },
137097
- result: { type: "object" },
137098
- txid: { type: "string" },
137099
- vout: { type: "number" },
137100
- txhex: { type: "string" }
137101
- },
137102
- required: ["action"]
137103
- },
139697
+ parameters: Type.Object({
139698
+ action: Type.String({ enum: ["request", "discover", "balance", "status", "pay", "onboard", "pending-requests", "fulfill", "unregister", "import_utxo", "import_raw_tx"] }),
139699
+ service: Type.Optional(Type.String()),
139700
+ input: Type.Optional(Type.Object({})),
139701
+ identityKey: Type.Optional(Type.String()),
139702
+ sats: Type.Optional(Type.Number()),
139703
+ requestId: Type.Optional(Type.String()),
139704
+ recipientKey: Type.Optional(Type.String()),
139705
+ serviceId: Type.Optional(Type.String()),
139706
+ result: Type.Optional(Type.Object({})),
139707
+ txid: Type.Optional(Type.String()),
139708
+ vout: Type.Optional(Type.Number()),
139709
+ txhex: Type.Optional(Type.String())
139710
+ }),
137104
139711
  async execute(_id, params) {
137105
139712
  log3("Executing tool action: %s with params: %O", params.action, params);
137106
139713
  try {
@@ -137142,7 +139749,7 @@ ${JSON.stringify(result, null, 2)}` };
137142
139749
  }
137143
139750
  }
137144
139751
  });
137145
- api.registerOnboarding({
139752
+ api.registerOnboardingWizard({
137146
139753
  async finalize() {
137147
139754
  const wallet = await BSVAgentWallet.load({ network, storageDir: walletDir });
137148
139755
  const balance = await wallet.getBalance();
@@ -137183,7 +139790,7 @@ ${JSON.stringify(result, null, 2)}` };
137183
139790
  });
137184
139791
  }, { commands: ["overlay"] });
137185
139792
  }
137186
- };
139793
+ });
137187
139794
  var index_default = plugin;
137188
139795
  export {
137189
139796
  index_default as default