@probelabs/probe 0.6.0-rc341 → 0.6.0-rc342
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/binaries/{probe-v0.6.0-rc341-x86_64-apple-darwin.tar.gz → probe-v0.6.0-rc342-aarch64-apple-darwin.tar.gz} +0 -0
- package/bin/binaries/{probe-v0.6.0-rc341-aarch64-unknown-linux-musl.tar.gz → probe-v0.6.0-rc342-aarch64-unknown-linux-musl.tar.gz} +0 -0
- package/bin/binaries/{probe-v0.6.0-rc341-x86_64-pc-windows-msvc.zip → probe-v0.6.0-rc342-x86_64-apple-darwin.tar.gz} +0 -0
- package/bin/binaries/{probe-v0.6.0-rc341-aarch64-apple-darwin.tar.gz → probe-v0.6.0-rc342-x86_64-pc-windows-msvc.zip} +0 -0
- package/bin/binaries/{probe-v0.6.0-rc341-x86_64-unknown-linux-musl.tar.gz → probe-v0.6.0-rc342-x86_64-unknown-linux-musl.tar.gz} +0 -0
- package/cjs/agent/ProbeAgent.cjs +316 -75
- package/cjs/index.cjs +316 -75
- package/package.json +1 -1
package/cjs/index.cjs
CHANGED
|
@@ -18843,6 +18843,13 @@ function getCurrentModulePath() {
|
|
|
18843
18843
|
Error.prepareStackTrace = originalPrepareStackTrace;
|
|
18844
18844
|
}
|
|
18845
18845
|
}
|
|
18846
|
+
function sanitizeRequestHeaders(input) {
|
|
18847
|
+
const headers = new Headers(input);
|
|
18848
|
+
for (const name22 of BLOCKED_REQUEST_HEADERS) {
|
|
18849
|
+
headers.delete(name22);
|
|
18850
|
+
}
|
|
18851
|
+
return headers;
|
|
18852
|
+
}
|
|
18846
18853
|
async function getValidatedFetch(customFetch) {
|
|
18847
18854
|
return customFetch == null || customFetch === globalThis.fetch ? await getDefaultDownloadFetch() : customFetch;
|
|
18848
18855
|
}
|
|
@@ -18855,10 +18862,14 @@ async function fetchWithValidatedRedirects({
|
|
|
18855
18862
|
trustedOrigin
|
|
18856
18863
|
}) {
|
|
18857
18864
|
var _a22;
|
|
18858
|
-
|
|
18859
|
-
|
|
18860
|
-
|
|
18861
|
-
|
|
18865
|
+
let currentHeaders = headers === void 0 ? void 0 : sanitizeRequestHeaders(headers);
|
|
18866
|
+
const perHopInit = (redirect) => {
|
|
18867
|
+
const init = { signal: abortSignal, redirect };
|
|
18868
|
+
if (currentHeaders !== void 0) {
|
|
18869
|
+
init.headers = new Headers(currentHeaders);
|
|
18870
|
+
}
|
|
18871
|
+
return init;
|
|
18872
|
+
};
|
|
18862
18873
|
let currentUrl = url2;
|
|
18863
18874
|
for (let redirectCount = 0; redirectCount <= maxRedirects; redirectCount++) {
|
|
18864
18875
|
const isTrustedHop = trustedOrigin !== void 0 && isSameOrigin(currentUrl, trustedOrigin);
|
|
@@ -18866,10 +18877,7 @@ async function fetchWithValidatedRedirects({
|
|
|
18866
18877
|
validateDownloadUrl(currentUrl);
|
|
18867
18878
|
}
|
|
18868
18879
|
const fetch2 = isTrustedHop && customFetch != null ? customFetch : isTrustedHop ? globalThis.fetch : await getValidatedFetch(customFetch);
|
|
18869
|
-
const response = await fetch2(currentUrl,
|
|
18870
|
-
...baseInit,
|
|
18871
|
-
redirect: "manual"
|
|
18872
|
-
});
|
|
18880
|
+
const response = await fetch2(currentUrl, perHopInit("manual"));
|
|
18873
18881
|
if (response.type === "opaqueredirect") {
|
|
18874
18882
|
if (!isBrowserRuntime()) {
|
|
18875
18883
|
throw new DownloadError({
|
|
@@ -18877,12 +18885,19 @@ async function fetchWithValidatedRedirects({
|
|
|
18877
18885
|
message: `Redirect from ${currentUrl} could not be validated and was blocked`
|
|
18878
18886
|
});
|
|
18879
18887
|
}
|
|
18880
|
-
return await fetch2(currentUrl,
|
|
18888
|
+
return await fetch2(currentUrl, perHopInit("follow"));
|
|
18881
18889
|
}
|
|
18882
18890
|
const location = (_a22 = response.headers) == null ? void 0 : _a22.get("location");
|
|
18883
|
-
if (
|
|
18884
|
-
|
|
18885
|
-
|
|
18891
|
+
if (REDIRECT_STATUS_CODES.has(response.status) && location) {
|
|
18892
|
+
void cancelResponseBody(response);
|
|
18893
|
+
const nextUrl = new URL(location, currentUrl).toString();
|
|
18894
|
+
if (currentHeaders !== void 0 && !isSameOrigin(nextUrl, currentUrl)) {
|
|
18895
|
+
const userAgent = currentHeaders.get("user-agent");
|
|
18896
|
+
currentHeaders = new Headers(
|
|
18897
|
+
userAgent == null ? void 0 : { "user-agent": userAgent }
|
|
18898
|
+
);
|
|
18899
|
+
}
|
|
18900
|
+
currentUrl = nextUrl;
|
|
18886
18901
|
continue;
|
|
18887
18902
|
}
|
|
18888
18903
|
return response;
|
|
@@ -20317,7 +20332,7 @@ function stripFileExtension(filename) {
|
|
|
20317
20332
|
function withoutTrailingSlash(url2) {
|
|
20318
20333
|
return url2 == null ? void 0 : url2.replace(/\/$/, "");
|
|
20319
20334
|
}
|
|
20320
|
-
var btoa2, atob2, name14, marker15, symbol16, _a15, _b15, DownloadError, safeNodeFetchPromise, MAX_DOWNLOAD_REDIRECTS, DEFAULT_MAX_DOWNLOAD_SIZE, createIdGenerator, generateId, FETCH_FAILED_ERROR_MESSAGES, RETRYABLE_NETWORK_ERROR_CODES, VERSION, DEFAULT_SCHEMA_PREFIX, DEFAULT_SCHEMA_SUFFIX, DEFAULT_GENERIC_SUFFIX, suspectProtoRx, suspectConstructorRx, ignoreOverride, defaultOptions, getDefaultOptions, parseCatchDef, integerDateParser, isJsonSchema7AllOfType, emojiRegex2, zodPatterns, ALPHA_NUMERIC, primitiveMappings, asAnyOf, parseOptionalDef, parsePipelineDef, parseReadonlyDef, selectParser, getRelativePath, get$ref, addMeta, getRefs, zod3ToJsonSchema, schemaSymbol, getOriginalFetch2, postJsonToApi, postFormDataToApi, postToApi, textDecoder, createJsonErrorResponseHandler, createEventSourceResponseHandler, createJsonResponseHandler, StreamingToolCallArgumentState, StreamingToolCallTracker;
|
|
20335
|
+
var btoa2, atob2, name14, marker15, symbol16, _a15, _b15, DownloadError, safeNodeFetchPromise, BLOCKED_REQUEST_HEADERS, MAX_DOWNLOAD_REDIRECTS, REDIRECT_STATUS_CODES, DEFAULT_MAX_DOWNLOAD_SIZE, createIdGenerator, generateId, FETCH_FAILED_ERROR_MESSAGES, RETRYABLE_NETWORK_ERROR_CODES, VERSION, getOriginalFetch, getFromApi, DEFAULT_SCHEMA_PREFIX, DEFAULT_SCHEMA_SUFFIX, DEFAULT_GENERIC_SUFFIX, suspectProtoRx, suspectConstructorRx, ignoreOverride, defaultOptions, getDefaultOptions, parseCatchDef, integerDateParser, isJsonSchema7AllOfType, emojiRegex2, zodPatterns, ALPHA_NUMERIC, primitiveMappings, asAnyOf, parseOptionalDef, parsePipelineDef, parseReadonlyDef, selectParser, getRelativePath, get$ref, addMeta, getRefs, zod3ToJsonSchema, schemaSymbol, getOriginalFetch2, postJsonToApi, postFormDataToApi, postToApi, textDecoder, createJsonErrorResponseHandler, createEventSourceResponseHandler, createJsonResponseHandler, createBinaryResponseHandler, createStatusCodeErrorResponseHandler, StreamingToolCallArgumentState, StreamingToolCallTracker;
|
|
20321
20336
|
var init_dist3 = __esm({
|
|
20322
20337
|
"node_modules/@ai-sdk/provider-utils/dist/index.mjs"() {
|
|
20323
20338
|
init_dist();
|
|
@@ -20327,6 +20342,7 @@ var init_dist3 = __esm({
|
|
|
20327
20342
|
init_dist();
|
|
20328
20343
|
init_dist();
|
|
20329
20344
|
init_dist();
|
|
20345
|
+
init_dist();
|
|
20330
20346
|
init_v4();
|
|
20331
20347
|
init_v3();
|
|
20332
20348
|
init_v3();
|
|
@@ -20358,7 +20374,35 @@ var init_dist3 = __esm({
|
|
|
20358
20374
|
return AISDKError.hasMarker(error40, marker15);
|
|
20359
20375
|
}
|
|
20360
20376
|
};
|
|
20377
|
+
BLOCKED_REQUEST_HEADERS = [
|
|
20378
|
+
// Hop-by-hop / transport (RFC 7230 §6.1)
|
|
20379
|
+
"connection",
|
|
20380
|
+
"keep-alive",
|
|
20381
|
+
"te",
|
|
20382
|
+
"trailer",
|
|
20383
|
+
"transfer-encoding",
|
|
20384
|
+
"upgrade",
|
|
20385
|
+
// Host / virtual-host routing
|
|
20386
|
+
"host",
|
|
20387
|
+
// Proxy / origin spoofing
|
|
20388
|
+
"forwarded",
|
|
20389
|
+
"proxy-authorization",
|
|
20390
|
+
"via",
|
|
20391
|
+
"x-forwarded-for",
|
|
20392
|
+
"x-forwarded-host",
|
|
20393
|
+
"x-forwarded-proto",
|
|
20394
|
+
"x-real-ip",
|
|
20395
|
+
// Cloud metadata (GCP, AWS IMDSv1/v2, Azure, Alibaba, DigitalOcean)
|
|
20396
|
+
"metadata",
|
|
20397
|
+
"metadata-flavor",
|
|
20398
|
+
"x-aws-ec2-metadata-token",
|
|
20399
|
+
"x-metadata-token",
|
|
20400
|
+
// Session / cookie
|
|
20401
|
+
"cookie",
|
|
20402
|
+
"set-cookie"
|
|
20403
|
+
];
|
|
20361
20404
|
MAX_DOWNLOAD_REDIRECTS = 10;
|
|
20405
|
+
REDIRECT_STATUS_CODES = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]);
|
|
20362
20406
|
DEFAULT_MAX_DOWNLOAD_SIZE = 2 * 1024 * 1024 * 1024;
|
|
20363
20407
|
createIdGenerator = ({
|
|
20364
20408
|
prefix,
|
|
@@ -20400,7 +20444,87 @@ var init_dist3 = __esm({
|
|
|
20400
20444
|
"UND_ERR_BODY_TIMEOUT",
|
|
20401
20445
|
"UND_ERR_CONNECT_TIMEOUT"
|
|
20402
20446
|
]);
|
|
20403
|
-
VERSION = true ? "4.0.
|
|
20447
|
+
VERSION = true ? "4.0.61" : "0.0.0-test";
|
|
20448
|
+
getOriginalFetch = () => globalThis.fetch;
|
|
20449
|
+
getFromApi = async ({
|
|
20450
|
+
url: url2,
|
|
20451
|
+
headers = {},
|
|
20452
|
+
successfulResponseHandler,
|
|
20453
|
+
failedResponseHandler,
|
|
20454
|
+
abortSignal,
|
|
20455
|
+
fetch: fetch2,
|
|
20456
|
+
validateUrl,
|
|
20457
|
+
credentialedOrigin,
|
|
20458
|
+
trustedOrigin
|
|
20459
|
+
}) => {
|
|
20460
|
+
try {
|
|
20461
|
+
const requestFetch = fetch2 != null ? fetch2 : getOriginalFetch();
|
|
20462
|
+
const outgoingHeaders = credentialedOrigin !== void 0 && !isSameOrigin(url2, credentialedOrigin) ? {} : headers;
|
|
20463
|
+
const requestHeaders = withUserAgentSuffix(
|
|
20464
|
+
outgoingHeaders,
|
|
20465
|
+
`ai-sdk/provider-utils/${VERSION}`,
|
|
20466
|
+
getRuntimeEnvironmentUserAgent()
|
|
20467
|
+
);
|
|
20468
|
+
const response = validateUrl ? await fetchWithValidatedRedirects({
|
|
20469
|
+
url: url2,
|
|
20470
|
+
headers: requestHeaders,
|
|
20471
|
+
abortSignal,
|
|
20472
|
+
fetch: fetch2,
|
|
20473
|
+
trustedOrigin
|
|
20474
|
+
}) : await requestFetch(url2, {
|
|
20475
|
+
method: "GET",
|
|
20476
|
+
headers: requestHeaders,
|
|
20477
|
+
signal: abortSignal
|
|
20478
|
+
});
|
|
20479
|
+
const responseHeaders = extractResponseHeaders(response);
|
|
20480
|
+
if (!response.ok) {
|
|
20481
|
+
let errorInformation;
|
|
20482
|
+
try {
|
|
20483
|
+
errorInformation = await failedResponseHandler({
|
|
20484
|
+
response,
|
|
20485
|
+
url: url2,
|
|
20486
|
+
requestBodyValues: {}
|
|
20487
|
+
});
|
|
20488
|
+
} catch (error40) {
|
|
20489
|
+
if (isAbortError(error40) || APICallError.isInstance(error40)) {
|
|
20490
|
+
throw error40;
|
|
20491
|
+
}
|
|
20492
|
+
throw new APICallError({
|
|
20493
|
+
message: "Failed to process error response",
|
|
20494
|
+
cause: error40,
|
|
20495
|
+
statusCode: response.status,
|
|
20496
|
+
url: url2,
|
|
20497
|
+
responseHeaders,
|
|
20498
|
+
requestBodyValues: {}
|
|
20499
|
+
});
|
|
20500
|
+
}
|
|
20501
|
+
throw errorInformation.value;
|
|
20502
|
+
}
|
|
20503
|
+
try {
|
|
20504
|
+
return await successfulResponseHandler({
|
|
20505
|
+
response,
|
|
20506
|
+
url: url2,
|
|
20507
|
+
requestBodyValues: {}
|
|
20508
|
+
});
|
|
20509
|
+
} catch (error40) {
|
|
20510
|
+
if (error40 instanceof Error) {
|
|
20511
|
+
if (isAbortError(error40) || APICallError.isInstance(error40)) {
|
|
20512
|
+
throw error40;
|
|
20513
|
+
}
|
|
20514
|
+
}
|
|
20515
|
+
throw new APICallError({
|
|
20516
|
+
message: "Failed to process successful response",
|
|
20517
|
+
cause: error40,
|
|
20518
|
+
statusCode: response.status,
|
|
20519
|
+
url: url2,
|
|
20520
|
+
responseHeaders,
|
|
20521
|
+
requestBodyValues: {}
|
|
20522
|
+
});
|
|
20523
|
+
}
|
|
20524
|
+
} catch (error40) {
|
|
20525
|
+
throw handleFetchError({ error: error40, url: url2, requestBodyValues: {} });
|
|
20526
|
+
}
|
|
20527
|
+
};
|
|
20404
20528
|
DEFAULT_SCHEMA_PREFIX = "JSON schema:";
|
|
20405
20529
|
DEFAULT_SCHEMA_SUFFIX = "You MUST answer with a JSON object that matches the JSON schema above.";
|
|
20406
20530
|
DEFAULT_GENERIC_SUFFIX = "You MUST answer with JSON.";
|
|
@@ -20954,6 +21078,51 @@ var init_dist3 = __esm({
|
|
|
20954
21078
|
rawValue: parsedResult.rawValue
|
|
20955
21079
|
};
|
|
20956
21080
|
};
|
|
21081
|
+
createBinaryResponseHandler = () => async ({ response, url: url2, requestBodyValues }) => {
|
|
21082
|
+
const responseHeaders = extractResponseHeaders(response);
|
|
21083
|
+
if (!response.body) {
|
|
21084
|
+
throw new APICallError({
|
|
21085
|
+
message: "Response body is empty",
|
|
21086
|
+
url: url2,
|
|
21087
|
+
requestBodyValues,
|
|
21088
|
+
statusCode: response.status,
|
|
21089
|
+
responseHeaders,
|
|
21090
|
+
responseBody: void 0
|
|
21091
|
+
});
|
|
21092
|
+
}
|
|
21093
|
+
try {
|
|
21094
|
+
const buffer = await response.arrayBuffer();
|
|
21095
|
+
return {
|
|
21096
|
+
responseHeaders,
|
|
21097
|
+
value: new Uint8Array(buffer)
|
|
21098
|
+
};
|
|
21099
|
+
} catch (error40) {
|
|
21100
|
+
throw new APICallError({
|
|
21101
|
+
message: "Failed to read response as array buffer",
|
|
21102
|
+
url: url2,
|
|
21103
|
+
requestBodyValues,
|
|
21104
|
+
statusCode: response.status,
|
|
21105
|
+
responseHeaders,
|
|
21106
|
+
responseBody: void 0,
|
|
21107
|
+
cause: error40
|
|
21108
|
+
});
|
|
21109
|
+
}
|
|
21110
|
+
};
|
|
21111
|
+
createStatusCodeErrorResponseHandler = () => async ({ response, url: url2, requestBodyValues }) => {
|
|
21112
|
+
const responseHeaders = extractResponseHeaders(response);
|
|
21113
|
+
const responseBody = await readResponseBodyAsText({ response, url: url2 });
|
|
21114
|
+
return {
|
|
21115
|
+
responseHeaders,
|
|
21116
|
+
value: new APICallError({
|
|
21117
|
+
message: response.statusText,
|
|
21118
|
+
url: url2,
|
|
21119
|
+
requestBodyValues,
|
|
21120
|
+
statusCode: response.status,
|
|
21121
|
+
responseHeaders,
|
|
21122
|
+
responseBody
|
|
21123
|
+
})
|
|
21124
|
+
};
|
|
21125
|
+
};
|
|
20957
21126
|
StreamingToolCallArgumentState = class {
|
|
20958
21127
|
constructor(initialValue = "") {
|
|
20959
21128
|
this.structure = { kind: "undetermined" };
|
|
@@ -21857,6 +22026,7 @@ var init_dist4 = __esm({
|
|
|
21857
22026
|
init_dist3();
|
|
21858
22027
|
init_v4();
|
|
21859
22028
|
init_v4();
|
|
22029
|
+
init_dist();
|
|
21860
22030
|
init_dist3();
|
|
21861
22031
|
init_v4();
|
|
21862
22032
|
init_dist3();
|
|
@@ -22075,7 +22245,6 @@ var init_dist4 = __esm({
|
|
|
22075
22245
|
});
|
|
22076
22246
|
}
|
|
22077
22247
|
const content = [];
|
|
22078
|
-
content.push(...convertOpenAICompatibleContent(choice.message.content));
|
|
22079
22248
|
const reasoning = (_a17 = choice.message.reasoning_content) != null ? _a17 : choice.message.reasoning;
|
|
22080
22249
|
if (reasoning != null && reasoning.length > 0) {
|
|
22081
22250
|
content.push({
|
|
@@ -22083,6 +22252,7 @@ var init_dist4 = __esm({
|
|
|
22083
22252
|
text: reasoning
|
|
22084
22253
|
});
|
|
22085
22254
|
}
|
|
22255
|
+
content.push(...convertOpenAICompatibleContent(choice.message.content));
|
|
22086
22256
|
if (choice.message.tool_calls != null) {
|
|
22087
22257
|
for (const toolCall of choice.message.tool_calls) {
|
|
22088
22258
|
const thoughtSignature = (_c = (_b16 = toolCall.extra_content) == null ? void 0 : _b16.google) == null ? void 0 : _c.thought_signature;
|
|
@@ -22916,13 +23086,16 @@ var init_dist4 = __esm({
|
|
|
22916
23086
|
}
|
|
22917
23087
|
const currentDate = (_c = (_b16 = (_a17 = this.config._internal) == null ? void 0 : _a17.currentDate) == null ? void 0 : _b16.call(_a17)) != null ? _c : /* @__PURE__ */ new Date();
|
|
22918
23088
|
const args = this.getArgs(providerOptions);
|
|
22919
|
-
|
|
23089
|
+
const isEditing = files != null && files.length > 0;
|
|
23090
|
+
const url2 = this.config.url({
|
|
23091
|
+
path: isEditing ? "/images/edits" : "/images/generations",
|
|
23092
|
+
modelId: this.modelId
|
|
23093
|
+
});
|
|
23094
|
+
const requestHeaders = combineHeaders(this.config.headers(), headers);
|
|
23095
|
+
if (isEditing) {
|
|
22920
23096
|
const { value: response2, responseHeaders: responseHeaders2 } = await postFormDataToApi({
|
|
22921
|
-
url:
|
|
22922
|
-
|
|
22923
|
-
modelId: this.modelId
|
|
22924
|
-
}),
|
|
22925
|
-
headers: combineHeaders(this.config.headers(), headers),
|
|
23097
|
+
url: url2,
|
|
23098
|
+
headers: requestHeaders,
|
|
22926
23099
|
formData: convertToFormData({
|
|
22927
23100
|
model: this.modelId,
|
|
22928
23101
|
prompt,
|
|
@@ -22942,7 +23115,11 @@ var init_dist4 = __esm({
|
|
|
22942
23115
|
fetch: this.config.fetch
|
|
22943
23116
|
});
|
|
22944
23117
|
return {
|
|
22945
|
-
images: response2.data
|
|
23118
|
+
images: await this.getImages(response2.data, {
|
|
23119
|
+
url: url2,
|
|
23120
|
+
headers: requestHeaders,
|
|
23121
|
+
abortSignal
|
|
23122
|
+
}),
|
|
22946
23123
|
warnings,
|
|
22947
23124
|
response: {
|
|
22948
23125
|
timestamp: currentDate,
|
|
@@ -22952,11 +23129,8 @@ var init_dist4 = __esm({
|
|
|
22952
23129
|
};
|
|
22953
23130
|
}
|
|
22954
23131
|
const { value: response, responseHeaders } = await postJsonToApi({
|
|
22955
|
-
url:
|
|
22956
|
-
|
|
22957
|
-
modelId: this.modelId
|
|
22958
|
-
}),
|
|
22959
|
-
headers: combineHeaders(this.config.headers(), headers),
|
|
23132
|
+
url: url2,
|
|
23133
|
+
headers: requestHeaders,
|
|
22960
23134
|
body: {
|
|
22961
23135
|
model: this.modelId,
|
|
22962
23136
|
prompt,
|
|
@@ -22975,7 +23149,11 @@ var init_dist4 = __esm({
|
|
|
22975
23149
|
fetch: this.config.fetch
|
|
22976
23150
|
});
|
|
22977
23151
|
return {
|
|
22978
|
-
images: response.data
|
|
23152
|
+
images: await this.getImages(response.data, {
|
|
23153
|
+
url: url2,
|
|
23154
|
+
headers: requestHeaders,
|
|
23155
|
+
abortSignal
|
|
23156
|
+
}),
|
|
22979
23157
|
warnings,
|
|
22980
23158
|
response: {
|
|
22981
23159
|
timestamp: currentDate,
|
|
@@ -22984,11 +23162,48 @@ var init_dist4 = __esm({
|
|
|
22984
23162
|
}
|
|
22985
23163
|
};
|
|
22986
23164
|
}
|
|
23165
|
+
async getImages(data2, options) {
|
|
23166
|
+
if (data2.every((image) => image.b64_json != null)) {
|
|
23167
|
+
return data2.map((image) => image.b64_json);
|
|
23168
|
+
}
|
|
23169
|
+
return Promise.all(
|
|
23170
|
+
data2.map(async (image) => {
|
|
23171
|
+
if (image.b64_json != null) {
|
|
23172
|
+
return convertBase64ToUint8Array(image.b64_json);
|
|
23173
|
+
}
|
|
23174
|
+
if (image.url == null) {
|
|
23175
|
+
throw new InvalidResponseDataError({
|
|
23176
|
+
data: image,
|
|
23177
|
+
message: "Expected url in the image response"
|
|
23178
|
+
});
|
|
23179
|
+
}
|
|
23180
|
+
const { value } = await getFromApi({
|
|
23181
|
+
url: image.url,
|
|
23182
|
+
validateUrl: true,
|
|
23183
|
+
trustedOrigin: options.url,
|
|
23184
|
+
credentialedOrigin: options.url,
|
|
23185
|
+
headers: options.headers,
|
|
23186
|
+
abortSignal: options.abortSignal,
|
|
23187
|
+
fetch: this.config.fetch,
|
|
23188
|
+
successfulResponseHandler: createBinaryResponseHandler(),
|
|
23189
|
+
failedResponseHandler: createStatusCodeErrorResponseHandler()
|
|
23190
|
+
});
|
|
23191
|
+
return value;
|
|
23192
|
+
})
|
|
23193
|
+
);
|
|
23194
|
+
}
|
|
22987
23195
|
};
|
|
22988
23196
|
openaiCompatibleImageResponseSchema = external_exports.object({
|
|
22989
|
-
data: external_exports.array(
|
|
23197
|
+
data: external_exports.array(
|
|
23198
|
+
external_exports.object({
|
|
23199
|
+
b64_json: external_exports.string().nullish(),
|
|
23200
|
+
url: external_exports.string().nullish()
|
|
23201
|
+
}).refine((image) => image.b64_json != null || image.url != null, {
|
|
23202
|
+
message: "Expected b64_json or url in the image response"
|
|
23203
|
+
})
|
|
23204
|
+
)
|
|
22990
23205
|
});
|
|
22991
|
-
VERSION2 = true ? "2.0.
|
|
23206
|
+
VERSION2 = true ? "2.0.86" : "0.0.0-test";
|
|
22992
23207
|
}
|
|
22993
23208
|
});
|
|
22994
23209
|
|
|
@@ -27659,16 +27874,10 @@ function isAnthropicModel({
|
|
|
27659
27874
|
return modelFamily === "anthropic" || modelId.includes("anthropic") || modelId.includes(":application-inference-profile/") && reasoningBudgetTokens != null;
|
|
27660
27875
|
}
|
|
27661
27876
|
function supportsStrictTools(modelId) {
|
|
27662
|
-
return !
|
|
27877
|
+
return !modelId.includes("claude-") || LEGACY_CLAUDE_PATTERN.test(modelId) || MODELS_WITH_STRICT_TOOL_SUPPORT.some((pattern) => pattern.test(modelId));
|
|
27663
27878
|
}
|
|
27664
27879
|
function supportsNativeStructuredOutput(modelId) {
|
|
27665
|
-
return
|
|
27666
|
-
modelId,
|
|
27667
|
-
MODELS_WITHOUT_RELIABLE_NATIVE_STRUCTURED_OUTPUT
|
|
27668
|
-
);
|
|
27669
|
-
}
|
|
27670
|
-
function matchesModel(modelId, models) {
|
|
27671
|
-
return models.some((model) => modelId.includes(model));
|
|
27880
|
+
return supportsStrictTools(modelId) && !/claude-(?:sonnet-4-6|haiku-4-5)(?=[-.:]|$)/.test(modelId);
|
|
27672
27881
|
}
|
|
27673
27882
|
function createBedrockEventStreamDecoder(body, processEvent) {
|
|
27674
27883
|
const codec = new import_eventstream_codec.EventStreamCodec(import_util_utf8.toUtf8, import_util_utf8.fromUtf8);
|
|
@@ -28430,7 +28639,9 @@ function createSigV4FetchFunction(getCredentials, fetch2, service = "bedrock") {
|
|
|
28430
28639
|
const signer = new AwsV4Signer({
|
|
28431
28640
|
url: url2,
|
|
28432
28641
|
method: "POST",
|
|
28433
|
-
headers: Object.entries(headersWithUserAgent)
|
|
28642
|
+
headers: Object.entries(headersWithUserAgent).filter(
|
|
28643
|
+
([, value]) => isAscii(value)
|
|
28644
|
+
),
|
|
28434
28645
|
body,
|
|
28435
28646
|
region: credentials.region,
|
|
28436
28647
|
accessKeyId: credentials.accessKeyId,
|
|
@@ -28459,6 +28670,9 @@ function prepareBodyString(body) {
|
|
|
28459
28670
|
return JSON.stringify(body);
|
|
28460
28671
|
}
|
|
28461
28672
|
}
|
|
28673
|
+
function isAscii(value) {
|
|
28674
|
+
return !/[\u0080-\uffff]/.test(value);
|
|
28675
|
+
}
|
|
28462
28676
|
function createApiKeyFetchFunction(apiKey, fetch2) {
|
|
28463
28677
|
return async (input, init) => {
|
|
28464
28678
|
const effectiveFetch = fetch2 != null ? fetch2 : globalThis.fetch;
|
|
@@ -28645,7 +28859,7 @@ Original error: ${errorMessage}`
|
|
|
28645
28859
|
provider.tools = import_internal.anthropicTools;
|
|
28646
28860
|
return provider;
|
|
28647
28861
|
}
|
|
28648
|
-
var import_internal, import_internal2, import_eventstream_codec, import_util_utf8, import_internal3, BEDROCK_STOP_REASONS, BEDROCK_IMAGE_MIME_TYPES, BEDROCK_DOCUMENT_MIME_TYPES, bedrockFilePartProviderOptions, amazonBedrockLanguageModelOptions,
|
|
28862
|
+
var import_internal, import_internal2, import_eventstream_codec, import_util_utf8, import_internal3, BEDROCK_STOP_REASONS, BEDROCK_IMAGE_MIME_TYPES, BEDROCK_DOCUMENT_MIME_TYPES, bedrockFilePartProviderOptions, amazonBedrockLanguageModelOptions, LEGACY_CLAUDE_PATTERN, MODELS_WITH_STRICT_TOOL_SUPPORT, BedrockErrorSchema, bedrockFailedResponseHandler, createBedrockEventStreamResponseHandler, bedrockReasoningMetadataSchema, anthropicProviderOptions, BedrockChatLanguageModel, JsonObjectTextExtractor, BedrockStopReasonSchema, BedrockAdditionalModelResponseFieldsSchema, BedrockToolUseSchema, BedrockReasoningTextSchema, BedrockRedactedReasoningSchema, AmazonBedrockCacheDetailSchema, BedrockResponseSchema, BedrockStreamSchema, amazonBedrockEmbeddingModelOptionsSchema, BedrockEmbeddingModel, BedrockEmbeddingResponseSchema, modelMaxImagesPerCall, BedrockImageModel, bedrockImageResponseSchema, VERSION3, bedrockRerankingResponseSchema, amazonBedrockRerankingModelOptionsSchema, BedrockRerankingModel, AWS_PARTITION_DNS_SUFFIXES, bedrock;
|
|
28649
28863
|
var init_dist5 = __esm({
|
|
28650
28864
|
"node_modules/@ai-sdk/amazon-bedrock/dist/index.mjs"() {
|
|
28651
28865
|
import_internal = require("@ai-sdk/anthropic/internal");
|
|
@@ -28761,17 +28975,13 @@ var init_dist5 = __esm({
|
|
|
28761
28975
|
*/
|
|
28762
28976
|
serviceTier: external_exports.enum(["reserved", "priority", "default", "flex"]).optional()
|
|
28763
28977
|
});
|
|
28764
|
-
|
|
28765
|
-
|
|
28766
|
-
|
|
28767
|
-
|
|
28768
|
-
|
|
28769
|
-
|
|
28770
|
-
|
|
28771
|
-
MODELS_WITHOUT_RELIABLE_NATIVE_STRUCTURED_OUTPUT = [
|
|
28772
|
-
...MODELS_WITHOUT_STRICT_TOOL_SUPPORT,
|
|
28773
|
-
"claude-sonnet-4-6",
|
|
28774
|
-
"claude-haiku-4-5"
|
|
28978
|
+
LEGACY_CLAUDE_PATTERN = /claude-(?:instant|v?2|3)(?=[-.:]|$)/;
|
|
28979
|
+
MODELS_WITH_STRICT_TOOL_SUPPORT = [
|
|
28980
|
+
// Original Claude 4 IDs include a release date instead of a minor version.
|
|
28981
|
+
/claude-(?:opus|sonnet)-4(?:-\d{8})?(?:-v\d+)?(?=[:.]|$)/,
|
|
28982
|
+
/claude-opus-4-(?:1|5|6)(?=[-.:]|$)/,
|
|
28983
|
+
/claude-sonnet-4-(?:5|6)(?=[-.:]|$)/,
|
|
28984
|
+
/claude-haiku-4-5(?=[-.:]|$)/
|
|
28775
28985
|
];
|
|
28776
28986
|
BedrockErrorSchema = external_exports.object({
|
|
28777
28987
|
message: external_exports.string(),
|
|
@@ -28918,7 +29128,8 @@ var init_dist5 = __esm({
|
|
|
28918
29128
|
const isThinkingEnabled = ((_e = bedrockOptions.reasoningConfig) == null ? void 0 : _e.type) === "enabled" || ((_f = bedrockOptions.reasoningConfig) == null ? void 0 : _f.type) === "adaptive";
|
|
28919
29129
|
const {
|
|
28920
29130
|
supportsStructuredOutput: modelSupportsStructuredOutput,
|
|
28921
|
-
rejectsForcedToolUse
|
|
29131
|
+
rejectsForcedToolUse,
|
|
29132
|
+
isKnownModel
|
|
28922
29133
|
} = (0, import_internal2.getModelCapabilities)(this.modelId);
|
|
28923
29134
|
const structuredOutputMode = (_h = (_g = bedrockOptions.structuredOutputMode) != null ? _g : anthropicOptions == null ? void 0 : anthropicOptions.structuredOutputMode) != null ? _h : "auto";
|
|
28924
29135
|
if (structuredOutputMode === "jsonTool") {
|
|
@@ -28939,7 +29150,7 @@ var init_dist5 = __esm({
|
|
|
28939
29150
|
}
|
|
28940
29151
|
const modelSupportsNativeStructuredOutput = supportsNativeStructuredOutput(this.modelId) && (modelSupportsStructuredOutput || isThinkingEnabled || this.config.modelFamily === "anthropic");
|
|
28941
29152
|
const useNativeStructuredOutput = isAnthropicModel2 && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && (structuredOutputMode === "outputFormat" || structuredOutputMode === "auto" && modelSupportsNativeStructuredOutput);
|
|
28942
|
-
const useJsonInstructionForStructuredOutput = !useNativeStructuredOutput && isAnthropicModel2 && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && (rejectsForcedToolUse || structuredOutputMode !== "jsonTool" && !supportsStrictTools(this.modelId) && tools2 != null && tools2.length > 0);
|
|
29153
|
+
const useJsonInstructionForStructuredOutput = !useNativeStructuredOutput && isAnthropicModel2 && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && (rejectsForcedToolUse || this.modelId.includes("claude-") && (!isKnownModel || !modelSupportsStructuredOutput) && !supportsNativeStructuredOutput(this.modelId) && structuredOutputMode !== "jsonTool" || structuredOutputMode !== "jsonTool" && !supportsStrictTools(this.modelId) && tools2 != null && tools2.length > 0);
|
|
28943
29154
|
const jsonResponseTool = (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && !useNativeStructuredOutput && !useJsonInstructionForStructuredOutput ? {
|
|
28944
29155
|
type: "function",
|
|
28945
29156
|
name: "json",
|
|
@@ -30193,7 +30404,7 @@ var init_dist5 = __esm({
|
|
|
30193
30404
|
details: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
30194
30405
|
preview: external_exports.unknown().optional()
|
|
30195
30406
|
});
|
|
30196
|
-
VERSION3 = true ? "4.0.
|
|
30407
|
+
VERSION3 = true ? "4.0.199" : "0.0.0-test";
|
|
30197
30408
|
bedrockRerankingResponseSchema = lazySchema(
|
|
30198
30409
|
() => zodSchema(
|
|
30199
30410
|
external_exports.object({
|
|
@@ -30528,10 +30739,10 @@ function compareUint8Arrays(a, b) {
|
|
|
30528
30739
|
}
|
|
30529
30740
|
return a.length - b.length;
|
|
30530
30741
|
}
|
|
30531
|
-
var
|
|
30742
|
+
var isAscii2, HIGH_SURROGATE_START, HIGH_SURROGATE_END, textDecoder2;
|
|
30532
30743
|
var init_utfUtil = __esm({
|
|
30533
30744
|
"node_modules/gpt-tokenizer/esm/utfUtil.js"() {
|
|
30534
|
-
|
|
30745
|
+
isAscii2 = (codePoint) => codePoint <= 127;
|
|
30535
30746
|
HIGH_SURROGATE_START = 55296;
|
|
30536
30747
|
HIGH_SURROGATE_END = 56319;
|
|
30537
30748
|
textDecoder2 = new TextDecoder("utf8", { fatal: false });
|
|
@@ -30866,7 +31077,7 @@ var init_BytePairEncodingCore = __esm({
|
|
|
30866
31077
|
this.mergeCache.set(key, value);
|
|
30867
31078
|
}
|
|
30868
31079
|
bytePairEncode(input) {
|
|
30869
|
-
if (input.length === 1 &&
|
|
31080
|
+
if (input.length === 1 && isAscii2(input.codePointAt(0))) {
|
|
30870
31081
|
return [this.getBpeRankFromStringOrThrow(input)];
|
|
30871
31082
|
}
|
|
30872
31083
|
if (this.mergeCache?.has(input)) {
|
|
@@ -38238,6 +38449,17 @@ function pushComment(options, array2) {
|
|
|
38238
38449
|
function functionFlags(async, generator) {
|
|
38239
38450
|
return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0);
|
|
38240
38451
|
}
|
|
38452
|
+
function keywordOpAt(parser, pos) {
|
|
38453
|
+
var end = pos + 1, stop = Math.min(parser.input.length, pos + 11);
|
|
38454
|
+
while (end < stop) {
|
|
38455
|
+
var ch = parser.fullCharCodeAt(end);
|
|
38456
|
+
if (!isIdentifierChar(ch, true)) {
|
|
38457
|
+
break;
|
|
38458
|
+
}
|
|
38459
|
+
end += ch <= 65535 ? 1 : 2;
|
|
38460
|
+
}
|
|
38461
|
+
return end === pos + 2 && parser.input.slice(pos, end) === "in" || end === pos + 10 && parser.input.slice(pos, end) === "instanceof";
|
|
38462
|
+
}
|
|
38241
38463
|
function isPrivateNameConflicted(privateNameMap, element) {
|
|
38242
38464
|
var name15 = element.key.name;
|
|
38243
38465
|
var curr = privateNameMap[name15];
|
|
@@ -38369,10 +38591,10 @@ function parse5(input, options) {
|
|
|
38369
38591
|
var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars, nonASCIIidentifierStartChars, reservedWords, ecma5AndLessKeywords, keywords$1, keywordRelationalOperator, nonASCIIidentifierStart, nonASCIIidentifier, TokenType, beforeExpr, startsExpr, keywords, types$1, lineBreak, lineBreakG, nonASCIIwhitespace, skipWhiteSpace, ref, hasOwnProperty, toString, hasOwn2, isArray, regexpCache, loneSurrogate, Position, SourceLocation, defaultOptions2, warnedAboutEcmaVersion, SCOPE_TOP, SCOPE_FUNCTION, SCOPE_ASYNC, SCOPE_GENERATOR, SCOPE_ARROW, SCOPE_SIMPLE_CATCH, SCOPE_SUPER, SCOPE_DIRECT_SUPER, SCOPE_CLASS_STATIC_BLOCK, SCOPE_CLASS_FIELD_INIT, SCOPE_SWITCH, SCOPE_VAR, BIND_NONE, BIND_VAR, BIND_LEXICAL, BIND_FUNCTION, BIND_SIMPLE_CATCH, BIND_OUTSIDE, Parser, prototypeAccessors, pp$9, literal2, DestructuringErrors, pp$8, loopLabel, switchLabel, empty$1, FUNC_STATEMENT, FUNC_HANGING_STATEMENT, FUNC_NULLABLE_ID, pp$7, TokContext, types, pp$6, pp$5, empty, pp$4, pp$3, Scope, Node, pp$2, scriptValuesAddedInUnicode, ecma9BinaryProperties, ecma10BinaryProperties, ecma11BinaryProperties, ecma12BinaryProperties, ecma13BinaryProperties, ecma14BinaryProperties, unicodeBinaryProperties, ecma14BinaryPropertiesOfStrings, unicodeBinaryPropertiesOfStrings, unicodeGeneralCategoryValues, ecma9ScriptValues, ecma10ScriptValues, ecma11ScriptValues, ecma12ScriptValues, ecma13ScriptValues, ecma14ScriptValues, unicodeScriptValues, data, ecmaVersion, i, list, pp$1, BranchID, RegExpValidationState, CharSetNone, CharSetOk, CharSetString, Token, pp, INVALID_TEMPLATE_ESCAPE_ERROR, version2;
|
|
38370
38592
|
var init_acorn = __esm({
|
|
38371
38593
|
"node_modules/acorn/dist/acorn.mjs"() {
|
|
38372
|
-
astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1,
|
|
38373
|
-
astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2,
|
|
38374
|
-
nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\
|
|
38375
|
-
nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\
|
|
38594
|
+
astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 31, 4, 33, 15, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 199, 7, 137, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 55, 9, 7, 0, 259, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 481, 1, 61, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 12, 2, 9, 1, 3, 0, 33, 1, 1357, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 233, 0, 3, 0, 8, 1, 6, 0, 475, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
|
|
38595
|
+
astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 13, 65, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 7, 25, 39, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 5, 18, 21, 18, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 18, 0, 182, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 24, 43, 22, 0, 239, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 111, 6, 206, 13, 310, 2314, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 33, 24, 3, 24, 45, 74, 6, 0, 67, 12, 65, 1, 2, 0, 15, 4, 10, 7386, 37, 33, 96, 114, 14, 913, 15, 50, 7710, 3, 2, 6, 2, 1, 2, 296, 10, 0, 30, 2, 3, 0, 15, 4, 8, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 340, 2, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 129, 15, 6, 55, 50, 49, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 208, 30, 2, 2, 2, 1, 2, 6, 3, 4, 10, 1, 225, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4382, 2, 5773, 3, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 8489, 39815, 11327];
|
|
38596
|
+
nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7-\u05C9\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B53-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1AF0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65";
|
|
38597
|
+
nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0558\u0559\u0560-\u0588\u058B\u058C\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u208F-\u209F\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DD\uA7E2\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB6C\uAB6D\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
|
|
38376
38598
|
reservedWords = {
|
|
38377
38599
|
3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
|
|
38378
38600
|
5: "class enum extends super const export import",
|
|
@@ -38820,7 +39042,7 @@ var init_acorn = __esm({
|
|
|
38820
39042
|
skipWhiteSpace.lastIndex = start + match2[0].length;
|
|
38821
39043
|
var spaceAfter = skipWhiteSpace.exec(this.input), end = spaceAfter.index + spaceAfter[0].length;
|
|
38822
39044
|
var next = this.input.charAt(end);
|
|
38823
|
-
return next === ";" || next === "}" || lineBreak.test(spaceAfter[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(next) || next === "!" && this.input.charAt(end + 1) === "=");
|
|
39045
|
+
return next === ";" || next === "}" || lineBreak.test(spaceAfter[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(next) || next === "!" && this.input.charAt(end + 1) === "=" || next === "i" && keywordOpAt(this, end));
|
|
38824
39046
|
}
|
|
38825
39047
|
start += match2[0].length;
|
|
38826
39048
|
skipWhiteSpace.lastIndex = start;
|
|
@@ -40568,10 +40790,13 @@ var init_acorn = __esm({
|
|
|
40568
40790
|
left = this.toAssignable(left, false, refDestructuringErrors);
|
|
40569
40791
|
}
|
|
40570
40792
|
if (!ownDestructuringErrors) {
|
|
40571
|
-
refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma =
|
|
40572
|
-
|
|
40573
|
-
|
|
40574
|
-
|
|
40793
|
+
refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1;
|
|
40794
|
+
if (refDestructuringErrors.shorthandAssign >= left.start) {
|
|
40795
|
+
refDestructuringErrors.shorthandAssign = -1;
|
|
40796
|
+
}
|
|
40797
|
+
if (refDestructuringErrors.doubleProto >= left.start) {
|
|
40798
|
+
refDestructuringErrors.doubleProto = -1;
|
|
40799
|
+
}
|
|
40575
40800
|
}
|
|
40576
40801
|
if (this.type === types$1.eq) {
|
|
40577
40802
|
this.checkLValPattern(left);
|
|
@@ -40711,20 +40936,35 @@ var init_acorn = __esm({
|
|
|
40711
40936
|
};
|
|
40712
40937
|
pp$5.parseExprSubscripts = function(refDestructuringErrors, forInit) {
|
|
40713
40938
|
var startPos = this.start, startLoc = this.startLoc;
|
|
40939
|
+
var oldDoubleProto = -1, oldShorthandAssign = -1;
|
|
40940
|
+
if (refDestructuringErrors) {
|
|
40941
|
+
oldDoubleProto = refDestructuringErrors.doubleProto;
|
|
40942
|
+
oldShorthandAssign = refDestructuringErrors.shorthandAssign;
|
|
40943
|
+
refDestructuringErrors.doubleProto = refDestructuringErrors.shorthandAssign = -1;
|
|
40944
|
+
}
|
|
40714
40945
|
var expr = this.parseExprAtom(refDestructuringErrors, forInit);
|
|
40715
40946
|
if (expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")") {
|
|
40716
40947
|
return expr;
|
|
40717
40948
|
}
|
|
40718
40949
|
var result = this.parseSubscripts(expr, startPos, startLoc, false, forInit);
|
|
40719
|
-
if (refDestructuringErrors
|
|
40720
|
-
if (
|
|
40721
|
-
refDestructuringErrors
|
|
40950
|
+
if (refDestructuringErrors) {
|
|
40951
|
+
if (result.end > expr.end) {
|
|
40952
|
+
this.checkExpressionErrors(refDestructuringErrors, true);
|
|
40953
|
+
if (refDestructuringErrors.parenthesizedAssign >= result.start) {
|
|
40954
|
+
refDestructuringErrors.parenthesizedAssign = -1;
|
|
40955
|
+
}
|
|
40956
|
+
if (refDestructuringErrors.parenthesizedBind >= result.start) {
|
|
40957
|
+
refDestructuringErrors.parenthesizedBind = -1;
|
|
40958
|
+
}
|
|
40959
|
+
if (refDestructuringErrors.trailingComma >= result.start) {
|
|
40960
|
+
refDestructuringErrors.trailingComma = -1;
|
|
40961
|
+
}
|
|
40722
40962
|
}
|
|
40723
|
-
if (
|
|
40724
|
-
refDestructuringErrors.
|
|
40963
|
+
if (oldDoubleProto > -1) {
|
|
40964
|
+
refDestructuringErrors.doubleProto = oldDoubleProto;
|
|
40725
40965
|
}
|
|
40726
|
-
if (
|
|
40727
|
-
refDestructuringErrors.
|
|
40966
|
+
if (oldShorthandAssign > -1) {
|
|
40967
|
+
refDestructuringErrors.shorthandAssign = oldShorthandAssign;
|
|
40728
40968
|
}
|
|
40729
40969
|
}
|
|
40730
40970
|
return result;
|
|
@@ -40737,7 +40977,7 @@ var init_acorn = __esm({
|
|
|
40737
40977
|
if (element.optional) {
|
|
40738
40978
|
optionalChained = true;
|
|
40739
40979
|
}
|
|
40740
|
-
if (element === base2 || element.type === "ArrowFunctionExpression") {
|
|
40980
|
+
if (element.end === base2.end || element.type === "ArrowFunctionExpression") {
|
|
40741
40981
|
if (optionalChained) {
|
|
40742
40982
|
var chainNode = this.startNodeAt(startPos, startLoc);
|
|
40743
40983
|
chainNode.expression = element;
|
|
@@ -40746,6 +40986,7 @@ var init_acorn = __esm({
|
|
|
40746
40986
|
return element;
|
|
40747
40987
|
}
|
|
40748
40988
|
base2 = element;
|
|
40989
|
+
maybeAsyncArrow = false;
|
|
40749
40990
|
}
|
|
40750
40991
|
};
|
|
40751
40992
|
pp$5.shouldParseAsyncArrow = function() {
|
|
@@ -43752,7 +43993,7 @@ var init_acorn = __esm({
|
|
|
43752
43993
|
}
|
|
43753
43994
|
return this.finishToken(type, word);
|
|
43754
43995
|
};
|
|
43755
|
-
version2 = "8.
|
|
43996
|
+
version2 = "8.19.0";
|
|
43756
43997
|
Parser.acorn = {
|
|
43757
43998
|
Parser,
|
|
43758
43999
|
version: version2,
|