@kenkaiiii/gg-boss 4.4.0 → 4.5.0
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.
|
@@ -1454,8 +1454,8 @@ var require_applicability = __commonJS({
|
|
|
1454
1454
|
init_esm_shims();
|
|
1455
1455
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1456
1456
|
exports.shouldUseRule = exports.shouldUseGroup = exports.schemaHasRulesForType = void 0;
|
|
1457
|
-
function schemaHasRulesForType({ schema, self },
|
|
1458
|
-
const group = self.RULES.types[
|
|
1457
|
+
function schemaHasRulesForType({ schema, self }, type2) {
|
|
1458
|
+
const group = self.RULES.types[type2];
|
|
1459
1459
|
return group && group !== true && shouldUseGroup(schema, group);
|
|
1460
1460
|
}
|
|
1461
1461
|
exports.schemaHasRulesForType = schemaHasRulesForType;
|
|
@@ -2565,9 +2565,9 @@ var require_validate = __commonJS({
|
|
|
2565
2565
|
for (const keyword in rules) {
|
|
2566
2566
|
const rule = rules[keyword];
|
|
2567
2567
|
if (typeof rule == "object" && (0, applicability_1.shouldUseRule)(it.schema, rule)) {
|
|
2568
|
-
const { type } = rule.definition;
|
|
2569
|
-
if (
|
|
2570
|
-
strictTypesError(it, `missing type "${
|
|
2568
|
+
const { type: type2 } = rule.definition;
|
|
2569
|
+
if (type2.length && !type2.some((t) => hasApplicableType(ts, t))) {
|
|
2570
|
+
strictTypesError(it, `missing type "${type2.join(",")}" for keyword "${keyword}"`);
|
|
2571
2571
|
}
|
|
2572
2572
|
}
|
|
2573
2573
|
}
|
|
@@ -3225,8 +3225,8 @@ var require_utils = __commonJS({
|
|
|
3225
3225
|
}
|
|
3226
3226
|
return ind;
|
|
3227
3227
|
}
|
|
3228
|
-
function removeDotSegments(
|
|
3229
|
-
let input =
|
|
3228
|
+
function removeDotSegments(path43) {
|
|
3229
|
+
let input = path43;
|
|
3230
3230
|
const output = [];
|
|
3231
3231
|
let nextSlash = -1;
|
|
3232
3232
|
let len = 0;
|
|
@@ -3426,8 +3426,8 @@ var require_schemes = __commonJS({
|
|
|
3426
3426
|
wsComponent.secure = void 0;
|
|
3427
3427
|
}
|
|
3428
3428
|
if (wsComponent.resourceName) {
|
|
3429
|
-
const [
|
|
3430
|
-
wsComponent.path =
|
|
3429
|
+
const [path43, query] = wsComponent.resourceName.split("?");
|
|
3430
|
+
wsComponent.path = path43 && path43 !== "/" ? path43 : void 0;
|
|
3431
3431
|
wsComponent.query = query;
|
|
3432
3432
|
wsComponent.resourceName = void 0;
|
|
3433
3433
|
}
|
|
@@ -6856,7 +6856,7 @@ var require_windows = __commonJS({
|
|
|
6856
6856
|
module.exports = isexe;
|
|
6857
6857
|
isexe.sync = sync;
|
|
6858
6858
|
var fs36 = __require("fs");
|
|
6859
|
-
function checkPathExt(
|
|
6859
|
+
function checkPathExt(path43, options) {
|
|
6860
6860
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
6861
6861
|
if (!pathext) {
|
|
6862
6862
|
return true;
|
|
@@ -6867,25 +6867,25 @@ var require_windows = __commonJS({
|
|
|
6867
6867
|
}
|
|
6868
6868
|
for (var i = 0; i < pathext.length; i++) {
|
|
6869
6869
|
var p = pathext[i].toLowerCase();
|
|
6870
|
-
if (p &&
|
|
6870
|
+
if (p && path43.substr(-p.length).toLowerCase() === p) {
|
|
6871
6871
|
return true;
|
|
6872
6872
|
}
|
|
6873
6873
|
}
|
|
6874
6874
|
return false;
|
|
6875
6875
|
}
|
|
6876
|
-
function checkStat(stat,
|
|
6876
|
+
function checkStat(stat, path43, options) {
|
|
6877
6877
|
if (!stat.isSymbolicLink() && !stat.isFile()) {
|
|
6878
6878
|
return false;
|
|
6879
6879
|
}
|
|
6880
|
-
return checkPathExt(
|
|
6880
|
+
return checkPathExt(path43, options);
|
|
6881
6881
|
}
|
|
6882
|
-
function isexe(
|
|
6883
|
-
fs36.stat(
|
|
6884
|
-
cb(er, er ? false : checkStat(stat,
|
|
6882
|
+
function isexe(path43, options, cb) {
|
|
6883
|
+
fs36.stat(path43, function(er, stat) {
|
|
6884
|
+
cb(er, er ? false : checkStat(stat, path43, options));
|
|
6885
6885
|
});
|
|
6886
6886
|
}
|
|
6887
|
-
function sync(
|
|
6888
|
-
return checkStat(fs36.statSync(
|
|
6887
|
+
function sync(path43, options) {
|
|
6888
|
+
return checkStat(fs36.statSync(path43), path43, options);
|
|
6889
6889
|
}
|
|
6890
6890
|
}
|
|
6891
6891
|
});
|
|
@@ -6898,13 +6898,13 @@ var require_mode = __commonJS({
|
|
|
6898
6898
|
module.exports = isexe;
|
|
6899
6899
|
isexe.sync = sync;
|
|
6900
6900
|
var fs36 = __require("fs");
|
|
6901
|
-
function isexe(
|
|
6902
|
-
fs36.stat(
|
|
6901
|
+
function isexe(path43, options, cb) {
|
|
6902
|
+
fs36.stat(path43, function(er, stat) {
|
|
6903
6903
|
cb(er, er ? false : checkStat(stat, options));
|
|
6904
6904
|
});
|
|
6905
6905
|
}
|
|
6906
|
-
function sync(
|
|
6907
|
-
return checkStat(fs36.statSync(
|
|
6906
|
+
function sync(path43, options) {
|
|
6907
|
+
return checkStat(fs36.statSync(path43), options);
|
|
6908
6908
|
}
|
|
6909
6909
|
function checkStat(stat, options) {
|
|
6910
6910
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -6939,7 +6939,7 @@ var require_isexe = __commonJS({
|
|
|
6939
6939
|
}
|
|
6940
6940
|
module.exports = isexe;
|
|
6941
6941
|
isexe.sync = sync;
|
|
6942
|
-
function isexe(
|
|
6942
|
+
function isexe(path43, options, cb) {
|
|
6943
6943
|
if (typeof options === "function") {
|
|
6944
6944
|
cb = options;
|
|
6945
6945
|
options = {};
|
|
@@ -6949,7 +6949,7 @@ var require_isexe = __commonJS({
|
|
|
6949
6949
|
throw new TypeError("callback not provided");
|
|
6950
6950
|
}
|
|
6951
6951
|
return new Promise(function(resolve2, reject) {
|
|
6952
|
-
isexe(
|
|
6952
|
+
isexe(path43, options || {}, function(er, is) {
|
|
6953
6953
|
if (er) {
|
|
6954
6954
|
reject(er);
|
|
6955
6955
|
} else {
|
|
@@ -6958,7 +6958,7 @@ var require_isexe = __commonJS({
|
|
|
6958
6958
|
});
|
|
6959
6959
|
});
|
|
6960
6960
|
}
|
|
6961
|
-
core(
|
|
6961
|
+
core(path43, options || {}, function(er, is) {
|
|
6962
6962
|
if (er) {
|
|
6963
6963
|
if (er.code === "EACCES" || options && options.ignoreErrors) {
|
|
6964
6964
|
er = null;
|
|
@@ -6968,9 +6968,9 @@ var require_isexe = __commonJS({
|
|
|
6968
6968
|
cb(er, is);
|
|
6969
6969
|
});
|
|
6970
6970
|
}
|
|
6971
|
-
function sync(
|
|
6971
|
+
function sync(path43, options) {
|
|
6972
6972
|
try {
|
|
6973
|
-
return core.sync(
|
|
6973
|
+
return core.sync(path43, options || {});
|
|
6974
6974
|
} catch (er) {
|
|
6975
6975
|
if (options && options.ignoreErrors || er.code === "EACCES") {
|
|
6976
6976
|
return false;
|
|
@@ -6988,7 +6988,7 @@ var require_which = __commonJS({
|
|
|
6988
6988
|
"use strict";
|
|
6989
6989
|
init_esm_shims();
|
|
6990
6990
|
var isWindows3 = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
6991
|
-
var
|
|
6991
|
+
var path43 = __require("path");
|
|
6992
6992
|
var COLON = isWindows3 ? ";" : ":";
|
|
6993
6993
|
var isexe = require_isexe();
|
|
6994
6994
|
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
@@ -7026,7 +7026,7 @@ var require_which = __commonJS({
|
|
|
7026
7026
|
return opt.all && found.length ? resolve2(found) : reject(getNotFoundError(cmd));
|
|
7027
7027
|
const ppRaw = pathEnv[i];
|
|
7028
7028
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
7029
|
-
const pCmd =
|
|
7029
|
+
const pCmd = path43.join(pathPart, cmd);
|
|
7030
7030
|
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
7031
7031
|
resolve2(subStep(p, i, 0));
|
|
7032
7032
|
});
|
|
@@ -7053,7 +7053,7 @@ var require_which = __commonJS({
|
|
|
7053
7053
|
for (let i = 0; i < pathEnv.length; i++) {
|
|
7054
7054
|
const ppRaw = pathEnv[i];
|
|
7055
7055
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
7056
|
-
const pCmd =
|
|
7056
|
+
const pCmd = path43.join(pathPart, cmd);
|
|
7057
7057
|
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
7058
7058
|
for (let j = 0; j < pathExt.length; j++) {
|
|
7059
7059
|
const cur = p + pathExt[j];
|
|
@@ -7103,7 +7103,7 @@ var require_resolveCommand = __commonJS({
|
|
|
7103
7103
|
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module) {
|
|
7104
7104
|
"use strict";
|
|
7105
7105
|
init_esm_shims();
|
|
7106
|
-
var
|
|
7106
|
+
var path43 = __require("path");
|
|
7107
7107
|
var which = require_which();
|
|
7108
7108
|
var getPathKey = require_path_key();
|
|
7109
7109
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -7121,7 +7121,7 @@ var require_resolveCommand = __commonJS({
|
|
|
7121
7121
|
try {
|
|
7122
7122
|
resolved = which.sync(parsed.command, {
|
|
7123
7123
|
path: env2[getPathKey({ env: env2 })],
|
|
7124
|
-
pathExt: withoutPathExt ?
|
|
7124
|
+
pathExt: withoutPathExt ? path43.delimiter : void 0
|
|
7125
7125
|
});
|
|
7126
7126
|
} catch (e) {
|
|
7127
7127
|
} finally {
|
|
@@ -7130,7 +7130,7 @@ var require_resolveCommand = __commonJS({
|
|
|
7130
7130
|
}
|
|
7131
7131
|
}
|
|
7132
7132
|
if (resolved) {
|
|
7133
|
-
resolved =
|
|
7133
|
+
resolved = path43.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
7134
7134
|
}
|
|
7135
7135
|
return resolved;
|
|
7136
7136
|
}
|
|
@@ -7187,8 +7187,8 @@ var require_shebang_command = __commonJS({
|
|
|
7187
7187
|
if (!match) {
|
|
7188
7188
|
return null;
|
|
7189
7189
|
}
|
|
7190
|
-
const [
|
|
7191
|
-
const binary =
|
|
7190
|
+
const [path43, argument] = match[0].replace(/#! ?/, "").split(" ");
|
|
7191
|
+
const binary = path43.split("/").pop();
|
|
7192
7192
|
if (binary === "env") {
|
|
7193
7193
|
return argument;
|
|
7194
7194
|
}
|
|
@@ -7225,7 +7225,7 @@ var require_parse = __commonJS({
|
|
|
7225
7225
|
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"(exports, module) {
|
|
7226
7226
|
"use strict";
|
|
7227
7227
|
init_esm_shims();
|
|
7228
|
-
var
|
|
7228
|
+
var path43 = __require("path");
|
|
7229
7229
|
var resolveCommand = require_resolveCommand();
|
|
7230
7230
|
var escape4 = require_escape();
|
|
7231
7231
|
var readShebang = require_readShebang();
|
|
@@ -7250,7 +7250,7 @@ var require_parse = __commonJS({
|
|
|
7250
7250
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
7251
7251
|
if (parsed.options.forceShell || needsShell) {
|
|
7252
7252
|
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
7253
|
-
parsed.command =
|
|
7253
|
+
parsed.command = path43.normalize(parsed.command);
|
|
7254
7254
|
parsed.command = escape4.command(parsed.command);
|
|
7255
7255
|
parsed.args = parsed.args.map((arg) => escape4.argument(arg, needsDoubleEscapeMetaChars));
|
|
7256
7256
|
const shellCommand = [parsed.command].concat(parsed.args).join(" ");
|
|
@@ -7433,11 +7433,11 @@ var require_react_production = __commonJS({
|
|
|
7433
7433
|
}
|
|
7434
7434
|
var ReactSharedInternals = { H: null, A: null, T: null, S: null };
|
|
7435
7435
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
7436
|
-
function ReactElement(
|
|
7436
|
+
function ReactElement(type2, key, props) {
|
|
7437
7437
|
var refProp = props.ref;
|
|
7438
7438
|
return {
|
|
7439
7439
|
$$typeof: REACT_ELEMENT_TYPE,
|
|
7440
|
-
type,
|
|
7440
|
+
type: type2,
|
|
7441
7441
|
key,
|
|
7442
7442
|
ref: void 0 !== refProp ? refProp : null,
|
|
7443
7443
|
props
|
|
@@ -7483,12 +7483,12 @@ var require_react_production = __commonJS({
|
|
|
7483
7483
|
throw thenable;
|
|
7484
7484
|
}
|
|
7485
7485
|
function mapIntoArray(children, array2, escapedPrefix, nameSoFar, callback) {
|
|
7486
|
-
var
|
|
7487
|
-
if ("undefined" ===
|
|
7486
|
+
var type2 = typeof children;
|
|
7487
|
+
if ("undefined" === type2 || "boolean" === type2) children = null;
|
|
7488
7488
|
var invokeCallback = false;
|
|
7489
7489
|
if (null === children) invokeCallback = true;
|
|
7490
7490
|
else
|
|
7491
|
-
switch (
|
|
7491
|
+
switch (type2) {
|
|
7492
7492
|
case "bigint":
|
|
7493
7493
|
case "string":
|
|
7494
7494
|
case "number":
|
|
@@ -7524,23 +7524,23 @@ var require_react_production = __commonJS({
|
|
|
7524
7524
|
var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":";
|
|
7525
7525
|
if (isArrayImpl(children))
|
|
7526
7526
|
for (var i = 0; i < children.length; i++)
|
|
7527
|
-
nameSoFar = children[i],
|
|
7527
|
+
nameSoFar = children[i], type2 = nextNamePrefix + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(
|
|
7528
7528
|
nameSoFar,
|
|
7529
7529
|
array2,
|
|
7530
7530
|
escapedPrefix,
|
|
7531
|
-
|
|
7531
|
+
type2,
|
|
7532
7532
|
callback
|
|
7533
7533
|
);
|
|
7534
7534
|
else if (i = getIteratorFn(children), "function" === typeof i)
|
|
7535
7535
|
for (children = i.call(children), i = 0; !(nameSoFar = children.next()).done; )
|
|
7536
|
-
nameSoFar = nameSoFar.value,
|
|
7536
|
+
nameSoFar = nameSoFar.value, type2 = nextNamePrefix + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(
|
|
7537
7537
|
nameSoFar,
|
|
7538
7538
|
array2,
|
|
7539
7539
|
escapedPrefix,
|
|
7540
|
-
|
|
7540
|
+
type2,
|
|
7541
7541
|
callback
|
|
7542
7542
|
);
|
|
7543
|
-
else if ("object" ===
|
|
7543
|
+
else if ("object" === type2) {
|
|
7544
7544
|
if ("function" === typeof children.then)
|
|
7545
7545
|
return mapIntoArray(
|
|
7546
7546
|
resolveThenable(children),
|
|
@@ -7686,7 +7686,7 @@ var require_react_production = __commonJS({
|
|
|
7686
7686
|
};
|
|
7687
7687
|
return defaultValue;
|
|
7688
7688
|
};
|
|
7689
|
-
exports.createElement = function(
|
|
7689
|
+
exports.createElement = function(type2, config2, children) {
|
|
7690
7690
|
var propName, props = {}, key = null;
|
|
7691
7691
|
if (null != config2)
|
|
7692
7692
|
for (propName in void 0 !== config2.key && (key = "" + config2.key), config2)
|
|
@@ -7698,10 +7698,10 @@ var require_react_production = __commonJS({
|
|
|
7698
7698
|
childArray[i] = arguments[i + 2];
|
|
7699
7699
|
props.children = childArray;
|
|
7700
7700
|
}
|
|
7701
|
-
if (
|
|
7702
|
-
for (propName in childrenLength =
|
|
7701
|
+
if (type2 && type2.defaultProps)
|
|
7702
|
+
for (propName in childrenLength = type2.defaultProps, childrenLength)
|
|
7703
7703
|
void 0 === props[propName] && (props[propName] = childrenLength[propName]);
|
|
7704
|
-
return ReactElement(
|
|
7704
|
+
return ReactElement(type2, key, props);
|
|
7705
7705
|
};
|
|
7706
7706
|
exports.createRef = function() {
|
|
7707
7707
|
return { current: null };
|
|
@@ -7717,10 +7717,10 @@ var require_react_production = __commonJS({
|
|
|
7717
7717
|
_init: lazyInitializer
|
|
7718
7718
|
};
|
|
7719
7719
|
};
|
|
7720
|
-
exports.memo = function(
|
|
7720
|
+
exports.memo = function(type2, compare) {
|
|
7721
7721
|
return {
|
|
7722
7722
|
$$typeof: REACT_MEMO_TYPE,
|
|
7723
|
-
type,
|
|
7723
|
+
type: type2,
|
|
7724
7724
|
compare: void 0 === compare ? null : compare
|
|
7725
7725
|
};
|
|
7726
7726
|
};
|
|
@@ -7874,12 +7874,12 @@ var require_react_development = __commonJS({
|
|
|
7874
7874
|
return testStringCoercion(value);
|
|
7875
7875
|
}
|
|
7876
7876
|
}
|
|
7877
|
-
function getComponentNameFromType(
|
|
7878
|
-
if (null ==
|
|
7879
|
-
if ("function" === typeof
|
|
7880
|
-
return
|
|
7881
|
-
if ("string" === typeof
|
|
7882
|
-
switch (
|
|
7877
|
+
function getComponentNameFromType(type2) {
|
|
7878
|
+
if (null == type2) return null;
|
|
7879
|
+
if ("function" === typeof type2)
|
|
7880
|
+
return type2.$$typeof === REACT_CLIENT_REFERENCE ? null : type2.displayName || type2.name || null;
|
|
7881
|
+
if ("string" === typeof type2) return type2;
|
|
7882
|
+
switch (type2) {
|
|
7883
7883
|
case REACT_FRAGMENT_TYPE:
|
|
7884
7884
|
return "Fragment";
|
|
7885
7885
|
case REACT_PROFILER_TYPE:
|
|
@@ -7893,39 +7893,39 @@ var require_react_development = __commonJS({
|
|
|
7893
7893
|
case REACT_ACTIVITY_TYPE:
|
|
7894
7894
|
return "Activity";
|
|
7895
7895
|
}
|
|
7896
|
-
if ("object" === typeof
|
|
7897
|
-
switch ("number" === typeof
|
|
7896
|
+
if ("object" === typeof type2)
|
|
7897
|
+
switch ("number" === typeof type2.tag && console.error(
|
|
7898
7898
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
7899
|
-
),
|
|
7899
|
+
), type2.$$typeof) {
|
|
7900
7900
|
case REACT_PORTAL_TYPE:
|
|
7901
7901
|
return "Portal";
|
|
7902
7902
|
case REACT_CONTEXT_TYPE:
|
|
7903
|
-
return
|
|
7903
|
+
return type2.displayName || "Context";
|
|
7904
7904
|
case REACT_CONSUMER_TYPE:
|
|
7905
|
-
return (
|
|
7905
|
+
return (type2._context.displayName || "Context") + ".Consumer";
|
|
7906
7906
|
case REACT_FORWARD_REF_TYPE:
|
|
7907
|
-
var innerType =
|
|
7908
|
-
|
|
7909
|
-
|
|
7910
|
-
return
|
|
7907
|
+
var innerType = type2.render;
|
|
7908
|
+
type2 = type2.displayName;
|
|
7909
|
+
type2 || (type2 = innerType.displayName || innerType.name || "", type2 = "" !== type2 ? "ForwardRef(" + type2 + ")" : "ForwardRef");
|
|
7910
|
+
return type2;
|
|
7911
7911
|
case REACT_MEMO_TYPE:
|
|
7912
|
-
return innerType =
|
|
7912
|
+
return innerType = type2.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type2.type) || "Memo";
|
|
7913
7913
|
case REACT_LAZY_TYPE:
|
|
7914
|
-
innerType =
|
|
7915
|
-
|
|
7914
|
+
innerType = type2._payload;
|
|
7915
|
+
type2 = type2._init;
|
|
7916
7916
|
try {
|
|
7917
|
-
return getComponentNameFromType(
|
|
7917
|
+
return getComponentNameFromType(type2(innerType));
|
|
7918
7918
|
} catch (x) {
|
|
7919
7919
|
}
|
|
7920
7920
|
}
|
|
7921
7921
|
return null;
|
|
7922
7922
|
}
|
|
7923
|
-
function getTaskName(
|
|
7924
|
-
if (
|
|
7925
|
-
if ("object" === typeof
|
|
7923
|
+
function getTaskName(type2) {
|
|
7924
|
+
if (type2 === REACT_FRAGMENT_TYPE) return "<>";
|
|
7925
|
+
if ("object" === typeof type2 && null !== type2 && type2.$$typeof === REACT_LAZY_TYPE)
|
|
7926
7926
|
return "<...>";
|
|
7927
7927
|
try {
|
|
7928
|
-
var name = getComponentNameFromType(
|
|
7928
|
+
var name = getComponentNameFromType(type2);
|
|
7929
7929
|
return name ? "<" + name + ">" : "<...>";
|
|
7930
7930
|
} catch (x) {
|
|
7931
7931
|
return "<...>";
|
|
@@ -7966,46 +7966,46 @@ var require_react_development = __commonJS({
|
|
|
7966
7966
|
componentName = this.props.ref;
|
|
7967
7967
|
return void 0 !== componentName ? componentName : null;
|
|
7968
7968
|
}
|
|
7969
|
-
function ReactElement(
|
|
7969
|
+
function ReactElement(type2, key, props, owner, debugStack, debugTask) {
|
|
7970
7970
|
var refProp = props.ref;
|
|
7971
|
-
|
|
7971
|
+
type2 = {
|
|
7972
7972
|
$$typeof: REACT_ELEMENT_TYPE,
|
|
7973
|
-
type,
|
|
7973
|
+
type: type2,
|
|
7974
7974
|
key,
|
|
7975
7975
|
props,
|
|
7976
7976
|
_owner: owner
|
|
7977
7977
|
};
|
|
7978
|
-
null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(
|
|
7978
|
+
null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type2, "ref", {
|
|
7979
7979
|
enumerable: false,
|
|
7980
7980
|
get: elementRefGetterWithDeprecationWarning
|
|
7981
|
-
}) : Object.defineProperty(
|
|
7982
|
-
|
|
7983
|
-
Object.defineProperty(
|
|
7981
|
+
}) : Object.defineProperty(type2, "ref", { enumerable: false, value: null });
|
|
7982
|
+
type2._store = {};
|
|
7983
|
+
Object.defineProperty(type2._store, "validated", {
|
|
7984
7984
|
configurable: false,
|
|
7985
7985
|
enumerable: false,
|
|
7986
7986
|
writable: true,
|
|
7987
7987
|
value: 0
|
|
7988
7988
|
});
|
|
7989
|
-
Object.defineProperty(
|
|
7989
|
+
Object.defineProperty(type2, "_debugInfo", {
|
|
7990
7990
|
configurable: false,
|
|
7991
7991
|
enumerable: false,
|
|
7992
7992
|
writable: true,
|
|
7993
7993
|
value: null
|
|
7994
7994
|
});
|
|
7995
|
-
Object.defineProperty(
|
|
7995
|
+
Object.defineProperty(type2, "_debugStack", {
|
|
7996
7996
|
configurable: false,
|
|
7997
7997
|
enumerable: false,
|
|
7998
7998
|
writable: true,
|
|
7999
7999
|
value: debugStack
|
|
8000
8000
|
});
|
|
8001
|
-
Object.defineProperty(
|
|
8001
|
+
Object.defineProperty(type2, "_debugTask", {
|
|
8002
8002
|
configurable: false,
|
|
8003
8003
|
enumerable: false,
|
|
8004
8004
|
writable: true,
|
|
8005
8005
|
value: debugTask
|
|
8006
8006
|
});
|
|
8007
|
-
Object.freeze && (Object.freeze(
|
|
8008
|
-
return
|
|
8007
|
+
Object.freeze && (Object.freeze(type2.props), Object.freeze(type2));
|
|
8008
|
+
return type2;
|
|
8009
8009
|
}
|
|
8010
8010
|
function cloneAndReplaceKey(oldElement, newKey) {
|
|
8011
8011
|
newKey = ReactElement(
|
|
@@ -8058,12 +8058,12 @@ var require_react_development = __commonJS({
|
|
|
8058
8058
|
throw thenable;
|
|
8059
8059
|
}
|
|
8060
8060
|
function mapIntoArray(children, array2, escapedPrefix, nameSoFar, callback) {
|
|
8061
|
-
var
|
|
8062
|
-
if ("undefined" ===
|
|
8061
|
+
var type2 = typeof children;
|
|
8062
|
+
if ("undefined" === type2 || "boolean" === type2) children = null;
|
|
8063
8063
|
var invokeCallback = false;
|
|
8064
8064
|
if (null === children) invokeCallback = true;
|
|
8065
8065
|
else
|
|
8066
|
-
switch (
|
|
8066
|
+
switch (type2) {
|
|
8067
8067
|
case "bigint":
|
|
8068
8068
|
case "string":
|
|
8069
8069
|
case "number":
|
|
@@ -8104,25 +8104,25 @@ var require_react_development = __commonJS({
|
|
|
8104
8104
|
childKey = "" === nameSoFar ? "." : nameSoFar + ":";
|
|
8105
8105
|
if (isArrayImpl(children))
|
|
8106
8106
|
for (var i = 0; i < children.length; i++)
|
|
8107
|
-
nameSoFar = children[i],
|
|
8107
|
+
nameSoFar = children[i], type2 = childKey + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(
|
|
8108
8108
|
nameSoFar,
|
|
8109
8109
|
array2,
|
|
8110
8110
|
escapedPrefix,
|
|
8111
|
-
|
|
8111
|
+
type2,
|
|
8112
8112
|
callback
|
|
8113
8113
|
);
|
|
8114
8114
|
else if (i = getIteratorFn(children), "function" === typeof i)
|
|
8115
8115
|
for (i === children.entries && (didWarnAboutMaps || console.warn(
|
|
8116
8116
|
"Using Maps as children is not supported. Use an array of keyed ReactElements instead."
|
|
8117
8117
|
), didWarnAboutMaps = true), children = i.call(children), i = 0; !(nameSoFar = children.next()).done; )
|
|
8118
|
-
nameSoFar = nameSoFar.value,
|
|
8118
|
+
nameSoFar = nameSoFar.value, type2 = childKey + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(
|
|
8119
8119
|
nameSoFar,
|
|
8120
8120
|
array2,
|
|
8121
8121
|
escapedPrefix,
|
|
8122
|
-
|
|
8122
|
+
type2,
|
|
8123
8123
|
callback
|
|
8124
8124
|
);
|
|
8125
|
-
else if ("object" ===
|
|
8125
|
+
else if ("object" === type2) {
|
|
8126
8126
|
if ("function" === typeof children.then)
|
|
8127
8127
|
return mapIntoArray(
|
|
8128
8128
|
resolveThenable(children),
|
|
@@ -8561,7 +8561,7 @@ var require_react_development = __commonJS({
|
|
|
8561
8561
|
defaultValue._currentRenderer2 = null;
|
|
8562
8562
|
return defaultValue;
|
|
8563
8563
|
};
|
|
8564
|
-
exports.createElement = function(
|
|
8564
|
+
exports.createElement = function(type2, config2, children) {
|
|
8565
8565
|
for (var i = 2; i < arguments.length; i++)
|
|
8566
8566
|
validateChildKeys(arguments[i]);
|
|
8567
8567
|
i = {};
|
|
@@ -8579,21 +8579,21 @@ var require_react_development = __commonJS({
|
|
|
8579
8579
|
Object.freeze && Object.freeze(childArray);
|
|
8580
8580
|
i.children = childArray;
|
|
8581
8581
|
}
|
|
8582
|
-
if (
|
|
8583
|
-
for (propName in childrenLength =
|
|
8582
|
+
if (type2 && type2.defaultProps)
|
|
8583
|
+
for (propName in childrenLength = type2.defaultProps, childrenLength)
|
|
8584
8584
|
void 0 === i[propName] && (i[propName] = childrenLength[propName]);
|
|
8585
8585
|
key && defineKeyPropWarningGetter(
|
|
8586
8586
|
i,
|
|
8587
|
-
"function" === typeof
|
|
8587
|
+
"function" === typeof type2 ? type2.displayName || type2.name || "Unknown" : type2
|
|
8588
8588
|
);
|
|
8589
8589
|
var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
8590
8590
|
return ReactElement(
|
|
8591
|
-
|
|
8591
|
+
type2,
|
|
8592
8592
|
key,
|
|
8593
8593
|
i,
|
|
8594
8594
|
getOwner(),
|
|
8595
8595
|
propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
|
|
8596
|
-
propName ? createTask(getTaskName(
|
|
8596
|
+
propName ? createTask(getTaskName(type2)) : unknownOwnerDebugTask
|
|
8597
8597
|
);
|
|
8598
8598
|
};
|
|
8599
8599
|
exports.createRef = function() {
|
|
@@ -8648,14 +8648,14 @@ var require_react_development = __commonJS({
|
|
|
8648
8648
|
lazyType._debugInfo = [{ awaited: ioInfo }];
|
|
8649
8649
|
return lazyType;
|
|
8650
8650
|
};
|
|
8651
|
-
exports.memo = function(
|
|
8652
|
-
null ==
|
|
8651
|
+
exports.memo = function(type2, compare) {
|
|
8652
|
+
null == type2 && console.error(
|
|
8653
8653
|
"memo: The first argument must be a component. Instead received: %s",
|
|
8654
|
-
null ===
|
|
8654
|
+
null === type2 ? "null" : typeof type2
|
|
8655
8655
|
);
|
|
8656
8656
|
compare = {
|
|
8657
8657
|
$$typeof: REACT_MEMO_TYPE,
|
|
8658
|
-
type,
|
|
8658
|
+
type: type2,
|
|
8659
8659
|
compare: void 0 === compare ? null : compare
|
|
8660
8660
|
};
|
|
8661
8661
|
var ownName;
|
|
@@ -8667,7 +8667,7 @@ var require_react_development = __commonJS({
|
|
|
8667
8667
|
},
|
|
8668
8668
|
set: function(name) {
|
|
8669
8669
|
ownName = name;
|
|
8670
|
-
|
|
8670
|
+
type2.name || type2.displayName || (Object.defineProperty(type2, "name", { value: name }), type2.displayName = name);
|
|
8671
8671
|
}
|
|
8672
8672
|
});
|
|
8673
8673
|
return compare;
|
|
@@ -9703,12 +9703,12 @@ var require_react_reconciler_production = __commonJS({
|
|
|
9703
9703
|
maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
|
|
9704
9704
|
return "function" === typeof maybeIterable ? maybeIterable : null;
|
|
9705
9705
|
}
|
|
9706
|
-
function getComponentNameFromType(
|
|
9707
|
-
if (null ==
|
|
9708
|
-
if ("function" === typeof
|
|
9709
|
-
return
|
|
9710
|
-
if ("string" === typeof
|
|
9711
|
-
switch (
|
|
9706
|
+
function getComponentNameFromType(type2) {
|
|
9707
|
+
if (null == type2) return null;
|
|
9708
|
+
if ("function" === typeof type2)
|
|
9709
|
+
return type2.$$typeof === REACT_CLIENT_REFERENCE ? null : type2.displayName || type2.name || null;
|
|
9710
|
+
if ("string" === typeof type2) return type2;
|
|
9711
|
+
switch (type2) {
|
|
9712
9712
|
case REACT_FRAGMENT_TYPE:
|
|
9713
9713
|
return "Fragment";
|
|
9714
9714
|
case REACT_PROFILER_TYPE:
|
|
@@ -9722,26 +9722,26 @@ var require_react_reconciler_production = __commonJS({
|
|
|
9722
9722
|
case REACT_ACTIVITY_TYPE:
|
|
9723
9723
|
return "Activity";
|
|
9724
9724
|
}
|
|
9725
|
-
if ("object" === typeof
|
|
9726
|
-
switch (
|
|
9725
|
+
if ("object" === typeof type2)
|
|
9726
|
+
switch (type2.$$typeof) {
|
|
9727
9727
|
case REACT_PORTAL_TYPE:
|
|
9728
9728
|
return "Portal";
|
|
9729
9729
|
case REACT_CONTEXT_TYPE:
|
|
9730
|
-
return
|
|
9730
|
+
return type2.displayName || "Context";
|
|
9731
9731
|
case REACT_CONSUMER_TYPE:
|
|
9732
|
-
return (
|
|
9732
|
+
return (type2._context.displayName || "Context") + ".Consumer";
|
|
9733
9733
|
case REACT_FORWARD_REF_TYPE:
|
|
9734
|
-
var innerType =
|
|
9735
|
-
|
|
9736
|
-
|
|
9737
|
-
return
|
|
9734
|
+
var innerType = type2.render;
|
|
9735
|
+
type2 = type2.displayName;
|
|
9736
|
+
type2 || (type2 = innerType.displayName || innerType.name || "", type2 = "" !== type2 ? "ForwardRef(" + type2 + ")" : "ForwardRef");
|
|
9737
|
+
return type2;
|
|
9738
9738
|
case REACT_MEMO_TYPE:
|
|
9739
|
-
return innerType =
|
|
9739
|
+
return innerType = type2.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type2.type) || "Memo";
|
|
9740
9740
|
case REACT_LAZY_TYPE:
|
|
9741
|
-
innerType =
|
|
9742
|
-
|
|
9741
|
+
innerType = type2._payload;
|
|
9742
|
+
type2 = type2._init;
|
|
9743
9743
|
try {
|
|
9744
|
-
return getComponentNameFromType(
|
|
9744
|
+
return getComponentNameFromType(type2(innerType));
|
|
9745
9745
|
} catch (x) {
|
|
9746
9746
|
}
|
|
9747
9747
|
}
|
|
@@ -12549,12 +12549,12 @@ var require_react_reconciler_production = __commonJS({
|
|
|
12549
12549
|
}
|
|
12550
12550
|
function updateMemoComponent(current, workInProgress2, Component, nextProps, renderLanes2) {
|
|
12551
12551
|
if (null === current) {
|
|
12552
|
-
var
|
|
12553
|
-
if ("function" === typeof
|
|
12554
|
-
return workInProgress2.tag = 15, workInProgress2.type =
|
|
12552
|
+
var type2 = Component.type;
|
|
12553
|
+
if ("function" === typeof type2 && !shouldConstruct(type2) && void 0 === type2.defaultProps && null === Component.compare)
|
|
12554
|
+
return workInProgress2.tag = 15, workInProgress2.type = type2, updateSimpleMemoComponent(
|
|
12555
12555
|
current,
|
|
12556
12556
|
workInProgress2,
|
|
12557
|
-
|
|
12557
|
+
type2,
|
|
12558
12558
|
nextProps,
|
|
12559
12559
|
renderLanes2
|
|
12560
12560
|
);
|
|
@@ -12570,9 +12570,9 @@ var require_react_reconciler_production = __commonJS({
|
|
|
12570
12570
|
current.return = workInProgress2;
|
|
12571
12571
|
return workInProgress2.child = current;
|
|
12572
12572
|
}
|
|
12573
|
-
|
|
12573
|
+
type2 = current.child;
|
|
12574
12574
|
if (!checkScheduledUpdateOrContext(current, renderLanes2)) {
|
|
12575
|
-
var prevProps =
|
|
12575
|
+
var prevProps = type2.memoizedProps;
|
|
12576
12576
|
Component = Component.compare;
|
|
12577
12577
|
Component = null !== Component ? Component : shallowEqual;
|
|
12578
12578
|
if (Component(prevProps, nextProps) && current.ref === workInProgress2.ref)
|
|
@@ -12583,7 +12583,7 @@ var require_react_reconciler_production = __commonJS({
|
|
|
12583
12583
|
);
|
|
12584
12584
|
}
|
|
12585
12585
|
workInProgress2.flags |= 1;
|
|
12586
|
-
current = createWorkInProgress(
|
|
12586
|
+
current = createWorkInProgress(type2, nextProps);
|
|
12587
12587
|
current.ref = workInProgress2.ref;
|
|
12588
12588
|
current.return = workInProgress2;
|
|
12589
12589
|
return workInProgress2.child = current;
|
|
@@ -13786,7 +13786,7 @@ var require_react_reconciler_production = __commonJS({
|
|
|
13786
13786
|
finalizeContainerChildren(container, newChildSet);
|
|
13787
13787
|
}
|
|
13788
13788
|
}
|
|
13789
|
-
function updateHostComponent(current, workInProgress2,
|
|
13789
|
+
function updateHostComponent(current, workInProgress2, type2, newProps) {
|
|
13790
13790
|
if (supportsMutation)
|
|
13791
13791
|
current.memoizedProps !== newProps && markUpdate(workInProgress2);
|
|
13792
13792
|
else if (supportsPersistence) {
|
|
@@ -13795,7 +13795,7 @@ var require_react_reconciler_production = __commonJS({
|
|
|
13795
13795
|
var currentHostContext = contextStackCursor.current;
|
|
13796
13796
|
oldProps$88 = cloneInstance(
|
|
13797
13797
|
currentInstance,
|
|
13798
|
-
|
|
13798
|
+
type2,
|
|
13799
13799
|
oldProps$88,
|
|
13800
13800
|
newProps,
|
|
13801
13801
|
!current,
|
|
@@ -13803,17 +13803,17 @@ var require_react_reconciler_production = __commonJS({
|
|
|
13803
13803
|
);
|
|
13804
13804
|
oldProps$88 === currentInstance ? workInProgress2.stateNode = currentInstance : (markCloned(workInProgress2), finalizeInitialChildren(
|
|
13805
13805
|
oldProps$88,
|
|
13806
|
-
|
|
13806
|
+
type2,
|
|
13807
13807
|
newProps,
|
|
13808
13808
|
currentHostContext
|
|
13809
13809
|
) && markUpdate(workInProgress2), workInProgress2.stateNode = oldProps$88, current && appendAllChildren(oldProps$88, workInProgress2, false, false));
|
|
13810
13810
|
} else workInProgress2.stateNode = currentInstance;
|
|
13811
13811
|
}
|
|
13812
13812
|
}
|
|
13813
|
-
function preloadInstanceAndSuspendIfNeeded(workInProgress2,
|
|
13814
|
-
if (0 !== (workInProgress2.mode & 32) && (null === oldProps ? maySuspendCommit(
|
|
13815
|
-
if (workInProgress2.flags |= 16777216, (renderLanes2 & 335544128) === renderLanes2 || maySuspendCommitInSyncRender(
|
|
13816
|
-
if (preloadInstance(workInProgress2.stateNode,
|
|
13813
|
+
function preloadInstanceAndSuspendIfNeeded(workInProgress2, type2, oldProps, newProps, renderLanes2) {
|
|
13814
|
+
if (0 !== (workInProgress2.mode & 32) && (null === oldProps ? maySuspendCommit(type2, newProps) : maySuspendCommitOnUpdate(type2, oldProps, newProps))) {
|
|
13815
|
+
if (workInProgress2.flags |= 16777216, (renderLanes2 & 335544128) === renderLanes2 || maySuspendCommitInSyncRender(type2, newProps))
|
|
13816
|
+
if (preloadInstance(workInProgress2.stateNode, type2, newProps))
|
|
13817
13817
|
workInProgress2.flags |= 8192;
|
|
13818
13818
|
else if (shouldRemainOnPreviousScreen()) workInProgress2.flags |= 8192;
|
|
13819
13819
|
else
|
|
@@ -13891,13 +13891,13 @@ var require_react_reconciler_production = __commonJS({
|
|
|
13891
13891
|
return null;
|
|
13892
13892
|
case 26:
|
|
13893
13893
|
if (supportsResources) {
|
|
13894
|
-
var
|
|
13894
|
+
var type2 = workInProgress2.type, nextResource = workInProgress2.memoizedState;
|
|
13895
13895
|
null === current ? (markUpdate(workInProgress2), null !== nextResource ? (bubbleProperties(workInProgress2), preloadResourceAndSuspendIfNeeded(
|
|
13896
13896
|
workInProgress2,
|
|
13897
13897
|
nextResource
|
|
13898
13898
|
)) : (bubbleProperties(workInProgress2), preloadInstanceAndSuspendIfNeeded(
|
|
13899
13899
|
workInProgress2,
|
|
13900
|
-
|
|
13900
|
+
type2,
|
|
13901
13901
|
null,
|
|
13902
13902
|
newProps,
|
|
13903
13903
|
renderLanes2
|
|
@@ -13907,11 +13907,11 @@ var require_react_reconciler_production = __commonJS({
|
|
|
13907
13907
|
)) : (bubbleProperties(workInProgress2), workInProgress2.flags &= -16777217) : (nextResource = current.memoizedProps, supportsMutation ? nextResource !== newProps && markUpdate(workInProgress2) : updateHostComponent(
|
|
13908
13908
|
current,
|
|
13909
13909
|
workInProgress2,
|
|
13910
|
-
|
|
13910
|
+
type2,
|
|
13911
13911
|
newProps
|
|
13912
13912
|
), bubbleProperties(workInProgress2), preloadInstanceAndSuspendIfNeeded(
|
|
13913
13913
|
workInProgress2,
|
|
13914
|
-
|
|
13914
|
+
type2,
|
|
13915
13915
|
nextResource,
|
|
13916
13916
|
newProps,
|
|
13917
13917
|
renderLanes2
|
|
@@ -13922,9 +13922,9 @@ var require_react_reconciler_production = __commonJS({
|
|
|
13922
13922
|
if (supportsSingletons) {
|
|
13923
13923
|
popHostContext(workInProgress2);
|
|
13924
13924
|
renderLanes2 = rootInstanceStackCursor.current;
|
|
13925
|
-
|
|
13925
|
+
type2 = workInProgress2.type;
|
|
13926
13926
|
if (null !== current && null != workInProgress2.stateNode)
|
|
13927
|
-
supportsMutation ? current.memoizedProps !== newProps && markUpdate(workInProgress2) : updateHostComponent(current, workInProgress2,
|
|
13927
|
+
supportsMutation ? current.memoizedProps !== newProps && markUpdate(workInProgress2) : updateHostComponent(current, workInProgress2, type2, newProps);
|
|
13928
13928
|
else {
|
|
13929
13929
|
if (!newProps) {
|
|
13930
13930
|
if (null === workInProgress2.stateNode)
|
|
@@ -13934,7 +13934,7 @@ var require_react_reconciler_production = __commonJS({
|
|
|
13934
13934
|
}
|
|
13935
13935
|
current = contextStackCursor.current;
|
|
13936
13936
|
popHydrationState(workInProgress2) ? prepareToHydrateHostInstance(workInProgress2, current) : (current = resolveSingletonInstance(
|
|
13937
|
-
|
|
13937
|
+
type2,
|
|
13938
13938
|
newProps,
|
|
13939
13939
|
renderLanes2,
|
|
13940
13940
|
current,
|
|
@@ -13946,9 +13946,9 @@ var require_react_reconciler_production = __commonJS({
|
|
|
13946
13946
|
}
|
|
13947
13947
|
case 5:
|
|
13948
13948
|
popHostContext(workInProgress2);
|
|
13949
|
-
|
|
13949
|
+
type2 = workInProgress2.type;
|
|
13950
13950
|
if (null !== current && null != workInProgress2.stateNode)
|
|
13951
|
-
updateHostComponent(current, workInProgress2,
|
|
13951
|
+
updateHostComponent(current, workInProgress2, type2, newProps);
|
|
13952
13952
|
else {
|
|
13953
13953
|
if (!newProps) {
|
|
13954
13954
|
if (null === workInProgress2.stateNode)
|
|
@@ -13960,13 +13960,13 @@ var require_react_reconciler_production = __commonJS({
|
|
|
13960
13960
|
if (popHydrationState(workInProgress2))
|
|
13961
13961
|
prepareToHydrateHostInstance(workInProgress2, nextResource), finalizeHydratedChildren(
|
|
13962
13962
|
workInProgress2.stateNode,
|
|
13963
|
-
|
|
13963
|
+
type2,
|
|
13964
13964
|
newProps,
|
|
13965
13965
|
nextResource
|
|
13966
13966
|
) && (workInProgress2.flags |= 64);
|
|
13967
13967
|
else {
|
|
13968
13968
|
var instance$101 = createInstance(
|
|
13969
|
-
|
|
13969
|
+
type2,
|
|
13970
13970
|
newProps,
|
|
13971
13971
|
rootInstanceStackCursor.current,
|
|
13972
13972
|
nextResource,
|
|
@@ -13977,7 +13977,7 @@ var require_react_reconciler_production = __commonJS({
|
|
|
13977
13977
|
workInProgress2.stateNode = instance$101;
|
|
13978
13978
|
finalizeInitialChildren(
|
|
13979
13979
|
instance$101,
|
|
13980
|
-
|
|
13980
|
+
type2,
|
|
13981
13981
|
newProps,
|
|
13982
13982
|
nextResource
|
|
13983
13983
|
) && markUpdate(workInProgress2);
|
|
@@ -14010,12 +14010,12 @@ var require_react_reconciler_production = __commonJS({
|
|
|
14010
14010
|
current = workInProgress2.stateNode;
|
|
14011
14011
|
renderLanes2 = workInProgress2.memoizedProps;
|
|
14012
14012
|
newProps = null;
|
|
14013
|
-
|
|
14014
|
-
if (null !==
|
|
14015
|
-
switch (
|
|
14013
|
+
type2 = hydrationParentFiber;
|
|
14014
|
+
if (null !== type2)
|
|
14015
|
+
switch (type2.tag) {
|
|
14016
14016
|
case 27:
|
|
14017
14017
|
case 5:
|
|
14018
|
-
newProps =
|
|
14018
|
+
newProps = type2.memoizedProps;
|
|
14019
14019
|
}
|
|
14020
14020
|
hydrateTextInstance(
|
|
14021
14021
|
current,
|
|
@@ -14065,22 +14065,22 @@ var require_react_reconciler_production = __commonJS({
|
|
|
14065
14065
|
case 13:
|
|
14066
14066
|
newProps = workInProgress2.memoizedState;
|
|
14067
14067
|
if (null === current || null !== current.memoizedState && null !== current.memoizedState.dehydrated) {
|
|
14068
|
-
|
|
14068
|
+
type2 = popHydrationState(workInProgress2);
|
|
14069
14069
|
if (null !== newProps && null !== newProps.dehydrated) {
|
|
14070
14070
|
if (null === current) {
|
|
14071
|
-
if (!
|
|
14071
|
+
if (!type2) throw Error(formatProdErrorMessage(318));
|
|
14072
14072
|
if (!supportsHydration) throw Error(formatProdErrorMessage(344));
|
|
14073
|
-
|
|
14074
|
-
|
|
14075
|
-
if (!
|
|
14076
|
-
hydrateSuspenseInstance(
|
|
14073
|
+
type2 = workInProgress2.memoizedState;
|
|
14074
|
+
type2 = null !== type2 ? type2.dehydrated : null;
|
|
14075
|
+
if (!type2) throw Error(formatProdErrorMessage(317));
|
|
14076
|
+
hydrateSuspenseInstance(type2, workInProgress2);
|
|
14077
14077
|
} else
|
|
14078
14078
|
resetHydrationState(), 0 === (workInProgress2.flags & 128) && (workInProgress2.memoizedState = null), workInProgress2.flags |= 4;
|
|
14079
14079
|
bubbleProperties(workInProgress2);
|
|
14080
|
-
|
|
14080
|
+
type2 = false;
|
|
14081
14081
|
} else
|
|
14082
|
-
|
|
14083
|
-
if (!
|
|
14082
|
+
type2 = upgradeHydrationErrorsToRecoverable(), null !== current && null !== current.memoizedState && (current.memoizedState.hydrationErrors = type2), type2 = true;
|
|
14083
|
+
if (!type2) {
|
|
14084
14084
|
if (workInProgress2.flags & 256)
|
|
14085
14085
|
return popSuspenseHandler(workInProgress2), workInProgress2;
|
|
14086
14086
|
popSuspenseHandler(workInProgress2);
|
|
@@ -14092,7 +14092,7 @@ var require_react_reconciler_production = __commonJS({
|
|
|
14092
14092
|
return workInProgress2.lanes = renderLanes2, workInProgress2;
|
|
14093
14093
|
renderLanes2 = null !== newProps;
|
|
14094
14094
|
current = null !== current && null !== current.memoizedState;
|
|
14095
|
-
renderLanes2 && (newProps = workInProgress2.child,
|
|
14095
|
+
renderLanes2 && (newProps = workInProgress2.child, type2 = null, null !== newProps.alternate && null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type2 = newProps.alternate.memoizedState.cachePool.pool), nextResource = null, null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && (nextResource = newProps.memoizedState.cachePool.pool), nextResource !== type2 && (newProps.flags |= 2048));
|
|
14096
14096
|
renderLanes2 !== current && renderLanes2 && (workInProgress2.child.flags |= 8192);
|
|
14097
14097
|
scheduleRetryEffect(workInProgress2, workInProgress2.updateQueue);
|
|
14098
14098
|
bubbleProperties(workInProgress2);
|
|
@@ -14105,10 +14105,10 @@ var require_react_reconciler_production = __commonJS({
|
|
|
14105
14105
|
pop(suspenseStackCursor);
|
|
14106
14106
|
newProps = workInProgress2.memoizedState;
|
|
14107
14107
|
if (null === newProps) return bubbleProperties(workInProgress2), null;
|
|
14108
|
-
|
|
14108
|
+
type2 = 0 !== (workInProgress2.flags & 128);
|
|
14109
14109
|
nextResource = newProps.rendering;
|
|
14110
14110
|
if (null === nextResource)
|
|
14111
|
-
if (
|
|
14111
|
+
if (type2) cutOffTailIfNeeded(newProps, false);
|
|
14112
14112
|
else {
|
|
14113
14113
|
if (0 !== workInProgressRootExitStatus || null !== current && 0 !== (current.flags & 128))
|
|
14114
14114
|
for (current = workInProgress2.child; null !== current; ) {
|
|
@@ -14132,21 +14132,21 @@ var require_react_reconciler_production = __commonJS({
|
|
|
14132
14132
|
}
|
|
14133
14133
|
current = current.sibling;
|
|
14134
14134
|
}
|
|
14135
|
-
null !== newProps.tail && now2() > workInProgressRootRenderTargetTime && (workInProgress2.flags |= 128,
|
|
14135
|
+
null !== newProps.tail && now2() > workInProgressRootRenderTargetTime && (workInProgress2.flags |= 128, type2 = true, cutOffTailIfNeeded(newProps, false), workInProgress2.lanes = 4194304);
|
|
14136
14136
|
}
|
|
14137
14137
|
else {
|
|
14138
|
-
if (!
|
|
14138
|
+
if (!type2)
|
|
14139
14139
|
if (current = findFirstSuspended(nextResource), null !== current) {
|
|
14140
|
-
if (workInProgress2.flags |= 128,
|
|
14140
|
+
if (workInProgress2.flags |= 128, type2 = true, current = current.updateQueue, workInProgress2.updateQueue = current, scheduleRetryEffect(workInProgress2, current), cutOffTailIfNeeded(newProps, true), null === newProps.tail && "hidden" === newProps.tailMode && !nextResource.alternate && !isHydrating)
|
|
14141
14141
|
return bubbleProperties(workInProgress2), null;
|
|
14142
14142
|
} else
|
|
14143
|
-
2 * now2() - newProps.renderingStartTime > workInProgressRootRenderTargetTime && 536870912 !== renderLanes2 && (workInProgress2.flags |= 128,
|
|
14143
|
+
2 * now2() - newProps.renderingStartTime > workInProgressRootRenderTargetTime && 536870912 !== renderLanes2 && (workInProgress2.flags |= 128, type2 = true, cutOffTailIfNeeded(newProps, false), workInProgress2.lanes = 4194304);
|
|
14144
14144
|
newProps.isBackwards ? (nextResource.sibling = workInProgress2.child, workInProgress2.child = nextResource) : (current = newProps.last, null !== current ? current.sibling = nextResource : workInProgress2.child = nextResource, newProps.last = nextResource);
|
|
14145
14145
|
}
|
|
14146
14146
|
if (null !== newProps.tail)
|
|
14147
14147
|
return current = newProps.tail, newProps.rendering = current, newProps.tail = current.sibling, newProps.renderingStartTime = now2(), current.sibling = null, renderLanes2 = suspenseStackCursor.current, push(
|
|
14148
14148
|
suspenseStackCursor,
|
|
14149
|
-
|
|
14149
|
+
type2 ? renderLanes2 & 1 | 2 : renderLanes2 & 1
|
|
14150
14150
|
), isHydrating && pushTreeFork(workInProgress2, newProps.treeForkCount), current;
|
|
14151
14151
|
bubbleProperties(workInProgress2);
|
|
14152
14152
|
return null;
|
|
@@ -14362,9 +14362,9 @@ var require_react_reconciler_production = __commonJS({
|
|
|
14362
14362
|
else ref.current = null;
|
|
14363
14363
|
}
|
|
14364
14364
|
function commitHostMount(finishedWork) {
|
|
14365
|
-
var
|
|
14365
|
+
var type2 = finishedWork.type, props = finishedWork.memoizedProps, instance = finishedWork.stateNode;
|
|
14366
14366
|
try {
|
|
14367
|
-
commitMount(instance,
|
|
14367
|
+
commitMount(instance, type2, props, finishedWork);
|
|
14368
14368
|
} catch (error51) {
|
|
14369
14369
|
captureCommitPhaseError(finishedWork, finishedWork.return, error51);
|
|
14370
14370
|
}
|
|
@@ -15561,9 +15561,9 @@ var require_react_reconciler_production = __commonJS({
|
|
|
15561
15561
|
fiber.memoizedProps
|
|
15562
15562
|
);
|
|
15563
15563
|
else {
|
|
15564
|
-
var instance = fiber.stateNode,
|
|
15564
|
+
var instance = fiber.stateNode, type2 = fiber.type;
|
|
15565
15565
|
fiber = fiber.memoizedProps;
|
|
15566
|
-
((committedLanes & 335544128) === committedLanes || maySuspendCommitInSyncRender(
|
|
15566
|
+
((committedLanes & 335544128) === committedLanes || maySuspendCommitInSyncRender(type2, fiber)) && suspendInstance(suspendedState, instance, type2, fiber);
|
|
15567
15567
|
}
|
|
15568
15568
|
break;
|
|
15569
15569
|
case 5:
|
|
@@ -15572,7 +15572,7 @@ var require_react_reconciler_production = __commonJS({
|
|
|
15572
15572
|
committedLanes,
|
|
15573
15573
|
suspendedState
|
|
15574
15574
|
);
|
|
15575
|
-
fiber.flags & suspenseyCommitFlag && (instance = fiber.stateNode,
|
|
15575
|
+
fiber.flags & suspenseyCommitFlag && (instance = fiber.stateNode, type2 = fiber.type, fiber = fiber.memoizedProps, ((committedLanes & 335544128) === committedLanes || maySuspendCommitInSyncRender(type2, fiber)) && suspendInstance(suspendedState, instance, type2, fiber));
|
|
15576
15576
|
break;
|
|
15577
15577
|
case 3:
|
|
15578
15578
|
case 4:
|
|
@@ -16276,8 +16276,8 @@ var require_react_reconciler_production = __commonJS({
|
|
|
16276
16276
|
resource = workInProgress.memoizedState;
|
|
16277
16277
|
case 5:
|
|
16278
16278
|
case 27:
|
|
16279
|
-
var hostFiber = workInProgress,
|
|
16280
|
-
if (resource ? preloadResource(resource) : preloadInstance(hostFiber.stateNode,
|
|
16279
|
+
var hostFiber = workInProgress, type2 = hostFiber.type, props = hostFiber.pendingProps;
|
|
16280
|
+
if (resource ? preloadResource(resource) : preloadInstance(hostFiber.stateNode, type2, props)) {
|
|
16281
16281
|
workInProgressSuspendedReason = 0;
|
|
16282
16282
|
workInProgressThrownValue = null;
|
|
16283
16283
|
var sibling = hostFiber.sibling;
|
|
@@ -16781,20 +16781,20 @@ var require_react_reconciler_production = __commonJS({
|
|
|
16781
16781
|
});
|
|
16782
16782
|
return workInProgress2;
|
|
16783
16783
|
}
|
|
16784
|
-
function createFiberFromTypeAndProps(
|
|
16784
|
+
function createFiberFromTypeAndProps(type2, key, pendingProps, owner, mode, lanes) {
|
|
16785
16785
|
var fiberTag = 0;
|
|
16786
|
-
owner =
|
|
16787
|
-
if ("function" === typeof
|
|
16788
|
-
else if ("string" === typeof
|
|
16789
|
-
fiberTag = supportsResources && supportsSingletons ? isHostHoistableType(
|
|
16790
|
-
|
|
16786
|
+
owner = type2;
|
|
16787
|
+
if ("function" === typeof type2) shouldConstruct(type2) && (fiberTag = 1);
|
|
16788
|
+
else if ("string" === typeof type2)
|
|
16789
|
+
fiberTag = supportsResources && supportsSingletons ? isHostHoistableType(type2, pendingProps, contextStackCursor.current) ? 26 : isHostSingletonType(type2) ? 27 : 5 : supportsResources ? isHostHoistableType(
|
|
16790
|
+
type2,
|
|
16791
16791
|
pendingProps,
|
|
16792
16792
|
contextStackCursor.current
|
|
16793
|
-
) ? 26 : 5 : supportsSingletons ? isHostSingletonType(
|
|
16793
|
+
) ? 26 : 5 : supportsSingletons ? isHostSingletonType(type2) ? 27 : 5 : 5;
|
|
16794
16794
|
else
|
|
16795
|
-
a: switch (
|
|
16795
|
+
a: switch (type2) {
|
|
16796
16796
|
case REACT_ACTIVITY_TYPE:
|
|
16797
|
-
return
|
|
16797
|
+
return type2 = createFiber(31, pendingProps, key, mode), type2.elementType = REACT_ACTIVITY_TYPE, type2.lanes = lanes, type2;
|
|
16798
16798
|
case REACT_FRAGMENT_TYPE:
|
|
16799
16799
|
return createFiberFromFragment(
|
|
16800
16800
|
pendingProps.children,
|
|
@@ -16807,14 +16807,14 @@ var require_react_reconciler_production = __commonJS({
|
|
|
16807
16807
|
mode |= 24;
|
|
16808
16808
|
break;
|
|
16809
16809
|
case REACT_PROFILER_TYPE:
|
|
16810
|
-
return
|
|
16810
|
+
return type2 = createFiber(12, pendingProps, key, mode | 2), type2.elementType = REACT_PROFILER_TYPE, type2.lanes = lanes, type2;
|
|
16811
16811
|
case REACT_SUSPENSE_TYPE:
|
|
16812
|
-
return
|
|
16812
|
+
return type2 = createFiber(13, pendingProps, key, mode), type2.elementType = REACT_SUSPENSE_TYPE, type2.lanes = lanes, type2;
|
|
16813
16813
|
case REACT_SUSPENSE_LIST_TYPE:
|
|
16814
|
-
return
|
|
16814
|
+
return type2 = createFiber(19, pendingProps, key, mode), type2.elementType = REACT_SUSPENSE_LIST_TYPE, type2.lanes = lanes, type2;
|
|
16815
16815
|
default:
|
|
16816
|
-
if ("object" === typeof
|
|
16817
|
-
switch (
|
|
16816
|
+
if ("object" === typeof type2 && null !== type2)
|
|
16817
|
+
switch (type2.$$typeof) {
|
|
16818
16818
|
case REACT_CONTEXT_TYPE:
|
|
16819
16819
|
fiberTag = 10;
|
|
16820
16820
|
break a;
|
|
@@ -16836,14 +16836,14 @@ var require_react_reconciler_production = __commonJS({
|
|
|
16836
16836
|
pendingProps = Error(
|
|
16837
16837
|
formatProdErrorMessage(
|
|
16838
16838
|
130,
|
|
16839
|
-
null ===
|
|
16839
|
+
null === type2 ? "null" : typeof type2,
|
|
16840
16840
|
""
|
|
16841
16841
|
)
|
|
16842
16842
|
);
|
|
16843
16843
|
owner = null;
|
|
16844
16844
|
}
|
|
16845
16845
|
key = createFiber(fiberTag, pendingProps, key, mode);
|
|
16846
|
-
key.elementType =
|
|
16846
|
+
key.elementType = type2;
|
|
16847
16847
|
key.type = owner;
|
|
16848
16848
|
key.lanes = lanes;
|
|
16849
16849
|
return key;
|
|
@@ -17041,7 +17041,7 @@ var require_react_reconciler_production = __commonJS({
|
|
|
17041
17041
|
}, hasOwnProperty = Object.prototype.hasOwnProperty, prefix, suffix, reentry = false, CapturedStacks = /* @__PURE__ */ new WeakMap(), forkStack = [], forkStackIndex = 0, treeForkProvider = null, treeForkCount = 0, idStack = [], idStackIndex = 0, treeContextProvider = null, treeContextId = 1, treeContextOverflow = "", contextStackCursor = createCursor(null), contextFiberStackCursor = createCursor(null), rootInstanceStackCursor = createCursor(null), hostTransitionProviderCursor = createCursor(null), hydrationParentFiber = null, nextHydratableInstance = null, isHydrating = false, hydrationErrors = null, rootOrSingletonContext = false, HydrationMismatchException = Error(formatProdErrorMessage(519)), valueCursor = createCursor(null), currentlyRenderingFiber$1 = null, lastContextDependency = null, AbortControllerLocal = "undefined" !== typeof AbortController ? AbortController : function() {
|
|
17042
17042
|
var listeners3 = [], signal = this.signal = {
|
|
17043
17043
|
aborted: false,
|
|
17044
|
-
addEventListener: function(
|
|
17044
|
+
addEventListener: function(type2, listener) {
|
|
17045
17045
|
listeners3.push(listener);
|
|
17046
17046
|
}
|
|
17047
17047
|
};
|
|
@@ -17765,10 +17765,10 @@ var require_react_reconciler_development = __commonJS({
|
|
|
17765
17765
|
fiber = fiber.next, id2--;
|
|
17766
17766
|
return fiber;
|
|
17767
17767
|
}
|
|
17768
|
-
function copyWithSetImpl(obj,
|
|
17769
|
-
if (index >=
|
|
17770
|
-
var key =
|
|
17771
|
-
updated[key] = copyWithSetImpl(obj[key],
|
|
17768
|
+
function copyWithSetImpl(obj, path43, index, value) {
|
|
17769
|
+
if (index >= path43.length) return value;
|
|
17770
|
+
var key = path43[index], updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj);
|
|
17771
|
+
updated[key] = copyWithSetImpl(obj[key], path43, index + 1, value);
|
|
17772
17772
|
return updated;
|
|
17773
17773
|
}
|
|
17774
17774
|
function copyWithRename(obj, oldPath, newPath) {
|
|
@@ -17795,11 +17795,11 @@ var require_react_reconciler_development = __commonJS({
|
|
|
17795
17795
|
);
|
|
17796
17796
|
return updated;
|
|
17797
17797
|
}
|
|
17798
|
-
function copyWithDeleteImpl(obj,
|
|
17799
|
-
var key =
|
|
17800
|
-
if (index + 1 ===
|
|
17798
|
+
function copyWithDeleteImpl(obj, path43, index) {
|
|
17799
|
+
var key = path43[index], updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj);
|
|
17800
|
+
if (index + 1 === path43.length)
|
|
17801
17801
|
return isArrayImpl(updated) ? updated.splice(key, 1) : delete updated[key], updated;
|
|
17802
|
-
updated[key] = copyWithDeleteImpl(obj[key],
|
|
17802
|
+
updated[key] = copyWithDeleteImpl(obj[key], path43, index + 1);
|
|
17803
17803
|
return updated;
|
|
17804
17804
|
}
|
|
17805
17805
|
function shouldSuspendImpl() {
|
|
@@ -17972,12 +17972,12 @@ var require_react_reconciler_development = __commonJS({
|
|
|
17972
17972
|
maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
|
|
17973
17973
|
return "function" === typeof maybeIterable ? maybeIterable : null;
|
|
17974
17974
|
}
|
|
17975
|
-
function getComponentNameFromType(
|
|
17976
|
-
if (null ==
|
|
17977
|
-
if ("function" === typeof
|
|
17978
|
-
return
|
|
17979
|
-
if ("string" === typeof
|
|
17980
|
-
switch (
|
|
17975
|
+
function getComponentNameFromType(type2) {
|
|
17976
|
+
if (null == type2) return null;
|
|
17977
|
+
if ("function" === typeof type2)
|
|
17978
|
+
return type2.$$typeof === REACT_CLIENT_REFERENCE ? null : type2.displayName || type2.name || null;
|
|
17979
|
+
if ("string" === typeof type2) return type2;
|
|
17980
|
+
switch (type2) {
|
|
17981
17981
|
case REACT_FRAGMENT_TYPE:
|
|
17982
17982
|
return "Fragment";
|
|
17983
17983
|
case REACT_PROFILER_TYPE:
|
|
@@ -17991,54 +17991,54 @@ var require_react_reconciler_development = __commonJS({
|
|
|
17991
17991
|
case REACT_ACTIVITY_TYPE:
|
|
17992
17992
|
return "Activity";
|
|
17993
17993
|
}
|
|
17994
|
-
if ("object" === typeof
|
|
17995
|
-
switch ("number" === typeof
|
|
17994
|
+
if ("object" === typeof type2)
|
|
17995
|
+
switch ("number" === typeof type2.tag && console.error(
|
|
17996
17996
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
17997
|
-
),
|
|
17997
|
+
), type2.$$typeof) {
|
|
17998
17998
|
case REACT_PORTAL_TYPE:
|
|
17999
17999
|
return "Portal";
|
|
18000
18000
|
case REACT_CONTEXT_TYPE:
|
|
18001
|
-
return
|
|
18001
|
+
return type2.displayName || "Context";
|
|
18002
18002
|
case REACT_CONSUMER_TYPE:
|
|
18003
|
-
return (
|
|
18003
|
+
return (type2._context.displayName || "Context") + ".Consumer";
|
|
18004
18004
|
case REACT_FORWARD_REF_TYPE:
|
|
18005
|
-
var innerType =
|
|
18006
|
-
|
|
18007
|
-
|
|
18008
|
-
return
|
|
18005
|
+
var innerType = type2.render;
|
|
18006
|
+
type2 = type2.displayName;
|
|
18007
|
+
type2 || (type2 = innerType.displayName || innerType.name || "", type2 = "" !== type2 ? "ForwardRef(" + type2 + ")" : "ForwardRef");
|
|
18008
|
+
return type2;
|
|
18009
18009
|
case REACT_MEMO_TYPE:
|
|
18010
|
-
return innerType =
|
|
18010
|
+
return innerType = type2.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type2.type) || "Memo";
|
|
18011
18011
|
case REACT_LAZY_TYPE:
|
|
18012
|
-
innerType =
|
|
18013
|
-
|
|
18012
|
+
innerType = type2._payload;
|
|
18013
|
+
type2 = type2._init;
|
|
18014
18014
|
try {
|
|
18015
|
-
return getComponentNameFromType(
|
|
18015
|
+
return getComponentNameFromType(type2(innerType));
|
|
18016
18016
|
} catch (x) {
|
|
18017
18017
|
}
|
|
18018
18018
|
}
|
|
18019
18019
|
return null;
|
|
18020
18020
|
}
|
|
18021
18021
|
function getComponentNameFromFiber(fiber) {
|
|
18022
|
-
var
|
|
18022
|
+
var type2 = fiber.type;
|
|
18023
18023
|
switch (fiber.tag) {
|
|
18024
18024
|
case 31:
|
|
18025
18025
|
return "Activity";
|
|
18026
18026
|
case 24:
|
|
18027
18027
|
return "Cache";
|
|
18028
18028
|
case 9:
|
|
18029
|
-
return (
|
|
18029
|
+
return (type2._context.displayName || "Context") + ".Consumer";
|
|
18030
18030
|
case 10:
|
|
18031
|
-
return
|
|
18031
|
+
return type2.displayName || "Context";
|
|
18032
18032
|
case 18:
|
|
18033
18033
|
return "DehydratedFragment";
|
|
18034
18034
|
case 11:
|
|
18035
|
-
return fiber =
|
|
18035
|
+
return fiber = type2.render, fiber = fiber.displayName || fiber.name || "", type2.displayName || ("" !== fiber ? "ForwardRef(" + fiber + ")" : "ForwardRef");
|
|
18036
18036
|
case 7:
|
|
18037
18037
|
return "Fragment";
|
|
18038
18038
|
case 26:
|
|
18039
18039
|
case 27:
|
|
18040
18040
|
case 5:
|
|
18041
|
-
return
|
|
18041
|
+
return type2;
|
|
18042
18042
|
case 4:
|
|
18043
18043
|
return "Portal";
|
|
18044
18044
|
case 3:
|
|
@@ -18046,9 +18046,9 @@ var require_react_reconciler_development = __commonJS({
|
|
|
18046
18046
|
case 6:
|
|
18047
18047
|
return "Text";
|
|
18048
18048
|
case 16:
|
|
18049
|
-
return getComponentNameFromType(
|
|
18049
|
+
return getComponentNameFromType(type2);
|
|
18050
18050
|
case 8:
|
|
18051
|
-
return
|
|
18051
|
+
return type2 === REACT_STRICT_MODE_TYPE ? "StrictMode" : "Mode";
|
|
18052
18052
|
case 22:
|
|
18053
18053
|
return "Offscreen";
|
|
18054
18054
|
case 12:
|
|
@@ -18065,15 +18065,15 @@ var require_react_reconciler_development = __commonJS({
|
|
|
18065
18065
|
case 0:
|
|
18066
18066
|
case 14:
|
|
18067
18067
|
case 15:
|
|
18068
|
-
if ("function" === typeof
|
|
18069
|
-
return
|
|
18070
|
-
if ("string" === typeof
|
|
18068
|
+
if ("function" === typeof type2)
|
|
18069
|
+
return type2.displayName || type2.name || null;
|
|
18070
|
+
if ("string" === typeof type2) return type2;
|
|
18071
18071
|
break;
|
|
18072
18072
|
case 29:
|
|
18073
|
-
|
|
18074
|
-
if (null !=
|
|
18075
|
-
for (var i =
|
|
18076
|
-
if ("string" === typeof
|
|
18073
|
+
type2 = fiber._debugInfo;
|
|
18074
|
+
if (null != type2) {
|
|
18075
|
+
for (var i = type2.length - 1; 0 <= i; i--)
|
|
18076
|
+
if ("string" === typeof type2[i].name) return type2[i].name;
|
|
18077
18077
|
}
|
|
18078
18078
|
if (null !== fiber.return)
|
|
18079
18079
|
return getComponentNameFromFiber(fiber.return);
|
|
@@ -19344,8 +19344,8 @@ var require_react_reconciler_development = __commonJS({
|
|
|
19344
19344
|
function describePropValue(value, maxLength) {
|
|
19345
19345
|
return "string" !== typeof value || needsEscaping.test(value) ? "{" + describeValue(value, maxLength - 2) + "}" : value.length > maxLength - 2 ? 5 > maxLength ? '"..."' : '"' + value.slice(0, maxLength - 5) + '..."' : '"' + value + '"';
|
|
19346
19346
|
}
|
|
19347
|
-
function describeExpandedElement(
|
|
19348
|
-
var remainingRowLength = 120 - rowPrefix.length -
|
|
19347
|
+
function describeExpandedElement(type2, props, rowPrefix) {
|
|
19348
|
+
var remainingRowLength = 120 - rowPrefix.length - type2.length, properties = [], propName;
|
|
19349
19349
|
for (propName in props)
|
|
19350
19350
|
if (props.hasOwnProperty(propName) && "children" !== propName) {
|
|
19351
19351
|
var propValue = describePropValue(
|
|
@@ -19355,7 +19355,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
19355
19355
|
remainingRowLength -= propName.length + propValue.length + 2;
|
|
19356
19356
|
properties.push(propName + "=" + propValue);
|
|
19357
19357
|
}
|
|
19358
|
-
return 0 === properties.length ? rowPrefix + "<" +
|
|
19358
|
+
return 0 === properties.length ? rowPrefix + "<" + type2 + ">\n" : 0 < remainingRowLength ? rowPrefix + "<" + type2 + " " + properties.join(" ") + ">\n" : rowPrefix + "<" + type2 + "\n" + rowPrefix + " " + properties.join("\n" + rowPrefix + " ") + "\n" + rowPrefix + ">\n";
|
|
19359
19359
|
}
|
|
19360
19360
|
function describePropertiesDiff(clientObject, serverObject, indent2) {
|
|
19361
19361
|
var properties = "", remainingServerProperties = assign({}, serverObject), propName;
|
|
@@ -19372,7 +19372,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
19372
19372
|
), properties += removed(indent2) + _propName + ": " + clientObject + "\n");
|
|
19373
19373
|
return properties;
|
|
19374
19374
|
}
|
|
19375
|
-
function describeElementDiff(
|
|
19375
|
+
function describeElementDiff(type2, clientProps, serverProps, indent2) {
|
|
19376
19376
|
var content = "", serverPropNames = /* @__PURE__ */ new Map();
|
|
19377
19377
|
for (propName$jscomp$0 in serverProps)
|
|
19378
19378
|
serverProps.hasOwnProperty(propName$jscomp$0) && serverPropNames.set(
|
|
@@ -19381,7 +19381,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
19381
19381
|
);
|
|
19382
19382
|
if (1 === serverPropNames.size && serverPropNames.has("children"))
|
|
19383
19383
|
content += describeExpandedElement(
|
|
19384
|
-
|
|
19384
|
+
type2,
|
|
19385
19385
|
clientProps,
|
|
19386
19386
|
indentation(indent2)
|
|
19387
19387
|
);
|
|
@@ -19415,28 +19415,28 @@ var require_react_reconciler_development = __commonJS({
|
|
|
19415
19415
|
content += removed(indent2 + 1) + propName + "=" + describePropValue(serverProps[propName], maxLength) + "\n";
|
|
19416
19416
|
}
|
|
19417
19417
|
});
|
|
19418
|
-
content = "" === content ? indentation(indent2) + "<" +
|
|
19418
|
+
content = "" === content ? indentation(indent2) + "<" + type2 + ">\n" : indentation(indent2) + "<" + type2 + "\n" + content + indentation(indent2) + ">\n";
|
|
19419
19419
|
}
|
|
19420
|
-
|
|
19420
|
+
type2 = serverProps.children;
|
|
19421
19421
|
clientProps = clientProps.children;
|
|
19422
|
-
if ("string" === typeof
|
|
19422
|
+
if ("string" === typeof type2 || "number" === typeof type2 || "bigint" === typeof type2) {
|
|
19423
19423
|
serverPropNames = "";
|
|
19424
19424
|
if ("string" === typeof clientProps || "number" === typeof clientProps || "bigint" === typeof clientProps)
|
|
19425
19425
|
serverPropNames = "" + clientProps;
|
|
19426
|
-
content += describeTextDiff(serverPropNames, "" +
|
|
19426
|
+
content += describeTextDiff(serverPropNames, "" + type2, indent2 + 1);
|
|
19427
19427
|
} else if ("string" === typeof clientProps || "number" === typeof clientProps || "bigint" === typeof clientProps)
|
|
19428
|
-
content = null ==
|
|
19428
|
+
content = null == type2 ? content + describeTextDiff("" + clientProps, null, indent2 + 1) : content + describeTextDiff("" + clientProps, void 0, indent2 + 1);
|
|
19429
19429
|
return content;
|
|
19430
19430
|
}
|
|
19431
19431
|
function describeSiblingFiber(fiber, indent2) {
|
|
19432
|
-
var
|
|
19433
|
-
if (null ===
|
|
19434
|
-
|
|
19432
|
+
var type2 = describeFiberType(fiber);
|
|
19433
|
+
if (null === type2) {
|
|
19434
|
+
type2 = "";
|
|
19435
19435
|
for (fiber = fiber.child; fiber; )
|
|
19436
|
-
|
|
19437
|
-
return
|
|
19436
|
+
type2 += describeSiblingFiber(fiber, indent2), fiber = fiber.sibling;
|
|
19437
|
+
return type2;
|
|
19438
19438
|
}
|
|
19439
|
-
return indentation(indent2) + "<" +
|
|
19439
|
+
return indentation(indent2) + "<" + type2 + ">\n";
|
|
19440
19440
|
}
|
|
19441
19441
|
function describeNode(node, indent2) {
|
|
19442
19442
|
var skipToNode = findNotableNode(node, indent2);
|
|
@@ -23004,9 +23004,9 @@ var require_react_reconciler_development = __commonJS({
|
|
|
23004
23004
|
}
|
|
23005
23005
|
function updateMemoComponent(current2, workInProgress2, Component, nextProps, renderLanes2) {
|
|
23006
23006
|
if (null === current2) {
|
|
23007
|
-
var
|
|
23008
|
-
if ("function" === typeof
|
|
23009
|
-
return Component = resolveFunctionForHotReloading(
|
|
23007
|
+
var type2 = Component.type;
|
|
23008
|
+
if ("function" === typeof type2 && !shouldConstruct(type2) && void 0 === type2.defaultProps && null === Component.compare)
|
|
23009
|
+
return Component = resolveFunctionForHotReloading(type2), workInProgress2.tag = 15, workInProgress2.type = Component, validateFunctionComponentInDev(workInProgress2, type2), updateSimpleMemoComponent(
|
|
23010
23010
|
current2,
|
|
23011
23011
|
workInProgress2,
|
|
23012
23012
|
Component,
|
|
@@ -23025,9 +23025,9 @@ var require_react_reconciler_development = __commonJS({
|
|
|
23025
23025
|
current2.return = workInProgress2;
|
|
23026
23026
|
return workInProgress2.child = current2;
|
|
23027
23027
|
}
|
|
23028
|
-
|
|
23028
|
+
type2 = current2.child;
|
|
23029
23029
|
if (!checkScheduledUpdateOrContext(current2, renderLanes2)) {
|
|
23030
|
-
var prevProps =
|
|
23030
|
+
var prevProps = type2.memoizedProps;
|
|
23031
23031
|
Component = Component.compare;
|
|
23032
23032
|
Component = null !== Component ? Component : shallowEqual;
|
|
23033
23033
|
if (Component(prevProps, nextProps) && current2.ref === workInProgress2.ref)
|
|
@@ -23038,7 +23038,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
23038
23038
|
);
|
|
23039
23039
|
}
|
|
23040
23040
|
workInProgress2.flags |= 1;
|
|
23041
|
-
current2 = createWorkInProgress(
|
|
23041
|
+
current2 = createWorkInProgress(type2, nextProps);
|
|
23042
23042
|
current2.ref = workInProgress2.ref;
|
|
23043
23043
|
current2.return = workInProgress2;
|
|
23044
23044
|
return workInProgress2.child = current2;
|
|
@@ -24663,7 +24663,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
24663
24663
|
finalizeContainerChildren(container, newChildSet);
|
|
24664
24664
|
}
|
|
24665
24665
|
}
|
|
24666
|
-
function updateHostComponent(current2, workInProgress2,
|
|
24666
|
+
function updateHostComponent(current2, workInProgress2, type2, newProps) {
|
|
24667
24667
|
if (supportsMutation)
|
|
24668
24668
|
current2.memoizedProps !== newProps && markUpdate(workInProgress2);
|
|
24669
24669
|
else if (supportsPersistence) {
|
|
@@ -24672,7 +24672,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
24672
24672
|
var currentHostContext = getHostContext();
|
|
24673
24673
|
_oldProps = cloneInstance(
|
|
24674
24674
|
currentInstance,
|
|
24675
|
-
|
|
24675
|
+
type2,
|
|
24676
24676
|
_oldProps,
|
|
24677
24677
|
newProps,
|
|
24678
24678
|
!current2,
|
|
@@ -24680,17 +24680,17 @@ var require_react_reconciler_development = __commonJS({
|
|
|
24680
24680
|
);
|
|
24681
24681
|
_oldProps === currentInstance ? workInProgress2.stateNode = currentInstance : (markCloned(workInProgress2), finalizeInitialChildren(
|
|
24682
24682
|
_oldProps,
|
|
24683
|
-
|
|
24683
|
+
type2,
|
|
24684
24684
|
newProps,
|
|
24685
24685
|
currentHostContext
|
|
24686
24686
|
) && markUpdate(workInProgress2), workInProgress2.stateNode = _oldProps, current2 && appendAllChildren(_oldProps, workInProgress2, false, false));
|
|
24687
24687
|
} else workInProgress2.stateNode = currentInstance;
|
|
24688
24688
|
}
|
|
24689
24689
|
}
|
|
24690
|
-
function preloadInstanceAndSuspendIfNeeded(workInProgress2,
|
|
24691
|
-
if ((workInProgress2.mode & 32) !== NoMode && (null === oldProps ? maySuspendCommit(
|
|
24692
|
-
if (workInProgress2.flags |= 16777216, (renderLanes2 & 335544128) === renderLanes2 || maySuspendCommitInSyncRender(
|
|
24693
|
-
if (preloadInstance(workInProgress2.stateNode,
|
|
24690
|
+
function preloadInstanceAndSuspendIfNeeded(workInProgress2, type2, oldProps, newProps, renderLanes2) {
|
|
24691
|
+
if ((workInProgress2.mode & 32) !== NoMode && (null === oldProps ? maySuspendCommit(type2, newProps) : maySuspendCommitOnUpdate(type2, oldProps, newProps))) {
|
|
24692
|
+
if (workInProgress2.flags |= 16777216, (renderLanes2 & 335544128) === renderLanes2 || maySuspendCommitInSyncRender(type2, newProps))
|
|
24693
|
+
if (preloadInstance(workInProgress2.stateNode, type2, newProps))
|
|
24694
24694
|
workInProgress2.flags |= 8192;
|
|
24695
24695
|
else if (shouldRemainOnPreviousScreen()) workInProgress2.flags |= 8192;
|
|
24696
24696
|
else
|
|
@@ -24780,13 +24780,13 @@ var require_react_reconciler_development = __commonJS({
|
|
|
24780
24780
|
return null;
|
|
24781
24781
|
case 26:
|
|
24782
24782
|
if (supportsResources) {
|
|
24783
|
-
var
|
|
24783
|
+
var type2 = workInProgress2.type, nextResource = workInProgress2.memoizedState;
|
|
24784
24784
|
null === current2 ? (markUpdate(workInProgress2), null !== nextResource ? (bubbleProperties(workInProgress2), preloadResourceAndSuspendIfNeeded(
|
|
24785
24785
|
workInProgress2,
|
|
24786
24786
|
nextResource
|
|
24787
24787
|
)) : (bubbleProperties(workInProgress2), preloadInstanceAndSuspendIfNeeded(
|
|
24788
24788
|
workInProgress2,
|
|
24789
|
-
|
|
24789
|
+
type2,
|
|
24790
24790
|
null,
|
|
24791
24791
|
newProps,
|
|
24792
24792
|
renderLanes2
|
|
@@ -24796,11 +24796,11 @@ var require_react_reconciler_development = __commonJS({
|
|
|
24796
24796
|
)) : (bubbleProperties(workInProgress2), workInProgress2.flags &= -16777217) : (nextResource = current2.memoizedProps, supportsMutation ? nextResource !== newProps && markUpdate(workInProgress2) : updateHostComponent(
|
|
24797
24797
|
current2,
|
|
24798
24798
|
workInProgress2,
|
|
24799
|
-
|
|
24799
|
+
type2,
|
|
24800
24800
|
newProps
|
|
24801
24801
|
), bubbleProperties(workInProgress2), preloadInstanceAndSuspendIfNeeded(
|
|
24802
24802
|
workInProgress2,
|
|
24803
|
-
|
|
24803
|
+
type2,
|
|
24804
24804
|
nextResource,
|
|
24805
24805
|
newProps,
|
|
24806
24806
|
renderLanes2
|
|
@@ -24811,9 +24811,9 @@ var require_react_reconciler_development = __commonJS({
|
|
|
24811
24811
|
if (supportsSingletons) {
|
|
24812
24812
|
popHostContext(workInProgress2);
|
|
24813
24813
|
renderLanes2 = requiredContext(rootInstanceStackCursor.current);
|
|
24814
|
-
|
|
24814
|
+
type2 = workInProgress2.type;
|
|
24815
24815
|
if (null !== current2 && null != workInProgress2.stateNode)
|
|
24816
|
-
supportsMutation ? current2.memoizedProps !== newProps && markUpdate(workInProgress2) : updateHostComponent(current2, workInProgress2,
|
|
24816
|
+
supportsMutation ? current2.memoizedProps !== newProps && markUpdate(workInProgress2) : updateHostComponent(current2, workInProgress2, type2, newProps);
|
|
24817
24817
|
else {
|
|
24818
24818
|
if (!newProps) {
|
|
24819
24819
|
if (null === workInProgress2.stateNode)
|
|
@@ -24825,7 +24825,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
24825
24825
|
}
|
|
24826
24826
|
current2 = getHostContext();
|
|
24827
24827
|
popHydrationState(workInProgress2) ? prepareToHydrateHostInstance(workInProgress2, current2) : (current2 = resolveSingletonInstance(
|
|
24828
|
-
|
|
24828
|
+
type2,
|
|
24829
24829
|
newProps,
|
|
24830
24830
|
renderLanes2,
|
|
24831
24831
|
current2,
|
|
@@ -24837,9 +24837,9 @@ var require_react_reconciler_development = __commonJS({
|
|
|
24837
24837
|
}
|
|
24838
24838
|
case 5:
|
|
24839
24839
|
popHostContext(workInProgress2);
|
|
24840
|
-
|
|
24840
|
+
type2 = workInProgress2.type;
|
|
24841
24841
|
if (null !== current2 && null != workInProgress2.stateNode)
|
|
24842
|
-
updateHostComponent(current2, workInProgress2,
|
|
24842
|
+
updateHostComponent(current2, workInProgress2, type2, newProps);
|
|
24843
24843
|
else {
|
|
24844
24844
|
if (!newProps) {
|
|
24845
24845
|
if (null === workInProgress2.stateNode)
|
|
@@ -24853,7 +24853,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
24853
24853
|
if (popHydrationState(workInProgress2))
|
|
24854
24854
|
prepareToHydrateHostInstance(workInProgress2, nextResource), finalizeHydratedChildren(
|
|
24855
24855
|
workInProgress2.stateNode,
|
|
24856
|
-
|
|
24856
|
+
type2,
|
|
24857
24857
|
newProps,
|
|
24858
24858
|
nextResource
|
|
24859
24859
|
) && (workInProgress2.flags |= 64);
|
|
@@ -24862,7 +24862,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
24862
24862
|
rootInstanceStackCursor.current
|
|
24863
24863
|
);
|
|
24864
24864
|
_rootContainerInstance = createInstance(
|
|
24865
|
-
|
|
24865
|
+
type2,
|
|
24866
24866
|
newProps,
|
|
24867
24867
|
_rootContainerInstance,
|
|
24868
24868
|
nextResource,
|
|
@@ -24873,7 +24873,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
24873
24873
|
workInProgress2.stateNode = _rootContainerInstance;
|
|
24874
24874
|
finalizeInitialChildren(
|
|
24875
24875
|
_rootContainerInstance,
|
|
24876
|
-
|
|
24876
|
+
type2,
|
|
24877
24877
|
newProps,
|
|
24878
24878
|
nextResource
|
|
24879
24879
|
) && markUpdate(workInProgress2);
|
|
@@ -24912,28 +24912,28 @@ var require_react_reconciler_development = __commonJS({
|
|
|
24912
24912
|
);
|
|
24913
24913
|
current2 = workInProgress2.stateNode;
|
|
24914
24914
|
renderLanes2 = workInProgress2.memoizedProps;
|
|
24915
|
-
|
|
24915
|
+
type2 = !didSuspendOrErrorDEV;
|
|
24916
24916
|
newProps = null;
|
|
24917
24917
|
nextResource = hydrationParentFiber;
|
|
24918
24918
|
if (null !== nextResource)
|
|
24919
24919
|
switch (nextResource.tag) {
|
|
24920
24920
|
case 3:
|
|
24921
|
-
|
|
24921
|
+
type2 && (type2 = diffHydratedTextForDevWarnings(
|
|
24922
24922
|
current2,
|
|
24923
24923
|
renderLanes2,
|
|
24924
24924
|
newProps
|
|
24925
|
-
), null !==
|
|
24925
|
+
), null !== type2 && (buildHydrationDiffNode(workInProgress2, 0).serverProps = type2));
|
|
24926
24926
|
break;
|
|
24927
24927
|
case 27:
|
|
24928
24928
|
case 5:
|
|
24929
|
-
newProps = nextResource.memoizedProps,
|
|
24929
|
+
newProps = nextResource.memoizedProps, type2 && (type2 = diffHydratedTextForDevWarnings(
|
|
24930
24930
|
current2,
|
|
24931
24931
|
renderLanes2,
|
|
24932
24932
|
newProps
|
|
24933
|
-
), null !==
|
|
24933
|
+
), null !== type2 && (buildHydrationDiffNode(
|
|
24934
24934
|
workInProgress2,
|
|
24935
24935
|
0
|
|
24936
|
-
).serverProps =
|
|
24936
|
+
).serverProps = type2));
|
|
24937
24937
|
}
|
|
24938
24938
|
hydrateTextInstance(
|
|
24939
24939
|
current2,
|
|
@@ -24995,9 +24995,9 @@ var require_react_reconciler_development = __commonJS({
|
|
|
24995
24995
|
case 13:
|
|
24996
24996
|
newProps = workInProgress2.memoizedState;
|
|
24997
24997
|
if (null === current2 || null !== current2.memoizedState && null !== current2.memoizedState.dehydrated) {
|
|
24998
|
-
|
|
24998
|
+
type2 = newProps;
|
|
24999
24999
|
nextResource = popHydrationState(workInProgress2);
|
|
25000
|
-
if (null !==
|
|
25000
|
+
if (null !== type2 && null !== type2.dehydrated) {
|
|
25001
25001
|
if (null === current2) {
|
|
25002
25002
|
if (!nextResource)
|
|
25003
25003
|
throw Error(
|
|
@@ -25015,13 +25015,13 @@ var require_react_reconciler_development = __commonJS({
|
|
|
25015
25015
|
);
|
|
25016
25016
|
hydrateSuspenseInstance(nextResource, workInProgress2);
|
|
25017
25017
|
bubbleProperties(workInProgress2);
|
|
25018
|
-
(workInProgress2.mode & 2) !== NoMode && null !==
|
|
25018
|
+
(workInProgress2.mode & 2) !== NoMode && null !== type2 && (type2 = workInProgress2.child, null !== type2 && (workInProgress2.treeBaseDuration -= type2.treeBaseDuration));
|
|
25019
25019
|
} else
|
|
25020
|
-
emitPendingHydrationWarnings(), resetHydrationState(), 0 === (workInProgress2.flags & 128) && (
|
|
25021
|
-
|
|
25020
|
+
emitPendingHydrationWarnings(), resetHydrationState(), 0 === (workInProgress2.flags & 128) && (type2 = workInProgress2.memoizedState = null), workInProgress2.flags |= 4, bubbleProperties(workInProgress2), (workInProgress2.mode & 2) !== NoMode && null !== type2 && (type2 = workInProgress2.child, null !== type2 && (workInProgress2.treeBaseDuration -= type2.treeBaseDuration));
|
|
25021
|
+
type2 = false;
|
|
25022
25022
|
} else
|
|
25023
|
-
|
|
25024
|
-
if (!
|
|
25023
|
+
type2 = upgradeHydrationErrorsToRecoverable(), null !== current2 && null !== current2.memoizedState && (current2.memoizedState.hydrationErrors = type2), type2 = true;
|
|
25024
|
+
if (!type2) {
|
|
25025
25025
|
if (workInProgress2.flags & 256)
|
|
25026
25026
|
return popSuspenseHandler(workInProgress2), workInProgress2;
|
|
25027
25027
|
popSuspenseHandler(workInProgress2);
|
|
@@ -25033,7 +25033,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
25033
25033
|
return workInProgress2.lanes = renderLanes2, (workInProgress2.mode & 2) !== NoMode && transferActualDuration(workInProgress2), workInProgress2;
|
|
25034
25034
|
renderLanes2 = null !== newProps;
|
|
25035
25035
|
current2 = null !== current2 && null !== current2.memoizedState;
|
|
25036
|
-
renderLanes2 && (newProps = workInProgress2.child,
|
|
25036
|
+
renderLanes2 && (newProps = workInProgress2.child, type2 = null, null !== newProps.alternate && null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type2 = newProps.alternate.memoizedState.cachePool.pool), nextResource = null, null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && (nextResource = newProps.memoizedState.cachePool.pool), nextResource !== type2 && (newProps.flags |= 2048));
|
|
25037
25037
|
renderLanes2 !== current2 && renderLanes2 && (workInProgress2.child.flags |= 8192);
|
|
25038
25038
|
scheduleRetryEffect(workInProgress2, workInProgress2.updateQueue);
|
|
25039
25039
|
bubbleProperties(workInProgress2);
|
|
@@ -25047,10 +25047,10 @@ var require_react_reconciler_development = __commonJS({
|
|
|
25047
25047
|
pop(suspenseStackCursor, workInProgress2);
|
|
25048
25048
|
newProps = workInProgress2.memoizedState;
|
|
25049
25049
|
if (null === newProps) return bubbleProperties(workInProgress2), null;
|
|
25050
|
-
|
|
25050
|
+
type2 = 0 !== (workInProgress2.flags & 128);
|
|
25051
25051
|
nextResource = newProps.rendering;
|
|
25052
25052
|
if (null === nextResource)
|
|
25053
|
-
if (
|
|
25053
|
+
if (type2) cutOffTailIfNeeded(newProps, false);
|
|
25054
25054
|
else {
|
|
25055
25055
|
if (workInProgressRootExitStatus !== RootInProgress || null !== current2 && 0 !== (current2.flags & 128))
|
|
25056
25056
|
for (current2 = workInProgress2.child; null !== current2; ) {
|
|
@@ -25075,19 +25075,19 @@ var require_react_reconciler_development = __commonJS({
|
|
|
25075
25075
|
}
|
|
25076
25076
|
current2 = current2.sibling;
|
|
25077
25077
|
}
|
|
25078
|
-
null !== newProps.tail && now$1() > workInProgressRootRenderTargetTime && (workInProgress2.flags |= 128,
|
|
25078
|
+
null !== newProps.tail && now$1() > workInProgressRootRenderTargetTime && (workInProgress2.flags |= 128, type2 = true, cutOffTailIfNeeded(newProps, false), workInProgress2.lanes = 4194304);
|
|
25079
25079
|
}
|
|
25080
25080
|
else {
|
|
25081
|
-
if (!
|
|
25081
|
+
if (!type2)
|
|
25082
25082
|
if (current2 = findFirstSuspended(nextResource), null !== current2) {
|
|
25083
|
-
if (workInProgress2.flags |= 128,
|
|
25083
|
+
if (workInProgress2.flags |= 128, type2 = true, current2 = current2.updateQueue, workInProgress2.updateQueue = current2, scheduleRetryEffect(workInProgress2, current2), cutOffTailIfNeeded(newProps, true), null === newProps.tail && "hidden" === newProps.tailMode && !nextResource.alternate && !isHydrating)
|
|
25084
25084
|
return bubbleProperties(workInProgress2), null;
|
|
25085
25085
|
} else
|
|
25086
|
-
2 * now$1() - newProps.renderingStartTime > workInProgressRootRenderTargetTime && 536870912 !== renderLanes2 && (workInProgress2.flags |= 128,
|
|
25086
|
+
2 * now$1() - newProps.renderingStartTime > workInProgressRootRenderTargetTime && 536870912 !== renderLanes2 && (workInProgress2.flags |= 128, type2 = true, cutOffTailIfNeeded(newProps, false), workInProgress2.lanes = 4194304);
|
|
25087
25087
|
newProps.isBackwards ? (nextResource.sibling = workInProgress2.child, workInProgress2.child = nextResource) : (current2 = newProps.last, null !== current2 ? current2.sibling = nextResource : workInProgress2.child = nextResource, newProps.last = nextResource);
|
|
25088
25088
|
}
|
|
25089
25089
|
if (null !== newProps.tail)
|
|
25090
|
-
return current2 = newProps.tail, newProps.rendering = current2, newProps.tail = current2.sibling, newProps.renderingStartTime = now$1(), current2.sibling = null, renderLanes2 = suspenseStackCursor.current, renderLanes2 =
|
|
25090
|
+
return current2 = newProps.tail, newProps.rendering = current2, newProps.tail = current2.sibling, newProps.renderingStartTime = now$1(), current2.sibling = null, renderLanes2 = suspenseStackCursor.current, renderLanes2 = type2 ? renderLanes2 & SubtreeSuspenseContextMask | ForceSuspenseFallback : renderLanes2 & SubtreeSuspenseContextMask, push(suspenseStackCursor, renderLanes2, workInProgress2), isHydrating && pushTreeFork(workInProgress2, newProps.treeForkCount), current2;
|
|
25091
25091
|
bubbleProperties(workInProgress2);
|
|
25092
25092
|
return null;
|
|
25093
25093
|
case 22:
|
|
@@ -25460,13 +25460,13 @@ var require_react_reconciler_development = __commonJS({
|
|
|
25460
25460
|
);
|
|
25461
25461
|
}
|
|
25462
25462
|
function commitHostMount(finishedWork) {
|
|
25463
|
-
var
|
|
25463
|
+
var type2 = finishedWork.type, props = finishedWork.memoizedProps, instance = finishedWork.stateNode;
|
|
25464
25464
|
try {
|
|
25465
25465
|
runWithFiberInDEV(
|
|
25466
25466
|
finishedWork,
|
|
25467
25467
|
commitMount,
|
|
25468
25468
|
instance,
|
|
25469
|
-
|
|
25469
|
+
type2,
|
|
25470
25470
|
props,
|
|
25471
25471
|
finishedWork
|
|
25472
25472
|
);
|
|
@@ -27148,9 +27148,9 @@ var require_react_reconciler_development = __commonJS({
|
|
|
27148
27148
|
fiber.memoizedProps
|
|
27149
27149
|
);
|
|
27150
27150
|
else {
|
|
27151
|
-
var instance = fiber.stateNode,
|
|
27151
|
+
var instance = fiber.stateNode, type2 = fiber.type;
|
|
27152
27152
|
fiber = fiber.memoizedProps;
|
|
27153
|
-
((committedLanes & 335544128) === committedLanes || maySuspendCommitInSyncRender(
|
|
27153
|
+
((committedLanes & 335544128) === committedLanes || maySuspendCommitInSyncRender(type2, fiber)) && suspendInstance(suspendedState, instance, type2, fiber);
|
|
27154
27154
|
}
|
|
27155
27155
|
break;
|
|
27156
27156
|
case 5:
|
|
@@ -27159,7 +27159,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
27159
27159
|
committedLanes,
|
|
27160
27160
|
suspendedState
|
|
27161
27161
|
);
|
|
27162
|
-
fiber.flags & suspenseyCommitFlag && (instance = fiber.stateNode,
|
|
27162
|
+
fiber.flags & suspenseyCommitFlag && (instance = fiber.stateNode, type2 = fiber.type, fiber = fiber.memoizedProps, ((committedLanes & 335544128) === committedLanes || maySuspendCommitInSyncRender(type2, fiber)) && suspendInstance(suspendedState, instance, type2, fiber));
|
|
27163
27163
|
break;
|
|
27164
27164
|
case 3:
|
|
27165
27165
|
case 4:
|
|
@@ -28340,8 +28340,8 @@ var require_react_reconciler_development = __commonJS({
|
|
|
28340
28340
|
resource = workInProgress.memoizedState;
|
|
28341
28341
|
case 5:
|
|
28342
28342
|
case 27:
|
|
28343
|
-
var hostFiber = workInProgress,
|
|
28344
|
-
if (resource ? preloadResource(resource) : preloadInstance(hostFiber.stateNode,
|
|
28343
|
+
var hostFiber = workInProgress, type2 = hostFiber.type, props = hostFiber.pendingProps;
|
|
28344
|
+
if (resource ? preloadResource(resource) : preloadInstance(hostFiber.stateNode, type2, props)) {
|
|
28345
28345
|
workInProgressSuspendedReason = NotSuspended;
|
|
28346
28346
|
workInProgressThrownValue = null;
|
|
28347
28347
|
var sibling = hostFiber.sibling;
|
|
@@ -29193,15 +29193,15 @@ var require_react_reconciler_development = __commonJS({
|
|
|
29193
29193
|
);
|
|
29194
29194
|
});
|
|
29195
29195
|
}
|
|
29196
|
-
function resolveFunctionForHotReloading(
|
|
29197
|
-
if (null === resolveFamily) return
|
|
29198
|
-
var family = resolveFamily(
|
|
29199
|
-
return void 0 === family ?
|
|
29196
|
+
function resolveFunctionForHotReloading(type2) {
|
|
29197
|
+
if (null === resolveFamily) return type2;
|
|
29198
|
+
var family = resolveFamily(type2);
|
|
29199
|
+
return void 0 === family ? type2 : family.current;
|
|
29200
29200
|
}
|
|
29201
|
-
function resolveForwardRefForHotReloading(
|
|
29202
|
-
if (null === resolveFamily) return
|
|
29203
|
-
var family = resolveFamily(
|
|
29204
|
-
return void 0 === family ? null !==
|
|
29201
|
+
function resolveForwardRefForHotReloading(type2) {
|
|
29202
|
+
if (null === resolveFamily) return type2;
|
|
29203
|
+
var family = resolveFamily(type2);
|
|
29204
|
+
return void 0 === family ? null !== type2 && void 0 !== type2 && "function" === typeof type2.render && (family = resolveFunctionForHotReloading(type2.render), type2.render !== family) ? (family = { $$typeof: REACT_FORWARD_REF_TYPE, render: family }, void 0 !== type2.displayName && (family.displayName = type2.displayName), family) : type2 : family.current;
|
|
29205
29205
|
}
|
|
29206
29206
|
function isCompatibleFamilyForHotReloading(fiber, element) {
|
|
29207
29207
|
if (null === resolveFamily) return false;
|
|
@@ -29339,14 +29339,14 @@ var require_react_reconciler_development = __commonJS({
|
|
|
29339
29339
|
}, workInProgress2.selfBaseDuration = current2.selfBaseDuration, workInProgress2.treeBaseDuration = current2.treeBaseDuration);
|
|
29340
29340
|
return workInProgress2;
|
|
29341
29341
|
}
|
|
29342
|
-
function createFiberFromTypeAndProps(
|
|
29343
|
-
var fiberTag = 0, resolvedType =
|
|
29344
|
-
if ("function" === typeof
|
|
29345
|
-
shouldConstruct(
|
|
29346
|
-
else if ("string" === typeof
|
|
29347
|
-
supportsResources && supportsSingletons ? (fiberTag = getHostContext(), fiberTag = isHostHoistableType(
|
|
29342
|
+
function createFiberFromTypeAndProps(type2, key, pendingProps, owner, mode, lanes) {
|
|
29343
|
+
var fiberTag = 0, resolvedType = type2;
|
|
29344
|
+
if ("function" === typeof type2)
|
|
29345
|
+
shouldConstruct(type2) && (fiberTag = 1), resolvedType = resolveFunctionForHotReloading(resolvedType);
|
|
29346
|
+
else if ("string" === typeof type2)
|
|
29347
|
+
supportsResources && supportsSingletons ? (fiberTag = getHostContext(), fiberTag = isHostHoistableType(type2, pendingProps, fiberTag) ? 26 : isHostSingletonType(type2) ? 27 : 5) : supportsResources ? (fiberTag = getHostContext(), fiberTag = isHostHoistableType(type2, pendingProps, fiberTag) ? 26 : 5) : fiberTag = supportsSingletons ? isHostSingletonType(type2) ? 27 : 5 : 5;
|
|
29348
29348
|
else
|
|
29349
|
-
a: switch (
|
|
29349
|
+
a: switch (type2) {
|
|
29350
29350
|
case REACT_ACTIVITY_TYPE:
|
|
29351
29351
|
return key = createFiber(31, pendingProps, key, mode), key.elementType = REACT_ACTIVITY_TYPE, key.lanes = lanes, key;
|
|
29352
29352
|
case REACT_FRAGMENT_TYPE:
|
|
@@ -29361,17 +29361,17 @@ var require_react_reconciler_development = __commonJS({
|
|
|
29361
29361
|
mode |= 24;
|
|
29362
29362
|
break;
|
|
29363
29363
|
case REACT_PROFILER_TYPE:
|
|
29364
|
-
return
|
|
29364
|
+
return type2 = pendingProps, owner = mode, "string" !== typeof type2.id && console.error(
|
|
29365
29365
|
'Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',
|
|
29366
|
-
typeof
|
|
29367
|
-
), key = createFiber(12,
|
|
29366
|
+
typeof type2.id
|
|
29367
|
+
), key = createFiber(12, type2, key, owner | 2), key.elementType = REACT_PROFILER_TYPE, key.lanes = lanes, key.stateNode = { effectDuration: 0, passiveEffectDuration: 0 }, key;
|
|
29368
29368
|
case REACT_SUSPENSE_TYPE:
|
|
29369
29369
|
return key = createFiber(13, pendingProps, key, mode), key.elementType = REACT_SUSPENSE_TYPE, key.lanes = lanes, key;
|
|
29370
29370
|
case REACT_SUSPENSE_LIST_TYPE:
|
|
29371
29371
|
return key = createFiber(19, pendingProps, key, mode), key.elementType = REACT_SUSPENSE_LIST_TYPE, key.lanes = lanes, key;
|
|
29372
29372
|
default:
|
|
29373
|
-
if ("object" === typeof
|
|
29374
|
-
switch (
|
|
29373
|
+
if ("object" === typeof type2 && null !== type2)
|
|
29374
|
+
switch (type2.$$typeof) {
|
|
29375
29375
|
case REACT_CONTEXT_TYPE:
|
|
29376
29376
|
fiberTag = 10;
|
|
29377
29377
|
break a;
|
|
@@ -29391,9 +29391,9 @@ var require_react_reconciler_development = __commonJS({
|
|
|
29391
29391
|
break a;
|
|
29392
29392
|
}
|
|
29393
29393
|
resolvedType = "";
|
|
29394
|
-
if (void 0 ===
|
|
29394
|
+
if (void 0 === type2 || "object" === typeof type2 && null !== type2 && 0 === Object.keys(type2).length)
|
|
29395
29395
|
resolvedType += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
|
|
29396
|
-
null ===
|
|
29396
|
+
null === type2 ? pendingProps = "null" : isArrayImpl(type2) ? pendingProps = "array" : void 0 !== type2 && type2.$$typeof === REACT_ELEMENT_TYPE ? (pendingProps = "<" + (getComponentNameFromType(type2.type) || "Unknown") + " />", resolvedType = " Did you accidentally export a JSX literal instead of a component?") : pendingProps = typeof type2;
|
|
29397
29397
|
fiberTag = owner ? "number" === typeof owner.tag ? getComponentNameFromFiber(owner) : "string" === typeof owner.name ? owner.name : null : null;
|
|
29398
29398
|
fiberTag && (resolvedType += "\n\nCheck the render method of `" + fiberTag + "`.");
|
|
29399
29399
|
fiberTag = 29;
|
|
@@ -29403,7 +29403,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
29403
29403
|
resolvedType = null;
|
|
29404
29404
|
}
|
|
29405
29405
|
key = createFiber(fiberTag, pendingProps, key, mode);
|
|
29406
|
-
key.elementType =
|
|
29406
|
+
key.elementType = type2;
|
|
29407
29407
|
key.type = resolvedType;
|
|
29408
29408
|
key.lanes = lanes;
|
|
29409
29409
|
key._debugOwner = owner;
|
|
@@ -29668,7 +29668,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
29668
29668
|
var currentlyRenderingFiber$1 = null, lastContextDependency = null, isDisallowedContextReadInDEV = false, AbortControllerLocal = "undefined" !== typeof AbortController ? AbortController : function() {
|
|
29669
29669
|
var listeners3 = [], signal = this.signal = {
|
|
29670
29670
|
aborted: false,
|
|
29671
|
-
addEventListener: function(
|
|
29671
|
+
addEventListener: function(type2, listener) {
|
|
29672
29672
|
listeners3.push(listener);
|
|
29673
29673
|
}
|
|
29674
29674
|
};
|
|
@@ -31076,29 +31076,29 @@ var require_react_reconciler_development = __commonJS({
|
|
|
31076
31076
|
var didWarnAboutNestedUpdates = false;
|
|
31077
31077
|
var didWarnAboutFindNodeInStrictMode = {};
|
|
31078
31078
|
var overrideHookState = null, overrideHookStateDeletePath = null, overrideHookStateRenamePath = null, overrideProps = null, overridePropsDeletePath = null, overridePropsRenamePath = null, scheduleUpdate = null, scheduleRetry = null, setErrorHandler = null, setSuspenseHandler = null;
|
|
31079
|
-
overrideHookState = function(fiber, id2,
|
|
31079
|
+
overrideHookState = function(fiber, id2, path43, value) {
|
|
31080
31080
|
id2 = findHook(fiber, id2);
|
|
31081
|
-
null !== id2 && (
|
|
31081
|
+
null !== id2 && (path43 = copyWithSetImpl(id2.memoizedState, path43, 0, value), id2.memoizedState = path43, id2.baseState = path43, fiber.memoizedProps = assign({}, fiber.memoizedProps), path43 = enqueueConcurrentRenderForLane(fiber, 2), null !== path43 && scheduleUpdateOnFiber(path43, fiber, 2));
|
|
31082
31082
|
};
|
|
31083
|
-
overrideHookStateDeletePath = function(fiber, id2,
|
|
31083
|
+
overrideHookStateDeletePath = function(fiber, id2, path43) {
|
|
31084
31084
|
id2 = findHook(fiber, id2);
|
|
31085
|
-
null !== id2 && (
|
|
31085
|
+
null !== id2 && (path43 = copyWithDeleteImpl(id2.memoizedState, path43, 0), id2.memoizedState = path43, id2.baseState = path43, fiber.memoizedProps = assign({}, fiber.memoizedProps), path43 = enqueueConcurrentRenderForLane(fiber, 2), null !== path43 && scheduleUpdateOnFiber(path43, fiber, 2));
|
|
31086
31086
|
};
|
|
31087
31087
|
overrideHookStateRenamePath = function(fiber, id2, oldPath, newPath) {
|
|
31088
31088
|
id2 = findHook(fiber, id2);
|
|
31089
31089
|
null !== id2 && (oldPath = copyWithRename(id2.memoizedState, oldPath, newPath), id2.memoizedState = oldPath, id2.baseState = oldPath, fiber.memoizedProps = assign({}, fiber.memoizedProps), oldPath = enqueueConcurrentRenderForLane(fiber, 2), null !== oldPath && scheduleUpdateOnFiber(oldPath, fiber, 2));
|
|
31090
31090
|
};
|
|
31091
|
-
overrideProps = function(fiber,
|
|
31092
|
-
fiber.pendingProps = copyWithSetImpl(fiber.memoizedProps,
|
|
31091
|
+
overrideProps = function(fiber, path43, value) {
|
|
31092
|
+
fiber.pendingProps = copyWithSetImpl(fiber.memoizedProps, path43, 0, value);
|
|
31093
31093
|
fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);
|
|
31094
|
-
|
|
31095
|
-
null !==
|
|
31094
|
+
path43 = enqueueConcurrentRenderForLane(fiber, 2);
|
|
31095
|
+
null !== path43 && scheduleUpdateOnFiber(path43, fiber, 2);
|
|
31096
31096
|
};
|
|
31097
|
-
overridePropsDeletePath = function(fiber,
|
|
31098
|
-
fiber.pendingProps = copyWithDeleteImpl(fiber.memoizedProps,
|
|
31097
|
+
overridePropsDeletePath = function(fiber, path43) {
|
|
31098
|
+
fiber.pendingProps = copyWithDeleteImpl(fiber.memoizedProps, path43, 0);
|
|
31099
31099
|
fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);
|
|
31100
|
-
|
|
31101
|
-
null !==
|
|
31100
|
+
path43 = enqueueConcurrentRenderForLane(fiber, 2);
|
|
31101
|
+
null !== path43 && scheduleUpdateOnFiber(path43, fiber, 2);
|
|
31102
31102
|
};
|
|
31103
31103
|
overridePropsRenamePath = function(fiber, oldPath, newPath) {
|
|
31104
31104
|
fiber.pendingProps = copyWithRename(
|
|
@@ -31971,7 +31971,7 @@ var require_react_jsx_runtime_production = __commonJS({
|
|
|
31971
31971
|
init_esm_shims();
|
|
31972
31972
|
var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element");
|
|
31973
31973
|
var REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
31974
|
-
function jsxProd(
|
|
31974
|
+
function jsxProd(type2, config2, maybeKey) {
|
|
31975
31975
|
var key = null;
|
|
31976
31976
|
void 0 !== maybeKey && (key = "" + maybeKey);
|
|
31977
31977
|
void 0 !== config2.key && (key = "" + config2.key);
|
|
@@ -31983,7 +31983,7 @@ var require_react_jsx_runtime_production = __commonJS({
|
|
|
31983
31983
|
config2 = maybeKey.ref;
|
|
31984
31984
|
return {
|
|
31985
31985
|
$$typeof: REACT_ELEMENT_TYPE,
|
|
31986
|
-
type,
|
|
31986
|
+
type: type2,
|
|
31987
31987
|
key,
|
|
31988
31988
|
ref: void 0 !== config2 ? config2 : null,
|
|
31989
31989
|
props: maybeKey
|
|
@@ -32001,12 +32001,12 @@ var require_react_jsx_runtime_development = __commonJS({
|
|
|
32001
32001
|
"use strict";
|
|
32002
32002
|
init_esm_shims();
|
|
32003
32003
|
"production" !== process.env.NODE_ENV && (function() {
|
|
32004
|
-
function getComponentNameFromType(
|
|
32005
|
-
if (null ==
|
|
32006
|
-
if ("function" === typeof
|
|
32007
|
-
return
|
|
32008
|
-
if ("string" === typeof
|
|
32009
|
-
switch (
|
|
32004
|
+
function getComponentNameFromType(type2) {
|
|
32005
|
+
if (null == type2) return null;
|
|
32006
|
+
if ("function" === typeof type2)
|
|
32007
|
+
return type2.$$typeof === REACT_CLIENT_REFERENCE ? null : type2.displayName || type2.name || null;
|
|
32008
|
+
if ("string" === typeof type2) return type2;
|
|
32009
|
+
switch (type2) {
|
|
32010
32010
|
case REACT_FRAGMENT_TYPE:
|
|
32011
32011
|
return "Fragment";
|
|
32012
32012
|
case REACT_PROFILER_TYPE:
|
|
@@ -32020,28 +32020,28 @@ var require_react_jsx_runtime_development = __commonJS({
|
|
|
32020
32020
|
case REACT_ACTIVITY_TYPE:
|
|
32021
32021
|
return "Activity";
|
|
32022
32022
|
}
|
|
32023
|
-
if ("object" === typeof
|
|
32024
|
-
switch ("number" === typeof
|
|
32023
|
+
if ("object" === typeof type2)
|
|
32024
|
+
switch ("number" === typeof type2.tag && console.error(
|
|
32025
32025
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
32026
|
-
),
|
|
32026
|
+
), type2.$$typeof) {
|
|
32027
32027
|
case REACT_PORTAL_TYPE:
|
|
32028
32028
|
return "Portal";
|
|
32029
32029
|
case REACT_CONTEXT_TYPE:
|
|
32030
|
-
return
|
|
32030
|
+
return type2.displayName || "Context";
|
|
32031
32031
|
case REACT_CONSUMER_TYPE:
|
|
32032
|
-
return (
|
|
32032
|
+
return (type2._context.displayName || "Context") + ".Consumer";
|
|
32033
32033
|
case REACT_FORWARD_REF_TYPE:
|
|
32034
|
-
var innerType =
|
|
32035
|
-
|
|
32036
|
-
|
|
32037
|
-
return
|
|
32034
|
+
var innerType = type2.render;
|
|
32035
|
+
type2 = type2.displayName;
|
|
32036
|
+
type2 || (type2 = innerType.displayName || innerType.name || "", type2 = "" !== type2 ? "ForwardRef(" + type2 + ")" : "ForwardRef");
|
|
32037
|
+
return type2;
|
|
32038
32038
|
case REACT_MEMO_TYPE:
|
|
32039
|
-
return innerType =
|
|
32039
|
+
return innerType = type2.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type2.type) || "Memo";
|
|
32040
32040
|
case REACT_LAZY_TYPE:
|
|
32041
|
-
innerType =
|
|
32042
|
-
|
|
32041
|
+
innerType = type2._payload;
|
|
32042
|
+
type2 = type2._init;
|
|
32043
32043
|
try {
|
|
32044
|
-
return getComponentNameFromType(
|
|
32044
|
+
return getComponentNameFromType(type2(innerType));
|
|
32045
32045
|
} catch (x) {
|
|
32046
32046
|
}
|
|
32047
32047
|
}
|
|
@@ -32069,12 +32069,12 @@ var require_react_jsx_runtime_development = __commonJS({
|
|
|
32069
32069
|
return testStringCoercion(value);
|
|
32070
32070
|
}
|
|
32071
32071
|
}
|
|
32072
|
-
function getTaskName(
|
|
32073
|
-
if (
|
|
32074
|
-
if ("object" === typeof
|
|
32072
|
+
function getTaskName(type2) {
|
|
32073
|
+
if (type2 === REACT_FRAGMENT_TYPE) return "<>";
|
|
32074
|
+
if ("object" === typeof type2 && null !== type2 && type2.$$typeof === REACT_LAZY_TYPE)
|
|
32075
32075
|
return "<...>";
|
|
32076
32076
|
try {
|
|
32077
|
-
var name = getComponentNameFromType(
|
|
32077
|
+
var name = getComponentNameFromType(type2);
|
|
32078
32078
|
return name ? "<" + name + ">" : "<...>";
|
|
32079
32079
|
} catch (x) {
|
|
32080
32080
|
return "<...>";
|
|
@@ -32115,48 +32115,48 @@ var require_react_jsx_runtime_development = __commonJS({
|
|
|
32115
32115
|
componentName = this.props.ref;
|
|
32116
32116
|
return void 0 !== componentName ? componentName : null;
|
|
32117
32117
|
}
|
|
32118
|
-
function ReactElement(
|
|
32118
|
+
function ReactElement(type2, key, props, owner, debugStack, debugTask) {
|
|
32119
32119
|
var refProp = props.ref;
|
|
32120
|
-
|
|
32120
|
+
type2 = {
|
|
32121
32121
|
$$typeof: REACT_ELEMENT_TYPE,
|
|
32122
|
-
type,
|
|
32122
|
+
type: type2,
|
|
32123
32123
|
key,
|
|
32124
32124
|
props,
|
|
32125
32125
|
_owner: owner
|
|
32126
32126
|
};
|
|
32127
|
-
null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(
|
|
32127
|
+
null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type2, "ref", {
|
|
32128
32128
|
enumerable: false,
|
|
32129
32129
|
get: elementRefGetterWithDeprecationWarning
|
|
32130
|
-
}) : Object.defineProperty(
|
|
32131
|
-
|
|
32132
|
-
Object.defineProperty(
|
|
32130
|
+
}) : Object.defineProperty(type2, "ref", { enumerable: false, value: null });
|
|
32131
|
+
type2._store = {};
|
|
32132
|
+
Object.defineProperty(type2._store, "validated", {
|
|
32133
32133
|
configurable: false,
|
|
32134
32134
|
enumerable: false,
|
|
32135
32135
|
writable: true,
|
|
32136
32136
|
value: 0
|
|
32137
32137
|
});
|
|
32138
|
-
Object.defineProperty(
|
|
32138
|
+
Object.defineProperty(type2, "_debugInfo", {
|
|
32139
32139
|
configurable: false,
|
|
32140
32140
|
enumerable: false,
|
|
32141
32141
|
writable: true,
|
|
32142
32142
|
value: null
|
|
32143
32143
|
});
|
|
32144
|
-
Object.defineProperty(
|
|
32144
|
+
Object.defineProperty(type2, "_debugStack", {
|
|
32145
32145
|
configurable: false,
|
|
32146
32146
|
enumerable: false,
|
|
32147
32147
|
writable: true,
|
|
32148
32148
|
value: debugStack
|
|
32149
32149
|
});
|
|
32150
|
-
Object.defineProperty(
|
|
32150
|
+
Object.defineProperty(type2, "_debugTask", {
|
|
32151
32151
|
configurable: false,
|
|
32152
32152
|
enumerable: false,
|
|
32153
32153
|
writable: true,
|
|
32154
32154
|
value: debugTask
|
|
32155
32155
|
});
|
|
32156
|
-
Object.freeze && (Object.freeze(
|
|
32157
|
-
return
|
|
32156
|
+
Object.freeze && (Object.freeze(type2.props), Object.freeze(type2));
|
|
32157
|
+
return type2;
|
|
32158
32158
|
}
|
|
32159
|
-
function jsxDEVImpl(
|
|
32159
|
+
function jsxDEVImpl(type2, config2, maybeKey, isStaticChildren, debugStack, debugTask) {
|
|
32160
32160
|
var children = config2.children;
|
|
32161
32161
|
if (void 0 !== children)
|
|
32162
32162
|
if (isStaticChildren)
|
|
@@ -32170,7 +32170,7 @@ var require_react_jsx_runtime_development = __commonJS({
|
|
|
32170
32170
|
);
|
|
32171
32171
|
else validateChildKeys(children);
|
|
32172
32172
|
if (hasOwnProperty.call(config2, "key")) {
|
|
32173
|
-
children = getComponentNameFromType(
|
|
32173
|
+
children = getComponentNameFromType(type2);
|
|
32174
32174
|
var keys = Object.keys(config2).filter(function(k) {
|
|
32175
32175
|
return "key" !== k;
|
|
32176
32176
|
});
|
|
@@ -32193,10 +32193,10 @@ var require_react_jsx_runtime_development = __commonJS({
|
|
|
32193
32193
|
} else maybeKey = config2;
|
|
32194
32194
|
children && defineKeyPropWarningGetter(
|
|
32195
32195
|
maybeKey,
|
|
32196
|
-
"function" === typeof
|
|
32196
|
+
"function" === typeof type2 ? type2.displayName || type2.name || "Unknown" : type2
|
|
32197
32197
|
);
|
|
32198
32198
|
return ReactElement(
|
|
32199
|
-
|
|
32199
|
+
type2,
|
|
32200
32200
|
children,
|
|
32201
32201
|
maybeKey,
|
|
32202
32202
|
getOwner(),
|
|
@@ -32227,26 +32227,26 @@ var require_react_jsx_runtime_development = __commonJS({
|
|
|
32227
32227
|
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
32228
32228
|
var didWarnAboutKeySpread = {};
|
|
32229
32229
|
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
32230
|
-
exports.jsx = function(
|
|
32230
|
+
exports.jsx = function(type2, config2, maybeKey) {
|
|
32231
32231
|
var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
32232
32232
|
return jsxDEVImpl(
|
|
32233
|
-
|
|
32233
|
+
type2,
|
|
32234
32234
|
config2,
|
|
32235
32235
|
maybeKey,
|
|
32236
32236
|
false,
|
|
32237
32237
|
trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
|
|
32238
|
-
trackActualOwner ? createTask(getTaskName(
|
|
32238
|
+
trackActualOwner ? createTask(getTaskName(type2)) : unknownOwnerDebugTask
|
|
32239
32239
|
);
|
|
32240
32240
|
};
|
|
32241
|
-
exports.jsxs = function(
|
|
32241
|
+
exports.jsxs = function(type2, config2, maybeKey) {
|
|
32242
32242
|
var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
32243
32243
|
return jsxDEVImpl(
|
|
32244
|
-
|
|
32244
|
+
type2,
|
|
32245
32245
|
config2,
|
|
32246
32246
|
maybeKey,
|
|
32247
32247
|
true,
|
|
32248
32248
|
trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
|
|
32249
|
-
trackActualOwner ? createTask(getTaskName(
|
|
32249
|
+
trackActualOwner ? createTask(getTaskName(type2)) : unknownOwnerDebugTask
|
|
32250
32250
|
);
|
|
32251
32251
|
};
|
|
32252
32252
|
})();
|
|
@@ -32284,8 +32284,8 @@ var require_core3 = __commonJS({
|
|
|
32284
32284
|
Object.freeze(obj);
|
|
32285
32285
|
Object.getOwnPropertyNames(obj).forEach((name) => {
|
|
32286
32286
|
const prop = obj[name];
|
|
32287
|
-
const
|
|
32288
|
-
if ((
|
|
32287
|
+
const type2 = typeof prop;
|
|
32288
|
+
if ((type2 === "object" || type2 === "function") && !Object.isFrozen(prop)) {
|
|
32289
32289
|
deepFreeze(prop);
|
|
32290
32290
|
}
|
|
32291
32291
|
});
|
|
@@ -33892,13 +33892,13 @@ var castToError = (err) => {
|
|
|
33892
33892
|
var AnthropicError = class extends Error {
|
|
33893
33893
|
};
|
|
33894
33894
|
var APIError = class _APIError extends AnthropicError {
|
|
33895
|
-
constructor(status, error51, message, headers,
|
|
33895
|
+
constructor(status, error51, message, headers, type2) {
|
|
33896
33896
|
super(`${_APIError.makeMessage(status, error51, message)}`);
|
|
33897
33897
|
this.status = status;
|
|
33898
33898
|
this.headers = headers;
|
|
33899
33899
|
this.requestID = headers?.get("request-id");
|
|
33900
33900
|
this.error = error51;
|
|
33901
|
-
this.type =
|
|
33901
|
+
this.type = type2 ?? null;
|
|
33902
33902
|
}
|
|
33903
33903
|
static makeMessage(status, error51, message) {
|
|
33904
33904
|
const msg = error51?.message ? typeof error51.message === "string" ? error51.message : JSON.stringify(error51.message) : error51 ? JSON.stringify(error51) : message;
|
|
@@ -33918,32 +33918,32 @@ var APIError = class _APIError extends AnthropicError {
|
|
|
33918
33918
|
return new APIConnectionError({ message, cause: castToError(errorResponse) });
|
|
33919
33919
|
}
|
|
33920
33920
|
const error51 = errorResponse;
|
|
33921
|
-
const
|
|
33921
|
+
const type2 = error51?.["error"]?.["type"];
|
|
33922
33922
|
if (status === 400) {
|
|
33923
|
-
return new BadRequestError(status, error51, message, headers,
|
|
33923
|
+
return new BadRequestError(status, error51, message, headers, type2);
|
|
33924
33924
|
}
|
|
33925
33925
|
if (status === 401) {
|
|
33926
|
-
return new AuthenticationError(status, error51, message, headers,
|
|
33926
|
+
return new AuthenticationError(status, error51, message, headers, type2);
|
|
33927
33927
|
}
|
|
33928
33928
|
if (status === 403) {
|
|
33929
|
-
return new PermissionDeniedError(status, error51, message, headers,
|
|
33929
|
+
return new PermissionDeniedError(status, error51, message, headers, type2);
|
|
33930
33930
|
}
|
|
33931
33931
|
if (status === 404) {
|
|
33932
|
-
return new NotFoundError(status, error51, message, headers,
|
|
33932
|
+
return new NotFoundError(status, error51, message, headers, type2);
|
|
33933
33933
|
}
|
|
33934
33934
|
if (status === 409) {
|
|
33935
|
-
return new ConflictError(status, error51, message, headers,
|
|
33935
|
+
return new ConflictError(status, error51, message, headers, type2);
|
|
33936
33936
|
}
|
|
33937
33937
|
if (status === 422) {
|
|
33938
|
-
return new UnprocessableEntityError(status, error51, message, headers,
|
|
33938
|
+
return new UnprocessableEntityError(status, error51, message, headers, type2);
|
|
33939
33939
|
}
|
|
33940
33940
|
if (status === 429) {
|
|
33941
|
-
return new RateLimitError(status, error51, message, headers,
|
|
33941
|
+
return new RateLimitError(status, error51, message, headers, type2);
|
|
33942
33942
|
}
|
|
33943
33943
|
if (status >= 500) {
|
|
33944
|
-
return new InternalServerError(status, error51, message, headers,
|
|
33944
|
+
return new InternalServerError(status, error51, message, headers, type2);
|
|
33945
33945
|
}
|
|
33946
|
-
return new _APIError(status, error51, message, headers,
|
|
33946
|
+
return new _APIError(status, error51, message, headers, type2);
|
|
33947
33947
|
}
|
|
33948
33948
|
};
|
|
33949
33949
|
var APIUserAbortError = class extends APIError {
|
|
@@ -34127,17 +34127,17 @@ function getBrowserInfo() {
|
|
|
34127
34127
|
}
|
|
34128
34128
|
return null;
|
|
34129
34129
|
}
|
|
34130
|
-
var normalizeArch = (
|
|
34131
|
-
if (
|
|
34130
|
+
var normalizeArch = (arch2) => {
|
|
34131
|
+
if (arch2 === "x32")
|
|
34132
34132
|
return "x32";
|
|
34133
|
-
if (
|
|
34133
|
+
if (arch2 === "x86_64" || arch2 === "x64")
|
|
34134
34134
|
return "x64";
|
|
34135
|
-
if (
|
|
34135
|
+
if (arch2 === "arm")
|
|
34136
34136
|
return "arm";
|
|
34137
|
-
if (
|
|
34137
|
+
if (arch2 === "aarch64" || arch2 === "arm64")
|
|
34138
34138
|
return "arm64";
|
|
34139
|
-
if (
|
|
34140
|
-
return `other:${
|
|
34139
|
+
if (arch2)
|
|
34140
|
+
return `other:${arch2}`;
|
|
34141
34141
|
return "unknown";
|
|
34142
34142
|
};
|
|
34143
34143
|
var normalizePlatform = (platform2) => {
|
|
@@ -34333,14 +34333,14 @@ function redactSensitive(body) {
|
|
|
34333
34333
|
}
|
|
34334
34334
|
return null;
|
|
34335
34335
|
}
|
|
34336
|
-
async function checkCredentialsFileSafety(
|
|
34336
|
+
async function checkCredentialsFileSafety(path43, onWarn = (m) => console.warn(`anthropic-sdk: ${m}`)) {
|
|
34337
34337
|
if (typeof process === "undefined" || process.platform === "win32")
|
|
34338
34338
|
return;
|
|
34339
34339
|
const fs36 = await import("fs");
|
|
34340
|
-
let resolved =
|
|
34340
|
+
let resolved = path43;
|
|
34341
34341
|
let st;
|
|
34342
34342
|
try {
|
|
34343
|
-
resolved = await fs36.promises.realpath(
|
|
34343
|
+
resolved = await fs36.promises.realpath(path43);
|
|
34344
34344
|
st = await fs36.promises.stat(resolved);
|
|
34345
34345
|
} catch {
|
|
34346
34346
|
return;
|
|
@@ -34358,8 +34358,8 @@ async function checkCredentialsFileSafety(path42, onWarn = (m) => console.warn(`
|
|
|
34358
34358
|
}
|
|
34359
34359
|
async function writeCredentialsFileAtomic(targetPath, data) {
|
|
34360
34360
|
const fs36 = await import("fs");
|
|
34361
|
-
const
|
|
34362
|
-
const dir =
|
|
34361
|
+
const path43 = await import("path");
|
|
34362
|
+
const dir = path43.dirname(targetPath);
|
|
34363
34363
|
await fs36.promises.mkdir(dir, { recursive: true, mode: 448 });
|
|
34364
34364
|
const tmpPath = `${targetPath}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;
|
|
34365
34365
|
try {
|
|
@@ -34680,8 +34680,8 @@ var loadConfigWithSource = async (profile) => {
|
|
|
34680
34680
|
}
|
|
34681
34681
|
validateProfileName(profileName);
|
|
34682
34682
|
const fs36 = await import("fs");
|
|
34683
|
-
const
|
|
34684
|
-
const configPath =
|
|
34683
|
+
const path43 = await import("path");
|
|
34684
|
+
const configPath = path43.join(rootConfigPath, "configs", `${profileName}.json`);
|
|
34685
34685
|
let configRaw;
|
|
34686
34686
|
try {
|
|
34687
34687
|
configRaw = await fs36.promises.readFile(configPath, "utf-8");
|
|
@@ -34765,37 +34765,37 @@ var getCredentialsPath = async (config2, profile) => {
|
|
|
34765
34765
|
return null;
|
|
34766
34766
|
}
|
|
34767
34767
|
validateProfileName(profileName);
|
|
34768
|
-
const
|
|
34769
|
-
return
|
|
34768
|
+
const path43 = await import("path");
|
|
34769
|
+
return path43.join(rootConfigPath, "credentials", `${profileName}.json`);
|
|
34770
34770
|
};
|
|
34771
34771
|
var getRootConfigPath = async () => {
|
|
34772
34772
|
if (!supportsLocalConfigFiles()) {
|
|
34773
34773
|
return null;
|
|
34774
34774
|
}
|
|
34775
|
-
const
|
|
34775
|
+
const path43 = await import("path");
|
|
34776
34776
|
const configDir = readEnv("ANTHROPIC_CONFIG_DIR");
|
|
34777
34777
|
if (configDir) {
|
|
34778
34778
|
return configDir;
|
|
34779
34779
|
}
|
|
34780
|
-
const
|
|
34781
|
-
if (
|
|
34780
|
+
const os12 = getPlatformHeaders()["X-Stainless-OS"];
|
|
34781
|
+
if (os12 === "Windows") {
|
|
34782
34782
|
const appData = readEnv("APPDATA");
|
|
34783
34783
|
if (appData) {
|
|
34784
|
-
return
|
|
34784
|
+
return path43.join(appData, "Anthropic");
|
|
34785
34785
|
}
|
|
34786
34786
|
const userProfile = readEnv("USERPROFILE");
|
|
34787
34787
|
if (userProfile) {
|
|
34788
|
-
return
|
|
34788
|
+
return path43.join(userProfile, "AppData", "Roaming", "Anthropic");
|
|
34789
34789
|
}
|
|
34790
34790
|
return null;
|
|
34791
34791
|
}
|
|
34792
34792
|
const xdgConfigHome = readEnv("XDG_CONFIG_HOME");
|
|
34793
34793
|
if (xdgConfigHome) {
|
|
34794
|
-
return
|
|
34794
|
+
return path43.join(xdgConfigHome, "anthropic");
|
|
34795
34795
|
}
|
|
34796
34796
|
const home = readEnv("HOME");
|
|
34797
34797
|
if (home) {
|
|
34798
|
-
return
|
|
34798
|
+
return path43.join(home, ".config", "anthropic");
|
|
34799
34799
|
}
|
|
34800
34800
|
return null;
|
|
34801
34801
|
};
|
|
@@ -34813,8 +34813,8 @@ var getActiveProfileName = async () => {
|
|
|
34813
34813
|
return profileName;
|
|
34814
34814
|
}
|
|
34815
34815
|
const fs36 = await import("fs");
|
|
34816
|
-
const
|
|
34817
|
-
const filePath =
|
|
34816
|
+
const path43 = await import("path");
|
|
34817
|
+
const filePath = path43.join(rootConfigPath, "active_config");
|
|
34818
34818
|
try {
|
|
34819
34819
|
return (await fs36.promises.readFile(filePath, "utf-8")).trim() || "default";
|
|
34820
34820
|
} catch (err) {
|
|
@@ -34827,21 +34827,21 @@ var getActiveProfileName = async () => {
|
|
|
34827
34827
|
|
|
34828
34828
|
// ../../node_modules/.pnpm/@anthropic-ai+sdk@0.94.0_zod@4.4.3/node_modules/@anthropic-ai/sdk/lib/credentials/identity-token.mjs
|
|
34829
34829
|
init_esm_shims();
|
|
34830
|
-
function identityTokenFromFile(
|
|
34831
|
-
if (!
|
|
34830
|
+
function identityTokenFromFile(path43) {
|
|
34831
|
+
if (!path43) {
|
|
34832
34832
|
throw new AnthropicError("Identity token file path is empty");
|
|
34833
34833
|
}
|
|
34834
34834
|
return async () => {
|
|
34835
34835
|
const fs36 = await import("fs");
|
|
34836
34836
|
let content;
|
|
34837
34837
|
try {
|
|
34838
|
-
content = await fs36.promises.readFile(
|
|
34838
|
+
content = await fs36.promises.readFile(path43, "utf-8");
|
|
34839
34839
|
} catch (err) {
|
|
34840
|
-
throw new AnthropicError(`Failed to read identity token file at ${
|
|
34840
|
+
throw new AnthropicError(`Failed to read identity token file at ${path43}: ${err}`);
|
|
34841
34841
|
}
|
|
34842
34842
|
const token = content.trim();
|
|
34843
34843
|
if (!token) {
|
|
34844
|
-
throw new AnthropicError(`Identity token file at ${
|
|
34844
|
+
throw new AnthropicError(`Identity token file at ${path43} is empty`);
|
|
34845
34845
|
}
|
|
34846
34846
|
return token;
|
|
34847
34847
|
};
|
|
@@ -35249,8 +35249,8 @@ var Stream = class _Stream {
|
|
|
35249
35249
|
}
|
|
35250
35250
|
if (sse.event === "error") {
|
|
35251
35251
|
const body = safeJSON(sse.data) ?? sse.data;
|
|
35252
|
-
const
|
|
35253
|
-
throw new APIError(void 0, body, void 0, response.headers,
|
|
35252
|
+
const type2 = body?.error?.type;
|
|
35253
|
+
throw new APIError(void 0, body, void 0, response.headers, type2);
|
|
35254
35254
|
}
|
|
35255
35255
|
}
|
|
35256
35256
|
done = true;
|
|
@@ -35806,9 +35806,9 @@ async function toFile(value, name, options) {
|
|
|
35806
35806
|
}
|
|
35807
35807
|
const parts = await getBytes(value);
|
|
35808
35808
|
if (!options?.type) {
|
|
35809
|
-
const
|
|
35810
|
-
if (typeof
|
|
35811
|
-
options = { ...options, type };
|
|
35809
|
+
const type2 = parts.find((part) => typeof part === "object" && "type" in part && part.type);
|
|
35810
|
+
if (typeof type2 === "string") {
|
|
35811
|
+
options = { ...options, type: type2 };
|
|
35812
35812
|
}
|
|
35813
35813
|
}
|
|
35814
35814
|
return makeFile(parts, name, options);
|
|
@@ -35927,12 +35927,12 @@ function encodeURIPath(str2) {
|
|
|
35927
35927
|
return str2.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g, encodeURIComponent);
|
|
35928
35928
|
}
|
|
35929
35929
|
var EMPTY = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.create(null));
|
|
35930
|
-
var createPathTagFunction = (pathEncoder = encodeURIPath) => function
|
|
35930
|
+
var createPathTagFunction = (pathEncoder = encodeURIPath) => function path43(statics, ...params) {
|
|
35931
35931
|
if (statics.length === 1)
|
|
35932
35932
|
return statics[0];
|
|
35933
35933
|
let postPath = false;
|
|
35934
35934
|
const invalidSegments = [];
|
|
35935
|
-
const
|
|
35935
|
+
const path44 = statics.reduce((previousValue, currentValue, index) => {
|
|
35936
35936
|
if (/[?#]/.test(currentValue)) {
|
|
35937
35937
|
postPath = true;
|
|
35938
35938
|
}
|
|
@@ -35949,7 +35949,7 @@ var createPathTagFunction = (pathEncoder = encodeURIPath) => function path42(sta
|
|
|
35949
35949
|
}
|
|
35950
35950
|
return previousValue + currentValue + (index === params.length ? "" : encoded);
|
|
35951
35951
|
}, "");
|
|
35952
|
-
const pathOnly =
|
|
35952
|
+
const pathOnly = path44.split(/[?#]/, 1)[0];
|
|
35953
35953
|
const invalidSegmentPattern = /(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi;
|
|
35954
35954
|
let match;
|
|
35955
35955
|
while ((match = invalidSegmentPattern.exec(pathOnly)) !== null) {
|
|
@@ -35970,10 +35970,10 @@ var createPathTagFunction = (pathEncoder = encodeURIPath) => function path42(sta
|
|
|
35970
35970
|
}, "");
|
|
35971
35971
|
throw new AnthropicError(`Path parameters result in path with invalid segments:
|
|
35972
35972
|
${invalidSegments.map((e) => e.error).join("\n")}
|
|
35973
|
-
${
|
|
35973
|
+
${path44}
|
|
35974
35974
|
${underline}`);
|
|
35975
35975
|
}
|
|
35976
|
-
return
|
|
35976
|
+
return path44;
|
|
35977
35977
|
};
|
|
35978
35978
|
var path = /* @__PURE__ */ createPathTagFunction(encodeURIPath);
|
|
35979
35979
|
|
|
@@ -40734,9 +40734,9 @@ var BaseAnthropic = class {
|
|
|
40734
40734
|
makeStatusError(status, error51, message, headers) {
|
|
40735
40735
|
return APIError.generate(status, error51, message, headers);
|
|
40736
40736
|
}
|
|
40737
|
-
buildURL(
|
|
40737
|
+
buildURL(path43, query, defaultBaseURL) {
|
|
40738
40738
|
const baseURL = !__classPrivateFieldGet(this, _BaseAnthropic_instances, "m", _BaseAnthropic_baseURLOverridden).call(this) && defaultBaseURL || this.baseURL;
|
|
40739
|
-
const url2 = isAbsoluteURL(
|
|
40739
|
+
const url2 = isAbsoluteURL(path43) ? new URL(path43) : new URL(baseURL + (baseURL.endsWith("/") && path43.startsWith("/") ? path43.slice(1) : path43));
|
|
40740
40740
|
const defaultQuery = this.defaultQuery();
|
|
40741
40741
|
const pathQuery = Object.fromEntries(url2.searchParams);
|
|
40742
40742
|
if (!isEmptyObj(defaultQuery) || !isEmptyObj(pathQuery)) {
|
|
@@ -40780,24 +40780,24 @@ var BaseAnthropic = class {
|
|
|
40780
40780
|
request.headers = headers;
|
|
40781
40781
|
}
|
|
40782
40782
|
}
|
|
40783
|
-
get(
|
|
40784
|
-
return this.methodRequest("get",
|
|
40783
|
+
get(path43, opts) {
|
|
40784
|
+
return this.methodRequest("get", path43, opts);
|
|
40785
40785
|
}
|
|
40786
|
-
post(
|
|
40787
|
-
return this.methodRequest("post",
|
|
40786
|
+
post(path43, opts) {
|
|
40787
|
+
return this.methodRequest("post", path43, opts);
|
|
40788
40788
|
}
|
|
40789
|
-
patch(
|
|
40790
|
-
return this.methodRequest("patch",
|
|
40789
|
+
patch(path43, opts) {
|
|
40790
|
+
return this.methodRequest("patch", path43, opts);
|
|
40791
40791
|
}
|
|
40792
|
-
put(
|
|
40793
|
-
return this.methodRequest("put",
|
|
40792
|
+
put(path43, opts) {
|
|
40793
|
+
return this.methodRequest("put", path43, opts);
|
|
40794
40794
|
}
|
|
40795
|
-
delete(
|
|
40796
|
-
return this.methodRequest("delete",
|
|
40795
|
+
delete(path43, opts) {
|
|
40796
|
+
return this.methodRequest("delete", path43, opts);
|
|
40797
40797
|
}
|
|
40798
|
-
methodRequest(method,
|
|
40798
|
+
methodRequest(method, path43, opts) {
|
|
40799
40799
|
return this.request(Promise.resolve(opts).then((opts2) => {
|
|
40800
|
-
return { method, path:
|
|
40800
|
+
return { method, path: path43, ...opts2 };
|
|
40801
40801
|
}));
|
|
40802
40802
|
}
|
|
40803
40803
|
request(options, remainingRetries = null) {
|
|
@@ -40902,8 +40902,8 @@ var BaseAnthropic = class {
|
|
|
40902
40902
|
}));
|
|
40903
40903
|
return { response, options, controller, requestLogID, retryOfRequestLogID, startTime };
|
|
40904
40904
|
}
|
|
40905
|
-
getAPIList(
|
|
40906
|
-
return this.requestAPIList(Page3, opts && "then" in opts ? opts.then((opts2) => ({ method: "get", path:
|
|
40905
|
+
getAPIList(path43, Page3, opts) {
|
|
40906
|
+
return this.requestAPIList(Page3, opts && "then" in opts ? opts.then((opts2) => ({ method: "get", path: path43, ...opts2 })) : { method: "get", path: path43, ...opts });
|
|
40907
40907
|
}
|
|
40908
40908
|
requestAPIList(Page3, options) {
|
|
40909
40909
|
const request = this.makeRequest(options, null, void 0);
|
|
@@ -40997,14 +40997,14 @@ var BaseAnthropic = class {
|
|
|
40997
40997
|
}
|
|
40998
40998
|
async buildRequest(inputOptions, { retryCount = 0 } = {}) {
|
|
40999
40999
|
const options = { ...inputOptions };
|
|
41000
|
-
const { method, path:
|
|
41000
|
+
const { method, path: path43, query, defaultBaseURL } = options;
|
|
41001
41001
|
if (this._authState.resolution) {
|
|
41002
41002
|
await this._authState.resolution;
|
|
41003
41003
|
}
|
|
41004
41004
|
if (!this._baseURLIsExplicit && this._authState.baseURL && this.baseURL !== this._authState.baseURL) {
|
|
41005
41005
|
this.baseURL = this._authState.baseURL;
|
|
41006
41006
|
}
|
|
41007
|
-
const url2 = this.buildURL(
|
|
41007
|
+
const url2 = this.buildURL(path43, query, defaultBaseURL);
|
|
41008
41008
|
if ("timeout" in options)
|
|
41009
41009
|
validatePositiveInteger("timeout", options.timeout);
|
|
41010
41010
|
options.timeout = options.timeout ?? this.timeout;
|
|
@@ -41891,10 +41891,10 @@ function mergeDefs(...defs) {
|
|
|
41891
41891
|
function cloneDef(schema) {
|
|
41892
41892
|
return mergeDefs(schema._zod.def);
|
|
41893
41893
|
}
|
|
41894
|
-
function getElementAtPath(obj,
|
|
41895
|
-
if (!
|
|
41894
|
+
function getElementAtPath(obj, path43) {
|
|
41895
|
+
if (!path43)
|
|
41896
41896
|
return obj;
|
|
41897
|
-
return
|
|
41897
|
+
return path43.reduce((acc, key) => acc?.[key], obj);
|
|
41898
41898
|
}
|
|
41899
41899
|
function promiseAllObject(promisesObj) {
|
|
41900
41900
|
const keys = Object.keys(promisesObj);
|
|
@@ -42303,11 +42303,11 @@ function explicitlyAborted(x, startIndex = 0) {
|
|
|
42303
42303
|
}
|
|
42304
42304
|
return false;
|
|
42305
42305
|
}
|
|
42306
|
-
function prefixIssues(
|
|
42306
|
+
function prefixIssues(path43, issues) {
|
|
42307
42307
|
return issues.map((iss) => {
|
|
42308
42308
|
var _a6;
|
|
42309
42309
|
(_a6 = iss).path ?? (_a6.path = []);
|
|
42310
|
-
iss.path.unshift(
|
|
42310
|
+
iss.path.unshift(path43);
|
|
42311
42311
|
return iss;
|
|
42312
42312
|
});
|
|
42313
42313
|
}
|
|
@@ -42454,16 +42454,16 @@ function flattenError(error51, mapper = (issue2) => issue2.message) {
|
|
|
42454
42454
|
}
|
|
42455
42455
|
function formatError(error51, mapper = (issue2) => issue2.message) {
|
|
42456
42456
|
const fieldErrors = { _errors: [] };
|
|
42457
|
-
const processError = (error52,
|
|
42457
|
+
const processError = (error52, path43 = []) => {
|
|
42458
42458
|
for (const issue2 of error52.issues) {
|
|
42459
42459
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
42460
|
-
issue2.errors.map((issues) => processError({ issues }, [...
|
|
42460
|
+
issue2.errors.map((issues) => processError({ issues }, [...path43, ...issue2.path]));
|
|
42461
42461
|
} else if (issue2.code === "invalid_key") {
|
|
42462
|
-
processError({ issues: issue2.issues }, [...
|
|
42462
|
+
processError({ issues: issue2.issues }, [...path43, ...issue2.path]);
|
|
42463
42463
|
} else if (issue2.code === "invalid_element") {
|
|
42464
|
-
processError({ issues: issue2.issues }, [...
|
|
42464
|
+
processError({ issues: issue2.issues }, [...path43, ...issue2.path]);
|
|
42465
42465
|
} else {
|
|
42466
|
-
const fullpath = [...
|
|
42466
|
+
const fullpath = [...path43, ...issue2.path];
|
|
42467
42467
|
if (fullpath.length === 0) {
|
|
42468
42468
|
fieldErrors._errors.push(mapper(issue2));
|
|
42469
42469
|
} else {
|
|
@@ -42490,17 +42490,17 @@ function formatError(error51, mapper = (issue2) => issue2.message) {
|
|
|
42490
42490
|
}
|
|
42491
42491
|
function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
42492
42492
|
const result = { errors: [] };
|
|
42493
|
-
const processError = (error52,
|
|
42493
|
+
const processError = (error52, path43 = []) => {
|
|
42494
42494
|
var _a6, _b;
|
|
42495
42495
|
for (const issue2 of error52.issues) {
|
|
42496
42496
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
42497
|
-
issue2.errors.map((issues) => processError({ issues }, [...
|
|
42497
|
+
issue2.errors.map((issues) => processError({ issues }, [...path43, ...issue2.path]));
|
|
42498
42498
|
} else if (issue2.code === "invalid_key") {
|
|
42499
|
-
processError({ issues: issue2.issues }, [...
|
|
42499
|
+
processError({ issues: issue2.issues }, [...path43, ...issue2.path]);
|
|
42500
42500
|
} else if (issue2.code === "invalid_element") {
|
|
42501
|
-
processError({ issues: issue2.issues }, [...
|
|
42501
|
+
processError({ issues: issue2.issues }, [...path43, ...issue2.path]);
|
|
42502
42502
|
} else {
|
|
42503
|
-
const fullpath = [...
|
|
42503
|
+
const fullpath = [...path43, ...issue2.path];
|
|
42504
42504
|
if (fullpath.length === 0) {
|
|
42505
42505
|
result.errors.push(mapper(issue2));
|
|
42506
42506
|
continue;
|
|
@@ -42532,8 +42532,8 @@ function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
|
42532
42532
|
}
|
|
42533
42533
|
function toDotPath(_path) {
|
|
42534
42534
|
const segs = [];
|
|
42535
|
-
const
|
|
42536
|
-
for (const seg of
|
|
42535
|
+
const path43 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
|
|
42536
|
+
for (const seg of path43) {
|
|
42537
42537
|
if (typeof seg === "number")
|
|
42538
42538
|
segs.push(`[${seg}]`);
|
|
42539
42539
|
else if (typeof seg === "symbol")
|
|
@@ -55306,13 +55306,13 @@ function resolveRef(ref, ctx) {
|
|
|
55306
55306
|
if (!ref.startsWith("#")) {
|
|
55307
55307
|
throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
|
|
55308
55308
|
}
|
|
55309
|
-
const
|
|
55310
|
-
if (
|
|
55309
|
+
const path43 = ref.slice(1).split("/").filter(Boolean);
|
|
55310
|
+
if (path43.length === 0) {
|
|
55311
55311
|
return ctx.rootSchema;
|
|
55312
55312
|
}
|
|
55313
55313
|
const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
|
|
55314
|
-
if (
|
|
55315
|
-
const key =
|
|
55314
|
+
if (path43[0] === defsKey) {
|
|
55315
|
+
const key = path43[1];
|
|
55316
55316
|
if (!key || !ctx.defs[key]) {
|
|
55317
55317
|
throw new Error(`Reference not found: ${ref}`);
|
|
55318
55318
|
}
|
|
@@ -55382,9 +55382,9 @@ function convertBaseSchema(schema, ctx) {
|
|
|
55382
55382
|
if (schema.const !== void 0) {
|
|
55383
55383
|
return z.literal(schema.const);
|
|
55384
55384
|
}
|
|
55385
|
-
const
|
|
55386
|
-
if (Array.isArray(
|
|
55387
|
-
const typeSchemas =
|
|
55385
|
+
const type2 = schema.type;
|
|
55386
|
+
if (Array.isArray(type2)) {
|
|
55387
|
+
const typeSchemas = type2.map((t) => {
|
|
55388
55388
|
const typeSchema = { ...schema, type: t };
|
|
55389
55389
|
return convertBaseSchema(typeSchema, ctx);
|
|
55390
55390
|
});
|
|
@@ -55396,11 +55396,11 @@ function convertBaseSchema(schema, ctx) {
|
|
|
55396
55396
|
}
|
|
55397
55397
|
return z.union(typeSchemas);
|
|
55398
55398
|
}
|
|
55399
|
-
if (!
|
|
55399
|
+
if (!type2) {
|
|
55400
55400
|
return z.any();
|
|
55401
55401
|
}
|
|
55402
55402
|
let zodSchema;
|
|
55403
|
-
switch (
|
|
55403
|
+
switch (type2) {
|
|
55404
55404
|
case "string": {
|
|
55405
55405
|
let stringSchema = z.string();
|
|
55406
55406
|
if (schema.format) {
|
|
@@ -55467,7 +55467,7 @@ function convertBaseSchema(schema, ctx) {
|
|
|
55467
55467
|
}
|
|
55468
55468
|
case "number":
|
|
55469
55469
|
case "integer": {
|
|
55470
|
-
let numberSchema =
|
|
55470
|
+
let numberSchema = type2 === "integer" ? z.number().int() : z.number();
|
|
55471
55471
|
if (typeof schema.minimum === "number") {
|
|
55472
55472
|
numberSchema = numberSchema.min(schema.minimum);
|
|
55473
55473
|
}
|
|
@@ -55602,7 +55602,7 @@ function convertBaseSchema(schema, ctx) {
|
|
|
55602
55602
|
break;
|
|
55603
55603
|
}
|
|
55604
55604
|
default:
|
|
55605
|
-
throw new Error(`Unsupported type: ${
|
|
55605
|
+
throw new Error(`Unsupported type: ${type2}`);
|
|
55606
55606
|
}
|
|
55607
55607
|
return zodSchema;
|
|
55608
55608
|
}
|
|
@@ -56081,17 +56081,17 @@ function getBrowserInfo2() {
|
|
|
56081
56081
|
}
|
|
56082
56082
|
return null;
|
|
56083
56083
|
}
|
|
56084
|
-
var normalizeArch2 = (
|
|
56085
|
-
if (
|
|
56084
|
+
var normalizeArch2 = (arch2) => {
|
|
56085
|
+
if (arch2 === "x32")
|
|
56086
56086
|
return "x32";
|
|
56087
|
-
if (
|
|
56087
|
+
if (arch2 === "x86_64" || arch2 === "x64")
|
|
56088
56088
|
return "x64";
|
|
56089
|
-
if (
|
|
56089
|
+
if (arch2 === "arm")
|
|
56090
56090
|
return "arm";
|
|
56091
|
-
if (
|
|
56091
|
+
if (arch2 === "aarch64" || arch2 === "arm64")
|
|
56092
56092
|
return "arm64";
|
|
56093
|
-
if (
|
|
56094
|
-
return `other:${
|
|
56093
|
+
if (arch2)
|
|
56094
|
+
return `other:${arch2}`;
|
|
56095
56095
|
return "unknown";
|
|
56096
56096
|
};
|
|
56097
56097
|
var normalizePlatform2 = (platform2) => {
|
|
@@ -57481,9 +57481,9 @@ async function toFile2(value, name, options) {
|
|
|
57481
57481
|
const parts = await getBytes2(value);
|
|
57482
57482
|
name || (name = getName2(value));
|
|
57483
57483
|
if (!options?.type) {
|
|
57484
|
-
const
|
|
57485
|
-
if (typeof
|
|
57486
|
-
options = { ...options, type };
|
|
57484
|
+
const type2 = parts.find((part) => typeof part === "object" && "type" in part && part.type);
|
|
57485
|
+
if (typeof type2 === "string") {
|
|
57486
|
+
options = { ...options, type: type2 };
|
|
57487
57487
|
}
|
|
57488
57488
|
}
|
|
57489
57489
|
return makeFile2(parts, name, options);
|
|
@@ -57541,12 +57541,12 @@ function encodeURIPath2(str2) {
|
|
|
57541
57541
|
return str2.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g, encodeURIComponent);
|
|
57542
57542
|
}
|
|
57543
57543
|
var EMPTY2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.create(null));
|
|
57544
|
-
var createPathTagFunction2 = (pathEncoder = encodeURIPath2) => function
|
|
57544
|
+
var createPathTagFunction2 = (pathEncoder = encodeURIPath2) => function path43(statics, ...params) {
|
|
57545
57545
|
if (statics.length === 1)
|
|
57546
57546
|
return statics[0];
|
|
57547
57547
|
let postPath = false;
|
|
57548
57548
|
const invalidSegments = [];
|
|
57549
|
-
const
|
|
57549
|
+
const path44 = statics.reduce((previousValue, currentValue, index) => {
|
|
57550
57550
|
if (/[?#]/.test(currentValue)) {
|
|
57551
57551
|
postPath = true;
|
|
57552
57552
|
}
|
|
@@ -57563,7 +57563,7 @@ var createPathTagFunction2 = (pathEncoder = encodeURIPath2) => function path42(s
|
|
|
57563
57563
|
}
|
|
57564
57564
|
return previousValue + currentValue + (index === params.length ? "" : encoded);
|
|
57565
57565
|
}, "");
|
|
57566
|
-
const pathOnly =
|
|
57566
|
+
const pathOnly = path44.split(/[?#]/, 1)[0];
|
|
57567
57567
|
const invalidSegmentPattern = /(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi;
|
|
57568
57568
|
let match;
|
|
57569
57569
|
while ((match = invalidSegmentPattern.exec(pathOnly)) !== null) {
|
|
@@ -57584,10 +57584,10 @@ var createPathTagFunction2 = (pathEncoder = encodeURIPath2) => function path42(s
|
|
|
57584
57584
|
}, "");
|
|
57585
57585
|
throw new OpenAIError(`Path parameters result in path with invalid segments:
|
|
57586
57586
|
${invalidSegments.map((e) => e.error).join("\n")}
|
|
57587
|
-
${
|
|
57587
|
+
${path44}
|
|
57588
57588
|
${underline}`);
|
|
57589
57589
|
}
|
|
57590
|
-
return
|
|
57590
|
+
return path44;
|
|
57591
57591
|
};
|
|
57592
57592
|
var path2 = /* @__PURE__ */ createPathTagFunction2(encodeURIPath2);
|
|
57593
57593
|
|
|
@@ -58755,13 +58755,13 @@ var ChatCompletionStream = class _ChatCompletionStream extends AbstractChatCompl
|
|
|
58755
58755
|
if (tool_calls) {
|
|
58756
58756
|
if (!choice.message.tool_calls)
|
|
58757
58757
|
choice.message.tool_calls = [];
|
|
58758
|
-
for (const { index: index2, id: id2, type, function: fn, ...rest3 } of tool_calls) {
|
|
58758
|
+
for (const { index: index2, id: id2, type: type2, function: fn, ...rest3 } of tool_calls) {
|
|
58759
58759
|
const tool_call = (_d = choice.message.tool_calls)[index2] ?? (_d[index2] = {});
|
|
58760
58760
|
Object.assign(tool_call, rest3);
|
|
58761
58761
|
if (id2)
|
|
58762
58762
|
tool_call.id = id2;
|
|
58763
|
-
if (
|
|
58764
|
-
tool_call.type =
|
|
58763
|
+
if (type2)
|
|
58764
|
+
tool_call.type = type2;
|
|
58765
58765
|
if (fn)
|
|
58766
58766
|
tool_call.function ?? (tool_call.function = { name: fn.name ?? "", arguments: "" });
|
|
58767
58767
|
if (fn?.name)
|
|
@@ -58878,13 +58878,13 @@ function finalizeChatCompletion(snapshot, params) {
|
|
|
58878
58878
|
content,
|
|
58879
58879
|
refusal: message.refusal ?? null,
|
|
58880
58880
|
tool_calls: tool_calls.map((tool_call, i) => {
|
|
58881
|
-
const { function: fn, type, id: id3, ...toolRest } = tool_call;
|
|
58881
|
+
const { function: fn, type: type2, id: id3, ...toolRest } = tool_call;
|
|
58882
58882
|
const { arguments: args, name, ...fnRest } = fn || {};
|
|
58883
58883
|
if (id3 == null) {
|
|
58884
58884
|
throw new OpenAIError(`missing choices[${index}].tool_calls[${i}].id
|
|
58885
58885
|
${str(snapshot)}`);
|
|
58886
58886
|
}
|
|
58887
|
-
if (
|
|
58887
|
+
if (type2 == null) {
|
|
58888
58888
|
throw new OpenAIError(`missing choices[${index}].tool_calls[${i}].type
|
|
58889
58889
|
${str(snapshot)}`);
|
|
58890
58890
|
}
|
|
@@ -58896,7 +58896,7 @@ ${str(snapshot)}`);
|
|
|
58896
58896
|
throw new OpenAIError(`missing choices[${index}].tool_calls[${i}].function.arguments
|
|
58897
58897
|
${str(snapshot)}`);
|
|
58898
58898
|
}
|
|
58899
|
-
return { ...toolRest, id: id3, type, function: { ...fnRest, name, arguments: args } };
|
|
58899
|
+
return { ...toolRest, id: id3, type: type2, function: { ...fnRest, name, arguments: args } };
|
|
58900
58900
|
})
|
|
58901
58901
|
}
|
|
58902
58902
|
};
|
|
@@ -61595,11 +61595,11 @@ var ResponseStream = class _ResponseStream extends EventStream {
|
|
|
61595
61595
|
if (!output) {
|
|
61596
61596
|
throw new OpenAIError(`missing output at index ${event.output_index}`);
|
|
61597
61597
|
}
|
|
61598
|
-
const
|
|
61598
|
+
const type2 = output.type;
|
|
61599
61599
|
const part = event.part;
|
|
61600
|
-
if (
|
|
61600
|
+
if (type2 === "message" && part.type !== "reasoning_text") {
|
|
61601
61601
|
output.content.push(part);
|
|
61602
|
-
} else if (
|
|
61602
|
+
} else if (type2 === "reasoning" && part.type === "reasoning_text") {
|
|
61603
61603
|
if (!output.content) {
|
|
61604
61604
|
output.content = [];
|
|
61605
61605
|
}
|
|
@@ -62713,9 +62713,9 @@ var OpenAI = class {
|
|
|
62713
62713
|
this.apiKey = token;
|
|
62714
62714
|
return true;
|
|
62715
62715
|
}
|
|
62716
|
-
buildURL(
|
|
62716
|
+
buildURL(path43, query, defaultBaseURL) {
|
|
62717
62717
|
const baseURL = !__classPrivateFieldGet2(this, _OpenAI_instances, "m", _OpenAI_baseURLOverridden).call(this) && defaultBaseURL || this.baseURL;
|
|
62718
|
-
const url2 = isAbsoluteURL2(
|
|
62718
|
+
const url2 = isAbsoluteURL2(path43) ? new URL(path43) : new URL(baseURL + (baseURL.endsWith("/") && path43.startsWith("/") ? path43.slice(1) : path43));
|
|
62719
62719
|
const defaultQuery = this.defaultQuery();
|
|
62720
62720
|
const pathQuery = Object.fromEntries(url2.searchParams);
|
|
62721
62721
|
if (!isEmptyObj2(defaultQuery) || !isEmptyObj2(pathQuery)) {
|
|
@@ -62740,24 +62740,24 @@ var OpenAI = class {
|
|
|
62740
62740
|
*/
|
|
62741
62741
|
async prepareRequest(request, { url: url2, options }) {
|
|
62742
62742
|
}
|
|
62743
|
-
get(
|
|
62744
|
-
return this.methodRequest("get",
|
|
62743
|
+
get(path43, opts) {
|
|
62744
|
+
return this.methodRequest("get", path43, opts);
|
|
62745
62745
|
}
|
|
62746
|
-
post(
|
|
62747
|
-
return this.methodRequest("post",
|
|
62746
|
+
post(path43, opts) {
|
|
62747
|
+
return this.methodRequest("post", path43, opts);
|
|
62748
62748
|
}
|
|
62749
|
-
patch(
|
|
62750
|
-
return this.methodRequest("patch",
|
|
62749
|
+
patch(path43, opts) {
|
|
62750
|
+
return this.methodRequest("patch", path43, opts);
|
|
62751
62751
|
}
|
|
62752
|
-
put(
|
|
62753
|
-
return this.methodRequest("put",
|
|
62752
|
+
put(path43, opts) {
|
|
62753
|
+
return this.methodRequest("put", path43, opts);
|
|
62754
62754
|
}
|
|
62755
|
-
delete(
|
|
62756
|
-
return this.methodRequest("delete",
|
|
62755
|
+
delete(path43, opts) {
|
|
62756
|
+
return this.methodRequest("delete", path43, opts);
|
|
62757
62757
|
}
|
|
62758
|
-
methodRequest(method,
|
|
62758
|
+
methodRequest(method, path43, opts) {
|
|
62759
62759
|
return this.request(Promise.resolve(opts).then((opts2) => {
|
|
62760
|
-
return { method, path:
|
|
62760
|
+
return { method, path: path43, ...opts2 };
|
|
62761
62761
|
}));
|
|
62762
62762
|
}
|
|
62763
62763
|
request(options, remainingRetries = null) {
|
|
@@ -62875,8 +62875,8 @@ var OpenAI = class {
|
|
|
62875
62875
|
}));
|
|
62876
62876
|
return { response, options, controller, requestLogID, retryOfRequestLogID, startTime };
|
|
62877
62877
|
}
|
|
62878
|
-
getAPIList(
|
|
62879
|
-
return this.requestAPIList(Page3, opts && "then" in opts ? opts.then((opts2) => ({ method: "get", path:
|
|
62878
|
+
getAPIList(path43, Page3, opts) {
|
|
62879
|
+
return this.requestAPIList(Page3, opts && "then" in opts ? opts.then((opts2) => ({ method: "get", path: path43, ...opts2 })) : { method: "get", path: path43, ...opts });
|
|
62880
62880
|
}
|
|
62881
62881
|
requestAPIList(Page3, options) {
|
|
62882
62882
|
const request = this.makeRequest(options, null, void 0);
|
|
@@ -62967,8 +62967,8 @@ var OpenAI = class {
|
|
|
62967
62967
|
}
|
|
62968
62968
|
async buildRequest(inputOptions, { retryCount = 0 } = {}) {
|
|
62969
62969
|
const options = { ...inputOptions };
|
|
62970
|
-
const { method, path:
|
|
62971
|
-
const url2 = this.buildURL(
|
|
62970
|
+
const { method, path: path43, query, defaultBaseURL } = options;
|
|
62971
|
+
const url2 = this.buildURL(path43, query, defaultBaseURL);
|
|
62972
62972
|
if ("timeout" in options)
|
|
62973
62973
|
validatePositiveInteger2("timeout", options.timeout);
|
|
62974
62974
|
options.timeout = options.timeout ?? this.timeout;
|
|
@@ -63128,6 +63128,12 @@ var GGAIError = class extends Error {
|
|
|
63128
63128
|
this.hint = options?.hint;
|
|
63129
63129
|
}
|
|
63130
63130
|
};
|
|
63131
|
+
var VideoUnsupportedError = class extends GGAIError {
|
|
63132
|
+
constructor() {
|
|
63133
|
+
super("This model can't analyze video.", { source: "capability" });
|
|
63134
|
+
this.name = "VideoUnsupportedError";
|
|
63135
|
+
}
|
|
63136
|
+
};
|
|
63131
63137
|
var ProviderError = class extends GGAIError {
|
|
63132
63138
|
provider;
|
|
63133
63139
|
statusCode;
|
|
@@ -63243,6 +63249,14 @@ function finaliseBySource(source2, message, requestId, hint) {
|
|
|
63243
63249
|
guidance: hint ?? providerGuidance(void 0, message, void 0),
|
|
63244
63250
|
...requestId ? { requestId } : {}
|
|
63245
63251
|
};
|
|
63252
|
+
case "capability":
|
|
63253
|
+
return {
|
|
63254
|
+
headline: message,
|
|
63255
|
+
source: source2,
|
|
63256
|
+
message: "",
|
|
63257
|
+
guidance: hint ?? "Only Kimi, Gemini, and MiniMax can analyze video. Switch with /model.",
|
|
63258
|
+
...requestId ? { requestId } : {}
|
|
63259
|
+
};
|
|
63246
63260
|
case "ggcoder":
|
|
63247
63261
|
return {
|
|
63248
63262
|
headline: "ggcoder hit an unexpected error.",
|
|
@@ -63586,6 +63600,10 @@ function toolResultImages(content) {
|
|
|
63586
63600
|
if (typeof content === "string") return [];
|
|
63587
63601
|
return content.filter((b) => b.type === "image");
|
|
63588
63602
|
}
|
|
63603
|
+
function toolResultVideos(content) {
|
|
63604
|
+
if (typeof content === "string") return [];
|
|
63605
|
+
return content.filter((b) => b.type === "video");
|
|
63606
|
+
}
|
|
63589
63607
|
function toAnthropicCacheControl(retention, baseUrl) {
|
|
63590
63608
|
const resolved = retention ?? "short";
|
|
63591
63609
|
if (resolved === "none") return void 0;
|
|
@@ -63596,6 +63614,12 @@ function toAnthropicToolResultContent(content) {
|
|
|
63596
63614
|
if (typeof content === "string") return content;
|
|
63597
63615
|
return content.map((block2) => {
|
|
63598
63616
|
if (block2.type === "text") return { type: "text", text: block2.text };
|
|
63617
|
+
if (block2.type === "video") {
|
|
63618
|
+
return {
|
|
63619
|
+
type: "video",
|
|
63620
|
+
source: { type: "base64", media_type: block2.mediaType, data: block2.data }
|
|
63621
|
+
};
|
|
63622
|
+
}
|
|
63599
63623
|
return {
|
|
63600
63624
|
type: "image",
|
|
63601
63625
|
source: {
|
|
@@ -63665,6 +63689,8 @@ function toAnthropicMessages(messages, cacheControl) {
|
|
|
63665
63689
|
if (msg.role === "tool") {
|
|
63666
63690
|
out.push({
|
|
63667
63691
|
role: "user",
|
|
63692
|
+
// Cast covers the video block (used by the Anthropic-compatible MiniMax
|
|
63693
|
+
// API), which isn't in the first-party Anthropic tool_result types.
|
|
63668
63694
|
content: msg.content.map((result) => ({
|
|
63669
63695
|
type: "tool_result",
|
|
63670
63696
|
tool_use_id: remapAnthropicToolCallId(result.toolCallId, idMap),
|
|
@@ -63805,11 +63831,10 @@ function toOpenAIMessages(messages, options) {
|
|
|
63805
63831
|
(part) => {
|
|
63806
63832
|
if (part.type === "text") return { type: "text", text: part.text };
|
|
63807
63833
|
if (part.type === "video") {
|
|
63834
|
+
const videoUrl = part.fileId ? { url: `ms://${part.fileId}`, id: part.fileId } : { url: `data:${part.mediaType};base64,${part.data}` };
|
|
63808
63835
|
return {
|
|
63809
63836
|
type: "video_url",
|
|
63810
|
-
video_url:
|
|
63811
|
-
url: `data:${part.mediaType};base64,${part.data}`
|
|
63812
|
-
}
|
|
63837
|
+
video_url: videoUrl
|
|
63813
63838
|
};
|
|
63814
63839
|
}
|
|
63815
63840
|
return {
|
|
@@ -63854,11 +63879,27 @@ function toOpenAIMessages(messages, options) {
|
|
|
63854
63879
|
continue;
|
|
63855
63880
|
}
|
|
63856
63881
|
if (msg.role === "tool") {
|
|
63882
|
+
const isMoonshot = options?.provider === "moonshot";
|
|
63857
63883
|
const imageBlocks = [];
|
|
63858
63884
|
for (const result of msg.content) {
|
|
63859
63885
|
const text = toolResultText(result.content);
|
|
63860
63886
|
const images = toolResultImages(result.content);
|
|
63887
|
+
const videos = isMoonshot ? toolResultVideos(result.content) : [];
|
|
63861
63888
|
const hasText = text.length > 0;
|
|
63889
|
+
if (videos.length > 0) {
|
|
63890
|
+
const parts = [];
|
|
63891
|
+
if (hasText) parts.push({ type: "text", text });
|
|
63892
|
+
const videoParts = videos.map((v) => {
|
|
63893
|
+
const videoUrl = v.fileId ? { url: `ms://${v.fileId}`, id: v.fileId } : { url: `data:${v.mediaType};base64,${v.data}` };
|
|
63894
|
+
return { type: "video_url", video_url: videoUrl };
|
|
63895
|
+
});
|
|
63896
|
+
out.push({
|
|
63897
|
+
role: "tool",
|
|
63898
|
+
tool_call_id: remapToolCallId(result.toolCallId, idMap),
|
|
63899
|
+
content: [...parts, ...videoParts]
|
|
63900
|
+
});
|
|
63901
|
+
continue;
|
|
63902
|
+
}
|
|
63862
63903
|
out.push({
|
|
63863
63904
|
role: "tool",
|
|
63864
63905
|
tool_call_id: remapToolCallId(result.toolCallId, idMap),
|
|
@@ -64271,14 +64312,14 @@ async function* runStream(options) {
|
|
|
64271
64312
|
function* synthesizeEventsFromMessage(message) {
|
|
64272
64313
|
for (const block2 of message.content) {
|
|
64273
64314
|
const blk = block2;
|
|
64274
|
-
const
|
|
64275
|
-
if (
|
|
64315
|
+
const type2 = blk.type;
|
|
64316
|
+
if (type2 === "text") {
|
|
64276
64317
|
const text = blk.text;
|
|
64277
64318
|
if (text) yield { type: "text_delta", text };
|
|
64278
|
-
} else if (
|
|
64319
|
+
} else if (type2 === "thinking") {
|
|
64279
64320
|
const text = blk.thinking;
|
|
64280
64321
|
if (text) yield { type: "thinking_delta", text };
|
|
64281
|
-
} else if (
|
|
64322
|
+
} else if (type2 === "tool_use") {
|
|
64282
64323
|
const argsJson = JSON.stringify(blk.input ?? {});
|
|
64283
64324
|
yield {
|
|
64284
64325
|
type: "toolcall_delta",
|
|
@@ -64292,18 +64333,18 @@ function* synthesizeEventsFromMessage(message) {
|
|
|
64292
64333
|
name: blk.name,
|
|
64293
64334
|
args: blk.input ?? {}
|
|
64294
64335
|
};
|
|
64295
|
-
} else if (
|
|
64336
|
+
} else if (type2 === "server_tool_use") {
|
|
64296
64337
|
yield {
|
|
64297
64338
|
type: "server_toolcall",
|
|
64298
64339
|
id: blk.id,
|
|
64299
64340
|
name: blk.name,
|
|
64300
64341
|
input: blk.input
|
|
64301
64342
|
};
|
|
64302
|
-
} else if (
|
|
64343
|
+
} else if (type2 === "web_search_tool_result") {
|
|
64303
64344
|
yield {
|
|
64304
64345
|
type: "server_toolresult",
|
|
64305
64346
|
toolUseId: blk.tool_use_id,
|
|
64306
|
-
resultType:
|
|
64347
|
+
resultType: type2,
|
|
64307
64348
|
data: blk
|
|
64308
64349
|
};
|
|
64309
64350
|
}
|
|
@@ -64314,34 +64355,34 @@ function messageToResponse(message) {
|
|
|
64314
64355
|
const contentParts = [];
|
|
64315
64356
|
for (const block2 of message.content) {
|
|
64316
64357
|
const blk = block2;
|
|
64317
|
-
const
|
|
64318
|
-
if (
|
|
64358
|
+
const type2 = blk.type;
|
|
64359
|
+
if (type2 === "text") {
|
|
64319
64360
|
contentParts.push({ type: "text", text: blk.text });
|
|
64320
|
-
} else if (
|
|
64361
|
+
} else if (type2 === "thinking") {
|
|
64321
64362
|
contentParts.push({
|
|
64322
64363
|
type: "thinking",
|
|
64323
64364
|
text: blk.thinking,
|
|
64324
64365
|
signature: blk.signature ?? ""
|
|
64325
64366
|
});
|
|
64326
|
-
} else if (
|
|
64367
|
+
} else if (type2 === "tool_use") {
|
|
64327
64368
|
contentParts.push({
|
|
64328
64369
|
type: "tool_call",
|
|
64329
64370
|
id: blk.id,
|
|
64330
64371
|
name: blk.name,
|
|
64331
64372
|
args: blk.input ?? {}
|
|
64332
64373
|
});
|
|
64333
|
-
} else if (
|
|
64374
|
+
} else if (type2 === "server_tool_use") {
|
|
64334
64375
|
contentParts.push({
|
|
64335
64376
|
type: "server_tool_call",
|
|
64336
64377
|
id: blk.id,
|
|
64337
64378
|
name: blk.name,
|
|
64338
64379
|
input: blk.input
|
|
64339
64380
|
});
|
|
64340
|
-
} else if (
|
|
64381
|
+
} else if (type2 === "web_search_tool_result") {
|
|
64341
64382
|
contentParts.push({
|
|
64342
64383
|
type: "server_tool_result",
|
|
64343
64384
|
toolUseId: blk.tool_use_id,
|
|
64344
|
-
resultType:
|
|
64385
|
+
resultType: type2,
|
|
64345
64386
|
data: blk
|
|
64346
64387
|
});
|
|
64347
64388
|
} else {
|
|
@@ -64433,6 +64474,68 @@ function fnv1aHash(value) {
|
|
|
64433
64474
|
}
|
|
64434
64475
|
return (hash2 >>> 0).toString(16).padStart(8, "0");
|
|
64435
64476
|
}
|
|
64477
|
+
var _diagFn = null;
|
|
64478
|
+
function providerDiag(phase, data) {
|
|
64479
|
+
_diagFn?.(phase, data);
|
|
64480
|
+
}
|
|
64481
|
+
async function uploadMoonshotVideos(client, messages, signal) {
|
|
64482
|
+
for (const msg of messages) {
|
|
64483
|
+
if (typeof msg.content === "string") continue;
|
|
64484
|
+
for (const part of msg.content) {
|
|
64485
|
+
if (part.type === "video") {
|
|
64486
|
+
await ensureUploaded(client, part, signal);
|
|
64487
|
+
continue;
|
|
64488
|
+
}
|
|
64489
|
+
if (part.type === "tool_result" && Array.isArray(part.content)) {
|
|
64490
|
+
for (const inner of part.content) {
|
|
64491
|
+
if (inner.type === "video") {
|
|
64492
|
+
await ensureUploaded(client, inner, signal);
|
|
64493
|
+
}
|
|
64494
|
+
}
|
|
64495
|
+
}
|
|
64496
|
+
}
|
|
64497
|
+
}
|
|
64498
|
+
}
|
|
64499
|
+
async function ensureUploaded(client, video, signal) {
|
|
64500
|
+
if (video.fileId) {
|
|
64501
|
+
providerDiag("moonshot_video_cached", { fileId: video.fileId });
|
|
64502
|
+
return;
|
|
64503
|
+
}
|
|
64504
|
+
if (!video.data) {
|
|
64505
|
+
providerDiag("moonshot_video_skipped_no_data", {});
|
|
64506
|
+
return;
|
|
64507
|
+
}
|
|
64508
|
+
providerDiag("moonshot_video_upload_start", {
|
|
64509
|
+
mediaType: video.mediaType,
|
|
64510
|
+
bytes: Math.floor(video.data.length * 3 / 4)
|
|
64511
|
+
});
|
|
64512
|
+
video.fileId = await uploadOne(client, video, signal);
|
|
64513
|
+
providerDiag("moonshot_video_upload_done", { fileId: video.fileId });
|
|
64514
|
+
}
|
|
64515
|
+
async function uploadOne(client, video, signal) {
|
|
64516
|
+
const bytes = Buffer.from(video.data, "base64");
|
|
64517
|
+
const mediaType = video.mediaType || "video/mp4";
|
|
64518
|
+
const filename = `upload.${extForMime(mediaType)}`;
|
|
64519
|
+
const file2 = new File([new Uint8Array(bytes)], filename, { type: mediaType });
|
|
64520
|
+
const uploaded = await client.files.create(
|
|
64521
|
+
{ file: file2, purpose: "video" },
|
|
64522
|
+
signal ? { signal } : void 0
|
|
64523
|
+
);
|
|
64524
|
+
return uploaded.id;
|
|
64525
|
+
}
|
|
64526
|
+
var MIME_TO_EXT = {
|
|
64527
|
+
"video/mp4": "mp4",
|
|
64528
|
+
"video/mpeg": "mpeg",
|
|
64529
|
+
"video/quicktime": "mov",
|
|
64530
|
+
"video/webm": "webm",
|
|
64531
|
+
"video/x-matroska": "mkv",
|
|
64532
|
+
"video/x-msvideo": "avi",
|
|
64533
|
+
"video/x-flv": "flv",
|
|
64534
|
+
"video/3gpp": "3gp"
|
|
64535
|
+
};
|
|
64536
|
+
function extForMime(mediaType) {
|
|
64537
|
+
return MIME_TO_EXT[mediaType.toLowerCase()] ?? "mp4";
|
|
64538
|
+
}
|
|
64436
64539
|
function getEnvironment() {
|
|
64437
64540
|
return globalThis.process?.env;
|
|
64438
64541
|
}
|
|
@@ -64459,7 +64562,8 @@ function createClient2(options) {
|
|
|
64459
64562
|
return new OpenAI({
|
|
64460
64563
|
apiKey: options.apiKey,
|
|
64461
64564
|
...options.baseUrl ? { baseURL: options.baseUrl } : {},
|
|
64462
|
-
...options.fetch ? { fetch: options.fetch } : {}
|
|
64565
|
+
...options.fetch ? { fetch: options.fetch } : {},
|
|
64566
|
+
...options.defaultHeaders ? { defaultHeaders: options.defaultHeaders } : {}
|
|
64463
64567
|
});
|
|
64464
64568
|
}
|
|
64465
64569
|
function streamOpenAI(options) {
|
|
@@ -64472,6 +64576,13 @@ async function* runStream2(options) {
|
|
|
64472
64576
|
const usesThinkingParam = options.provider === "glm" || options.provider === "moonshot" || options.provider === "xiaomi";
|
|
64473
64577
|
const downgradedImages = downgradeUnsupportedImages(options.messages, options.supportsImages);
|
|
64474
64578
|
const downgradedMessages = downgradeUnsupportedVideos(downgradedImages, options.supportsVideo);
|
|
64579
|
+
if (options.provider === "moonshot") {
|
|
64580
|
+
try {
|
|
64581
|
+
await uploadMoonshotVideos(client, downgradedMessages, options.signal);
|
|
64582
|
+
} catch (err) {
|
|
64583
|
+
throw toError2(err, providerName);
|
|
64584
|
+
}
|
|
64585
|
+
}
|
|
64475
64586
|
const messages = toOpenAIMessages(downgradedMessages, {
|
|
64476
64587
|
provider: options.provider,
|
|
64477
64588
|
thinking: !!options.thinking,
|
|
@@ -64710,8 +64821,8 @@ function completionToResponse(completion) {
|
|
|
64710
64821
|
};
|
|
64711
64822
|
}
|
|
64712
64823
|
function classifyOpenAICompatLimit(args) {
|
|
64713
|
-
const { status, code, type, message } = args;
|
|
64714
|
-
const codeType = `${code ?? ""} ${
|
|
64824
|
+
const { status, code, type: type2, message } = args;
|
|
64825
|
+
const codeType = `${code ?? ""} ${type2 ?? ""}`.toLowerCase();
|
|
64715
64826
|
const isHard = status === 402 || codeType.includes("insufficient_quota") || isHardBillingMessage(message);
|
|
64716
64827
|
if (isHard) return "hard";
|
|
64717
64828
|
if (status === 429 || codeType.includes("rate_limit_exceeded") || codeType.includes("too_many_requests")) {
|
|
@@ -64731,11 +64842,11 @@ function toError2(err, provider = "openai") {
|
|
|
64731
64842
|
}
|
|
64732
64843
|
const requestId = err.request_id ?? (typeof body?.request_id === "string" ? body.request_id : void 0);
|
|
64733
64844
|
const code = typeof err.code === "string" ? err.code : void 0;
|
|
64734
|
-
const
|
|
64845
|
+
const type2 = typeof err.type === "string" ? err.type : void 0;
|
|
64735
64846
|
const limit2 = classifyOpenAICompatLimit({
|
|
64736
64847
|
status: err.status,
|
|
64737
64848
|
code,
|
|
64738
|
-
type,
|
|
64849
|
+
type: type2,
|
|
64739
64850
|
message: cleanMessage
|
|
64740
64851
|
});
|
|
64741
64852
|
if (limit2 === "hard") {
|
|
@@ -64771,10 +64882,6 @@ function toError2(err, provider = "openai") {
|
|
|
64771
64882
|
}
|
|
64772
64883
|
return new ProviderError(provider, String(err));
|
|
64773
64884
|
}
|
|
64774
|
-
var _diagFn = null;
|
|
64775
|
-
function providerDiag(phase, data) {
|
|
64776
|
-
_diagFn?.(phase, data);
|
|
64777
|
-
}
|
|
64778
64885
|
function parseSseBuffer(buffer) {
|
|
64779
64886
|
const events = [];
|
|
64780
64887
|
let cursor = 0;
|
|
@@ -64923,13 +65030,13 @@ async function* runStream3(options) {
|
|
|
64923
65030
|
const diagStart = Date.now();
|
|
64924
65031
|
const diagSeen = /* @__PURE__ */ new Set();
|
|
64925
65032
|
for await (const event of parseSSE(response.body)) {
|
|
64926
|
-
const
|
|
64927
|
-
if (!
|
|
64928
|
-
if (!diagSeen.has(
|
|
64929
|
-
diagSeen.add(
|
|
64930
|
-
providerDiag("codex_event_first", { type, sinceStartMs: Date.now() - diagStart });
|
|
65033
|
+
const type2 = event.type;
|
|
65034
|
+
if (!type2) continue;
|
|
65035
|
+
if (!diagSeen.has(type2)) {
|
|
65036
|
+
diagSeen.add(type2);
|
|
65037
|
+
providerDiag("codex_event_first", { type: type2, sinceStartMs: Date.now() - diagStart });
|
|
64931
65038
|
}
|
|
64932
|
-
if (
|
|
65039
|
+
if (type2 === "error") {
|
|
64933
65040
|
const nested = event.error ?? void 0;
|
|
64934
65041
|
const message = nested?.message ?? event.message ?? "Codex stream emitted an error chunk without a message.";
|
|
64935
65042
|
const code = nested?.code ?? nested?.type ?? event.code ?? "server_error";
|
|
@@ -64945,7 +65052,7 @@ async function* runStream3(options) {
|
|
|
64945
65052
|
...code === "server_error" ? { statusCode: 500 } : {}
|
|
64946
65053
|
});
|
|
64947
65054
|
}
|
|
64948
|
-
if (
|
|
65055
|
+
if (type2 === "response.failed") {
|
|
64949
65056
|
const nested = event.error;
|
|
64950
65057
|
const message = nested?.message ?? "Codex response failed.";
|
|
64951
65058
|
const requestId = extractRequestIdFromMessage(message) ?? event.request_id;
|
|
@@ -64953,7 +65060,7 @@ async function* runStream3(options) {
|
|
|
64953
65060
|
...requestId != null ? { requestId } : {}
|
|
64954
65061
|
});
|
|
64955
65062
|
}
|
|
64956
|
-
if (
|
|
65063
|
+
if (type2 === "response.output_text.delta") {
|
|
64957
65064
|
const delta = event.delta;
|
|
64958
65065
|
const itemId = event.item_id;
|
|
64959
65066
|
const contentIndex = event.content_index;
|
|
@@ -64972,7 +65079,7 @@ async function* runStream3(options) {
|
|
|
64972
65079
|
});
|
|
64973
65080
|
}
|
|
64974
65081
|
}
|
|
64975
|
-
if (
|
|
65082
|
+
if (type2 === "response.output_text.done") {
|
|
64976
65083
|
const fullText = event.text;
|
|
64977
65084
|
if (fullText) {
|
|
64978
65085
|
const itemId = event.item_id;
|
|
@@ -64997,11 +65104,11 @@ async function* runStream3(options) {
|
|
|
64997
65104
|
}
|
|
64998
65105
|
}
|
|
64999
65106
|
}
|
|
65000
|
-
if (
|
|
65107
|
+
if (type2 === "response.reasoning_summary_text.delta" || type2 === "response.reasoning_summary.delta" || type2 === "response.reasoning_text.delta" || type2 === "response.reasoning.delta") {
|
|
65001
65108
|
const delta = event.delta;
|
|
65002
65109
|
if (options.thinking) yield { type: "thinking_delta", text: delta };
|
|
65003
65110
|
}
|
|
65004
|
-
if (
|
|
65111
|
+
if (type2 === "response.output_item.added") {
|
|
65005
65112
|
const item = event.item;
|
|
65006
65113
|
const itemId = item?.id;
|
|
65007
65114
|
const itemType = item?.type;
|
|
@@ -65023,7 +65130,7 @@ async function* runStream3(options) {
|
|
|
65023
65130
|
}
|
|
65024
65131
|
}
|
|
65025
65132
|
}
|
|
65026
|
-
if (
|
|
65133
|
+
if (type2 === "response.output_item.added") {
|
|
65027
65134
|
const item = event.item;
|
|
65028
65135
|
if (item?.type === "function_call") {
|
|
65029
65136
|
const callId = item.call_id;
|
|
@@ -65033,7 +65140,7 @@ async function* runStream3(options) {
|
|
|
65033
65140
|
toolCalls.set(id2, { id: id2, name, argsJson: item.arguments || "" });
|
|
65034
65141
|
}
|
|
65035
65142
|
}
|
|
65036
|
-
if (
|
|
65143
|
+
if (type2 === "response.function_call_arguments.delta") {
|
|
65037
65144
|
const delta = event.delta;
|
|
65038
65145
|
const itemId = event.item_id;
|
|
65039
65146
|
for (const [key, tc] of toolCalls) {
|
|
@@ -65049,7 +65156,7 @@ async function* runStream3(options) {
|
|
|
65049
65156
|
}
|
|
65050
65157
|
}
|
|
65051
65158
|
}
|
|
65052
|
-
if (
|
|
65159
|
+
if (type2 === "response.function_call_arguments.done") {
|
|
65053
65160
|
const itemId = event.item_id;
|
|
65054
65161
|
const argsStr = event.arguments;
|
|
65055
65162
|
for (const [key, tc] of toolCalls) {
|
|
@@ -65059,7 +65166,7 @@ async function* runStream3(options) {
|
|
|
65059
65166
|
}
|
|
65060
65167
|
}
|
|
65061
65168
|
}
|
|
65062
|
-
if (
|
|
65169
|
+
if (type2 === "response.output_item.done") {
|
|
65063
65170
|
const item = event.item;
|
|
65064
65171
|
if (item?.type === "reasoning") {
|
|
65065
65172
|
const encrypted = item.encrypted_content;
|
|
@@ -65091,7 +65198,7 @@ async function* runStream3(options) {
|
|
|
65091
65198
|
}
|
|
65092
65199
|
}
|
|
65093
65200
|
}
|
|
65094
|
-
if (
|
|
65201
|
+
if (type2 === "response.completed" || type2 === "response.done") {
|
|
65095
65202
|
const resp = event.response;
|
|
65096
65203
|
const usage = resp?.usage;
|
|
65097
65204
|
if (usage) {
|
|
@@ -65416,6 +65523,13 @@ ${msg.content}` : msg.content;
|
|
|
65416
65523
|
}
|
|
65417
65524
|
}
|
|
65418
65525
|
});
|
|
65526
|
+
if (typeof result.content !== "string") {
|
|
65527
|
+
for (const block2 of result.content) {
|
|
65528
|
+
if (block2.type === "video") {
|
|
65529
|
+
parts.push({ inlineData: { mimeType: block2.mediaType, data: block2.data } });
|
|
65530
|
+
}
|
|
65531
|
+
}
|
|
65532
|
+
}
|
|
65419
65533
|
}
|
|
65420
65534
|
if (parts.length > 0) contents.push({ role: "user", parts });
|
|
65421
65535
|
}
|
|
@@ -65809,6 +65923,7 @@ var ProviderRegistryImpl = class {
|
|
|
65809
65923
|
};
|
|
65810
65924
|
var providerRegistry = new ProviderRegistryImpl();
|
|
65811
65925
|
var GLM_CODING_BASE_URL = "https://api.z.ai/api/coding/paas/v4";
|
|
65926
|
+
var KIMI_CODE_USER_AGENT = `kimi-code-cli/${process.env.KIMI_CODE_VERSION ?? "1.0.11"}`;
|
|
65812
65927
|
providerRegistry.register("anthropic", {
|
|
65813
65928
|
stream: (options) => streamAnthropic(options)
|
|
65814
65929
|
});
|
|
@@ -65837,10 +65952,11 @@ providerRegistry.register("glm", {
|
|
|
65837
65952
|
})
|
|
65838
65953
|
});
|
|
65839
65954
|
providerRegistry.register("moonshot", {
|
|
65840
|
-
stream: (options) =>
|
|
65841
|
-
|
|
65842
|
-
baseUrl: options.
|
|
65843
|
-
|
|
65955
|
+
stream: (options) => {
|
|
65956
|
+
const baseUrl = options.baseUrl ?? "https://api.moonshot.ai/v1";
|
|
65957
|
+
const defaultHeaders = baseUrl.includes("api.kimi.com") ? { "User-Agent": KIMI_CODE_USER_AGENT, ...options.defaultHeaders } : options.defaultHeaders;
|
|
65958
|
+
return streamOpenAI({ ...options, baseUrl, defaultHeaders });
|
|
65959
|
+
}
|
|
65844
65960
|
});
|
|
65845
65961
|
providerRegistry.register("deepseek", {
|
|
65846
65962
|
stream: (options) => streamOpenAI({
|
|
@@ -65873,8 +65989,23 @@ function stream(options) {
|
|
|
65873
65989
|
`Unknown provider: "${options.provider}". Registered: ${providerRegistry.list().join(", ")}`
|
|
65874
65990
|
);
|
|
65875
65991
|
}
|
|
65992
|
+
if (options.supportsVideo !== true && messagesContainVideo(options.messages)) {
|
|
65993
|
+
throw new VideoUnsupportedError();
|
|
65994
|
+
}
|
|
65876
65995
|
return entry.stream(options);
|
|
65877
65996
|
}
|
|
65997
|
+
function messagesContainVideo(messages) {
|
|
65998
|
+
for (const msg of messages) {
|
|
65999
|
+
if (typeof msg.content === "string" || !Array.isArray(msg.content)) continue;
|
|
66000
|
+
for (const part of msg.content) {
|
|
66001
|
+
if (part.type === "video") return true;
|
|
66002
|
+
if (part.type === "tool_result" && Array.isArray(part.content)) {
|
|
66003
|
+
if (part.content.some((block2) => block2.type === "video")) return true;
|
|
66004
|
+
}
|
|
66005
|
+
}
|
|
66006
|
+
}
|
|
66007
|
+
return false;
|
|
66008
|
+
}
|
|
65878
66009
|
var CONTEXT_OVERFLOW_PATTERNS = [
|
|
65879
66010
|
/context_length_exceeded/i,
|
|
65880
66011
|
/context length exceeded/i,
|
|
@@ -66289,6 +66420,7 @@ async function* agentLoop(messages, options) {
|
|
|
66289
66420
|
compaction: options.compaction,
|
|
66290
66421
|
clearToolUses: options.clearToolUses,
|
|
66291
66422
|
userAgent: options.userAgent,
|
|
66423
|
+
defaultHeaders: options.defaultHeaders,
|
|
66292
66424
|
// Flip to non-streaming fallback after repeated stream stalls.
|
|
66293
66425
|
...useNonStreamingFallback ? { streaming: false } : {}
|
|
66294
66426
|
});
|
|
@@ -67218,7 +67350,7 @@ var Agent = class {
|
|
|
67218
67350
|
}
|
|
67219
67351
|
};
|
|
67220
67352
|
|
|
67221
|
-
// ../gg-core/dist/chunk-
|
|
67353
|
+
// ../gg-core/dist/chunk-LLWQ3Z76.js
|
|
67222
67354
|
init_esm_shims();
|
|
67223
67355
|
var MODELS = [
|
|
67224
67356
|
// ── Anthropic ──────────────────────────────────────────
|
|
@@ -67319,6 +67451,7 @@ var MODELS = [
|
|
|
67319
67451
|
supportsThinking: true,
|
|
67320
67452
|
supportsImages: true,
|
|
67321
67453
|
supportsVideo: true,
|
|
67454
|
+
maxVideoBytes: 20 * 1024 * 1024,
|
|
67322
67455
|
costTier: "low",
|
|
67323
67456
|
maxThinkingLevel: "high"
|
|
67324
67457
|
},
|
|
@@ -67331,6 +67464,7 @@ var MODELS = [
|
|
|
67331
67464
|
supportsThinking: true,
|
|
67332
67465
|
supportsImages: true,
|
|
67333
67466
|
supportsVideo: true,
|
|
67467
|
+
maxVideoBytes: 20 * 1024 * 1024,
|
|
67334
67468
|
costTier: "low",
|
|
67335
67469
|
maxThinkingLevel: "high"
|
|
67336
67470
|
},
|
|
@@ -67344,6 +67478,7 @@ var MODELS = [
|
|
|
67344
67478
|
supportsThinking: true,
|
|
67345
67479
|
supportsImages: true,
|
|
67346
67480
|
supportsVideo: true,
|
|
67481
|
+
maxVideoBytes: 100 * 1024 * 1024,
|
|
67347
67482
|
costTier: "medium",
|
|
67348
67483
|
maxThinkingLevel: "high"
|
|
67349
67484
|
},
|
|
@@ -67394,6 +67529,7 @@ var MODELS = [
|
|
|
67394
67529
|
supportsThinking: true,
|
|
67395
67530
|
supportsImages: true,
|
|
67396
67531
|
supportsVideo: true,
|
|
67532
|
+
maxVideoBytes: 50 * 1024 * 1024,
|
|
67397
67533
|
costTier: "medium",
|
|
67398
67534
|
maxThinkingLevel: "high"
|
|
67399
67535
|
},
|
|
@@ -67456,6 +67592,12 @@ function getModel(id2) {
|
|
|
67456
67592
|
function getModelsForProvider(provider) {
|
|
67457
67593
|
return MODELS.filter((m) => m.provider === provider);
|
|
67458
67594
|
}
|
|
67595
|
+
var DEFAULT_MAX_VIDEO_BYTES = 20 * 1024 * 1024;
|
|
67596
|
+
function getVideoByteLimit(modelId) {
|
|
67597
|
+
const model = getModel(modelId);
|
|
67598
|
+
if (!model?.supportsVideo) return void 0;
|
|
67599
|
+
return model.maxVideoBytes ?? DEFAULT_MAX_VIDEO_BYTES;
|
|
67600
|
+
}
|
|
67459
67601
|
function getDefaultModel(provider) {
|
|
67460
67602
|
if (provider === "xiaomi") return MODELS.find((m) => m.id === "mimo-v2-pro");
|
|
67461
67603
|
if (provider === "openai") return MODELS.find((m) => m.id === "gpt-5.5");
|
|
@@ -67526,9 +67668,14 @@ import fs3 from "fs/promises";
|
|
|
67526
67668
|
import path22 from "path";
|
|
67527
67669
|
import fs4 from "fs/promises";
|
|
67528
67670
|
import crypto5 from "crypto";
|
|
67671
|
+
import { execFileSync } from "child_process";
|
|
67672
|
+
import { randomUUID } from "crypto";
|
|
67673
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
67674
|
+
import { arch, hostname as hostname3, release, type } from "os";
|
|
67675
|
+
import path32 from "path";
|
|
67529
67676
|
import { spawn } from "child_process";
|
|
67530
67677
|
import fs5 from "fs";
|
|
67531
|
-
import
|
|
67678
|
+
import path42 from "path";
|
|
67532
67679
|
var OPENAI_GPT_THINKING_LEVELS = ["medium", "high", "xhigh"];
|
|
67533
67680
|
var ANTHROPIC_OPUS_48_47_THINKING_LEVELS = [
|
|
67534
67681
|
"low",
|
|
@@ -67923,6 +68070,147 @@ async function postTokenRequest2(body) {
|
|
|
67923
68070
|
}
|
|
67924
68071
|
return await response.json();
|
|
67925
68072
|
}
|
|
68073
|
+
var CLIENT_ID3 = "17e5f671-d194-4dfb-9706-5516cb48c098";
|
|
68074
|
+
var DEFAULT_OAUTH_HOST = "https://auth.kimi.com";
|
|
68075
|
+
var DEFAULT_CODING_BASE_URL = "https://api.kimi.com/coding/v1";
|
|
68076
|
+
var KIMI_PLATFORM = "kimi_code_cli";
|
|
68077
|
+
var DEFAULT_KIMI_VERSION = "1.0.11";
|
|
68078
|
+
var DEVICE_TIMEOUT_MS = 15 * 60 * 1e3;
|
|
68079
|
+
function oauthHost() {
|
|
68080
|
+
const host = process.env.KIMI_CODE_OAUTH_HOST ?? process.env.KIMI_OAUTH_HOST ?? DEFAULT_OAUTH_HOST;
|
|
68081
|
+
return host.replace(/\/+$/, "");
|
|
68082
|
+
}
|
|
68083
|
+
function kimiCodeBaseUrl() {
|
|
68084
|
+
return (process.env.KIMI_CODE_BASE_URL ?? DEFAULT_CODING_BASE_URL).replace(/\/+$/, "");
|
|
68085
|
+
}
|
|
68086
|
+
function kimiVersion() {
|
|
68087
|
+
const v = process.env.KIMI_CODE_VERSION ?? DEFAULT_KIMI_VERSION;
|
|
68088
|
+
return asciiHeader(v, DEFAULT_KIMI_VERSION);
|
|
68089
|
+
}
|
|
68090
|
+
function asciiHeader(value, fallback = "unknown") {
|
|
68091
|
+
const cleaned = value.replace(/[^\u0020-\u007E]/g, "").trim();
|
|
68092
|
+
return cleaned.length > 0 ? cleaned : fallback;
|
|
68093
|
+
}
|
|
68094
|
+
function macOsProductVersion() {
|
|
68095
|
+
try {
|
|
68096
|
+
const version2 = execFileSync("/usr/bin/sw_vers", ["-productVersion"], {
|
|
68097
|
+
encoding: "utf-8",
|
|
68098
|
+
timeout: 1e3
|
|
68099
|
+
}).trim();
|
|
68100
|
+
return version2.length > 0 ? version2 : void 0;
|
|
68101
|
+
} catch {
|
|
68102
|
+
return void 0;
|
|
68103
|
+
}
|
|
68104
|
+
}
|
|
68105
|
+
function deviceModel() {
|
|
68106
|
+
const os12 = type();
|
|
68107
|
+
const version2 = release();
|
|
68108
|
+
const osArch = arch();
|
|
68109
|
+
if (os12 === "Darwin") return `macOS ${macOsProductVersion() ?? version2} ${osArch}`;
|
|
68110
|
+
if (os12 === "Windows_NT") return `Windows ${version2} ${osArch}`;
|
|
68111
|
+
return `${os12} ${version2} ${osArch}`.trim();
|
|
68112
|
+
}
|
|
68113
|
+
function deviceId() {
|
|
68114
|
+
const idPath = path32.join(getAppPaths().agentDir, "kimi_device_id");
|
|
68115
|
+
if (existsSync(idPath)) {
|
|
68116
|
+
try {
|
|
68117
|
+
const text = readFileSync(idPath, "utf-8").trim();
|
|
68118
|
+
if (text.length > 0) return text;
|
|
68119
|
+
} catch {
|
|
68120
|
+
}
|
|
68121
|
+
}
|
|
68122
|
+
const id2 = randomUUID();
|
|
68123
|
+
try {
|
|
68124
|
+
mkdirSync(getAppPaths().agentDir, { recursive: true, mode: 448 });
|
|
68125
|
+
writeFileSync(idPath, id2, { encoding: "utf-8", mode: 384 });
|
|
68126
|
+
} catch {
|
|
68127
|
+
}
|
|
68128
|
+
return id2;
|
|
68129
|
+
}
|
|
68130
|
+
function deviceHeaders() {
|
|
68131
|
+
return {
|
|
68132
|
+
"X-Msh-Platform": KIMI_PLATFORM,
|
|
68133
|
+
"X-Msh-Version": kimiVersion(),
|
|
68134
|
+
"X-Msh-Device-Name": asciiHeader(hostname3()),
|
|
68135
|
+
"X-Msh-Device-Model": asciiHeader(deviceModel()),
|
|
68136
|
+
"X-Msh-Os-Version": asciiHeader(release()),
|
|
68137
|
+
"X-Msh-Device-Id": deviceId()
|
|
68138
|
+
};
|
|
68139
|
+
}
|
|
68140
|
+
function kimiCodingHeaders() {
|
|
68141
|
+
return {
|
|
68142
|
+
"User-Agent": `kimi-code-cli/${kimiVersion()}`,
|
|
68143
|
+
...deviceHeaders()
|
|
68144
|
+
};
|
|
68145
|
+
}
|
|
68146
|
+
function isKimiCodingEndpoint(baseUrl) {
|
|
68147
|
+
if (typeof baseUrl !== "string" || baseUrl.length === 0) return false;
|
|
68148
|
+
const normalized = baseUrl.replace(/\/+$/, "");
|
|
68149
|
+
return normalized === kimiCodeBaseUrl() || /(^|\.)kimi\.com/i.test(normalized);
|
|
68150
|
+
}
|
|
68151
|
+
async function postForm(endpoint, params) {
|
|
68152
|
+
const response = await fetch(`${oauthHost()}${endpoint}`, {
|
|
68153
|
+
method: "POST",
|
|
68154
|
+
headers: {
|
|
68155
|
+
...deviceHeaders(),
|
|
68156
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
|
68157
|
+
Accept: "application/json"
|
|
68158
|
+
},
|
|
68159
|
+
body: new URLSearchParams(params).toString()
|
|
68160
|
+
});
|
|
68161
|
+
let data = {};
|
|
68162
|
+
try {
|
|
68163
|
+
const parsed = await response.json();
|
|
68164
|
+
if (parsed && typeof parsed === "object") data = parsed;
|
|
68165
|
+
} catch {
|
|
68166
|
+
}
|
|
68167
|
+
return { status: response.status, data };
|
|
68168
|
+
}
|
|
68169
|
+
function errorDetail(data) {
|
|
68170
|
+
const desc = data.error_description ?? data.message ?? data.error;
|
|
68171
|
+
return typeof desc === "string" && desc.length > 0 ? desc : "unknown error";
|
|
68172
|
+
}
|
|
68173
|
+
function credsFromTokenResponse(data) {
|
|
68174
|
+
const accessToken = data.access_token;
|
|
68175
|
+
const refreshToken = data.refresh_token;
|
|
68176
|
+
const expiresIn = Number(data.expires_in);
|
|
68177
|
+
if (typeof accessToken !== "string" || accessToken.length === 0) {
|
|
68178
|
+
throw new Error("Kimi OAuth response missing access_token.");
|
|
68179
|
+
}
|
|
68180
|
+
if (typeof refreshToken !== "string" || refreshToken.length === 0) {
|
|
68181
|
+
throw new Error("Kimi OAuth response missing refresh_token.");
|
|
68182
|
+
}
|
|
68183
|
+
if (!Number.isFinite(expiresIn) || expiresIn <= 0) {
|
|
68184
|
+
throw new Error("Kimi OAuth response missing or invalid expires_in.");
|
|
68185
|
+
}
|
|
68186
|
+
return {
|
|
68187
|
+
accessToken,
|
|
68188
|
+
refreshToken,
|
|
68189
|
+
expiresAt: Date.now() + expiresIn * 1e3,
|
|
68190
|
+
baseUrl: kimiCodeBaseUrl()
|
|
68191
|
+
};
|
|
68192
|
+
}
|
|
68193
|
+
async function refreshKimiToken(refreshToken) {
|
|
68194
|
+
const { status, data } = await postForm("/api/oauth/token", {
|
|
68195
|
+
client_id: CLIENT_ID3,
|
|
68196
|
+
grant_type: "refresh_token",
|
|
68197
|
+
refresh_token: refreshToken
|
|
68198
|
+
});
|
|
68199
|
+
if (status === 200 && typeof data.access_token === "string") {
|
|
68200
|
+
return credsFromTokenResponse(data);
|
|
68201
|
+
}
|
|
68202
|
+
const errorCode = typeof data.error === "string" ? data.error : "";
|
|
68203
|
+
throw new Error(`Kimi token refresh failed (${status}): ${errorCode || errorDetail(data)}`);
|
|
68204
|
+
}
|
|
68205
|
+
var MOONSHOT_OAUTH_KEY = "moonshot-oauth";
|
|
68206
|
+
var STATIC_API_KEY_PROVIDERS = /* @__PURE__ */ new Set([
|
|
68207
|
+
"glm",
|
|
68208
|
+
"moonshot",
|
|
68209
|
+
"xiaomi",
|
|
68210
|
+
"minimax",
|
|
68211
|
+
"deepseek",
|
|
68212
|
+
"openrouter"
|
|
68213
|
+
]);
|
|
67926
68214
|
var AuthStorage = class {
|
|
67927
68215
|
data = {};
|
|
67928
68216
|
filePath;
|
|
@@ -67946,6 +68234,30 @@ var AuthStorage = class {
|
|
|
67946
68234
|
await this.ensureLoaded();
|
|
67947
68235
|
return Boolean(this.data[provider]);
|
|
67948
68236
|
}
|
|
68237
|
+
/**
|
|
68238
|
+
* True if the user has any usable auth for the logical provider. For
|
|
68239
|
+
* `moonshot` this is satisfied by either the Kimi OAuth credential or the
|
|
68240
|
+
* Moonshot API key.
|
|
68241
|
+
*/
|
|
68242
|
+
async hasProviderAuth(provider) {
|
|
68243
|
+
await this.ensureLoaded();
|
|
68244
|
+
if (provider === "moonshot") {
|
|
68245
|
+
return Boolean(this.data[MOONSHOT_OAUTH_KEY] || this.data["moonshot"]);
|
|
68246
|
+
}
|
|
68247
|
+
return Boolean(this.data[provider]);
|
|
68248
|
+
}
|
|
68249
|
+
/**
|
|
68250
|
+
* True if the active credential for `provider` is a static API key with no
|
|
68251
|
+
* refresh mechanism. For `moonshot` this is only true when the Kimi OAuth
|
|
68252
|
+
* credential is absent (a present OAuth credential is refreshable).
|
|
68253
|
+
*/
|
|
68254
|
+
async isStaticApiKey(provider) {
|
|
68255
|
+
await this.ensureLoaded();
|
|
68256
|
+
if (provider === "moonshot" && this.data[MOONSHOT_OAUTH_KEY]) {
|
|
68257
|
+
return false;
|
|
68258
|
+
}
|
|
68259
|
+
return STATIC_API_KEY_PROVIDERS.has(provider);
|
|
68260
|
+
}
|
|
67949
68261
|
async load() {
|
|
67950
68262
|
await withFileLock(this.filePath, async () => {
|
|
67951
68263
|
try {
|
|
@@ -68000,11 +68312,21 @@ var AuthStorage = class {
|
|
|
68000
68312
|
*/
|
|
68001
68313
|
async resolveCredentials(provider, opts) {
|
|
68002
68314
|
await this.ensureLoaded();
|
|
68315
|
+
if (provider === "moonshot" && this.data[MOONSHOT_OAUTH_KEY]) {
|
|
68316
|
+
try {
|
|
68317
|
+
return await this.resolveCredentials(MOONSHOT_OAUTH_KEY, opts);
|
|
68318
|
+
} catch (err) {
|
|
68319
|
+
if (err instanceof NotLoggedInError && this.data["moonshot"]) {
|
|
68320
|
+
return this.data["moonshot"];
|
|
68321
|
+
}
|
|
68322
|
+
throw err;
|
|
68323
|
+
}
|
|
68324
|
+
}
|
|
68003
68325
|
const creds = this.data[provider];
|
|
68004
68326
|
if (!creds) {
|
|
68005
68327
|
throw new NotLoggedInError(provider);
|
|
68006
68328
|
}
|
|
68007
|
-
if (provider
|
|
68329
|
+
if (STATIC_API_KEY_PROVIDERS.has(provider)) {
|
|
68008
68330
|
return creds;
|
|
68009
68331
|
}
|
|
68010
68332
|
if (!opts?.forceRefresh && Date.now() < creds.expiresAt) {
|
|
@@ -68023,7 +68345,7 @@ var AuthStorage = class {
|
|
|
68023
68345
|
}
|
|
68024
68346
|
} catch {
|
|
68025
68347
|
}
|
|
68026
|
-
const refreshFn = provider === "anthropic" ? refreshAnthropicToken : provider === "gemini" ? refreshGeminiToken : refreshOpenAIToken;
|
|
68348
|
+
const refreshFn = provider === "anthropic" ? refreshAnthropicToken : provider === "gemini" ? refreshGeminiToken : provider === MOONSHOT_OAUTH_KEY ? refreshKimiToken : refreshOpenAIToken;
|
|
68027
68349
|
let refreshed;
|
|
68028
68350
|
try {
|
|
68029
68351
|
refreshed = await refreshFn(creds.refreshToken);
|
|
@@ -68139,7 +68461,7 @@ var TelegramBot = class {
|
|
|
68139
68461
|
} catch (err) {
|
|
68140
68462
|
if (!this.running) break;
|
|
68141
68463
|
console.error(`[telegram] Poll error: ${err instanceof Error ? err.message : err}`);
|
|
68142
|
-
await
|
|
68464
|
+
await sleep22(3e3);
|
|
68143
68465
|
}
|
|
68144
68466
|
}
|
|
68145
68467
|
}
|
|
@@ -68309,7 +68631,7 @@ function splitMessage(text) {
|
|
|
68309
68631
|
}
|
|
68310
68632
|
return chunks;
|
|
68311
68633
|
}
|
|
68312
|
-
function
|
|
68634
|
+
function sleep22(ms) {
|
|
68313
68635
|
return new Promise((r2) => setTimeout(r2, ms));
|
|
68314
68636
|
}
|
|
68315
68637
|
var TARGET_SAMPLE_RATE = 16e3;
|
|
@@ -68431,7 +68753,7 @@ function createAutoUpdater(config2) {
|
|
|
68431
68753
|
function writeState(state3) {
|
|
68432
68754
|
try {
|
|
68433
68755
|
const filePath = stateFilePath();
|
|
68434
|
-
fs5.mkdirSync(
|
|
68756
|
+
fs5.mkdirSync(path42.dirname(filePath), { recursive: true, mode: 448 });
|
|
68435
68757
|
fs5.writeFileSync(filePath, JSON.stringify(state3));
|
|
68436
68758
|
} catch {
|
|
68437
68759
|
}
|
|
@@ -68881,18 +69203,18 @@ import fs9 from "fs/promises";
|
|
|
68881
69203
|
import { spawn as spawn3 } from "child_process";
|
|
68882
69204
|
import { createReadStream } from "fs";
|
|
68883
69205
|
var localOperations = {
|
|
68884
|
-
readFile: (
|
|
68885
|
-
writeFile: async (
|
|
69206
|
+
readFile: (path43) => fs9.readFile(path43, "utf-8"),
|
|
69207
|
+
writeFile: async (path43, content) => {
|
|
68886
69208
|
const { dirname: dirname3 } = await import("path");
|
|
68887
|
-
await fs9.mkdir(dirname3(
|
|
68888
|
-
await fs9.writeFile(
|
|
69209
|
+
await fs9.mkdir(dirname3(path43), { recursive: true });
|
|
69210
|
+
await fs9.writeFile(path43, content, "utf-8");
|
|
68889
69211
|
},
|
|
68890
|
-
stat: (
|
|
68891
|
-
lstat: (
|
|
68892
|
-
readdir: (
|
|
68893
|
-
mkdir: (
|
|
69212
|
+
stat: (path43) => fs9.stat(path43),
|
|
69213
|
+
lstat: (path43) => fs9.lstat(path43),
|
|
69214
|
+
readdir: (path43, options) => fs9.readdir(path43, options),
|
|
69215
|
+
mkdir: (path43) => fs9.mkdir(path43, { recursive: true }).then(() => {
|
|
68894
69216
|
}),
|
|
68895
|
-
createReadStream: (
|
|
69217
|
+
createReadStream: (path43, encoding) => createReadStream(path43, { encoding }),
|
|
68896
69218
|
spawn: (command, args, options) => spawn3(command, args, {
|
|
68897
69219
|
cwd: options.cwd,
|
|
68898
69220
|
env: options.env,
|
|
@@ -68937,8 +69259,11 @@ async function assertFresh(tracker, resolvedPath, ops) {
|
|
|
68937
69259
|
// ../ggcoder/dist/utils/image.js
|
|
68938
69260
|
init_esm_shims();
|
|
68939
69261
|
import fs10 from "fs/promises";
|
|
69262
|
+
import os6 from "os";
|
|
68940
69263
|
import path9 from "path";
|
|
68941
69264
|
import { execFile } from "child_process";
|
|
69265
|
+
import { promisify } from "util";
|
|
69266
|
+
var execFileAsync = promisify(execFile);
|
|
68942
69267
|
var sharpFn = null;
|
|
68943
69268
|
async function loadSharp() {
|
|
68944
69269
|
if (sharpFn)
|
|
@@ -68959,6 +69284,85 @@ var ATTACHABLE_EXTENSIONS = /* @__PURE__ */ new Set([
|
|
|
68959
69284
|
...TEXT_EXTENSIONS
|
|
68960
69285
|
]);
|
|
68961
69286
|
var MAX_VIDEO_BYTES = 50 * 1024 * 1024;
|
|
69287
|
+
var COMPRESS_TARGET_BYTES = 90 * 1024 * 1024;
|
|
69288
|
+
var COMPRESS_MAX_WIDTH = 1280;
|
|
69289
|
+
var COMPRESS_FPS = 5;
|
|
69290
|
+
var COMPRESS_AUDIO_KBPS = 64;
|
|
69291
|
+
var COMPRESS_MIN_VIDEO_KBPS = 100;
|
|
69292
|
+
function isMissingBinary(err) {
|
|
69293
|
+
return err?.code === "ENOENT";
|
|
69294
|
+
}
|
|
69295
|
+
async function compressVideoToFit(inputPath, targetBytes = COMPRESS_TARGET_BYTES, signal) {
|
|
69296
|
+
let durationSec;
|
|
69297
|
+
try {
|
|
69298
|
+
const { stdout } = await execFileAsync("ffprobe", ["-v", "error", "-show_entries", "format=duration", "-of", "default=nw=1:nk=1", inputPath], { signal });
|
|
69299
|
+
durationSec = Number.parseFloat(stdout.trim());
|
|
69300
|
+
} catch (err) {
|
|
69301
|
+
return {
|
|
69302
|
+
ok: false,
|
|
69303
|
+
reason: isMissingBinary(err) ? "ffmpeg/ffprobe is not installed" : `could not probe video: ${err instanceof Error ? err.message : String(err)}`
|
|
69304
|
+
};
|
|
69305
|
+
}
|
|
69306
|
+
if (!Number.isFinite(durationSec) || durationSec <= 0) {
|
|
69307
|
+
return { ok: false, reason: "could not determine video duration" };
|
|
69308
|
+
}
|
|
69309
|
+
const totalKbps = Math.floor(targetBytes * 8 / durationSec / 1e3 * 0.9);
|
|
69310
|
+
const videoKbps = Math.max(COMPRESS_MIN_VIDEO_KBPS, totalKbps - COMPRESS_AUDIO_KBPS);
|
|
69311
|
+
const outPath = path9.join(os6.tmpdir(), `ggcoder-compressed-${Date.now()}.mp4`);
|
|
69312
|
+
try {
|
|
69313
|
+
await execFileAsync("ffmpeg", [
|
|
69314
|
+
"-y",
|
|
69315
|
+
"-nostats",
|
|
69316
|
+
"-loglevel",
|
|
69317
|
+
"error",
|
|
69318
|
+
"-i",
|
|
69319
|
+
inputPath,
|
|
69320
|
+
"-vf",
|
|
69321
|
+
`scale='min(${COMPRESS_MAX_WIDTH},iw)':-2,fps=${COMPRESS_FPS}`,
|
|
69322
|
+
"-c:v",
|
|
69323
|
+
"libx264",
|
|
69324
|
+
"-b:v",
|
|
69325
|
+
`${videoKbps}k`,
|
|
69326
|
+
"-maxrate",
|
|
69327
|
+
`${Math.floor(videoKbps * 1.5)}k`,
|
|
69328
|
+
"-bufsize",
|
|
69329
|
+
`${videoKbps}k`,
|
|
69330
|
+
"-preset",
|
|
69331
|
+
"veryfast",
|
|
69332
|
+
"-c:a",
|
|
69333
|
+
"aac",
|
|
69334
|
+
"-b:a",
|
|
69335
|
+
`${COMPRESS_AUDIO_KBPS}k`,
|
|
69336
|
+
outPath
|
|
69337
|
+
], { signal, maxBuffer: 16 * 1024 * 1024 });
|
|
69338
|
+
} catch (err) {
|
|
69339
|
+
await fs10.unlink(outPath).catch(() => {
|
|
69340
|
+
});
|
|
69341
|
+
return {
|
|
69342
|
+
ok: false,
|
|
69343
|
+
reason: isMissingBinary(err) ? "ffmpeg is not installed" : `ffmpeg compression failed: ${err instanceof Error ? err.message : String(err)}`
|
|
69344
|
+
};
|
|
69345
|
+
}
|
|
69346
|
+
let compressedBytes;
|
|
69347
|
+
let originalBytes;
|
|
69348
|
+
try {
|
|
69349
|
+
compressedBytes = (await fs10.stat(outPath)).size;
|
|
69350
|
+
originalBytes = (await fs10.stat(inputPath)).size;
|
|
69351
|
+
} catch {
|
|
69352
|
+
await fs10.unlink(outPath).catch(() => {
|
|
69353
|
+
});
|
|
69354
|
+
return { ok: false, reason: "compression produced no usable output" };
|
|
69355
|
+
}
|
|
69356
|
+
if (compressedBytes > targetBytes) {
|
|
69357
|
+
await fs10.unlink(outPath).catch(() => {
|
|
69358
|
+
});
|
|
69359
|
+
return {
|
|
69360
|
+
ok: false,
|
|
69361
|
+
reason: `compressed video is still ${(compressedBytes / (1024 * 1024)).toFixed(0)} MB`
|
|
69362
|
+
};
|
|
69363
|
+
}
|
|
69364
|
+
return { ok: true, path: outPath, originalBytes, compressedBytes };
|
|
69365
|
+
}
|
|
68962
69366
|
var IMAGE_MEDIA_TYPES = {
|
|
68963
69367
|
".png": "image/png",
|
|
68964
69368
|
".jpg": "image/jpeg",
|
|
@@ -69109,24 +69513,9 @@ async function readImageFile(filePath) {
|
|
|
69109
69513
|
if (VIDEO_EXTENSIONS.has(ext)) {
|
|
69110
69514
|
try {
|
|
69111
69515
|
const mediaType = VIDEO_MEDIA_TYPES[ext] ?? "video/mp4";
|
|
69112
|
-
const
|
|
69113
|
-
|
|
69114
|
-
|
|
69115
|
-
return {
|
|
69116
|
-
kind: "text",
|
|
69117
|
-
fileName,
|
|
69118
|
-
filePath,
|
|
69119
|
-
mediaType: "text/plain",
|
|
69120
|
-
data: `[video ${fileName} (${mb} MB) exceeds the ${MAX_VIDEO_BYTES / (1024 * 1024)} MB inline cap and is saved at: ${filePath} \u2014 use ffmpeg or your tools to inspect it]`
|
|
69121
|
-
};
|
|
69122
|
-
}
|
|
69123
|
-
return {
|
|
69124
|
-
kind: "video",
|
|
69125
|
-
fileName,
|
|
69126
|
-
filePath,
|
|
69127
|
-
mediaType,
|
|
69128
|
-
data: rawBuffer.toString("base64")
|
|
69129
|
-
};
|
|
69516
|
+
const stat = await fs10.stat(filePath);
|
|
69517
|
+
const data = stat.size <= MAX_VIDEO_BYTES ? (await fs10.readFile(filePath)).toString("base64") : "";
|
|
69518
|
+
return { kind: "video", fileName, filePath, mediaType, data };
|
|
69130
69519
|
} catch (err) {
|
|
69131
69520
|
const reason = err instanceof Error ? err.message : String(err);
|
|
69132
69521
|
return {
|
|
@@ -69276,12 +69665,13 @@ var ReadParams = external_exports.object({
|
|
|
69276
69665
|
offset: external_exports.number().int().min(1).optional().describe("Line number to start reading from (1-based)"),
|
|
69277
69666
|
limit: external_exports.number().int().min(1).optional().describe("Maximum number of lines to read")
|
|
69278
69667
|
});
|
|
69279
|
-
function createReadTool(cwd2, readFiles, ops = localOperations, onFileRead) {
|
|
69668
|
+
function createReadTool(cwd2, readFiles, ops = localOperations, onFileRead, videoByteLimit) {
|
|
69669
|
+
const returnVideoNatively = videoByteLimit !== void 0;
|
|
69280
69670
|
return {
|
|
69281
69671
|
name: "read",
|
|
69282
|
-
description: "Read a file's contents. Returns numbered lines (cat -n style). Output is truncated to 2000 lines or 50KB (whichever is hit first). If truncated, use offset/limit to read remaining sections.
|
|
69672
|
+
description: "Read a file's contents. Returns numbered lines (cat -n style). Output is truncated to 2000 lines or 50KB (whichever is hit first). If truncated, use offset/limit to read remaining sections. Reads images natively. " + (returnVideoNatively ? "Reads video files natively too \u2014 you CAN watch and analyze a video by calling read on its path (.mp4/.mov/.webm/.mkv/.avi); large clips are auto-compressed for you. When a user attaches a video, read it; never claim you cannot watch video. " : "") + "Other binary files return a notice instead of content.",
|
|
69283
69673
|
parameters: ReadParams,
|
|
69284
|
-
async execute({ file_path, offset, limit: limit2 }) {
|
|
69674
|
+
async execute({ file_path, offset, limit: limit2 }, context) {
|
|
69285
69675
|
const resolved = resolvePath(cwd2, file_path);
|
|
69286
69676
|
await rejectSymlink(resolved);
|
|
69287
69677
|
const ext = path10.extname(resolved).toLowerCase();
|
|
@@ -69320,6 +69710,45 @@ function createReadTool(cwd2, readFiles, ops = localOperations, onFileRead) {
|
|
|
69320
69710
|
return `Could not read image ${resolved}: ${reason}`;
|
|
69321
69711
|
}
|
|
69322
69712
|
}
|
|
69713
|
+
if (returnVideoNatively && videoByteLimit !== void 0 && VIDEO_EXTENSIONS.has(ext)) {
|
|
69714
|
+
let compressedPath;
|
|
69715
|
+
try {
|
|
69716
|
+
const limitMb = Math.round(videoByteLimit / (1024 * 1024));
|
|
69717
|
+
const stat2 = await ops.stat(resolved);
|
|
69718
|
+
let videoPath = resolved;
|
|
69719
|
+
let note = "";
|
|
69720
|
+
if (stat2.size > videoByteLimit) {
|
|
69721
|
+
const result2 = await compressVideoToFit(resolved, videoByteLimit, context?.signal);
|
|
69722
|
+
if (!result2.ok) {
|
|
69723
|
+
const mb = (stat2.size / (1024 * 1024)).toFixed(1);
|
|
69724
|
+
return `Video ${resolved} is ${mb} MB, over the ${limitMb} MB limit for native analysis, and auto-compression failed (${result2.reason}). Use ffmpeg to downscale it (lower resolution/fps) under that size, then read the result.`;
|
|
69725
|
+
}
|
|
69726
|
+
compressedPath = result2.path;
|
|
69727
|
+
videoPath = result2.path;
|
|
69728
|
+
note = ` (auto-compressed from ${(result2.originalBytes / (1024 * 1024)).toFixed(0)} MB to ${(result2.compressedBytes / (1024 * 1024)).toFixed(0)} MB for analysis)`;
|
|
69729
|
+
}
|
|
69730
|
+
const rawBuffer = await fs11.readFile(videoPath);
|
|
69731
|
+
const mediaType = VIDEO_MEDIA_TYPES[ext] ?? "video/mp4";
|
|
69732
|
+
return {
|
|
69733
|
+
content: [
|
|
69734
|
+
{ type: "text", text: `Read video file ${resolved} [${mediaType}]${note}` },
|
|
69735
|
+
{ type: "video", mediaType, data: rawBuffer.toString("base64") }
|
|
69736
|
+
]
|
|
69737
|
+
};
|
|
69738
|
+
} catch (err) {
|
|
69739
|
+
const code = err.code;
|
|
69740
|
+
if (code === "ENOENT")
|
|
69741
|
+
return `File not found: ${resolved}`;
|
|
69742
|
+
if (code === "EACCES")
|
|
69743
|
+
return `Permission denied: ${resolved}`;
|
|
69744
|
+
const reason = err instanceof Error ? err.message : String(err);
|
|
69745
|
+
return `Could not read video ${resolved}: ${reason}`;
|
|
69746
|
+
} finally {
|
|
69747
|
+
if (compressedPath)
|
|
69748
|
+
await fs11.unlink(compressedPath).catch(() => {
|
|
69749
|
+
});
|
|
69750
|
+
}
|
|
69751
|
+
}
|
|
69323
69752
|
if (BINARY_EXTENSIONS.has(ext)) {
|
|
69324
69753
|
const stat2 = await ops.stat(resolved);
|
|
69325
69754
|
return `Binary file: ${resolved} (${ext}, ${stat2.size} bytes)`;
|
|
@@ -69363,6 +69792,12 @@ function createReadTool(cwd2, readFiles, ops = localOperations, onFileRead) {
|
|
|
69363
69792
|
};
|
|
69364
69793
|
}
|
|
69365
69794
|
|
|
69795
|
+
// ../ggcoder/dist/core/model-registry.js
|
|
69796
|
+
init_esm_shims();
|
|
69797
|
+
|
|
69798
|
+
// ../gg-core/dist/model-registry.js
|
|
69799
|
+
init_esm_shims();
|
|
69800
|
+
|
|
69366
69801
|
// ../ggcoder/dist/tools/write.js
|
|
69367
69802
|
init_esm_shims();
|
|
69368
69803
|
import fs12 from "fs/promises";
|
|
@@ -69534,16 +69969,16 @@ var Diff = class {
|
|
|
69534
69969
|
}
|
|
69535
69970
|
}
|
|
69536
69971
|
}
|
|
69537
|
-
addToPath(
|
|
69538
|
-
const last =
|
|
69972
|
+
addToPath(path43, added, removed, oldPosInc, options) {
|
|
69973
|
+
const last = path43.lastComponent;
|
|
69539
69974
|
if (last && !options.oneChangePerToken && last.added === added && last.removed === removed) {
|
|
69540
69975
|
return {
|
|
69541
|
-
oldPos:
|
|
69976
|
+
oldPos: path43.oldPos + oldPosInc,
|
|
69542
69977
|
lastComponent: { count: last.count + 1, added, removed, previousComponent: last.previousComponent }
|
|
69543
69978
|
};
|
|
69544
69979
|
} else {
|
|
69545
69980
|
return {
|
|
69546
|
-
oldPos:
|
|
69981
|
+
oldPos: path43.oldPos + oldPosInc,
|
|
69547
69982
|
lastComponent: { count: 1, added, removed, previousComponent: last }
|
|
69548
69983
|
};
|
|
69549
69984
|
}
|
|
@@ -70889,8 +71324,8 @@ function createLsTool(cwd2, ops = localOperations) {
|
|
|
70889
71324
|
try {
|
|
70890
71325
|
const stat = await ops.stat(path15.join(resolved, file2.name));
|
|
70891
71326
|
const size = formatSize(stat.size);
|
|
70892
|
-
const
|
|
70893
|
-
lines.push(`${
|
|
71327
|
+
const type2 = file2.isSymbolicLink() ? "l" : "f";
|
|
71328
|
+
lines.push(`${type2} ${size.padStart(8)} ${file2.name}`);
|
|
70894
71329
|
} catch {
|
|
70895
71330
|
lines.push(`? - ${file2.name}`);
|
|
70896
71331
|
}
|
|
@@ -71018,8 +71453,8 @@ ${agentList}` : "\n\nNo named agents configured.";
|
|
|
71018
71453
|
rl.on("line", (line) => {
|
|
71019
71454
|
try {
|
|
71020
71455
|
const event = JSON.parse(line);
|
|
71021
|
-
const
|
|
71022
|
-
switch (
|
|
71456
|
+
const type2 = event.type;
|
|
71457
|
+
switch (type2) {
|
|
71023
71458
|
case "text_delta":
|
|
71024
71459
|
if (textOutput.length < SUB_AGENT_MAX_OUTPUT_CHARS * 2) {
|
|
71025
71460
|
textOutput += event.text;
|
|
@@ -71327,28 +71762,28 @@ function isBlockedUrl(urlString) {
|
|
|
71327
71762
|
} catch {
|
|
71328
71763
|
return true;
|
|
71329
71764
|
}
|
|
71330
|
-
const
|
|
71765
|
+
const hostname4 = parsed.hostname.toLowerCase();
|
|
71331
71766
|
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
|
|
71332
71767
|
return true;
|
|
71333
71768
|
}
|
|
71334
|
-
if (
|
|
71769
|
+
if (hostname4 === "localhost" || hostname4 === "127.0.0.1" || hostname4 === "::1") {
|
|
71335
71770
|
return true;
|
|
71336
71771
|
}
|
|
71337
|
-
if (
|
|
71772
|
+
if (hostname4 === "0.0.0.0") {
|
|
71338
71773
|
return true;
|
|
71339
71774
|
}
|
|
71340
|
-
if (/^10\./.test(
|
|
71775
|
+
if (/^10\./.test(hostname4))
|
|
71341
71776
|
return true;
|
|
71342
|
-
if (/^172\.(1[6-9]|2\d|3[01])\./.test(
|
|
71777
|
+
if (/^172\.(1[6-9]|2\d|3[01])\./.test(hostname4))
|
|
71343
71778
|
return true;
|
|
71344
|
-
if (/^192\.168\./.test(
|
|
71779
|
+
if (/^192\.168\./.test(hostname4))
|
|
71345
71780
|
return true;
|
|
71346
|
-
if (/^169\.254\./.test(
|
|
71781
|
+
if (/^169\.254\./.test(hostname4))
|
|
71347
71782
|
return true;
|
|
71348
|
-
if (
|
|
71783
|
+
if (hostname4.startsWith("[fe80:") || hostname4.startsWith("[fd") || hostname4.startsWith("[fc")) {
|
|
71349
71784
|
return true;
|
|
71350
71785
|
}
|
|
71351
|
-
if (
|
|
71786
|
+
if (hostname4 === "metadata.google.internal")
|
|
71352
71787
|
return true;
|
|
71353
71788
|
return false;
|
|
71354
71789
|
}
|
|
@@ -71795,8 +72230,8 @@ function normalizeDomains(domains) {
|
|
|
71795
72230
|
}
|
|
71796
72231
|
return out;
|
|
71797
72232
|
}
|
|
71798
|
-
function hostMatchesDomain(
|
|
71799
|
-
const host =
|
|
72233
|
+
function hostMatchesDomain(hostname4, domain2) {
|
|
72234
|
+
const host = hostname4.toLowerCase();
|
|
71800
72235
|
return host === domain2 || host.endsWith(`.${domain2}`);
|
|
71801
72236
|
}
|
|
71802
72237
|
var AD_URL_PATTERNS = [
|
|
@@ -71927,8 +72362,8 @@ function isAdSearchResultUrl(rawURL) {
|
|
|
71927
72362
|
const parsed = parseHttpUrl(rawURL);
|
|
71928
72363
|
if (!parsed)
|
|
71929
72364
|
return true;
|
|
71930
|
-
const
|
|
71931
|
-
if (AD_URL_PATTERNS.some((pattern) => pattern.test(
|
|
72365
|
+
const hostname4 = parsed.hostname.toLowerCase();
|
|
72366
|
+
if (AD_URL_PATTERNS.some((pattern) => pattern.test(hostname4)))
|
|
71932
72367
|
return true;
|
|
71933
72368
|
if (AD_PATH_PATTERNS.some((pattern) => pattern.test(parsed.pathname)))
|
|
71934
72369
|
return true;
|
|
@@ -72531,9 +72966,9 @@ init_esm_shims();
|
|
|
72531
72966
|
|
|
72532
72967
|
// ../ggcoder/dist/core/tasks-store.js
|
|
72533
72968
|
init_esm_shims();
|
|
72534
|
-
import { createHash, randomUUID } from "crypto";
|
|
72969
|
+
import { createHash, randomUUID as randomUUID2 } from "crypto";
|
|
72535
72970
|
import { mkdir, readFile, writeFile } from "fs/promises";
|
|
72536
|
-
import { readFileSync, writeFileSync } from "fs";
|
|
72971
|
+
import { readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
|
|
72537
72972
|
import { homedir } from "os";
|
|
72538
72973
|
import { basename, join } from "path";
|
|
72539
72974
|
var TASKS_BASE = join(homedir(), ".gg-tasks", "projects");
|
|
@@ -72554,7 +72989,7 @@ function migrateTask(task) {
|
|
|
72554
72989
|
}
|
|
72555
72990
|
function createTaskRecord(title, prompt) {
|
|
72556
72991
|
return {
|
|
72557
|
-
id:
|
|
72992
|
+
id: randomUUID2(),
|
|
72558
72993
|
title,
|
|
72559
72994
|
prompt,
|
|
72560
72995
|
status: "pending",
|
|
@@ -72876,8 +73311,9 @@ function createTools(cwd2, opts) {
|
|
|
72876
73311
|
const processManager = new ProcessManager();
|
|
72877
73312
|
const ops = opts?.operations ?? localOperations;
|
|
72878
73313
|
const planModeRef = opts?.planModeRef;
|
|
73314
|
+
const videoByteLimit = opts?.model ? getVideoByteLimit(opts.model) : void 0;
|
|
72879
73315
|
const tools = [
|
|
72880
|
-
createReadTool(cwd2, readFiles, ops, opts?.onFileRead),
|
|
73316
|
+
createReadTool(cwd2, readFiles, ops, opts?.onFileRead, videoByteLimit),
|
|
72881
73317
|
createWriteTool(cwd2, readFiles, ops, planModeRef, opts?.onFileMutated, opts?.onPreFileMutation),
|
|
72882
73318
|
createEditTool(cwd2, readFiles, ops, planModeRef, opts?.onFileMutated, opts?.onPreFileMutation),
|
|
72883
73319
|
createBashTool(cwd2, processManager, ops, planModeRef),
|
|
@@ -73767,9 +74203,9 @@ async function buildSystemPrompt(cwd2, skills, planMode, approvedPlanPath, toolN
|
|
|
73767
74203
|
init_esm_shims();
|
|
73768
74204
|
import fs20 from "fs/promises";
|
|
73769
74205
|
import path25 from "path";
|
|
73770
|
-
import
|
|
74206
|
+
import os7 from "os";
|
|
73771
74207
|
import crypto4 from "crypto";
|
|
73772
|
-
var SESSION_DIR = path25.join(
|
|
74208
|
+
var SESSION_DIR = path25.join(os7.homedir(), ".gg", "sessions");
|
|
73773
74209
|
|
|
73774
74210
|
// ../ggcoder/dist/core/index.js
|
|
73775
74211
|
init_esm_shims();
|
|
@@ -73874,12 +74310,6 @@ var EventBus = class {
|
|
|
73874
74310
|
}
|
|
73875
74311
|
};
|
|
73876
74312
|
|
|
73877
|
-
// ../ggcoder/dist/core/model-registry.js
|
|
73878
|
-
init_esm_shims();
|
|
73879
|
-
|
|
73880
|
-
// ../gg-core/dist/model-registry.js
|
|
73881
|
-
init_esm_shims();
|
|
73882
|
-
|
|
73883
74313
|
// ../ggcoder/dist/core/thinking-level.js
|
|
73884
74314
|
init_esm_shims();
|
|
73885
74315
|
|
|
@@ -75276,6 +75706,9 @@ async function loadCustomCommands(cwd2) {
|
|
|
75276
75706
|
// ../ggcoder/dist/core/claude-code-version.js
|
|
75277
75707
|
init_esm_shims();
|
|
75278
75708
|
|
|
75709
|
+
// ../ggcoder/dist/core/oauth/kimi.js
|
|
75710
|
+
init_esm_shims();
|
|
75711
|
+
|
|
75279
75712
|
// ../ggcoder/dist/core/extensions/loader.js
|
|
75280
75713
|
init_esm_shims();
|
|
75281
75714
|
import fs25 from "fs/promises";
|
|
@@ -75794,6 +76227,7 @@ You MUST preserve all references to this plan and its approval status in the sum
|
|
|
75794
76227
|
accountId: options.accountId,
|
|
75795
76228
|
projectId: options.projectId,
|
|
75796
76229
|
baseUrl: options.baseUrl,
|
|
76230
|
+
defaultHeaders: options.provider === "moonshot" && isKimiCodingEndpoint(options.baseUrl) ? kimiCodingHeaders() : void 0,
|
|
75797
76231
|
signal: options.signal
|
|
75798
76232
|
});
|
|
75799
76233
|
const response = await awaitSummaryResponseWithTimeout(result.response, SUMMARY_ATTEMPT_TIMEOUT_MS, options.signal);
|
|
@@ -79934,8 +80368,8 @@ function extractWWWAuthenticateParams(res) {
|
|
|
79934
80368
|
if (!authenticateHeader) {
|
|
79935
80369
|
return {};
|
|
79936
80370
|
}
|
|
79937
|
-
const [
|
|
79938
|
-
if (
|
|
80371
|
+
const [type2, scheme] = authenticateHeader.split(" ");
|
|
80372
|
+
if (type2.toLowerCase() !== "bearer" || !scheme) {
|
|
79939
80373
|
return {};
|
|
79940
80374
|
}
|
|
79941
80375
|
const resourceMetadataMatch = extractFieldFromWwwAuth(res, "resource_metadata") || void 0;
|
|
@@ -80067,7 +80501,7 @@ async function discoverAuthorizationServerMetadata(authorizationServerUrl, { fet
|
|
|
80067
80501
|
Accept: "application/json"
|
|
80068
80502
|
};
|
|
80069
80503
|
const urlsToTry = buildDiscoveryUrls(authorizationServerUrl);
|
|
80070
|
-
for (const { url: endpointUrl, type } of urlsToTry) {
|
|
80504
|
+
for (const { url: endpointUrl, type: type2 } of urlsToTry) {
|
|
80071
80505
|
const response = await fetchWithCorsRetry(endpointUrl, headers, fetchFn);
|
|
80072
80506
|
if (!response) {
|
|
80073
80507
|
continue;
|
|
@@ -80077,9 +80511,9 @@ async function discoverAuthorizationServerMetadata(authorizationServerUrl, { fet
|
|
|
80077
80511
|
if (response.status >= 400 && response.status < 500) {
|
|
80078
80512
|
continue;
|
|
80079
80513
|
}
|
|
80080
|
-
throw new Error(`HTTP ${response.status} trying to load ${
|
|
80514
|
+
throw new Error(`HTTP ${response.status} trying to load ${type2 === "oauth" ? "OAuth" : "OpenID provider"} metadata from ${endpointUrl}`);
|
|
80081
80515
|
}
|
|
80082
|
-
if (
|
|
80516
|
+
if (type2 === "oauth") {
|
|
80083
80517
|
return OAuthMetadataSchema.parse(await response.json());
|
|
80084
80518
|
} else {
|
|
80085
80519
|
return OpenIdProviderDiscoveryMetadataSchema.parse(await response.json());
|
|
@@ -80845,9 +81279,9 @@ var ErrorEvent = class extends Event {
|
|
|
80845
81279
|
* @param type - The type of the event (should be "error")
|
|
80846
81280
|
* @param errorEventInitDict - Optional properties to include in the error event
|
|
80847
81281
|
*/
|
|
80848
|
-
constructor(
|
|
81282
|
+
constructor(type2, errorEventInitDict) {
|
|
80849
81283
|
var _a6, _b;
|
|
80850
|
-
super(
|
|
81284
|
+
super(type2), this.code = (_a6 = errorEventInitDict == null ? void 0 : errorEventInitDict.code) != null ? _a6 : void 0, this.message = (_b = errorEventInitDict == null ? void 0 : errorEventInitDict.message) != null ? _b : void 0;
|
|
80851
81285
|
}
|
|
80852
81286
|
/**
|
|
80853
81287
|
* Node.js "hides" the `message` and `code` properties of the `ErrorEvent` instance,
|
|
@@ -81042,13 +81476,13 @@ var EventSource = class extends EventTarget {
|
|
|
81042
81476
|
set onopen(value) {
|
|
81043
81477
|
__privateSet(this, _onOpen, value);
|
|
81044
81478
|
}
|
|
81045
|
-
addEventListener(
|
|
81479
|
+
addEventListener(type2, listener, options) {
|
|
81046
81480
|
const listen = listener;
|
|
81047
|
-
super.addEventListener(
|
|
81481
|
+
super.addEventListener(type2, listen, options);
|
|
81048
81482
|
}
|
|
81049
|
-
removeEventListener(
|
|
81483
|
+
removeEventListener(type2, listener, options) {
|
|
81050
81484
|
const listen = listener;
|
|
81051
|
-
super.removeEventListener(
|
|
81485
|
+
super.removeEventListener(type2, listen, options);
|
|
81052
81486
|
}
|
|
81053
81487
|
/**
|
|
81054
81488
|
* Aborts any instances of the fetch algorithm started for this EventSource object, and sets the readyState attribute to CLOSED.
|
|
@@ -81525,7 +81959,7 @@ var StdioClientTransport = class {
|
|
|
81525
81959
|
};
|
|
81526
81960
|
|
|
81527
81961
|
// ../ggcoder/dist/core/mcp/client.js
|
|
81528
|
-
import
|
|
81962
|
+
import os8 from "os";
|
|
81529
81963
|
var MCPClientManager = class {
|
|
81530
81964
|
servers = [];
|
|
81531
81965
|
async connectAll(configs) {
|
|
@@ -81587,7 +82021,7 @@ var MCPClientManager = class {
|
|
|
81587
82021
|
command: config2.command,
|
|
81588
82022
|
args: config2.args,
|
|
81589
82023
|
env: { ...process.env, ...config2.env },
|
|
81590
|
-
cwd:
|
|
82024
|
+
cwd: os8.homedir(),
|
|
81591
82025
|
stderr: "pipe"
|
|
81592
82026
|
});
|
|
81593
82027
|
const stderrChunks = [];
|
|
@@ -82192,6 +82626,7 @@ ${parsed.args}` : promptText;
|
|
|
82192
82626
|
const loopMessages = await this.prepareDynamicContext();
|
|
82193
82627
|
const runAgentLoop = async (apiKey, accountId, projectId) => {
|
|
82194
82628
|
const modelInfo = getModel(this.model);
|
|
82629
|
+
const effectiveBaseUrl = this.baseUrl ?? creds.baseUrl;
|
|
82195
82630
|
const generator = agentLoop(loopMessages, {
|
|
82196
82631
|
provider: this.provider,
|
|
82197
82632
|
model: this.model,
|
|
@@ -82200,10 +82635,13 @@ ${parsed.args}` : promptText;
|
|
|
82200
82635
|
maxTokens: this.maxTokens,
|
|
82201
82636
|
thinking: this.thinkingLevel,
|
|
82202
82637
|
apiKey,
|
|
82203
|
-
baseUrl:
|
|
82638
|
+
baseUrl: effectiveBaseUrl,
|
|
82204
82639
|
signal: this.opts.signal,
|
|
82205
82640
|
accountId,
|
|
82206
82641
|
projectId,
|
|
82642
|
+
// Kimi For Coding gates the managed endpoint on coding-agent identity
|
|
82643
|
+
// headers; attach them only when the Kimi OAuth token is in use.
|
|
82644
|
+
defaultHeaders: this.provider === "moonshot" && isKimiCodingEndpoint(effectiveBaseUrl) ? kimiCodingHeaders() : void 0,
|
|
82207
82645
|
cacheRetention: "short",
|
|
82208
82646
|
promptCacheKey: this.getPromptCacheKey(),
|
|
82209
82647
|
supportsImages: modelInfo?.supportsImages,
|
|
@@ -82224,7 +82662,7 @@ ${parsed.args}` : promptText;
|
|
|
82224
82662
|
return;
|
|
82225
82663
|
}
|
|
82226
82664
|
if (err instanceof ProviderError && err.statusCode === 401) {
|
|
82227
|
-
if (
|
|
82665
|
+
if (await this.authStorage.isStaticApiKey(this.provider)) {
|
|
82228
82666
|
log("WARN", "auth", `Got 401 for ${this.provider} \u2014 API key is invalid or revoked`);
|
|
82229
82667
|
await this.authStorage.clearCredentials(this.provider);
|
|
82230
82668
|
throw err;
|
|
@@ -82700,7 +83138,7 @@ __export(base_exports, {
|
|
|
82700
83138
|
});
|
|
82701
83139
|
init_esm_shims();
|
|
82702
83140
|
import process4 from "process";
|
|
82703
|
-
import
|
|
83141
|
+
import os9 from "os";
|
|
82704
83142
|
|
|
82705
83143
|
// ../../node_modules/.pnpm/environment@1.1.0/node_modules/environment/index.js
|
|
82706
83144
|
init_esm_shims();
|
|
@@ -82800,7 +83238,7 @@ var isOldWindows = () => {
|
|
|
82800
83238
|
if (isBrowser || !isWindows2) {
|
|
82801
83239
|
return false;
|
|
82802
83240
|
}
|
|
82803
|
-
const parts =
|
|
83241
|
+
const parts = os9.release().split(".");
|
|
82804
83242
|
const major = Number(parts[0]);
|
|
82805
83243
|
const build = Number(parts[2] ?? 0);
|
|
82806
83244
|
if (major < 10) {
|
|
@@ -85030,12 +85468,12 @@ function wrapAnsi(string4, columns, options) {
|
|
|
85030
85468
|
// ../../node_modules/.pnpm/terminal-size@4.0.1/node_modules/terminal-size/index.js
|
|
85031
85469
|
init_esm_shims();
|
|
85032
85470
|
import process5 from "process";
|
|
85033
|
-
import { execFileSync } from "child_process";
|
|
85471
|
+
import { execFileSync as execFileSync2 } from "child_process";
|
|
85034
85472
|
import fs29 from "fs";
|
|
85035
85473
|
import tty from "tty";
|
|
85036
85474
|
var defaultColumns = 80;
|
|
85037
85475
|
var defaultRows = 24;
|
|
85038
|
-
var exec2 = (command, arguments_, { shell: shell2, env: env2 } = {}) =>
|
|
85476
|
+
var exec2 = (command, arguments_, { shell: shell2, env: env2 } = {}) => execFileSync2(command, arguments_, {
|
|
85039
85477
|
encoding: "utf8",
|
|
85040
85478
|
stdio: ["ignore", "pipe", "ignore"],
|
|
85041
85479
|
timeout: 500,
|
|
@@ -87073,9 +87511,9 @@ var reconciler_default = (0, import_react_reconciler.default)({
|
|
|
87073
87511
|
rootNode.onRender();
|
|
87074
87512
|
}
|
|
87075
87513
|
},
|
|
87076
|
-
getChildHostContext(parentHostContext,
|
|
87514
|
+
getChildHostContext(parentHostContext, type2) {
|
|
87077
87515
|
const previousIsInsideText = parentHostContext.isInsideText;
|
|
87078
|
-
const isInsideText =
|
|
87516
|
+
const isInsideText = type2 === "ink-text" || type2 === "ink-virtual-text";
|
|
87079
87517
|
if (previousIsInsideText === isInsideText) {
|
|
87080
87518
|
return parentHostContext;
|
|
87081
87519
|
}
|
|
@@ -87086,8 +87524,8 @@ var reconciler_default = (0, import_react_reconciler.default)({
|
|
|
87086
87524
|
if (hostContext.isInsideText && originalType === "ink-box") {
|
|
87087
87525
|
throw new Error(`<Box> can\u2019t be nested inside <Text> component`);
|
|
87088
87526
|
}
|
|
87089
|
-
const
|
|
87090
|
-
const node = createNode(
|
|
87527
|
+
const type2 = originalType === "ink-text" && hostContext.isInsideText ? "ink-virtual-text" : originalType;
|
|
87528
|
+
const node = createNode(type2);
|
|
87091
87529
|
for (const [key, value] of Object.entries(newProps)) {
|
|
87092
87530
|
if (key === "children") {
|
|
87093
87531
|
continue;
|
|
@@ -87313,19 +87751,19 @@ var ansiRegex2 = /^ansi256\(\s?(\d+)\s?\)$/;
|
|
|
87313
87751
|
var isNamedColor = (color2) => {
|
|
87314
87752
|
return color2 in source_default;
|
|
87315
87753
|
};
|
|
87316
|
-
var colorize = (str2, color2,
|
|
87754
|
+
var colorize = (str2, color2, type2) => {
|
|
87317
87755
|
if (!color2) {
|
|
87318
87756
|
return str2;
|
|
87319
87757
|
}
|
|
87320
87758
|
if (isNamedColor(color2)) {
|
|
87321
|
-
if (
|
|
87759
|
+
if (type2 === "foreground") {
|
|
87322
87760
|
return source_default[color2](str2);
|
|
87323
87761
|
}
|
|
87324
87762
|
const methodName = `bg${color2[0].toUpperCase() + color2.slice(1)}`;
|
|
87325
87763
|
return source_default[methodName](str2);
|
|
87326
87764
|
}
|
|
87327
87765
|
if (color2.startsWith("#")) {
|
|
87328
|
-
return
|
|
87766
|
+
return type2 === "foreground" ? source_default.hex(color2)(str2) : source_default.bgHex(color2)(str2);
|
|
87329
87767
|
}
|
|
87330
87768
|
if (color2.startsWith("ansi256")) {
|
|
87331
87769
|
const matches = ansiRegex2.exec(color2);
|
|
@@ -87333,7 +87771,7 @@ var colorize = (str2, color2, type) => {
|
|
|
87333
87771
|
return str2;
|
|
87334
87772
|
}
|
|
87335
87773
|
const value = Number(matches[1]);
|
|
87336
|
-
return
|
|
87774
|
+
return type2 === "foreground" ? source_default.ansi256(value)(str2) : source_default.bgAnsi256(value)(str2);
|
|
87337
87775
|
}
|
|
87338
87776
|
if (color2.startsWith("rgb")) {
|
|
87339
87777
|
const matches = rgbRegex.exec(color2);
|
|
@@ -87343,7 +87781,7 @@ var colorize = (str2, color2, type) => {
|
|
|
87343
87781
|
const firstValue = Number(matches[1]);
|
|
87344
87782
|
const secondValue = Number(matches[2]);
|
|
87345
87783
|
const thirdValue = Number(matches[3]);
|
|
87346
|
-
return
|
|
87784
|
+
return type2 === "foreground" ? source_default.rgb(firstValue, secondValue, thirdValue)(str2) : source_default.bgRgb(firstValue, secondValue, thirdValue)(str2);
|
|
87347
87785
|
}
|
|
87348
87786
|
return str2;
|
|
87349
87787
|
};
|
|
@@ -88737,8 +89175,8 @@ function Text({ color: color2, backgroundColor, dimColor = false, bold = false,
|
|
|
88737
89175
|
}
|
|
88738
89176
|
|
|
88739
89177
|
// ../../node_modules/.pnpm/ink@6.8.0_patch_hash=9a162d94e4f23850965d1796871df4d73f193444a9de20260d2d10f9c2b90422_@types+react@19.2.14_react@19.2.5/node_modules/ink/build/components/ErrorOverview.js
|
|
88740
|
-
var cleanupPath = (
|
|
88741
|
-
return
|
|
89178
|
+
var cleanupPath = (path43) => {
|
|
89179
|
+
return path43?.replace(`file://${cwd()}/`, "");
|
|
88742
89180
|
};
|
|
88743
89181
|
var stackUtils = new import_stack_utils.default({
|
|
88744
89182
|
cwd: cwd(),
|
|
@@ -92231,8 +92669,8 @@ function shortenValue(value, maxLength = MAX_DETAIL_LENGTH) {
|
|
|
92231
92669
|
const tailLength = maxLength - 1 - headLength;
|
|
92232
92670
|
return `${normalized.slice(0, headLength)}\u2026${normalized.slice(-tailLength)}`;
|
|
92233
92671
|
}
|
|
92234
|
-
function basename2(
|
|
92235
|
-
const trimmed =
|
|
92672
|
+
function basename2(path43) {
|
|
92673
|
+
const trimmed = path43.replace(/\/+$/u, "");
|
|
92236
92674
|
return trimmed.split("/").filter(Boolean).at(-1) ?? trimmed;
|
|
92237
92675
|
}
|
|
92238
92676
|
function uniqueValues(values) {
|
|
@@ -108209,7 +108647,7 @@ function TaskPickerMenu({ tasks, selectedIndex, width }) {
|
|
|
108209
108647
|
// ../ggcoder/dist/ui/components/InputArea.js
|
|
108210
108648
|
import { homedir as homedir2 } from "os";
|
|
108211
108649
|
import { join as join2 } from "path";
|
|
108212
|
-
import { readFileSync as
|
|
108650
|
+
import { readFileSync as readFileSync4, writeFileSync as writeFileSync3, appendFileSync, mkdirSync as mkdirSync2, renameSync, unlinkSync, existsSync as existsSync3 } from "fs";
|
|
108213
108651
|
var MAX_VISIBLE_LINES = 12;
|
|
108214
108652
|
var PROMPT = "> ";
|
|
108215
108653
|
var PLACEHOLDER = " Type your message or / to run a command";
|
|
@@ -108317,7 +108755,7 @@ var COMPACT_THRESHOLD = MAX_HISTORY + Math.floor(MAX_HISTORY * 0.5);
|
|
|
108317
108755
|
var lineCountEstimate = 0;
|
|
108318
108756
|
function loadHistory() {
|
|
108319
108757
|
try {
|
|
108320
|
-
const data =
|
|
108758
|
+
const data = readFileSync4(HISTORY_FILE, "utf-8");
|
|
108321
108759
|
const lines = data.trim().split("\n").filter(Boolean);
|
|
108322
108760
|
lineCountEstimate = lines.length;
|
|
108323
108761
|
return lines.map((l) => JSON.parse(l)).slice(-MAX_HISTORY);
|
|
@@ -108329,7 +108767,7 @@ function appendHistory(entry, history) {
|
|
|
108329
108767
|
if (history.length > 0 && history[history.length - 1] === entry)
|
|
108330
108768
|
return;
|
|
108331
108769
|
try {
|
|
108332
|
-
|
|
108770
|
+
mkdirSync2(join2(homedir2(), ".gg"), { recursive: true });
|
|
108333
108771
|
appendFileSync(HISTORY_FILE, JSON.stringify(entry) + "\n");
|
|
108334
108772
|
lineCountEstimate++;
|
|
108335
108773
|
if (lineCountEstimate > COMPACT_THRESHOLD) {
|
|
@@ -108341,15 +108779,15 @@ function appendHistory(entry, history) {
|
|
|
108341
108779
|
function compactHistory2() {
|
|
108342
108780
|
const tempPath = `${HISTORY_FILE}.${process.pid}.${Date.now()}.tmp`;
|
|
108343
108781
|
try {
|
|
108344
|
-
const data =
|
|
108782
|
+
const data = readFileSync4(HISTORY_FILE, "utf-8");
|
|
108345
108783
|
const lines = data.trim().split("\n").filter(Boolean);
|
|
108346
108784
|
const trimmed = lines.slice(-MAX_HISTORY);
|
|
108347
|
-
|
|
108785
|
+
writeFileSync3(tempPath, trimmed.map((l) => l + "\n").join(""));
|
|
108348
108786
|
renameSync(tempPath, HISTORY_FILE);
|
|
108349
108787
|
lineCountEstimate = trimmed.length;
|
|
108350
108788
|
} catch {
|
|
108351
108789
|
try {
|
|
108352
|
-
if (
|
|
108790
|
+
if (existsSync3(tempPath))
|
|
108353
108791
|
unlinkSync(tempPath);
|
|
108354
108792
|
} catch {
|
|
108355
108793
|
}
|
|
@@ -109461,21 +109899,21 @@ var import_react67 = __toESM(require_react(), 1);
|
|
|
109461
109899
|
|
|
109462
109900
|
// ../ggcoder/dist/ui/pixel.js
|
|
109463
109901
|
init_esm_shims();
|
|
109464
|
-
import { existsSync as
|
|
109902
|
+
import { existsSync as existsSync4, readFileSync as readFileSync6 } from "fs";
|
|
109465
109903
|
import { homedir as homedir3 } from "os";
|
|
109466
109904
|
import { join as join4 } from "path";
|
|
109467
109905
|
|
|
109468
109906
|
// ../ggcoder/dist/cli/shared.js
|
|
109469
109907
|
init_esm_shims();
|
|
109470
109908
|
import { execFile as execFile3 } from "child_process";
|
|
109471
|
-
import { readFileSync as
|
|
109909
|
+
import { readFileSync as readFileSync5 } from "fs";
|
|
109472
109910
|
import { dirname as dirname2, join as join3 } from "path";
|
|
109473
109911
|
import { fileURLToPath as fileURLToPath3 } from "url";
|
|
109474
109912
|
function resolveCliVersion() {
|
|
109475
109913
|
let dir = dirname2(fileURLToPath3(import.meta.url));
|
|
109476
109914
|
for (let i = 0; i < 6; i++) {
|
|
109477
109915
|
try {
|
|
109478
|
-
const manifest = JSON.parse(
|
|
109916
|
+
const manifest = JSON.parse(readFileSync5(join3(dir, "package.json"), "utf8"));
|
|
109479
109917
|
if (manifest.version)
|
|
109480
109918
|
return manifest.version;
|
|
109481
109919
|
} catch {
|
|
@@ -109539,10 +109977,10 @@ import { execFile as execFile4 } from "child_process";
|
|
|
109539
109977
|
// ../ggcoder/dist/core/auto-update.js
|
|
109540
109978
|
init_esm_shims();
|
|
109541
109979
|
import path35 from "path";
|
|
109542
|
-
import
|
|
109980
|
+
import os10 from "os";
|
|
109543
109981
|
var updater = createAutoUpdater({
|
|
109544
109982
|
packageName: "@kenkaiiii/ggcoder",
|
|
109545
|
-
stateFilePath: () => path35.join(
|
|
109983
|
+
stateFilePath: () => path35.join(os10.homedir(), ".gg", "update-state.json")
|
|
109546
109984
|
});
|
|
109547
109985
|
var checkAndAutoUpdate = updater.checkAndAutoUpdate;
|
|
109548
109986
|
var getPendingUpdate = updater.getPendingUpdate;
|
|
@@ -109556,8 +109994,8 @@ init_esm_shims();
|
|
|
109556
109994
|
init_esm_shims();
|
|
109557
109995
|
import fs31 from "fs";
|
|
109558
109996
|
import path36 from "path";
|
|
109559
|
-
import
|
|
109560
|
-
var HISTORY_PATH = path36.join(
|
|
109997
|
+
import os11 from "os";
|
|
109998
|
+
var HISTORY_PATH = path36.join(os11.homedir(), ".gg", "setup-history.json");
|
|
109561
109999
|
|
|
109562
110000
|
// ../ggcoder/dist/ui/components/RewindOverlay.js
|
|
109563
110001
|
init_esm_shims();
|
|
@@ -109574,7 +110012,7 @@ init_esm_shims();
|
|
|
109574
110012
|
|
|
109575
110013
|
// ../ggcoder/dist/ui/prompt-routing.js
|
|
109576
110014
|
init_esm_shims();
|
|
109577
|
-
import { writeFileSync as
|
|
110015
|
+
import { writeFileSync as writeFileSync4 } from "fs";
|
|
109578
110016
|
|
|
109579
110017
|
// ../ggcoder/dist/ui/submit-prompt-command.js
|
|
109580
110018
|
init_esm_shims();
|
|
@@ -110512,8 +110950,8 @@ var LsLine = (0, import_react89.memo)(function LsLine2({ line }) {
|
|
|
110512
110950
|
const parts = line.match(/^([dfl])\s+(\S+)\s+(.+)$/);
|
|
110513
110951
|
if (!parts)
|
|
110514
110952
|
return (0, import_jsx_runtime46.jsx)(Text, { color: "#9ca3af", children: line });
|
|
110515
|
-
const [,
|
|
110516
|
-
if (
|
|
110953
|
+
const [, type2, size, name] = parts;
|
|
110954
|
+
if (type2 === "d") {
|
|
110517
110955
|
return (0, import_jsx_runtime46.jsxs)(Text, { children: [(0, import_jsx_runtime46.jsx)(Text, { color: "#60a5fa", bold: true, children: name }), (0, import_jsx_runtime46.jsxs)(Text, { color: "#6b7280", children: [" ", size === "-" ? "" : size] })] });
|
|
110518
110956
|
}
|
|
110519
110957
|
return (0, import_jsx_runtime46.jsxs)(Text, { children: [(0, import_jsx_runtime46.jsx)(Text, { color: "#e5e7eb", children: name }), (0, import_jsx_runtime46.jsxs)(Text, { color: "#6b7280", children: [" ", size] })] });
|
|
@@ -110634,7 +111072,7 @@ init_esm_shims();
|
|
|
110634
111072
|
|
|
110635
111073
|
// ../ggcoder/dist/ui/theme/detect-theme.js
|
|
110636
111074
|
init_esm_shims();
|
|
110637
|
-
import { execFileSync as
|
|
111075
|
+
import { execFileSync as execFileSync3 } from "child_process";
|
|
110638
111076
|
var ESC3 = String.fromCharCode(27);
|
|
110639
111077
|
var oscResponsePattern = new RegExp(ESC3 + "\\]11;rgb:([0-9a-fA-F]+)/([0-9a-fA-F]+)/([0-9a-fA-F]+)");
|
|
110640
111078
|
|
|
@@ -112634,7 +113072,7 @@ function createTaskTools(deps) {
|
|
|
112634
113072
|
|
|
112635
113073
|
// src/audio.ts
|
|
112636
113074
|
init_esm_shims();
|
|
112637
|
-
import { spawn as spawn7, execFileSync as
|
|
113075
|
+
import { spawn as spawn7, execFileSync as execFileSync4 } from "child_process";
|
|
112638
113076
|
import { fileURLToPath as fileURLToPath4 } from "url";
|
|
112639
113077
|
import path40 from "path";
|
|
112640
113078
|
import fs34 from "fs";
|
|
@@ -112752,7 +113190,7 @@ async function tryPlayOnWindowsHost(file2) {
|
|
|
112752
113190
|
if (!inDist && !inAssets) {
|
|
112753
113191
|
return false;
|
|
112754
113192
|
}
|
|
112755
|
-
const winPath =
|
|
113193
|
+
const winPath = execFileSync4("wslpath", ["-w", resolved], {
|
|
112756
113194
|
encoding: "utf8",
|
|
112757
113195
|
timeout: 2e3
|
|
112758
113196
|
}).trim();
|
|
@@ -113963,4 +114401,4 @@ react/cjs/react-jsx-runtime.development.js:
|
|
|
113963
114401
|
* LICENSE file in the root directory of this source tree.
|
|
113964
114402
|
*)
|
|
113965
114403
|
*/
|
|
113966
|
-
//# sourceMappingURL=chunk-
|
|
114404
|
+
//# sourceMappingURL=chunk-RB5EYLWQ.js.map
|