@spfn/auth 0.1.0-alpha.88 → 0.2.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/README.md +1385 -1199
  2. package/dist/config.d.ts +409 -0
  3. package/dist/config.js +244 -0
  4. package/dist/config.js.map +1 -0
  5. package/dist/dto-CRlgoCP5.d.ts +645 -0
  6. package/dist/errors.d.ts +196 -0
  7. package/dist/errors.js +173 -0
  8. package/dist/errors.js.map +1 -0
  9. package/dist/index.d.ts +287 -14
  10. package/dist/index.js +511 -6665
  11. package/dist/index.js.map +1 -1
  12. package/dist/nextjs/api.js +345 -0
  13. package/dist/nextjs/api.js.map +1 -0
  14. package/dist/{adapters/nextjs → nextjs}/server.d.ts +47 -65
  15. package/dist/nextjs/server.js +178 -0
  16. package/dist/nextjs/server.js.map +1 -0
  17. package/dist/server.d.ts +4444 -514
  18. package/dist/server.js +7977 -1210
  19. package/dist/server.js.map +1 -1
  20. package/migrations/0000_premium_famine.sql +292 -0
  21. package/migrations/meta/0000_snapshot.json +281 -46
  22. package/migrations/meta/_journal.json +2 -2
  23. package/package.json +37 -33
  24. package/dist/adapters/nextjs/api.d.ts +0 -446
  25. package/dist/adapters/nextjs/api.js +0 -3279
  26. package/dist/adapters/nextjs/api.js.map +0 -1
  27. package/dist/adapters/nextjs/server.js +0 -3645
  28. package/dist/adapters/nextjs/server.js.map +0 -1
  29. package/dist/lib/api/auth-codes-verify.d.ts +0 -37
  30. package/dist/lib/api/auth-codes-verify.js +0 -2949
  31. package/dist/lib/api/auth-codes-verify.js.map +0 -1
  32. package/dist/lib/api/auth-codes.d.ts +0 -37
  33. package/dist/lib/api/auth-codes.js +0 -2949
  34. package/dist/lib/api/auth-codes.js.map +0 -1
  35. package/dist/lib/api/auth-exists.d.ts +0 -38
  36. package/dist/lib/api/auth-exists.js +0 -2949
  37. package/dist/lib/api/auth-exists.js.map +0 -1
  38. package/dist/lib/api/auth-invitations-accept.d.ts +0 -38
  39. package/dist/lib/api/auth-invitations-accept.js +0 -2883
  40. package/dist/lib/api/auth-invitations-accept.js.map +0 -1
  41. package/dist/lib/api/auth-invitations-cancel.d.ts +0 -37
  42. package/dist/lib/api/auth-invitations-cancel.js +0 -2883
  43. package/dist/lib/api/auth-invitations-cancel.js.map +0 -1
  44. package/dist/lib/api/auth-invitations-delete.d.ts +0 -36
  45. package/dist/lib/api/auth-invitations-delete.js +0 -2883
  46. package/dist/lib/api/auth-invitations-delete.js.map +0 -1
  47. package/dist/lib/api/auth-invitations-resend.d.ts +0 -37
  48. package/dist/lib/api/auth-invitations-resend.js +0 -2883
  49. package/dist/lib/api/auth-invitations-resend.js.map +0 -1
  50. package/dist/lib/api/auth-invitations.d.ts +0 -109
  51. package/dist/lib/api/auth-invitations.js +0 -2887
  52. package/dist/lib/api/auth-invitations.js.map +0 -1
  53. package/dist/lib/api/auth-keys-rotate.d.ts +0 -37
  54. package/dist/lib/api/auth-keys-rotate.js +0 -2949
  55. package/dist/lib/api/auth-keys-rotate.js.map +0 -1
  56. package/dist/lib/api/auth-login.d.ts +0 -39
  57. package/dist/lib/api/auth-login.js +0 -2949
  58. package/dist/lib/api/auth-login.js.map +0 -1
  59. package/dist/lib/api/auth-logout.d.ts +0 -36
  60. package/dist/lib/api/auth-logout.js +0 -2949
  61. package/dist/lib/api/auth-logout.js.map +0 -1
  62. package/dist/lib/api/auth-me.d.ts +0 -50
  63. package/dist/lib/api/auth-me.js +0 -2949
  64. package/dist/lib/api/auth-me.js.map +0 -1
  65. package/dist/lib/api/auth-password.d.ts +0 -36
  66. package/dist/lib/api/auth-password.js +0 -2949
  67. package/dist/lib/api/auth-password.js.map +0 -1
  68. package/dist/lib/api/auth-register.d.ts +0 -38
  69. package/dist/lib/api/auth-register.js +0 -2949
  70. package/dist/lib/api/auth-register.js.map +0 -1
  71. package/dist/lib/api/index.d.ts +0 -356
  72. package/dist/lib/api/index.js +0 -3261
  73. package/dist/lib/api/index.js.map +0 -1
  74. package/dist/lib/config.d.ts +0 -70
  75. package/dist/lib/config.js +0 -64
  76. package/dist/lib/config.js.map +0 -1
  77. package/dist/lib/contracts/auth.d.ts +0 -302
  78. package/dist/lib/contracts/auth.js +0 -2951
  79. package/dist/lib/contracts/auth.js.map +0 -1
  80. package/dist/lib/contracts/index.d.ts +0 -3
  81. package/dist/lib/contracts/index.js +0 -3190
  82. package/dist/lib/contracts/index.js.map +0 -1
  83. package/dist/lib/contracts/invitation.d.ts +0 -243
  84. package/dist/lib/contracts/invitation.js +0 -2883
  85. package/dist/lib/contracts/invitation.js.map +0 -1
  86. package/dist/lib/crypto.d.ts +0 -76
  87. package/dist/lib/crypto.js +0 -127
  88. package/dist/lib/crypto.js.map +0 -1
  89. package/dist/lib/index.d.ts +0 -4
  90. package/dist/lib/index.js +0 -313
  91. package/dist/lib/index.js.map +0 -1
  92. package/dist/lib/session.d.ts +0 -68
  93. package/dist/lib/session.js +0 -126
  94. package/dist/lib/session.js.map +0 -1
  95. package/dist/lib/types/api.d.ts +0 -45
  96. package/dist/lib/types/api.js +0 -1
  97. package/dist/lib/types/api.js.map +0 -1
  98. package/dist/lib/types/index.d.ts +0 -3
  99. package/dist/lib/types/index.js +0 -2647
  100. package/dist/lib/types/index.js.map +0 -1
  101. package/dist/lib/types/schemas.d.ts +0 -45
  102. package/dist/lib/types/schemas.js +0 -2647
  103. package/dist/lib/types/schemas.js.map +0 -1
  104. package/dist/lib.js +0 -1
  105. package/dist/lib.js.map +0 -1
  106. package/dist/plugin.d.ts +0 -12
  107. package/dist/plugin.js +0 -9083
  108. package/dist/plugin.js.map +0 -1
  109. package/dist/server/entities/index.d.ts +0 -11
  110. package/dist/server/entities/index.js +0 -395
  111. package/dist/server/entities/index.js.map +0 -1
  112. package/dist/server/entities/invitations.d.ts +0 -241
  113. package/dist/server/entities/invitations.js +0 -184
  114. package/dist/server/entities/invitations.js.map +0 -1
  115. package/dist/server/entities/permissions.d.ts +0 -196
  116. package/dist/server/entities/permissions.js +0 -49
  117. package/dist/server/entities/permissions.js.map +0 -1
  118. package/dist/server/entities/role-permissions.d.ts +0 -107
  119. package/dist/server/entities/role-permissions.js +0 -115
  120. package/dist/server/entities/role-permissions.js.map +0 -1
  121. package/dist/server/entities/roles.d.ts +0 -196
  122. package/dist/server/entities/roles.js +0 -50
  123. package/dist/server/entities/roles.js.map +0 -1
  124. package/dist/server/entities/schema.d.ts +0 -14
  125. package/dist/server/entities/schema.js +0 -7
  126. package/dist/server/entities/schema.js.map +0 -1
  127. package/dist/server/entities/user-permissions.d.ts +0 -163
  128. package/dist/server/entities/user-permissions.js +0 -193
  129. package/dist/server/entities/user-permissions.js.map +0 -1
  130. package/dist/server/entities/user-public-keys.d.ts +0 -227
  131. package/dist/server/entities/user-public-keys.js +0 -156
  132. package/dist/server/entities/user-public-keys.js.map +0 -1
  133. package/dist/server/entities/user-social-accounts.d.ts +0 -189
  134. package/dist/server/entities/user-social-accounts.js +0 -149
  135. package/dist/server/entities/user-social-accounts.js.map +0 -1
  136. package/dist/server/entities/users.d.ts +0 -235
  137. package/dist/server/entities/users.js +0 -117
  138. package/dist/server/entities/users.js.map +0 -1
  139. package/dist/server/entities/verification-codes.d.ts +0 -191
  140. package/dist/server/entities/verification-codes.js +0 -49
  141. package/dist/server/entities/verification-codes.js.map +0 -1
  142. package/dist/server/routes/auth/index.d.ts +0 -10
  143. package/dist/server/routes/auth/index.js +0 -4460
  144. package/dist/server/routes/auth/index.js.map +0 -1
  145. package/dist/server/routes/index.d.ts +0 -6
  146. package/dist/server/routes/index.js +0 -6584
  147. package/dist/server/routes/index.js.map +0 -1
  148. package/dist/server/routes/invitations/index.d.ts +0 -10
  149. package/dist/server/routes/invitations/index.js +0 -4395
  150. package/dist/server/routes/invitations/index.js.map +0 -1
  151. package/migrations/0000_skinny_christian_walker.sql +0 -167
  152. /package/dist/{lib.d.ts → nextjs/api.d.ts} +0 -0
