@kevisual/router 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.js +774 -281
- package/dist/commander.d.ts +9 -11
- package/dist/commander.js +562 -15
- package/dist/opencode.d.ts +0 -8
- package/dist/opencode.js +567 -84
- package/dist/router-browser.d.ts +0 -8
- package/dist/router-browser.js +18868 -275
- package/dist/router-define.d.ts +0 -8
- package/dist/router-simple.js +16 -2
- package/dist/router.d.ts +0 -8
- package/dist/router.js +752 -259
- package/dist/ws.d.ts +0 -8
- package/dist/ws.js +49 -24
- package/package.json +13 -8
- package/src/app.ts +1 -1
- package/src/commander.ts +71 -10
- package/src/route.ts +6 -15
- package/src/utils/random.ts +11 -2
package/dist/app.js
CHANGED
|
@@ -4,30 +4,48 @@ var __getProtoOf = Object.getPrototypeOf;
|
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
function __accessProp(key) {
|
|
8
|
+
return this[key];
|
|
9
|
+
}
|
|
10
|
+
var __toESMCache_node;
|
|
11
|
+
var __toESMCache_esm;
|
|
7
12
|
var __toESM = (mod, isNodeMode, target) => {
|
|
13
|
+
var canCache = mod != null && typeof mod === "object";
|
|
14
|
+
if (canCache) {
|
|
15
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
16
|
+
var cached = cache.get(mod);
|
|
17
|
+
if (cached)
|
|
18
|
+
return cached;
|
|
19
|
+
}
|
|
8
20
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
9
21
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
10
22
|
for (let key of __getOwnPropNames(mod))
|
|
11
23
|
if (!__hasOwnProp.call(to, key))
|
|
12
24
|
__defProp(to, key, {
|
|
13
|
-
get: (
|
|
25
|
+
get: __accessProp.bind(mod, key),
|
|
14
26
|
enumerable: true
|
|
15
27
|
});
|
|
28
|
+
if (canCache)
|
|
29
|
+
cache.set(mod, to);
|
|
16
30
|
return to;
|
|
17
31
|
};
|
|
18
32
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
33
|
+
var __returnValue = (v) => v;
|
|
34
|
+
function __exportSetter(name, newValue) {
|
|
35
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
36
|
+
}
|
|
19
37
|
var __export = (target, all) => {
|
|
20
38
|
for (var name in all)
|
|
21
39
|
__defProp(target, name, {
|
|
22
40
|
get: all[name],
|
|
23
41
|
enumerable: true,
|
|
24
42
|
configurable: true,
|
|
25
|
-
set: (
|
|
43
|
+
set: __exportSetter.bind(all, name)
|
|
26
44
|
});
|
|
27
45
|
};
|
|
28
46
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
29
47
|
|
|
30
|
-
// node_modules/.pnpm/eventemitter3@5.0.4/node_modules/eventemitter3/index.js
|
|
48
|
+
// ../../node_modules/.pnpm/eventemitter3@5.0.4/node_modules/eventemitter3/index.js
|
|
31
49
|
var require_eventemitter3 = __commonJS((exports, module) => {
|
|
32
50
|
var has = Object.prototype.hasOwnProperty;
|
|
33
51
|
var prefix = "~";
|
|
@@ -205,7 +223,469 @@ var require_eventemitter3 = __commonJS((exports, module) => {
|
|
|
205
223
|
}
|
|
206
224
|
});
|
|
207
225
|
|
|
208
|
-
// node_modules/.pnpm
|
|
226
|
+
// ../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/core.js
|
|
227
|
+
var require_core = __commonJS((exports, module) => {
|
|
228
|
+
(function(root, factory) {
|
|
229
|
+
if (typeof exports === "object") {
|
|
230
|
+
module.exports = exports = factory();
|
|
231
|
+
} else if (typeof define === "function" && define.amd) {
|
|
232
|
+
define([], factory);
|
|
233
|
+
} else {
|
|
234
|
+
root.CryptoJS = factory();
|
|
235
|
+
}
|
|
236
|
+
})(exports, function() {
|
|
237
|
+
var CryptoJS = CryptoJS || function(Math2, undefined2) {
|
|
238
|
+
var crypto2;
|
|
239
|
+
if (typeof window !== "undefined" && window.crypto) {
|
|
240
|
+
crypto2 = window.crypto;
|
|
241
|
+
}
|
|
242
|
+
if (typeof self !== "undefined" && self.crypto) {
|
|
243
|
+
crypto2 = self.crypto;
|
|
244
|
+
}
|
|
245
|
+
if (typeof globalThis !== "undefined" && globalThis.crypto) {
|
|
246
|
+
crypto2 = globalThis.crypto;
|
|
247
|
+
}
|
|
248
|
+
if (!crypto2 && typeof window !== "undefined" && window.msCrypto) {
|
|
249
|
+
crypto2 = window.msCrypto;
|
|
250
|
+
}
|
|
251
|
+
if (!crypto2 && typeof global !== "undefined" && global.crypto) {
|
|
252
|
+
crypto2 = global.crypto;
|
|
253
|
+
}
|
|
254
|
+
if (!crypto2 && true) {
|
|
255
|
+
try {
|
|
256
|
+
crypto2 = __require("crypto");
|
|
257
|
+
} catch (err) {}
|
|
258
|
+
}
|
|
259
|
+
var cryptoSecureRandomInt = function() {
|
|
260
|
+
if (crypto2) {
|
|
261
|
+
if (typeof crypto2.getRandomValues === "function") {
|
|
262
|
+
try {
|
|
263
|
+
return crypto2.getRandomValues(new Uint32Array(1))[0];
|
|
264
|
+
} catch (err) {}
|
|
265
|
+
}
|
|
266
|
+
if (typeof crypto2.randomBytes === "function") {
|
|
267
|
+
try {
|
|
268
|
+
return crypto2.randomBytes(4).readInt32LE();
|
|
269
|
+
} catch (err) {}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
throw new Error("Native crypto module could not be used to get secure random number.");
|
|
273
|
+
};
|
|
274
|
+
var create = Object.create || function() {
|
|
275
|
+
function F() {}
|
|
276
|
+
return function(obj) {
|
|
277
|
+
var subtype;
|
|
278
|
+
F.prototype = obj;
|
|
279
|
+
subtype = new F;
|
|
280
|
+
F.prototype = null;
|
|
281
|
+
return subtype;
|
|
282
|
+
};
|
|
283
|
+
}();
|
|
284
|
+
var C = {};
|
|
285
|
+
var C_lib = C.lib = {};
|
|
286
|
+
var Base = C_lib.Base = function() {
|
|
287
|
+
return {
|
|
288
|
+
extend: function(overrides) {
|
|
289
|
+
var subtype = create(this);
|
|
290
|
+
if (overrides) {
|
|
291
|
+
subtype.mixIn(overrides);
|
|
292
|
+
}
|
|
293
|
+
if (!subtype.hasOwnProperty("init") || this.init === subtype.init) {
|
|
294
|
+
subtype.init = function() {
|
|
295
|
+
subtype.$super.init.apply(this, arguments);
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
subtype.init.prototype = subtype;
|
|
299
|
+
subtype.$super = this;
|
|
300
|
+
return subtype;
|
|
301
|
+
},
|
|
302
|
+
create: function() {
|
|
303
|
+
var instance = this.extend();
|
|
304
|
+
instance.init.apply(instance, arguments);
|
|
305
|
+
return instance;
|
|
306
|
+
},
|
|
307
|
+
init: function() {},
|
|
308
|
+
mixIn: function(properties) {
|
|
309
|
+
for (var propertyName in properties) {
|
|
310
|
+
if (properties.hasOwnProperty(propertyName)) {
|
|
311
|
+
this[propertyName] = properties[propertyName];
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
if (properties.hasOwnProperty("toString")) {
|
|
315
|
+
this.toString = properties.toString;
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
clone: function() {
|
|
319
|
+
return this.init.prototype.extend(this);
|
|
320
|
+
}
|
|
321
|
+
};
|
|
322
|
+
}();
|
|
323
|
+
var WordArray = C_lib.WordArray = Base.extend({
|
|
324
|
+
init: function(words2, sigBytes) {
|
|
325
|
+
words2 = this.words = words2 || [];
|
|
326
|
+
if (sigBytes != undefined2) {
|
|
327
|
+
this.sigBytes = sigBytes;
|
|
328
|
+
} else {
|
|
329
|
+
this.sigBytes = words2.length * 4;
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
toString: function(encoder) {
|
|
333
|
+
return (encoder || Hex).stringify(this);
|
|
334
|
+
},
|
|
335
|
+
concat: function(wordArray) {
|
|
336
|
+
var thisWords = this.words;
|
|
337
|
+
var thatWords = wordArray.words;
|
|
338
|
+
var thisSigBytes = this.sigBytes;
|
|
339
|
+
var thatSigBytes = wordArray.sigBytes;
|
|
340
|
+
this.clamp();
|
|
341
|
+
if (thisSigBytes % 4) {
|
|
342
|
+
for (var i = 0;i < thatSigBytes; i++) {
|
|
343
|
+
var thatByte = thatWords[i >>> 2] >>> 24 - i % 4 * 8 & 255;
|
|
344
|
+
thisWords[thisSigBytes + i >>> 2] |= thatByte << 24 - (thisSigBytes + i) % 4 * 8;
|
|
345
|
+
}
|
|
346
|
+
} else {
|
|
347
|
+
for (var j = 0;j < thatSigBytes; j += 4) {
|
|
348
|
+
thisWords[thisSigBytes + j >>> 2] = thatWords[j >>> 2];
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
this.sigBytes += thatSigBytes;
|
|
352
|
+
return this;
|
|
353
|
+
},
|
|
354
|
+
clamp: function() {
|
|
355
|
+
var words2 = this.words;
|
|
356
|
+
var sigBytes = this.sigBytes;
|
|
357
|
+
words2[sigBytes >>> 2] &= 4294967295 << 32 - sigBytes % 4 * 8;
|
|
358
|
+
words2.length = Math2.ceil(sigBytes / 4);
|
|
359
|
+
},
|
|
360
|
+
clone: function() {
|
|
361
|
+
var clone3 = Base.clone.call(this);
|
|
362
|
+
clone3.words = this.words.slice(0);
|
|
363
|
+
return clone3;
|
|
364
|
+
},
|
|
365
|
+
random: function(nBytes) {
|
|
366
|
+
var words2 = [];
|
|
367
|
+
for (var i = 0;i < nBytes; i += 4) {
|
|
368
|
+
words2.push(cryptoSecureRandomInt());
|
|
369
|
+
}
|
|
370
|
+
return new WordArray.init(words2, nBytes);
|
|
371
|
+
}
|
|
372
|
+
});
|
|
373
|
+
var C_enc = C.enc = {};
|
|
374
|
+
var Hex = C_enc.Hex = {
|
|
375
|
+
stringify: function(wordArray) {
|
|
376
|
+
var words2 = wordArray.words;
|
|
377
|
+
var sigBytes = wordArray.sigBytes;
|
|
378
|
+
var hexChars = [];
|
|
379
|
+
for (var i = 0;i < sigBytes; i++) {
|
|
380
|
+
var bite = words2[i >>> 2] >>> 24 - i % 4 * 8 & 255;
|
|
381
|
+
hexChars.push((bite >>> 4).toString(16));
|
|
382
|
+
hexChars.push((bite & 15).toString(16));
|
|
383
|
+
}
|
|
384
|
+
return hexChars.join("");
|
|
385
|
+
},
|
|
386
|
+
parse: function(hexStr) {
|
|
387
|
+
var hexStrLength = hexStr.length;
|
|
388
|
+
var words2 = [];
|
|
389
|
+
for (var i = 0;i < hexStrLength; i += 2) {
|
|
390
|
+
words2[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << 24 - i % 8 * 4;
|
|
391
|
+
}
|
|
392
|
+
return new WordArray.init(words2, hexStrLength / 2);
|
|
393
|
+
}
|
|
394
|
+
};
|
|
395
|
+
var Latin1 = C_enc.Latin1 = {
|
|
396
|
+
stringify: function(wordArray) {
|
|
397
|
+
var words2 = wordArray.words;
|
|
398
|
+
var sigBytes = wordArray.sigBytes;
|
|
399
|
+
var latin1Chars = [];
|
|
400
|
+
for (var i = 0;i < sigBytes; i++) {
|
|
401
|
+
var bite = words2[i >>> 2] >>> 24 - i % 4 * 8 & 255;
|
|
402
|
+
latin1Chars.push(String.fromCharCode(bite));
|
|
403
|
+
}
|
|
404
|
+
return latin1Chars.join("");
|
|
405
|
+
},
|
|
406
|
+
parse: function(latin1Str) {
|
|
407
|
+
var latin1StrLength = latin1Str.length;
|
|
408
|
+
var words2 = [];
|
|
409
|
+
for (var i = 0;i < latin1StrLength; i++) {
|
|
410
|
+
words2[i >>> 2] |= (latin1Str.charCodeAt(i) & 255) << 24 - i % 4 * 8;
|
|
411
|
+
}
|
|
412
|
+
return new WordArray.init(words2, latin1StrLength);
|
|
413
|
+
}
|
|
414
|
+
};
|
|
415
|
+
var Utf8 = C_enc.Utf8 = {
|
|
416
|
+
stringify: function(wordArray) {
|
|
417
|
+
try {
|
|
418
|
+
return decodeURIComponent(escape(Latin1.stringify(wordArray)));
|
|
419
|
+
} catch (e) {
|
|
420
|
+
throw new Error("Malformed UTF-8 data");
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
parse: function(utf8Str) {
|
|
424
|
+
return Latin1.parse(unescape(encodeURIComponent(utf8Str)));
|
|
425
|
+
}
|
|
426
|
+
};
|
|
427
|
+
var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({
|
|
428
|
+
reset: function() {
|
|
429
|
+
this._data = new WordArray.init;
|
|
430
|
+
this._nDataBytes = 0;
|
|
431
|
+
},
|
|
432
|
+
_append: function(data) {
|
|
433
|
+
if (typeof data == "string") {
|
|
434
|
+
data = Utf8.parse(data);
|
|
435
|
+
}
|
|
436
|
+
this._data.concat(data);
|
|
437
|
+
this._nDataBytes += data.sigBytes;
|
|
438
|
+
},
|
|
439
|
+
_process: function(doFlush) {
|
|
440
|
+
var processedWords;
|
|
441
|
+
var data = this._data;
|
|
442
|
+
var dataWords = data.words;
|
|
443
|
+
var dataSigBytes = data.sigBytes;
|
|
444
|
+
var blockSize = this.blockSize;
|
|
445
|
+
var blockSizeBytes = blockSize * 4;
|
|
446
|
+
var nBlocksReady = dataSigBytes / blockSizeBytes;
|
|
447
|
+
if (doFlush) {
|
|
448
|
+
nBlocksReady = Math2.ceil(nBlocksReady);
|
|
449
|
+
} else {
|
|
450
|
+
nBlocksReady = Math2.max((nBlocksReady | 0) - this._minBufferSize, 0);
|
|
451
|
+
}
|
|
452
|
+
var nWordsReady = nBlocksReady * blockSize;
|
|
453
|
+
var nBytesReady = Math2.min(nWordsReady * 4, dataSigBytes);
|
|
454
|
+
if (nWordsReady) {
|
|
455
|
+
for (var offset = 0;offset < nWordsReady; offset += blockSize) {
|
|
456
|
+
this._doProcessBlock(dataWords, offset);
|
|
457
|
+
}
|
|
458
|
+
processedWords = dataWords.splice(0, nWordsReady);
|
|
459
|
+
data.sigBytes -= nBytesReady;
|
|
460
|
+
}
|
|
461
|
+
return new WordArray.init(processedWords, nBytesReady);
|
|
462
|
+
},
|
|
463
|
+
clone: function() {
|
|
464
|
+
var clone3 = Base.clone.call(this);
|
|
465
|
+
clone3._data = this._data.clone();
|
|
466
|
+
return clone3;
|
|
467
|
+
},
|
|
468
|
+
_minBufferSize: 0
|
|
469
|
+
});
|
|
470
|
+
var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({
|
|
471
|
+
cfg: Base.extend(),
|
|
472
|
+
init: function(cfg) {
|
|
473
|
+
this.cfg = this.cfg.extend(cfg);
|
|
474
|
+
this.reset();
|
|
475
|
+
},
|
|
476
|
+
reset: function() {
|
|
477
|
+
BufferedBlockAlgorithm.reset.call(this);
|
|
478
|
+
this._doReset();
|
|
479
|
+
},
|
|
480
|
+
update: function(messageUpdate) {
|
|
481
|
+
this._append(messageUpdate);
|
|
482
|
+
this._process();
|
|
483
|
+
return this;
|
|
484
|
+
},
|
|
485
|
+
finalize: function(messageUpdate) {
|
|
486
|
+
if (messageUpdate) {
|
|
487
|
+
this._append(messageUpdate);
|
|
488
|
+
}
|
|
489
|
+
var hash2 = this._doFinalize();
|
|
490
|
+
return hash2;
|
|
491
|
+
},
|
|
492
|
+
blockSize: 512 / 32,
|
|
493
|
+
_createHelper: function(hasher) {
|
|
494
|
+
return function(message, cfg) {
|
|
495
|
+
return new hasher.init(cfg).finalize(message);
|
|
496
|
+
};
|
|
497
|
+
},
|
|
498
|
+
_createHmacHelper: function(hasher) {
|
|
499
|
+
return function(message, key) {
|
|
500
|
+
return new C_algo.HMAC.init(hasher, key).finalize(message);
|
|
501
|
+
};
|
|
502
|
+
}
|
|
503
|
+
});
|
|
504
|
+
var C_algo = C.algo = {};
|
|
505
|
+
return C;
|
|
506
|
+
}(Math);
|
|
507
|
+
return CryptoJS;
|
|
508
|
+
});
|
|
509
|
+
});
|
|
510
|
+
|
|
511
|
+
// ../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/md5.js
|
|
512
|
+
var require_md5 = __commonJS((exports, module) => {
|
|
513
|
+
(function(root, factory) {
|
|
514
|
+
if (typeof exports === "object") {
|
|
515
|
+
module.exports = exports = factory(require_core());
|
|
516
|
+
} else if (typeof define === "function" && define.amd) {
|
|
517
|
+
define(["./core"], factory);
|
|
518
|
+
} else {
|
|
519
|
+
factory(root.CryptoJS);
|
|
520
|
+
}
|
|
521
|
+
})(exports, function(CryptoJS) {
|
|
522
|
+
(function(Math2) {
|
|
523
|
+
var C = CryptoJS;
|
|
524
|
+
var C_lib = C.lib;
|
|
525
|
+
var WordArray = C_lib.WordArray;
|
|
526
|
+
var Hasher = C_lib.Hasher;
|
|
527
|
+
var C_algo = C.algo;
|
|
528
|
+
var T = [];
|
|
529
|
+
(function() {
|
|
530
|
+
for (var i = 0;i < 64; i++) {
|
|
531
|
+
T[i] = Math2.abs(Math2.sin(i + 1)) * 4294967296 | 0;
|
|
532
|
+
}
|
|
533
|
+
})();
|
|
534
|
+
var MD5 = C_algo.MD5 = Hasher.extend({
|
|
535
|
+
_doReset: function() {
|
|
536
|
+
this._hash = new WordArray.init([
|
|
537
|
+
1732584193,
|
|
538
|
+
4023233417,
|
|
539
|
+
2562383102,
|
|
540
|
+
271733878
|
|
541
|
+
]);
|
|
542
|
+
},
|
|
543
|
+
_doProcessBlock: function(M, offset) {
|
|
544
|
+
for (var i = 0;i < 16; i++) {
|
|
545
|
+
var offset_i = offset + i;
|
|
546
|
+
var M_offset_i = M[offset_i];
|
|
547
|
+
M[offset_i] = (M_offset_i << 8 | M_offset_i >>> 24) & 16711935 | (M_offset_i << 24 | M_offset_i >>> 8) & 4278255360;
|
|
548
|
+
}
|
|
549
|
+
var H = this._hash.words;
|
|
550
|
+
var M_offset_0 = M[offset + 0];
|
|
551
|
+
var M_offset_1 = M[offset + 1];
|
|
552
|
+
var M_offset_2 = M[offset + 2];
|
|
553
|
+
var M_offset_3 = M[offset + 3];
|
|
554
|
+
var M_offset_4 = M[offset + 4];
|
|
555
|
+
var M_offset_5 = M[offset + 5];
|
|
556
|
+
var M_offset_6 = M[offset + 6];
|
|
557
|
+
var M_offset_7 = M[offset + 7];
|
|
558
|
+
var M_offset_8 = M[offset + 8];
|
|
559
|
+
var M_offset_9 = M[offset + 9];
|
|
560
|
+
var M_offset_10 = M[offset + 10];
|
|
561
|
+
var M_offset_11 = M[offset + 11];
|
|
562
|
+
var M_offset_12 = M[offset + 12];
|
|
563
|
+
var M_offset_13 = M[offset + 13];
|
|
564
|
+
var M_offset_14 = M[offset + 14];
|
|
565
|
+
var M_offset_15 = M[offset + 15];
|
|
566
|
+
var a = H[0];
|
|
567
|
+
var b = H[1];
|
|
568
|
+
var c = H[2];
|
|
569
|
+
var d = H[3];
|
|
570
|
+
a = FF(a, b, c, d, M_offset_0, 7, T[0]);
|
|
571
|
+
d = FF(d, a, b, c, M_offset_1, 12, T[1]);
|
|
572
|
+
c = FF(c, d, a, b, M_offset_2, 17, T[2]);
|
|
573
|
+
b = FF(b, c, d, a, M_offset_3, 22, T[3]);
|
|
574
|
+
a = FF(a, b, c, d, M_offset_4, 7, T[4]);
|
|
575
|
+
d = FF(d, a, b, c, M_offset_5, 12, T[5]);
|
|
576
|
+
c = FF(c, d, a, b, M_offset_6, 17, T[6]);
|
|
577
|
+
b = FF(b, c, d, a, M_offset_7, 22, T[7]);
|
|
578
|
+
a = FF(a, b, c, d, M_offset_8, 7, T[8]);
|
|
579
|
+
d = FF(d, a, b, c, M_offset_9, 12, T[9]);
|
|
580
|
+
c = FF(c, d, a, b, M_offset_10, 17, T[10]);
|
|
581
|
+
b = FF(b, c, d, a, M_offset_11, 22, T[11]);
|
|
582
|
+
a = FF(a, b, c, d, M_offset_12, 7, T[12]);
|
|
583
|
+
d = FF(d, a, b, c, M_offset_13, 12, T[13]);
|
|
584
|
+
c = FF(c, d, a, b, M_offset_14, 17, T[14]);
|
|
585
|
+
b = FF(b, c, d, a, M_offset_15, 22, T[15]);
|
|
586
|
+
a = GG(a, b, c, d, M_offset_1, 5, T[16]);
|
|
587
|
+
d = GG(d, a, b, c, M_offset_6, 9, T[17]);
|
|
588
|
+
c = GG(c, d, a, b, M_offset_11, 14, T[18]);
|
|
589
|
+
b = GG(b, c, d, a, M_offset_0, 20, T[19]);
|
|
590
|
+
a = GG(a, b, c, d, M_offset_5, 5, T[20]);
|
|
591
|
+
d = GG(d, a, b, c, M_offset_10, 9, T[21]);
|
|
592
|
+
c = GG(c, d, a, b, M_offset_15, 14, T[22]);
|
|
593
|
+
b = GG(b, c, d, a, M_offset_4, 20, T[23]);
|
|
594
|
+
a = GG(a, b, c, d, M_offset_9, 5, T[24]);
|
|
595
|
+
d = GG(d, a, b, c, M_offset_14, 9, T[25]);
|
|
596
|
+
c = GG(c, d, a, b, M_offset_3, 14, T[26]);
|
|
597
|
+
b = GG(b, c, d, a, M_offset_8, 20, T[27]);
|
|
598
|
+
a = GG(a, b, c, d, M_offset_13, 5, T[28]);
|
|
599
|
+
d = GG(d, a, b, c, M_offset_2, 9, T[29]);
|
|
600
|
+
c = GG(c, d, a, b, M_offset_7, 14, T[30]);
|
|
601
|
+
b = GG(b, c, d, a, M_offset_12, 20, T[31]);
|
|
602
|
+
a = HH(a, b, c, d, M_offset_5, 4, T[32]);
|
|
603
|
+
d = HH(d, a, b, c, M_offset_8, 11, T[33]);
|
|
604
|
+
c = HH(c, d, a, b, M_offset_11, 16, T[34]);
|
|
605
|
+
b = HH(b, c, d, a, M_offset_14, 23, T[35]);
|
|
606
|
+
a = HH(a, b, c, d, M_offset_1, 4, T[36]);
|
|
607
|
+
d = HH(d, a, b, c, M_offset_4, 11, T[37]);
|
|
608
|
+
c = HH(c, d, a, b, M_offset_7, 16, T[38]);
|
|
609
|
+
b = HH(b, c, d, a, M_offset_10, 23, T[39]);
|
|
610
|
+
a = HH(a, b, c, d, M_offset_13, 4, T[40]);
|
|
611
|
+
d = HH(d, a, b, c, M_offset_0, 11, T[41]);
|
|
612
|
+
c = HH(c, d, a, b, M_offset_3, 16, T[42]);
|
|
613
|
+
b = HH(b, c, d, a, M_offset_6, 23, T[43]);
|
|
614
|
+
a = HH(a, b, c, d, M_offset_9, 4, T[44]);
|
|
615
|
+
d = HH(d, a, b, c, M_offset_12, 11, T[45]);
|
|
616
|
+
c = HH(c, d, a, b, M_offset_15, 16, T[46]);
|
|
617
|
+
b = HH(b, c, d, a, M_offset_2, 23, T[47]);
|
|
618
|
+
a = II(a, b, c, d, M_offset_0, 6, T[48]);
|
|
619
|
+
d = II(d, a, b, c, M_offset_7, 10, T[49]);
|
|
620
|
+
c = II(c, d, a, b, M_offset_14, 15, T[50]);
|
|
621
|
+
b = II(b, c, d, a, M_offset_5, 21, T[51]);
|
|
622
|
+
a = II(a, b, c, d, M_offset_12, 6, T[52]);
|
|
623
|
+
d = II(d, a, b, c, M_offset_3, 10, T[53]);
|
|
624
|
+
c = II(c, d, a, b, M_offset_10, 15, T[54]);
|
|
625
|
+
b = II(b, c, d, a, M_offset_1, 21, T[55]);
|
|
626
|
+
a = II(a, b, c, d, M_offset_8, 6, T[56]);
|
|
627
|
+
d = II(d, a, b, c, M_offset_15, 10, T[57]);
|
|
628
|
+
c = II(c, d, a, b, M_offset_6, 15, T[58]);
|
|
629
|
+
b = II(b, c, d, a, M_offset_13, 21, T[59]);
|
|
630
|
+
a = II(a, b, c, d, M_offset_4, 6, T[60]);
|
|
631
|
+
d = II(d, a, b, c, M_offset_11, 10, T[61]);
|
|
632
|
+
c = II(c, d, a, b, M_offset_2, 15, T[62]);
|
|
633
|
+
b = II(b, c, d, a, M_offset_9, 21, T[63]);
|
|
634
|
+
H[0] = H[0] + a | 0;
|
|
635
|
+
H[1] = H[1] + b | 0;
|
|
636
|
+
H[2] = H[2] + c | 0;
|
|
637
|
+
H[3] = H[3] + d | 0;
|
|
638
|
+
},
|
|
639
|
+
_doFinalize: function() {
|
|
640
|
+
var data = this._data;
|
|
641
|
+
var dataWords = data.words;
|
|
642
|
+
var nBitsTotal = this._nDataBytes * 8;
|
|
643
|
+
var nBitsLeft = data.sigBytes * 8;
|
|
644
|
+
dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32;
|
|
645
|
+
var nBitsTotalH = Math2.floor(nBitsTotal / 4294967296);
|
|
646
|
+
var nBitsTotalL = nBitsTotal;
|
|
647
|
+
dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = (nBitsTotalH << 8 | nBitsTotalH >>> 24) & 16711935 | (nBitsTotalH << 24 | nBitsTotalH >>> 8) & 4278255360;
|
|
648
|
+
dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = (nBitsTotalL << 8 | nBitsTotalL >>> 24) & 16711935 | (nBitsTotalL << 24 | nBitsTotalL >>> 8) & 4278255360;
|
|
649
|
+
data.sigBytes = (dataWords.length + 1) * 4;
|
|
650
|
+
this._process();
|
|
651
|
+
var hash2 = this._hash;
|
|
652
|
+
var H = hash2.words;
|
|
653
|
+
for (var i = 0;i < 4; i++) {
|
|
654
|
+
var H_i = H[i];
|
|
655
|
+
H[i] = (H_i << 8 | H_i >>> 24) & 16711935 | (H_i << 24 | H_i >>> 8) & 4278255360;
|
|
656
|
+
}
|
|
657
|
+
return hash2;
|
|
658
|
+
},
|
|
659
|
+
clone: function() {
|
|
660
|
+
var clone3 = Hasher.clone.call(this);
|
|
661
|
+
clone3._hash = this._hash.clone();
|
|
662
|
+
return clone3;
|
|
663
|
+
}
|
|
664
|
+
});
|
|
665
|
+
function FF(a, b, c, d, x, s, t) {
|
|
666
|
+
var n = a + (b & c | ~b & d) + x + t;
|
|
667
|
+
return (n << s | n >>> 32 - s) + b;
|
|
668
|
+
}
|
|
669
|
+
function GG(a, b, c, d, x, s, t) {
|
|
670
|
+
var n = a + (b & d | c & ~d) + x + t;
|
|
671
|
+
return (n << s | n >>> 32 - s) + b;
|
|
672
|
+
}
|
|
673
|
+
function HH(a, b, c, d, x, s, t) {
|
|
674
|
+
var n = a + (b ^ c ^ d) + x + t;
|
|
675
|
+
return (n << s | n >>> 32 - s) + b;
|
|
676
|
+
}
|
|
677
|
+
function II(a, b, c, d, x, s, t) {
|
|
678
|
+
var n = a + (c ^ (b | ~d)) + x + t;
|
|
679
|
+
return (n << s | n >>> 32 - s) + b;
|
|
680
|
+
}
|
|
681
|
+
C.MD5 = Hasher._createHelper(MD5);
|
|
682
|
+
C.HmacMD5 = Hasher._createHmacHelper(MD5);
|
|
683
|
+
})(Math);
|
|
684
|
+
return CryptoJS.MD5;
|
|
685
|
+
});
|
|
686
|
+
});
|
|
687
|
+
|
|
688
|
+
// ../../node_modules/.pnpm/@kevisual+ws@8.19.0/node_modules/@kevisual/ws/lib/constants.js
|
|
209
689
|
var require_constants = __commonJS((exports, module) => {
|
|
210
690
|
var BINARY_TYPES = ["nodebuffer", "arraybuffer", "fragments"];
|
|
211
691
|
var hasBlob = typeof Blob !== "undefined";
|
|
@@ -213,6 +693,7 @@ var require_constants = __commonJS((exports, module) => {
|
|
|
213
693
|
BINARY_TYPES.push("blob");
|
|
214
694
|
module.exports = {
|
|
215
695
|
BINARY_TYPES,
|
|
696
|
+
CLOSE_TIMEOUT: 30000,
|
|
216
697
|
EMPTY_BUFFER: Buffer.alloc(0),
|
|
217
698
|
GUID: "258EAFA5-E914-47DA-95CA-C5AB0DC85B11",
|
|
218
699
|
hasBlob,
|
|
@@ -224,7 +705,7 @@ var require_constants = __commonJS((exports, module) => {
|
|
|
224
705
|
};
|
|
225
706
|
});
|
|
226
707
|
|
|
227
|
-
// node_modules/.pnpm/@kevisual+ws@8.
|
|
708
|
+
// ../../node_modules/.pnpm/@kevisual+ws@8.19.0/node_modules/@kevisual/ws/lib/buffer-util.js
|
|
228
709
|
var require_buffer_util = __commonJS((exports, module) => {
|
|
229
710
|
var { EMPTY_BUFFER } = require_constants();
|
|
230
711
|
var FastBuffer = Buffer[Symbol.species];
|
|
@@ -285,7 +766,7 @@ var require_buffer_util = __commonJS((exports, module) => {
|
|
|
285
766
|
};
|
|
286
767
|
});
|
|
287
768
|
|
|
288
|
-
// node_modules/.pnpm/@kevisual+ws@8.
|
|
769
|
+
// ../../node_modules/.pnpm/@kevisual+ws@8.19.0/node_modules/@kevisual/ws/lib/limiter.js
|
|
289
770
|
var require_limiter = __commonJS((exports, module) => {
|
|
290
771
|
var kDone = Symbol("kDone");
|
|
291
772
|
var kRun = Symbol("kRun");
|
|
@@ -317,7 +798,7 @@ var require_limiter = __commonJS((exports, module) => {
|
|
|
317
798
|
module.exports = Limiter;
|
|
318
799
|
});
|
|
319
800
|
|
|
320
|
-
// node_modules/.pnpm/@kevisual+ws@8.
|
|
801
|
+
// ../../node_modules/.pnpm/@kevisual+ws@8.19.0/node_modules/@kevisual/ws/lib/permessage-deflate.js
|
|
321
802
|
var require_permessage_deflate = __commonJS((exports, module) => {
|
|
322
803
|
var zlib = __require("zlib");
|
|
323
804
|
var bufferUtil = require_buffer_util();
|
|
@@ -554,14 +1035,14 @@ var require_permessage_deflate = __commonJS((exports, module) => {
|
|
|
554
1035
|
}
|
|
555
1036
|
}
|
|
556
1037
|
module.exports = PerMessageDeflate;
|
|
557
|
-
function deflateOnData(
|
|
558
|
-
this[kBuffers].push(
|
|
559
|
-
this[kTotalLength] +=
|
|
1038
|
+
function deflateOnData(chunk2) {
|
|
1039
|
+
this[kBuffers].push(chunk2);
|
|
1040
|
+
this[kTotalLength] += chunk2.length;
|
|
560
1041
|
}
|
|
561
|
-
function inflateOnData(
|
|
562
|
-
this[kTotalLength] +=
|
|
1042
|
+
function inflateOnData(chunk2) {
|
|
1043
|
+
this[kTotalLength] += chunk2.length;
|
|
563
1044
|
if (this[kPerMessageDeflate]._maxPayload < 1 || this[kTotalLength] <= this[kPerMessageDeflate]._maxPayload) {
|
|
564
|
-
this[kBuffers].push(
|
|
1045
|
+
this[kBuffers].push(chunk2);
|
|
565
1046
|
return;
|
|
566
1047
|
}
|
|
567
1048
|
this[kError] = new RangeError("Max payload size exceeded");
|
|
@@ -572,12 +1053,16 @@ var require_permessage_deflate = __commonJS((exports, module) => {
|
|
|
572
1053
|
}
|
|
573
1054
|
function inflateOnError(err) {
|
|
574
1055
|
this[kPerMessageDeflate]._inflate = null;
|
|
1056
|
+
if (this[kError]) {
|
|
1057
|
+
this[kCallback](this[kError]);
|
|
1058
|
+
return;
|
|
1059
|
+
}
|
|
575
1060
|
err[kStatusCode] = 1007;
|
|
576
1061
|
this[kCallback](err);
|
|
577
1062
|
}
|
|
578
1063
|
});
|
|
579
1064
|
|
|
580
|
-
// node_modules/.pnpm/@kevisual+ws@8.
|
|
1065
|
+
// ../../node_modules/.pnpm/@kevisual+ws@8.19.0/node_modules/@kevisual/ws/lib/validation.js
|
|
581
1066
|
var require_validation = __commonJS((exports, module) => {
|
|
582
1067
|
var { isUtf8 } = __require("buffer");
|
|
583
1068
|
var { hasBlob } = require_constants();
|
|
@@ -741,11 +1226,11 @@ var require_validation = __commonJS((exports, module) => {
|
|
|
741
1226
|
}
|
|
742
1227
|
return true;
|
|
743
1228
|
}
|
|
744
|
-
function
|
|
1229
|
+
function isBlob2(value) {
|
|
745
1230
|
return hasBlob && typeof value === "object" && typeof value.arrayBuffer === "function" && typeof value.type === "string" && typeof value.stream === "function" && (value[Symbol.toStringTag] === "Blob" || value[Symbol.toStringTag] === "File");
|
|
746
1231
|
}
|
|
747
1232
|
module.exports = {
|
|
748
|
-
isBlob,
|
|
1233
|
+
isBlob: isBlob2,
|
|
749
1234
|
isValidStatusCode,
|
|
750
1235
|
isValidUTF8: _isValidUTF8,
|
|
751
1236
|
tokenChars
|
|
@@ -757,7 +1242,7 @@ var require_validation = __commonJS((exports, module) => {
|
|
|
757
1242
|
}
|
|
758
1243
|
});
|
|
759
1244
|
|
|
760
|
-
// node_modules/.pnpm/@kevisual+ws@8.
|
|
1245
|
+
// ../../node_modules/.pnpm/@kevisual+ws@8.19.0/node_modules/@kevisual/ws/lib/receiver.js
|
|
761
1246
|
var require_receiver = __commonJS((exports, module) => {
|
|
762
1247
|
var { Writable } = __require("stream");
|
|
763
1248
|
var PerMessageDeflate = require_permessage_deflate();
|
|
@@ -804,11 +1289,11 @@ var require_receiver = __commonJS((exports, module) => {
|
|
|
804
1289
|
this._loop = false;
|
|
805
1290
|
this._state = GET_INFO;
|
|
806
1291
|
}
|
|
807
|
-
_write(
|
|
1292
|
+
_write(chunk2, encoding, cb) {
|
|
808
1293
|
if (this._opcode === 8 && this._state == GET_INFO)
|
|
809
1294
|
return cb();
|
|
810
|
-
this._bufferedBytes +=
|
|
811
|
-
this._buffers.push(
|
|
1295
|
+
this._bufferedBytes += chunk2.length;
|
|
1296
|
+
this._buffers.push(chunk2);
|
|
812
1297
|
this.startLoop(cb);
|
|
813
1298
|
}
|
|
814
1299
|
consume(n) {
|
|
@@ -1138,13 +1623,13 @@ var require_receiver = __commonJS((exports, module) => {
|
|
|
1138
1623
|
module.exports = Receiver;
|
|
1139
1624
|
});
|
|
1140
1625
|
|
|
1141
|
-
// node_modules/.pnpm/@kevisual+ws@8.
|
|
1626
|
+
// ../../node_modules/.pnpm/@kevisual+ws@8.19.0/node_modules/@kevisual/ws/lib/sender.js
|
|
1142
1627
|
var require_sender = __commonJS((exports, module) => {
|
|
1143
1628
|
var { Duplex } = __require("stream");
|
|
1144
1629
|
var { randomFillSync } = __require("crypto");
|
|
1145
1630
|
var PerMessageDeflate = require_permessage_deflate();
|
|
1146
1631
|
var { EMPTY_BUFFER, kWebSocket, NOOP } = require_constants();
|
|
1147
|
-
var { isBlob, isValidStatusCode } = require_validation();
|
|
1632
|
+
var { isBlob: isBlob2, isValidStatusCode } = require_validation();
|
|
1148
1633
|
var { mask: applyMask, toBuffer } = require_buffer_util();
|
|
1149
1634
|
var kByteLength = Symbol("kByteLength");
|
|
1150
1635
|
var maskBuffer = Buffer.alloc(4);
|
|
@@ -1287,7 +1772,7 @@ var require_sender = __commonJS((exports, module) => {
|
|
|
1287
1772
|
if (typeof data === "string") {
|
|
1288
1773
|
byteLength = Buffer.byteLength(data);
|
|
1289
1774
|
readOnly = false;
|
|
1290
|
-
} else if (
|
|
1775
|
+
} else if (isBlob2(data)) {
|
|
1291
1776
|
byteLength = data.size;
|
|
1292
1777
|
readOnly = false;
|
|
1293
1778
|
} else {
|
|
@@ -1308,7 +1793,7 @@ var require_sender = __commonJS((exports, module) => {
|
|
|
1308
1793
|
readOnly,
|
|
1309
1794
|
rsv1: false
|
|
1310
1795
|
};
|
|
1311
|
-
if (
|
|
1796
|
+
if (isBlob2(data)) {
|
|
1312
1797
|
if (this._state !== DEFAULT) {
|
|
1313
1798
|
this.enqueue([this.getBlobData, data, false, options, cb]);
|
|
1314
1799
|
} else {
|
|
@@ -1326,7 +1811,7 @@ var require_sender = __commonJS((exports, module) => {
|
|
|
1326
1811
|
if (typeof data === "string") {
|
|
1327
1812
|
byteLength = Buffer.byteLength(data);
|
|
1328
1813
|
readOnly = false;
|
|
1329
|
-
} else if (
|
|
1814
|
+
} else if (isBlob2(data)) {
|
|
1330
1815
|
byteLength = data.size;
|
|
1331
1816
|
readOnly = false;
|
|
1332
1817
|
} else {
|
|
@@ -1347,7 +1832,7 @@ var require_sender = __commonJS((exports, module) => {
|
|
|
1347
1832
|
readOnly,
|
|
1348
1833
|
rsv1: false
|
|
1349
1834
|
};
|
|
1350
|
-
if (
|
|
1835
|
+
if (isBlob2(data)) {
|
|
1351
1836
|
if (this._state !== DEFAULT) {
|
|
1352
1837
|
this.enqueue([this.getBlobData, data, false, options, cb]);
|
|
1353
1838
|
} else {
|
|
@@ -1368,7 +1853,7 @@ var require_sender = __commonJS((exports, module) => {
|
|
|
1368
1853
|
if (typeof data === "string") {
|
|
1369
1854
|
byteLength = Buffer.byteLength(data);
|
|
1370
1855
|
readOnly = false;
|
|
1371
|
-
} else if (
|
|
1856
|
+
} else if (isBlob2(data)) {
|
|
1372
1857
|
byteLength = data.size;
|
|
1373
1858
|
readOnly = false;
|
|
1374
1859
|
} else {
|
|
@@ -1398,7 +1883,7 @@ var require_sender = __commonJS((exports, module) => {
|
|
|
1398
1883
|
readOnly,
|
|
1399
1884
|
rsv1
|
|
1400
1885
|
};
|
|
1401
|
-
if (
|
|
1886
|
+
if (isBlob2(data)) {
|
|
1402
1887
|
if (this._state !== DEFAULT) {
|
|
1403
1888
|
this.enqueue([this.getBlobData, data, this._compress, opts, cb]);
|
|
1404
1889
|
} else {
|
|
@@ -1492,7 +1977,7 @@ var require_sender = __commonJS((exports, module) => {
|
|
|
1492
1977
|
}
|
|
1493
1978
|
});
|
|
1494
1979
|
|
|
1495
|
-
// node_modules/.pnpm/@kevisual+ws@8.
|
|
1980
|
+
// ../../node_modules/.pnpm/@kevisual+ws@8.19.0/node_modules/@kevisual/ws/lib/event-target.js
|
|
1496
1981
|
var require_event_target = __commonJS((exports, module) => {
|
|
1497
1982
|
var { kForOnEventAttribute, kListener } = require_constants();
|
|
1498
1983
|
var kCode = Symbol("kCode");
|
|
@@ -1643,7 +2128,7 @@ var require_event_target = __commonJS((exports, module) => {
|
|
|
1643
2128
|
}
|
|
1644
2129
|
});
|
|
1645
2130
|
|
|
1646
|
-
// node_modules/.pnpm/@kevisual+ws@8.
|
|
2131
|
+
// ../../node_modules/.pnpm/@kevisual+ws@8.19.0/node_modules/@kevisual/ws/lib/extension.js
|
|
1647
2132
|
var require_extension = __commonJS((exports, module) => {
|
|
1648
2133
|
var { tokenChars } = require_validation();
|
|
1649
2134
|
function push(dest, name, elem) {
|
|
@@ -1808,7 +2293,7 @@ var require_extension = __commonJS((exports, module) => {
|
|
|
1808
2293
|
module.exports = { format, parse: parse5 };
|
|
1809
2294
|
});
|
|
1810
2295
|
|
|
1811
|
-
// node_modules/.pnpm/@kevisual+ws@8.
|
|
2296
|
+
// ../../node_modules/.pnpm/@kevisual+ws@8.19.0/node_modules/@kevisual/ws/lib/websocket.js
|
|
1812
2297
|
var require_websocket = __commonJS((exports, module) => {
|
|
1813
2298
|
var EventEmitter2 = __require("events");
|
|
1814
2299
|
var https = __require("https");
|
|
@@ -1821,9 +2306,10 @@ var require_websocket = __commonJS((exports, module) => {
|
|
|
1821
2306
|
var PerMessageDeflate = require_permessage_deflate();
|
|
1822
2307
|
var Receiver = require_receiver();
|
|
1823
2308
|
var Sender = require_sender();
|
|
1824
|
-
var { isBlob } = require_validation();
|
|
2309
|
+
var { isBlob: isBlob2 } = require_validation();
|
|
1825
2310
|
var {
|
|
1826
2311
|
BINARY_TYPES,
|
|
2312
|
+
CLOSE_TIMEOUT,
|
|
1827
2313
|
EMPTY_BUFFER,
|
|
1828
2314
|
GUID,
|
|
1829
2315
|
kForOnEventAttribute,
|
|
@@ -1837,7 +2323,6 @@ var require_websocket = __commonJS((exports, module) => {
|
|
|
1837
2323
|
} = require_event_target();
|
|
1838
2324
|
var { format, parse: parse5 } = require_extension();
|
|
1839
2325
|
var { toBuffer } = require_buffer_util();
|
|
1840
|
-
var closeTimeout = 30 * 1000;
|
|
1841
2326
|
var kAborted = Symbol("kAborted");
|
|
1842
2327
|
var protocolVersions = [8, 13];
|
|
1843
2328
|
var readyStates = ["CONNECTING", "OPEN", "CLOSING", "CLOSED"];
|
|
@@ -1877,6 +2362,7 @@ var require_websocket = __commonJS((exports, module) => {
|
|
|
1877
2362
|
initAsClient(this, address, protocols, options);
|
|
1878
2363
|
} else {
|
|
1879
2364
|
this._autoPong = options.autoPong;
|
|
2365
|
+
this._closeTimeout = options.closeTimeout;
|
|
1880
2366
|
this._isServer = true;
|
|
1881
2367
|
}
|
|
1882
2368
|
}
|
|
@@ -1922,7 +2408,7 @@ var require_websocket = __commonJS((exports, module) => {
|
|
|
1922
2408
|
get url() {
|
|
1923
2409
|
return this._url;
|
|
1924
2410
|
}
|
|
1925
|
-
setSocket(socket,
|
|
2411
|
+
setSocket(socket, head2, options) {
|
|
1926
2412
|
const receiver = new Receiver({
|
|
1927
2413
|
allowSynchronousEvents: options.allowSynchronousEvents,
|
|
1928
2414
|
binaryType: this.binaryType,
|
|
@@ -1949,8 +2435,8 @@ var require_websocket = __commonJS((exports, module) => {
|
|
|
1949
2435
|
socket.setTimeout(0);
|
|
1950
2436
|
if (socket.setNoDelay)
|
|
1951
2437
|
socket.setNoDelay();
|
|
1952
|
-
if (
|
|
1953
|
-
socket.unshift(
|
|
2438
|
+
if (head2.length > 0)
|
|
2439
|
+
socket.unshift(head2);
|
|
1954
2440
|
socket.on("close", socketOnClose);
|
|
1955
2441
|
socket.on("data", socketOnData);
|
|
1956
2442
|
socket.on("end", socketOnEnd);
|
|
@@ -2168,6 +2654,7 @@ var require_websocket = __commonJS((exports, module) => {
|
|
|
2168
2654
|
const opts = {
|
|
2169
2655
|
allowSynchronousEvents: true,
|
|
2170
2656
|
autoPong: true,
|
|
2657
|
+
closeTimeout: CLOSE_TIMEOUT,
|
|
2171
2658
|
protocolVersion: protocolVersions[1],
|
|
2172
2659
|
maxPayload: 100 * 1024 * 1024,
|
|
2173
2660
|
skipUTF8Validation: false,
|
|
@@ -2185,6 +2672,7 @@ var require_websocket = __commonJS((exports, module) => {
|
|
|
2185
2672
|
port: undefined
|
|
2186
2673
|
};
|
|
2187
2674
|
websocket._autoPong = opts.autoPong;
|
|
2675
|
+
websocket._closeTimeout = opts.closeTimeout;
|
|
2188
2676
|
if (!protocolVersions.includes(opts.protocolVersion)) {
|
|
2189
2677
|
throw new RangeError(`Unsupported protocol version: ${opts.protocolVersion} ` + `(supported versions: ${protocolVersions.join(", ")})`);
|
|
2190
2678
|
}
|
|
@@ -2337,7 +2825,7 @@ var require_websocket = __commonJS((exports, module) => {
|
|
|
2337
2825
|
abortHandshake(websocket, req, `Unexpected server response: ${res.statusCode}`);
|
|
2338
2826
|
}
|
|
2339
2827
|
});
|
|
2340
|
-
req.on("upgrade", (res, socket,
|
|
2828
|
+
req.on("upgrade", (res, socket, head2) => {
|
|
2341
2829
|
websocket.emit("upgrade", res);
|
|
2342
2830
|
if (websocket.readyState !== WebSocket.CONNECTING)
|
|
2343
2831
|
return;
|
|
@@ -2399,7 +2887,7 @@ var require_websocket = __commonJS((exports, module) => {
|
|
|
2399
2887
|
}
|
|
2400
2888
|
websocket._extensions[PerMessageDeflate.extensionName] = perMessageDeflate;
|
|
2401
2889
|
}
|
|
2402
|
-
websocket.setSocket(socket,
|
|
2890
|
+
websocket.setSocket(socket, head2, {
|
|
2403
2891
|
allowSynchronousEvents: opts.allowSynchronousEvents,
|
|
2404
2892
|
generateMask: opts.generateMask,
|
|
2405
2893
|
maxPayload: opts.maxPayload,
|
|
@@ -2448,7 +2936,7 @@ var require_websocket = __commonJS((exports, module) => {
|
|
|
2448
2936
|
}
|
|
2449
2937
|
function sendAfterClose(websocket, data, cb) {
|
|
2450
2938
|
if (data) {
|
|
2451
|
-
const length =
|
|
2939
|
+
const length = isBlob2(data) ? data.size : toBuffer(data).length;
|
|
2452
2940
|
if (websocket._socket)
|
|
2453
2941
|
websocket._sender._bufferedBytes += length;
|
|
2454
2942
|
else
|
|
@@ -2523,7 +3011,7 @@ var require_websocket = __commonJS((exports, module) => {
|
|
|
2523
3011
|
}
|
|
2524
3012
|
}
|
|
2525
3013
|
function setCloseTimer(websocket) {
|
|
2526
|
-
websocket._closeTimer = setTimeout(websocket._socket.destroy.bind(websocket._socket),
|
|
3014
|
+
websocket._closeTimer = setTimeout(websocket._socket.destroy.bind(websocket._socket), websocket._closeTimeout);
|
|
2527
3015
|
}
|
|
2528
3016
|
function socketOnClose() {
|
|
2529
3017
|
const websocket = this[kWebSocket];
|
|
@@ -2531,9 +3019,9 @@ var require_websocket = __commonJS((exports, module) => {
|
|
|
2531
3019
|
this.removeListener("data", socketOnData);
|
|
2532
3020
|
this.removeListener("end", socketOnEnd);
|
|
2533
3021
|
websocket._readyState = WebSocket.CLOSING;
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
websocket._receiver.write(
|
|
3022
|
+
if (!this._readableState.endEmitted && !websocket._closeFrameReceived && !websocket._receiver._writableState.errorEmitted && this._readableState.length !== 0) {
|
|
3023
|
+
const chunk2 = this.read(this._readableState.length);
|
|
3024
|
+
websocket._receiver.write(chunk2);
|
|
2537
3025
|
}
|
|
2538
3026
|
websocket._receiver.end();
|
|
2539
3027
|
this[kWebSocket] = undefined;
|
|
@@ -2545,8 +3033,8 @@ var require_websocket = __commonJS((exports, module) => {
|
|
|
2545
3033
|
websocket._receiver.on("finish", receiverOnFinish);
|
|
2546
3034
|
}
|
|
2547
3035
|
}
|
|
2548
|
-
function socketOnData(
|
|
2549
|
-
if (!this[kWebSocket]._receiver.write(
|
|
3036
|
+
function socketOnData(chunk2) {
|
|
3037
|
+
if (!this[kWebSocket]._receiver.write(chunk2)) {
|
|
2550
3038
|
this.pause();
|
|
2551
3039
|
}
|
|
2552
3040
|
}
|
|
@@ -2567,7 +3055,7 @@ var require_websocket = __commonJS((exports, module) => {
|
|
|
2567
3055
|
}
|
|
2568
3056
|
});
|
|
2569
3057
|
|
|
2570
|
-
// node_modules/.pnpm/@kevisual+ws@8.
|
|
3058
|
+
// ../../node_modules/.pnpm/@kevisual+ws@8.19.0/node_modules/@kevisual/ws/lib/stream.js
|
|
2571
3059
|
var require_stream = __commonJS((exports, module) => {
|
|
2572
3060
|
var WebSocket = require_websocket();
|
|
2573
3061
|
var { Duplex } = __require("stream");
|
|
@@ -2654,14 +3142,14 @@ var require_stream = __commonJS((exports, module) => {
|
|
|
2654
3142
|
if (ws.isPaused)
|
|
2655
3143
|
ws.resume();
|
|
2656
3144
|
};
|
|
2657
|
-
duplex._write = function(
|
|
3145
|
+
duplex._write = function(chunk2, encoding, callback) {
|
|
2658
3146
|
if (ws.readyState === ws.CONNECTING) {
|
|
2659
3147
|
ws.once("open", function open() {
|
|
2660
|
-
duplex._write(
|
|
3148
|
+
duplex._write(chunk2, encoding, callback);
|
|
2661
3149
|
});
|
|
2662
3150
|
return;
|
|
2663
3151
|
}
|
|
2664
|
-
ws.send(
|
|
3152
|
+
ws.send(chunk2, callback);
|
|
2665
3153
|
};
|
|
2666
3154
|
duplex.on("end", duplexOnEnd);
|
|
2667
3155
|
duplex.on("error", duplexOnError);
|
|
@@ -2670,7 +3158,7 @@ var require_stream = __commonJS((exports, module) => {
|
|
|
2670
3158
|
module.exports = createWebSocketStream;
|
|
2671
3159
|
});
|
|
2672
3160
|
|
|
2673
|
-
// node_modules/.pnpm/@kevisual+ws@8.
|
|
3161
|
+
// ../../node_modules/.pnpm/@kevisual+ws@8.19.0/node_modules/@kevisual/ws/lib/subprotocol.js
|
|
2674
3162
|
var require_subprotocol = __commonJS((exports, module) => {
|
|
2675
3163
|
var { tokenChars } = require_validation();
|
|
2676
3164
|
function parse5(header) {
|
|
@@ -2715,7 +3203,7 @@ var require_subprotocol = __commonJS((exports, module) => {
|
|
|
2715
3203
|
module.exports = { parse: parse5 };
|
|
2716
3204
|
});
|
|
2717
3205
|
|
|
2718
|
-
// node_modules/.pnpm/@kevisual+ws@8.
|
|
3206
|
+
// ../../node_modules/.pnpm/@kevisual+ws@8.19.0/node_modules/@kevisual/ws/lib/websocket-server.js
|
|
2719
3207
|
var require_websocket_server = __commonJS((exports, module) => {
|
|
2720
3208
|
var EventEmitter2 = __require("events");
|
|
2721
3209
|
var http = __require("http");
|
|
@@ -2725,7 +3213,7 @@ var require_websocket_server = __commonJS((exports, module) => {
|
|
|
2725
3213
|
var PerMessageDeflate = require_permessage_deflate();
|
|
2726
3214
|
var subprotocol = require_subprotocol();
|
|
2727
3215
|
var WebSocket = require_websocket();
|
|
2728
|
-
var { GUID, kWebSocket } = require_constants();
|
|
3216
|
+
var { CLOSE_TIMEOUT, GUID, kWebSocket } = require_constants();
|
|
2729
3217
|
var keyRegex = /^[+/0-9A-Za-z]{22}==$/;
|
|
2730
3218
|
var RUNNING = 0;
|
|
2731
3219
|
var CLOSING = 1;
|
|
@@ -2742,6 +3230,7 @@ var require_websocket_server = __commonJS((exports, module) => {
|
|
|
2742
3230
|
perMessageDeflate: false,
|
|
2743
3231
|
handleProtocols: null,
|
|
2744
3232
|
clientTracking: true,
|
|
3233
|
+
closeTimeout: CLOSE_TIMEOUT,
|
|
2745
3234
|
verifyClient: null,
|
|
2746
3235
|
noServer: false,
|
|
2747
3236
|
backlog: null,
|
|
@@ -2773,8 +3262,8 @@ var require_websocket_server = __commonJS((exports, module) => {
|
|
|
2773
3262
|
this._removeListeners = addListeners(this._server, {
|
|
2774
3263
|
listening: this.emit.bind(this, "listening"),
|
|
2775
3264
|
error: this.emit.bind(this, "error"),
|
|
2776
|
-
upgrade: (req, socket,
|
|
2777
|
-
this.handleUpgrade(req, socket,
|
|
3265
|
+
upgrade: (req, socket, head2) => {
|
|
3266
|
+
this.handleUpgrade(req, socket, head2, emitConnection);
|
|
2778
3267
|
}
|
|
2779
3268
|
});
|
|
2780
3269
|
}
|
|
@@ -2842,7 +3331,7 @@ var require_websocket_server = __commonJS((exports, module) => {
|
|
|
2842
3331
|
}
|
|
2843
3332
|
return true;
|
|
2844
3333
|
}
|
|
2845
|
-
handleUpgrade(req, socket,
|
|
3334
|
+
handleUpgrade(req, socket, head2, cb) {
|
|
2846
3335
|
socket.on("error", socketOnError);
|
|
2847
3336
|
const key = req.headers["sec-websocket-key"];
|
|
2848
3337
|
const upgrade = req.headers.upgrade;
|
|
@@ -2862,9 +3351,11 @@ var require_websocket_server = __commonJS((exports, module) => {
|
|
|
2862
3351
|
abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
|
|
2863
3352
|
return;
|
|
2864
3353
|
}
|
|
2865
|
-
if (version2 !==
|
|
3354
|
+
if (version2 !== 13 && version2 !== 8) {
|
|
2866
3355
|
const message = "Missing or invalid Sec-WebSocket-Version header";
|
|
2867
|
-
abortHandshakeOrEmitwsClientError(this, req, socket, 400, message
|
|
3356
|
+
abortHandshakeOrEmitwsClientError(this, req, socket, 400, message, {
|
|
3357
|
+
"Sec-WebSocket-Version": "13, 8"
|
|
3358
|
+
});
|
|
2868
3359
|
return;
|
|
2869
3360
|
}
|
|
2870
3361
|
if (!this.shouldHandle(req)) {
|
|
@@ -2909,16 +3400,16 @@ var require_websocket_server = __commonJS((exports, module) => {
|
|
|
2909
3400
|
if (!verified) {
|
|
2910
3401
|
return abortHandshake(socket, code || 401, message, headers);
|
|
2911
3402
|
}
|
|
2912
|
-
this.completeUpgrade(extensions, key, protocols, req, socket,
|
|
3403
|
+
this.completeUpgrade(extensions, key, protocols, req, socket, head2, cb);
|
|
2913
3404
|
});
|
|
2914
3405
|
return;
|
|
2915
3406
|
}
|
|
2916
3407
|
if (!this.options.verifyClient(info))
|
|
2917
3408
|
return abortHandshake(socket, 401);
|
|
2918
3409
|
}
|
|
2919
|
-
this.completeUpgrade(extensions, key, protocols, req, socket,
|
|
3410
|
+
this.completeUpgrade(extensions, key, protocols, req, socket, head2, cb);
|
|
2920
3411
|
}
|
|
2921
|
-
completeUpgrade(extensions, key, protocols, req, socket,
|
|
3412
|
+
completeUpgrade(extensions, key, protocols, req, socket, head2, cb) {
|
|
2922
3413
|
if (!socket.readable || !socket.writable)
|
|
2923
3414
|
return socket.destroy();
|
|
2924
3415
|
if (socket[kWebSocket]) {
|
|
@@ -2954,7 +3445,7 @@ var require_websocket_server = __commonJS((exports, module) => {
|
|
|
2954
3445
|
`).join(`\r
|
|
2955
3446
|
`));
|
|
2956
3447
|
socket.removeListener("error", socketOnError);
|
|
2957
|
-
ws.setSocket(socket,
|
|
3448
|
+
ws.setSocket(socket, head2, {
|
|
2958
3449
|
allowSynchronousEvents: this.options.allowSynchronousEvents,
|
|
2959
3450
|
maxPayload: this.options.maxPayload,
|
|
2960
3451
|
skipUTF8Validation: this.options.skipUTF8Validation
|
|
@@ -3003,13 +3494,13 @@ var require_websocket_server = __commonJS((exports, module) => {
|
|
|
3003
3494
|
\r
|
|
3004
3495
|
` + message);
|
|
3005
3496
|
}
|
|
3006
|
-
function abortHandshakeOrEmitwsClientError(server, req, socket, code, message) {
|
|
3497
|
+
function abortHandshakeOrEmitwsClientError(server, req, socket, code, message, headers) {
|
|
3007
3498
|
if (server.listenerCount("wsClientError")) {
|
|
3008
3499
|
const err = new Error(message);
|
|
3009
3500
|
Error.captureStackTrace(err, abortHandshakeOrEmitwsClientError);
|
|
3010
3501
|
server.emit("wsClientError", err, socket, req);
|
|
3011
3502
|
} else {
|
|
3012
|
-
abortHandshake(socket, code, message);
|
|
3503
|
+
abortHandshake(socket, code, message, headers);
|
|
3013
3504
|
}
|
|
3014
3505
|
}
|
|
3015
3506
|
});
|
|
@@ -3088,10 +3579,14 @@ function pick(obj, keys) {
|
|
|
3088
3579
|
return result;
|
|
3089
3580
|
}
|
|
3090
3581
|
|
|
3091
|
-
// node_modules/.pnpm/eventemitter3@5.0.4/node_modules/eventemitter3/index.mjs
|
|
3582
|
+
// ../../node_modules/.pnpm/eventemitter3@5.0.4/node_modules/eventemitter3/index.mjs
|
|
3092
3583
|
var import__ = __toESM(require_eventemitter3(), 1);
|
|
3584
|
+
// ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
|
|
3585
|
+
function isUnsafeProperty(key) {
|
|
3586
|
+
return key === "__proto__";
|
|
3587
|
+
}
|
|
3093
3588
|
|
|
3094
|
-
// node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
|
|
3589
|
+
// ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
|
|
3095
3590
|
function isPlainObject(value) {
|
|
3096
3591
|
if (!value || typeof value !== "object") {
|
|
3097
3592
|
return false;
|
|
@@ -3104,12 +3599,7 @@ function isPlainObject(value) {
|
|
|
3104
3599
|
return Object.prototype.toString.call(value) === "[object Object]";
|
|
3105
3600
|
}
|
|
3106
3601
|
|
|
3107
|
-
// node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/
|
|
3108
|
-
function isUnsafeProperty(key) {
|
|
3109
|
-
return key === "__proto__";
|
|
3110
|
-
}
|
|
3111
|
-
|
|
3112
|
-
// node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/object/merge.mjs
|
|
3602
|
+
// ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/object/merge.mjs
|
|
3113
3603
|
function merge(target, source) {
|
|
3114
3604
|
const sourceKeys = Object.keys(source);
|
|
3115
3605
|
for (let i = 0;i < sourceKeys.length; i++) {
|
|
@@ -3140,8 +3630,8 @@ class MockProcess {
|
|
|
3140
3630
|
process;
|
|
3141
3631
|
constructor(opts) {
|
|
3142
3632
|
this.emitter = opts?.emitter || new import__.default;
|
|
3143
|
-
const
|
|
3144
|
-
if (
|
|
3633
|
+
const isNode2 = opts?.isNode ?? true;
|
|
3634
|
+
if (isNode2) {
|
|
3145
3635
|
this.process = globalThis?.process;
|
|
3146
3636
|
}
|
|
3147
3637
|
}
|
|
@@ -3172,7 +3662,7 @@ class MockProcess {
|
|
|
3172
3662
|
this.process = undefined;
|
|
3173
3663
|
}
|
|
3174
3664
|
}
|
|
3175
|
-
var listenProcess = async ({ app, mockProcess, params = {}, timeout = 10 * 60 * 60 * 1000 }) => {
|
|
3665
|
+
var listenProcess = async ({ app, mockProcess, params = {}, timeout: timeout2 = 10 * 60 * 60 * 1000 }) => {
|
|
3176
3666
|
const process2 = mockProcess || new MockProcess;
|
|
3177
3667
|
let isEnd = false;
|
|
3178
3668
|
const timer = setTimeout(() => {
|
|
@@ -3182,7 +3672,7 @@ var listenProcess = async ({ app, mockProcess, params = {}, timeout = 10 * 60 *
|
|
|
3182
3672
|
process2.send?.({ success: false, error: "Timeout" }, () => {
|
|
3183
3673
|
process2.exit?.(1);
|
|
3184
3674
|
});
|
|
3185
|
-
},
|
|
3675
|
+
}, timeout2);
|
|
3186
3676
|
const getParams = async () => {
|
|
3187
3677
|
return new Promise((resolve) => {
|
|
3188
3678
|
process2.on((params2) => {
|
|
@@ -3223,10 +3713,10 @@ var listenProcess = async ({ app, mockProcess, params = {}, timeout = 10 * 60 *
|
|
|
3223
3713
|
}
|
|
3224
3714
|
};
|
|
3225
3715
|
|
|
3226
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/external.js
|
|
3716
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/external.js
|
|
3227
3717
|
var exports_external = {};
|
|
3228
3718
|
__export(exports_external, {
|
|
3229
|
-
xor: () =>
|
|
3719
|
+
xor: () => xor2,
|
|
3230
3720
|
xid: () => xid2,
|
|
3231
3721
|
void: () => _void2,
|
|
3232
3722
|
uuidv7: () => uuidv7,
|
|
@@ -3237,7 +3727,7 @@ __export(exports_external, {
|
|
|
3237
3727
|
url: () => url,
|
|
3238
3728
|
uppercase: () => _uppercase,
|
|
3239
3729
|
unknown: () => unknown,
|
|
3240
|
-
union: () =>
|
|
3730
|
+
union: () => union2,
|
|
3241
3731
|
undefined: () => _undefined3,
|
|
3242
3732
|
ulid: () => ulid2,
|
|
3243
3733
|
uint64: () => uint64,
|
|
@@ -3325,7 +3815,7 @@ __export(exports_external, {
|
|
|
3325
3815
|
iso: () => exports_iso,
|
|
3326
3816
|
ipv6: () => ipv62,
|
|
3327
3817
|
ipv4: () => ipv42,
|
|
3328
|
-
intersection: () =>
|
|
3818
|
+
intersection: () => intersection2,
|
|
3329
3819
|
int64: () => int64,
|
|
3330
3820
|
int32: () => int32,
|
|
3331
3821
|
int: () => int,
|
|
@@ -3367,7 +3857,7 @@ __export(exports_external, {
|
|
|
3367
3857
|
config: () => config,
|
|
3368
3858
|
coerce: () => exports_coerce,
|
|
3369
3859
|
codec: () => codec,
|
|
3370
|
-
clone: () =>
|
|
3860
|
+
clone: () => clone2,
|
|
3371
3861
|
cidrv6: () => cidrv62,
|
|
3372
3862
|
cidrv4: () => cidrv42,
|
|
3373
3863
|
check: () => check,
|
|
@@ -3464,7 +3954,7 @@ __export(exports_external, {
|
|
|
3464
3954
|
$brand: () => $brand
|
|
3465
3955
|
});
|
|
3466
3956
|
|
|
3467
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/index.js
|
|
3957
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/index.js
|
|
3468
3958
|
var exports_core2 = {};
|
|
3469
3959
|
__export(exports_core2, {
|
|
3470
3960
|
version: () => version,
|
|
@@ -3504,7 +3994,7 @@ __export(exports_core2, {
|
|
|
3504
3994
|
createToJSONSchemaMethod: () => createToJSONSchemaMethod,
|
|
3505
3995
|
createStandardJSONSchemaMethod: () => createStandardJSONSchemaMethod,
|
|
3506
3996
|
config: () => config,
|
|
3507
|
-
clone: () =>
|
|
3997
|
+
clone: () => clone2,
|
|
3508
3998
|
_xor: () => _xor,
|
|
3509
3999
|
_xid: () => _xid,
|
|
3510
4000
|
_void: () => _void,
|
|
@@ -3742,7 +4232,7 @@ __export(exports_core2, {
|
|
|
3742
4232
|
$ZodAny: () => $ZodAny
|
|
3743
4233
|
});
|
|
3744
4234
|
|
|
3745
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/core.js
|
|
4235
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/core.js
|
|
3746
4236
|
var NEVER = Object.freeze({
|
|
3747
4237
|
status: "aborted"
|
|
3748
4238
|
});
|
|
@@ -3818,7 +4308,7 @@ function config(newConfig) {
|
|
|
3818
4308
|
Object.assign(globalConfig, newConfig);
|
|
3819
4309
|
return globalConfig;
|
|
3820
4310
|
}
|
|
3821
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/util.js
|
|
4311
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/util.js
|
|
3822
4312
|
var exports_util = {};
|
|
3823
4313
|
__export(exports_util, {
|
|
3824
4314
|
unwrapMessage: () => unwrapMessage,
|
|
@@ -3835,11 +4325,11 @@ __export(exports_util, {
|
|
|
3835
4325
|
promiseAllObject: () => promiseAllObject,
|
|
3836
4326
|
primitiveTypes: () => primitiveTypes,
|
|
3837
4327
|
prefixIssues: () => prefixIssues,
|
|
3838
|
-
pick: () =>
|
|
3839
|
-
partial: () =>
|
|
4328
|
+
pick: () => pick3,
|
|
4329
|
+
partial: () => partial2,
|
|
3840
4330
|
parsedType: () => parsedType,
|
|
3841
4331
|
optionalKeys: () => optionalKeys,
|
|
3842
|
-
omit: () =>
|
|
4332
|
+
omit: () => omit2,
|
|
3843
4333
|
objectClone: () => objectClone,
|
|
3844
4334
|
numKeys: () => numKeys,
|
|
3845
4335
|
nullish: () => nullish,
|
|
@@ -3849,7 +4339,7 @@ __export(exports_util, {
|
|
|
3849
4339
|
jsonStringifyReplacer: () => jsonStringifyReplacer,
|
|
3850
4340
|
joinValues: () => joinValues,
|
|
3851
4341
|
issue: () => issue,
|
|
3852
|
-
isPlainObject: () =>
|
|
4342
|
+
isPlainObject: () => isPlainObject3,
|
|
3853
4343
|
isObject: () => isObject,
|
|
3854
4344
|
hexToUint8Array: () => hexToUint8Array,
|
|
3855
4345
|
getSizableOrigin: () => getSizableOrigin,
|
|
@@ -3865,7 +4355,7 @@ __export(exports_util, {
|
|
|
3865
4355
|
defineLazy: () => defineLazy,
|
|
3866
4356
|
createTransparentProxy: () => createTransparentProxy,
|
|
3867
4357
|
cloneDef: () => cloneDef,
|
|
3868
|
-
clone: () =>
|
|
4358
|
+
clone: () => clone2,
|
|
3869
4359
|
cleanRegex: () => cleanRegex,
|
|
3870
4360
|
cleanEnum: () => cleanEnum,
|
|
3871
4361
|
captureStackTrace: () => captureStackTrace,
|
|
@@ -4034,7 +4524,7 @@ var allowsEval = cached(() => {
|
|
|
4034
4524
|
return false;
|
|
4035
4525
|
}
|
|
4036
4526
|
});
|
|
4037
|
-
function
|
|
4527
|
+
function isPlainObject3(o) {
|
|
4038
4528
|
if (isObject(o) === false)
|
|
4039
4529
|
return false;
|
|
4040
4530
|
const ctor = o.constructor;
|
|
@@ -4051,7 +4541,7 @@ function isPlainObject2(o) {
|
|
|
4051
4541
|
return true;
|
|
4052
4542
|
}
|
|
4053
4543
|
function shallowClone(o) {
|
|
4054
|
-
if (
|
|
4544
|
+
if (isPlainObject3(o))
|
|
4055
4545
|
return { ...o };
|
|
4056
4546
|
if (Array.isArray(o))
|
|
4057
4547
|
return [...o];
|
|
@@ -4115,7 +4605,7 @@ var primitiveTypes = new Set(["string", "number", "bigint", "boolean", "symbol",
|
|
|
4115
4605
|
function escapeRegex(str) {
|
|
4116
4606
|
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
4117
4607
|
}
|
|
4118
|
-
function
|
|
4608
|
+
function clone2(inst, def, params) {
|
|
4119
4609
|
const cl = new inst._zod.constr(def ?? inst._zod.def);
|
|
4120
4610
|
if (!def || params?.parent)
|
|
4121
4611
|
cl._zod.parent = inst;
|
|
@@ -4193,7 +4683,7 @@ var BIGINT_FORMAT_RANGES = {
|
|
|
4193
4683
|
int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")],
|
|
4194
4684
|
uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")]
|
|
4195
4685
|
};
|
|
4196
|
-
function
|
|
4686
|
+
function pick3(schema, mask) {
|
|
4197
4687
|
const currDef = schema._zod.def;
|
|
4198
4688
|
const checks = currDef.checks;
|
|
4199
4689
|
const hasChecks = checks && checks.length > 0;
|
|
@@ -4216,9 +4706,9 @@ function pick2(schema, mask) {
|
|
|
4216
4706
|
},
|
|
4217
4707
|
checks: []
|
|
4218
4708
|
});
|
|
4219
|
-
return
|
|
4709
|
+
return clone2(schema, def);
|
|
4220
4710
|
}
|
|
4221
|
-
function
|
|
4711
|
+
function omit2(schema, mask) {
|
|
4222
4712
|
const currDef = schema._zod.def;
|
|
4223
4713
|
const checks = currDef.checks;
|
|
4224
4714
|
const hasChecks = checks && checks.length > 0;
|
|
@@ -4241,10 +4731,10 @@ function omit(schema, mask) {
|
|
|
4241
4731
|
},
|
|
4242
4732
|
checks: []
|
|
4243
4733
|
});
|
|
4244
|
-
return
|
|
4734
|
+
return clone2(schema, def);
|
|
4245
4735
|
}
|
|
4246
4736
|
function extend(schema, shape) {
|
|
4247
|
-
if (!
|
|
4737
|
+
if (!isPlainObject3(shape)) {
|
|
4248
4738
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
4249
4739
|
}
|
|
4250
4740
|
const checks = schema._zod.def.checks;
|
|
@@ -4264,10 +4754,10 @@ function extend(schema, shape) {
|
|
|
4264
4754
|
return _shape;
|
|
4265
4755
|
}
|
|
4266
4756
|
});
|
|
4267
|
-
return
|
|
4757
|
+
return clone2(schema, def);
|
|
4268
4758
|
}
|
|
4269
4759
|
function safeExtend(schema, shape) {
|
|
4270
|
-
if (!
|
|
4760
|
+
if (!isPlainObject3(shape)) {
|
|
4271
4761
|
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
4272
4762
|
}
|
|
4273
4763
|
const def = mergeDefs(schema._zod.def, {
|
|
@@ -4277,7 +4767,7 @@ function safeExtend(schema, shape) {
|
|
|
4277
4767
|
return _shape;
|
|
4278
4768
|
}
|
|
4279
4769
|
});
|
|
4280
|
-
return
|
|
4770
|
+
return clone2(schema, def);
|
|
4281
4771
|
}
|
|
4282
4772
|
function merge2(a, b) {
|
|
4283
4773
|
const def = mergeDefs(a._zod.def, {
|
|
@@ -4291,9 +4781,9 @@ function merge2(a, b) {
|
|
|
4291
4781
|
},
|
|
4292
4782
|
checks: []
|
|
4293
4783
|
});
|
|
4294
|
-
return
|
|
4784
|
+
return clone2(a, def);
|
|
4295
4785
|
}
|
|
4296
|
-
function
|
|
4786
|
+
function partial2(Class, schema, mask) {
|
|
4297
4787
|
const currDef = schema._zod.def;
|
|
4298
4788
|
const checks = currDef.checks;
|
|
4299
4789
|
const hasChecks = checks && checks.length > 0;
|
|
@@ -4329,7 +4819,7 @@ function partial(Class, schema, mask) {
|
|
|
4329
4819
|
},
|
|
4330
4820
|
checks: []
|
|
4331
4821
|
});
|
|
4332
|
-
return
|
|
4822
|
+
return clone2(schema, def);
|
|
4333
4823
|
}
|
|
4334
4824
|
function required(Class, schema, mask) {
|
|
4335
4825
|
const def = mergeDefs(schema._zod.def, {
|
|
@@ -4360,7 +4850,7 @@ function required(Class, schema, mask) {
|
|
|
4360
4850
|
return shape;
|
|
4361
4851
|
}
|
|
4362
4852
|
});
|
|
4363
|
-
return
|
|
4853
|
+
return clone2(schema, def);
|
|
4364
4854
|
}
|
|
4365
4855
|
function aborted(x, startIndex = 0) {
|
|
4366
4856
|
if (x.aborted === true)
|
|
@@ -4492,7 +4982,7 @@ class Class {
|
|
|
4492
4982
|
constructor(..._args) {}
|
|
4493
4983
|
}
|
|
4494
4984
|
|
|
4495
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/errors.js
|
|
4985
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/errors.js
|
|
4496
4986
|
var initializer = (inst, def) => {
|
|
4497
4987
|
inst.name = "$ZodError";
|
|
4498
4988
|
Object.defineProperty(inst, "_zod", {
|
|
@@ -4629,7 +5119,7 @@ function prettifyError(error) {
|
|
|
4629
5119
|
`);
|
|
4630
5120
|
}
|
|
4631
5121
|
|
|
4632
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/parse.js
|
|
5122
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/parse.js
|
|
4633
5123
|
var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
4634
5124
|
const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
|
|
4635
5125
|
const result = schema._zod.run({ value, issues: [] }, ctx);
|
|
@@ -4716,7 +5206,7 @@ var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
4716
5206
|
return _safeParseAsync(_Err)(schema, value, _ctx);
|
|
4717
5207
|
};
|
|
4718
5208
|
var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
|
|
4719
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/regexes.js
|
|
5209
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/regexes.js
|
|
4720
5210
|
var exports_regexes = {};
|
|
4721
5211
|
__export(exports_regexes, {
|
|
4722
5212
|
xid: () => xid,
|
|
@@ -4873,7 +5363,7 @@ var sha512_hex = /^[0-9a-fA-F]{128}$/;
|
|
|
4873
5363
|
var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "==");
|
|
4874
5364
|
var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
|
|
4875
5365
|
|
|
4876
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/checks.js
|
|
5366
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/checks.js
|
|
4877
5367
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
4878
5368
|
var _a;
|
|
4879
5369
|
inst._zod ?? (inst._zod = {});
|
|
@@ -5420,7 +5910,7 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins
|
|
|
5420
5910
|
};
|
|
5421
5911
|
});
|
|
5422
5912
|
|
|
5423
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/doc.js
|
|
5913
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/doc.js
|
|
5424
5914
|
class Doc {
|
|
5425
5915
|
constructor(args = []) {
|
|
5426
5916
|
this.content = [];
|
|
@@ -5458,14 +5948,14 @@ class Doc {
|
|
|
5458
5948
|
}
|
|
5459
5949
|
}
|
|
5460
5950
|
|
|
5461
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/versions.js
|
|
5951
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/versions.js
|
|
5462
5952
|
var version = {
|
|
5463
5953
|
major: 4,
|
|
5464
5954
|
minor: 3,
|
|
5465
5955
|
patch: 6
|
|
5466
5956
|
};
|
|
5467
5957
|
|
|
5468
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/schemas.js
|
|
5958
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/schemas.js
|
|
5469
5959
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
5470
5960
|
var _a;
|
|
5471
5961
|
inst ?? (inst = {});
|
|
@@ -6049,15 +6539,15 @@ var $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => {
|
|
|
6049
6539
|
} catch (_err) {}
|
|
6050
6540
|
}
|
|
6051
6541
|
const input = payload.value;
|
|
6052
|
-
const
|
|
6053
|
-
const isValidDate =
|
|
6542
|
+
const isDate2 = input instanceof Date;
|
|
6543
|
+
const isValidDate = isDate2 && !Number.isNaN(input.getTime());
|
|
6054
6544
|
if (isValidDate)
|
|
6055
6545
|
return payload;
|
|
6056
6546
|
payload.issues.push({
|
|
6057
6547
|
expected: "date",
|
|
6058
6548
|
code: "invalid_type",
|
|
6059
6549
|
input,
|
|
6060
|
-
...
|
|
6550
|
+
...isDate2 ? { received: "Invalid Date" } : {},
|
|
6061
6551
|
inst
|
|
6062
6552
|
});
|
|
6063
6553
|
return payload;
|
|
@@ -6537,7 +7027,7 @@ function mergeValues(a, b) {
|
|
|
6537
7027
|
if (a instanceof Date && b instanceof Date && +a === +b) {
|
|
6538
7028
|
return { valid: true, data: a };
|
|
6539
7029
|
}
|
|
6540
|
-
if (
|
|
7030
|
+
if (isPlainObject3(a) && isPlainObject3(b)) {
|
|
6541
7031
|
const bKeys = Object.keys(b);
|
|
6542
7032
|
const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
|
|
6543
7033
|
const newObj = { ...a, ...b };
|
|
@@ -6662,8 +7152,8 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
|
|
|
6662
7152
|
}
|
|
6663
7153
|
}
|
|
6664
7154
|
if (def.rest) {
|
|
6665
|
-
const
|
|
6666
|
-
for (const el of
|
|
7155
|
+
const rest2 = input.slice(items.length);
|
|
7156
|
+
for (const el of rest2) {
|
|
6667
7157
|
i++;
|
|
6668
7158
|
const result = def.rest._zod.run({
|
|
6669
7159
|
value: el,
|
|
@@ -6691,7 +7181,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
6691
7181
|
$ZodType.init(inst, def);
|
|
6692
7182
|
inst._zod.parse = (payload, ctx) => {
|
|
6693
7183
|
const input = payload.value;
|
|
6694
|
-
if (!
|
|
7184
|
+
if (!isPlainObject3(input)) {
|
|
6695
7185
|
payload.issues.push({
|
|
6696
7186
|
expected: "record",
|
|
6697
7187
|
code: "invalid_type",
|
|
@@ -7427,7 +7917,7 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
7427
7917
|
payload.issues.push(issue(_iss));
|
|
7428
7918
|
}
|
|
7429
7919
|
}
|
|
7430
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/index.js
|
|
7920
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/index.js
|
|
7431
7921
|
var exports_locales = {};
|
|
7432
7922
|
__export(exports_locales, {
|
|
7433
7923
|
zhTW: () => zh_TW_default,
|
|
@@ -7481,7 +7971,7 @@ __export(exports_locales, {
|
|
|
7481
7971
|
ar: () => ar_default
|
|
7482
7972
|
});
|
|
7483
7973
|
|
|
7484
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ar.js
|
|
7974
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ar.js
|
|
7485
7975
|
var error = () => {
|
|
7486
7976
|
const Sizable = {
|
|
7487
7977
|
string: { unit: "حرف", verb: "أن يحوي" },
|
|
@@ -7587,7 +8077,7 @@ function ar_default() {
|
|
|
7587
8077
|
localeError: error()
|
|
7588
8078
|
};
|
|
7589
8079
|
}
|
|
7590
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/az.js
|
|
8080
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/az.js
|
|
7591
8081
|
var error2 = () => {
|
|
7592
8082
|
const Sizable = {
|
|
7593
8083
|
string: { unit: "simvol", verb: "olmalıdır" },
|
|
@@ -7692,7 +8182,7 @@ function az_default() {
|
|
|
7692
8182
|
localeError: error2()
|
|
7693
8183
|
};
|
|
7694
8184
|
}
|
|
7695
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/be.js
|
|
8185
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/be.js
|
|
7696
8186
|
function getBelarusianPlural(count, one, few, many) {
|
|
7697
8187
|
const absCount = Math.abs(count);
|
|
7698
8188
|
const lastDigit = absCount % 10;
|
|
@@ -7848,7 +8338,7 @@ function be_default() {
|
|
|
7848
8338
|
localeError: error3()
|
|
7849
8339
|
};
|
|
7850
8340
|
}
|
|
7851
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/bg.js
|
|
8341
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/bg.js
|
|
7852
8342
|
var error4 = () => {
|
|
7853
8343
|
const Sizable = {
|
|
7854
8344
|
string: { unit: "символа", verb: "да съдържа" },
|
|
@@ -7968,7 +8458,7 @@ function bg_default() {
|
|
|
7968
8458
|
localeError: error4()
|
|
7969
8459
|
};
|
|
7970
8460
|
}
|
|
7971
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ca.js
|
|
8461
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ca.js
|
|
7972
8462
|
var error5 = () => {
|
|
7973
8463
|
const Sizable = {
|
|
7974
8464
|
string: { unit: "caràcters", verb: "contenir" },
|
|
@@ -8075,7 +8565,7 @@ function ca_default() {
|
|
|
8075
8565
|
localeError: error5()
|
|
8076
8566
|
};
|
|
8077
8567
|
}
|
|
8078
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/cs.js
|
|
8568
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/cs.js
|
|
8079
8569
|
var error6 = () => {
|
|
8080
8570
|
const Sizable = {
|
|
8081
8571
|
string: { unit: "znaků", verb: "mít" },
|
|
@@ -8186,7 +8676,7 @@ function cs_default() {
|
|
|
8186
8676
|
localeError: error6()
|
|
8187
8677
|
};
|
|
8188
8678
|
}
|
|
8189
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/da.js
|
|
8679
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/da.js
|
|
8190
8680
|
var error7 = () => {
|
|
8191
8681
|
const Sizable = {
|
|
8192
8682
|
string: { unit: "tegn", verb: "havde" },
|
|
@@ -8301,7 +8791,7 @@ function da_default() {
|
|
|
8301
8791
|
localeError: error7()
|
|
8302
8792
|
};
|
|
8303
8793
|
}
|
|
8304
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/de.js
|
|
8794
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/de.js
|
|
8305
8795
|
var error8 = () => {
|
|
8306
8796
|
const Sizable = {
|
|
8307
8797
|
string: { unit: "Zeichen", verb: "zu haben" },
|
|
@@ -8409,7 +8899,7 @@ function de_default() {
|
|
|
8409
8899
|
localeError: error8()
|
|
8410
8900
|
};
|
|
8411
8901
|
}
|
|
8412
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/en.js
|
|
8902
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/en.js
|
|
8413
8903
|
var error9 = () => {
|
|
8414
8904
|
const Sizable = {
|
|
8415
8905
|
string: { unit: "characters", verb: "to have" },
|
|
@@ -8515,7 +9005,7 @@ function en_default() {
|
|
|
8515
9005
|
localeError: error9()
|
|
8516
9006
|
};
|
|
8517
9007
|
}
|
|
8518
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/eo.js
|
|
9008
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/eo.js
|
|
8519
9009
|
var error10 = () => {
|
|
8520
9010
|
const Sizable = {
|
|
8521
9011
|
string: { unit: "karaktrojn", verb: "havi" },
|
|
@@ -8624,7 +9114,7 @@ function eo_default() {
|
|
|
8624
9114
|
localeError: error10()
|
|
8625
9115
|
};
|
|
8626
9116
|
}
|
|
8627
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/es.js
|
|
9117
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/es.js
|
|
8628
9118
|
var error11 = () => {
|
|
8629
9119
|
const Sizable = {
|
|
8630
9120
|
string: { unit: "caracteres", verb: "tener" },
|
|
@@ -8756,7 +9246,7 @@ function es_default() {
|
|
|
8756
9246
|
localeError: error11()
|
|
8757
9247
|
};
|
|
8758
9248
|
}
|
|
8759
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fa.js
|
|
9249
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fa.js
|
|
8760
9250
|
var error12 = () => {
|
|
8761
9251
|
const Sizable = {
|
|
8762
9252
|
string: { unit: "کاراکتر", verb: "داشته باشد" },
|
|
@@ -8870,7 +9360,7 @@ function fa_default() {
|
|
|
8870
9360
|
localeError: error12()
|
|
8871
9361
|
};
|
|
8872
9362
|
}
|
|
8873
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fi.js
|
|
9363
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fi.js
|
|
8874
9364
|
var error13 = () => {
|
|
8875
9365
|
const Sizable = {
|
|
8876
9366
|
string: { unit: "merkkiä", subject: "merkkijonon" },
|
|
@@ -8982,7 +9472,7 @@ function fi_default() {
|
|
|
8982
9472
|
localeError: error13()
|
|
8983
9473
|
};
|
|
8984
9474
|
}
|
|
8985
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fr.js
|
|
9475
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fr.js
|
|
8986
9476
|
var error14 = () => {
|
|
8987
9477
|
const Sizable = {
|
|
8988
9478
|
string: { unit: "caractères", verb: "avoir" },
|
|
@@ -9090,7 +9580,7 @@ function fr_default() {
|
|
|
9090
9580
|
localeError: error14()
|
|
9091
9581
|
};
|
|
9092
9582
|
}
|
|
9093
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fr-CA.js
|
|
9583
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fr-CA.js
|
|
9094
9584
|
var error15 = () => {
|
|
9095
9585
|
const Sizable = {
|
|
9096
9586
|
string: { unit: "caractères", verb: "avoir" },
|
|
@@ -9197,7 +9687,7 @@ function fr_CA_default() {
|
|
|
9197
9687
|
localeError: error15()
|
|
9198
9688
|
};
|
|
9199
9689
|
}
|
|
9200
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/he.js
|
|
9690
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/he.js
|
|
9201
9691
|
var error16 = () => {
|
|
9202
9692
|
const TypeNames = {
|
|
9203
9693
|
string: { label: "מחרוזת", gender: "f" },
|
|
@@ -9390,7 +9880,7 @@ function he_default() {
|
|
|
9390
9880
|
localeError: error16()
|
|
9391
9881
|
};
|
|
9392
9882
|
}
|
|
9393
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/hu.js
|
|
9883
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/hu.js
|
|
9394
9884
|
var error17 = () => {
|
|
9395
9885
|
const Sizable = {
|
|
9396
9886
|
string: { unit: "karakter", verb: "legyen" },
|
|
@@ -9498,7 +9988,7 @@ function hu_default() {
|
|
|
9498
9988
|
localeError: error17()
|
|
9499
9989
|
};
|
|
9500
9990
|
}
|
|
9501
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/hy.js
|
|
9991
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/hy.js
|
|
9502
9992
|
function getArmenianPlural(count, one, many) {
|
|
9503
9993
|
return Math.abs(count) === 1 ? one : many;
|
|
9504
9994
|
}
|
|
@@ -9645,7 +10135,7 @@ function hy_default() {
|
|
|
9645
10135
|
localeError: error18()
|
|
9646
10136
|
};
|
|
9647
10137
|
}
|
|
9648
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/id.js
|
|
10138
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/id.js
|
|
9649
10139
|
var error19 = () => {
|
|
9650
10140
|
const Sizable = {
|
|
9651
10141
|
string: { unit: "karakter", verb: "memiliki" },
|
|
@@ -9751,7 +10241,7 @@ function id_default() {
|
|
|
9751
10241
|
localeError: error19()
|
|
9752
10242
|
};
|
|
9753
10243
|
}
|
|
9754
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/is.js
|
|
10244
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/is.js
|
|
9755
10245
|
var error20 = () => {
|
|
9756
10246
|
const Sizable = {
|
|
9757
10247
|
string: { unit: "stafi", verb: "að hafa" },
|
|
@@ -9860,7 +10350,7 @@ function is_default() {
|
|
|
9860
10350
|
localeError: error20()
|
|
9861
10351
|
};
|
|
9862
10352
|
}
|
|
9863
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/it.js
|
|
10353
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/it.js
|
|
9864
10354
|
var error21 = () => {
|
|
9865
10355
|
const Sizable = {
|
|
9866
10356
|
string: { unit: "caratteri", verb: "avere" },
|
|
@@ -9968,7 +10458,7 @@ function it_default() {
|
|
|
9968
10458
|
localeError: error21()
|
|
9969
10459
|
};
|
|
9970
10460
|
}
|
|
9971
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ja.js
|
|
10461
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ja.js
|
|
9972
10462
|
var error22 = () => {
|
|
9973
10463
|
const Sizable = {
|
|
9974
10464
|
string: { unit: "文字", verb: "である" },
|
|
@@ -10075,7 +10565,7 @@ function ja_default() {
|
|
|
10075
10565
|
localeError: error22()
|
|
10076
10566
|
};
|
|
10077
10567
|
}
|
|
10078
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ka.js
|
|
10568
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ka.js
|
|
10079
10569
|
var error23 = () => {
|
|
10080
10570
|
const Sizable = {
|
|
10081
10571
|
string: { unit: "სიმბოლო", verb: "უნდა შეიცავდეს" },
|
|
@@ -10187,7 +10677,7 @@ function ka_default() {
|
|
|
10187
10677
|
localeError: error23()
|
|
10188
10678
|
};
|
|
10189
10679
|
}
|
|
10190
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/km.js
|
|
10680
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/km.js
|
|
10191
10681
|
var error24 = () => {
|
|
10192
10682
|
const Sizable = {
|
|
10193
10683
|
string: { unit: "តួអក្សរ", verb: "គួរមាន" },
|
|
@@ -10298,11 +10788,11 @@ function km_default() {
|
|
|
10298
10788
|
};
|
|
10299
10789
|
}
|
|
10300
10790
|
|
|
10301
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/kh.js
|
|
10791
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/kh.js
|
|
10302
10792
|
function kh_default() {
|
|
10303
10793
|
return km_default();
|
|
10304
10794
|
}
|
|
10305
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ko.js
|
|
10795
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ko.js
|
|
10306
10796
|
var error25 = () => {
|
|
10307
10797
|
const Sizable = {
|
|
10308
10798
|
string: { unit: "문자", verb: "to have" },
|
|
@@ -10413,17 +10903,17 @@ function ko_default() {
|
|
|
10413
10903
|
localeError: error25()
|
|
10414
10904
|
};
|
|
10415
10905
|
}
|
|
10416
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/lt.js
|
|
10906
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/lt.js
|
|
10417
10907
|
var capitalizeFirstCharacter = (text) => {
|
|
10418
10908
|
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
10419
10909
|
};
|
|
10420
10910
|
function getUnitTypeFromNumber(number2) {
|
|
10421
10911
|
const abs = Math.abs(number2);
|
|
10422
|
-
const
|
|
10423
|
-
const
|
|
10424
|
-
if (
|
|
10912
|
+
const last2 = abs % 10;
|
|
10913
|
+
const last22 = abs % 100;
|
|
10914
|
+
if (last22 >= 11 && last22 <= 19 || last2 === 0)
|
|
10425
10915
|
return "many";
|
|
10426
|
-
if (
|
|
10916
|
+
if (last2 === 1)
|
|
10427
10917
|
return "one";
|
|
10428
10918
|
return "few";
|
|
10429
10919
|
}
|
|
@@ -10616,7 +11106,7 @@ function lt_default() {
|
|
|
10616
11106
|
localeError: error26()
|
|
10617
11107
|
};
|
|
10618
11108
|
}
|
|
10619
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/mk.js
|
|
11109
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/mk.js
|
|
10620
11110
|
var error27 = () => {
|
|
10621
11111
|
const Sizable = {
|
|
10622
11112
|
string: { unit: "знаци", verb: "да имаат" },
|
|
@@ -10725,7 +11215,7 @@ function mk_default() {
|
|
|
10725
11215
|
localeError: error27()
|
|
10726
11216
|
};
|
|
10727
11217
|
}
|
|
10728
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ms.js
|
|
11218
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ms.js
|
|
10729
11219
|
var error28 = () => {
|
|
10730
11220
|
const Sizable = {
|
|
10731
11221
|
string: { unit: "aksara", verb: "mempunyai" },
|
|
@@ -10832,7 +11322,7 @@ function ms_default() {
|
|
|
10832
11322
|
localeError: error28()
|
|
10833
11323
|
};
|
|
10834
11324
|
}
|
|
10835
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/nl.js
|
|
11325
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/nl.js
|
|
10836
11326
|
var error29 = () => {
|
|
10837
11327
|
const Sizable = {
|
|
10838
11328
|
string: { unit: "tekens", verb: "heeft" },
|
|
@@ -10942,7 +11432,7 @@ function nl_default() {
|
|
|
10942
11432
|
localeError: error29()
|
|
10943
11433
|
};
|
|
10944
11434
|
}
|
|
10945
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/no.js
|
|
11435
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/no.js
|
|
10946
11436
|
var error30 = () => {
|
|
10947
11437
|
const Sizable = {
|
|
10948
11438
|
string: { unit: "tegn", verb: "å ha" },
|
|
@@ -11050,7 +11540,7 @@ function no_default() {
|
|
|
11050
11540
|
localeError: error30()
|
|
11051
11541
|
};
|
|
11052
11542
|
}
|
|
11053
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ota.js
|
|
11543
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ota.js
|
|
11054
11544
|
var error31 = () => {
|
|
11055
11545
|
const Sizable = {
|
|
11056
11546
|
string: { unit: "harf", verb: "olmalıdır" },
|
|
@@ -11159,7 +11649,7 @@ function ota_default() {
|
|
|
11159
11649
|
localeError: error31()
|
|
11160
11650
|
};
|
|
11161
11651
|
}
|
|
11162
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ps.js
|
|
11652
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ps.js
|
|
11163
11653
|
var error32 = () => {
|
|
11164
11654
|
const Sizable = {
|
|
11165
11655
|
string: { unit: "توکي", verb: "ولري" },
|
|
@@ -11273,7 +11763,7 @@ function ps_default() {
|
|
|
11273
11763
|
localeError: error32()
|
|
11274
11764
|
};
|
|
11275
11765
|
}
|
|
11276
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/pl.js
|
|
11766
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/pl.js
|
|
11277
11767
|
var error33 = () => {
|
|
11278
11768
|
const Sizable = {
|
|
11279
11769
|
string: { unit: "znaków", verb: "mieć" },
|
|
@@ -11382,7 +11872,7 @@ function pl_default() {
|
|
|
11382
11872
|
localeError: error33()
|
|
11383
11873
|
};
|
|
11384
11874
|
}
|
|
11385
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/pt.js
|
|
11875
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/pt.js
|
|
11386
11876
|
var error34 = () => {
|
|
11387
11877
|
const Sizable = {
|
|
11388
11878
|
string: { unit: "caracteres", verb: "ter" },
|
|
@@ -11490,7 +11980,7 @@ function pt_default() {
|
|
|
11490
11980
|
localeError: error34()
|
|
11491
11981
|
};
|
|
11492
11982
|
}
|
|
11493
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ru.js
|
|
11983
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ru.js
|
|
11494
11984
|
function getRussianPlural(count, one, few, many) {
|
|
11495
11985
|
const absCount = Math.abs(count);
|
|
11496
11986
|
const lastDigit = absCount % 10;
|
|
@@ -11646,7 +12136,7 @@ function ru_default() {
|
|
|
11646
12136
|
localeError: error35()
|
|
11647
12137
|
};
|
|
11648
12138
|
}
|
|
11649
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/sl.js
|
|
12139
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/sl.js
|
|
11650
12140
|
var error36 = () => {
|
|
11651
12141
|
const Sizable = {
|
|
11652
12142
|
string: { unit: "znakov", verb: "imeti" },
|
|
@@ -11755,7 +12245,7 @@ function sl_default() {
|
|
|
11755
12245
|
localeError: error36()
|
|
11756
12246
|
};
|
|
11757
12247
|
}
|
|
11758
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/sv.js
|
|
12248
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/sv.js
|
|
11759
12249
|
var error37 = () => {
|
|
11760
12250
|
const Sizable = {
|
|
11761
12251
|
string: { unit: "tecken", verb: "att ha" },
|
|
@@ -11865,7 +12355,7 @@ function sv_default() {
|
|
|
11865
12355
|
localeError: error37()
|
|
11866
12356
|
};
|
|
11867
12357
|
}
|
|
11868
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ta.js
|
|
12358
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ta.js
|
|
11869
12359
|
var error38 = () => {
|
|
11870
12360
|
const Sizable = {
|
|
11871
12361
|
string: { unit: "எழுத்துக்கள்", verb: "கொண்டிருக்க வேண்டும்" },
|
|
@@ -11975,7 +12465,7 @@ function ta_default() {
|
|
|
11975
12465
|
localeError: error38()
|
|
11976
12466
|
};
|
|
11977
12467
|
}
|
|
11978
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/th.js
|
|
12468
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/th.js
|
|
11979
12469
|
var error39 = () => {
|
|
11980
12470
|
const Sizable = {
|
|
11981
12471
|
string: { unit: "ตัวอักษร", verb: "ควรมี" },
|
|
@@ -12085,7 +12575,7 @@ function th_default() {
|
|
|
12085
12575
|
localeError: error39()
|
|
12086
12576
|
};
|
|
12087
12577
|
}
|
|
12088
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/tr.js
|
|
12578
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/tr.js
|
|
12089
12579
|
var error40 = () => {
|
|
12090
12580
|
const Sizable = {
|
|
12091
12581
|
string: { unit: "karakter", verb: "olmalı" },
|
|
@@ -12190,7 +12680,7 @@ function tr_default() {
|
|
|
12190
12680
|
localeError: error40()
|
|
12191
12681
|
};
|
|
12192
12682
|
}
|
|
12193
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/uk.js
|
|
12683
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/uk.js
|
|
12194
12684
|
var error41 = () => {
|
|
12195
12685
|
const Sizable = {
|
|
12196
12686
|
string: { unit: "символів", verb: "матиме" },
|
|
@@ -12299,11 +12789,11 @@ function uk_default() {
|
|
|
12299
12789
|
};
|
|
12300
12790
|
}
|
|
12301
12791
|
|
|
12302
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ua.js
|
|
12792
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ua.js
|
|
12303
12793
|
function ua_default() {
|
|
12304
12794
|
return uk_default();
|
|
12305
12795
|
}
|
|
12306
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ur.js
|
|
12796
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ur.js
|
|
12307
12797
|
var error42 = () => {
|
|
12308
12798
|
const Sizable = {
|
|
12309
12799
|
string: { unit: "حروف", verb: "ہونا" },
|
|
@@ -12413,7 +12903,7 @@ function ur_default() {
|
|
|
12413
12903
|
localeError: error42()
|
|
12414
12904
|
};
|
|
12415
12905
|
}
|
|
12416
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/uz.js
|
|
12906
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/uz.js
|
|
12417
12907
|
var error43 = () => {
|
|
12418
12908
|
const Sizable = {
|
|
12419
12909
|
string: { unit: "belgi", verb: "bo‘lishi kerak" },
|
|
@@ -12522,7 +13012,7 @@ function uz_default() {
|
|
|
12522
13012
|
localeError: error43()
|
|
12523
13013
|
};
|
|
12524
13014
|
}
|
|
12525
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/vi.js
|
|
13015
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/vi.js
|
|
12526
13016
|
var error44 = () => {
|
|
12527
13017
|
const Sizable = {
|
|
12528
13018
|
string: { unit: "ký tự", verb: "có" },
|
|
@@ -12630,7 +13120,7 @@ function vi_default() {
|
|
|
12630
13120
|
localeError: error44()
|
|
12631
13121
|
};
|
|
12632
13122
|
}
|
|
12633
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/zh-CN.js
|
|
13123
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/zh-CN.js
|
|
12634
13124
|
var error45 = () => {
|
|
12635
13125
|
const Sizable = {
|
|
12636
13126
|
string: { unit: "字符", verb: "包含" },
|
|
@@ -12739,7 +13229,7 @@ function zh_CN_default() {
|
|
|
12739
13229
|
localeError: error45()
|
|
12740
13230
|
};
|
|
12741
13231
|
}
|
|
12742
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/zh-TW.js
|
|
13232
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/zh-TW.js
|
|
12743
13233
|
var error46 = () => {
|
|
12744
13234
|
const Sizable = {
|
|
12745
13235
|
string: { unit: "字元", verb: "擁有" },
|
|
@@ -12846,7 +13336,7 @@ function zh_TW_default() {
|
|
|
12846
13336
|
localeError: error46()
|
|
12847
13337
|
};
|
|
12848
13338
|
}
|
|
12849
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/yo.js
|
|
13339
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/yo.js
|
|
12850
13340
|
var error47 = () => {
|
|
12851
13341
|
const Sizable = {
|
|
12852
13342
|
string: { unit: "àmi", verb: "ní" },
|
|
@@ -12953,7 +13443,7 @@ function yo_default() {
|
|
|
12953
13443
|
localeError: error47()
|
|
12954
13444
|
};
|
|
12955
13445
|
}
|
|
12956
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/registries.js
|
|
13446
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/registries.js
|
|
12957
13447
|
var _a;
|
|
12958
13448
|
var $output = Symbol("ZodOutput");
|
|
12959
13449
|
var $input = Symbol("ZodInput");
|
|
@@ -13003,7 +13493,7 @@ function registry() {
|
|
|
13003
13493
|
}
|
|
13004
13494
|
(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
|
|
13005
13495
|
var globalRegistry = globalThis.__zod_globalRegistry;
|
|
13006
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/api.js
|
|
13496
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/api.js
|
|
13007
13497
|
function _string(Class2, params) {
|
|
13008
13498
|
return new Class2({
|
|
13009
13499
|
type: "string",
|
|
@@ -13649,11 +14139,11 @@ function _intersection(Class2, left, right) {
|
|
|
13649
14139
|
function _tuple(Class2, items, _paramsOrRest, _params) {
|
|
13650
14140
|
const hasRest = _paramsOrRest instanceof $ZodType;
|
|
13651
14141
|
const params = hasRest ? _params : _paramsOrRest;
|
|
13652
|
-
const
|
|
14142
|
+
const rest2 = hasRest ? _paramsOrRest : null;
|
|
13653
14143
|
return new Class2({
|
|
13654
14144
|
type: "tuple",
|
|
13655
14145
|
items,
|
|
13656
|
-
rest,
|
|
14146
|
+
rest: rest2,
|
|
13657
14147
|
...normalizeParams(params)
|
|
13658
14148
|
});
|
|
13659
14149
|
}
|
|
@@ -13923,7 +14413,7 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
|
|
|
13923
14413
|
const inst = new Class2(def);
|
|
13924
14414
|
return inst;
|
|
13925
14415
|
}
|
|
13926
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.js
|
|
14416
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.js
|
|
13927
14417
|
function initializeContext(params) {
|
|
13928
14418
|
let target = params?.target ?? "draft-2020-12";
|
|
13929
14419
|
if (target === "draft-4")
|
|
@@ -14268,7 +14758,7 @@ var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) =
|
|
|
14268
14758
|
extractDefs(ctx, schema);
|
|
14269
14759
|
return finalize(ctx, schema);
|
|
14270
14760
|
};
|
|
14271
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema-processors.js
|
|
14761
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema-processors.js
|
|
14272
14762
|
var formatMap = {
|
|
14273
14763
|
guid: "uuid",
|
|
14274
14764
|
url: "uri",
|
|
@@ -14593,30 +15083,30 @@ var tupleProcessor = (schema, ctx, _json, params) => {
|
|
|
14593
15083
|
...params,
|
|
14594
15084
|
path: [...params.path, prefixPath, i]
|
|
14595
15085
|
}));
|
|
14596
|
-
const
|
|
15086
|
+
const rest2 = def.rest ? process2(def.rest, ctx, {
|
|
14597
15087
|
...params,
|
|
14598
15088
|
path: [...params.path, restPath, ...ctx.target === "openapi-3.0" ? [def.items.length] : []]
|
|
14599
15089
|
}) : null;
|
|
14600
15090
|
if (ctx.target === "draft-2020-12") {
|
|
14601
15091
|
json.prefixItems = prefixItems;
|
|
14602
|
-
if (
|
|
14603
|
-
json.items =
|
|
15092
|
+
if (rest2) {
|
|
15093
|
+
json.items = rest2;
|
|
14604
15094
|
}
|
|
14605
15095
|
} else if (ctx.target === "openapi-3.0") {
|
|
14606
15096
|
json.items = {
|
|
14607
15097
|
anyOf: prefixItems
|
|
14608
15098
|
};
|
|
14609
|
-
if (
|
|
14610
|
-
json.items.anyOf.push(
|
|
15099
|
+
if (rest2) {
|
|
15100
|
+
json.items.anyOf.push(rest2);
|
|
14611
15101
|
}
|
|
14612
15102
|
json.minItems = prefixItems.length;
|
|
14613
|
-
if (!
|
|
15103
|
+
if (!rest2) {
|
|
14614
15104
|
json.maxItems = prefixItems.length;
|
|
14615
15105
|
}
|
|
14616
15106
|
} else {
|
|
14617
15107
|
json.items = prefixItems;
|
|
14618
|
-
if (
|
|
14619
|
-
json.additionalItems =
|
|
15108
|
+
if (rest2) {
|
|
15109
|
+
json.additionalItems = rest2;
|
|
14620
15110
|
}
|
|
14621
15111
|
}
|
|
14622
15112
|
const { minimum, maximum } = schema._zod.bag;
|
|
@@ -14813,7 +15303,7 @@ function toJSONSchema(input, params) {
|
|
|
14813
15303
|
extractDefs(ctx, input);
|
|
14814
15304
|
return finalize(ctx, input);
|
|
14815
15305
|
}
|
|
14816
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema-generator.js
|
|
15306
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema-generator.js
|
|
14817
15307
|
class JSONSchemaGenerator {
|
|
14818
15308
|
get metadataRegistry() {
|
|
14819
15309
|
return this.ctx.metadataRegistry;
|
|
@@ -14872,12 +15362,12 @@ class JSONSchemaGenerator {
|
|
|
14872
15362
|
return plainResult;
|
|
14873
15363
|
}
|
|
14874
15364
|
}
|
|
14875
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema.js
|
|
15365
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema.js
|
|
14876
15366
|
var exports_json_schema = {};
|
|
14877
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/schemas.js
|
|
15367
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/schemas.js
|
|
14878
15368
|
var exports_schemas2 = {};
|
|
14879
15369
|
__export(exports_schemas2, {
|
|
14880
|
-
xor: () =>
|
|
15370
|
+
xor: () => xor2,
|
|
14881
15371
|
xid: () => xid2,
|
|
14882
15372
|
void: () => _void2,
|
|
14883
15373
|
uuidv7: () => uuidv7,
|
|
@@ -14886,7 +15376,7 @@ __export(exports_schemas2, {
|
|
|
14886
15376
|
uuid: () => uuid2,
|
|
14887
15377
|
url: () => url,
|
|
14888
15378
|
unknown: () => unknown,
|
|
14889
|
-
union: () =>
|
|
15379
|
+
union: () => union2,
|
|
14890
15380
|
undefined: () => _undefined3,
|
|
14891
15381
|
ulid: () => ulid2,
|
|
14892
15382
|
uint64: () => uint64,
|
|
@@ -14934,7 +15424,7 @@ __export(exports_schemas2, {
|
|
|
14934
15424
|
json: () => json,
|
|
14935
15425
|
ipv6: () => ipv62,
|
|
14936
15426
|
ipv4: () => ipv42,
|
|
14937
|
-
intersection: () =>
|
|
15427
|
+
intersection: () => intersection2,
|
|
14938
15428
|
int64: () => int64,
|
|
14939
15429
|
int32: () => int32,
|
|
14940
15430
|
int: () => int,
|
|
@@ -15043,7 +15533,7 @@ __export(exports_schemas2, {
|
|
|
15043
15533
|
ZodAny: () => ZodAny
|
|
15044
15534
|
});
|
|
15045
15535
|
|
|
15046
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/checks.js
|
|
15536
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/checks.js
|
|
15047
15537
|
var exports_checks2 = {};
|
|
15048
15538
|
__export(exports_checks2, {
|
|
15049
15539
|
uppercase: () => _uppercase,
|
|
@@ -15077,7 +15567,7 @@ __export(exports_checks2, {
|
|
|
15077
15567
|
endsWith: () => _endsWith
|
|
15078
15568
|
});
|
|
15079
15569
|
|
|
15080
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/iso.js
|
|
15570
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/iso.js
|
|
15081
15571
|
var exports_iso = {};
|
|
15082
15572
|
__export(exports_iso, {
|
|
15083
15573
|
time: () => time2,
|
|
@@ -15118,7 +15608,7 @@ function duration2(params) {
|
|
|
15118
15608
|
return _isoDuration(ZodISODuration, params);
|
|
15119
15609
|
}
|
|
15120
15610
|
|
|
15121
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/errors.js
|
|
15611
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/errors.js
|
|
15122
15612
|
var initializer2 = (inst, issues) => {
|
|
15123
15613
|
$ZodError.init(inst, issues);
|
|
15124
15614
|
inst.name = "ZodError";
|
|
@@ -15153,7 +15643,7 @@ var ZodRealError = $constructor("ZodError", initializer2, {
|
|
|
15153
15643
|
Parent: Error
|
|
15154
15644
|
});
|
|
15155
15645
|
|
|
15156
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/parse.js
|
|
15646
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/parse.js
|
|
15157
15647
|
var parse3 = /* @__PURE__ */ _parse(ZodRealError);
|
|
15158
15648
|
var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError);
|
|
15159
15649
|
var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError);
|
|
@@ -15167,7 +15657,7 @@ var safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError);
|
|
|
15167
15657
|
var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
15168
15658
|
var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
15169
15659
|
|
|
15170
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/schemas.js
|
|
15660
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/schemas.js
|
|
15171
15661
|
var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
15172
15662
|
$ZodType.init(inst, def);
|
|
15173
15663
|
Object.assign(inst["~standard"], {
|
|
@@ -15191,7 +15681,7 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
15191
15681
|
});
|
|
15192
15682
|
};
|
|
15193
15683
|
inst.with = inst.check;
|
|
15194
|
-
inst.clone = (def2, params) =>
|
|
15684
|
+
inst.clone = (def2, params) => clone2(inst, def2, params);
|
|
15195
15685
|
inst.brand = () => inst;
|
|
15196
15686
|
inst.register = (reg, meta2) => {
|
|
15197
15687
|
reg.add(inst, meta2);
|
|
@@ -15219,8 +15709,8 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
15219
15709
|
inst.nullish = () => optional(nullable(inst));
|
|
15220
15710
|
inst.nonoptional = (params) => nonoptional(inst, params);
|
|
15221
15711
|
inst.array = () => array(inst);
|
|
15222
|
-
inst.or = (arg) =>
|
|
15223
|
-
inst.and = (arg) =>
|
|
15712
|
+
inst.or = (arg) => union2([inst, arg]);
|
|
15713
|
+
inst.and = (arg) => intersection2(inst, arg);
|
|
15224
15714
|
inst.transform = (tx) => pipe(inst, transform(tx));
|
|
15225
15715
|
inst.default = (def2) => _default2(inst, def2);
|
|
15226
15716
|
inst.prefault = (def2) => prefault(inst, def2);
|
|
@@ -15723,7 +16213,7 @@ var ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => {
|
|
|
15723
16213
|
inst._zod.processJSONSchema = (ctx, json, params) => unionProcessor(inst, ctx, json, params);
|
|
15724
16214
|
inst.options = def.options;
|
|
15725
16215
|
});
|
|
15726
|
-
function
|
|
16216
|
+
function union2(options, params) {
|
|
15727
16217
|
return new ZodUnion({
|
|
15728
16218
|
type: "union",
|
|
15729
16219
|
options,
|
|
@@ -15736,7 +16226,7 @@ var ZodXor = /* @__PURE__ */ $constructor("ZodXor", (inst, def) => {
|
|
|
15736
16226
|
inst._zod.processJSONSchema = (ctx, json, params) => unionProcessor(inst, ctx, json, params);
|
|
15737
16227
|
inst.options = def.options;
|
|
15738
16228
|
});
|
|
15739
|
-
function
|
|
16229
|
+
function xor2(options, params) {
|
|
15740
16230
|
return new ZodXor({
|
|
15741
16231
|
type: "union",
|
|
15742
16232
|
options,
|
|
@@ -15761,7 +16251,7 @@ var ZodIntersection = /* @__PURE__ */ $constructor("ZodIntersection", (inst, def
|
|
|
15761
16251
|
ZodType.init(inst, def);
|
|
15762
16252
|
inst._zod.processJSONSchema = (ctx, json, params) => intersectionProcessor(inst, ctx, json, params);
|
|
15763
16253
|
});
|
|
15764
|
-
function
|
|
16254
|
+
function intersection2(left, right) {
|
|
15765
16255
|
return new ZodIntersection({
|
|
15766
16256
|
type: "intersection",
|
|
15767
16257
|
left,
|
|
@@ -15772,19 +16262,19 @@ var ZodTuple = /* @__PURE__ */ $constructor("ZodTuple", (inst, def) => {
|
|
|
15772
16262
|
$ZodTuple.init(inst, def);
|
|
15773
16263
|
ZodType.init(inst, def);
|
|
15774
16264
|
inst._zod.processJSONSchema = (ctx, json, params) => tupleProcessor(inst, ctx, json, params);
|
|
15775
|
-
inst.rest = (
|
|
16265
|
+
inst.rest = (rest2) => inst.clone({
|
|
15776
16266
|
...inst._zod.def,
|
|
15777
|
-
rest
|
|
16267
|
+
rest: rest2
|
|
15778
16268
|
});
|
|
15779
16269
|
});
|
|
15780
16270
|
function tuple(items, _paramsOrRest, _params) {
|
|
15781
16271
|
const hasRest = _paramsOrRest instanceof $ZodType;
|
|
15782
16272
|
const params = hasRest ? _params : _paramsOrRest;
|
|
15783
|
-
const
|
|
16273
|
+
const rest2 = hasRest ? _paramsOrRest : null;
|
|
15784
16274
|
return new ZodTuple({
|
|
15785
16275
|
type: "tuple",
|
|
15786
16276
|
items,
|
|
15787
|
-
rest,
|
|
16277
|
+
rest: rest2,
|
|
15788
16278
|
...exports_util.normalizeParams(params)
|
|
15789
16279
|
});
|
|
15790
16280
|
}
|
|
@@ -15804,7 +16294,7 @@ function record(keyType, valueType, params) {
|
|
|
15804
16294
|
});
|
|
15805
16295
|
}
|
|
15806
16296
|
function partialRecord(keyType, valueType, params) {
|
|
15807
|
-
const k =
|
|
16297
|
+
const k = clone2(keyType);
|
|
15808
16298
|
k._zod.values = undefined;
|
|
15809
16299
|
return new ZodRecord({
|
|
15810
16300
|
type: "record",
|
|
@@ -16236,14 +16726,14 @@ var stringbool = (...args) => _stringbool({
|
|
|
16236
16726
|
}, ...args);
|
|
16237
16727
|
function json(params) {
|
|
16238
16728
|
const jsonSchema = lazy(() => {
|
|
16239
|
-
return
|
|
16729
|
+
return union2([string2(params), number2(), boolean2(), _null3(), array(jsonSchema), record(string2(), jsonSchema)]);
|
|
16240
16730
|
});
|
|
16241
16731
|
return jsonSchema;
|
|
16242
16732
|
}
|
|
16243
16733
|
function preprocess(fn, schema) {
|
|
16244
16734
|
return pipe(transform(fn), schema);
|
|
16245
16735
|
}
|
|
16246
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/compat.js
|
|
16736
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/compat.js
|
|
16247
16737
|
var ZodIssueCode = {
|
|
16248
16738
|
invalid_type: "invalid_type",
|
|
16249
16739
|
too_big: "too_big",
|
|
@@ -16267,7 +16757,7 @@ function getErrorMap() {
|
|
|
16267
16757
|
}
|
|
16268
16758
|
var ZodFirstPartyTypeKind;
|
|
16269
16759
|
(function(ZodFirstPartyTypeKind2) {})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
|
|
16270
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/from-json-schema.js
|
|
16760
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/from-json-schema.js
|
|
16271
16761
|
var z = {
|
|
16272
16762
|
...exports_schemas2,
|
|
16273
16763
|
...exports_checks2,
|
|
@@ -16603,9 +17093,9 @@ function convertBaseSchema(schema, ctx) {
|
|
|
16603
17093
|
const items = schema.items;
|
|
16604
17094
|
if (prefixItems && Array.isArray(prefixItems)) {
|
|
16605
17095
|
const tupleItems = prefixItems.map((item) => convertSchema(item, ctx));
|
|
16606
|
-
const
|
|
16607
|
-
if (
|
|
16608
|
-
zodSchema = z.tuple(tupleItems).rest(
|
|
17096
|
+
const rest2 = items && typeof items === "object" && !Array.isArray(items) ? convertSchema(items, ctx) : undefined;
|
|
17097
|
+
if (rest2) {
|
|
17098
|
+
zodSchema = z.tuple(tupleItems).rest(rest2);
|
|
16609
17099
|
} else {
|
|
16610
17100
|
zodSchema = z.tuple(tupleItems);
|
|
16611
17101
|
}
|
|
@@ -16617,9 +17107,9 @@ function convertBaseSchema(schema, ctx) {
|
|
|
16617
17107
|
}
|
|
16618
17108
|
} else if (Array.isArray(items)) {
|
|
16619
17109
|
const tupleItems = items.map((item) => convertSchema(item, ctx));
|
|
16620
|
-
const
|
|
16621
|
-
if (
|
|
16622
|
-
zodSchema = z.tuple(tupleItems).rest(
|
|
17110
|
+
const rest2 = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema(schema.additionalItems, ctx) : undefined;
|
|
17111
|
+
if (rest2) {
|
|
17112
|
+
zodSchema = z.tuple(tupleItems).rest(rest2);
|
|
16623
17113
|
} else {
|
|
16624
17114
|
zodSchema = z.tuple(tupleItems);
|
|
16625
17115
|
}
|
|
@@ -16728,7 +17218,7 @@ function fromJSONSchema(schema, params) {
|
|
|
16728
17218
|
};
|
|
16729
17219
|
return convertSchema(schema, ctx);
|
|
16730
17220
|
}
|
|
16731
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/coerce.js
|
|
17221
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/coerce.js
|
|
16732
17222
|
var exports_coerce = {};
|
|
16733
17223
|
__export(exports_coerce, {
|
|
16734
17224
|
string: () => string3,
|
|
@@ -16753,12 +17243,12 @@ function date4(params) {
|
|
|
16753
17243
|
return _coercedDate(ZodDate, params);
|
|
16754
17244
|
}
|
|
16755
17245
|
|
|
16756
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/external.js
|
|
17246
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/external.js
|
|
16757
17247
|
config(en_default());
|
|
16758
|
-
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/index.js
|
|
17248
|
+
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/index.js
|
|
16759
17249
|
var zod_default = exports_external;
|
|
16760
17250
|
|
|
16761
|
-
// node_modules/.pnpm/nanoid@5.1.6/node_modules/nanoid/index.js
|
|
17251
|
+
// ../../node_modules/.pnpm/nanoid@5.1.6/node_modules/nanoid/index.js
|
|
16762
17252
|
import { webcrypto as crypto } from "node:crypto";
|
|
16763
17253
|
var POOL_SIZE_MULTIPLIER = 128;
|
|
16764
17254
|
var pool;
|
|
@@ -16774,7 +17264,7 @@ function fillPool(bytes) {
|
|
|
16774
17264
|
}
|
|
16775
17265
|
poolOffset += bytes;
|
|
16776
17266
|
}
|
|
16777
|
-
function
|
|
17267
|
+
function random2(bytes) {
|
|
16778
17268
|
fillPool(bytes |= 0);
|
|
16779
17269
|
return pool.subarray(poolOffset - bytes, poolOffset);
|
|
16780
17270
|
}
|
|
@@ -16797,14 +17287,18 @@ function customRandom(alphabet, defaultSize, getRandom) {
|
|
|
16797
17287
|
};
|
|
16798
17288
|
}
|
|
16799
17289
|
function customAlphabet(alphabet, size = 21) {
|
|
16800
|
-
return customRandom(alphabet, size,
|
|
17290
|
+
return customRandom(alphabet, size, random2);
|
|
16801
17291
|
}
|
|
16802
17292
|
|
|
16803
17293
|
// src/utils/random.ts
|
|
17294
|
+
var import_md5 = __toESM(require_md5(), 1);
|
|
16804
17295
|
var nanoid3 = customAlphabet("abcdefghijklmnopqrstuvwxyz", 16);
|
|
16805
17296
|
var randomId = (length = 8, affix = "") => {
|
|
16806
17297
|
return affix + nanoid3(length);
|
|
16807
17298
|
};
|
|
17299
|
+
var hashIdMd5Sync = (pathKey) => {
|
|
17300
|
+
return import_md5.default(pathKey).toString().substring(0, 16);
|
|
17301
|
+
};
|
|
16808
17302
|
|
|
16809
17303
|
// src/validator/schema.ts
|
|
16810
17304
|
var extractArgs = (args) => {
|
|
@@ -16826,7 +17320,7 @@ var toJSONSchema2 = (args, opts) => {
|
|
|
16826
17320
|
jsonSchema.optional = true;
|
|
16827
17321
|
}
|
|
16828
17322
|
};
|
|
16829
|
-
const
|
|
17323
|
+
const isError2 = (keys2) => {
|
|
16830
17324
|
const errorKeys = ["toJSONSchema", "def", "type", "parse"];
|
|
16831
17325
|
const hasErrorKeys = errorKeys.every((key) => keys2.includes(key));
|
|
16832
17326
|
return hasErrorKeys;
|
|
@@ -16836,7 +17330,7 @@ var toJSONSchema2 = (args, opts) => {
|
|
|
16836
17330
|
if (typeof args === "object" && typeof args.toJSONSchema === "function") {
|
|
16837
17331
|
return args.toJSONSchema();
|
|
16838
17332
|
}
|
|
16839
|
-
if (
|
|
17333
|
+
if (isError2(Object.keys(args))) {
|
|
16840
17334
|
return {};
|
|
16841
17335
|
}
|
|
16842
17336
|
const schema = exports_external.object(args);
|
|
@@ -16844,7 +17338,7 @@ var toJSONSchema2 = (args, opts) => {
|
|
|
16844
17338
|
}
|
|
16845
17339
|
args = extractArgs(args);
|
|
16846
17340
|
let keys = Object.keys(args);
|
|
16847
|
-
if (
|
|
17341
|
+
if (isError2(keys)) {
|
|
16848
17342
|
console.error(`[toJSONSchema error]: 解析到的 schema 可能不正确,包含了zod默认的value的schema. 请检查输入的 schema 是否正确。`);
|
|
16849
17343
|
args = {};
|
|
16850
17344
|
keys = [];
|
|
@@ -16929,12 +17423,9 @@ class Route {
|
|
|
16929
17423
|
key = key.trim();
|
|
16930
17424
|
this.path = path;
|
|
16931
17425
|
this.key = key;
|
|
17426
|
+
const pathKey = `${path}$$${key}`;
|
|
16932
17427
|
if (opts) {
|
|
16933
|
-
this.id = opts.id ||
|
|
16934
|
-
if (!opts.id && opts.idUsePath) {
|
|
16935
|
-
const delimiter = opts.delimiter ?? "$$";
|
|
16936
|
-
this.id = path + delimiter + key;
|
|
16937
|
-
}
|
|
17428
|
+
this.id = opts.id || hashIdMd5Sync(pathKey);
|
|
16938
17429
|
this.run = opts.run;
|
|
16939
17430
|
this.nextRoute = opts.nextRoute;
|
|
16940
17431
|
this.description = opts.description;
|
|
@@ -16945,7 +17436,9 @@ class Route {
|
|
|
16945
17436
|
this.path = opts.path || path;
|
|
16946
17437
|
} else {
|
|
16947
17438
|
this.middleware = [];
|
|
16948
|
-
|
|
17439
|
+
}
|
|
17440
|
+
if (!this.id) {
|
|
17441
|
+
this.id = hashIdMd5Sync(pathKey);
|
|
16949
17442
|
}
|
|
16950
17443
|
this.isDebug = opts?.isDebug ?? false;
|
|
16951
17444
|
}
|
|
@@ -17083,8 +17576,8 @@ class QueryRouter {
|
|
|
17083
17576
|
for (let i = 0;i < m.middleware.length; i++) {
|
|
17084
17577
|
const item = m.middleware[i];
|
|
17085
17578
|
let route2;
|
|
17086
|
-
const
|
|
17087
|
-
if (
|
|
17579
|
+
const isString2 = typeof item === "string";
|
|
17580
|
+
if (isString2) {
|
|
17088
17581
|
route2 = this.routes.find((r) => r.id === item);
|
|
17089
17582
|
} else {
|
|
17090
17583
|
route2 = this.routes.find((r) => {
|
|
@@ -17096,7 +17589,7 @@ class QueryRouter {
|
|
|
17096
17589
|
});
|
|
17097
17590
|
}
|
|
17098
17591
|
if (!route2) {
|
|
17099
|
-
if (
|
|
17592
|
+
if (isString2) {
|
|
17100
17593
|
errorMiddleware.push({
|
|
17101
17594
|
id: item
|
|
17102
17595
|
});
|
|
@@ -17434,8 +17927,8 @@ import https from "node:https";
|
|
|
17434
17927
|
import http2 from "node:http2";
|
|
17435
17928
|
|
|
17436
17929
|
// src/utils/is-engine.ts
|
|
17437
|
-
var
|
|
17438
|
-
var
|
|
17930
|
+
var isNode2 = typeof process !== "undefined" && process.versions != null && process.versions.node != null;
|
|
17931
|
+
var isBrowser2 = typeof window !== "undefined" && typeof document !== "undefined" && typeof document.createElement === "function";
|
|
17439
17932
|
var isDeno = typeof Deno !== "undefined" && typeof Deno.version === "object" && typeof Deno.version.deno === "string";
|
|
17440
17933
|
var isBun = typeof Bun !== "undefined" && typeof Bun.version === "string";
|
|
17441
17934
|
|
|
@@ -17476,8 +17969,8 @@ var parseBody = async (req) => {
|
|
|
17476
17969
|
}
|
|
17477
17970
|
return new Promise((resolve, reject) => {
|
|
17478
17971
|
const arr = [];
|
|
17479
|
-
req.on("data", (
|
|
17480
|
-
arr.push(
|
|
17972
|
+
req.on("data", (chunk2) => {
|
|
17973
|
+
arr.push(chunk2);
|
|
17481
17974
|
});
|
|
17482
17975
|
req.on("end", () => {
|
|
17483
17976
|
try {
|
|
@@ -17599,7 +18092,7 @@ function stringifySetCookie(_name, _val, _opts) {
|
|
|
17599
18092
|
str += "; Path=" + cookie.path;
|
|
17600
18093
|
}
|
|
17601
18094
|
if (cookie.expires) {
|
|
17602
|
-
if (!
|
|
18095
|
+
if (!isDate2(cookie.expires) || !Number.isFinite(cookie.expires.valueOf())) {
|
|
17603
18096
|
throw new TypeError(`option expires is invalid: ${cookie.expires}`);
|
|
17604
18097
|
}
|
|
17605
18098
|
str += "; Expires=" + cookie.expires.toUTCString();
|
|
@@ -17681,7 +18174,7 @@ function decode3(str) {
|
|
|
17681
18174
|
return str;
|
|
17682
18175
|
}
|
|
17683
18176
|
}
|
|
17684
|
-
function
|
|
18177
|
+
function isDate2(val) {
|
|
17685
18178
|
return __toString.call(val) === "[object Date]";
|
|
17686
18179
|
}
|
|
17687
18180
|
|
|
@@ -17884,7 +18377,7 @@ class ServerBase {
|
|
|
17884
18377
|
return;
|
|
17885
18378
|
}
|
|
17886
18379
|
}
|
|
17887
|
-
const { type, data: typeData, ...
|
|
18380
|
+
const { type, data: typeData, ...rest2 } = data;
|
|
17888
18381
|
if (!type) {
|
|
17889
18382
|
ws.send(JSON.stringify({ code: 500, message: "type is required" }));
|
|
17890
18383
|
return;
|
|
@@ -17892,7 +18385,7 @@ class ServerBase {
|
|
|
17892
18385
|
const res = {
|
|
17893
18386
|
type,
|
|
17894
18387
|
data: {},
|
|
17895
|
-
...
|
|
18388
|
+
...rest2
|
|
17896
18389
|
};
|
|
17897
18390
|
const end = (data2, all) => {
|
|
17898
18391
|
const result = {
|
|
@@ -17939,7 +18432,7 @@ class ServerBase {
|
|
|
17939
18432
|
}
|
|
17940
18433
|
}
|
|
17941
18434
|
|
|
17942
|
-
// node_modules/.pnpm/@kevisual+ws@8.
|
|
18435
|
+
// ../../node_modules/.pnpm/@kevisual+ws@8.19.0/node_modules/@kevisual/ws/wrapper.mjs
|
|
17943
18436
|
var import_stream = __toESM(require_stream(), 1);
|
|
17944
18437
|
var import_receiver = __toESM(require_receiver(), 1);
|
|
17945
18438
|
var import_sender = __toESM(require_sender(), 1);
|
|
@@ -18009,11 +18502,11 @@ class WsServer extends WsServerBase {
|
|
|
18009
18502
|
super.listen();
|
|
18010
18503
|
const server = this.server;
|
|
18011
18504
|
const wss = this.wss;
|
|
18012
|
-
server.server.on("upgrade", (req, socket,
|
|
18505
|
+
server.server.on("upgrade", (req, socket, head2) => {
|
|
18013
18506
|
const url3 = new URL(req.url, "http://localhost");
|
|
18014
18507
|
const listenPath = this.server.listeners.map((item) => item.path).filter((item) => item);
|
|
18015
18508
|
if (listenPath.includes(url3.pathname) || url3.pathname === this.server.path) {
|
|
18016
|
-
wss.handleUpgrade(req, socket,
|
|
18509
|
+
wss.handleUpgrade(req, socket, head2, (ws) => {
|
|
18017
18510
|
wss.emit("connection", ws, req);
|
|
18018
18511
|
});
|
|
18019
18512
|
} else {
|
|
@@ -18209,7 +18702,7 @@ class BunServer extends ServerBase {
|
|
|
18209
18702
|
}
|
|
18210
18703
|
this.setHeader("Set-Cookie", cookieString);
|
|
18211
18704
|
},
|
|
18212
|
-
write(
|
|
18705
|
+
write(chunk2, encoding, callback2) {
|
|
18213
18706
|
if (typeof encoding === "function") {
|
|
18214
18707
|
callback2 = encoding;
|
|
18215
18708
|
encoding = "utf8";
|
|
@@ -18217,7 +18710,7 @@ class BunServer extends ServerBase {
|
|
|
18217
18710
|
if (!this._bodyChunks) {
|
|
18218
18711
|
this._bodyChunks = [];
|
|
18219
18712
|
}
|
|
18220
|
-
this._bodyChunks.push(
|
|
18713
|
+
this._bodyChunks.push(chunk2);
|
|
18221
18714
|
if (callback2)
|
|
18222
18715
|
callback2();
|
|
18223
18716
|
return true;
|
|
@@ -18233,8 +18726,8 @@ class BunServer extends ServerBase {
|
|
|
18233
18726
|
}
|
|
18234
18727
|
const readableStream = new ReadableStream({
|
|
18235
18728
|
start(controller) {
|
|
18236
|
-
stream.on("data", (
|
|
18237
|
-
controller.enqueue(
|
|
18729
|
+
stream.on("data", (chunk2) => {
|
|
18730
|
+
controller.enqueue(chunk2);
|
|
18238
18731
|
});
|
|
18239
18732
|
stream.on("end", () => {
|
|
18240
18733
|
onClose();
|
|
@@ -18259,18 +18752,18 @@ class BunServer extends ServerBase {
|
|
|
18259
18752
|
if (this._bodyChunks && this._bodyChunks.length > 0) {
|
|
18260
18753
|
if (data)
|
|
18261
18754
|
this._bodyChunks.push(data);
|
|
18262
|
-
const hasBuffer = this._bodyChunks.some((
|
|
18755
|
+
const hasBuffer = this._bodyChunks.some((chunk2) => chunk2 instanceof Buffer || chunk2 instanceof Uint8Array);
|
|
18263
18756
|
if (hasBuffer) {
|
|
18264
|
-
const buffers = this._bodyChunks.map((
|
|
18265
|
-
if (
|
|
18266
|
-
return
|
|
18267
|
-
if (
|
|
18268
|
-
return Buffer.from(
|
|
18269
|
-
return Buffer.from(String(
|
|
18757
|
+
const buffers = this._bodyChunks.map((chunk2) => {
|
|
18758
|
+
if (chunk2 instanceof Buffer)
|
|
18759
|
+
return chunk2;
|
|
18760
|
+
if (chunk2 instanceof Uint8Array)
|
|
18761
|
+
return Buffer.from(chunk2);
|
|
18762
|
+
return Buffer.from(String(chunk2));
|
|
18270
18763
|
});
|
|
18271
18764
|
responseData = Buffer.concat(buffers);
|
|
18272
18765
|
} else {
|
|
18273
|
-
responseData = this._bodyChunks.map((
|
|
18766
|
+
responseData = this._bodyChunks.map((chunk2) => String(chunk2)).join("");
|
|
18274
18767
|
}
|
|
18275
18768
|
}
|
|
18276
18769
|
resolve(new Response(responseData, {
|
|
@@ -18373,8 +18866,8 @@ class App extends QueryRouterServer {
|
|
|
18373
18866
|
}
|
|
18374
18867
|
}
|
|
18375
18868
|
|
|
18376
|
-
// node_modules/.pnpm/@kevisual+context@0.0.8/node_modules/@kevisual/context/dist/app.js
|
|
18377
|
-
var
|
|
18869
|
+
// ../../node_modules/.pnpm/@kevisual+context@0.0.8/node_modules/@kevisual/context/dist/app.js
|
|
18870
|
+
var isBrowser22 = typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
18378
18871
|
function getDefaultExportFromCjs(x) {
|
|
18379
18872
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
18380
18873
|
}
|
|
@@ -18392,16 +18885,16 @@ function requireEventemitter3() {
|
|
|
18392
18885
|
if (!new Events().__proto__)
|
|
18393
18886
|
prefix = false;
|
|
18394
18887
|
}
|
|
18395
|
-
function EE(fn, context,
|
|
18888
|
+
function EE(fn, context, once2) {
|
|
18396
18889
|
this.fn = fn;
|
|
18397
18890
|
this.context = context;
|
|
18398
|
-
this.once =
|
|
18891
|
+
this.once = once2 || false;
|
|
18399
18892
|
}
|
|
18400
|
-
function addListener(emitter, event, fn, context,
|
|
18893
|
+
function addListener(emitter, event, fn, context, once2) {
|
|
18401
18894
|
if (typeof fn !== "function") {
|
|
18402
18895
|
throw new TypeError("The listener must be a function");
|
|
18403
18896
|
}
|
|
18404
|
-
var listener = new EE(fn, context || emitter,
|
|
18897
|
+
var listener = new EE(fn, context || emitter, once2), evt = prefix ? prefix + event : event;
|
|
18405
18898
|
if (!emitter._events[evt])
|
|
18406
18899
|
emitter._events[evt] = listener, emitter._eventsCount++;
|
|
18407
18900
|
else if (!emitter._events[evt].fn)
|
|
@@ -18510,10 +19003,10 @@ function requireEventemitter3() {
|
|
|
18510
19003
|
EventEmitter2.prototype.on = function on(event, fn, context) {
|
|
18511
19004
|
return addListener(this, event, fn, context, false);
|
|
18512
19005
|
};
|
|
18513
|
-
EventEmitter2.prototype.once = function
|
|
19006
|
+
EventEmitter2.prototype.once = function once2(event, fn, context) {
|
|
18514
19007
|
return addListener(this, event, fn, context, true);
|
|
18515
19008
|
};
|
|
18516
|
-
EventEmitter2.prototype.removeListener = function removeListener(event, fn, context,
|
|
19009
|
+
EventEmitter2.prototype.removeListener = function removeListener(event, fn, context, once2) {
|
|
18517
19010
|
var evt = prefix ? prefix + event : event;
|
|
18518
19011
|
if (!this._events[evt])
|
|
18519
19012
|
return this;
|
|
@@ -18523,12 +19016,12 @@ function requireEventemitter3() {
|
|
|
18523
19016
|
}
|
|
18524
19017
|
var listeners = this._events[evt];
|
|
18525
19018
|
if (listeners.fn) {
|
|
18526
|
-
if (listeners.fn === fn && (!
|
|
19019
|
+
if (listeners.fn === fn && (!once2 || listeners.once) && (!context || listeners.context === context)) {
|
|
18527
19020
|
clearEvent(this, evt);
|
|
18528
19021
|
}
|
|
18529
19022
|
} else {
|
|
18530
19023
|
for (var i = 0, events = [], length = listeners.length;i < length; i++) {
|
|
18531
|
-
if (listeners[i].fn !== fn ||
|
|
19024
|
+
if (listeners[i].fn !== fn || once2 && !listeners[i].once || context && listeners[i].context !== context) {
|
|
18532
19025
|
events.push(listeners[i]);
|
|
18533
19026
|
}
|
|
18534
19027
|
}
|
|
@@ -18564,7 +19057,7 @@ function requireEventemitter3() {
|
|
|
18564
19057
|
var eventemitter3Exports = requireEventemitter3();
|
|
18565
19058
|
var EventEmitter2 = /* @__PURE__ */ getDefaultExportFromCjs(eventemitter3Exports);
|
|
18566
19059
|
var reRunFn = (promiseOpts) => {
|
|
18567
|
-
const
|
|
19060
|
+
const timeout2 = promiseOpts.timeout || 5 * 60 * 1000;
|
|
18568
19061
|
const interval = promiseOpts.interval || 1000;
|
|
18569
19062
|
const checkSuccess = promiseOpts?.checkSuccess || (() => true);
|
|
18570
19063
|
const signal = promiseOpts.signal;
|
|
@@ -18576,7 +19069,7 @@ var reRunFn = (promiseOpts) => {
|
|
|
18576
19069
|
code: 500,
|
|
18577
19070
|
message: "timeout"
|
|
18578
19071
|
});
|
|
18579
|
-
},
|
|
19072
|
+
}, timeout2);
|
|
18580
19073
|
const fn = promiseOpts.fn || (() => true);
|
|
18581
19074
|
const runFn = async () => {
|
|
18582
19075
|
if (signal?.aborted) {
|
|
@@ -18626,7 +19119,7 @@ class BaseLoad {
|
|
|
18626
19119
|
this.loading = false;
|
|
18627
19120
|
}
|
|
18628
19121
|
listenKey(key, listenOpts) {
|
|
18629
|
-
const
|
|
19122
|
+
const timeout2 = listenOpts?.timeout ?? this.timeout;
|
|
18630
19123
|
return new Promise((resolve) => {
|
|
18631
19124
|
const timeoutId = setTimeout(() => {
|
|
18632
19125
|
this.event.removeListener(key, onEvent);
|
|
@@ -18634,7 +19127,7 @@ class BaseLoad {
|
|
|
18634
19127
|
code: 500,
|
|
18635
19128
|
message: "timeout"
|
|
18636
19129
|
});
|
|
18637
|
-
},
|
|
19130
|
+
}, timeout2);
|
|
18638
19131
|
const onEvent = (error48) => {
|
|
18639
19132
|
clearTimeout(timeoutId);
|
|
18640
19133
|
if (error48) {
|
|
@@ -18665,9 +19158,9 @@ class BaseLoad {
|
|
|
18665
19158
|
const has = this.modules.has(key);
|
|
18666
19159
|
if (!has) {
|
|
18667
19160
|
const isExist = hasLoadOpts?.isExist ?? true;
|
|
18668
|
-
const
|
|
19161
|
+
const timeout2 = hasLoadOpts?.timeout ?? this.timeout;
|
|
18669
19162
|
if (isExist) {
|
|
18670
|
-
return await this.listenKey(key, { timeout });
|
|
19163
|
+
return await this.listenKey(key, { timeout: timeout2 });
|
|
18671
19164
|
}
|
|
18672
19165
|
return {
|
|
18673
19166
|
code: 404
|
|
@@ -18864,13 +19357,13 @@ var useEnvKey = (key, init, initKey = "config", opts = {}) => {
|
|
|
18864
19357
|
const voidFn = async () => {
|
|
18865
19358
|
return _env[key];
|
|
18866
19359
|
};
|
|
18867
|
-
const
|
|
19360
|
+
const timeout2 = opts.timeout || 5 * 60 * 1000;
|
|
18868
19361
|
const checkFn = async () => {
|
|
18869
19362
|
const loadRes = await baseLoad.load(voidFn, {
|
|
18870
19363
|
key,
|
|
18871
19364
|
isReRun: true,
|
|
18872
19365
|
checkSuccess: () => _env[key],
|
|
18873
|
-
timeout,
|
|
19366
|
+
timeout: timeout2,
|
|
18874
19367
|
interval: 1000
|
|
18875
19368
|
});
|
|
18876
19369
|
if (loadRes.code !== 200) {
|
|
@@ -18886,14 +19379,14 @@ var useEnvKey = (key, init, initKey = "config", opts = {}) => {
|
|
|
18886
19379
|
};
|
|
18887
19380
|
var useEnvKeyNew = (key, initKey = "config", opts) => {
|
|
18888
19381
|
const _env = useEnv({}, initKey);
|
|
18889
|
-
const
|
|
19382
|
+
const timeout2 = opts?.timeout;
|
|
18890
19383
|
if (key) {
|
|
18891
19384
|
delete _env[key];
|
|
18892
19385
|
}
|
|
18893
19386
|
if (opts?.getNew && opts.init) {
|
|
18894
|
-
return useEnvKey(key, opts.init, initKey, { timeout });
|
|
19387
|
+
return useEnvKey(key, opts.init, initKey, { timeout: timeout2 });
|
|
18895
19388
|
} else if (opts?.getNew) {
|
|
18896
|
-
return useEnvKey(key, null, initKey, { timeout });
|
|
19389
|
+
return useEnvKey(key, null, initKey, { timeout: timeout2 });
|
|
18897
19390
|
}
|
|
18898
19391
|
};
|
|
18899
19392
|
var useContextKey = (key, init, opts) => {
|
|
@@ -18930,7 +19423,7 @@ InitEnv.init();
|
|
|
18930
19423
|
// agent/app.ts
|
|
18931
19424
|
var app = useContextKey("app", () => new App);
|
|
18932
19425
|
|
|
18933
|
-
// node_modules/.pnpm/@kevisual+js-filter@0.0.
|
|
19426
|
+
// ../../node_modules/.pnpm/@kevisual+js-filter@0.0.6/node_modules/@kevisual/js-filter/dist/index.js
|
|
18934
19427
|
class Lexer {
|
|
18935
19428
|
constructor(input) {
|
|
18936
19429
|
this.pos = 0;
|
|
@@ -19582,7 +20075,7 @@ app
|
|
|
19582
20075
|
10. **中间件找不到会返回 404**,错误信息中会包含找不到的中间件列表。
|
|
19583
20076
|
`;
|
|
19584
20077
|
// package.json
|
|
19585
|
-
var version2 = "0.1.
|
|
20078
|
+
var version2 = "0.1.1";
|
|
19586
20079
|
|
|
19587
20080
|
// agent/routes/route-create.ts
|
|
19588
20081
|
app.route({
|