@tonyclaw/agent-inspector 4.0.7 → 4.0.9
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/.output/backend/nitro.json +1 -1
- package/.output/cli.js +915 -25970
- package/.output/server/_chunks/ssr-renderer.mjs +1 -38
- package/.output/server/_libs/@opentelemetry/semantic-conventions+[...].mjs +1 -2658
- package/.output/server/_libs/agent-base.mjs +2 -234
- package/.output/server/_libs/ajv-formats.mjs +1 -330
- package/.output/server/_libs/ajv.mjs +8 -6080
- package/.output/server/_libs/anthropic-ai__sdk.mjs +19 -6021
- package/.output/server/_libs/atomically.mjs +1 -155
- package/.output/server/_libs/base64-js.mjs +1 -102
- package/.output/server/_libs/bignumber.js.mjs +1 -1353
- package/.output/server/_libs/buffer-equal-constant-time.mjs +1 -38
- package/.output/server/_libs/conf.mjs +1 -635
- package/.output/server/_libs/cookie-es.mjs +1 -44
- package/.output/server/_libs/core-util-is.mjs +1 -75
- package/.output/server/_libs/data-uri-to-buffer.mjs +1 -39
- package/.output/server/_libs/debounce-fn.mjs +1 -69
- package/.output/server/_libs/debug.mjs +5 -547
- package/.output/server/_libs/dot-prop.mjs +1 -265
- package/.output/server/_libs/ecdsa-sig-formatter.mjs +1 -162
- package/.output/server/_libs/env-paths.mjs +1 -57
- package/.output/server/_libs/extend.mjs +1 -94
- package/.output/server/_libs/fast-deep-equal.mjs +1 -38
- package/.output/server/_libs/fast-uri.mjs +1 -812
- package/.output/server/_libs/fetch-blob.mjs +1 -287
- package/.output/server/_libs/formdata-polyfill.mjs +9 -86
- package/.output/server/_libs/gaxios.mjs +5 -926
- package/.output/server/_libs/gcp-metadata.mjs +1 -322
- package/.output/server/_libs/google-auth-library.mjs +16 -6339
- package/.output/server/_libs/google-logging-utils.mjs +1 -385
- package/.output/server/_libs/google__genai.mjs +13 -18034
- package/.output/server/_libs/h3-v2.mjs +2 -287
- package/.output/server/_libs/h3.mjs +2 -408
- package/.output/server/_libs/has-flag.mjs +1 -16
- package/.output/server/_libs/https-proxy-agent.mjs +7 -280
- package/.output/server/_libs/immediate.mjs +1 -74
- package/.output/server/_libs/inherits.mjs +1 -50
- package/.output/server/_libs/isarray.mjs +1 -14
- package/.output/server/_libs/isbot.mjs +1 -20
- package/.output/server/_libs/json-bigint.mjs +8 -413
- package/.output/server/_libs/json-schema-traverse.mjs +1 -91
- package/.output/server/_libs/jszip.mjs +2 -3051
- package/.output/server/_libs/jwa.mjs +3 -233
- package/.output/server/_libs/jws.mjs +1 -298
- package/.output/server/_libs/lie.mjs +1 -273
- package/.output/server/_libs/mariozechner__pi-agent-core.mjs +1 -824
- package/.output/server/_libs/mariozechner__pi-ai.mjs +34 -22887
- package/.output/server/_libs/mimic-function.mjs +2 -47
- package/.output/server/_libs/mistralai__mistralai.mjs +7 -32045
- package/.output/server/_libs/modelcontextprotocol__core.mjs +1 -1121
- package/.output/server/_libs/modelcontextprotocol__server.mjs +13 -13205
- package/.output/server/_libs/ms.mjs +1 -120
- package/.output/server/_libs/node-domexception.mjs +1 -17
- package/.output/server/_libs/node-fetch.mjs +4 -1578
- package/.output/server/_libs/ohash.mjs +1 -1
- package/.output/server/_libs/openai.mjs +23 -6766
- package/.output/server/_libs/opentelemetry__api.mjs +1 -1678
- package/.output/server/_libs/p-retry.mjs +1 -87
- package/.output/server/_libs/pako.mjs +1 -4223
- package/.output/server/_libs/partial-json.mjs +2 -244
- package/.output/server/_libs/process-nextick-args.mjs +1 -48
- package/.output/server/_libs/react-dom.mjs +62 -10778
- package/.output/server/_libs/react.mjs +1 -519
- package/.output/server/_libs/readable-stream.mjs +1 -1518
- package/.output/server/_libs/retry.mjs +1 -236
- package/.output/server/_libs/rou3.mjs +1 -14
- package/.output/server/_libs/safe-buffer.mjs +1 -126
- package/.output/server/_libs/semver.mjs +1 -1938
- package/.output/server/_libs/seroval-plugins.mjs +1 -58
- package/.output/server/_libs/seroval.mjs +3 -1775
- package/.output/server/_libs/setimmediate.mjs +1 -152
- package/.output/server/_libs/srvx.mjs +4 -1390
- package/.output/server/_libs/stubborn-fs.mjs +1 -91
- package/.output/server/_libs/stubborn-utils.mjs +1 -66
- package/.output/server/_libs/supports-color.mjs +1 -108
- package/.output/server/_libs/tanstack__history.mjs +1 -230
- package/.output/server/_libs/tanstack__react-router.mjs +1 -848
- package/.output/server/_libs/tanstack__react-store.mjs +1 -1
- package/.output/server/_libs/tanstack__router-core.mjs +1 -4839
- package/.output/server/_libs/typebox.mjs +3 -6596
- package/.output/server/_libs/ufo.mjs +1 -54
- package/.output/server/_libs/uint8array-extras.mjs +1 -69
- package/.output/server/_libs/util-deprecate.mjs +1 -12
- package/.output/server/_libs/web-streams-polyfill.mjs +1 -4282
- package/.output/server/_libs/when-exit.mjs +1 -53
- package/.output/server/_libs/ws.mjs +7 -3715
- package/.output/server/_libs/zod-to-json-schema.mjs +5 -1207
- package/.output/server/_libs/zod.mjs +59 -9958
- package/.output/server/_ssr/empty-plugin-adapters-C3Q1xu4u.mjs +1 -0
- package/.output/server/_ssr/index.mjs +2 -1512
- package/.output/server/_ssr/publicBasePathContext--TAQS2_5.mjs +1 -0
- package/.output/server/_ssr/router-zSWaME0l.mjs +341 -0
- package/.output/server/_ssr/start-PDVGOqUN.mjs +1 -0
- package/.output/server/_tanstack-start-manifest_v-D7cKwKzM.mjs +1 -0
- package/.output/server/index.mjs +1 -320
- package/.output/ui/assets/{CompareDrawer-fWsmegqc.js → CompareDrawer-C6KvvPtJ.js} +1 -1
- package/.output/ui/assets/{InspectorPet-Z9XIA0t8.js → InspectorPet-CSH6OAhB.js} +1 -1
- package/.output/ui/assets/{ProxyViewerContainer-DhIB_ZAU.js → ProxyViewerContainer-vPd7g0Xn.js} +4 -4
- package/.output/ui/assets/{ReplayDialog-w_3PENIi.js → ReplayDialog-DbXUcT39.js} +1 -1
- package/.output/ui/assets/{RequestAnatomy-Dix0D4G6.js → RequestAnatomy-BWOCIN7J.js} +1 -1
- package/.output/ui/assets/{ResponseView-BtlbxW2o.js → ResponseView-BqDbTzFs.js} +1 -1
- package/.output/ui/assets/{StreamingChunkSequence-BqNQJASb.js → StreamingChunkSequence-UHl2g6w6.js} +1 -1
- package/.output/ui/assets/{_sessionId-DPiw4uu2.js → _sessionId-B2S61lDJ.js} +1 -1
- package/.output/ui/assets/{_sessionId-Bo9J8C5J.js → _sessionId-CS6hqj8-.js} +1 -1
- package/.output/ui/assets/{index-BL5id77_.js → index-C6V66rNI.js} +1 -1
- package/.output/ui/assets/{index-icwV1YtX.js → index-DY5xBYHr.js} +1 -1
- package/.output/ui/assets/{index-Wd6TK76x.js → index-DgyIeqyV.js} +2 -2
- package/.output/ui/assets/{index-CWSVfojK.js → index-HLs5jTyi.js} +1 -1
- package/.output/ui/assets/{json-viewer-Cpr3uw1I.js → json-viewer-i5LcN8e7.js} +1 -1
- package/.output/ui/assets/{jszip.min-Cncg6JOi.js → jszip.min-yNpb9qnf.js} +1 -1
- package/.output/ui/index.html +1 -1
- package/.output/workers/logFinalizer.worker.js +41 -17739
- package/.output/workers/sessionWorkerEntry.js +41 -17735
- package/package.json +7 -7
- package/.output/server/_ssr/empty-plugin-adapters-BFgPZ6_d.mjs +0 -6
- package/.output/server/_ssr/publicBasePathContext-IH2ilOfu.mjs +0 -176
- package/.output/server/_ssr/router-weYHAqCb.mjs +0 -27177
- package/.output/server/_ssr/start-COQu_AgD.mjs +0 -57
- package/.output/server/_tanstack-start-manifest_v-ClTaMkEj.mjs +0 -4
|
@@ -1,280 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
for (var i = 0; i < m.length; i++) {
|
|
9
|
-
const e = m[i];
|
|
10
|
-
if (typeof e !== "string" && !Array.isArray(e)) {
|
|
11
|
-
for (const k in e) {
|
|
12
|
-
if (k !== "default" && !(k in n)) {
|
|
13
|
-
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
-
if (d) {
|
|
15
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
get: function() {
|
|
18
|
-
return e[k];
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
return Object.freeze(n);
|
|
27
|
-
}
|
|
28
|
-
var dist = {};
|
|
29
|
-
var parseProxyResponse = {};
|
|
30
|
-
var hasRequiredParseProxyResponse;
|
|
31
|
-
function requireParseProxyResponse() {
|
|
32
|
-
if (hasRequiredParseProxyResponse) return parseProxyResponse;
|
|
33
|
-
hasRequiredParseProxyResponse = 1;
|
|
34
|
-
var __importDefault = parseProxyResponse && parseProxyResponse.__importDefault || function(mod) {
|
|
35
|
-
return mod && mod.__esModule ? mod : { "default": mod };
|
|
36
|
-
};
|
|
37
|
-
Object.defineProperty(parseProxyResponse, "__esModule", { value: true });
|
|
38
|
-
parseProxyResponse.parseProxyResponse = void 0;
|
|
39
|
-
const debug_1 = __importDefault(requireSrc());
|
|
40
|
-
const debug = (0, debug_1.default)("https-proxy-agent:parse-proxy-response");
|
|
41
|
-
function parseProxyResponse$1(socket) {
|
|
42
|
-
return new Promise((resolve, reject) => {
|
|
43
|
-
let buffersLength = 0;
|
|
44
|
-
const buffers = [];
|
|
45
|
-
function read() {
|
|
46
|
-
const b = socket.read();
|
|
47
|
-
if (b)
|
|
48
|
-
ondata(b);
|
|
49
|
-
else
|
|
50
|
-
socket.once("readable", read);
|
|
51
|
-
}
|
|
52
|
-
function cleanup() {
|
|
53
|
-
socket.removeListener("end", onend);
|
|
54
|
-
socket.removeListener("error", onerror);
|
|
55
|
-
socket.removeListener("readable", read);
|
|
56
|
-
}
|
|
57
|
-
function onend() {
|
|
58
|
-
cleanup();
|
|
59
|
-
debug("onend");
|
|
60
|
-
reject(new Error("Proxy connection ended before receiving CONNECT response"));
|
|
61
|
-
}
|
|
62
|
-
function onerror(err) {
|
|
63
|
-
cleanup();
|
|
64
|
-
debug("onerror %o", err);
|
|
65
|
-
reject(err);
|
|
66
|
-
}
|
|
67
|
-
function ondata(b) {
|
|
68
|
-
buffers.push(b);
|
|
69
|
-
buffersLength += b.length;
|
|
70
|
-
const buffered = Buffer.concat(buffers, buffersLength);
|
|
71
|
-
const endOfHeaders = buffered.indexOf("\r\n\r\n");
|
|
72
|
-
if (endOfHeaders === -1) {
|
|
73
|
-
debug("have not received end of HTTP headers yet...");
|
|
74
|
-
read();
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
const headerParts = buffered.slice(0, endOfHeaders).toString("ascii").split("\r\n");
|
|
78
|
-
const firstLine = headerParts.shift();
|
|
79
|
-
if (!firstLine) {
|
|
80
|
-
socket.destroy();
|
|
81
|
-
return reject(new Error("No header received from proxy CONNECT response"));
|
|
82
|
-
}
|
|
83
|
-
const firstLineParts = firstLine.split(" ");
|
|
84
|
-
const statusCode = +firstLineParts[1];
|
|
85
|
-
const statusText = firstLineParts.slice(2).join(" ");
|
|
86
|
-
const headers = {};
|
|
87
|
-
for (const header of headerParts) {
|
|
88
|
-
if (!header)
|
|
89
|
-
continue;
|
|
90
|
-
const firstColon = header.indexOf(":");
|
|
91
|
-
if (firstColon === -1) {
|
|
92
|
-
socket.destroy();
|
|
93
|
-
return reject(new Error(`Invalid header from proxy CONNECT response: "${header}"`));
|
|
94
|
-
}
|
|
95
|
-
const key = header.slice(0, firstColon).toLowerCase();
|
|
96
|
-
const value = header.slice(firstColon + 1).trimStart();
|
|
97
|
-
const current = headers[key];
|
|
98
|
-
if (typeof current === "string") {
|
|
99
|
-
headers[key] = [current, value];
|
|
100
|
-
} else if (Array.isArray(current)) {
|
|
101
|
-
current.push(value);
|
|
102
|
-
} else {
|
|
103
|
-
headers[key] = value;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
debug("got proxy server response: %o %o", firstLine, headers);
|
|
107
|
-
cleanup();
|
|
108
|
-
resolve({
|
|
109
|
-
connect: {
|
|
110
|
-
statusCode,
|
|
111
|
-
statusText,
|
|
112
|
-
headers
|
|
113
|
-
},
|
|
114
|
-
buffered
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
socket.on("error", onerror);
|
|
118
|
-
socket.on("end", onend);
|
|
119
|
-
read();
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
parseProxyResponse.parseProxyResponse = parseProxyResponse$1;
|
|
123
|
-
return parseProxyResponse;
|
|
124
|
-
}
|
|
125
|
-
var hasRequiredDist;
|
|
126
|
-
function requireDist() {
|
|
127
|
-
if (hasRequiredDist) return dist;
|
|
128
|
-
hasRequiredDist = 1;
|
|
129
|
-
var __createBinding = dist && dist.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
130
|
-
if (k2 === void 0) k2 = k;
|
|
131
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
132
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
133
|
-
desc = { enumerable: true, get: function() {
|
|
134
|
-
return m[k];
|
|
135
|
-
} };
|
|
136
|
-
}
|
|
137
|
-
Object.defineProperty(o, k2, desc);
|
|
138
|
-
}) : (function(o, m, k, k2) {
|
|
139
|
-
if (k2 === void 0) k2 = k;
|
|
140
|
-
o[k2] = m[k];
|
|
141
|
-
}));
|
|
142
|
-
var __setModuleDefault = dist && dist.__setModuleDefault || (Object.create ? (function(o, v) {
|
|
143
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
144
|
-
}) : function(o, v) {
|
|
145
|
-
o["default"] = v;
|
|
146
|
-
});
|
|
147
|
-
var __importStar = dist && dist.__importStar || function(mod) {
|
|
148
|
-
if (mod && mod.__esModule) return mod;
|
|
149
|
-
var result = {};
|
|
150
|
-
if (mod != null) {
|
|
151
|
-
for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
152
|
-
}
|
|
153
|
-
__setModuleDefault(result, mod);
|
|
154
|
-
return result;
|
|
155
|
-
};
|
|
156
|
-
var __importDefault = dist && dist.__importDefault || function(mod) {
|
|
157
|
-
return mod && mod.__esModule ? mod : { "default": mod };
|
|
158
|
-
};
|
|
159
|
-
Object.defineProperty(dist, "__esModule", { value: true });
|
|
160
|
-
dist.HttpsProxyAgent = void 0;
|
|
161
|
-
const net = __importStar(require$$0);
|
|
162
|
-
const tls = __importStar(require$$4);
|
|
163
|
-
const assert_1 = __importDefault(require$$2);
|
|
164
|
-
const debug_1 = __importDefault(requireSrc());
|
|
165
|
-
const agent_base_1 = requireDist$1();
|
|
166
|
-
const url_1 = require$$7;
|
|
167
|
-
const parse_proxy_response_1 = requireParseProxyResponse();
|
|
168
|
-
const debug = (0, debug_1.default)("https-proxy-agent");
|
|
169
|
-
const setServernameFromNonIpHost = (options) => {
|
|
170
|
-
if (options.servername === void 0 && options.host && !net.isIP(options.host)) {
|
|
171
|
-
return {
|
|
172
|
-
...options,
|
|
173
|
-
servername: options.host
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
return options;
|
|
177
|
-
};
|
|
178
|
-
class HttpsProxyAgent extends agent_base_1.Agent {
|
|
179
|
-
constructor(proxy, opts) {
|
|
180
|
-
super(opts);
|
|
181
|
-
this.options = { path: void 0 };
|
|
182
|
-
this.proxy = typeof proxy === "string" ? new url_1.URL(proxy) : proxy;
|
|
183
|
-
this.proxyHeaders = opts?.headers ?? {};
|
|
184
|
-
debug("Creating new HttpsProxyAgent instance: %o", this.proxy.href);
|
|
185
|
-
const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, "");
|
|
186
|
-
const port = this.proxy.port ? parseInt(this.proxy.port, 10) : this.proxy.protocol === "https:" ? 443 : 80;
|
|
187
|
-
this.connectOpts = {
|
|
188
|
-
// Attempt to negotiate http/1.1 for proxy servers that support http/2
|
|
189
|
-
ALPNProtocols: ["http/1.1"],
|
|
190
|
-
...opts ? omit(opts, "headers") : null,
|
|
191
|
-
host,
|
|
192
|
-
port
|
|
193
|
-
};
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* Called when the node-core HTTP client library is creating a
|
|
197
|
-
* new HTTP request.
|
|
198
|
-
*/
|
|
199
|
-
async connect(req, opts) {
|
|
200
|
-
const { proxy } = this;
|
|
201
|
-
if (!opts.host) {
|
|
202
|
-
throw new TypeError('No "host" provided');
|
|
203
|
-
}
|
|
204
|
-
let socket;
|
|
205
|
-
if (proxy.protocol === "https:") {
|
|
206
|
-
debug("Creating `tls.Socket`: %o", this.connectOpts);
|
|
207
|
-
socket = tls.connect(setServernameFromNonIpHost(this.connectOpts));
|
|
208
|
-
} else {
|
|
209
|
-
debug("Creating `net.Socket`: %o", this.connectOpts);
|
|
210
|
-
socket = net.connect(this.connectOpts);
|
|
211
|
-
}
|
|
212
|
-
const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders };
|
|
213
|
-
const host = net.isIPv6(opts.host) ? `[${opts.host}]` : opts.host;
|
|
214
|
-
let payload = `CONNECT ${host}:${opts.port} HTTP/1.1\r
|
|
215
|
-
`;
|
|
216
|
-
if (proxy.username || proxy.password) {
|
|
217
|
-
const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`;
|
|
218
|
-
headers["Proxy-Authorization"] = `Basic ${Buffer.from(auth).toString("base64")}`;
|
|
219
|
-
}
|
|
220
|
-
headers.Host = `${host}:${opts.port}`;
|
|
221
|
-
if (!headers["Proxy-Connection"]) {
|
|
222
|
-
headers["Proxy-Connection"] = this.keepAlive ? "Keep-Alive" : "close";
|
|
223
|
-
}
|
|
224
|
-
for (const name of Object.keys(headers)) {
|
|
225
|
-
payload += `${name}: ${headers[name]}\r
|
|
226
|
-
`;
|
|
227
|
-
}
|
|
228
|
-
const proxyResponsePromise = (0, parse_proxy_response_1.parseProxyResponse)(socket);
|
|
229
|
-
socket.write(`${payload}\r
|
|
230
|
-
`);
|
|
231
|
-
const { connect, buffered } = await proxyResponsePromise;
|
|
232
|
-
req.emit("proxyConnect", connect);
|
|
233
|
-
this.emit("proxyConnect", connect, req);
|
|
234
|
-
if (connect.statusCode === 200) {
|
|
235
|
-
req.once("socket", resume);
|
|
236
|
-
if (opts.secureEndpoint) {
|
|
237
|
-
debug("Upgrading socket connection to TLS");
|
|
238
|
-
return tls.connect({
|
|
239
|
-
...omit(setServernameFromNonIpHost(opts), "host", "path", "port"),
|
|
240
|
-
socket
|
|
241
|
-
});
|
|
242
|
-
}
|
|
243
|
-
return socket;
|
|
244
|
-
}
|
|
245
|
-
socket.destroy();
|
|
246
|
-
const fakeSocket = new net.Socket({ writable: false });
|
|
247
|
-
fakeSocket.readable = true;
|
|
248
|
-
req.once("socket", (s) => {
|
|
249
|
-
debug("Replaying proxy buffer for failed request");
|
|
250
|
-
(0, assert_1.default)(s.listenerCount("data") > 0);
|
|
251
|
-
s.push(buffered);
|
|
252
|
-
s.push(null);
|
|
253
|
-
});
|
|
254
|
-
return fakeSocket;
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
HttpsProxyAgent.protocols = ["http", "https"];
|
|
258
|
-
dist.HttpsProxyAgent = HttpsProxyAgent;
|
|
259
|
-
function resume(socket) {
|
|
260
|
-
socket.resume();
|
|
261
|
-
}
|
|
262
|
-
function omit(obj, ...keys) {
|
|
263
|
-
const ret = {};
|
|
264
|
-
let key;
|
|
265
|
-
for (key in obj) {
|
|
266
|
-
if (!keys.includes(key)) {
|
|
267
|
-
ret[key] = obj[key];
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
return ret;
|
|
271
|
-
}
|
|
272
|
-
return dist;
|
|
273
|
-
}
|
|
274
|
-
var distExports = requireDist();
|
|
275
|
-
const index = /* @__PURE__ */ _mergeNamespaces({
|
|
276
|
-
__proto__: null
|
|
277
|
-
}, [distExports]);
|
|
278
|
-
export {
|
|
279
|
-
index as i
|
|
280
|
-
};
|
|
1
|
+
import E from"assert";import L from"net";import j from"tls";import{r as T}from"./debug.mjs";import{r as q}from"./agent-base.mjs";import M from"url";function I(_,O){for(var c=0;c<O.length;c++){const a=O[c];if(typeof a!="string"&&!Array.isArray(a)){for(const n in a)if(n!=="default"&&!(n in _)){const f=Object.getOwnPropertyDescriptor(a,n);f&&Object.defineProperty(_,n,f.get?f:{enumerable:!0,get:function(){return a[n]}})}}}return Object.freeze(_)}var i={},v={},S;function B(){if(S)return v;S=1;var _=v&&v.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(v,"__esModule",{value:!0}),v.parseProxyResponse=void 0;const c=(0,_(T()).default)("https-proxy-agent:parse-proxy-response");function a(n){return new Promise((f,P)=>{let A=0;const H=[];function b(){const u=n.read();u?N(u):n.once("readable",b)}function $(){n.removeListener("end",p),n.removeListener("error",C),n.removeListener("readable",b)}function p(){$(),c("onend"),P(new Error("Proxy connection ended before receiving CONNECT response"))}function C(u){$(),c("onerror %o",u),P(u)}function N(u){H.push(u),A+=u.length;const m=Buffer.concat(H,A),e=m.indexOf(`\r
|
|
2
|
+
\r
|
|
3
|
+
`);if(e===-1){c("have not received end of HTTP headers yet..."),b();return}const t=m.slice(0,e).toString("ascii").split(`\r
|
|
4
|
+
`),r=t.shift();if(!r)return n.destroy(),P(new Error("No header received from proxy CONNECT response"));const o=r.split(" "),s=+o[1],d=o.slice(2).join(" "),l={};for(const h of t){if(!h)continue;const w=h.indexOf(":");if(w===-1)return n.destroy(),P(new Error(`Invalid header from proxy CONNECT response: "${h}"`));const x=h.slice(0,w).toLowerCase(),R=h.slice(w+1).trimStart(),g=l[x];typeof g=="string"?l[x]=[g,R]:Array.isArray(g)?g.push(R):l[x]=R}c("got proxy server response: %o %o",r,l),$(),f({connect:{statusCode:s,statusText:d,headers:l},buffered:m})}n.on("error",C),n.on("end",p),b()})}return v.parseProxyResponse=a,v}var D;function U(){if(D)return i;D=1;var _=i&&i.__createBinding||(Object.create?(function(e,t,r,o){o===void 0&&(o=r);var s=Object.getOwnPropertyDescriptor(t,r);(!s||("get"in s?!t.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,o,s)}):(function(e,t,r,o){o===void 0&&(o=r),e[o]=t[r]})),O=i&&i.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),c=i&&i.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&_(t,e,r);return O(t,e),t},a=i&&i.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.HttpsProxyAgent=void 0;const n=c(L),f=c(j),P=a(E),A=a(T()),H=q(),b=M,$=B(),p=(0,A.default)("https-proxy-agent"),C=e=>e.servername===void 0&&e.host&&!n.isIP(e.host)?{...e,servername:e.host}:e;class N extends H.Agent{constructor(t,r){super(r),this.options={path:void 0},this.proxy=typeof t=="string"?new b.URL(t):t,this.proxyHeaders=r?.headers??{},p("Creating new HttpsProxyAgent instance: %o",this.proxy.href);const o=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),s=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?m(r,"headers"):null,host:o,port:s}}async connect(t,r){const{proxy:o}=this;if(!r.host)throw new TypeError('No "host" provided');let s;o.protocol==="https:"?(p("Creating `tls.Socket`: %o",this.connectOpts),s=f.connect(C(this.connectOpts))):(p("Creating `net.Socket`: %o",this.connectOpts),s=n.connect(this.connectOpts));const d=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},l=n.isIPv6(r.host)?`[${r.host}]`:r.host;let h=`CONNECT ${l}:${r.port} HTTP/1.1\r
|
|
5
|
+
`;if(o.username||o.password){const y=`${decodeURIComponent(o.username)}:${decodeURIComponent(o.password)}`;d["Proxy-Authorization"]=`Basic ${Buffer.from(y).toString("base64")}`}d.Host=`${l}:${r.port}`,d["Proxy-Connection"]||(d["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(const y of Object.keys(d))h+=`${y}: ${d[y]}\r
|
|
6
|
+
`;const w=(0,$.parseProxyResponse)(s);s.write(`${h}\r
|
|
7
|
+
`);const{connect:x,buffered:R}=await w;if(t.emit("proxyConnect",x),this.emit("proxyConnect",x,t),x.statusCode===200)return t.once("socket",u),r.secureEndpoint?(p("Upgrading socket connection to TLS"),f.connect({...m(C(r),"host","path","port"),socket:s})):s;s.destroy();const g=new n.Socket({writable:!1});return g.readable=!0,t.once("socket",y=>{p("Replaying proxy buffer for failed request"),(0,P.default)(y.listenerCount("data")>0),y.push(R),y.push(null)}),g}}N.protocols=["http","https"],i.HttpsProxyAgent=N;function u(e){e.resume()}function m(e,...t){const r={};let o;for(o in e)t.includes(o)||(r[o]=e[o]);return r}return i}var z=U();const W=I({__proto__:null},[z]);export{W as i};
|
|
@@ -1,74 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
var lib;
|
|
3
|
-
var hasRequiredLib;
|
|
4
|
-
function requireLib() {
|
|
5
|
-
if (hasRequiredLib) return lib;
|
|
6
|
-
hasRequiredLib = 1;
|
|
7
|
-
var Mutation = commonjsGlobal.MutationObserver || commonjsGlobal.WebKitMutationObserver;
|
|
8
|
-
var scheduleDrain;
|
|
9
|
-
if (process.browser) {
|
|
10
|
-
if (Mutation) {
|
|
11
|
-
var called = 0;
|
|
12
|
-
var observer = new Mutation(nextTick);
|
|
13
|
-
var element = commonjsGlobal.document.createTextNode("");
|
|
14
|
-
observer.observe(element, {
|
|
15
|
-
characterData: true
|
|
16
|
-
});
|
|
17
|
-
scheduleDrain = function() {
|
|
18
|
-
element.data = called = ++called % 2;
|
|
19
|
-
};
|
|
20
|
-
} else if (!commonjsGlobal.setImmediate && typeof commonjsGlobal.MessageChannel !== "undefined") {
|
|
21
|
-
var channel = new commonjsGlobal.MessageChannel();
|
|
22
|
-
channel.port1.onmessage = nextTick;
|
|
23
|
-
scheduleDrain = function() {
|
|
24
|
-
channel.port2.postMessage(0);
|
|
25
|
-
};
|
|
26
|
-
} else if ("document" in commonjsGlobal && "onreadystatechange" in commonjsGlobal.document.createElement("script")) {
|
|
27
|
-
scheduleDrain = function() {
|
|
28
|
-
var scriptEl = commonjsGlobal.document.createElement("script");
|
|
29
|
-
scriptEl.onreadystatechange = function() {
|
|
30
|
-
nextTick();
|
|
31
|
-
scriptEl.onreadystatechange = null;
|
|
32
|
-
scriptEl.parentNode.removeChild(scriptEl);
|
|
33
|
-
scriptEl = null;
|
|
34
|
-
};
|
|
35
|
-
commonjsGlobal.document.documentElement.appendChild(scriptEl);
|
|
36
|
-
};
|
|
37
|
-
} else {
|
|
38
|
-
scheduleDrain = function() {
|
|
39
|
-
setTimeout(nextTick, 0);
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
} else {
|
|
43
|
-
scheduleDrain = function() {
|
|
44
|
-
process.nextTick(nextTick);
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
var draining;
|
|
48
|
-
var queue = [];
|
|
49
|
-
function nextTick() {
|
|
50
|
-
draining = true;
|
|
51
|
-
var i, oldQueue;
|
|
52
|
-
var len = queue.length;
|
|
53
|
-
while (len) {
|
|
54
|
-
oldQueue = queue;
|
|
55
|
-
queue = [];
|
|
56
|
-
i = -1;
|
|
57
|
-
while (++i < len) {
|
|
58
|
-
oldQueue[i]();
|
|
59
|
-
}
|
|
60
|
-
len = queue.length;
|
|
61
|
-
}
|
|
62
|
-
draining = false;
|
|
63
|
-
}
|
|
64
|
-
lib = immediate;
|
|
65
|
-
function immediate(task) {
|
|
66
|
-
if (queue.push(task) === 1 && !draining) {
|
|
67
|
-
scheduleDrain();
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
return lib;
|
|
71
|
-
}
|
|
72
|
-
export {
|
|
73
|
-
requireLib as r
|
|
74
|
-
};
|
|
1
|
+
import{c as t}from"./react.mjs";var s,m;function g(){if(m)return s;m=1;var u=t.MutationObserver||t.WebKitMutationObserver,n;if(process.browser)if(u){var c=0,v=new u(a),l=t.document.createTextNode("");v.observe(l,{characterData:!0}),n=function(){l.data=c=++c%2}}else if(!t.setImmediate&&typeof t.MessageChannel<"u"){var d=new t.MessageChannel;d.port1.onmessage=a,n=function(){d.port2.postMessage(0)}}else"document"in t&&"onreadystatechange"in t.document.createElement("script")?n=function(){var e=t.document.createElement("script");e.onreadystatechange=function(){a(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},t.document.documentElement.appendChild(e)}:n=function(){setTimeout(a,0)};else n=function(){process.nextTick(a)};var i,r=[];function a(){i=!0;for(var e,f,o=r.length;o;){for(f=r,r=[],e=-1;++e<o;)f[e]();o=r.length}i=!1}s=p;function p(e){r.push(e)===1&&!i&&n()}return s}export{g as r};
|
|
@@ -1,50 +1 @@
|
|
|
1
|
-
var
|
|
2
|
-
var inherits_browser = { exports: {} };
|
|
3
|
-
var hasRequiredInherits_browser;
|
|
4
|
-
function requireInherits_browser() {
|
|
5
|
-
if (hasRequiredInherits_browser) return inherits_browser.exports;
|
|
6
|
-
hasRequiredInherits_browser = 1;
|
|
7
|
-
if (typeof Object.create === "function") {
|
|
8
|
-
inherits_browser.exports = function inherits2(ctor, superCtor) {
|
|
9
|
-
if (superCtor) {
|
|
10
|
-
ctor.super_ = superCtor;
|
|
11
|
-
ctor.prototype = Object.create(superCtor.prototype, {
|
|
12
|
-
constructor: {
|
|
13
|
-
value: ctor,
|
|
14
|
-
enumerable: false,
|
|
15
|
-
writable: true,
|
|
16
|
-
configurable: true
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
} else {
|
|
22
|
-
inherits_browser.exports = function inherits2(ctor, superCtor) {
|
|
23
|
-
if (superCtor) {
|
|
24
|
-
ctor.super_ = superCtor;
|
|
25
|
-
var TempCtor = function() {
|
|
26
|
-
};
|
|
27
|
-
TempCtor.prototype = superCtor.prototype;
|
|
28
|
-
ctor.prototype = new TempCtor();
|
|
29
|
-
ctor.prototype.constructor = ctor;
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
return inherits_browser.exports;
|
|
34
|
-
}
|
|
35
|
-
var hasRequiredInherits;
|
|
36
|
-
function requireInherits() {
|
|
37
|
-
if (hasRequiredInherits) return inherits.exports;
|
|
38
|
-
hasRequiredInherits = 1;
|
|
39
|
-
try {
|
|
40
|
-
var util = require("util");
|
|
41
|
-
if (typeof util.inherits !== "function") throw "";
|
|
42
|
-
inherits.exports = util.inherits;
|
|
43
|
-
} catch (e) {
|
|
44
|
-
inherits.exports = requireInherits_browser();
|
|
45
|
-
}
|
|
46
|
-
return inherits.exports;
|
|
47
|
-
}
|
|
48
|
-
export {
|
|
49
|
-
requireInherits as r
|
|
50
|
-
};
|
|
1
|
+
var i={exports:{}},n={exports:{}},s;function u(){return s||(s=1,typeof Object.create=="function"?n.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:n.exports=function(e,r){if(r){e.super_=r;var o=function(){};o.prototype=r.prototype,e.prototype=new o,e.prototype.constructor=e}}),n.exports}var p;function a(){if(p)return i.exports;p=1;try{var t=require("util");if(typeof t.inherits!="function")throw"";i.exports=t.inherits}catch{i.exports=u()}return i.exports}export{a as r};
|
|
@@ -1,14 +1 @@
|
|
|
1
|
-
var
|
|
2
|
-
var hasRequiredIsarray;
|
|
3
|
-
function requireIsarray() {
|
|
4
|
-
if (hasRequiredIsarray) return isarray;
|
|
5
|
-
hasRequiredIsarray = 1;
|
|
6
|
-
var toString = {}.toString;
|
|
7
|
-
isarray = Array.isArray || function(arr) {
|
|
8
|
-
return toString.call(arr) == "[object Array]";
|
|
9
|
-
};
|
|
10
|
-
return isarray;
|
|
11
|
-
}
|
|
12
|
-
export {
|
|
13
|
-
requireIsarray as r
|
|
14
|
-
};
|
|
1
|
+
var r,a;function i(){if(a)return r;a=1;var t={}.toString;return r=Array.isArray||function(e){return t.call(e)=="[object Array]"},r}export{i as r};
|
|
@@ -1,20 +1 @@
|
|
|
1
|
-
var
|
|
2
|
-
var naivePattern = /bot|crawl|http|lighthouse|scan|search|spider/i;
|
|
3
|
-
var pattern;
|
|
4
|
-
function getPattern() {
|
|
5
|
-
if (pattern instanceof RegExp) {
|
|
6
|
-
return pattern;
|
|
7
|
-
}
|
|
8
|
-
try {
|
|
9
|
-
pattern = new RegExp(fullPattern, "i");
|
|
10
|
-
} catch (error) {
|
|
11
|
-
pattern = naivePattern;
|
|
12
|
-
}
|
|
13
|
-
return pattern;
|
|
14
|
-
}
|
|
15
|
-
function isbot(userAgent) {
|
|
16
|
-
return Boolean(userAgent) && getPattern().test(userAgent);
|
|
17
|
-
}
|
|
18
|
-
export {
|
|
19
|
-
isbot as i
|
|
20
|
-
};
|
|
1
|
+
var r=" daum[ /]| deusu/|(?:^|[^g])news(?!sapphire)|(?<! (?:channel/|google/))google(?!(app|/google| pixel))|(?<! cu)bots?(?:\\b|_)|(?<!(?:lib))http|(?<![hg]m)score|(?<!cam)scan|24x7|@[a-z][\\w-]+\\.|\\(\\)|\\.com\\b|\\b\\w+\\.ai|\\bmanus-user/|\\bort/|\\bperl\\b|\\bsecurityheaders\\b|\\btime/|\\||^[\\w \\.\\-\\(?:\\):%]+(?:/v?\\d+(?:\\.\\d+)?(?:\\.\\d{1,10})*?)?(?:,|$)|^[^ ]{50,}$|^\\d+\\b|^\\W|^\\w*search\\b|^\\w+/[\\w\\(\\)]*$|^\\w+/\\d\\.\\d\\s\\([\\w@]+\\)$|^active|^ad muncher|^amaya|^apache/|^avsdevicesdk/|^azure|^biglotron|^bot|^bw/|^clamav[ /]|^client/|^cobweb/|^custom|^ddg[_-]android|^discourse|^dispatch/\\d|^downcast/|^duckduckgo|^email|^facebook|^getright/|^gozilla/|^hobbit|^hotzonu|^hwcdn/|^igetter/|^jeode/|^jetty/|^jigsaw|^microsoft bits|^movabletype|^mozilla/\\d\\.\\d\\s[\\w\\.-]+$|^mozilla/\\d\\.\\d\\s\\(compatible;?(?:\\s[\\w\\d-.]+\\/\\d+\\.\\d+)?\\)$|^navermailapp|^netsurf|^offline|^openai/|^owler|^php|^postman|^python|^rank|^read|^reed|^rest|^rss|^snapchat|^space bison|^svn|^swcd |^taringa|^thumbor/|^track|^w3c|^webbandit/|^webcopier|^wget|^whatsapp|^wordpress|^xenu link sleuth|^yahoo|^yandex|^zdm/\\d|^zoom marketplace/|advisor|agent\\b|analyzer|archive|ask jeeves/teoma|audit|bit\\.ly/|bluecoat drtr|browsex|burpcollaborator|capture|catch|check\\b|checker|chrome-lighthouse|chromeframe|classifier|cloudflare|convertify|crawl|cypress/|dareboost|datanyze|dejaclick|detect|dmbrowser|download|exaleadcloudview|feed|fetcher|firephp|functionize|grab|headless|httrack|hubspot marketing grader|ibisbrowser|infrawatch|insight|inspect|iplabel|java(?!;)|library|linkcheck|mail\\.ru/|manager|measure|monitor\\b|neustar wpm|node\\b|nutch|offbyone|onetrust|optimize|pageburst|pagespeed|parser|phantomjs|pingdom|powermarks|preview|proxy|ptst[ /]\\d|retriever|rexx;|rigor|rss\\b|scrape|server|sogou|sparkler/|speedcurve|spider|splash|statuscake|supercleaner|synapse|synthetic|tools|torrent|transcoder|url|validator|virtuoso|wappalyzer|webglance|webkit2png|whatcms/|xtate/",t=/bot|crawl|http|lighthouse|scan|search|spider/i,e;function o(){if(e instanceof RegExp)return e;try{e=new RegExp(r,"i")}catch{e=t}return e}function s(a){return!!a&&o().test(a)}export{s as i};
|