@@ -1,2951 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __export = (target, all) => {
3
- for (var name in all)
4
- __defProp(target, name, { get: all[name], enumerable: true });
5
- };
6
-
7
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/guard/value.mjs
8
- var value_exports = {};
9
- __export(value_exports, {
10
- HasPropertyKey: () => HasPropertyKey,
11
- IsArray: () => IsArray,
12
- IsAsyncIterator: () => IsAsyncIterator,
13
- IsBigInt: () => IsBigInt,
14
- IsBoolean: () => IsBoolean,
15
- IsDate: () => IsDate,
16
- IsFunction: () => IsFunction,
17
- IsIterator: () => IsIterator,
18
- IsNull: () => IsNull,
19
- IsNumber: () => IsNumber,
20
- IsObject: () => IsObject,
21
- IsRegExp: () => IsRegExp,
22
- IsString: () => IsString,
23
- IsSymbol: () => IsSymbol,
24
- IsUint8Array: () => IsUint8Array,
25
- IsUndefined: () => IsUndefined
26
- });
27
- function HasPropertyKey(value, key) {
28
- return key in value;
29
- }
30
- function IsAsyncIterator(value) {
31
- return IsObject(value) && !IsArray(value) && !IsUint8Array(value) && Symbol.asyncIterator in value;
32
- }
33
- function IsArray(value) {
34
- return Array.isArray(value);
35
- }
36
- function IsBigInt(value) {
37
- return typeof value === "bigint";
38
- }
39
- function IsBoolean(value) {
40
- return typeof value === "boolean";
41
- }
42
- function IsDate(value) {
43
- return value instanceof globalThis.Date;
44
- }
45
- function IsFunction(value) {
46
- return typeof value === "function";
47
- }
48
- function IsIterator(value) {
49
- return IsObject(value) && !IsArray(value) && !IsUint8Array(value) && Symbol.iterator in value;
50
- }
51
- function IsNull(value) {
52
- return value === null;
53
- }
54
- function IsNumber(value) {
55
- return typeof value === "number";
56
- }
57
- function IsObject(value) {
58
- return typeof value === "object" && value !== null;
59
- }
60
- function IsRegExp(value) {
61
- return value instanceof globalThis.RegExp;
62
- }
63
- function IsString(value) {
64
- return typeof value === "string";
65
- }
66
- function IsSymbol(value) {
67
- return typeof value === "symbol";
68
- }
69
- function IsUint8Array(value) {
70
- return value instanceof globalThis.Uint8Array;
71
- }
72
- function IsUndefined(value) {
73
- return value === void 0;
74
- }
75
-
76
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/clone/value.mjs
77
- function ArrayType(value) {
78
- return value.map((value2) => Visit(value2));
79
- }
80
- function DateType(value) {
81
- return new Date(value.getTime());
82
- }
83
- function Uint8ArrayType(value) {
84
- return new Uint8Array(value);
85
- }
86
- function RegExpType(value) {
87
- return new RegExp(value.source, value.flags);
88
- }
89
- function ObjectType(value) {
90
- const result = {};
91
- for (const key of Object.getOwnPropertyNames(value)) {
92
- result[key] = Visit(value[key]);
93
- }
94
- for (const key of Object.getOwnPropertySymbols(value)) {
95
- result[key] = Visit(value[key]);
96
- }
97
- return result;
98
- }
99
- function Visit(value) {
100
- return IsArray(value) ? ArrayType(value) : IsDate(value) ? DateType(value) : IsUint8Array(value) ? Uint8ArrayType(value) : IsRegExp(value) ? RegExpType(value) : IsObject(value) ? ObjectType(value) : value;
101
- }
102
- function Clone(value) {
103
- return Visit(value);
104
- }
105
-
106
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/clone/type.mjs
107
- function CloneType(schema, options) {
108
- return options === void 0 ? Clone(schema) : Clone({ ...options, ...schema });
109
- }
110
-
111
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/value/guard/guard.mjs
112
- function IsObject2(value) {
113
- return value !== null && typeof value === "object";
114
- }
115
- function IsArray2(value) {
116
- return globalThis.Array.isArray(value) && !globalThis.ArrayBuffer.isView(value);
117
- }
118
- function IsUndefined2(value) {
119
- return value === void 0;
120
- }
121
- function IsNumber2(value) {
122
- return typeof value === "number";
123
- }
124
-
125
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/system/policy.mjs
126
- var TypeSystemPolicy;
127
- (function(TypeSystemPolicy2) {
128
- TypeSystemPolicy2.InstanceMode = "default";
129
- TypeSystemPolicy2.ExactOptionalPropertyTypes = false;
130
- TypeSystemPolicy2.AllowArrayObject = false;
131
- TypeSystemPolicy2.AllowNaN = false;
132
- TypeSystemPolicy2.AllowNullVoid = false;
133
- function IsExactOptionalProperty(value, key) {
134
- return TypeSystemPolicy2.ExactOptionalPropertyTypes ? key in value : value[key] !== void 0;
135
- }
136
- TypeSystemPolicy2.IsExactOptionalProperty = IsExactOptionalProperty;
137
- function IsObjectLike(value) {
138
- const isObject = IsObject2(value);
139
- return TypeSystemPolicy2.AllowArrayObject ? isObject : isObject && !IsArray2(value);
140
- }
141
- TypeSystemPolicy2.IsObjectLike = IsObjectLike;
142
- function IsRecordLike(value) {
143
- return IsObjectLike(value) && !(value instanceof Date) && !(value instanceof Uint8Array);
144
- }
145
- TypeSystemPolicy2.IsRecordLike = IsRecordLike;
146
- function IsNumberLike(value) {
147
- return TypeSystemPolicy2.AllowNaN ? IsNumber2(value) : Number.isFinite(value);
148
- }
149
- TypeSystemPolicy2.IsNumberLike = IsNumberLike;
150
- function IsVoidLike(value) {
151
- const isUndefined = IsUndefined2(value);
152
- return TypeSystemPolicy2.AllowNullVoid ? isUndefined || value === null : isUndefined;
153
- }
154
- TypeSystemPolicy2.IsVoidLike = IsVoidLike;
155
- })(TypeSystemPolicy || (TypeSystemPolicy = {}));
156
-
157
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/create/immutable.mjs
158
- function ImmutableArray(value) {
159
- return globalThis.Object.freeze(value).map((value2) => Immutable(value2));
160
- }
161
- function ImmutableDate(value) {
162
- return value;
163
- }
164
- function ImmutableUint8Array(value) {
165
- return value;
166
- }
167
- function ImmutableRegExp(value) {
168
- return value;
169
- }
170
- function ImmutableObject(value) {
171
- const result = {};
172
- for (const key of Object.getOwnPropertyNames(value)) {
173
- result[key] = Immutable(value[key]);
174
- }
175
- for (const key of Object.getOwnPropertySymbols(value)) {
176
- result[key] = Immutable(value[key]);
177
- }
178
- return globalThis.Object.freeze(result);
179
- }
180
- function Immutable(value) {
181
- return IsArray(value) ? ImmutableArray(value) : IsDate(value) ? ImmutableDate(value) : IsUint8Array(value) ? ImmutableUint8Array(value) : IsRegExp(value) ? ImmutableRegExp(value) : IsObject(value) ? ImmutableObject(value) : value;
182
- }
183
-
184
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/create/type.mjs
185
- function CreateType(schema, options) {
186
- const result = options !== void 0 ? { ...options, ...schema } : schema;
187
- switch (TypeSystemPolicy.InstanceMode) {
188
- case "freeze":
189
- return Immutable(result);
190
- case "clone":
191
- return Clone(result);
192
- default:
193
- return result;
194
- }
195
- }
196
-
197
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/error/error.mjs
198
- var TypeBoxError = class extends Error {
199
- constructor(message) {
200
- super(message);
201
- }
202
- };
203
-
204
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/symbols/symbols.mjs
205
- var TransformKind = Symbol.for("TypeBox.Transform");
206
- var ReadonlyKind = Symbol.for("TypeBox.Readonly");
207
- var OptionalKind = Symbol.for("TypeBox.Optional");
208
- var Hint = Symbol.for("TypeBox.Hint");
209
- var Kind = Symbol.for("TypeBox.Kind");
210
-
211
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/guard/kind.mjs
212
- function IsReadonly(value) {
213
- return IsObject(value) && value[ReadonlyKind] === "Readonly";
214
- }
215
- function IsOptional(value) {
216
- return IsObject(value) && value[OptionalKind] === "Optional";
217
- }
218
- function IsAny(value) {
219
- return IsKindOf(value, "Any");
220
- }
221
- function IsArgument(value) {
222
- return IsKindOf(value, "Argument");
223
- }
224
- function IsArray3(value) {
225
- return IsKindOf(value, "Array");
226
- }
227
- function IsAsyncIterator2(value) {
228
- return IsKindOf(value, "AsyncIterator");
229
- }
230
- function IsBigInt2(value) {
231
- return IsKindOf(value, "BigInt");
232
- }
233
- function IsBoolean2(value) {
234
- return IsKindOf(value, "Boolean");
235
- }
236
- function IsComputed(value) {
237
- return IsKindOf(value, "Computed");
238
- }
239
- function IsConstructor(value) {
240
- return IsKindOf(value, "Constructor");
241
- }
242
- function IsDate2(value) {
243
- return IsKindOf(value, "Date");
244
- }
245
- function IsFunction2(value) {
246
- return IsKindOf(value, "Function");
247
- }
248
- function IsInteger(value) {
249
- return IsKindOf(value, "Integer");
250
- }
251
- function IsIntersect(value) {
252
- return IsKindOf(value, "Intersect");
253
- }
254
- function IsIterator2(value) {
255
- return IsKindOf(value, "Iterator");
256
- }
257
- function IsKindOf(value, kind) {
258
- return IsObject(value) && Kind in value && value[Kind] === kind;
259
- }
260
- function IsLiteralValue(value) {
261
- return IsBoolean(value) || IsNumber(value) || IsString(value);
262
- }
263
- function IsLiteral(value) {
264
- return IsKindOf(value, "Literal");
265
- }
266
- function IsMappedKey(value) {
267
- return IsKindOf(value, "MappedKey");
268
- }
269
- function IsMappedResult(value) {
270
- return IsKindOf(value, "MappedResult");
271
- }
272
- function IsNever(value) {
273
- return IsKindOf(value, "Never");
274
- }
275
- function IsNot(value) {
276
- return IsKindOf(value, "Not");
277
- }
278
- function IsNull2(value) {
279
- return IsKindOf(value, "Null");
280
- }
281
- function IsNumber3(value) {
282
- return IsKindOf(value, "Number");
283
- }
284
- function IsObject3(value) {
285
- return IsKindOf(value, "Object");
286
- }
287
- function IsPromise(value) {
288
- return IsKindOf(value, "Promise");
289
- }
290
- function IsRecord(value) {
291
- return IsKindOf(value, "Record");
292
- }
293
- function IsRef(value) {
294
- return IsKindOf(value, "Ref");
295
- }
296
- function IsRegExp2(value) {
297
- return IsKindOf(value, "RegExp");
298
- }
299
- function IsString2(value) {
300
- return IsKindOf(value, "String");
301
- }
302
- function IsSymbol2(value) {
303
- return IsKindOf(value, "Symbol");
304
- }
305
- function IsTemplateLiteral(value) {
306
- return IsKindOf(value, "TemplateLiteral");
307
- }
308
- function IsThis(value) {
309
- return IsKindOf(value, "This");
310
- }
311
- function IsTransform(value) {
312
- return IsObject(value) && TransformKind in value;
313
- }
314
- function IsTuple(value) {
315
- return IsKindOf(value, "Tuple");
316
- }
317
- function IsUndefined3(value) {
318
- return IsKindOf(value, "Undefined");
319
- }
320
- function IsUnion(value) {
321
- return IsKindOf(value, "Union");
322
- }
323
- function IsUint8Array2(value) {
324
- return IsKindOf(value, "Uint8Array");
325
- }
326
- function IsUnknown(value) {
327
- return IsKindOf(value, "Unknown");
328
- }
329
- function IsUnsafe(value) {
330
- return IsKindOf(value, "Unsafe");
331
- }
332
- function IsVoid(value) {
333
- return IsKindOf(value, "Void");
334
- }
335
- function IsKind(value) {
336
- return IsObject(value) && Kind in value && IsString(value[Kind]);
337
- }
338
- function IsSchema(value) {
339
- 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);
340
- }
341
-
342
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/guard/type.mjs
343
- var type_exports = {};
344
- __export(type_exports, {
345
- IsAny: () => IsAny2,
346
- IsArgument: () => IsArgument2,
347
- IsArray: () => IsArray4,
348
- IsAsyncIterator: () => IsAsyncIterator3,
349
- IsBigInt: () => IsBigInt3,
350
- IsBoolean: () => IsBoolean3,
351
- IsComputed: () => IsComputed2,
352
- IsConstructor: () => IsConstructor2,
353
- IsDate: () => IsDate3,
354
- IsFunction: () => IsFunction3,
355
- IsImport: () => IsImport,
356
- IsInteger: () => IsInteger2,
357
- IsIntersect: () => IsIntersect2,
358
- IsIterator: () => IsIterator3,
359
- IsKind: () => IsKind2,
360
- IsKindOf: () => IsKindOf2,
361
- IsLiteral: () => IsLiteral2,
362
- IsLiteralBoolean: () => IsLiteralBoolean,
363
- IsLiteralNumber: () => IsLiteralNumber,
364
- IsLiteralString: () => IsLiteralString,
365
- IsLiteralValue: () => IsLiteralValue2,
366
- IsMappedKey: () => IsMappedKey2,
367
- IsMappedResult: () => IsMappedResult2,
368
- IsNever: () => IsNever2,
369
- IsNot: () => IsNot2,
370
- IsNull: () => IsNull3,
371
- IsNumber: () => IsNumber4,
372
- IsObject: () => IsObject4,
373
- IsOptional: () => IsOptional2,
374
- IsPromise: () => IsPromise2,
375
- IsProperties: () => IsProperties,
376
- IsReadonly: () => IsReadonly2,
377
- IsRecord: () => IsRecord2,
378
- IsRecursive: () => IsRecursive,
379
- IsRef: () => IsRef2,
380
- IsRegExp: () => IsRegExp3,
381
- IsSchema: () => IsSchema2,
382
- IsString: () => IsString3,
383
- IsSymbol: () => IsSymbol3,
384
- IsTemplateLiteral: () => IsTemplateLiteral2,
385
- IsThis: () => IsThis2,
386
- IsTransform: () => IsTransform2,
387
- IsTuple: () => IsTuple2,
388
- IsUint8Array: () => IsUint8Array3,
389
- IsUndefined: () => IsUndefined4,
390
- IsUnion: () => IsUnion2,
391
- IsUnionLiteral: () => IsUnionLiteral,
392
- IsUnknown: () => IsUnknown2,
393
- IsUnsafe: () => IsUnsafe2,
394
- IsVoid: () => IsVoid2,
395
- TypeGuardUnknownTypeError: () => TypeGuardUnknownTypeError
396
- });
397
- var TypeGuardUnknownTypeError = class extends TypeBoxError {
398
- };
399
- var KnownTypes = [
400
- "Argument",
401
- "Any",
402
- "Array",
403
- "AsyncIterator",
404
- "BigInt",
405
- "Boolean",
406
- "Computed",
407
- "Constructor",
408
- "Date",
409
- "Enum",
410
- "Function",
411
- "Integer",
412
- "Intersect",
413
- "Iterator",
414
- "Literal",
415
- "MappedKey",
416
- "MappedResult",
417
- "Not",
418
- "Null",
419
- "Number",
420
- "Object",
421
- "Promise",
422
- "Record",
423
- "Ref",
424
- "RegExp",
425
- "String",
426
- "Symbol",
427
- "TemplateLiteral",
428
- "This",
429
- "Tuple",
430
- "Undefined",
431
- "Union",
432
- "Uint8Array",
433
- "Unknown",
434
- "Void"
435
- ];
436
- function IsPattern(value) {
437
- try {
438
- new RegExp(value);
439
- return true;
440
- } catch {
441
- return false;
442
- }
443
- }
444
- function IsControlCharacterFree(value) {
445
- if (!IsString(value))
446
- return false;
447
- for (let i = 0; i < value.length; i++) {
448
- const code = value.charCodeAt(i);
449
- if (code >= 7 && code <= 13 || code === 27 || code === 127) {
450
- return false;
451
- }
452
- }
453
- return true;
454
- }
455
- function IsAdditionalProperties(value) {
456
- return IsOptionalBoolean(value) || IsSchema2(value);
457
- }
458
- function IsOptionalBigInt(value) {
459
- return IsUndefined(value) || IsBigInt(value);
460
- }
461
- function IsOptionalNumber(value) {
462
- return IsUndefined(value) || IsNumber(value);
463
- }
464
- function IsOptionalBoolean(value) {
465
- return IsUndefined(value) || IsBoolean(value);
466
- }
467
- function IsOptionalString(value) {
468
- return IsUndefined(value) || IsString(value);
469
- }
470
- function IsOptionalPattern(value) {
471
- return IsUndefined(value) || IsString(value) && IsControlCharacterFree(value) && IsPattern(value);
472
- }
473
- function IsOptionalFormat(value) {
474
- return IsUndefined(value) || IsString(value) && IsControlCharacterFree(value);
475
- }
476
- function IsOptionalSchema(value) {
477
- return IsUndefined(value) || IsSchema2(value);
478
- }
479
- function IsReadonly2(value) {
480
- return IsObject(value) && value[ReadonlyKind] === "Readonly";
481
- }
482
- function IsOptional2(value) {
483
- return IsObject(value) && value[OptionalKind] === "Optional";
484
- }
485
- function IsAny2(value) {
486
- return IsKindOf2(value, "Any") && IsOptionalString(value.$id);
487
- }
488
- function IsArgument2(value) {
489
- return IsKindOf2(value, "Argument") && IsNumber(value.index);
490
- }
491
- function IsArray4(value) {
492
- 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);
493
- }
494
- function IsAsyncIterator3(value) {
495
- return IsKindOf2(value, "AsyncIterator") && value.type === "AsyncIterator" && IsOptionalString(value.$id) && IsSchema2(value.items);
496
- }
497
- function IsBigInt3(value) {
498
- 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);
499
- }
500
- function IsBoolean3(value) {
501
- return IsKindOf2(value, "Boolean") && value.type === "boolean" && IsOptionalString(value.$id);
502
- }
503
- function IsComputed2(value) {
504
- return IsKindOf2(value, "Computed") && IsString(value.target) && IsArray(value.parameters) && value.parameters.every((schema) => IsSchema2(schema));
505
- }
506
- function IsConstructor2(value) {
507
- return IsKindOf2(value, "Constructor") && value.type === "Constructor" && IsOptionalString(value.$id) && IsArray(value.parameters) && value.parameters.every((schema) => IsSchema2(schema)) && IsSchema2(value.returns);
508
- }
509
- function IsDate3(value) {
510
- 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);
511
- }
512
- function IsFunction3(value) {
513
- return IsKindOf2(value, "Function") && value.type === "Function" && IsOptionalString(value.$id) && IsArray(value.parameters) && value.parameters.every((schema) => IsSchema2(schema)) && IsSchema2(value.returns);
514
- }
515
- function IsImport(value) {
516
- return IsKindOf2(value, "Import") && HasPropertyKey(value, "$defs") && IsObject(value.$defs) && IsProperties(value.$defs) && HasPropertyKey(value, "$ref") && IsString(value.$ref) && value.$ref in value.$defs;
517
- }
518
- function IsInteger2(value) {
519
- 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);
520
- }
521
- function IsProperties(value) {
522
- return IsObject(value) && Object.entries(value).every(([key, schema]) => IsControlCharacterFree(key) && IsSchema2(schema));
523
- }
524
- function IsIntersect2(value) {
525
- 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);
526
- }
527
- function IsIterator3(value) {
528
- return IsKindOf2(value, "Iterator") && value.type === "Iterator" && IsOptionalString(value.$id) && IsSchema2(value.items);
529
- }
530
- function IsKindOf2(value, kind) {
531
- return IsObject(value) && Kind in value && value[Kind] === kind;
532
- }
533
- function IsLiteralString(value) {
534
- return IsLiteral2(value) && IsString(value.const);
535
- }
536
- function IsLiteralNumber(value) {
537
- return IsLiteral2(value) && IsNumber(value.const);
538
- }
539
- function IsLiteralBoolean(value) {
540
- return IsLiteral2(value) && IsBoolean(value.const);
541
- }
542
- function IsLiteral2(value) {
543
- return IsKindOf2(value, "Literal") && IsOptionalString(value.$id) && IsLiteralValue2(value.const);
544
- }
545
- function IsLiteralValue2(value) {
546
- return IsBoolean(value) || IsNumber(value) || IsString(value);
547
- }
548
- function IsMappedKey2(value) {
549
- return IsKindOf2(value, "MappedKey") && IsArray(value.keys) && value.keys.every((key) => IsNumber(key) || IsString(key));
550
- }
551
- function IsMappedResult2(value) {
552
- return IsKindOf2(value, "MappedResult") && IsProperties(value.properties);
553
- }
554
- function IsNever2(value) {
555
- return IsKindOf2(value, "Never") && IsObject(value.not) && Object.getOwnPropertyNames(value.not).length === 0;
556
- }
557
- function IsNot2(value) {
558
- return IsKindOf2(value, "Not") && IsSchema2(value.not);
559
- }
560
- function IsNull3(value) {
561
- return IsKindOf2(value, "Null") && value.type === "null" && IsOptionalString(value.$id);
562
- }
563
- function IsNumber4(value) {
564
- 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);
565
- }
566
- function IsObject4(value) {
567
- return IsKindOf2(value, "Object") && value.type === "object" && IsOptionalString(value.$id) && IsProperties(value.properties) && IsAdditionalProperties(value.additionalProperties) && IsOptionalNumber(value.minProperties) && IsOptionalNumber(value.maxProperties);
568
- }
569
- function IsPromise2(value) {
570
- return IsKindOf2(value, "Promise") && value.type === "Promise" && IsOptionalString(value.$id) && IsSchema2(value.item);
571
- }
572
- function IsRecord2(value) {
573
- return IsKindOf2(value, "Record") && value.type === "object" && IsOptionalString(value.$id) && IsAdditionalProperties(value.additionalProperties) && IsObject(value.patternProperties) && ((schema) => {
574
- const keys = Object.getOwnPropertyNames(schema.patternProperties);
575
- return keys.length === 1 && IsPattern(keys[0]) && IsObject(schema.patternProperties) && IsSchema2(schema.patternProperties[keys[0]]);
576
- })(value);
577
- }
578
- function IsRecursive(value) {
579
- return IsObject(value) && Hint in value && value[Hint] === "Recursive";
580
- }
581
- function IsRef2(value) {
582
- return IsKindOf2(value, "Ref") && IsOptionalString(value.$id) && IsString(value.$ref);
583
- }
584
- function IsRegExp3(value) {
585
- return IsKindOf2(value, "RegExp") && IsOptionalString(value.$id) && IsString(value.source) && IsString(value.flags) && IsOptionalNumber(value.maxLength) && IsOptionalNumber(value.minLength);
586
- }
587
- function IsString3(value) {
588
- return IsKindOf2(value, "String") && value.type === "string" && IsOptionalString(value.$id) && IsOptionalNumber(value.minLength) && IsOptionalNumber(value.maxLength) && IsOptionalPattern(value.pattern) && IsOptionalFormat(value.format);
589
- }
590
- function IsSymbol3(value) {
591
- return IsKindOf2(value, "Symbol") && value.type === "symbol" && IsOptionalString(value.$id);
592
- }
593
- function IsTemplateLiteral2(value) {
594
- return IsKindOf2(value, "TemplateLiteral") && value.type === "string" && IsString(value.pattern) && value.pattern[0] === "^" && value.pattern[value.pattern.length - 1] === "$";
595
- }
596
- function IsThis2(value) {
597
- return IsKindOf2(value, "This") && IsOptionalString(value.$id) && IsString(value.$ref);
598
- }
599
- function IsTransform2(value) {
600
- return IsObject(value) && TransformKind in value;
601
- }
602
- function IsTuple2(value) {
603
- return IsKindOf2(value, "Tuple") && value.type === "array" && IsOptionalString(value.$id) && IsNumber(value.minItems) && IsNumber(value.maxItems) && value.minItems === value.maxItems && // empty
604
- (IsUndefined(value.items) && IsUndefined(value.additionalItems) && value.minItems === 0 || IsArray(value.items) && value.items.every((schema) => IsSchema2(schema)));
605
- }
606
- function IsUndefined4(value) {
607
- return IsKindOf2(value, "Undefined") && value.type === "undefined" && IsOptionalString(value.$id);
608
- }
609
- function IsUnionLiteral(value) {
610
- return IsUnion2(value) && value.anyOf.every((schema) => IsLiteralString(schema) || IsLiteralNumber(schema));
611
- }
612
- function IsUnion2(value) {
613
- return IsKindOf2(value, "Union") && IsOptionalString(value.$id) && IsObject(value) && IsArray(value.anyOf) && value.anyOf.every((schema) => IsSchema2(schema));
614
- }
615
- function IsUint8Array3(value) {
616
- return IsKindOf2(value, "Uint8Array") && value.type === "Uint8Array" && IsOptionalString(value.$id) && IsOptionalNumber(value.minByteLength) && IsOptionalNumber(value.maxByteLength);
617
- }
618
- function IsUnknown2(value) {
619
- return IsKindOf2(value, "Unknown") && IsOptionalString(value.$id);
620
- }
621
- function IsUnsafe2(value) {
622
- return IsKindOf2(value, "Unsafe");
623
- }
624
- function IsVoid2(value) {
625
- return IsKindOf2(value, "Void") && value.type === "void" && IsOptionalString(value.$id);
626
- }
627
- function IsKind2(value) {
628
- return IsObject(value) && Kind in value && IsString(value[Kind]) && !KnownTypes.includes(value[Kind]);
629
- }
630
- function IsSchema2(value) {
631
- 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));
632
- }
633
-
634
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/patterns/patterns.mjs
635
- var PatternBoolean = "(true|false)";
636
- var PatternNumber = "(0|[1-9][0-9]*)";
637
- var PatternString = "(.*)";
638
- var PatternNever = "(?!.*)";
639
- var PatternBooleanExact = `^${PatternBoolean}$`;
640
- var PatternNumberExact = `^${PatternNumber}$`;
641
- var PatternStringExact = `^${PatternString}$`;
642
- var PatternNeverExact = `^${PatternNever}$`;
643
-
644
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/sets/set.mjs
645
- function SetIncludes(T, S) {
646
- return T.includes(S);
647
- }
648
- function SetDistinct(T) {
649
- return [...new Set(T)];
650
- }
651
- function SetIntersect(T, S) {
652
- return T.filter((L) => S.includes(L));
653
- }
654
- function SetIntersectManyResolve(T, Init) {
655
- return T.reduce((Acc, L) => {
656
- return SetIntersect(Acc, L);
657
- }, Init);
658
- }
659
- function SetIntersectMany(T) {
660
- return T.length === 1 ? T[0] : T.length > 1 ? SetIntersectManyResolve(T.slice(1), T[0]) : [];
661
- }
662
- function SetUnionMany(T) {
663
- const Acc = [];
664
- for (const L of T)
665
- Acc.push(...L);
666
- return Acc;
667
- }
668
-
669
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/any/any.mjs
670
- function Any(options) {
671
- return CreateType({ [Kind]: "Any" }, options);
672
- }
673
-
674
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/array/array.mjs
675
- function Array2(items, options) {
676
- return CreateType({ [Kind]: "Array", type: "array", items }, options);
677
- }
678
-
679
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/argument/argument.mjs
680
- function Argument(index) {
681
- return CreateType({ [Kind]: "Argument", index });
682
- }
683
-
684
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/async-iterator/async-iterator.mjs
685
- function AsyncIterator(items, options) {
686
- return CreateType({ [Kind]: "AsyncIterator", type: "AsyncIterator", items }, options);
687
- }
688
-
689
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/computed/computed.mjs
690
- function Computed(target, parameters, options) {
691
- return CreateType({ [Kind]: "Computed", target, parameters }, options);
692
- }
693
-
694
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/discard/discard.mjs
695
- function DiscardKey(value, key) {
696
- const { [key]: _, ...rest } = value;
697
- return rest;
698
- }
699
- function Discard(value, keys) {
700
- return keys.reduce((acc, key) => DiscardKey(acc, key), value);
701
- }
702
-
703
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/never/never.mjs
704
- function Never(options) {
705
- return CreateType({ [Kind]: "Never", not: {} }, options);
706
- }
707
-
708
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/mapped/mapped-result.mjs
709
- function MappedResult(properties) {
710
- return CreateType({
711
- [Kind]: "MappedResult",
712
- properties
713
- });
714
- }
715
-
716
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/constructor/constructor.mjs
717
- function Constructor(parameters, returns, options) {
718
- return CreateType({ [Kind]: "Constructor", type: "Constructor", parameters, returns }, options);
719
- }
720
-
721
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/function/function.mjs
722
- function Function(parameters, returns, options) {
723
- return CreateType({ [Kind]: "Function", type: "Function", parameters, returns }, options);
724
- }
725
-
726
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/union/union-create.mjs
727
- function UnionCreate(T, options) {
728
- return CreateType({ [Kind]: "Union", anyOf: T }, options);
729
- }
730
-
731
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/union/union-evaluated.mjs
732
- function IsUnionOptional(types) {
733
- return types.some((type) => IsOptional(type));
734
- }
735
- function RemoveOptionalFromRest(types) {
736
- return types.map((left) => IsOptional(left) ? RemoveOptionalFromType(left) : left);
737
- }
738
- function RemoveOptionalFromType(T) {
739
- return Discard(T, [OptionalKind]);
740
- }
741
- function ResolveUnion(types, options) {
742
- const isOptional = IsUnionOptional(types);
743
- return isOptional ? Optional(UnionCreate(RemoveOptionalFromRest(types), options)) : UnionCreate(RemoveOptionalFromRest(types), options);
744
- }
745
- function UnionEvaluated(T, options) {
746
- return T.length === 1 ? CreateType(T[0], options) : T.length === 0 ? Never(options) : ResolveUnion(T, options);
747
- }
748
-
749
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/union/union.mjs
750
- function Union(types, options) {
751
- return types.length === 0 ? Never(options) : types.length === 1 ? CreateType(types[0], options) : UnionCreate(types, options);
752
- }
753
-
754
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/template-literal/parse.mjs
755
- var TemplateLiteralParserError = class extends TypeBoxError {
756
- };
757
- function Unescape(pattern) {
758
- return pattern.replace(/\\\$/g, "$").replace(/\\\*/g, "*").replace(/\\\^/g, "^").replace(/\\\|/g, "|").replace(/\\\(/g, "(").replace(/\\\)/g, ")");
759
- }
760
- function IsNonEscaped(pattern, index, char) {
761
- return pattern[index] === char && pattern.charCodeAt(index - 1) !== 92;
762
- }
763
- function IsOpenParen(pattern, index) {
764
- return IsNonEscaped(pattern, index, "(");
765
- }
766
- function IsCloseParen(pattern, index) {
767
- return IsNonEscaped(pattern, index, ")");
768
- }
769
- function IsSeparator(pattern, index) {
770
- return IsNonEscaped(pattern, index, "|");
771
- }
772
- function IsGroup(pattern) {
773
- if (!(IsOpenParen(pattern, 0) && IsCloseParen(pattern, pattern.length - 1)))
774
- return false;
775
- let count = 0;
776
- for (let index = 0; index < pattern.length; index++) {
777
- if (IsOpenParen(pattern, index))
778
- count += 1;
779
- if (IsCloseParen(pattern, index))
780
- count -= 1;
781
- if (count === 0 && index !== pattern.length - 1)
782
- return false;
783
- }
784
- return true;
785
- }
786
- function InGroup(pattern) {
787
- return pattern.slice(1, pattern.length - 1);
788
- }
789
- function IsPrecedenceOr(pattern) {
790
- let count = 0;
791
- for (let index = 0; index < pattern.length; index++) {
792
- if (IsOpenParen(pattern, index))
793
- count += 1;
794
- if (IsCloseParen(pattern, index))
795
- count -= 1;
796
- if (IsSeparator(pattern, index) && count === 0)
797
- return true;
798
- }
799
- return false;
800
- }
801
- function IsPrecedenceAnd(pattern) {
802
- for (let index = 0; index < pattern.length; index++) {
803
- if (IsOpenParen(pattern, index))
804
- return true;
805
- }
806
- return false;
807
- }
808
- function Or(pattern) {
809
- let [count, start] = [0, 0];
810
- const expressions = [];
811
- for (let index = 0; index < pattern.length; index++) {
812
- if (IsOpenParen(pattern, index))
813
- count += 1;
814
- if (IsCloseParen(pattern, index))
815
- count -= 1;
816
- if (IsSeparator(pattern, index) && count === 0) {
817
- const range2 = pattern.slice(start, index);
818
- if (range2.length > 0)
819
- expressions.push(TemplateLiteralParse(range2));
820
- start = index + 1;
821
- }
822
- }
823
- const range = pattern.slice(start);
824
- if (range.length > 0)
825
- expressions.push(TemplateLiteralParse(range));
826
- if (expressions.length === 0)
827
- return { type: "const", const: "" };
828
- if (expressions.length === 1)
829
- return expressions[0];
830
- return { type: "or", expr: expressions };
831
- }
832
- function And(pattern) {
833
- function Group(value, index) {
834
- if (!IsOpenParen(value, index))
835
- throw new TemplateLiteralParserError(`TemplateLiteralParser: Index must point to open parens`);
836
- let count = 0;
837
- for (let scan = index; scan < value.length; scan++) {
838
- if (IsOpenParen(value, scan))
839
- count += 1;
840
- if (IsCloseParen(value, scan))
841
- count -= 1;
842
- if (count === 0)
843
- return [index, scan];
844
- }
845
- throw new TemplateLiteralParserError(`TemplateLiteralParser: Unclosed group parens in expression`);
846
- }
847
- function Range(pattern2, index) {
848
- for (let scan = index; scan < pattern2.length; scan++) {
849
- if (IsOpenParen(pattern2, scan))
850
- return [index, scan];
851
- }
852
- return [index, pattern2.length];
853
- }
854
- const expressions = [];
855
- for (let index = 0; index < pattern.length; index++) {
856
- if (IsOpenParen(pattern, index)) {
857
- const [start, end] = Group(pattern, index);
858
- const range = pattern.slice(start, end + 1);
859
- expressions.push(TemplateLiteralParse(range));
860
- index = end;
861
- } else {
862
- const [start, end] = Range(pattern, index);
863
- const range = pattern.slice(start, end);
864
- if (range.length > 0)
865
- expressions.push(TemplateLiteralParse(range));
866
- index = end - 1;
867
- }
868
- }
869
- return expressions.length === 0 ? { type: "const", const: "" } : expressions.length === 1 ? expressions[0] : { type: "and", expr: expressions };
870
- }
871
- function TemplateLiteralParse(pattern) {
872
- return IsGroup(pattern) ? TemplateLiteralParse(InGroup(pattern)) : IsPrecedenceOr(pattern) ? Or(pattern) : IsPrecedenceAnd(pattern) ? And(pattern) : { type: "const", const: Unescape(pattern) };
873
- }
874
- function TemplateLiteralParseExact(pattern) {
875
- return TemplateLiteralParse(pattern.slice(1, pattern.length - 1));
876
- }
877
-
878
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/template-literal/finite.mjs
879
- var TemplateLiteralFiniteError = class extends TypeBoxError {
880
- };
881
- function IsNumberExpression(expression) {
882
- 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]*";
883
- }
884
- function IsBooleanExpression(expression) {
885
- 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";
886
- }
887
- function IsStringExpression(expression) {
888
- return expression.type === "const" && expression.const === ".*";
889
- }
890
- function IsTemplateLiteralExpressionFinite(expression) {
891
- 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 : (() => {
892
- throw new TemplateLiteralFiniteError(`Unknown expression type`);
893
- })();
894
- }
895
- function IsTemplateLiteralFinite(schema) {
896
- const expression = TemplateLiteralParseExact(schema.pattern);
897
- return IsTemplateLiteralExpressionFinite(expression);
898
- }
899
-
900
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/template-literal/generate.mjs
901
- var TemplateLiteralGenerateError = class extends TypeBoxError {
902
- };
903
- function* GenerateReduce(buffer) {
904
- if (buffer.length === 1)
905
- return yield* buffer[0];
906
- for (const left of buffer[0]) {
907
- for (const right of GenerateReduce(buffer.slice(1))) {
908
- yield `${left}${right}`;
909
- }
910
- }
911
- }
912
- function* GenerateAnd(expression) {
913
- return yield* GenerateReduce(expression.expr.map((expr) => [...TemplateLiteralExpressionGenerate(expr)]));
914
- }
915
- function* GenerateOr(expression) {
916
- for (const expr of expression.expr)
917
- yield* TemplateLiteralExpressionGenerate(expr);
918
- }
919
- function* GenerateConst(expression) {
920
- return yield expression.const;
921
- }
922
- function* TemplateLiteralExpressionGenerate(expression) {
923
- return expression.type === "and" ? yield* GenerateAnd(expression) : expression.type === "or" ? yield* GenerateOr(expression) : expression.type === "const" ? yield* GenerateConst(expression) : (() => {
924
- throw new TemplateLiteralGenerateError("Unknown expression");
925
- })();
926
- }
927
- function TemplateLiteralGenerate(schema) {
928
- const expression = TemplateLiteralParseExact(schema.pattern);
929
- return IsTemplateLiteralExpressionFinite(expression) ? [...TemplateLiteralExpressionGenerate(expression)] : [];
930
- }
931
-
932
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/literal/literal.mjs
933
- function Literal(value, options) {
934
- return CreateType({
935
- [Kind]: "Literal",
936
- const: value,
937
- type: typeof value
938
- }, options);
939
- }
940
-
941
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/boolean/boolean.mjs
942
- function Boolean(options) {
943
- return CreateType({ [Kind]: "Boolean", type: "boolean" }, options);
944
- }
945
-
946
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/bigint/bigint.mjs
947
- function BigInt(options) {
948
- return CreateType({ [Kind]: "BigInt", type: "bigint" }, options);
949
- }
950
-
951
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/number/number.mjs
952
- function Number2(options) {
953
- return CreateType({ [Kind]: "Number", type: "number" }, options);
954
- }
955
-
956
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/string/string.mjs
957
- function String(options) {
958
- return CreateType({ [Kind]: "String", type: "string" }, options);
959
- }
960
-
961
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/template-literal/syntax.mjs
962
- function* FromUnion(syntax) {
963
- const trim = syntax.trim().replace(/"|'/g, "");
964
- return trim === "boolean" ? yield Boolean() : trim === "number" ? yield Number2() : trim === "bigint" ? yield BigInt() : trim === "string" ? yield String() : yield (() => {
965
- const literals = trim.split("|").map((literal) => Literal(literal.trim()));
966
- return literals.length === 0 ? Never() : literals.length === 1 ? literals[0] : UnionEvaluated(literals);
967
- })();
968
- }
969
- function* FromTerminal(syntax) {
970
- if (syntax[1] !== "{") {
971
- const L = Literal("$");
972
- const R = FromSyntax(syntax.slice(1));
973
- return yield* [L, ...R];
974
- }
975
- for (let i = 2; i < syntax.length; i++) {
976
- if (syntax[i] === "}") {
977
- const L = FromUnion(syntax.slice(2, i));
978
- const R = FromSyntax(syntax.slice(i + 1));
979
- return yield* [...L, ...R];
980
- }
981
- }
982
- yield Literal(syntax);
983
- }
984
- function* FromSyntax(syntax) {
985
- for (let i = 0; i < syntax.length; i++) {
986
- if (syntax[i] === "$") {
987
- const L = Literal(syntax.slice(0, i));
988
- const R = FromTerminal(syntax.slice(i));
989
- return yield* [L, ...R];
990
- }
991
- }
992
- yield Literal(syntax);
993
- }
994
- function TemplateLiteralSyntax(syntax) {
995
- return [...FromSyntax(syntax)];
996
- }
997
-
998
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/template-literal/pattern.mjs
999
- var TemplateLiteralPatternError = class extends TypeBoxError {
1000
- };
1001
- function Escape(value) {
1002
- return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1003
- }
1004
- function Visit2(schema, acc) {
1005
- 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}` : (() => {
1006
- throw new TemplateLiteralPatternError(`Unexpected Kind '${schema[Kind]}'`);
1007
- })();
1008
- }
1009
- function TemplateLiteralPattern(kinds) {
1010
- return `^${kinds.map((schema) => Visit2(schema, "")).join("")}$`;
1011
- }
1012
-
1013
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/template-literal/union.mjs
1014
- function TemplateLiteralToUnion(schema) {
1015
- const R = TemplateLiteralGenerate(schema);
1016
- const L = R.map((S) => Literal(S));
1017
- return UnionEvaluated(L);
1018
- }
1019
-
1020
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/template-literal/template-literal.mjs
1021
- function TemplateLiteral(unresolved, options) {
1022
- const pattern = IsString(unresolved) ? TemplateLiteralPattern(TemplateLiteralSyntax(unresolved)) : TemplateLiteralPattern(unresolved);
1023
- return CreateType({ [Kind]: "TemplateLiteral", type: "string", pattern }, options);
1024
- }
1025
-
1026
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-property-keys.mjs
1027
- function FromTemplateLiteral(templateLiteral) {
1028
- const keys = TemplateLiteralGenerate(templateLiteral);
1029
- return keys.map((key) => key.toString());
1030
- }
1031
- function FromUnion2(types) {
1032
- const result = [];
1033
- for (const type of types)
1034
- result.push(...IndexPropertyKeys(type));
1035
- return result;
1036
- }
1037
- function FromLiteral(literalValue) {
1038
- return [literalValue.toString()];
1039
- }
1040
- function IndexPropertyKeys(type) {
1041
- return [...new Set(IsTemplateLiteral(type) ? FromTemplateLiteral(type) : IsUnion(type) ? FromUnion2(type.anyOf) : IsLiteral(type) ? FromLiteral(type.const) : IsNumber3(type) ? ["[number]"] : IsInteger(type) ? ["[number]"] : [])];
1042
- }
1043
-
1044
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-result.mjs
1045
- function FromProperties(type, properties, options) {
1046
- const result = {};
1047
- for (const K2 of Object.getOwnPropertyNames(properties)) {
1048
- result[K2] = Index(type, IndexPropertyKeys(properties[K2]), options);
1049
- }
1050
- return result;
1051
- }
1052
- function FromMappedResult(type, mappedResult, options) {
1053
- return FromProperties(type, mappedResult.properties, options);
1054
- }
1055
- function IndexFromMappedResult(type, mappedResult, options) {
1056
- const properties = FromMappedResult(type, mappedResult, options);
1057
- return MappedResult(properties);
1058
- }
1059
-
1060
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed.mjs
1061
- function FromRest(types, key) {
1062
- return types.map((type) => IndexFromPropertyKey(type, key));
1063
- }
1064
- function FromIntersectRest(types) {
1065
- return types.filter((type) => !IsNever(type));
1066
- }
1067
- function FromIntersect(types, key) {
1068
- return IntersectEvaluated(FromIntersectRest(FromRest(types, key)));
1069
- }
1070
- function FromUnionRest(types) {
1071
- return types.some((L) => IsNever(L)) ? [] : types;
1072
- }
1073
- function FromUnion3(types, key) {
1074
- return UnionEvaluated(FromUnionRest(FromRest(types, key)));
1075
- }
1076
- function FromTuple(types, key) {
1077
- return key in types ? types[key] : key === "[number]" ? UnionEvaluated(types) : Never();
1078
- }
1079
- function FromArray(type, key) {
1080
- return key === "[number]" ? type : Never();
1081
- }
1082
- function FromProperty(properties, propertyKey) {
1083
- return propertyKey in properties ? properties[propertyKey] : Never();
1084
- }
1085
- function IndexFromPropertyKey(type, propertyKey) {
1086
- 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();
1087
- }
1088
- function IndexFromPropertyKeys(type, propertyKeys) {
1089
- return propertyKeys.map((propertyKey) => IndexFromPropertyKey(type, propertyKey));
1090
- }
1091
- function FromSchema(type, propertyKeys) {
1092
- return UnionEvaluated(IndexFromPropertyKeys(type, propertyKeys));
1093
- }
1094
- function Index(type, key, options) {
1095
- if (IsRef(type) || IsRef(key)) {
1096
- const error = `Index types using Ref parameters require both Type and Key to be of TSchema`;
1097
- if (!IsSchema(type) || !IsSchema(key))
1098
- throw new TypeBoxError(error);
1099
- return Computed("Index", [type, key]);
1100
- }
1101
- if (IsMappedResult(key))
1102
- return IndexFromMappedResult(type, key, options);
1103
- if (IsMappedKey(key))
1104
- return IndexFromMappedKey(type, key, options);
1105
- return CreateType(IsSchema(key) ? FromSchema(type, IndexPropertyKeys(key)) : FromSchema(type, key), options);
1106
- }
1107
-
1108
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-key.mjs
1109
- function MappedIndexPropertyKey(type, key, options) {
1110
- return { [key]: Index(type, [key], Clone(options)) };
1111
- }
1112
- function MappedIndexPropertyKeys(type, propertyKeys, options) {
1113
- return propertyKeys.reduce((result, left) => {
1114
- return { ...result, ...MappedIndexPropertyKey(type, left, options) };
1115
- }, {});
1116
- }
1117
- function MappedIndexProperties(type, mappedKey, options) {
1118
- return MappedIndexPropertyKeys(type, mappedKey.keys, options);
1119
- }
1120
- function IndexFromMappedKey(type, mappedKey, options) {
1121
- const properties = MappedIndexProperties(type, mappedKey, options);
1122
- return MappedResult(properties);
1123
- }
1124
-
1125
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/iterator/iterator.mjs
1126
- function Iterator(items, options) {
1127
- return CreateType({ [Kind]: "Iterator", type: "Iterator", items }, options);
1128
- }
1129
-
1130
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/object/object.mjs
1131
- function RequiredKeys(properties) {
1132
- const keys = [];
1133
- for (let key in properties) {
1134
- if (!IsOptional(properties[key]))
1135
- keys.push(key);
1136
- }
1137
- return keys;
1138
- }
1139
- function _Object(properties, options) {
1140
- const required = RequiredKeys(properties);
1141
- const schematic = required.length > 0 ? { [Kind]: "Object", type: "object", properties, required } : { [Kind]: "Object", type: "object", properties };
1142
- return CreateType(schematic, options);
1143
- }
1144
- var Object2 = _Object;
1145
-
1146
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/promise/promise.mjs
1147
- function Promise2(item, options) {
1148
- return CreateType({ [Kind]: "Promise", type: "Promise", item }, options);
1149
- }
1150
-
1151
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/readonly/readonly.mjs
1152
- function RemoveReadonly(schema) {
1153
- return CreateType(Discard(schema, [ReadonlyKind]));
1154
- }
1155
- function AddReadonly(schema) {
1156
- return CreateType({ ...schema, [ReadonlyKind]: "Readonly" });
1157
- }
1158
- function ReadonlyWithFlag(schema, F) {
1159
- return F === false ? RemoveReadonly(schema) : AddReadonly(schema);
1160
- }
1161
- function Readonly(schema, enable) {
1162
- const F = enable ?? true;
1163
- return IsMappedResult(schema) ? ReadonlyFromMappedResult(schema, F) : ReadonlyWithFlag(schema, F);
1164
- }
1165
-
1166
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/readonly/readonly-from-mapped-result.mjs
1167
- function FromProperties2(K, F) {
1168
- const Acc = {};
1169
- for (const K2 of globalThis.Object.getOwnPropertyNames(K))
1170
- Acc[K2] = Readonly(K[K2], F);
1171
- return Acc;
1172
- }
1173
- function FromMappedResult2(R, F) {
1174
- return FromProperties2(R.properties, F);
1175
- }
1176
- function ReadonlyFromMappedResult(R, F) {
1177
- const P = FromMappedResult2(R, F);
1178
- return MappedResult(P);
1179
- }
1180
-
1181
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/tuple/tuple.mjs
1182
- function Tuple(types, options) {
1183
- 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);
1184
- }
1185
-
1186
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/mapped/mapped.mjs
1187
- function FromMappedResult3(K, P) {
1188
- return K in P ? FromSchemaType(K, P[K]) : MappedResult(P);
1189
- }
1190
- function MappedKeyToKnownMappedResultProperties(K) {
1191
- return { [K]: Literal(K) };
1192
- }
1193
- function MappedKeyToUnknownMappedResultProperties(P) {
1194
- const Acc = {};
1195
- for (const L of P)
1196
- Acc[L] = Literal(L);
1197
- return Acc;
1198
- }
1199
- function MappedKeyToMappedResultProperties(K, P) {
1200
- return SetIncludes(P, K) ? MappedKeyToKnownMappedResultProperties(K) : MappedKeyToUnknownMappedResultProperties(P);
1201
- }
1202
- function FromMappedKey(K, P) {
1203
- const R = MappedKeyToMappedResultProperties(K, P);
1204
- return FromMappedResult3(K, R);
1205
- }
1206
- function FromRest2(K, T) {
1207
- return T.map((L) => FromSchemaType(K, L));
1208
- }
1209
- function FromProperties3(K, T) {
1210
- const Acc = {};
1211
- for (const K2 of globalThis.Object.getOwnPropertyNames(T))
1212
- Acc[K2] = FromSchemaType(K, T[K2]);
1213
- return Acc;
1214
- }
1215
- function FromSchemaType(K, T) {
1216
- const options = { ...T };
1217
- return (
1218
- // unevaluated modifier types
1219
- IsOptional(T) ? Optional(FromSchemaType(K, Discard(T, [OptionalKind]))) : IsReadonly(T) ? Readonly(FromSchemaType(K, Discard(T, [ReadonlyKind]))) : (
1220
- // unevaluated mapped types
1221
- IsMappedResult(T) ? FromMappedResult3(K, T.properties) : IsMappedKey(T) ? FromMappedKey(K, T.keys) : (
1222
- // unevaluated types
1223
- IsConstructor(T) ? Constructor(FromRest2(K, T.parameters), FromSchemaType(K, T.returns), options) : IsFunction2(T) ? Function(FromRest2(K, T.parameters), FromSchemaType(K, T.returns), options) : IsAsyncIterator2(T) ? AsyncIterator(FromSchemaType(K, T.items), options) : IsIterator2(T) ? Iterator(FromSchemaType(K, T.items), options) : IsIntersect(T) ? Intersect(FromRest2(K, T.allOf), options) : IsUnion(T) ? Union(FromRest2(K, T.anyOf), options) : IsTuple(T) ? Tuple(FromRest2(K, T.items ?? []), options) : IsObject3(T) ? Object2(FromProperties3(K, T.properties), options) : IsArray3(T) ? Array2(FromSchemaType(K, T.items), options) : IsPromise(T) ? Promise2(FromSchemaType(K, T.item), options) : T
1224
- )
1225
- )
1226
- );
1227
- }
1228
- function MappedFunctionReturnType(K, T) {
1229
- const Acc = {};
1230
- for (const L of K)
1231
- Acc[L] = FromSchemaType(L, T);
1232
- return Acc;
1233
- }
1234
- function Mapped(key, map, options) {
1235
- const K = IsSchema(key) ? IndexPropertyKeys(key) : key;
1236
- const RT = map({ [Kind]: "MappedKey", keys: K });
1237
- const R = MappedFunctionReturnType(K, RT);
1238
- return Object2(R, options);
1239
- }
1240
-
1241
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/optional/optional.mjs
1242
- function RemoveOptional(schema) {
1243
- return CreateType(Discard(schema, [OptionalKind]));
1244
- }
1245
- function AddOptional(schema) {
1246
- return CreateType({ ...schema, [OptionalKind]: "Optional" });
1247
- }
1248
- function OptionalWithFlag(schema, F) {
1249
- return F === false ? RemoveOptional(schema) : AddOptional(schema);
1250
- }
1251
- function Optional(schema, enable) {
1252
- const F = enable ?? true;
1253
- return IsMappedResult(schema) ? OptionalFromMappedResult(schema, F) : OptionalWithFlag(schema, F);
1254
- }
1255
-
1256
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/optional/optional-from-mapped-result.mjs
1257
- function FromProperties4(P, F) {
1258
- const Acc = {};
1259
- for (const K2 of globalThis.Object.getOwnPropertyNames(P))
1260
- Acc[K2] = Optional(P[K2], F);
1261
- return Acc;
1262
- }
1263
- function FromMappedResult4(R, F) {
1264
- return FromProperties4(R.properties, F);
1265
- }
1266
- function OptionalFromMappedResult(R, F) {
1267
- const P = FromMappedResult4(R, F);
1268
- return MappedResult(P);
1269
- }
1270
-
1271
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-create.mjs
1272
- function IntersectCreate(T, options = {}) {
1273
- const allObjects = T.every((schema) => IsObject3(schema));
1274
- const clonedUnevaluatedProperties = IsSchema(options.unevaluatedProperties) ? { unevaluatedProperties: options.unevaluatedProperties } : {};
1275
- return CreateType(options.unevaluatedProperties === false || IsSchema(options.unevaluatedProperties) || allObjects ? { ...clonedUnevaluatedProperties, [Kind]: "Intersect", type: "object", allOf: T } : { ...clonedUnevaluatedProperties, [Kind]: "Intersect", allOf: T }, options);
1276
- }
1277
-
1278
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-evaluated.mjs
1279
- function IsIntersectOptional(types) {
1280
- return types.every((left) => IsOptional(left));
1281
- }
1282
- function RemoveOptionalFromType2(type) {
1283
- return Discard(type, [OptionalKind]);
1284
- }
1285
- function RemoveOptionalFromRest2(types) {
1286
- return types.map((left) => IsOptional(left) ? RemoveOptionalFromType2(left) : left);
1287
- }
1288
- function ResolveIntersect(types, options) {
1289
- return IsIntersectOptional(types) ? Optional(IntersectCreate(RemoveOptionalFromRest2(types), options)) : IntersectCreate(RemoveOptionalFromRest2(types), options);
1290
- }
1291
- function IntersectEvaluated(types, options = {}) {
1292
- if (types.length === 1)
1293
- return CreateType(types[0], options);
1294
- if (types.length === 0)
1295
- return Never(options);
1296
- if (types.some((schema) => IsTransform(schema)))
1297
- throw new Error("Cannot intersect transform types");
1298
- return ResolveIntersect(types, options);
1299
- }
1300
-
1301
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/intersect/intersect.mjs
1302
- function Intersect(types, options) {
1303
- if (types.length === 1)
1304
- return CreateType(types[0], options);
1305
- if (types.length === 0)
1306
- return Never(options);
1307
- if (types.some((schema) => IsTransform(schema)))
1308
- throw new Error("Cannot intersect transform types");
1309
- return IntersectCreate(types, options);
1310
- }
1311
-
1312
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/ref/ref.mjs
1313
- function Ref(...args) {
1314
- const [$ref, options] = typeof args[0] === "string" ? [args[0], args[1]] : [args[0].$id, args[1]];
1315
- if (typeof $ref !== "string")
1316
- throw new TypeBoxError("Ref: $ref must be a string");
1317
- return CreateType({ [Kind]: "Ref", $ref }, options);
1318
- }
1319
-
1320
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/awaited/awaited.mjs
1321
- function FromComputed(target, parameters) {
1322
- return Computed("Awaited", [Computed(target, parameters)]);
1323
- }
1324
- function FromRef($ref) {
1325
- return Computed("Awaited", [Ref($ref)]);
1326
- }
1327
- function FromIntersect2(types) {
1328
- return Intersect(FromRest3(types));
1329
- }
1330
- function FromUnion4(types) {
1331
- return Union(FromRest3(types));
1332
- }
1333
- function FromPromise(type) {
1334
- return Awaited(type);
1335
- }
1336
- function FromRest3(types) {
1337
- return types.map((type) => Awaited(type));
1338
- }
1339
- function Awaited(type, options) {
1340
- 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);
1341
- }
1342
-
1343
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-property-keys.mjs
1344
- function FromRest4(types) {
1345
- const result = [];
1346
- for (const L of types)
1347
- result.push(KeyOfPropertyKeys(L));
1348
- return result;
1349
- }
1350
- function FromIntersect3(types) {
1351
- const propertyKeysArray = FromRest4(types);
1352
- const propertyKeys = SetUnionMany(propertyKeysArray);
1353
- return propertyKeys;
1354
- }
1355
- function FromUnion5(types) {
1356
- const propertyKeysArray = FromRest4(types);
1357
- const propertyKeys = SetIntersectMany(propertyKeysArray);
1358
- return propertyKeys;
1359
- }
1360
- function FromTuple2(types) {
1361
- return types.map((_, indexer) => indexer.toString());
1362
- }
1363
- function FromArray2(_) {
1364
- return ["[number]"];
1365
- }
1366
- function FromProperties5(T) {
1367
- return globalThis.Object.getOwnPropertyNames(T);
1368
- }
1369
- function FromPatternProperties(patternProperties) {
1370
- if (!includePatternProperties)
1371
- return [];
1372
- const patternPropertyKeys = globalThis.Object.getOwnPropertyNames(patternProperties);
1373
- return patternPropertyKeys.map((key) => {
1374
- return key[0] === "^" && key[key.length - 1] === "$" ? key.slice(1, key.length - 1) : key;
1375
- });
1376
- }
1377
- function KeyOfPropertyKeys(type) {
1378
- 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) : [];
1379
- }
1380
- var includePatternProperties = false;
1381
-
1382
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/keyof/keyof.mjs
1383
- function FromComputed2(target, parameters) {
1384
- return Computed("KeyOf", [Computed(target, parameters)]);
1385
- }
1386
- function FromRef2($ref) {
1387
- return Computed("KeyOf", [Ref($ref)]);
1388
- }
1389
- function KeyOfFromType(type, options) {
1390
- const propertyKeys = KeyOfPropertyKeys(type);
1391
- const propertyKeyTypes = KeyOfPropertyKeysToRest(propertyKeys);
1392
- const result = UnionEvaluated(propertyKeyTypes);
1393
- return CreateType(result, options);
1394
- }
1395
- function KeyOfPropertyKeysToRest(propertyKeys) {
1396
- return propertyKeys.map((L) => L === "[number]" ? Number2() : Literal(L));
1397
- }
1398
- function KeyOf(type, options) {
1399
- return IsComputed(type) ? FromComputed2(type.target, type.parameters) : IsRef(type) ? FromRef2(type.$ref) : IsMappedResult(type) ? KeyOfFromMappedResult(type, options) : KeyOfFromType(type, options);
1400
- }
1401
-
1402
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-from-mapped-result.mjs
1403
- function FromProperties6(properties, options) {
1404
- const result = {};
1405
- for (const K2 of globalThis.Object.getOwnPropertyNames(properties))
1406
- result[K2] = KeyOf(properties[K2], Clone(options));
1407
- return result;
1408
- }
1409
- function FromMappedResult5(mappedResult, options) {
1410
- return FromProperties6(mappedResult.properties, options);
1411
- }
1412
- function KeyOfFromMappedResult(mappedResult, options) {
1413
- const properties = FromMappedResult5(mappedResult, options);
1414
- return MappedResult(properties);
1415
- }
1416
-
1417
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/composite/composite.mjs
1418
- function CompositeKeys(T) {
1419
- const Acc = [];
1420
- for (const L of T)
1421
- Acc.push(...KeyOfPropertyKeys(L));
1422
- return SetDistinct(Acc);
1423
- }
1424
- function FilterNever(T) {
1425
- return T.filter((L) => !IsNever(L));
1426
- }
1427
- function CompositeProperty(T, K) {
1428
- const Acc = [];
1429
- for (const L of T)
1430
- Acc.push(...IndexFromPropertyKeys(L, [K]));
1431
- return FilterNever(Acc);
1432
- }
1433
- function CompositeProperties(T, K) {
1434
- const Acc = {};
1435
- for (const L of K) {
1436
- Acc[L] = IntersectEvaluated(CompositeProperty(T, L));
1437
- }
1438
- return Acc;
1439
- }
1440
- function Composite(T, options) {
1441
- const K = CompositeKeys(T);
1442
- const P = CompositeProperties(T, K);
1443
- const R = Object2(P, options);
1444
- return R;
1445
- }
1446
-
1447
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/date/date.mjs
1448
- function Date2(options) {
1449
- return CreateType({ [Kind]: "Date", type: "Date" }, options);
1450
- }
1451
-
1452
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/null/null.mjs
1453
- function Null(options) {
1454
- return CreateType({ [Kind]: "Null", type: "null" }, options);
1455
- }
1456
-
1457
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/symbol/symbol.mjs
1458
- function Symbol2(options) {
1459
- return CreateType({ [Kind]: "Symbol", type: "symbol" }, options);
1460
- }
1461
-
1462
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/undefined/undefined.mjs
1463
- function Undefined(options) {
1464
- return CreateType({ [Kind]: "Undefined", type: "undefined" }, options);
1465
- }
1466
-
1467
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/uint8array/uint8array.mjs
1468
- function Uint8Array2(options) {
1469
- return CreateType({ [Kind]: "Uint8Array", type: "Uint8Array" }, options);
1470
- }
1471
-
1472
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/unknown/unknown.mjs
1473
- function Unknown(options) {
1474
- return CreateType({ [Kind]: "Unknown" }, options);
1475
- }
1476
-
1477
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/const/const.mjs
1478
- function FromArray3(T) {
1479
- return T.map((L) => FromValue(L, false));
1480
- }
1481
- function FromProperties7(value) {
1482
- const Acc = {};
1483
- for (const K of globalThis.Object.getOwnPropertyNames(value))
1484
- Acc[K] = Readonly(FromValue(value[K], false));
1485
- return Acc;
1486
- }
1487
- function ConditionalReadonly(T, root) {
1488
- return root === true ? T : Readonly(T);
1489
- }
1490
- function FromValue(value, root) {
1491
- return IsAsyncIterator(value) ? ConditionalReadonly(Any(), root) : IsIterator(value) ? ConditionalReadonly(Any(), root) : IsArray(value) ? Readonly(Tuple(FromArray3(value))) : IsUint8Array(value) ? Uint8Array2() : IsDate(value) ? Date2() : IsObject(value) ? ConditionalReadonly(Object2(FromProperties7(value)), root) : IsFunction(value) ? ConditionalReadonly(Function([], Unknown()), root) : IsUndefined(value) ? Undefined() : IsNull(value) ? Null() : IsSymbol(value) ? Symbol2() : IsBigInt(value) ? BigInt() : IsNumber(value) ? Literal(value) : IsBoolean(value) ? Literal(value) : IsString(value) ? Literal(value) : Object2({});
1492
- }
1493
- function Const(T, options) {
1494
- return CreateType(FromValue(T, true), options);
1495
- }
1496
-
1497
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/constructor-parameters/constructor-parameters.mjs
1498
- function ConstructorParameters(schema, options) {
1499
- return IsConstructor(schema) ? Tuple(schema.parameters, options) : Never(options);
1500
- }
1501
-
1502
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/enum/enum.mjs
1503
- function Enum(item, options) {
1504
- if (IsUndefined(item))
1505
- throw new Error("Enum undefined or empty");
1506
- const values1 = globalThis.Object.getOwnPropertyNames(item).filter((key) => isNaN(key)).map((key) => item[key]);
1507
- const values2 = [...new Set(values1)];
1508
- const anyOf = values2.map((value) => Literal(value));
1509
- return Union(anyOf, { ...options, [Hint]: "Enum" });
1510
- }
1511
-
1512
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/extends/extends-check.mjs
1513
- var ExtendsResolverError = class extends TypeBoxError {
1514
- };
1515
- var ExtendsResult;
1516
- (function(ExtendsResult2) {
1517
- ExtendsResult2[ExtendsResult2["Union"] = 0] = "Union";
1518
- ExtendsResult2[ExtendsResult2["True"] = 1] = "True";
1519
- ExtendsResult2[ExtendsResult2["False"] = 2] = "False";
1520
- })(ExtendsResult || (ExtendsResult = {}));
1521
- function IntoBooleanResult(result) {
1522
- return result === ExtendsResult.False ? result : ExtendsResult.True;
1523
- }
1524
- function Throw(message) {
1525
- throw new ExtendsResolverError(message);
1526
- }
1527
- function IsStructuralRight(right) {
1528
- return type_exports.IsNever(right) || type_exports.IsIntersect(right) || type_exports.IsUnion(right) || type_exports.IsUnknown(right) || type_exports.IsAny(right);
1529
- }
1530
- function StructuralRight(left, right) {
1531
- 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");
1532
- }
1533
- function FromAnyRight(left, right) {
1534
- return ExtendsResult.True;
1535
- }
1536
- function FromAny(left, right) {
1537
- 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;
1538
- }
1539
- function FromArrayRight(left, right) {
1540
- return type_exports.IsUnknown(left) ? ExtendsResult.False : type_exports.IsAny(left) ? ExtendsResult.Union : type_exports.IsNever(left) ? ExtendsResult.True : ExtendsResult.False;
1541
- }
1542
- function FromArray4(left, right) {
1543
- 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));
1544
- }
1545
- function FromAsyncIterator(left, right) {
1546
- return IsStructuralRight(right) ? StructuralRight(left, right) : !type_exports.IsAsyncIterator(right) ? ExtendsResult.False : IntoBooleanResult(Visit3(left.items, right.items));
1547
- }
1548
- function FromBigInt(left, right) {
1549
- 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;
1550
- }
1551
- function FromBooleanRight(left, right) {
1552
- return type_exports.IsLiteralBoolean(left) ? ExtendsResult.True : type_exports.IsBoolean(left) ? ExtendsResult.True : ExtendsResult.False;
1553
- }
1554
- function FromBoolean(left, right) {
1555
- 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;
1556
- }
1557
- function FromConstructor(left, right) {
1558
- 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));
1559
- }
1560
- function FromDate(left, right) {
1561
- 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;
1562
- }
1563
- function FromFunction(left, right) {
1564
- 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));
1565
- }
1566
- function FromIntegerRight(left, right) {
1567
- return type_exports.IsLiteral(left) && value_exports.IsNumber(left.const) ? ExtendsResult.True : type_exports.IsNumber(left) || type_exports.IsInteger(left) ? ExtendsResult.True : ExtendsResult.False;
1568
- }
1569
- function FromInteger(left, right) {
1570
- 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;
1571
- }
1572
- function FromIntersectRight(left, right) {
1573
- return right.allOf.every((schema) => Visit3(left, schema) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False;
1574
- }
1575
- function FromIntersect4(left, right) {
1576
- return left.allOf.some((schema) => Visit3(schema, right) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False;
1577
- }
1578
- function FromIterator(left, right) {
1579
- return IsStructuralRight(right) ? StructuralRight(left, right) : !type_exports.IsIterator(right) ? ExtendsResult.False : IntoBooleanResult(Visit3(left.items, right.items));
1580
- }
1581
- function FromLiteral2(left, right) {
1582
- 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;
1583
- }
1584
- function FromNeverRight(left, right) {
1585
- return ExtendsResult.False;
1586
- }
1587
- function FromNever(left, right) {
1588
- return ExtendsResult.True;
1589
- }
1590
- function UnwrapTNot(schema) {
1591
- let [current, depth] = [schema, 0];
1592
- while (true) {
1593
- if (!type_exports.IsNot(current))
1594
- break;
1595
- current = current.not;
1596
- depth += 1;
1597
- }
1598
- return depth % 2 === 0 ? current : Unknown();
1599
- }
1600
- function FromNot(left, right) {
1601
- return type_exports.IsNot(left) ? Visit3(UnwrapTNot(left), right) : type_exports.IsNot(right) ? Visit3(left, UnwrapTNot(right)) : Throw("Invalid fallthrough for Not");
1602
- }
1603
- function FromNull(left, right) {
1604
- 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;
1605
- }
1606
- function FromNumberRight(left, right) {
1607
- return type_exports.IsLiteralNumber(left) ? ExtendsResult.True : type_exports.IsNumber(left) || type_exports.IsInteger(left) ? ExtendsResult.True : ExtendsResult.False;
1608
- }
1609
- function FromNumber(left, right) {
1610
- 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;
1611
- }
1612
- function IsObjectPropertyCount(schema, count) {
1613
- return Object.getOwnPropertyNames(schema.properties).length === count;
1614
- }
1615
- function IsObjectStringLike(schema) {
1616
- return IsObjectArrayLike(schema);
1617
- }
1618
- function IsObjectSymbolLike(schema) {
1619
- 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]));
1620
- }
1621
- function IsObjectNumberLike(schema) {
1622
- return IsObjectPropertyCount(schema, 0);
1623
- }
1624
- function IsObjectBooleanLike(schema) {
1625
- return IsObjectPropertyCount(schema, 0);
1626
- }
1627
- function IsObjectBigIntLike(schema) {
1628
- return IsObjectPropertyCount(schema, 0);
1629
- }
1630
- function IsObjectDateLike(schema) {
1631
- return IsObjectPropertyCount(schema, 0);
1632
- }
1633
- function IsObjectUint8ArrayLike(schema) {
1634
- return IsObjectArrayLike(schema);
1635
- }
1636
- function IsObjectFunctionLike(schema) {
1637
- const length = Number2();
1638
- return IsObjectPropertyCount(schema, 0) || IsObjectPropertyCount(schema, 1) && "length" in schema.properties && IntoBooleanResult(Visit3(schema.properties["length"], length)) === ExtendsResult.True;
1639
- }
1640
- function IsObjectConstructorLike(schema) {
1641
- return IsObjectPropertyCount(schema, 0);
1642
- }
1643
- function IsObjectArrayLike(schema) {
1644
- const length = Number2();
1645
- return IsObjectPropertyCount(schema, 0) || IsObjectPropertyCount(schema, 1) && "length" in schema.properties && IntoBooleanResult(Visit3(schema.properties["length"], length)) === ExtendsResult.True;
1646
- }
1647
- function IsObjectPromiseLike(schema) {
1648
- const then = Function([Any()], Any());
1649
- return IsObjectPropertyCount(schema, 0) || IsObjectPropertyCount(schema, 1) && "then" in schema.properties && IntoBooleanResult(Visit3(schema.properties["then"], then)) === ExtendsResult.True;
1650
- }
1651
- function Property(left, right) {
1652
- return Visit3(left, right) === ExtendsResult.False ? ExtendsResult.False : type_exports.IsOptional(left) && !type_exports.IsOptional(right) ? ExtendsResult.False : ExtendsResult.True;
1653
- }
1654
- function FromObjectRight(left, right) {
1655
- 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)) ? (() => {
1656
- return right[Hint] === "Record" ? ExtendsResult.True : ExtendsResult.False;
1657
- })() : type_exports.IsRecord(left) && type_exports.IsNumber(RecordKey(left)) ? (() => {
1658
- return IsObjectPropertyCount(right, 0) ? ExtendsResult.True : ExtendsResult.False;
1659
- })() : ExtendsResult.False;
1660
- }
1661
- function FromObject(left, right) {
1662
- return IsStructuralRight(right) ? StructuralRight(left, right) : type_exports.IsRecord(right) ? FromRecordRight(left, right) : !type_exports.IsObject(right) ? ExtendsResult.False : (() => {
1663
- for (const key of Object.getOwnPropertyNames(right.properties)) {
1664
- if (!(key in left.properties) && !type_exports.IsOptional(right.properties[key])) {
1665
- return ExtendsResult.False;
1666
- }
1667
- if (type_exports.IsOptional(right.properties[key])) {
1668
- return ExtendsResult.True;
1669
- }
1670
- if (Property(left.properties[key], right.properties[key]) === ExtendsResult.False) {
1671
- return ExtendsResult.False;
1672
- }
1673
- }
1674
- return ExtendsResult.True;
1675
- })();
1676
- }
1677
- function FromPromise2(left, right) {
1678
- 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));
1679
- }
1680
- function RecordKey(schema) {
1681
- return PatternNumberExact in schema.patternProperties ? Number2() : PatternStringExact in schema.patternProperties ? String() : Throw("Unknown record key pattern");
1682
- }
1683
- function RecordValue(schema) {
1684
- return PatternNumberExact in schema.patternProperties ? schema.patternProperties[PatternNumberExact] : PatternStringExact in schema.patternProperties ? schema.patternProperties[PatternStringExact] : Throw("Unable to get record value schema");
1685
- }
1686
- function FromRecordRight(left, right) {
1687
- const [Key, Value] = [RecordKey(right), RecordValue(right)];
1688
- 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) ? (() => {
1689
- for (const key of Object.getOwnPropertyNames(left.properties)) {
1690
- if (Property(Value, left.properties[key]) === ExtendsResult.False) {
1691
- return ExtendsResult.False;
1692
- }
1693
- }
1694
- return ExtendsResult.True;
1695
- })() : ExtendsResult.False;
1696
- }
1697
- function FromRecord(left, right) {
1698
- return IsStructuralRight(right) ? StructuralRight(left, right) : type_exports.IsObject(right) ? FromObjectRight(left, right) : !type_exports.IsRecord(right) ? ExtendsResult.False : Visit3(RecordValue(left), RecordValue(right));
1699
- }
1700
- function FromRegExp(left, right) {
1701
- const L = type_exports.IsRegExp(left) ? String() : left;
1702
- const R = type_exports.IsRegExp(right) ? String() : right;
1703
- return Visit3(L, R);
1704
- }
1705
- function FromStringRight(left, right) {
1706
- return type_exports.IsLiteral(left) && value_exports.IsString(left.const) ? ExtendsResult.True : type_exports.IsString(left) ? ExtendsResult.True : ExtendsResult.False;
1707
- }
1708
- function FromString(left, right) {
1709
- 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;
1710
- }
1711
- function FromSymbol(left, right) {
1712
- 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;
1713
- }
1714
- function FromTemplateLiteral2(left, right) {
1715
- return type_exports.IsTemplateLiteral(left) ? Visit3(TemplateLiteralToUnion(left), right) : type_exports.IsTemplateLiteral(right) ? Visit3(left, TemplateLiteralToUnion(right)) : Throw("Invalid fallthrough for TemplateLiteral");
1716
- }
1717
- function IsArrayOfTuple(left, right) {
1718
- return type_exports.IsArray(right) && left.items !== void 0 && left.items.every((schema) => Visit3(schema, right.items) === ExtendsResult.True);
1719
- }
1720
- function FromTupleRight(left, right) {
1721
- return type_exports.IsNever(left) ? ExtendsResult.True : type_exports.IsUnknown(left) ? ExtendsResult.False : type_exports.IsAny(left) ? ExtendsResult.Union : ExtendsResult.False;
1722
- }
1723
- function FromTuple3(left, right) {
1724
- 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;
1725
- }
1726
- function FromUint8Array(left, right) {
1727
- 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;
1728
- }
1729
- function FromUndefined(left, right) {
1730
- 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;
1731
- }
1732
- function FromUnionRight(left, right) {
1733
- return right.anyOf.some((schema) => Visit3(left, schema) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False;
1734
- }
1735
- function FromUnion6(left, right) {
1736
- return left.anyOf.every((schema) => Visit3(schema, right) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False;
1737
- }
1738
- function FromUnknownRight(left, right) {
1739
- return ExtendsResult.True;
1740
- }
1741
- function FromUnknown(left, right) {
1742
- 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;
1743
- }
1744
- function FromVoidRight(left, right) {
1745
- return type_exports.IsUndefined(left) ? ExtendsResult.True : type_exports.IsUndefined(left) ? ExtendsResult.True : ExtendsResult.False;
1746
- }
1747
- function FromVoid(left, right) {
1748
- 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;
1749
- }
1750
- function Visit3(left, right) {
1751
- return (
1752
- // resolvable
1753
- 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) : (
1754
- // standard
1755
- 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]}'`)
1756
- )
1757
- );
1758
- }
1759
- function ExtendsCheck(left, right) {
1760
- return Visit3(left, right);
1761
- }
1762
-
1763
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/extends/extends-from-mapped-result.mjs
1764
- function FromProperties8(P, Right, True, False, options) {
1765
- const Acc = {};
1766
- for (const K2 of globalThis.Object.getOwnPropertyNames(P))
1767
- Acc[K2] = Extends(P[K2], Right, True, False, Clone(options));
1768
- return Acc;
1769
- }
1770
- function FromMappedResult6(Left, Right, True, False, options) {
1771
- return FromProperties8(Left.properties, Right, True, False, options);
1772
- }
1773
- function ExtendsFromMappedResult(Left, Right, True, False, options) {
1774
- const P = FromMappedResult6(Left, Right, True, False, options);
1775
- return MappedResult(P);
1776
- }
1777
-
1778
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/extends/extends.mjs
1779
- function ExtendsResolve(left, right, trueType, falseType) {
1780
- const R = ExtendsCheck(left, right);
1781
- return R === ExtendsResult.Union ? Union([trueType, falseType]) : R === ExtendsResult.True ? trueType : falseType;
1782
- }
1783
- function Extends(L, R, T, F, options) {
1784
- return IsMappedResult(L) ? ExtendsFromMappedResult(L, R, T, F, options) : IsMappedKey(L) ? CreateType(ExtendsFromMappedKey(L, R, T, F, options)) : CreateType(ExtendsResolve(L, R, T, F), options);
1785
- }
1786
-
1787
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/extends/extends-from-mapped-key.mjs
1788
- function FromPropertyKey(K, U, L, R, options) {
1789
- return {
1790
- [K]: Extends(Literal(K), U, L, R, Clone(options))
1791
- };
1792
- }
1793
- function FromPropertyKeys(K, U, L, R, options) {
1794
- return K.reduce((Acc, LK) => {
1795
- return { ...Acc, ...FromPropertyKey(LK, U, L, R, options) };
1796
- }, {});
1797
- }
1798
- function FromMappedKey2(K, U, L, R, options) {
1799
- return FromPropertyKeys(K.keys, U, L, R, options);
1800
- }
1801
- function ExtendsFromMappedKey(T, U, L, R, options) {
1802
- const P = FromMappedKey2(T, U, L, R, options);
1803
- return MappedResult(P);
1804
- }
1805
-
1806
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/exclude/exclude-from-template-literal.mjs
1807
- function ExcludeFromTemplateLiteral(L, R) {
1808
- return Exclude(TemplateLiteralToUnion(L), R);
1809
- }
1810
-
1811
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/exclude/exclude.mjs
1812
- function ExcludeRest(L, R) {
1813
- const excluded = L.filter((inner) => ExtendsCheck(inner, R) === ExtendsResult.False);
1814
- return excluded.length === 1 ? excluded[0] : Union(excluded);
1815
- }
1816
- function Exclude(L, R, options = {}) {
1817
- if (IsTemplateLiteral(L))
1818
- return CreateType(ExcludeFromTemplateLiteral(L, R), options);
1819
- if (IsMappedResult(L))
1820
- return CreateType(ExcludeFromMappedResult(L, R), options);
1821
- return CreateType(IsUnion(L) ? ExcludeRest(L.anyOf, R) : ExtendsCheck(L, R) !== ExtendsResult.False ? Never() : L, options);
1822
- }
1823
-
1824
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/exclude/exclude-from-mapped-result.mjs
1825
- function FromProperties9(P, U) {
1826
- const Acc = {};
1827
- for (const K2 of globalThis.Object.getOwnPropertyNames(P))
1828
- Acc[K2] = Exclude(P[K2], U);
1829
- return Acc;
1830
- }
1831
- function FromMappedResult7(R, T) {
1832
- return FromProperties9(R.properties, T);
1833
- }
1834
- function ExcludeFromMappedResult(R, T) {
1835
- const P = FromMappedResult7(R, T);
1836
- return MappedResult(P);
1837
- }
1838
-
1839
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/extract/extract-from-template-literal.mjs
1840
- function ExtractFromTemplateLiteral(L, R) {
1841
- return Extract(TemplateLiteralToUnion(L), R);
1842
- }
1843
-
1844
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/extract/extract.mjs
1845
- function ExtractRest(L, R) {
1846
- const extracted = L.filter((inner) => ExtendsCheck(inner, R) !== ExtendsResult.False);
1847
- return extracted.length === 1 ? extracted[0] : Union(extracted);
1848
- }
1849
- function Extract(L, R, options) {
1850
- if (IsTemplateLiteral(L))
1851
- return CreateType(ExtractFromTemplateLiteral(L, R), options);
1852
- if (IsMappedResult(L))
1853
- return CreateType(ExtractFromMappedResult(L, R), options);
1854
- return CreateType(IsUnion(L) ? ExtractRest(L.anyOf, R) : ExtendsCheck(L, R) !== ExtendsResult.False ? L : Never(), options);
1855
- }
1856
-
1857
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/extract/extract-from-mapped-result.mjs
1858
- function FromProperties10(P, T) {
1859
- const Acc = {};
1860
- for (const K2 of globalThis.Object.getOwnPropertyNames(P))
1861
- Acc[K2] = Extract(P[K2], T);
1862
- return Acc;
1863
- }
1864
- function FromMappedResult8(R, T) {
1865
- return FromProperties10(R.properties, T);
1866
- }
1867
- function ExtractFromMappedResult(R, T) {
1868
- const P = FromMappedResult8(R, T);
1869
- return MappedResult(P);
1870
- }
1871
-
1872
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/instance-type/instance-type.mjs
1873
- function InstanceType(schema, options) {
1874
- return IsConstructor(schema) ? CreateType(schema.returns, options) : Never(options);
1875
- }
1876
-
1877
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/readonly-optional/readonly-optional.mjs
1878
- function ReadonlyOptional(schema) {
1879
- return Readonly(Optional(schema));
1880
- }
1881
-
1882
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/record/record.mjs
1883
- function RecordCreateFromPattern(pattern, T, options) {
1884
- return CreateType({ [Kind]: "Record", type: "object", patternProperties: { [pattern]: T } }, options);
1885
- }
1886
- function RecordCreateFromKeys(K, T, options) {
1887
- const result = {};
1888
- for (const K2 of K)
1889
- result[K2] = T;
1890
- return Object2(result, { ...options, [Hint]: "Record" });
1891
- }
1892
- function FromTemplateLiteralKey(K, T, options) {
1893
- return IsTemplateLiteralFinite(K) ? RecordCreateFromKeys(IndexPropertyKeys(K), T, options) : RecordCreateFromPattern(K.pattern, T, options);
1894
- }
1895
- function FromUnionKey(key, type, options) {
1896
- return RecordCreateFromKeys(IndexPropertyKeys(Union(key)), type, options);
1897
- }
1898
- function FromLiteralKey(key, type, options) {
1899
- return RecordCreateFromKeys([key.toString()], type, options);
1900
- }
1901
- function FromRegExpKey(key, type, options) {
1902
- return RecordCreateFromPattern(key.source, type, options);
1903
- }
1904
- function FromStringKey(key, type, options) {
1905
- const pattern = IsUndefined(key.pattern) ? PatternStringExact : key.pattern;
1906
- return RecordCreateFromPattern(pattern, type, options);
1907
- }
1908
- function FromAnyKey(_, type, options) {
1909
- return RecordCreateFromPattern(PatternStringExact, type, options);
1910
- }
1911
- function FromNeverKey(_key, type, options) {
1912
- return RecordCreateFromPattern(PatternNeverExact, type, options);
1913
- }
1914
- function FromBooleanKey(_key, type, options) {
1915
- return Object2({ true: type, false: type }, options);
1916
- }
1917
- function FromIntegerKey(_key, type, options) {
1918
- return RecordCreateFromPattern(PatternNumberExact, type, options);
1919
- }
1920
- function FromNumberKey(_, type, options) {
1921
- return RecordCreateFromPattern(PatternNumberExact, type, options);
1922
- }
1923
- function Record(key, type, options = {}) {
1924
- 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);
1925
- }
1926
- function RecordPattern(record) {
1927
- return globalThis.Object.getOwnPropertyNames(record.patternProperties)[0];
1928
- }
1929
- function RecordKey2(type) {
1930
- const pattern = RecordPattern(type);
1931
- return pattern === PatternStringExact ? String() : pattern === PatternNumberExact ? Number2() : String({ pattern });
1932
- }
1933
- function RecordValue2(type) {
1934
- return type.patternProperties[RecordPattern(type)];
1935
- }
1936
-
1937
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/instantiate/instantiate.mjs
1938
- function FromConstructor2(args, type) {
1939
- type.parameters = FromTypes(args, type.parameters);
1940
- type.returns = FromType(args, type.returns);
1941
- return type;
1942
- }
1943
- function FromFunction2(args, type) {
1944
- type.parameters = FromTypes(args, type.parameters);
1945
- type.returns = FromType(args, type.returns);
1946
- return type;
1947
- }
1948
- function FromIntersect5(args, type) {
1949
- type.allOf = FromTypes(args, type.allOf);
1950
- return type;
1951
- }
1952
- function FromUnion7(args, type) {
1953
- type.anyOf = FromTypes(args, type.anyOf);
1954
- return type;
1955
- }
1956
- function FromTuple4(args, type) {
1957
- if (IsUndefined(type.items))
1958
- return type;
1959
- type.items = FromTypes(args, type.items);
1960
- return type;
1961
- }
1962
- function FromArray5(args, type) {
1963
- type.items = FromType(args, type.items);
1964
- return type;
1965
- }
1966
- function FromAsyncIterator2(args, type) {
1967
- type.items = FromType(args, type.items);
1968
- return type;
1969
- }
1970
- function FromIterator2(args, type) {
1971
- type.items = FromType(args, type.items);
1972
- return type;
1973
- }
1974
- function FromPromise3(args, type) {
1975
- type.item = FromType(args, type.item);
1976
- return type;
1977
- }
1978
- function FromObject2(args, type) {
1979
- const mappedProperties = FromProperties11(args, type.properties);
1980
- return { ...type, ...Object2(mappedProperties) };
1981
- }
1982
- function FromRecord2(args, type) {
1983
- const mappedKey = FromType(args, RecordKey2(type));
1984
- const mappedValue = FromType(args, RecordValue2(type));
1985
- const result = Record(mappedKey, mappedValue);
1986
- return { ...type, ...result };
1987
- }
1988
- function FromArgument(args, argument) {
1989
- return argument.index in args ? args[argument.index] : Unknown();
1990
- }
1991
- function FromProperty2(args, type) {
1992
- const isReadonly = IsReadonly(type);
1993
- const isOptional = IsOptional(type);
1994
- const mapped = FromType(args, type);
1995
- return isReadonly && isOptional ? ReadonlyOptional(mapped) : isReadonly && !isOptional ? Readonly(mapped) : !isReadonly && isOptional ? Optional(mapped) : mapped;
1996
- }
1997
- function FromProperties11(args, properties) {
1998
- return globalThis.Object.getOwnPropertyNames(properties).reduce((result, key) => {
1999
- return { ...result, [key]: FromProperty2(args, properties[key]) };
2000
- }, {});
2001
- }
2002
- function FromTypes(args, types) {
2003
- return types.map((type) => FromType(args, type));
2004
- }
2005
- function FromType(args, type) {
2006
- 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;
2007
- }
2008
- function Instantiate(type, args) {
2009
- return FromType(args, CloneType(type));
2010
- }
2011
-
2012
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/integer/integer.mjs
2013
- function Integer(options) {
2014
- return CreateType({ [Kind]: "Integer", type: "integer" }, options);
2015
- }
2016
-
2017
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/intrinsic/intrinsic-from-mapped-key.mjs
2018
- function MappedIntrinsicPropertyKey(K, M, options) {
2019
- return {
2020
- [K]: Intrinsic(Literal(K), M, Clone(options))
2021
- };
2022
- }
2023
- function MappedIntrinsicPropertyKeys(K, M, options) {
2024
- const result = K.reduce((Acc, L) => {
2025
- return { ...Acc, ...MappedIntrinsicPropertyKey(L, M, options) };
2026
- }, {});
2027
- return result;
2028
- }
2029
- function MappedIntrinsicProperties(T, M, options) {
2030
- return MappedIntrinsicPropertyKeys(T["keys"], M, options);
2031
- }
2032
- function IntrinsicFromMappedKey(T, M, options) {
2033
- const P = MappedIntrinsicProperties(T, M, options);
2034
- return MappedResult(P);
2035
- }
2036
-
2037
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/intrinsic/intrinsic.mjs
2038
- function ApplyUncapitalize(value) {
2039
- const [first, rest] = [value.slice(0, 1), value.slice(1)];
2040
- return [first.toLowerCase(), rest].join("");
2041
- }
2042
- function ApplyCapitalize(value) {
2043
- const [first, rest] = [value.slice(0, 1), value.slice(1)];
2044
- return [first.toUpperCase(), rest].join("");
2045
- }
2046
- function ApplyUppercase(value) {
2047
- return value.toUpperCase();
2048
- }
2049
- function ApplyLowercase(value) {
2050
- return value.toLowerCase();
2051
- }
2052
- function FromTemplateLiteral3(schema, mode, options) {
2053
- const expression = TemplateLiteralParseExact(schema.pattern);
2054
- const finite = IsTemplateLiteralExpressionFinite(expression);
2055
- if (!finite)
2056
- return { ...schema, pattern: FromLiteralValue(schema.pattern, mode) };
2057
- const strings = [...TemplateLiteralExpressionGenerate(expression)];
2058
- const literals = strings.map((value) => Literal(value));
2059
- const mapped = FromRest5(literals, mode);
2060
- const union = Union(mapped);
2061
- return TemplateLiteral([union], options);
2062
- }
2063
- function FromLiteralValue(value, mode) {
2064
- return typeof value === "string" ? mode === "Uncapitalize" ? ApplyUncapitalize(value) : mode === "Capitalize" ? ApplyCapitalize(value) : mode === "Uppercase" ? ApplyUppercase(value) : mode === "Lowercase" ? ApplyLowercase(value) : value : value.toString();
2065
- }
2066
- function FromRest5(T, M) {
2067
- return T.map((L) => Intrinsic(L, M));
2068
- }
2069
- function Intrinsic(schema, mode, options = {}) {
2070
- return (
2071
- // Intrinsic-Mapped-Inference
2072
- IsMappedKey(schema) ? IntrinsicFromMappedKey(schema, mode, options) : (
2073
- // Standard-Inference
2074
- IsTemplateLiteral(schema) ? FromTemplateLiteral3(schema, mode, options) : IsUnion(schema) ? Union(FromRest5(schema.anyOf, mode), options) : IsLiteral(schema) ? Literal(FromLiteralValue(schema.const, mode), options) : (
2075
- // Default Type
2076
- CreateType(schema, options)
2077
- )
2078
- )
2079
- );
2080
- }
2081
-
2082
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/intrinsic/capitalize.mjs
2083
- function Capitalize(T, options = {}) {
2084
- return Intrinsic(T, "Capitalize", options);
2085
- }
2086
-
2087
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/intrinsic/lowercase.mjs
2088
- function Lowercase(T, options = {}) {
2089
- return Intrinsic(T, "Lowercase", options);
2090
- }
2091
-
2092
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/intrinsic/uncapitalize.mjs
2093
- function Uncapitalize(T, options = {}) {
2094
- return Intrinsic(T, "Uncapitalize", options);
2095
- }
2096
-
2097
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/intrinsic/uppercase.mjs
2098
- function Uppercase(T, options = {}) {
2099
- return Intrinsic(T, "Uppercase", options);
2100
- }
2101
-
2102
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-result.mjs
2103
- function FromProperties12(properties, propertyKeys, options) {
2104
- const result = {};
2105
- for (const K2 of globalThis.Object.getOwnPropertyNames(properties))
2106
- result[K2] = Omit(properties[K2], propertyKeys, Clone(options));
2107
- return result;
2108
- }
2109
- function FromMappedResult9(mappedResult, propertyKeys, options) {
2110
- return FromProperties12(mappedResult.properties, propertyKeys, options);
2111
- }
2112
- function OmitFromMappedResult(mappedResult, propertyKeys, options) {
2113
- const properties = FromMappedResult9(mappedResult, propertyKeys, options);
2114
- return MappedResult(properties);
2115
- }
2116
-
2117
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/omit/omit.mjs
2118
- function FromIntersect6(types, propertyKeys) {
2119
- return types.map((type) => OmitResolve(type, propertyKeys));
2120
- }
2121
- function FromUnion8(types, propertyKeys) {
2122
- return types.map((type) => OmitResolve(type, propertyKeys));
2123
- }
2124
- function FromProperty3(properties, key) {
2125
- const { [key]: _, ...R } = properties;
2126
- return R;
2127
- }
2128
- function FromProperties13(properties, propertyKeys) {
2129
- return propertyKeys.reduce((T, K2) => FromProperty3(T, K2), properties);
2130
- }
2131
- function FromObject3(properties, propertyKeys) {
2132
- const options = Discard(properties, [TransformKind, "$id", "required", "properties"]);
2133
- const omittedProperties = FromProperties13(properties["properties"], propertyKeys);
2134
- return Object2(omittedProperties, options);
2135
- }
2136
- function UnionFromPropertyKeys(propertyKeys) {
2137
- const result = propertyKeys.reduce((result2, key) => IsLiteralValue(key) ? [...result2, Literal(key)] : result2, []);
2138
- return Union(result);
2139
- }
2140
- function OmitResolve(properties, propertyKeys) {
2141
- return IsIntersect(properties) ? Intersect(FromIntersect6(properties.allOf, propertyKeys)) : IsUnion(properties) ? Union(FromUnion8(properties.anyOf, propertyKeys)) : IsObject3(properties) ? FromObject3(properties, propertyKeys) : Object2({});
2142
- }
2143
- function Omit(type, key, options) {
2144
- const typeKey = IsArray(key) ? UnionFromPropertyKeys(key) : key;
2145
- const propertyKeys = IsSchema(key) ? IndexPropertyKeys(key) : key;
2146
- const isTypeRef = IsRef(type);
2147
- const isKeyRef = IsRef(key);
2148
- 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 });
2149
- }
2150
-
2151
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-key.mjs
2152
- function FromPropertyKey2(type, key, options) {
2153
- return { [key]: Omit(type, [key], Clone(options)) };
2154
- }
2155
- function FromPropertyKeys2(type, propertyKeys, options) {
2156
- return propertyKeys.reduce((Acc, LK) => {
2157
- return { ...Acc, ...FromPropertyKey2(type, LK, options) };
2158
- }, {});
2159
- }
2160
- function FromMappedKey3(type, mappedKey, options) {
2161
- return FromPropertyKeys2(type, mappedKey.keys, options);
2162
- }
2163
- function OmitFromMappedKey(type, mappedKey, options) {
2164
- const properties = FromMappedKey3(type, mappedKey, options);
2165
- return MappedResult(properties);
2166
- }
2167
-
2168
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-result.mjs
2169
- function FromProperties14(properties, propertyKeys, options) {
2170
- const result = {};
2171
- for (const K2 of globalThis.Object.getOwnPropertyNames(properties))
2172
- result[K2] = Pick(properties[K2], propertyKeys, Clone(options));
2173
- return result;
2174
- }
2175
- function FromMappedResult10(mappedResult, propertyKeys, options) {
2176
- return FromProperties14(mappedResult.properties, propertyKeys, options);
2177
- }
2178
- function PickFromMappedResult(mappedResult, propertyKeys, options) {
2179
- const properties = FromMappedResult10(mappedResult, propertyKeys, options);
2180
- return MappedResult(properties);
2181
- }
2182
-
2183
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/pick/pick.mjs
2184
- function FromIntersect7(types, propertyKeys) {
2185
- return types.map((type) => PickResolve(type, propertyKeys));
2186
- }
2187
- function FromUnion9(types, propertyKeys) {
2188
- return types.map((type) => PickResolve(type, propertyKeys));
2189
- }
2190
- function FromProperties15(properties, propertyKeys) {
2191
- const result = {};
2192
- for (const K2 of propertyKeys)
2193
- if (K2 in properties)
2194
- result[K2] = properties[K2];
2195
- return result;
2196
- }
2197
- function FromObject4(T, K) {
2198
- const options = Discard(T, [TransformKind, "$id", "required", "properties"]);
2199
- const properties = FromProperties15(T["properties"], K);
2200
- return Object2(properties, options);
2201
- }
2202
- function UnionFromPropertyKeys2(propertyKeys) {
2203
- const result = propertyKeys.reduce((result2, key) => IsLiteralValue(key) ? [...result2, Literal(key)] : result2, []);
2204
- return Union(result);
2205
- }
2206
- function PickResolve(properties, propertyKeys) {
2207
- return IsIntersect(properties) ? Intersect(FromIntersect7(properties.allOf, propertyKeys)) : IsUnion(properties) ? Union(FromUnion9(properties.anyOf, propertyKeys)) : IsObject3(properties) ? FromObject4(properties, propertyKeys) : Object2({});
2208
- }
2209
- function Pick(type, key, options) {
2210
- const typeKey = IsArray(key) ? UnionFromPropertyKeys2(key) : key;
2211
- const propertyKeys = IsSchema(key) ? IndexPropertyKeys(key) : key;
2212
- const isTypeRef = IsRef(type);
2213
- const isKeyRef = IsRef(key);
2214
- 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 });
2215
- }
2216
-
2217
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-key.mjs
2218
- function FromPropertyKey3(type, key, options) {
2219
- return {
2220
- [key]: Pick(type, [key], Clone(options))
2221
- };
2222
- }
2223
- function FromPropertyKeys3(type, propertyKeys, options) {
2224
- return propertyKeys.reduce((result, leftKey) => {
2225
- return { ...result, ...FromPropertyKey3(type, leftKey, options) };
2226
- }, {});
2227
- }
2228
- function FromMappedKey4(type, mappedKey, options) {
2229
- return FromPropertyKeys3(type, mappedKey.keys, options);
2230
- }
2231
- function PickFromMappedKey(type, mappedKey, options) {
2232
- const properties = FromMappedKey4(type, mappedKey, options);
2233
- return MappedResult(properties);
2234
- }
2235
-
2236
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/partial/partial.mjs
2237
- function FromComputed3(target, parameters) {
2238
- return Computed("Partial", [Computed(target, parameters)]);
2239
- }
2240
- function FromRef3($ref) {
2241
- return Computed("Partial", [Ref($ref)]);
2242
- }
2243
- function FromProperties16(properties) {
2244
- const partialProperties = {};
2245
- for (const K of globalThis.Object.getOwnPropertyNames(properties))
2246
- partialProperties[K] = Optional(properties[K]);
2247
- return partialProperties;
2248
- }
2249
- function FromObject5(type) {
2250
- const options = Discard(type, [TransformKind, "$id", "required", "properties"]);
2251
- const properties = FromProperties16(type["properties"]);
2252
- return Object2(properties, options);
2253
- }
2254
- function FromRest6(types) {
2255
- return types.map((type) => PartialResolve(type));
2256
- }
2257
- function PartialResolve(type) {
2258
- return (
2259
- // Mappable
2260
- 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) : (
2261
- // Intrinsic
2262
- 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 : (
2263
- // Passthrough
2264
- Object2({})
2265
- )
2266
- )
2267
- );
2268
- }
2269
- function Partial(type, options) {
2270
- if (IsMappedResult(type)) {
2271
- return PartialFromMappedResult(type, options);
2272
- } else {
2273
- return CreateType({ ...PartialResolve(type), ...options });
2274
- }
2275
- }
2276
-
2277
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/partial/partial-from-mapped-result.mjs
2278
- function FromProperties17(K, options) {
2279
- const Acc = {};
2280
- for (const K2 of globalThis.Object.getOwnPropertyNames(K))
2281
- Acc[K2] = Partial(K[K2], Clone(options));
2282
- return Acc;
2283
- }
2284
- function FromMappedResult11(R, options) {
2285
- return FromProperties17(R.properties, options);
2286
- }
2287
- function PartialFromMappedResult(R, options) {
2288
- const P = FromMappedResult11(R, options);
2289
- return MappedResult(P);
2290
- }
2291
-
2292
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/required/required.mjs
2293
- function FromComputed4(target, parameters) {
2294
- return Computed("Required", [Computed(target, parameters)]);
2295
- }
2296
- function FromRef4($ref) {
2297
- return Computed("Required", [Ref($ref)]);
2298
- }
2299
- function FromProperties18(properties) {
2300
- const requiredProperties = {};
2301
- for (const K of globalThis.Object.getOwnPropertyNames(properties))
2302
- requiredProperties[K] = Discard(properties[K], [OptionalKind]);
2303
- return requiredProperties;
2304
- }
2305
- function FromObject6(type) {
2306
- const options = Discard(type, [TransformKind, "$id", "required", "properties"]);
2307
- const properties = FromProperties18(type["properties"]);
2308
- return Object2(properties, options);
2309
- }
2310
- function FromRest7(types) {
2311
- return types.map((type) => RequiredResolve(type));
2312
- }
2313
- function RequiredResolve(type) {
2314
- return (
2315
- // Mappable
2316
- 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) : (
2317
- // Intrinsic
2318
- 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 : (
2319
- // Passthrough
2320
- Object2({})
2321
- )
2322
- )
2323
- );
2324
- }
2325
- function Required(type, options) {
2326
- if (IsMappedResult(type)) {
2327
- return RequiredFromMappedResult(type, options);
2328
- } else {
2329
- return CreateType({ ...RequiredResolve(type), ...options });
2330
- }
2331
- }
2332
-
2333
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/required/required-from-mapped-result.mjs
2334
- function FromProperties19(P, options) {
2335
- const Acc = {};
2336
- for (const K2 of globalThis.Object.getOwnPropertyNames(P))
2337
- Acc[K2] = Required(P[K2], options);
2338
- return Acc;
2339
- }
2340
- function FromMappedResult12(R, options) {
2341
- return FromProperties19(R.properties, options);
2342
- }
2343
- function RequiredFromMappedResult(R, options) {
2344
- const P = FromMappedResult12(R, options);
2345
- return MappedResult(P);
2346
- }
2347
-
2348
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/module/compute.mjs
2349
- function DereferenceParameters(moduleProperties, types) {
2350
- return types.map((type) => {
2351
- return IsRef(type) ? Dereference(moduleProperties, type.$ref) : FromType2(moduleProperties, type);
2352
- });
2353
- }
2354
- function Dereference(moduleProperties, ref) {
2355
- return ref in moduleProperties ? IsRef(moduleProperties[ref]) ? Dereference(moduleProperties, moduleProperties[ref].$ref) : FromType2(moduleProperties, moduleProperties[ref]) : Never();
2356
- }
2357
- function FromAwaited(parameters) {
2358
- return Awaited(parameters[0]);
2359
- }
2360
- function FromIndex(parameters) {
2361
- return Index(parameters[0], parameters[1]);
2362
- }
2363
- function FromKeyOf(parameters) {
2364
- return KeyOf(parameters[0]);
2365
- }
2366
- function FromPartial(parameters) {
2367
- return Partial(parameters[0]);
2368
- }
2369
- function FromOmit(parameters) {
2370
- return Omit(parameters[0], parameters[1]);
2371
- }
2372
- function FromPick(parameters) {
2373
- return Pick(parameters[0], parameters[1]);
2374
- }
2375
- function FromRequired(parameters) {
2376
- return Required(parameters[0]);
2377
- }
2378
- function FromComputed5(moduleProperties, target, parameters) {
2379
- const dereferenced = DereferenceParameters(moduleProperties, parameters);
2380
- 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();
2381
- }
2382
- function FromArray6(moduleProperties, type) {
2383
- return Array2(FromType2(moduleProperties, type));
2384
- }
2385
- function FromAsyncIterator3(moduleProperties, type) {
2386
- return AsyncIterator(FromType2(moduleProperties, type));
2387
- }
2388
- function FromConstructor3(moduleProperties, parameters, instanceType) {
2389
- return Constructor(FromTypes2(moduleProperties, parameters), FromType2(moduleProperties, instanceType));
2390
- }
2391
- function FromFunction3(moduleProperties, parameters, returnType) {
2392
- return Function(FromTypes2(moduleProperties, parameters), FromType2(moduleProperties, returnType));
2393
- }
2394
- function FromIntersect8(moduleProperties, types) {
2395
- return Intersect(FromTypes2(moduleProperties, types));
2396
- }
2397
- function FromIterator3(moduleProperties, type) {
2398
- return Iterator(FromType2(moduleProperties, type));
2399
- }
2400
- function FromObject7(moduleProperties, properties) {
2401
- return Object2(globalThis.Object.keys(properties).reduce((result, key) => {
2402
- return { ...result, [key]: FromType2(moduleProperties, properties[key]) };
2403
- }, {}));
2404
- }
2405
- function FromRecord3(moduleProperties, type) {
2406
- const [value, pattern] = [FromType2(moduleProperties, RecordValue2(type)), RecordPattern(type)];
2407
- const result = CloneType(type);
2408
- result.patternProperties[pattern] = value;
2409
- return result;
2410
- }
2411
- function FromTransform(moduleProperties, transform) {
2412
- return IsRef(transform) ? { ...Dereference(moduleProperties, transform.$ref), [TransformKind]: transform[TransformKind] } : transform;
2413
- }
2414
- function FromTuple5(moduleProperties, types) {
2415
- return Tuple(FromTypes2(moduleProperties, types));
2416
- }
2417
- function FromUnion10(moduleProperties, types) {
2418
- return Union(FromTypes2(moduleProperties, types));
2419
- }
2420
- function FromTypes2(moduleProperties, types) {
2421
- return types.map((type) => FromType2(moduleProperties, type));
2422
- }
2423
- function FromType2(moduleProperties, type) {
2424
- return (
2425
- // Modifiers
2426
- IsOptional(type) ? CreateType(FromType2(moduleProperties, Discard(type, [OptionalKind])), type) : IsReadonly(type) ? CreateType(FromType2(moduleProperties, Discard(type, [ReadonlyKind])), type) : (
2427
- // Transform
2428
- IsTransform(type) ? CreateType(FromTransform(moduleProperties, type), type) : (
2429
- // Types
2430
- 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
2431
- )
2432
- )
2433
- );
2434
- }
2435
- function ComputeType(moduleProperties, key) {
2436
- return key in moduleProperties ? FromType2(moduleProperties, moduleProperties[key]) : Never();
2437
- }
2438
- function ComputeModuleProperties(moduleProperties) {
2439
- return globalThis.Object.getOwnPropertyNames(moduleProperties).reduce((result, key) => {
2440
- return { ...result, [key]: ComputeType(moduleProperties, key) };
2441
- }, {});
2442
- }
2443
-
2444
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/module/module.mjs
2445
- var TModule = class {
2446
- constructor($defs) {
2447
- const computed = ComputeModuleProperties($defs);
2448
- const identified = this.WithIdentifiers(computed);
2449
- this.$defs = identified;
2450
- }
2451
- /** `[Json]` Imports a Type by Key. */
2452
- Import(key, options) {
2453
- const $defs = { ...this.$defs, [key]: CreateType(this.$defs[key], options) };
2454
- return CreateType({ [Kind]: "Import", $defs, $ref: key });
2455
- }
2456
- // prettier-ignore
2457
- WithIdentifiers($defs) {
2458
- return globalThis.Object.getOwnPropertyNames($defs).reduce((result, key) => {
2459
- return { ...result, [key]: { ...$defs[key], $id: key } };
2460
- }, {});
2461
- }
2462
- };
2463
- function Module(properties) {
2464
- return new TModule(properties);
2465
- }
2466
-
2467
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/not/not.mjs
2468
- function Not(type, options) {
2469
- return CreateType({ [Kind]: "Not", not: type }, options);
2470
- }
2471
-
2472
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/parameters/parameters.mjs
2473
- function Parameters(schema, options) {
2474
- return IsFunction2(schema) ? Tuple(schema.parameters, options) : Never();
2475
- }
2476
-
2477
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/recursive/recursive.mjs
2478
- var Ordinal = 0;
2479
- function Recursive(callback, options = {}) {
2480
- if (IsUndefined(options.$id))
2481
- options.$id = `T${Ordinal++}`;
2482
- const thisType = CloneType(callback({ [Kind]: "This", $ref: `${options.$id}` }));
2483
- thisType.$id = options.$id;
2484
- return CreateType({ [Hint]: "Recursive", ...thisType }, options);
2485
- }
2486
-
2487
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/regexp/regexp.mjs
2488
- function RegExp2(unresolved, options) {
2489
- const expr = IsString(unresolved) ? new globalThis.RegExp(unresolved) : unresolved;
2490
- return CreateType({ [Kind]: "RegExp", type: "RegExp", source: expr.source, flags: expr.flags }, options);
2491
- }
2492
-
2493
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/rest/rest.mjs
2494
- function RestResolve(T) {
2495
- return IsIntersect(T) ? T.allOf : IsUnion(T) ? T.anyOf : IsTuple(T) ? T.items ?? [] : [];
2496
- }
2497
- function Rest(T) {
2498
- return RestResolve(T);
2499
- }
2500
-
2501
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/return-type/return-type.mjs
2502
- function ReturnType(schema, options) {
2503
- return IsFunction2(schema) ? CreateType(schema.returns, options) : Never(options);
2504
- }
2505
-
2506
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/transform/transform.mjs
2507
- var TransformDecodeBuilder = class {
2508
- constructor(schema) {
2509
- this.schema = schema;
2510
- }
2511
- Decode(decode) {
2512
- return new TransformEncodeBuilder(this.schema, decode);
2513
- }
2514
- };
2515
- var TransformEncodeBuilder = class {
2516
- constructor(schema, decode) {
2517
- this.schema = schema;
2518
- this.decode = decode;
2519
- }
2520
- EncodeTransform(encode, schema) {
2521
- const Encode = (value) => schema[TransformKind].Encode(encode(value));
2522
- const Decode = (value) => this.decode(schema[TransformKind].Decode(value));
2523
- const Codec = { Encode, Decode };
2524
- return { ...schema, [TransformKind]: Codec };
2525
- }
2526
- EncodeSchema(encode, schema) {
2527
- const Codec = { Decode: this.decode, Encode: encode };
2528
- return { ...schema, [TransformKind]: Codec };
2529
- }
2530
- Encode(encode) {
2531
- return IsTransform(this.schema) ? this.EncodeTransform(encode, this.schema) : this.EncodeSchema(encode, this.schema);
2532
- }
2533
- };
2534
- function Transform(schema) {
2535
- return new TransformDecodeBuilder(schema);
2536
- }
2537
-
2538
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/unsafe/unsafe.mjs
2539
- function Unsafe(options = {}) {
2540
- return CreateType({ [Kind]: options[Kind] ?? "Unsafe" }, options);
2541
- }
2542
-
2543
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/void/void.mjs
2544
- function Void(options) {
2545
- return CreateType({ [Kind]: "Void", type: "void" }, options);
2546
- }
2547
-
2548
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/type/type.mjs
2549
- var type_exports2 = {};
2550
- __export(type_exports2, {
2551
- Any: () => Any,
2552
- Argument: () => Argument,
2553
- Array: () => Array2,
2554
- AsyncIterator: () => AsyncIterator,
2555
- Awaited: () => Awaited,
2556
- BigInt: () => BigInt,
2557
- Boolean: () => Boolean,
2558
- Capitalize: () => Capitalize,
2559
- Composite: () => Composite,
2560
- Const: () => Const,
2561
- Constructor: () => Constructor,
2562
- ConstructorParameters: () => ConstructorParameters,
2563
- Date: () => Date2,
2564
- Enum: () => Enum,
2565
- Exclude: () => Exclude,
2566
- Extends: () => Extends,
2567
- Extract: () => Extract,
2568
- Function: () => Function,
2569
- Index: () => Index,
2570
- InstanceType: () => InstanceType,
2571
- Instantiate: () => Instantiate,
2572
- Integer: () => Integer,
2573
- Intersect: () => Intersect,
2574
- Iterator: () => Iterator,
2575
- KeyOf: () => KeyOf,
2576
- Literal: () => Literal,
2577
- Lowercase: () => Lowercase,
2578
- Mapped: () => Mapped,
2579
- Module: () => Module,
2580
- Never: () => Never,
2581
- Not: () => Not,
2582
- Null: () => Null,
2583
- Number: () => Number2,
2584
- Object: () => Object2,
2585
- Omit: () => Omit,
2586
- Optional: () => Optional,
2587
- Parameters: () => Parameters,
2588
- Partial: () => Partial,
2589
- Pick: () => Pick,
2590
- Promise: () => Promise2,
2591
- Readonly: () => Readonly,
2592
- ReadonlyOptional: () => ReadonlyOptional,
2593
- Record: () => Record,
2594
- Recursive: () => Recursive,
2595
- Ref: () => Ref,
2596
- RegExp: () => RegExp2,
2597
- Required: () => Required,
2598
- Rest: () => Rest,
2599
- ReturnType: () => ReturnType,
2600
- String: () => String,
2601
- Symbol: () => Symbol2,
2602
- TemplateLiteral: () => TemplateLiteral,
2603
- Transform: () => Transform,
2604
- Tuple: () => Tuple,
2605
- Uint8Array: () => Uint8Array2,
2606
- Uncapitalize: () => Uncapitalize,
2607
- Undefined: () => Undefined,
2608
- Union: () => Union,
2609
- Unknown: () => Unknown,
2610
- Unsafe: () => Unsafe,
2611
- Uppercase: () => Uppercase,
2612
- Void: () => Void
2613
- });
2614
-
2615
- // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/type/index.mjs
2616
- var Type = type_exports2;
2617
-
2618
- // src/lib/types/schemas.ts
2619
- var SuccessResponseSchema = (dataSchema) => Type.Object(
2620
- {
2621
- success: Type.Literal(true),
2622
- data: dataSchema,
2623
- message: Type.Optional(Type.String())
2624
- }
2625
- );
2626
- var ErrorResponseSchema = Type.Object(
2627
- {
2628
- success: Type.Literal(false),
2629
- error: Type.Object(
2630
- {
2631
- code: Type.String(),
2632
- message: Type.String(),
2633
- details: Type.Optional(Type.Any())
2634
- }
2635
- )
2636
- }
2637
- );
2638
- var ApiResponseSchema = (dataSchema) => Type.Union([
2639
- SuccessResponseSchema(dataSchema),
2640
- ErrorResponseSchema
2641
- ]);
2642
-
2643
- // src/lib/contracts/auth.ts
2644
- var EMAIL_PATTERN = "^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$";
2645
- var PHONE_PATTERN = "^\\+[1-9]\\d{1,14}$";
2646
- var FINGERPRINT_PATTERN = "^[a-f0-9]{64}$";
2647
- var UUID_PATTERN = "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$";
2648
- var BASE64_PATTERN = "^[A-Za-z0-9+/]+=*$";
2649
- var sendVerificationCodeContract = {
2650
- method: "POST",
2651
- path: "/_auth/codes",
2652
- body: Type.Object({
2653
- target: Type.String({
2654
- description: "Email address or phone number in E.164 format"
2655
- }),
2656
- targetType: Type.Union([
2657
- Type.Literal("email"),
2658
- Type.Literal("phone")
2659
- ], {
2660
- description: "Type of target (email or phone)"
2661
- }),
2662
- purpose: Type.Union([
2663
- Type.Literal("registration"),
2664
- Type.Literal("login"),
2665
- Type.Literal("password_reset")
2666
- ], {
2667
- description: "Purpose of verification"
2668
- })
2669
- }),
2670
- response: ApiResponseSchema(
2671
- Type.Object({
2672
- success: Type.Boolean(),
2673
- expiresAt: Type.String({ description: "ISO 8601 expiry time" })
2674
- })
2675
- )
2676
- };
2677
- var verifyCodeContract = {
2678
- method: "POST",
2679
- path: "/_auth/codes/verify",
2680
- body: Type.Object({
2681
- target: Type.String({
2682
- description: "Email address or phone number"
2683
- }),
2684
- targetType: Type.Union([
2685
- Type.Literal("email"),
2686
- Type.Literal("phone")
2687
- ]),
2688
- code: Type.String({
2689
- minLength: 6,
2690
- maxLength: 6,
2691
- pattern: "^[0-9]{6}$",
2692
- description: "6-digit verification code"
2693
- }),
2694
- purpose: Type.Union([
2695
- Type.Literal("registration"),
2696
- Type.Literal("login"),
2697
- Type.Literal("password_reset")
2698
- ])
2699
- }),
2700
- response: ApiResponseSchema(
2701
- Type.Object({
2702
- valid: Type.Boolean(),
2703
- verificationToken: Type.Optional(Type.String({
2704
- description: "Temporary token for completing registration (15min validity)"
2705
- }))
2706
- })
2707
- )
2708
- };
2709
- var checkAccountExistsContract = {
2710
- method: "POST",
2711
- path: "/_auth/exists",
2712
- body: Type.Object(
2713
- {
2714
- email: Type.Optional(Type.String({
2715
- pattern: EMAIL_PATTERN,
2716
- description: "Email address to check"
2717
- })),
2718
- phone: Type.Optional(Type.String({
2719
- pattern: PHONE_PATTERN,
2720
- description: "Phone number in E.164 format (e.g., +821012345678)"
2721
- }))
2722
- },
2723
- {
2724
- minProperties: 1,
2725
- description: "At least one of email or phone must be provided"
2726
- }
2727
- ),
2728
- response: ApiResponseSchema(
2729
- Type.Object(
2730
- {
2731
- exists: Type.Boolean({ description: "Whether the account exists" }),
2732
- identifier: Type.String({ description: "The identifier that was checked" }),
2733
- identifierType: Type.Union([
2734
- Type.Literal("email"),
2735
- Type.Literal("phone")
2736
- ], { description: "Type of identifier checked" })
2737
- }
2738
- )
2739
- )
2740
- };
2741
- var registerContract = {
2742
- method: "POST",
2743
- path: "/_auth/register",
2744
- body: Type.Object({
2745
- email: Type.Optional(Type.String({
2746
- pattern: EMAIL_PATTERN,
2747
- description: "Email address"
2748
- })),
2749
- phone: Type.Optional(Type.String({
2750
- pattern: PHONE_PATTERN,
2751
- description: "Phone number in E.164 format"
2752
- })),
2753
- verificationToken: Type.String({
2754
- description: "Verification token obtained from /verify-code endpoint"
2755
- }),
2756
- password: Type.String({
2757
- minLength: 8,
2758
- description: "User password (minimum 8 characters)"
2759
- }),
2760
- publicKey: Type.String({
2761
- pattern: BASE64_PATTERN,
2762
- description: "Base64 encoded DER public key (SPKI format)"
2763
- }),
2764
- keyId: Type.String({
2765
- pattern: UUID_PATTERN,
2766
- description: "Client-generated UUID v4 key identifier"
2767
- }),
2768
- fingerprint: Type.String({
2769
- pattern: FINGERPRINT_PATTERN,
2770
- description: "SHA-256 fingerprint of public key (64 hex characters)"
2771
- }),
2772
- algorithm: Type.Union([
2773
- Type.Literal("ES256"),
2774
- Type.Literal("RS256")
2775
- ], {
2776
- description: "Signing algorithm (ES256 recommended, RS256 for compatibility)"
2777
- }),
2778
- keySize: Type.Optional(Type.Number({
2779
- description: "Key size in bytes"
2780
- }))
2781
- }, {
2782
- minProperties: 6,
2783
- // email/phone + verificationToken + password + publicKey + keyId + fingerprint
2784
- description: "Email or phone must be provided with verification token"
2785
- }),
2786
- response: ApiResponseSchema(
2787
- Type.Object({
2788
- userId: Type.String(),
2789
- email: Type.Optional(Type.String()),
2790
- phone: Type.Optional(Type.String())
2791
- })
2792
- )
2793
- };
2794
- var loginContract = {
2795
- method: "POST",
2796
- path: "/_auth/login",
2797
- body: Type.Object({
2798
- email: Type.Optional(Type.String({
2799
- pattern: EMAIL_PATTERN,
2800
- description: "Email address"
2801
- })),
2802
- phone: Type.Optional(Type.String({
2803
- pattern: PHONE_PATTERN,
2804
- description: "Phone number in E.164 format"
2805
- })),
2806
- password: Type.String({
2807
- minLength: 1,
2808
- description: "User password"
2809
- }),
2810
- publicKey: Type.String({
2811
- pattern: BASE64_PATTERN,
2812
- description: "Base64 encoded DER public key (SPKI format)"
2813
- }),
2814
- keyId: Type.String({
2815
- pattern: UUID_PATTERN,
2816
- description: "Client-generated UUID v4 key identifier"
2817
- }),
2818
- fingerprint: Type.String({
2819
- pattern: FINGERPRINT_PATTERN,
2820
- description: "SHA-256 fingerprint of public key (64 hex characters)"
2821
- }),
2822
- oldKeyId: Type.Optional(Type.String({
2823
- pattern: UUID_PATTERN,
2824
- description: "Previous key ID to revoke (server-side cleanup)"
2825
- })),
2826
- algorithm: Type.Union([
2827
- Type.Literal("ES256"),
2828
- Type.Literal("RS256")
2829
- ], {
2830
- description: "Signing algorithm (ES256 recommended, RS256 for compatibility)"
2831
- }),
2832
- keySize: Type.Optional(Type.Number({
2833
- description: "Key size in bytes"
2834
- }))
2835
- }, {
2836
- minProperties: 5,
2837
- // email/phone + password + publicKey + keyId + fingerprint
2838
- description: "Email or phone must be provided along with key data"
2839
- }),
2840
- response: ApiResponseSchema(
2841
- Type.Object({
2842
- userId: Type.String(),
2843
- email: Type.Optional(Type.String()),
2844
- phone: Type.Optional(Type.String()),
2845
- passwordChangeRequired: Type.Boolean({
2846
- description: "Whether user must change password before proceeding"
2847
- })
2848
- })
2849
- )
2850
- };
2851
- var logoutContract = {
2852
- method: "POST",
2853
- path: "/_auth/logout",
2854
- body: Type.Object({}),
2855
- response: ApiResponseSchema(
2856
- Type.Object({
2857
- success: Type.Boolean()
2858
- })
2859
- )
2860
- };
2861
- var rotateKeyContract = {
2862
- method: "POST",
2863
- path: "/_auth/keys/rotate",
2864
- body: Type.Object({
2865
- publicKey: Type.String({
2866
- pattern: BASE64_PATTERN,
2867
- description: "Base64 encoded DER public key (SPKI format)"
2868
- }),
2869
- keyId: Type.String({
2870
- pattern: UUID_PATTERN,
2871
- description: "Client-generated UUID v4 key identifier"
2872
- }),
2873
- fingerprint: Type.String({
2874
- pattern: FINGERPRINT_PATTERN,
2875
- description: "SHA-256 fingerprint of public key (64 hex characters)"
2876
- }),
2877
- algorithm: Type.Union([
2878
- Type.Literal("ES256"),
2879
- Type.Literal("RS256")
2880
- ], {
2881
- description: "Signing algorithm (ES256 recommended, RS256 for compatibility)"
2882
- }),
2883
- keySize: Type.Optional(Type.Number({
2884
- description: "Key size in bytes"
2885
- }))
2886
- }),
2887
- response: ApiResponseSchema(
2888
- Type.Object({
2889
- success: Type.Boolean(),
2890
- keyId: Type.String()
2891
- })
2892
- )
2893
- };
2894
- var changePasswordContract = {
2895
- method: "PUT",
2896
- path: "/_auth/password",
2897
- body: Type.Object({
2898
- currentPassword: Type.String({
2899
- minLength: 1,
2900
- description: "Current password for verification"
2901
- }),
2902
- newPassword: Type.String({
2903
- minLength: 8,
2904
- description: "New password (minimum 8 characters)"
2905
- })
2906
- }),
2907
- response: ApiResponseSchema(
2908
- Type.Object({
2909
- success: Type.Boolean({ description: "Whether password was changed successfully" })
2910
- })
2911
- )
2912
- };
2913
- var getMeContract = {
2914
- method: "GET",
2915
- path: "/_auth/me",
2916
- body: Type.Object({}),
2917
- response: ApiResponseSchema(
2918
- Type.Object({
2919
- userId: Type.String({ description: "User ID" }),
2920
- email: Type.Optional(Type.String({ description: "User email address" })),
2921
- phone: Type.Optional(Type.String({ description: "User phone number" })),
2922
- role: Type.Object({
2923
- id: Type.Number({ description: "Role ID" }),
2924
- name: Type.String({ description: "Role name (e.g., user, admin)" }),
2925
- displayName: Type.String({ description: "Display name for UI" }),
2926
- priority: Type.Number({ description: "Role priority level" })
2927
- }, { description: "User role information" }),
2928
- permissions: Type.Array(
2929
- Type.Object({
2930
- id: Type.Number({ description: "Permission ID" }),
2931
- name: Type.String({ description: "Permission name (e.g., user:delete)" }),
2932
- displayName: Type.String({ description: "Display name for UI" }),
2933
- category: Type.Optional(Type.String({ description: "Permission category" }))
2934
- }),
2935
- { description: "List of permissions granted through role" }
2936
- )
2937
- })
2938
- )
2939
- };
2940
- export {
2941
- changePasswordContract,
2942
- checkAccountExistsContract,
2943
- getMeContract,
2944
- loginContract,
2945
- logoutContract,
2946
- registerContract,
2947
- rotateKeyContract,
2948
- sendVerificationCodeContract,
2949
- verifyCodeContract
2950
- };
2951
- //# sourceMappingURL=auth.js.map