@cortexkit/pi-magic-context 0.29.1 → 0.30.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1087 -852
- package/dist/subagent-entry.js +1132 -896
- package/package.json +9 -9
package/dist/subagent-entry.js
CHANGED
|
@@ -6958,7 +6958,7 @@ var require_src = __commonJS((exports, module) => {
|
|
|
6958
6958
|
};
|
|
6959
6959
|
});
|
|
6960
6960
|
|
|
6961
|
-
// ../../node_modules/.bun/comment-json@
|
|
6961
|
+
// ../../node_modules/.bun/comment-json@5.0.0/node_modules/comment-json/src/common.js
|
|
6962
6962
|
var require_common = __commonJS((exports, module) => {
|
|
6963
6963
|
var PREFIX_BEFORE = "before";
|
|
6964
6964
|
var PREFIX_AFTER_PROP = "after-prop";
|
|
@@ -6990,8 +6990,6 @@ var require_common = __commonJS((exports, module) => {
|
|
|
6990
6990
|
var NON_PROP_SYMBOL_KEYS = NON_PROP_SYMBOL_PREFIXES.map(Symbol.for);
|
|
6991
6991
|
var COLON = ":";
|
|
6992
6992
|
var UNDEFINED = undefined;
|
|
6993
|
-
var LINE_BREAKS_BEFORE = new WeakMap;
|
|
6994
|
-
var LINE_BREAKS_AFTER = new WeakMap;
|
|
6995
6993
|
var RAW_STRING_LITERALS = new WeakMap;
|
|
6996
6994
|
var is_string = (subject) => typeof subject === "string";
|
|
6997
6995
|
var is_number = (subject) => typeof subject === "number";
|
|
@@ -7094,17 +7092,49 @@ var require_common = __commonJS((exports, module) => {
|
|
|
7094
7092
|
});
|
|
7095
7093
|
return target;
|
|
7096
7094
|
};
|
|
7097
|
-
var
|
|
7098
|
-
|
|
7099
|
-
|
|
7100
|
-
|
|
7095
|
+
var is_comment_symbol = (subject) => {
|
|
7096
|
+
const key = Symbol.keyFor(subject);
|
|
7097
|
+
return is_string(key) && (NON_PROP_SYMBOL_PREFIXES.includes(key) || PROP_SYMBOL_PREFIXES.some((prefix) => key.indexOf(prefix + COLON) === 0));
|
|
7098
|
+
};
|
|
7099
|
+
var remove_blank_line_tokens = (comments) => {
|
|
7100
|
+
let write = 0;
|
|
7101
|
+
let removed = false;
|
|
7102
|
+
comments.forEach((comment) => {
|
|
7103
|
+
if (comment && comment.type === "BlankLine") {
|
|
7104
|
+
removed = true;
|
|
7105
|
+
return;
|
|
7106
|
+
}
|
|
7107
|
+
comments[write++] = comment;
|
|
7108
|
+
});
|
|
7109
|
+
comments.length = write;
|
|
7110
|
+
return removed;
|
|
7111
|
+
};
|
|
7112
|
+
var remove_blank_lines_from_prop = (target, prop) => {
|
|
7113
|
+
if (!Object.hasOwn(target, prop)) {
|
|
7114
|
+
return;
|
|
7101
7115
|
}
|
|
7102
|
-
|
|
7103
|
-
|
|
7116
|
+
const comments = target[prop];
|
|
7117
|
+
if (!Array.isArray(comments) || !remove_blank_line_tokens(comments)) {
|
|
7118
|
+
return;
|
|
7119
|
+
}
|
|
7120
|
+
if (!comments.length) {
|
|
7121
|
+
delete target[prop];
|
|
7104
7122
|
}
|
|
7105
7123
|
};
|
|
7106
|
-
var
|
|
7107
|
-
|
|
7124
|
+
var remove_blank_lines_deep = (target) => {
|
|
7125
|
+
Object.getOwnPropertySymbols(target).forEach((prop) => {
|
|
7126
|
+
if (is_comment_symbol(prop)) {
|
|
7127
|
+
remove_blank_lines_from_prop(target, prop);
|
|
7128
|
+
}
|
|
7129
|
+
});
|
|
7130
|
+
Object.keys(target).forEach((key) => {
|
|
7131
|
+
const value = target[key];
|
|
7132
|
+
if (is_object(value)) {
|
|
7133
|
+
remove_blank_lines_deep(value);
|
|
7134
|
+
}
|
|
7135
|
+
});
|
|
7136
|
+
};
|
|
7137
|
+
var is_raw_json = typeof JSON.isRawJSON === "function" ? JSON.isRawJSON : () => false;
|
|
7108
7138
|
module.exports = {
|
|
7109
7139
|
PROP_SYMBOL_PREFIXES,
|
|
7110
7140
|
PREFIX_BEFORE,
|
|
@@ -7134,9 +7164,6 @@ var require_common = __commonJS((exports, module) => {
|
|
|
7134
7164
|
is_raw_json,
|
|
7135
7165
|
set_raw_string_literal,
|
|
7136
7166
|
get_raw_string_literal,
|
|
7137
|
-
set_comment_line_breaks,
|
|
7138
|
-
get_comment_line_breaks_before,
|
|
7139
|
-
get_comment_line_breaks_after,
|
|
7140
7167
|
assign(target, source, keys) {
|
|
7141
7168
|
if (!is_object(target)) {
|
|
7142
7169
|
throw new TypeError("Cannot convert undefined or null to object");
|
|
@@ -7198,11 +7225,26 @@ var require_common = __commonJS((exports, module) => {
|
|
|
7198
7225
|
return;
|
|
7199
7226
|
}
|
|
7200
7227
|
delete target[prop];
|
|
7228
|
+
},
|
|
7229
|
+
removeBlankLines(target, location) {
|
|
7230
|
+
if (!is_object(target)) {
|
|
7231
|
+
throw new TypeError("target must be an object");
|
|
7232
|
+
}
|
|
7233
|
+
if (location === UNDEFINED) {
|
|
7234
|
+
remove_blank_lines_deep(target);
|
|
7235
|
+
return;
|
|
7236
|
+
}
|
|
7237
|
+
const {
|
|
7238
|
+
where,
|
|
7239
|
+
key
|
|
7240
|
+
} = location;
|
|
7241
|
+
const prop = symbol_checked(where, key);
|
|
7242
|
+
remove_blank_lines_from_prop(target, prop);
|
|
7201
7243
|
}
|
|
7202
7244
|
};
|
|
7203
7245
|
});
|
|
7204
7246
|
|
|
7205
|
-
// ../../node_modules/.bun/comment-json@
|
|
7247
|
+
// ../../node_modules/.bun/comment-json@5.0.0/node_modules/comment-json/src/array.js
|
|
7206
7248
|
var require_array = __commonJS((exports, module) => {
|
|
7207
7249
|
var { sort } = require_src();
|
|
7208
7250
|
var {
|
|
@@ -7360,7 +7402,7 @@ var require_array = __commonJS((exports, module) => {
|
|
|
7360
7402
|
};
|
|
7361
7403
|
});
|
|
7362
7404
|
|
|
7363
|
-
// ../../node_modules/.bun/comment-json@
|
|
7405
|
+
// ../../node_modules/.bun/comment-json@5.0.0/node_modules/comment-json/src/parse.js
|
|
7364
7406
|
var require_parse = __commonJS((exports, module) => {
|
|
7365
7407
|
var esprima = require_esprima();
|
|
7366
7408
|
var {
|
|
@@ -7386,7 +7428,6 @@ var require_parse = __commonJS((exports, module) => {
|
|
|
7386
7428
|
is_object,
|
|
7387
7429
|
define: define2,
|
|
7388
7430
|
set_raw_string_literal,
|
|
7389
|
-
set_comment_line_breaks,
|
|
7390
7431
|
assign_non_prop_comments
|
|
7391
7432
|
} = require_common();
|
|
7392
7433
|
var tokenize = (code) => esprima.tokenize(code, {
|
|
@@ -7400,23 +7441,27 @@ var require_parse = __commonJS((exports, module) => {
|
|
|
7400
7441
|
var previous_props = [];
|
|
7401
7442
|
var last_prop;
|
|
7402
7443
|
var remove_comments = false;
|
|
7444
|
+
var remove_blank_lines = false;
|
|
7403
7445
|
var inline = false;
|
|
7404
7446
|
var tokens = null;
|
|
7405
7447
|
var last = null;
|
|
7406
7448
|
var current = null;
|
|
7407
7449
|
var index;
|
|
7408
7450
|
var reviver = null;
|
|
7451
|
+
var source_line_count = 0;
|
|
7409
7452
|
var clean = () => {
|
|
7410
7453
|
current_code = UNDEFINED;
|
|
7411
7454
|
previous_props.length = previous_hosts.length = 0;
|
|
7412
7455
|
last = null;
|
|
7413
7456
|
last_prop = UNDEFINED;
|
|
7457
|
+
remove_blank_lines = false;
|
|
7414
7458
|
};
|
|
7415
7459
|
var free = () => {
|
|
7416
7460
|
clean();
|
|
7417
7461
|
tokens.length = 0;
|
|
7418
7462
|
unassigned_comments = comments_host = tokens = last = current = reviver = null;
|
|
7419
7463
|
current_code = UNDEFINED;
|
|
7464
|
+
source_line_count = 0;
|
|
7420
7465
|
};
|
|
7421
7466
|
var symbolFor = (prefix) => Symbol.for(last_prop !== UNDEFINED ? prefix + COLON + last_prop : prefix);
|
|
7422
7467
|
var transform2 = (k, { value, context = {} }) => reviver ? reviver(k, value, context) : value;
|
|
@@ -7460,6 +7505,37 @@ var require_parse = __commonJS((exports, module) => {
|
|
|
7460
7505
|
var restore_comments_host = () => {
|
|
7461
7506
|
comments_host = previous_hosts.pop();
|
|
7462
7507
|
};
|
|
7508
|
+
var create_blank_line = () => ({
|
|
7509
|
+
type: "BlankLine",
|
|
7510
|
+
inline: false
|
|
7511
|
+
});
|
|
7512
|
+
var append_blank_lines = (comments, from_line, to_line) => {
|
|
7513
|
+
if (remove_blank_lines) {
|
|
7514
|
+
return;
|
|
7515
|
+
}
|
|
7516
|
+
let blank_lines = Math.max(0, to_line - from_line - 1);
|
|
7517
|
+
while (blank_lines-- > 0) {
|
|
7518
|
+
comments.push(create_blank_line());
|
|
7519
|
+
}
|
|
7520
|
+
};
|
|
7521
|
+
var normalize_parse_options = (options) => {
|
|
7522
|
+
if (typeof options === "boolean") {
|
|
7523
|
+
return {
|
|
7524
|
+
no_comments: options,
|
|
7525
|
+
no_blank_lines: false
|
|
7526
|
+
};
|
|
7527
|
+
}
|
|
7528
|
+
if (!is_object(options)) {
|
|
7529
|
+
return {
|
|
7530
|
+
no_comments: false,
|
|
7531
|
+
no_blank_lines: false
|
|
7532
|
+
};
|
|
7533
|
+
}
|
|
7534
|
+
return {
|
|
7535
|
+
no_comments: !!options.no_comments,
|
|
7536
|
+
no_blank_lines: !!options.no_blank_lines
|
|
7537
|
+
};
|
|
7538
|
+
};
|
|
7463
7539
|
var assign_after_comments = () => {
|
|
7464
7540
|
if (!unassigned_comments) {
|
|
7465
7541
|
return;
|
|
@@ -7492,26 +7568,26 @@ var require_parse = __commonJS((exports, module) => {
|
|
|
7492
7568
|
};
|
|
7493
7569
|
var parse_comments = (prefix) => {
|
|
7494
7570
|
const comments = [];
|
|
7571
|
+
let previous_line = last ? last.loc.end.line : 0;
|
|
7495
7572
|
while (current && (is("LineComment") || is("BlockComment"))) {
|
|
7573
|
+
append_blank_lines(comments, previous_line, current.loc.start.line);
|
|
7496
7574
|
const comment = {
|
|
7497
7575
|
...current,
|
|
7498
7576
|
inline
|
|
7499
7577
|
};
|
|
7500
|
-
const previous_line = last ? last.loc.end.line : 1;
|
|
7501
|
-
set_comment_line_breaks(comment, Math.max(0, comment.loc.start.line - previous_line));
|
|
7502
7578
|
comments.push(comment);
|
|
7579
|
+
previous_line = comment.loc.end.line;
|
|
7503
7580
|
next();
|
|
7504
7581
|
}
|
|
7505
|
-
|
|
7506
|
-
if (length) {
|
|
7507
|
-
const comment = comments[length - 1];
|
|
7508
|
-
const current_line = current ? current.loc.start.line : comment.loc.end.line;
|
|
7509
|
-
set_comment_line_breaks(comment, undefined, Math.max(0, current_line - comment.loc.end.line));
|
|
7510
|
-
}
|
|
7582
|
+
append_blank_lines(comments, previous_line, current ? current.loc.start.line : source_line_count);
|
|
7511
7583
|
if (remove_comments) {
|
|
7512
|
-
|
|
7584
|
+
for (let i = comments.length - 1;i >= 0; i--) {
|
|
7585
|
+
if (comments[i].type !== "BlankLine") {
|
|
7586
|
+
comments.splice(i, 1);
|
|
7587
|
+
}
|
|
7588
|
+
}
|
|
7513
7589
|
}
|
|
7514
|
-
if (!length) {
|
|
7590
|
+
if (!comments.length) {
|
|
7515
7591
|
return;
|
|
7516
7592
|
}
|
|
7517
7593
|
if (prefix) {
|
|
@@ -7650,12 +7726,19 @@ var require_parse = __commonJS((exports, module) => {
|
|
|
7650
7726
|
return {};
|
|
7651
7727
|
}
|
|
7652
7728
|
}
|
|
7653
|
-
var parse5 = (code, rev,
|
|
7729
|
+
var parse5 = (code, rev, options) => {
|
|
7654
7730
|
clean();
|
|
7731
|
+
const {
|
|
7732
|
+
no_comments,
|
|
7733
|
+
no_blank_lines
|
|
7734
|
+
} = normalize_parse_options(options);
|
|
7655
7735
|
current_code = code;
|
|
7736
|
+
source_line_count = code.split(`
|
|
7737
|
+
`).length;
|
|
7656
7738
|
tokens = tokenize(code);
|
|
7657
7739
|
reviver = rev;
|
|
7658
7740
|
remove_comments = no_comments;
|
|
7741
|
+
remove_blank_lines = no_blank_lines;
|
|
7659
7742
|
if (!tokens.length) {
|
|
7660
7743
|
unexpected_end();
|
|
7661
7744
|
}
|
|
@@ -7685,7 +7768,7 @@ var require_parse = __commonJS((exports, module) => {
|
|
|
7685
7768
|
};
|
|
7686
7769
|
});
|
|
7687
7770
|
|
|
7688
|
-
// ../../node_modules/.bun/comment-json@
|
|
7771
|
+
// ../../node_modules/.bun/comment-json@5.0.0/node_modules/comment-json/src/stringify.js
|
|
7689
7772
|
var require_stringify = __commonJS((exports, module) => {
|
|
7690
7773
|
var {
|
|
7691
7774
|
PREFIX_BEFORE_ALL,
|
|
@@ -7707,8 +7790,6 @@ var require_stringify = __commonJS((exports, module) => {
|
|
|
7707
7790
|
is_number,
|
|
7708
7791
|
is_object,
|
|
7709
7792
|
get_raw_string_literal,
|
|
7710
|
-
get_comment_line_breaks_before,
|
|
7711
|
-
get_comment_line_breaks_after,
|
|
7712
7793
|
is_raw_json
|
|
7713
7794
|
} = require_common();
|
|
7714
7795
|
var SPACE = " ";
|
|
@@ -7723,26 +7804,18 @@ var require_stringify = __commonJS((exports, module) => {
|
|
|
7723
7804
|
var quote = JSON.stringify;
|
|
7724
7805
|
var comment_stringify = (value, line) => line ? `//${value}` : `/*${value}*/`;
|
|
7725
7806
|
var repeat_line_breaks = (line_breaks, gap) => (LF + gap).repeat(line_breaks);
|
|
7726
|
-
var
|
|
7727
|
-
var
|
|
7728
|
-
if (!previous_comment || !previous_comment.loc || !comment.loc) {
|
|
7729
|
-
return null;
|
|
7730
|
-
}
|
|
7731
|
-
const { end } = previous_comment.loc;
|
|
7732
|
-
const { start } = comment.loc;
|
|
7733
|
-
if (!end || !start || !is_number(end.line) || !is_number(start.line)) {
|
|
7734
|
-
return null;
|
|
7735
|
-
}
|
|
7736
|
-
const line_breaks = start.line - end.line;
|
|
7737
|
-
return line_breaks >= 0 ? line_breaks : null;
|
|
7738
|
-
};
|
|
7739
|
-
var count_trailing_line_breaks = (str, gap) => {
|
|
7740
|
-
const unit = LF + gap;
|
|
7741
|
-
const { length } = unit;
|
|
7807
|
+
var is_inline_whitespace = (char) => char === SPACE || char === "\t";
|
|
7808
|
+
var count_trailing_line_breaks = (str) => {
|
|
7742
7809
|
let i = str.length;
|
|
7743
7810
|
let count = 0;
|
|
7744
|
-
while (i
|
|
7745
|
-
i
|
|
7811
|
+
while (i > 0) {
|
|
7812
|
+
while (i > 0 && is_inline_whitespace(str[i - 1])) {
|
|
7813
|
+
i--;
|
|
7814
|
+
}
|
|
7815
|
+
if (i === 0 || str[i - 1] !== LF) {
|
|
7816
|
+
return count;
|
|
7817
|
+
}
|
|
7818
|
+
i--;
|
|
7746
7819
|
count++;
|
|
7747
7820
|
}
|
|
7748
7821
|
return count;
|
|
@@ -7753,27 +7826,30 @@ var require_stringify = __commonJS((exports, module) => {
|
|
|
7753
7826
|
return EMPTY;
|
|
7754
7827
|
}
|
|
7755
7828
|
let str = EMPTY;
|
|
7829
|
+
let blank_lines = 0;
|
|
7756
7830
|
let last_comment = null;
|
|
7757
7831
|
comments.forEach((comment, i) => {
|
|
7832
|
+
if (comment.type === "BlankLine") {
|
|
7833
|
+
blank_lines++;
|
|
7834
|
+
return;
|
|
7835
|
+
}
|
|
7758
7836
|
const {
|
|
7759
7837
|
inline,
|
|
7760
7838
|
type,
|
|
7761
7839
|
value
|
|
7762
7840
|
} = comment;
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
line_breaks_before = read_line_breaks_from_loc(last_comment, comment);
|
|
7766
|
-
}
|
|
7767
|
-
if (line_breaks_before === null) {
|
|
7768
|
-
line_breaks_before = inline ? 0 : 1;
|
|
7769
|
-
}
|
|
7770
|
-
const delimiter = line_breaks_before > 0 ? repeat_line_breaks(line_breaks_before, deeper_gap) : inline ? SPACE : i === 0 ? EMPTY : LF + deeper_gap;
|
|
7841
|
+
const line_breaks_before = blank_lines > 0 ? blank_lines + (inline ? 0 : 1) : null;
|
|
7842
|
+
const delimiter = line_breaks_before > 0 ? repeat_line_breaks(line_breaks_before, deeper_gap) : inline ? SPACE : i === 0 && symbol_tag === PREFIX_BEFORE_ALL && deeper_gap === EMPTY ? EMPTY : LF + deeper_gap;
|
|
7771
7843
|
const is_line_comment = type === "LineComment";
|
|
7772
7844
|
str += delimiter + comment_stringify(value, is_line_comment);
|
|
7845
|
+
blank_lines = 0;
|
|
7773
7846
|
last_comment = comment;
|
|
7774
7847
|
});
|
|
7848
|
+
if (!last_comment) {
|
|
7849
|
+
return blank_lines ? repeat_line_breaks(blank_lines + 1, deeper_gap) : EMPTY;
|
|
7850
|
+
}
|
|
7775
7851
|
const default_line_breaks_after = display_block || last_comment.type === "LineComment" ? 1 : 0;
|
|
7776
|
-
const line_breaks_after =
|
|
7852
|
+
const line_breaks_after = blank_lines > 0 ? blank_lines + 1 : default_line_breaks_after;
|
|
7777
7853
|
return str + repeat_line_breaks(line_breaks_after, deeper_gap);
|
|
7778
7854
|
};
|
|
7779
7855
|
var replacer = null;
|
|
@@ -7782,7 +7858,7 @@ var require_stringify = __commonJS((exports, module) => {
|
|
|
7782
7858
|
replacer = null;
|
|
7783
7859
|
indent = EMPTY;
|
|
7784
7860
|
};
|
|
7785
|
-
var join5 = (one, two, gap) => one ? two ? one + two.trim() + LF + gap : one.trimRight() + repeat_line_breaks(Math.max(1, count_trailing_line_breaks(one
|
|
7861
|
+
var join5 = (one, two, gap) => one ? two ? one + two.trim() + LF + gap : one.trimRight() + repeat_line_breaks(Math.max(1, count_trailing_line_breaks(one)), gap) : two ? two.trimRight() + repeat_line_breaks(Math.max(1, count_trailing_line_breaks(two)), gap) : EMPTY;
|
|
7786
7862
|
var join_content = (inside, value, gap) => {
|
|
7787
7863
|
const comment = process_comments(value, PREFIX_BEFORE, gap + indent, true);
|
|
7788
7864
|
return join5(comment, inside, gap);
|
|
@@ -7881,6 +7957,8 @@ var require_stringify = __commonJS((exports, module) => {
|
|
|
7881
7957
|
const str = toString.call(subject);
|
|
7882
7958
|
return PRIMITIVE_OBJECT_TYPES.includes(str);
|
|
7883
7959
|
};
|
|
7960
|
+
var normalize_blank_lines = (str) => typeof str === "string" ? str.replace(/\n[ \t]+(?=\n)/g, `
|
|
7961
|
+
`) : str;
|
|
7884
7962
|
module.exports = (value, replacer_, space) => {
|
|
7885
7963
|
const indent_ = get_indent(space);
|
|
7886
7964
|
if (!indent_) {
|
|
@@ -7893,11 +7971,12 @@ var require_stringify = __commonJS((exports, module) => {
|
|
|
7893
7971
|
indent = indent_;
|
|
7894
7972
|
const str = is_primitive_object(value) ? JSON.stringify(value) : stringify("", { "": value }, EMPTY);
|
|
7895
7973
|
clean();
|
|
7896
|
-
|
|
7974
|
+
const output = is_object(value) ? process_comments(value, PREFIX_BEFORE_ALL, EMPTY, true).trimLeft() + str + process_comments(value, PREFIX_AFTER_ALL, EMPTY).trimRight() : str;
|
|
7975
|
+
return normalize_blank_lines(output);
|
|
7897
7976
|
};
|
|
7898
7977
|
});
|
|
7899
7978
|
|
|
7900
|
-
// ../../node_modules/.bun/comment-json@
|
|
7979
|
+
// ../../node_modules/.bun/comment-json@5.0.0/node_modules/comment-json/src/index.js
|
|
7901
7980
|
var require_src2 = __commonJS((exports, module) => {
|
|
7902
7981
|
var { parse: parse5, tokenize } = require_parse();
|
|
7903
7982
|
var stringify = require_stringify();
|
|
@@ -7912,7 +7991,8 @@ var require_src2 = __commonJS((exports, module) => {
|
|
|
7912
7991
|
PREFIX_AFTER_ALL,
|
|
7913
7992
|
assign,
|
|
7914
7993
|
moveComments,
|
|
7915
|
-
removeComments
|
|
7994
|
+
removeComments,
|
|
7995
|
+
removeBlankLines
|
|
7916
7996
|
} = require_common();
|
|
7917
7997
|
module.exports = {
|
|
7918
7998
|
PREFIX_BEFORE,
|
|
@@ -7928,7 +8008,8 @@ var require_src2 = __commonJS((exports, module) => {
|
|
|
7928
8008
|
CommentArray,
|
|
7929
8009
|
assign,
|
|
7930
8010
|
moveComments,
|
|
7931
|
-
removeComments
|
|
8011
|
+
removeComments,
|
|
8012
|
+
removeBlankLines
|
|
7932
8013
|
};
|
|
7933
8014
|
});
|
|
7934
8015
|
|
|
@@ -160778,8 +160859,8 @@ async function injectWasmOrtForElectron() {
|
|
|
160778
160859
|
try {
|
|
160779
160860
|
const { createRequire: createRequireFn } = await import("node:module");
|
|
160780
160861
|
const requireFn = createRequireFn(import.meta.url);
|
|
160781
|
-
const
|
|
160782
|
-
const distDir =
|
|
160862
|
+
const mainEntry = requireFn.resolve("onnxruntime-web");
|
|
160863
|
+
const distDir = dirname5(mainEntry);
|
|
160783
160864
|
const wasmPathsPrefix = `${pathToFileURL(distDir).href}/`;
|
|
160784
160865
|
if (ortWeb.env?.wasm) {
|
|
160785
160866
|
ortWeb.env.wasm.wasmPaths = wasmPathsPrefix;
|
|
@@ -160900,7 +160981,7 @@ class LocalEmbeddingProvider {
|
|
|
160900
160981
|
if (this.disposing) {
|
|
160901
160982
|
return;
|
|
160902
160983
|
}
|
|
160903
|
-
await injectWasmOrtForElectron();
|
|
160984
|
+
const injectedWasmOrt = await injectWasmOrtForElectron();
|
|
160904
160985
|
const transformersSpec = "@huggingface/transformers";
|
|
160905
160986
|
const transformersModule = await import(transformersSpec);
|
|
160906
160987
|
const env = transformersModule.env;
|
|
@@ -160930,7 +161011,8 @@ class LocalEmbeddingProvider {
|
|
|
160930
161011
|
for (let attempt = 1;attempt <= MAX_ATTEMPTS; attempt++) {
|
|
160931
161012
|
try {
|
|
160932
161013
|
const pipeline = await withQuietConsole(() => createPipeline("feature-extraction", this.model, {
|
|
160933
|
-
dtype: "fp32"
|
|
161014
|
+
dtype: "fp32",
|
|
161015
|
+
...injectedWasmOrt ? { device: "auto" } : {}
|
|
160934
161016
|
}));
|
|
160935
161017
|
if (this.disposing) {
|
|
160936
161018
|
await pipeline.dispose?.();
|
|
@@ -164194,7 +164276,7 @@ ${partLines.join(`
|
|
|
164194
164276
|
`), lastOrdinal, truncated };
|
|
164195
164277
|
}
|
|
164196
164278
|
|
|
164197
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164279
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/memory/memory.mjs
|
|
164198
164280
|
var exports_memory = {};
|
|
164199
164281
|
__export(exports_memory, {
|
|
164200
164282
|
Update: () => Update,
|
|
@@ -164205,7 +164287,7 @@ __export(exports_memory, {
|
|
|
164205
164287
|
Assign: () => Assign
|
|
164206
164288
|
});
|
|
164207
164289
|
|
|
164208
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164290
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/memory/metrics.mjs
|
|
164209
164291
|
var Metrics = {
|
|
164210
164292
|
assign: 0,
|
|
164211
164293
|
create: 0,
|
|
@@ -164214,17 +164296,17 @@ var Metrics = {
|
|
|
164214
164296
|
update: 0
|
|
164215
164297
|
};
|
|
164216
164298
|
|
|
164217
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164299
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/memory/assign.mjs
|
|
164218
164300
|
function Assign(left, right) {
|
|
164219
164301
|
Metrics.assign += 1;
|
|
164220
164302
|
return { ...left, ...right };
|
|
164221
164303
|
}
|
|
164222
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164304
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/guard/guard.mjs
|
|
164223
164305
|
var exports_guard = {};
|
|
164224
164306
|
__export(exports_guard, {
|
|
164225
164307
|
Values: () => Values,
|
|
164226
|
-
TakeLeft: () => TakeLeft,
|
|
164227
164308
|
Symbols: () => Symbols,
|
|
164309
|
+
ShiftLeft: () => ShiftLeft,
|
|
164228
164310
|
Keys: () => Keys,
|
|
164229
164311
|
IsValueLike: () => IsValueLike,
|
|
164230
164312
|
IsUnsafePropertyKey: () => IsUnsafePropertyKey,
|
|
@@ -164240,7 +164322,6 @@ __export(exports_guard, {
|
|
|
164240
164322
|
IsMaxLength: () => IsMaxLength2,
|
|
164241
164323
|
IsLessThan: () => IsLessThan,
|
|
164242
164324
|
IsLessEqualThan: () => IsLessEqualThan,
|
|
164243
|
-
IsIterator: () => IsIterator,
|
|
164244
164325
|
IsInteger: () => IsInteger,
|
|
164245
164326
|
IsGreaterThan: () => IsGreaterThan,
|
|
164246
164327
|
IsGreaterEqualThan: () => IsGreaterEqualThan,
|
|
@@ -164251,7 +164332,6 @@ __export(exports_guard, {
|
|
|
164251
164332
|
IsClassInstance: () => IsClassInstance,
|
|
164252
164333
|
IsBoolean: () => IsBoolean,
|
|
164253
164334
|
IsBigInt: () => IsBigInt,
|
|
164254
|
-
IsAsyncIterator: () => IsAsyncIterator,
|
|
164255
164335
|
IsArray: () => IsArray,
|
|
164256
164336
|
HasPropertyKey: () => HasPropertyKey,
|
|
164257
164337
|
GraphemeCount: () => GraphemeCount2,
|
|
@@ -164261,7 +164341,7 @@ __export(exports_guard, {
|
|
|
164261
164341
|
Entries: () => Entries
|
|
164262
164342
|
});
|
|
164263
164343
|
|
|
164264
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164344
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/guard/string.mjs
|
|
164265
164345
|
function IsBetween(value, min, max) {
|
|
164266
164346
|
return value >= min && value <= max;
|
|
164267
164347
|
}
|
|
@@ -164365,13 +164445,10 @@ function IsMaxLengthFast(value, maxLength) {
|
|
|
164365
164445
|
return true;
|
|
164366
164446
|
}
|
|
164367
164447
|
|
|
164368
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164448
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/guard/guard.mjs
|
|
164369
164449
|
function IsArray(value) {
|
|
164370
164450
|
return Array.isArray(value);
|
|
164371
164451
|
}
|
|
164372
|
-
function IsAsyncIterator(value) {
|
|
164373
|
-
return IsObject(value) && Symbol.asyncIterator in value;
|
|
164374
|
-
}
|
|
164375
164452
|
function IsBigInt(value) {
|
|
164376
164453
|
return IsEqual(typeof value, "bigint");
|
|
164377
164454
|
}
|
|
@@ -164394,9 +164471,6 @@ function IsFunction(value) {
|
|
|
164394
164471
|
function IsInteger(value) {
|
|
164395
164472
|
return Number.isInteger(value);
|
|
164396
164473
|
}
|
|
164397
|
-
function IsIterator(value) {
|
|
164398
|
-
return IsObject(value) && Symbol.iterator in value;
|
|
164399
|
-
}
|
|
164400
164474
|
function IsNull(value) {
|
|
164401
164475
|
return IsEqual(value, null);
|
|
164402
164476
|
}
|
|
@@ -164480,7 +164554,7 @@ function EveryAll(value, offset, callback) {
|
|
|
164480
164554
|
}
|
|
164481
164555
|
return result;
|
|
164482
164556
|
}
|
|
164483
|
-
function
|
|
164557
|
+
function ShiftLeft(array2, true_, false_) {
|
|
164484
164558
|
return IsEqual(array2.length, 0) ? false_() : true_(array2[0], array2.slice(1));
|
|
164485
164559
|
}
|
|
164486
164560
|
function IsUnsafePropertyKey(key) {
|
|
@@ -164516,20 +164590,99 @@ function DeepEqualArray(left, right) {
|
|
|
164516
164590
|
function IsDeepEqual(left, right) {
|
|
164517
164591
|
return IsArray(left) ? DeepEqualArray(left, right) : IsObject(left) ? DeepEqualObject(left, right) : IsEqual(left, right);
|
|
164518
164592
|
}
|
|
164519
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164520
|
-
|
|
164521
|
-
|
|
164593
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/guard/globals.mjs
|
|
164594
|
+
var exports_globals = {};
|
|
164595
|
+
__export(exports_globals, {
|
|
164596
|
+
IsUint8ClampedArray: () => IsUint8ClampedArray,
|
|
164597
|
+
IsUint8Array: () => IsUint8Array,
|
|
164598
|
+
IsUint32Array: () => IsUint32Array,
|
|
164599
|
+
IsUint16Array: () => IsUint16Array,
|
|
164600
|
+
IsTypeArray: () => IsTypeArray,
|
|
164601
|
+
IsString: () => IsString2,
|
|
164602
|
+
IsSet: () => IsSet,
|
|
164603
|
+
IsRegExp: () => IsRegExp,
|
|
164604
|
+
IsNumber: () => IsNumber2,
|
|
164605
|
+
IsMap: () => IsMap,
|
|
164606
|
+
IsInt8Array: () => IsInt8Array,
|
|
164607
|
+
IsInt32Array: () => IsInt32Array,
|
|
164608
|
+
IsInt16Array: () => IsInt16Array,
|
|
164609
|
+
IsFloat64Array: () => IsFloat64Array,
|
|
164610
|
+
IsFloat32Array: () => IsFloat32Array,
|
|
164611
|
+
IsDate: () => IsDate,
|
|
164612
|
+
IsBoolean: () => IsBoolean2,
|
|
164613
|
+
IsBigUint64Array: () => IsBigUint64Array,
|
|
164614
|
+
IsBigInt64Array: () => IsBigInt64Array
|
|
164615
|
+
});
|
|
164616
|
+
function IsBoolean2(value) {
|
|
164617
|
+
return value instanceof Boolean;
|
|
164618
|
+
}
|
|
164619
|
+
function IsNumber2(value) {
|
|
164620
|
+
return value instanceof Number;
|
|
164621
|
+
}
|
|
164622
|
+
function IsString2(value) {
|
|
164623
|
+
return value instanceof String;
|
|
164624
|
+
}
|
|
164625
|
+
function IsTypeArray(value) {
|
|
164626
|
+
return globalThis.ArrayBuffer.isView(value);
|
|
164627
|
+
}
|
|
164628
|
+
function IsInt8Array(value) {
|
|
164629
|
+
return value instanceof globalThis.Int8Array;
|
|
164630
|
+
}
|
|
164631
|
+
function IsUint8Array(value) {
|
|
164632
|
+
return value instanceof globalThis.Uint8Array;
|
|
164633
|
+
}
|
|
164634
|
+
function IsUint8ClampedArray(value) {
|
|
164635
|
+
return value instanceof globalThis.Uint8ClampedArray;
|
|
164636
|
+
}
|
|
164637
|
+
function IsInt16Array(value) {
|
|
164638
|
+
return value instanceof globalThis.Int16Array;
|
|
164639
|
+
}
|
|
164640
|
+
function IsUint16Array(value) {
|
|
164641
|
+
return value instanceof globalThis.Uint16Array;
|
|
164642
|
+
}
|
|
164643
|
+
function IsInt32Array(value) {
|
|
164644
|
+
return value instanceof globalThis.Int32Array;
|
|
164645
|
+
}
|
|
164646
|
+
function IsUint32Array(value) {
|
|
164647
|
+
return value instanceof globalThis.Uint32Array;
|
|
164648
|
+
}
|
|
164649
|
+
function IsFloat32Array(value) {
|
|
164650
|
+
return value instanceof globalThis.Float32Array;
|
|
164651
|
+
}
|
|
164652
|
+
function IsFloat64Array(value) {
|
|
164653
|
+
return value instanceof globalThis.Float64Array;
|
|
164654
|
+
}
|
|
164655
|
+
function IsBigInt64Array(value) {
|
|
164656
|
+
return value instanceof globalThis.BigInt64Array;
|
|
164657
|
+
}
|
|
164658
|
+
function IsBigUint64Array(value) {
|
|
164659
|
+
return value instanceof globalThis.BigUint64Array;
|
|
164660
|
+
}
|
|
164661
|
+
function IsRegExp(value) {
|
|
164662
|
+
return value instanceof globalThis.RegExp;
|
|
164663
|
+
}
|
|
164664
|
+
function IsDate(value) {
|
|
164665
|
+
return value instanceof globalThis.Date;
|
|
164522
164666
|
}
|
|
164523
|
-
function
|
|
164667
|
+
function IsSet(value) {
|
|
164668
|
+
return value instanceof globalThis.Set;
|
|
164669
|
+
}
|
|
164670
|
+
function IsMap(value) {
|
|
164671
|
+
return value instanceof globalThis.Map;
|
|
164672
|
+
}
|
|
164673
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/memory/clone.mjs
|
|
164674
|
+
function FromClassInstance(value) {
|
|
164524
164675
|
return value;
|
|
164525
164676
|
}
|
|
164526
|
-
function
|
|
164527
|
-
return
|
|
164677
|
+
function IsTypeObject(value) {
|
|
164678
|
+
return exports_guard.HasPropertyKey(value, "~kind") || exports_guard.HasPropertyKey(value, "~unsafe");
|
|
164528
164679
|
}
|
|
164529
|
-
function
|
|
164680
|
+
function FromTypeObject(value) {
|
|
164530
164681
|
const result = {};
|
|
164531
164682
|
const descriptors = Object.getOwnPropertyDescriptors(value);
|
|
164532
164683
|
for (const key of Object.keys(descriptors)) {
|
|
164684
|
+
if (exports_guard.IsUnsafePropertyKey(key))
|
|
164685
|
+
continue;
|
|
164533
164686
|
const descriptor = descriptors[key];
|
|
164534
164687
|
if (exports_guard.HasPropertyKey(descriptor, "value")) {
|
|
164535
164688
|
Object.defineProperty(result, key, { ...descriptor, value: FromValue(descriptor.value) });
|
|
@@ -164537,20 +164690,44 @@ function FromObject(value) {
|
|
|
164537
164690
|
}
|
|
164538
164691
|
return result;
|
|
164539
164692
|
}
|
|
164693
|
+
function FromPlainObject(value) {
|
|
164694
|
+
const result = {};
|
|
164695
|
+
for (const key of exports_guard.Keys(value)) {
|
|
164696
|
+
if (exports_guard.IsUnsafePropertyKey(key))
|
|
164697
|
+
continue;
|
|
164698
|
+
result[key] = FromValue(value[key]);
|
|
164699
|
+
}
|
|
164700
|
+
for (const key of exports_guard.Symbols(value)) {
|
|
164701
|
+
result[key] = FromValue(value[key]);
|
|
164702
|
+
}
|
|
164703
|
+
return result;
|
|
164704
|
+
}
|
|
164705
|
+
function FromObject(value) {
|
|
164706
|
+
return exports_guard.IsClassInstance(value) ? FromClassInstance(value) : IsTypeObject(value) ? FromTypeObject(value) : FromPlainObject(value);
|
|
164707
|
+
}
|
|
164708
|
+
function FromArray(value) {
|
|
164709
|
+
return value.map((element) => FromValue(element));
|
|
164710
|
+
}
|
|
164711
|
+
function FromTypedArray(value) {
|
|
164712
|
+
return value.slice();
|
|
164713
|
+
}
|
|
164540
164714
|
function FromRegExp(value) {
|
|
164541
164715
|
return new RegExp(value.source, value.flags);
|
|
164542
164716
|
}
|
|
164543
|
-
function
|
|
164544
|
-
return value;
|
|
164717
|
+
function FromMap(value) {
|
|
164718
|
+
return new Map(FromValue([...value.entries()]));
|
|
164719
|
+
}
|
|
164720
|
+
function FromSet(value) {
|
|
164721
|
+
return new Set(FromValue([...value.values()]));
|
|
164545
164722
|
}
|
|
164546
164723
|
function FromValue(value) {
|
|
164547
|
-
return value
|
|
164724
|
+
return exports_globals.IsTypeArray(value) ? FromTypedArray(value) : exports_globals.IsRegExp(value) ? FromRegExp(value) : exports_globals.IsMap(value) ? FromMap(value) : exports_globals.IsSet(value) ? FromSet(value) : exports_guard.IsArray(value) ? FromArray(value) : exports_guard.IsObject(value) ? FromObject(value) : value;
|
|
164548
164725
|
}
|
|
164549
164726
|
function Clone(value) {
|
|
164550
164727
|
Metrics.clone += 1;
|
|
164551
164728
|
return FromValue(value);
|
|
164552
164729
|
}
|
|
164553
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164730
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/settings/settings.mjs
|
|
164554
164731
|
var exports_settings = {};
|
|
164555
164732
|
__export(exports_settings, {
|
|
164556
164733
|
Set: () => Set2,
|
|
@@ -164563,7 +164740,8 @@ var settings = {
|
|
|
164563
164740
|
useAcceleration: true,
|
|
164564
164741
|
exactOptionalPropertyTypes: false,
|
|
164565
164742
|
enumerableKind: false,
|
|
164566
|
-
correctiveParse: false
|
|
164743
|
+
correctiveParse: false,
|
|
164744
|
+
unionPrioritySort: true
|
|
164567
164745
|
};
|
|
164568
164746
|
function Reset() {
|
|
164569
164747
|
settings.immutableTypes = false;
|
|
@@ -164572,6 +164750,7 @@ function Reset() {
|
|
|
164572
164750
|
settings.exactOptionalPropertyTypes = false;
|
|
164573
164751
|
settings.enumerableKind = false;
|
|
164574
164752
|
settings.correctiveParse = false;
|
|
164753
|
+
settings.unionPrioritySort = true;
|
|
164575
164754
|
}
|
|
164576
164755
|
function Set2(options) {
|
|
164577
164756
|
for (const key of exports_guard.Keys(options)) {
|
|
@@ -164584,7 +164763,7 @@ function Set2(options) {
|
|
|
164584
164763
|
function Get() {
|
|
164585
164764
|
return settings;
|
|
164586
164765
|
}
|
|
164587
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164766
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/memory/create.mjs
|
|
164588
164767
|
function MergeHidden(left, right) {
|
|
164589
164768
|
for (const key of Object.keys(right)) {
|
|
164590
164769
|
Object.defineProperty(left, key, {
|
|
@@ -164606,7 +164785,7 @@ function Create(hidden, enumerable, options = {}) {
|
|
|
164606
164785
|
const withHidden = settings2.enumerableKind ? Merge(withOptions, hidden) : MergeHidden(withOptions, hidden);
|
|
164607
164786
|
return settings2.immutableTypes ? Object.freeze(withHidden) : withHidden;
|
|
164608
164787
|
}
|
|
164609
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164788
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/memory/discard.mjs
|
|
164610
164789
|
function Discard(value, propertyKeys) {
|
|
164611
164790
|
Metrics.discard += 1;
|
|
164612
164791
|
const result = {};
|
|
@@ -164619,7 +164798,7 @@ function Discard(value, propertyKeys) {
|
|
|
164619
164798
|
}
|
|
164620
164799
|
return result;
|
|
164621
164800
|
}
|
|
164622
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164801
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/memory/update.mjs
|
|
164623
164802
|
function Update(current, hidden, enumerable) {
|
|
164624
164803
|
Metrics.update += 1;
|
|
164625
164804
|
const settings2 = exports_settings.Get();
|
|
@@ -164642,7 +164821,7 @@ function Update(current, hidden, enumerable) {
|
|
|
164642
164821
|
}
|
|
164643
164822
|
return result;
|
|
164644
164823
|
}
|
|
164645
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164824
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/schema.mjs
|
|
164646
164825
|
function IsKind(value, kind) {
|
|
164647
164826
|
return exports_guard.IsObject(value) && exports_guard.HasPropertyKey(value, "~kind") && exports_guard.IsEqual(value["~kind"], kind);
|
|
164648
164827
|
}
|
|
@@ -164650,136 +164829,41 @@ function IsSchema(value) {
|
|
|
164650
164829
|
return exports_guard.IsObject(value);
|
|
164651
164830
|
}
|
|
164652
164831
|
|
|
164653
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164654
|
-
function OptionalAddAction(type) {
|
|
164655
|
-
return exports_memory.Create({ ["~kind"]: "OptionalAddAction" }, { type }, {});
|
|
164656
|
-
}
|
|
164657
|
-
function IsOptionalAddAction(value) {
|
|
164658
|
-
return exports_guard.IsObject(value) && exports_guard.HasPropertyKey(value, "~kind") && exports_guard.HasPropertyKey(value, "type") && exports_guard.IsEqual(value["~kind"], "OptionalAddAction") && IsSchema(value.type);
|
|
164659
|
-
}
|
|
164660
|
-
function OptionalRemoveAction(type) {
|
|
164661
|
-
return exports_memory.Create({ ["~kind"]: "OptionalRemoveAction" }, { type }, {});
|
|
164662
|
-
}
|
|
164663
|
-
function IsOptionalRemoveAction(value) {
|
|
164664
|
-
return exports_guard.IsObject(value) && exports_guard.HasPropertyKey(value, "~kind") && exports_guard.HasPropertyKey(value, "type") && exports_guard.IsEqual(value["~kind"], "OptionalRemoveAction") && IsSchema(value.type);
|
|
164665
|
-
}
|
|
164666
|
-
// ../../node_modules/.bun/typebox@1.1.38/node_modules/typebox/build/type/action/_readonly.mjs
|
|
164667
|
-
function ReadonlyAddAction(type) {
|
|
164668
|
-
return exports_memory.Create({ ["~kind"]: "ReadonlyAddAction" }, { type }, {});
|
|
164669
|
-
}
|
|
164670
|
-
function IsReadonlyAddAction(value) {
|
|
164671
|
-
return exports_guard.IsObject(value) && exports_guard.HasPropertyKey(value, "~kind") && exports_guard.HasPropertyKey(value, "type") && exports_guard.IsEqual(value["~kind"], "ReadonlyAddAction") && IsSchema(value.type);
|
|
164672
|
-
}
|
|
164673
|
-
function ReadonlyRemoveAction(type) {
|
|
164674
|
-
return exports_memory.Create({ ["~kind"]: "ReadonlyRemoveAction" }, { type }, {});
|
|
164675
|
-
}
|
|
164676
|
-
function IsReadonlyRemoveAction(value) {
|
|
164677
|
-
return exports_guard.IsObject(value) && exports_guard.HasPropertyKey(value, "~kind") && exports_guard.HasPropertyKey(value, "type") && exports_guard.IsEqual(value["~kind"], "ReadonlyRemoveAction") && IsSchema(value.type);
|
|
164678
|
-
}
|
|
164679
|
-
// ../../node_modules/.bun/typebox@1.1.38/node_modules/typebox/build/type/types/deferred.mjs
|
|
164832
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/deferred.mjs
|
|
164680
164833
|
function Deferred(action, parameters, options) {
|
|
164681
|
-
return exports_memory.Create({ "~kind": "Deferred" }, { action, parameters, options }, {});
|
|
164834
|
+
return exports_memory.Create({ "~kind": "Deferred" }, { type: "deferred", action, parameters, options }, {});
|
|
164682
164835
|
}
|
|
164683
164836
|
function IsDeferred(value) {
|
|
164684
164837
|
return IsKind(value, "Deferred");
|
|
164685
164838
|
}
|
|
164686
164839
|
|
|
164687
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164688
|
-
function
|
|
164689
|
-
return exports_memory.Create({ ["~kind"]: "Promise" }, { type: "promise", item }, options);
|
|
164690
|
-
}
|
|
164691
|
-
function IsPromise(value) {
|
|
164692
|
-
return IsKind(value, "Promise");
|
|
164693
|
-
}
|
|
164694
|
-
function PromiseOptions(type) {
|
|
164695
|
-
return exports_memory.Discard(type, ["~kind", "type", "item"]);
|
|
164696
|
-
}
|
|
164697
|
-
|
|
164698
|
-
// ../../node_modules/.bun/typebox@1.1.38/node_modules/typebox/build/type/types/_immutable.mjs
|
|
164699
|
-
function ImmutableAdd(type) {
|
|
164700
|
-
return exports_memory.Update(type, { "~immutable": true }, {});
|
|
164701
|
-
}
|
|
164702
|
-
function Immutable(type) {
|
|
164703
|
-
return ImmutableAdd(type);
|
|
164704
|
-
}
|
|
164705
|
-
function IsImmutable(value) {
|
|
164706
|
-
return IsSchema(value) && exports_guard.HasPropertyKey(value, "~immutable");
|
|
164707
|
-
}
|
|
164708
|
-
|
|
164709
|
-
// ../../node_modules/.bun/typebox@1.1.38/node_modules/typebox/build/type/types/_optional.mjs
|
|
164710
|
-
function OptionalRemove(type) {
|
|
164711
|
-
const result = exports_memory.Discard(type, ["~optional"]);
|
|
164712
|
-
return result;
|
|
164713
|
-
}
|
|
164714
|
-
function OptionalAdd(type) {
|
|
164715
|
-
return exports_memory.Update(type, { "~optional": true }, {});
|
|
164716
|
-
}
|
|
164717
|
-
function Optional(type) {
|
|
164718
|
-
return OptionalAdd(type);
|
|
164719
|
-
}
|
|
164720
|
-
function IsOptional(value) {
|
|
164721
|
-
return IsSchema(value) && exports_guard.HasPropertyKey(value, "~optional");
|
|
164722
|
-
}
|
|
164723
|
-
|
|
164724
|
-
// ../../node_modules/.bun/typebox@1.1.38/node_modules/typebox/build/type/types/_readonly.mjs
|
|
164725
|
-
function ReadonlyRemove(type) {
|
|
164726
|
-
return exports_memory.Discard(type, ["~readonly"]);
|
|
164727
|
-
}
|
|
164728
|
-
function ReadonlyAdd(type) {
|
|
164840
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs
|
|
164841
|
+
function AddReadonlyOperation(type) {
|
|
164729
164842
|
return exports_memory.Update(type, { "~readonly": true }, {});
|
|
164730
164843
|
}
|
|
164731
|
-
function
|
|
164732
|
-
|
|
164844
|
+
function AddReadonlyAction(type, options) {
|
|
164845
|
+
const result = exports_memory.Update(AddReadonlyOperation(type), {}, options);
|
|
164846
|
+
return result;
|
|
164733
164847
|
}
|
|
164734
|
-
function
|
|
164735
|
-
|
|
164848
|
+
function AddReadonlyInstantiate(context, state, type, options) {
|
|
164849
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
164850
|
+
return AddReadonlyAction(instantiatedType, options);
|
|
164736
164851
|
}
|
|
164737
164852
|
|
|
164738
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164739
|
-
function
|
|
164740
|
-
return {
|
|
164741
|
-
enumerable: exports_settings.Get().enumerableKind,
|
|
164742
|
-
writable: false,
|
|
164743
|
-
configurable: false,
|
|
164744
|
-
value
|
|
164745
|
-
};
|
|
164853
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs
|
|
164854
|
+
function AddOptionalOperation(type) {
|
|
164855
|
+
return exports_memory.Update(type, { "~optional": true }, {});
|
|
164746
164856
|
}
|
|
164747
|
-
|
|
164748
|
-
|
|
164749
|
-
|
|
164750
|
-
globalThis.Object.defineProperty(this, "~kind", BaseProperty("Base"));
|
|
164751
|
-
globalThis.Object.defineProperty(this, "~guard", BaseProperty({
|
|
164752
|
-
check: (value) => this.Check(value),
|
|
164753
|
-
errors: (value) => this.Errors(value)
|
|
164754
|
-
}));
|
|
164755
|
-
}
|
|
164756
|
-
Check(_value) {
|
|
164757
|
-
return true;
|
|
164758
|
-
}
|
|
164759
|
-
Errors(_value) {
|
|
164760
|
-
return [];
|
|
164761
|
-
}
|
|
164762
|
-
Convert(value) {
|
|
164763
|
-
return value;
|
|
164764
|
-
}
|
|
164765
|
-
Clean(value) {
|
|
164766
|
-
return value;
|
|
164767
|
-
}
|
|
164768
|
-
Default(value) {
|
|
164769
|
-
return value;
|
|
164770
|
-
}
|
|
164771
|
-
Create() {
|
|
164772
|
-
throw new Error("Create not implemented");
|
|
164773
|
-
}
|
|
164774
|
-
Clone() {
|
|
164775
|
-
throw Error("Clone not implemented");
|
|
164776
|
-
}
|
|
164857
|
+
function AddOptionalAction(type, options) {
|
|
164858
|
+
const result = exports_memory.Update(AddOptionalOperation(type), {}, options);
|
|
164859
|
+
return result;
|
|
164777
164860
|
}
|
|
164778
|
-
function
|
|
164779
|
-
|
|
164861
|
+
function AddOptionalInstantiate(context, state, type, options) {
|
|
164862
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
164863
|
+
return AddOptionalAction(instantiatedType, options);
|
|
164780
164864
|
}
|
|
164781
164865
|
|
|
164782
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164866
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/array.mjs
|
|
164783
164867
|
function _Array_(items, options) {
|
|
164784
164868
|
return exports_memory.Create({ "~kind": "Array" }, { type: "array", items }, options);
|
|
164785
164869
|
}
|
|
@@ -164790,18 +164874,7 @@ function ArrayOptions(type) {
|
|
|
164790
164874
|
return exports_memory.Discard(type, ["~kind", "type", "items"]);
|
|
164791
164875
|
}
|
|
164792
164876
|
|
|
164793
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164794
|
-
function AsyncIterator(iteratorItems, options) {
|
|
164795
|
-
return exports_memory.Create({ "~kind": "AsyncIterator" }, { type: "asyncIterator", iteratorItems }, options);
|
|
164796
|
-
}
|
|
164797
|
-
function IsAsyncIterator2(value) {
|
|
164798
|
-
return IsKind(value, "AsyncIterator");
|
|
164799
|
-
}
|
|
164800
|
-
function AsyncIteratorOptions(type) {
|
|
164801
|
-
return exports_memory.Discard(type, ["~kind", "type", "iteratorItems"]);
|
|
164802
|
-
}
|
|
164803
|
-
|
|
164804
|
-
// ../../node_modules/.bun/typebox@1.1.38/node_modules/typebox/build/type/types/constructor.mjs
|
|
164877
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/constructor.mjs
|
|
164805
164878
|
function Constructor(parameters, instanceType, options = {}) {
|
|
164806
164879
|
return exports_memory.Create({ "~kind": "Constructor" }, { type: "constructor", parameters, instanceType }, options);
|
|
164807
164880
|
}
|
|
@@ -164812,7 +164885,7 @@ function ConstructorOptions(type) {
|
|
|
164812
164885
|
return exports_memory.Discard(type, ["~kind", "type", "parameters", "instanceType"]);
|
|
164813
164886
|
}
|
|
164814
164887
|
|
|
164815
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164888
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/function.mjs
|
|
164816
164889
|
function _Function_(parameters, returnType, options = {}) {
|
|
164817
164890
|
return exports_memory.Create({ ["~kind"]: "Function" }, { type: "function", parameters, returnType }, options);
|
|
164818
164891
|
}
|
|
@@ -164823,7 +164896,7 @@ function FunctionOptions(type) {
|
|
|
164823
164896
|
return exports_memory.Discard(type, ["~kind", "type", "parameters", "returnType"]);
|
|
164824
164897
|
}
|
|
164825
164898
|
|
|
164826
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164899
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/ref.mjs
|
|
164827
164900
|
function Ref(ref, options) {
|
|
164828
164901
|
return exports_memory.Create({ ["~kind"]: "Ref" }, { $ref: ref }, options);
|
|
164829
164902
|
}
|
|
@@ -164831,7 +164904,7 @@ function IsRef(value) {
|
|
|
164831
164904
|
return IsKind(value, "Ref");
|
|
164832
164905
|
}
|
|
164833
164906
|
|
|
164834
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164907
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/generic.mjs
|
|
164835
164908
|
function Generic(parameters, expression) {
|
|
164836
164909
|
return exports_memory.Create({ "~kind": "Generic" }, { type: "generic", parameters, expression });
|
|
164837
164910
|
}
|
|
@@ -164839,7 +164912,7 @@ function IsGeneric(value) {
|
|
|
164839
164912
|
return IsKind(value, "Generic");
|
|
164840
164913
|
}
|
|
164841
164914
|
|
|
164842
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164915
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/any.mjs
|
|
164843
164916
|
function Any(options) {
|
|
164844
164917
|
return exports_memory.Create({ ["~kind"]: "Any" }, {}, options);
|
|
164845
164918
|
}
|
|
@@ -164847,7 +164920,7 @@ function IsAny(value) {
|
|
|
164847
164920
|
return IsKind(value, "Any");
|
|
164848
164921
|
}
|
|
164849
164922
|
|
|
164850
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164923
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/never.mjs
|
|
164851
164924
|
var NeverPattern = "(?!)";
|
|
164852
164925
|
function Never(options) {
|
|
164853
164926
|
return exports_memory.Create({ "~kind": "Never" }, { not: {} }, options);
|
|
@@ -164856,7 +164929,23 @@ function IsNever(value) {
|
|
|
164856
164929
|
return IsKind(value, "Never");
|
|
164857
164930
|
}
|
|
164858
164931
|
|
|
164859
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164932
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/_add_optional.mjs
|
|
164933
|
+
function AddOptionalDeferred(type, options = {}) {
|
|
164934
|
+
return Deferred("AddOptional", [type], options);
|
|
164935
|
+
}
|
|
164936
|
+
function AddOptional(type, options = {}) {
|
|
164937
|
+
return AddOptionalAction(type, options);
|
|
164938
|
+
}
|
|
164939
|
+
|
|
164940
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/_optional.mjs
|
|
164941
|
+
function Optional(type) {
|
|
164942
|
+
return AddOptional(type);
|
|
164943
|
+
}
|
|
164944
|
+
function IsOptional(value) {
|
|
164945
|
+
return IsSchema(value) && exports_guard.HasPropertyKey(value, "~optional");
|
|
164946
|
+
}
|
|
164947
|
+
|
|
164948
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/properties.mjs
|
|
164860
164949
|
function RequiredArray(properties) {
|
|
164861
164950
|
return exports_guard.Keys(properties).filter((key) => !IsOptional(properties[key]));
|
|
164862
164951
|
}
|
|
@@ -164867,7 +164956,7 @@ function PropertyValues(properties) {
|
|
|
164867
164956
|
return exports_guard.Values(properties);
|
|
164868
164957
|
}
|
|
164869
164958
|
|
|
164870
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164959
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/object.mjs
|
|
164871
164960
|
function _Object_(properties, options = {}) {
|
|
164872
164961
|
const requiredKeys = RequiredArray(properties);
|
|
164873
164962
|
const required2 = requiredKeys.length > 0 ? { required: requiredKeys } : {};
|
|
@@ -164880,18 +164969,7 @@ function ObjectOptions(type) {
|
|
|
164880
164969
|
return exports_memory.Discard(type, ["~kind", "type", "properties", "required"]);
|
|
164881
164970
|
}
|
|
164882
164971
|
|
|
164883
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164884
|
-
function Union(anyOf, options = {}) {
|
|
164885
|
-
return exports_memory.Create({ "~kind": "Union" }, { anyOf }, options);
|
|
164886
|
-
}
|
|
164887
|
-
function IsUnion(value) {
|
|
164888
|
-
return IsKind(value, "Union");
|
|
164889
|
-
}
|
|
164890
|
-
function UnionOptions(type) {
|
|
164891
|
-
return exports_memory.Discard(type, ["~kind", "anyOf"]);
|
|
164892
|
-
}
|
|
164893
|
-
|
|
164894
|
-
// ../../node_modules/.bun/typebox@1.1.38/node_modules/typebox/build/type/types/unknown.mjs
|
|
164972
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/unknown.mjs
|
|
164895
164973
|
function Unknown(options) {
|
|
164896
164974
|
return exports_memory.Create({ ["~kind"]: "Unknown" }, {}, options);
|
|
164897
164975
|
}
|
|
@@ -164899,7 +164977,7 @@ function IsUnknown(value) {
|
|
|
164899
164977
|
return IsKind(value, "Unknown");
|
|
164900
164978
|
}
|
|
164901
164979
|
|
|
164902
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164980
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/cyclic.mjs
|
|
164903
164981
|
function Cyclic($defs, $ref, options) {
|
|
164904
164982
|
const defs = exports_guard.Keys($defs).reduce((result, key) => {
|
|
164905
164983
|
return { ...result, [key]: exports_memory.Update($defs[key], {}, { $id: key }) };
|
|
@@ -164910,7 +164988,7 @@ function IsCyclic(value) {
|
|
|
164910
164988
|
return IsKind(value, "Cyclic");
|
|
164911
164989
|
}
|
|
164912
164990
|
|
|
164913
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164991
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/unsafe.mjs
|
|
164914
164992
|
function Unsafe(schema) {
|
|
164915
164993
|
return exports_memory.Update(schema, { ["~unsafe"]: null }, {});
|
|
164916
164994
|
}
|
|
@@ -164918,7 +164996,7 @@ function IsUnsafe(value) {
|
|
|
164918
164996
|
return exports_guard.IsObjectNotArray(value) && exports_guard.HasPropertyKey(value, "~unsafe") && exports_guard.IsNull(value["~unsafe"]);
|
|
164919
164997
|
}
|
|
164920
164998
|
|
|
164921
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
164999
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/arguments/arguments.mjs
|
|
164922
165000
|
var exports_arguments = {};
|
|
164923
165001
|
__export(exports_arguments, {
|
|
164924
165002
|
Match: () => Match
|
|
@@ -164928,7 +165006,7 @@ function Match(args, match) {
|
|
|
164928
165006
|
throw Error("Invalid Arguments");
|
|
164929
165007
|
})();
|
|
164930
165008
|
}
|
|
164931
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165009
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/infer.mjs
|
|
164932
165010
|
function Infer(...args) {
|
|
164933
165011
|
const [name2, extends_] = exports_arguments.Match(args, {
|
|
164934
165012
|
2: (name3, extends_2) => [name3, extends_2, extends_2],
|
|
@@ -164940,7 +165018,18 @@ function IsInfer(value) {
|
|
|
164940
165018
|
return IsKind(value, "Infer");
|
|
164941
165019
|
}
|
|
164942
165020
|
|
|
164943
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165021
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/dependent.mjs
|
|
165022
|
+
function Dependent(if_, then_, else_, options = {}) {
|
|
165023
|
+
return exports_memory.Create({ "~kind": "Dependent" }, { if: if_, then: then_, else: else_ }, options);
|
|
165024
|
+
}
|
|
165025
|
+
function IsDependent(value) {
|
|
165026
|
+
return IsKind(value, "Dependent");
|
|
165027
|
+
}
|
|
165028
|
+
function DependentOptions(type) {
|
|
165029
|
+
return exports_memory.Discard(type, ["~kind", "if", "then", "else"]);
|
|
165030
|
+
}
|
|
165031
|
+
|
|
165032
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/enum/typescript_enum_to_enum_values.mjs
|
|
164944
165033
|
function IsTypeScriptEnumLike(value) {
|
|
164945
165034
|
return exports_guard.IsObjectNotArray(value);
|
|
164946
165035
|
}
|
|
@@ -164949,7 +165038,7 @@ function TypeScriptEnumToEnumValues(type) {
|
|
|
164949
165038
|
return keys.reduce((result, key) => [...result, type[key]], []);
|
|
164950
165039
|
}
|
|
164951
165040
|
|
|
164952
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165041
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/enum.mjs
|
|
164953
165042
|
function Enum(value, options) {
|
|
164954
165043
|
const values = IsTypeScriptEnumLike(value) ? TypeScriptEnumToEnumValues(value) : value;
|
|
164955
165044
|
return exports_memory.Create({ "~kind": "Enum" }, { enum: values }, options);
|
|
@@ -164958,7 +165047,7 @@ function IsEnum(value) {
|
|
|
164958
165047
|
return IsKind(value, "Enum");
|
|
164959
165048
|
}
|
|
164960
165049
|
|
|
164961
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165050
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/intersect.mjs
|
|
164962
165051
|
function Intersect(types, options = {}) {
|
|
164963
165052
|
return exports_memory.Create({ "~kind": "Intersect" }, { allOf: types }, options);
|
|
164964
165053
|
}
|
|
@@ -164968,11 +165057,11 @@ function IsIntersect(value) {
|
|
|
164968
165057
|
function IntersectOptions(type) {
|
|
164969
165058
|
return exports_memory.Discard(type, ["~kind", "allOf"]);
|
|
164970
165059
|
}
|
|
164971
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165060
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/unreachable/unreachable.mjs
|
|
164972
165061
|
function Unreachable() {
|
|
164973
165062
|
throw new Error("Unreachable");
|
|
164974
165063
|
}
|
|
164975
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165064
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/system/hashing/hash.mjs
|
|
164976
165065
|
var ByteMarker;
|
|
164977
165066
|
(function(ByteMarker2) {
|
|
164978
165067
|
ByteMarker2[ByteMarker2["Array"] = 0] = "Array";
|
|
@@ -164997,7 +165086,7 @@ var F64 = new Float64Array(1);
|
|
|
164997
165086
|
var F64In = new DataView(F64.buffer);
|
|
164998
165087
|
var F64Out = new Uint8Array(F64.buffer);
|
|
164999
165088
|
var encoder2 = new TextEncoder;
|
|
165000
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165089
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/_codec.mjs
|
|
165001
165090
|
class EncodeBuilder {
|
|
165002
165091
|
constructor(type, decode3) {
|
|
165003
165092
|
this.type = type;
|
|
@@ -165036,17 +165125,38 @@ function Encode(type, callback) {
|
|
|
165036
165125
|
function IsCodec(value) {
|
|
165037
165126
|
return IsSchema(value) && exports_guard.HasPropertyKey(value, "~codec") && exports_guard.IsObject(value["~codec"]) && exports_guard.HasPropertyKey(value["~codec"], "encode") && exports_guard.HasPropertyKey(value["~codec"], "decode");
|
|
165038
165127
|
}
|
|
165039
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165128
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/_immutable.mjs
|
|
165129
|
+
function Immutable(type) {
|
|
165130
|
+
return AddImmutable(type);
|
|
165131
|
+
}
|
|
165132
|
+
function IsImmutable(value) {
|
|
165133
|
+
return IsSchema(value) && exports_guard.HasPropertyKey(value, "~immutable");
|
|
165134
|
+
}
|
|
165135
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/_add_readonly.mjs
|
|
165136
|
+
function AddReadonlyDeferred(type, options = {}) {
|
|
165137
|
+
return Deferred("AddReadonly", [type], options);
|
|
165138
|
+
}
|
|
165139
|
+
function AddReadonly(type, options = {}) {
|
|
165140
|
+
return AddReadonlyAction(type, options);
|
|
165141
|
+
}
|
|
165142
|
+
|
|
165143
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/_readonly.mjs
|
|
165144
|
+
function Readonly(type) {
|
|
165145
|
+
return AddReadonly(type);
|
|
165146
|
+
}
|
|
165147
|
+
function IsReadonly(value) {
|
|
165148
|
+
return IsSchema(value) && exports_guard.HasPropertyKey(value, "~readonly");
|
|
165149
|
+
}
|
|
165150
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/_refine.mjs
|
|
165040
165151
|
function RefineAdd(type, refinement) {
|
|
165041
165152
|
const refinements = IsRefine(type) ? [...type["~refine"], refinement] : [refinement];
|
|
165042
165153
|
return exports_memory.Update(type, { "~refine": refinements }, {});
|
|
165043
165154
|
}
|
|
165044
165155
|
function Refine(...args) {
|
|
165045
|
-
const [type, check2,
|
|
165156
|
+
const [type, check2, error51] = exports_arguments.Match(args, {
|
|
165046
165157
|
3: (type2, check3, error52) => [type2, check3, error52],
|
|
165047
165158
|
2: (type2, check3) => [type2, check3, () => "Refine Error"]
|
|
165048
165159
|
});
|
|
165049
|
-
const error51 = exports_guard.IsString(error_or_message) ? () => error_or_message : error_or_message;
|
|
165050
165160
|
return RefineAdd(type, { check: check2, error: error51 });
|
|
165051
165161
|
}
|
|
165052
165162
|
function IsRefinement(value) {
|
|
@@ -165055,7 +165165,7 @@ function IsRefinement(value) {
|
|
|
165055
165165
|
function IsRefine(value) {
|
|
165056
165166
|
return IsSchema(value) && exports_guard.HasPropertyKey(value, "~refine") && exports_guard.IsArray(value["~refine"]) && exports_guard.Every(value["~refine"], 0, (value2) => IsRefinement(value2));
|
|
165057
165167
|
}
|
|
165058
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165168
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/bigint.mjs
|
|
165059
165169
|
var BigIntPattern = "-?(?:0|[1-9][0-9]*)n";
|
|
165060
165170
|
function BigInt2(options) {
|
|
165061
165171
|
return exports_memory.Create({ "~kind": "BigInt" }, { type: "bigint" }, options);
|
|
@@ -165063,21 +165173,21 @@ function BigInt2(options) {
|
|
|
165063
165173
|
function IsBigInt2(value) {
|
|
165064
165174
|
return IsKind(value, "BigInt");
|
|
165065
165175
|
}
|
|
165066
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165176
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/boolean.mjs
|
|
165067
165177
|
function Boolean2(options) {
|
|
165068
165178
|
return exports_memory.Create({ "~kind": "Boolean" }, { type: "boolean" }, options);
|
|
165069
165179
|
}
|
|
165070
|
-
function
|
|
165180
|
+
function IsBoolean3(value) {
|
|
165071
165181
|
return IsKind(value, "Boolean");
|
|
165072
165182
|
}
|
|
165073
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165183
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/identifier.mjs
|
|
165074
165184
|
function Identifier(name2) {
|
|
165075
165185
|
return exports_memory.Create({ "~kind": "Identifier" }, { name: name2 });
|
|
165076
165186
|
}
|
|
165077
165187
|
function IsIdentifier(value) {
|
|
165078
165188
|
return IsKind(value, "Identifier");
|
|
165079
165189
|
}
|
|
165080
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165190
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/integer.mjs
|
|
165081
165191
|
var IntegerPattern = "-?(?:0|[1-9][0-9]*)";
|
|
165082
165192
|
function Integer(options) {
|
|
165083
165193
|
return exports_memory.Create({ "~kind": "Integer" }, { type: "integer" }, options);
|
|
@@ -165085,17 +165195,7 @@ function Integer(options) {
|
|
|
165085
165195
|
function IsInteger2(value) {
|
|
165086
165196
|
return IsKind(value, "Integer");
|
|
165087
165197
|
}
|
|
165088
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165089
|
-
function Iterator(iteratorItems, options) {
|
|
165090
|
-
return exports_memory.Create({ "~kind": "Iterator" }, { type: "iterator", iteratorItems }, options);
|
|
165091
|
-
}
|
|
165092
|
-
function IsIterator2(value) {
|
|
165093
|
-
return IsKind(value, "Iterator");
|
|
165094
|
-
}
|
|
165095
|
-
function IteratorOptions(type) {
|
|
165096
|
-
return exports_memory.Discard(type, ["~kind", "type", "iteratorItems"]);
|
|
165097
|
-
}
|
|
165098
|
-
// ../../node_modules/.bun/typebox@1.1.38/node_modules/typebox/build/type/types/literal.mjs
|
|
165198
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/literal.mjs
|
|
165099
165199
|
class InvalidLiteralValue extends Error {
|
|
165100
165200
|
constructor(value) {
|
|
165101
165201
|
super(`Invalid Literal value`);
|
|
@@ -165127,29 +165227,29 @@ function IsLiteralString(value) {
|
|
|
165127
165227
|
function IsLiteral(value) {
|
|
165128
165228
|
return IsKind(value, "Literal");
|
|
165129
165229
|
}
|
|
165130
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165230
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/null.mjs
|
|
165131
165231
|
function Null(options) {
|
|
165132
165232
|
return exports_memory.Create({ "~kind": "Null" }, { type: "null" }, options);
|
|
165133
165233
|
}
|
|
165134
165234
|
function IsNull2(value) {
|
|
165135
165235
|
return IsKind(value, "Null");
|
|
165136
165236
|
}
|
|
165137
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165138
|
-
var NumberPattern = "-?(?:0|[1-9][0-9]*)(
|
|
165237
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/number.mjs
|
|
165238
|
+
var NumberPattern = "-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?";
|
|
165139
165239
|
function Number2(options) {
|
|
165140
165240
|
return exports_memory.Create({ "~kind": "Number" }, { type: "number" }, options);
|
|
165141
165241
|
}
|
|
165142
|
-
function
|
|
165242
|
+
function IsNumber3(value) {
|
|
165143
165243
|
return IsKind(value, "Number");
|
|
165144
165244
|
}
|
|
165145
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165245
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/symbol.mjs
|
|
165146
165246
|
function Symbol2(options) {
|
|
165147
165247
|
return exports_memory.Create({ "~kind": "Symbol" }, { type: "symbol" }, options);
|
|
165148
165248
|
}
|
|
165149
165249
|
function IsSymbol2(value) {
|
|
165150
165250
|
return IsKind(value, "Symbol");
|
|
165151
165251
|
}
|
|
165152
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165252
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/parameter.mjs
|
|
165153
165253
|
function Parameter(...args) {
|
|
165154
165254
|
const [name2, extends_, equals] = exports_arguments.Match(args, {
|
|
165155
165255
|
3: (name3, extends_2, equals2) => [name3, extends_2, equals2],
|
|
@@ -165161,28 +165261,39 @@ function Parameter(...args) {
|
|
|
165161
165261
|
function IsParameter(value) {
|
|
165162
165262
|
return IsKind(value, "Parameter");
|
|
165163
165263
|
}
|
|
165164
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165264
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/string.mjs
|
|
165165
165265
|
var StringPattern = ".*";
|
|
165166
165266
|
function String2(options) {
|
|
165167
165267
|
return exports_memory.Create({ "~kind": "String" }, { type: "string" }, options);
|
|
165168
165268
|
}
|
|
165169
|
-
function
|
|
165269
|
+
function IsString3(value) {
|
|
165170
165270
|
return IsKind(value, "String");
|
|
165171
165271
|
}
|
|
165172
165272
|
|
|
165173
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165273
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/union.mjs
|
|
165274
|
+
function Union(anyOf, options = {}) {
|
|
165275
|
+
return exports_memory.Create({ "~kind": "Union" }, { anyOf }, options);
|
|
165276
|
+
}
|
|
165277
|
+
function IsUnion(value) {
|
|
165278
|
+
return IsKind(value, "Union");
|
|
165279
|
+
}
|
|
165280
|
+
function UnionOptions(type) {
|
|
165281
|
+
return exports_memory.Discard(type, ["~kind", "anyOf"]);
|
|
165282
|
+
}
|
|
165283
|
+
|
|
165284
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/patterns/pattern.mjs
|
|
165174
165285
|
function ParsePatternIntoTypes(pattern) {
|
|
165175
165286
|
const parsed = Pattern(pattern);
|
|
165176
165287
|
const result = exports_guard.IsEqual(parsed.length, 2) ? parsed[0] : [];
|
|
165177
165288
|
return result;
|
|
165178
165289
|
}
|
|
165179
165290
|
|
|
165180
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165291
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs
|
|
165181
165292
|
function FromLiteral(_value) {
|
|
165182
165293
|
return true;
|
|
165183
165294
|
}
|
|
165184
165295
|
function FromTypesReduce(types) {
|
|
165185
|
-
return exports_guard.
|
|
165296
|
+
return exports_guard.ShiftLeft(types, (left, right) => FromType(left) ? FromTypesReduce(right) : false, () => true);
|
|
165186
165297
|
}
|
|
165187
165298
|
function FromTypes(types) {
|
|
165188
165299
|
const result = exports_guard.IsEqual(types.length, 0) ? false : FromTypesReduce(types);
|
|
@@ -165196,27 +165307,27 @@ function IsTemplateLiteralFinite(types) {
|
|
|
165196
165307
|
return result;
|
|
165197
165308
|
}
|
|
165198
165309
|
|
|
165199
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165310
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/template_literal/create.mjs
|
|
165200
165311
|
function TemplateLiteralCreate(pattern) {
|
|
165201
165312
|
return exports_memory.Create({ ["~kind"]: "TemplateLiteral" }, { type: "string", pattern }, {});
|
|
165202
165313
|
}
|
|
165203
165314
|
|
|
165204
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165315
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/template_literal/decode.mjs
|
|
165205
165316
|
function FromLiteralPush(variants, value, result = []) {
|
|
165206
|
-
return exports_guard.
|
|
165317
|
+
return exports_guard.ShiftLeft(variants, (left, right) => FromLiteralPush(right, value, [...result, `${left}${value}`]), () => result);
|
|
165207
165318
|
}
|
|
165208
165319
|
function FromLiteral2(variants, value) {
|
|
165209
165320
|
return exports_guard.IsEqual(variants.length, 0) ? [`${value}`] : FromLiteralPush(variants, value);
|
|
165210
165321
|
}
|
|
165211
165322
|
function FromUnion(variants, types, result = []) {
|
|
165212
|
-
return exports_guard.
|
|
165323
|
+
return exports_guard.ShiftLeft(types, (left, right) => FromUnion(variants, right, [...result, ...FromType2(variants, left)]), () => result);
|
|
165213
165324
|
}
|
|
165214
165325
|
function FromType2(variants, type) {
|
|
165215
165326
|
const result = IsUnion(type) ? FromUnion(variants, type.anyOf) : IsLiteral(type) ? FromLiteral2(variants, type.const) : Unreachable();
|
|
165216
165327
|
return result;
|
|
165217
165328
|
}
|
|
165218
165329
|
function DecodeFromSpan(variants, types) {
|
|
165219
|
-
return exports_guard.
|
|
165330
|
+
return exports_guard.ShiftLeft(types, (left, right) => DecodeFromSpan(FromType2(variants, left), right), () => variants);
|
|
165220
165331
|
}
|
|
165221
165332
|
function VariantsToLiterals(variants) {
|
|
165222
165333
|
return variants.map((variant) => Literal(variant));
|
|
@@ -165241,67 +165352,78 @@ function TemplateLiteralDecode(pattern) {
|
|
|
165241
165352
|
return result;
|
|
165242
165353
|
}
|
|
165243
165354
|
|
|
165244
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165355
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/record_create.mjs
|
|
165245
165356
|
function CreateRecord(key, value) {
|
|
165246
165357
|
const type = "object";
|
|
165247
165358
|
const patternProperties = { [key]: value };
|
|
165248
165359
|
return exports_memory.Create({ ["~kind"]: "Record" }, { type, patternProperties });
|
|
165249
165360
|
}
|
|
165250
165361
|
|
|
165251
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165362
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key_any.mjs
|
|
165252
165363
|
function FromAnyKey(value) {
|
|
165253
165364
|
return CreateRecord(StringKey, value);
|
|
165254
165365
|
}
|
|
165255
165366
|
|
|
165256
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165367
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key_boolean.mjs
|
|
165257
165368
|
function FromBooleanKey(value) {
|
|
165258
165369
|
return _Object_({ true: value, false: value });
|
|
165259
165370
|
}
|
|
165260
165371
|
|
|
165261
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165262
|
-
function
|
|
165263
|
-
|
|
165372
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/tuple.mjs
|
|
165373
|
+
function Tuple(types, options = {}) {
|
|
165374
|
+
const [items, minItems, additionalItems] = [types, types.length, false];
|
|
165375
|
+
return exports_memory.Create({ ["~kind"]: "Tuple" }, { type: "array", additionalItems, items, minItems }, options);
|
|
165264
165376
|
}
|
|
165265
|
-
function
|
|
165266
|
-
|
|
165267
|
-
return result;
|
|
165377
|
+
function IsTuple(value) {
|
|
165378
|
+
return IsKind(value, "Tuple");
|
|
165268
165379
|
}
|
|
165269
|
-
function
|
|
165270
|
-
|
|
165271
|
-
|
|
165272
|
-
|
|
165380
|
+
function TupleOptions(type) {
|
|
165381
|
+
return exports_memory.Discard(type, ["~kind", "type", "items", "minItems", "additionalItems"]);
|
|
165382
|
+
}
|
|
165383
|
+
|
|
165384
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs
|
|
165385
|
+
function RemoveReadonlyOperation(type) {
|
|
165386
|
+
return exports_memory.Discard(type, ["~readonly"]);
|
|
165273
165387
|
}
|
|
165274
|
-
function
|
|
165275
|
-
const result =
|
|
165388
|
+
function RemoveReadonlyAction(type, options) {
|
|
165389
|
+
const result = exports_memory.Update(RemoveReadonlyOperation(type), {}, options);
|
|
165276
165390
|
return result;
|
|
165277
165391
|
}
|
|
165392
|
+
function RemoveReadonlyInstantiate(context, state, type, options) {
|
|
165393
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
165394
|
+
return RemoveReadonlyAction(instantiatedType, options);
|
|
165395
|
+
}
|
|
165278
165396
|
|
|
165279
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165280
|
-
function
|
|
165281
|
-
|
|
165282
|
-
|
|
165283
|
-
|
|
165397
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/_remove_readonly.mjs
|
|
165398
|
+
function RemoveReadonlyDeferred(type, options = {}) {
|
|
165399
|
+
return Deferred("RemoveReadonly", [type], options);
|
|
165400
|
+
}
|
|
165401
|
+
function RemoveReadonly(type, options = {}) {
|
|
165402
|
+
return RemoveReadonlyAction(type, options);
|
|
165284
165403
|
}
|
|
165285
165404
|
|
|
165286
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165287
|
-
function
|
|
165288
|
-
|
|
165405
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs
|
|
165406
|
+
function RemoveOptionalOperation(type) {
|
|
165407
|
+
return exports_memory.Discard(type, ["~optional"]);
|
|
165408
|
+
}
|
|
165409
|
+
function RemoveOptionalAction(type, options) {
|
|
165410
|
+
const result = exports_memory.Update(RemoveOptionalOperation(type), {}, options);
|
|
165289
165411
|
return result;
|
|
165290
165412
|
}
|
|
165291
|
-
|
|
165292
|
-
|
|
165293
|
-
|
|
165294
|
-
const [items, minItems, additionalItems] = [types, types.length, false];
|
|
165295
|
-
return exports_memory.Create({ ["~kind"]: "Tuple" }, { type: "array", additionalItems, items, minItems }, options);
|
|
165413
|
+
function RemoveOptionalInstantiate(context, state, type, options) {
|
|
165414
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
165415
|
+
return RemoveOptionalAction(instantiatedType, options);
|
|
165296
165416
|
}
|
|
165297
|
-
|
|
165298
|
-
|
|
165417
|
+
|
|
165418
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/_remove_optional.mjs
|
|
165419
|
+
function RemoveOptionalDeferred(type, options = {}) {
|
|
165420
|
+
return Deferred("RemoveOptional", [type], options);
|
|
165299
165421
|
}
|
|
165300
|
-
function
|
|
165301
|
-
return
|
|
165422
|
+
function RemoveOptional(type, options = {}) {
|
|
165423
|
+
return RemoveOptionalAction(type, options);
|
|
165302
165424
|
}
|
|
165303
165425
|
|
|
165304
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165426
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/tuple/to_object.mjs
|
|
165305
165427
|
function TupleElementsToProperties(types) {
|
|
165306
165428
|
const result = types.reduceRight((result2, right, index) => {
|
|
165307
165429
|
return { [index]: right, ...result2 };
|
|
@@ -165314,7 +165436,7 @@ function TupleToObject(type) {
|
|
|
165314
165436
|
return result;
|
|
165315
165437
|
}
|
|
165316
165438
|
|
|
165317
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165439
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/evaluate/composite.mjs
|
|
165318
165440
|
function IsReadonlyProperty(left, right) {
|
|
165319
165441
|
return IsReadonly(left) ? IsReadonly(right) ? true : false : false;
|
|
165320
165442
|
}
|
|
@@ -165325,8 +165447,8 @@ function CompositeProperty(left, right) {
|
|
|
165325
165447
|
const isReadonly = IsReadonlyProperty(left, right);
|
|
165326
165448
|
const isOptional = IsOptionalProperty(left, right);
|
|
165327
165449
|
const evaluated = EvaluateIntersect([left, right]);
|
|
165328
|
-
const property =
|
|
165329
|
-
return isReadonly && isOptional ?
|
|
165450
|
+
const property = RemoveReadonly(RemoveOptional(evaluated));
|
|
165451
|
+
return isReadonly && isOptional ? AddReadonly(AddOptional(property)) : isReadonly && !isOptional ? AddReadonly(property) : !isReadonly && isOptional ? AddOptional(property) : property;
|
|
165330
165452
|
}
|
|
165331
165453
|
function CompositePropertyKey(left, right, key) {
|
|
165332
165454
|
return key in left ? key in right ? CompositeProperty(left[key], right[key]) : left[key] : (key in right) ? right[key] : Never();
|
|
@@ -165348,13 +165470,13 @@ function Composite(left, right) {
|
|
|
165348
165470
|
return _Object_(properties);
|
|
165349
165471
|
}
|
|
165350
165472
|
|
|
165351
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165473
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/evaluate/narrow.mjs
|
|
165352
165474
|
function Narrow(left, right) {
|
|
165353
165475
|
const result = Compare(left, right);
|
|
165354
165476
|
return exports_guard.IsEqual(result, ResultLeftInside) ? left : exports_guard.IsEqual(result, ResultRightInside) ? right : exports_guard.IsEqual(result, ResultEqual) ? right : Never();
|
|
165355
165477
|
}
|
|
165356
165478
|
|
|
165357
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165479
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/evaluate/distribute.mjs
|
|
165358
165480
|
function IsObjectLike(type) {
|
|
165359
165481
|
return IsObject2(type) || IsTuple(type);
|
|
165360
165482
|
}
|
|
@@ -165374,65 +165496,114 @@ function DistributeOperation(left, right) {
|
|
|
165374
165496
|
return result;
|
|
165375
165497
|
}
|
|
165376
165498
|
function DistributeType(type, types, result = []) {
|
|
165377
|
-
return exports_guard.
|
|
165499
|
+
return exports_guard.ShiftLeft(types, (left, right) => DistributeType(type, right, [...result, DistributeOperation(type, left)]), () => exports_guard.IsEqual(result.length, 0) ? [type] : result);
|
|
165378
165500
|
}
|
|
165379
165501
|
function DistributeUnion(types, distribution, result = []) {
|
|
165380
|
-
return exports_guard.
|
|
165502
|
+
return exports_guard.ShiftLeft(types, (left, right) => DistributeUnion(right, distribution, [...result, ...Distribute([left], distribution)]), () => result);
|
|
165381
165503
|
}
|
|
165382
165504
|
function Distribute(types, result = []) {
|
|
165383
|
-
return exports_guard.
|
|
165505
|
+
return exports_guard.ShiftLeft(types, (left, right) => IsUnion(left) ? Distribute(right, DistributeUnion(left.anyOf, result)) : Distribute(right, DistributeType(left, result)), () => result);
|
|
165506
|
+
}
|
|
165507
|
+
|
|
165508
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/exclude/operation.mjs
|
|
165509
|
+
function ExcludeType(left, right) {
|
|
165510
|
+
const check2 = Extends({}, left, right);
|
|
165511
|
+
const result = exports_result.IsExtendsTrueLike(check2) ? [] : [left];
|
|
165512
|
+
return result;
|
|
165513
|
+
}
|
|
165514
|
+
function ExcludeUnion(types, right) {
|
|
165515
|
+
return types.reduce((result, head) => {
|
|
165516
|
+
return [...result, ...ExcludeType(head, right)];
|
|
165517
|
+
}, []);
|
|
165518
|
+
}
|
|
165519
|
+
function ExcludeOperation(left, right) {
|
|
165520
|
+
const evaluated = EvaluateType(left);
|
|
165521
|
+
const canonical = IsUnion(evaluated) ? evaluated.anyOf : [evaluated];
|
|
165522
|
+
const remaining = ExcludeUnion(canonical, right);
|
|
165523
|
+
const result = EvaluateUnion(remaining);
|
|
165524
|
+
return result;
|
|
165384
165525
|
}
|
|
165385
165526
|
|
|
165386
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165527
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs
|
|
165528
|
+
function EvaluateDependent(if_, then_, else_) {
|
|
165529
|
+
const intersect = Intersect([if_, then_]);
|
|
165530
|
+
const excluded = ExcludeOperation(else_, if_);
|
|
165531
|
+
const result = EvaluateUnion([intersect, excluded]);
|
|
165532
|
+
return result;
|
|
165533
|
+
}
|
|
165534
|
+
function EvaluateEnum(values) {
|
|
165535
|
+
const result = values.map((value) => Literal(value));
|
|
165536
|
+
return EvaluateUnion(result);
|
|
165537
|
+
}
|
|
165387
165538
|
function EvaluateIntersect(types) {
|
|
165388
165539
|
const distribution = Distribute(types);
|
|
165389
|
-
const
|
|
165540
|
+
const broadend = Broaden(distribution);
|
|
165541
|
+
const result = EvaluateUnionFast(broadend);
|
|
165542
|
+
return result;
|
|
165543
|
+
}
|
|
165544
|
+
function EvaluateTemplateLiteral(pattern) {
|
|
165545
|
+
const evaluated = TemplateLiteralDecode(pattern);
|
|
165546
|
+
const result = EvaluateType(evaluated);
|
|
165390
165547
|
return result;
|
|
165391
165548
|
}
|
|
165392
165549
|
function EvaluateUnion(types) {
|
|
165393
|
-
const
|
|
165550
|
+
const broadend = Broaden(types);
|
|
165551
|
+
const result = EvaluateUnionFast(broadend);
|
|
165394
165552
|
return result;
|
|
165395
165553
|
}
|
|
165396
165554
|
function EvaluateType(type) {
|
|
165397
|
-
return IsIntersect(type) ? EvaluateIntersect(type.allOf) : IsUnion(type) ? EvaluateUnion(type.anyOf) : type;
|
|
165555
|
+
return IsDependent(type) ? EvaluateDependent(type.if, type.then, type.else) : IsEnum(type) ? EvaluateEnum(type.enum) : IsIntersect(type) ? EvaluateIntersect(type.allOf) : IsTemplateLiteral(type) ? EvaluateTemplateLiteral(type.pattern) : IsUnion(type) ? EvaluateUnion(type.anyOf) : type;
|
|
165398
165556
|
}
|
|
165399
165557
|
function EvaluateUnionFast(types) {
|
|
165400
165558
|
const result = exports_guard.IsEqual(types.length, 1) ? types[0] : exports_guard.IsEqual(types.length, 0) ? Never() : Union(types);
|
|
165401
165559
|
return result;
|
|
165402
165560
|
}
|
|
165403
165561
|
|
|
165404
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165562
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key_enum.mjs
|
|
165563
|
+
function FromEnumKey(values, value) {
|
|
165564
|
+
const unionKey = EvaluateEnum(values);
|
|
165565
|
+
const result = FromKey(unionKey, value);
|
|
165566
|
+
return result;
|
|
165567
|
+
}
|
|
165568
|
+
|
|
165569
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key_integer.mjs
|
|
165570
|
+
function FromIntegerKey(_key, value) {
|
|
165571
|
+
const result = CreateRecord(IntegerKey, value);
|
|
165572
|
+
return result;
|
|
165573
|
+
}
|
|
165574
|
+
|
|
165575
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key_intersect.mjs
|
|
165405
165576
|
function FromIntersectKey(types, value) {
|
|
165406
165577
|
const evaluatedKey = EvaluateIntersect(types);
|
|
165407
165578
|
const result = FromKey(evaluatedKey, value);
|
|
165408
165579
|
return result;
|
|
165409
165580
|
}
|
|
165410
165581
|
|
|
165411
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165582
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key_literal.mjs
|
|
165412
165583
|
function FromLiteralKey(key, value) {
|
|
165413
165584
|
return exports_guard.IsString(key) || exports_guard.IsNumber(key) ? _Object_({ [key]: value }) : exports_guard.IsEqual(key, false) ? _Object_({ false: value }) : exports_guard.IsEqual(key, true) ? _Object_({ true: value }) : _Object_({});
|
|
165414
165585
|
}
|
|
165415
165586
|
|
|
165416
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165587
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key_number.mjs
|
|
165417
165588
|
function FromNumberKey(_key, value) {
|
|
165418
165589
|
const result = CreateRecord(NumberKey, value);
|
|
165419
165590
|
return result;
|
|
165420
165591
|
}
|
|
165421
165592
|
|
|
165422
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165593
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key_string.mjs
|
|
165423
165594
|
function FromStringKey(key, value) {
|
|
165424
165595
|
return exports_guard.HasPropertyKey(key, "pattern") && (exports_guard.IsString(key.pattern) || key.pattern instanceof RegExp) ? CreateRecord(key.pattern.toString(), value) : CreateRecord(StringKey, value);
|
|
165425
165596
|
}
|
|
165426
165597
|
|
|
165427
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165598
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs
|
|
165428
165599
|
function FromTemplateKey(pattern, value) {
|
|
165429
165600
|
const types = ParsePatternIntoTypes(pattern);
|
|
165430
165601
|
const finite = IsTemplateLiteralFinite(types);
|
|
165431
|
-
const result = finite ? FromKey(
|
|
165602
|
+
const result = finite ? FromKey(EvaluateTemplateLiteral(pattern), value) : CreateRecord(pattern, value);
|
|
165432
165603
|
return result;
|
|
165433
165604
|
}
|
|
165434
165605
|
|
|
165435
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165606
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/evaluate/flatten.mjs
|
|
165436
165607
|
function FlattenType(type) {
|
|
165437
165608
|
const result = IsUnion(type) ? Flatten(type.anyOf) : [type];
|
|
165438
165609
|
return result;
|
|
@@ -165443,9 +165614,9 @@ function Flatten(types) {
|
|
|
165443
165614
|
}, []);
|
|
165444
165615
|
}
|
|
165445
165616
|
|
|
165446
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165617
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key_union.mjs
|
|
165447
165618
|
function StringOrNumberCheck(types) {
|
|
165448
|
-
return types.some((type) =>
|
|
165619
|
+
return types.some((type) => IsString3(type) || IsNumber3(type) || IsInteger2(type));
|
|
165449
165620
|
}
|
|
165450
165621
|
function TryBuildRecord(types, value) {
|
|
165451
165622
|
return exports_guard.IsEqual(StringOrNumberCheck(types), true) ? CreateRecord(StringKey, value) : undefined;
|
|
@@ -165466,13 +165637,13 @@ function FromUnionKey(types, value) {
|
|
|
165466
165637
|
return IsSchema(record2) ? record2 : CreateObject(flattened, value);
|
|
165467
165638
|
}
|
|
165468
165639
|
|
|
165469
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165640
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/from_key.mjs
|
|
165470
165641
|
function FromKey(key, value) {
|
|
165471
|
-
const result = IsAny(key) ? FromAnyKey(value) :
|
|
165642
|
+
const result = IsAny(key) ? FromAnyKey(value) : IsBoolean3(key) ? FromBooleanKey(value) : IsEnum(key) ? FromEnumKey(key.enum, value) : IsInteger2(key) ? FromIntegerKey(key, value) : IsIntersect(key) ? FromIntersectKey(key.allOf, value) : IsLiteral(key) ? FromLiteralKey(key.const, value) : IsNumber3(key) ? FromNumberKey(key, value) : IsUnion(key) ? FromUnionKey(key.anyOf, value) : IsString3(key) ? FromStringKey(key, value) : IsTemplateLiteral(key) ? FromTemplateKey(key.pattern, value) : _Object_({});
|
|
165472
165643
|
return result;
|
|
165473
165644
|
}
|
|
165474
165645
|
|
|
165475
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165646
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/record/instantiate.mjs
|
|
165476
165647
|
function RecordAction(key, value, options) {
|
|
165477
165648
|
const result = CanInstantiate([key]) ? exports_memory.Update(FromKey(key, value), {}, options) : RecordDeferred(key, value, options);
|
|
165478
165649
|
return result;
|
|
@@ -165483,7 +165654,7 @@ function RecordInstantiate(context, state, key, value, options) {
|
|
|
165483
165654
|
return RecordAction(instantiatedKey, instantiatedValue, options);
|
|
165484
165655
|
}
|
|
165485
165656
|
|
|
165486
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165657
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/record.mjs
|
|
165487
165658
|
var IntegerKey = `^${IntegerPattern}$`;
|
|
165488
165659
|
var NumberKey = `^${NumberPattern}$`;
|
|
165489
165660
|
var StringKey = `^${StringPattern}$`;
|
|
@@ -165493,15 +165664,19 @@ function RecordDeferred(key, value, options = {}) {
|
|
|
165493
165664
|
function Record(key, value, options = {}) {
|
|
165494
165665
|
return RecordAction(key, value, options);
|
|
165495
165666
|
}
|
|
165496
|
-
function RecordFromPattern(
|
|
165497
|
-
return CreateRecord(
|
|
165667
|
+
function RecordFromPattern(pattern, value) {
|
|
165668
|
+
return CreateRecord(pattern, value);
|
|
165669
|
+
}
|
|
165670
|
+
function RecordPatternToType(pattern) {
|
|
165671
|
+
const result = exports_guard.IsEqual(pattern, StringKey) ? String2() : exports_guard.IsEqual(pattern, IntegerKey) ? Integer() : exports_guard.IsEqual(pattern, NumberKey) ? Number2() : TemplateLiteralDecodeUnsafe(pattern);
|
|
165672
|
+
return result;
|
|
165498
165673
|
}
|
|
165499
165674
|
function RecordPattern(type) {
|
|
165500
165675
|
return exports_guard.Keys(type.patternProperties)[0];
|
|
165501
165676
|
}
|
|
165502
165677
|
function RecordKey(type) {
|
|
165503
165678
|
const pattern = RecordPattern(type);
|
|
165504
|
-
const result =
|
|
165679
|
+
const result = RecordPatternToType(pattern);
|
|
165505
165680
|
return result;
|
|
165506
165681
|
}
|
|
165507
165682
|
function RecordValue(type) {
|
|
@@ -165510,37 +165685,37 @@ function RecordValue(type) {
|
|
|
165510
165685
|
function IsRecord(value) {
|
|
165511
165686
|
return IsKind(value, "Record");
|
|
165512
165687
|
}
|
|
165513
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165688
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/rest.mjs
|
|
165514
165689
|
function Rest(type) {
|
|
165515
165690
|
return exports_memory.Create({ "~kind": "Rest" }, { type: "rest", items: type }, {});
|
|
165516
165691
|
}
|
|
165517
165692
|
function IsRest(value) {
|
|
165518
165693
|
return IsKind(value, "Rest");
|
|
165519
165694
|
}
|
|
165520
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165695
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/this.mjs
|
|
165521
165696
|
function This(options) {
|
|
165522
165697
|
return exports_memory.Create({ ["~kind"]: "This" }, { $ref: "#" }, options);
|
|
165523
165698
|
}
|
|
165524
165699
|
function IsThis(value) {
|
|
165525
165700
|
return IsKind(value, "This");
|
|
165526
165701
|
}
|
|
165527
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165702
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/undefined.mjs
|
|
165528
165703
|
function Undefined(options) {
|
|
165529
165704
|
return exports_memory.Create({ "~kind": "Undefined" }, { type: "undefined" }, options);
|
|
165530
165705
|
}
|
|
165531
165706
|
function IsUndefined2(value) {
|
|
165532
165707
|
return IsKind(value, "Undefined");
|
|
165533
165708
|
}
|
|
165534
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165709
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/void.mjs
|
|
165535
165710
|
function Void(options) {
|
|
165536
165711
|
return exports_memory.Create({ "~kind": "Void" }, { type: "void" }, options);
|
|
165537
165712
|
}
|
|
165538
165713
|
function IsVoid(value) {
|
|
165539
165714
|
return IsKind(value, "Void");
|
|
165540
165715
|
}
|
|
165541
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
165716
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/mapping.mjs
|
|
165542
165717
|
function IntrinsicOrCall(ref2, parameters) {
|
|
165543
|
-
return exports_guard.IsEqual(ref2, "Array") ? _Array_(parameters[0]) : exports_guard.IsEqual(ref2, "
|
|
165718
|
+
return exports_guard.IsEqual(ref2, "Array") ? _Array_(parameters[0]) : exports_guard.IsEqual(ref2, "Capitalize") ? CapitalizeDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "ConstructorParameters") ? ConstructorParametersDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "Evaluate") ? EvaluateDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "Exclude") ? ExcludeDeferred(parameters[0], parameters[1]) : exports_guard.IsEqual(ref2, "Extract") ? ExtractDeferred(parameters[0], parameters[1]) : exports_guard.IsEqual(ref2, "Index") ? IndexDeferred(parameters[0], parameters[1]) : exports_guard.IsEqual(ref2, "InstanceType") ? InstanceTypeDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "Lowercase") ? LowercaseDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "NonNullable") ? NonNullableDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "Omit") ? OmitDeferred(parameters[0], parameters[1]) : exports_guard.IsEqual(ref2, "Parameters") ? ParametersDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "Partial") ? PartialDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "Pick") ? PickDeferred(parameters[0], parameters[1]) : exports_guard.IsEqual(ref2, "Readonly") ? ReadonlyObjectDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "KeyOf") ? KeyOfDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "Record") ? RecordDeferred(parameters[0], parameters[1]) : exports_guard.IsEqual(ref2, "Required") ? RequiredDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "ReturnType") ? ReturnTypeDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "Uncapitalize") ? UncapitalizeDeferred(parameters[0]) : exports_guard.IsEqual(ref2, "Uppercase") ? UppercaseDeferred(parameters[0]) : CallConstruct(Ref(ref2), parameters);
|
|
165544
165719
|
}
|
|
165545
165720
|
function Unreachable2() {
|
|
165546
165721
|
throw Error("Unreachable");
|
|
@@ -165629,8 +165804,17 @@ function KeywordVoidMapping(input) {
|
|
|
165629
165804
|
function KeywordThisMapping(input) {
|
|
165630
165805
|
return This();
|
|
165631
165806
|
}
|
|
165632
|
-
function
|
|
165633
|
-
return input;
|
|
165807
|
+
function LiteralBigIntMapping(input) {
|
|
165808
|
+
return Literal(BigInt(input));
|
|
165809
|
+
}
|
|
165810
|
+
function LiteralBooleanMapping(input) {
|
|
165811
|
+
return Literal(exports_guard.IsEqual(input, "true"));
|
|
165812
|
+
}
|
|
165813
|
+
function LiteralNumberMapping(input) {
|
|
165814
|
+
return Literal(parseFloat(input));
|
|
165815
|
+
}
|
|
165816
|
+
function LiteralStringMapping(input) {
|
|
165817
|
+
return Literal(input);
|
|
165634
165818
|
}
|
|
165635
165819
|
function TemplateInterpolateMapping(input) {
|
|
165636
165820
|
return input[1];
|
|
@@ -165647,20 +165831,8 @@ function TemplateLiteralTypesMapping(input) {
|
|
|
165647
165831
|
function TemplateLiteralMapping(input) {
|
|
165648
165832
|
return TemplateLiteralDeferred(input);
|
|
165649
165833
|
}
|
|
165650
|
-
function
|
|
165651
|
-
return
|
|
165652
|
-
}
|
|
165653
|
-
function LiteralBooleanMapping(input) {
|
|
165654
|
-
return Literal(exports_guard.IsEqual(input, "true"));
|
|
165655
|
-
}
|
|
165656
|
-
function LiteralNumberMapping(input) {
|
|
165657
|
-
return Literal(parseFloat(input));
|
|
165658
|
-
}
|
|
165659
|
-
function LiteralStringMapping(input) {
|
|
165660
|
-
return Literal(input);
|
|
165661
|
-
}
|
|
165662
|
-
function LiteralMapping(input) {
|
|
165663
|
-
return input;
|
|
165834
|
+
function DependentMapping(input) {
|
|
165835
|
+
return exports_guard.IsEqual(input.length, 6) ? Dependent(input[1], input[3], input[5]) : Dependent(input[1], input[3], Unknown());
|
|
165664
165836
|
}
|
|
165665
165837
|
function KeyOfMapping(input) {
|
|
165666
165838
|
return input.length > 0;
|
|
@@ -165676,18 +165848,24 @@ function ExtendsMapping(input) {
|
|
|
165676
165848
|
function BaseMapping(input) {
|
|
165677
165849
|
return exports_guard.IsArray(input) && exports_guard.IsEqual(input.length, 3) ? input[1] : input;
|
|
165678
165850
|
}
|
|
165679
|
-
|
|
165851
|
+
function WithMapping(input) {
|
|
165852
|
+
return exports_guard.IsEqual(input.length, 2) ? input[1] : [];
|
|
165853
|
+
}
|
|
165854
|
+
function FactorIndexArray(Type, indexArray) {
|
|
165680
165855
|
return indexArray.reduce((result, left) => {
|
|
165681
165856
|
const _left = left;
|
|
165682
165857
|
return exports_guard.IsEqual(_left.length, 1) ? IndexDeferred(result, _left[0]) : exports_guard.IsEqual(_left.length, 0) ? _Array_(result) : Unreachable2();
|
|
165683
165858
|
}, Type);
|
|
165684
|
-
}
|
|
165685
|
-
|
|
165859
|
+
}
|
|
165860
|
+
function FactorExtends(type, extend2) {
|
|
165686
165861
|
return exports_guard.IsEqual(extend2.length, 3) ? ConditionalDeferred(type, extend2[0], extend2[1], extend2[2]) : type;
|
|
165687
|
-
}
|
|
165862
|
+
}
|
|
165863
|
+
function FactorWith(type, withClause) {
|
|
165864
|
+
return exports_guard.IsArray(withClause) && exports_guard.IsEqual(withClause.length, 0) ? type : WithDeferred(type, withClause);
|
|
165865
|
+
}
|
|
165688
165866
|
function FactorMapping(input) {
|
|
165689
|
-
const [keyOf, type, indexArray, extend2] = input;
|
|
165690
|
-
return keyOf ? FactorExtends(KeyOfDeferred(FactorIndexArray(type, indexArray)), extend2) : FactorExtends(FactorIndexArray(type, indexArray), extend2);
|
|
165867
|
+
const [keyOf, type, indexArray, extend2, withClause] = input;
|
|
165868
|
+
return FactorWith(keyOf ? FactorExtends(KeyOfDeferred(FactorIndexArray(type, indexArray)), extend2) : FactorExtends(FactorIndexArray(type, indexArray), extend2), withClause);
|
|
165691
165869
|
}
|
|
165692
165870
|
function ExprBinaryMapping(left, rest2) {
|
|
165693
165871
|
return exports_guard.IsEqual(rest2.length, 3) ? (() => {
|
|
@@ -165717,7 +165895,7 @@ function ExprMapping(input) {
|
|
|
165717
165895
|
return ExprBinaryMapping(left, rest2);
|
|
165718
165896
|
}
|
|
165719
165897
|
function ExprReadonlyMapping(input) {
|
|
165720
|
-
return
|
|
165898
|
+
return AddImmutableDeferred(input[1]);
|
|
165721
165899
|
}
|
|
165722
165900
|
function ExprPipeMapping(input) {
|
|
165723
165901
|
return input[1];
|
|
@@ -165741,7 +165919,7 @@ function PropertyKeyQuotedMapping(input) {
|
|
|
165741
165919
|
return input;
|
|
165742
165920
|
}
|
|
165743
165921
|
function PropertyKeyIndexMapping(input) {
|
|
165744
|
-
return IsInteger2(input[3]) ? IntegerKey :
|
|
165922
|
+
return IsInteger2(input[3]) ? IntegerKey : IsNumber3(input[3]) ? NumberKey : IsSymbol2(input[3]) ? StringKey : IsString3(input[3]) ? StringKey : Unreachable2();
|
|
165745
165923
|
}
|
|
165746
165924
|
function PropertyKeyMapping(input) {
|
|
165747
165925
|
return input;
|
|
@@ -165755,7 +165933,7 @@ function OptionalMapping(input) {
|
|
|
165755
165933
|
function PropertyMapping(input) {
|
|
165756
165934
|
const [isReadonly, key, isOptional, _colon, type] = input;
|
|
165757
165935
|
return {
|
|
165758
|
-
[key]: isReadonly && isOptional ?
|
|
165936
|
+
[key]: isReadonly && isOptional ? AddReadonlyDeferred(AddOptionalDeferred(type)) : isReadonly && !isOptional ? AddReadonlyDeferred(type) : !isReadonly && isOptional ? AddOptionalDeferred(type) : type
|
|
165759
165937
|
};
|
|
165760
165938
|
}
|
|
165761
165939
|
function PropertyDelimiterMapping(input) {
|
|
@@ -165779,16 +165957,16 @@ function _Object_Mapping(input) {
|
|
|
165779
165957
|
return _Object_(properties2, options);
|
|
165780
165958
|
}
|
|
165781
165959
|
function ElementNamedMapping(input) {
|
|
165782
|
-
return exports_guard.IsEqual(input.length, 5) ?
|
|
165960
|
+
return exports_guard.IsEqual(input.length, 5) ? AddReadonlyDeferred(AddOptionalDeferred(input[4])) : exports_guard.IsEqual(input.length, 3) ? input[2] : exports_guard.IsEqual(input.length, 4) ? exports_guard.IsEqual(input[2], "readonly") ? AddReadonlyDeferred(input[3]) : AddOptionalDeferred(input[3]) : Unreachable2();
|
|
165783
165961
|
}
|
|
165784
165962
|
function ElementReadonlyOptionalMapping(input) {
|
|
165785
|
-
return
|
|
165963
|
+
return AddReadonlyDeferred(AddOptionalDeferred(input[1]));
|
|
165786
165964
|
}
|
|
165787
165965
|
function ElementReadonlyMapping(input) {
|
|
165788
|
-
return
|
|
165966
|
+
return AddReadonlyDeferred(input[1]);
|
|
165789
165967
|
}
|
|
165790
165968
|
function ElementOptionalMapping(input) {
|
|
165791
|
-
return
|
|
165969
|
+
return AddOptionalDeferred(input[0]);
|
|
165792
165970
|
}
|
|
165793
165971
|
function ElementBaseMapping(input) {
|
|
165794
165972
|
return input;
|
|
@@ -165799,17 +165977,17 @@ function ElementMapping(input) {
|
|
|
165799
165977
|
function ElementListMapping(input) {
|
|
165800
165978
|
return Delimited(input);
|
|
165801
165979
|
}
|
|
165802
|
-
function
|
|
165980
|
+
function _Tuple_Mapping(input) {
|
|
165803
165981
|
return Tuple(input[1]);
|
|
165804
165982
|
}
|
|
165805
165983
|
function ParameterReadonlyOptionalMapping(input) {
|
|
165806
|
-
return
|
|
165984
|
+
return AddReadonlyDeferred(AddOptionalDeferred(input[4]));
|
|
165807
165985
|
}
|
|
165808
165986
|
function ParameterReadonlyMapping(input) {
|
|
165809
|
-
return
|
|
165987
|
+
return AddReadonlyDeferred(input[3]);
|
|
165810
165988
|
}
|
|
165811
165989
|
function ParameterOptionalMapping(input) {
|
|
165812
|
-
return
|
|
165990
|
+
return AddOptionalDeferred(input[3]);
|
|
165813
165991
|
}
|
|
165814
165992
|
function ParameterTypeMapping(input) {
|
|
165815
165993
|
return input[2];
|
|
@@ -165826,17 +166004,17 @@ function ParameterListMapping(input) {
|
|
|
165826
166004
|
function _Function_Mapping(input) {
|
|
165827
166005
|
return _Function_(input[1], input[4]);
|
|
165828
166006
|
}
|
|
165829
|
-
function
|
|
166007
|
+
function _Constructor_Mapping(input) {
|
|
165830
166008
|
return Constructor(input[2], input[5]);
|
|
165831
166009
|
}
|
|
165832
166010
|
function ApplyReadonly(state, type) {
|
|
165833
|
-
return exports_guard.IsEqual(state, "remove") ?
|
|
166011
|
+
return exports_guard.IsEqual(state, "remove") ? RemoveReadonlyDeferred(type) : exports_guard.IsEqual(state, "add") ? AddReadonlyDeferred(type) : type;
|
|
165834
166012
|
}
|
|
165835
166013
|
function MappedReadonlyMapping(input) {
|
|
165836
166014
|
return exports_guard.IsEqual(input.length, 2) && exports_guard.IsEqual(input[0], "-") ? "remove" : exports_guard.IsEqual(input.length, 2) && exports_guard.IsEqual(input[0], "+") ? "add" : exports_guard.IsEqual(input.length, 1) ? "add" : "none";
|
|
165837
166015
|
}
|
|
165838
166016
|
function ApplyOptional(state, type) {
|
|
165839
|
-
return exports_guard.IsEqual(state, "remove") ?
|
|
166017
|
+
return exports_guard.IsEqual(state, "remove") ? RemoveOptionalDeferred(type) : exports_guard.IsEqual(state, "add") ? AddOptionalDeferred(type) : type;
|
|
165840
166018
|
}
|
|
165841
166019
|
function MappedOptionalMapping(input) {
|
|
165842
166020
|
return exports_guard.IsEqual(input.length, 2) && exports_guard.IsEqual(input[0], "-") ? "remove" : exports_guard.IsEqual(input.length, 2) && exports_guard.IsEqual(input[0], "+") ? "add" : exports_guard.IsEqual(input.length, 1) ? "add" : "none";
|
|
@@ -165844,48 +166022,51 @@ function MappedOptionalMapping(input) {
|
|
|
165844
166022
|
function MappedAsMapping(input) {
|
|
165845
166023
|
return exports_guard.IsEqual(input.length, 2) ? [input[1]] : [];
|
|
165846
166024
|
}
|
|
165847
|
-
function
|
|
166025
|
+
function _Mapped_Mapping(input) {
|
|
165848
166026
|
return exports_guard.IsArray(input[6]) && exports_guard.IsEqual(input[6].length, 1) ? MappedDeferred(Identifier(input[3]), input[5], input[6][0], ApplyReadonly(input[1], ApplyOptional(input[8], input[10]))) : MappedDeferred(Identifier(input[3]), input[5], Ref(input[3]), ApplyReadonly(input[1], ApplyOptional(input[8], input[10])));
|
|
165849
166027
|
}
|
|
165850
166028
|
function ReferenceMapping(input) {
|
|
165851
166029
|
return Ref(input);
|
|
165852
166030
|
}
|
|
165853
|
-
function
|
|
165854
|
-
return
|
|
166031
|
+
function WithBigIntMapping(input) {
|
|
166032
|
+
return BigInt(input);
|
|
165855
166033
|
}
|
|
165856
|
-
function
|
|
166034
|
+
function WithNumberMapping(input) {
|
|
165857
166035
|
return parseFloat(input);
|
|
165858
166036
|
}
|
|
165859
|
-
function
|
|
166037
|
+
function WithBooleanMapping(input) {
|
|
165860
166038
|
return exports_guard.IsEqual(input, "true");
|
|
165861
166039
|
}
|
|
165862
|
-
function
|
|
166040
|
+
function WithStringMapping(input) {
|
|
165863
166041
|
return input;
|
|
165864
166042
|
}
|
|
165865
|
-
function
|
|
166043
|
+
function WithNullMapping(input) {
|
|
165866
166044
|
return null;
|
|
165867
166045
|
}
|
|
165868
|
-
function
|
|
166046
|
+
function WithUndefinedMapping(input) {
|
|
166047
|
+
return;
|
|
166048
|
+
}
|
|
166049
|
+
function WithPropertyMapping(input) {
|
|
165869
166050
|
return { [input[0]]: input[2] };
|
|
165870
166051
|
}
|
|
165871
|
-
function
|
|
166052
|
+
function WithPropertyListMapping(input) {
|
|
165872
166053
|
return Delimited(input);
|
|
165873
166054
|
}
|
|
165874
|
-
function
|
|
166055
|
+
function WithObjectMappingReduce(propertyList) {
|
|
165875
166056
|
return propertyList.reduce((result, left) => {
|
|
165876
166057
|
return exports_memory.Assign(result, left);
|
|
165877
166058
|
}, {});
|
|
165878
166059
|
}
|
|
165879
|
-
function
|
|
165880
|
-
return
|
|
166060
|
+
function WithObjectMapping(input) {
|
|
166061
|
+
return WithObjectMappingReduce(input[1]);
|
|
165881
166062
|
}
|
|
165882
|
-
function
|
|
166063
|
+
function WithElementListMapping(input) {
|
|
165883
166064
|
return Delimited(input);
|
|
165884
166065
|
}
|
|
165885
|
-
function
|
|
166066
|
+
function WithArrayMapping(input) {
|
|
165886
166067
|
return input[1];
|
|
165887
166068
|
}
|
|
165888
|
-
function
|
|
166069
|
+
function WithValueMapping(input) {
|
|
165889
166070
|
return input;
|
|
165890
166071
|
}
|
|
165891
166072
|
function PatternBigIntMapping(input) {
|
|
@@ -165969,7 +166150,7 @@ function ModuleMapping(input) {
|
|
|
165969
166150
|
function ScriptMapping(input) {
|
|
165970
166151
|
return input;
|
|
165971
166152
|
}
|
|
165972
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166153
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/internal/match.mjs
|
|
165973
166154
|
function IsMatch(value) {
|
|
165974
166155
|
return IsEqual(value.length, 2);
|
|
165975
166156
|
}
|
|
@@ -165977,7 +166158,7 @@ function Match2(input, ok, fail) {
|
|
|
165977
166158
|
return IsMatch(input) ? ok(input[0], input[1]) : fail();
|
|
165978
166159
|
}
|
|
165979
166160
|
|
|
165980
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166161
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/internal/take.mjs
|
|
165981
166162
|
function TakeVariant(variant, input) {
|
|
165982
166163
|
return IsEqual(input.indexOf(variant), 0) ? [variant, input.slice(variant.length)] : [];
|
|
165983
166164
|
}
|
|
@@ -165990,7 +166171,7 @@ function Take(variants, input) {
|
|
|
165990
166171
|
return [];
|
|
165991
166172
|
}
|
|
165992
166173
|
|
|
165993
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166174
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/internal/char.mjs
|
|
165994
166175
|
function Range(start, end) {
|
|
165995
166176
|
return Array.from({ length: end - start + 1 }, (_, i) => String.fromCharCode(start + i));
|
|
165996
166177
|
}
|
|
@@ -166009,7 +166190,7 @@ var Dot = ".";
|
|
|
166009
166190
|
var DollarSign = "$";
|
|
166010
166191
|
var Hyphen = "-";
|
|
166011
166192
|
|
|
166012
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166193
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/internal/trim.mjs
|
|
166013
166194
|
var LineComment = "//";
|
|
166014
166195
|
var OpenComment = "/*";
|
|
166015
166196
|
var CloseComment = "*/";
|
|
@@ -166035,12 +166216,12 @@ function Trim(input) {
|
|
|
166035
166216
|
return trimmed.startsWith(OpenComment) ? Trim(DiscardMultilineComment(trimmed.slice(2))) : trimmed.startsWith(LineComment) ? Trim(DiscardLineComment(trimmed.slice(2))) : trimmed;
|
|
166036
166217
|
}
|
|
166037
166218
|
|
|
166038
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166219
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/internal/optional.mjs
|
|
166039
166220
|
function Optional2(value, input) {
|
|
166040
166221
|
return Match2(Take([value], input), (Optional3, Rest2) => [Optional3, Rest2], () => ["", input]);
|
|
166041
166222
|
}
|
|
166042
166223
|
|
|
166043
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166224
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/internal/many.mjs
|
|
166044
166225
|
function IsDiscard(discard2, input) {
|
|
166045
166226
|
return discard2.includes(input);
|
|
166046
166227
|
}
|
|
@@ -166048,7 +166229,7 @@ function Many(allowed, discard2, input, result = "") {
|
|
|
166048
166229
|
return Match2(Take(allowed, input), (Char, Rest2) => IsDiscard(discard2, Char) ? Many(allowed, discard2, Rest2, result) : Many(allowed, discard2, Rest2, `${result}${Char}`), () => [result, input]);
|
|
166049
166230
|
}
|
|
166050
166231
|
|
|
166051
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166232
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/unsigned_integer.mjs
|
|
166052
166233
|
function TakeNonZero(input) {
|
|
166053
166234
|
return Take(NonZero, input);
|
|
166054
166235
|
}
|
|
@@ -166063,7 +166244,7 @@ function UnsignedInteger(input) {
|
|
|
166063
166244
|
return TakeUnsignedInteger(Trim(input));
|
|
166064
166245
|
}
|
|
166065
166246
|
|
|
166066
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166247
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/integer.mjs
|
|
166067
166248
|
function TakeSign(input) {
|
|
166068
166249
|
return Optional2(Hyphen, input);
|
|
166069
166250
|
}
|
|
@@ -166074,21 +166255,21 @@ function Integer2(input) {
|
|
|
166074
166255
|
return TakeSignedInteger(Trim(input));
|
|
166075
166256
|
}
|
|
166076
166257
|
|
|
166077
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166258
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/bigint.mjs
|
|
166078
166259
|
function TakeBigInt(input) {
|
|
166079
166260
|
return Match2(Integer2(input), (Integer3, IntegerRest) => Match2(Take(["n"], IntegerRest), (_N, NRest) => [`${Integer3}`, NRest], () => []), () => []);
|
|
166080
166261
|
}
|
|
166081
166262
|
function BigInt3(input) {
|
|
166082
166263
|
return TakeBigInt(input);
|
|
166083
166264
|
}
|
|
166084
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166265
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/const.mjs
|
|
166085
166266
|
function TakeConst(const_, input) {
|
|
166086
166267
|
return Take([const_], input);
|
|
166087
166268
|
}
|
|
166088
166269
|
function Const(const_, input) {
|
|
166089
166270
|
return IsEqual(const_, "") ? ["", input] : const_.startsWith(NewLine) ? TakeConst(const_, TrimWhitespace(input)) : const_.startsWith(WhiteSpace) ? TakeConst(const_, input) : TakeConst(const_, Trim(input));
|
|
166090
166271
|
}
|
|
166091
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166272
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/ident.mjs
|
|
166092
166273
|
var Initial = [...Alpha, UnderScore, DollarSign];
|
|
166093
166274
|
function TakeInitial(input) {
|
|
166094
166275
|
return Take(Initial, input);
|
|
@@ -166103,7 +166284,7 @@ function TakeIdent(input) {
|
|
|
166103
166284
|
function Ident(input) {
|
|
166104
166285
|
return TakeIdent(Trim(input));
|
|
166105
166286
|
}
|
|
166106
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166287
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/unsigned_number.mjs
|
|
166107
166288
|
var AllowedDigits2 = [...Digit, UnderScore];
|
|
166108
166289
|
function IsLeadingDot(input) {
|
|
166109
166290
|
return IsMatch(Take([Dot], input));
|
|
@@ -166124,7 +166305,7 @@ function UnsignedNumber(input) {
|
|
|
166124
166305
|
return TakeUnsignedNumber(Trim(input));
|
|
166125
166306
|
}
|
|
166126
166307
|
|
|
166127
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166308
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/number.mjs
|
|
166128
166309
|
function TakeSign2(input) {
|
|
166129
166310
|
return Optional2(Hyphen, input);
|
|
166130
166311
|
}
|
|
@@ -166134,19 +166315,19 @@ function TakeSignedNumber(input) {
|
|
|
166134
166315
|
function Number3(input) {
|
|
166135
166316
|
return TakeSignedNumber(Trim(input));
|
|
166136
166317
|
}
|
|
166137
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166318
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/until.mjs
|
|
166138
166319
|
function TakeOne(input) {
|
|
166139
166320
|
const result = IsEqual(input, "") ? [] : [input.slice(0, 1), input.slice(1)];
|
|
166140
166321
|
return result;
|
|
166141
166322
|
}
|
|
166142
166323
|
function IsInputMatchSentinal(end, input) {
|
|
166143
|
-
return
|
|
166324
|
+
return ShiftLeft(end, (left, right) => input.startsWith(left) ? true : IsInputMatchSentinal(right, input), () => false);
|
|
166144
166325
|
}
|
|
166145
166326
|
function Until(end, input, result = "") {
|
|
166146
166327
|
return Match2(TakeOne(input), (One, Rest2) => IsInputMatchSentinal(end, input) ? [result, input] : Until(end, Rest2, `${result}${One}`), () => []);
|
|
166147
166328
|
}
|
|
166148
166329
|
|
|
166149
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166330
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/span.mjs
|
|
166150
166331
|
function MultiLine(start, end, input) {
|
|
166151
166332
|
return Match2(Take([start], input), (_, Rest2) => Match2(Until([end], Rest2), (Until2, UntilRest) => Match2(Take([end], UntilRest), (_2, Rest3) => [`${Until2}`, Rest3], () => []), () => []), () => []);
|
|
166152
166333
|
}
|
|
@@ -166156,7 +166337,7 @@ function SingleLine(start, end, input) {
|
|
|
166156
166337
|
function Span(start, end, multiLine, input) {
|
|
166157
166338
|
return multiLine ? MultiLine(start, end, Trim(input)) : SingleLine(start, end, Trim(input));
|
|
166158
166339
|
}
|
|
166159
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166340
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/string.mjs
|
|
166160
166341
|
function TakeInitial2(quotes, input) {
|
|
166161
166342
|
return Take(quotes, input);
|
|
166162
166343
|
}
|
|
@@ -166169,11 +166350,11 @@ function TakeString(quotes, input) {
|
|
|
166169
166350
|
function String3(quotes, input) {
|
|
166170
166351
|
return TakeString(quotes, Trim(input));
|
|
166171
166352
|
}
|
|
166172
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166353
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/token/until_1.mjs
|
|
166173
166354
|
function Until_1(end, input) {
|
|
166174
166355
|
return Match2(Until(end, input), (Until2, UntilRest) => IsEqual(Until2, "") ? [] : [Until2, UntilRest], () => []);
|
|
166175
166356
|
}
|
|
166176
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166357
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/parser.mjs
|
|
166177
166358
|
var If = (result, left, right = () => []) => result.length === 2 ? left(result) : right();
|
|
166178
166359
|
var GenericParameterExtendsEquals = (input) => If(If(Ident(input), ([_0, input2]) => If(Const("extends", input2), ([_1, input3]) => If(Type(input3), ([_2, input4]) => If(Const("=", input4), ([_3, input5]) => If(Type(input5), ([_4, input6]) => [[_0, _1, _2, _3, _4], input6]))))), ([_0, input2]) => [GenericParameterExtendsEqualsMapping(_0), input2]);
|
|
166179
166360
|
var GenericParameterExtends = (input) => If(If(Ident(input), ([_0, input2]) => If(Const("extends", input2), ([_1, input3]) => If(Type(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [GenericParameterExtendsMapping(_0), input2]);
|
|
@@ -166202,23 +166383,23 @@ var KeywordNever = (input) => If(Const("never", input), ([_0, input2]) => [Keywo
|
|
|
166202
166383
|
var KeywordSymbol = (input) => If(Const("symbol", input), ([_0, input2]) => [KeywordSymbolMapping(_0), input2]);
|
|
166203
166384
|
var KeywordVoid = (input) => If(Const("void", input), ([_0, input2]) => [KeywordVoidMapping(_0), input2]);
|
|
166204
166385
|
var KeywordThis = (input) => If(Const("this", input), ([_0, input2]) => [KeywordThisMapping(_0), input2]);
|
|
166205
|
-
var Keyword = (input) => If(If(KeywordString(input), ([_0, input2]) => [_0, input2], () => If(KeywordNumber(input), ([_0, input2]) => [_0, input2], () => If(KeywordBoolean(input), ([_0, input2]) => [_0, input2], () => If(KeywordUndefined(input), ([_0, input2]) => [_0, input2], () => If(KeywordNull(input), ([_0, input2]) => [_0, input2], () => If(KeywordInteger(input), ([_0, input2]) => [_0, input2], () => If(KeywordBigInt(input), ([_0, input2]) => [_0, input2], () => If(KeywordUnknown(input), ([_0, input2]) => [_0, input2], () => If(KeywordAny(input), ([_0, input2]) => [_0, input2], () => If(KeywordObject(input), ([_0, input2]) => [_0, input2], () => If(KeywordNever(input), ([_0, input2]) => [_0, input2], () => If(KeywordSymbol(input), ([_0, input2]) => [_0, input2], () => If(KeywordVoid(input), ([_0, input2]) => [_0, input2], () => If(KeywordThis(input), ([_0, input2]) => [_0, input2], () => [])))))))))))))), ([_0, input2]) => [KeywordMapping(_0), input2]);
|
|
166206
166386
|
var TemplateInterpolate = (input) => If(If(Const("${", input), ([_0, input2]) => If(Type(input2), ([_1, input3]) => If(Const("}", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [TemplateInterpolateMapping(_0), input2]);
|
|
166207
166387
|
var TemplateSpan = (input) => If(Until(["${", "`"], input), ([_0, input2]) => [TemplateSpanMapping(_0), input2]);
|
|
166208
166388
|
var TemplateBody = (input) => If(If(If(TemplateSpan(input), ([_0, input2]) => If(TemplateInterpolate(input2), ([_1, input3]) => If(TemplateBody(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If(If(TemplateSpan(input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If(If(TemplateSpan(input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => []))), ([_0, input2]) => [TemplateBodyMapping(_0), input2]);
|
|
166209
166389
|
var TemplateLiteralTypes = (input) => If(If(Const("`", input), ([_0, input2]) => If(TemplateBody(input2), ([_1, input3]) => If(Const("`", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [TemplateLiteralTypesMapping(_0), input2]);
|
|
166210
166390
|
var TemplateLiteral = (input) => If(TemplateLiteralTypes(input), ([_0, input2]) => [TemplateLiteralMapping(_0), input2]);
|
|
166391
|
+
var Dependent2 = (input) => If(If(If(Const("if", input), ([_0, input2]) => If(Type(input2), ([_1, input3]) => If(Const("then", input3), ([_2, input4]) => If(Type(input4), ([_3, input5]) => If(Const("else", input5), ([_4, input6]) => If(Type(input6), ([_5, input7]) => [[_0, _1, _2, _3, _4, _5], input7])))))), ([_0, input2]) => [_0, input2], () => If(If(Const("if", input), ([_0, input2]) => If(Type(input2), ([_1, input3]) => If(Const("then", input3), ([_2, input4]) => If(Type(input4), ([_3, input5]) => [[_0, _1, _2, _3], input5])))), ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [DependentMapping(_0), input2]);
|
|
166211
166392
|
var LiteralBigInt = (input) => If(BigInt3(input), ([_0, input2]) => [LiteralBigIntMapping(_0), input2]);
|
|
166212
166393
|
var LiteralBoolean = (input) => If(If(Const("true", input), ([_0, input2]) => [_0, input2], () => If(Const("false", input), ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [LiteralBooleanMapping(_0), input2]);
|
|
166213
166394
|
var LiteralNumber = (input) => If(Number3(input), ([_0, input2]) => [LiteralNumberMapping(_0), input2]);
|
|
166214
166395
|
var LiteralString = (input) => If(String3(["'", '"'], input), ([_0, input2]) => [LiteralStringMapping(_0), input2]);
|
|
166215
|
-
var Literal2 = (input) => If(If(LiteralBigInt(input), ([_0, input2]) => [_0, input2], () => If(LiteralBoolean(input), ([_0, input2]) => [_0, input2], () => If(LiteralNumber(input), ([_0, input2]) => [_0, input2], () => If(LiteralString(input), ([_0, input2]) => [_0, input2], () => [])))), ([_0, input2]) => [LiteralMapping(_0), input2]);
|
|
166216
166396
|
var KeyOf = (input) => If(If(If(Const("keyof", input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [KeyOfMapping(_0), input2]);
|
|
166217
166397
|
var IndexArray_0 = (input, result = []) => If(If(If(Const("[", input), ([_0, input2]) => If(Type(input2), ([_1, input3]) => If(Const("]", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If(If(Const("[", input), ([_0, input2]) => If(Const("]", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => IndexArray_0(input2, [...result, _0]), () => [result, input]);
|
|
166218
166398
|
var IndexArray = (input) => If(IndexArray_0(input), ([_0, input2]) => [IndexArrayMapping(_0), input2]);
|
|
166219
|
-
var
|
|
166220
|
-
var
|
|
166221
|
-
var
|
|
166399
|
+
var Extends2 = (input) => If(If(If(Const("extends", input), ([_0, input2]) => If(Type(input2), ([_1, input3]) => If(Const("?", input3), ([_2, input4]) => If(Type(input4), ([_3, input5]) => If(Const(":", input5), ([_4, input6]) => If(Type(input6), ([_5, input7]) => [[_0, _1, _2, _3, _4, _5], input7])))))), ([_0, input2]) => [_0, input2], () => If([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [ExtendsMapping(_0), input2]);
|
|
166400
|
+
var Base = (input) => If(If(If(Const("(", input), ([_0, input2]) => If(Type(input2), ([_1, input3]) => If(Const(")", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If(KeywordString(input), ([_0, input2]) => [_0, input2], () => If(KeywordNumber(input), ([_0, input2]) => [_0, input2], () => If(KeywordBoolean(input), ([_0, input2]) => [_0, input2], () => If(KeywordUndefined(input), ([_0, input2]) => [_0, input2], () => If(KeywordNull(input), ([_0, input2]) => [_0, input2], () => If(KeywordInteger(input), ([_0, input2]) => [_0, input2], () => If(KeywordBigInt(input), ([_0, input2]) => [_0, input2], () => If(KeywordUnknown(input), ([_0, input2]) => [_0, input2], () => If(KeywordAny(input), ([_0, input2]) => [_0, input2], () => If(KeywordObject(input), ([_0, input2]) => [_0, input2], () => If(KeywordNever(input), ([_0, input2]) => [_0, input2], () => If(KeywordSymbol(input), ([_0, input2]) => [_0, input2], () => If(KeywordVoid(input), ([_0, input2]) => [_0, input2], () => If(KeywordThis(input), ([_0, input2]) => [_0, input2], () => If(LiteralBigInt(input), ([_0, input2]) => [_0, input2], () => If(LiteralBoolean(input), ([_0, input2]) => [_0, input2], () => If(LiteralNumber(input), ([_0, input2]) => [_0, input2], () => If(LiteralString(input), ([_0, input2]) => [_0, input2], () => If(TemplateLiteral(input), ([_0, input2]) => [_0, input2], () => If(Dependent2(input), ([_0, input2]) => [_0, input2], () => If(_Object_2(input), ([_0, input2]) => [_0, input2], () => If(_Tuple_(input), ([_0, input2]) => [_0, input2], () => If(_Constructor_(input), ([_0, input2]) => [_0, input2], () => If(_Function_2(input), ([_0, input2]) => [_0, input2], () => If(_Mapped_(input), ([_0, input2]) => [_0, input2], () => If(GenericCall(input), ([_0, input2]) => [_0, input2], () => If(Reference(input), ([_0, input2]) => [_0, input2], () => [])))))))))))))))))))))))))))), ([_0, input2]) => [BaseMapping(_0), input2]);
|
|
166401
|
+
var With = (input) => If(If(If(Const("with", input), ([_0, input2]) => If(WithObject(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [WithMapping(_0), input2]);
|
|
166402
|
+
var Factor = (input) => If(If(KeyOf(input), ([_0, input2]) => If(Base(input2), ([_1, input3]) => If(IndexArray(input3), ([_2, input4]) => If(Extends2(input4), ([_3, input5]) => If(With(input5), ([_4, input6]) => [[_0, _1, _2, _3, _4], input6]))))), ([_0, input2]) => [FactorMapping(_0), input2]);
|
|
166222
166403
|
var ExprTermTail = (input) => If(If(If(Const("&", input), ([_0, input2]) => If(Factor(input2), ([_1, input3]) => If(ExprTermTail(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [ExprTermTailMapping(_0), input2]);
|
|
166223
166404
|
var ExprTerm = (input) => If(If(Factor(input), ([_0, input2]) => If(ExprTermTail(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [ExprTermMapping(_0), input2]);
|
|
166224
166405
|
var ExprTail = (input) => If(If(If(Const("|", input), ([_0, input2]) => If(ExprTerm(input2), ([_1, input3]) => If(ExprTail(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [ExprTailMapping(_0), input2]);
|
|
@@ -166252,7 +166433,7 @@ var ElementBase = (input) => If(If(ElementNamed(input), ([_0, input2]) => [_0, i
|
|
|
166252
166433
|
var Element = (input) => If(If(If(Const("...", input), ([_0, input2]) => If(ElementBase(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If(If(ElementBase(input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [ElementMapping(_0), input2]);
|
|
166253
166434
|
var ElementList_0 = (input, result = []) => If(If(Element(input), ([_0, input2]) => If(Const(",", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => ElementList_0(input2, [...result, _0]), () => [result, input]);
|
|
166254
166435
|
var ElementList = (input) => If(If(ElementList_0(input), ([_0, input2]) => If(If(If(Element(input2), ([_02, input3]) => [[_02], input3]), ([_02, input3]) => [_02, input3], () => If([[], input2], ([_02, input3]) => [_02, input3], () => [])), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [ElementListMapping(_0), input2]);
|
|
166255
|
-
var
|
|
166436
|
+
var _Tuple_ = (input) => If(If(Const("[", input), ([_0, input2]) => If(ElementList(input2), ([_1, input3]) => If(Const("]", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_Tuple_Mapping(_0), input2]);
|
|
166256
166437
|
var ParameterReadonlyOptional = (input) => If(If(Ident(input), ([_0, input2]) => If(Const("?", input2), ([_1, input3]) => If(Const(":", input3), ([_2, input4]) => If(Const("readonly", input4), ([_3, input5]) => If(Type(input5), ([_4, input6]) => [[_0, _1, _2, _3, _4], input6]))))), ([_0, input2]) => [ParameterReadonlyOptionalMapping(_0), input2]);
|
|
166257
166438
|
var ParameterReadonly = (input) => If(If(Ident(input), ([_0, input2]) => If(Const(":", input2), ([_1, input3]) => If(Const("readonly", input3), ([_2, input4]) => If(Type(input4), ([_3, input5]) => [[_0, _1, _2, _3], input5])))), ([_0, input2]) => [ParameterReadonlyMapping(_0), input2]);
|
|
166258
166439
|
var ParameterOptional = (input) => If(If(Ident(input), ([_0, input2]) => If(Const("?", input2), ([_1, input3]) => If(Const(":", input3), ([_2, input4]) => If(Type(input4), ([_3, input5]) => [[_0, _1, _2, _3], input5])))), ([_0, input2]) => [ParameterOptionalMapping(_0), input2]);
|
|
@@ -166262,31 +166443,32 @@ var Parameter2 = (input) => If(If(If(Const("...", input), ([_0, input2]) => If(P
|
|
|
166262
166443
|
var ParameterList_0 = (input, result = []) => If(If(Parameter2(input), ([_0, input2]) => If(Const(",", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => ParameterList_0(input2, [...result, _0]), () => [result, input]);
|
|
166263
166444
|
var ParameterList = (input) => If(If(ParameterList_0(input), ([_0, input2]) => If(If(If(Parameter2(input2), ([_02, input3]) => [[_02], input3]), ([_02, input3]) => [_02, input3], () => If([[], input2], ([_02, input3]) => [_02, input3], () => [])), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [ParameterListMapping(_0), input2]);
|
|
166264
166445
|
var _Function_2 = (input) => If(If(Const("(", input), ([_0, input2]) => If(ParameterList(input2), ([_1, input3]) => If(Const(")", input3), ([_2, input4]) => If(Const("=>", input4), ([_3, input5]) => If(Type(input5), ([_4, input6]) => [[_0, _1, _2, _3, _4], input6]))))), ([_0, input2]) => [_Function_Mapping(_0), input2]);
|
|
166265
|
-
var
|
|
166446
|
+
var _Constructor_ = (input) => If(If(Const("new", input), ([_0, input2]) => If(Const("(", input2), ([_1, input3]) => If(ParameterList(input3), ([_2, input4]) => If(Const(")", input4), ([_3, input5]) => If(Const("=>", input5), ([_4, input6]) => If(Type(input6), ([_5, input7]) => [[_0, _1, _2, _3, _4, _5], input7])))))), ([_0, input2]) => [_Constructor_Mapping(_0), input2]);
|
|
166266
166447
|
var MappedReadonly = (input) => If(If(If(Const("+", input), ([_0, input2]) => If(Const("readonly", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If(If(Const("-", input), ([_0, input2]) => If(Const("readonly", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If(If(Const("readonly", input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If([[], input], ([_0, input2]) => [_0, input2], () => [])))), ([_0, input2]) => [MappedReadonlyMapping(_0), input2]);
|
|
166267
166448
|
var MappedOptional = (input) => If(If(If(Const("+", input), ([_0, input2]) => If(Const("?", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If(If(Const("-", input), ([_0, input2]) => If(Const("?", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If(If(Const("?", input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If([[], input], ([_0, input2]) => [_0, input2], () => [])))), ([_0, input2]) => [MappedOptionalMapping(_0), input2]);
|
|
166268
166449
|
var MappedAs = (input) => If(If(If(Const("as", input), ([_0, input2]) => If(Type(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [MappedAsMapping(_0), input2]);
|
|
166269
|
-
var
|
|
166450
|
+
var _Mapped_ = (input) => If(If(Const("{", input), ([_0, input2]) => If(MappedReadonly(input2), ([_1, input3]) => If(Const("[", input3), ([_2, input4]) => If(Ident(input4), ([_3, input5]) => If(Const("in", input5), ([_4, input6]) => If(Type(input6), ([_5, input7]) => If(MappedAs(input7), ([_6, input8]) => If(Const("]", input8), ([_7, input9]) => If(MappedOptional(input9), ([_8, input10]) => If(Const(":", input10), ([_9, input11]) => If(Type(input11), ([_10, input12]) => If(OptionalSemiColon(input12), ([_11, input13]) => If(Const("}", input13), ([_12, input14]) => [[_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12], input14]))))))))))))), ([_0, input2]) => [_Mapped_Mapping(_0), input2]);
|
|
166270
166451
|
var Reference = (input) => If(Ident(input), ([_0, input2]) => [ReferenceMapping(_0), input2]);
|
|
166271
|
-
var
|
|
166272
|
-
var
|
|
166273
|
-
var
|
|
166274
|
-
var
|
|
166275
|
-
var
|
|
166276
|
-
var
|
|
166277
|
-
var
|
|
166278
|
-
var
|
|
166279
|
-
var
|
|
166280
|
-
var
|
|
166281
|
-
var
|
|
166282
|
-
var
|
|
166283
|
-
var
|
|
166452
|
+
var WithBigInt = (input) => If(BigInt3(input), ([_0, input2]) => [WithBigIntMapping(_0), input2]);
|
|
166453
|
+
var WithNumber = (input) => If(Number3(input), ([_0, input2]) => [WithNumberMapping(_0), input2]);
|
|
166454
|
+
var WithBoolean = (input) => If(If(Const("true", input), ([_0, input2]) => [_0, input2], () => If(Const("false", input), ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [WithBooleanMapping(_0), input2]);
|
|
166455
|
+
var WithString = (input) => If(String3(['"', "'"], input), ([_0, input2]) => [WithStringMapping(_0), input2]);
|
|
166456
|
+
var WithNull = (input) => If(Const("null", input), ([_0, input2]) => [WithNullMapping(_0), input2]);
|
|
166457
|
+
var WithUndefined = (input) => If(Const("undefined", input), ([_0, input2]) => [WithUndefinedMapping(_0), input2]);
|
|
166458
|
+
var WithProperty = (input) => If(If(PropertyKey(input), ([_0, input2]) => If(Const(":", input2), ([_1, input3]) => If(WithValue(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [WithPropertyMapping(_0), input2]);
|
|
166459
|
+
var WithPropertyList_0 = (input, result = []) => If(If(WithProperty(input), ([_0, input2]) => If(PropertyDelimiter(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => WithPropertyList_0(input2, [...result, _0]), () => [result, input]);
|
|
166460
|
+
var WithPropertyList = (input) => If(If(WithPropertyList_0(input), ([_0, input2]) => If(If(If(WithProperty(input2), ([_02, input3]) => [[_02], input3]), ([_02, input3]) => [_02, input3], () => If([[], input2], ([_02, input3]) => [_02, input3], () => [])), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [WithPropertyListMapping(_0), input2]);
|
|
166461
|
+
var WithObject = (input) => If(If(Const("{", input), ([_0, input2]) => If(WithPropertyList(input2), ([_1, input3]) => If(Const("}", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [WithObjectMapping(_0), input2]);
|
|
166462
|
+
var WithElementList_0 = (input, result = []) => If(If(WithValue(input), ([_0, input2]) => If(Const(",", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => WithElementList_0(input2, [...result, _0]), () => [result, input]);
|
|
166463
|
+
var WithElementList = (input) => If(If(WithElementList_0(input), ([_0, input2]) => If(If(If(WithValue(input2), ([_02, input3]) => [[_02], input3]), ([_02, input3]) => [_02, input3], () => If([[], input2], ([_02, input3]) => [_02, input3], () => [])), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [WithElementListMapping(_0), input2]);
|
|
166464
|
+
var WithArray = (input) => If(If(Const("[", input), ([_0, input2]) => If(WithElementList(input2), ([_1, input3]) => If(Const("]", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [WithArrayMapping(_0), input2]);
|
|
166465
|
+
var WithValue = (input) => If(If(WithBigInt(input), ([_0, input2]) => [_0, input2], () => If(WithNumber(input), ([_0, input2]) => [_0, input2], () => If(WithBoolean(input), ([_0, input2]) => [_0, input2], () => If(WithString(input), ([_0, input2]) => [_0, input2], () => If(WithNull(input), ([_0, input2]) => [_0, input2], () => If(WithUndefined(input), ([_0, input2]) => [_0, input2], () => If(WithObject(input), ([_0, input2]) => [_0, input2], () => If(WithArray(input), ([_0, input2]) => [_0, input2], () => [])))))))), ([_0, input2]) => [WithValueMapping(_0), input2]);
|
|
166284
166466
|
var PatternBigInt = (input) => If(Const("-?(?:0|[1-9][0-9]*)n", input), ([_0, input2]) => [PatternBigIntMapping(_0), input2]);
|
|
166285
166467
|
var PatternString = (input) => If(Const(".*", input), ([_0, input2]) => [PatternStringMapping(_0), input2]);
|
|
166286
|
-
var PatternNumber = (input) => If(Const("-?(?:0|[1-9][0-9]*)(
|
|
166468
|
+
var PatternNumber = (input) => If(Const("-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?", input), ([_0, input2]) => [PatternNumberMapping(_0), input2]);
|
|
166287
166469
|
var PatternInteger = (input) => If(Const("-?(?:0|[1-9][0-9]*)", input), ([_0, input2]) => [PatternIntegerMapping(_0), input2]);
|
|
166288
166470
|
var PatternNever = (input) => If(Const("(?!)", input), ([_0, input2]) => [PatternNeverMapping(_0), input2]);
|
|
166289
|
-
var PatternText = (input) => If(Until_1(["-?(?:0|[1-9][0-9]*)n", ".*", "-?(?:0|[1-9][0-9]*)(
|
|
166471
|
+
var PatternText = (input) => If(Until_1(["-?(?:0|[1-9][0-9]*)n", ".*", "-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?", "-?(?:0|[1-9][0-9]*)", "(?!)", "(", ")", "$", "|"], input), ([_0, input2]) => [PatternTextMapping(_0), input2]);
|
|
166290
166472
|
var PatternBase = (input) => If(If(PatternBigInt(input), ([_0, input2]) => [_0, input2], () => If(PatternString(input), ([_0, input2]) => [_0, input2], () => If(PatternNumber(input), ([_0, input2]) => [_0, input2], () => If(PatternInteger(input), ([_0, input2]) => [_0, input2], () => If(PatternNever(input), ([_0, input2]) => [_0, input2], () => If(PatternGroup(input), ([_0, input2]) => [_0, input2], () => If(PatternText(input), ([_0, input2]) => [_0, input2], () => []))))))), ([_0, input2]) => [PatternBaseMapping(_0), input2]);
|
|
166291
166473
|
var PatternGroup = (input) => If(If(Const("(", input), ([_0, input2]) => If(PatternBody(input2), ([_1, input3]) => If(Const(")", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [PatternGroupMapping(_0), input2]);
|
|
166292
166474
|
var PatternUnion = (input) => If(If(If(PatternTerm(input), ([_0, input2]) => If(Const("|", input2), ([_1, input3]) => If(PatternUnion(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If(If(PatternTerm(input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If([[], input], ([_0, input2]) => [_0, input2], () => []))), ([_0, input2]) => [PatternUnionMapping(_0), input2]);
|
|
@@ -166310,14 +166492,14 @@ var ModuleDeclaration = (input) => If(If(ExportKeyword(input), ([_0, input2]) =>
|
|
|
166310
166492
|
var Module = (input) => If(If(ModuleDeclaration(input), ([_0, input2]) => If(ModuleDeclarationList(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [ModuleMapping(_0), input2]);
|
|
166311
166493
|
var Script = (input) => If(If(Module(input), ([_0, input2]) => [_0, input2], () => If(GenericType(input), ([_0, input2]) => [_0, input2], () => If(Type(input), ([_0, input2]) => [_0, input2], () => []))), ([_0, input2]) => [ScriptMapping(_0), input2]);
|
|
166312
166494
|
|
|
166313
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166495
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/patterns/template.mjs
|
|
166314
166496
|
function ParseTemplateIntoTypes(template) {
|
|
166315
166497
|
const parsed = TemplateLiteralTypes(`\`${template}\``);
|
|
166316
166498
|
const result = exports_guard.IsEqual(parsed.length, 2) ? parsed[0] : Unreachable();
|
|
166317
166499
|
return result;
|
|
166318
166500
|
}
|
|
166319
166501
|
|
|
166320
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166502
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/template_literal/encode.mjs
|
|
166321
166503
|
function JoinString(input) {
|
|
166322
166504
|
return input.join("|");
|
|
166323
166505
|
}
|
|
@@ -166350,18 +166532,18 @@ function EncodeTemplateLiteralDeferred(types, right, pattern) {
|
|
|
166350
166532
|
const result = EncodeType(templateLiteral2, right, pattern);
|
|
166351
166533
|
return result;
|
|
166352
166534
|
}
|
|
166353
|
-
function EncodeEnum(
|
|
166354
|
-
const
|
|
166355
|
-
return
|
|
166535
|
+
function EncodeEnum(values, right, pattern) {
|
|
166536
|
+
const evaluated = EvaluateEnum(values);
|
|
166537
|
+
return EncodeType(evaluated, right, pattern);
|
|
166356
166538
|
}
|
|
166357
166539
|
function EncodeUnion(types, right, pattern, result = []) {
|
|
166358
|
-
return exports_guard.
|
|
166540
|
+
return exports_guard.ShiftLeft(types, (head, tail) => EncodeUnion(tail, right, pattern, [...result, EncodeType(head, [], "")]), () => EncodeTypes(right, `${pattern}(${JoinString(result)})`));
|
|
166359
166541
|
}
|
|
166360
166542
|
function EncodeType(type, right, pattern) {
|
|
166361
|
-
return IsEnum(type) ? EncodeEnum(type.enum, right, pattern) : IsInteger2(type) ? EncodeInteger(right, pattern) : IsLiteral(type) ? EncodeLiteral(type.const, right, pattern) : IsBigInt2(type) ? EncodeBigInt(right, pattern) :
|
|
166543
|
+
return IsEnum(type) ? EncodeEnum(type.enum, right, pattern) : IsInteger2(type) ? EncodeInteger(right, pattern) : IsLiteral(type) ? EncodeLiteral(type.const, right, pattern) : IsBigInt2(type) ? EncodeBigInt(right, pattern) : IsBoolean3(type) ? EncodeBoolean(right, pattern) : IsNumber3(type) ? EncodeNumber(right, pattern) : IsString3(type) ? EncodeString(right, pattern) : IsTemplateLiteral(type) ? EncodeTemplateLiteral(type.pattern, right, pattern) : IsTemplateLiteralDeferred(type) ? EncodeTemplateLiteralDeferred(type.parameters[0], right, pattern) : IsUnion(type) ? EncodeUnion(type.anyOf, right, pattern) : NeverPattern;
|
|
166362
166544
|
}
|
|
166363
166545
|
function EncodeTypes(types, pattern) {
|
|
166364
|
-
return exports_guard.
|
|
166546
|
+
return exports_guard.ShiftLeft(types, (left, right) => EncodeType(left, right, pattern), () => pattern);
|
|
166365
166547
|
}
|
|
166366
166548
|
function EncodePattern(types) {
|
|
166367
166549
|
const encoded = EncodeTypes(types, "");
|
|
@@ -166374,7 +166556,7 @@ function TemplateLiteralEncode(types) {
|
|
|
166374
166556
|
return result;
|
|
166375
166557
|
}
|
|
166376
166558
|
|
|
166377
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166559
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/template_literal/instantiate.mjs
|
|
166378
166560
|
function TemplateLiteralAction(types, options) {
|
|
166379
166561
|
const result = CanInstantiate(types) ? exports_memory.Update(TemplateLiteralEncode(types), {}, options) : TemplateLiteralDeferred(types, options);
|
|
166380
166562
|
return result;
|
|
@@ -166384,7 +166566,7 @@ function TemplateLiteralInstantiate(context, state, types, options) {
|
|
|
166384
166566
|
return TemplateLiteralAction(instantiatedTypes, options);
|
|
166385
166567
|
}
|
|
166386
166568
|
|
|
166387
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166569
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/template_literal.mjs
|
|
166388
166570
|
function TemplateLiteralDeferred(types, options = {}) {
|
|
166389
166571
|
return Deferred("TemplateLiteral", [types], options);
|
|
166390
166572
|
}
|
|
@@ -166406,7 +166588,7 @@ function IsTemplateLiteral(value) {
|
|
|
166406
166588
|
return IsKind(value, "TemplateLiteral");
|
|
166407
166589
|
}
|
|
166408
166590
|
|
|
166409
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166591
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/result.mjs
|
|
166410
166592
|
var exports_result = {};
|
|
166411
166593
|
__export(exports_result, {
|
|
166412
166594
|
Match: () => Match3,
|
|
@@ -166442,37 +166624,41 @@ function IsExtendsTrueLike(value) {
|
|
|
166442
166624
|
function Match3(result, true_, false_) {
|
|
166443
166625
|
return IsExtendsTrueLike(result) ? true_(result.inferred) : false_();
|
|
166444
166626
|
}
|
|
166445
|
-
|
|
166627
|
+
|
|
166628
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/extends_right.mjs
|
|
166446
166629
|
function ExtendsRightInfer(inferred, name2, left, right) {
|
|
166447
166630
|
return Match3(ExtendsLeft(inferred, left, right), (checkInferred) => ExtendsTrue(exports_memory.Assign(exports_memory.Assign(inferred, checkInferred), { [name2]: left })), () => ExtendsFalse());
|
|
166448
166631
|
}
|
|
166449
166632
|
function ExtendsRightAny(inferred, _left) {
|
|
166450
166633
|
return ExtendsTrue(inferred);
|
|
166451
166634
|
}
|
|
166635
|
+
function ExtendsRightDependent(inferred, left, if_, then_, else_) {
|
|
166636
|
+
return Match3(ExtendsLeft(inferred, left, if_), (inferred2) => Match3(ExtendsLeft(inferred2, left, then_), (inferred3) => ExtendsTrue(inferred3), () => ExtendsFalse()), () => Match3(ExtendsLeft(inferred, left, else_), (inferred2) => ExtendsTrue(inferred2), () => ExtendsFalse()));
|
|
166637
|
+
}
|
|
166452
166638
|
function ExtendsRightEnum(inferred, left, right) {
|
|
166453
|
-
const
|
|
166454
|
-
return ExtendsLeft(inferred, left,
|
|
166639
|
+
const evaluated = EvaluateEnum(right);
|
|
166640
|
+
return ExtendsLeft(inferred, left, evaluated);
|
|
166455
166641
|
}
|
|
166456
166642
|
function ExtendsRightIntersect(inferred, left, right) {
|
|
166457
|
-
return exports_guard.
|
|
166643
|
+
return exports_guard.ShiftLeft(right, (head, tail) => Match3(ExtendsLeft(inferred, left, head), (inferred2) => ExtendsRightIntersect(inferred2, left, tail), () => ExtendsFalse()), () => ExtendsTrue(inferred));
|
|
166458
166644
|
}
|
|
166459
166645
|
function ExtendsRightTemplateLiteral(inferred, left, right) {
|
|
166460
|
-
const
|
|
166461
|
-
return ExtendsLeft(inferred, left,
|
|
166646
|
+
const evaluated = EvaluateTemplateLiteral(right);
|
|
166647
|
+
return ExtendsLeft(inferred, left, evaluated);
|
|
166462
166648
|
}
|
|
166463
166649
|
function ExtendsRightUnion(inferred, left, right) {
|
|
166464
|
-
return exports_guard.
|
|
166650
|
+
return exports_guard.ShiftLeft(right, (head, tail) => Match3(ExtendsLeft(inferred, left, head), (inferred2) => ExtendsTrue(inferred2), () => ExtendsRightUnion(inferred, left, tail)), () => ExtendsFalse());
|
|
166465
166651
|
}
|
|
166466
166652
|
function ExtendsRight(inferred, left, right) {
|
|
166467
|
-
return IsAny(right) ? ExtendsRightAny(inferred, left) : IsEnum(right) ? ExtendsRightEnum(inferred, left, right.enum) : IsInfer(right) ? ExtendsRightInfer(inferred, right.name, left, right.extends) : IsIntersect(right) ? ExtendsRightIntersect(inferred, left, right.allOf) : IsTemplateLiteral(right) ? ExtendsRightTemplateLiteral(inferred, left, right.pattern) : IsUnion(right) ? ExtendsRightUnion(inferred, left, right.anyOf) : IsUnknown(right) ? ExtendsTrue(inferred) : ExtendsFalse();
|
|
166653
|
+
return IsAny(right) ? ExtendsRightAny(inferred, left) : IsDependent(right) ? ExtendsRightDependent(inferred, left, right.if, right.then, right.else) : IsEnum(right) ? ExtendsRightEnum(inferred, left, right.enum) : IsInfer(right) ? ExtendsRightInfer(inferred, right.name, left, right.extends) : IsIntersect(right) ? ExtendsRightIntersect(inferred, left, right.allOf) : IsTemplateLiteral(right) ? ExtendsRightTemplateLiteral(inferred, left, right.pattern) : IsUnion(right) ? ExtendsRightUnion(inferred, left, right.anyOf) : IsUnknown(right) ? ExtendsTrue(inferred) : ExtendsFalse();
|
|
166468
166654
|
}
|
|
166469
166655
|
|
|
166470
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166656
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/any.mjs
|
|
166471
166657
|
function ExtendsAny(inferred, left, right) {
|
|
166472
166658
|
return IsInfer(right) ? ExtendsRight(inferred, left, right) : IsAny(right) ? ExtendsTrue(inferred) : IsUnknown(right) ? ExtendsTrue(inferred) : ExtendsUnion(inferred);
|
|
166473
166659
|
}
|
|
166474
166660
|
|
|
166475
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166661
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/array.mjs
|
|
166476
166662
|
function ExtendsImmutable(left, right) {
|
|
166477
166663
|
const isImmutableLeft = IsImmutable(left);
|
|
166478
166664
|
const isImmutableRight = IsImmutable(right);
|
|
@@ -166482,22 +166668,17 @@ function ExtendsArray(inferred, arrayLeft, left, right) {
|
|
|
166482
166668
|
return IsArray2(right) ? ExtendsImmutable(arrayLeft, right) ? ExtendsLeft(inferred, left, right.items) : ExtendsFalse() : ExtendsRight(inferred, arrayLeft, right);
|
|
166483
166669
|
}
|
|
166484
166670
|
|
|
166485
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166486
|
-
function ExtendsAsyncIterator(inferred, left, right) {
|
|
166487
|
-
return IsAsyncIterator2(right) ? ExtendsLeft(inferred, left, right.iteratorItems) : ExtendsRight(inferred, AsyncIterator(left), right);
|
|
166488
|
-
}
|
|
166489
|
-
|
|
166490
|
-
// ../../node_modules/.bun/typebox@1.1.38/node_modules/typebox/build/type/extends/bigint.mjs
|
|
166671
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/bigint.mjs
|
|
166491
166672
|
function ExtendsBigInt(inferred, left, right) {
|
|
166492
166673
|
return IsBigInt2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
166493
166674
|
}
|
|
166494
166675
|
|
|
166495
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166676
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/boolean.mjs
|
|
166496
166677
|
function ExtendsBoolean(inferred, left, right) {
|
|
166497
|
-
return
|
|
166678
|
+
return IsBoolean3(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
166498
166679
|
}
|
|
166499
166680
|
|
|
166500
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166681
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/parameters.mjs
|
|
166501
166682
|
function ParameterCompare(inferred, left, leftRest, right, rightRest) {
|
|
166502
166683
|
const checkLeft = IsInfer(right) ? left : right;
|
|
166503
166684
|
const checkRight = IsInfer(right) ? right : left;
|
|
@@ -166506,52 +166687,53 @@ function ParameterCompare(inferred, left, leftRest, right, rightRest) {
|
|
|
166506
166687
|
return !isLeftOptional && isRightOptional ? ExtendsFalse() : Match3(ExtendsLeft(inferred, checkLeft, checkRight), (inferred2) => ExtendsParameters(inferred2, leftRest, rightRest), () => ExtendsFalse());
|
|
166507
166688
|
}
|
|
166508
166689
|
function ParameterRight(inferred, left, leftRest, rightRest) {
|
|
166509
|
-
return exports_guard.
|
|
166690
|
+
return exports_guard.ShiftLeft(rightRest, (head, tail) => ParameterCompare(inferred, left, leftRest, head, tail), () => IsOptional(left) ? ExtendsTrue(inferred) : ExtendsFalse());
|
|
166510
166691
|
}
|
|
166511
166692
|
function ParametersLeft(inferred, left, rightRest) {
|
|
166512
|
-
return exports_guard.
|
|
166693
|
+
return exports_guard.ShiftLeft(left, (head, tail) => ParameterRight(inferred, head, tail, rightRest), () => ExtendsTrue(inferred));
|
|
166513
166694
|
}
|
|
166514
166695
|
function ExtendsParameters(inferred, left, right) {
|
|
166515
166696
|
return ParametersLeft(inferred, left, right);
|
|
166516
166697
|
}
|
|
166517
166698
|
|
|
166518
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166699
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/return_type.mjs
|
|
166519
166700
|
function ExtendsReturnType(inferred, left, right) {
|
|
166520
166701
|
return IsVoid(right) ? ExtendsTrue(inferred) : ExtendsLeft(inferred, left, right);
|
|
166521
166702
|
}
|
|
166522
166703
|
|
|
166523
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166704
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/constructor.mjs
|
|
166524
166705
|
function ExtendsConstructor(inferred, parameters, returnType, right) {
|
|
166525
166706
|
return IsAny(right) ? ExtendsTrue(inferred) : IsUnknown(right) ? ExtendsTrue(inferred) : IsConstructor2(right) ? Match3(ExtendsParameters(inferred, parameters, right["parameters"]), (inferred2) => ExtendsReturnType(inferred2, returnType, right["instanceType"]), () => ExtendsFalse()) : ExtendsFalse();
|
|
166526
166707
|
}
|
|
166527
166708
|
|
|
166528
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166709
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/dependent.mjs
|
|
166710
|
+
function ExtendsDependent(inferred, if_, then_, else_, right) {
|
|
166711
|
+
return Match3(ExtendsLeft(inferred, if_, right), () => ExtendsLeft(inferred, then_, right), () => ExtendsLeft(inferred, else_, right));
|
|
166712
|
+
}
|
|
166713
|
+
|
|
166714
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/enum.mjs
|
|
166529
166715
|
function ExtendsEnum(inferred, left, right) {
|
|
166530
|
-
|
|
166716
|
+
const evaluated = EvaluateEnum(left);
|
|
166717
|
+
return ExtendsLeft(inferred, evaluated, right);
|
|
166531
166718
|
}
|
|
166532
166719
|
|
|
166533
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166720
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/function.mjs
|
|
166534
166721
|
function ExtendsFunction(inferred, parameters, returnType, right) {
|
|
166535
166722
|
return IsAny(right) ? ExtendsTrue(inferred) : IsUnknown(right) ? ExtendsTrue(inferred) : IsFunction2(right) ? Match3(ExtendsParameters(inferred, parameters, right["parameters"]), (inferred2) => ExtendsReturnType(inferred2, returnType, right["returnType"]), () => ExtendsFalse()) : ExtendsFalse();
|
|
166536
166723
|
}
|
|
166537
166724
|
|
|
166538
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166725
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/integer.mjs
|
|
166539
166726
|
function ExtendsInteger(inferred, left, right) {
|
|
166540
|
-
return IsInteger2(right) ? ExtendsTrue(inferred) :
|
|
166727
|
+
return IsInteger2(right) ? ExtendsTrue(inferred) : IsNumber3(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
166541
166728
|
}
|
|
166542
166729
|
|
|
166543
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166730
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/intersect.mjs
|
|
166544
166731
|
function ExtendsIntersect(inferred, left, right) {
|
|
166545
166732
|
const evaluated = EvaluateIntersect(left);
|
|
166546
166733
|
return ExtendsLeft(inferred, evaluated, right);
|
|
166547
166734
|
}
|
|
166548
166735
|
|
|
166549
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166550
|
-
function ExtendsIterator(inferred, left, right) {
|
|
166551
|
-
return IsIterator2(right) ? ExtendsLeft(inferred, left, right.iteratorItems) : ExtendsRight(inferred, Iterator(left), right);
|
|
166552
|
-
}
|
|
166553
|
-
|
|
166554
|
-
// ../../node_modules/.bun/typebox@1.1.38/node_modules/typebox/build/type/extends/literal.mjs
|
|
166736
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/literal.mjs
|
|
166555
166737
|
function ExtendsLiteralValue(inferred, left, right) {
|
|
166556
166738
|
return left === right ? ExtendsTrue(inferred) : ExtendsFalse();
|
|
166557
166739
|
}
|
|
@@ -166559,34 +166741,34 @@ function ExtendsLiteralBigInt(inferred, left, right) {
|
|
|
166559
166741
|
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) : IsBigInt2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, Literal(left), right);
|
|
166560
166742
|
}
|
|
166561
166743
|
function ExtendsLiteralBoolean(inferred, left, right) {
|
|
166562
|
-
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) :
|
|
166744
|
+
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) : IsBoolean3(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, Literal(left), right);
|
|
166563
166745
|
}
|
|
166564
166746
|
function ExtendsLiteralNumber(inferred, left, right) {
|
|
166565
|
-
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) :
|
|
166747
|
+
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) : IsNumber3(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, Literal(left), right);
|
|
166566
166748
|
}
|
|
166567
166749
|
function ExtendsLiteralString(inferred, left, right) {
|
|
166568
|
-
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) :
|
|
166750
|
+
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) : IsString3(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, Literal(left), right);
|
|
166569
166751
|
}
|
|
166570
166752
|
function ExtendsLiteral(inferred, left, right) {
|
|
166571
166753
|
return exports_guard.IsBigInt(left.const) ? ExtendsLiteralBigInt(inferred, left.const, right) : exports_guard.IsBoolean(left.const) ? ExtendsLiteralBoolean(inferred, left.const, right) : exports_guard.IsNumber(left.const) ? ExtendsLiteralNumber(inferred, left.const, right) : exports_guard.IsString(left.const) ? ExtendsLiteralString(inferred, left.const, right) : Unreachable();
|
|
166572
166754
|
}
|
|
166573
166755
|
|
|
166574
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166756
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/never.mjs
|
|
166575
166757
|
function ExtendsNever(inferred, left, right) {
|
|
166576
166758
|
return IsInfer(right) ? ExtendsRight(inferred, left, right) : ExtendsTrue(inferred);
|
|
166577
166759
|
}
|
|
166578
166760
|
|
|
166579
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166761
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/null.mjs
|
|
166580
166762
|
function ExtendsNull(inferred, left, right) {
|
|
166581
166763
|
return IsNull2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
166582
166764
|
}
|
|
166583
166765
|
|
|
166584
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166766
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/number.mjs
|
|
166585
166767
|
function ExtendsNumber(inferred, left, right) {
|
|
166586
|
-
return
|
|
166768
|
+
return IsNumber3(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
166587
166769
|
}
|
|
166588
166770
|
|
|
166589
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166771
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/object.mjs
|
|
166590
166772
|
function ExtendsPropertyOptional(inferred, left, right) {
|
|
166591
166773
|
return IsOptional(left) ? IsOptional(right) ? ExtendsTrue(inferred) : ExtendsFalse() : ExtendsTrue(inferred);
|
|
166592
166774
|
}
|
|
@@ -166614,32 +166796,54 @@ function ExtendsProperties(inferred, left, right) {
|
|
|
166614
166796
|
function ExtendsObjectToObject(inferred, left, right) {
|
|
166615
166797
|
return ExtendsProperties(inferred, left, right);
|
|
166616
166798
|
}
|
|
166799
|
+
function RecordMergeInferred(left, right) {
|
|
166800
|
+
return exports_guard.Keys(right).reduce((result, key) => {
|
|
166801
|
+
return {
|
|
166802
|
+
...result,
|
|
166803
|
+
[key]: exports_guard.HasPropertyKey(left, key) ? IsUnion(result[key]) ? Union([...result[key].anyOf, right[key]]) : Union([left[key], right[key]]) : right[key]
|
|
166804
|
+
};
|
|
166805
|
+
}, left);
|
|
166806
|
+
}
|
|
166807
|
+
function ExtendsRecordComparer(properties2, keys, type, result) {
|
|
166808
|
+
return exports_guard.ShiftLeft(keys, (left, right) => Match3(ExtendsLeft({}, properties2[left], type), (inferred) => ExtendsRecordComparer(properties2, right, type, RecordMergeInferred(result, inferred)), () => ExtendsFalse()), () => ExtendsTrue(result));
|
|
166809
|
+
}
|
|
166810
|
+
function ExtendsObjectToRecord(inferred, properties2, _pattern, value) {
|
|
166811
|
+
const keys = exports_guard.Keys(properties2);
|
|
166812
|
+
const result = ExtendsRecordComparer(properties2, keys, value, inferred);
|
|
166813
|
+
return result;
|
|
166814
|
+
}
|
|
166617
166815
|
function ExtendsObject(inferred, left, right) {
|
|
166618
|
-
return IsObject2(right) ? ExtendsObjectToObject(inferred, left, right.properties) : ExtendsRight(inferred, _Object_(left), right);
|
|
166816
|
+
return IsRecord(right) ? ExtendsObjectToRecord(inferred, left, RecordPattern(right), RecordValue(right)) : IsObject2(right) ? ExtendsObjectToObject(inferred, left, right.properties) : ExtendsRight(inferred, _Object_(left), right);
|
|
166619
166817
|
}
|
|
166620
166818
|
|
|
166621
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166622
|
-
function
|
|
166623
|
-
return
|
|
166819
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/record.mjs
|
|
166820
|
+
function FromObject2(inferred, properties2) {
|
|
166821
|
+
return exports_guard.IsEqual(exports_guard.Keys(properties2).length, 0) ? ExtendsTrue(inferred) : ExtendsFalse();
|
|
166822
|
+
}
|
|
166823
|
+
function FromRecord(inferred, _leftKey, leftValue, _rightKey, rightValue) {
|
|
166824
|
+
return ExtendsLeft(inferred, leftValue, rightValue);
|
|
166825
|
+
}
|
|
166826
|
+
function ExtendsRecord(inferred, leftPattern, leftValue, right) {
|
|
166827
|
+
return IsRecord(right) ? FromRecord(inferred, RecordPatternToType(leftPattern), leftValue, RecordPatternToType(RecordPattern(right)), RecordValue(right)) : IsObject2(right) ? FromObject2(inferred, right.properties) : IsAny(right) ? ExtendsTrue(inferred) : IsUnknown(right) ? ExtendsTrue(inferred) : ExtendsFalse();
|
|
166624
166828
|
}
|
|
166625
166829
|
|
|
166626
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166830
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/string.mjs
|
|
166627
166831
|
function ExtendsString(inferred, left, right) {
|
|
166628
|
-
return
|
|
166832
|
+
return IsString3(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
166629
166833
|
}
|
|
166630
166834
|
|
|
166631
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166835
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/symbol.mjs
|
|
166632
166836
|
function ExtendsSymbol(inferred, left, right) {
|
|
166633
166837
|
return IsSymbol2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
166634
166838
|
}
|
|
166635
166839
|
|
|
166636
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166840
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/template_literal.mjs
|
|
166637
166841
|
function ExtendsTemplateLiteral(inferred, left, right) {
|
|
166638
|
-
const
|
|
166639
|
-
return ExtendsLeft(inferred,
|
|
166842
|
+
const evaluated = EvaluateTemplateLiteral(left);
|
|
166843
|
+
return ExtendsLeft(inferred, evaluated, right);
|
|
166640
166844
|
}
|
|
166641
166845
|
|
|
166642
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166846
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/inference.mjs
|
|
166643
166847
|
function Inferrable(name2, type) {
|
|
166644
166848
|
return exports_memory.Create({ "~kind": "Inferrable" }, { name: name2, type }, {});
|
|
166645
166849
|
}
|
|
@@ -166653,7 +166857,7 @@ function TryInferable(type) {
|
|
|
166653
166857
|
return IsInfer(type) ? Inferrable(type.name, type.extends) : undefined;
|
|
166654
166858
|
}
|
|
166655
166859
|
function TryInferResults(rest3, right, result = []) {
|
|
166656
|
-
return exports_guard.
|
|
166860
|
+
return exports_guard.ShiftLeft(rest3, (head, tail) => Match3(ExtendsLeft({}, head, right), () => TryInferResults(tail, right, [...result, head]), () => {
|
|
166657
166861
|
return;
|
|
166658
166862
|
}), () => result);
|
|
166659
166863
|
}
|
|
@@ -166666,7 +166870,7 @@ function InferUnionResult(inferred, name2, left, right) {
|
|
|
166666
166870
|
return exports_guard.IsArray(results) ? ExtendsTrue(exports_memory.Assign(inferred, { [name2]: Union(results) })) : ExtendsFalse();
|
|
166667
166871
|
}
|
|
166668
166872
|
|
|
166669
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166873
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/tuple.mjs
|
|
166670
166874
|
function Reverse(types) {
|
|
166671
166875
|
return [...types].reverse();
|
|
166672
166876
|
}
|
|
@@ -166683,61 +166887,61 @@ function ElementsCompare(inferred, reversed, left, leftRest, right, rightRest) {
|
|
|
166683
166887
|
}
|
|
166684
166888
|
function ElementsLeft(inferred, reversed, leftRest, right, rightRest) {
|
|
166685
166889
|
const inferable = TryRestInferable(right);
|
|
166686
|
-
return IsInferable(inferable) ? InferTupleResult(inferred, inferable["name"], ApplyReverse(leftRest, reversed), inferable["type"]) : exports_guard.
|
|
166890
|
+
return IsInferable(inferable) ? InferTupleResult(inferred, inferable["name"], ApplyReverse(leftRest, reversed), inferable["type"]) : exports_guard.ShiftLeft(leftRest, (head, tail) => ElementsCompare(inferred, reversed, head, tail, right, rightRest), () => ExtendsFalse());
|
|
166687
166891
|
}
|
|
166688
166892
|
function ElementsRight(inferred, reversed, leftRest, rightRest) {
|
|
166689
|
-
return exports_guard.
|
|
166893
|
+
return exports_guard.ShiftLeft(rightRest, (head, tail) => ElementsLeft(inferred, reversed, leftRest, head, tail), () => exports_guard.IsEqual(leftRest.length, 0) ? ExtendsTrue(inferred) : ExtendsFalse());
|
|
166690
166894
|
}
|
|
166691
166895
|
function Elements(inferred, reversed, leftRest, rightRest) {
|
|
166692
166896
|
return ElementsRight(inferred, reversed, leftRest, rightRest);
|
|
166693
166897
|
}
|
|
166694
166898
|
function ExtendsTupleToTuple(inferred, left, right) {
|
|
166695
|
-
const instantiatedRight = InstantiateElements(inferred,
|
|
166899
|
+
const instantiatedRight = InstantiateElements(inferred, State([], []), right);
|
|
166696
166900
|
const reversed = Reversed(instantiatedRight);
|
|
166697
166901
|
return Elements(inferred, reversed, ApplyReverse(left, reversed), ApplyReverse(instantiatedRight, reversed));
|
|
166698
166902
|
}
|
|
166699
166903
|
function ExtendsTupleToArray(inferred, left, right) {
|
|
166700
166904
|
const inferrable = TryInferable(right);
|
|
166701
|
-
return IsInferable(inferrable) ? InferUnionResult(inferred, inferrable["name"], left, inferrable["type"]) : exports_guard.
|
|
166905
|
+
return IsInferable(inferrable) ? InferUnionResult(inferred, inferrable["name"], left, inferrable["type"]) : exports_guard.ShiftLeft(left, (head, tail) => Match3(ExtendsLeft(inferred, head, right), (inferred2) => ExtendsTupleToArray(inferred2, tail, right), () => ExtendsFalse()), () => ExtendsTrue(inferred));
|
|
166702
166906
|
}
|
|
166703
166907
|
function ExtendsTuple(inferred, left, right) {
|
|
166704
|
-
const instantiatedLeft = InstantiateElements(inferred,
|
|
166908
|
+
const instantiatedLeft = InstantiateElements(inferred, State([], []), left);
|
|
166705
166909
|
return IsTuple(right) ? ExtendsTupleToTuple(inferred, instantiatedLeft, right.items) : IsArray2(right) ? ExtendsTupleToArray(inferred, instantiatedLeft, right.items) : ExtendsRight(inferred, Tuple(instantiatedLeft), right);
|
|
166706
166910
|
}
|
|
166707
166911
|
|
|
166708
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166912
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/undefined.mjs
|
|
166709
166913
|
function ExtendsUndefined(inferred, left, right) {
|
|
166710
166914
|
return IsVoid(right) ? ExtendsTrue(inferred) : IsUndefined2(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
166711
166915
|
}
|
|
166712
166916
|
|
|
166713
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166917
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/union.mjs
|
|
166714
166918
|
function ExtendsUnionSome(inferred, type, unionTypes) {
|
|
166715
|
-
return exports_guard.
|
|
166919
|
+
return exports_guard.ShiftLeft(unionTypes, (head, tail) => Match3(ExtendsLeft(inferred, type, head), (inferred2) => ExtendsTrue(inferred2), () => ExtendsUnionSome(inferred, type, tail)), () => ExtendsFalse());
|
|
166716
166920
|
}
|
|
166717
166921
|
function ExtendsUnionLeft(inferred, left, right) {
|
|
166718
|
-
return exports_guard.
|
|
166922
|
+
return exports_guard.ShiftLeft(left, (head, tail) => Match3(ExtendsUnionSome(inferred, head, right), (inferred2) => ExtendsUnionLeft(inferred2, tail, right), () => ExtendsFalse()), () => ExtendsTrue(inferred));
|
|
166719
166923
|
}
|
|
166720
166924
|
function ExtendsUnion2(inferred, left, right) {
|
|
166721
166925
|
const inferrable = TryInferable(right);
|
|
166722
166926
|
return IsInferable(inferrable) ? InferUnionResult(inferred, inferrable.name, left, inferrable.type) : IsUnion(right) ? ExtendsUnionLeft(inferred, left, right.anyOf) : ExtendsUnionLeft(inferred, left, [right]);
|
|
166723
166927
|
}
|
|
166724
166928
|
|
|
166725
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166929
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/unknown.mjs
|
|
166726
166930
|
function ExtendsUnknown(inferred, left, right) {
|
|
166727
166931
|
return IsInfer(right) ? ExtendsRight(inferred, left, right) : IsAny(right) ? ExtendsTrue(inferred) : IsUnknown(right) ? ExtendsTrue(inferred) : ExtendsFalse();
|
|
166728
166932
|
}
|
|
166729
166933
|
|
|
166730
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166934
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/void.mjs
|
|
166731
166935
|
function ExtendsVoid(inferred, left, right) {
|
|
166732
166936
|
return IsVoid(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
166733
166937
|
}
|
|
166734
166938
|
|
|
166735
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166939
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/extends_left.mjs
|
|
166736
166940
|
function ExtendsLeft(inferred, left, right) {
|
|
166737
|
-
return IsAny(left) ? ExtendsAny(inferred, left, right) : IsArray2(left) ? ExtendsArray(inferred, left, left.items, right) :
|
|
166941
|
+
return IsAny(left) ? ExtendsAny(inferred, left, right) : IsArray2(left) ? ExtendsArray(inferred, left, left.items, right) : IsBigInt2(left) ? ExtendsBigInt(inferred, left, right) : IsBoolean3(left) ? ExtendsBoolean(inferred, left, right) : IsConstructor2(left) ? ExtendsConstructor(inferred, left.parameters, left.instanceType, right) : IsDependent(left) ? ExtendsDependent(inferred, left.if, left.then, left.else, right) : IsEnum(left) ? ExtendsEnum(inferred, left.enum, right) : IsFunction2(left) ? ExtendsFunction(inferred, left.parameters, left.returnType, right) : IsInteger2(left) ? ExtendsInteger(inferred, left, right) : IsIntersect(left) ? ExtendsIntersect(inferred, left.allOf, right) : IsLiteral(left) ? ExtendsLiteral(inferred, left, right) : IsNever(left) ? ExtendsNever(inferred, left, right) : IsNull2(left) ? ExtendsNull(inferred, left, right) : IsNumber3(left) ? ExtendsNumber(inferred, left, right) : IsObject2(left) ? ExtendsObject(inferred, left.properties, right) : IsRecord(left) ? ExtendsRecord(inferred, RecordPattern(left), RecordValue(left), right) : IsString3(left) ? ExtendsString(inferred, left, right) : IsSymbol2(left) ? ExtendsSymbol(inferred, left, right) : IsTemplateLiteral(left) ? ExtendsTemplateLiteral(inferred, left.pattern, right) : IsTuple(left) ? ExtendsTuple(inferred, left.items, right) : IsUndefined2(left) ? ExtendsUndefined(inferred, left, right) : IsUnion(left) ? ExtendsUnion2(inferred, left.anyOf, right) : IsUnknown(left) ? ExtendsUnknown(inferred, left, right) : IsVoid(left) ? ExtendsVoid(inferred, left, right) : ExtendsFalse();
|
|
166738
166942
|
}
|
|
166739
166943
|
|
|
166740
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166944
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/interface/instantiate.mjs
|
|
166741
166945
|
function InterfaceOperation(heritage, properties2) {
|
|
166742
166946
|
const result = EvaluateIntersect([...heritage, _Object_(properties2)]);
|
|
166743
166947
|
return result;
|
|
@@ -166752,7 +166956,7 @@ function InterfaceInstantiate(context, state, heritage, properties2, options) {
|
|
|
166752
166956
|
return InterfaceAction(instantiatedHeritage, instantiatedProperties, options);
|
|
166753
166957
|
}
|
|
166754
166958
|
|
|
166755
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166959
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/interface.mjs
|
|
166756
166960
|
function InterfaceDeferred(heritage, properties2, options = {}) {
|
|
166757
166961
|
return Deferred("Interface", [heritage, properties2], options);
|
|
166758
166962
|
}
|
|
@@ -166763,7 +166967,7 @@ function Interface(heritage, properties2, options = {}) {
|
|
|
166763
166967
|
return InterfaceAction(heritage, properties2, options);
|
|
166764
166968
|
}
|
|
166765
166969
|
|
|
166766
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166970
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/cyclic/check.mjs
|
|
166767
166971
|
function FromRef(stack, context, ref2) {
|
|
166768
166972
|
return stack.includes(ref2) ? true : FromType3([...stack, ref2], context, context[ref2]);
|
|
166769
166973
|
}
|
|
@@ -166772,20 +166976,20 @@ function FromProperties(stack, context, properties2) {
|
|
|
166772
166976
|
return FromTypes2(stack, context, types);
|
|
166773
166977
|
}
|
|
166774
166978
|
function FromTypes2(stack, context, types) {
|
|
166775
|
-
return exports_guard.
|
|
166979
|
+
return exports_guard.ShiftLeft(types, (left, right) => FromType3(stack, context, left) ? true : FromTypes2(stack, context, right), () => false);
|
|
166776
166980
|
}
|
|
166777
166981
|
function FromType3(stack, context, type) {
|
|
166778
|
-
return IsRef(type) ? FromRef(stack, context, type.$ref) : IsArray2(type) ? FromType3(stack, context, type.items) :
|
|
166982
|
+
return IsRef(type) ? FromRef(stack, context, type.$ref) : IsArray2(type) ? FromType3(stack, context, type.items) : IsConstructor2(type) ? FromTypes2(stack, context, [...type.parameters, type.instanceType]) : IsFunction2(type) ? FromTypes2(stack, context, [...type.parameters, type.returnType]) : IsInterfaceDeferred(type) ? FromProperties(stack, context, type.parameters[1]) : IsIntersect(type) ? FromTypes2(stack, context, type.allOf) : IsObject2(type) ? FromProperties(stack, context, type.properties) : IsUnion(type) ? FromTypes2(stack, context, type.anyOf) : IsTuple(type) ? FromTypes2(stack, context, type.items) : IsRecord(type) ? FromType3(stack, context, RecordValue(type)) : false;
|
|
166779
166983
|
}
|
|
166780
166984
|
function CyclicCheck(stack, context, type) {
|
|
166781
166985
|
const result = FromType3(stack, context, type);
|
|
166782
166986
|
return result;
|
|
166783
166987
|
}
|
|
166784
166988
|
|
|
166785
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
166989
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/cyclic/candidates.mjs
|
|
166786
166990
|
function ResolveCandidateKeys(context, keys) {
|
|
166787
166991
|
return keys.reduce((result, left) => {
|
|
166788
|
-
return
|
|
166992
|
+
return CyclicCheck([left], context, context[left]) ? [...result, left] : result;
|
|
166789
166993
|
}, []);
|
|
166790
166994
|
}
|
|
166791
166995
|
function CyclicCandidates(context) {
|
|
@@ -166793,7 +166997,7 @@ function CyclicCandidates(context) {
|
|
|
166793
166997
|
const result = ResolveCandidateKeys(context, keys);
|
|
166794
166998
|
return result;
|
|
166795
166999
|
}
|
|
166796
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167000
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs
|
|
166797
167001
|
function FromRef2(context, ref2, result) {
|
|
166798
167002
|
return result.includes(ref2) ? result : (ref2 in context) ? FromType4(context, context[ref2], [...result, ref2]) : Unreachable();
|
|
166799
167003
|
}
|
|
@@ -166807,13 +167011,13 @@ function FromTypes3(context, types, result) {
|
|
|
166807
167011
|
}, result);
|
|
166808
167012
|
}
|
|
166809
167013
|
function FromType4(context, type, result) {
|
|
166810
|
-
return IsRef(type) ? FromRef2(context, type.$ref, result) : IsArray2(type) ? FromType4(context, type.items, result) :
|
|
167014
|
+
return IsRef(type) ? FromRef2(context, type.$ref, result) : IsArray2(type) ? FromType4(context, type.items, result) : IsConstructor2(type) ? FromTypes3(context, [...type.parameters, type.instanceType], result) : IsFunction2(type) ? FromTypes3(context, [...type.parameters, type.returnType], result) : IsInterfaceDeferred(type) ? FromProperties2(context, type.parameters[1], result) : IsIntersect(type) ? FromTypes3(context, type.allOf, result) : IsObject2(type) ? FromProperties2(context, type.properties, result) : IsUnion(type) ? FromTypes3(context, type.anyOf, result) : IsTuple(type) ? FromTypes3(context, type.items, result) : IsRecord(type) ? FromType4(context, RecordValue(type), result) : result;
|
|
166811
167015
|
}
|
|
166812
167016
|
function CyclicDependencies(context, key, type) {
|
|
166813
167017
|
const result = FromType4(context, type, [key]);
|
|
166814
167018
|
return result;
|
|
166815
167019
|
}
|
|
166816
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167020
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/cyclic/extends.mjs
|
|
166817
167021
|
function FromRef3(_ref) {
|
|
166818
167022
|
return Any();
|
|
166819
167023
|
}
|
|
@@ -166828,7 +167032,7 @@ function FromTypes4(types) {
|
|
|
166828
167032
|
}, []);
|
|
166829
167033
|
}
|
|
166830
167034
|
function FromType5(type) {
|
|
166831
|
-
return IsRef(type) ? FromRef3(type.$ref) : IsArray2(type) ? _Array_(FromType5(type.items), ArrayOptions(type)) :
|
|
167035
|
+
return IsRef(type) ? FromRef3(type.$ref) : IsArray2(type) ? _Array_(FromType5(type.items), ArrayOptions(type)) : IsConstructor2(type) ? Constructor(FromTypes4(type.parameters), FromType5(type.instanceType)) : IsFunction2(type) ? _Function_(FromTypes4(type.parameters), FromType5(type.returnType)) : IsIntersect(type) ? Intersect(FromTypes4(type.allOf)) : IsObject2(type) ? _Object_(FromProperties3(type.properties)) : IsRecord(type) ? Record(RecordKey(type), FromType5(RecordValue(type))) : IsUnion(type) ? Union(FromTypes4(type.anyOf)) : IsTuple(type) ? Tuple(FromTypes4(type.items)) : type;
|
|
166832
167036
|
}
|
|
166833
167037
|
function CyclicAnyFromParameters(defs, ref2) {
|
|
166834
167038
|
return ref2 in defs ? FromType5(defs[ref2]) : Unknown();
|
|
@@ -166836,10 +167040,10 @@ function CyclicAnyFromParameters(defs, ref2) {
|
|
|
166836
167040
|
function CyclicExtends(type) {
|
|
166837
167041
|
return CyclicAnyFromParameters(type.$defs, type.$ref);
|
|
166838
167042
|
}
|
|
166839
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167043
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs
|
|
166840
167044
|
function CyclicInterface(context, heritage, properties2) {
|
|
166841
|
-
const instantiatedHeritage = InstantiateTypes(context,
|
|
166842
|
-
const instantiatedProperties = InstantiateProperties({},
|
|
167045
|
+
const instantiatedHeritage = InstantiateTypes(context, State([], []), heritage);
|
|
167046
|
+
const instantiatedProperties = InstantiateProperties({}, State([], []), properties2);
|
|
166843
167047
|
const evaluatedInterface = EvaluateIntersect([...instantiatedHeritage, _Object_(instantiatedProperties)]);
|
|
166844
167048
|
return evaluatedInterface;
|
|
166845
167049
|
}
|
|
@@ -166857,7 +167061,7 @@ function InstantiateCyclic(context, ref2, type) {
|
|
|
166857
167061
|
const result = Cyclic(definitions, ref2);
|
|
166858
167062
|
return result;
|
|
166859
167063
|
}
|
|
166860
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167064
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/cyclic/target.mjs
|
|
166861
167065
|
function Resolve(defs, ref2) {
|
|
166862
167066
|
return ref2 in defs ? IsRef(defs[ref2]) ? Resolve(defs, defs[ref2].$ref) : defs[ref2] : Never();
|
|
166863
167067
|
}
|
|
@@ -166865,29 +167069,29 @@ function CyclicTarget(defs, ref2) {
|
|
|
166865
167069
|
const result = Resolve(defs, ref2);
|
|
166866
167070
|
return result;
|
|
166867
167071
|
}
|
|
166868
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167072
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/extends/extends.mjs
|
|
166869
167073
|
function Canonical(type) {
|
|
166870
167074
|
return IsCyclic(type) ? CyclicExtends(type) : IsUnsafe(type) ? Unknown() : type;
|
|
166871
167075
|
}
|
|
166872
|
-
function
|
|
167076
|
+
function Extends(inferred, left, right) {
|
|
166873
167077
|
const canonicalLeft = Canonical(left);
|
|
166874
167078
|
const canonicalRight = Canonical(right);
|
|
166875
167079
|
return ExtendsLeft(inferred, canonicalLeft, canonicalRight);
|
|
166876
167080
|
}
|
|
166877
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167081
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/evaluate/compare.mjs
|
|
166878
167082
|
var ResultEqual = "equal";
|
|
166879
167083
|
var ResultDisjoint = "disjoint";
|
|
166880
167084
|
var ResultLeftInside = "left-inside";
|
|
166881
167085
|
var ResultRightInside = "right-inside";
|
|
166882
167086
|
function Compare(left, right) {
|
|
166883
167087
|
const extendsCheck = [
|
|
166884
|
-
IsUnknown(left) ? exports_result.ExtendsFalse() :
|
|
166885
|
-
IsUnknown(left) ? exports_result.ExtendsTrue({}) :
|
|
167088
|
+
IsUnknown(left) ? exports_result.ExtendsFalse() : Extends({}, left, right),
|
|
167089
|
+
IsUnknown(left) ? exports_result.ExtendsTrue({}) : Extends({}, right, left)
|
|
166886
167090
|
];
|
|
166887
167091
|
return exports_result.IsExtendsTrueLike(extendsCheck[0]) && exports_result.IsExtendsTrueLike(extendsCheck[1]) ? ResultEqual : exports_result.IsExtendsTrueLike(extendsCheck[0]) && exports_result.IsExtendsFalse(extendsCheck[1]) ? ResultLeftInside : exports_result.IsExtendsFalse(extendsCheck[0]) && exports_result.IsExtendsTrueLike(extendsCheck[1]) ? ResultRightInside : ResultDisjoint;
|
|
166888
167092
|
}
|
|
166889
167093
|
|
|
166890
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167094
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/evaluate/broaden.mjs
|
|
166891
167095
|
function BroadFilter(type, types) {
|
|
166892
167096
|
return types.filter((left) => {
|
|
166893
167097
|
return Compare(type, left) === ResultRightInside ? false : true;
|
|
@@ -166912,10 +167116,9 @@ function BroadenTypes(types) {
|
|
|
166912
167116
|
function Broaden(types) {
|
|
166913
167117
|
const broadened = BroadenTypes(types);
|
|
166914
167118
|
const flattened = Flatten(broadened);
|
|
166915
|
-
|
|
166916
|
-
return result;
|
|
167119
|
+
return flattened;
|
|
166917
167120
|
}
|
|
166918
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167121
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/evaluate/instantiate.mjs
|
|
166919
167122
|
function EvaluateAction(type, options) {
|
|
166920
167123
|
const result = exports_memory.Update(EvaluateType(type), {}, options);
|
|
166921
167124
|
return result;
|
|
@@ -166924,7 +167127,7 @@ function EvaluateInstantiate(context, state, type, options) {
|
|
|
166924
167127
|
const instantiatedType = InstantiateType(context, state, type);
|
|
166925
167128
|
return EvaluateAction(instantiatedType, options);
|
|
166926
167129
|
}
|
|
166927
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167130
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs
|
|
166928
167131
|
function CollectDistributionNames(expression, result = []) {
|
|
166929
167132
|
return IsDeferred(expression) && exports_guard.IsEqual(expression.action, "Conditional") ? IsRef(expression.parameters[0]) ? CollectDistributionNames(expression.parameters[2], CollectDistributionNames(expression.parameters[3], [...result, expression.parameters[0]["$ref"]])) : CollectDistributionNames(expression.parameters[2], CollectDistributionNames(expression.parameters[3], result)) : IsDeferred(expression) && exports_guard.IsEqual(expression.action, "Mapped") ? IsDeferred(expression.parameters[1]) && exports_guard.IsEqual(expression.parameters[1].action, "KeyOf") && IsRef(expression.parameters[1].parameters[0]) ? [...result, expression.parameters[1].parameters[0]["$ref"]] : result : result;
|
|
166930
167133
|
}
|
|
@@ -166932,7 +167135,7 @@ function BuildDistributionArray(parameters, names) {
|
|
|
166932
167135
|
return parameters.reduce((result, left) => [...result, names.includes(left.name)], []);
|
|
166933
167136
|
}
|
|
166934
167137
|
function ZipDistributionArray(arguments_, distributionArray, result = []) {
|
|
166935
|
-
return exports_guard.
|
|
167138
|
+
return exports_guard.ShiftLeft(arguments_, (argumentLeft, argumentRight) => exports_guard.ShiftLeft(distributionArray, (booleanLeft, booleanRight) => ZipDistributionArray(argumentRight, booleanRight, [...result, [booleanLeft, argumentLeft]]), () => result), () => result);
|
|
166936
167139
|
}
|
|
166937
167140
|
function Expand(type) {
|
|
166938
167141
|
return IsUnion(type) ? [...type.anyOf] : [type];
|
|
@@ -166957,7 +167160,7 @@ function DistributeArguments(parameters, arguments_, expression) {
|
|
|
166957
167160
|
return IsDeferred(expression) && exports_guard.IsEqual(expression.action, "Conditional") ? Distribute2(zippedArguments) : IsDeferred(expression) && exports_guard.IsEqual(expression.action, "Mapped") ? Distribute2(zippedArguments) : [arguments_];
|
|
166958
167161
|
}
|
|
166959
167162
|
|
|
166960
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167163
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/call/resolve_target.mjs
|
|
166961
167164
|
function FromNotResolvable() {
|
|
166962
167165
|
return ["(not-resolvable)", Never()];
|
|
166963
167166
|
}
|
|
@@ -166977,9 +167180,9 @@ function ResolveTarget(context, target2, arguments_) {
|
|
|
166977
167180
|
return FromType6(context, "(anonymous)", target2, arguments_);
|
|
166978
167181
|
}
|
|
166979
167182
|
|
|
166980
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167183
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs
|
|
166981
167184
|
function AssertArgumentExtends(name2, type, extends_) {
|
|
166982
|
-
if (IsInfer(type) || IsCall(type) || exports_result.IsExtendsTrueLike(
|
|
167185
|
+
if (IsInfer(type) || IsCall(type) || exports_result.IsExtendsTrueLike(Extends({}, type, extends_)))
|
|
166983
167186
|
return;
|
|
166984
167187
|
const cause = { parameter: name2, expect: extends_, actual: type };
|
|
166985
167188
|
throw new Error(`Argument for parameter ${name2} does not satisfy constraint`, { cause });
|
|
@@ -166992,16 +167195,16 @@ function BindArgument(context, state, name2, extends_, type) {
|
|
|
166992
167195
|
function BindArguments(context, state, parameterLeft, parameterRight, arguments_) {
|
|
166993
167196
|
const instantiatedExtends = InstantiateType(context, state, parameterLeft.extends);
|
|
166994
167197
|
const instantiatedEquals = InstantiateType(context, state, parameterLeft.equals);
|
|
166995
|
-
return exports_guard.
|
|
167198
|
+
return exports_guard.ShiftLeft(arguments_, (left, right) => BindParameters(BindArgument(context, state, parameterLeft["name"], instantiatedExtends, left), state, parameterRight, right), () => BindParameters(BindArgument(context, state, parameterLeft["name"], instantiatedExtends, instantiatedEquals), state, parameterRight, []));
|
|
166996
167199
|
}
|
|
166997
167200
|
function BindParameters(context, state, parameters, arguments_) {
|
|
166998
|
-
return exports_guard.
|
|
167201
|
+
return exports_guard.ShiftLeft(parameters, (left, right) => BindArguments(context, state, left, right, arguments_), () => context);
|
|
166999
167202
|
}
|
|
167000
167203
|
function ResolveArgumentsContext(context, state, parameters, arguments_) {
|
|
167001
167204
|
return BindParameters(context, state, parameters, arguments_);
|
|
167002
167205
|
}
|
|
167003
167206
|
|
|
167004
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167207
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/call/instantiate.mjs
|
|
167005
167208
|
function Peek(state) {
|
|
167006
167209
|
const result = exports_guard.IsGreaterThan(state.callstack.length, 0) ? state.callstack[state.callstack.length - 1] : "";
|
|
167007
167210
|
return result;
|
|
@@ -167012,8 +167215,8 @@ function IsTailCall(state, name2) {
|
|
|
167012
167215
|
}
|
|
167013
167216
|
function CallDispatch(context, state, target2, parameters, expression, arguments_) {
|
|
167014
167217
|
const argumentsContext = ResolveArgumentsContext(context, state, parameters, arguments_);
|
|
167015
|
-
const returnType = InstantiateType(argumentsContext,
|
|
167016
|
-
return InstantiateType(
|
|
167218
|
+
const returnType = InstantiateType(argumentsContext, State([...state["callstack"], target2["$ref"]], state["visited"]), expression);
|
|
167219
|
+
return InstantiateType(argumentsContext, State([], []), returnType);
|
|
167017
167220
|
}
|
|
167018
167221
|
function CallDistributed(context, state, target2, parameters, expression, distributedArguments) {
|
|
167019
167222
|
return distributedArguments.reduce((result, arguments_) => [...result, CallDispatch(context, state, target2, parameters, expression, arguments_)], []);
|
|
@@ -167033,46 +167236,59 @@ function CallInstantiate(context, state, target2, arguments_) {
|
|
|
167033
167236
|
return result;
|
|
167034
167237
|
}
|
|
167035
167238
|
|
|
167036
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167239
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/types/call.mjs
|
|
167037
167240
|
function CallConstruct(target2, arguments_) {
|
|
167038
|
-
return exports_memory.Create({ ["~kind"]: "Call" }, { target: target2, arguments: arguments_ }, {});
|
|
167241
|
+
return exports_memory.Create({ ["~kind"]: "Call" }, { type: "call", target: target2, arguments: arguments_ }, {});
|
|
167039
167242
|
}
|
|
167040
167243
|
function Call(target2, arguments_) {
|
|
167041
|
-
return CallInstantiate({},
|
|
167244
|
+
return CallInstantiate({}, State([], []), target2, arguments_);
|
|
167042
167245
|
}
|
|
167043
167246
|
function IsCall(value) {
|
|
167044
167247
|
return IsKind(value, "Call");
|
|
167045
167248
|
}
|
|
167046
167249
|
|
|
167047
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167250
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs
|
|
167251
|
+
function RemoveImmutableOperation(type) {
|
|
167252
|
+
return exports_memory.Discard(type, ["~immutable"]);
|
|
167253
|
+
}
|
|
167254
|
+
function RemoveImmutableAction(type, options) {
|
|
167255
|
+
const result = exports_memory.Update(RemoveImmutableOperation(type), {}, options);
|
|
167256
|
+
return result;
|
|
167257
|
+
}
|
|
167258
|
+
function RemoveImmutableInstantiate(context, state, type, options) {
|
|
167259
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
167260
|
+
return RemoveImmutableAction(instantiatedType, options);
|
|
167261
|
+
}
|
|
167262
|
+
|
|
167263
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/intrinsics/mapping.mjs
|
|
167048
167264
|
function ApplyMapping(mapping, value) {
|
|
167049
167265
|
return mapping(value);
|
|
167050
167266
|
}
|
|
167051
167267
|
|
|
167052
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167268
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/intrinsics/from_literal.mjs
|
|
167053
167269
|
function FromLiteral3(mapping, value) {
|
|
167054
167270
|
return exports_guard.IsString(value) ? Literal(ApplyMapping(mapping, value)) : Literal(value);
|
|
167055
167271
|
}
|
|
167056
167272
|
|
|
167057
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167273
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs
|
|
167058
167274
|
function FromTemplateLiteral(mapping, pattern) {
|
|
167059
|
-
const
|
|
167060
|
-
const result = FromType7(mapping,
|
|
167275
|
+
const evaluated = EvaluateTemplateLiteral(pattern);
|
|
167276
|
+
const result = FromType7(mapping, evaluated);
|
|
167061
167277
|
return result;
|
|
167062
167278
|
}
|
|
167063
167279
|
|
|
167064
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167280
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/intrinsics/from_union.mjs
|
|
167065
167281
|
function FromUnion2(mapping, types) {
|
|
167066
167282
|
const result = types.map((type) => FromType7(mapping, type));
|
|
167067
167283
|
return Union(result);
|
|
167068
167284
|
}
|
|
167069
167285
|
|
|
167070
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167286
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/intrinsics/from_type.mjs
|
|
167071
167287
|
function FromType7(mapping, type) {
|
|
167072
167288
|
return IsLiteral(type) ? FromLiteral3(mapping, type.const) : IsTemplateLiteral(type) ? FromTemplateLiteral(mapping, type.pattern) : IsUnion(type) ? FromUnion2(mapping, type.anyOf) : type;
|
|
167073
167289
|
}
|
|
167074
167290
|
|
|
167075
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167291
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/capitalize.mjs
|
|
167076
167292
|
function CapitalizeDeferred(type, options = {}) {
|
|
167077
167293
|
return Deferred("Capitalize", [type], options);
|
|
167078
167294
|
}
|
|
@@ -167080,7 +167296,7 @@ function Capitalize(type, options = {}) {
|
|
|
167080
167296
|
return CapitalizeAction(type, options);
|
|
167081
167297
|
}
|
|
167082
167298
|
|
|
167083
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167299
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/lowercase.mjs
|
|
167084
167300
|
function LowercaseDeferred(type, options = {}) {
|
|
167085
167301
|
return Deferred("Lowercase", [type], options);
|
|
167086
167302
|
}
|
|
@@ -167088,7 +167304,7 @@ function Lowercase(type, options = {}) {
|
|
|
167088
167304
|
return LowercaseAction(type, options);
|
|
167089
167305
|
}
|
|
167090
167306
|
|
|
167091
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167307
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/uncapitalize.mjs
|
|
167092
167308
|
function UncapitalizeDeferred(type, options = {}) {
|
|
167093
167309
|
return Deferred("Uncapitalize", [type], options);
|
|
167094
167310
|
}
|
|
@@ -167096,7 +167312,7 @@ function Uncapitalize(type, options = {}) {
|
|
|
167096
167312
|
return UncapitalizeAction(type, options);
|
|
167097
167313
|
}
|
|
167098
167314
|
|
|
167099
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167315
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/uppercase.mjs
|
|
167100
167316
|
function UppercaseDeferred(type, options = {}) {
|
|
167101
167317
|
return Deferred("Uppercase", [type], options);
|
|
167102
167318
|
}
|
|
@@ -167104,7 +167320,7 @@ function Uppercase(type, options = {}) {
|
|
|
167104
167320
|
return UppercaseAction(type, options);
|
|
167105
167321
|
}
|
|
167106
167322
|
|
|
167107
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167323
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/intrinsics/instantiate.mjs
|
|
167108
167324
|
var CapitalizeMapping = (input) => input[0].toUpperCase() + input.slice(1);
|
|
167109
167325
|
var LowercaseMapping = (input) => input.toLowerCase();
|
|
167110
167326
|
var UncapitalizeMapping = (input) => input[0].toLowerCase() + input.slice(1);
|
|
@@ -167142,17 +167358,17 @@ function UppercaseInstantiate(context, state, type, options) {
|
|
|
167142
167358
|
return UppercaseAction(instantiatedType, options);
|
|
167143
167359
|
}
|
|
167144
167360
|
|
|
167145
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167361
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/conditional.mjs
|
|
167146
167362
|
function ConditionalDeferred(left, right, true_, false_, options = {}) {
|
|
167147
167363
|
return Deferred("Conditional", [left, right, true_, false_], options);
|
|
167148
167364
|
}
|
|
167149
167365
|
function Conditional(left, right, true_, false_, options = {}) {
|
|
167150
|
-
return ConditionalAction({},
|
|
167366
|
+
return ConditionalAction({}, State([], []), left, right, true_, false_, options);
|
|
167151
167367
|
}
|
|
167152
167368
|
|
|
167153
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167369
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/conditional/instantiate.mjs
|
|
167154
167370
|
function ConditionalOperation(context, state, left, right, true_, false_) {
|
|
167155
|
-
const extendsResult =
|
|
167371
|
+
const extendsResult = Extends(context, left, right);
|
|
167156
167372
|
return exports_result.IsExtendsUnion(extendsResult) ? Union([InstantiateType(extendsResult.inferred, state, true_), InstantiateType(context, state, false_)]) : exports_result.IsExtendsTrue(extendsResult) ? InstantiateType(extendsResult.inferred, state, true_) : InstantiateType(context, state, false_);
|
|
167157
167373
|
}
|
|
167158
167374
|
function ConditionalAction(context, state, left, right, true_, false_, options) {
|
|
@@ -167164,7 +167380,7 @@ function ConditionalInstantiate(context, state, left, right, true_, false_, opti
|
|
|
167164
167380
|
const instantiatedRight = InstantiateType(context, state, right);
|
|
167165
167381
|
return ConditionalAction(context, state, instantiatedLeft, instantiatedRight, true_, false_, options);
|
|
167166
167382
|
}
|
|
167167
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167383
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/constructor_parameters.mjs
|
|
167168
167384
|
function ConstructorParametersDeferred(type, options = {}) {
|
|
167169
167385
|
return Deferred("ConstructorParameters", [type], options);
|
|
167170
167386
|
}
|
|
@@ -167172,10 +167388,10 @@ function ConstructorParameters(type, options = {}) {
|
|
|
167172
167388
|
return ConstructorParametersAction(type, options);
|
|
167173
167389
|
}
|
|
167174
167390
|
|
|
167175
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167391
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs
|
|
167176
167392
|
function ConstructorParametersOperation(type) {
|
|
167177
167393
|
const parameters = IsConstructor2(type) ? type["parameters"] : [];
|
|
167178
|
-
const instantiatedParameters = InstantiateElements({},
|
|
167394
|
+
const instantiatedParameters = InstantiateElements({}, State([], []), parameters);
|
|
167179
167395
|
const result = Tuple(instantiatedParameters);
|
|
167180
167396
|
return result;
|
|
167181
167397
|
}
|
|
@@ -167188,7 +167404,7 @@ function ConstructorParametersInstantiate(context, state, type, options) {
|
|
|
167188
167404
|
return ConstructorParametersAction(instantiatedType, options);
|
|
167189
167405
|
}
|
|
167190
167406
|
|
|
167191
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167407
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/exclude.mjs
|
|
167192
167408
|
function ExcludeDeferred(left, right, options = {}) {
|
|
167193
167409
|
return Deferred("Exclude", [left, right], options);
|
|
167194
167410
|
}
|
|
@@ -167196,24 +167412,7 @@ function Exclude(left, right, options = {}) {
|
|
|
167196
167412
|
return ExcludeAction(left, right, options);
|
|
167197
167413
|
}
|
|
167198
167414
|
|
|
167199
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167200
|
-
function ExcludeUnionLeft(types, right) {
|
|
167201
|
-
return types.reduce((result, head) => {
|
|
167202
|
-
return [...result, ...ExcludeTypeLeft(head, right)];
|
|
167203
|
-
}, []);
|
|
167204
|
-
}
|
|
167205
|
-
function ExcludeTypeLeft(left, right) {
|
|
167206
|
-
const check3 = Extends2({}, left, right);
|
|
167207
|
-
const result = exports_result.IsExtendsTrueLike(check3) ? [] : [left];
|
|
167208
|
-
return result;
|
|
167209
|
-
}
|
|
167210
|
-
function ExcludeOperation(left, right) {
|
|
167211
|
-
const remaining = IsEnum(left) ? ExcludeUnionLeft(EnumValuesToVariants(left.enum), right) : IsUnion(left) ? ExcludeUnionLeft(Flatten(left.anyOf), right) : ExcludeTypeLeft(left, right);
|
|
167212
|
-
const result = EvaluateUnion(remaining);
|
|
167213
|
-
return result;
|
|
167214
|
-
}
|
|
167215
|
-
|
|
167216
|
-
// ../../node_modules/.bun/typebox@1.1.38/node_modules/typebox/build/type/engine/exclude/instantiate.mjs
|
|
167415
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/exclude/instantiate.mjs
|
|
167217
167416
|
function ExcludeAction(left, right, options) {
|
|
167218
167417
|
const result = CanInstantiate([left, right]) ? exports_memory.Update(ExcludeOperation(left, right), {}, options) : ExcludeDeferred(left, right, options);
|
|
167219
167418
|
return result;
|
|
@@ -167224,7 +167423,7 @@ function ExcludeInstantiate(context, state, left, right, options) {
|
|
|
167224
167423
|
return ExcludeAction(instantiatedLeft, instantiatedRight, options);
|
|
167225
167424
|
}
|
|
167226
167425
|
|
|
167227
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167426
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/extract.mjs
|
|
167228
167427
|
function ExtractDeferred(left, right, options = {}) {
|
|
167229
167428
|
return Deferred("Extract", [left, right], options);
|
|
167230
167429
|
}
|
|
@@ -167232,24 +167431,26 @@ function Extract(left, right, options = {}) {
|
|
|
167232
167431
|
return ExtractAction(left, right, options);
|
|
167233
167432
|
}
|
|
167234
167433
|
|
|
167235
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167236
|
-
function
|
|
167237
|
-
|
|
167238
|
-
return [...result, ...ExtractTypeLeft(head, right)];
|
|
167239
|
-
}, []);
|
|
167240
|
-
}
|
|
167241
|
-
function ExtractTypeLeft(left, right) {
|
|
167242
|
-
const check3 = Extends2({}, left, right);
|
|
167434
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/extract/operation.mjs
|
|
167435
|
+
function ExtractType(left, right) {
|
|
167436
|
+
const check3 = Extends({}, left, right);
|
|
167243
167437
|
const result = exports_result.IsExtendsTrueLike(check3) ? [left] : [];
|
|
167244
167438
|
return result;
|
|
167245
167439
|
}
|
|
167440
|
+
function ExtractUnion(types, right) {
|
|
167441
|
+
return types.reduce((result, head) => {
|
|
167442
|
+
return [...result, ...ExtractType(head, right)];
|
|
167443
|
+
}, []);
|
|
167444
|
+
}
|
|
167246
167445
|
function ExtractOperation(left, right) {
|
|
167247
|
-
const
|
|
167446
|
+
const evaluated = EvaluateType(left);
|
|
167447
|
+
const canonical = IsUnion(evaluated) ? evaluated.anyOf : [evaluated];
|
|
167448
|
+
const remaining = ExtractUnion(canonical, right);
|
|
167248
167449
|
const result = EvaluateUnion(remaining);
|
|
167249
167450
|
return result;
|
|
167250
167451
|
}
|
|
167251
167452
|
|
|
167252
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167453
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/extract/instantiate.mjs
|
|
167253
167454
|
function ExtractAction(left, right, options) {
|
|
167254
167455
|
const result = CanInstantiate([left, right]) ? exports_memory.Update(ExtractOperation(left, right), {}, options) : ExtractDeferred(left, right, options);
|
|
167255
167456
|
return result;
|
|
@@ -167260,7 +167461,7 @@ function ExtractInstantiate(context, state, left, right, options) {
|
|
|
167260
167461
|
return ExtractAction(instantiatedLeft, instantiatedRight, options);
|
|
167261
167462
|
}
|
|
167262
167463
|
|
|
167263
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167464
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/helpers/keys_to_indexer.mjs
|
|
167264
167465
|
function KeysToLiterals(keys) {
|
|
167265
167466
|
return keys.reduce((result, left) => {
|
|
167266
167467
|
return IsLiteralValue(left) ? [...result, Literal(left)] : result;
|
|
@@ -167272,7 +167473,7 @@ function KeysToIndexer(keys) {
|
|
|
167272
167473
|
return result;
|
|
167273
167474
|
}
|
|
167274
167475
|
|
|
167275
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167476
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/indexed.mjs
|
|
167276
167477
|
function IndexDeferred(type, indexer, options = {}) {
|
|
167277
167478
|
return Deferred("Index", [type, indexer], options);
|
|
167278
167479
|
}
|
|
@@ -167281,14 +167482,21 @@ function Index(type, indexer_or_keys, options = {}) {
|
|
|
167281
167482
|
return IndexAction(type, indexer, options);
|
|
167282
167483
|
}
|
|
167283
167484
|
|
|
167284
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167485
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/object/from_cyclic.mjs
|
|
167285
167486
|
function FromCyclic(defs, ref2) {
|
|
167286
167487
|
const target2 = CyclicTarget(defs, ref2);
|
|
167287
167488
|
const result = FromType8(target2);
|
|
167288
167489
|
return result;
|
|
167289
167490
|
}
|
|
167290
167491
|
|
|
167291
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167492
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/object/from_dependent.mjs
|
|
167493
|
+
function FromDependent(if_, then_, else_) {
|
|
167494
|
+
const evaluated = EvaluateDependent(if_, then_, else_);
|
|
167495
|
+
const result = FromType8(evaluated);
|
|
167496
|
+
return result;
|
|
167497
|
+
}
|
|
167498
|
+
|
|
167499
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/object/from_intersect.mjs
|
|
167292
167500
|
function CollapseIntersectProperties(left, right) {
|
|
167293
167501
|
const leftKeys = exports_guard.Keys(left).filter((key) => !exports_guard.HasPropertyKey(right, key));
|
|
167294
167502
|
const rightKeys = exports_guard.Keys(right).filter((key) => !exports_guard.HasPropertyKey(left, key));
|
|
@@ -167306,19 +167514,19 @@ function FromIntersect(types) {
|
|
|
167306
167514
|
}, {});
|
|
167307
167515
|
}
|
|
167308
167516
|
|
|
167309
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167310
|
-
function
|
|
167517
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/object/from_object.mjs
|
|
167518
|
+
function FromObject3(properties2) {
|
|
167311
167519
|
return properties2;
|
|
167312
167520
|
}
|
|
167313
167521
|
|
|
167314
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167522
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/object/from_tuple.mjs
|
|
167315
167523
|
function FromTuple(types) {
|
|
167316
167524
|
const object3 = TupleToObject(Tuple(types));
|
|
167317
167525
|
const result = FromType8(object3);
|
|
167318
167526
|
return result;
|
|
167319
167527
|
}
|
|
167320
167528
|
|
|
167321
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167529
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/object/from_union.mjs
|
|
167322
167530
|
function CollapseUnionProperties(left, right) {
|
|
167323
167531
|
const sharedKeys = exports_guard.Keys(left).filter((key) => (key in right));
|
|
167324
167532
|
const result = sharedKeys.reduce((result2, key) => {
|
|
@@ -167327,31 +167535,31 @@ function CollapseUnionProperties(left, right) {
|
|
|
167327
167535
|
return result;
|
|
167328
167536
|
}
|
|
167329
167537
|
function ReduceVariants(types, result) {
|
|
167330
|
-
return exports_guard.
|
|
167538
|
+
return exports_guard.ShiftLeft(types, (left, right) => ReduceVariants(right, CollapseUnionProperties(result, FromType8(left))), () => result);
|
|
167331
167539
|
}
|
|
167332
167540
|
function FromUnion3(types) {
|
|
167333
|
-
return exports_guard.
|
|
167541
|
+
return exports_guard.ShiftLeft(types, (left, right) => ReduceVariants(right, FromType8(left)), () => Unreachable());
|
|
167334
167542
|
}
|
|
167335
167543
|
|
|
167336
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167544
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/object/from_type.mjs
|
|
167337
167545
|
function FromType8(type) {
|
|
167338
|
-
return IsCyclic(type) ? FromCyclic(type.$defs, type.$ref) : IsIntersect(type) ? FromIntersect(type.allOf) : IsUnion(type) ? FromUnion3(type.anyOf) : IsTuple(type) ? FromTuple(type.items) : IsObject2(type) ?
|
|
167546
|
+
return IsCyclic(type) ? FromCyclic(type.$defs, type.$ref) : IsDependent(type) ? FromDependent(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect(type.allOf) : IsUnion(type) ? FromUnion3(type.anyOf) : IsTuple(type) ? FromTuple(type.items) : IsObject2(type) ? FromObject3(type.properties) : {};
|
|
167339
167547
|
}
|
|
167340
167548
|
|
|
167341
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167549
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/object/collapse.mjs
|
|
167342
167550
|
function CollapseToObject(type) {
|
|
167343
167551
|
const properties2 = FromType8(type);
|
|
167344
167552
|
const result = _Object_(properties2);
|
|
167345
167553
|
return result;
|
|
167346
167554
|
}
|
|
167347
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167555
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/helpers/keys.mjs
|
|
167348
167556
|
var integerKeyPattern = new RegExp("^(?:0|[1-9][0-9]*)$");
|
|
167349
167557
|
function ConvertToIntegerKey(value) {
|
|
167350
167558
|
const normal = `${value}`;
|
|
167351
167559
|
return integerKeyPattern.test(normal) ? parseInt(normal) : value;
|
|
167352
167560
|
}
|
|
167353
167561
|
|
|
167354
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167562
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexed/from_array.mjs
|
|
167355
167563
|
function NormalizeLiteral(value) {
|
|
167356
167564
|
return Literal(ConvertToIntegerKey(value));
|
|
167357
167565
|
}
|
|
@@ -167363,76 +167571,83 @@ function NormalizeIndexer(type) {
|
|
|
167363
167571
|
}
|
|
167364
167572
|
function FromArray2(type, indexer) {
|
|
167365
167573
|
const normalizedIndexer = NormalizeIndexer(indexer);
|
|
167366
|
-
const check3 =
|
|
167574
|
+
const check3 = Extends({}, normalizedIndexer, Number2());
|
|
167367
167575
|
const result = exports_result.IsExtendsTrueLike(check3) ? type : IsLiteral(indexer) && exports_guard.IsEqual(indexer.const, "length") ? Number2() : Never();
|
|
167368
167576
|
return result;
|
|
167369
167577
|
}
|
|
167370
167578
|
|
|
167371
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167579
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexable/from_cyclic.mjs
|
|
167372
167580
|
function FromCyclic2(defs, ref2) {
|
|
167373
167581
|
const target2 = CyclicTarget(defs, ref2);
|
|
167374
167582
|
const result = FromType9(target2);
|
|
167375
167583
|
return result;
|
|
167376
167584
|
}
|
|
167377
167585
|
|
|
167378
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167379
|
-
function
|
|
167380
|
-
|
|
167381
|
-
|
|
167382
|
-
|
|
167586
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs
|
|
167587
|
+
function FromDependent2(if_, then_, else_) {
|
|
167588
|
+
const evaluated = EvaluateDependent(if_, then_, else_);
|
|
167589
|
+
const result = FromType9(evaluated);
|
|
167590
|
+
return result;
|
|
167383
167591
|
}
|
|
167384
167592
|
|
|
167385
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167593
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexable/from_enum.mjs
|
|
167386
167594
|
function FromEnum(values) {
|
|
167387
|
-
const
|
|
167388
|
-
const result =
|
|
167595
|
+
const evaluated = EvaluateEnum(values);
|
|
167596
|
+
const result = FromType9(evaluated);
|
|
167389
167597
|
return result;
|
|
167390
167598
|
}
|
|
167391
167599
|
|
|
167392
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167600
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexable/from_intersect.mjs
|
|
167393
167601
|
function FromIntersect2(types) {
|
|
167394
167602
|
const evaluated = EvaluateIntersect(types);
|
|
167395
167603
|
const result = FromType9(evaluated);
|
|
167396
167604
|
return result;
|
|
167397
167605
|
}
|
|
167398
167606
|
|
|
167399
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167607
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexable/from_literal.mjs
|
|
167400
167608
|
function FromLiteral4(value) {
|
|
167401
167609
|
const result = [`${value}`];
|
|
167402
167610
|
return result;
|
|
167403
167611
|
}
|
|
167404
167612
|
|
|
167405
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167613
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs
|
|
167406
167614
|
function FromTemplateLiteral2(pattern) {
|
|
167407
|
-
const
|
|
167408
|
-
const result = FromType9(
|
|
167615
|
+
const evaluated = EvaluateTemplateLiteral(pattern);
|
|
167616
|
+
const result = FromType9(evaluated);
|
|
167409
167617
|
return result;
|
|
167410
167618
|
}
|
|
167411
167619
|
|
|
167412
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167620
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexable/from_union.mjs
|
|
167621
|
+
function FromUnion4(types) {
|
|
167622
|
+
return types.reduce((result, left) => {
|
|
167623
|
+
return [...result, ...FromType9(left)];
|
|
167624
|
+
}, []);
|
|
167625
|
+
}
|
|
167626
|
+
|
|
167627
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexable/from_type.mjs
|
|
167413
167628
|
function FromType9(type) {
|
|
167414
|
-
return IsCyclic(type) ? FromCyclic2(type.$defs, type.$ref) : IsEnum(type) ? FromEnum(type.enum) : IsIntersect(type) ? FromIntersect2(type.allOf) : IsLiteral(type) ? FromLiteral4(type.const) : IsTemplateLiteral(type) ? FromTemplateLiteral2(type.pattern) : IsUnion(type) ? FromUnion4(type.anyOf) : [];
|
|
167629
|
+
return IsCyclic(type) ? FromCyclic2(type.$defs, type.$ref) : IsDependent(type) ? FromDependent2(type.if, type.then, type.else) : IsEnum(type) ? FromEnum(type.enum) : IsIntersect(type) ? FromIntersect2(type.allOf) : IsLiteral(type) ? FromLiteral4(type.const) : IsTemplateLiteral(type) ? FromTemplateLiteral2(type.pattern) : IsUnion(type) ? FromUnion4(type.anyOf) : [];
|
|
167415
167630
|
}
|
|
167416
167631
|
|
|
167417
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167632
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexable/to_indexable_keys.mjs
|
|
167418
167633
|
function ToIndexableKeys(type) {
|
|
167419
167634
|
const result = FromType9(type);
|
|
167420
167635
|
return result;
|
|
167421
167636
|
}
|
|
167422
167637
|
|
|
167423
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167638
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/this/expand_this.mjs
|
|
167424
167639
|
function FromTypes5(properties2, types) {
|
|
167425
167640
|
return types.map((type) => FromType10(properties2, type));
|
|
167426
167641
|
}
|
|
167427
167642
|
function FromType10(properties2, type) {
|
|
167428
|
-
return IsArray2(type) ? _Array_(FromType10(properties2, type.items)) :
|
|
167643
|
+
return IsArray2(type) ? _Array_(FromType10(properties2, type.items)) : IsConstructor2(type) ? Constructor(FromTypes5(properties2, type.parameters), FromType10(properties2, type.instanceType)) : IsFunction2(type) ? _Function_(FromTypes5(properties2, type.parameters), FromType10(properties2, type.returnType)) : IsTuple(type) ? Tuple(FromTypes5(properties2, type.items)) : IsUnion(type) ? Union(FromTypes5(properties2, type.anyOf)) : IsIntersect(type) ? Intersect(FromTypes5(properties2, type.allOf)) : IsThis(type) ? _Object_(properties2) : type;
|
|
167429
167644
|
}
|
|
167430
167645
|
function ExpandThis(properties2, type) {
|
|
167431
167646
|
const result = FromType10(properties2, type);
|
|
167432
167647
|
return result;
|
|
167433
167648
|
}
|
|
167434
167649
|
|
|
167435
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167650
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexed/from_object.mjs
|
|
167436
167651
|
function IndexProperty(properties2, key) {
|
|
167437
167652
|
const selectedType = key in properties2 ? properties2[key] : Never();
|
|
167438
167653
|
const result = ExpandThis(properties2, selectedType);
|
|
@@ -167461,12 +167676,12 @@ function FromIndexerNumber(properties2) {
|
|
|
167461
167676
|
const result = EvaluateUnion(variants);
|
|
167462
167677
|
return result;
|
|
167463
167678
|
}
|
|
167464
|
-
function
|
|
167465
|
-
const result =
|
|
167679
|
+
function FromObject4(properties2, indexer) {
|
|
167680
|
+
const result = IsNumber3(indexer) ? FromIndexerNumber(properties2) : FromIndexer(properties2, indexer);
|
|
167466
167681
|
return result;
|
|
167467
167682
|
}
|
|
167468
167683
|
|
|
167469
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167684
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexed/array_indexer.mjs
|
|
167470
167685
|
function ConvertLiteral(value) {
|
|
167471
167686
|
return Literal(ConvertToIntegerKey(value));
|
|
167472
167687
|
}
|
|
@@ -167477,10 +167692,10 @@ function FormatArrayIndexer(type) {
|
|
|
167477
167692
|
return IsIntersect(type) ? Intersect(ArrayIndexerTypes(type.allOf)) : IsUnion(type) ? Union(ArrayIndexerTypes(type.anyOf)) : IsLiteral(type) ? ConvertLiteral(type.const) : type;
|
|
167478
167693
|
}
|
|
167479
167694
|
|
|
167480
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167695
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexed/from_tuple.mjs
|
|
167481
167696
|
function IndexElementsWithIndexer(types, indexer) {
|
|
167482
167697
|
return types.reduceRight((result, right, index) => {
|
|
167483
|
-
const check3 =
|
|
167698
|
+
const check3 = Extends({}, Literal(index), indexer);
|
|
167484
167699
|
return exports_result.IsExtendsTrueLike(check3) ? [right, ...result] : result;
|
|
167485
167700
|
}, []);
|
|
167486
167701
|
}
|
|
@@ -167493,17 +167708,17 @@ function FromTupleWithoutIndexer(types) {
|
|
|
167493
167708
|
return EvaluateUnionFast(types);
|
|
167494
167709
|
}
|
|
167495
167710
|
function FromTuple2(types, indexer) {
|
|
167496
|
-
return IsLiteral(indexer) && exports_guard.IsEqual(indexer.const, "length") ? Literal(types.length) :
|
|
167711
|
+
return IsLiteral(indexer) && exports_guard.IsEqual(indexer.const, "length") ? Literal(types.length) : IsNumber3(indexer) || IsInteger2(indexer) ? FromTupleWithoutIndexer(types) : FromTupleWithIndexer(types, indexer);
|
|
167497
167712
|
}
|
|
167498
167713
|
|
|
167499
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167714
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexed/from_type.mjs
|
|
167500
167715
|
function FromType11(type, indexer) {
|
|
167501
|
-
return IsArray2(type) ? FromArray2(type.items, indexer) : IsObject2(type) ?
|
|
167716
|
+
return IsArray2(type) ? FromArray2(type.items, indexer) : IsObject2(type) ? FromObject4(type.properties, indexer) : IsTuple(type) ? FromTuple2(type.items, indexer) : Never();
|
|
167502
167717
|
}
|
|
167503
167718
|
|
|
167504
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167719
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexed/instantiate.mjs
|
|
167505
167720
|
function NormalizeType(type) {
|
|
167506
|
-
const result = IsCyclic(type) || IsIntersect(type) || IsUnion(type) ? CollapseToObject(type) : type;
|
|
167721
|
+
const result = IsCyclic(type) || IsDependent(type) || IsIntersect(type) || IsUnion(type) ? CollapseToObject(type) : type;
|
|
167507
167722
|
return result;
|
|
167508
167723
|
}
|
|
167509
167724
|
function IndexAction(type, indexer, options) {
|
|
@@ -167516,7 +167731,7 @@ function IndexInstantiate(context, state, type, indexer, options) {
|
|
|
167516
167731
|
return IndexAction(instantiatedType, instantiatedIndexer, options);
|
|
167517
167732
|
}
|
|
167518
167733
|
|
|
167519
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167734
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/instance_type.mjs
|
|
167520
167735
|
function InstanceTypeDeferred(type, options = {}) {
|
|
167521
167736
|
return Deferred("InstanceType", [type], options);
|
|
167522
167737
|
}
|
|
@@ -167524,7 +167739,7 @@ function InstanceType(type, options = {}) {
|
|
|
167524
167739
|
return InstanceTypeAction(type, options);
|
|
167525
167740
|
}
|
|
167526
167741
|
|
|
167527
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167742
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/instance_type/instantiate.mjs
|
|
167528
167743
|
function InstanceTypeOperation(type) {
|
|
167529
167744
|
return IsConstructor2(type) ? type["instanceType"] : Never();
|
|
167530
167745
|
}
|
|
@@ -167537,7 +167752,7 @@ function InstanceTypeInstantiate(context, state, type, options = {}) {
|
|
|
167537
167752
|
return InstanceTypeAction(instantiatedType, options);
|
|
167538
167753
|
}
|
|
167539
167754
|
|
|
167540
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167755
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/keyof.mjs
|
|
167541
167756
|
function KeyOfDeferred(type, options = {}) {
|
|
167542
167757
|
return Deferred("KeyOf", [type], options);
|
|
167543
167758
|
}
|
|
@@ -167545,49 +167760,49 @@ function KeyOf2(type, options = {}) {
|
|
|
167545
167760
|
return KeyOfAction(type, options);
|
|
167546
167761
|
}
|
|
167547
167762
|
|
|
167548
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167763
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/keyof/from_any.mjs
|
|
167549
167764
|
function FromAny() {
|
|
167550
167765
|
return Union([Number2(), String2(), Symbol2()]);
|
|
167551
167766
|
}
|
|
167552
167767
|
|
|
167553
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167768
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/keyof/from_array.mjs
|
|
167554
167769
|
function FromArray3(_type) {
|
|
167555
167770
|
return Number2();
|
|
167556
167771
|
}
|
|
167557
167772
|
|
|
167558
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167773
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/keyof/from_object.mjs
|
|
167559
167774
|
function FromPropertyKeys(keys) {
|
|
167560
167775
|
const result = keys.reduce((result2, left) => {
|
|
167561
167776
|
return IsLiteralValue(left) ? [...result2, Literal(ConvertToIntegerKey(left))] : Unreachable();
|
|
167562
167777
|
}, []);
|
|
167563
167778
|
return result;
|
|
167564
167779
|
}
|
|
167565
|
-
function
|
|
167780
|
+
function FromObject5(properties2) {
|
|
167566
167781
|
const propertyKeys = exports_guard.Keys(properties2);
|
|
167567
167782
|
const variants = FromPropertyKeys(propertyKeys);
|
|
167568
167783
|
const result = EvaluateUnionFast(variants);
|
|
167569
167784
|
return result;
|
|
167570
167785
|
}
|
|
167571
167786
|
|
|
167572
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167573
|
-
function
|
|
167787
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/keyof/from_record.mjs
|
|
167788
|
+
function FromRecord2(type) {
|
|
167574
167789
|
return RecordKey(type);
|
|
167575
167790
|
}
|
|
167576
167791
|
|
|
167577
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167792
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/keyof/from_tuple.mjs
|
|
167578
167793
|
function FromTuple3(types) {
|
|
167579
167794
|
const result = types.map((_, index) => Literal(index));
|
|
167580
167795
|
return EvaluateUnionFast(result);
|
|
167581
167796
|
}
|
|
167582
167797
|
|
|
167583
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167798
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/keyof/from_type.mjs
|
|
167584
167799
|
function FromType12(type) {
|
|
167585
|
-
return IsAny(type) ? FromAny() : IsArray2(type) ? FromArray3(type.items) : IsObject2(type) ?
|
|
167800
|
+
return IsAny(type) ? FromAny() : IsArray2(type) ? FromArray3(type.items) : IsObject2(type) ? FromObject5(type.properties) : IsRecord(type) ? FromRecord2(type) : IsTuple(type) ? FromTuple3(type.items) : Never();
|
|
167586
167801
|
}
|
|
167587
167802
|
|
|
167588
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167803
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/keyof/instantiate.mjs
|
|
167589
167804
|
function NormalizeType2(type) {
|
|
167590
|
-
const result = IsCyclic(type) || IsIntersect(type) || IsUnion(type) ? CollapseToObject(type) : type;
|
|
167805
|
+
const result = IsCyclic(type) || IsDependent(type) || IsIntersect(type) || IsUnion(type) ? CollapseToObject(type) : type;
|
|
167591
167806
|
return result;
|
|
167592
167807
|
}
|
|
167593
167808
|
function KeyOfAction(type, options) {
|
|
@@ -167598,18 +167813,18 @@ function KeyOfInstantiate(context, state, type, options) {
|
|
|
167598
167813
|
return KeyOfAction(instantiatedType, options);
|
|
167599
167814
|
}
|
|
167600
167815
|
|
|
167601
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167816
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/mapped.mjs
|
|
167602
167817
|
function MappedDeferred(identifier2, type, as, property, options = {}) {
|
|
167603
167818
|
return Deferred("Mapped", [identifier2, type, as, property], options);
|
|
167604
167819
|
}
|
|
167605
|
-
function
|
|
167606
|
-
return MappedAction({},
|
|
167820
|
+
function Mapped(identifier2, type, as, property, options = {}) {
|
|
167821
|
+
return MappedAction({}, State([], []), identifier2, type, as, property, options);
|
|
167607
167822
|
}
|
|
167608
167823
|
|
|
167609
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167824
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs
|
|
167610
167825
|
function FromTemplateLiteral3(pattern) {
|
|
167611
|
-
const
|
|
167612
|
-
const result = FromType13(
|
|
167826
|
+
const evaluated = EvaluateTemplateLiteral(pattern);
|
|
167827
|
+
const result = FromType13(evaluated);
|
|
167613
167828
|
return result;
|
|
167614
167829
|
}
|
|
167615
167830
|
function FromUnion5(types) {
|
|
@@ -167617,12 +167832,17 @@ function FromUnion5(types) {
|
|
|
167617
167832
|
return [...result, ...FromType13(left)];
|
|
167618
167833
|
}, []);
|
|
167619
167834
|
}
|
|
167835
|
+
function FromEnum2(values) {
|
|
167836
|
+
const evaluated = EvaluateEnum(values);
|
|
167837
|
+
const result = FromType13(evaluated);
|
|
167838
|
+
return result;
|
|
167839
|
+
}
|
|
167620
167840
|
function FromLiteral5(value) {
|
|
167621
167841
|
const result = exports_guard.IsNumber(value) ? [Literal(`${value}`)] : [Literal(value)];
|
|
167622
167842
|
return result;
|
|
167623
167843
|
}
|
|
167624
167844
|
function FromType13(type) {
|
|
167625
|
-
const result = IsEnum(type) ?
|
|
167845
|
+
const result = IsEnum(type) ? FromEnum2(type.enum) : IsLiteral(type) ? FromLiteral5(type.const) : IsTemplateLiteral(type) ? FromTemplateLiteral3(type.pattern) : IsUnion(type) ? FromUnion5(type.anyOf) : [type];
|
|
167626
167846
|
return result;
|
|
167627
167847
|
}
|
|
167628
167848
|
function MappedVariants(type) {
|
|
@@ -167630,9 +167850,9 @@ function MappedVariants(type) {
|
|
|
167630
167850
|
return result;
|
|
167631
167851
|
}
|
|
167632
167852
|
|
|
167633
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167853
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs
|
|
167634
167854
|
function CanonicalAs(instantiatedAs) {
|
|
167635
|
-
const result = IsTemplateLiteral(instantiatedAs) ?
|
|
167855
|
+
const result = IsTemplateLiteral(instantiatedAs) ? EvaluateTemplateLiteral(instantiatedAs.pattern) : instantiatedAs;
|
|
167636
167856
|
return result;
|
|
167637
167857
|
}
|
|
167638
167858
|
function MappedVariant(context, state, identifier2, variant, as, property) {
|
|
@@ -167660,7 +167880,7 @@ function MappedOperation(context, state, identifier2, type, as, property) {
|
|
|
167660
167880
|
return result;
|
|
167661
167881
|
}
|
|
167662
167882
|
|
|
167663
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167883
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/mapped/instantiate.mjs
|
|
167664
167884
|
function MappedAction(context, state, identifier2, type, as, property, options) {
|
|
167665
167885
|
const result = CanInstantiate([type]) ? exports_memory.Update(MappedOperation(context, state, identifier2, type, as, property), {}, options) : MappedDeferred(identifier2, type, as, property, options);
|
|
167666
167886
|
return result;
|
|
@@ -167670,33 +167890,34 @@ function MappedInstantiate(context, state, identifier2, type, as, property, opti
|
|
|
167670
167890
|
return MappedAction(context, state, identifier2, instantiatedType, as, property, options);
|
|
167671
167891
|
}
|
|
167672
167892
|
|
|
167673
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167674
|
-
function InstantiateCyclics(context, cyclicKeys) {
|
|
167675
|
-
const
|
|
167676
|
-
|
|
167677
|
-
|
|
167893
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/module/instantiate.mjs
|
|
167894
|
+
function InstantiateCyclics(context, declarations, cyclicKeys) {
|
|
167895
|
+
const declarationContext = exports_memory.Assign(context, declarations);
|
|
167896
|
+
const declarationKeys = exports_guard.Keys(declarations).filter((key) => cyclicKeys.includes(key));
|
|
167897
|
+
return declarationKeys.reduce((result, key) => {
|
|
167898
|
+
return { ...result, [key]: InstantiateCyclic(declarationContext, key, declarations[key]) };
|
|
167678
167899
|
}, {});
|
|
167679
167900
|
}
|
|
167680
|
-
function InstantiateNonCyclics(context, cyclicKeys) {
|
|
167681
|
-
const
|
|
167682
|
-
|
|
167683
|
-
|
|
167901
|
+
function InstantiateNonCyclics(context, declarations, cyclicKeys) {
|
|
167902
|
+
const declarationContext = exports_memory.Assign(context, declarations);
|
|
167903
|
+
const declarationKeys = exports_guard.Keys(declarations).filter((key) => !cyclicKeys.includes(key));
|
|
167904
|
+
return declarationKeys.reduce((result, key) => {
|
|
167905
|
+
return { ...result, [key]: InstantiateType(declarationContext, State([], []), declarations[key]) };
|
|
167684
167906
|
}, {});
|
|
167685
167907
|
}
|
|
167686
|
-
function InstantiateModule(context, options) {
|
|
167687
|
-
const cyclicCandidates = CyclicCandidates(
|
|
167688
|
-
const instantiatedCyclics = InstantiateCyclics(context, cyclicCandidates);
|
|
167689
|
-
const instantiatedNonCyclics = InstantiateNonCyclics(context, cyclicCandidates);
|
|
167908
|
+
function InstantiateModule(context, declarations, options) {
|
|
167909
|
+
const cyclicCandidates = CyclicCandidates(declarations);
|
|
167910
|
+
const instantiatedCyclics = InstantiateCyclics(context, declarations, cyclicCandidates);
|
|
167911
|
+
const instantiatedNonCyclics = InstantiateNonCyclics(context, declarations, cyclicCandidates);
|
|
167690
167912
|
const instantiatedModule = { ...instantiatedCyclics, ...instantiatedNonCyclics };
|
|
167691
167913
|
return exports_memory.Update(instantiatedModule, {}, options);
|
|
167692
167914
|
}
|
|
167693
|
-
function ModuleInstantiate(context, _state,
|
|
167694
|
-
const
|
|
167695
|
-
const instantiatedModule = InstantiateModule(moduleContext, options);
|
|
167915
|
+
function ModuleInstantiate(context, _state, declarations, options) {
|
|
167916
|
+
const instantiatedModule = InstantiateModule(context, declarations, options);
|
|
167696
167917
|
return instantiatedModule;
|
|
167697
167918
|
}
|
|
167698
167919
|
|
|
167699
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167920
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/non_nullable.mjs
|
|
167700
167921
|
function NonNullableDeferred(type, options = {}) {
|
|
167701
167922
|
return Deferred("NonNullable", [type], options);
|
|
167702
167923
|
}
|
|
@@ -167704,7 +167925,7 @@ function NonNullable(type, options = {}) {
|
|
|
167704
167925
|
return NonNullableAction(type, options);
|
|
167705
167926
|
}
|
|
167706
167927
|
|
|
167707
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167928
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/non_nullable/instantiate.mjs
|
|
167708
167929
|
function NonNullableOperation(type) {
|
|
167709
167930
|
const excluded = Union([Null(), Undefined()]);
|
|
167710
167931
|
return ExcludeAction(type, excluded, {});
|
|
@@ -167718,7 +167939,7 @@ function NonNullableInstantiate(context, state, type, options) {
|
|
|
167718
167939
|
return NonNullableAction(instantiatedType, options);
|
|
167719
167940
|
}
|
|
167720
167941
|
|
|
167721
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167942
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/omit.mjs
|
|
167722
167943
|
function OmitDeferred(type, indexer, options = {}) {
|
|
167723
167944
|
return Deferred("Omit", [type, indexer], options);
|
|
167724
167945
|
}
|
|
@@ -167727,14 +167948,14 @@ function Omit(type, indexer_or_keys, options = {}) {
|
|
|
167727
167948
|
return OmitAction(type, indexer, options);
|
|
167728
167949
|
}
|
|
167729
167950
|
|
|
167730
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167951
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/indexable/to_indexable.mjs
|
|
167731
167952
|
function ToIndexable(type) {
|
|
167732
167953
|
const collapsed = CollapseToObject(type);
|
|
167733
167954
|
const result = IsObject2(collapsed) ? collapsed.properties : Unreachable();
|
|
167734
167955
|
return result;
|
|
167735
167956
|
}
|
|
167736
167957
|
|
|
167737
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167958
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/omit/from_type.mjs
|
|
167738
167959
|
function FromKeys(properties2, keys) {
|
|
167739
167960
|
const result = exports_guard.Keys(properties2).reduce((result2, key) => {
|
|
167740
167961
|
return keys.includes(key) ? result2 : { ...result2, [key]: properties2[key] };
|
|
@@ -167749,7 +167970,7 @@ function FromType14(type, indexer) {
|
|
|
167749
167970
|
return result;
|
|
167750
167971
|
}
|
|
167751
167972
|
|
|
167752
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167973
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/omit/instantiate.mjs
|
|
167753
167974
|
function OmitAction(type, indexer, options) {
|
|
167754
167975
|
const result = CanInstantiate([type, indexer]) ? exports_memory.Update(FromType14(type, indexer), {}, options) : OmitDeferred(type, indexer, options);
|
|
167755
167976
|
return result;
|
|
@@ -167760,25 +167981,7 @@ function OmitInstantiate(context, state, type, indexer, options) {
|
|
|
167760
167981
|
return OmitAction(instantiatedType, instantiatedIndexer, options);
|
|
167761
167982
|
}
|
|
167762
167983
|
|
|
167763
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167764
|
-
function OptionsDeferred(type, options) {
|
|
167765
|
-
return Deferred("Options", [type, options], {});
|
|
167766
|
-
}
|
|
167767
|
-
function Options2(type, options) {
|
|
167768
|
-
return OptionsAction(type, options);
|
|
167769
|
-
}
|
|
167770
|
-
|
|
167771
|
-
// ../../node_modules/.bun/typebox@1.1.38/node_modules/typebox/build/type/engine/options/instantiate.mjs
|
|
167772
|
-
function OptionsAction(type, options) {
|
|
167773
|
-
const result = CanInstantiate([type]) ? exports_memory.Update(type, {}, options) : OptionsDeferred(type, options);
|
|
167774
|
-
return result;
|
|
167775
|
-
}
|
|
167776
|
-
function OptionsInstantiate(context, state, type, options) {
|
|
167777
|
-
const instaniatedType = InstantiateType(context, state, type);
|
|
167778
|
-
return OptionsAction(instaniatedType, options);
|
|
167779
|
-
}
|
|
167780
|
-
|
|
167781
|
-
// ../../node_modules/.bun/typebox@1.1.38/node_modules/typebox/build/type/action/parameters.mjs
|
|
167984
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/parameters.mjs
|
|
167782
167985
|
function ParametersDeferred(type, options = {}) {
|
|
167783
167986
|
return Deferred("Parameters", [type], options);
|
|
167784
167987
|
}
|
|
@@ -167786,10 +167989,10 @@ function Parameters(type, options = {}) {
|
|
|
167786
167989
|
return ParametersAction(type, options);
|
|
167787
167990
|
}
|
|
167788
167991
|
|
|
167789
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167992
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/parameters/instantiate.mjs
|
|
167790
167993
|
function ParametersOperation(type) {
|
|
167791
167994
|
const parameters = IsFunction2(type) ? type["parameters"] : [];
|
|
167792
|
-
const instantiatedParameters = InstantiateElements({},
|
|
167995
|
+
const instantiatedParameters = InstantiateElements({}, State([], []), parameters);
|
|
167793
167996
|
const result = Tuple(instantiatedParameters);
|
|
167794
167997
|
return result;
|
|
167795
167998
|
}
|
|
@@ -167802,7 +168005,7 @@ function ParametersInstantiate(context, state, type, options) {
|
|
|
167802
168005
|
return ParametersAction(instantiatedType, options);
|
|
167803
168006
|
}
|
|
167804
168007
|
|
|
167805
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168008
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/partial.mjs
|
|
167806
168009
|
function PartialDeferred(type, options = {}) {
|
|
167807
168010
|
return Deferred("Partial", [type], options);
|
|
167808
168011
|
}
|
|
@@ -167810,7 +168013,7 @@ function Partial(type, options = {}) {
|
|
|
167810
168013
|
return PartialAction(type, options);
|
|
167811
168014
|
}
|
|
167812
168015
|
|
|
167813
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168016
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/partial/from_cyclic.mjs
|
|
167814
168017
|
function FromCyclic3(defs, ref2) {
|
|
167815
168018
|
const target2 = CyclicTarget(defs, ref2);
|
|
167816
168019
|
const partial2 = FromType15(target2);
|
|
@@ -167818,33 +168021,41 @@ function FromCyclic3(defs, ref2) {
|
|
|
167818
168021
|
return result;
|
|
167819
168022
|
}
|
|
167820
168023
|
|
|
167821
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168024
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/partial/from_dependent.mjs
|
|
168025
|
+
function FromDependent3(if_, then_, else_) {
|
|
168026
|
+
const evaluated = EvaluateDependent(if_, then_, else_);
|
|
168027
|
+
const result = FromType15(evaluated);
|
|
168028
|
+
return result;
|
|
168029
|
+
}
|
|
168030
|
+
|
|
168031
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/partial/from_intersect.mjs
|
|
167822
168032
|
function FromIntersect3(types) {
|
|
167823
|
-
const
|
|
167824
|
-
|
|
168033
|
+
const evaluated = EvaluateIntersect(types);
|
|
168034
|
+
const result = FromType15(evaluated);
|
|
168035
|
+
return result;
|
|
167825
168036
|
}
|
|
167826
168037
|
|
|
167827
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168038
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/partial/from_union.mjs
|
|
167828
168039
|
function FromUnion6(types) {
|
|
167829
168040
|
const result = types.map((type) => FromType15(type));
|
|
167830
168041
|
return Union(result);
|
|
167831
168042
|
}
|
|
167832
168043
|
|
|
167833
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167834
|
-
function
|
|
168044
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/partial/from_object.mjs
|
|
168045
|
+
function FromObject6(properties2) {
|
|
167835
168046
|
const mapped = exports_guard.Keys(properties2).reduce((result2, left) => {
|
|
167836
|
-
return { ...result2, [left]:
|
|
168047
|
+
return { ...result2, [left]: AddOptional(properties2[left]) };
|
|
167837
168048
|
}, {});
|
|
167838
168049
|
const result = _Object_(mapped);
|
|
167839
168050
|
return result;
|
|
167840
168051
|
}
|
|
167841
168052
|
|
|
167842
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168053
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/partial/from_type.mjs
|
|
167843
168054
|
function FromType15(type) {
|
|
167844
|
-
return IsCyclic(type) ? FromCyclic3(type.$defs, type.$ref) : IsIntersect(type) ? FromIntersect3(type.allOf) : IsUnion(type) ? FromUnion6(type.anyOf) : IsObject2(type) ?
|
|
168055
|
+
return IsCyclic(type) ? FromCyclic3(type.$defs, type.$ref) : IsDependent(type) ? FromDependent3(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect3(type.allOf) : IsUnion(type) ? FromUnion6(type.anyOf) : IsObject2(type) ? FromObject6(type.properties) : _Object_({});
|
|
167845
168056
|
}
|
|
167846
168057
|
|
|
167847
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168058
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/partial/instantiate.mjs
|
|
167848
168059
|
function PartialAction(type, options) {
|
|
167849
168060
|
const result = CanInstantiate([type]) ? exports_memory.Update(FromType15(type), {}, options) : PartialDeferred(type, options);
|
|
167850
168061
|
return result;
|
|
@@ -167854,7 +168065,7 @@ function PartialInstantiate(context, state, type, options) {
|
|
|
167854
168065
|
return PartialAction(instantiatedType, options);
|
|
167855
168066
|
}
|
|
167856
168067
|
|
|
167857
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168068
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/pick.mjs
|
|
167858
168069
|
function PickDeferred(type, indexer, options = {}) {
|
|
167859
168070
|
return Deferred("Pick", [type, indexer], options);
|
|
167860
168071
|
}
|
|
@@ -167863,7 +168074,7 @@ function Pick(type, indexer_or_keys, options = {}) {
|
|
|
167863
168074
|
return PickAction(type, indexer, options);
|
|
167864
168075
|
}
|
|
167865
168076
|
|
|
167866
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168077
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/pick/from_type.mjs
|
|
167867
168078
|
function FromKeys2(properties2, keys) {
|
|
167868
168079
|
const result = exports_guard.Keys(properties2).reduce((result2, key) => {
|
|
167869
168080
|
return keys.includes(key) ? exports_memory.Assign(result2, { [key]: properties2[key] }) : result2;
|
|
@@ -167878,7 +168089,7 @@ function FromType16(type, indexer) {
|
|
|
167878
168089
|
return result;
|
|
167879
168090
|
}
|
|
167880
168091
|
|
|
167881
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168092
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/pick/instantiate.mjs
|
|
167882
168093
|
function PickAction(type, indexer, options) {
|
|
167883
168094
|
const result = CanInstantiate([type, indexer]) ? exports_memory.Update(FromType16(type, indexer), {}, options) : PickDeferred(type, indexer, options);
|
|
167884
168095
|
return result;
|
|
@@ -167889,22 +168100,21 @@ function PickInstantiate(context, state, type, indexer, options) {
|
|
|
167889
168100
|
return PickAction(instantiatedType, instantiatedIndexer, options);
|
|
167890
168101
|
}
|
|
167891
168102
|
|
|
167892
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168103
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/readonly_object.mjs
|
|
167893
168104
|
function ReadonlyObjectDeferred(type, options = {}) {
|
|
167894
168105
|
return Deferred("ReadonlyObject", [type], options);
|
|
167895
168106
|
}
|
|
167896
168107
|
function ReadonlyObject(type, options = {}) {
|
|
167897
168108
|
return ReadonlyObjectAction(type, options);
|
|
167898
168109
|
}
|
|
167899
|
-
var ReadonlyType = ReadonlyObject;
|
|
167900
168110
|
|
|
167901
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168111
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs
|
|
167902
168112
|
function FromArray4(type) {
|
|
167903
|
-
const result =
|
|
168113
|
+
const result = AddImmutable(_Array_(type));
|
|
167904
168114
|
return result;
|
|
167905
168115
|
}
|
|
167906
168116
|
|
|
167907
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168117
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly_object/from_cyclic.mjs
|
|
167908
168118
|
function FromCyclic4(defs, ref2) {
|
|
167909
168119
|
const target2 = CyclicTarget(defs, ref2);
|
|
167910
168120
|
const partial2 = FromType17(target2);
|
|
@@ -167912,39 +168122,47 @@ function FromCyclic4(defs, ref2) {
|
|
|
167912
168122
|
return result;
|
|
167913
168123
|
}
|
|
167914
168124
|
|
|
167915
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168125
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs
|
|
168126
|
+
function FromDependent4(if_, then_, else_) {
|
|
168127
|
+
const evaluated = EvaluateDependent(if_, then_, else_);
|
|
168128
|
+
const result = FromType17(evaluated);
|
|
168129
|
+
return result;
|
|
168130
|
+
}
|
|
168131
|
+
|
|
168132
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs
|
|
167916
168133
|
function FromIntersect4(types) {
|
|
167917
|
-
const
|
|
167918
|
-
|
|
168134
|
+
const evaluated = EvaluateIntersect(types);
|
|
168135
|
+
const result = FromType17(evaluated);
|
|
168136
|
+
return result;
|
|
167919
168137
|
}
|
|
167920
168138
|
|
|
167921
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167922
|
-
function
|
|
168139
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs
|
|
168140
|
+
function FromObject7(properties2) {
|
|
167923
168141
|
const mapped = exports_guard.Keys(properties2).reduce((result2, left) => {
|
|
167924
|
-
return { ...result2, [left]:
|
|
168142
|
+
return { ...result2, [left]: AddReadonly(properties2[left]) };
|
|
167925
168143
|
}, {});
|
|
167926
168144
|
const result = _Object_(mapped);
|
|
167927
168145
|
return result;
|
|
167928
168146
|
}
|
|
167929
168147
|
|
|
167930
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168148
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs
|
|
167931
168149
|
function FromTuple4(types) {
|
|
167932
|
-
const result =
|
|
168150
|
+
const result = AddImmutable(Tuple(types));
|
|
167933
168151
|
return result;
|
|
167934
168152
|
}
|
|
167935
168153
|
|
|
167936
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168154
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly_object/from_union.mjs
|
|
167937
168155
|
function FromUnion7(types) {
|
|
167938
168156
|
const result = types.map((type) => FromType17(type));
|
|
167939
168157
|
return Union(result);
|
|
167940
168158
|
}
|
|
167941
168159
|
|
|
167942
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168160
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs
|
|
167943
168161
|
function FromType17(type) {
|
|
167944
|
-
return IsArray2(type) ? FromArray4(type.items) : IsCyclic(type) ? FromCyclic4(type.$defs, type.$ref) : IsIntersect(type) ? FromIntersect4(type.allOf) : IsObject2(type) ?
|
|
168162
|
+
return IsArray2(type) ? FromArray4(type.items) : IsCyclic(type) ? FromCyclic4(type.$defs, type.$ref) : IsDependent(type) ? FromDependent4(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect4(type.allOf) : IsObject2(type) ? FromObject7(type.properties) : IsTuple(type) ? FromTuple4(type.items) : IsUnion(type) ? FromUnion7(type.anyOf) : type;
|
|
167945
168163
|
}
|
|
167946
168164
|
|
|
167947
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168165
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/readonly_object/instantiate.mjs
|
|
167948
168166
|
function ReadonlyObjectAction(type, options) {
|
|
167949
168167
|
const result = CanInstantiate([type]) ? exports_memory.Update(FromType17(type), {}, options) : ReadonlyObjectDeferred(type);
|
|
167950
168168
|
return result;
|
|
@@ -167954,12 +168172,12 @@ function ReadonlyObjectInstantiate(context, state, type, options) {
|
|
|
167954
168172
|
return ReadonlyObjectAction(instantiatedType, options);
|
|
167955
168173
|
}
|
|
167956
168174
|
|
|
167957
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168175
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/ref/instantiate.mjs
|
|
167958
168176
|
function RefInstantiate(context, state, type, ref2) {
|
|
167959
|
-
return ref2
|
|
168177
|
+
return state.visited.includes(ref2) ? type : (ref2 in context) ? InstantiateType(context, State(state["callstack"], [...state["visited"], ref2]), context[ref2]) : type;
|
|
167960
168178
|
}
|
|
167961
168179
|
|
|
167962
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168180
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/required/from_cyclic.mjs
|
|
167963
168181
|
function FromCyclic5(defs, ref2) {
|
|
167964
168182
|
const target2 = CyclicTarget(defs, ref2);
|
|
167965
168183
|
const partial2 = FromType18(target2);
|
|
@@ -167967,33 +168185,41 @@ function FromCyclic5(defs, ref2) {
|
|
|
167967
168185
|
return result;
|
|
167968
168186
|
}
|
|
167969
168187
|
|
|
167970
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168188
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/required/from_dependent.mjs
|
|
168189
|
+
function FromDependent5(if_, then_, else_) {
|
|
168190
|
+
const evaluated = EvaluateDependent(if_, then_, else_);
|
|
168191
|
+
const result = FromType18(evaluated);
|
|
168192
|
+
return result;
|
|
168193
|
+
}
|
|
168194
|
+
|
|
168195
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/required/from_intersect.mjs
|
|
167971
168196
|
function FromIntersect5(types) {
|
|
167972
|
-
const
|
|
167973
|
-
|
|
168197
|
+
const evaluated = EvaluateIntersect(types);
|
|
168198
|
+
const result = FromType18(evaluated);
|
|
168199
|
+
return result;
|
|
167974
168200
|
}
|
|
167975
168201
|
|
|
167976
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168202
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/required/from_union.mjs
|
|
167977
168203
|
function FromUnion8(types) {
|
|
167978
168204
|
const result = types.map((type) => FromType18(type));
|
|
167979
168205
|
return Union(result);
|
|
167980
168206
|
}
|
|
167981
168207
|
|
|
167982
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
167983
|
-
function
|
|
168208
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/required/from_object.mjs
|
|
168209
|
+
function FromObject8(properties2) {
|
|
167984
168210
|
const mapped = exports_guard.Keys(properties2).reduce((result2, left) => {
|
|
167985
|
-
return { ...result2, [left]:
|
|
168211
|
+
return { ...result2, [left]: RemoveOptional(properties2[left]) };
|
|
167986
168212
|
}, {});
|
|
167987
168213
|
const result = _Object_(mapped);
|
|
167988
168214
|
return result;
|
|
167989
168215
|
}
|
|
167990
168216
|
|
|
167991
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168217
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/required/from_type.mjs
|
|
167992
168218
|
function FromType18(type) {
|
|
167993
|
-
return IsCyclic(type) ? FromCyclic5(type.$defs, type.$ref) : IsIntersect(type) ? FromIntersect5(type.allOf) : IsUnion(type) ? FromUnion8(type.anyOf) : IsObject2(type) ?
|
|
168219
|
+
return IsCyclic(type) ? FromCyclic5(type.$defs, type.$ref) : IsDependent(type) ? FromDependent5(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect5(type.allOf) : IsUnion(type) ? FromUnion8(type.anyOf) : IsObject2(type) ? FromObject8(type.properties) : _Object_({});
|
|
167994
168220
|
}
|
|
167995
168221
|
|
|
167996
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168222
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/required.mjs
|
|
167997
168223
|
function RequiredDeferred(type, options = {}) {
|
|
167998
168224
|
return Deferred("Required", [type], options);
|
|
167999
168225
|
}
|
|
@@ -168001,7 +168227,7 @@ function Required(type, options = {}) {
|
|
|
168001
168227
|
return RequiredAction(type, options);
|
|
168002
168228
|
}
|
|
168003
168229
|
|
|
168004
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168230
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/required/instantiate.mjs
|
|
168005
168231
|
function RequiredAction(type, options) {
|
|
168006
168232
|
const result = CanInstantiate([type]) ? exports_memory.Update(FromType18(type), {}, options) : RequiredDeferred(type, options);
|
|
168007
168233
|
return result;
|
|
@@ -168011,7 +168237,7 @@ function RequiredInstantiate(context, state, type, options) {
|
|
|
168011
168237
|
return RequiredAction(instaniatedType, options);
|
|
168012
168238
|
}
|
|
168013
168239
|
|
|
168014
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168240
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/return_type.mjs
|
|
168015
168241
|
function ReturnTypeDeferred(type, options = {}) {
|
|
168016
168242
|
return Deferred("ReturnType", [type], options);
|
|
168017
168243
|
}
|
|
@@ -168019,7 +168245,7 @@ function ReturnType(type, options = {}) {
|
|
|
168019
168245
|
return ReturnTypeAction(type, options);
|
|
168020
168246
|
}
|
|
168021
168247
|
|
|
168022
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168248
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/return_type/instantiate.mjs
|
|
168023
168249
|
function ReturnTypeOperation(type) {
|
|
168024
168250
|
return IsFunction2(type) ? type["returnType"] : Never();
|
|
168025
168251
|
}
|
|
@@ -168032,7 +168258,25 @@ function ReturnTypeInstantiate(context, state, type, options = {}) {
|
|
|
168032
168258
|
return ReturnTypeAction(instantiatedType, options);
|
|
168033
168259
|
}
|
|
168034
168260
|
|
|
168035
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168261
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/with.mjs
|
|
168262
|
+
function WithDeferred(type, options) {
|
|
168263
|
+
return Deferred("With", [type, options], {});
|
|
168264
|
+
}
|
|
168265
|
+
function With2(type, options) {
|
|
168266
|
+
return WithAction(type, options);
|
|
168267
|
+
}
|
|
168268
|
+
|
|
168269
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/with/instantiate.mjs
|
|
168270
|
+
function WithAction(type, options) {
|
|
168271
|
+
const result = CanInstantiate([type]) ? exports_memory.Update(type, {}, options) : WithDeferred(type, options);
|
|
168272
|
+
return result;
|
|
168273
|
+
}
|
|
168274
|
+
function WithInstantiate(context, state, type, options) {
|
|
168275
|
+
const instaniatedType = InstantiateType(context, state, type);
|
|
168276
|
+
return WithAction(instaniatedType, options);
|
|
168277
|
+
}
|
|
168278
|
+
|
|
168279
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/rest/spread.mjs
|
|
168036
168280
|
function SpreadElement(type) {
|
|
168037
168281
|
const result = IsRest(type) ? IsTuple(type.items) ? RestSpread(type.items.items) : IsInfer(type.items) ? [type] : IsRef(type.items) ? [type] : [Never()] : [type];
|
|
168038
168282
|
return result;
|
|
@@ -168043,18 +168287,12 @@ function RestSpread(types) {
|
|
|
168043
168287
|
}, []);
|
|
168044
168288
|
return result;
|
|
168045
168289
|
}
|
|
168046
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168047
|
-
function
|
|
168048
|
-
return
|
|
168049
|
-
}
|
|
168050
|
-
function ModifierActions(type, readonly2, optional2) {
|
|
168051
|
-
return IsReadonlyRemoveAction(type) ? ModifierActions(type.type, "remove", optional2) : IsOptionalRemoveAction(type) ? ModifierActions(type.type, readonly2, "remove") : IsReadonlyAddAction(type) ? ModifierActions(type.type, "add", optional2) : IsOptionalAddAction(type) ? ModifierActions(type.type, readonly2, "add") : [type, readonly2, optional2];
|
|
168052
|
-
}
|
|
168053
|
-
function ApplyReadonly2(action, type) {
|
|
168054
|
-
return exports_guard.IsEqual(action, "remove") ? ReadonlyRemove(type) : exports_guard.IsEqual(action, "add") ? ReadonlyAdd(type) : type;
|
|
168290
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/instantiate.mjs
|
|
168291
|
+
function State(callstack, visited) {
|
|
168292
|
+
return { callstack, visited };
|
|
168055
168293
|
}
|
|
168056
|
-
function
|
|
168057
|
-
return exports_guard.
|
|
168294
|
+
function CanInstantiate(types) {
|
|
168295
|
+
return exports_guard.ShiftLeft(types, (left, right) => IsRef(left) ? false : CanInstantiate(right), () => true);
|
|
168058
168296
|
}
|
|
168059
168297
|
function InstantiateProperties(context, state, properties2) {
|
|
168060
168298
|
return exports_guard.Keys(properties2).reduce((result, key) => {
|
|
@@ -168069,70 +168307,77 @@ function InstantiateElements(context, state, types) {
|
|
|
168069
168307
|
function InstantiateTypes(context, state, types) {
|
|
168070
168308
|
return types.map((type) => InstantiateType(context, state, type));
|
|
168071
168309
|
}
|
|
168310
|
+
function WithModifiers(type, instantiatedType) {
|
|
168311
|
+
const withOptional = IsOptional(type) ? AddOptionalAction(instantiatedType, {}) : instantiatedType;
|
|
168312
|
+
const withReadonly = IsReadonly(type) ? AddReadonlyAction(withOptional, {}) : withOptional;
|
|
168313
|
+
const withImmutable = IsImmutable(type) ? AddImmutableAction(withReadonly, {}) : withReadonly;
|
|
168314
|
+
return withImmutable;
|
|
168315
|
+
}
|
|
168072
168316
|
function InstantiateDeferred(context, state, action, parameters, options) {
|
|
168073
|
-
return exports_guard.IsEqual(action, "
|
|
168074
|
-
}
|
|
168075
|
-
function
|
|
168076
|
-
const
|
|
168077
|
-
const
|
|
168078
|
-
const type = IsBase(modifiers[0]) ? modifiers[0].Clone() : modifiers[0];
|
|
168079
|
-
const instantiated = IsRef(type) ? RefInstantiate(context, state, type, type.$ref) : IsArray2(type) ? _Array_(InstantiateType(context, state, type.items), ArrayOptions(type)) : IsAsyncIterator2(type) ? AsyncIterator(InstantiateType(context, state, type.iteratorItems), AsyncIteratorOptions(type)) : IsCall(type) ? CallInstantiate(context, state, type.target, type.arguments) : IsConstructor2(type) ? Constructor(InstantiateTypes(context, state, type.parameters), InstantiateType(context, state, type.instanceType), ConstructorOptions(type)) : IsDeferred(type) ? InstantiateDeferred(context, state, type.action, type.parameters, type.options) : IsFunction2(type) ? _Function_(InstantiateTypes(context, state, type.parameters), InstantiateType(context, state, type.returnType), FunctionOptions(type)) : IsIntersect(type) ? Intersect(InstantiateTypes(context, state, type.allOf), IntersectOptions(type)) : IsIterator2(type) ? Iterator(InstantiateType(context, state, type.iteratorItems), IteratorOptions(type)) : IsObject2(type) ? _Object_(InstantiateProperties(context, state, type.properties), ObjectOptions(type)) : IsPromise(type) ? _Promise_(InstantiateType(context, state, type.item), PromiseOptions(type)) : IsRecord(type) ? RecordFromPattern(RecordPattern(type), InstantiateType(context, state, RecordValue(type))) : IsRest(type) ? Rest(InstantiateType(context, state, type.items)) : IsTuple(type) ? Tuple(InstantiateElements(context, state, type.items), TupleOptions(type)) : IsUnion(type) ? Union(InstantiateTypes(context, state, type.anyOf), UnionOptions(type)) : type;
|
|
168080
|
-
const withImmutable = immutable ? Immutable(instantiated) : instantiated;
|
|
168081
|
-
const withModifiers = ApplyReadonly2(modifiers[1], ApplyOptional2(modifiers[2], withImmutable));
|
|
168317
|
+
return exports_guard.IsEqual(action, "AddImmutable") ? AddImmutableInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "RemoveImmutable") ? RemoveImmutableInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "AddReadonly") ? AddReadonlyInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "RemoveReadonly") ? RemoveReadonlyInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "AddOptional") ? AddOptionalInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "RemoveOptional") ? RemoveOptionalInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "Capitalize") ? CapitalizeInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "Conditional") ? ConditionalInstantiate(context, state, parameters[0], parameters[1], parameters[2], parameters[3], options) : exports_guard.IsEqual(action, "ConstructorParameters") ? ConstructorParametersInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "Evaluate") ? EvaluateInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "Exclude") ? ExcludeInstantiate(context, state, parameters[0], parameters[1], options) : exports_guard.IsEqual(action, "Extract") ? ExtractInstantiate(context, state, parameters[0], parameters[1], options) : exports_guard.IsEqual(action, "Index") ? IndexInstantiate(context, state, parameters[0], parameters[1], options) : exports_guard.IsEqual(action, "InstanceType") ? InstanceTypeInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "Interface") ? InterfaceInstantiate(context, state, parameters[0], parameters[1], options) : exports_guard.IsEqual(action, "KeyOf") ? KeyOfInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "Lowercase") ? LowercaseInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "Mapped") ? MappedInstantiate(context, state, parameters[0], parameters[1], parameters[2], parameters[3], options) : exports_guard.IsEqual(action, "Module") ? ModuleInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "NonNullable") ? NonNullableInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "Pick") ? PickInstantiate(context, state, parameters[0], parameters[1], options) : exports_guard.IsEqual(action, "Parameters") ? ParametersInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "Partial") ? PartialInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "Omit") ? OmitInstantiate(context, state, parameters[0], parameters[1], options) : exports_guard.IsEqual(action, "ReadonlyObject") ? ReadonlyObjectInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "Record") ? RecordInstantiate(context, state, parameters[0], parameters[1], options) : exports_guard.IsEqual(action, "Required") ? RequiredInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "ReturnType") ? ReturnTypeInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "TemplateLiteral") ? TemplateLiteralInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "Uncapitalize") ? UncapitalizeInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "Uppercase") ? UppercaseInstantiate(context, state, parameters[0], options) : exports_guard.IsEqual(action, "With") ? WithInstantiate(context, state, parameters[0], parameters[1]) : Deferred(action, parameters, options);
|
|
168318
|
+
}
|
|
168319
|
+
function InstantiateImmediate(context, state, type) {
|
|
168320
|
+
const instantiatedType = IsRef(type) ? RefInstantiate(context, state, type, type.$ref) : IsArray2(type) ? _Array_(InstantiateType(context, state, type.items), ArrayOptions(type)) : IsCall(type) ? CallInstantiate(context, state, type.target, type.arguments) : IsConstructor2(type) ? Constructor(InstantiateTypes(context, state, type.parameters), InstantiateType(context, state, type.instanceType), ConstructorOptions(type)) : IsFunction2(type) ? _Function_(InstantiateTypes(context, state, type.parameters), InstantiateType(context, state, type.returnType), FunctionOptions(type)) : IsDependent(type) ? Dependent(InstantiateType(context, state, type.if), InstantiateType(context, state, type.then), InstantiateType(context, state, type.else), DependentOptions(type)) : IsIntersect(type) ? Intersect(InstantiateTypes(context, state, type.allOf), IntersectOptions(type)) : IsObject2(type) ? _Object_(InstantiateProperties(context, state, type.properties), ObjectOptions(type)) : IsRecord(type) ? RecordFromPattern(RecordPattern(type), InstantiateType(context, state, RecordValue(type))) : IsRest(type) ? Rest(InstantiateType(context, state, type.items)) : IsTuple(type) ? Tuple(InstantiateElements(context, state, type.items), TupleOptions(type)) : IsUnion(type) ? Union(InstantiateTypes(context, state, type.anyOf), UnionOptions(type)) : type;
|
|
168321
|
+
const withModifiers = WithModifiers(type, instantiatedType);
|
|
168082
168322
|
return withModifiers;
|
|
168083
168323
|
}
|
|
168324
|
+
function InstantiateType(context, state, type) {
|
|
168325
|
+
const result = IsDeferred(type) ? InstantiateDeferred(context, state, type.action, type.parameters, type.options) : InstantiateImmediate(context, state, type);
|
|
168326
|
+
return result;
|
|
168327
|
+
}
|
|
168084
168328
|
function Instantiate(context, type) {
|
|
168085
|
-
return InstantiateType(context,
|
|
168329
|
+
return InstantiateType(context, State([], []), type);
|
|
168086
168330
|
}
|
|
168087
168331
|
|
|
168088
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168089
|
-
function
|
|
168090
|
-
return
|
|
168332
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs
|
|
168333
|
+
function AddImmutableOperation(type) {
|
|
168334
|
+
return exports_memory.Update(type, { "~immutable": true }, {});
|
|
168091
168335
|
}
|
|
168092
|
-
function
|
|
168093
|
-
const result =
|
|
168336
|
+
function AddImmutableAction(type, options) {
|
|
168337
|
+
const result = exports_memory.Update(AddImmutableOperation(type), {}, options);
|
|
168094
168338
|
return result;
|
|
168095
168339
|
}
|
|
168096
|
-
function
|
|
168340
|
+
function AddImmutableInstantiate(context, state, type, options) {
|
|
168097
168341
|
const instantiatedType = InstantiateType(context, state, type);
|
|
168098
|
-
return
|
|
168342
|
+
return AddImmutableAction(instantiatedType, options);
|
|
168099
168343
|
}
|
|
168100
168344
|
|
|
168101
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168102
|
-
function
|
|
168103
|
-
return Deferred("
|
|
168345
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/_add_immutable.mjs
|
|
168346
|
+
function AddImmutableDeferred(type, options = {}) {
|
|
168347
|
+
return Deferred("AddImmutable", [type], options);
|
|
168104
168348
|
}
|
|
168105
|
-
function
|
|
168106
|
-
return
|
|
168349
|
+
function AddImmutable(type, options = {}) {
|
|
168350
|
+
return AddImmutableAction(type, options);
|
|
168107
168351
|
}
|
|
168108
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168352
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/evaluate.mjs
|
|
168109
168353
|
function EvaluateDeferred(type, options = {}) {
|
|
168110
168354
|
return Deferred("Evaluate", [type], options);
|
|
168111
168355
|
}
|
|
168112
168356
|
function Evaluate(type, options = {}) {
|
|
168113
168357
|
return EvaluateAction(type, options);
|
|
168114
168358
|
}
|
|
168115
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168116
|
-
function ModuleDeferred(
|
|
168117
|
-
return Deferred("Module", [
|
|
168359
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/action/module.mjs
|
|
168360
|
+
function ModuleDeferred(declarations, options = {}) {
|
|
168361
|
+
return Deferred("Module", [declarations], options);
|
|
168118
168362
|
}
|
|
168119
|
-
function Module2(
|
|
168120
|
-
return
|
|
168363
|
+
function Module2(declarations, options = {}) {
|
|
168364
|
+
return ModuleInstantiate({}, State([], []), declarations, options);
|
|
168121
168365
|
}
|
|
168122
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168366
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/type/script/script.mjs
|
|
168123
168367
|
function Script2(...args) {
|
|
168124
|
-
const [context, input,
|
|
168125
|
-
2: (script,
|
|
168126
|
-
3: (context2, script,
|
|
168368
|
+
const [context, input, options] = exports_arguments.Match(args, {
|
|
168369
|
+
2: (script, options2) => exports_guard.IsString(script) ? [{}, script, options2] : [script, options2, {}],
|
|
168370
|
+
3: (context2, script, options2) => [context2, script, options2],
|
|
168127
168371
|
1: (script) => [{}, script, {}]
|
|
168128
168372
|
});
|
|
168129
168373
|
const result = Script(input);
|
|
168130
|
-
const parsed = exports_guard.IsArray(result) && exports_guard.IsEqual(result.length, 2) ? InstantiateType(context,
|
|
168131
|
-
return exports_memory.Update(parsed, {},
|
|
168374
|
+
const parsed = exports_guard.IsArray(result) && exports_guard.IsEqual(result.length, 2) ? InstantiateType(context, State([], []), result[0]) : Never();
|
|
168375
|
+
return exports_memory.Update(parsed, {}, options);
|
|
168132
168376
|
}
|
|
168133
|
-
// ../../node_modules/.bun/typebox@1.1
|
|
168377
|
+
// ../../node_modules/.bun/typebox@1.3.1/node_modules/typebox/build/typebox.mjs
|
|
168134
168378
|
var exports_typebox = {};
|
|
168135
168379
|
__export(exports_typebox, {
|
|
168380
|
+
With: () => With2,
|
|
168136
168381
|
Void: () => Void,
|
|
168137
168382
|
Uppercase: () => Uppercase,
|
|
168138
168383
|
Unsafe: () => Unsafe,
|
|
@@ -168155,15 +168400,12 @@ __export(exports_typebox, {
|
|
|
168155
168400
|
RecordPattern: () => RecordPattern,
|
|
168156
168401
|
RecordKey: () => RecordKey,
|
|
168157
168402
|
Record: () => Record,
|
|
168158
|
-
ReadonlyType: () => ReadonlyType,
|
|
168159
168403
|
ReadonlyObject: () => ReadonlyObject,
|
|
168160
168404
|
Readonly: () => Readonly,
|
|
168161
|
-
Promise: () => _Promise_,
|
|
168162
168405
|
Pick: () => Pick,
|
|
168163
168406
|
Partial: () => Partial,
|
|
168164
168407
|
Parameters: () => Parameters,
|
|
168165
168408
|
Parameter: () => Parameter,
|
|
168166
|
-
Options: () => Options2,
|
|
168167
168409
|
Optional: () => Optional,
|
|
168168
168410
|
Omit: () => Omit,
|
|
168169
168411
|
Object: () => _Object_,
|
|
@@ -168172,11 +168414,10 @@ __export(exports_typebox, {
|
|
|
168172
168414
|
NonNullable: () => NonNullable,
|
|
168173
168415
|
Never: () => Never,
|
|
168174
168416
|
Module: () => Module2,
|
|
168175
|
-
Mapped: () =>
|
|
168417
|
+
Mapped: () => Mapped,
|
|
168176
168418
|
Lowercase: () => Lowercase,
|
|
168177
168419
|
Literal: () => Literal,
|
|
168178
168420
|
KeyOf: () => KeyOf2,
|
|
168179
|
-
Iterator: () => Iterator,
|
|
168180
168421
|
IsVoid: () => IsVoid,
|
|
168181
168422
|
IsUnsafe: () => IsUnsafe,
|
|
168182
168423
|
IsUnknown: () => IsUnknown,
|
|
@@ -168186,23 +168427,21 @@ __export(exports_typebox, {
|
|
|
168186
168427
|
IsThis: () => IsThis,
|
|
168187
168428
|
IsTemplateLiteral: () => IsTemplateLiteral,
|
|
168188
168429
|
IsSymbol: () => IsSymbol2,
|
|
168189
|
-
IsString: () =>
|
|
168430
|
+
IsString: () => IsString3,
|
|
168190
168431
|
IsSchema: () => IsSchema,
|
|
168191
168432
|
IsRest: () => IsRest,
|
|
168192
168433
|
IsRefine: () => IsRefine,
|
|
168193
168434
|
IsRef: () => IsRef,
|
|
168194
168435
|
IsRecord: () => IsRecord,
|
|
168195
168436
|
IsReadonly: () => IsReadonly,
|
|
168196
|
-
IsPromise: () => IsPromise,
|
|
168197
168437
|
IsParameter: () => IsParameter,
|
|
168198
168438
|
IsOptional: () => IsOptional,
|
|
168199
168439
|
IsObject: () => IsObject2,
|
|
168200
|
-
IsNumber: () =>
|
|
168440
|
+
IsNumber: () => IsNumber3,
|
|
168201
168441
|
IsNull: () => IsNull2,
|
|
168202
168442
|
IsNever: () => IsNever,
|
|
168203
168443
|
IsLiteral: () => IsLiteral,
|
|
168204
168444
|
IsKind: () => IsKind,
|
|
168205
|
-
IsIterator: () => IsIterator2,
|
|
168206
168445
|
IsIntersect: () => IsIntersect,
|
|
168207
168446
|
IsInteger: () => IsInteger2,
|
|
168208
168447
|
IsInfer: () => IsInfer,
|
|
@@ -168211,14 +168450,13 @@ __export(exports_typebox, {
|
|
|
168211
168450
|
IsGeneric: () => IsGeneric,
|
|
168212
168451
|
IsFunction: () => IsFunction2,
|
|
168213
168452
|
IsEnum: () => IsEnum,
|
|
168453
|
+
IsDependent: () => IsDependent,
|
|
168214
168454
|
IsCyclic: () => IsCyclic,
|
|
168215
168455
|
IsConstructor: () => IsConstructor2,
|
|
168216
168456
|
IsCodec: () => IsCodec,
|
|
168217
168457
|
IsCall: () => IsCall,
|
|
168218
|
-
IsBoolean: () =>
|
|
168458
|
+
IsBoolean: () => IsBoolean3,
|
|
168219
168459
|
IsBigInt: () => IsBigInt2,
|
|
168220
|
-
IsBase: () => IsBase,
|
|
168221
|
-
IsAsyncIterator: () => IsAsyncIterator2,
|
|
168222
168460
|
IsArray: () => IsArray2,
|
|
168223
168461
|
IsAny: () => IsAny,
|
|
168224
168462
|
Intersect: () => Intersect,
|
|
@@ -168234,12 +168472,13 @@ __export(exports_typebox, {
|
|
|
168234
168472
|
Function: () => _Function_,
|
|
168235
168473
|
Extract: () => Extract,
|
|
168236
168474
|
ExtendsResult: () => exports_result,
|
|
168237
|
-
Extends: () =>
|
|
168475
|
+
Extends: () => Extends,
|
|
168238
168476
|
Exclude: () => Exclude,
|
|
168239
168477
|
Evaluate: () => Evaluate,
|
|
168240
168478
|
Enum: () => Enum,
|
|
168241
168479
|
EncodeBuilder: () => EncodeBuilder,
|
|
168242
168480
|
Encode: () => Encode,
|
|
168481
|
+
Dependent: () => Dependent,
|
|
168243
168482
|
DecodeBuilder: () => DecodeBuilder,
|
|
168244
168483
|
Decode: () => Decode,
|
|
168245
168484
|
Cyclic: () => Cyclic,
|
|
@@ -168251,9 +168490,6 @@ __export(exports_typebox, {
|
|
|
168251
168490
|
Call: () => Call,
|
|
168252
168491
|
Boolean: () => Boolean2,
|
|
168253
168492
|
BigInt: () => BigInt2,
|
|
168254
|
-
Base: () => Base,
|
|
168255
|
-
Awaited: () => Awaited,
|
|
168256
|
-
AsyncIterator: () => AsyncIterator,
|
|
168257
168493
|
Array: () => _Array_,
|
|
168258
168494
|
Any: () => Any
|
|
168259
168495
|
});
|
|
@@ -169187,18 +169423,18 @@ function updateMemoryStatus(db, id, status) {
|
|
|
169187
169423
|
getUpdateMemoryStatusStatement(db).run(status, Date.now(), id);
|
|
169188
169424
|
}
|
|
169189
169425
|
function mergeMetadataJson(existing, patch) {
|
|
169190
|
-
let
|
|
169426
|
+
let base = {};
|
|
169191
169427
|
if (existing) {
|
|
169192
169428
|
try {
|
|
169193
169429
|
const parsed = JSON.parse(existing);
|
|
169194
169430
|
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
|
|
169195
|
-
|
|
169431
|
+
base = parsed;
|
|
169196
169432
|
}
|
|
169197
169433
|
} catch {
|
|
169198
|
-
|
|
169434
|
+
base = {};
|
|
169199
169435
|
}
|
|
169200
169436
|
}
|
|
169201
|
-
return JSON.stringify({ ...
|
|
169437
|
+
return JSON.stringify({ ...base, ...patch });
|
|
169202
169438
|
}
|
|
169203
169439
|
function updateMemoryContent(db, id, content, normalizedHash) {
|
|
169204
169440
|
const memory2 = getMemoryById(db, id);
|
|
@@ -170538,11 +170774,11 @@ function getAutoSearchHintDecisions(db, sessionId) {
|
|
|
170538
170774
|
const row = db.prepare("SELECT auto_search_hint_decisions FROM session_meta WHERE session_id = ?").get(sessionId);
|
|
170539
170775
|
return parseJsonArray(row?.auto_search_hint_decisions, isValidAutoSearchHintDecision);
|
|
170540
170776
|
}
|
|
170541
|
-
function casUpdateJsonArrayColumn(db, sessionId, column, validator, mutate,
|
|
170777
|
+
function casUpdateJsonArrayColumn(db, sessionId, column, validator, mutate, options) {
|
|
170542
170778
|
if (column !== "note_nudge_anchors" && column !== "auto_search_hint_decisions") {
|
|
170543
170779
|
throw new Error(`casUpdateJsonArrayColumn: refusing unknown column "${column}"`);
|
|
170544
170780
|
}
|
|
170545
|
-
if (
|
|
170781
|
+
if (options?.ensureRow === false) {
|
|
170546
170782
|
const exists = db.prepare("SELECT 1 FROM session_meta WHERE session_id = ?").get(sessionId);
|
|
170547
170783
|
if (!exists)
|
|
170548
170784
|
return true;
|
|
@@ -171107,22 +171343,22 @@ function buildStatusClause(status) {
|
|
|
171107
171343
|
params: statuses
|
|
171108
171344
|
};
|
|
171109
171345
|
}
|
|
171110
|
-
function getNotes(db,
|
|
171346
|
+
function getNotes(db, options = {}) {
|
|
171111
171347
|
const clauses = [];
|
|
171112
171348
|
const params = [];
|
|
171113
|
-
if (
|
|
171349
|
+
if (options.sessionId !== undefined) {
|
|
171114
171350
|
clauses.push("session_id = ?");
|
|
171115
|
-
params.push(
|
|
171351
|
+
params.push(options.sessionId);
|
|
171116
171352
|
}
|
|
171117
|
-
if (
|
|
171353
|
+
if (options.projectPath !== undefined) {
|
|
171118
171354
|
clauses.push("project_path = ?");
|
|
171119
|
-
params.push(
|
|
171355
|
+
params.push(options.projectPath);
|
|
171120
171356
|
}
|
|
171121
|
-
if (
|
|
171357
|
+
if (options.type !== undefined) {
|
|
171122
171358
|
clauses.push("type = ?");
|
|
171123
|
-
params.push(
|
|
171359
|
+
params.push(options.type);
|
|
171124
171360
|
}
|
|
171125
|
-
const statusClause = buildStatusClause(
|
|
171361
|
+
const statusClause = buildStatusClause(options.status);
|
|
171126
171362
|
if (statusClause) {
|
|
171127
171363
|
clauses.push(statusClause.sql);
|
|
171128
171364
|
params.push(...statusClause.params);
|
|
@@ -171130,9 +171366,9 @@ function getNotes(db, options3 = {}) {
|
|
|
171130
171366
|
const where = clauses.length > 0 ? ` WHERE ${clauses.join(" AND ")}` : "";
|
|
171131
171367
|
return db.prepare(`SELECT * FROM notes${where} ORDER BY created_at ASC, id ASC`).all(...params).filter(isNoteRow).map(toNote);
|
|
171132
171368
|
}
|
|
171133
|
-
function addNote(db, type,
|
|
171369
|
+
function addNote(db, type, options) {
|
|
171134
171370
|
const now = Date.now();
|
|
171135
|
-
const result = type === "session" ? db.prepare("INSERT INTO notes (type, status, content, session_id, created_at, updated_at, harness, anchor_ordinal) VALUES ('session', 'active', ?, ?, ?, ?, ?, ?) RETURNING *").get(
|
|
171371
|
+
const result = type === "session" ? db.prepare("INSERT INTO notes (type, status, content, session_id, created_at, updated_at, harness, anchor_ordinal) VALUES ('session', 'active', ?, ?, ?, ?, ?, ?) RETURNING *").get(options.content, options.sessionId, now, now, getHarness(), options.anchorOrdinal ?? null) : db.prepare("INSERT INTO notes (type, status, content, session_id, project_path, surface_condition, created_at, updated_at, harness, anchor_ordinal) VALUES ('smart', 'pending', ?, ?, ?, ?, ?, ?, ?, ?) RETURNING *").get(options.content, options.sessionId ?? null, options.projectPath, options.surfaceCondition, now, now, getHarness(), options.anchorOrdinal ?? null);
|
|
171136
171372
|
if (!isNoteRow(result)) {
|
|
171137
171373
|
throw new Error("[notes] failed to insert note");
|
|
171138
171374
|
}
|
|
@@ -173000,21 +173236,21 @@ var GIT_TIMEOUT_MS3 = 1e4;
|
|
|
173000
173236
|
var DEFAULT_MAX_COMMITS = 5000;
|
|
173001
173237
|
var RECORD_SEPARATOR = "\x1E";
|
|
173002
173238
|
var FIELD_SEPARATOR = "\x1F";
|
|
173003
|
-
async function readGitCommits(directory,
|
|
173004
|
-
const revision =
|
|
173239
|
+
async function readGitCommits(directory, options = {}) {
|
|
173240
|
+
const revision = options.branch ?? "HEAD";
|
|
173005
173241
|
if (revision.startsWith("-")) {
|
|
173006
173242
|
throw new Error(`readGitCommits: refusing revision that looks like an option: "${revision}"`);
|
|
173007
173243
|
}
|
|
173008
|
-
const projectLabel =
|
|
173244
|
+
const projectLabel = options.projectIdentity ?? "<project>";
|
|
173009
173245
|
const args = [
|
|
173010
173246
|
"log",
|
|
173011
173247
|
revision,
|
|
173012
173248
|
"--no-merges",
|
|
173013
|
-
`--max-count=${
|
|
173249
|
+
`--max-count=${options.maxCommits ?? DEFAULT_MAX_COMMITS}`,
|
|
173014
173250
|
`--format=%H${FIELD_SEPARATOR}%s${FIELD_SEPARATOR}%ae${FIELD_SEPARATOR}%ct${FIELD_SEPARATOR}%b${RECORD_SEPARATOR}`
|
|
173015
173251
|
];
|
|
173016
|
-
if (
|
|
173017
|
-
const iso = new Date(
|
|
173252
|
+
if (options.sinceMs !== undefined && options.sinceMs > 0) {
|
|
173253
|
+
const iso = new Date(options.sinceMs).toISOString();
|
|
173018
173254
|
args.push(`--since=${iso}`);
|
|
173019
173255
|
}
|
|
173020
173256
|
let stdout;
|
|
@@ -173032,7 +173268,7 @@ async function readGitCommits(directory, options3 = {}) {
|
|
|
173032
173268
|
return [];
|
|
173033
173269
|
}
|
|
173034
173270
|
if (stdout.trim().length === 0) {
|
|
173035
|
-
log(`[git-commits] readGitCommits returned empty stdout for ${projectLabel} (sinceMs=${
|
|
173271
|
+
log(`[git-commits] readGitCommits returned empty stdout for ${projectLabel} (sinceMs=${options.sinceMs ?? "none"} args=${args.slice(0, 4).join(" ")})`);
|
|
173036
173272
|
}
|
|
173037
173273
|
return parseGitLogOutput(stdout);
|
|
173038
173274
|
}
|
|
@@ -173084,7 +173320,7 @@ var EMBED_MAX_PER_SWEEP = 500;
|
|
|
173084
173320
|
var EMBED_SWEEP_MAX_WALL_CLOCK_MS = 5 * 60 * 1000;
|
|
173085
173321
|
var indexInProgress = new Set;
|
|
173086
173322
|
var embedInProgress = new Set;
|
|
173087
|
-
async function indexCommitsForProject(db, projectPath, directory,
|
|
173323
|
+
async function indexCommitsForProject(db, projectPath, directory, options) {
|
|
173088
173324
|
const result = {
|
|
173089
173325
|
scanned: 0,
|
|
173090
173326
|
inserted: 0,
|
|
@@ -173099,15 +173335,15 @@ async function indexCommitsForProject(db, projectPath, directory, options3) {
|
|
|
173099
173335
|
indexInProgress.add(projectPath);
|
|
173100
173336
|
try {
|
|
173101
173337
|
const latestIndexed = getLatestIndexedCommitTimeMs(db, projectPath);
|
|
173102
|
-
const sinceMs = latestIndexed !== null ? Math.max(latestIndexed - 60000, Date.now() -
|
|
173338
|
+
const sinceMs = latestIndexed !== null ? Math.max(latestIndexed - 60000, Date.now() - options.sinceDays * MS_PER_DAY) : Date.now() - options.sinceDays * MS_PER_DAY;
|
|
173103
173339
|
const commits = await readGitCommits(directory, {
|
|
173104
173340
|
sinceMs,
|
|
173105
|
-
maxCommits:
|
|
173341
|
+
maxCommits: options.maxCommits,
|
|
173106
173342
|
projectIdentity: projectPath
|
|
173107
173343
|
});
|
|
173108
173344
|
result.scanned = commits.length;
|
|
173109
173345
|
if (commits.length === 0) {
|
|
173110
|
-
result.evicted = enforceProjectCap(db, projectPath,
|
|
173346
|
+
result.evicted = enforceProjectCap(db, projectPath, options.maxCommits);
|
|
173111
173347
|
log(`[git-commits] no new commits for ${projectPath} (sinceMs=${sinceMs} latestIndexed=${latestIndexed ?? "none"} evicted=${result.evicted})`);
|
|
173112
173348
|
return result;
|
|
173113
173349
|
}
|
|
@@ -173115,10 +173351,10 @@ async function indexCommitsForProject(db, projectPath, directory, options3) {
|
|
|
173115
173351
|
const upsert = upsertCommits(db, projectPath, commits);
|
|
173116
173352
|
result.inserted = upsert.inserted;
|
|
173117
173353
|
result.updated = upsert.updated;
|
|
173118
|
-
result.evicted = enforceProjectCap(db, projectPath,
|
|
173354
|
+
result.evicted = enforceProjectCap(db, projectPath, options.maxCommits);
|
|
173119
173355
|
const snapshot = getProjectEmbeddingSnapshot(projectPath);
|
|
173120
|
-
if (
|
|
173121
|
-
log(`[git-commits] indexed ${projectPath}: scanned=${result.scanned} inserted=${result.inserted} updated=${result.updated} evicted=${result.evicted} embedded=0 (embedding skipped: skipEmbed=${
|
|
173356
|
+
if (options.skipEmbed || !snapshot?.gitCommitEnabled) {
|
|
173357
|
+
log(`[git-commits] indexed ${projectPath}: scanned=${result.scanned} inserted=${result.inserted} updated=${result.updated} evicted=${result.evicted} embedded=0 (embedding skipped: skipEmbed=${options.skipEmbed === true} gitCommitEnabled=${snapshot?.gitCommitEnabled === true})`);
|
|
173122
173358
|
return result;
|
|
173123
173359
|
}
|
|
173124
173360
|
result.embedded = await embedUnembeddedCommits(db, projectPath);
|
|
@@ -173233,14 +173469,14 @@ function clamp01(value) {
|
|
|
173233
173469
|
return 0;
|
|
173234
173470
|
return Math.min(1, Math.max(0, value));
|
|
173235
173471
|
}
|
|
173236
|
-
function searchGitCommitsSync(db, projectPath, query,
|
|
173472
|
+
function searchGitCommitsSync(db, projectPath, query, options) {
|
|
173237
173473
|
const trimmed = query.trim();
|
|
173238
|
-
if (trimmed.length === 0 ||
|
|
173474
|
+
if (trimmed.length === 0 || options.limit <= 0)
|
|
173239
173475
|
return [];
|
|
173240
|
-
const semanticWeight =
|
|
173241
|
-
const ftsWeight =
|
|
173242
|
-
const singleSourcePenalty =
|
|
173243
|
-
const fetchLimit = Math.max(
|
|
173476
|
+
const semanticWeight = options.semanticWeight ?? 0.7;
|
|
173477
|
+
const ftsWeight = options.ftsWeight ?? 0.3;
|
|
173478
|
+
const singleSourcePenalty = options.singleSourcePenalty ?? 0.8;
|
|
173479
|
+
const fetchLimit = Math.max(options.limit * 3, 30);
|
|
173244
173480
|
const ftsCandidates = [];
|
|
173245
173481
|
const sanitized = sanitizeFtsQuery(trimmed);
|
|
173246
173482
|
if (sanitized.length > 0) {
|
|
@@ -173262,10 +173498,10 @@ function searchGitCommitsSync(db, projectPath, query, options3) {
|
|
|
173262
173498
|
ftsScores.set(commit.sha, 1 / (rank + 1));
|
|
173263
173499
|
});
|
|
173264
173500
|
const semanticScores = new Map;
|
|
173265
|
-
if (
|
|
173266
|
-
const embeddings = loadProjectCommitEmbeddings(db, projectPath,
|
|
173501
|
+
if (options.queryEmbedding && options.queryModelId && options.queryModelId !== "off") {
|
|
173502
|
+
const embeddings = loadProjectCommitEmbeddings(db, projectPath, options.queryModelId);
|
|
173267
173503
|
for (const [sha, embedding2] of embeddings.entries()) {
|
|
173268
|
-
const similarity = clamp01(cosineSimilarity(
|
|
173504
|
+
const similarity = clamp01(cosineSimilarity(options.queryEmbedding, embedding2));
|
|
173269
173505
|
if (similarity > 0) {
|
|
173270
173506
|
semanticScores.set(sha, similarity);
|
|
173271
173507
|
}
|
|
@@ -173308,7 +173544,7 @@ function searchGitCommitsSync(db, projectPath, query, options3) {
|
|
|
173308
173544
|
return right.score - left.score;
|
|
173309
173545
|
return right.commit.committedAtMs - left.commit.committedAtMs;
|
|
173310
173546
|
});
|
|
173311
|
-
return results.slice(0,
|
|
173547
|
+
return results.slice(0, options.limit);
|
|
173312
173548
|
}
|
|
173313
173549
|
// ../plugin/src/features/magic-context/literal-probes.ts
|
|
173314
173550
|
var MAX_PROBES = 5;
|
|
@@ -173953,37 +174189,37 @@ function resolveSources(sources) {
|
|
|
173953
174189
|
}
|
|
173954
174190
|
return set2;
|
|
173955
174191
|
}
|
|
173956
|
-
async function unifiedSearch(db, sessionId, projectPath, query,
|
|
174192
|
+
async function unifiedSearch(db, sessionId, projectPath, query, options = {}) {
|
|
173957
174193
|
const trimmedQuery = query.trim();
|
|
173958
174194
|
if (trimmedQuery.length === 0) {
|
|
173959
174195
|
return [];
|
|
173960
174196
|
}
|
|
173961
|
-
const limit = normalizeLimit2(
|
|
174197
|
+
const limit = normalizeLimit2(options.limit);
|
|
173962
174198
|
const tierLimit = Math.max(limit * 3, DEFAULT_UNIFIED_SEARCH_LIMIT);
|
|
173963
|
-
const embeddingEnabled =
|
|
173964
|
-
const embedQuery =
|
|
173965
|
-
const isEmbeddingRuntimeEnabled =
|
|
173966
|
-
const gitCommitsEnabled =
|
|
173967
|
-
const activeSources = resolveSources(
|
|
173968
|
-
const memoryFeatureEnabled =
|
|
174199
|
+
const embeddingEnabled = options.embeddingEnabled ?? true;
|
|
174200
|
+
const embedQuery = options.embedQuery ?? embedText;
|
|
174201
|
+
const isEmbeddingRuntimeEnabled = options.isEmbeddingRuntimeEnabled ?? isEmbeddingEnabled;
|
|
174202
|
+
const gitCommitsEnabled = options.gitCommitsEnabled ?? false;
|
|
174203
|
+
const activeSources = resolveSources(options.sources);
|
|
174204
|
+
const memoryFeatureEnabled = options.memoryEnabled ?? true;
|
|
173969
174205
|
const runMemory = activeSources.has("memory") && memoryFeatureEnabled;
|
|
173970
174206
|
const runMessages = activeSources.has("message");
|
|
173971
174207
|
const runGitCommits = activeSources.has("git_commit") && gitCommitsEnabled;
|
|
173972
174208
|
const runPrimers = activeSources.has("primer") && memoryFeatureEnabled;
|
|
173973
174209
|
const runCompartmentChunks = runMessages && memoryFeatureEnabled && embeddingEnabled;
|
|
173974
174210
|
const needsEmbedding = (runMemory || runGitCommits || runCompartmentChunks || runPrimers) && embeddingEnabled && isEmbeddingRuntimeEnabled();
|
|
173975
|
-
const queryEmbeddingPromise = needsEmbedding ? embedQuery(trimmedQuery,
|
|
174211
|
+
const queryEmbeddingPromise = needsEmbedding ? embedQuery(trimmedQuery, options.signal).catch((error51) => {
|
|
173976
174212
|
log(`[search] query embedding failed: ${error51 instanceof Error ? error51.message : String(error51)}`);
|
|
173977
174213
|
return null;
|
|
173978
174214
|
}) : Promise.resolve(null);
|
|
173979
174215
|
await Promise.resolve();
|
|
173980
|
-
const messageProbes =
|
|
174216
|
+
const messageProbes = options.explicitSearch ? extractLiteralProbes(trimmedQuery) : [];
|
|
173981
174217
|
const messageResults = runMessages ? searchMessages({
|
|
173982
174218
|
db,
|
|
173983
174219
|
sessionId,
|
|
173984
174220
|
query: trimmedQuery,
|
|
173985
174221
|
limit: tierLimit,
|
|
173986
|
-
maxOrdinal:
|
|
174222
|
+
maxOrdinal: options.maxMessageOrdinal,
|
|
173987
174223
|
probes: messageProbes
|
|
173988
174224
|
}) : [];
|
|
173989
174225
|
const queryEmbedding = await queryEmbeddingPromise;
|
|
@@ -173997,7 +174233,7 @@ async function unifiedSearch(db, sessionId, projectPath, query, options3 = {}) {
|
|
|
173997
174233
|
projectPath,
|
|
173998
174234
|
queryEmbedding,
|
|
173999
174235
|
limit: tierLimit,
|
|
174000
|
-
maxOrdinal:
|
|
174236
|
+
maxOrdinal: options.maxMessageOrdinal,
|
|
174001
174237
|
modelId: chunkModelId && chunkModelId !== "off" ? chunkModelId : null
|
|
174002
174238
|
}) : [];
|
|
174003
174239
|
const messageLikeResults = mergeMessageAndCompartmentResults({
|
|
@@ -174015,7 +174251,7 @@ async function unifiedSearch(db, sessionId, projectPath, query, options3 = {}) {
|
|
|
174015
174251
|
queryEmbedding,
|
|
174016
174252
|
queryModelId: embeddingModelId && embeddingModelId !== "off" ? embeddingModelId : null,
|
|
174017
174253
|
workspace,
|
|
174018
|
-
visibleMemoryIds:
|
|
174254
|
+
visibleMemoryIds: options.visibleMemoryIds
|
|
174019
174255
|
}) : Promise.resolve([]),
|
|
174020
174256
|
runGitCommits ? Promise.resolve(searchGitCommits({
|
|
174021
174257
|
db,
|
|
@@ -174035,7 +174271,7 @@ async function unifiedSearch(db, sessionId, projectPath, query, options3 = {}) {
|
|
|
174035
174271
|
})) : Promise.resolve([])
|
|
174036
174272
|
]);
|
|
174037
174273
|
const results = [...memoryResults, ...primerResults, ...messageLikeResults, ...gitCommitResults].sort(compareUnifiedResults).slice(0, limit);
|
|
174038
|
-
const countRetrievals =
|
|
174274
|
+
const countRetrievals = options.countRetrievals ?? true;
|
|
174039
174275
|
if (countRetrievals) {
|
|
174040
174276
|
const memoryIds = results.filter((result) => result.source === "memory").map((result) => result.memoryId);
|
|
174041
174277
|
if (memoryIds.length > 0) {
|
|
@@ -174204,8 +174440,8 @@ function renderedTier(compartmentIndex, importance, budgetPressure, anchorOverla
|
|
|
174204
174440
|
if (shouldArchive(compartmentIndex, importance, budgetPressure, anchorOverlap)) {
|
|
174205
174441
|
return 5;
|
|
174206
174442
|
}
|
|
174207
|
-
const
|
|
174208
|
-
return Math.min(
|
|
174443
|
+
const base = tier(compartmentIndex, importance, budgetPressure);
|
|
174444
|
+
return Math.min(base, 4);
|
|
174209
174445
|
}
|
|
174210
174446
|
function computeBudgetPressure(compartments, historyBudget) {
|
|
174211
174447
|
if (historyBudget <= 0)
|