@opentiny/next-sdk 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,51 +1,53 @@
1
- import { default as $0 } from "ajv";
2
- import { z as j0 } from "zod";
3
- import { MessageChannelServerTransport as i2, createTransportPair as G2, MessageChannelClientTransport as n2, sseOptions as Y2, streamOptions as K2, createSseProxy as Q2, createSocketProxy as X2, createStreamProxy as ee, MessageChannelTransport as te } from "@opentiny/next";
4
- import { AuthClientProvider as N0 } from "@opentiny/next";
5
- import { McpServer as R2 } from "@modelcontextprotocol/sdk/server/mcp.js";
6
- import { ResourceTemplate as Z0 } from "@modelcontextprotocol/sdk/server/mcp.js";
7
- import { UriTemplate as F0 } from "@modelcontextprotocol/sdk/shared/uriTemplate.js";
8
- import { completable as V0 } from "@modelcontextprotocol/sdk/server/completable.js";
9
- import { getDisplayName as W0 } from "@modelcontextprotocol/sdk/shared/metadataUtils.js";
10
- import { InMemoryTransport as re } from "@modelcontextprotocol/sdk/inMemory.js";
11
- import { InMemoryTransport as Y0 } from "@modelcontextprotocol/sdk/inMemory.js";
12
- import { SetLevelRequestSchema as m2, SubscribeRequestSchema as se, UnsubscribeRequestSchema as oe, ListResourcesRequestSchema as ie, RootsListChangedNotificationSchema as ne, CallToolResultSchema as ae, ElicitRequestSchema as ce, CreateMessageRequestSchema as le, ListRootsRequestSchema as he, ToolListChangedNotificationSchema as de, PromptListChangedNotificationSchema as pe, ResourceListChangedNotificationSchema as ue, ResourceUpdatedNotificationSchema as me, LoggingMessageNotificationSchema as ge, JSONRPCMessageSchema as a2 } from "@modelcontextprotocol/sdk/types.js";
13
- import { Client as E2 } from "@modelcontextprotocol/sdk/client/index.js";
14
- import { SSEClientTransport as c2 } from "@modelcontextprotocol/sdk/client/sse.js";
15
- import { StreamableHTTPClientTransport as G } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
16
- import { WebSocketClientTransport as fe } from "@modelcontextprotocol/sdk/client/websocket.js";
17
- import g2 from "qrcode";
18
- import { dynamicTool as Ce, jsonSchema as we, generateText as f2, streamText as X, stepCountIs as ye } from "ai";
19
- import { InvalidArgumentError as ve, AISDKError as Z } from "@ai-sdk/provider";
1
+ import { default as ms } from "ajv";
2
+ import { z as ae } from "zod";
3
+ import { z as gs } from "zod";
4
+ import { MessageChannelServerTransport as we, createTransportPair as xt, MessageChannelClientTransport as ve, sseOptions as Lt, streamOptions as St, createSseProxy as Pt, createSocketProxy as kt, createStreamProxy as Tt, MessageChannelTransport as Mt } from "@opentiny/next";
5
+ import { AuthClientProvider as Cs } from "@opentiny/next";
6
+ import { McpServer as Ge } from "@modelcontextprotocol/sdk/server/mcp.js";
7
+ import { ResourceTemplate as vs } from "@modelcontextprotocol/sdk/server/mcp.js";
8
+ import { UriTemplate as bs } from "@modelcontextprotocol/sdk/shared/uriTemplate.js";
9
+ import { completable as Ls } from "@modelcontextprotocol/sdk/server/completable.js";
10
+ import { getDisplayName as Ps } from "@modelcontextprotocol/sdk/shared/metadataUtils.js";
11
+ import { InMemoryTransport as Rt } from "@modelcontextprotocol/sdk/inMemory.js";
12
+ import { InMemoryTransport as Ts } from "@modelcontextprotocol/sdk/inMemory.js";
13
+ import { SetLevelRequestSchema as Te, SubscribeRequestSchema as Et, UnsubscribeRequestSchema as It, ListResourcesRequestSchema as At, RootsListChangedNotificationSchema as Ot, CallToolResultSchema as $t, ElicitRequestSchema as Ut, CreateMessageRequestSchema as jt, ListRootsRequestSchema as Zt, ToolListChangedNotificationSchema as Nt, PromptListChangedNotificationSchema as qt, ResourceListChangedNotificationSchema as zt, ResourceUpdatedNotificationSchema as Dt, LoggingMessageNotificationSchema as Ht, JSONRPCMessageSchema as _e } from "@modelcontextprotocol/sdk/types.js";
14
+ import { Client as Ye } from "@modelcontextprotocol/sdk/client/index.js";
15
+ import { SSEClientTransport as be } from "@modelcontextprotocol/sdk/client/sse.js";
16
+ import { StreamableHTTPClientTransport as ne } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
17
+ import { WebSocketClientTransport as Ft } from "@modelcontextprotocol/sdk/client/websocket.js";
18
+ import Me from "qrcode";
19
+ import { dynamicTool as Bt, jsonSchema as Vt, generateText as Re, streamText as ce, stepCountIs as Jt, tool as Wt } from "ai";
20
+ import { TypeValidationError as pe, JSONParseError as Ee, InvalidArgumentError as Kt, AISDKError as Y } from "@ai-sdk/provider";
21
+ import * as Ie from "zod/v4";
20
22
  import { z as o } from "zod/v4";
21
- import "zod/v3";
22
- import { createOpenAI as _e } from "@ai-sdk/openai";
23
- import { createDeepSeek as be } from "@ai-sdk/deepseek";
24
- class y0 {
23
+ import { ZodFirstPartyTypeKind as f } from "zod/v3";
24
+ import { createOpenAI as Gt } from "@ai-sdk/openai";
25
+ import { createDeepSeek as Yt } from "@ai-sdk/deepseek";
26
+ class Jr {
25
27
  constructor(e, t) {
26
28
  const s = {
27
29
  name: "web-mcp-server",
28
30
  version: "1.0.0"
29
- }, i = {
31
+ }, n = {
30
32
  prompts: { listChanged: !0 },
31
33
  resources: { subscribe: !0, listChanged: !0 },
32
34
  tools: { listChanged: !0 },
33
35
  completions: {},
34
36
  logging: {}
35
37
  };
36
- this.server = new R2(e || s, t || { capabilities: i }), this.server.server.oninitialized = () => {
38
+ this.server = new Ge(e || s, t || { capabilities: n }), this.server.server.oninitialized = () => {
37
39
  this.oninitialized?.();
38
40
  }, this.server.server.onclose = () => {
39
41
  this.onclose?.();
40
- }, this.server.server.onerror = (n) => {
41
- this.onerror?.(n);
42
- }, this.server.server.setRequestHandler(m2, async () => ({}));
42
+ }, this.server.server.onerror = (i) => {
43
+ this.onerror?.(i);
44
+ }, this.server.server.setRequestHandler(Te, async () => ({}));
43
45
  }
44
46
  /**
45
47
  * Connects the server to a transport via the specified option.
46
48
  */
47
49
  async connect(e) {
48
- return typeof e.start == "function" ? (this.transport = e, this.transport.onclose = void 0, this.transport.onerror = void 0, this.transport.onmessage = void 0) : (this.transport = new i2(e), await this.transport.listen()), await this.server.connect(this.transport), this.transport;
50
+ return typeof e.start == "function" ? (this.transport = e, this.transport.onclose = void 0, this.transport.onerror = void 0, this.transport.onmessage = void 0) : (this.transport = new we(e), await this.transport.listen()), await this.server.connect(this.transport), this.transport;
49
51
  }
50
52
  /**
51
53
  * Closes the connection.
@@ -65,8 +67,8 @@ class y0 {
65
67
  registerPrompt(e, t, s) {
66
68
  return this.server.registerPrompt(e, t, s);
67
69
  }
68
- registerResource(e, t, s, i) {
69
- return typeof t == "string" ? this.server.registerResource(e, t, s, i) : this.server.registerResource(e, t, s, i);
70
+ registerResource(e, t, s, n) {
71
+ return typeof t == "string" ? this.server.registerResource(e, t, s, n) : this.server.registerResource(e, t, s, n);
70
72
  }
71
73
  /**
72
74
  * Checks if the server is connected to a transport.
@@ -187,31 +189,31 @@ class y0 {
187
189
  * Registers a handler for the subscribe request.
188
190
  */
189
191
  onSubscribe(e) {
190
- this.server.server.setRequestHandler(se, e);
192
+ this.server.server.setRequestHandler(Et, e);
191
193
  }
192
194
  /**
193
195
  * Registers a handler for the unsubscribe request.
194
196
  */
195
197
  onUnsubscribe(e) {
196
- this.server.server.setRequestHandler(oe, e);
198
+ this.server.server.setRequestHandler(It, e);
197
199
  }
198
200
  /**
199
201
  * Registers a handler for the set log level request.
200
202
  */
201
203
  onSetLogLevel(e) {
202
- this.server.server.setRequestHandler(m2, e);
204
+ this.server.server.setRequestHandler(Te, e);
203
205
  }
204
206
  /**
205
207
  * Registers a handler for the list tools request.
206
208
  */
207
209
  onListResources(e) {
208
- this.server.server.setRequestHandler(ie, e);
210
+ this.server.server.setRequestHandler(At, e);
209
211
  }
210
212
  /**
211
213
  * Registers a handler for the roots list changed notification.
212
214
  */
213
215
  onRootsListChanged(e) {
214
- this.server.server.setNotificationHandler(ne, e);
216
+ this.server.server.setNotificationHandler(Ot, e);
215
217
  }
216
218
  /**
217
219
  * Close the transport for window.addEventListener('pagehide')
@@ -220,21 +222,21 @@ class y0 {
220
222
  e.persisted || this.transport && typeof this.transport.close == "function" && await this.transport.close();
221
223
  }
222
224
  }
223
- const v0 = (r, e) => new i2(r, e), _0 = () => G2(), b0 = (r) => r instanceof i2, x0 = (r) => r instanceof R2;
224
- class xe {
225
+ const Wr = (r, e) => new we(r, e), Kr = () => xt(), Gr = (r) => r instanceof we, Yr = (r) => r instanceof Ge;
226
+ class Qt {
225
227
  constructor(e, t) {
226
228
  const s = {
227
229
  name: "web-mcp-client",
228
230
  version: "1.0.0"
229
- }, i = {
231
+ }, n = {
230
232
  roots: { listChanged: !0 },
231
233
  sampling: {},
232
234
  elicitation: {}
233
235
  };
234
- this.client = new E2(e || s, t || { capabilities: i }), this.client.onclose = () => {
236
+ this.client = new Ye(e || s, t || { capabilities: n }), this.client.onclose = () => {
235
237
  this.onclose?.();
236
- }, this.client.onerror = (n) => {
237
- this.onerror?.(n);
238
+ }, this.client.onerror = (i) => {
239
+ this.onerror?.(i);
238
240
  };
239
241
  }
240
242
  /**
@@ -243,28 +245,28 @@ class xe {
243
245
  async connect(e) {
244
246
  if (typeof e.start == "function")
245
247
  return this.transport = e, this.transport.onclose = void 0, this.transport.onerror = void 0, this.transport.onmessage = void 0, await this.client.connect(this.transport), { transport: this.transport, sessionId: this.transport.sessionId };
246
- const { url: t, token: s, sessionId: i, type: n, agent: a, onError: h } = e;
248
+ const { url: t, token: s, sessionId: n, type: i, agent: a, onError: l } = e;
247
249
  if (a === !0) {
248
- const d = { client: this.client, url: t, token: s, sessionId: i };
250
+ const d = { client: this.client, url: t, token: s, sessionId: n };
249
251
  let g;
250
252
  return await (async () => {
251
- const { transport: C, sessionId: f } = n === "sse" ? await Q2(d) : n === "socket" ? await X2(d) : await ee(d);
252
- C.onerror = async (u) => {
253
- h?.(u);
254
- }, g = { transport: C, sessionId: f };
253
+ const { transport: m, sessionId: C } = i === "sse" ? await Pt(d) : i === "socket" ? await kt(d) : await Tt(d);
254
+ m.onerror = async (p) => {
255
+ l?.(p);
256
+ }, g = { transport: m, sessionId: C };
255
257
  })(), g;
256
258
  }
257
- const c = new URL(t);
258
- let l;
259
- if (n === "channel" && (l = new n2(t), await this.client.connect(l)), n === "sse") {
260
- const d = Y2(s, i);
261
- l = new c2(c, d), await this.client.connect(l);
259
+ const u = new URL(t);
260
+ let c;
261
+ if (i === "channel" && (c = new ve(t), await this.client.connect(c)), i === "sse") {
262
+ const d = Lt(s, n);
263
+ c = new be(u, d), await this.client.connect(c);
262
264
  }
263
- if (n === "socket" && (l = new fe(new URL(`${t}?sessionId=${i}&token=${s}`)), l.sessionId = i, await this.client.connect(l)), typeof l > "u") {
264
- const d = K2(s, i);
265
- l = new G(c, d), await this.client.connect(l);
265
+ if (i === "socket" && (c = new Ft(new URL(`${t}?sessionId=${n}&token=${s}`)), c.sessionId = n, await this.client.connect(c)), typeof c > "u") {
266
+ const d = St(s, n);
267
+ c = new ne(u, d), await this.client.connect(c);
266
268
  }
267
- return this.transport = l, { transport: this.transport, sessionId: this.transport.sessionId };
269
+ return this.transport = c, { transport: this.transport, sessionId: this.transport.sessionId };
268
270
  }
269
271
  /**
270
272
  * Closes the connection.
@@ -354,7 +356,7 @@ class xe {
354
356
  * Calls a tool on the server with the given parameters.
355
357
  */
356
358
  async callTool(e, t) {
357
- return await this.client.callTool(e, ae, t);
359
+ return await this.client.callTool(e, $t, t);
358
360
  }
359
361
  /**
360
362
  * Lists all tools available on the server.
@@ -414,90 +416,90 @@ class xe {
414
416
  * Registers a handler for the elicitation request.
415
417
  */
416
418
  onElicit(e) {
417
- this.client.setRequestHandler(ce, e);
419
+ this.client.setRequestHandler(Ut, e);
418
420
  }
419
421
  /**
420
422
  * Registers a handler for the create LLM message request.
421
423
  */
422
424
  onCreateMessage(e) {
423
- this.client.setRequestHandler(le, e);
425
+ this.client.setRequestHandler(jt, e);
424
426
  }
425
427
  /**
426
428
  * Registers a handler for the list roots request.
427
429
  */
428
430
  onListRoots(e) {
429
- this.client.setRequestHandler(he, e);
431
+ this.client.setRequestHandler(Zt, e);
430
432
  }
431
433
  /**
432
434
  * Registers a handler for the tool list changed notification.
433
435
  */
434
436
  onToolListChanged(e) {
435
- this.client.setNotificationHandler(de, e);
437
+ this.client.setNotificationHandler(Nt, e);
436
438
  }
437
439
  /**
438
440
  * Registers a handler for the prompt list changed notification.
439
441
  */
440
442
  onPromptListChanged(e) {
441
- this.client.setNotificationHandler(pe, e);
443
+ this.client.setNotificationHandler(qt, e);
442
444
  }
443
445
  /**
444
446
  * Registers a handler for the resource list changed notification.
445
447
  */
446
448
  onResourceListChanged(e) {
447
- this.client.setNotificationHandler(ue, e);
449
+ this.client.setNotificationHandler(zt, e);
448
450
  }
449
451
  /**
450
452
  * Registers a handler for the resource updated notification.
451
453
  */
452
454
  onResourceUpdated(e) {
453
- this.client.setNotificationHandler(me, e);
455
+ this.client.setNotificationHandler(Dt, e);
454
456
  }
455
457
  /**
456
458
  * Registers a handler for the logging message notification.
457
459
  */
458
460
  onLoggingMessage(e) {
459
- this.client.setNotificationHandler(ge, e);
461
+ this.client.setNotificationHandler(Ht, e);
460
462
  }
461
463
  /**
462
464
  * Close the transport for window.addEventListener('pagehide')
463
465
  */
464
466
  async onPagehide(e) {
465
- e.persisted || (Le(this.transport) ? await this.transport.terminateSession() : this.transport && typeof this.transport.close == "function" && await this.transport.close());
467
+ e.persisted || (Xt(this.transport) ? await this.transport.terminateSession() : this.transport && typeof this.transport.close == "function" && await this.transport.close());
466
468
  }
467
469
  }
468
- const L0 = (r, e) => new c2(r, e), S0 = (r, e) => new G(r, e), T0 = (r, e) => new n2(r, e), M0 = (r) => r instanceof c2, Le = (r) => r instanceof G, R0 = (r) => r instanceof n2, E0 = (r) => r instanceof E2, A = (r, e, t) => {
470
+ const Qr = (r, e) => new be(r, e), Xr = (r, e) => new ne(r, e), es = (r, e) => new ve(r, e), ts = (r) => r instanceof be, Xt = (r) => r instanceof ne, rs = (r) => r instanceof ve, ss = (r) => r instanceof Ye, z = (r, e, t) => {
469
471
  window.postMessage({ type: r, direction: t, data: e }, "*");
470
- }, C2 = (r, e, t) => {
471
- const s = async function(i) {
472
- i.source === window && i.data.type === r && i.data.direction === t && await e(i.data.data);
472
+ }, Ae = (r, e, t) => {
473
+ const s = async function(n) {
474
+ n.source === window && n.data.type === r && n.data.direction === t && await e(n.data.data);
473
475
  };
474
476
  return window.addEventListener("message", s), () => window.removeEventListener("message", s);
475
- }, r2 = (r, e, t) => {
477
+ }, me = (r, e, t) => {
476
478
  if (t.endsWith("content"))
477
479
  chrome.tabs.query({}, (s) => {
478
- s.forEach((i) => {
479
- chrome.tabs.sendMessage(i.id, { type: r, data: e, direction: t, tabId: i.id });
480
+ s.forEach((n) => {
481
+ chrome.tabs.sendMessage(n.id, { type: r, data: e, direction: t, tabId: n.id });
480
482
  });
481
483
  });
482
484
  else
483
485
  return chrome.runtime.sendMessage({ direction: t, type: r, data: e });
484
- }, s2 = (r, e, t, s) => {
485
- const i = (n, a, h) => {
486
- if (n.type === r && n.direction === t && (!s || s && n.tabId === s)) {
487
- const { data: c } = n;
488
- e(c, a, h), h(a);
486
+ }, fe = (r, e, t, s) => {
487
+ const n = (i, a, l) => {
488
+ if (i.type === r && i.direction === t && (!s || s && i.tabId === s)) {
489
+ const { data: u } = i;
490
+ e(u, a, l), l(a);
489
491
  }
490
492
  };
491
- return chrome.runtime.onMessage.addListener(i), () => chrome.runtime.onMessage.removeListener(i);
493
+ return chrome.runtime.onMessage.addListener(n), () => chrome.runtime.onMessage.removeListener(n);
492
494
  };
493
- class Se {
495
+ class e2 {
494
496
  constructor(e) {
495
- this._isStarted = !1, this._isClosed = !1, this.targetSessionId = e, this._messageListener = s2(
497
+ this._isStarted = !1, this._isClosed = !1, this.targetSessionId = e, this._messageListener = fe(
496
498
  "mcp-server-to-client",
497
499
  (t) => {
498
500
  try {
499
501
  if (t.sessionId !== this.targetSessionId) return;
500
- const s = a2.parse(t.mcpMessage);
502
+ const s = _e.parse(t.mcpMessage);
501
503
  this.onmessage?.(s);
502
504
  } catch (s) {
503
505
  console.log("【Client Transport】处理server消息错误:", s);
@@ -522,10 +524,10 @@ class Se {
522
524
  this._throwError(() => !this._isStarted, "【Client Transport】 未启动,无法发送消息"), this._throwError(() => this._isClosed, "【Client Transport】 已关闭,无法发送消息");
523
525
  const s = chrome.sessionRegistry.get(this.targetSessionId);
524
526
  this._throwError(() => !s, `【Client Transport】sessionRegistry中未找到${this.targetSessionId}`);
525
- const i = s.tabIds[s.tabIds.length - 1];
526
- r2(
527
+ const n = s.tabIds[s.tabIds.length - 1];
528
+ me(
527
529
  "mcp-client-to-server",
528
- { sessionId: this.targetSessionId, tabId: i, mcpMessage: e },
530
+ { sessionId: this.targetSessionId, tabId: n, mcpMessage: e },
529
531
  "side->content"
530
532
  );
531
533
  }
@@ -539,13 +541,13 @@ class Se {
539
541
  }
540
542
  }
541
543
  }
542
- const P2 = () => typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (r) => {
544
+ const Qe = () => typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (r) => {
543
545
  const e = Math.random() * 16 | 0;
544
546
  return (r === "x" ? e : e & 3 | 8).toString(16);
545
547
  });
546
- class P0 {
548
+ class ns {
547
549
  constructor(e = null) {
548
- this._isStarted = !1, this._isClosed = !1, this._lastRegistration = null, this.sessionId = e || P2(), this._messageListener1 = C2(
550
+ this._isStarted = !1, this._isClosed = !1, this._lastRegistration = null, this.sessionId = e || Qe(), this._messageListener1 = Ae(
549
551
  "sidepanel-ready-to-page",
550
552
  () => {
551
553
  this._lastRegistration && this._isStarted && this.notifyRegistration(this._lastRegistration).catch((t) => {
@@ -553,13 +555,13 @@ class P0 {
553
555
  });
554
556
  },
555
557
  "content->page"
556
- ), this._messageListener2 = C2(
558
+ ), this._messageListener2 = Ae(
557
559
  "mcp-client-to-server-to-page",
558
560
  (t) => {
559
561
  if (t.sessionId !== this.sessionId) return;
560
562
  console.log("【Page Svr Transport】 即将处理 mcpMessage", t.mcpMessage);
561
- const s = a2.parse(t.mcpMessage);
562
- this.onmessage?.(s), t.mcpMessage.params?.name && A(
563
+ const s = _e.parse(t.mcpMessage);
564
+ this.onmessage?.(s), t.mcpMessage.params?.name && z(
563
565
  "update-page-app-message",
564
566
  { status: "run", message: t.mcpMessage.params?.name },
565
567
  "page->content"
@@ -584,14 +586,14 @@ class P0 {
584
586
  }
585
587
  /** 发送消息到 MCP Client */
586
588
  async send(e, t) {
587
- this._throwError(() => !this._isStarted, "【Page Svr Transport】 未启动,无法发送消息"), this._throwError(() => this._isClosed, "【Page Svr Transport】 已关闭,无法发送消息"), A(
589
+ this._throwError(() => !this._isStarted, "【Page Svr Transport】 未启动,无法发送消息"), this._throwError(() => this._isClosed, "【Page Svr Transport】 已关闭,无法发送消息"), z(
588
590
  "mcp-server-to-client-from-page",
589
591
  {
590
592
  sessionId: this.sessionId,
591
593
  mcpMessage: e
592
594
  },
593
595
  "page->content"
594
- ), "result" in e && e.result?.content && A(
596
+ ), "result" in e && e.result?.content && z(
595
597
  "update-page-app-message",
596
598
  { status: "ready", message: "" },
597
599
  "page->content"
@@ -602,7 +604,7 @@ class P0 {
602
604
  async notifyRegistration(e) {
603
605
  this._throwError(() => !this._isStarted, "【Page Svr Transport】 未启动,无法注册消息"), this._lastRegistration = e;
604
606
  try {
605
- A(
607
+ z(
606
608
  "mcp-server-register-from-page",
607
609
  {
608
610
  sessionId: this.sessionId,
@@ -628,9 +630,9 @@ class P0 {
628
630
  }
629
631
  }
630
632
  }
631
- class k0 {
633
+ class os {
632
634
  constructor(e = null, t) {
633
- this._isStarted = !1, this._isClosed = !1, this._lastRegistration = null, this.sessionId = e || P2(), this.tabId = t, s2(
635
+ this._isStarted = !1, this._isClosed = !1, this._lastRegistration = null, this.sessionId = e || Qe(), this.tabId = t, fe(
634
636
  "sidepanel-ready",
635
637
  () => {
636
638
  this._lastRegistration && this._isStarted && this.notifyRegistration(this._lastRegistration).catch((s) => {
@@ -652,14 +654,14 @@ class k0 {
652
654
  async start() {
653
655
  if (console.log("【Content Svr Transport】 启动 start", this.sessionId), !this._isStarted) {
654
656
  if (this._isClosed) throw new Error("【Content Svr Transport】 已关闭,无法重新启动");
655
- s2(
657
+ fe(
656
658
  "mcp-client-to-server",
657
659
  (e) => {
658
660
  if (!(e.sessionId !== this.sessionId || e.tabId !== this.tabId))
659
661
  try {
660
662
  console.log("【Content Svr Transport】 即将处理 mcpMessage", e.mcpMessage);
661
- const t = a2.parse(e.mcpMessage);
662
- this.onmessage?.(t), e.mcpMessage.params?.name && A(
663
+ const t = _e.parse(e.mcpMessage);
664
+ this.onmessage?.(t), e.mcpMessage.params?.name && z(
663
665
  "update-page-app-message",
664
666
  { status: "run", message: e.mcpMessage.params?.name },
665
667
  "page->content"
@@ -678,14 +680,14 @@ class k0 {
678
680
  async send(e, t) {
679
681
  this._throwError(() => !this._isStarted, "【Content Svr Transport】 未启动,无法发送消息"), this._throwError(() => this._isClosed, "【Content Svr Transport】 已关闭,无法发送消息");
680
682
  try {
681
- console.log("【Content Svr Transport】 发送消息到 MCP Client", e), r2(
683
+ console.log("【Content Svr Transport】 发送消息到 MCP Client", e), me(
682
684
  "mcp-server-to-client",
683
685
  {
684
686
  sessionId: this.sessionId,
685
687
  mcpMessage: e
686
688
  },
687
689
  "content->side"
688
- ), "result" in e && e.result?.content && A(
690
+ ), "result" in e && e.result?.content && z(
689
691
  "update-page-app-message",
690
692
  { status: "ready", message: "" },
691
693
  "page->content"
@@ -697,7 +699,7 @@ class k0 {
697
699
  }
698
700
  /** 通知 Sidepanel 此 Server 已启动并准备接受连接 */
699
701
  async notifyRegistration(e) {
700
- this._isStarted && (this._lastRegistration = e, r2(
702
+ this._isStarted && (this._lastRegistration = e, me(
701
703
  "mcp-server-register",
702
704
  {
703
705
  sessionId: this.sessionId,
@@ -719,9 +721,9 @@ class k0 {
719
721
  }
720
722
  }
721
723
  }
722
- class Te {
723
- constructor(e, { size: t = 200, margin: s = 4, color: i = "#000", bgColor: n = "#fff" }) {
724
- this.value = e, this.size = t, this.margin = s, this.color = i, this.bgColor = n;
724
+ class t2 {
725
+ constructor(e, { size: t = 200, margin: s = 4, color: n = "#000", bgColor: i = "#fff" }) {
726
+ this.value = e, this.size = t, this.margin = s, this.color = n, this.bgColor = i;
725
727
  }
726
728
  get qrCodeOption() {
727
729
  return {
@@ -737,18 +739,18 @@ class Te {
737
739
  }
738
740
  /** 生成二维码的 Data URL(base64 图片) */
739
741
  async toDataURL() {
740
- return g2.toDataURL(this.value, this.qrCodeOption);
742
+ return Me.toDataURL(this.value, this.qrCodeOption);
741
743
  }
742
744
  /** 渲染二维码到指定的 canvas 元素 */
743
745
  async toCanvas(e) {
744
- return g2.toCanvas(e, this.value, this.qrCodeOption);
746
+ return Me.toCanvas(e, this.value, this.qrCodeOption);
745
747
  }
746
748
  /** 渲染二维码到指定的 img 元素 */
747
749
  async toImage(e) {
748
750
  e.src = await this.toDataURL();
749
751
  }
750
752
  }
751
- const Me = {
753
+ const r2 = {
752
754
  content: "",
753
755
  placement: "top",
754
756
  trigger: "hover",
@@ -757,10 +759,10 @@ const Me = {
757
759
  container: document.body,
758
760
  className: "tiny-remoter-native-tooltip"
759
761
  };
760
- class Re {
762
+ class s2 {
761
763
  constructor(e, t = {}) {
762
764
  if (this.tip = null, this.showTimer = 0, this.hideTimer = 0, this.clickOutside = null, this.el = typeof e == "string" ? document.querySelector(e) : e, !this.el) throw new Error("Tooltip: invalid element");
763
- this.opts = { ...Me, ...t }, this.bindEvents();
765
+ this.opts = { ...r2, ...t }, this.bindEvents();
764
766
  }
765
767
  /* 公开 API */
766
768
  open() {
@@ -806,9 +808,9 @@ class Re {
806
808
  this.applyStyle(this.calcStyle("top"));
807
809
  }
808
810
  calcStyle(e) {
809
- const t = this.el.getBoundingClientRect(), s = this.tip.getBoundingClientRect(), i = window.pageYOffset || document.documentElement.scrollTop, n = window.pageXOffset || document.documentElement.scrollLeft, a = 6, [h, c = "center"] = e.split("-");
810
- let l = 0, d = 0;
811
- return h === "top" ? l = t.top + i - s.height - a : h === "bottom" ? l = t.bottom + i + a : h === "left" ? d = t.left + n - s.width - a : h === "right" && (d = t.right + n + a), (h === "top" || h === "bottom") && (c === "start" ? d = t.left + n : c === "end" ? d = t.right + n - s.width : d = (t.left + t.right) / 2 + n - s.width / 2), (h === "left" || h === "right") && (c === "start" ? l = t.top + i : c === "end" ? l = t.bottom + i - s.height : l = (t.top + t.bottom) / 2 + i - s.height / 2), { top: Math.round(l), left: Math.round(d) };
811
+ const t = this.el.getBoundingClientRect(), s = this.tip.getBoundingClientRect(), n = window.pageYOffset || document.documentElement.scrollTop, i = window.pageXOffset || document.documentElement.scrollLeft, a = 6, [l, u = "center"] = e.split("-");
812
+ let c = 0, d = 0;
813
+ return l === "top" ? c = t.top + n - s.height - a : l === "bottom" ? c = t.bottom + n + a : l === "left" ? d = t.left + i - s.width - a : l === "right" && (d = t.right + i + a), (l === "top" || l === "bottom") && (u === "start" ? d = t.left + i : u === "end" ? d = t.right + i - s.width : d = (t.left + t.right) / 2 + i - s.width / 2), (l === "left" || l === "right") && (u === "start" ? c = t.top + n : u === "end" ? c = t.bottom + n - s.height : c = (t.top + t.bottom) / 2 + n - s.height / 2), { top: Math.round(c), left: Math.round(d) };
812
814
  }
813
815
  applyStyle({ top: e, left: t }) {
814
816
  Object.assign(this.tip.style, {
@@ -818,8 +820,8 @@ class Re {
818
820
  });
819
821
  }
820
822
  checkViewport({ top: e, left: t }) {
821
- const i = window.innerWidth, n = window.innerHeight, a = this.tip.getBoundingClientRect();
822
- return t >= 5 && e >= 5 && t + a.width <= i - 5 && e + a.height <= n - 5;
823
+ const n = window.innerWidth, i = window.innerHeight, a = this.tip.getBoundingClientRect();
824
+ return t >= 5 && e >= 5 && t + a.width <= n - 5 && e + a.height <= i - 5;
823
825
  }
824
826
  placementList(e) {
825
827
  const t = {
@@ -846,11 +848,11 @@ class Re {
846
848
  return !!this.tip?.parentNode;
847
849
  }
848
850
  }
849
- const w2 = "tiny-remoter-native-tooltip-style";
851
+ const Oe = "tiny-remoter-native-tooltip-style";
850
852
  (() => {
851
- if (document.getElementById(w2)) return;
853
+ if (document.getElementById(Oe)) return;
852
854
  const r = document.createElement("style");
853
- r.id = w2, r.textContent = `
855
+ r.id = Oe, r.textContent = `
854
856
  .tiny-remoter-native-tooltip {
855
857
  position: absolute;
856
858
  z-index: 9999;
@@ -899,20 +901,20 @@ const w2 = "tiny-remoter-native-tooltip-style";
899
901
  }
900
902
  `, document.head.appendChild(r);
901
903
  })();
902
- const Ee = "data:image/svg+xml,%3csvg%20viewBox='0%200%2040%2039.9692'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='40.000000'%20height='39.969238'%20fill='none'%20customFrame='url(%23clipPath_3)'%3e%3cdefs%3e%3cclipPath%20id='clipPath_3'%3e%3crect%20width='40.000000'%20height='39.969238'%20x='0.000000'%20y='0.000000'%20rx='12.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_4'%3e%3crect%20width='24.000000'%20height='24.000000'%20x='8.000000'%20y='7.984619'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_5'%3e%3crect%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='9.984619'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_6'%3e%3crect%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='9.984619'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_7'%3e%3crect%20width='21.666666'%20height='13.333333'%20x='20.000000'%20y='9.984619'%20rx='6.666667'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_8'%3e%3crect%20width='6.666667'%20height='6.666667'%20x='23.333496'%20y='9.984619'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3c/defs%3e%3crect%20id='2'%20width='40.000000'%20height='39.969238'%20x='0.000000'%20y='0.000000'%20rx='12.000000'%20fill='rgb(239,246,255)'%20/%3e%3cg%20id='物业'%20clip-path='url(%23clipPath_4)'%20customFrame='url(%23clipPath_4)'%3e%3crect%20id='物业'%20width='24.000000'%20height='24.000000'%20x='8.000000'%20y='7.984619'%20/%3e%3cg%20id='物业服务'%3e%3cg%20id='00公共/红点/图标+红点'%20customFrame='url(%23clipPath_5)'%3e%3crect%20id='00公共/红点/图标+红点'%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='9.984619'%20/%3e%3cg%20id='common_chats_line'%20customFrame='url(%23clipPath_6)'%3e%3crect%20id='common_chats_line'%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='9.984619'%20/%3e%3cpath%20id='形状'%20d='M28.3332%2019.9847C28.3332%2015.3823%2024.6022%2011.6514%2019.9998%2011.6514C15.3975%2011.6514%2011.6665%2015.3823%2011.6665%2019.9847C11.6665%2024.5871%2015.3975%2028.318%2019.9998%2028.318C21.0018%2028.318%2021.9624%2028.1412%2022.8522%2027.8171L26.581%2028.1578C26.7205%2028.1706%2026.8611%2028.1598%2026.9971%2028.1259C27.6669%2027.959%2028.0746%2027.2806%2027.9077%2026.6108L27.2716%2024.0578C27.9477%2022.8535%2028.3332%2021.4641%2028.3332%2019.9847ZM19.9998%2013.1514C16.2259%2013.1514%2013.1665%2016.2108%2013.1665%2019.9847C13.1665%2023.7586%2016.2259%2026.818%2019.9998%2026.818C20.8089%2026.818%2021.5967%2026.678%2022.3388%2026.4077C22.505%2026.3471%2022.6803%2026.3166%2022.8565%2026.3171L22.9887%2026.3233L26.3665%2026.6322L25.8161%2024.4205C25.7352%2024.0958%2025.7655%2023.7548%2025.8997%2023.4512L25.9636%2023.3236C26.5311%2022.3126%2026.8332%2021.1723%2026.8332%2019.9847C26.8332%2016.2108%2023.7738%2013.1514%2019.9998%2013.1514ZM23.1152%2021.2468C23.352%2020.9069%2023.2684%2020.4394%2022.9286%2020.2026C22.5887%2019.9659%2022.1212%2020.0494%2021.8845%2020.3893C21.2894%2021.2433%2020.4268%2021.7347%2019.5102%2021.7347C18.9513%2021.7347%2018.4132%2021.554%2017.9375%2021.2122C17.6011%2020.9705%2017.1325%2021.0472%2016.8908%2021.3836C16.6491%2021.7199%2016.7258%2022.1886%2017.0622%2022.4303C17.7879%2022.9518%2018.6305%2023.2347%2019.5102%2023.2347C20.9394%2023.2347%2022.2505%2022.4878%2023.1152%2021.2468Z'%20fill='rgb(65,142,255)'%20fill-rule='evenodd'%20/%3e%3c/g%3e%3cg%20id='00公共/3位数红点'%20opacity='0'%20customFrame='url(%23clipPath_7)'%3e%3crect%20id='00公共/3位数红点'%20width='21.666666'%20height='13.333333'%20x='20.000000'%20y='9.984619'%20rx='6.666667'%20opacity='0'%20fill='rgb(243,111,100)'%20/%3e%3cpath%20id='文本'%20d='M26.0421%2013.4421C26.4259%2013.4421%2026.7677%2013.5255%2027.0675%2013.6923C27.3672%2013.8591%2027.6005%2014.0931%2027.7673%2014.3942C27.9342%2014.694%2028.0176%2015.0351%2028.0176%2015.4176C28.0176%2015.7173%2027.9633%2015.994%2027.8548%2016.2476C27.7463%2016.4999%2027.5673%2016.8315%2027.3177%2017.2425L25.859%2019.6432L25.0167%2019.6432L26.276%2017.5924C26.3534%2017.4704%2026.4307%2017.3564%2026.508%2017.2507C26.3357%2017.3063%2026.1445%2017.3341%2025.9342%2017.3341C25.5721%2017.3341%2025.2493%2017.2479%2024.9658%2017.0757C24.6837%2016.9034%2024.4633%2016.6701%2024.3046%2016.3758C24.1459%2016.0815%2024.0666%2015.7566%2024.0666%2015.4013C24.0666%2015.0351%2024.1513%2014.7021%2024.3209%2014.4023C24.4904%2014.1012%2024.7264%2013.8659%2025.0289%2013.6964C25.3314%2013.5268%2025.6691%2013.4421%2026.0421%2013.4421ZM26.0421%2016.6505C26.4029%2016.6505%2026.6904%2016.5325%2026.9047%2016.2965C27.119%2016.0605%2027.2262%2015.7539%2027.2262%2015.3769C27.2262%2014.9985%2027.119%2014.694%2026.9047%2014.4634C26.6904%2014.2328%2026.4029%2014.1175%2026.0421%2014.1175C25.6867%2014.1175%2025.4019%2014.2342%2025.1876%2014.4674C24.9733%2014.7007%2024.8661%2015.0039%2024.8661%2015.3769C24.8661%2015.7539%2024.9719%2016.0605%2025.1835%2016.2965C25.3951%2016.5325%2025.6813%2016.6505%2026.0421%2016.6505ZM30.7921%2013.4421C31.1759%2013.4421%2031.5177%2013.5255%2031.8175%2013.6923C32.1172%2013.8591%2032.3505%2014.0931%2032.5173%2014.3942C32.6842%2014.694%2032.7676%2015.0351%2032.7676%2015.4176C32.7676%2015.7173%2032.7133%2015.994%2032.6048%2016.2476C32.4963%2016.4999%2032.3173%2016.8315%2032.0677%2017.2425L30.609%2019.6432L29.7667%2019.6432L31.026%2017.5924C31.1034%2017.4704%2031.1807%2017.3564%2031.258%2017.2507C31.0857%2017.3063%2030.8945%2017.3341%2030.6842%2017.3341C30.3221%2017.3341%2029.9993%2017.2479%2029.7158%2017.0757C29.4337%2016.9034%2029.2133%2016.6701%2029.0546%2016.3758C28.8959%2016.0815%2028.8166%2015.7566%2028.8166%2015.4013C28.8166%2015.0351%2028.9013%2014.7021%2029.0709%2014.4023C29.2404%2014.1012%2029.4764%2013.8659%2029.7789%2013.6964C30.0814%2013.5268%2030.4191%2013.4421%2030.7921%2013.4421ZM30.7921%2016.6505C31.1529%2016.6505%2031.4404%2016.5325%2031.6547%2016.2965C31.869%2016.0605%2031.9762%2015.7539%2031.9762%2015.3769C31.9762%2014.9985%2031.869%2014.694%2031.6547%2014.4634C31.4404%2014.2328%2031.1529%2014.1175%2030.7921%2014.1175C30.4367%2014.1175%2030.1519%2014.2342%2029.9376%2014.4674C29.7233%2014.7007%2029.6161%2015.0039%2029.6161%2015.3769C29.6161%2015.7539%2029.7219%2016.0605%2029.9335%2016.2965C30.1451%2016.5325%2030.4313%2016.6505%2030.7921%2016.6505ZM35.2674%2014.6851L35.9001%2014.6851L35.9001%2016.3188L37.5339%2016.3188L37.5339%2016.9516L35.9001%2016.9516L35.9001%2018.5853L35.2674%2018.5853L35.2674%2016.9516L33.6337%2016.9516L33.6337%2016.3188L35.2674%2016.3188L35.2674%2014.6851Z'%20fill='rgb(255,255,255)'%20fill-rule='nonzero'%20/%3e%3c/g%3e%3cg%20id='00公共/单红点'%20opacity='0'%20customFrame='url(%23clipPath_8)'%3e%3crect%20id='00公共/单红点'%20width='6.666667'%20height='6.666667'%20x='23.333496'%20y='9.984619'%20opacity='0'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20/%3e%3ccircle%20id='红点'%20cx='26.6668301'%20cy='13.3179522'%20r='3.33333325'%20fill='rgb(243,111,100)'%20/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e", Pe = "data:image/svg+xml,%3csvg%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='40.000000'%20height='40.000000'%20fill='none'%20customFrame='url(%23clipPath_12)'%3e%3cdefs%3e%3cclipPath%20id='clipPath_12'%3e%3crect%20width='40.000000'%20height='40.000000'%20x='0.000000'%20y='0.000000'%20rx='12.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_13'%3e%3crect%20width='24.000000'%20height='24.000000'%20x='8.000000'%20y='8.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_14'%3e%3crect%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='10.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3c/defs%3e%3crect%20id='4'%20width='40.000000'%20height='40.000000'%20x='0.000000'%20y='0.000000'%20rx='12.000000'%20fill='rgb(234,255,244)'%20/%3e%3cg%20id='我的信息'%20clip-path='url(%23clipPath_13)'%20customFrame='url(%23clipPath_13)'%3e%3crect%20id='我的信息'%20width='24.000000'%20height='24.000000'%20x='8.000000'%20y='8.000000'%20/%3e%3cg%20id='组合%208'%20customFrame='url(%23clipPath_14)'%3e%3crect%20id='组合%208'%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='10.000000'%20/%3e%3cpath%20id='合并'%20d='M28.4994%2012.3142C28.4994%2012.2578%2028.4937%2012.2018%2028.4825%2012.1465C28.4713%2012.0911%2028.4547%2012.0373%2028.4327%2011.9851C28.4107%2011.933%2028.3836%2011.8835%2028.3516%2011.8365C28.3197%2011.7896%2028.2834%2011.7461%2028.2427%2011.7062C28.202%2011.6663%2028.1579%2011.6307%2028.1101%2011.5993C28.0622%2011.568%2028.0117%2011.5415%2027.9585%2011.5199C27.9054%2011.4983%2027.8506%2011.4819%2027.7942%2011.4709C27.7378%2011.4599%2027.6806%2011.4544%2027.6231%2011.4544L24.1832%2011.5199L24.1832%2010L29.0796%2010C29.1472%2010%2029.2143%2010.0065%2029.2806%2010.0194C29.347%2010.0324%2029.4114%2010.0516%2029.4739%2010.077C29.5364%2010.1024%2029.5961%2010.1336%2029.6523%2010.1705C29.7086%2010.2074%2029.7605%2010.2493%2029.8084%2010.2963C29.8562%2010.3433%2029.8991%2010.3944%2029.9367%2010.4496C29.9743%2010.5048%2030.006%2010.5631%2030.0319%2010.6244C30.0578%2010.6858%2030.0773%2010.7491%2030.0905%2010.8142C30.1037%2010.8794%2030.1104%2010.9451%2030.1104%2011.0115L30.1832%2014.4522L28.4992%2014.5L28.4994%2012.3142ZM11.6995%2012.3143C11.6995%2012.2579%2011.7051%2012.2019%2011.7163%2012.1466C11.7275%2012.0912%2011.7441%2012.0374%2011.7661%2011.9852C11.7882%2011.9331%2011.8152%2011.8836%2011.8472%2011.8366C11.8791%2011.7897%2011.9155%2011.7462%2011.9562%2011.7063C11.9968%2011.6664%2012.0409%2011.6308%2012.0888%2011.5994C12.1366%2011.5681%2012.1871%2011.5416%2012.2403%2011.52C12.2934%2011.4984%2012.3482%2011.482%2012.4046%2011.471C12.4611%2011.46%2012.5182%2011.4545%2012.5758%2011.4545L16.0157%2011.52L16.0157%2010.0001L11.1193%2010.0001C11.0516%2010.0001%2010.9846%2010.0066%2010.9182%2010.0196C10.8518%2010.0325%2010.7874%2010.0517%2010.7249%2010.0771C10.6624%2010.1025%2010.6028%2010.1337%2010.5465%2010.1706C10.4902%2010.2075%2010.4383%2010.2494%2010.3904%2010.2964C10.3426%2010.3434%2010.2997%2010.3945%2010.2621%2010.4497C10.2245%2010.5049%2010.1929%2010.5632%2010.167%2010.6245C10.1411%2010.6859%2010.1215%2010.7492%2010.1083%2010.8143C10.0951%2010.8795%2010.0885%2010.9452%2010.0884%2011.0116L10.0157%2014.4523L11.6997%2014.5L11.6995%2012.3143ZM25.3135%2021.8051L25.3135%2022.8167C25.7656%2022.8929%2026.2209%2022.9249%2026.6792%2022.9127C28.3381%2022.9127%2029.1675%2022.326%2029.1675%2021.1527C29.1733%2020.9869%2029.151%2020.825%2029.1006%2020.667C29.0503%2020.509%2028.9747%2020.3641%2028.8742%2020.2322C28.767%2020.1025%2028.6403%2019.9963%2028.4938%2019.9134C28.3474%2019.8306%2028.191%2019.7767%2028.0246%2019.7517L28.0246%2019.7011C28.0971%2019.6839%2028.1676%2019.6606%2028.236%2019.6311C28.3044%2019.6016%2028.3698%2019.5665%2028.4321%2019.5257C28.4944%2019.4848%2028.5526%2019.4389%2028.6069%2019.3879C28.6613%2019.3369%2028.7109%2019.2816%2028.7556%2019.222C28.8003%2019.1624%2028.8394%2019.0994%2028.8732%2019.033C28.9069%2018.9665%2028.9346%2018.8977%2028.9564%2018.8265C28.9782%2018.7552%2028.9937%2018.6826%2029.0028%2018.6086C29.0119%2018.5347%2029.0145%2018.4605%2029.0107%2018.3861C29.0217%2018.2675%2029.0176%2018.1495%2028.9984%2018.0319C28.9791%2017.9144%2028.9454%2017.8012%2028.8971%2017.6923C28.8489%2017.5834%2028.7875%2017.4823%2028.7134%2017.3891C28.6393%2017.2959%2028.5547%2017.2135%2028.4595%2017.1419C28.219%2017.0003%2027.963%2016.8972%2027.6915%2016.8326C27.4199%2016.7679%2027.1449%2016.7446%2026.8664%2016.7626C26.6258%2016.7621%2026.3864%2016.7791%2026.1482%2016.8132C25.9479%2016.8386%2025.7504%2016.8791%2025.5563%2016.9346L25.5563%2017.8854C25.743%2017.8264%2025.9337%2017.7842%2026.128%2017.759C26.3276%2017.73%2026.5282%2017.7148%2026.7298%2017.7134C27.0252%2017.6949%2027.3049%2017.7523%2027.5692%2017.8854C27.6168%2017.9161%2027.6595%2017.9525%2027.6972%2017.9947C27.7348%2018.037%2027.766%2018.0835%2027.791%2018.1343C27.816%2018.1851%2027.8337%2018.2383%2027.8441%2018.294C27.8545%2018.3496%2027.8573%2018.4056%2027.8525%2018.462C27.8566%2018.5278%2027.8514%2018.5927%2027.8367%2018.657C27.822%2018.7212%2027.7986%2018.7821%2027.7663%2018.8395C27.734%2018.897%2027.694%2018.9487%2027.6468%2018.9946C27.5995%2019.0405%2027.5468%2019.0787%2027.4885%2019.1093C27.1544%2019.2631%2026.8037%2019.3306%2026.4364%2019.3117L25.9862%2019.3117L25.9862%2020.1917L26.4466%2020.1917C26.8409%2020.1669%2027.2202%2020.2309%2027.5845%2020.3839C27.6459%2020.4167%2027.7011%2020.4576%2027.7505%2020.5066C27.7999%2020.5556%2027.8412%2020.6107%2027.8745%2020.6718C27.9077%2020.733%2027.9315%2020.7976%2027.9458%2020.8656C27.9602%2020.9337%2027.9644%2021.0024%2027.9587%2021.0717C27.9648%2021.1402%2027.9612%2021.2083%2027.9478%2021.2757C27.9344%2021.3432%2027.912%2021.4074%2027.8801%2021.4683C27.8483%2021.5293%2027.8086%2021.5846%2027.7609%2021.6341C27.7132%2021.6837%2027.6593%2021.7254%2027.5996%2021.7596C27.2884%2021.9045%2026.9613%2021.9685%2026.6184%2021.9518C26.1786%2021.9465%2025.7436%2021.8977%2025.3135%2021.8051ZM21.3382%2018.6238C21.3445%2018.5593%2021.343%2018.495%2021.3335%2018.4308C21.3241%2018.3667%2021.3069%2018.3046%2021.2822%2018.2447C21.2575%2018.1847%2021.226%2018.1287%2021.1876%2018.0765C21.1492%2018.0242%2021.1049%2017.9774%2021.055%2017.936C20.9359%2017.8608%2020.808%2017.806%2020.6714%2017.7714C20.5349%2017.7368%2020.3964%2017.7242%2020.2558%2017.7337C19.8009%2017.7395%2019.356%2017.8087%2018.9208%2017.9411L18.9208%2016.9598C19.4252%2016.8181%2019.9393%2016.7524%2020.4633%2016.7626C20.7322%2016.7484%2020.9964%2016.7773%2021.256%2016.8491C21.5156%2016.9209%2021.7571%2017.032%2021.9806%2017.1824C22.0729%2017.2601%2022.1548%2017.3474%2022.2263%2017.4446C22.2978%2017.5418%2022.3567%2017.646%2022.4034%2017.7573C22.45%2017.8686%2022.483%2017.9838%2022.5021%2018.1029C22.5213%2018.222%2022.5261%2018.3417%2022.5167%2018.462C22.5245%2018.7882%2022.4655%2019.1017%2022.3396%2019.4027C22.1879%2019.7384%2021.984%2020.0384%2021.7277%2020.3029C21.3021%2020.7337%2020.8502%2021.135%2020.3721%2021.5067L19.9928%2021.8051L19.9928%2021.8759L22.6938%2021.8759L22.6938%2022.8419L18.5464%2022.8419L18.5464%2021.7697C19.2882%2021.1796%2019.8579%2020.6975%2020.2558%2020.3232C20.574%2020.0432%2020.8523%2019.728%2021.0905%2019.3774C21.1675%2019.2665%2021.2269%2019.1469%2021.2691%2019.0187C21.3113%2018.8904%2021.3344%2018.7588%2021.3382%2018.6238ZM12.3102%2017.2127L12.3102%2018.1939L13.7769%2017.9107L13.7769%2022.8419L14.9605%2022.8419L14.9605%2016.8486L14.0957%2016.8486L12.3102%2017.2127ZM28.5524%2028.0475C28.5524%2028.104%2028.5467%2028.1599%2028.5353%2028.2152C28.5239%2028.2706%2028.5071%2028.3244%2028.4849%2028.3766C28.4626%2028.4287%2028.4352%2028.4782%2028.4028%2028.5252C28.3705%2028.5721%2028.3337%2028.6156%2028.2925%2028.6555C28.2513%2028.6954%2028.2067%2028.731%2028.1583%2028.7624C28.1098%2028.7937%2028.0587%2028.8202%2028.0049%2028.8418C27.9511%2028.8634%2027.8957%2028.8798%2027.8385%2028.8908C27.7814%2028.9018%2027.7235%2028.9073%2027.6653%2028.9073L24.1832%2028.8418L24.1832%2030.3617L29.1397%2030.3617C29.2082%2030.3617%2029.276%2030.3552%2029.3432%2030.3423C29.4104%2030.3293%2029.4756%2030.3101%2029.5389%2030.2847C29.6022%2030.2593%2029.6625%2030.2281%2029.7195%2030.1912C29.7765%2030.1543%2029.829%2030.1124%2029.8774%2030.0654C29.9259%2030.0184%2029.9693%2029.9673%2030.0074%2029.9121C30.0454%2029.8569%2030.0774%2029.7986%2030.1037%2029.7373C30.1299%2029.6759%2030.1497%2029.6126%2030.163%2029.5475C30.1764%2029.4823%2030.1831%2029.4166%2030.1832%2029.3502L30.1832%2026.0478L28.4785%2026L28.5524%2028.0475ZM11.6308%2028.0099C11.6308%2028.0664%2011.6365%2028.1223%2011.6479%2028.1777C11.6592%2028.233%2011.676%2028.2868%2011.6983%2028.339C11.7206%2028.3911%2011.748%2028.4406%2011.7803%2028.4876C11.8127%2028.5345%2011.8495%2028.578%2011.8906%2028.6179C11.9318%2028.6578%2011.9765%2028.6934%2012.0249%2028.7248C12.0733%2028.7562%2012.1244%2028.7826%2012.1783%2028.8042C12.2321%2028.8259%2012.2875%2028.8422%2012.3446%2028.8532C12.4017%2028.8642%2012.4596%2028.8697%2012.5178%2028.8698L16%2028.8042L16%2030.3241L11.0435%2030.3241C10.975%2030.3241%2010.9071%2030.3176%2010.8399%2030.3047C10.7727%2030.2917%2010.7076%2030.2725%2010.6443%2030.2471C10.581%2030.2217%2010.5206%2030.1906%2010.4637%2030.1537C10.4067%2030.1168%2010.3542%2030.0748%2010.3057%2030.0278C10.2573%2029.9809%2010.2138%2029.9298%2010.1758%2029.8745C10.1377%2029.8193%2010.1057%2029.7611%2010.0795%2029.6997C10.0533%2029.6383%2010.0335%2029.575%2010.0201%2029.5099C10.0068%2029.4448%2010%2029.379%2010%2029.3126L10%2026.0478L11.7047%2026L11.6308%2028.0099Z'%20fill='rgb(14,191,241)'%20fill-rule='evenodd'%20/%3e%3c/g%3e%3c/g%3e%3c/svg%3e", ke = "data:image/svg+xml,%3csvg%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='40.000000'%20height='40.000000'%20fill='none'%20customFrame='url(%23clipPath_9)'%3e%3cdefs%3e%3cclipPath%20id='clipPath_9'%3e%3crect%20width='40.000000'%20height='40.000000'%20x='0.000000'%20y='0.000000'%20rx='12.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_10'%3e%3crect%20width='24.000000'%20height='24.000000'%20x='8.000000'%20y='8.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_11'%3e%3crect%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='10.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3c/defs%3e%3crect%20id='3'%20width='40.000000'%20height='40.000000'%20x='0.000000'%20y='0.000000'%20rx='12.000000'%20fill='rgb(236,250,254)'%20/%3e%3cg%20id='画板%202310'%20customFrame='url(%23clipPath_10)'%3e%3crect%20id='画板%202310'%20width='24.000000'%20height='24.000000'%20x='8.000000'%20y='8.000000'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20/%3e%3cg%20id='人事服务'%3e%3cg%20id='ic_public_link'%20clip-path='url(%23clipPath_11)'%20customFrame='url(%23clipPath_11)'%3e%3crect%20id='ic_public_link'%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='10.000000'%20/%3e%3cpath%20id='path1'%20d='M9.9999%2019.9917C9.9999%2018.4292%209.99573%2016.8667%209.9999%2015.3042C9.99573%2014.5459%2010.0916%2013.7917%2010.2749%2013.0626C10.6874%2011.5126%2011.6957%2010.5917%2013.2457%2010.2334C14.0207%2010.0667%2014.8166%209.98756%2015.6082%2010.0001C18.6041%2010.0001%2021.5999%2010.0001%2024.5999%2010.0001C25.3541%209.99589%2026.1082%2010.0792%2026.8457%2010.2584C28.4416%2010.6459%2029.3999%2011.6584%2029.7624%2013.2501C29.9291%2014.0001%2030.0041%2014.7667%2029.9957%2015.5376C29.9957%2018.5667%2029.9957%2021.5959%2029.9957%2024.6209C29.9999%2025.3709%2029.9166%2026.1209%2029.7416%2026.8459C29.3499%2028.4459%2028.3332%2029.3959%2026.7457%2029.7626C25.9666%2029.9292%2025.1749%2030.0084%2024.3791%2029.9959C21.3957%2029.9959%2018.4124%2029.9959%2015.4291%2029.9959C14.6666%2030.0042%2013.9082%2029.9167%2013.1666%2029.7417C11.5624%2029.3542%2010.5999%2028.3376%2010.2374%2026.7376C10.0499%2025.9251%209.9999%2025.1126%209.9999%2024.2917C9.9999%2022.8584%209.9999%2021.4251%209.9999%2019.9917Z'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20fill-rule='evenodd'%20/%3e%3ccircle%20id='path2'%20cx='20'%20cy='20'%20r='10'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20/%3e%3cpath%20id='path3'%20d='M25.0333%2021.8666L26.9%2020C28.8083%2018.0916%2028.8083%2015%2026.9%2013.0958C24.9958%2011.1875%2021.9041%2011.1875%2020%2013.0958L18.1291%2014.9625M21.8666%2025.0333L20%2026.9C18.0916%2028.8083%2015%2028.8083%2013.0958%2026.9C11.1875%2024.9958%2011.1875%2021.9041%2013.0958%2020L14.9625%2018.1291'%20fill-rule='nonzero'%20stroke='rgb(14,191,241)'%20stroke-linecap='round'%20stroke-width='1.25'%20/%3e%3cpath%20id='pah4'%20d='M18.125%2021.875L21.875%2018.125'%20stroke='rgb(14,191,241)'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.25'%20/%3e%3cpath%20id='path5'%20d='M25.8207%2019.2626L24.0457%2021.0376C23.7998%2021.2834%2023.6748%2021.5292%2023.6748%2021.7751C23.6748%2022.0209%2023.7998%2022.2667%2024.0457%2022.5126C24.1498%2022.6167%2024.2665%2022.6959%2024.3915%2022.7459C24.5123%2022.7917%2024.6415%2022.8167%2024.779%2022.8167C24.9207%2022.8167%2025.0498%2022.7917%2025.1665%2022.7459C25.2957%2022.6959%2025.4123%2022.6167%2025.5165%2022.5126L27.2915%2020.7334C27.8165%2020.2126%2028.2165%2019.6334%2028.4957%2019.0001C28.5082%2018.9667%2028.5248%2018.9334%2028.5373%2018.8959C28.554%2018.8626%2028.5665%2018.8292%2028.579%2018.7917C28.8332%2018.1501%2028.9582%2017.4584%2028.9582%2016.7209C28.9582%2015.9792%2028.8332%2015.2876%2028.579%2014.6459C28.5665%2014.6084%2028.554%2014.5751%2028.5373%2014.5417C28.5248%2014.5042%2028.5082%2014.4709%2028.4957%2014.4376C28.2165%2013.8042%2027.8165%2013.2292%2027.2915%2012.7042C26.7707%2012.1792%2026.1915%2011.7792%2025.5582%2011.5001C25.5248%2011.4876%2025.4915%2011.4709%2025.454%2011.4584C25.4207%2011.4417%2025.3873%2011.4292%2025.354%2011.4167C24.7082%2011.1667%2024.0165%2011.0417%2023.279%2011.0417C22.5373%2011.0417%2021.8457%2011.1667%2021.204%2011.4167C21.1665%2011.4292%2021.1332%2011.4417%2021.0998%2011.4584C21.0623%2011.4709%2021.029%2011.4876%2020.9957%2011.5001C20.3623%2011.7792%2019.7832%2012.1792%2019.2623%2012.7042L17.4832%2014.4792C17.379%2014.5834%2017.2998%2014.7001%2017.2498%2014.8292C17.204%2014.9501%2017.179%2015.0751%2017.179%2015.2167C17.179%2015.3542%2017.204%2015.4834%2017.2498%2015.6042C17.2998%2015.7292%2017.379%2015.8459%2017.4832%2015.9542C17.5915%2016.0584%2017.7082%2016.1376%2017.8332%2016.1876C17.954%2016.2334%2018.0832%2016.2584%2018.2207%2016.2584C18.3623%2016.2584%2018.4915%2016.2334%2018.6082%2016.1876C18.7373%2016.1376%2018.854%2016.0584%2018.9582%2015.9542L20.7332%2014.1751C21.0873%2013.8209%2021.4748%2013.5584%2021.8957%2013.3834C22.3165%2013.2084%2022.779%2013.1251%2023.279%2013.1251C23.7748%2013.1251%2024.2373%2013.2084%2024.6582%2013.3834C25.079%2013.5584%2025.4665%2013.8209%2025.8207%2014.1751C26.1748%2014.5292%2026.4373%2014.9167%2026.6123%2015.3376C26.7873%2015.7584%2026.8748%2016.2167%2026.8748%2016.7209C26.8748%2017.2209%2026.7873%2017.6792%2026.6123%2018.1001C26.4373%2018.5209%2026.1748%2018.9084%2025.8207%2019.2626ZM13.3832%2021.8959C13.5582%2021.4751%2013.8207%2021.0876%2014.1748%2020.7334L15.954%2018.9584C16.0582%2018.8542%2016.1373%2018.7376%2016.1873%2018.6084C16.2332%2018.4876%2016.2582%2018.3626%2016.2582%2018.2209C16.2582%2018.0834%2016.2332%2017.9542%2016.1873%2017.8334C16.1373%2017.7084%2016.0582%2017.5917%2015.954%2017.4834C15.7082%2017.2417%2015.4623%2017.1167%2015.2165%2017.1167C14.9707%2017.1167%2014.7248%2017.2417%2014.479%2017.4834L12.704%2019.2626C12.179%2019.7876%2011.779%2020.3626%2011.4998%2020.9959C11.4873%2021.0292%2011.4707%2021.0626%2011.4582%2021.1001C11.4415%2021.1334%2011.429%2021.1667%2011.4165%2021.2042C11.1665%2021.8459%2011.0415%2022.5376%2011.0415%2023.2792C11.0415%2024.0167%2011.1665%2024.7084%2011.4165%2025.3542C11.429%2025.3876%2011.4415%2025.4209%2011.4582%2025.4584C11.4707%2025.4917%2011.4873%2025.5251%2011.4998%2025.5584C11.779%2026.1917%2012.179%2026.7709%2012.704%2027.2917C13.2248%2027.8167%2013.804%2028.2167%2014.4373%2028.4959C14.4707%2028.5084%2014.504%2028.5251%2014.5415%2028.5376C14.5748%2028.5542%2014.6082%2028.5667%2014.6457%2028.5792C15.2873%2028.8292%2015.979%2028.9584%2016.7207%2028.9584C17.4582%2028.9584%2018.1498%2028.8292%2018.7915%2028.5792C18.829%2028.5667%2018.8623%2028.5542%2018.8957%2028.5376C18.9332%2028.5251%2018.9665%2028.5084%2018.9998%2028.4959C19.6332%2028.2167%2020.2123%2027.8167%2020.7332%2027.2917L22.5123%2025.5167C22.6165%2025.4126%2022.6957%2025.2959%2022.7457%2025.1667C22.7915%2025.0459%2022.8165%2024.9209%2022.8165%2024.7792C22.8165%2024.6417%2022.7915%2024.5126%2022.7457%2024.3917C22.6957%2024.2667%2022.6165%2024.1501%2022.5123%2024.0417C22.2665%2023.8001%2022.0207%2023.6751%2021.7748%2023.6751C21.529%2023.6751%2021.2832%2023.8001%2021.0373%2024.0417L19.2623%2025.8209C18.9082%2026.1751%2018.5207%2026.4376%2018.0998%2026.6126C17.679%2026.7876%2017.2165%2026.8751%2016.7207%2026.8751C16.2207%2026.8751%2015.7582%2026.7876%2015.3373%2026.6126C14.9165%2026.4376%2014.529%2026.1751%2014.1748%2025.8209C13.8207%2025.4667%2013.5582%2025.0792%2013.3832%2024.6584C13.2082%2024.2376%2013.1248%2023.7792%2013.1248%2023.2792C13.1248%2022.7751%2013.2082%2022.3167%2013.3832%2021.8959Z'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20fill-rule='evenodd'%20/%3e%3cpath%20id='path6'%20d='M21.8127%2016.7458C21.746%2016.7874%2021.6877%2016.8374%2021.6293%2016.8916L16.8918%2021.6291C16.8377%2021.6874%2016.7877%2021.7499%2016.746%2021.8124C16.7127%2021.8624%2016.6877%2021.9166%2016.6627%2021.9749C16.6377%2022.0374%2016.6168%2022.1041%2016.6043%2022.1708C16.5918%2022.2333%2016.5835%2022.2999%2016.5835%2022.3666C16.5835%2022.4333%2016.5918%2022.4999%2016.6043%2022.5666C16.6168%2022.6333%2016.6377%2022.6999%2016.6627%2022.7624C16.6877%2022.8166%2016.7127%2022.8708%2016.746%2022.9208C16.7877%2022.9874%2016.8377%2023.0499%2016.8918%2023.1041C16.946%2023.1583%2017.0085%2023.2083%2017.0752%2023.2499C17.1252%2023.2833%2017.1793%2023.3083%2017.2335%2023.3333C17.3002%2023.3583%2017.3627%2023.3791%2017.4293%2023.3916C17.496%2023.4041%2017.5627%2023.4124%2017.6293%2023.4124C17.696%2023.4124%2017.7627%2023.4041%2017.8252%2023.3916C17.8918%2023.3791%2017.9585%2023.3583%2018.021%2023.3333C18.0793%2023.3083%2018.1335%2023.2833%2018.1835%2023.2499C18.246%2023.2083%2018.3085%2023.1583%2018.3668%2023.1041L23.1043%2018.3666C23.1585%2018.3083%2023.2085%2018.2499%2023.2502%2018.1833C23.2835%2018.1333%2023.3085%2018.0791%2023.3335%2018.0208C23.3585%2017.9583%2023.3793%2017.8916%2023.3918%2017.8249C23.4043%2017.7624%2023.4127%2017.6958%2023.4127%2017.6291C23.4127%2017.5624%2023.4043%2017.4958%2023.3918%2017.4291C23.3793%2017.3624%2023.3585%2017.2999%2023.3335%2017.2333C23.3085%2017.1791%2023.2835%2017.1249%2023.2502%2017.0749C23.2085%2017.0083%2023.1585%2016.9458%2023.1043%2016.8916C23.046%2016.8374%2022.9877%2016.7874%2022.921%2016.7458C22.871%2016.7124%2022.8168%2016.6874%2022.7627%2016.6624C22.696%2016.6374%2022.6335%2016.6166%2022.5668%2016.6041C22.5002%2016.5916%2022.4335%2016.5833%2022.3668%2016.5833C22.3002%2016.5833%2022.2335%2016.5916%2022.171%2016.6041C22.1043%2016.6166%2022.0377%2016.6374%2021.9752%2016.6624C21.9168%2016.6874%2021.8627%2016.7124%2021.8127%2016.7458Z'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20fill-rule='evenodd'%20/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e", Ie = "data:image/svg+xml,%3csvg%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='40.000000'%20height='40.000000'%20fill='none'%20customFrame='url(%23clipPath_0)'%3e%3cdefs%3e%3cclipPath%20id='clipPath_0'%3e%3crect%20width='40.000000'%20height='40.000000'%20x='0.000000'%20y='0.000000'%20rx='12.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_1'%3e%3crect%20width='24.000000'%20height='24.000000'%20x='8.000000'%20y='8.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_2'%3e%3crect%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='10.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3c/defs%3e%3crect%20id='1'%20width='40.000000'%20height='40.000000'%20x='0.000000'%20y='0.000000'%20rx='12.000000'%20fill='rgb(236,250,254)'%20/%3e%3cg%20id='车辆'%20clip-path='url(%23clipPath_1)'%20customFrame='url(%23clipPath_1)'%3e%3crect%20id='车辆'%20width='24.000000'%20height='24.000000'%20x='8.000000'%20y='8.000000'%20/%3e%3cg%20id='编组'%3e%3cg%20id='ic_public_qrcode'%20clip-path='url(%23clipPath_2)'%20customFrame='url(%23clipPath_2)'%3e%3crect%20id='ic_public_qrcode'%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='10.000000'%20/%3e%3cg%20id='ic_public_qrcode_1_1'%3e%3cpath%20id='ic_public_qrcode_2_0'%20d='M10.6273%2019.9924C10.6273%2018.5277%2010.6222%2017.0631%2010.6273%2015.5985C10.6243%2014.8898%2010.7114%2014.1836%2010.8865%2013.4968C11.2702%2012.0432%2012.2171%2011.1805%2013.6693%2010.8458C14.3974%2010.6885%2015.1411%2010.6148%2015.886%2010.6261C18.6946%2010.6261%2021.5035%2010.6261%2024.3127%2010.6261C25.0221%2010.6217%2025.7295%2010.7029%2026.4195%2010.8678C27.9156%2011.2339%2028.8134%2012.1816%2029.1554%2013.6725C29.3092%2014.3772%2029.3826%2015.097%2029.3744%2015.8182C29.3744%2018.6571%2029.3744%2021.4963%2029.3744%2024.3357C29.3782%2025.0383%2029.2973%2025.7388%2029.1334%2026.422C28.7673%2027.9189%2027.8153%2028.8123%2026.3243%2029.1543C25.5961%2029.311%2024.8524%2029.3847%2024.1076%2029.374C21.3107%2029.374%2018.514%2029.374%2015.7176%2029.374C15.0027%2029.3798%2014.2897%2029.2999%2013.5939%2029.136C12.0912%2028.7698%2011.189%2027.8178%2010.8477%2026.3195C10.6734%2025.5579%2010.6273%2024.7941%2010.6273%2024.0237C10.6273%2022.6802%2010.6273%2021.3364%2010.6273%2019.9924Z'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20fill-rule='nonzero'%20/%3e%3cpath%20id='ic_public_qrcode_2_0'%20d='M10.6273%2015.5985C10.6243%2014.8898%2010.7114%2014.1836%2010.8865%2013.4968C11.2702%2012.0432%2012.2171%2011.1805%2013.6693%2010.8458C14.3974%2010.6885%2015.1411%2010.6148%2015.886%2010.6261C18.6946%2010.6261%2021.5035%2010.6261%2024.3127%2010.6261C25.0221%2010.6217%2025.7295%2010.7029%2026.4195%2010.8678C27.9156%2011.2339%2028.8134%2012.1816%2029.1554%2013.6725C29.3092%2014.3772%2029.3826%2015.097%2029.3744%2015.8182C29.3744%2018.6571%2029.3744%2021.4963%2029.3744%2024.3357C29.3782%2025.0383%2029.2973%2025.7388%2029.1334%2026.422C28.7673%2027.9189%2027.8153%2028.8123%2026.3243%2029.1543C25.5961%2029.311%2024.8524%2029.3847%2024.1076%2029.374C21.3107%2029.374%2018.514%2029.374%2015.7176%2029.374C15.0027%2029.3798%2014.2897%2029.2999%2013.5939%2029.136C12.0912%2028.7698%2011.189%2027.8178%2010.8477%2026.3195C10.6734%2025.5579%2010.6273%2024.7941%2010.6273%2024.0237C10.6273%2022.6802%2010.6273%2021.3364%2010.6273%2019.9924C10.6273%2018.5277%2010.6222%2017.0631%2010.6273%2015.5985Z'%20fill-rule='nonzero'%20stroke='rgb(255,255,255)'%20stroke-opacity='0'%20stroke-width='1.25'%20/%3e%3cpath%20id='ic_public_qrcode_2_1'%20d='M10.6273%2015.5985C10.6243%2014.8898%2010.7114%2014.1836%2010.8865%2013.4968C11.2702%2012.0432%2012.2171%2011.1805%2013.6693%2010.8458C14.3974%2010.6885%2015.1411%2010.6148%2015.886%2010.6261C18.6946%2010.6261%2021.5035%2010.6261%2024.3127%2010.6261C25.0221%2010.6217%2025.7295%2010.7029%2026.4195%2010.8678C27.9156%2011.2339%2028.8134%2012.1816%2029.1554%2013.6725C29.3092%2014.3772%2029.3826%2015.097%2029.3744%2015.8182C29.3744%2018.6571%2029.3744%2021.4963%2029.3744%2024.3357C29.3782%2025.0383%2029.2973%2025.7388%2029.1334%2026.422C28.7673%2027.9189%2027.8153%2028.8123%2026.3243%2029.1543C25.5961%2029.311%2024.8524%2029.3847%2024.1076%2029.374C21.3107%2029.374%2018.514%2029.374%2015.7176%2029.374C15.0027%2029.3798%2014.2897%2029.2999%2013.5939%2029.136C12.0912%2028.7698%2011.189%2027.8178%2010.8477%2026.3195C10.6734%2025.5579%2010.6273%2024.7941%2010.6273%2024.0237C10.6273%2022.6802%2010.6273%2021.3364%2010.6273%2019.9924C10.6273%2018.5277%2010.6222%2017.0631%2010.6273%2015.5985Z'%20opacity='0.200000003'%20fill-rule='nonzero'%20stroke='rgb(255,255,255)'%20stroke-opacity='0'%20stroke-width='1.25'%20/%3e%3ccircle%20id='ic_public_qrcode_2_2'%20cx='20'%20cy='20'%20r='10'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20/%3e%3cpath%20id='ic_public_qrcode_2_3'%20d='M17.5%2011.25C17.9602%2011.25%2018.3333%2011.6231%2018.3333%2012.0833L18.3333%2017.5C18.3333%2017.9602%2017.9602%2018.3333%2017.5%2018.3333L12.0833%2018.3333C11.6231%2018.3333%2011.25%2017.9602%2011.25%2017.5L11.25%2012.0833C11.25%2011.6231%2011.6231%2011.25%2012.0833%2011.25L17.5%2011.25ZM17.5%2021.6667C17.9602%2021.6667%2018.3333%2022.0398%2018.3333%2022.5L18.3333%2027.9167C18.3333%2028.3769%2017.9602%2028.75%2017.5%2028.75L12.0833%2028.75C11.6231%2028.75%2011.25%2028.3769%2011.25%2027.9167L11.25%2022.5C11.25%2022.0398%2011.6231%2021.6667%2012.0833%2021.6667L17.5%2021.6667ZM27.9167%2011.25C28.3769%2011.25%2028.75%2011.6231%2028.75%2012.0833L28.75%2017.5C28.75%2017.9602%2028.3769%2018.3333%2027.9167%2018.3333L22.5%2018.3333C22.0398%2018.3333%2021.6667%2017.9602%2021.6667%2017.5L21.6667%2012.0833C21.6667%2011.6231%2022.0398%2011.25%2022.5%2011.25L27.9167%2011.25Z'%20fill-rule='evenodd'%20stroke='rgb(14,191,241)'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.25'%20/%3e%3cpath%20id='ic_public_qrcode_2_4'%20d='M17.5002%2010.8333C18.1905%2010.8333%2018.7502%2011.3929%2018.7502%2012.0833L18.7502%2017.4999C18.7502%2018.1903%2018.1905%2018.7499%2017.5002%2018.7499L12.0835%2018.7499C11.3931%2018.7499%2010.8335%2018.1903%2010.8335%2017.4999L10.8335%2012.0833C10.8335%2011.3929%2011.3931%2010.8333%2012.0835%2010.8333L17.5002%2010.8333ZM17.5002%2011.6666L12.0835%2011.6666C11.8534%2011.6666%2011.6668%2011.8531%2011.6668%2012.0833L11.6668%2017.4999C11.6668%2017.73%2011.8534%2017.9166%2012.0835%2017.9166L17.5002%2017.9166C17.7303%2017.9166%2017.9168%2017.73%2017.9168%2017.4999L17.9168%2012.0833C17.9168%2011.8531%2017.7303%2011.6666%2017.5002%2011.6666ZM17.5002%2021.2499C18.1905%2021.2499%2018.7502%2021.8096%2018.7502%2022.4999L18.7502%2027.9166C18.7502%2028.6069%2018.1905%2029.1666%2017.5002%2029.1666L12.0835%2029.1666C11.3931%2029.1666%2010.8335%2028.6069%2010.8335%2027.9166L10.8335%2022.4999C10.8335%2021.8096%2011.3931%2021.2499%2012.0835%2021.2499L17.5002%2021.2499ZM17.5002%2022.0833L12.0835%2022.0833C11.8534%2022.0833%2011.6668%2022.2698%2011.6668%2022.4999L11.6668%2027.9166C11.6668%2028.1467%2011.8534%2028.3333%2012.0835%2028.3333L17.5002%2028.3333C17.7303%2028.3333%2017.9168%2028.1467%2017.9168%2027.9166L17.9168%2022.4999C17.9168%2022.2698%2017.7303%2022.0833%2017.5002%2022.0833ZM27.9168%2010.8333C28.6072%2010.8333%2029.1668%2011.3929%2029.1668%2012.0833L29.1668%2017.4999C29.1668%2018.1903%2028.6072%2018.7499%2027.9168%2018.7499L22.5002%2018.7499C21.8098%2018.7499%2021.2502%2018.1903%2021.2502%2017.4999L21.2502%2012.0833C21.2502%2011.3929%2021.8098%2010.8333%2022.5002%2010.8333L27.9168%2010.8333ZM27.9168%2011.6666L22.5002%2011.6666C22.27%2011.6666%2022.0835%2011.8531%2022.0835%2012.0833L22.0835%2017.4999C22.0835%2017.73%2022.27%2017.9166%2022.5002%2017.9166L27.9168%2017.9166C28.1469%2017.9166%2028.3335%2017.73%2028.3335%2017.4999L28.3335%2012.0833C28.3335%2011.8531%2028.1469%2011.6666%2027.9168%2011.6666Z'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20fill-rule='nonzero'%20/%3e%3cpath%20id='ic_public_qrcode_2_4'%20d='M18.7502%2012.0833L18.7502%2017.4999C18.7502%2018.1903%2018.1905%2018.7499%2017.5002%2018.7499L12.0835%2018.7499C11.3931%2018.7499%2010.8335%2018.1903%2010.8335%2017.4999L10.8335%2012.0833C10.8335%2011.3929%2011.3931%2010.8333%2012.0835%2010.8333L17.5002%2010.8333C18.1905%2010.8333%2018.7502%2011.3929%2018.7502%2012.0833ZM12.0835%2011.6666C11.8534%2011.6666%2011.6668%2011.8531%2011.6668%2012.0833L11.6668%2017.4999C11.6668%2017.73%2011.8534%2017.9166%2012.0835%2017.9166L17.5002%2017.9166C17.7303%2017.9166%2017.9168%2017.73%2017.9168%2017.4999L17.9168%2012.0833C17.9168%2011.8531%2017.7303%2011.6666%2017.5002%2011.6666L12.0835%2011.6666ZM18.7502%2022.4999L18.7502%2027.9166C18.7502%2028.6069%2018.1905%2029.1666%2017.5002%2029.1666L12.0835%2029.1666C11.3931%2029.1666%2010.8335%2028.6069%2010.8335%2027.9166L10.8335%2022.4999C10.8335%2021.8096%2011.3931%2021.2499%2012.0835%2021.2499L17.5002%2021.2499C18.1905%2021.2499%2018.7502%2021.8096%2018.7502%2022.4999ZM12.0835%2022.0833C11.8534%2022.0833%2011.6668%2022.2698%2011.6668%2022.4999L11.6668%2027.9166C11.6668%2028.1467%2011.8534%2028.3333%2012.0835%2028.3333L17.5002%2028.3333C17.7303%2028.3333%2017.9168%2028.1467%2017.9168%2027.9166L17.9168%2022.4999C17.9168%2022.2698%2017.7303%2022.0833%2017.5002%2022.0833L12.0835%2022.0833ZM29.1668%2012.0833L29.1668%2017.4999C29.1668%2018.1903%2028.6072%2018.7499%2027.9168%2018.7499L22.5002%2018.7499C21.8098%2018.7499%2021.2502%2018.1903%2021.2502%2017.4999L21.2502%2012.0833C21.2502%2011.3929%2021.8098%2010.8333%2022.5002%2010.8333L27.9168%2010.8333C28.6072%2010.8333%2029.1668%2011.3929%2029.1668%2012.0833ZM22.5002%2011.6666C22.27%2011.6666%2022.0835%2011.8531%2022.0835%2012.0833L22.0835%2017.4999C22.0835%2017.73%2022.27%2017.9166%2022.5002%2017.9166L27.9168%2017.9166C28.1469%2017.9166%2028.3335%2017.73%2028.3335%2017.4999L28.3335%2012.0833C28.3335%2011.8531%2028.1469%2011.6666%2027.9168%2011.6666L22.5002%2011.6666Z'%20fill-rule='nonzero'%20stroke='rgb(255,255,255)'%20stroke-opacity='0'%20stroke-linejoin='round'%20stroke-width='1.25'%20/%3e%3cpath%20id='ic_public_qrcode_2_5'%20d='M27.9165%2021.6667L27.9165%2024.5834L28.7498%2024.5834L28.7498%2021.6667L27.9165%2021.6667ZM24.5832%2021.6667L24.5832%2022.639L24.5828%2022.6388L24.5832%2024.5834L23.6109%2024.5834L23.6107%2022.6388L21.6665%2022.639L21.6665%2021.6667L24.5832%2021.6667ZM21.6665%2025.8334L21.6665%2028.7501L22.4998%2028.7501L22.4998%2025.8334L21.6665%2025.8334ZM27.9165%2027.9167L27.9165%2028.7501L28.7498%2028.7501L28.7498%2027.9167L27.9165%2027.9167ZM25.8332%2025.8334L25.8332%2026.6667L26.6665%2026.6667L26.6665%2025.8334L25.8332%2025.8334Z'%20fill='rgb(14,191,241)'%20fill-rule='nonzero'%20/%3e%3cpath%20id='ic_public_qrcode_2_5'%20d='M27.9165%2024.5834L28.7498%2024.5834L28.7498%2021.6667L27.9165%2021.6667L27.9165%2024.5834ZM24.5832%2022.639L24.5828%2022.6388L24.5832%2024.5834L23.6109%2024.5834L23.6107%2022.6388L21.6665%2022.639L21.6665%2021.6667L24.5832%2021.6667L24.5832%2022.639ZM21.6665%2028.7501L22.4998%2028.7501L22.4998%2025.8334L21.6665%2025.8334L21.6665%2028.7501ZM27.9165%2028.7501L28.7498%2028.7501L28.7498%2027.9167L27.9165%2027.9167L27.9165%2028.7501ZM25.8332%2026.6667L26.6665%2026.6667L26.6665%2025.8334L25.8332%2025.8334L25.8332%2026.6667Z'%20fill-rule='nonzero'%20stroke='rgb(14,191,241)'%20stroke-linejoin='round'%20stroke-width='1.25'%20/%3e%3cpath%20id='ic_public_qrcode_2_6'%20d='M14.375%2014.375L14.375%2015.2083L15.2083%2015.2083L15.2083%2014.375L14.375%2014.375ZM14.375%2024.7917L14.375%2025.625L15.2083%2025.625L15.2083%2024.7917L14.375%2024.7917ZM24.7917%2014.375L24.7917%2015.2083L25.625%2015.2083L25.625%2014.375L24.7917%2014.375Z'%20fill='rgb(14,191,241)'%20fill-rule='nonzero'%20/%3e%3cpath%20id='ic_public_qrcode_2_6'%20d='M14.375%2015.2083L15.2083%2015.2083L15.2083%2014.375L14.375%2014.375L14.375%2015.2083ZM14.375%2025.625L15.2083%2025.625L15.2083%2024.7917L14.375%2024.7917L14.375%2025.625ZM24.7917%2015.2083L25.625%2015.2083L25.625%2014.375L24.7917%2014.375L24.7917%2015.2083Z'%20fill-rule='nonzero'%20stroke='rgb(14,191,241)'%20stroke-linejoin='round'%20stroke-width='1.25'%20/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e", Ue = "data:image/svg+xml,%3csvg%20viewBox='0%200%2012%2012'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='12.000000'%20height='12.000000'%20fill='none'%3e%3cdefs%3e%3cfilter%20id='pixso_custom_mask_type_luminance'%3e%3cfeColorMatrix%20type='matrix'%20values='1%200%200%200%200%200%201%200%200%200%200%200%201%200%200%200%200%200%201%200%20'%20/%3e%3c/filter%3e%3c/defs%3e%3cmask%20id='mask_0'%20width='11.999876'%20height='11.999876'%20x='0.000000'%20y='0.000000'%20maskUnits='userSpaceOnUse'%3e%3cg%20filter='url(%23pixso_custom_mask_type_luminance)'%3e%3cg%20id='mask401_19830'%3e%3cpath%20id='蒙版'%20d='M0%200L11.9999%200L11.9999%2011.9999L0%2011.9999L0%200ZM2.69992%201.34999L8.09977%201.34999C9.5082%201.34999%2010.6498%202.49167%2010.6498%203.89998L10.6498%209.2999C10.6498%2010.7082%209.5082%2011.8499%208.09977%2011.8499L2.69992%2011.8499C1.29149%2011.8499%200.149901%2010.7082%200.149901%209.2999L0.149901%203.89998C0.149901%202.49167%201.29149%201.34999%202.69992%201.34999Z'%20fill='rgb(196,196,196)'%20fill-rule='evenodd'%20/%3e%3c/g%3e%3c/g%3e%3c/mask%3e%3crect%20id='ic_public_copy'%20width='12.000000'%20height='12.000000'%20x='0.000000'%20y='0.000000'%20/%3e%3crect%20id='ic_public_copy-复制/base/ic_public_copy'%20width='11.999876'%20height='11.999876'%20x='0.000000'%20y='0.000000'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20/%3e%3cpath%20id='path1'%20d='M0.000134537%205.99497C0.000134537%205.05748%20-0.00236544%204.11999%200.000134537%203.1825C-0.00236544%202.72751%200.055134%202.27501%200.165133%201.83752C0.41263%200.907526%201.01762%200.355032%201.94761%200.140034C2.41261%200.040035%202.8901%20-0.00746449%203.3651%203.54269e-05C5.16258%203.54269e-05%206.96006%203.54269e-05%208.76004%203.54269e-05C9.21254%20-0.00246455%209.66503%200.0475349%2010.1075%200.155034C11.065%200.387531%2011.64%200.995025%2011.8575%201.95002C11.9575%202.40001%2012.005%202.86001%2011.9975%203.3225C11.9975%205.13998%2011.9975%206.95746%2011.9975%208.77244C12%209.22244%2011.95%209.67243%2011.845%2010.1099C11.61%2011.0674%2011%2011.6374%2010.0475%2011.8574C9.58003%2011.9574%209.10504%2012.0049%208.62754%2011.9974C6.83756%2011.9974%205.04758%2011.9974%203.2576%2011.9974C2.80011%2012.0024%202.34511%2011.9499%201.90011%2011.8449C0.937625%2011.6124%200.360131%2011.0024%200.142633%2010.0424C0.0301342%209.55494%200.000134537%209.06744%200.000134537%208.57495C0.000134537%207.71495%200.000134537%206.85496%200.000134537%205.99497Z'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20fill-rule='evenodd'%20/%3e%3ccircle%20id='path2'%20cx='5.99993801'%20cy='5.99993801'%20r='5.99993801'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20/%3e%3cg%20id='mask'%20mask='url(%23mask_0)'%3e%3cg%20id='组合%208'%3e%3cpath%20id='path'%20d='M11.1%203.89993L11.1%206.8999C11.1%208.55488%209.75502%209.89737%208.10004%209.89737L5.10007%209.89737C3.44258%209.89737%202.1001%208.55488%202.1001%206.8999L2.1001%203.89993C2.1001%202.24245%203.44258%200.897461%205.10007%200.897461L8.10004%200.897461C9.75502%200.897461%2011.1%202.24245%2011.1%203.89993Z'%20fill-rule='nonzero'%20stroke='rgb(25,25,25)'%20stroke-linejoin='round'%20stroke-width='0.749992251'%20/%3e%3c/g%3e%3c/g%3e%3cpath%20id='path4'%20d='M2.10008%202.39746L8.10002%202.39746C8.92751%202.39746%209.6%203.06995%209.6%203.89995L9.6%209.89738C9.6%2010.7274%208.92751%2011.3999%208.10002%2011.3999L2.10008%2011.3999C1.27009%2011.3999%200.600098%2010.7274%200.600098%209.89738L0.600098%203.89995C0.600098%203.06995%201.27009%202.39746%202.10008%202.39746Z'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20fill-rule='evenodd'%20/%3e%3cpath%20id='path4'%20d='M9.6%203.89995L9.6%209.89738C9.6%2010.7274%208.92751%2011.3999%208.10002%2011.3999L2.10008%2011.3999C1.27009%2011.3999%200.600098%2010.7274%200.600098%209.89738L0.600098%203.89995C0.600098%203.06995%201.27009%202.39746%202.10008%202.39746L8.10002%202.39746C8.92751%202.39746%209.6%203.06995%209.6%203.89995Z'%20fill-rule='nonzero'%20stroke='rgb(25,25,25)'%20stroke-linejoin='round'%20stroke-width='0.749992251'%20/%3e%3c/svg%3e", Ae = "https://agent.opentiny.design/tiny-robot", Oe = "https://ai.opentiny.design/next-remoter", $e = "https://ai.opentiny.design/next-remoter/svgs/logo-next-no-bg-left.svg", y2 = (r) => [
904
+ const n2 = "data:image/svg+xml,%3csvg%20viewBox='0%200%2040%2039.9692'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='40.000000'%20height='39.969238'%20fill='none'%20customFrame='url(%23clipPath_3)'%3e%3cdefs%3e%3cclipPath%20id='clipPath_3'%3e%3crect%20width='40.000000'%20height='39.969238'%20x='0.000000'%20y='0.000000'%20rx='12.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_4'%3e%3crect%20width='24.000000'%20height='24.000000'%20x='8.000000'%20y='7.984619'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_5'%3e%3crect%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='9.984619'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_6'%3e%3crect%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='9.984619'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_7'%3e%3crect%20width='21.666666'%20height='13.333333'%20x='20.000000'%20y='9.984619'%20rx='6.666667'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_8'%3e%3crect%20width='6.666667'%20height='6.666667'%20x='23.333496'%20y='9.984619'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3c/defs%3e%3crect%20id='2'%20width='40.000000'%20height='39.969238'%20x='0.000000'%20y='0.000000'%20rx='12.000000'%20fill='rgb(239,246,255)'%20/%3e%3cg%20id='物业'%20clip-path='url(%23clipPath_4)'%20customFrame='url(%23clipPath_4)'%3e%3crect%20id='物业'%20width='24.000000'%20height='24.000000'%20x='8.000000'%20y='7.984619'%20/%3e%3cg%20id='物业服务'%3e%3cg%20id='00公共/红点/图标+红点'%20customFrame='url(%23clipPath_5)'%3e%3crect%20id='00公共/红点/图标+红点'%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='9.984619'%20/%3e%3cg%20id='common_chats_line'%20customFrame='url(%23clipPath_6)'%3e%3crect%20id='common_chats_line'%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='9.984619'%20/%3e%3cpath%20id='形状'%20d='M28.3332%2019.9847C28.3332%2015.3823%2024.6022%2011.6514%2019.9998%2011.6514C15.3975%2011.6514%2011.6665%2015.3823%2011.6665%2019.9847C11.6665%2024.5871%2015.3975%2028.318%2019.9998%2028.318C21.0018%2028.318%2021.9624%2028.1412%2022.8522%2027.8171L26.581%2028.1578C26.7205%2028.1706%2026.8611%2028.1598%2026.9971%2028.1259C27.6669%2027.959%2028.0746%2027.2806%2027.9077%2026.6108L27.2716%2024.0578C27.9477%2022.8535%2028.3332%2021.4641%2028.3332%2019.9847ZM19.9998%2013.1514C16.2259%2013.1514%2013.1665%2016.2108%2013.1665%2019.9847C13.1665%2023.7586%2016.2259%2026.818%2019.9998%2026.818C20.8089%2026.818%2021.5967%2026.678%2022.3388%2026.4077C22.505%2026.3471%2022.6803%2026.3166%2022.8565%2026.3171L22.9887%2026.3233L26.3665%2026.6322L25.8161%2024.4205C25.7352%2024.0958%2025.7655%2023.7548%2025.8997%2023.4512L25.9636%2023.3236C26.5311%2022.3126%2026.8332%2021.1723%2026.8332%2019.9847C26.8332%2016.2108%2023.7738%2013.1514%2019.9998%2013.1514ZM23.1152%2021.2468C23.352%2020.9069%2023.2684%2020.4394%2022.9286%2020.2026C22.5887%2019.9659%2022.1212%2020.0494%2021.8845%2020.3893C21.2894%2021.2433%2020.4268%2021.7347%2019.5102%2021.7347C18.9513%2021.7347%2018.4132%2021.554%2017.9375%2021.2122C17.6011%2020.9705%2017.1325%2021.0472%2016.8908%2021.3836C16.6491%2021.7199%2016.7258%2022.1886%2017.0622%2022.4303C17.7879%2022.9518%2018.6305%2023.2347%2019.5102%2023.2347C20.9394%2023.2347%2022.2505%2022.4878%2023.1152%2021.2468Z'%20fill='rgb(65,142,255)'%20fill-rule='evenodd'%20/%3e%3c/g%3e%3cg%20id='00公共/3位数红点'%20opacity='0'%20customFrame='url(%23clipPath_7)'%3e%3crect%20id='00公共/3位数红点'%20width='21.666666'%20height='13.333333'%20x='20.000000'%20y='9.984619'%20rx='6.666667'%20opacity='0'%20fill='rgb(243,111,100)'%20/%3e%3cpath%20id='文本'%20d='M26.0421%2013.4421C26.4259%2013.4421%2026.7677%2013.5255%2027.0675%2013.6923C27.3672%2013.8591%2027.6005%2014.0931%2027.7673%2014.3942C27.9342%2014.694%2028.0176%2015.0351%2028.0176%2015.4176C28.0176%2015.7173%2027.9633%2015.994%2027.8548%2016.2476C27.7463%2016.4999%2027.5673%2016.8315%2027.3177%2017.2425L25.859%2019.6432L25.0167%2019.6432L26.276%2017.5924C26.3534%2017.4704%2026.4307%2017.3564%2026.508%2017.2507C26.3357%2017.3063%2026.1445%2017.3341%2025.9342%2017.3341C25.5721%2017.3341%2025.2493%2017.2479%2024.9658%2017.0757C24.6837%2016.9034%2024.4633%2016.6701%2024.3046%2016.3758C24.1459%2016.0815%2024.0666%2015.7566%2024.0666%2015.4013C24.0666%2015.0351%2024.1513%2014.7021%2024.3209%2014.4023C24.4904%2014.1012%2024.7264%2013.8659%2025.0289%2013.6964C25.3314%2013.5268%2025.6691%2013.4421%2026.0421%2013.4421ZM26.0421%2016.6505C26.4029%2016.6505%2026.6904%2016.5325%2026.9047%2016.2965C27.119%2016.0605%2027.2262%2015.7539%2027.2262%2015.3769C27.2262%2014.9985%2027.119%2014.694%2026.9047%2014.4634C26.6904%2014.2328%2026.4029%2014.1175%2026.0421%2014.1175C25.6867%2014.1175%2025.4019%2014.2342%2025.1876%2014.4674C24.9733%2014.7007%2024.8661%2015.0039%2024.8661%2015.3769C24.8661%2015.7539%2024.9719%2016.0605%2025.1835%2016.2965C25.3951%2016.5325%2025.6813%2016.6505%2026.0421%2016.6505ZM30.7921%2013.4421C31.1759%2013.4421%2031.5177%2013.5255%2031.8175%2013.6923C32.1172%2013.8591%2032.3505%2014.0931%2032.5173%2014.3942C32.6842%2014.694%2032.7676%2015.0351%2032.7676%2015.4176C32.7676%2015.7173%2032.7133%2015.994%2032.6048%2016.2476C32.4963%2016.4999%2032.3173%2016.8315%2032.0677%2017.2425L30.609%2019.6432L29.7667%2019.6432L31.026%2017.5924C31.1034%2017.4704%2031.1807%2017.3564%2031.258%2017.2507C31.0857%2017.3063%2030.8945%2017.3341%2030.6842%2017.3341C30.3221%2017.3341%2029.9993%2017.2479%2029.7158%2017.0757C29.4337%2016.9034%2029.2133%2016.6701%2029.0546%2016.3758C28.8959%2016.0815%2028.8166%2015.7566%2028.8166%2015.4013C28.8166%2015.0351%2028.9013%2014.7021%2029.0709%2014.4023C29.2404%2014.1012%2029.4764%2013.8659%2029.7789%2013.6964C30.0814%2013.5268%2030.4191%2013.4421%2030.7921%2013.4421ZM30.7921%2016.6505C31.1529%2016.6505%2031.4404%2016.5325%2031.6547%2016.2965C31.869%2016.0605%2031.9762%2015.7539%2031.9762%2015.3769C31.9762%2014.9985%2031.869%2014.694%2031.6547%2014.4634C31.4404%2014.2328%2031.1529%2014.1175%2030.7921%2014.1175C30.4367%2014.1175%2030.1519%2014.2342%2029.9376%2014.4674C29.7233%2014.7007%2029.6161%2015.0039%2029.6161%2015.3769C29.6161%2015.7539%2029.7219%2016.0605%2029.9335%2016.2965C30.1451%2016.5325%2030.4313%2016.6505%2030.7921%2016.6505ZM35.2674%2014.6851L35.9001%2014.6851L35.9001%2016.3188L37.5339%2016.3188L37.5339%2016.9516L35.9001%2016.9516L35.9001%2018.5853L35.2674%2018.5853L35.2674%2016.9516L33.6337%2016.9516L33.6337%2016.3188L35.2674%2016.3188L35.2674%2014.6851Z'%20fill='rgb(255,255,255)'%20fill-rule='nonzero'%20/%3e%3c/g%3e%3cg%20id='00公共/单红点'%20opacity='0'%20customFrame='url(%23clipPath_8)'%3e%3crect%20id='00公共/单红点'%20width='6.666667'%20height='6.666667'%20x='23.333496'%20y='9.984619'%20opacity='0'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20/%3e%3ccircle%20id='红点'%20cx='26.6668301'%20cy='13.3179522'%20r='3.33333325'%20fill='rgb(243,111,100)'%20/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e", o2 = "data:image/svg+xml,%3csvg%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='40.000000'%20height='40.000000'%20fill='none'%20customFrame='url(%23clipPath_12)'%3e%3cdefs%3e%3cclipPath%20id='clipPath_12'%3e%3crect%20width='40.000000'%20height='40.000000'%20x='0.000000'%20y='0.000000'%20rx='12.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_13'%3e%3crect%20width='24.000000'%20height='24.000000'%20x='8.000000'%20y='8.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_14'%3e%3crect%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='10.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3c/defs%3e%3crect%20id='4'%20width='40.000000'%20height='40.000000'%20x='0.000000'%20y='0.000000'%20rx='12.000000'%20fill='rgb(234,255,244)'%20/%3e%3cg%20id='我的信息'%20clip-path='url(%23clipPath_13)'%20customFrame='url(%23clipPath_13)'%3e%3crect%20id='我的信息'%20width='24.000000'%20height='24.000000'%20x='8.000000'%20y='8.000000'%20/%3e%3cg%20id='组合%208'%20customFrame='url(%23clipPath_14)'%3e%3crect%20id='组合%208'%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='10.000000'%20/%3e%3cpath%20id='合并'%20d='M28.4994%2012.3142C28.4994%2012.2578%2028.4937%2012.2018%2028.4825%2012.1465C28.4713%2012.0911%2028.4547%2012.0373%2028.4327%2011.9851C28.4107%2011.933%2028.3836%2011.8835%2028.3516%2011.8365C28.3197%2011.7896%2028.2834%2011.7461%2028.2427%2011.7062C28.202%2011.6663%2028.1579%2011.6307%2028.1101%2011.5993C28.0622%2011.568%2028.0117%2011.5415%2027.9585%2011.5199C27.9054%2011.4983%2027.8506%2011.4819%2027.7942%2011.4709C27.7378%2011.4599%2027.6806%2011.4544%2027.6231%2011.4544L24.1832%2011.5199L24.1832%2010L29.0796%2010C29.1472%2010%2029.2143%2010.0065%2029.2806%2010.0194C29.347%2010.0324%2029.4114%2010.0516%2029.4739%2010.077C29.5364%2010.1024%2029.5961%2010.1336%2029.6523%2010.1705C29.7086%2010.2074%2029.7605%2010.2493%2029.8084%2010.2963C29.8562%2010.3433%2029.8991%2010.3944%2029.9367%2010.4496C29.9743%2010.5048%2030.006%2010.5631%2030.0319%2010.6244C30.0578%2010.6858%2030.0773%2010.7491%2030.0905%2010.8142C30.1037%2010.8794%2030.1104%2010.9451%2030.1104%2011.0115L30.1832%2014.4522L28.4992%2014.5L28.4994%2012.3142ZM11.6995%2012.3143C11.6995%2012.2579%2011.7051%2012.2019%2011.7163%2012.1466C11.7275%2012.0912%2011.7441%2012.0374%2011.7661%2011.9852C11.7882%2011.9331%2011.8152%2011.8836%2011.8472%2011.8366C11.8791%2011.7897%2011.9155%2011.7462%2011.9562%2011.7063C11.9968%2011.6664%2012.0409%2011.6308%2012.0888%2011.5994C12.1366%2011.5681%2012.1871%2011.5416%2012.2403%2011.52C12.2934%2011.4984%2012.3482%2011.482%2012.4046%2011.471C12.4611%2011.46%2012.5182%2011.4545%2012.5758%2011.4545L16.0157%2011.52L16.0157%2010.0001L11.1193%2010.0001C11.0516%2010.0001%2010.9846%2010.0066%2010.9182%2010.0196C10.8518%2010.0325%2010.7874%2010.0517%2010.7249%2010.0771C10.6624%2010.1025%2010.6028%2010.1337%2010.5465%2010.1706C10.4902%2010.2075%2010.4383%2010.2494%2010.3904%2010.2964C10.3426%2010.3434%2010.2997%2010.3945%2010.2621%2010.4497C10.2245%2010.5049%2010.1929%2010.5632%2010.167%2010.6245C10.1411%2010.6859%2010.1215%2010.7492%2010.1083%2010.8143C10.0951%2010.8795%2010.0885%2010.9452%2010.0884%2011.0116L10.0157%2014.4523L11.6997%2014.5L11.6995%2012.3143ZM25.3135%2021.8051L25.3135%2022.8167C25.7656%2022.8929%2026.2209%2022.9249%2026.6792%2022.9127C28.3381%2022.9127%2029.1675%2022.326%2029.1675%2021.1527C29.1733%2020.9869%2029.151%2020.825%2029.1006%2020.667C29.0503%2020.509%2028.9747%2020.3641%2028.8742%2020.2322C28.767%2020.1025%2028.6403%2019.9963%2028.4938%2019.9134C28.3474%2019.8306%2028.191%2019.7767%2028.0246%2019.7517L28.0246%2019.7011C28.0971%2019.6839%2028.1676%2019.6606%2028.236%2019.6311C28.3044%2019.6016%2028.3698%2019.5665%2028.4321%2019.5257C28.4944%2019.4848%2028.5526%2019.4389%2028.6069%2019.3879C28.6613%2019.3369%2028.7109%2019.2816%2028.7556%2019.222C28.8003%2019.1624%2028.8394%2019.0994%2028.8732%2019.033C28.9069%2018.9665%2028.9346%2018.8977%2028.9564%2018.8265C28.9782%2018.7552%2028.9937%2018.6826%2029.0028%2018.6086C29.0119%2018.5347%2029.0145%2018.4605%2029.0107%2018.3861C29.0217%2018.2675%2029.0176%2018.1495%2028.9984%2018.0319C28.9791%2017.9144%2028.9454%2017.8012%2028.8971%2017.6923C28.8489%2017.5834%2028.7875%2017.4823%2028.7134%2017.3891C28.6393%2017.2959%2028.5547%2017.2135%2028.4595%2017.1419C28.219%2017.0003%2027.963%2016.8972%2027.6915%2016.8326C27.4199%2016.7679%2027.1449%2016.7446%2026.8664%2016.7626C26.6258%2016.7621%2026.3864%2016.7791%2026.1482%2016.8132C25.9479%2016.8386%2025.7504%2016.8791%2025.5563%2016.9346L25.5563%2017.8854C25.743%2017.8264%2025.9337%2017.7842%2026.128%2017.759C26.3276%2017.73%2026.5282%2017.7148%2026.7298%2017.7134C27.0252%2017.6949%2027.3049%2017.7523%2027.5692%2017.8854C27.6168%2017.9161%2027.6595%2017.9525%2027.6972%2017.9947C27.7348%2018.037%2027.766%2018.0835%2027.791%2018.1343C27.816%2018.1851%2027.8337%2018.2383%2027.8441%2018.294C27.8545%2018.3496%2027.8573%2018.4056%2027.8525%2018.462C27.8566%2018.5278%2027.8514%2018.5927%2027.8367%2018.657C27.822%2018.7212%2027.7986%2018.7821%2027.7663%2018.8395C27.734%2018.897%2027.694%2018.9487%2027.6468%2018.9946C27.5995%2019.0405%2027.5468%2019.0787%2027.4885%2019.1093C27.1544%2019.2631%2026.8037%2019.3306%2026.4364%2019.3117L25.9862%2019.3117L25.9862%2020.1917L26.4466%2020.1917C26.8409%2020.1669%2027.2202%2020.2309%2027.5845%2020.3839C27.6459%2020.4167%2027.7011%2020.4576%2027.7505%2020.5066C27.7999%2020.5556%2027.8412%2020.6107%2027.8745%2020.6718C27.9077%2020.733%2027.9315%2020.7976%2027.9458%2020.8656C27.9602%2020.9337%2027.9644%2021.0024%2027.9587%2021.0717C27.9648%2021.1402%2027.9612%2021.2083%2027.9478%2021.2757C27.9344%2021.3432%2027.912%2021.4074%2027.8801%2021.4683C27.8483%2021.5293%2027.8086%2021.5846%2027.7609%2021.6341C27.7132%2021.6837%2027.6593%2021.7254%2027.5996%2021.7596C27.2884%2021.9045%2026.9613%2021.9685%2026.6184%2021.9518C26.1786%2021.9465%2025.7436%2021.8977%2025.3135%2021.8051ZM21.3382%2018.6238C21.3445%2018.5593%2021.343%2018.495%2021.3335%2018.4308C21.3241%2018.3667%2021.3069%2018.3046%2021.2822%2018.2447C21.2575%2018.1847%2021.226%2018.1287%2021.1876%2018.0765C21.1492%2018.0242%2021.1049%2017.9774%2021.055%2017.936C20.9359%2017.8608%2020.808%2017.806%2020.6714%2017.7714C20.5349%2017.7368%2020.3964%2017.7242%2020.2558%2017.7337C19.8009%2017.7395%2019.356%2017.8087%2018.9208%2017.9411L18.9208%2016.9598C19.4252%2016.8181%2019.9393%2016.7524%2020.4633%2016.7626C20.7322%2016.7484%2020.9964%2016.7773%2021.256%2016.8491C21.5156%2016.9209%2021.7571%2017.032%2021.9806%2017.1824C22.0729%2017.2601%2022.1548%2017.3474%2022.2263%2017.4446C22.2978%2017.5418%2022.3567%2017.646%2022.4034%2017.7573C22.45%2017.8686%2022.483%2017.9838%2022.5021%2018.1029C22.5213%2018.222%2022.5261%2018.3417%2022.5167%2018.462C22.5245%2018.7882%2022.4655%2019.1017%2022.3396%2019.4027C22.1879%2019.7384%2021.984%2020.0384%2021.7277%2020.3029C21.3021%2020.7337%2020.8502%2021.135%2020.3721%2021.5067L19.9928%2021.8051L19.9928%2021.8759L22.6938%2021.8759L22.6938%2022.8419L18.5464%2022.8419L18.5464%2021.7697C19.2882%2021.1796%2019.8579%2020.6975%2020.2558%2020.3232C20.574%2020.0432%2020.8523%2019.728%2021.0905%2019.3774C21.1675%2019.2665%2021.2269%2019.1469%2021.2691%2019.0187C21.3113%2018.8904%2021.3344%2018.7588%2021.3382%2018.6238ZM12.3102%2017.2127L12.3102%2018.1939L13.7769%2017.9107L13.7769%2022.8419L14.9605%2022.8419L14.9605%2016.8486L14.0957%2016.8486L12.3102%2017.2127ZM28.5524%2028.0475C28.5524%2028.104%2028.5467%2028.1599%2028.5353%2028.2152C28.5239%2028.2706%2028.5071%2028.3244%2028.4849%2028.3766C28.4626%2028.4287%2028.4352%2028.4782%2028.4028%2028.5252C28.3705%2028.5721%2028.3337%2028.6156%2028.2925%2028.6555C28.2513%2028.6954%2028.2067%2028.731%2028.1583%2028.7624C28.1098%2028.7937%2028.0587%2028.8202%2028.0049%2028.8418C27.9511%2028.8634%2027.8957%2028.8798%2027.8385%2028.8908C27.7814%2028.9018%2027.7235%2028.9073%2027.6653%2028.9073L24.1832%2028.8418L24.1832%2030.3617L29.1397%2030.3617C29.2082%2030.3617%2029.276%2030.3552%2029.3432%2030.3423C29.4104%2030.3293%2029.4756%2030.3101%2029.5389%2030.2847C29.6022%2030.2593%2029.6625%2030.2281%2029.7195%2030.1912C29.7765%2030.1543%2029.829%2030.1124%2029.8774%2030.0654C29.9259%2030.0184%2029.9693%2029.9673%2030.0074%2029.9121C30.0454%2029.8569%2030.0774%2029.7986%2030.1037%2029.7373C30.1299%2029.6759%2030.1497%2029.6126%2030.163%2029.5475C30.1764%2029.4823%2030.1831%2029.4166%2030.1832%2029.3502L30.1832%2026.0478L28.4785%2026L28.5524%2028.0475ZM11.6308%2028.0099C11.6308%2028.0664%2011.6365%2028.1223%2011.6479%2028.1777C11.6592%2028.233%2011.676%2028.2868%2011.6983%2028.339C11.7206%2028.3911%2011.748%2028.4406%2011.7803%2028.4876C11.8127%2028.5345%2011.8495%2028.578%2011.8906%2028.6179C11.9318%2028.6578%2011.9765%2028.6934%2012.0249%2028.7248C12.0733%2028.7562%2012.1244%2028.7826%2012.1783%2028.8042C12.2321%2028.8259%2012.2875%2028.8422%2012.3446%2028.8532C12.4017%2028.8642%2012.4596%2028.8697%2012.5178%2028.8698L16%2028.8042L16%2030.3241L11.0435%2030.3241C10.975%2030.3241%2010.9071%2030.3176%2010.8399%2030.3047C10.7727%2030.2917%2010.7076%2030.2725%2010.6443%2030.2471C10.581%2030.2217%2010.5206%2030.1906%2010.4637%2030.1537C10.4067%2030.1168%2010.3542%2030.0748%2010.3057%2030.0278C10.2573%2029.9809%2010.2138%2029.9298%2010.1758%2029.8745C10.1377%2029.8193%2010.1057%2029.7611%2010.0795%2029.6997C10.0533%2029.6383%2010.0335%2029.575%2010.0201%2029.5099C10.0068%2029.4448%2010%2029.379%2010%2029.3126L10%2026.0478L11.7047%2026L11.6308%2028.0099Z'%20fill='rgb(14,191,241)'%20fill-rule='evenodd'%20/%3e%3c/g%3e%3c/g%3e%3c/svg%3e", i2 = "data:image/svg+xml,%3csvg%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='40.000000'%20height='40.000000'%20fill='none'%20customFrame='url(%23clipPath_9)'%3e%3cdefs%3e%3cclipPath%20id='clipPath_9'%3e%3crect%20width='40.000000'%20height='40.000000'%20x='0.000000'%20y='0.000000'%20rx='12.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_10'%3e%3crect%20width='24.000000'%20height='24.000000'%20x='8.000000'%20y='8.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_11'%3e%3crect%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='10.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3c/defs%3e%3crect%20id='3'%20width='40.000000'%20height='40.000000'%20x='0.000000'%20y='0.000000'%20rx='12.000000'%20fill='rgb(236,250,254)'%20/%3e%3cg%20id='画板%202310'%20customFrame='url(%23clipPath_10)'%3e%3crect%20id='画板%202310'%20width='24.000000'%20height='24.000000'%20x='8.000000'%20y='8.000000'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20/%3e%3cg%20id='人事服务'%3e%3cg%20id='ic_public_link'%20clip-path='url(%23clipPath_11)'%20customFrame='url(%23clipPath_11)'%3e%3crect%20id='ic_public_link'%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='10.000000'%20/%3e%3cpath%20id='path1'%20d='M9.9999%2019.9917C9.9999%2018.4292%209.99573%2016.8667%209.9999%2015.3042C9.99573%2014.5459%2010.0916%2013.7917%2010.2749%2013.0626C10.6874%2011.5126%2011.6957%2010.5917%2013.2457%2010.2334C14.0207%2010.0667%2014.8166%209.98756%2015.6082%2010.0001C18.6041%2010.0001%2021.5999%2010.0001%2024.5999%2010.0001C25.3541%209.99589%2026.1082%2010.0792%2026.8457%2010.2584C28.4416%2010.6459%2029.3999%2011.6584%2029.7624%2013.2501C29.9291%2014.0001%2030.0041%2014.7667%2029.9957%2015.5376C29.9957%2018.5667%2029.9957%2021.5959%2029.9957%2024.6209C29.9999%2025.3709%2029.9166%2026.1209%2029.7416%2026.8459C29.3499%2028.4459%2028.3332%2029.3959%2026.7457%2029.7626C25.9666%2029.9292%2025.1749%2030.0084%2024.3791%2029.9959C21.3957%2029.9959%2018.4124%2029.9959%2015.4291%2029.9959C14.6666%2030.0042%2013.9082%2029.9167%2013.1666%2029.7417C11.5624%2029.3542%2010.5999%2028.3376%2010.2374%2026.7376C10.0499%2025.9251%209.9999%2025.1126%209.9999%2024.2917C9.9999%2022.8584%209.9999%2021.4251%209.9999%2019.9917Z'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20fill-rule='evenodd'%20/%3e%3ccircle%20id='path2'%20cx='20'%20cy='20'%20r='10'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20/%3e%3cpath%20id='path3'%20d='M25.0333%2021.8666L26.9%2020C28.8083%2018.0916%2028.8083%2015%2026.9%2013.0958C24.9958%2011.1875%2021.9041%2011.1875%2020%2013.0958L18.1291%2014.9625M21.8666%2025.0333L20%2026.9C18.0916%2028.8083%2015%2028.8083%2013.0958%2026.9C11.1875%2024.9958%2011.1875%2021.9041%2013.0958%2020L14.9625%2018.1291'%20fill-rule='nonzero'%20stroke='rgb(14,191,241)'%20stroke-linecap='round'%20stroke-width='1.25'%20/%3e%3cpath%20id='pah4'%20d='M18.125%2021.875L21.875%2018.125'%20stroke='rgb(14,191,241)'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.25'%20/%3e%3cpath%20id='path5'%20d='M25.8207%2019.2626L24.0457%2021.0376C23.7998%2021.2834%2023.6748%2021.5292%2023.6748%2021.7751C23.6748%2022.0209%2023.7998%2022.2667%2024.0457%2022.5126C24.1498%2022.6167%2024.2665%2022.6959%2024.3915%2022.7459C24.5123%2022.7917%2024.6415%2022.8167%2024.779%2022.8167C24.9207%2022.8167%2025.0498%2022.7917%2025.1665%2022.7459C25.2957%2022.6959%2025.4123%2022.6167%2025.5165%2022.5126L27.2915%2020.7334C27.8165%2020.2126%2028.2165%2019.6334%2028.4957%2019.0001C28.5082%2018.9667%2028.5248%2018.9334%2028.5373%2018.8959C28.554%2018.8626%2028.5665%2018.8292%2028.579%2018.7917C28.8332%2018.1501%2028.9582%2017.4584%2028.9582%2016.7209C28.9582%2015.9792%2028.8332%2015.2876%2028.579%2014.6459C28.5665%2014.6084%2028.554%2014.5751%2028.5373%2014.5417C28.5248%2014.5042%2028.5082%2014.4709%2028.4957%2014.4376C28.2165%2013.8042%2027.8165%2013.2292%2027.2915%2012.7042C26.7707%2012.1792%2026.1915%2011.7792%2025.5582%2011.5001C25.5248%2011.4876%2025.4915%2011.4709%2025.454%2011.4584C25.4207%2011.4417%2025.3873%2011.4292%2025.354%2011.4167C24.7082%2011.1667%2024.0165%2011.0417%2023.279%2011.0417C22.5373%2011.0417%2021.8457%2011.1667%2021.204%2011.4167C21.1665%2011.4292%2021.1332%2011.4417%2021.0998%2011.4584C21.0623%2011.4709%2021.029%2011.4876%2020.9957%2011.5001C20.3623%2011.7792%2019.7832%2012.1792%2019.2623%2012.7042L17.4832%2014.4792C17.379%2014.5834%2017.2998%2014.7001%2017.2498%2014.8292C17.204%2014.9501%2017.179%2015.0751%2017.179%2015.2167C17.179%2015.3542%2017.204%2015.4834%2017.2498%2015.6042C17.2998%2015.7292%2017.379%2015.8459%2017.4832%2015.9542C17.5915%2016.0584%2017.7082%2016.1376%2017.8332%2016.1876C17.954%2016.2334%2018.0832%2016.2584%2018.2207%2016.2584C18.3623%2016.2584%2018.4915%2016.2334%2018.6082%2016.1876C18.7373%2016.1376%2018.854%2016.0584%2018.9582%2015.9542L20.7332%2014.1751C21.0873%2013.8209%2021.4748%2013.5584%2021.8957%2013.3834C22.3165%2013.2084%2022.779%2013.1251%2023.279%2013.1251C23.7748%2013.1251%2024.2373%2013.2084%2024.6582%2013.3834C25.079%2013.5584%2025.4665%2013.8209%2025.8207%2014.1751C26.1748%2014.5292%2026.4373%2014.9167%2026.6123%2015.3376C26.7873%2015.7584%2026.8748%2016.2167%2026.8748%2016.7209C26.8748%2017.2209%2026.7873%2017.6792%2026.6123%2018.1001C26.4373%2018.5209%2026.1748%2018.9084%2025.8207%2019.2626ZM13.3832%2021.8959C13.5582%2021.4751%2013.8207%2021.0876%2014.1748%2020.7334L15.954%2018.9584C16.0582%2018.8542%2016.1373%2018.7376%2016.1873%2018.6084C16.2332%2018.4876%2016.2582%2018.3626%2016.2582%2018.2209C16.2582%2018.0834%2016.2332%2017.9542%2016.1873%2017.8334C16.1373%2017.7084%2016.0582%2017.5917%2015.954%2017.4834C15.7082%2017.2417%2015.4623%2017.1167%2015.2165%2017.1167C14.9707%2017.1167%2014.7248%2017.2417%2014.479%2017.4834L12.704%2019.2626C12.179%2019.7876%2011.779%2020.3626%2011.4998%2020.9959C11.4873%2021.0292%2011.4707%2021.0626%2011.4582%2021.1001C11.4415%2021.1334%2011.429%2021.1667%2011.4165%2021.2042C11.1665%2021.8459%2011.0415%2022.5376%2011.0415%2023.2792C11.0415%2024.0167%2011.1665%2024.7084%2011.4165%2025.3542C11.429%2025.3876%2011.4415%2025.4209%2011.4582%2025.4584C11.4707%2025.4917%2011.4873%2025.5251%2011.4998%2025.5584C11.779%2026.1917%2012.179%2026.7709%2012.704%2027.2917C13.2248%2027.8167%2013.804%2028.2167%2014.4373%2028.4959C14.4707%2028.5084%2014.504%2028.5251%2014.5415%2028.5376C14.5748%2028.5542%2014.6082%2028.5667%2014.6457%2028.5792C15.2873%2028.8292%2015.979%2028.9584%2016.7207%2028.9584C17.4582%2028.9584%2018.1498%2028.8292%2018.7915%2028.5792C18.829%2028.5667%2018.8623%2028.5542%2018.8957%2028.5376C18.9332%2028.5251%2018.9665%2028.5084%2018.9998%2028.4959C19.6332%2028.2167%2020.2123%2027.8167%2020.7332%2027.2917L22.5123%2025.5167C22.6165%2025.4126%2022.6957%2025.2959%2022.7457%2025.1667C22.7915%2025.0459%2022.8165%2024.9209%2022.8165%2024.7792C22.8165%2024.6417%2022.7915%2024.5126%2022.7457%2024.3917C22.6957%2024.2667%2022.6165%2024.1501%2022.5123%2024.0417C22.2665%2023.8001%2022.0207%2023.6751%2021.7748%2023.6751C21.529%2023.6751%2021.2832%2023.8001%2021.0373%2024.0417L19.2623%2025.8209C18.9082%2026.1751%2018.5207%2026.4376%2018.0998%2026.6126C17.679%2026.7876%2017.2165%2026.8751%2016.7207%2026.8751C16.2207%2026.8751%2015.7582%2026.7876%2015.3373%2026.6126C14.9165%2026.4376%2014.529%2026.1751%2014.1748%2025.8209C13.8207%2025.4667%2013.5582%2025.0792%2013.3832%2024.6584C13.2082%2024.2376%2013.1248%2023.7792%2013.1248%2023.2792C13.1248%2022.7751%2013.2082%2022.3167%2013.3832%2021.8959Z'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20fill-rule='evenodd'%20/%3e%3cpath%20id='path6'%20d='M21.8127%2016.7458C21.746%2016.7874%2021.6877%2016.8374%2021.6293%2016.8916L16.8918%2021.6291C16.8377%2021.6874%2016.7877%2021.7499%2016.746%2021.8124C16.7127%2021.8624%2016.6877%2021.9166%2016.6627%2021.9749C16.6377%2022.0374%2016.6168%2022.1041%2016.6043%2022.1708C16.5918%2022.2333%2016.5835%2022.2999%2016.5835%2022.3666C16.5835%2022.4333%2016.5918%2022.4999%2016.6043%2022.5666C16.6168%2022.6333%2016.6377%2022.6999%2016.6627%2022.7624C16.6877%2022.8166%2016.7127%2022.8708%2016.746%2022.9208C16.7877%2022.9874%2016.8377%2023.0499%2016.8918%2023.1041C16.946%2023.1583%2017.0085%2023.2083%2017.0752%2023.2499C17.1252%2023.2833%2017.1793%2023.3083%2017.2335%2023.3333C17.3002%2023.3583%2017.3627%2023.3791%2017.4293%2023.3916C17.496%2023.4041%2017.5627%2023.4124%2017.6293%2023.4124C17.696%2023.4124%2017.7627%2023.4041%2017.8252%2023.3916C17.8918%2023.3791%2017.9585%2023.3583%2018.021%2023.3333C18.0793%2023.3083%2018.1335%2023.2833%2018.1835%2023.2499C18.246%2023.2083%2018.3085%2023.1583%2018.3668%2023.1041L23.1043%2018.3666C23.1585%2018.3083%2023.2085%2018.2499%2023.2502%2018.1833C23.2835%2018.1333%2023.3085%2018.0791%2023.3335%2018.0208C23.3585%2017.9583%2023.3793%2017.8916%2023.3918%2017.8249C23.4043%2017.7624%2023.4127%2017.6958%2023.4127%2017.6291C23.4127%2017.5624%2023.4043%2017.4958%2023.3918%2017.4291C23.3793%2017.3624%2023.3585%2017.2999%2023.3335%2017.2333C23.3085%2017.1791%2023.2835%2017.1249%2023.2502%2017.0749C23.2085%2017.0083%2023.1585%2016.9458%2023.1043%2016.8916C23.046%2016.8374%2022.9877%2016.7874%2022.921%2016.7458C22.871%2016.7124%2022.8168%2016.6874%2022.7627%2016.6624C22.696%2016.6374%2022.6335%2016.6166%2022.5668%2016.6041C22.5002%2016.5916%2022.4335%2016.5833%2022.3668%2016.5833C22.3002%2016.5833%2022.2335%2016.5916%2022.171%2016.6041C22.1043%2016.6166%2022.0377%2016.6374%2021.9752%2016.6624C21.9168%2016.6874%2021.8627%2016.7124%2021.8127%2016.7458Z'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20fill-rule='evenodd'%20/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e", a2 = "data:image/svg+xml,%3csvg%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='40.000000'%20height='40.000000'%20fill='none'%20customFrame='url(%23clipPath_0)'%3e%3cdefs%3e%3cclipPath%20id='clipPath_0'%3e%3crect%20width='40.000000'%20height='40.000000'%20x='0.000000'%20y='0.000000'%20rx='12.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_1'%3e%3crect%20width='24.000000'%20height='24.000000'%20x='8.000000'%20y='8.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3cclipPath%20id='clipPath_2'%3e%3crect%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='10.000000'%20fill='rgb(255,255,255)'%20/%3e%3c/clipPath%3e%3c/defs%3e%3crect%20id='1'%20width='40.000000'%20height='40.000000'%20x='0.000000'%20y='0.000000'%20rx='12.000000'%20fill='rgb(236,250,254)'%20/%3e%3cg%20id='车辆'%20clip-path='url(%23clipPath_1)'%20customFrame='url(%23clipPath_1)'%3e%3crect%20id='车辆'%20width='24.000000'%20height='24.000000'%20x='8.000000'%20y='8.000000'%20/%3e%3cg%20id='编组'%3e%3cg%20id='ic_public_qrcode'%20clip-path='url(%23clipPath_2)'%20customFrame='url(%23clipPath_2)'%3e%3crect%20id='ic_public_qrcode'%20width='20.000000'%20height='20.000000'%20x='10.000000'%20y='10.000000'%20/%3e%3cg%20id='ic_public_qrcode_1_1'%3e%3cpath%20id='ic_public_qrcode_2_0'%20d='M10.6273%2019.9924C10.6273%2018.5277%2010.6222%2017.0631%2010.6273%2015.5985C10.6243%2014.8898%2010.7114%2014.1836%2010.8865%2013.4968C11.2702%2012.0432%2012.2171%2011.1805%2013.6693%2010.8458C14.3974%2010.6885%2015.1411%2010.6148%2015.886%2010.6261C18.6946%2010.6261%2021.5035%2010.6261%2024.3127%2010.6261C25.0221%2010.6217%2025.7295%2010.7029%2026.4195%2010.8678C27.9156%2011.2339%2028.8134%2012.1816%2029.1554%2013.6725C29.3092%2014.3772%2029.3826%2015.097%2029.3744%2015.8182C29.3744%2018.6571%2029.3744%2021.4963%2029.3744%2024.3357C29.3782%2025.0383%2029.2973%2025.7388%2029.1334%2026.422C28.7673%2027.9189%2027.8153%2028.8123%2026.3243%2029.1543C25.5961%2029.311%2024.8524%2029.3847%2024.1076%2029.374C21.3107%2029.374%2018.514%2029.374%2015.7176%2029.374C15.0027%2029.3798%2014.2897%2029.2999%2013.5939%2029.136C12.0912%2028.7698%2011.189%2027.8178%2010.8477%2026.3195C10.6734%2025.5579%2010.6273%2024.7941%2010.6273%2024.0237C10.6273%2022.6802%2010.6273%2021.3364%2010.6273%2019.9924Z'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20fill-rule='nonzero'%20/%3e%3cpath%20id='ic_public_qrcode_2_0'%20d='M10.6273%2015.5985C10.6243%2014.8898%2010.7114%2014.1836%2010.8865%2013.4968C11.2702%2012.0432%2012.2171%2011.1805%2013.6693%2010.8458C14.3974%2010.6885%2015.1411%2010.6148%2015.886%2010.6261C18.6946%2010.6261%2021.5035%2010.6261%2024.3127%2010.6261C25.0221%2010.6217%2025.7295%2010.7029%2026.4195%2010.8678C27.9156%2011.2339%2028.8134%2012.1816%2029.1554%2013.6725C29.3092%2014.3772%2029.3826%2015.097%2029.3744%2015.8182C29.3744%2018.6571%2029.3744%2021.4963%2029.3744%2024.3357C29.3782%2025.0383%2029.2973%2025.7388%2029.1334%2026.422C28.7673%2027.9189%2027.8153%2028.8123%2026.3243%2029.1543C25.5961%2029.311%2024.8524%2029.3847%2024.1076%2029.374C21.3107%2029.374%2018.514%2029.374%2015.7176%2029.374C15.0027%2029.3798%2014.2897%2029.2999%2013.5939%2029.136C12.0912%2028.7698%2011.189%2027.8178%2010.8477%2026.3195C10.6734%2025.5579%2010.6273%2024.7941%2010.6273%2024.0237C10.6273%2022.6802%2010.6273%2021.3364%2010.6273%2019.9924C10.6273%2018.5277%2010.6222%2017.0631%2010.6273%2015.5985Z'%20fill-rule='nonzero'%20stroke='rgb(255,255,255)'%20stroke-opacity='0'%20stroke-width='1.25'%20/%3e%3cpath%20id='ic_public_qrcode_2_1'%20d='M10.6273%2015.5985C10.6243%2014.8898%2010.7114%2014.1836%2010.8865%2013.4968C11.2702%2012.0432%2012.2171%2011.1805%2013.6693%2010.8458C14.3974%2010.6885%2015.1411%2010.6148%2015.886%2010.6261C18.6946%2010.6261%2021.5035%2010.6261%2024.3127%2010.6261C25.0221%2010.6217%2025.7295%2010.7029%2026.4195%2010.8678C27.9156%2011.2339%2028.8134%2012.1816%2029.1554%2013.6725C29.3092%2014.3772%2029.3826%2015.097%2029.3744%2015.8182C29.3744%2018.6571%2029.3744%2021.4963%2029.3744%2024.3357C29.3782%2025.0383%2029.2973%2025.7388%2029.1334%2026.422C28.7673%2027.9189%2027.8153%2028.8123%2026.3243%2029.1543C25.5961%2029.311%2024.8524%2029.3847%2024.1076%2029.374C21.3107%2029.374%2018.514%2029.374%2015.7176%2029.374C15.0027%2029.3798%2014.2897%2029.2999%2013.5939%2029.136C12.0912%2028.7698%2011.189%2027.8178%2010.8477%2026.3195C10.6734%2025.5579%2010.6273%2024.7941%2010.6273%2024.0237C10.6273%2022.6802%2010.6273%2021.3364%2010.6273%2019.9924C10.6273%2018.5277%2010.6222%2017.0631%2010.6273%2015.5985Z'%20opacity='0.200000003'%20fill-rule='nonzero'%20stroke='rgb(255,255,255)'%20stroke-opacity='0'%20stroke-width='1.25'%20/%3e%3ccircle%20id='ic_public_qrcode_2_2'%20cx='20'%20cy='20'%20r='10'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20/%3e%3cpath%20id='ic_public_qrcode_2_3'%20d='M17.5%2011.25C17.9602%2011.25%2018.3333%2011.6231%2018.3333%2012.0833L18.3333%2017.5C18.3333%2017.9602%2017.9602%2018.3333%2017.5%2018.3333L12.0833%2018.3333C11.6231%2018.3333%2011.25%2017.9602%2011.25%2017.5L11.25%2012.0833C11.25%2011.6231%2011.6231%2011.25%2012.0833%2011.25L17.5%2011.25ZM17.5%2021.6667C17.9602%2021.6667%2018.3333%2022.0398%2018.3333%2022.5L18.3333%2027.9167C18.3333%2028.3769%2017.9602%2028.75%2017.5%2028.75L12.0833%2028.75C11.6231%2028.75%2011.25%2028.3769%2011.25%2027.9167L11.25%2022.5C11.25%2022.0398%2011.6231%2021.6667%2012.0833%2021.6667L17.5%2021.6667ZM27.9167%2011.25C28.3769%2011.25%2028.75%2011.6231%2028.75%2012.0833L28.75%2017.5C28.75%2017.9602%2028.3769%2018.3333%2027.9167%2018.3333L22.5%2018.3333C22.0398%2018.3333%2021.6667%2017.9602%2021.6667%2017.5L21.6667%2012.0833C21.6667%2011.6231%2022.0398%2011.25%2022.5%2011.25L27.9167%2011.25Z'%20fill-rule='evenodd'%20stroke='rgb(14,191,241)'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.25'%20/%3e%3cpath%20id='ic_public_qrcode_2_4'%20d='M17.5002%2010.8333C18.1905%2010.8333%2018.7502%2011.3929%2018.7502%2012.0833L18.7502%2017.4999C18.7502%2018.1903%2018.1905%2018.7499%2017.5002%2018.7499L12.0835%2018.7499C11.3931%2018.7499%2010.8335%2018.1903%2010.8335%2017.4999L10.8335%2012.0833C10.8335%2011.3929%2011.3931%2010.8333%2012.0835%2010.8333L17.5002%2010.8333ZM17.5002%2011.6666L12.0835%2011.6666C11.8534%2011.6666%2011.6668%2011.8531%2011.6668%2012.0833L11.6668%2017.4999C11.6668%2017.73%2011.8534%2017.9166%2012.0835%2017.9166L17.5002%2017.9166C17.7303%2017.9166%2017.9168%2017.73%2017.9168%2017.4999L17.9168%2012.0833C17.9168%2011.8531%2017.7303%2011.6666%2017.5002%2011.6666ZM17.5002%2021.2499C18.1905%2021.2499%2018.7502%2021.8096%2018.7502%2022.4999L18.7502%2027.9166C18.7502%2028.6069%2018.1905%2029.1666%2017.5002%2029.1666L12.0835%2029.1666C11.3931%2029.1666%2010.8335%2028.6069%2010.8335%2027.9166L10.8335%2022.4999C10.8335%2021.8096%2011.3931%2021.2499%2012.0835%2021.2499L17.5002%2021.2499ZM17.5002%2022.0833L12.0835%2022.0833C11.8534%2022.0833%2011.6668%2022.2698%2011.6668%2022.4999L11.6668%2027.9166C11.6668%2028.1467%2011.8534%2028.3333%2012.0835%2028.3333L17.5002%2028.3333C17.7303%2028.3333%2017.9168%2028.1467%2017.9168%2027.9166L17.9168%2022.4999C17.9168%2022.2698%2017.7303%2022.0833%2017.5002%2022.0833ZM27.9168%2010.8333C28.6072%2010.8333%2029.1668%2011.3929%2029.1668%2012.0833L29.1668%2017.4999C29.1668%2018.1903%2028.6072%2018.7499%2027.9168%2018.7499L22.5002%2018.7499C21.8098%2018.7499%2021.2502%2018.1903%2021.2502%2017.4999L21.2502%2012.0833C21.2502%2011.3929%2021.8098%2010.8333%2022.5002%2010.8333L27.9168%2010.8333ZM27.9168%2011.6666L22.5002%2011.6666C22.27%2011.6666%2022.0835%2011.8531%2022.0835%2012.0833L22.0835%2017.4999C22.0835%2017.73%2022.27%2017.9166%2022.5002%2017.9166L27.9168%2017.9166C28.1469%2017.9166%2028.3335%2017.73%2028.3335%2017.4999L28.3335%2012.0833C28.3335%2011.8531%2028.1469%2011.6666%2027.9168%2011.6666Z'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20fill-rule='nonzero'%20/%3e%3cpath%20id='ic_public_qrcode_2_4'%20d='M18.7502%2012.0833L18.7502%2017.4999C18.7502%2018.1903%2018.1905%2018.7499%2017.5002%2018.7499L12.0835%2018.7499C11.3931%2018.7499%2010.8335%2018.1903%2010.8335%2017.4999L10.8335%2012.0833C10.8335%2011.3929%2011.3931%2010.8333%2012.0835%2010.8333L17.5002%2010.8333C18.1905%2010.8333%2018.7502%2011.3929%2018.7502%2012.0833ZM12.0835%2011.6666C11.8534%2011.6666%2011.6668%2011.8531%2011.6668%2012.0833L11.6668%2017.4999C11.6668%2017.73%2011.8534%2017.9166%2012.0835%2017.9166L17.5002%2017.9166C17.7303%2017.9166%2017.9168%2017.73%2017.9168%2017.4999L17.9168%2012.0833C17.9168%2011.8531%2017.7303%2011.6666%2017.5002%2011.6666L12.0835%2011.6666ZM18.7502%2022.4999L18.7502%2027.9166C18.7502%2028.6069%2018.1905%2029.1666%2017.5002%2029.1666L12.0835%2029.1666C11.3931%2029.1666%2010.8335%2028.6069%2010.8335%2027.9166L10.8335%2022.4999C10.8335%2021.8096%2011.3931%2021.2499%2012.0835%2021.2499L17.5002%2021.2499C18.1905%2021.2499%2018.7502%2021.8096%2018.7502%2022.4999ZM12.0835%2022.0833C11.8534%2022.0833%2011.6668%2022.2698%2011.6668%2022.4999L11.6668%2027.9166C11.6668%2028.1467%2011.8534%2028.3333%2012.0835%2028.3333L17.5002%2028.3333C17.7303%2028.3333%2017.9168%2028.1467%2017.9168%2027.9166L17.9168%2022.4999C17.9168%2022.2698%2017.7303%2022.0833%2017.5002%2022.0833L12.0835%2022.0833ZM29.1668%2012.0833L29.1668%2017.4999C29.1668%2018.1903%2028.6072%2018.7499%2027.9168%2018.7499L22.5002%2018.7499C21.8098%2018.7499%2021.2502%2018.1903%2021.2502%2017.4999L21.2502%2012.0833C21.2502%2011.3929%2021.8098%2010.8333%2022.5002%2010.8333L27.9168%2010.8333C28.6072%2010.8333%2029.1668%2011.3929%2029.1668%2012.0833ZM22.5002%2011.6666C22.27%2011.6666%2022.0835%2011.8531%2022.0835%2012.0833L22.0835%2017.4999C22.0835%2017.73%2022.27%2017.9166%2022.5002%2017.9166L27.9168%2017.9166C28.1469%2017.9166%2028.3335%2017.73%2028.3335%2017.4999L28.3335%2012.0833C28.3335%2011.8531%2028.1469%2011.6666%2027.9168%2011.6666L22.5002%2011.6666Z'%20fill-rule='nonzero'%20stroke='rgb(255,255,255)'%20stroke-opacity='0'%20stroke-linejoin='round'%20stroke-width='1.25'%20/%3e%3cpath%20id='ic_public_qrcode_2_5'%20d='M27.9165%2021.6667L27.9165%2024.5834L28.7498%2024.5834L28.7498%2021.6667L27.9165%2021.6667ZM24.5832%2021.6667L24.5832%2022.639L24.5828%2022.6388L24.5832%2024.5834L23.6109%2024.5834L23.6107%2022.6388L21.6665%2022.639L21.6665%2021.6667L24.5832%2021.6667ZM21.6665%2025.8334L21.6665%2028.7501L22.4998%2028.7501L22.4998%2025.8334L21.6665%2025.8334ZM27.9165%2027.9167L27.9165%2028.7501L28.7498%2028.7501L28.7498%2027.9167L27.9165%2027.9167ZM25.8332%2025.8334L25.8332%2026.6667L26.6665%2026.6667L26.6665%2025.8334L25.8332%2025.8334Z'%20fill='rgb(14,191,241)'%20fill-rule='nonzero'%20/%3e%3cpath%20id='ic_public_qrcode_2_5'%20d='M27.9165%2024.5834L28.7498%2024.5834L28.7498%2021.6667L27.9165%2021.6667L27.9165%2024.5834ZM24.5832%2022.639L24.5828%2022.6388L24.5832%2024.5834L23.6109%2024.5834L23.6107%2022.6388L21.6665%2022.639L21.6665%2021.6667L24.5832%2021.6667L24.5832%2022.639ZM21.6665%2028.7501L22.4998%2028.7501L22.4998%2025.8334L21.6665%2025.8334L21.6665%2028.7501ZM27.9165%2028.7501L28.7498%2028.7501L28.7498%2027.9167L27.9165%2027.9167L27.9165%2028.7501ZM25.8332%2026.6667L26.6665%2026.6667L26.6665%2025.8334L25.8332%2025.8334L25.8332%2026.6667Z'%20fill-rule='nonzero'%20stroke='rgb(14,191,241)'%20stroke-linejoin='round'%20stroke-width='1.25'%20/%3e%3cpath%20id='ic_public_qrcode_2_6'%20d='M14.375%2014.375L14.375%2015.2083L15.2083%2015.2083L15.2083%2014.375L14.375%2014.375ZM14.375%2024.7917L14.375%2025.625L15.2083%2025.625L15.2083%2024.7917L14.375%2024.7917ZM24.7917%2014.375L24.7917%2015.2083L25.625%2015.2083L25.625%2014.375L24.7917%2014.375Z'%20fill='rgb(14,191,241)'%20fill-rule='nonzero'%20/%3e%3cpath%20id='ic_public_qrcode_2_6'%20d='M14.375%2015.2083L15.2083%2015.2083L15.2083%2014.375L14.375%2014.375L14.375%2015.2083ZM14.375%2025.625L15.2083%2025.625L15.2083%2024.7917L14.375%2024.7917L14.375%2025.625ZM24.7917%2015.2083L25.625%2015.2083L25.625%2014.375L24.7917%2014.375L24.7917%2015.2083Z'%20fill-rule='nonzero'%20stroke='rgb(14,191,241)'%20stroke-linejoin='round'%20stroke-width='1.25'%20/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e", c2 = "data:image/svg+xml,%3csvg%20viewBox='0%200%2012%2012'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='12.000000'%20height='12.000000'%20fill='none'%3e%3cdefs%3e%3cfilter%20id='pixso_custom_mask_type_luminance'%3e%3cfeColorMatrix%20type='matrix'%20values='1%200%200%200%200%200%201%200%200%200%200%200%201%200%200%200%200%200%201%200%20'%20/%3e%3c/filter%3e%3c/defs%3e%3cmask%20id='mask_0'%20width='11.999876'%20height='11.999876'%20x='0.000000'%20y='0.000000'%20maskUnits='userSpaceOnUse'%3e%3cg%20filter='url(%23pixso_custom_mask_type_luminance)'%3e%3cg%20id='mask401_19830'%3e%3cpath%20id='蒙版'%20d='M0%200L11.9999%200L11.9999%2011.9999L0%2011.9999L0%200ZM2.69992%201.34999L8.09977%201.34999C9.5082%201.34999%2010.6498%202.49167%2010.6498%203.89998L10.6498%209.2999C10.6498%2010.7082%209.5082%2011.8499%208.09977%2011.8499L2.69992%2011.8499C1.29149%2011.8499%200.149901%2010.7082%200.149901%209.2999L0.149901%203.89998C0.149901%202.49167%201.29149%201.34999%202.69992%201.34999Z'%20fill='rgb(196,196,196)'%20fill-rule='evenodd'%20/%3e%3c/g%3e%3c/g%3e%3c/mask%3e%3crect%20id='ic_public_copy'%20width='12.000000'%20height='12.000000'%20x='0.000000'%20y='0.000000'%20/%3e%3crect%20id='ic_public_copy-复制/base/ic_public_copy'%20width='11.999876'%20height='11.999876'%20x='0.000000'%20y='0.000000'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20/%3e%3cpath%20id='path1'%20d='M0.000134537%205.99497C0.000134537%205.05748%20-0.00236544%204.11999%200.000134537%203.1825C-0.00236544%202.72751%200.055134%202.27501%200.165133%201.83752C0.41263%200.907526%201.01762%200.355032%201.94761%200.140034C2.41261%200.040035%202.8901%20-0.00746449%203.3651%203.54269e-05C5.16258%203.54269e-05%206.96006%203.54269e-05%208.76004%203.54269e-05C9.21254%20-0.00246455%209.66503%200.0475349%2010.1075%200.155034C11.065%200.387531%2011.64%200.995025%2011.8575%201.95002C11.9575%202.40001%2012.005%202.86001%2011.9975%203.3225C11.9975%205.13998%2011.9975%206.95746%2011.9975%208.77244C12%209.22244%2011.95%209.67243%2011.845%2010.1099C11.61%2011.0674%2011%2011.6374%2010.0475%2011.8574C9.58003%2011.9574%209.10504%2012.0049%208.62754%2011.9974C6.83756%2011.9974%205.04758%2011.9974%203.2576%2011.9974C2.80011%2012.0024%202.34511%2011.9499%201.90011%2011.8449C0.937625%2011.6124%200.360131%2011.0024%200.142633%2010.0424C0.0301342%209.55494%200.000134537%209.06744%200.000134537%208.57495C0.000134537%207.71495%200.000134537%206.85496%200.000134537%205.99497Z'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20fill-rule='evenodd'%20/%3e%3ccircle%20id='path2'%20cx='5.99993801'%20cy='5.99993801'%20r='5.99993801'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20/%3e%3cg%20id='mask'%20mask='url(%23mask_0)'%3e%3cg%20id='组合%208'%3e%3cpath%20id='path'%20d='M11.1%203.89993L11.1%206.8999C11.1%208.55488%209.75502%209.89737%208.10004%209.89737L5.10007%209.89737C3.44258%209.89737%202.1001%208.55488%202.1001%206.8999L2.1001%203.89993C2.1001%202.24245%203.44258%200.897461%205.10007%200.897461L8.10004%200.897461C9.75502%200.897461%2011.1%202.24245%2011.1%203.89993Z'%20fill-rule='nonzero'%20stroke='rgb(25,25,25)'%20stroke-linejoin='round'%20stroke-width='0.749992251'%20/%3e%3c/g%3e%3c/g%3e%3cpath%20id='path4'%20d='M2.10008%202.39746L8.10002%202.39746C8.92751%202.39746%209.6%203.06995%209.6%203.89995L9.6%209.89738C9.6%2010.7274%208.92751%2011.3999%208.10002%2011.3999L2.10008%2011.3999C1.27009%2011.3999%200.600098%2010.7274%200.600098%209.89738L0.600098%203.89995C0.600098%203.06995%201.27009%202.39746%202.10008%202.39746Z'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20fill-rule='evenodd'%20/%3e%3cpath%20id='path4'%20d='M9.6%203.89995L9.6%209.89738C9.6%2010.7274%208.92751%2011.3999%208.10002%2011.3999L2.10008%2011.3999C1.27009%2011.3999%200.600098%2010.7274%200.600098%209.89738L0.600098%203.89995C0.600098%203.06995%201.27009%202.39746%202.10008%202.39746L8.10002%202.39746C8.92751%202.39746%209.6%203.06995%209.6%203.89995Z'%20fill-rule='nonzero'%20stroke='rgb(25,25,25)'%20stroke-linejoin='round'%20stroke-width='0.749992251'%20/%3e%3c/svg%3e", l2 = "https://chat.opentiny.design", u2 = "https://ai.opentiny.design/next-remoter", d2 = "https://ai.opentiny.design/next-remoter/svgs/logo-next-no-bg-left.svg", $e = (r) => [
903
905
  {
904
906
  action: "qr-code",
905
907
  show: !0,
906
908
  text: "扫码登录",
907
909
  desc: "使用手机遥控页面",
908
- icon: Ie
910
+ icon: a2
909
911
  },
910
912
  {
911
913
  action: "ai-chat",
912
914
  show: !0,
913
915
  text: "打开对话框",
914
916
  desc: "支持在网页端操作AI",
915
- icon: Ee
917
+ icon: n2
916
918
  },
917
919
  {
918
920
  action: "remote-url",
@@ -922,7 +924,7 @@ const Ee = "data:image/svg+xml,%3csvg%20viewBox='0%200%2040%2039.9692'%20xmlns='
922
924
  active: !0,
923
925
  tip: r.remoteUrl,
924
926
  showCopyIcon: !0,
925
- icon: ke
927
+ icon: i2
926
928
  },
927
929
  {
928
930
  action: "remote-control",
@@ -931,10 +933,10 @@ const Ee = "data:image/svg+xml,%3csvg%20viewBox='0%200%2040%2039.9692'%20xmlns='
931
933
  desc: `${r.sessionId.slice(-6)}`,
932
934
  know: !0,
933
935
  showCopyIcon: !0,
934
- icon: Pe
936
+ icon: o2
935
937
  }
936
938
  ];
937
- class qe {
939
+ class h2 {
938
940
  constructor(e) {
939
941
  if (this.isExpanded = !1, this.closingTimer = 0, this.getImageUrl = (t) => {
940
942
  if (!t) return;
@@ -945,12 +947,12 @@ class qe {
945
947
  const s = document.getElementById(`tiny-remoter-icon-item-${t.action}`);
946
948
  if (!s) return;
947
949
  s.innerHTML = "";
948
- const i = this.getImageUrl(t.icon);
949
- i && s.appendChild(i);
950
+ const n = this.getImageUrl(t.icon);
951
+ n && s.appendChild(n);
950
952
  });
951
953
  }, this.readyTips = (t) => {
952
954
  const s = document.getElementById(t);
953
- s && new Re(s, {
955
+ s && new s2(s, {
954
956
  content: "复制",
955
957
  placement: "top",
956
958
  trigger: "hover"
@@ -959,9 +961,9 @@ class qe {
959
961
  throw new Error("sessionId is required");
960
962
  this.options = {
961
963
  ...e,
962
- qrCodeUrl: e.qrCodeUrl || Oe,
963
- remoteUrl: e.remoteUrl || Ae,
964
- logoUrl: e.logoUrl || $e
964
+ qrCodeUrl: e.qrCodeUrl || u2,
965
+ remoteUrl: e.remoteUrl || l2,
966
+ logoUrl: e.logoUrl || d2
965
967
  }, e.menuItems && e.menuItems.length === 0 ? this.menuItems = [] : this.menuItems = this.mergeMenuItems(e.menuItems), this.init();
966
968
  }
967
969
  // 计算 sessionPrefix 属性
@@ -974,15 +976,15 @@ class qe {
974
976
  * @returns 合并后的菜单项配置
975
977
  */
976
978
  mergeMenuItems(e) {
977
- return e ? y2(this.options).map((t) => {
978
- const s = e.find((i) => i.action === t.action);
979
+ return e ? $e(this.options).map((t) => {
980
+ const s = e.find((n) => n.action === t.action);
979
981
  return s ? {
980
982
  ...t,
981
983
  ...s,
982
984
  // 确保show属性存在,默认为true
983
985
  show: s.show !== void 0 ? s.show : t.show
984
986
  } : t;
985
- }) : y2(this.options);
987
+ }) : $e(this.options);
986
988
  }
987
989
  init() {
988
990
  this.createFloatingBlock(), this.createDropdownMenu(), this.bindEvents(), this.addStyles();
@@ -1010,7 +1012,7 @@ class qe {
1010
1012
  <div>
1011
1013
  ${t.showCopyIcon ? `
1012
1014
  <div class="tiny-remoter-copy-icon" id="${t.action}" data-action="${t.action}">
1013
- <img src="${Ue}"/>
1015
+ <img src="${c2}"/>
1014
1016
  </div>
1015
1017
  ` : ""}
1016
1018
  </div>
@@ -1040,8 +1042,8 @@ class qe {
1040
1042
  a && this.handleAction(a);
1041
1043
  return;
1042
1044
  }
1043
- const n = t.closest(".tiny-remoter-dropdown-item")?.dataset.action;
1044
- n && this.handleAction(n);
1045
+ const i = t.closest(".tiny-remoter-dropdown-item")?.dataset.action;
1046
+ i && this.handleAction(i);
1045
1047
  }), document.addEventListener("click", (e) => {
1046
1048
  const t = e.target;
1047
1049
  !this.floatingBlock.contains(t) && !this.dropdownMenu.contains(t) && this.closeDropdown();
@@ -1110,7 +1112,7 @@ class qe {
1110
1112
  }
1111
1113
  // 创建二维码弹窗
1112
1114
  async showQRCode() {
1113
- const t = await new Te((this.options.qrCodeUrl || "") + this.sessionPrefix + this.options.sessionId, {}).toDataURL(), s = this.createModal(
1115
+ const t = await new t2((this.options.qrCodeUrl || "") + this.sessionPrefix + this.options.sessionId, {}).toDataURL(), s = this.createModal(
1114
1116
  "扫码前往智能遥控器",
1115
1117
  `
1116
1118
  <div style="text-align: center; padding: 32px;">
@@ -1215,8 +1217,8 @@ class qe {
1215
1217
  </div>
1216
1218
  </div>
1217
1219
  `;
1218
- const i = s.querySelector(".tiny-remoter-modal-close"), n = s.querySelector(".tiny-remoter-modal-overlay");
1219
- return i.addEventListener("click", () => this.hideModal(s)), n.addEventListener("click", () => this.hideModal(s)), s;
1220
+ const n = s.querySelector(".tiny-remoter-modal-close"), i = s.querySelector(".tiny-remoter-modal-overlay");
1221
+ return n.addEventListener("click", () => this.hideModal(s)), i.addEventListener("click", () => this.hideModal(s)), s;
1220
1222
  }
1221
1223
  showModal(e) {
1222
1224
  document.body.appendChild(e), setTimeout(() => e.classList.add("show"), 10);
@@ -1570,157 +1572,157 @@ class qe {
1570
1572
  this.floatingBlock.parentNode && this.floatingBlock.parentNode.removeChild(this.floatingBlock), this.dropdownMenu.parentNode && this.dropdownMenu.parentNode.removeChild(this.dropdownMenu);
1571
1573
  }
1572
1574
  }
1573
- const I0 = (r = {}) => new qe(r);
1574
- class v2 extends Error {
1575
+ const is = (r = {}) => new h2(r);
1576
+ class Ue extends Error {
1575
1577
  constructor(e, t) {
1576
1578
  super(e), this.name = "ParseError", this.type = t.type, this.field = t.field, this.value = t.value, this.line = t.line;
1577
1579
  }
1578
1580
  }
1579
- function e2(r) {
1581
+ function le(r) {
1580
1582
  }
1581
- function je(r) {
1583
+ function p2(r) {
1582
1584
  if (typeof r == "function")
1583
1585
  throw new TypeError(
1584
1586
  "`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?"
1585
1587
  );
1586
- const { onEvent: e = e2, onError: t = e2, onRetry: s = e2, onComment: i } = r;
1587
- let n = "", a = !0, h, c = "", l = "";
1588
- function d(u) {
1589
- const m = a ? u.replace(/^\xEF\xBB\xBF/, "") : u, [w, v] = He(`${n}${m}`);
1590
- for (const _ of w)
1591
- g(_);
1592
- n = v, a = !1;
1593
- }
1594
- function g(u) {
1595
- if (u === "") {
1596
- C();
1588
+ const { onEvent: e = le, onError: t = le, onRetry: s = le, onComment: n } = r;
1589
+ let i = "", a = !0, l, u = "", c = "";
1590
+ function d(p) {
1591
+ const w = a ? p.replace(/^\xEF\xBB\xBF/, "") : p, [y, b] = m2(`${i}${w}`);
1592
+ for (const x of y)
1593
+ g(x);
1594
+ i = b, a = !1;
1595
+ }
1596
+ function g(p) {
1597
+ if (p === "") {
1598
+ m();
1597
1599
  return;
1598
1600
  }
1599
- if (u.startsWith(":")) {
1600
- i && i(u.slice(u.startsWith(": ") ? 2 : 1));
1601
+ if (p.startsWith(":")) {
1602
+ n && n(p.slice(p.startsWith(": ") ? 2 : 1));
1601
1603
  return;
1602
1604
  }
1603
- const m = u.indexOf(":");
1604
- if (m !== -1) {
1605
- const w = u.slice(0, m), v = u[m + 1] === " " ? 2 : 1, _ = u.slice(m + v);
1606
- p(w, _, u);
1605
+ const w = p.indexOf(":");
1606
+ if (w !== -1) {
1607
+ const y = p.slice(0, w), b = p[w + 1] === " " ? 2 : 1, x = p.slice(w + b);
1608
+ h(y, x, p);
1607
1609
  return;
1608
1610
  }
1609
- p(u, "", u);
1611
+ h(p, "", p);
1610
1612
  }
1611
- function p(u, m, w) {
1612
- switch (u) {
1613
+ function h(p, w, y) {
1614
+ switch (p) {
1613
1615
  case "event":
1614
- l = m;
1616
+ c = w;
1615
1617
  break;
1616
1618
  case "data":
1617
- c = `${c}${m}
1619
+ u = `${u}${w}
1618
1620
  `;
1619
1621
  break;
1620
1622
  case "id":
1621
- h = m.includes("\0") ? void 0 : m;
1623
+ l = w.includes("\0") ? void 0 : w;
1622
1624
  break;
1623
1625
  case "retry":
1624
- /^\d+$/.test(m) ? s(parseInt(m, 10)) : t(
1625
- new v2(`Invalid \`retry\` value: "${m}"`, {
1626
+ /^\d+$/.test(w) ? s(parseInt(w, 10)) : t(
1627
+ new Ue(`Invalid \`retry\` value: "${w}"`, {
1626
1628
  type: "invalid-retry",
1627
- value: m,
1628
- line: w
1629
+ value: w,
1630
+ line: y
1629
1631
  })
1630
1632
  );
1631
1633
  break;
1632
1634
  default:
1633
1635
  t(
1634
- new v2(
1635
- `Unknown field "${u.length > 20 ? `${u.slice(0, 20)}…` : u}"`,
1636
- { type: "unknown-field", field: u, value: m, line: w }
1636
+ new Ue(
1637
+ `Unknown field "${p.length > 20 ? `${p.slice(0, 20)}…` : p}"`,
1638
+ { type: "unknown-field", field: p, value: w, line: y }
1637
1639
  )
1638
1640
  );
1639
1641
  break;
1640
1642
  }
1641
1643
  }
1642
- function C() {
1643
- c.length > 0 && e({
1644
- id: h,
1645
- event: l || void 0,
1644
+ function m() {
1645
+ u.length > 0 && e({
1646
+ id: l,
1647
+ event: c || void 0,
1646
1648
  // If the data buffer's last character is a U+000A LINE FEED (LF) character,
1647
1649
  // then remove the last character from the data buffer.
1648
- data: c.endsWith(`
1649
- `) ? c.slice(0, -1) : c
1650
- }), h = void 0, c = "", l = "";
1650
+ data: u.endsWith(`
1651
+ `) ? u.slice(0, -1) : u
1652
+ }), l = void 0, u = "", c = "";
1651
1653
  }
1652
- function f(u = {}) {
1653
- n && u.consume && g(n), a = !0, h = void 0, c = "", l = "", n = "";
1654
+ function C(p = {}) {
1655
+ i && p.consume && g(i), a = !0, l = void 0, u = "", c = "", i = "";
1654
1656
  }
1655
- return { feed: d, reset: f };
1657
+ return { feed: d, reset: C };
1656
1658
  }
1657
- function He(r) {
1659
+ function m2(r) {
1658
1660
  const e = [];
1659
1661
  let t = "", s = 0;
1660
1662
  for (; s < r.length; ) {
1661
- const i = r.indexOf("\r", s), n = r.indexOf(`
1663
+ const n = r.indexOf("\r", s), i = r.indexOf(`
1662
1664
  `, s);
1663
1665
  let a = -1;
1664
- if (i !== -1 && n !== -1 ? a = Math.min(i, n) : i !== -1 ? i === r.length - 1 ? a = -1 : a = i : n !== -1 && (a = n), a === -1) {
1666
+ if (n !== -1 && i !== -1 ? a = Math.min(n, i) : n !== -1 ? n === r.length - 1 ? a = -1 : a = n : i !== -1 && (a = i), a === -1) {
1665
1667
  t = r.slice(s);
1666
1668
  break;
1667
1669
  } else {
1668
- const h = r.slice(s, a);
1669
- e.push(h), s = a + 1, r[s - 1] === "\r" && r[s] === `
1670
+ const l = r.slice(s, a);
1671
+ e.push(l), s = a + 1, r[s - 1] === "\r" && r[s] === `
1670
1672
  ` && s++;
1671
1673
  }
1672
1674
  }
1673
1675
  return [e, t];
1674
1676
  }
1675
- class o2 extends TransformStream {
1677
+ class ge extends TransformStream {
1676
1678
  constructor({ onError: e, onRetry: t, onComment: s } = {}) {
1677
- let i;
1679
+ let n;
1678
1680
  super({
1679
- start(n) {
1680
- i = je({
1681
+ start(i) {
1682
+ n = p2({
1681
1683
  onEvent: (a) => {
1682
- n.enqueue(a);
1684
+ i.enqueue(a);
1683
1685
  },
1684
1686
  onError(a) {
1685
- e === "terminate" ? n.error(a) : typeof e == "function" && e(a);
1687
+ e === "terminate" ? i.error(a) : typeof e == "function" && e(a);
1686
1688
  },
1687
1689
  onRetry: t,
1688
1690
  onComment: s
1689
1691
  });
1690
1692
  },
1691
- transform(n) {
1692
- i.feed(n);
1693
+ transform(i) {
1694
+ n.feed(i);
1693
1695
  }
1694
1696
  });
1695
1697
  }
1696
1698
  }
1697
- var Ne = ({
1699
+ var f2 = ({
1698
1700
  prefix: r,
1699
1701
  size: e = 16,
1700
1702
  alphabet: t = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
1701
1703
  separator: s = "-"
1702
1704
  } = {}) => {
1703
- const i = () => {
1704
- const n = t.length, a = new Array(e);
1705
- for (let h = 0; h < e; h++)
1706
- a[h] = t[Math.random() * n | 0];
1705
+ const n = () => {
1706
+ const i = t.length, a = new Array(e);
1707
+ for (let l = 0; l < e; l++)
1708
+ a[l] = t[Math.random() * i | 0];
1707
1709
  return a.join("");
1708
1710
  };
1709
1711
  if (r == null)
1710
- return i;
1712
+ return n;
1711
1713
  if (t.includes(s))
1712
- throw new ve({
1714
+ throw new Kt({
1713
1715
  argument: "separator",
1714
1716
  message: `The separator "${s}" must not be part of the alphabet "${t}".`
1715
1717
  });
1716
- return () => `${r}${s}${i()}`;
1718
+ return () => `${r}${s}${n()}`;
1717
1719
  };
1718
- Ne();
1719
- function k2(r = globalThis) {
1720
+ f2();
1721
+ function Xe(r = globalThis) {
1720
1722
  var e, t, s;
1721
1723
  return r.window ? "runtime/browser" : (e = r.navigator) != null && e.userAgent ? `runtime/${r.navigator.userAgent.toLowerCase()}` : (s = (t = r.process) == null ? void 0 : t.versions) != null && s.node ? `runtime/node.js/${r.process.version.substring(0)}` : r.EdgeRuntime ? "runtime/vercel-edge" : "runtime/unknown";
1722
1724
  }
1723
- function ze(r) {
1725
+ function g2(r) {
1724
1726
  if (r == null)
1725
1727
  return {};
1726
1728
  const e = {};
@@ -1735,94 +1737,1156 @@ function ze(r) {
1735
1737
  }
1736
1738
  return e;
1737
1739
  }
1738
- function I2(r, ...e) {
1739
- const t = new Headers(ze(r)), s = t.get("user-agent") || "";
1740
+ function et(r, ...e) {
1741
+ const t = new Headers(g2(r)), s = t.get("user-agent") || "";
1740
1742
  return t.set(
1741
1743
  "user-agent",
1742
1744
  [s, ...e].filter(Boolean).join(" ")
1743
1745
  ), Object.fromEntries(t.entries());
1744
1746
  }
1745
- var Ze = Symbol.for("vercel.ai.validator");
1746
- function De(r) {
1747
- return { ...r, type: "dynamic" };
1747
+ var y2 = /"__proto__"\s*:/, C2 = /"constructor"\s*:/;
1748
+ function je(r) {
1749
+ const e = JSON.parse(r);
1750
+ return e === null || typeof e != "object" || y2.test(r) === !1 && C2.test(r) === !1 ? e : w2(e);
1748
1751
  }
1749
- new Set(
1752
+ function w2(r) {
1753
+ let e = [r];
1754
+ for (; e.length; ) {
1755
+ const t = e;
1756
+ e = [];
1757
+ for (const s of t) {
1758
+ if (Object.prototype.hasOwnProperty.call(s, "__proto__"))
1759
+ throw new SyntaxError("Object contains forbidden prototype property");
1760
+ if (Object.prototype.hasOwnProperty.call(s, "constructor") && Object.prototype.hasOwnProperty.call(s.constructor, "prototype"))
1761
+ throw new SyntaxError("Object contains forbidden prototype property");
1762
+ for (const n in s) {
1763
+ const i = s[n];
1764
+ i && typeof i == "object" && e.push(i);
1765
+ }
1766
+ }
1767
+ }
1768
+ return r;
1769
+ }
1770
+ function v2(r) {
1771
+ const { stackTraceLimit: e } = Error;
1772
+ try {
1773
+ Error.stackTraceLimit = 0;
1774
+ } catch {
1775
+ return je(r);
1776
+ }
1777
+ try {
1778
+ return je(r);
1779
+ } finally {
1780
+ Error.stackTraceLimit = e;
1781
+ }
1782
+ }
1783
+ function xe(r) {
1784
+ if (r.type === "object" || Array.isArray(r.type) && r.type.includes("object")) {
1785
+ r.additionalProperties = !1;
1786
+ const { properties: t } = r;
1787
+ if (t != null)
1788
+ for (const s of Object.keys(t))
1789
+ t[s] = N(t[s]);
1790
+ }
1791
+ r.items != null && (r.items = Array.isArray(r.items) ? r.items.map(N) : N(r.items)), r.anyOf != null && (r.anyOf = r.anyOf.map(N)), r.allOf != null && (r.allOf = r.allOf.map(N)), r.oneOf != null && (r.oneOf = r.oneOf.map(N));
1792
+ const { definitions: e } = r;
1793
+ if (e != null)
1794
+ for (const t of Object.keys(e))
1795
+ e[t] = N(e[t]);
1796
+ return r;
1797
+ }
1798
+ function N(r) {
1799
+ return typeof r == "boolean" ? r : xe(r);
1800
+ }
1801
+ var _2 = Symbol(
1802
+ "Let zodToJsonSchema decide on which parser to use"
1803
+ ), Ze = {
1804
+ name: void 0,
1805
+ $refStrategy: "root",
1806
+ basePath: ["#"],
1807
+ effectStrategy: "input",
1808
+ pipeStrategy: "all",
1809
+ dateStrategy: "format:date-time",
1810
+ mapStrategy: "entries",
1811
+ removeAdditionalStrategy: "passthrough",
1812
+ allowedAdditionalProperties: !0,
1813
+ rejectedAdditionalProperties: !1,
1814
+ definitionPath: "definitions",
1815
+ strictUnions: !1,
1816
+ definitions: {},
1817
+ errorMessages: !1,
1818
+ patternStrategy: "escape",
1819
+ applyRegexFlags: !1,
1820
+ emailStrategy: "format:email",
1821
+ base64Strategy: "contentEncoding:base64",
1822
+ nameStrategy: "ref"
1823
+ }, b2 = (r) => typeof r == "string" ? {
1824
+ ...Ze,
1825
+ name: r
1826
+ } : {
1827
+ ...Ze,
1828
+ ...r
1829
+ };
1830
+ function T() {
1831
+ return {};
1832
+ }
1833
+ function x2(r, e) {
1834
+ var t, s, n;
1835
+ const i = {
1836
+ type: "array"
1837
+ };
1838
+ return (t = r.type) != null && t._def && ((n = (s = r.type) == null ? void 0 : s._def) == null ? void 0 : n.typeName) !== f.ZodAny && (i.items = _(r.type._def, {
1839
+ ...e,
1840
+ currentPath: [...e.currentPath, "items"]
1841
+ })), r.minLength && (i.minItems = r.minLength.value), r.maxLength && (i.maxItems = r.maxLength.value), r.exactLength && (i.minItems = r.exactLength.value, i.maxItems = r.exactLength.value), i;
1842
+ }
1843
+ function L2(r) {
1844
+ const e = {
1845
+ type: "integer",
1846
+ format: "int64"
1847
+ };
1848
+ if (!r.checks) return e;
1849
+ for (const t of r.checks)
1850
+ switch (t.kind) {
1851
+ case "min":
1852
+ t.inclusive ? e.minimum = t.value : e.exclusiveMinimum = t.value;
1853
+ break;
1854
+ case "max":
1855
+ t.inclusive ? e.maximum = t.value : e.exclusiveMaximum = t.value;
1856
+ break;
1857
+ case "multipleOf":
1858
+ e.multipleOf = t.value;
1859
+ break;
1860
+ }
1861
+ return e;
1862
+ }
1863
+ function S2() {
1864
+ return { type: "boolean" };
1865
+ }
1866
+ function tt(r, e) {
1867
+ return _(r.type._def, e);
1868
+ }
1869
+ var P2 = (r, e) => _(r.innerType._def, e);
1870
+ function rt(r, e, t) {
1871
+ const s = t ?? e.dateStrategy;
1872
+ if (Array.isArray(s))
1873
+ return {
1874
+ anyOf: s.map((n, i) => rt(r, e, n))
1875
+ };
1876
+ switch (s) {
1877
+ case "string":
1878
+ case "format:date-time":
1879
+ return {
1880
+ type: "string",
1881
+ format: "date-time"
1882
+ };
1883
+ case "format:date":
1884
+ return {
1885
+ type: "string",
1886
+ format: "date"
1887
+ };
1888
+ case "integer":
1889
+ return k2(r);
1890
+ }
1891
+ }
1892
+ var k2 = (r) => {
1893
+ const e = {
1894
+ type: "integer",
1895
+ format: "unix-time"
1896
+ };
1897
+ for (const t of r.checks)
1898
+ switch (t.kind) {
1899
+ case "min":
1900
+ e.minimum = t.value;
1901
+ break;
1902
+ case "max":
1903
+ e.maximum = t.value;
1904
+ break;
1905
+ }
1906
+ return e;
1907
+ };
1908
+ function T2(r, e) {
1909
+ return {
1910
+ ..._(r.innerType._def, e),
1911
+ default: r.defaultValue()
1912
+ };
1913
+ }
1914
+ function M2(r, e) {
1915
+ return e.effectStrategy === "input" ? _(r.schema._def, e) : T();
1916
+ }
1917
+ function R2(r) {
1918
+ return {
1919
+ type: "string",
1920
+ enum: Array.from(r.values)
1921
+ };
1922
+ }
1923
+ var E2 = (r) => "type" in r && r.type === "string" ? !1 : "allOf" in r;
1924
+ function I2(r, e) {
1925
+ const t = [
1926
+ _(r.left._def, {
1927
+ ...e,
1928
+ currentPath: [...e.currentPath, "allOf", "0"]
1929
+ }),
1930
+ _(r.right._def, {
1931
+ ...e,
1932
+ currentPath: [...e.currentPath, "allOf", "1"]
1933
+ })
1934
+ ].filter((n) => !!n), s = [];
1935
+ return t.forEach((n) => {
1936
+ if (E2(n))
1937
+ s.push(...n.allOf);
1938
+ else {
1939
+ let i = n;
1940
+ if ("additionalProperties" in n && n.additionalProperties === !1) {
1941
+ const { additionalProperties: a, ...l } = n;
1942
+ i = l;
1943
+ }
1944
+ s.push(i);
1945
+ }
1946
+ }), s.length ? { allOf: s } : void 0;
1947
+ }
1948
+ function A2(r) {
1949
+ const e = typeof r.value;
1950
+ return e !== "bigint" && e !== "number" && e !== "boolean" && e !== "string" ? {
1951
+ type: Array.isArray(r.value) ? "array" : "object"
1952
+ } : {
1953
+ type: e === "bigint" ? "integer" : e,
1954
+ const: r.value
1955
+ };
1956
+ }
1957
+ var ue = void 0, O = {
1958
+ /**
1959
+ * `c` was changed to `[cC]` to replicate /i flag
1960
+ */
1961
+ cuid: /^[cC][^\s-]{8,}$/,
1962
+ cuid2: /^[0-9a-z]+$/,
1963
+ ulid: /^[0-9A-HJKMNP-TV-Z]{26}$/,
1964
+ /**
1965
+ * `a-z` was added to replicate /i flag
1966
+ */
1967
+ email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,
1968
+ /**
1969
+ * Constructed a valid Unicode RegExp
1970
+ *
1971
+ * Lazily instantiate since this type of regex isn't supported
1972
+ * in all envs (e.g. React Native).
1973
+ *
1974
+ * See:
1975
+ * https://github.com/colinhacks/zod/issues/2433
1976
+ * Fix in Zod:
1977
+ * https://github.com/colinhacks/zod/commit/9340fd51e48576a75adc919bff65dbc4a5d4c99b
1978
+ */
1979
+ emoji: () => (ue === void 0 && (ue = RegExp(
1980
+ "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",
1981
+ "u"
1982
+ )), ue),
1983
+ /**
1984
+ * Unused
1985
+ */
1986
+ uuid: /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,
1987
+ /**
1988
+ * Unused
1989
+ */
1990
+ ipv4: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,
1991
+ ipv4Cidr: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,
1992
+ /**
1993
+ * Unused
1994
+ */
1995
+ ipv6: /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,
1996
+ ipv6Cidr: /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,
1997
+ base64: /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,
1998
+ base64url: /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,
1999
+ nanoid: /^[a-zA-Z0-9_-]{21}$/,
2000
+ jwt: /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/
2001
+ };
2002
+ function st(r, e) {
2003
+ const t = {
2004
+ type: "string"
2005
+ };
2006
+ if (r.checks)
2007
+ for (const s of r.checks)
2008
+ switch (s.kind) {
2009
+ case "min":
2010
+ t.minLength = typeof t.minLength == "number" ? Math.max(t.minLength, s.value) : s.value;
2011
+ break;
2012
+ case "max":
2013
+ t.maxLength = typeof t.maxLength == "number" ? Math.min(t.maxLength, s.value) : s.value;
2014
+ break;
2015
+ case "email":
2016
+ switch (e.emailStrategy) {
2017
+ case "format:email":
2018
+ $(t, "email", s.message, e);
2019
+ break;
2020
+ case "format:idn-email":
2021
+ $(t, "idn-email", s.message, e);
2022
+ break;
2023
+ case "pattern:zod":
2024
+ S(t, O.email, s.message, e);
2025
+ break;
2026
+ }
2027
+ break;
2028
+ case "url":
2029
+ $(t, "uri", s.message, e);
2030
+ break;
2031
+ case "uuid":
2032
+ $(t, "uuid", s.message, e);
2033
+ break;
2034
+ case "regex":
2035
+ S(t, s.regex, s.message, e);
2036
+ break;
2037
+ case "cuid":
2038
+ S(t, O.cuid, s.message, e);
2039
+ break;
2040
+ case "cuid2":
2041
+ S(t, O.cuid2, s.message, e);
2042
+ break;
2043
+ case "startsWith":
2044
+ S(
2045
+ t,
2046
+ RegExp(`^${de(s.value, e)}`),
2047
+ s.message,
2048
+ e
2049
+ );
2050
+ break;
2051
+ case "endsWith":
2052
+ S(
2053
+ t,
2054
+ RegExp(`${de(s.value, e)}$`),
2055
+ s.message,
2056
+ e
2057
+ );
2058
+ break;
2059
+ case "datetime":
2060
+ $(t, "date-time", s.message, e);
2061
+ break;
2062
+ case "date":
2063
+ $(t, "date", s.message, e);
2064
+ break;
2065
+ case "time":
2066
+ $(t, "time", s.message, e);
2067
+ break;
2068
+ case "duration":
2069
+ $(t, "duration", s.message, e);
2070
+ break;
2071
+ case "length":
2072
+ t.minLength = typeof t.minLength == "number" ? Math.max(t.minLength, s.value) : s.value, t.maxLength = typeof t.maxLength == "number" ? Math.min(t.maxLength, s.value) : s.value;
2073
+ break;
2074
+ case "includes": {
2075
+ S(
2076
+ t,
2077
+ RegExp(de(s.value, e)),
2078
+ s.message,
2079
+ e
2080
+ );
2081
+ break;
2082
+ }
2083
+ case "ip": {
2084
+ s.version !== "v6" && $(t, "ipv4", s.message, e), s.version !== "v4" && $(t, "ipv6", s.message, e);
2085
+ break;
2086
+ }
2087
+ case "base64url":
2088
+ S(t, O.base64url, s.message, e);
2089
+ break;
2090
+ case "jwt":
2091
+ S(t, O.jwt, s.message, e);
2092
+ break;
2093
+ case "cidr": {
2094
+ s.version !== "v6" && S(t, O.ipv4Cidr, s.message, e), s.version !== "v4" && S(t, O.ipv6Cidr, s.message, e);
2095
+ break;
2096
+ }
2097
+ case "emoji":
2098
+ S(t, O.emoji(), s.message, e);
2099
+ break;
2100
+ case "ulid": {
2101
+ S(t, O.ulid, s.message, e);
2102
+ break;
2103
+ }
2104
+ case "base64": {
2105
+ switch (e.base64Strategy) {
2106
+ case "format:binary": {
2107
+ $(t, "binary", s.message, e);
2108
+ break;
2109
+ }
2110
+ case "contentEncoding:base64": {
2111
+ t.contentEncoding = "base64";
2112
+ break;
2113
+ }
2114
+ case "pattern:zod": {
2115
+ S(t, O.base64, s.message, e);
2116
+ break;
2117
+ }
2118
+ }
2119
+ break;
2120
+ }
2121
+ case "nanoid":
2122
+ S(t, O.nanoid, s.message, e);
2123
+ }
2124
+ return t;
2125
+ }
2126
+ function de(r, e) {
2127
+ return e.patternStrategy === "escape" ? $2(r) : r;
2128
+ }
2129
+ var O2 = new Set(
1750
2130
  "ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789"
1751
2131
  );
1752
- var Fe = Symbol.for("vercel.ai.schema");
1753
- function Be(r, {
2132
+ function $2(r) {
2133
+ let e = "";
2134
+ for (let t = 0; t < r.length; t++)
2135
+ O2.has(r[t]) || (e += "\\"), e += r[t];
2136
+ return e;
2137
+ }
2138
+ function $(r, e, t, s) {
2139
+ var n;
2140
+ r.format || (n = r.anyOf) != null && n.some((i) => i.format) ? (r.anyOf || (r.anyOf = []), r.format && (r.anyOf.push({
2141
+ format: r.format
2142
+ }), delete r.format), r.anyOf.push({
2143
+ format: e,
2144
+ ...t && s.errorMessages && { errorMessage: { format: t } }
2145
+ })) : r.format = e;
2146
+ }
2147
+ function S(r, e, t, s) {
2148
+ var n;
2149
+ r.pattern || (n = r.allOf) != null && n.some((i) => i.pattern) ? (r.allOf || (r.allOf = []), r.pattern && (r.allOf.push({
2150
+ pattern: r.pattern
2151
+ }), delete r.pattern), r.allOf.push({
2152
+ pattern: Ne(e, s),
2153
+ ...t && s.errorMessages && { errorMessage: { pattern: t } }
2154
+ })) : r.pattern = Ne(e, s);
2155
+ }
2156
+ function Ne(r, e) {
2157
+ var t;
2158
+ if (!e.applyRegexFlags || !r.flags)
2159
+ return r.source;
2160
+ const s = {
2161
+ i: r.flags.includes("i"),
2162
+ // Case-insensitive
2163
+ m: r.flags.includes("m"),
2164
+ // `^` and `$` matches adjacent to newline characters
2165
+ s: r.flags.includes("s")
2166
+ // `.` matches newlines
2167
+ }, n = s.i ? r.source.toLowerCase() : r.source;
2168
+ let i = "", a = !1, l = !1, u = !1;
2169
+ for (let c = 0; c < n.length; c++) {
2170
+ if (a) {
2171
+ i += n[c], a = !1;
2172
+ continue;
2173
+ }
2174
+ if (s.i) {
2175
+ if (l) {
2176
+ if (n[c].match(/[a-z]/)) {
2177
+ u ? (i += n[c], i += `${n[c - 2]}-${n[c]}`.toUpperCase(), u = !1) : n[c + 1] === "-" && ((t = n[c + 2]) != null && t.match(/[a-z]/)) ? (i += n[c], u = !0) : i += `${n[c]}${n[c].toUpperCase()}`;
2178
+ continue;
2179
+ }
2180
+ } else if (n[c].match(/[a-z]/)) {
2181
+ i += `[${n[c]}${n[c].toUpperCase()}]`;
2182
+ continue;
2183
+ }
2184
+ }
2185
+ if (s.m) {
2186
+ if (n[c] === "^") {
2187
+ i += `(^|(?<=[\r
2188
+ ]))`;
2189
+ continue;
2190
+ } else if (n[c] === "$") {
2191
+ i += `($|(?=[\r
2192
+ ]))`;
2193
+ continue;
2194
+ }
2195
+ }
2196
+ if (s.s && n[c] === ".") {
2197
+ i += l ? `${n[c]}\r
2198
+ ` : `[${n[c]}\r
2199
+ ]`;
2200
+ continue;
2201
+ }
2202
+ i += n[c], n[c] === "\\" ? a = !0 : l && n[c] === "]" ? l = !1 : !l && n[c] === "[" && (l = !0);
2203
+ }
2204
+ try {
2205
+ new RegExp(i);
2206
+ } catch {
2207
+ return console.warn(
2208
+ `Could not convert regex pattern at ${e.currentPath.join(
2209
+ "/"
2210
+ )} to a flag-independent form! Falling back to the flag-ignorant source`
2211
+ ), r.source;
2212
+ }
2213
+ return i;
2214
+ }
2215
+ function nt(r, e) {
2216
+ var t, s, n, i, a, l;
2217
+ const u = {
2218
+ type: "object",
2219
+ additionalProperties: (t = _(r.valueType._def, {
2220
+ ...e,
2221
+ currentPath: [...e.currentPath, "additionalProperties"]
2222
+ })) != null ? t : e.allowedAdditionalProperties
2223
+ };
2224
+ if (((s = r.keyType) == null ? void 0 : s._def.typeName) === f.ZodString && ((n = r.keyType._def.checks) != null && n.length)) {
2225
+ const { type: c, ...d } = st(r.keyType._def, e);
2226
+ return {
2227
+ ...u,
2228
+ propertyNames: d
2229
+ };
2230
+ } else {
2231
+ if (((i = r.keyType) == null ? void 0 : i._def.typeName) === f.ZodEnum)
2232
+ return {
2233
+ ...u,
2234
+ propertyNames: {
2235
+ enum: r.keyType._def.values
2236
+ }
2237
+ };
2238
+ if (((a = r.keyType) == null ? void 0 : a._def.typeName) === f.ZodBranded && r.keyType._def.type._def.typeName === f.ZodString && ((l = r.keyType._def.type._def.checks) != null && l.length)) {
2239
+ const { type: c, ...d } = tt(
2240
+ r.keyType._def,
2241
+ e
2242
+ );
2243
+ return {
2244
+ ...u,
2245
+ propertyNames: d
2246
+ };
2247
+ }
2248
+ }
2249
+ return u;
2250
+ }
2251
+ function U2(r, e) {
2252
+ if (e.mapStrategy === "record")
2253
+ return nt(r, e);
2254
+ const t = _(r.keyType._def, {
2255
+ ...e,
2256
+ currentPath: [...e.currentPath, "items", "items", "0"]
2257
+ }) || T(), s = _(r.valueType._def, {
2258
+ ...e,
2259
+ currentPath: [...e.currentPath, "items", "items", "1"]
2260
+ }) || T();
2261
+ return {
2262
+ type: "array",
2263
+ maxItems: 125,
2264
+ items: {
2265
+ type: "array",
2266
+ items: [t, s],
2267
+ minItems: 2,
2268
+ maxItems: 2
2269
+ }
2270
+ };
2271
+ }
2272
+ function j2(r) {
2273
+ const e = r.values, s = Object.keys(r.values).filter((i) => typeof e[e[i]] != "number").map((i) => e[i]), n = Array.from(
2274
+ new Set(s.map((i) => typeof i))
2275
+ );
2276
+ return {
2277
+ type: n.length === 1 ? n[0] === "string" ? "string" : "number" : ["string", "number"],
2278
+ enum: s
2279
+ };
2280
+ }
2281
+ function Z2() {
2282
+ return { not: T() };
2283
+ }
2284
+ function N2() {
2285
+ return {
2286
+ type: "null"
2287
+ };
2288
+ }
2289
+ var ye = {
2290
+ ZodString: "string",
2291
+ ZodNumber: "number",
2292
+ ZodBigInt: "integer",
2293
+ ZodBoolean: "boolean",
2294
+ ZodNull: "null"
2295
+ };
2296
+ function q2(r, e) {
2297
+ const t = r.options instanceof Map ? Array.from(r.options.values()) : r.options;
2298
+ if (t.every(
2299
+ (s) => s._def.typeName in ye && (!s._def.checks || !s._def.checks.length)
2300
+ )) {
2301
+ const s = t.reduce((n, i) => {
2302
+ const a = ye[i._def.typeName];
2303
+ return a && !n.includes(a) ? [...n, a] : n;
2304
+ }, []);
2305
+ return {
2306
+ type: s.length > 1 ? s : s[0]
2307
+ };
2308
+ } else if (t.every((s) => s._def.typeName === "ZodLiteral" && !s.description)) {
2309
+ const s = t.reduce(
2310
+ (n, i) => {
2311
+ const a = typeof i._def.value;
2312
+ switch (a) {
2313
+ case "string":
2314
+ case "number":
2315
+ case "boolean":
2316
+ return [...n, a];
2317
+ case "bigint":
2318
+ return [...n, "integer"];
2319
+ case "object":
2320
+ if (i._def.value === null) return [...n, "null"];
2321
+ case "symbol":
2322
+ case "undefined":
2323
+ case "function":
2324
+ default:
2325
+ return n;
2326
+ }
2327
+ },
2328
+ []
2329
+ );
2330
+ if (s.length === t.length) {
2331
+ const n = s.filter((i, a, l) => l.indexOf(i) === a);
2332
+ return {
2333
+ type: n.length > 1 ? n : n[0],
2334
+ enum: t.reduce(
2335
+ (i, a) => i.includes(a._def.value) ? i : [...i, a._def.value],
2336
+ []
2337
+ )
2338
+ };
2339
+ }
2340
+ } else if (t.every((s) => s._def.typeName === "ZodEnum"))
2341
+ return {
2342
+ type: "string",
2343
+ enum: t.reduce(
2344
+ (s, n) => [
2345
+ ...s,
2346
+ ...n._def.values.filter((i) => !s.includes(i))
2347
+ ],
2348
+ []
2349
+ )
2350
+ };
2351
+ return z2(r, e);
2352
+ }
2353
+ var z2 = (r, e) => {
2354
+ const t = (r.options instanceof Map ? Array.from(r.options.values()) : r.options).map(
2355
+ (s, n) => _(s._def, {
2356
+ ...e,
2357
+ currentPath: [...e.currentPath, "anyOf", `${n}`]
2358
+ })
2359
+ ).filter(
2360
+ (s) => !!s && (!e.strictUnions || typeof s == "object" && Object.keys(s).length > 0)
2361
+ );
2362
+ return t.length ? { anyOf: t } : void 0;
2363
+ };
2364
+ function D2(r, e) {
2365
+ if (["ZodString", "ZodNumber", "ZodBigInt", "ZodBoolean", "ZodNull"].includes(
2366
+ r.innerType._def.typeName
2367
+ ) && (!r.innerType._def.checks || !r.innerType._def.checks.length))
2368
+ return {
2369
+ type: [
2370
+ ye[r.innerType._def.typeName],
2371
+ "null"
2372
+ ]
2373
+ };
2374
+ const t = _(r.innerType._def, {
2375
+ ...e,
2376
+ currentPath: [...e.currentPath, "anyOf", "0"]
2377
+ });
2378
+ return t && { anyOf: [t, { type: "null" }] };
2379
+ }
2380
+ function H2(r) {
2381
+ const e = {
2382
+ type: "number"
2383
+ };
2384
+ if (!r.checks) return e;
2385
+ for (const t of r.checks)
2386
+ switch (t.kind) {
2387
+ case "int":
2388
+ e.type = "integer";
2389
+ break;
2390
+ case "min":
2391
+ t.inclusive ? e.minimum = t.value : e.exclusiveMinimum = t.value;
2392
+ break;
2393
+ case "max":
2394
+ t.inclusive ? e.maximum = t.value : e.exclusiveMaximum = t.value;
2395
+ break;
2396
+ case "multipleOf":
2397
+ e.multipleOf = t.value;
2398
+ break;
2399
+ }
2400
+ return e;
2401
+ }
2402
+ function F2(r, e) {
2403
+ const t = {
2404
+ type: "object",
2405
+ properties: {}
2406
+ }, s = [], n = r.shape();
2407
+ for (const a in n) {
2408
+ let l = n[a];
2409
+ if (l === void 0 || l._def === void 0)
2410
+ continue;
2411
+ const u = V2(l), c = _(l._def, {
2412
+ ...e,
2413
+ currentPath: [...e.currentPath, "properties", a],
2414
+ propertyPath: [...e.currentPath, "properties", a]
2415
+ });
2416
+ c !== void 0 && (t.properties[a] = c, u || s.push(a));
2417
+ }
2418
+ s.length && (t.required = s);
2419
+ const i = B2(r, e);
2420
+ return i !== void 0 && (t.additionalProperties = i), t;
2421
+ }
2422
+ function B2(r, e) {
2423
+ if (r.catchall._def.typeName !== "ZodNever")
2424
+ return _(r.catchall._def, {
2425
+ ...e,
2426
+ currentPath: [...e.currentPath, "additionalProperties"]
2427
+ });
2428
+ switch (r.unknownKeys) {
2429
+ case "passthrough":
2430
+ return e.allowedAdditionalProperties;
2431
+ case "strict":
2432
+ return e.rejectedAdditionalProperties;
2433
+ case "strip":
2434
+ return e.removeAdditionalStrategy === "strict" ? e.allowedAdditionalProperties : e.rejectedAdditionalProperties;
2435
+ }
2436
+ }
2437
+ function V2(r) {
2438
+ try {
2439
+ return r.isOptional();
2440
+ } catch {
2441
+ return !0;
2442
+ }
2443
+ }
2444
+ var J2 = (r, e) => {
2445
+ var t;
2446
+ if (e.currentPath.toString() === ((t = e.propertyPath) == null ? void 0 : t.toString()))
2447
+ return _(r.innerType._def, e);
2448
+ const s = _(r.innerType._def, {
2449
+ ...e,
2450
+ currentPath: [...e.currentPath, "anyOf", "1"]
2451
+ });
2452
+ return s ? { anyOf: [{ not: T() }, s] } : T();
2453
+ }, W2 = (r, e) => {
2454
+ if (e.pipeStrategy === "input")
2455
+ return _(r.in._def, e);
2456
+ if (e.pipeStrategy === "output")
2457
+ return _(r.out._def, e);
2458
+ const t = _(r.in._def, {
2459
+ ...e,
2460
+ currentPath: [...e.currentPath, "allOf", "0"]
2461
+ }), s = _(r.out._def, {
2462
+ ...e,
2463
+ currentPath: [...e.currentPath, "allOf", t ? "1" : "0"]
2464
+ });
2465
+ return {
2466
+ allOf: [t, s].filter((n) => n !== void 0)
2467
+ };
2468
+ };
2469
+ function K2(r, e) {
2470
+ return _(r.type._def, e);
2471
+ }
2472
+ function G2(r, e) {
2473
+ const s = {
2474
+ type: "array",
2475
+ uniqueItems: !0,
2476
+ items: _(r.valueType._def, {
2477
+ ...e,
2478
+ currentPath: [...e.currentPath, "items"]
2479
+ })
2480
+ };
2481
+ return r.minSize && (s.minItems = r.minSize.value), r.maxSize && (s.maxItems = r.maxSize.value), s;
2482
+ }
2483
+ function Y2(r, e) {
2484
+ return r.rest ? {
2485
+ type: "array",
2486
+ minItems: r.items.length,
2487
+ items: r.items.map(
2488
+ (t, s) => _(t._def, {
2489
+ ...e,
2490
+ currentPath: [...e.currentPath, "items", `${s}`]
2491
+ })
2492
+ ).reduce(
2493
+ (t, s) => s === void 0 ? t : [...t, s],
2494
+ []
2495
+ ),
2496
+ additionalItems: _(r.rest._def, {
2497
+ ...e,
2498
+ currentPath: [...e.currentPath, "additionalItems"]
2499
+ })
2500
+ } : {
2501
+ type: "array",
2502
+ minItems: r.items.length,
2503
+ maxItems: r.items.length,
2504
+ items: r.items.map(
2505
+ (t, s) => _(t._def, {
2506
+ ...e,
2507
+ currentPath: [...e.currentPath, "items", `${s}`]
2508
+ })
2509
+ ).reduce(
2510
+ (t, s) => s === void 0 ? t : [...t, s],
2511
+ []
2512
+ )
2513
+ };
2514
+ }
2515
+ function Q2() {
2516
+ return {
2517
+ not: T()
2518
+ };
2519
+ }
2520
+ function X2() {
2521
+ return T();
2522
+ }
2523
+ var e0 = (r, e) => _(r.innerType._def, e), t0 = (r, e, t) => {
2524
+ switch (e) {
2525
+ case f.ZodString:
2526
+ return st(r, t);
2527
+ case f.ZodNumber:
2528
+ return H2(r);
2529
+ case f.ZodObject:
2530
+ return F2(r, t);
2531
+ case f.ZodBigInt:
2532
+ return L2(r);
2533
+ case f.ZodBoolean:
2534
+ return S2();
2535
+ case f.ZodDate:
2536
+ return rt(r, t);
2537
+ case f.ZodUndefined:
2538
+ return Q2();
2539
+ case f.ZodNull:
2540
+ return N2();
2541
+ case f.ZodArray:
2542
+ return x2(r, t);
2543
+ case f.ZodUnion:
2544
+ case f.ZodDiscriminatedUnion:
2545
+ return q2(r, t);
2546
+ case f.ZodIntersection:
2547
+ return I2(r, t);
2548
+ case f.ZodTuple:
2549
+ return Y2(r, t);
2550
+ case f.ZodRecord:
2551
+ return nt(r, t);
2552
+ case f.ZodLiteral:
2553
+ return A2(r);
2554
+ case f.ZodEnum:
2555
+ return R2(r);
2556
+ case f.ZodNativeEnum:
2557
+ return j2(r);
2558
+ case f.ZodNullable:
2559
+ return D2(r, t);
2560
+ case f.ZodOptional:
2561
+ return J2(r, t);
2562
+ case f.ZodMap:
2563
+ return U2(r, t);
2564
+ case f.ZodSet:
2565
+ return G2(r, t);
2566
+ case f.ZodLazy:
2567
+ return () => r.getter()._def;
2568
+ case f.ZodPromise:
2569
+ return K2(r, t);
2570
+ case f.ZodNaN:
2571
+ case f.ZodNever:
2572
+ return Z2();
2573
+ case f.ZodEffects:
2574
+ return M2(r, t);
2575
+ case f.ZodAny:
2576
+ return T();
2577
+ case f.ZodUnknown:
2578
+ return X2();
2579
+ case f.ZodDefault:
2580
+ return T2(r, t);
2581
+ case f.ZodBranded:
2582
+ return tt(r, t);
2583
+ case f.ZodReadonly:
2584
+ return e0(r, t);
2585
+ case f.ZodCatch:
2586
+ return P2(r, t);
2587
+ case f.ZodPipeline:
2588
+ return W2(r, t);
2589
+ case f.ZodFunction:
2590
+ case f.ZodVoid:
2591
+ case f.ZodSymbol:
2592
+ return;
2593
+ default:
2594
+ return /* @__PURE__ */ ((s) => {
2595
+ })();
2596
+ }
2597
+ }, r0 = (r, e) => {
2598
+ let t = 0;
2599
+ for (; t < r.length && t < e.length && r[t] === e[t]; t++)
2600
+ ;
2601
+ return [(r.length - t).toString(), ...e.slice(t)].join("/");
2602
+ };
2603
+ function _(r, e, t = !1) {
2604
+ var s;
2605
+ const n = e.seen.get(r);
2606
+ if (e.override) {
2607
+ const u = (s = e.override) == null ? void 0 : s.call(
2608
+ e,
2609
+ r,
2610
+ e,
2611
+ n,
2612
+ t
2613
+ );
2614
+ if (u !== _2)
2615
+ return u;
2616
+ }
2617
+ if (n && !t) {
2618
+ const u = s0(n, e);
2619
+ if (u !== void 0)
2620
+ return u;
2621
+ }
2622
+ const i = { def: r, path: e.currentPath, jsonSchema: void 0 };
2623
+ e.seen.set(r, i);
2624
+ const a = t0(r, r.typeName, e), l = typeof a == "function" ? _(a(), e) : a;
2625
+ if (l && n0(r, e, l), e.postProcess) {
2626
+ const u = e.postProcess(l, r, e);
2627
+ return i.jsonSchema = l, u;
2628
+ }
2629
+ return i.jsonSchema = l, l;
2630
+ }
2631
+ var s0 = (r, e) => {
2632
+ switch (e.$refStrategy) {
2633
+ case "root":
2634
+ return { $ref: r.path.join("/") };
2635
+ case "relative":
2636
+ return { $ref: r0(e.currentPath, r.path) };
2637
+ case "none":
2638
+ case "seen":
2639
+ return r.path.length < e.currentPath.length && r.path.every((t, s) => e.currentPath[s] === t) ? (console.warn(
2640
+ `Recursive reference detected at ${e.currentPath.join(
2641
+ "/"
2642
+ )}! Defaulting to any`
2643
+ ), T()) : e.$refStrategy === "seen" ? T() : void 0;
2644
+ }
2645
+ }, n0 = (r, e, t) => (r.description && (t.description = r.description), t), o0 = (r) => {
2646
+ const e = b2(r), t = e.name !== void 0 ? [...e.basePath, e.definitionPath, e.name] : e.basePath;
2647
+ return {
2648
+ ...e,
2649
+ currentPath: t,
2650
+ propertyPath: void 0,
2651
+ seen: new Map(
2652
+ Object.entries(e.definitions).map(([s, n]) => [
2653
+ n._def,
2654
+ {
2655
+ def: n._def,
2656
+ path: [...e.basePath, e.definitionPath, s],
2657
+ // Resolution of references will be forced even though seen, so it's ok that the schema is undefined here for now.
2658
+ jsonSchema: void 0
2659
+ }
2660
+ ])
2661
+ )
2662
+ };
2663
+ }, i0 = (r, e) => {
2664
+ var t;
2665
+ const s = o0(e);
2666
+ let n = typeof e == "object" && e.definitions ? Object.entries(e.definitions).reduce(
2667
+ (c, [d, g]) => {
2668
+ var h;
2669
+ return {
2670
+ ...c,
2671
+ [d]: (h = _(
2672
+ g._def,
2673
+ {
2674
+ ...s,
2675
+ currentPath: [...s.basePath, s.definitionPath, d]
2676
+ },
2677
+ !0
2678
+ )) != null ? h : T()
2679
+ };
2680
+ },
2681
+ {}
2682
+ ) : void 0;
2683
+ const i = typeof e == "string" ? e : e?.nameStrategy === "title" ? void 0 : e?.name, a = (t = _(
2684
+ r._def,
2685
+ i === void 0 ? s : {
2686
+ ...s,
2687
+ currentPath: [...s.basePath, s.definitionPath, i]
2688
+ },
2689
+ !1
2690
+ )) != null ? t : T(), l = typeof e == "object" && e.name !== void 0 && e.nameStrategy === "title" ? e.name : void 0;
2691
+ l !== void 0 && (a.title = l);
2692
+ const u = i === void 0 ? n ? {
2693
+ ...a,
2694
+ [s.definitionPath]: n
2695
+ } : a : {
2696
+ $ref: [
2697
+ ...s.$refStrategy === "relative" ? [] : s.basePath,
2698
+ s.definitionPath,
2699
+ i
2700
+ ].join("/"),
2701
+ [s.definitionPath]: {
2702
+ ...n,
2703
+ [i]: a
2704
+ }
2705
+ };
2706
+ return u.$schema = "http://json-schema.org/draft-07/schema#", u;
2707
+ }, Ce = Symbol.for("vercel.ai.schema");
2708
+ function J(r, {
1754
2709
  validate: e
1755
2710
  } = {}) {
1756
2711
  return {
1757
- [Fe]: !0,
2712
+ [Ce]: !0,
1758
2713
  _type: void 0,
1759
2714
  // should never be used directly
1760
- [Ze]: !0,
1761
2715
  get jsonSchema() {
1762
2716
  return typeof r == "function" && (r = r()), r;
1763
2717
  },
1764
2718
  validate: e
1765
2719
  };
1766
2720
  }
1767
- let l2;
1768
- l2 = globalThis.crypto;
1769
- async function Ve(r) {
1770
- return (await l2).getRandomValues(new Uint8Array(r));
2721
+ function a0(r) {
2722
+ return typeof r == "object" && r !== null && Ce in r && r[Ce] === !0 && "jsonSchema" in r && "validate" in r;
2723
+ }
2724
+ function ot(r) {
2725
+ return r == null ? J({ properties: {}, additionalProperties: !1 }) : a0(r) ? r : "~standard" in r ? r["~standard"].vendor === "zod" ? h0(r) : c0(r) : r();
2726
+ }
2727
+ function c0(r) {
2728
+ return J(
2729
+ () => xe(
2730
+ r["~standard"].jsonSchema.input({
2731
+ target: "draft-07"
2732
+ })
2733
+ ),
2734
+ {
2735
+ validate: async (e) => {
2736
+ const t = await r["~standard"].validate(e);
2737
+ return "value" in t ? { success: !0, value: t.value } : {
2738
+ success: !1,
2739
+ error: new pe({
2740
+ value: e,
2741
+ cause: t.issues
2742
+ })
2743
+ };
2744
+ }
2745
+ }
2746
+ );
2747
+ }
2748
+ function l0(r, e) {
2749
+ var t;
2750
+ const s = (t = void 0) != null ? t : !1;
2751
+ return J(
2752
+ // defer json schema creation to avoid unnecessary computation when only validation is needed
2753
+ () => i0(r, {
2754
+ $refStrategy: s ? "root" : "none"
2755
+ }),
2756
+ {
2757
+ validate: async (n) => {
2758
+ const i = await r.safeParseAsync(n);
2759
+ return i.success ? { success: !0, value: i.data } : { success: !1, error: i.error };
2760
+ }
2761
+ }
2762
+ );
2763
+ }
2764
+ function u0(r, e) {
2765
+ var t;
2766
+ const s = (t = void 0) != null ? t : !1;
2767
+ return J(
2768
+ // defer json schema creation to avoid unnecessary computation when only validation is needed
2769
+ () => xe(
2770
+ Ie.toJSONSchema(r, {
2771
+ target: "draft-7",
2772
+ io: "input",
2773
+ reused: s ? "ref" : "inline"
2774
+ })
2775
+ ),
2776
+ {
2777
+ validate: async (n) => {
2778
+ const i = await Ie.safeParseAsync(r, n);
2779
+ return i.success ? { success: !0, value: i.data } : { success: !1, error: i.error };
2780
+ }
2781
+ }
2782
+ );
2783
+ }
2784
+ function d0(r) {
2785
+ return "_zod" in r;
2786
+ }
2787
+ function h0(r, e) {
2788
+ return d0(r) ? u0(r) : l0(r);
2789
+ }
2790
+ async function it({
2791
+ value: r,
2792
+ schema: e,
2793
+ context: t
2794
+ }) {
2795
+ const s = ot(e);
2796
+ try {
2797
+ if (s.validate == null)
2798
+ return { success: !0, value: r, rawValue: r };
2799
+ const n = await s.validate(r);
2800
+ return n.success ? { success: !0, value: n.value, rawValue: r } : {
2801
+ success: !1,
2802
+ error: pe.wrap({ value: r, cause: n.error, context: t }),
2803
+ rawValue: r
2804
+ };
2805
+ } catch (n) {
2806
+ return {
2807
+ success: !1,
2808
+ error: pe.wrap({ value: r, cause: n, context: t }),
2809
+ rawValue: r
2810
+ };
2811
+ }
1771
2812
  }
1772
- async function Je(r) {
2813
+ async function p0({
2814
+ text: r,
2815
+ schema: e
2816
+ }) {
2817
+ try {
2818
+ const t = v2(r);
2819
+ return e == null ? { success: !0, value: t, rawValue: t } : await it({ value: t, schema: e });
2820
+ } catch (t) {
2821
+ return {
2822
+ success: !1,
2823
+ error: Ee.isInstance(t) ? t : new Ee({ text: r, cause: t }),
2824
+ rawValue: void 0
2825
+ };
2826
+ }
2827
+ }
2828
+ function m0(r) {
2829
+ return { ...r, type: "dynamic" };
2830
+ }
2831
+ let Le;
2832
+ Le = globalThis.crypto;
2833
+ async function f0(r) {
2834
+ return (await Le).getRandomValues(new Uint8Array(r));
2835
+ }
2836
+ async function g0(r) {
1773
2837
  const e = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~", t = Math.pow(2, 8) - Math.pow(2, 8) % e.length;
1774
2838
  let s = "";
1775
2839
  for (; s.length < r; ) {
1776
- const i = await Ve(r - s.length);
1777
- for (const n of i)
1778
- n < t && (s += e[n % e.length]);
2840
+ const n = await f0(r - s.length);
2841
+ for (const i of n)
2842
+ i < t && (s += e[i % e.length]);
1779
2843
  }
1780
2844
  return s;
1781
2845
  }
1782
- async function We(r) {
1783
- return await Je(r);
2846
+ async function y0(r) {
2847
+ return await g0(r);
1784
2848
  }
1785
- async function Ge(r) {
1786
- const e = await (await l2).subtle.digest("SHA-256", new TextEncoder().encode(r));
2849
+ async function C0(r) {
2850
+ const e = await (await Le).subtle.digest("SHA-256", new TextEncoder().encode(r));
1787
2851
  return btoa(String.fromCharCode(...new Uint8Array(e))).replace(/\//g, "_").replace(/\+/g, "-").replace(/=/g, "");
1788
2852
  }
1789
- async function Ye(r) {
2853
+ async function w0(r) {
1790
2854
  if (r || (r = 43), r < 43 || r > 128)
1791
2855
  throw `Expected a length between 43 and 128. Received ${r}.`;
1792
- const e = await We(r), t = await Ge(e);
2856
+ const e = await y0(r), t = await C0(e);
1793
2857
  return {
1794
2858
  code_verifier: e,
1795
2859
  code_challenge: t
1796
2860
  };
1797
2861
  }
1798
- var Ke = "AI_MCPClientError", U2 = `vercel.ai.error.${Ke}`, Qe = Symbol.for(U2), _2, b2, y = class extends (b2 = Z, _2 = Qe, b2) {
2862
+ var v0 = "AI_MCPClientError", at = `vercel.ai.error.${v0}`, _0 = Symbol.for(at), qe, ze, v = class extends (ze = Y, qe = _0, ze) {
1799
2863
  constructor({
1800
2864
  name: r = "MCPClientError",
1801
2865
  message: e,
1802
2866
  cause: t,
1803
2867
  data: s,
1804
- code: i
2868
+ code: n
1805
2869
  }) {
1806
- super({ name: r, message: e, cause: t }), this[_2] = !0, this.data = s, this.code = i;
2870
+ super({ name: r, message: e, cause: t }), this[qe] = !0, this.data = s, this.code = n;
1807
2871
  }
1808
2872
  static isInstance(r) {
1809
- return Z.hasMarker(r, U2);
2873
+ return Y.hasMarker(r, at);
1810
2874
  }
1811
- }, $ = "2025-06-18", Xe = [
1812
- $,
2875
+ }, H = "2025-06-18", b0 = [
2876
+ H,
1813
2877
  "2025-03-26",
1814
2878
  "2024-11-05"
1815
- ], et = o.looseObject({
2879
+ ], x0 = o.optional(o.record(o.string(), o.unknown())), L0 = o.looseObject({
1816
2880
  name: o.string(),
1817
2881
  version: o.string()
1818
- }), Y = o.looseObject({
2882
+ }), oe = o.looseObject({
1819
2883
  _meta: o.optional(o.object({}).loose())
1820
- }), R = Y, A2 = o.object({
2884
+ }), U = oe, ct = o.object({
1821
2885
  method: o.string(),
1822
- params: o.optional(Y)
1823
- }), O2 = o.object({
2886
+ params: o.optional(oe)
2887
+ }), lt = o.object({
1824
2888
  applyDefaults: o.optional(o.boolean())
1825
- }).loose(), tt = o.looseObject({
2889
+ }).loose(), S0 = o.looseObject({
1826
2890
  experimental: o.optional(o.object({}).loose()),
1827
2891
  logging: o.optional(o.object({}).loose()),
1828
2892
  prompts: o.optional(
@@ -1841,44 +2905,58 @@ var Ke = "AI_MCPClientError", U2 = `vercel.ai.error.${Ke}`, Qe = Symbol.for(U2),
1841
2905
  listChanged: o.optional(o.boolean())
1842
2906
  })
1843
2907
  ),
1844
- elicitation: o.optional(O2)
2908
+ elicitation: o.optional(lt)
1845
2909
  });
1846
2910
  o.object({
1847
- elicitation: o.optional(O2)
2911
+ elicitation: o.optional(lt)
1848
2912
  }).loose();
1849
- var rt = R.extend({
2913
+ var P0 = U.extend({
1850
2914
  protocolVersion: o.string(),
1851
- capabilities: tt,
1852
- serverInfo: et,
2915
+ capabilities: S0,
2916
+ serverInfo: L0,
1853
2917
  instructions: o.optional(o.string())
1854
- }), h2 = R.extend({
2918
+ }), Se = U.extend({
1855
2919
  nextCursor: o.optional(o.string())
1856
- }), st = o.object({
2920
+ }), k0 = o.object({
1857
2921
  name: o.string(),
2922
+ /**
2923
+ * @see https://modelcontextprotocol.io/specification/2025-11-25/server/tools#tool
2924
+ */
2925
+ title: o.optional(o.string()),
1858
2926
  description: o.optional(o.string()),
1859
2927
  inputSchema: o.object({
1860
2928
  type: o.literal("object"),
1861
2929
  properties: o.optional(o.object({}).loose())
1862
- }).loose()
1863
- }).loose(), ot = h2.extend({
1864
- tools: o.array(st)
1865
- }), $2 = o.object({
2930
+ }).loose(),
2931
+ /**
2932
+ * @see https://modelcontextprotocol.io/specification/2025-06-18/server/tools#output-schema
2933
+ */
2934
+ outputSchema: o.optional(o.object({}).loose()),
2935
+ annotations: o.optional(
2936
+ o.object({
2937
+ title: o.optional(o.string())
2938
+ }).loose()
2939
+ ),
2940
+ _meta: x0
2941
+ }).loose(), T0 = Se.extend({
2942
+ tools: o.array(k0)
2943
+ }), ut = o.object({
1866
2944
  type: o.literal("text"),
1867
2945
  text: o.string()
1868
- }).loose(), q2 = o.object({
2946
+ }).loose(), dt = o.object({
1869
2947
  type: o.literal("image"),
1870
2948
  data: o.base64(),
1871
2949
  mimeType: o.string()
1872
- }).loose(), it = o.object({
2950
+ }).loose(), M0 = o.object({
1873
2951
  uri: o.string(),
1874
2952
  name: o.string(),
1875
2953
  title: o.optional(o.string()),
1876
2954
  description: o.optional(o.string()),
1877
2955
  mimeType: o.optional(o.string()),
1878
2956
  size: o.optional(o.number())
1879
- }).loose(), nt = h2.extend({
1880
- resources: o.array(it)
1881
- }), j2 = o.object({
2957
+ }).loose(), R0 = Se.extend({
2958
+ resources: o.array(M0)
2959
+ }), ht = o.object({
1882
2960
  /**
1883
2961
  * The URI of this resource.
1884
2962
  */
@@ -1895,96 +2973,100 @@ var rt = R.extend({
1895
2973
  * The MIME type of this resource, if known.
1896
2974
  */
1897
2975
  mimeType: o.optional(o.string())
1898
- }).loose(), H2 = j2.extend({
2976
+ }).loose(), pt = ht.extend({
1899
2977
  text: o.string()
1900
- }), N2 = j2.extend({
2978
+ }), mt = ht.extend({
1901
2979
  blob: o.base64()
1902
- }), z2 = o.object({
2980
+ }), ft = o.object({
1903
2981
  type: o.literal("resource"),
1904
- resource: o.union([H2, N2])
1905
- }).loose(), at = R.extend({
2982
+ resource: o.union([pt, mt])
2983
+ }).loose(), E0 = U.extend({
1906
2984
  content: o.array(
1907
- o.union([$2, q2, z2])
2985
+ o.union([ut, dt, ft])
1908
2986
  ),
2987
+ /**
2988
+ * @see https://modelcontextprotocol.io/specification/2025-06-18/server/tools#structured-content
2989
+ */
2990
+ structuredContent: o.optional(o.unknown()),
1909
2991
  isError: o.boolean().default(!1).optional()
1910
2992
  }).or(
1911
- R.extend({
2993
+ U.extend({
1912
2994
  toolResult: o.unknown()
1913
2995
  })
1914
- ), ct = o.object({
2996
+ ), I0 = o.object({
1915
2997
  uriTemplate: o.string(),
1916
2998
  name: o.string(),
1917
2999
  title: o.optional(o.string()),
1918
3000
  description: o.optional(o.string()),
1919
3001
  mimeType: o.optional(o.string())
1920
- }).loose(), lt = R.extend({
1921
- resourceTemplates: o.array(ct)
1922
- }), ht = R.extend({
3002
+ }).loose(), A0 = U.extend({
3003
+ resourceTemplates: o.array(I0)
3004
+ }), O0 = U.extend({
1923
3005
  contents: o.array(
1924
- o.union([H2, N2])
3006
+ o.union([pt, mt])
1925
3007
  )
1926
- }), dt = o.object({
3008
+ }), $0 = o.object({
1927
3009
  name: o.string(),
1928
3010
  description: o.optional(o.string()),
1929
3011
  required: o.optional(o.boolean())
1930
- }).loose(), pt = o.object({
3012
+ }).loose(), U0 = o.object({
1931
3013
  name: o.string(),
1932
3014
  title: o.optional(o.string()),
1933
3015
  description: o.optional(o.string()),
1934
- arguments: o.optional(o.array(dt))
1935
- }).loose(), ut = h2.extend({
1936
- prompts: o.array(pt)
1937
- }), mt = o.object({
3016
+ arguments: o.optional(o.array($0))
3017
+ }).loose(), j0 = Se.extend({
3018
+ prompts: o.array(U0)
3019
+ }), Z0 = o.object({
1938
3020
  role: o.union([o.literal("user"), o.literal("assistant")]),
1939
3021
  content: o.union([
1940
- $2,
1941
- q2,
1942
- z2
3022
+ ut,
3023
+ dt,
3024
+ ft
1943
3025
  ])
1944
- }).loose(), gt = R.extend({
3026
+ }).loose(), N0 = U.extend({
1945
3027
  description: o.optional(o.string()),
1946
- messages: o.array(mt)
1947
- }), ft = Y.extend({
3028
+ messages: o.array(Z0)
3029
+ }), q0 = oe.extend({
1948
3030
  message: o.string(),
1949
3031
  requestedSchema: o.unknown()
1950
- }), x2 = A2.extend({
3032
+ }), De = ct.extend({
1951
3033
  method: o.literal("elicitation/create"),
1952
- params: ft
1953
- }), Ct = R.extend({
3034
+ params: q0
3035
+ }), z0 = U.extend({
1954
3036
  action: o.union([
1955
3037
  o.literal("accept"),
1956
3038
  o.literal("decline"),
1957
3039
  o.literal("cancel")
1958
3040
  ]),
1959
3041
  content: o.optional(o.record(o.string(), o.unknown()))
1960
- }), K = "2.0", wt = o.object({
1961
- jsonrpc: o.literal(K),
3042
+ }), ie = "2.0", D0 = o.object({
3043
+ jsonrpc: o.literal(ie),
1962
3044
  id: o.union([o.string(), o.number().int()])
1963
- }).merge(A2).strict(), yt = o.object({
1964
- jsonrpc: o.literal(K),
3045
+ }).merge(ct).strict(), H0 = o.object({
3046
+ jsonrpc: o.literal(ie),
1965
3047
  id: o.union([o.string(), o.number().int()]),
1966
- result: R
1967
- }).strict(), vt = o.object({
1968
- jsonrpc: o.literal(K),
3048
+ result: U
3049
+ }).strict(), F0 = o.object({
3050
+ jsonrpc: o.literal(ie),
1969
3051
  id: o.union([o.string(), o.number().int()]),
1970
3052
  error: o.object({
1971
3053
  code: o.number().int(),
1972
3054
  message: o.string(),
1973
3055
  data: o.optional(o.unknown())
1974
3056
  })
1975
- }).strict(), _t = o.object({
1976
- jsonrpc: o.literal(K)
3057
+ }).strict(), B0 = o.object({
3058
+ jsonrpc: o.literal(ie)
1977
3059
  }).merge(
1978
3060
  o.object({
1979
3061
  method: o.string(),
1980
- params: o.optional(Y)
3062
+ params: o.optional(oe)
1981
3063
  })
1982
- ).strict(), q = o.union([
1983
- wt,
1984
- _t,
1985
- yt,
1986
- vt
1987
- ]), Z2 = typeof __PACKAGE_VERSION__ < "u" ? __PACKAGE_VERSION__ : "0.0.0-test", D2 = o.object({
3064
+ ).strict(), V = o.union([
3065
+ D0,
3066
+ B0,
3067
+ H0,
3068
+ F0
3069
+ ]), gt = typeof __PACKAGE_VERSION__ < "u" ? __PACKAGE_VERSION__ : "0.0.0-test", yt = o.object({
1988
3070
  access_token: o.string(),
1989
3071
  id_token: o.string().optional(),
1990
3072
  // Optional for OAuth 2.1, but necessary in OpenID Connect
@@ -1992,7 +3074,7 @@ var rt = R.extend({
1992
3074
  expires_in: o.number().optional(),
1993
3075
  scope: o.string().optional(),
1994
3076
  refresh_token: o.string().optional()
1995
- }).strip(), x = o.string().url().superRefine((r, e) => {
3077
+ }).strip(), P = o.string().url().superRefine((r, e) => {
1996
3078
  if (!URL.canParse(r))
1997
3079
  return e.addIssue({
1998
3080
  code: o.ZodIssueCode.custom,
@@ -2005,9 +3087,9 @@ var rt = R.extend({
2005
3087
  return e.protocol !== "javascript:" && e.protocol !== "data:" && e.protocol !== "vbscript:";
2006
3088
  },
2007
3089
  { message: "URL cannot use javascript:, data:, or vbscript: scheme" }
2008
- ), bt = o.object({
3090
+ ), V0 = o.object({
2009
3091
  resource: o.string().url(),
2010
- authorization_servers: o.array(x).optional(),
3092
+ authorization_servers: o.array(P).optional(),
2011
3093
  jwks_uri: o.string().url().optional(),
2012
3094
  scopes_supported: o.array(o.string()).optional(),
2013
3095
  bearer_methods_supported: o.array(o.string()).optional(),
@@ -2020,24 +3102,24 @@ var rt = R.extend({
2020
3102
  authorization_details_types_supported: o.array(o.string()).optional(),
2021
3103
  dpop_signing_alg_values_supported: o.array(o.string()).optional(),
2022
3104
  dpop_bound_access_tokens_required: o.boolean().optional()
2023
- }).passthrough(), F2 = o.object({
3105
+ }).passthrough(), Ct = o.object({
2024
3106
  issuer: o.string(),
2025
- authorization_endpoint: x,
2026
- token_endpoint: x,
2027
- registration_endpoint: x.optional(),
3107
+ authorization_endpoint: P,
3108
+ token_endpoint: P,
3109
+ registration_endpoint: P.optional(),
2028
3110
  scopes_supported: o.array(o.string()).optional(),
2029
3111
  response_types_supported: o.array(o.string()),
2030
3112
  grant_types_supported: o.array(o.string()).optional(),
2031
3113
  code_challenge_methods_supported: o.array(o.string()),
2032
3114
  token_endpoint_auth_methods_supported: o.array(o.string()).optional(),
2033
3115
  token_endpoint_auth_signing_alg_values_supported: o.array(o.string()).optional()
2034
- }).passthrough(), xt = o.object({
3116
+ }).passthrough(), J0 = o.object({
2035
3117
  issuer: o.string(),
2036
- authorization_endpoint: x,
2037
- token_endpoint: x,
2038
- userinfo_endpoint: x.optional(),
2039
- jwks_uri: x,
2040
- registration_endpoint: x.optional(),
3118
+ authorization_endpoint: P,
3119
+ token_endpoint: P,
3120
+ userinfo_endpoint: P.optional(),
3121
+ jwks_uri: P,
3122
+ registration_endpoint: P.optional(),
2041
3123
  scopes_supported: o.array(o.string()).optional(),
2042
3124
  response_types_supported: o.array(o.string()),
2043
3125
  grant_types_supported: o.array(o.string()).optional(),
@@ -2045,95 +3127,95 @@ var rt = R.extend({
2045
3127
  id_token_signing_alg_values_supported: o.array(o.string()),
2046
3128
  claims_supported: o.array(o.string()).optional(),
2047
3129
  token_endpoint_auth_methods_supported: o.array(o.string()).optional()
2048
- }).passthrough(), Lt = xt.merge(
2049
- F2.pick({
3130
+ }).passthrough(), W0 = J0.merge(
3131
+ Ct.pick({
2050
3132
  code_challenge_methods_supported: !0
2051
3133
  })
2052
- ), St = o.object({
3134
+ ), K0 = o.object({
2053
3135
  client_id: o.string(),
2054
3136
  client_secret: o.string().optional(),
2055
3137
  client_id_issued_at: o.number().optional(),
2056
3138
  client_secret_expires_at: o.number().optional()
2057
- }).strip(), Tt = o.object({
2058
- redirect_uris: o.array(x),
3139
+ }).strip(), G0 = o.object({
3140
+ redirect_uris: o.array(P),
2059
3141
  token_endpoint_auth_method: o.string().optional(),
2060
3142
  grant_types: o.array(o.string()).optional(),
2061
3143
  response_types: o.array(o.string()).optional(),
2062
3144
  client_name: o.string().optional(),
2063
- client_uri: x.optional(),
2064
- logo_uri: x.optional(),
3145
+ client_uri: P.optional(),
3146
+ logo_uri: P.optional(),
2065
3147
  scope: o.string().optional(),
2066
3148
  contacts: o.array(o.string()).optional(),
2067
- tos_uri: x.optional(),
3149
+ tos_uri: P.optional(),
2068
3150
  policy_uri: o.string().optional(),
2069
- jwks_uri: x.optional(),
3151
+ jwks_uri: P.optional(),
2070
3152
  jwks: o.any().optional(),
2071
3153
  software_id: o.string().optional(),
2072
3154
  software_version: o.string().optional(),
2073
3155
  software_statement: o.string().optional()
2074
- }).strip(), Mt = o.object({
3156
+ }).strip(), Y0 = o.object({
2075
3157
  error: o.string(),
2076
3158
  error_description: o.string().optional(),
2077
3159
  error_uri: o.string().optional()
2078
- }), Rt = Tt.merge(
2079
- St
2080
- ), Et = "AI_MCPClientOAuthError", B2 = `vercel.ai.error.${Et}`, Pt = Symbol.for(B2), L2, S2, j = class extends (S2 = Z, L2 = Pt, S2) {
3160
+ }), Q0 = G0.merge(
3161
+ K0
3162
+ ), X0 = "AI_MCPClientOAuthError", wt = `vercel.ai.error.${X0}`, er = Symbol.for(wt), He, Fe, W = class extends (Fe = Y, He = er, Fe) {
2081
3163
  constructor({
2082
3164
  name: r = "MCPClientOAuthError",
2083
3165
  message: e,
2084
3166
  cause: t
2085
3167
  }) {
2086
- super({ name: r, message: e, cause: t }), this[L2] = !0;
3168
+ super({ name: r, message: e, cause: t }), this[He] = !0;
2087
3169
  }
2088
3170
  static isInstance(r) {
2089
- return Z.hasMarker(r, B2);
3171
+ return Y.hasMarker(r, wt);
2090
3172
  }
2091
- }, O = class extends j {
3173
+ }, D = class extends W {
2092
3174
  };
2093
- O.errorCode = "server_error";
2094
- var D = class extends j {
3175
+ D.errorCode = "server_error";
3176
+ var Q = class extends W {
2095
3177
  };
2096
- D.errorCode = "invalid_client";
2097
- var F = class extends j {
3178
+ Q.errorCode = "invalid_client";
3179
+ var X = class extends W {
2098
3180
  };
2099
- F.errorCode = "invalid_grant";
2100
- var B = class extends j {
3181
+ X.errorCode = "invalid_grant";
3182
+ var ee = class extends W {
2101
3183
  };
2102
- B.errorCode = "unauthorized_client";
2103
- var kt = {
2104
- [O.errorCode]: O,
3184
+ ee.errorCode = "unauthorized_client";
3185
+ var tr = {
2105
3186
  [D.errorCode]: D,
2106
- [F.errorCode]: F,
2107
- [B.errorCode]: B
3187
+ [Q.errorCode]: Q,
3188
+ [X.errorCode]: X,
3189
+ [ee.errorCode]: ee
2108
3190
  };
2109
- function It(r) {
3191
+ function rr(r) {
2110
3192
  const e = typeof r == "string" ? new URL(r) : new URL(r.href);
2111
3193
  return e.hash = "", e;
2112
3194
  }
2113
- function Ut({
3195
+ function sr({
2114
3196
  requestedResource: r,
2115
3197
  configuredResource: e
2116
3198
  }) {
2117
3199
  const t = typeof r == "string" ? new URL(r) : new URL(r.href), s = typeof e == "string" ? new URL(e) : new URL(e.href);
2118
3200
  if (t.origin !== s.origin || t.pathname.length < s.pathname.length)
2119
3201
  return !1;
2120
- const i = t.pathname.endsWith("/") ? t.pathname : t.pathname + "/", n = s.pathname.endsWith("/") ? s.pathname : s.pathname + "/";
2121
- return i.startsWith(n);
3202
+ const n = t.pathname.endsWith("/") ? t.pathname : t.pathname + "/", i = s.pathname.endsWith("/") ? s.pathname : s.pathname + "/";
3203
+ return n.startsWith(i);
2122
3204
  }
2123
- var V = class extends Error {
3205
+ var te = class extends Error {
2124
3206
  constructor(r = "Unauthorized") {
2125
3207
  super(r), this.name = "UnauthorizedError";
2126
3208
  }
2127
3209
  };
2128
- function J(r) {
3210
+ function re(r) {
2129
3211
  var e;
2130
3212
  const t = (e = r.headers.get("www-authenticate")) != null ? e : r.headers.get("WWW-Authenticate");
2131
3213
  if (!t)
2132
3214
  return;
2133
- const [s, i] = t.split(" ");
2134
- if (s.toLowerCase() !== "bearer" || !i)
3215
+ const [s, n] = t.split(" ");
3216
+ if (s.toLowerCase() !== "bearer" || !n)
2135
3217
  return;
2136
- const n = /resource_metadata="([^"]*)"/, a = t.match(n);
3218
+ const i = /resource_metadata="([^"]*)"/, a = t.match(i);
2137
3219
  if (a)
2138
3220
  try {
2139
3221
  return new URL(a[1]);
@@ -2141,45 +3223,45 @@ function J(r) {
2141
3223
  return;
2142
3224
  }
2143
3225
  }
2144
- function At(r, e = "", t = {}) {
3226
+ function nr(r, e = "", t = {}) {
2145
3227
  return e.endsWith("/") && (e = e.slice(0, -1)), t.prependPathname ? `${e}/.well-known/${r}` : `/.well-known/${r}${e}`;
2146
3228
  }
2147
- async function d2(r, e, t = fetch) {
3229
+ async function Pe(r, e, t = fetch) {
2148
3230
  try {
2149
3231
  return await t(r, { headers: e });
2150
3232
  } catch (s) {
2151
3233
  if (s instanceof TypeError)
2152
- return e ? d2(r, void 0, t) : void 0;
3234
+ return e ? Pe(r, void 0, t) : void 0;
2153
3235
  throw s;
2154
3236
  }
2155
3237
  }
2156
- async function T2(r, e, t = fetch) {
2157
- return await d2(r, {
3238
+ async function Be(r, e, t = fetch) {
3239
+ return await Pe(r, {
2158
3240
  "MCP-Protocol-Version": e
2159
3241
  }, t);
2160
3242
  }
2161
- function Ot(r, e) {
3243
+ function or(r, e) {
2162
3244
  return !r || r.status >= 400 && r.status < 500 && e !== "/";
2163
3245
  }
2164
- async function $t(r, e, t, s) {
2165
- var i, n;
2166
- const a = new URL(r), h = (i = s?.protocolVersion) != null ? i : $;
2167
- let c;
3246
+ async function ir(r, e, t, s) {
3247
+ var n, i;
3248
+ const a = new URL(r), l = (n = s?.protocolVersion) != null ? n : H;
3249
+ let u;
2168
3250
  if (s?.metadataUrl)
2169
- c = new URL(s.metadataUrl);
3251
+ u = new URL(s.metadataUrl);
2170
3252
  else {
2171
- const d = At(e, a.pathname);
2172
- c = new URL(d, (n = s?.metadataServerUrl) != null ? n : a), c.search = a.search;
3253
+ const d = nr(e, a.pathname);
3254
+ u = new URL(d, (i = s?.metadataServerUrl) != null ? i : a), u.search = a.search;
2173
3255
  }
2174
- let l = await T2(c, h, t);
2175
- if (!s?.metadataUrl && Ot(l, a.pathname)) {
3256
+ let c = await Be(u, l, t);
3257
+ if (!s?.metadataUrl && or(c, a.pathname)) {
2176
3258
  const d = new URL(`/.well-known/${e}`, a);
2177
- l = await T2(d, h, t);
3259
+ c = await Be(d, l, t);
2178
3260
  }
2179
- return l;
3261
+ return c;
2180
3262
  }
2181
- async function qt(r, e, t = fetch) {
2182
- const s = await $t(
3263
+ async function ar(r, e, t = fetch) {
3264
+ const s = await ir(
2183
3265
  r,
2184
3266
  "oauth-protected-resource",
2185
3267
  t,
@@ -2196,9 +3278,9 @@ async function qt(r, e, t = fetch) {
2196
3278
  throw new Error(
2197
3279
  `HTTP ${s.status} trying to load well-known OAuth protected resource metadata.`
2198
3280
  );
2199
- return bt.parse(await s.json());
3281
+ return V0.parse(await s.json());
2200
3282
  }
2201
- function jt(r) {
3283
+ function cr(r) {
2202
3284
  const e = typeof r == "string" ? new URL(r) : r, t = e.pathname !== "/", s = [];
2203
3285
  if (!t)
2204
3286
  return s.push({
@@ -2208,10 +3290,10 @@ function jt(r) {
2208
3290
  url: new URL("/.well-known/openid-configuration", e.origin),
2209
3291
  type: "oidc"
2210
3292
  }), s;
2211
- let i = e.pathname;
2212
- return i.endsWith("/") && (i = i.slice(0, -1)), s.push({
3293
+ let n = e.pathname;
3294
+ return n.endsWith("/") && (n = n.slice(0, -1)), s.push({
2213
3295
  url: new URL(
2214
- `/.well-known/oauth-authorization-server${i}`,
3296
+ `/.well-known/oauth-authorization-server${n}`,
2215
3297
  e.origin
2216
3298
  ),
2217
3299
  type: "oauth"
@@ -2219,92 +3301,92 @@ function jt(r) {
2219
3301
  url: new URL("/.well-known/oauth-authorization-server", e.origin),
2220
3302
  type: "oauth"
2221
3303
  }), s.push({
2222
- url: new URL(`/.well-known/openid-configuration${i}`, e.origin),
3304
+ url: new URL(`/.well-known/openid-configuration${n}`, e.origin),
2223
3305
  type: "oidc"
2224
3306
  }), s.push({
2225
- url: new URL(`${i}/.well-known/openid-configuration`, e.origin),
3307
+ url: new URL(`${n}/.well-known/openid-configuration`, e.origin),
2226
3308
  type: "oidc"
2227
3309
  }), s;
2228
3310
  }
2229
- async function Ht(r, {
3311
+ async function lr(r, {
2230
3312
  fetchFn: e = fetch,
2231
- protocolVersion: t = $
3313
+ protocolVersion: t = H
2232
3314
  } = {}) {
2233
3315
  var s;
2234
- const i = { "MCP-Protocol-Version": t }, n = jt(r);
2235
- for (const { url: a, type: h } of n) {
2236
- const c = await d2(a, i, e);
2237
- if (c) {
2238
- if (!c.ok) {
2239
- if (c.status >= 400 && c.status < 500)
3316
+ const n = { "MCP-Protocol-Version": t }, i = cr(r);
3317
+ for (const { url: a, type: l } of i) {
3318
+ const u = await Pe(a, n, e);
3319
+ if (u) {
3320
+ if (!u.ok) {
3321
+ if (u.status >= 400 && u.status < 500)
2240
3322
  continue;
2241
3323
  throw new Error(
2242
- `HTTP ${c.status} trying to load ${h === "oauth" ? "OAuth" : "OpenID provider"} metadata from ${a}`
3324
+ `HTTP ${u.status} trying to load ${l === "oauth" ? "OAuth" : "OpenID provider"} metadata from ${a}`
2243
3325
  );
2244
3326
  }
2245
- if (h === "oauth")
2246
- return F2.parse(await c.json());
3327
+ if (l === "oauth")
3328
+ return Ct.parse(await u.json());
2247
3329
  {
2248
- const l = Lt.parse(
2249
- await c.json()
3330
+ const c = W0.parse(
3331
+ await u.json()
2250
3332
  );
2251
- if (!((s = l.code_challenge_methods_supported) != null && s.includes("S256")))
3333
+ if (!((s = c.code_challenge_methods_supported) != null && s.includes("S256")))
2252
3334
  throw new Error(
2253
3335
  `Incompatible OIDC provider at ${a}: does not support S256 code challenge method required by MCP specification`
2254
3336
  );
2255
- return l;
3337
+ return c;
2256
3338
  }
2257
3339
  }
2258
3340
  }
2259
3341
  }
2260
- async function Nt(r, {
3342
+ async function ur(r, {
2261
3343
  metadata: e,
2262
3344
  clientInformation: t,
2263
3345
  redirectUrl: s,
2264
- scope: i,
2265
- state: n,
3346
+ scope: n,
3347
+ state: i,
2266
3348
  resource: a
2267
3349
  }) {
2268
- const h = "code", c = "S256";
2269
- let l;
3350
+ const l = "code", u = "S256";
3351
+ let c;
2270
3352
  if (e) {
2271
- if (l = new URL(e.authorization_endpoint), !e.response_types_supported.includes(h))
3353
+ if (c = new URL(e.authorization_endpoint), !e.response_types_supported.includes(l))
2272
3354
  throw new Error(
2273
- `Incompatible auth server: does not support response type ${h}`
3355
+ `Incompatible auth server: does not support response type ${l}`
2274
3356
  );
2275
- if (!e.code_challenge_methods_supported || !e.code_challenge_methods_supported.includes(c))
3357
+ if (!e.code_challenge_methods_supported || !e.code_challenge_methods_supported.includes(u))
2276
3358
  throw new Error(
2277
- `Incompatible auth server: does not support code challenge method ${c}`
3359
+ `Incompatible auth server: does not support code challenge method ${u}`
2278
3360
  );
2279
3361
  } else
2280
- l = new URL("/authorize", r);
2281
- const d = await Ye(), g = d.code_verifier, p = d.code_challenge;
2282
- return l.searchParams.set("response_type", h), l.searchParams.set("client_id", t.client_id), l.searchParams.set("code_challenge", p), l.searchParams.set(
3362
+ c = new URL("/authorize", r);
3363
+ const d = await w0(), g = d.code_verifier, h = d.code_challenge;
3364
+ return c.searchParams.set("response_type", l), c.searchParams.set("client_id", t.client_id), c.searchParams.set("code_challenge", h), c.searchParams.set(
2283
3365
  "code_challenge_method",
2284
- c
2285
- ), l.searchParams.set("redirect_uri", String(s)), n && l.searchParams.set("state", n), i && l.searchParams.set("scope", i), i?.includes("offline_access") && l.searchParams.append("prompt", "consent"), a && l.searchParams.set("resource", a.href), { authorizationUrl: l, codeVerifier: g };
3366
+ u
3367
+ ), c.searchParams.set("redirect_uri", String(s)), i && c.searchParams.set("state", i), n && c.searchParams.set("scope", n), n?.includes("offline_access") && c.searchParams.append("prompt", "consent"), a && c.searchParams.set("resource", a.href), { authorizationUrl: c, codeVerifier: g };
2286
3368
  }
2287
- function V2(r, e) {
3369
+ function vt(r, e) {
2288
3370
  const t = r.client_secret !== void 0;
2289
3371
  return e.length === 0 ? t ? "client_secret_post" : "none" : t && e.includes("client_secret_basic") ? "client_secret_basic" : t && e.includes("client_secret_post") ? "client_secret_post" : e.includes("none") ? "none" : t ? "client_secret_post" : "none";
2290
3372
  }
2291
- function J2(r, e, t, s) {
2292
- const { client_id: i, client_secret: n } = e;
3373
+ function _t(r, e, t, s) {
3374
+ const { client_id: n, client_secret: i } = e;
2293
3375
  switch (r) {
2294
3376
  case "client_secret_basic":
2295
- zt(i, n, t);
3377
+ dr(n, i, t);
2296
3378
  return;
2297
3379
  case "client_secret_post":
2298
- Zt(i, n, s);
3380
+ hr(n, i, s);
2299
3381
  return;
2300
3382
  case "none":
2301
- Dt(i, s);
3383
+ pr(n, s);
2302
3384
  return;
2303
3385
  default:
2304
3386
  throw new Error(`Unsupported client authentication method: ${r}`);
2305
3387
  }
2306
3388
  }
2307
- function zt(r, e, t) {
3389
+ function dr(r, e, t) {
2308
3390
  if (!e)
2309
3391
  throw new Error(
2310
3392
  "client_secret_basic authentication requires a client_secret"
@@ -2312,161 +3394,162 @@ function zt(r, e, t) {
2312
3394
  const s = btoa(`${r}:${e}`);
2313
3395
  t.set("Authorization", `Basic ${s}`);
2314
3396
  }
2315
- function Zt(r, e, t) {
3397
+ function hr(r, e, t) {
2316
3398
  t.set("client_id", r), e && t.set("client_secret", e);
2317
3399
  }
2318
- function Dt(r, e) {
3400
+ function pr(r, e) {
2319
3401
  e.set("client_id", r);
2320
3402
  }
2321
- async function p2(r) {
3403
+ async function ke(r) {
2322
3404
  const e = r instanceof Response ? r.status : void 0, t = r instanceof Response ? await r.text() : r;
2323
3405
  try {
2324
- const s = Mt.parse(JSON.parse(t)), { error: i, error_description: n, error_uri: a } = s, h = kt[i] || O;
2325
- return new h({
2326
- message: n || "",
3406
+ const s = Y0.parse(JSON.parse(t)), { error: n, error_description: i, error_uri: a } = s, l = tr[n] || D;
3407
+ return new l({
3408
+ message: i || "",
2327
3409
  cause: a
2328
3410
  });
2329
3411
  } catch (s) {
2330
- const i = `${e ? `HTTP ${e}: ` : ""}Invalid OAuth error response: ${s}. Raw body: ${t}`;
2331
- return new O({ message: i });
3412
+ const n = `${e ? `HTTP ${e}: ` : ""}Invalid OAuth error response: ${s}. Raw body: ${t}`;
3413
+ return new D({ message: n });
2332
3414
  }
2333
3415
  }
2334
- async function Ft(r, {
3416
+ async function mr(r, {
2335
3417
  metadata: e,
2336
3418
  clientInformation: t,
2337
3419
  authorizationCode: s,
2338
- codeVerifier: i,
2339
- redirectUri: n,
3420
+ codeVerifier: n,
3421
+ redirectUri: i,
2340
3422
  resource: a,
2341
- addClientAuthentication: h,
2342
- fetchFn: c
3423
+ addClientAuthentication: l,
3424
+ fetchFn: u
2343
3425
  }) {
2344
- var l;
3426
+ var c;
2345
3427
  const d = "authorization_code", g = e?.token_endpoint ? new URL(e.token_endpoint) : new URL("/token", r);
2346
3428
  if (e?.grant_types_supported && !e.grant_types_supported.includes(d))
2347
3429
  throw new Error(
2348
3430
  `Incompatible auth server: does not support grant type ${d}`
2349
3431
  );
2350
- const p = new Headers({
3432
+ const h = new Headers({
2351
3433
  "Content-Type": "application/x-www-form-urlencoded",
2352
3434
  Accept: "application/json"
2353
- }), C = new URLSearchParams({
3435
+ }), m = new URLSearchParams({
2354
3436
  grant_type: d,
2355
3437
  code: s,
2356
- code_verifier: i,
2357
- redirect_uri: String(n)
3438
+ code_verifier: n,
3439
+ redirect_uri: String(i)
2358
3440
  });
2359
- if (h)
2360
- h(p, C, r, e);
3441
+ if (l)
3442
+ l(h, m, r, e);
2361
3443
  else {
2362
- const u = (l = e?.token_endpoint_auth_methods_supported) != null ? l : [], m = V2(
3444
+ const p = (c = e?.token_endpoint_auth_methods_supported) != null ? c : [], w = vt(
2363
3445
  t,
2364
- u
3446
+ p
2365
3447
  );
2366
- J2(m, t, p, C);
3448
+ _t(w, t, h, m);
2367
3449
  }
2368
- a && C.set("resource", a.href);
2369
- const f = await (c ?? fetch)(g, {
3450
+ a && m.set("resource", a.href);
3451
+ const C = await (u ?? fetch)(g, {
2370
3452
  method: "POST",
2371
- headers: p,
2372
- body: C
3453
+ headers: h,
3454
+ body: m
2373
3455
  });
2374
- if (!f.ok)
2375
- throw await p2(f);
2376
- return D2.parse(await f.json());
3456
+ if (!C.ok)
3457
+ throw await ke(C);
3458
+ return yt.parse(await C.json());
2377
3459
  }
2378
- async function Bt(r, {
3460
+ async function fr(r, {
2379
3461
  metadata: e,
2380
3462
  clientInformation: t,
2381
3463
  refreshToken: s,
2382
- resource: i,
2383
- addClientAuthentication: n,
3464
+ resource: n,
3465
+ addClientAuthentication: i,
2384
3466
  fetchFn: a
2385
3467
  }) {
2386
- var h;
2387
- const c = "refresh_token";
2388
- let l;
3468
+ var l;
3469
+ const u = "refresh_token";
3470
+ let c;
2389
3471
  if (e) {
2390
- if (l = new URL(e.token_endpoint), e.grant_types_supported && !e.grant_types_supported.includes(c))
3472
+ if (c = new URL(e.token_endpoint), e.grant_types_supported && !e.grant_types_supported.includes(u))
2391
3473
  throw new Error(
2392
- `Incompatible auth server: does not support grant type ${c}`
3474
+ `Incompatible auth server: does not support grant type ${u}`
2393
3475
  );
2394
3476
  } else
2395
- l = new URL("/token", r);
3477
+ c = new URL("/token", r);
2396
3478
  const d = new Headers({
2397
- "Content-Type": "application/x-www-form-urlencoded"
3479
+ "Content-Type": "application/x-www-form-urlencoded",
3480
+ Accept: "application/json"
2398
3481
  }), g = new URLSearchParams({
2399
- grant_type: c,
3482
+ grant_type: u,
2400
3483
  refresh_token: s
2401
3484
  });
2402
- if (n)
2403
- n(d, g, r, e);
3485
+ if (i)
3486
+ i(d, g, r, e);
2404
3487
  else {
2405
- const C = (h = e?.token_endpoint_auth_methods_supported) != null ? h : [], f = V2(
3488
+ const m = (l = e?.token_endpoint_auth_methods_supported) != null ? l : [], C = vt(
2406
3489
  t,
2407
- C
3490
+ m
2408
3491
  );
2409
- J2(f, t, d, g);
3492
+ _t(C, t, d, g);
2410
3493
  }
2411
- i && g.set("resource", i.href);
2412
- const p = await (a ?? fetch)(l, {
3494
+ n && g.set("resource", n.href);
3495
+ const h = await (a ?? fetch)(c, {
2413
3496
  method: "POST",
2414
3497
  headers: d,
2415
3498
  body: g
2416
3499
  });
2417
- if (!p.ok)
2418
- throw await p2(p);
2419
- return D2.parse({
3500
+ if (!h.ok)
3501
+ throw await ke(h);
3502
+ return yt.parse({
2420
3503
  refresh_token: s,
2421
- ...await p.json()
3504
+ ...await h.json()
2422
3505
  });
2423
3506
  }
2424
- async function Vt(r, {
3507
+ async function gr(r, {
2425
3508
  metadata: e,
2426
3509
  clientMetadata: t,
2427
3510
  fetchFn: s
2428
3511
  }) {
2429
- let i;
3512
+ let n;
2430
3513
  if (e) {
2431
3514
  if (!e.registration_endpoint)
2432
3515
  throw new Error(
2433
3516
  "Incompatible auth server: does not support dynamic client registration"
2434
3517
  );
2435
- i = new URL(e.registration_endpoint);
3518
+ n = new URL(e.registration_endpoint);
2436
3519
  } else
2437
- i = new URL("/register", r);
2438
- const n = await (s ?? fetch)(i, {
3520
+ n = new URL("/register", r);
3521
+ const i = await (s ?? fetch)(n, {
2439
3522
  method: "POST",
2440
3523
  headers: {
2441
3524
  "Content-Type": "application/json"
2442
3525
  },
2443
3526
  body: JSON.stringify(t)
2444
3527
  });
2445
- if (!n.ok)
2446
- throw await p2(n);
2447
- return Rt.parse(await n.json());
3528
+ if (!i.ok)
3529
+ throw await ke(i);
3530
+ return Q0.parse(await i.json());
2448
3531
  }
2449
- async function W(r, e) {
3532
+ async function se(r, e) {
2450
3533
  var t, s;
2451
3534
  try {
2452
- return await t2(r, e);
2453
- } catch (i) {
2454
- if (i instanceof D || i instanceof B)
2455
- return await ((t = r.invalidateCredentials) == null ? void 0 : t.call(r, "all")), await t2(r, e);
2456
- if (i instanceof F)
2457
- return await ((s = r.invalidateCredentials) == null ? void 0 : s.call(r, "tokens")), await t2(r, e);
2458
- throw i;
3535
+ return await he(r, e);
3536
+ } catch (n) {
3537
+ if (n instanceof Q || n instanceof ee)
3538
+ return await ((t = r.invalidateCredentials) == null ? void 0 : t.call(r, "all")), await he(r, e);
3539
+ if (n instanceof X)
3540
+ return await ((s = r.invalidateCredentials) == null ? void 0 : s.call(r, "tokens")), await he(r, e);
3541
+ throw n;
2459
3542
  }
2460
3543
  }
2461
- async function Jt(r, e, t) {
2462
- const s = It(r);
3544
+ async function yr(r, e, t) {
3545
+ const s = rr(r);
2463
3546
  if (e.validateResourceURL)
2464
3547
  return await e.validateResourceURL(
2465
3548
  s,
2466
3549
  t?.resource
2467
3550
  );
2468
3551
  if (t) {
2469
- if (!Ut({
3552
+ if (!sr({
2470
3553
  requestedResource: s,
2471
3554
  configuredResource: t.resource
2472
3555
  }))
@@ -2476,31 +3559,31 @@ async function Jt(r, e, t) {
2476
3559
  return new URL(t.resource);
2477
3560
  }
2478
3561
  }
2479
- async function t2(r, {
3562
+ async function he(r, {
2480
3563
  serverUrl: e,
2481
3564
  authorizationCode: t,
2482
3565
  scope: s,
2483
- resourceMetadataUrl: i,
2484
- fetchFn: n
3566
+ resourceMetadataUrl: n,
3567
+ fetchFn: i
2485
3568
  }) {
2486
- let a, h;
3569
+ let a, l;
2487
3570
  try {
2488
- a = await qt(
3571
+ a = await ar(
2489
3572
  e,
2490
- { resourceMetadataUrl: i },
2491
- n
2492
- ), a.authorization_servers && a.authorization_servers.length > 0 && (h = a.authorization_servers[0]);
3573
+ { resourceMetadataUrl: n },
3574
+ i
3575
+ ), a.authorization_servers && a.authorization_servers.length > 0 && (l = a.authorization_servers[0]);
2493
3576
  } catch {
2494
3577
  }
2495
- h || (h = e);
2496
- const c = await Jt(
3578
+ l || (l = e);
3579
+ const u = await yr(
2497
3580
  e,
2498
3581
  r,
2499
3582
  a
2500
- ), l = await Ht(
2501
- h,
3583
+ ), c = await lr(
3584
+ l,
2502
3585
  {
2503
- fetchFn: n
3586
+ fetchFn: i
2504
3587
  }
2505
3588
  );
2506
3589
  let d = await Promise.resolve(r.clientInformation());
@@ -2513,58 +3596,58 @@ async function t2(r, {
2513
3596
  throw new Error(
2514
3597
  "OAuth client information must be saveable for dynamic registration"
2515
3598
  );
2516
- const u = await Vt(h, {
2517
- metadata: l,
3599
+ const p = await gr(l, {
3600
+ metadata: c,
2518
3601
  clientMetadata: r.clientMetadata,
2519
- fetchFn: n
3602
+ fetchFn: i
2520
3603
  });
2521
- await r.saveClientInformation(u), d = u;
3604
+ await r.saveClientInformation(p), d = p;
2522
3605
  }
2523
3606
  if (t !== void 0) {
2524
- const u = await r.codeVerifier(), m = await Ft(h, {
2525
- metadata: l,
3607
+ const p = await r.codeVerifier(), w = await mr(l, {
3608
+ metadata: c,
2526
3609
  clientInformation: d,
2527
3610
  authorizationCode: t,
2528
- codeVerifier: u,
3611
+ codeVerifier: p,
2529
3612
  redirectUri: r.redirectUrl,
2530
- resource: c,
3613
+ resource: u,
2531
3614
  addClientAuthentication: r.addClientAuthentication,
2532
- fetchFn: n
3615
+ fetchFn: i
2533
3616
  });
2534
- return await r.saveTokens(m), "AUTHORIZED";
3617
+ return await r.saveTokens(w), "AUTHORIZED";
2535
3618
  }
2536
3619
  const g = await r.tokens();
2537
3620
  if (g?.refresh_token)
2538
3621
  try {
2539
- const u = await Bt(h, {
2540
- metadata: l,
3622
+ const p = await fr(l, {
3623
+ metadata: c,
2541
3624
  clientInformation: d,
2542
3625
  refreshToken: g.refresh_token,
2543
- resource: c,
3626
+ resource: u,
2544
3627
  addClientAuthentication: r.addClientAuthentication,
2545
- fetchFn: n
3628
+ fetchFn: i
2546
3629
  });
2547
- return await r.saveTokens(u), "AUTHORIZED";
2548
- } catch (u) {
3630
+ return await r.saveTokens(p), "AUTHORIZED";
3631
+ } catch (p) {
2549
3632
  if (
2550
3633
  // If this is a ServerError, or an unknown type, log it out and try to continue. Otherwise, escalate so we can fix things and retry.
2551
- !(!(u instanceof j) || u instanceof O)
2552
- ) throw u;
3634
+ !(!(p instanceof W) || p instanceof D)
3635
+ ) throw p;
2553
3636
  }
2554
- const p = r.state ? await r.state() : void 0, { authorizationUrl: C, codeVerifier: f } = await Nt(
2555
- h,
3637
+ const h = r.state ? await r.state() : void 0, { authorizationUrl: m, codeVerifier: C } = await ur(
3638
+ l,
2556
3639
  {
2557
- metadata: l,
3640
+ metadata: c,
2558
3641
  clientInformation: d,
2559
- state: p,
3642
+ state: h,
2560
3643
  redirectUrl: r.redirectUrl,
2561
3644
  scope: s || r.clientMetadata.scope,
2562
- resource: c
3645
+ resource: u
2563
3646
  }
2564
3647
  );
2565
- return await r.saveCodeVerifier(f), await r.redirectToAuthorization(C), "REDIRECT";
3648
+ return await r.saveCodeVerifier(C), await r.redirectToAuthorization(m), "REDIRECT";
2566
3649
  }
2567
- var Wt = class {
3650
+ var Cr = class {
2568
3651
  constructor({
2569
3652
  url: r,
2570
3653
  headers: e,
@@ -2576,16 +3659,16 @@ var Wt = class {
2576
3659
  const e = {
2577
3660
  ...this.headers,
2578
3661
  ...r,
2579
- "mcp-protocol-version": $
3662
+ "mcp-protocol-version": H
2580
3663
  };
2581
3664
  if (this.authProvider) {
2582
3665
  const t = await this.authProvider.tokens();
2583
3666
  t?.access_token && (e.Authorization = `Bearer ${t.access_token}`);
2584
3667
  }
2585
- return I2(
3668
+ return et(
2586
3669
  e,
2587
- `ai-sdk/${Z2}`,
2588
- k2()
3670
+ `ai-sdk/${gt}`,
3671
+ Xe()
2589
3672
  );
2590
3673
  }
2591
3674
  async start() {
@@ -2594,83 +3677,83 @@ var Wt = class {
2594
3677
  return r();
2595
3678
  this.abortController = new AbortController();
2596
3679
  const t = async (s = !1) => {
2597
- var i, n, a, h, c;
3680
+ var n, i, a, l, u;
2598
3681
  try {
2599
- const l = await this.commonHeaders({
3682
+ const c = await this.commonHeaders({
2600
3683
  Accept: "text/event-stream"
2601
3684
  }), d = await fetch(this.url.href, {
2602
- headers: l,
2603
- signal: (i = this.abortController) == null ? void 0 : i.signal
3685
+ headers: c,
3686
+ signal: (n = this.abortController) == null ? void 0 : n.signal
2604
3687
  });
2605
3688
  if (d.status === 401 && this.authProvider && !s) {
2606
- this.resourceMetadataUrl = J(d);
3689
+ this.resourceMetadataUrl = re(d);
2607
3690
  try {
2608
- if (await W(this.authProvider, {
3691
+ if (await se(this.authProvider, {
2609
3692
  serverUrl: this.url,
2610
3693
  resourceMetadataUrl: this.resourceMetadataUrl
2611
3694
  }) !== "AUTHORIZED") {
2612
- const u = new V();
2613
- return (n = this.onerror) == null || n.call(this, u), e(u);
3695
+ const p = new te();
3696
+ return (i = this.onerror) == null || i.call(this, p), e(p);
2614
3697
  }
2615
- } catch (f) {
2616
- return (a = this.onerror) == null || a.call(this, f), e(f);
3698
+ } catch (C) {
3699
+ return (a = this.onerror) == null || a.call(this, C), e(C);
2617
3700
  }
2618
3701
  return t(!0);
2619
3702
  }
2620
3703
  if (!d.ok || !d.body) {
2621
- let f = `MCP SSE Transport Error: ${d.status} ${d.statusText}`;
2622
- d.status === 405 && (f += ". This server does not support SSE transport. Try using `http` transport instead");
2623
- const u = new y({
2624
- message: f
3704
+ let C = `MCP SSE Transport Error: ${d.status} ${d.statusText}`;
3705
+ d.status === 405 && (C += ". This server does not support SSE transport. Try using `http` transport instead");
3706
+ const p = new v({
3707
+ message: C
2625
3708
  });
2626
- return (h = this.onerror) == null || h.call(this, u), e(u);
3709
+ return (l = this.onerror) == null || l.call(this, p), e(p);
2627
3710
  }
2628
- const p = d.body.pipeThrough(new TextDecoderStream()).pipeThrough(new o2()).getReader(), C = async () => {
2629
- var f, u, m;
3711
+ const h = d.body.pipeThrough(new TextDecoderStream()).pipeThrough(new ge()).getReader(), m = async () => {
3712
+ var C, p, w;
2630
3713
  try {
2631
3714
  for (; ; ) {
2632
- const { done: w, value: v } = await p.read();
2633
- if (w) {
3715
+ const { done: y, value: b } = await h.read();
3716
+ if (y) {
2634
3717
  if (this.connected)
2635
- throw this.connected = !1, new y({
3718
+ throw this.connected = !1, new v({
2636
3719
  message: "MCP SSE Transport Error: Connection closed unexpectedly"
2637
3720
  });
2638
3721
  return;
2639
3722
  }
2640
- const { event: _, data: S } = v;
2641
- if (_ === "endpoint") {
2642
- if (this.endpoint = new URL(S, this.url), this.endpoint.origin !== this.url.origin)
2643
- throw new y({
3723
+ const { event: x, data: M } = b;
3724
+ if (x === "endpoint") {
3725
+ if (this.endpoint = new URL(M, this.url), this.endpoint.origin !== this.url.origin)
3726
+ throw new v({
2644
3727
  message: `MCP SSE Transport Error: Endpoint origin does not match connection origin: ${this.endpoint.origin}`
2645
3728
  });
2646
3729
  this.connected = !0, r();
2647
- } else if (_ === "message")
3730
+ } else if (x === "message")
2648
3731
  try {
2649
- const L = q.parse(
2650
- JSON.parse(S)
3732
+ const k = V.parse(
3733
+ JSON.parse(M)
2651
3734
  );
2652
- (f = this.onmessage) == null || f.call(this, L);
2653
- } catch (L) {
2654
- const b = new y({
3735
+ (C = this.onmessage) == null || C.call(this, k);
3736
+ } catch (k) {
3737
+ const R = new v({
2655
3738
  message: "MCP SSE Transport Error: Failed to parse message",
2656
- cause: L
3739
+ cause: k
2657
3740
  });
2658
- (u = this.onerror) == null || u.call(this, b);
3741
+ (p = this.onerror) == null || p.call(this, R);
2659
3742
  }
2660
3743
  }
2661
- } catch (w) {
2662
- if (w instanceof Error && w.name === "AbortError")
3744
+ } catch (y) {
3745
+ if (y instanceof Error && y.name === "AbortError")
2663
3746
  return;
2664
- (m = this.onerror) == null || m.call(this, w), e(w);
3747
+ (w = this.onerror) == null || w.call(this, y), e(y);
2665
3748
  }
2666
3749
  };
2667
3750
  this.sseConnection = {
2668
- close: () => p.cancel()
2669
- }, C();
2670
- } catch (l) {
2671
- if (l instanceof Error && l.name === "AbortError")
3751
+ close: () => h.cancel()
3752
+ }, m();
3753
+ } catch (c) {
3754
+ if (c instanceof Error && c.name === "AbortError")
2672
3755
  return;
2673
- (c = this.onerror) == null || c.call(this, l), e(l);
3756
+ (u = this.onerror) == null || u.call(this, c), e(c);
2674
3757
  }
2675
3758
  };
2676
3759
  t();
@@ -2682,11 +3765,11 @@ var Wt = class {
2682
3765
  }
2683
3766
  async send(r) {
2684
3767
  if (!this.endpoint || !this.connected)
2685
- throw new y({
3768
+ throw new v({
2686
3769
  message: "MCP SSE Transport Error: Not connected"
2687
3770
  });
2688
3771
  const e = this.endpoint, t = async (s = !1) => {
2689
- var i, n, a, h, c;
3772
+ var n, i, a, l, u;
2690
3773
  try {
2691
3774
  const d = {
2692
3775
  method: "POST",
@@ -2694,40 +3777,40 @@ var Wt = class {
2694
3777
  "Content-Type": "application/json"
2695
3778
  }),
2696
3779
  body: JSON.stringify(r),
2697
- signal: (i = this.abortController) == null ? void 0 : i.signal
3780
+ signal: (n = this.abortController) == null ? void 0 : n.signal
2698
3781
  }, g = await fetch(e, d);
2699
3782
  if (g.status === 401 && this.authProvider && !s) {
2700
- this.resourceMetadataUrl = J(g);
3783
+ this.resourceMetadataUrl = re(g);
2701
3784
  try {
2702
- if (await W(this.authProvider, {
3785
+ if (await se(this.authProvider, {
2703
3786
  serverUrl: this.url,
2704
3787
  resourceMetadataUrl: this.resourceMetadataUrl
2705
3788
  }) !== "AUTHORIZED") {
2706
- const C = new V();
2707
- (n = this.onerror) == null || n.call(this, C);
3789
+ const m = new te();
3790
+ (i = this.onerror) == null || i.call(this, m);
2708
3791
  return;
2709
3792
  }
2710
- } catch (p) {
2711
- (a = this.onerror) == null || a.call(this, p);
3793
+ } catch (h) {
3794
+ (a = this.onerror) == null || a.call(this, h);
2712
3795
  return;
2713
3796
  }
2714
3797
  return t(!0);
2715
3798
  }
2716
3799
  if (!g.ok) {
2717
- const p = await g.text().catch(() => null), C = new y({
2718
- message: `MCP SSE Transport Error: POSTing to endpoint (HTTP ${g.status}): ${p}`
3800
+ const h = await g.text().catch(() => null), m = new v({
3801
+ message: `MCP SSE Transport Error: POSTing to endpoint (HTTP ${g.status}): ${h}`
2719
3802
  });
2720
- (h = this.onerror) == null || h.call(this, C);
3803
+ (l = this.onerror) == null || l.call(this, m);
2721
3804
  return;
2722
3805
  }
2723
- } catch (l) {
2724
- (c = this.onerror) == null || c.call(this, l);
3806
+ } catch (c) {
3807
+ (u = this.onerror) == null || u.call(this, c);
2725
3808
  return;
2726
3809
  }
2727
3810
  };
2728
3811
  await t();
2729
3812
  }
2730
- }, Gt = class {
3813
+ }, wr = class {
2731
3814
  constructor({
2732
3815
  url: r,
2733
3816
  headers: e,
@@ -2744,21 +3827,21 @@ var Wt = class {
2744
3827
  const e = {
2745
3828
  ...this.headers,
2746
3829
  ...r,
2747
- "mcp-protocol-version": $
3830
+ "mcp-protocol-version": H
2748
3831
  };
2749
3832
  if (this.sessionId && (e["mcp-session-id"] = this.sessionId), this.authProvider) {
2750
3833
  const t = await this.authProvider.tokens();
2751
3834
  t?.access_token && (e.Authorization = `Bearer ${t.access_token}`);
2752
3835
  }
2753
- return I2(
3836
+ return et(
2754
3837
  e,
2755
- `ai-sdk/${Z2}`,
2756
- k2()
3838
+ `ai-sdk/${gt}`,
3839
+ Xe()
2757
3840
  );
2758
3841
  }
2759
3842
  async start() {
2760
3843
  if (this.abortController)
2761
- throw new y({
3844
+ throw new v({
2762
3845
  message: "MCP HTTP Transport Error: Transport already started. Note: client.connect() calls start() automatically."
2763
3846
  });
2764
3847
  this.abortController = new AbortController(), this.openInboundSse();
@@ -2782,7 +3865,7 @@ var Wt = class {
2782
3865
  }
2783
3866
  async send(r) {
2784
3867
  const e = async (t = !1) => {
2785
- var s, i, n, a, h, c, l;
3868
+ var s, n, i, a, l, u, c;
2786
3869
  try {
2787
3870
  const g = {
2788
3871
  method: "POST",
@@ -2792,80 +3875,82 @@ var Wt = class {
2792
3875
  }),
2793
3876
  body: JSON.stringify(r),
2794
3877
  signal: (s = this.abortController) == null ? void 0 : s.signal
2795
- }, p = await fetch(this.url, g), C = p.headers.get("mcp-session-id");
2796
- if (C && (this.sessionId = C), p.status === 401 && this.authProvider && !t) {
2797
- this.resourceMetadataUrl = J(p);
3878
+ }, h = await fetch(this.url, g), m = h.headers.get("mcp-session-id");
3879
+ if (m && (this.sessionId = m), h.status === 401 && this.authProvider && !t) {
3880
+ this.resourceMetadataUrl = re(h);
2798
3881
  try {
2799
- if (await W(this.authProvider, {
3882
+ if (await se(this.authProvider, {
2800
3883
  serverUrl: this.url,
2801
3884
  resourceMetadataUrl: this.resourceMetadataUrl
2802
3885
  }) !== "AUTHORIZED")
2803
- throw new V();
2804
- } catch (m) {
2805
- throw (i = this.onerror) == null || i.call(this, m), m;
3886
+ throw new te();
3887
+ } catch (y) {
3888
+ throw (n = this.onerror) == null || n.call(this, y), y;
2806
3889
  }
2807
3890
  return e(!0);
2808
3891
  }
2809
- if (p.status === 202) {
3892
+ if (h.status === 202) {
2810
3893
  this.inboundSseConnection || this.openInboundSse();
2811
3894
  return;
2812
3895
  }
2813
- if (!p.ok) {
2814
- const m = await p.text().catch(() => null);
2815
- let w = `MCP HTTP Transport Error: POSTing to endpoint (HTTP ${p.status}): ${m}`;
2816
- p.status === 404 && (w += ". This server does not support HTTP transport. Try using `sse` transport instead");
2817
- const v = new y({
2818
- message: w
3896
+ if (!h.ok) {
3897
+ const y = await h.text().catch(() => null);
3898
+ let b = `MCP HTTP Transport Error: POSTing to endpoint (HTTP ${h.status}): ${y}`;
3899
+ h.status === 404 && (b += ". This server does not support HTTP transport. Try using `sse` transport instead");
3900
+ const x = new v({
3901
+ message: b
2819
3902
  });
2820
- throw (n = this.onerror) == null || n.call(this, v), v;
3903
+ throw (i = this.onerror) == null || i.call(this, x), x;
2821
3904
  }
2822
- const f = p.headers.get("content-type") || "";
2823
- if (f.includes("application/json")) {
2824
- const m = await p.json(), w = Array.isArray(m) ? m.map((v) => q.parse(v)) : [q.parse(m)];
2825
- for (const v of w) (a = this.onmessage) == null || a.call(this, v);
3905
+ if (!("id" in r))
3906
+ return;
3907
+ const p = h.headers.get("content-type") || "";
3908
+ if (p.includes("application/json")) {
3909
+ const y = await h.json(), b = Array.isArray(y) ? y.map((x) => V.parse(x)) : [V.parse(y)];
3910
+ for (const x of b) (a = this.onmessage) == null || a.call(this, x);
2826
3911
  return;
2827
3912
  }
2828
- if (f.includes("text/event-stream")) {
2829
- if (!p.body) {
2830
- const _ = new y({
3913
+ if (p.includes("text/event-stream")) {
3914
+ if (!h.body) {
3915
+ const M = new v({
2831
3916
  message: "MCP HTTP Transport Error: text/event-stream response without body"
2832
3917
  });
2833
- throw (h = this.onerror) == null || h.call(this, _), _;
3918
+ throw (l = this.onerror) == null || l.call(this, M), M;
2834
3919
  }
2835
- const w = p.body.pipeThrough(new TextDecoderStream()).pipeThrough(new o2()).getReader();
3920
+ const b = h.body.pipeThrough(new TextDecoderStream()).pipeThrough(new ge()).getReader();
2836
3921
  (async () => {
2837
- var _, S, L;
3922
+ var M, k, R;
2838
3923
  try {
2839
3924
  for (; ; ) {
2840
- const { done: b, value: E } = await w.read();
2841
- if (b) return;
2842
- const { event: U, data: T } = E;
2843
- if (U === "message")
3925
+ const { done: E, value: q } = await b.read();
3926
+ if (E) return;
3927
+ const { event: I, data: j } = q;
3928
+ if (I === "message")
2844
3929
  try {
2845
- const P = q.parse(JSON.parse(T));
2846
- (_ = this.onmessage) == null || _.call(this, P);
2847
- } catch (P) {
2848
- const Q = new y({
3930
+ const F = V.parse(JSON.parse(j));
3931
+ (M = this.onmessage) == null || M.call(this, F);
3932
+ } catch (F) {
3933
+ const A = new v({
2849
3934
  message: "MCP HTTP Transport Error: Failed to parse message",
2850
- cause: P
3935
+ cause: F
2851
3936
  });
2852
- (S = this.onerror) == null || S.call(this, Q);
3937
+ (k = this.onerror) == null || k.call(this, A);
2853
3938
  }
2854
3939
  }
2855
- } catch (b) {
2856
- if (b instanceof Error && b.name === "AbortError")
3940
+ } catch (E) {
3941
+ if (E instanceof Error && E.name === "AbortError")
2857
3942
  return;
2858
- (L = this.onerror) == null || L.call(this, b);
3943
+ (R = this.onerror) == null || R.call(this, E);
2859
3944
  }
2860
3945
  })();
2861
3946
  return;
2862
3947
  }
2863
- const u = new y({
2864
- message: `MCP HTTP Transport Error: Unexpected content type: ${f}`
3948
+ const w = new v({
3949
+ message: `MCP HTTP Transport Error: Unexpected content type: ${p}`
2865
3950
  });
2866
- throw (c = this.onerror) == null || c.call(this, u), u;
3951
+ throw (u = this.onerror) == null || u.call(this, w), w;
2867
3952
  } catch (d) {
2868
- throw (l = this.onerror) == null || l.call(this, d), d;
3953
+ throw (c = this.onerror) == null || c.call(this, d), d;
2869
3954
  }
2870
3955
  };
2871
3956
  await e();
@@ -2887,7 +3972,7 @@ var Wt = class {
2887
3972
  if (e > 0 && this.inboundReconnectAttempts >= e) {
2888
3973
  (r = this.onerror) == null || r.call(
2889
3974
  this,
2890
- new y({
3975
+ new v({
2891
3976
  message: `MCP HTTP Transport Error: Maximum reconnection attempts (${e}) exceeded.`
2892
3977
  })
2893
3978
  );
@@ -2901,116 +3986,128 @@ var Wt = class {
2901
3986
  }
2902
3987
  // Open optional inbound SSE stream; best-effort and resumable
2903
3988
  async openInboundSse(r = !1, e) {
2904
- var t, s, i, n, a, h;
3989
+ var t, s, n, i, a, l;
2905
3990
  try {
2906
- const c = await this.commonHeaders({
3991
+ const u = await this.commonHeaders({
2907
3992
  Accept: "text/event-stream"
2908
3993
  });
2909
- e && (c["last-event-id"] = e);
2910
- const l = await fetch(this.url.href, {
3994
+ e && (u["last-event-id"] = e);
3995
+ const c = await fetch(this.url.href, {
2911
3996
  method: "GET",
2912
- headers: c,
3997
+ headers: u,
2913
3998
  signal: (t = this.abortController) == null ? void 0 : t.signal
2914
- }), d = l.headers.get("mcp-session-id");
2915
- if (d && (this.sessionId = d), l.status === 401 && this.authProvider && !r) {
2916
- this.resourceMetadataUrl = J(l);
3999
+ }), d = c.headers.get("mcp-session-id");
4000
+ if (d && (this.sessionId = d), c.status === 401 && this.authProvider && !r) {
4001
+ this.resourceMetadataUrl = re(c);
2917
4002
  try {
2918
- if (await W(this.authProvider, {
4003
+ if (await se(this.authProvider, {
2919
4004
  serverUrl: this.url,
2920
4005
  resourceMetadataUrl: this.resourceMetadataUrl
2921
4006
  }) !== "AUTHORIZED") {
2922
- const u = new V();
2923
- (s = this.onerror) == null || s.call(this, u);
4007
+ const p = new te();
4008
+ (s = this.onerror) == null || s.call(this, p);
2924
4009
  return;
2925
4010
  }
2926
- } catch (f) {
2927
- (i = this.onerror) == null || i.call(this, f);
4011
+ } catch (C) {
4012
+ (n = this.onerror) == null || n.call(this, C);
2928
4013
  return;
2929
4014
  }
2930
4015
  return this.openInboundSse(!0, e);
2931
4016
  }
2932
- if (l.status === 405)
4017
+ if (c.status === 405)
2933
4018
  return;
2934
- if (!l.ok || !l.body) {
2935
- const f = new y({
2936
- message: `MCP HTTP Transport Error: GET SSE failed: ${l.status} ${l.statusText}`
4019
+ if (!c.ok || !c.body) {
4020
+ const C = new v({
4021
+ message: `MCP HTTP Transport Error: GET SSE failed: ${c.status} ${c.statusText}`
2937
4022
  });
2938
- (n = this.onerror) == null || n.call(this, f);
4023
+ (i = this.onerror) == null || i.call(this, C);
2939
4024
  return;
2940
4025
  }
2941
- const p = l.body.pipeThrough(new TextDecoderStream()).pipeThrough(new o2()).getReader(), C = async () => {
2942
- var f, u, m, w;
4026
+ const h = c.body.pipeThrough(new TextDecoderStream()).pipeThrough(new ge()).getReader(), m = async () => {
4027
+ var C, p, w, y;
2943
4028
  try {
2944
4029
  for (; ; ) {
2945
- const { done: v, value: _ } = await p.read();
2946
- if (v) return;
2947
- const { event: S, data: L, id: b } = _;
2948
- if (b && (this.lastInboundEventId = b), S === "message")
4030
+ const { done: b, value: x } = await h.read();
4031
+ if (b) return;
4032
+ const { event: M, data: k, id: R } = x;
4033
+ if (R && (this.lastInboundEventId = R), M === "message")
2949
4034
  try {
2950
- const E = q.parse(JSON.parse(L));
2951
- (f = this.onmessage) == null || f.call(this, E);
4035
+ const E = V.parse(JSON.parse(k));
4036
+ (C = this.onmessage) == null || C.call(this, E);
2952
4037
  } catch (E) {
2953
- const U = new y({
4038
+ const q = new v({
2954
4039
  message: "MCP HTTP Transport Error: Failed to parse message",
2955
4040
  cause: E
2956
4041
  });
2957
- (u = this.onerror) == null || u.call(this, U);
4042
+ (p = this.onerror) == null || p.call(this, q);
2958
4043
  }
2959
4044
  }
2960
- } catch (v) {
2961
- if (v instanceof Error && v.name === "AbortError")
4045
+ } catch (b) {
4046
+ if (b instanceof Error && b.name === "AbortError")
2962
4047
  return;
2963
- (m = this.onerror) == null || m.call(this, v), (w = this.abortController) != null && w.signal.aborted || this.scheduleInboundSseReconnection();
4048
+ (w = this.onerror) == null || w.call(this, b), (y = this.abortController) != null && y.signal.aborted || this.scheduleInboundSseReconnection();
2964
4049
  }
2965
4050
  };
2966
4051
  this.inboundSseConnection = {
2967
- close: () => p.cancel()
2968
- }, this.inboundReconnectAttempts = 0, C();
2969
- } catch (c) {
2970
- if (c instanceof Error && c.name === "AbortError")
4052
+ close: () => h.cancel()
4053
+ }, this.inboundReconnectAttempts = 0, m();
4054
+ } catch (u) {
4055
+ if (u instanceof Error && u.name === "AbortError")
2971
4056
  return;
2972
- (a = this.onerror) == null || a.call(this, c), (h = this.abortController) != null && h.signal.aborted || this.scheduleInboundSseReconnection();
4057
+ (a = this.onerror) == null || a.call(this, u), (l = this.abortController) != null && l.signal.aborted || this.scheduleInboundSseReconnection();
2973
4058
  }
2974
4059
  }
2975
4060
  };
2976
- function Yt(r) {
4061
+ function vr(r) {
2977
4062
  switch (r.type) {
2978
4063
  case "sse":
2979
- return new Wt(r);
4064
+ return new Cr(r);
2980
4065
  case "http":
2981
- return new Gt(r);
4066
+ return new wr(r);
2982
4067
  default:
2983
- throw new y({
4068
+ throw new v({
2984
4069
  message: "Unsupported or invalid transport configuration. If you are using a custom transport, make sure it implements the MCPTransport interface."
2985
4070
  });
2986
4071
  }
2987
4072
  }
2988
- function Kt(r) {
4073
+ function _r(r) {
2989
4074
  return "start" in r && typeof r.start == "function" && "send" in r && typeof r.send == "function" && "close" in r && typeof r.close == "function";
2990
4075
  }
2991
- var Qt = "1.0.0";
2992
- async function Xt(r) {
2993
- const e = new e0(r);
4076
+ var br = "1.0.0";
4077
+ function Ve({
4078
+ output: r
4079
+ }) {
4080
+ const e = r;
4081
+ return !("content" in e) || !Array.isArray(e.content) ? { type: "json", value: e } : { type: "content", value: e.content.map(
4082
+ (s) => s.type === "text" && "text" in s ? { type: "text", text: s.text } : s.type === "image" && "data" in s && "mimeType" in s ? {
4083
+ type: "image-data",
4084
+ data: s.data,
4085
+ mediaType: s.mimeType
4086
+ } : { type: "text", text: JSON.stringify(s) }
4087
+ ) };
4088
+ }
4089
+ async function xr(r) {
4090
+ const e = new Lr(r);
2994
4091
  return await e.init(), e;
2995
4092
  }
2996
- var e0 = class {
4093
+ var Lr = class {
2997
4094
  constructor({
2998
4095
  transport: r,
2999
4096
  name: e = "ai-sdk-mcp-client",
3000
- version: t = Qt,
4097
+ version: t = br,
3001
4098
  onUncaughtError: s,
3002
- capabilities: i
4099
+ capabilities: n
3003
4100
  }) {
3004
- this.requestMessageId = 0, this.responseHandlers = /* @__PURE__ */ new Map(), this.serverCapabilities = {}, this.isClosed = !0, this.onUncaughtError = s, this.clientCapabilities = i ?? {}, Kt(r) ? this.transport = r : this.transport = Yt(r), this.transport.onclose = () => this.onClose(), this.transport.onerror = (n) => this.onError(n), this.transport.onmessage = (n) => {
3005
- if ("method" in n) {
3006
- "id" in n ? this.onRequestMessage(n) : this.onError(
3007
- new y({
4101
+ this.requestMessageId = 0, this.responseHandlers = /* @__PURE__ */ new Map(), this.serverCapabilities = {}, this.isClosed = !0, this.onUncaughtError = s, this.clientCapabilities = n ?? {}, _r(r) ? this.transport = r : this.transport = vr(r), this.transport.onclose = () => this.onClose(), this.transport.onerror = (i) => this.onError(i), this.transport.onmessage = (i) => {
4102
+ if ("method" in i) {
4103
+ "id" in i ? this.onRequestMessage(i) : this.onError(
4104
+ new v({
3008
4105
  message: "Unsupported message type"
3009
4106
  })
3010
4107
  );
3011
4108
  return;
3012
4109
  }
3013
- this.onResponse(n);
4110
+ this.onResponse(i);
3014
4111
  }, this.clientInfo = {
3015
4112
  name: e,
3016
4113
  version: t
@@ -3023,19 +4120,19 @@ var e0 = class {
3023
4120
  request: {
3024
4121
  method: "initialize",
3025
4122
  params: {
3026
- protocolVersion: $,
4123
+ protocolVersion: H,
3027
4124
  capabilities: this.clientCapabilities,
3028
4125
  clientInfo: this.clientInfo
3029
4126
  }
3030
4127
  },
3031
- resultSchema: rt
4128
+ resultSchema: P0
3032
4129
  });
3033
4130
  if (r === void 0)
3034
- throw new y({
4131
+ throw new v({
3035
4132
  message: "Server sent invalid initialize result"
3036
4133
  });
3037
- if (!Xe.includes(r.protocolVersion))
3038
- throw new y({
4134
+ if (!b0.includes(r.protocolVersion))
4135
+ throw new v({
3039
4136
  message: `Server's protocol version is not supported: ${r.protocolVersion}`
3040
4137
  });
3041
4138
  return this.serverCapabilities = r.capabilities, await this.notification({
@@ -3056,7 +4153,7 @@ var e0 = class {
3056
4153
  case "tools/list":
3057
4154
  case "tools/call":
3058
4155
  if (!this.serverCapabilities.tools)
3059
- throw new y({
4156
+ throw new v({
3060
4157
  message: "Server does not support tools"
3061
4158
  });
3062
4159
  break;
@@ -3064,19 +4161,19 @@ var e0 = class {
3064
4161
  case "resources/read":
3065
4162
  case "resources/templates/list":
3066
4163
  if (!this.serverCapabilities.resources)
3067
- throw new y({
4164
+ throw new v({
3068
4165
  message: "Server does not support resources"
3069
4166
  });
3070
4167
  break;
3071
4168
  case "prompts/list":
3072
4169
  case "prompts/get":
3073
4170
  if (!this.serverCapabilities.prompts)
3074
- throw new y({
4171
+ throw new v({
3075
4172
  message: "Server does not support prompts"
3076
4173
  });
3077
4174
  break;
3078
4175
  default:
3079
- throw new y({
4176
+ throw new v({
3080
4177
  message: `Unsupported method: ${r}`
3081
4178
  });
3082
4179
  }
@@ -3086,45 +4183,45 @@ var e0 = class {
3086
4183
  resultSchema: e,
3087
4184
  options: t
3088
4185
  }) {
3089
- return new Promise((s, i) => {
4186
+ return new Promise((s, n) => {
3090
4187
  if (this.isClosed)
3091
- return i(
3092
- new y({
4188
+ return n(
4189
+ new v({
3093
4190
  message: "Attempted to send a request from a closed client"
3094
4191
  })
3095
4192
  );
3096
4193
  this.assertCapability(r.method);
3097
- const n = t?.signal;
3098
- n?.throwIfAborted();
3099
- const a = this.requestMessageId++, h = {
4194
+ const i = t?.signal;
4195
+ i?.throwIfAborted();
4196
+ const a = this.requestMessageId++, l = {
3100
4197
  ...r,
3101
4198
  jsonrpc: "2.0",
3102
4199
  id: a
3103
- }, c = () => {
4200
+ }, u = () => {
3104
4201
  this.responseHandlers.delete(a);
3105
4202
  };
3106
- this.responseHandlers.set(a, (l) => {
3107
- if (n?.aborted)
3108
- return i(
3109
- new y({
4203
+ this.responseHandlers.set(a, (c) => {
4204
+ if (i?.aborted)
4205
+ return n(
4206
+ new v({
3110
4207
  message: "Request was aborted",
3111
- cause: n.reason
4208
+ cause: i.reason
3112
4209
  })
3113
4210
  );
3114
- if (l instanceof Error)
3115
- return i(l);
4211
+ if (c instanceof Error)
4212
+ return n(c);
3116
4213
  try {
3117
- const d = e.parse(l.result);
4214
+ const d = e.parse(c.result);
3118
4215
  s(d);
3119
4216
  } catch (d) {
3120
- const g = new y({
4217
+ const g = new v({
3121
4218
  message: "Failed to parse server response",
3122
4219
  cause: d
3123
4220
  });
3124
- i(g);
4221
+ n(g);
3125
4222
  }
3126
- }), this.transport.send(h).catch((l) => {
3127
- c(), i(l);
4223
+ }), this.transport.send(l).catch((c) => {
4224
+ u(), n(c);
3128
4225
  });
3129
4226
  });
3130
4227
  }
@@ -3132,15 +4229,11 @@ var e0 = class {
3132
4229
  params: r,
3133
4230
  options: e
3134
4231
  } = {}) {
3135
- try {
3136
- return this.request({
3137
- request: { method: "tools/list", params: r },
3138
- resultSchema: ot,
3139
- options: e
3140
- });
3141
- } catch (t) {
3142
- throw t;
3143
- }
4232
+ return this.request({
4233
+ request: { method: "tools/list", params: r },
4234
+ resultSchema: T0,
4235
+ options: e
4236
+ });
3144
4237
  }
3145
4238
  async callTool({
3146
4239
  name: r,
@@ -3150,7 +4243,7 @@ var e0 = class {
3150
4243
  try {
3151
4244
  return this.request({
3152
4245
  request: { method: "tools/call", params: { name: r, arguments: e } },
3153
- resultSchema: at,
4246
+ resultSchema: E0,
3154
4247
  options: {
3155
4248
  signal: t?.abortSignal
3156
4249
  }
@@ -3166,7 +4259,7 @@ var e0 = class {
3166
4259
  try {
3167
4260
  return this.request({
3168
4261
  request: { method: "resources/list", params: r },
3169
- resultSchema: nt,
4262
+ resultSchema: R0,
3170
4263
  options: e
3171
4264
  });
3172
4265
  } catch (t) {
@@ -3180,7 +4273,7 @@ var e0 = class {
3180
4273
  try {
3181
4274
  return this.request({
3182
4275
  request: { method: "resources/read", params: { uri: r } },
3183
- resultSchema: ht,
4276
+ resultSchema: O0,
3184
4277
  options: e
3185
4278
  });
3186
4279
  } catch (t) {
@@ -3193,7 +4286,7 @@ var e0 = class {
3193
4286
  try {
3194
4287
  return this.request({
3195
4288
  request: { method: "resources/templates/list" },
3196
- resultSchema: lt,
4289
+ resultSchema: A0,
3197
4290
  options: r
3198
4291
  });
3199
4292
  } catch (e) {
@@ -3207,7 +4300,7 @@ var e0 = class {
3207
4300
  try {
3208
4301
  return this.request({
3209
4302
  request: { method: "prompts/list", params: r },
3210
- resultSchema: ut,
4303
+ resultSchema: j0,
3211
4304
  options: e
3212
4305
  });
3213
4306
  } catch (t) {
@@ -3222,7 +4315,7 @@ var e0 = class {
3222
4315
  try {
3223
4316
  return this.request({
3224
4317
  request: { method: "prompts/get", params: { name: r, arguments: e } },
3225
- resultSchema: gt,
4318
+ resultSchema: N0,
3226
4319
  options: t
3227
4320
  });
3228
4321
  } catch (s) {
@@ -3237,41 +4330,96 @@ var e0 = class {
3237
4330
  await this.transport.send(e);
3238
4331
  }
3239
4332
  /**
3240
- * Returns a set of AI SDK tools from the MCP server
4333
+ * Returns a set of AI SDK tools from the MCP server.
4334
+ * This fetches tool definitions and wraps them with execute functions.
3241
4335
  * @returns A record of tool names to their implementations
3242
4336
  */
3243
4337
  async tools({
3244
4338
  schemas: r = "automatic"
3245
4339
  } = {}) {
3246
- var e;
3247
- const t = {};
3248
- try {
3249
- const s = await this.listTools();
3250
- for (const { name: i, description: n, inputSchema: a } of s.tools) {
3251
- if (r !== "automatic" && !(i in r))
3252
- continue;
3253
- const h = this, c = async (d, g) => {
3254
- var p;
3255
- return (p = g?.abortSignal) == null || p.throwIfAborted(), h.callTool({ name: i, args: d, options: g });
3256
- }, l = r === "automatic" ? De({
3257
- description: n,
3258
- inputSchema: Be({
3259
- ...a,
3260
- properties: (e = a.properties) != null ? e : {},
3261
- additionalProperties: !1
3262
- }),
3263
- execute: c
3264
- }) : {
3265
- description: n,
3266
- inputSchema: r[i].inputSchema,
3267
- execute: c
3268
- };
3269
- t[i] = l;
4340
+ const e = await this.listTools();
4341
+ return this.toolsFromDefinitions(e, {
4342
+ schemas: r
4343
+ });
4344
+ }
4345
+ /**
4346
+ * Creates AI SDK tools from tool definitions without fetching from the server.
4347
+ */
4348
+ toolsFromDefinitions(r, { schemas: e = "automatic" } = {}) {
4349
+ var t, s;
4350
+ const n = {};
4351
+ for (const {
4352
+ name: i,
4353
+ title: a,
4354
+ description: l,
4355
+ inputSchema: u,
4356
+ annotations: c,
4357
+ _meta: d
4358
+ } of r.tools) {
4359
+ const g = a ?? c?.title;
4360
+ if (e !== "automatic" && !(i in e))
4361
+ continue;
4362
+ const h = this, m = e !== "automatic" ? (t = e[i]) == null ? void 0 : t.outputSchema : void 0, C = async (w, y) => {
4363
+ var b;
4364
+ (b = y?.abortSignal) == null || b.throwIfAborted();
4365
+ const x = await h.callTool({ name: i, args: w, options: y });
4366
+ return m != null ? h.extractStructuredContent(x, m, i) : x;
4367
+ }, p = e === "automatic" ? m0({
4368
+ description: l,
4369
+ title: g,
4370
+ inputSchema: J({
4371
+ ...u,
4372
+ properties: (s = u.properties) != null ? s : {},
4373
+ additionalProperties: !1
4374
+ }),
4375
+ execute: C,
4376
+ toModelOutput: Ve
4377
+ }) : {
4378
+ description: l,
4379
+ title: g,
4380
+ inputSchema: e[i].inputSchema,
4381
+ ...m != null ? { outputSchema: m } : {},
4382
+ execute: C,
4383
+ toModelOutput: Ve
4384
+ };
4385
+ n[i] = { ...p, _meta: d };
4386
+ }
4387
+ return n;
4388
+ }
4389
+ /**
4390
+ * Extracts and validates structuredContent from a tool result.
4391
+ */
4392
+ async extractStructuredContent(r, e, t) {
4393
+ if ("structuredContent" in r && r.structuredContent != null) {
4394
+ const s = await it({
4395
+ value: r.structuredContent,
4396
+ schema: ot(e)
4397
+ });
4398
+ if (!s.success)
4399
+ throw new v({
4400
+ message: `Tool "${t}" returned structuredContent that does not match the expected outputSchema`,
4401
+ cause: s.error
4402
+ });
4403
+ return s.value;
4404
+ }
4405
+ if ("content" in r && Array.isArray(r.content)) {
4406
+ const s = r.content.find((n) => n.type === "text");
4407
+ if (s && "text" in s) {
4408
+ const n = await p0({
4409
+ text: s.text,
4410
+ schema: e
4411
+ });
4412
+ if (!n.success)
4413
+ throw new v({
4414
+ message: `Tool "${t}" returned content that does not match the expected outputSchema`,
4415
+ cause: n.error
4416
+ });
4417
+ return n.value;
3270
4418
  }
3271
- return t;
3272
- } catch (s) {
3273
- throw s;
3274
4419
  }
4420
+ throw new v({
4421
+ message: `Tool "${t}" did not return structuredContent or parseable text content`
4422
+ });
3275
4423
  }
3276
4424
  listResources({
3277
4425
  params: r,
@@ -3290,13 +4438,13 @@ var e0 = class {
3290
4438
  } = {}) {
3291
4439
  return this.listResourceTemplatesInternal({ options: r });
3292
4440
  }
3293
- listPrompts({
4441
+ experimental_listPrompts({
3294
4442
  params: r,
3295
4443
  options: e
3296
4444
  } = {}) {
3297
4445
  return this.listPromptsInternal({ params: r, options: e });
3298
4446
  }
3299
- getPrompt({
4447
+ experimental_getPrompt({
3300
4448
  name: r,
3301
4449
  arguments: e,
3302
4450
  options: t
@@ -3304,8 +4452,8 @@ var e0 = class {
3304
4452
  return this.getPromptInternal({ name: r, args: e, options: t });
3305
4453
  }
3306
4454
  onElicitationRequest(r, e) {
3307
- if (r !== x2)
3308
- throw new y({
4455
+ if (r !== De)
4456
+ throw new v({
3309
4457
  message: "Unsupported request schema. Only ElicitationRequestSchema is supported."
3310
4458
  });
3311
4459
  this.elicitationRequestHandler = e;
@@ -3334,7 +4482,7 @@ var e0 = class {
3334
4482
  });
3335
4483
  return;
3336
4484
  }
3337
- const e = x2.safeParse({
4485
+ const e = De.safeParse({
3338
4486
  method: r.method,
3339
4487
  params: r.params
3340
4488
  });
@@ -3351,7 +4499,7 @@ var e0 = class {
3351
4499
  return;
3352
4500
  }
3353
4501
  try {
3354
- const t = await this.elicitationRequestHandler(e.data), s = Ct.parse(t);
4502
+ const t = await this.elicitationRequestHandler(e.data), s = z0.parse(t);
3355
4503
  await this.transport.send({
3356
4504
  jsonrpc: "2.0",
3357
4505
  id: r.id,
@@ -3374,7 +4522,7 @@ var e0 = class {
3374
4522
  onClose() {
3375
4523
  if (this.isClosed) return;
3376
4524
  this.isClosed = !0;
3377
- const r = new y({
4525
+ const r = new v({
3378
4526
  message: "Connection closed"
3379
4527
  });
3380
4528
  for (const e of this.responseHandlers.values())
@@ -3387,13 +4535,13 @@ var e0 = class {
3387
4535
  onResponse(r) {
3388
4536
  const e = Number(r.id), t = this.responseHandlers.get(e);
3389
4537
  if (t === void 0)
3390
- throw new y({
4538
+ throw new v({
3391
4539
  message: `Protocol error: Received a response for an unknown message ID: ${JSON.stringify(
3392
4540
  r
3393
4541
  )}`
3394
4542
  });
3395
4543
  this.responseHandlers.delete(e), t(
3396
- "result" in r ? r : new y({
4544
+ "result" in r ? r : new v({
3397
4545
  message: r.error.message,
3398
4546
  code: r.error.code,
3399
4547
  data: r.error.data,
@@ -3402,17 +4550,17 @@ var e0 = class {
3402
4550
  );
3403
4551
  }
3404
4552
  };
3405
- const t0 = async (r) => {
4553
+ const Sr = async (r) => {
3406
4554
  const e = {};
3407
4555
  try {
3408
4556
  const t = await r.listTools();
3409
- for (const { name: s, description: i, inputSchema: n } of t.tools) {
3410
- const a = async (h, c) => r.callTool({ name: s, arguments: h }, { signal: c?.abortSignal });
3411
- e[s] = Ce({
3412
- description: i,
3413
- inputSchema: we({
3414
- ...n,
3415
- properties: n.properties ?? {},
4557
+ for (const { name: s, description: n, inputSchema: i } of t.tools) {
4558
+ const a = async (l, u) => r.callTool({ name: s, arguments: l }, { signal: u?.abortSignal });
4559
+ e[s] = Bt({
4560
+ description: n,
4561
+ inputSchema: Vt({
4562
+ ...i,
4563
+ properties: i.properties ?? {},
3416
4564
  additionalProperties: !1
3417
4565
  }),
3418
4566
  execute: a
@@ -3423,7 +4571,7 @@ const t0 = async (r) => {
3423
4571
  throw t;
3424
4572
  }
3425
4573
  };
3426
- function r0(r) {
4574
+ function Pr(r) {
3427
4575
  const e = Object.entries(r);
3428
4576
  if (e.length === 0)
3429
4577
  return "";
@@ -3435,12 +4583,12 @@ function r0(r) {
3435
4583
  return t += `你可以根据需要调用以下工具:
3436
4584
 
3437
4585
  `, t += `<tools>
3438
- `, e.forEach(([s, i]) => {
3439
- const n = i, a = n.description || "无描述", h = n.parameters || n.inputSchema || {};
4586
+ `, e.forEach(([s, n]) => {
4587
+ const i = n, a = i.description || "无描述", l = i.parameters || i.inputSchema || {};
3440
4588
  t += `${JSON.stringify({
3441
4589
  name: s,
3442
4590
  description: a,
3443
- parameters: h
4591
+ parameters: l
3444
4592
  }, null, 2)}
3445
4593
  `;
3446
4594
  }), t += `</tools>
@@ -3471,24 +4619,24 @@ function r0(r) {
3471
4619
  `, t += `- 如果不需要调用工具,直接给出最终答案即可
3472
4620
  `, t;
3473
4621
  }
3474
- function M2(r, e) {
4622
+ function Je(r, e) {
3475
4623
  if (!r || typeof r != "string")
3476
4624
  return null;
3477
4625
  const t = r.match(/<tool_call>([\s\S]*?)<\/tool_call>/i);
3478
4626
  if (t)
3479
4627
  try {
3480
- const s = t[1].trim(), i = JSON.parse(s), n = i.name || i.action || i.tool, a = i.arguments || i.args || i.input || {};
3481
- if (n && e[n])
3482
- return { toolName: n, arguments: a };
4628
+ const s = t[1].trim(), n = JSON.parse(s), i = n.name || n.action || n.tool, a = n.arguments || n.args || n.input || {};
4629
+ if (i && e[i])
4630
+ return { toolName: i, arguments: a };
3483
4631
  } catch {
3484
4632
  }
3485
4633
  return null;
3486
4634
  }
3487
- const s0 = {
3488
- openai: _e,
3489
- deepseek: be
4635
+ const kr = {
4636
+ openai: Gt,
4637
+ deepseek: Yt
3490
4638
  };
3491
- class U0 {
4639
+ class as {
3492
4640
  constructor({ llmConfig: e, mcpServers: t }) {
3493
4641
  if (this.mcpServers = {}, this.mcpClients = {}, this.mcpTools = {}, this.ignoreToolnames = [], this.responseMessages = [], this.useReActMode = !1, !e)
3494
4642
  throw new Error("llmConfig is required to initialize AgentModelProvider");
@@ -3496,8 +4644,8 @@ class U0 {
3496
4644
  this.llm = e.llm;
3497
4645
  else if (e.providerType) {
3498
4646
  const s = e.providerType;
3499
- let i;
3500
- typeof s == "string" ? i = s0[s] : i = s, this.llm = i({
4647
+ let n;
4648
+ typeof s == "string" ? n = kr[s] : n = s, this.llm = n({
3501
4649
  apiKey: e.apiKey,
3502
4650
  baseURL: e.baseURL
3503
4651
  });
@@ -3509,15 +4657,15 @@ class U0 {
3509
4657
  async _createOneClient(e) {
3510
4658
  try {
3511
4659
  let t;
3512
- if ("type" in e && e.type.toLocaleLowerCase() === "streamablehttp" ? t = new G(new URL(e.url)) : "type" in e && e.type === "extension" ? t = new Se(e.sessionId) : "transport" in e ? t = e.transport : t = e, e.useAISdkClient ?? !1) {
3513
- const i = await Xt({ transport: t });
3514
- return i.__transport__ = t, i;
4660
+ if ("type" in e && e.type.toLocaleLowerCase() === "streamablehttp" ? t = new ne(new URL(e.url)) : "type" in e && e.type === "extension" ? t = new e2(e.sessionId) : "transport" in e ? t = e.transport : t = e, e.useAISdkClient ?? !1) {
4661
+ const n = await xr({ transport: t });
4662
+ return n.__transport__ = t, n;
3515
4663
  } else {
3516
- const i = new xe(
4664
+ const n = new Qt(
3517
4665
  { name: "mcp-web-client", version: "1.0.0" },
3518
4666
  { capabilities: { roots: { listChanged: !0 }, sampling: {}, elicitation: {} } }
3519
4667
  );
3520
- return await i.connect(t), i.__transport__ = t, i;
4668
+ return await n.connect(t), n.__transport__ = t, n;
3521
4669
  }
3522
4670
  } catch (t) {
3523
4671
  return this.onError && this.onError(t?.message || "Failed to create MCP client", t), console.error("Failed to create MCP client", e, t), null;
@@ -3527,7 +4675,7 @@ class U0 {
3527
4675
  async _closeOneClient(e) {
3528
4676
  try {
3529
4677
  const t = e.__transport__;
3530
- if (t && t instanceof re || t && t instanceof te)
4678
+ if (t && t instanceof Rt || t && t instanceof Mt)
3531
4679
  return;
3532
4680
  await t?.terminateSession?.(), await t?.close?.(), await e?.close?.();
3533
4681
  } catch {
@@ -3536,13 +4684,13 @@ class U0 {
3536
4684
  /** 创建所有 mcpClients */
3537
4685
  async _createMpcClients() {
3538
4686
  const e = Object.entries(this.mcpServers), t = await Promise.all(
3539
- e.map(async ([s, i]) => {
3540
- const n = await this._createOneClient(i);
3541
- return { serverName: s, client: n };
4687
+ e.map(async ([s, n]) => {
4688
+ const i = await this._createOneClient(n);
4689
+ return { serverName: s, client: i };
3542
4690
  })
3543
4691
  );
3544
- this.mcpClients = {}, t.forEach(({ serverName: s, client: i }) => {
3545
- this.mcpClients[s] = i;
4692
+ this.mcpClients = {}, t.forEach(({ serverName: s, client: n }) => {
4693
+ this.mcpClients[s] = n;
3546
4694
  });
3547
4695
  }
3548
4696
  /** 兼容两种 client 类型的 tools 获取方法 */
@@ -3550,7 +4698,7 @@ class U0 {
3550
4698
  if (!e)
3551
4699
  return null;
3552
4700
  try {
3553
- return typeof e.tools == "function" ? await e.tools() : await t0(e);
4701
+ return typeof e.tools == "function" ? await e.tools() : await Sr(e);
3554
4702
  } catch (s) {
3555
4703
  return this.onError && this.onError(s?.message || `Failed to query tools for ${t}`, s), console.error(`Failed to query tools for ${t}`, s), null;
3556
4704
  }
@@ -3558,14 +4706,14 @@ class U0 {
3558
4706
  /** 查询所有 mcpClients 的 tools, 失败则保存为null */
3559
4707
  async _createMpcTools() {
3560
4708
  const e = Object.entries(this.mcpClients), t = await Promise.all(
3561
- e.map(async ([s, i]) => {
3562
- const n = await this._getClientTools(i, s);
3563
- return { serverName: s, tools: n };
4709
+ e.map(async ([s, n]) => {
4710
+ const i = await this._getClientTools(n, s);
4711
+ return { serverName: s, tools: i };
3564
4712
  })
3565
4713
  );
3566
- this.mcpTools = {}, t.forEach(({ serverName: s, tools: i }) => {
3567
- const n = i && typeof i == "object" ? i : {};
3568
- this.mcpTools[s] = n;
4714
+ this.mcpTools = {}, t.forEach(({ serverName: s, tools: n }) => {
4715
+ const i = n && typeof n == "object" ? n : {};
4716
+ this.mcpTools[s] = i;
3569
4717
  });
3570
4718
  }
3571
4719
  /** 关闭所有的 clients */
@@ -3596,8 +4744,8 @@ class U0 {
3596
4744
  if (!s)
3597
4745
  return this.onError?.(`Failed to create MCP client: ${e}`), null;
3598
4746
  this.mcpClients[e] = s;
3599
- const i = await this._getClientTools(s, e);
3600
- return this.mcpTools[e] = i && typeof i == "object" ? i : {}, this.mcpServers[e] = t, this.onUpdatedTools?.(), s;
4747
+ const n = await this._getClientTools(s, e);
4748
+ return this.mcpTools[e] = n && typeof n == "object" ? n : {}, this.mcpServers[e] = t, this.onUpdatedTools?.(), s;
3601
4749
  }
3602
4750
  /** 通过服务器名称删除mcpServer: mcpServers mcpClients mcpTools ignoreToolnames */
3603
4751
  async removeMcpServer(e) {
@@ -3611,47 +4759,47 @@ class U0 {
3611
4759
  } catch {
3612
4760
  }
3613
4761
  const s = this.mcpTools[e];
3614
- delete this.mcpTools[e], s && Object.keys(s).forEach((i) => {
3615
- this.ignoreToolnames = this.ignoreToolnames.filter((n) => n !== i);
4762
+ delete this.mcpTools[e], s && Object.keys(s).forEach((n) => {
4763
+ this.ignoreToolnames = this.ignoreToolnames.filter((i) => i !== n);
3616
4764
  }), this.onUpdatedTools?.();
3617
4765
  }
3618
4766
  /** 创建临时允许调用的tools集合 */
3619
4767
  _tempMergeTools(e = {}) {
3620
- const t = Object.values(this.mcpTools).reduce((s, i) => ({ ...s, ...i }), {});
4768
+ const t = Object.values(this.mcpTools).reduce((s, n) => ({ ...s, ...n }), {});
3621
4769
  return Object.assign(t, e), this.ignoreToolnames.forEach((s) => {
3622
4770
  delete t[s];
3623
4771
  }), t;
3624
4772
  }
3625
4773
  /** 生成 ReAct 模式的系统提示词(包含工具描述) */
3626
4774
  _generateReActSystemPrompt(e, t, s) {
3627
- const i = r0(e);
3628
- return s ? `${s}${i}` : `你是一个智能助手,可以通过调用工具来完成任务。
3629
- ${i}`;
4775
+ const n = Pr(e);
4776
+ return s ? `${s}${n}` : `你是一个智能助手,可以通过调用工具来完成任务。
4777
+ ${n}`;
3630
4778
  }
3631
4779
  /** 执行 ReAct 模式下的工具调用 */
3632
4780
  async _executeReActToolCall(e, t, s) {
3633
- const i = s[e];
3634
- if (!i)
4781
+ const n = s[e];
4782
+ if (!n)
3635
4783
  return { success: !1, error: `工具 ${e} 不存在` };
3636
4784
  try {
3637
- const n = i, a = n.execute || n.call;
4785
+ const i = n, a = i.execute || i.call;
3638
4786
  return typeof a != "function" ? { success: !1, error: `工具 ${e} 没有可执行的函数` } : { success: !0, result: await a(t, {}) };
3639
- } catch (n) {
3640
- return { success: !1, error: n?.message || String(n) || "工具执行失败" };
4787
+ } catch (i) {
4788
+ return { success: !1, error: i?.message || String(i) || "工具执行失败" };
3641
4789
  }
3642
4790
  }
3643
4791
  /** ReAct 模式的对话实现 */
3644
- async _chatReAct(e, { model: t, maxSteps: s = 5, ...i }) {
4792
+ async _chatReAct(e, { model: t, maxSteps: s = 5, ...n }) {
3645
4793
  if (!this.llm)
3646
4794
  throw new Error("LLM is not initialized");
3647
4795
  await this.initClientsAndTools();
3648
- const n = this._tempMergeTools(i.tools);
3649
- if (Object.keys(n).length === 0)
3650
- return this._chat(e, { model: t, maxSteps: s, ...i });
3651
- let h = [];
3652
- i.message && !i.messages ? h.push({ role: "user", content: i.message }) : i.messages ? h = [...i.messages] : h = [...this.responseMessages];
3653
- const c = typeof t == "string" ? t : t?.modelId || "default-model", d = { role: "system", content: this._generateReActSystemPrompt(n, c, i.system) }, g = h[0]?.role === "system" ? h : [d, ...h];
3654
- return e === X ? this._chatReActStream(g, n, c, s, i) : this._chatReActNonStream(g, n, c, s, i);
4796
+ const i = this._tempMergeTools(n.tools);
4797
+ if (Object.keys(i).length === 0)
4798
+ return this._chat(e, { model: t, maxSteps: s, ...n });
4799
+ let l = [];
4800
+ n.message && !n.messages ? l.push({ role: "user", content: n.message }) : n.messages ? l = [...n.messages] : l = [...this.responseMessages];
4801
+ const u = typeof t == "string" ? t : t?.modelId || "default-model", d = { role: "system", content: this._generateReActSystemPrompt(i, u, n.system) }, g = l[0]?.role === "system" ? l : [d, ...l];
4802
+ return e === ce ? this._chatReActStream(g, i, u, s, n) : this._chatReActNonStream(g, i, u, s, n);
3655
4803
  }
3656
4804
  /**
3657
4805
  * 检查消息内容是否包含图片
@@ -3687,52 +4835,52 @@ ${i}`;
3687
4835
  * @returns 构建好的消息列表
3688
4836
  */
3689
4837
  _buildMessagesForModel(e, t, s = 3) {
3690
- const i = [];
3691
- e && i.push(e);
3692
- let n = 0;
4838
+ const n = [];
4839
+ e && n.push(e);
4840
+ let i = 0;
3693
4841
  const a = [];
3694
- for (let h = t.length - 1; h >= 0; h--) {
3695
- const c = t[h];
3696
- if (this._messageHasImage(c.content))
3697
- if (n < s)
3698
- a.unshift(c), n++;
4842
+ for (let l = t.length - 1; l >= 0; l--) {
4843
+ const u = t[l];
4844
+ if (this._messageHasImage(u.content))
4845
+ if (i < s)
4846
+ a.unshift(u), i++;
3699
4847
  else {
3700
- const d = this._removeImageFromMessage(c);
4848
+ const d = this._removeImageFromMessage(u);
3701
4849
  d && a.unshift(d);
3702
4850
  }
3703
4851
  else
3704
- a.unshift(c);
4852
+ a.unshift(u);
3705
4853
  }
3706
- return i.push(...a), i;
4854
+ return n.push(...a), n;
3707
4855
  }
3708
4856
  /** ReAct 模式非流式对话 */
3709
- async _chatReActNonStream(e, t, s, i, n) {
4857
+ async _chatReActNonStream(e, t, s, n, i) {
3710
4858
  let a = [...e];
3711
- const h = e[0]?.role === "system" ? e[0] : null, c = h ? e.slice(1) : e;
3712
- let l = 0;
3713
- const d = n.maxImages ?? 3;
3714
- for (; l < i; ) {
3715
- l++;
3716
- const p = this._buildMessagesForModel(h, c, d), { tools: C, ...f } = n, m = (await f2({
4859
+ const l = e[0]?.role === "system" ? e[0] : null, u = l ? e.slice(1) : e;
4860
+ let c = 0;
4861
+ const d = i.maxImages ?? 3;
4862
+ for (; c < n; ) {
4863
+ c++;
4864
+ const h = this._buildMessagesForModel(l, u, d), { tools: m, ...C } = i, w = (await Re({
3717
4865
  // @ts-ignore ProviderV2 是所有llm的父类,在每一个具体的llm类都有一个选择model的函数用法
3718
4866
  model: this.llm(s),
3719
- messages: p,
3720
- ...f
3721
- })).text, w = { role: "assistant", content: m };
3722
- c.push(w), a.push(w);
3723
- const v = M2(m, t);
3724
- if (!v)
4867
+ messages: h,
4868
+ ...C
4869
+ })).text, y = { role: "assistant", content: w };
4870
+ u.push(y), a.push(y);
4871
+ const b = Je(w, t);
4872
+ if (!b)
3725
4873
  return this.responseMessages = a, {
3726
- text: m,
4874
+ text: w,
3727
4875
  response: { messages: a }
3728
4876
  };
3729
- const _ = await this._executeReActToolCall(v.toolName, v.arguments, t), b = {
4877
+ const x = await this._executeReActToolCall(b.toolName, b.arguments, t), R = {
3730
4878
  role: "user",
3731
4879
  content: `<tool_response>
3732
- ${_.success ? JSON.stringify(_.result) : `工具执行失败 - ${_.error}`}
4880
+ ${x.success ? JSON.stringify(x.result) : `工具执行失败 - ${x.error}`}
3733
4881
  </tool_response>`
3734
4882
  };
3735
- c.push(b), a.push(b);
4883
+ u.push(R), a.push(R);
3736
4884
  }
3737
4885
  return this.responseMessages = a, {
3738
4886
  text: a[a.length - 2]?.content || "",
@@ -3740,160 +4888,246 @@ ${_.success ? JSON.stringify(_.result) : `工具执行失败 - ${_.error}`}
3740
4888
  };
3741
4889
  }
3742
4890
  /** ReAct 模式流式对话 */
3743
- _chatReActStream(e, t, s, i, n) {
3744
- const a = this, h = this.llm(s);
3745
- let c, l;
3746
- const d = new Promise((p, C) => {
3747
- c = p, l = C;
4891
+ _chatReActStream(e, t, s, n, i) {
4892
+ const a = this, l = this.llm(s);
4893
+ let u, c;
4894
+ const d = new Promise((h, m) => {
4895
+ u = h, c = m;
3748
4896
  });
3749
4897
  return {
3750
4898
  fullStream: new ReadableStream({
3751
- async start(p) {
3752
- let C = [...e];
3753
- const f = e[0]?.role === "system" ? e[0] : null, u = f ? e.slice(1) : [...e];
3754
- let m = 0, w = "";
3755
- const v = n.maxImages ?? 3;
4899
+ async start(h) {
4900
+ let m = [...e];
4901
+ const C = e[0]?.role === "system" ? e[0] : null, p = C ? e.slice(1) : [...e];
4902
+ let w = 0, y = "";
4903
+ const b = i.maxImages ?? 3;
4904
+ h.enqueue({ type: "start" }), h.enqueue({ type: "start-step" });
3756
4905
  try {
3757
- for (; m < i; ) {
3758
- m++;
3759
- const _ = a._buildMessagesForModel(f, u, v), { tools: S, ...L } = n;
3760
- delete L.system, delete L.onFinish;
3761
- const b = await X({
3762
- ...L,
3763
- model: h,
3764
- messages: _
4906
+ for (; w < n; ) {
4907
+ w++;
4908
+ const x = a._buildMessagesForModel(C, p, b), { tools: M, ...k } = i;
4909
+ delete k.system, delete k.onFinish;
4910
+ const R = await ce({
4911
+ ...k,
4912
+ model: l,
4913
+ messages: x
3765
4914
  });
3766
4915
  let E = "";
3767
- for await (const I of b.fullStream)
3768
- I.type === "text-delta" ? (E += I.text || "", p.enqueue({
4916
+ for await (const L of R.fullStream)
4917
+ L.type === "text-delta" ? (E += L.text || "", h.enqueue({
3769
4918
  type: "text-delta",
3770
- text: I.text
3771
- })) : I.type === "text-start" ? p.enqueue({ type: "text-start" }) : I.type === "text-end" || p.enqueue(I);
3772
- w += E;
3773
- const U = { role: "assistant", content: w };
3774
- u.push(U), C.push(U);
3775
- const T = M2(w, t);
3776
- if (!T) {
3777
- p.enqueue({ type: "text-end" }), p.close(), a.responseMessages = C, c({ messages: C });
4919
+ text: L.text
4920
+ })) : L.type === "text-start" ? h.enqueue({ type: "text-start" }) : L.type === "text-end" || L.type === "finish-step" || L.type === "finish" || L.type === "start" || L.type === "start-step" || h.enqueue(L);
4921
+ y += E;
4922
+ const q = { role: "assistant", content: y };
4923
+ p.push(q), m.push(q);
4924
+ const I = Je(y, t);
4925
+ if (!I) {
4926
+ h.enqueue({ type: "text-end" }), h.enqueue({ type: "finish-step" }), h.enqueue({ type: "finish" }), h.close(), a.responseMessages = m, u({ messages: m });
3778
4927
  return;
3779
4928
  }
3780
- if (T.toolName === "computer" && T.arguments?.action === "terminate") {
3781
- p.enqueue({ type: "text-end" }), p.close(), a.responseMessages = C, c({ messages: C });
4929
+ if (I.toolName === "computer" && I.arguments?.action === "terminate") {
4930
+ h.enqueue({ type: "text-end" }), h.enqueue({ type: "finish-step" }), h.enqueue({ type: "finish" }), h.close(), a.responseMessages = m, u({ messages: m });
3782
4931
  return;
3783
4932
  }
3784
- const P = `react-${Date.now()}`;
3785
- p.enqueue({
4933
+ const j = `react-${Date.now()}`;
4934
+ h.enqueue({
3786
4935
  type: "tool-input-start",
3787
- id: P,
3788
- toolName: T.toolName
4936
+ id: j,
4937
+ toolName: I.toolName
3789
4938
  });
3790
- const Q = JSON.stringify(T.arguments, null, 2);
3791
- p.enqueue({
4939
+ const F = JSON.stringify(I.arguments, null, 2);
4940
+ h.enqueue({
3792
4941
  type: "tool-input-delta",
3793
- id: P,
3794
- delta: Q
4942
+ id: j,
4943
+ delta: F
4944
+ }), h.enqueue({
4945
+ type: "tool-input-end",
4946
+ id: j
4947
+ }), h.enqueue({
4948
+ type: "tool-call",
4949
+ toolCallId: j,
4950
+ toolName: I.toolName,
4951
+ input: I.arguments
3795
4952
  });
3796
- const M = await a._executeReActToolCall(T.toolName, T.arguments, t);
3797
- let H, k = M.result;
3798
- if (M.success && M.result && typeof M.result == "object" && M.result.screenshot) {
3799
- H = M.result.screenshot;
3800
- const { screenshot: I, ...W2 } = M.result;
3801
- k = W2;
4953
+ const A = await a._executeReActToolCall(I.toolName, I.arguments, t);
4954
+ let K, Z = A.result;
4955
+ if (A.success && A.result && typeof A.result == "object" && A.result.screenshot) {
4956
+ K = A.result.screenshot;
4957
+ const { screenshot: L, ...G } = A.result;
4958
+ Z = G;
3802
4959
  }
3803
- let N = "";
3804
- M.success ? k && Array.isArray(k.content) && k.content.length > 0 && k.content[0].text ? N = k.content[0].text : N = JSON.stringify(k) : N = `工具执行失败 - ${M.error}`;
3805
- let z = `<tool_response>
3806
- ${N}
4960
+ let B = "";
4961
+ if (A.success) {
4962
+ Z && Array.isArray(Z.content) && Z.content.length > 0 && Z.content[0].text ? B = Z.content[0].text : B = JSON.stringify(Z);
4963
+ let L = `<tool_response>
4964
+ ${B}
3807
4965
  </tool_response>`;
3808
- H && (z += `
3809
- 请检查截图以确认操作是否成功。如果成功,请继续下一步;如果失败,请重试。`), p.enqueue({
3810
- type: "tool-result",
3811
- toolCallId: P,
3812
- result: z
3813
- });
3814
- const u2 = H ? {
3815
- role: "user",
3816
- content: [
3817
- { type: "text", text: z },
3818
- { type: "image", image: H }
3819
- ]
3820
- } : {
3821
- role: "user",
3822
- content: z
3823
- };
3824
- u.push(u2), C.push(u2), w = "";
4966
+ K && (L += `
4967
+ 请检查截图以确认操作是否成功。如果成功,请继续下一步;如果失败,请重试。`), h.enqueue({
4968
+ type: "tool-result",
4969
+ toolCallId: j,
4970
+ result: L
4971
+ });
4972
+ const G = K ? {
4973
+ role: "user",
4974
+ content: [
4975
+ { type: "text", text: L },
4976
+ { type: "image", image: K }
4977
+ ]
4978
+ } : {
4979
+ role: "user",
4980
+ content: L
4981
+ };
4982
+ p.push(G), m.push(G), y = "";
4983
+ } else
4984
+ B = `工具执行失败 - ${A.error}`, h.enqueue({
4985
+ type: "tool-error",
4986
+ toolCallId: j,
4987
+ input: I.arguments,
4988
+ error: { message: B }
4989
+ });
3825
4990
  }
3826
- p.enqueue({ type: "text-end" }), p.close(), a.responseMessages = C, c({ messages: C });
3827
- } catch (_) {
3828
- p.error(_), l(_);
4991
+ h.enqueue({ type: "text-end" }), h.enqueue({ type: "finish-step" }), h.enqueue({ type: "finish" }), h.close(), a.responseMessages = m, u({ messages: m });
4992
+ } catch (x) {
4993
+ h.error(x), c(x);
3829
4994
  }
3830
4995
  }
3831
4996
  }),
3832
4997
  response: d
3833
4998
  };
3834
4999
  }
3835
- async _chat(e, { model: t, maxSteps: s = 5, ...i }) {
5000
+ async _chat(e, { model: t, maxSteps: s = 5, ...n }) {
3836
5001
  if (this.useReActMode)
3837
- return this._chatReAct(e, { model: t, maxSteps: s, ...i });
5002
+ return this._chatReAct(e, { model: t, maxSteps: s, ...n });
3838
5003
  if (!this.llm)
3839
5004
  throw new Error("LLM is not initialized");
3840
5005
  await this.initClientsAndTools();
3841
- const n = {
5006
+ const i = {
3842
5007
  // @ts-ignore ProviderV2 是所有llm的父类, 在每一个具体的llm 类都有一个选择model的函数用法
3843
5008
  model: this.llm(t),
3844
- stopWhen: ye(s),
3845
- ...i,
3846
- tools: this._tempMergeTools(i.tools)
5009
+ stopWhen: Jt(s),
5010
+ ...n,
5011
+ tools: this._tempMergeTools(n.tools)
3847
5012
  };
3848
5013
  let a = null;
3849
- if (i.message && !i.messages)
3850
- a = { role: "user", content: i.message }, this.responseMessages.push(a), n.messages = [...this.responseMessages];
3851
- else if (i.messages && i.messages.length > 0) {
3852
- const c = i.messages[i.messages.length - 1];
3853
- c.role === "user" && (a = c);
3854
- }
3855
- const h = e(n);
3856
- return h?.response?.then((c) => {
3857
- const l = c.messages?.[0];
3858
- a && l?.role !== "user" && this.responseMessages.push(a), this.responseMessages.push(...c.messages);
3859
- }), h?.usage?.then((c) => {
3860
- this.onUsage?.(c);
3861
- }), h;
5014
+ if (n.message && !n.messages)
5015
+ a = { role: "user", content: n.message }, this.responseMessages.push(a), i.messages = [...this.responseMessages];
5016
+ else if (n.messages && n.messages.length > 0) {
5017
+ const u = n.messages[n.messages.length - 1];
5018
+ u.role === "user" && (a = u);
5019
+ }
5020
+ const l = e(i);
5021
+ return l?.response?.then((u) => {
5022
+ const c = u.messages?.[0];
5023
+ a && c?.role !== "user" && this.responseMessages.push(a), this.responseMessages.push(...u.messages);
5024
+ }), l;
3862
5025
  }
3863
5026
  async chat(e) {
3864
- return this._chat(f2, e);
5027
+ return this._chat(Re, e);
3865
5028
  }
3866
5029
  async chatStream(e) {
3867
- return this._chat(X, e);
5030
+ return this._chat(ce, e);
5031
+ }
5032
+ }
5033
+ const Tr = /^\.\/[^/]+\/SKILL\.md$/, Mr = /^---\s*\n([\s\S]+?)\s*\n---/;
5034
+ function Rr(r) {
5035
+ const e = r.match(Mr);
5036
+ if (!e?.[1]) return null;
5037
+ const t = e[1], s = t.match(/^name:\s*(.+)$/m), n = t.match(/^description:\s*(.+)$/m), i = s?.[1]?.trim(), a = n?.[1]?.trim();
5038
+ return i && a ? { name: i, description: a } : null;
5039
+ }
5040
+ function bt(r) {
5041
+ return Object.keys(r).filter((e) => Tr.test(e));
5042
+ }
5043
+ function cs(r) {
5044
+ const e = bt(r), t = [];
5045
+ for (const s of e) {
5046
+ const n = r[s];
5047
+ if (!n) continue;
5048
+ const i = Rr(n);
5049
+ i && t.push({
5050
+ name: i.name,
5051
+ description: i.description,
5052
+ path: s
5053
+ });
3868
5054
  }
5055
+ return t;
5056
+ }
5057
+ function ls(r) {
5058
+ return r.length === 0 ? "" : `## 可用技能
5059
+
5060
+ ${r.map((t) => `- **${t.name}**: ${t.description}`).join(`
5061
+ `)}
5062
+
5063
+ 当需要用到某技能时,请使用 get_skill_content 工具获取该技能的完整文档内容。`;
5064
+ }
5065
+ function us(r) {
5066
+ return Object.keys(r);
5067
+ }
5068
+ function We(r, e) {
5069
+ return r[e];
5070
+ }
5071
+ function Ke(r, e) {
5072
+ return bt(r).find((t) => t.startsWith(`./${e}/SKILL.md`));
5073
+ }
5074
+ function ds(r) {
5075
+ return {
5076
+ get_skill_content: Wt({
5077
+ description: "根据技能名称或文档路径获取该技能的完整 Markdown 文档内容。传入 skillName(如 calculator)或 path(如 ./calculator/SKILL.md)",
5078
+ inputSchema: ae.object({
5079
+ skillName: ae.string().optional().describe("技能名称,与目录名一致,如 calculator"),
5080
+ path: ae.string().optional().describe("文档相对路径,如 ./calculator/SKILL.md 或 ./product-guide/reference/xxx.md")
5081
+ }),
5082
+ execute: (t) => {
5083
+ const { skillName: s, path: n } = t;
5084
+ let i;
5085
+ if (n)
5086
+ i = We(r, n);
5087
+ else if (s) {
5088
+ const a = Ke(r, s);
5089
+ i = a ? We(r, a) : void 0;
5090
+ }
5091
+ return i === void 0 ? { error: "未找到对应技能文档", skillName: s ?? n } : { content: i, path: n ?? Ke(r, s) };
5092
+ }
5093
+ })
5094
+ };
3869
5095
  }
3870
5096
  export {
3871
- U0 as AgentModelProvider,
3872
- $0 as Ajv,
3873
- N0 as AuthClientProvider,
3874
- k0 as ContentScriptServerTransport,
3875
- Se as ExtensionClientTransport,
3876
- P0 as ExtensionPageServerTransport,
3877
- Y0 as InMemoryTransport,
3878
- Te as QrCode,
3879
- Z0 as ResourceTemplate,
3880
- F0 as UriTemplate,
3881
- xe as WebMcpClient,
3882
- y0 as WebMcpServer,
3883
- V0 as completable,
3884
- T0 as createMessageChannelClientTransport,
3885
- _0 as createMessageChannelPairTransport,
3886
- v0 as createMessageChannelServerTransport,
3887
- I0 as createRemoter,
3888
- L0 as createSSEClientTransport,
3889
- S0 as createStreamableHTTPClientTransport,
3890
- t0 as getAISDKTools,
3891
- W0 as getDisplayName,
3892
- E0 as isMcpClient,
3893
- x0 as isMcpServer,
3894
- R0 as isMessageChannelClientTransport,
3895
- b0 as isMessageChannelServerTransport,
3896
- M0 as isSSEClientTransport,
3897
- Le as isStreamableHTTPClientTransport,
3898
- j0 as z
5097
+ as as AgentModelProvider,
5098
+ ms as Ajv,
5099
+ Cs as AuthClientProvider,
5100
+ os as ContentScriptServerTransport,
5101
+ e2 as ExtensionClientTransport,
5102
+ ns as ExtensionPageServerTransport,
5103
+ Ts as InMemoryTransport,
5104
+ t2 as QrCode,
5105
+ vs as ResourceTemplate,
5106
+ bs as UriTemplate,
5107
+ Qt as WebMcpClient,
5108
+ Jr as WebMcpServer,
5109
+ Ls as completable,
5110
+ es as createMessageChannelClientTransport,
5111
+ Kr as createMessageChannelPairTransport,
5112
+ Wr as createMessageChannelServerTransport,
5113
+ is as createRemoter,
5114
+ Qr as createSSEClientTransport,
5115
+ ds as createSkillTools,
5116
+ Xr as createStreamableHTTPClientTransport,
5117
+ ls as formatSkillsForSystemPrompt,
5118
+ Sr as getAISDKTools,
5119
+ Ps as getDisplayName,
5120
+ Ke as getMainSkillPathByName,
5121
+ bt as getMainSkillPaths,
5122
+ We as getSkillMdContent,
5123
+ us as getSkillMdPaths,
5124
+ cs as getSkillOverviews,
5125
+ ss as isMcpClient,
5126
+ Yr as isMcpServer,
5127
+ rs as isMessageChannelClientTransport,
5128
+ Gr as isMessageChannelServerTransport,
5129
+ ts as isSSEClientTransport,
5130
+ Xt as isStreamableHTTPClientTransport,
5131
+ Rr as parseSkillFrontMatter,
5132
+ gs as z
3899
5133
  };