@nuvin/agent-core 0.1.0-rc.1 → 0.1.0-rc.10

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.
@@ -1,6 +1,6 @@
1
1
  import type { ListToolsResult } from "@modelcontextprotocol/sdk/types.js";
2
2
  import type { MCPServerConfig } from "@nuvin/config";
3
- import type { AnyToolDefinition } from "../shared/types.ts";
3
+ import type { AnyToolDefinition, JsonValue } from "../shared/types.ts";
4
4
  import { type McpToolClient } from "./mcp-tool-adapter.ts";
5
5
  interface ConnectedMcpClient extends McpToolClient {
6
6
  listTools(): Promise<ListToolsResult>;
@@ -18,9 +18,26 @@ export type McpServerConnectionStatus = {
18
18
  status: "error";
19
19
  message: string;
20
20
  };
21
+ /**
22
+ * One MCP tool's user-facing descriptor, grouped per server. Populated only for
23
+ * connected tools so the Ctrl+P MCP tab can render enabled and disabled tools
24
+ * without a second round-trip (the flat {@link McpToolBundle.tools} array
25
+ * contains only callable tools and carries no per-server bucketing).
26
+ */
27
+ export type McpServerToolInfo = {
28
+ name: string;
29
+ description?: string;
30
+ inputSchema?: JsonValue;
31
+ };
21
32
  export interface McpToolBundle {
22
33
  tools: AnyToolDefinition[];
23
34
  servers: Record<string, McpServerConnectionStatus>;
35
+ /**
36
+ * Per-server descriptors for every discovered tool (server name →
37
+ * descriptors), including tools filtered from the callable array. Optional so
38
+ * existing bundle literals stay valid; consumers default to `{}`.
39
+ */
40
+ serverTools?: Record<string, McpServerToolInfo[]>;
24
41
  close(): Promise<void>;
25
42
  }
26
43
  export interface McpConnectionOptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuvin/agent-core",
3
- "version": "0.1.0-rc.1",
3
+ "version": "0.1.0-rc.10",
4
4
  "private": false,
5
5
  "description": "Core agent, model, format, and tool primitives for Nuvin",
6
6
  "license": "Apache-2.0",
@@ -52,7 +52,7 @@
52
52
  "tsup": "^8.5.1",
53
53
  "typescript": "^6.0.2",
54
54
  "vitest": "^4.1.2",
55
- "@nuvin/config": "0.1.1-rc.1"
55
+ "@nuvin/config": "0.2.0-rc.5"
56
56
  },
57
57
  "dependencies": {
58
58
  "@anthropic-ai/sdk": "^0.82.0",
@@ -1 +0,0 @@
1
- (function(_0x20c9db,_0x5e09ae){const _0x40974d={_0x3bbe4e:0x3bf,_0x1440b0:0x25e,_0xd5e984:0x21e,_0x1da271:0x213,_0x486c7a:0x1ac,_0x5a5697:0x1bd,_0x213d77:0x20e,_0x1ec971:0x1be,_0x25140e:0x1fa,_0x1fcf87:0x3f4},_0x536120={_0x8b2d7f:0x296};function _0x398ed1(_0x4b6e89,_0x4f70c3,_0x438204,_0x2de7a4){return _0x57c2(_0x438204-0xca,_0x4b6e89);}const _0x20e058=_0x20c9db();function _0x5a4415(_0x373f9c,_0x82b987,_0x532802,_0x3b05a8){return _0x57c2(_0x373f9c-_0x536120._0x8b2d7f,_0x82b987);}while(!![]){try{const _0x5ff882=parseInt(_0x5a4415(_0x40974d._0x3bbe4e,0x413,0x3b5,0x372))/0x1*(parseInt(_0x398ed1(0x211,_0x40974d._0x1440b0,_0x40974d._0xd5e984,0x244))/0x2)+-parseInt(_0x398ed1(0x1fa,0x20f,_0x40974d._0x1da271,0x235))/0x3+parseInt(_0x398ed1(_0x40974d._0x486c7a,0x1b2,_0x40974d._0x5a5697,0x1c5))/0x4+-parseInt(_0x398ed1(0x224,_0x40974d._0x213d77,0x1d9,_0x40974d._0x1ec971))/0x5+parseInt(_0x398ed1(_0x40974d._0x25140e,0x1b4,0x1c8,0x19b))/0x6+parseInt(_0x5a4415(_0x40974d._0x1fcf87,0x3bd,0x3da,0x427))/0x7+-parseInt(_0x5a4415(0x397,0x39b,0x369,0x378))/0x8;if(_0x5ff882===_0x5e09ae)break;else _0x20e058['push'](_0x20e058['shift']());}catch(_0x597237){_0x20e058['push'](_0x20e058['shift']());}}}(_0x4906,0xb73ac));import{createAssistantTextMessage,createReasoningMessage,createToolResultUserMessage,createToolUseMessage,getToolUseBlocks,normalizeMessage,normalizeSystem,responseToAssistantMessage,synthesizeMissingToolResults}from'./chunk-QDOE7NWO.js';import{TurnFailedError}from'./chunk-FFIZ6TKW.js';import{addAbortListener,isAbortError,throwIfAborted,toAbortError}from'./chunk-X7VAACWY.js';function _0x106530(_0x35215e,_0x528789,_0x40ae28,_0x25ea53){const _0x587ba6={_0x17b358:0xf0};return _0x57c2(_0x25ea53-_0x587ba6._0x17b358,_0x35215e);}function isJsonObject(_0x7b5164){const _0x2d0587={_0x34d7c9:0x15,_0x297648:0xbd,_0x2bcb1a:0xf5},_0x59bb1c={_0x5b3268:0x78};function _0xf6544d(_0x4238a8,_0x45d2c1,_0x32c6f2,_0x91582e){return _0x57c2(_0x4238a8-0x17f,_0x45d2c1);}function _0x25997f(_0x5c9c34,_0x4383e6,_0x255fba,_0x213843){return _0x57c2(_0x255fba- -_0x59bb1c._0x5b3268,_0x213843);}return typeof _0x7b5164===_0x25997f(0x7d,0xe,0x50,_0x2d0587._0x34d7c9)&&_0x7b5164!==null&&!Array[_0x25997f(0x100,0xcd,_0x2d0587._0x297648,_0x2d0587._0x2bcb1a)](_0x7b5164);}function isToolOutputEnvelope(_0x1ad608){const _0x1e0547={_0x3c0818:0x22c,_0x9633bb:0x226,_0x2a2a95:0x4a8,_0x50906d:0x4a7,_0x28525f:0x474,_0x13950d:0x414,_0xa225d1:0x3cd},_0xb6fa8f={_0x474333:0x340},_0x2cc3b0={_0x4c3f56:0x30d};if(typeof _0x1ad608!==_0x4ffd3b(-0x1f5,-0x27f,-0x245,-_0x1e0547._0x3c0818)||_0x1ad608===null||Array[_0x4ffd3b(-_0x1e0547._0x9633bb,-0x21b,-0x1d8,-0x187)](_0x1ad608))return![];if(typeof _0x1ad608[_0x6e8660(0x4cc,_0x1e0547._0x2a2a95,_0x1e0547._0x50906d,_0x1e0547._0x28525f)]!==_0x6e8660(0x401,_0x1e0547._0x13950d,_0x1e0547._0xa225d1,0x3ca))return![];function _0x4ffd3b(_0x13b5b4,_0x30f735,_0x3e5a36,_0x3770cf){return _0x57c2(_0x3e5a36- -_0x2cc3b0._0x4c3f56,_0x3770cf);}const _0xec1675=_0x1ad608[_0x4ffd3b(-0x272,-0x208,-0x23d,-0x242)];function _0x6e8660(_0x51b26e,_0x1c5cad,_0x4ce57e,_0x143ff5){return _0x57c2(_0x1c5cad-_0xb6fa8f._0x474333,_0x51b26e);}return _0xec1675===void 0x0||isJsonObject(_0xec1675);}function validateAgainstSchema(_0x957f6c,_0x2c26f4,_0xc43ec2){const _0x13736f={_0x2f5b1b:0x2f8,_0x4f251c:0x2d5,_0x362318:0x2d9,_0x2053a7:0x303,_0x36fdbe:0x2d3,_0x52fc75:0x2a2,_0x5433d2:0x26b,_0x506aaa:0x2a7,_0x219ddd:0x269,_0x3bd40c:0x22f,_0x46d59b:0x2e9,_0x1c6d62:0x2dd,_0x4b3480:0x2b5,_0x7b28d2:0x2c8,_0x3864ff:0x2f8,_0x267150:0x2e1,_0x2c8bf1:0x33a,_0xda9d08:0x275,_0x14db8f:0x29d,_0x1e4e92:0x28a,_0x26e46a:0x265,_0x3eccf2:0x317,_0x1a8309:0x2f6,_0x3fb566:0x33d,_0x241c0d:0x342,_0x5e0c9d:0x365,_0x48fd46:0x215,_0x4746be:0x239,_0x29f60a:0x2df,_0x383ca2:0x2f3,_0x182ae7:0x291,_0x13b7ff:0x2ba,_0x364797:0x2c6,_0x15f430:0x2fb,_0x328345:0x325,_0x33b4bb:0x313,_0x196109:0x322,_0x2d7fe1:0x359},_0x355d07={_0x445512:0x197},_0x3f9253={_0x566ac0:0x20d};function _0x55643e(_0x45c5d1,_0x41e45f,_0x15d384,_0x3d0442){return _0x57c2(_0x41e45f-_0x3f9253._0x566ac0,_0x3d0442);}function _0x14c464(_0x52c75f,_0x5ece24,_0x58c5a6,_0x1e9ea1){return _0x57c2(_0x58c5a6-_0x355d07._0x445512,_0x1e9ea1);}switch(_0xc43ec2[_0x14c464(_0x13736f._0x2f5b1b,0x2e4,_0x13736f._0x4f251c,_0x13736f._0x362318)]){case _0x55643e(_0x13736f._0x2053a7,0x2e1,0x31c,_0x13736f._0x36fdbe):if(typeof _0x2c26f4!==_0x14c464(0x2b1,_0x13736f._0x52fc75,_0x13736f._0x5433d2,0x24a))throw new Error(_0x14c464(0x25a,_0x13736f._0x506aaa,_0x13736f._0x219ddd,_0x13736f._0x3bd40c)+_0x957f6c+':\x20expected\x20string');return;case'number':if(typeof _0x2c26f4!==_0x55643e(0x2f7,_0x13736f._0x46d59b,0x2dc,_0x13736f._0x1c6d62))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x957f6c+_0x14c464(0x2c7,_0x13736f._0x4b3480,_0x13736f._0x7b28d2,_0x13736f._0x3864ff));return;case _0x55643e(0x327,0x2eb,_0x13736f._0x267150,_0x13736f._0x2c8bf1):if(typeof _0x2c26f4!==_0x14c464(0x28c,0x284,_0x13736f._0xda9d08,_0x13736f._0x14db8f))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x957f6c+_0x14c464(0x244,_0x13736f._0x1e4e92,0x282,_0x13736f._0x26e46a));return;case _0x14c464(_0x13736f._0x3eccf2,0x2c2,_0x13736f._0x1a8309,0x314):if(!Array[_0x55643e(_0x13736f._0x3fb566,_0x13736f._0x241c0d,0x2f7,_0x13736f._0x5e0c9d)](_0x2c26f4))throw new Error(_0x14c464(0x295,_0x13736f._0x48fd46,0x269,_0x13736f._0x4746be)+_0x957f6c+':\x20expected\x20array');_0x2c26f4[_0x55643e(0x2b6,0x2f6,0x2dc,_0x13736f._0x7b28d2)]((_0x38a3be,_0x1ce945)=>{const _0xef1705={_0x134433:0x185,_0x17c6cb:0x49};function _0x3f977f(_0x403c7d,_0x1f0581,_0x5c479a,_0x4b33b3){return _0x14c464(_0x403c7d-_0xef1705._0x134433,_0x1f0581-_0xef1705._0x17c6cb,_0x1f0581- -0x46b,_0x403c7d);}validateAgainstSchema(_0x957f6c+'['+_0x1ce945+']',_0x38a3be,_0xc43ec2[_0x3f977f(-0x203,-0x1cc,-0x21b,-0x1a5)]);});return;case'object':if(!isJsonObject(_0x2c26f4))throw new Error(_0x55643e(0x32a,_0x13736f._0x29f60a,_0x13736f._0x383ca2,_0x13736f._0x182ae7)+_0x957f6c+_0x14c464(_0x13736f._0x13b7ff,_0x13736f._0x364797,0x2dc,0x290));for(const _0x2d8c06 of _0xc43ec2[_0x14c464(0x28c,0x311,0x2c5,0x286)]??[]){if(!(_0x2d8c06 in _0x2c26f4))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x957f6c+_0x55643e(_0x13736f._0x15f430,0x2db,0x2db,_0x13736f._0x328345)+_0x2d8c06+'\x22');}for(const [_0x1a8bab,_0x562982]of Object[_0x14c464(0x2d0,0x2cb,0x2f8,_0x13736f._0x33b4bb)](_0xc43ec2[_0x55643e(_0x13736f._0x196109,0x312,_0x13736f._0x2d7fe1,0x343)])){_0x1a8bab in _0x2c26f4&&validateAgainstSchema(_0x957f6c+'.'+_0x1a8bab,_0x2c26f4[_0x1a8bab],_0x562982);}}}function normalizeToolOutputValue(_0x1f4f9d){const _0x1d019d={_0x38807b:0x4d,_0x438ca9:0x34,_0x36a00a:0x18,_0x2395da:0x50,_0x24d72e:0x25f,_0x2b4433:0x24d,_0x1860ae:0x217,_0x4f93a8:0x30e,_0x3dd9ca:0x2ff,_0x24b169:0x94,_0x3ebb0b:0xc2,_0x123d52:0xa5,_0x1c5f2c:0x32c,_0xcdc89:0x96,_0x5b44b5:0x91,_0x3133ca:0x4b,_0x303ec5:0x93,_0x2812c2:0x296,_0x4944ae:0x2d7,_0x209d8b:0x2ae};function _0x363d32(_0x312d17,_0x3e1167,_0x51af18,_0x5364d5){return _0x57c2(_0x3e1167- -0x3a3,_0x312d17);}function _0x3ba003(_0xa41f65,_0x25f07f,_0x2457a0,_0x1dd929){return _0x57c2(_0x2457a0- -0x180,_0x1dd929);}if(isToolOutputEnvelope(_0x1f4f9d))return{'output':_0x1f4f9d[_0x3ba003(-_0x1d019d._0x38807b,-_0x1d019d._0x438ca9,-_0x1d019d._0x36a00a,-_0x1d019d._0x2395da)],'structured':_0x1f4f9d['structured']??{'value':_0x1f4f9d[_0x363d32(-_0x1d019d._0x24d72e,-0x23b,-_0x1d019d._0x2b4433,-_0x1d019d._0x1860ae)]},..._0x1f4f9d[_0x363d32(-_0x1d019d._0x4f93a8,-0x2e5,-_0x1d019d._0x3dd9ca,-0x2a7)]!==void 0x0?{'content':_0x1f4f9d[_0x3ba003(-0xca,-_0x1d019d._0x24b169,-_0x1d019d._0x3ebb0b,-_0x1d019d._0x123d52)]}:{}};if(typeof _0x1f4f9d==='string')return{'output':_0x1f4f9d,'structured':{'value':_0x1f4f9d}};if(typeof _0x1f4f9d===_0x363d32(-0x2b5,-0x2db,-0x2c0,-_0x1d019d._0x1c5f2c)&&_0x1f4f9d!==null&&!Array[_0x3ba003(-_0x1d019d._0xcdc89,-_0x1d019d._0x5b44b5,-_0x1d019d._0x3133ca,-_0x1d019d._0x303ec5)](_0x1f4f9d))return{'output':JSON[_0x363d32(-_0x1d019d._0x2812c2,-_0x1d019d._0x4944ae,-0x309,-_0x1d019d._0x209d8b)](_0x1f4f9d,null,0x2),'structured':_0x1f4f9d};return{'output':JSON['stringify'](_0x1f4f9d,null,0x2),'structured':{'value':_0x1f4f9d}};}function createToolOutput(_0x5a98a8,_0x194560={'value':_0x5a98a8},_0x4c0bb1){return{'output':_0x5a98a8,'structured':_0x194560,..._0x4c0bb1!==void 0x0?{'content':_0x4c0bb1}:{}};}var ToolExecutionError=class extends Error{[_0x106530(0x190,0x181,0x1b3,0x1c0)];constructor(_0x4cffb6,_0xae552f={}){const _0xe8f618={_0x37e352:0x2d7,_0x342502:0x319,_0x1bd4c0:0x5b,_0x34242c:0x48},_0x1e6247={_0x108c7b:0xaf,_0x1dd3ca:0x10c,_0x4b53c9:0x114},_0x23128c={_0x4a0b09:0x2d,_0x33ab7f:0xbf,_0x385260:0x165};super(_0x4cffb6);function _0x638675(_0x395198,_0x499c08,_0x513c61,_0x520ab5){return _0x106530(_0x520ab5,_0x499c08-_0x23128c._0x4a0b09,_0x513c61-_0x23128c._0x33ab7f,_0x499c08- -_0x23128c._0x385260);}this['name']=_0x2126f4(0x2f8,_0xe8f618._0x37e352,0x305,_0xe8f618._0x342502);function _0x2126f4(_0x34ae59,_0x461646,_0x242703,_0x431d61){return _0x106530(_0x34ae59,_0x461646-_0x1e6247._0x108c7b,_0x242703-_0x1e6247._0x1dd3ca,_0x461646-_0x1e6247._0x4b53c9);}this[_0x638675(0x74,_0xe8f618._0x1bd4c0,_0xe8f618._0x34242c,0x98)]=_0xae552f;}};function defineTool(_0x55ae96){return _0x55ae96;}var ToolRegistry=class{[_0x2b8011(0x11b,0xf4,0xe9,0xd7)]=new Map();constructor(_0x2581bc=[]){const _0x31fc0c={_0x31f08c:0x118},_0x2c8ef9={_0x3c46a9:0x36};function _0x2776e7(_0x5c901d,_0x564397,_0x42de35,_0x5bf580){return _0x2b8011(_0x5c901d-0x6e,_0x564397,_0x42de35-_0x2c8ef9._0x3c46a9,_0x42de35-0xa0);}for(const _0xab9e7a of _0x2581bc){this[_0x2776e7(0x166,_0x31fc0c._0x31f08c,0x147,0x180)](_0xab9e7a);}}[_0x2b8011(0xfc,0x6c,0x7b,0xa7)](_0x488ae0){const _0x3ac21e={_0x3424bc:0x366,_0x58b474:0x2eb,_0x45b2e0:0x320,_0x46ed58:0x2a7},_0x16bb8c={_0x49e469:0x103};function _0x482fe1(_0x36780f,_0x51e784,_0x55240e,_0x148034){return _0x106530(_0x55240e,_0x51e784-0x189,_0x55240e-0x174,_0x36780f-_0x16bb8c._0x49e469);}function _0x469c64(_0xb0593e,_0x2c20c0,_0x44fdc0,_0x3f66a1){return _0x2b8011(_0xb0593e-0xba,_0xb0593e,_0x44fdc0-0x172,_0x2c20c0-0xf6);}this['toolsByName'][_0x482fe1(0x31d,0x2ed,_0x3ac21e._0x3424bc,_0x3ac21e._0x58b474)](_0x488ae0[_0x482fe1(0x2cb,_0x3ac21e._0x45b2e0,0x2ca,_0x3ac21e._0x46ed58)],_0x488ae0);}[_0x106530(0x1b0,0x173,0x1c5,0x1c5)](_0x56bfe4){const _0x21a325={_0x38b4f4:0x139,_0xbcf03b:0xfb},_0x51e6b4={_0x2bcddd:0x45,_0x4df06e:0x1b6};function _0xb426ab(_0x423376,_0x3bcbfd,_0x48934a,_0x5da228){return _0x2b8011(_0x423376-0xfe,_0x48934a,_0x48934a-0x1f3,_0x5da228-0x48);}function _0x2a452b(_0x1e4277,_0x1a8cce,_0x21186c,_0x3c2642){return _0x2b8011(_0x1e4277-_0x51e6b4._0x2bcddd,_0x3c2642,_0x21186c-_0x51e6b4._0x4df06e,_0x1e4277-0xcb);}return this[_0x2a452b(0x1a2,0x1ef,0x1db,0x167)][_0xb426ab(_0x21a325._0x38b4f4,0xbb,_0x21a325._0xbcf03b,0xfd)](_0x56bfe4);}[_0x106530(0x21d,0x240,0x1ff,0x242)](){const _0x316db8={_0x2797b1:0x127,_0x5c92dc:0x16c,_0x10e167:0xf6},_0xb2db62={_0x411e37:0xa5,_0x1f47c7:0xd4,_0x1bf984:0x33},_0x303c76={_0x20ad4c:0x1c6,_0x70a396:0x353};function _0x2d6d78(_0x570b2e,_0x42ebb0,_0x1e661a,_0x54f564){return _0x106530(_0x1e661a,_0x42ebb0-0x84,_0x1e661a-_0x303c76._0x20ad4c,_0x42ebb0- -_0x303c76._0x70a396);}function _0x58c8b4(_0x4c41a7,_0x54e3e3,_0x465c25,_0x42b75b){return _0x2b8011(_0x4c41a7-_0xb2db62._0x411e37,_0x4c41a7,_0x465c25-_0xb2db62._0x1f47c7,_0x42b75b-_0xb2db62._0x1bf984);}return[...this[_0x2d6d78(-_0x316db8._0x2797b1,-_0x316db8._0x5c92dc,-0x19b,-0x128)][_0x58c8b4(0x115,0x121,_0x316db8._0x10e167,0x10d)]()];}[_0x106530(0x21d,0x1da,0x1cd,0x1e4)](){const _0x599778={_0x236763:0x20d,_0x5d2c9e:0x1f4,_0x41ee44:0x1b8,_0x58045c:0x1ea,_0x164979:0x1d4,_0x39fa71:0x190,_0x5a75ec:0x18a,_0x387460:0x1a4};return this['list']()['map'](_0x39f434=>{const _0x5b87ef={_0x108c9b:0x2cc};function _0x18953c(_0x4696b3,_0x45ad29,_0x468213,_0x190e27){return _0x57c2(_0x190e27-0x5e,_0x4696b3);}function _0xfccd8f(_0x1d9f7c,_0x3d8a2c,_0x1e2da7,_0x2bb98d){return _0x57c2(_0x3d8a2c- -_0x5b87ef._0x108c9b,_0x2bb98d);}return{'name':_0x39f434[_0xfccd8f(-_0x599778._0x236763,-_0x599778._0x5d2c9e,-_0x599778._0x41ee44,-_0x599778._0x58045c)],'description':_0x39f434[_0x18953c(0x1df,_0x599778._0x164979,0x1bd,_0x599778._0x39fa71)],'input_schema':_0x39f434[_0xfccd8f(-0x139,-_0x599778._0x5a75ec,-0x1db,-_0x599778._0x387460)]};});}};function validateToolInput(_0x5722d1,_0x3889a8){return validateAgainstSchema('input',_0x5722d1,_0x3889a8),_0x5722d1;}function deriveFinalToolOutput(_0x35f949){const _0x4acced={_0x32ed82:0x3db,_0x1b534a:0x3b4,_0xa5c1c2:0x407,_0x380275:0x46d,_0x11a2f6:0x48e,_0x4751b0:0x4ca,_0x49e205:0x4c2,_0x53f123:0x513,_0x4239f3:0x4ce,_0x3182f2:0x4d6,_0x5620f2:0x57b,_0x4a859a:0x374},_0x598207={_0x35d8d2:0x12a},_0x1adfcd={_0x1f27c8:0x2e0};function _0x5432a6(_0x50713f,_0x5388e3,_0x4a39d8,_0x1eef08){return _0x106530(_0x1eef08,_0x5388e3-0x152,_0x4a39d8-0x179,_0x4a39d8-_0x1adfcd._0x1f27c8);}function _0x3fd8e8(_0x124aea,_0x2509b9,_0x48b55e,_0x500867){return _0x2b8011(_0x124aea-_0x598207._0x35d8d2,_0x124aea,_0x48b55e-0x117,_0x2509b9-0x304);}if(_0x35f949['length']===0x0)return{'output':'','structured':{}};if(_0x35f949['length']===0x1)return{'output':_0x35f949[0x0]['output'],'structured':_0x35f949[0x0][_0x3fd8e8(_0x4acced._0x32ed82,_0x4acced._0x1b534a,_0x4acced._0xa5c1c2,0x3ff)],..._0x35f949[0x0][_0x5432a6(_0x4acced._0x380275,0x4aa,_0x4acced._0x11a2f6,0x459)]!==void 0x0?{'content':_0x35f949[0x0][_0x5432a6(_0x4acced._0x4751b0,0x46f,_0x4acced._0x11a2f6,_0x4acced._0x49e205)]}:{}};const _0x2165b0=_0x35f949['filter'](_0x161290=>_0x161290[_0x5432a6(0x492,0x4ac,0x48e,0x4a1)]!==void 0x0);return{'output':_0x35f949[_0x5432a6(0x4d8,_0x4acced._0x53f123,0x4e9,_0x4acced._0x4239f3)](_0x5c6679=>_0x5c6679[_0x3fd8e8(0x40a,0x44c,0x455,0x403)])[_0x5432a6(_0x4acced._0x3182f2,0x507,0x528,_0x4acced._0x5620f2)](''),'structured':{'chunks':_0x35f949['map'](_0x4cca07=>_0x4cca07[_0x5432a6(0x498,0x4aa,0x4a0,0x4db)])},..._0x2165b0[_0x3fd8e8(0x40d,0x3bf,0x3bd,_0x4acced._0x4a859a)]===0x1?{'content':_0x2165b0[0x0]['content']}:{}};}function _0x4906(){const _0x4b8e4d=['C3rHz2u','Bwv0yq','CMvHC29UAw5NtwvZC2fNzuLK','ywz0zxjnB2rLBfjLC3bVBNnL','Aw5WDxq','mZu0mJG4ueXLwuLK','BgLZDfrVB2Xty2HLBwfZ','Dg9VBhm','Bwf4vg9Rzw5Z','Dg9VBhncEu5HBwu','zw5HyMXLza','zMLUywXnzxnZywDL','DMfSDwvZ','Bwv0CMLJCW','Dg90ywXuB2TLBNm','Aw5WDxruB2TLBNm','nJiXodq3mLbHqMf6Da','BwvZC2fNzxm','Bw9KzwW','oty5odC1mK9yEvvrwa','BwvZC2fNzq','ywz0zxjuDxjUq29TCgXLDgu','CMvHC29UAw5Nu3rHCNrLzef0','ChjVCgvYDgLLCW','C3rYzwfT','C3rHDhvZ','AxrLBxm','B25vC2vYtwvZC2fNzq','B3v0Chv0sw5KzxG','DhjPBq','C2v0vg9VBhm','x3n5C3rLBvbYB21WDa','B3v0Chv0rM9YBwf0','nZG0ntmWEwzvChbK','BMv4Da','Dg90ywXszwfZB25PBMDuB2TLBNm','yxnZAxn0yw50twvZC2fNzuLK','y29UDgv4DfDPBMrVD0XPBwL0','C2LNBMfS','C2v0vg9WAwm','ywjVCNq','CMvHC29UAw5Nvg9Rzw5Z','zg9Uzq','BwfW','zxjYB3i','C29Tzq','y2HHDe1VzgvS','Dw5RBM93BL90B29S','y29UDgvUDf9KzwX0yq','Bw9KzwXFCMvZCg9UC2u','B25uB29Sq2fSBa','ywjVCNrLza','zxH0zw5ZAw9UCW','DxnLCG','C2vZC2LVBI0','AxrLBuLK','Dg9VBf9JywXS','CMvXDwvZDa','Dg9VBf9Yzxn1BhrFBwvZC2fNzq','mtKZqvnnDwXM','C2v0','zgvSzxrL','z2v0vg9VBhm','DMfSDwu','CMvXDwLYzwq','zMLSDgvY','CMfUzg9T','oIbLEhbLy3rLzcbUDw1Izxi','zgvZy3jPChrPB24','C3LZDgvTuhjVBxb0','Dg9VBf9Yzxn1Bhq','AxnbCNjHEq','ywz0zxjnzxnZywDLqxbWzw5K','Dg90ywXpDxrWDxruB2TLBNm','yw50AhjVCgLJx3rOAw5RAw5Nx2rLBhrH','DhvYBL9JB21WBgv0zq','zgvMyxvSDe1LC3nHz2u','C3rHDgu','DxnHz2u','Dg9VBf9JB21WBgv0zwq','DhLWzq','zxHLy3v0zq','CMvZCg9UC2u','A2LUza','Aw5WDxrty2HLBwe','zNvUy3rPB24','DhvYBLn0yxj0zwrbDa','oIbLEhbLy3rLzcbVyMPLy3q','yMvMB3jLtw9KzwXszxf1zxn0','Dg9VBfj1BNrPBwu','DhjHBNnMB3jTzxi','mJi4nZq3m2frqvDPvW','C2v0u3LZDgvTuhjVBxb0','Dg9VBf91C2vFy2H1BMS','C2vZC2LVBKLK','CMvJB3jKrxzLBNq','y29TCgXLDgvK','CNvUt2jZzxj2zxjZ','Dg9VBenHBgXdB3vUDa','B3jKzxi','BgLZDa','Dg9VBf91C2u','ndy1nerpzKjLBq','ChvZAa','B3bLBMfPx3jLyxnVBMLUz19KzwX0yq','B25fDMvUDa','AM9PBG','z2v0q29UDgv4DfDPBMrVD0XPBwL0','C2v0u2vZC2LVBKLK','CMvHC29UAw5Nx21LC3nHz2u','CMvHC29UAw5Nx2nODw5R','vg9VBcbLEgvJDxrPB24GCMvQzwn0zwqGzM9Yia','ote1nZa3ohvpr2fsCW','yxjYyxK','Aw5KzxG','zw50CMLLCW','Dg9VBf9ZDgfYDgvK','Bw9KzwXdywXSq291BNq','C2vUza','ChjVDMLKzxi','Dgv4Da','CNvUvhjHBNnMB3jTzxjZ','B3v0Chv0','B2jZzxj2zxi','y29UDgvUDa','CMvHC29UAw5Nq29TCgXLDgvKqxq','DxnLCL9TzxnZywDL','CMvHC29U','Dg90ywXjBNb1DfrVA2vUCW','tw9KzwWGC3rYzwfTigvUzgvKihDPDgHVDxqGysbMAw5HBcbYzxnWB25Zzq','DhvYBI0','qwDLBNqGCMvXDwLYzxmGysbJAgf0tw9KzwW','C3vTBwfYEuLUzgv4','CMvNAxn0zxi','B2jQzwn0','B3bLBMfPx3jLyxnVBMLUz19ZDw1Tyxj5x2rLBhrH','CMvZzxrnzxnZywDLCW','yMvMB3jLrMLUywXpDxrWDxq','C3rYAw5NAwz5','zgvWCW','oIbTAxnZAw5NihjLCxvPCMvKigzPzwXKici','C3LZDgvT','C3rYDwn0DxjLza','CNvU','sw52ywXPzcb0B29SigLUChv0igf0ia','vg9VBev4zwn1DgLVBKvYCM9Y','C3rYAw5N','z2v0','Bw9KzwXFCMvXDwvZDa','Aw5WDxrezwX0yq','BMfTzq','zgvSDge','Dg9VBf9VDxrWDxrFy2H1BMS','BgvUz3rO','BNvTyMvY','zMLUywXFBwvZC2fNzq','yM9VBgvHBG','vw5RBM93BIb0B29SoIa','y29UDgvUDeLUzgv4','DhvYBKLK','ywXS','Dg9VBf91C2vFzgvSDge','CMvQzwn0','BgfZDfjLC3bVBNnL','ywn0Aw9U','C2vZC2LVBKrPCG','DhvYBKLUzgv4','zM9YrwfJAa','BM93','oIbLEhbLy3rLzcbIB29SzwfU','CMvNAxn0CNK','oMfZC2LZDgfUDdO'];_0x4906=function(){return _0x4b8e4d;};return _0x4906();}function createToolMeta(){return{'transforms':[]};}function createErrorToolResult(_0x13dd29,_0x399421,_0x3db315,_0x249ab6=[]){const _0x2707ae={_0x356376:0x3d4,_0x1f0865:0x3e7,_0x109942:0x40d,_0x197029:0x42e,_0x80ecc5:0x429,_0x1953ac:0x3d6},_0x44f703={_0x4a93d3:0x32f},_0x36804a={_0x42b78a:0x34e};function _0x20ca56(_0x358141,_0x3e9dfe,_0x1fc4c3,_0x40eaa8){return _0x2b8011(_0x358141-0x18,_0x40eaa8,_0x1fc4c3-0x2,_0x1fc4c3- -_0x36804a._0x42b78a);}function _0x57f45c(_0x2532eb,_0x179405,_0x400fd6,_0x236a7b){return _0x2b8011(_0x2532eb-0x173,_0x236a7b,_0x400fd6-0xd2,_0x179405-_0x44f703._0x4a93d3);}return{'callId':_0x13dd29['id'],'toolName':_0x13dd29[_0x57f45c(_0x2707ae._0x356376,_0x2707ae._0x1f0865,_0x2707ae._0x109942,0x3de)],'status':_0x57f45c(_0x2707ae._0x197029,_0x2707ae._0x80ecc5,_0x2707ae._0x1953ac,0x3dd),'output':_0x399421,'structured':_0x3db315,'chunks':_0x249ab6,'meta':createToolMeta()};}function createRejectedToolResult(_0xb341ae,_0x1a5147){const _0x2b63a4={_0x441d0c:0x1cb,_0xd4578c:0x179,_0x19395e:0x150,_0x18f9f2:0x19b,_0x2a91c5:0x1a6,_0x10c11e:0x233,_0xd48f0e:0x21d,_0x4cc4a2:0x18b,_0x580f74:0x198,_0x515566:0xaf,_0x29e7e9:0x1a7,_0x56cbba:0x19b},_0x3181b5={_0x1a5591:0x14b},_0x242ac0={_0x4d2700:0x100,_0x2d80d2:0x30};function _0xb76e3f(_0x12aa42,_0x9a07bd,_0x342e1c,_0x299573){return _0x106530(_0x12aa42,_0x9a07bd-0x6b,_0x342e1c-_0x242ac0._0x4d2700,_0x342e1c- -_0x242ac0._0x2d80d2);}function _0x4409d4(_0x2277d8,_0x27ea9e,_0x462bc9,_0x55b271){return _0x2b8011(_0x2277d8-0x1ee,_0x27ea9e,_0x462bc9-0x4f,_0x2277d8- -_0x3181b5._0x1a5591);}const _0xa85e74=_0x1a5147?.[_0xb76e3f(0x211,0x210,_0x2b63a4._0x441d0c,_0x2b63a4._0xd4578c)]()[_0xb76e3f(_0x2b63a4._0x19395e,0x177,_0x2b63a4._0x18f9f2,_0x2b63a4._0x2a91c5)]?_0x1a5147:_0xb76e3f(0x1d2,_0x2b63a4._0x10c11e,_0x2b63a4._0xd48f0e,0x267)+_0xb341ae[_0xb76e3f(0x14e,_0x2b63a4._0x4cc4a2,_0x2b63a4._0x580f74,0x18e)];return createErrorToolResult(_0xb341ae,_0xa85e74,{'error':'tool_rejected',..._0x1a5147?.[_0x4409d4(-0x60,-0x2d,-_0x2b63a4._0x515566,-0x70)]()[_0xb76e3f(_0x2b63a4._0x2a91c5,_0x2b63a4._0x29e7e9,_0x2b63a4._0x56cbba,0x1b4)]?{'reason':_0x1a5147}:{}});}function _0x57c2(_0x5333ce,_0x4b3452){_0x5333ce=_0x5333ce-0xbe;const _0x490663=_0x4906();let _0x57c27b=_0x490663[_0x5333ce];if(_0x57c2['UDFhFB']===undefined){var _0x440dd0=function(_0x39cba5){const _0x51d936='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x7b5164='',_0x1ad608='';for(let _0xec1675=0x0,_0x957f6c,_0x2c26f4,_0xc43ec2=0x0;_0x2c26f4=_0x39cba5['charAt'](_0xc43ec2++);~_0x2c26f4&&(_0x957f6c=_0xec1675%0x4?_0x957f6c*0x40+_0x2c26f4:_0x2c26f4,_0xec1675++%0x4)?_0x7b5164+=String['fromCharCode'](0xff&_0x957f6c>>(-0x2*_0xec1675&0x6)):0x0){_0x2c26f4=_0x51d936['indexOf'](_0x2c26f4);}for(let _0x38a3be=0x0,_0x1ce945=_0x7b5164['length'];_0x38a3be<_0x1ce945;_0x38a3be++){_0x1ad608+='%'+('00'+_0x7b5164['charCodeAt'](_0x38a3be)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1ad608);};_0x57c2['zVXLCK']=_0x440dd0,_0x57c2['yLWMyY']={},_0x57c2['UDFhFB']=!![];}const _0x36cf64=_0x490663[0x0],_0x43958f=_0x5333ce+_0x36cf64,_0xe16b07=_0x57c2['yLWMyY'][_0x43958f];return!_0xe16b07?(_0x57c27b=_0x57c2['zVXLCK'](_0x57c27b),_0x57c2['yLWMyY'][_0x43958f]=_0x57c27b):_0x57c27b=_0xe16b07,_0x57c27b;}function createAbortedToolResult(_0x5a961d,_0xe7401f,_0x2e7d2f=[]){const _0x3c9419={_0x415a0b:0x19c};function _0x1fcdfc(_0x1d00d6,_0x52c434,_0x23f623,_0x51855a){return _0x2b8011(_0x1d00d6-_0x3c9419._0x415a0b,_0x52c434,_0x23f623-0x35,_0x51855a- -0x36d);}const _0x3fa079=toAbortError(_0xe7401f);function _0x255e32(_0x33210a,_0x5a6130,_0x18c5c2,_0x259d5d){return _0x106530(_0x5a6130,_0x5a6130-0x165,_0x18c5c2-0xb3,_0x33210a- -0x4b4);}return createErrorToolResult(_0x5a961d,_0x3fa079[_0x1fcdfc(-0x29f,-0x274,-0x290,-0x28b)],{'error':_0x3fa079[_0x1fcdfc(-0x2c7,-0x27a,-0x2b0,-0x28b)],'aborted':!![]},_0x2e7d2f);}function createSuccessToolResult(_0x3ad673,_0x3d8452,_0x12aeda){const _0x3b7e2f={_0x2af557:0x323,_0x26e019:0x2fb,_0x5ab2b8:0x3b8,_0x4ca6cb:0x3e2,_0x363cc0:0x353,_0x67d0f:0x2d7,_0x34b9a8:0x302},_0x2369d9={_0x1ef6fd:0x170,_0x47bc0f:0x158},_0x1488be={_0x1d7be0:0x154};function _0x44f4ce(_0x4708b4,_0x37f798,_0x2efb20,_0x4d5356){return _0x106530(_0x37f798,_0x37f798-0x159,_0x2efb20-0x166,_0x4d5356-_0x1488be._0x1d7be0);}function _0x1b1dcc(_0x2aeacb,_0x166ae8,_0x2d7a8d,_0x30081b){return _0x106530(_0x166ae8,_0x166ae8-_0x2369d9._0x1ef6fd,_0x2d7a8d-0x16b,_0x2d7a8d-_0x2369d9._0x47bc0f);}return{'callId':_0x3ad673['id'],'toolName':_0x3ad673[_0x44f4ce(0x337,_0x3b7e2f._0x2af557,_0x3b7e2f._0x26e019,0x31c)],'status':'ok','output':_0x3d8452[_0x44f4ce(_0x3b7e2f._0x5ab2b8,0x3c1,_0x3b7e2f._0x4ca6cb,0x3ac)],'structured':_0x3d8452['structured'],..._0x3d8452[_0x44f4ce(0x316,0x31b,_0x3b7e2f._0x363cc0,0x302)]!==void 0x0?{'content':_0x3d8452[_0x44f4ce(0x335,_0x3b7e2f._0x67d0f,0x2b4,_0x3b7e2f._0x34b9a8)]}:{},'chunks':_0x12aeda,'meta':createToolMeta()};}function createUnknownToolResult(_0x51203b){const _0x6c1f7a={_0x46a6d0:0x1ce,_0x489959:0x1b2,_0x2ff1b0:0x189,_0x387284:0x1ac,_0xc8d11f:0x152,_0x10f701:0x119},_0x46f1de={_0xd73897:0xe3,_0x4b2201:0xba},_0x58a754={_0x37eb54:0x20d};function _0x302ade(_0x57e780,_0x217550,_0x121cf6,_0x44dbea){return _0x106530(_0x57e780,_0x217550-0x47,_0x121cf6-0x16c,_0x44dbea-_0x58a754._0x37eb54);}function _0xc3fe38(_0xcef510,_0x4e7069,_0x532cff,_0x516b89){return _0x106530(_0x4e7069,_0x4e7069-_0x46f1de._0xd73897,_0x532cff-_0x46f1de._0x4b2201,_0x516b89- -0x374);}return createErrorToolResult(_0x51203b,_0xc3fe38(-0x1b2,-_0x6c1f7a._0x46a6d0,-0x1f4,-0x1a5)+_0x51203b[_0xc3fe38(-_0x6c1f7a._0x489959,-0x178,-_0x6c1f7a._0x2ff1b0,-_0x6c1f7a._0x387284)],{'error':_0xc3fe38(-0x113,-_0x6c1f7a._0xc8d11f,-_0x6c1f7a._0x10f701,-0x167)});}function isDispatchDecision(_0x235f80){const _0x393f26={_0xd594c4:0x147,_0x3d0404:0x149,_0x25843b:0x106,_0x51e6e9:0x197,_0x134c9e:0x134,_0x5d5476:0x172},_0x229927={_0x5dd0c6:0x497};if(typeof _0x235f80!=='object'||_0x235f80===null)return![];function _0x4896ac(_0x5d9575,_0x269c51,_0x589572,_0x3c4303){return _0x106530(_0x269c51,_0x269c51-0xca,_0x589572-0x188,_0x3c4303- -_0x229927._0x5dd0c6);}function _0x37521b(_0x32e908,_0x2e2fd3,_0x3995ee,_0x435780){return _0x2b8011(_0x32e908-0xc2,_0x435780,_0x3995ee-0x79,_0x2e2fd3-0x83);}return _0x235f80['action']===_0x37521b(0x12e,_0x393f26._0xd594c4,0x106,0x178)||_0x235f80[_0x37521b(0x118,_0x393f26._0x3d0404,_0x393f26._0x25843b,_0x393f26._0x51e6e9)]===_0x37521b(0x186,_0x393f26._0x134c9e,_0x393f26._0x5d5476,0x163);}function normalizeExecutionError(_0x5961b6){const _0xbd51a6={_0x485dc8:0x313,_0xd91367:0x2d7,_0xecec45:0x2af,_0x2ff1b7:0x29f,_0x24b5e5:0x2a5,_0xb07da4:0x298},_0x32ca96={_0x1db2b5:0x31,_0x3b0bd1:0x1a9},_0xad7738={_0x94ff63:0xc5};function _0x1571ab(_0x38d390,_0x289fd9,_0x2288a5,_0x6abff0){return _0x2b8011(_0x38d390-0xf5,_0x2288a5,_0x2288a5-_0xad7738._0x94ff63,_0x6abff0-0x163);}if(_0x5961b6 instanceof ToolExecutionError)return{'errorMessage':_0x5961b6[_0xfbefc(_0xbd51a6._0x485dc8,0x322,_0xbd51a6._0xd91367,_0xbd51a6._0xecec45)],'structured':{'error':_0x5961b6['message'],..._0x5961b6[_0xfbefc(0x275,_0xbd51a6._0x2ff1b7,_0xbd51a6._0x24b5e5,0x2ea)]}};if(_0x5961b6 instanceof Error)return{'errorMessage':_0x5961b6[_0x1571ab(0x270,_0xbd51a6._0xb07da4,0x210,0x245)],'structured':{'error':_0x5961b6['message']}};function _0xfbefc(_0x427bd5,_0x45e30b,_0x19cc3c,_0x11b149){return _0x2b8011(_0x427bd5-_0x32ca96._0x1db2b5,_0x45e30b,_0x19cc3c-_0x32ca96._0x3b0bd1,_0x19cc3c-0x1f5);}const _0x42685e=String(_0x5961b6);return{'errorMessage':_0x42685e,'structured':{'error':_0x42685e}};}async function emitEvent(_0x420c54,_0x6007b9,_0x582d4c){await _0x420c54?.(_0x6007b9,_0x582d4c);}async function resolveDispatchDecision(_0x13876a,_0x1f9d3a,_0x3c553d){const _0x473841={_0x486a1a:0x2f3,_0xe89741:0x2d2},_0x142e04={_0x2537a0:0x5,_0x218c40:0x7e,_0x375454:0x11,_0x4c2ce7:0x25d,_0x484dd0:0x280,_0x42b2f6:0x245,_0x2e9568:0x2a,_0x2c4910:0xa,_0x4a5f6b:0x35,_0x1a0273:0x16,_0x3110ef:0x73,_0x39a76f:0x23,_0x5b1c22:0x15,_0xf6e8b0:0x1e,_0x5b5e0c:0x12,_0x1b029f:0x28d,_0x5281b9:0x2af},_0x209900={_0x397a98:0x16f},_0x343689={_0x4f3880:0x255,_0x4e701a:0x246,_0x1c6643:0x241,_0x37ee53:0x5e,_0x436ad3:0x6,_0x3229d6:0x18,_0x37b94e:0x1fb,_0x2763b7:0x23f},_0x3fed84={_0x19d835:0x8f},_0x2ad176={_0x2859ea:0x12c};function _0x52fc8f(_0x119d3c,_0x2ae300,_0x2ead01,_0x1f0d0f){return _0x106530(_0x1f0d0f,_0x2ae300-_0x2ad176._0x2859ea,_0x2ead01-0x1d0,_0x2ae300-0x230);}if(!_0x13876a)return{'action':_0x52fc8f(0x439,0x3f1,0x43f,0x3b8)};function _0x5a1a27(_0x2854c6,_0x4079ee,_0x32e7f8,_0x490252){return _0x2b8011(_0x2854c6-0x118,_0x4079ee,_0x32e7f8-_0x3fed84._0x19d835,_0x32e7f8- -0x3c8);}const _0x491478=Promise['resolve']()['then'](()=>_0x13876a(_0x1f9d3a,_0x3c553d));if(!_0x3c553d['signal']){const _0x42ddcb=await _0x491478;return isDispatchDecision(_0x42ddcb)?_0x42ddcb:{'action':_0x5a1a27(-0x2ea,-0x2f3,-0x317,-0x35e)};}const _0x48f761=new Promise((_0x48e162,_0x2ff42d)=>{const _0x48998d={_0x1cc15d:0xf4,_0x301109:0x309,_0x1b44ba:0x101},_0x743d95={_0x17a43e:0x167},_0x4b230d=()=>{function _0x158157(_0x16d7ad,_0xeb1f19,_0x1ad859,_0x58e7b4){return _0x57c2(_0xeb1f19-0x141,_0x58e7b4);}function _0x5f26af(_0x33e86f,_0x2ff820,_0x143226,_0x20a16f){return _0x57c2(_0x20a16f- -_0x743d95._0x17a43e,_0x33e86f);}_0x3c553d[_0x158157(0x24c,_0x343689._0x4f3880,_0x343689._0x4e701a,_0x343689._0x1c6643)]?.['removeEventListener']('abort',_0x4b230d),_0x2ff42d(toAbortError(_0x3c553d[_0x5f26af(-_0x343689._0x37ee53,-_0x343689._0x436ad3,-_0x343689._0x3229d6,-0x53)]?.[_0x158157(_0x343689._0x37b94e,0x202,0x24b,_0x343689._0x2763b7)]));};function _0x598631(_0x1f1902,_0x4f4f31,_0x39be0f,_0x3d5633){return _0x5a1a27(_0x1f1902-0x148,_0x1f1902,_0x4f4f31-0x50,_0x3d5633-_0x209900._0x397a98);}function _0x536277(_0x565406,_0x14519f,_0xbd7156,_0x3e236e){return _0x5a1a27(_0x565406-_0x48998d._0x1cc15d,_0x14519f,_0x3e236e-_0x48998d._0x301109,_0x3e236e-_0x48998d._0x1b44ba);}if(_0x3c553d[_0x536277(-_0x142e04._0x2537a0,_0x142e04._0x218c40,-_0x142e04._0x375454,0x35)]?.[_0x598631(-_0x142e04._0x4c2ce7,-0x277,-_0x142e04._0x484dd0,-_0x142e04._0x42b2f6)]){_0x2ff42d(toAbortError(_0x3c553d[_0x536277(_0x142e04._0x2e9568,0x81,_0x142e04._0x2c4910,_0x142e04._0x4a5f6b)][_0x536277(-_0x142e04._0x1a0273,-_0x142e04._0x3110ef,_0x142e04._0x39a76f,-0x1e)]));return;}_0x3c553d[_0x536277(_0x142e04._0x5b1c22,_0x142e04._0xf6e8b0,_0x142e04._0x5b5e0c,0x35)]?.['addEventListener'](_0x598631(-0x261,-0x282,-_0x142e04._0x1b029f,-_0x142e04._0x5281b9),_0x4b230d,{'once':!![]});}),_0x4d274c=await Promise['race']([_0x491478,_0x48f761]);return isDispatchDecision(_0x4d274c)?_0x4d274c:{'action':_0x5a1a27(-_0x473841._0x486a1a,-0x33c,-0x317,-_0x473841._0xe89741)};}async function executeToolCall(_0x20d4be,_0x1d22d4,_0x1d1405,_0x4ee986,_0x3225cc){const _0x4240bb={_0x47fff2:0x2b8,_0x44dbb8:0x25e,_0x48149c:0xd7,_0xb7b509:0xda,_0x78e212:0x104,_0x2e305e:0xdf,_0x2d645d:0x101,_0x11dc51:0x125,_0xdaa19c:0xf0,_0x2edd73:0x67,_0x2f1a2f:0x9c,_0x5bb15c:0x82,_0x14d000:0xc5,_0xef2a59:0xe3,_0x46562e:0x10a,_0x351c60:0x287,_0x46048d:0x27c,_0x2b98f9:0x2c9,_0x49439e:0x28c,_0x3fb3f5:0x27b,_0x1f5b19:0x7b,_0x3d0535:0x289,_0x5cc083:0x23a,_0xfd9367:0x2a3,_0x594157:0x277,_0x457568:0xc5,_0x302e1c:0x7a,_0x3720fe:0x5a,_0x78ac0a:0xac,_0x3986f6:0x81,_0x12f94d:0x91,_0x305941:0x7d,_0x38c62e:0x83,_0x3a19a9:0xff,_0x53e37c:0xbf,_0x13bdba:0xc5,_0xb271f2:0x8e,_0x39f471:0xaf,_0xd04b54:0x68},_0x4e19a3={_0xef6a6a:0x1ca,_0x93263f:0x74},_0x5a3541={..._0x1d1405,'toolCallId':_0x1d22d4['id']};throwIfAborted(_0x5a3541['signal']);function _0x3b2262(_0x5e8cdd,_0x27b4b0,_0x1fa281,_0x5f4539){return _0x2b8011(_0x5e8cdd-0xcd,_0x5e8cdd,_0x1fa281-0xda,_0x27b4b0- -0x1b9);}function _0x297edc(_0x58c955,_0x4453be,_0x5894dc,_0x144943){return _0x106530(_0x4453be,_0x4453be-_0x4e19a3._0xef6a6a,_0x5894dc-_0x4e19a3._0x93263f,_0x144943-0x77);}const _0x1fff55=await resolveDispatchDecision(_0x4ee986,_0x1d22d4,_0x5a3541);throwIfAborted(_0x5a3541[_0x297edc(0x22b,_0x4240bb._0x47fff2,_0x4240bb._0x44dbb8,0x27b)]);if(_0x1fff55['action']===_0x3b2262(-0xa3,-0xf5,-_0x4240bb._0x48149c,-_0x4240bb._0xb7b509)){const _0x17f764=createRejectedToolResult(_0x1d22d4,_0x1fff55[_0x3b2262(-0x13e,-0x118,-0xe1,-0x145)]);return await emitEvent(_0x3225cc,{'type':'tool_rejected','toolCall':_0x1d22d4,'result':_0x17f764},_0x5a3541),_0x17f764;}const _0x4a63d0=_0x20d4be[_0x3b2262(-0x123,-_0x4240bb._0x78e212,-0xae,-_0x4240bb._0x2e305e)](_0x1d22d4[_0x3b2262(-0xea,-_0x4240bb._0x2d645d,-_0x4240bb._0x11dc51,-_0x4240bb._0xdaa19c)]);if(!_0x4a63d0){const _0x2193c2=createUnknownToolResult(_0x1d22d4);return await emitEvent(_0x3225cc,{'type':_0x3b2262(-_0x4240bb._0x2edd73,-_0x4240bb._0x2f1a2f,-0xc5,-0xcb),'toolCall':_0x1d22d4,'result':_0x2193c2},_0x5a3541),_0x2193c2;}throwIfAborted(_0x5a3541[_0x3b2262(-_0x4240bb._0x5bb15c,-_0x4240bb._0x14d000,-_0x4240bb._0xef2a59,-_0x4240bb._0x46562e)]),await emitEvent(_0x3225cc,{'type':_0x297edc(0x2d6,_0x4240bb._0x351c60,_0x4240bb._0x46048d,_0x4240bb._0x2b98f9),'toolCall':_0x1d22d4},_0x5a3541);try{throwIfAborted(_0x5a3541[_0x297edc(0x2c9,_0x4240bb._0x49439e,0x29b,_0x4240bb._0x3fb3f5)]);const _0xf923d3=validateToolInput(_0x1d22d4[_0x3b2262(-0x115,-0xe7,-0xca,-0xd5)],_0x4a63d0['inputSchema']),_0x528284=await _0x4a63d0[_0x3b2262(-0x99,-0x9a,-0x81,-_0x4240bb._0x1f5b19)](_0xf923d3,_0x5a3541),_0x592ad3=[],_0x2da097=addAbortListener(_0x5a3541['signal'],()=>{void _0x528284['return'](void 0x0)['catch'](()=>{});});try{throwIfAborted(_0x5a3541[_0x297edc(0x25f,0x255,_0x4240bb._0x3d0535,0x27b)]);let _0x5e8af0=await _0x528284[_0x297edc(_0x4240bb._0x5cc083,0x285,_0x4240bb._0xfd9367,_0x4240bb._0x594157)]();while(!_0x5e8af0['done']){throwIfAborted(_0x5a3541[_0x3b2262(-0xba,-_0x4240bb._0x457568,-_0x4240bb._0x302e1c,-0xe6)]);const _0x345c49=normalizeToolOutputValue(_0x5e8af0[_0x3b2262(-_0x4240bb._0x3720fe,-_0x4240bb._0x78ac0a,-_0x4240bb._0x3986f6,-0x56)]);_0x592ad3[_0x3b2262(-_0x4240bb._0x12f94d,-0x84,-_0x4240bb._0x305941,-_0x4240bb._0x38c62e)](_0x345c49),await emitEvent(_0x3225cc,{'type':_0x3b2262(-0x129,-_0x4240bb._0x3a19a9,-0xfb,-0x147),'toolCall':_0x1d22d4,'chunk':_0x345c49},_0x5a3541),throwIfAborted(_0x5a3541['signal']),_0x5e8af0=await _0x528284[_0x3b2262(-0xf6,-0xc9,-0x106,-0xbe)]();}throwIfAborted(_0x5a3541[_0x3b2262(-_0x4240bb._0x53e37c,-_0x4240bb._0x13bdba,-0x106,-_0x4240bb._0xb271f2)]);const _0x6f1599=_0x5e8af0['value']===void 0x0?deriveFinalToolOutput(_0x592ad3):normalizeToolOutputValue(_0x5e8af0['value']),_0x578a8b=createSuccessToolResult(_0x1d22d4,_0x6f1599,_0x592ad3);return await emitEvent(_0x3225cc,{'type':_0x3b2262(-0xdd,-0x9c,-0x86,-0x95),'toolCall':_0x1d22d4,'result':_0x578a8b},_0x5a3541),_0x578a8b;}catch(_0x8bff5f){if(isAbortError(_0x8bff5f)){const _0x25471a=createAbortedToolResult(_0x1d22d4,_0x8bff5f,_0x592ad3);return await emitEvent(_0x3225cc,{'type':'tool_completed','toolCall':_0x1d22d4,'result':_0x25471a},_0x5a3541),_0x25471a;}const {errorMessage:_0x478a11,structured:_0x24f6ad}=normalizeExecutionError(_0x8bff5f),_0x5a8385=createErrorToolResult(_0x1d22d4,_0x478a11,_0x24f6ad,_0x592ad3);return await emitEvent(_0x3225cc,{'type':_0x3b2262(-0x77,-_0x4240bb._0x2f1a2f,-0xd2,-0x9e),'toolCall':_0x1d22d4,'result':_0x5a8385},_0x5a3541),_0x5a8385;}finally{_0x2da097();}}catch(_0x567a8b){if(isAbortError(_0x567a8b)){const _0x2c4c59=createAbortedToolResult(_0x1d22d4,_0x567a8b);return await emitEvent(_0x3225cc,{'type':_0x3b2262(-_0x4240bb._0x39f471,-0x9c,-_0x4240bb._0xd04b54,-0x9b),'toolCall':_0x1d22d4,'result':_0x2c4c59},_0x5a3541),_0x2c4c59;}const {errorMessage:_0x5236ec,structured:_0x4a8498}=normalizeExecutionError(_0x567a8b),_0x48f7c1=createErrorToolResult(_0x1d22d4,_0x5236ec,_0x4a8498);return await emitEvent(_0x3225cc,{'type':'tool_completed','toolCall':_0x1d22d4,'result':_0x48f7c1},_0x5a3541),_0x48f7c1;}}function createInternalToolRuntime(_0x2a54a6=[],_0x3d0a4c={}){const _0x197e9a={_0x481dde:0x425,_0x5ab882:0x4a4,_0x2adf3b:0x46b},_0x47c495={_0x53f86c:0x270,_0x398ca9:0x229,_0x22db5b:0x1fe},_0xef9f4a={_0x2b4ef5:0x41,_0x5ce0d8:0x66,_0x3cf143:0x67};let _0x3206b2=new ToolRegistry(_0x2a54a6);return{'listToolSchemas'(){function _0x1bdc6e(_0x125772,_0x2d66a3,_0x4140d4,_0x2ca670){return _0x57c2(_0x2ca670- -0x15b,_0x4140d4);}return _0x3206b2[_0x1bdc6e(-_0xef9f4a._0x2b4ef5,-_0xef9f4a._0x5ce0d8,-0x1c,-_0xef9f4a._0x3cf143)]();},'setTools'(_0x3aefc3){_0x3206b2=new ToolRegistry(_0x3aefc3);},async 'executeCalls'(_0x3b7f8a,_0x26621f){const _0x11a09d={_0x1cec58:0x389};function _0x1f3936(_0x14632e,_0x3e260e,_0x42c0df,_0x51f63e){return _0x57c2(_0x51f63e-_0x11a09d._0x1cec58,_0x14632e);}return await Promise[_0x1f3936(0x450,_0x197e9a._0x481dde,_0x197e9a._0x5ab882,_0x197e9a._0x2adf3b)](_0x3b7f8a['map'](async _0x59fe0b=>{const _0x495418={_0x3c2242:0x9e,_0x163d35:0x709};function _0x2bae03(_0x504a6b,_0x273f9a,_0x3fc5dc,_0x1cab29){return _0x1f3936(_0x3fc5dc,_0x273f9a-0x12,_0x3fc5dc-_0x495418._0x3c2242,_0x273f9a- -_0x495418._0x163d35);}return await executeToolCall(_0x3206b2,_0x59fe0b,_0x26621f,_0x3d0a4c['onToolCall'],_0x3d0a4c[_0x2bae03(-_0x47c495._0x53f86c,-_0x47c495._0x398ca9,-0x25c,-_0x47c495._0x22db5b)]);}));},async 'execute'(_0x329983,_0xb214fa){const [_0x3767a8]=await this['executeCalls']([_0x329983],_0xb214fa);return _0x3767a8;}};}function getOrderedObserverExtensions(_0x5d6383,_0x74cd20){const _0x4faf81={_0x945825:0xab,_0x18e8ee:0xa3},_0xa70139={_0x36d8ca:0x3eb,_0x7dc5e2:0x1ef,_0x527869:0x1ab,_0x3944f3:0x44d,_0x133128:0x432,_0x24b92f:0x497},_0x3e0041={_0x2ed384:0x259,_0x2ca566:0x4d,_0x9e60a2:0x163},_0x5e77bd={_0x929be8:0x368,_0x2bb644:0x10e},_0x456d10={_0x5cb17f:0xae,_0x416e4f:0x312};function _0x4f4b75(_0x4562c6,_0x21945a,_0x5b956a,_0xd83762){return _0x2b8011(_0x4562c6-0x12b,_0x5b956a,_0x5b956a-_0x456d10._0x5cb17f,_0x21945a-_0x456d10._0x416e4f);}function _0x364390(_0x42c689,_0x575b32,_0x51298d,_0x515102){return _0x106530(_0x515102,_0x575b32-0xfb,_0x51298d-0x134,_0x42c689- -0x174);}return _0x5d6383[_0x364390(_0x4faf81._0x945825,0xc8,_0x4faf81._0x18e8ee,0xaf)](_0x2fa390=>{function _0x54278e(_0x4f7111,_0x2d95ad,_0x78943e,_0x9eeb20){return _0x364390(_0x78943e-_0x5e77bd._0x929be8,_0x2d95ad-0x118,_0x78943e-_0x5e77bd._0x2bb644,_0x4f7111);}function _0x3ed5ed(_0x37c877,_0x5f4208,_0x5943b4,_0x30af13){return _0x364390(_0x37c877- -_0x3e0041._0x2ed384,_0x5f4208-_0x3e0041._0x2ca566,_0x5943b4-_0x3e0041._0x9e60a2,_0x5f4208);}return _0x2fa390[_0x54278e(_0xa70139._0x36d8ca,0x411,0x3dc,0x3cb)]!==![]&&_0x2fa390[_0x3ed5ed(-_0xa70139._0x7dc5e2,-0x1aa,-_0xa70139._0x527869,-0x1da)]===_0x74cd20&&_0x2fa390[_0x54278e(_0xa70139._0x3944f3,_0xa70139._0x133128,0x425,0x42b)]===_0x54278e(_0xa70139._0x24b92f,0x482,_0xa70139._0x3944f3,0x482);})['sort']((_0x15bcc5,_0x11adf3)=>_0x15bcc5[_0x364390(0xcd,0xcf,0x11d,0xd7)]-_0x11adf3[_0x4f4b75(0x3f1,0x443,0x490,0x423)]);}function getOrderedTransformerExtensions(_0x253acd,_0x3481cf){const _0x42a6bc={_0x5221a1:0x89,_0x395aae:0xb1,_0x244854:0x66},_0x326278={_0x1c1658:0x18e,_0x4c7cd4:0x12e,_0xa775bb:0x11d,_0x584f6a:0x170,_0x1e9096:0x177,_0x4e8939:0x1c2,_0x2f9d6f:0x1f5},_0x2a8d07={_0x4fa7a0:0xc7,_0x158d61:0x84},_0x24dea2={_0x2a531a:0x57};function _0x3cf3aa(_0x29ed17,_0xbafef7,_0x559bf6,_0x4eb6db){return _0x106530(_0x559bf6,_0xbafef7-_0x24dea2._0x2a531a,_0x559bf6-0x15,_0x4eb6db- -0x1b9);}function _0x55a154(_0x32f31e,_0x469770,_0x8cc9f2,_0x20c22c){return _0x106530(_0x20c22c,_0x469770-0x12a,_0x8cc9f2-_0x2a8d07._0x4fa7a0,_0x32f31e- -_0x2a8d07._0x158d61);}return _0x253acd[_0x3cf3aa(0x12,_0x42a6bc._0x5221a1,_0x42a6bc._0x395aae,_0x42a6bc._0x244854)](_0x4afafc=>{const _0x1c4927={_0x590253:0x14c};function _0x2f92f5(_0x3c521b,_0x302d6f,_0x3b32c4,_0x3fbcd1){return _0x3cf3aa(_0x3c521b-0x13c,_0x302d6f-0x7b,_0x3b32c4,_0x3fbcd1-0x122);}function _0x2730c2(_0x45f28e,_0x3c99c4,_0x3c4ed3,_0x5242fe){return _0x3cf3aa(_0x45f28e-0x16e,_0x3c99c4-_0x1c4927._0x590253,_0x5242fe,_0x3c99c4-0x11b);}return _0x4afafc[_0x2730c2(0x10e,0x14a,_0x326278._0x1c1658,0x160)]!==![]&&_0x4afafc[_0x2730c2(_0x326278._0x4c7cd4,0x140,_0x326278._0xa775bb,_0x326278._0x584f6a)]===_0x3481cf&&_0x4afafc[_0x2f92f5(_0x326278._0x1e9096,_0x326278._0x4e8939,0x1c9,0x19a)]===_0x2f92f5(0x1bb,0x16e,_0x326278._0x2f9d6f,0x1a1);})['sort']((_0x481b74,_0x1e9b9d)=>_0x481b74[_0x3cf3aa(0x3c,0x61,0x90,0x88)]-_0x1e9b9d[_0x55a154(0x1bd,0x20b,0x18f,0x1f8)]);}function createExtensionRegistry(){const _0x5899d3={_0x119759:0x3a5,_0x26a2ba:0x3bf},_0x5c8e29={_0x41ddd7:0x2d4},_0x2c348e={_0x56bcc8:0x3b1,_0x3b3ba4:0x3e2},_0x144c3a=[];return{'register'(_0x3c28c8){_0x144c3a['push'](_0x3c28c8);},async 'runTransformers'(_0x45b681,_0xb7c5a2,_0x1f5b6b){const _0x167887={_0x4143b9:0x2e0};let _0x2762d8=_0xb7c5a2;function _0x18eab2(_0x23f305,_0x5a4ef7,_0x3e31fa,_0x5c4b86){return _0x57c2(_0x5a4ef7-_0x167887._0x4143b9,_0x3e31fa);}for(const _0x3d8c67 of getOrderedTransformerExtensions(_0x144c3a,_0x45b681)){_0x2762d8=await _0x3d8c67[_0x18eab2(0x3f8,_0x2c348e._0x56bcc8,0x3f3,_0x2c348e._0x3b3ba4)](_0x2762d8,_0x1f5b6b);}return _0x2762d8;},async 'runObservers'(_0x3cb82d,_0x48b6ff,_0x35e2c0){function _0x5e17bd(_0x135f47,_0x1abf6b,_0x48f02e,_0x3d618f){return _0x57c2(_0x1abf6b-_0x5c8e29._0x41ddd7,_0x135f47);}for(const _0xff1ca3 of getOrderedObserverExtensions(_0x144c3a,_0x3cb82d)){await _0xff1ca3[_0x5e17bd(0x3f2,_0x5899d3._0x119759,_0x5899d3._0x26a2ba,0x37c)](_0x48b6ff,_0x35e2c0);}}};}function createEmptySnapshot(){return{'totalTokens':0x0,'totalInputTokens':0x0,'totalOutputTokens':0x0,'totalReasoningTokens':0x0,'requestCount':0x0,'modelCallCount':0x0,'toolCallCount':0x0,'totalModelTimeMs':0x0,'currentTokens':0x0,'currentInputTokens':0x0,'currentOutputTokens':0x0,'currentReasoningTokens':0x0,'currentModelTimeMs':0x0};}function createAgentMetrics(_0x536cef={}){const _0x3e367f={_0x1e787d:0x4f7,_0x209161:0x4a0,_0x2a75c8:0x505,_0xab2faf:0x4c0,_0x44c2db:0x257,_0x3ca67d:0x206,_0x4afb70:0x226,_0x123763:0x273,_0x21613c:0x1f2,_0x43b657:0x21e,_0x1307d6:0x264,_0xe49377:0x1ce,_0x57a617:0x256,_0x6a878b:0x23b,_0x3aea4f:0x28c,_0x1d1ca2:0x51c,_0x9ed5ad:0x523,_0x1c7a71:0x513,_0x1a8da5:0x55a,_0x591797:0x232,_0x5b2ecd:0x23f,_0x14a930:0x22f,_0x1bfd7e:0x4e3,_0x11fb79:0x1e9,_0x5b0376:0x194,_0x3c05b5:0x1fb,_0x2cddf3:0x24e,_0x584ba4:0x197,_0x34a054:0x4fc,_0x1e16b1:0x4bf,_0x5a9573:0x49a,_0x5c6fc4:0x587,_0x5f0f10:0x567,_0x45acfb:0x539,_0x59908d:0x4f8,_0x5d5f6:0x4e9,_0x102df8:0x222,_0x356281:0x212,_0x76f7f9:0x261,_0x4d2220:0x4bc,_0x22938c:0x24f,_0x346b72:0x1fd,_0x5628d7:0x253,_0x5e9fe8:0x24a},_0x18dc52={_0x562a6d:0xff};let _0xad6c3e=createEmptySnapshot();const _0x44071c=new Set();let _0x268772;const _0x466b30=()=>{const _0x5eecd0={..._0xad6c3e};for(const _0x395f28 of _0x44071c)_0x395f28(_0x5eecd0);};return{'getSnapshot'(){return{..._0xad6c3e};},'recordEvent'(_0x4088ad){const _0x4cb7af={_0xfd45ec:0x3d6};if(_0x4088ad['type']==='model_request'){_0x268772=Date[_0x2f9698(_0x3e367f._0x1e787d,_0x3e367f._0x209161,_0x3e367f._0x2a75c8,_0x3e367f._0xab2faf)]();const _0x2afec1=_0x536cef[_0x101515(_0x3e367f._0x44c2db,0x258,0x29e,_0x3e367f._0x3ca67d)]?.(_0x4088ad[_0x101515(0x266,_0x3e367f._0x4afb70,0x200,_0x3e367f._0x123763)]);_0x2afec1!==void 0x0&&(_0xad6c3e={..._0xad6c3e,'contextWindowLimit':_0x2afec1},_0x466b30());return;}if(_0x4088ad['type']===_0x101515(_0x3e367f._0x21613c,_0x3e367f._0x43b657,_0x3e367f._0x1307d6,_0x3e367f._0xe49377)){const _0x53b924=_0x4088ad[_0x101515(0x21d,0x23f,_0x3e367f._0x57a617,0x23e)][_0x101515(0x21e,_0x3e367f._0x6a878b,0x28f,_0x3e367f._0x3aea4f)][_0x2f9698(_0x3e367f._0x1d1ca2,0x4ce,0x511,0x4d3)],_0x379a17=_0x4088ad[_0x2f9698(_0x3e367f._0x9ed5ad,0x509,0x52d,0x516)]['usage']['outputTokens'],_0x8c1899=_0x4088ad[_0x2f9698(0x54e,_0x3e367f._0x1c7a71,_0x3e367f._0x1a8da5,0x516)][_0x101515(_0x3e367f._0x591797,_0x3e367f._0x6a878b,_0x3e367f._0x5b2ecd,_0x3e367f._0x14a930)][_0x2f9698(_0x3e367f._0x1bfd7e,0x538,0x51a,0x4ed)]??0x0,_0x436cd6=_0x53b924+_0x379a17,_0xae659d=_0x268772===void 0x0?0x0:Date[_0x101515(0x1ce,_0x3e367f._0x11fb79,0x1c2,_0x3e367f._0x5b0376)]()-_0x268772;_0x268772=void 0x0,_0xad6c3e={..._0xad6c3e,'totalTokens':_0xad6c3e[_0x101515(0x24f,_0x3e367f._0x3c05b5,0x22d,_0x3e367f._0x2cddf3)]+_0x436cd6,'totalInputTokens':_0xad6c3e[_0x101515(0x16c,0x1c1,0x19b,_0x3e367f._0x584ba4)]+_0x53b924,'totalOutputTokens':_0xad6c3e[_0x2f9698(0x4ed,_0x3e367f._0x34a054,0x501,0x50d)]+_0x379a17,'totalReasoningTokens':_0xad6c3e[_0x2f9698(_0x3e367f._0x1e16b1,0x4a1,_0x3e367f._0x5a9573,0x4e7)]+_0x8c1899,'modelCallCount':_0xad6c3e[_0x2f9698(_0x3e367f._0x5c6fc4,0x510,_0x3e367f._0x5f0f10,_0x3e367f._0x45acfb)]+0x1,'totalModelTimeMs':_0xad6c3e['totalModelTimeMs']+_0xae659d,'currentTokens':_0x436cd6,'currentInputTokens':_0x53b924,'currentOutputTokens':_0x379a17,'currentReasoningTokens':_0x8c1899,'currentModelTimeMs':_0xae659d,..._0xad6c3e[_0x2f9698(0x527,0x4ba,_0x3e367f._0x59908d,_0x3e367f._0x5d5f6)]&&_0x436cd6>0x0?{'contextWindowUsage':_0x436cd6/_0xad6c3e[_0x101515(_0x3e367f._0x102df8,_0x3e367f._0x356281,_0x3e367f._0x76f7f9,0x1ee)]}:{}},_0x466b30();return;}function _0x101515(_0x18cd78,_0x446dd0,_0x1d395e,_0x2b1220){return _0x57c2(_0x446dd0-_0x18dc52._0x562a6d,_0x1d395e);}function _0x2f9698(_0xf4978e,_0xc019ec,_0x5d8747,_0x36178e){return _0x57c2(_0x36178e-_0x4cb7af._0xfd45ec,_0xc019ec);}if(_0x4088ad['type']===_0x2f9698(_0x3e367f._0x4d2220,0x527,0x4d8,0x4fc)){_0xad6c3e={..._0xad6c3e,'toolCallCount':_0xad6c3e[_0x101515(0x20d,_0x3e367f._0x22938c,_0x3e367f._0x346b72,0x206)]+0x1},_0x466b30();return;}_0x4088ad['type']===_0x101515(_0x3e367f._0x5628d7,0x238,_0x3e367f._0x5e9fe8,0x222)&&(_0xad6c3e={..._0xad6c3e,'requestCount':_0xad6c3e['requestCount']+0x1},_0x466b30());},'reset'(){_0xad6c3e=createEmptySnapshot(),_0x268772=void 0x0,_0x466b30();},'subscribe'(_0x3b2901){const _0x590c9e={_0x549d40:0x44c,_0x32d8a4:0x400};return _0x44071c['add'](_0x3b2901),()=>{function _0x265aa9(_0x4b95ca,_0x691cb8,_0x16fc0c,_0x1ce5d8){return _0x57c2(_0x1ce5d8-0x319,_0x691cb8);}_0x44071c[_0x265aa9(_0x590c9e._0x549d40,0x47c,_0x590c9e._0x32d8a4,0x444)](_0x3b2901);};}};}function makeExtensionContext(_0x34e72f){return{'state':_0x34e72f};}async function runStage(_0x6ad32f,_0x4bc6da,_0x2701b1,_0x10229f){const _0x94d8a8={_0xafa621:0x4db,_0x3eefe0:0x493,_0x19c0e3:0x4e5},_0x1a58c1={_0x4fa82e:0x18b,_0x5e18d6:0x111,_0x595252:0xd0},_0x32d347=await _0x6ad32f[_0x4b4186(_0x94d8a8._0xafa621,0x4ed,_0x94d8a8._0x3eefe0,_0x94d8a8._0x19c0e3)](_0x4bc6da,_0x2701b1,_0x10229f);await _0x6ad32f[_0x4b4186(0x4c3,0x4e3,0x47d,0x48f)](_0x4bc6da,_0x32d347,_0x10229f);function _0x4b4186(_0x5a6d9d,_0xb20a5c,_0x52a1b8,_0x29b6bd){return _0x106530(_0x52a1b8,_0xb20a5c-0x167,_0x52a1b8-0x73,_0x5a6d9d-0x284);}function _0x5449b5(_0xf8d85b,_0x497cf9,_0x518422,_0x493bc9){return _0x106530(_0x493bc9,_0x497cf9-_0x1a58c1._0x4fa82e,_0x518422-_0x1a58c1._0x5e18d6,_0x497cf9- -_0x1a58c1._0x595252);}return _0x32d347;}async function emitEvent2(_0x2ab6b0,_0x5e69b5,_0x1614e4){await _0x2ab6b0?.(_0x5e69b5,_0x1614e4);}function replaceToolUseBlocks(_0x5b508e,_0x15b815){const _0x250dbd={_0x4b9371:0xde,_0x316f37:0x14c,_0x4ad1ff:0x4bb,_0x44d7f5:0x493},_0x1ccc9d={_0x5d0fb0:0x282,_0x3d5330:0x277,_0x1e9a8d:0x259,_0x5250e2:0x295},_0xb8e30f={_0x46b575:0x1cf,_0x4c9aa3:0x39},_0x1ce528={_0xc9caf4:0x757,_0x3ca9b4:0x19c},_0x53c468={_0x321689:0x1ce},_0x57dd59={_0x32351d:0x1b,_0xf00217:0x1b1};function _0x11ddf8(_0x49c3fb,_0x11489a,_0x26bac4,_0x36a5d6){return _0x2b8011(_0x49c3fb-_0x57dd59._0x32351d,_0x11489a,_0x26bac4-0xf5,_0x26bac4- -_0x57dd59._0xf00217);}let _0x20e1ae=0x0;function _0x17f178(_0x10ba15,_0x383c81,_0x2676b6,_0x55670e){return _0x2b8011(_0x10ba15-_0x53c468._0x321689,_0x55670e,_0x2676b6-0x141,_0x383c81-0x3c2);}return{..._0x5b508e,'content':_0x5b508e[_0x11ddf8(-_0x250dbd._0x4b9371,-_0x250dbd._0x316f37,-0x113,-0xec)][_0x17f178(0x49b,_0x250dbd._0x4ad1ff,0x499,_0x250dbd._0x44d7f5)](_0x371fca=>{if(_0x371fca[_0x41c451(-_0x1ccc9d._0x5d0fb0,-0x292,-_0x1ccc9d._0x3d5330,-0x23d)]!==_0x41c451(-0x246,-_0x1ccc9d._0x1e9a8d,-0x262,-_0x1ccc9d._0x5250e2))return _0x371fca;function _0x41c451(_0x466224,_0x1b1e97,_0x3b3d97,_0x108f42){return _0x17f178(_0x466224-0x5d,_0x3b3d97- -_0x1ce528._0xc9caf4,_0x3b3d97-_0x1ce528._0x3ca9b4,_0x466224);}const _0xc7b480=_0x15b815[_0x20e1ae];_0x20e1ae+=0x1;function _0x1f284d(_0x1c6872,_0x2903bb,_0x137ce4,_0x1393a5){return _0x11ddf8(_0x1c6872-_0xb8e30f._0x46b575,_0x1393a5,_0x137ce4-0x4d7,_0x1393a5-_0xb8e30f._0x4c9aa3);}return structuredClone(_0xc7b480);})};}function createAssistantMessageId(_0x516350,_0x1a35ba){const _0xd188b0={_0x134922:0x15a},_0x312155={_0x1baea4:0xc,_0x2ac402:0xc4};function _0x120bc6(_0x49040a,_0x851e90,_0x4808b3,_0x37c4ca){return _0x106530(_0x49040a,_0x851e90-0x151,_0x4808b3-_0x312155._0x1baea4,_0x4808b3- -_0x312155._0x2ac402);}return _0x516350+_0x120bc6(0xd3,_0xd188b0._0x134922,0x119,0x167)+_0x1a35ba;}function createReasoningMessageId(_0x31b53c){return _0x31b53c+':reasoning';}function _0x2b8011(_0x29f27e,_0xbe2057,_0x2ffedf,_0x91d15){return _0x57c2(_0x91d15- -0x20,_0xbe2057);}function withMessageId(_0x658d9b,_0x524ece){if(_0x658d9b['id']===_0x524ece)return _0x658d9b;return{..._0x658d9b,'id':_0x524ece};}function createAssistantChunkEvent(_0x92fa1,_0x1f3695){const _0x126329={_0x1897c4:0xe7,_0x15450b:0x10d,_0x143679:0x99,_0x1d9f14:0x9f,_0xff5414:0xdc,_0x21806d:0xbd,_0x57e05a:0xab,_0x8f291:0xb2,_0x5b54bd:0x93,_0x17260a:0x92,_0x4ca445:0xb7,_0x42993a:0xeb,_0x58fcb5:0xe0},_0x23b657={_0x568980:0x155,_0xf7df1d:0x34},_0x32a057={_0x28cf08:0x95,_0x400301:0x2f5};if(_0x92fa1['type']!==_0x3237c9(-_0x126329._0x1897c4,-0xa1,-_0x126329._0x15450b,-_0x126329._0x143679))return void 0x0;function _0x3237c9(_0x180498,_0x695b28,_0x3c7975,_0x54bf72){return _0x106530(_0x3c7975,_0x695b28-0x15,_0x3c7975-_0x32a057._0x28cf08,_0x180498- -_0x32a057._0x400301);}if(_0x92fa1[_0x3237c9(-_0x126329._0x1d9f14,-0x7a,-0xe8,-_0x126329._0xff5414)]===void 0x0)return void 0x0;function _0x5a42fd(_0x4846be,_0x3380c5,_0xcdabda,_0x4b610d){return _0x106530(_0x4b610d,_0x3380c5-_0x23b657._0x568980,_0xcdabda-_0x23b657._0xf7df1d,_0x4846be- -0x30d);}return{'type':'assistant_chunk','index':_0x92fa1[_0x5a42fd(-_0x126329._0x21806d,-_0x126329._0x57e05a,-0xad,-_0x126329._0x8f291)]??0x0,'messageId':_0x1f3695,'chunk':{'type':'content_delta','index':_0x92fa1[_0x5a42fd(-0xbd,-_0x126329._0x5b54bd,-_0x126329._0x17260a,-_0x126329._0x4ca445)]??0x0,'text':_0x92fa1[_0x5a42fd(-_0x126329._0x4ca445,-0x62,-_0x126329._0x42993a,-_0x126329._0x58fcb5)]}};}function createToolUseChunkEvent(_0xb20f9c,_0x4f839c){const _0x398028={_0x443d0d:0xeb,_0x48043b:0x86,_0x40a795:0x185,_0x4658bc:0x1b0,_0x32c3ad:0x86,_0x29f10b:0xb0,_0x373d56:0xa4,_0x265669:0x1b7,_0x7ba013:0x17d,_0x31792d:0x178,_0x12dc13:0x170,_0x4beec0:0xdc,_0x20f27f:0x160,_0x1d4905:0x1a4,_0x139a11:0x17e,_0x3b8e0a:0x13e,_0x10015e:0x12e},_0x25bd28={_0xc978fa:0x1b2,_0x150e4b:0x14,_0x383b30:0x235},_0x3e1b3f={_0x27e34d:0xe8,_0x4762b7:0x1c6};function _0x400694(_0x490a77,_0x311771,_0x58e60f,_0x115b0a){return _0x2b8011(_0x490a77-0xcc,_0x311771,_0x58e60f-_0x3e1b3f._0x27e34d,_0x490a77- -_0x3e1b3f._0x4762b7);}function _0x5e1bea(_0x27f486,_0x46563c,_0xba1165,_0x33b6b6){return _0x2b8011(_0x27f486-_0x25bd28._0xc978fa,_0x33b6b6,_0xba1165-_0x25bd28._0x150e4b,_0x46563c- -_0x25bd28._0x383b30);}if(_0xb20f9c['type']!=='tool_use_delta')return void 0x0;return{'type':_0x5e1bea(-0x115,-0x10a,-_0x398028._0x443d0d,-0x13d),'index':_0xb20f9c[_0x400694(-_0x398028._0x48043b,-0xa2,-0x8e,-0x55)]??0x0,'messageId':_0x4f839c,'chunk':{'type':_0x5e1bea(-0x1bb,-0x172,-_0x398028._0x40a795,-_0x398028._0x4658bc),'id':_0xb20f9c['id']??'','index':_0xb20f9c[_0x400694(-_0x398028._0x32c3ad,-_0x398028._0x29f10b,-0x44,-_0x398028._0x373d56)]??0x0,..._0xb20f9c[_0x5e1bea(-_0x398028._0x265669,-_0x398028._0x7ba013,-_0x398028._0x31792d,-_0x398028._0x12dc13)]!==void 0x0?{'name':_0xb20f9c[_0x400694(-0x10e,-0x14a,-0x120,-_0x398028._0x4beec0)]}:{},..._0xb20f9c[_0x5e1bea(-_0x398028._0x20f27f,-0x17e,-0x1d1,-0x153)]!==void 0x0?{'inputDelta':_0xb20f9c[_0x5e1bea(-_0x398028._0x1d4905,-_0x398028._0x139a11,-_0x398028._0x3b8e0a,-_0x398028._0x10015e)]}:{}}};}function createReasoningChunkEvent(_0x5c9ed3,_0x379ca5){const _0x4c5661={_0x58a823:0x1a8,_0xb948cc:0x13e,_0x21c25b:0x136,_0x262a0e:0x188,_0x3dbb7b:0x153,_0x13bd24:0xb0,_0x7f2fa2:0x106,_0x4f8f9b:0x208,_0x15fa18:0x249,_0x54d9e7:0xe9,_0x18a790:0xbc,_0x29c16e:0xbc,_0x2de489:0x1de,_0x56753b:0x226,_0xb242d3:0x22f,_0x280c17:0x73,_0x56290b:0xb9,_0x4d1794:0x79,_0x3b158c:0x10c,_0x1b729e:0x1d4,_0x468dda:0x62,_0x403828:0x91,_0x54e94e:0x89,_0x3c4eb3:0x1cc,_0x2ea07e:0x208,_0x2d890a:0x211,_0x464a01:0x1ec,_0x535c05:0x222,_0x377df1:0x217,_0x335c78:0x271,_0x4c7e82:0x21c},_0x389ed6={_0x4e21cd:0x180,_0x33a988:0x2c8};function _0x168421(_0x5b7d50,_0x335670,_0x1f10d5,_0x1ee386){return _0x2b8011(_0x5b7d50-_0x389ed6._0x4e21cd,_0x1ee386,_0x1f10d5-0x1d8,_0x5b7d50- -_0x389ed6._0x33a988);}function _0x5eef04(_0x4bf861,_0xa58583,_0x1408fc,_0x5dd68a){return _0x2b8011(_0x4bf861-0x10a,_0x4bf861,_0x1408fc-0x16f,_0x5dd68a- -0x30);}switch(_0x5c9ed3[_0x168421(-0x1aa,-0x19c,-0x1df,-0x159)]){case _0x168421(-0x1b0,-0x1bd,-0x1b2,-_0x4c5661._0x58a823):return{'type':_0x168421(-0x18c,-0x172,-0x148,-_0x4c5661._0xb948cc),'index':_0x5c9ed3[_0x5eef04(_0x4c5661._0x21c25b,0xd9,0xf5,0x110)],'messageId':_0x379ca5,'chunk':{'type':_0x5eef04(0xb4,0x11d,0xb0,0xe8),'index':_0x5c9ed3[_0x168421(-_0x4c5661._0x262a0e,-0x13b,-_0x4c5661._0x3dbb7b,-0x1dc)]??0x0,'thinking':_0x5c9ed3['thinking']??''},'text':_0x5c9ed3['thinking']??''};case'openai_reasoning_delta':return{'type':_0x168421(-0x18c,-0x15b,-0x1e1,-0x1ac),'index':_0x5c9ed3['contentIndex'],'messageId':_0x379ca5,'chunk':{'type':_0x5eef04(0x15b,0x14d,_0x4c5661._0x13bd24,_0x4c5661._0x7f2fa2),'contentIndex':_0x5c9ed3[_0x168421(-_0x4c5661._0x4f8f9b,-_0x4c5661._0x15fa18,-0x1e0,-0x21e)]??0x0,'delta':_0x5c9ed3['delta']??'','itemId':_0x5c9ed3[_0x5eef04(_0x4c5661._0x54d9e7,_0x4c5661._0x18a790,_0x4c5661._0x29c16e,0xd5)]??'','outputIndex':_0x5c9ed3[_0x168421(-_0x4c5661._0x2de489,-_0x4c5661._0x56753b,-0x232,-_0x4c5661._0xb242d3)]??0x0},'text':_0x5c9ed3['delta']??''};case _0x5eef04(_0x4c5661._0x280c17,_0x4c5661._0x56290b,0x74,_0x4c5661._0x4d1794):return{'type':_0x5eef04(0x152,0xb9,0x110,_0x4c5661._0x3b158c),'index':_0x5c9ed3[_0x168421(-0x222,-0x22f,-0x1fb,-_0x4c5661._0x1b729e)],'messageId':_0x379ca5,'chunk':{'type':'openai_reasoning_summary_delta','delta':_0x5c9ed3[_0x5eef04(_0x4c5661._0x468dda,_0x4c5661._0x403828,0xbb,_0x4c5661._0x54e94e)]??'','itemId':_0x5c9ed3[_0x168421(-0x1c3,-_0x4c5661._0x3c4eb3,-_0x4c5661._0x2ea07e,-_0x4c5661._0x2d890a)]??'','outputIndex':_0x5c9ed3[_0x168421(-_0x4c5661._0x2de489,-0x1e2,-0x1c5,-_0x4c5661._0x464a01)]??0x0,'summaryIndex':_0x5c9ed3[_0x168421(-_0x4c5661._0x535c05,-_0x4c5661._0x377df1,-_0x4c5661._0x335c78,-_0x4c5661._0x4c7e82)]??0x0},'text':_0x5c9ed3['delta']??''};default:return void 0x0;}}function isAbortedToolResult(_0x5610f3){const _0x521de1={_0x1f9acf:0x446,_0x38e470:0x43b,_0xa8b2ac:0x1d9,_0x1aea94:0x1a1,_0x4a3eaa:0x1ee,_0x55fe01:0x45b,_0x175f10:0x3fc},_0x12c1f8={_0x425927:0x3ab},_0x4f9801={_0xd4e066:0x1b,_0x532cca:0x192};function _0x57be79(_0x16a353,_0x3773a1,_0x4cafdc,_0x58ea6b){return _0x106530(_0x4cafdc,_0x3773a1-_0x4f9801._0xd4e066,_0x4cafdc-_0x4f9801._0x532cca,_0x16a353-0x26a);}function _0x5d5750(_0x1f3d3e,_0x1898da,_0x38caab,_0x55a5c8){return _0x106530(_0x38caab,_0x1898da-0x168,_0x38caab-0x102,_0x1898da- -_0x12c1f8._0x425927);}return _0x5610f3[_0x57be79(0x461,_0x521de1._0x1f9acf,0x45c,_0x521de1._0x38e470)]===_0x5d5750(-_0x521de1._0xa8b2ac,-_0x521de1._0x1aea94,-_0x521de1._0x4a3eaa,-0x185)&&_0x5610f3[_0x57be79(0x42a,_0x521de1._0x55fe01,_0x521de1._0x175f10,0x44b)]['aborted']===!![];}async function executeModelRequest(_0x248734,_0x433763,_0x1b7d38,_0xe6127f,_0xce2f0f){const _0x1aafb1={_0x384623:0x3bb,_0x574695:0x39a,_0x269bc6:0x3f4,_0x485882:0x3bf,_0x1cab6e:0x3a1,_0x1a5001:0x371,_0x1384f0:0x3b0,_0x27f04a:0x3e1,_0x4e9064:0x3c3,_0x4ba981:0x36d,_0x467de9:0x3ee,_0x2447bb:0x3b6,_0x405218:0x3fb,_0x4a317c:0x3d6,_0x35b76d:0x38c,_0x578399:0x3de,_0x25b4ce:0x3e3,_0x4fb609:0x37a,_0x422d94:0x3a6,_0x654214:0x38d,_0x391371:0x3d3,_0x529ae9:0x34f,_0xd0358a:0x41c,_0x2e1a60:0x37c,_0x59d373:0x420,_0x17a59b:0x424,_0x22cc8b:0x3e5,_0x4cb759:0x3b1,_0x198904:0x43e,_0x44053f:0x3fe,_0xefe5ff:0x34b,_0x5b9cae:0x3d8,_0x48a1fb:0x397,_0x48bda4:0x403,_0x1c9064:0x3c6,_0x28ac78:0x443,_0x19eb08:0x442,_0x41ae3e:0x382,_0x3545cb:0x41b,_0x4deeb3:0x3d2,_0x18791e:0x3bc,_0x2c5f5b:0x3f4,_0x42dbc9:0x38a,_0x5a15a4:0x437,_0x3941e5:0x42d,_0x1736da:0x3c9,_0x4ebe3a:0x378,_0xb611d6:0x3db,_0x4fef1a:0x3bd,_0x3eecb6:0x35b,_0xc441ad:0x3a6,_0x1d8e06:0x3e7,_0x5778d2:0x3a6,_0x1cbfe6:0x3bd,_0x2f0d20:0x391,_0x38c6d6:0x39d,_0x178148:0x3d6,_0x87fa66:0x435,_0x2a7268:0x3b9,_0x330729:0x390,_0x459d2b:0x33c,_0x2e0891:0x36a,_0x5b50fd:0x3b0},_0x520f84={_0xd4a705:0xdc,_0x12eb46:0x77,_0x48285a:0x2c7};function _0x28e4b9(_0x52517a,_0x1f1a85,_0x35b342,_0x133701){return _0x2b8011(_0x52517a-_0x520f84._0xd4a705,_0x1f1a85,_0x35b342-_0x520f84._0x12eb46,_0x35b342-_0x520f84._0x48285a);}throwIfAborted(_0x433763[_0x28e4b9(0x386,0x36e,_0x1aafb1._0x384623,0x408)]);if(!_0x433763['streaming']||!_0x1b7d38['chatModel'][_0x28e4b9(_0x1aafb1._0x574695,_0x1aafb1._0x269bc6,0x3ad,_0x1aafb1._0x485882)])return await _0x1b7d38[_0x28e4b9(_0x1aafb1._0x1cab6e,0x3e2,0x3c3,_0x1aafb1._0x1a5001)]['complete'](_0x248734,{'signal':_0x433763['signal']});let _0x5e1244;for await(const _0x112d7d of _0x1b7d38[_0x28e4b9(_0x1aafb1._0x1384f0,_0x1aafb1._0x27f04a,_0x1aafb1._0x4e9064,_0x1aafb1._0x4ba981)][_0x28e4b9(0x390,_0x1aafb1._0x467de9,0x3ad,_0x1aafb1._0x2447bb)](_0x248734,{'signal':_0x433763[_0x43641f(_0x1aafb1._0x1384f0,0x3d4,0x3f1,_0x1aafb1._0x405218)]})){throwIfAborted(_0x433763[_0x28e4b9(_0x1aafb1._0x4a317c,0x3e0,0x3bb,0x3e4)]);if(_0x112d7d['type']===_0x28e4b9(_0x1aafb1._0x35b76d,_0x1aafb1._0x578399,0x3bf,0x3a7)){_0xce2f0f[_0x28e4b9(_0x1aafb1._0x25b4ce,0x379,0x396,0x3eb)]['reasoningStartedAt']!==void 0x0&&_0xce2f0f['meta'][_0x43641f(_0x1aafb1._0x4fb609,0x3c3,0x35b,_0x1aafb1._0x422d94)]===void 0x0&&(_0xce2f0f[_0x28e4b9(_0x1aafb1._0x654214,_0x1aafb1._0x391371,0x396,0x3ec)][_0x28e4b9(0x3bb,_0x1aafb1._0x529ae9,0x366,0x399)]=Date[_0x43641f(0x3fb,_0x1aafb1._0xd0358a,_0x1aafb1._0x2e1a60,0x3d1)]());_0x5e1244=_0x112d7d['response'];continue;}if(_0x112d7d[_0x28e4b9(_0x1aafb1._0x59d373,_0x1aafb1._0x17a59b,_0x1aafb1._0x22cc8b,_0x1aafb1._0x4cb759)]==='provider_retry'){await emitEvent2(_0x1b7d38[_0x28e4b9(_0x1aafb1._0x198904,0x40e,_0x1aafb1._0x44053f,0x3cd)],_0x112d7d,_0xe6127f);continue;}const _0x3f2caa=createReasoningChunkEvent(_0x112d7d,_0xce2f0f[_0x28e4b9(_0x1aafb1._0xefe5ff,_0x1aafb1._0x5b9cae,_0x1aafb1._0x48a1fb,0x3d5)]);if(_0x3f2caa&&_0x3f2caa['type']===_0x28e4b9(0x43b,0x3af,_0x1aafb1._0x48bda4,_0x1aafb1._0x1c9064)&&_0x3f2caa[_0x28e4b9(0x3e7,_0x1aafb1._0x28ac78,0x40d,_0x1aafb1._0x19eb08)][_0x28e4b9(0x3ba,0x391,_0x1aafb1._0x41ae3e,0x34a)]>0x0){_0xce2f0f[_0x28e4b9(0x3c0,0x3c7,0x396,0x340)]['reasoningStartedAt']===void 0x0&&(_0xce2f0f[_0x43641f(_0x1aafb1._0x3545cb,0x407,_0x1aafb1._0x4deeb3,_0x1aafb1._0x4a317c)][_0x43641f(0x425,0x417,0x3e4,0x3eb)]=Date[_0x43641f(_0x1aafb1._0x18791e,_0x1aafb1._0x2c5f5b,0x39e,0x3d1)]());await emitEvent2(_0x1b7d38['onEvent'],_0x3f2caa,_0xe6127f);continue;}const _0x183f30=createAssistantChunkEvent(_0x112d7d,_0xce2f0f['assistantMessageId']);if(_0x183f30){_0xce2f0f[_0x28e4b9(0x3e5,0x3d4,0x396,_0x1aafb1._0x42dbc9)][_0x43641f(_0x1aafb1._0x5a15a4,_0x1aafb1._0x3941e5,_0x1aafb1._0x1736da,0x3eb)]!==void 0x0&&_0xce2f0f[_0x28e4b9(0x36e,_0x1aafb1._0x4ebe3a,0x396,0x361)][_0x43641f(_0x1aafb1._0xb611d6,_0x1aafb1._0x4fef1a,_0x1aafb1._0x3eecb6,_0x1aafb1._0xc441ad)]===void 0x0&&(_0xce2f0f['meta'][_0x43641f(_0x1aafb1._0x1d8e06,0x3d9,0x3f3,_0x1aafb1._0x5778d2)]=Date[_0x28e4b9(_0x1aafb1._0x1cbfe6,0x3a2,_0x1aafb1._0x2f0d20,_0x1aafb1._0x38c6d6)]());await emitEvent2(_0x1b7d38[_0x28e4b9(_0x1aafb1._0x178148,_0x1aafb1._0x87fa66,_0x1aafb1._0x44053f,0x3cc)],_0x183f30,_0xe6127f);continue;}const _0x2f049c=createToolUseChunkEvent(_0x112d7d,_0xce2f0f[_0x28e4b9(0x407,_0x1aafb1._0x44053f,_0x1aafb1._0x2a7268,_0x1aafb1._0x330729)]);_0x2f049c&&await emitEvent2(_0x1b7d38['onEvent'],_0x2f049c,_0xe6127f);}function _0x43641f(_0x5acc86,_0x34c333,_0xe1c5c0,_0x278972){return _0x2b8011(_0x5acc86-0x17a,_0x34c333,_0xe1c5c0-0x36,_0x278972-0x307);}if(!_0x5e1244)throw new Error(_0x28e4b9(_0x1aafb1._0x459d2b,0x352,_0x1aafb1._0x2e0891,_0x1aafb1._0x5b50fd));return _0x5e1244;}function makeTurnGuards(_0x427a64,_0x3aeab5,_0x213cac,_0x3cff30,_0x56f6fb){return{async 'stage'(_0x4d24f3,_0x386b8f){return throwIfAborted(_0x427a64),await runStage(_0x3aeab5,_0x4d24f3,_0x386b8f,_0x3cff30);},async 'emit'(_0x25700d){throwIfAborted(_0x427a64),await emitEvent2(_0x213cac,_0x25700d,_0x56f6fb);},async 'stageUnchecked'(_0x1c194e,_0x3fe6e4){return await runStage(_0x3aeab5,_0x1c194e,_0x3fe6e4,_0x3cff30);},async 'emitUnchecked'(_0x57e0c8){await emitEvent2(_0x213cac,_0x57e0c8,_0x56f6fb);}};}async function runTurn(_0x1cca29,_0x59b511){const _0x41e43d={_0x2fe8f2:0x2cd,_0x4808fe:0x289,_0x1e818d:0x31f,_0x411ab7:0x2d9,_0x2ca402:0x28c,_0x507008:0x2a9,_0x26cabd:0x75,_0xcdfb77:0xc2,_0x4e9164:0xdd,_0x3b10f7:0xf2,_0x51ddee:0x10c,_0x5dd1b6:0xe3,_0x8b0d8f:0xda,_0x1d4ff6:0x8d,_0x2df490:0x106,_0x30d17c:0x2fc,_0x87d76d:0x2e1,_0x508286:0xe2,_0x170ef0:0x8b,_0x5bd43a:0x111,_0x51e5fd:0x2dc,_0x380965:0x310,_0x1492db:0xd4,_0x253d0c:0xd5,_0x5eea00:0xc8,_0x12277b:0x311,_0x5b2250:0x29f,_0x51d71d:0x122,_0xad84d0:0x2a5,_0x42765b:0x2f2,_0x2ba2c9:0xfc,_0x2ce91e:0xc8,_0x466dc7:0x2bb,_0x5cb52c:0x27c,_0x15e1c3:0x305,_0x7a72eb:0x2b8,_0x5dad90:0x300,_0x391940:0x301,_0x466b7c:0x122,_0x1ff7cb:0x148,_0x19e0f0:0xb0,_0x35b46a:0xb3,_0x7a5859:0xff,_0x2ba70d:0x2d5,_0x503d36:0x31e,_0x511115:0x158,_0xc737be:0x138,_0x5f5a25:0x274,_0x271fde:0x2e7,_0x398b6c:0xe0,_0x2aecad:0xa9,_0x2de3e8:0xbe,_0x1932ea:0xad,_0xc985e6:0x2ad,_0x28bd67:0x2f5,_0x205c9c:0x2bc,_0x2c202a:0x2fb,_0x42ddfb:0x2a6,_0x18a91b:0x2b9,_0xc142e3:0x2a1,_0x41afdb:0x11e,_0x59b1ab:0x24a,_0x26ecb2:0x2fd,_0x19ea95:0x31c,_0x5fd2c4:0x2c5,_0x25ab14:0x2a6,_0x2785da:0x119,_0x5bcdbc:0x2aa,_0x2dec21:0x2af,_0x2ef80d:0x27e,_0x3cc0f8:0x2a0,_0x58bd21:0x2bb,_0x248f9c:0x29b,_0xe05a1d:0x28d,_0x107a9e:0x2d3,_0x3082e1:0x294,_0xb34842:0x26c,_0x242fb3:0x2c9,_0xace28b:0x354,_0x3060e9:0x352,_0x1f3003:0xf2,_0x3b8b6d:0xc3,_0x424254:0x244,_0x40e43b:0x289,_0x2301b9:0xf6,_0x2c608e:0x119,_0x573b5d:0xc2,_0x500c66:0x87,_0x17b680:0x247,_0x5668d1:0x2b2,_0x3c7e7a:0x2b2,_0x5ce537:0x279,_0x555f67:0xc6,_0x284f94:0x10e,_0xf869d7:0x283,_0x290f67:0x308,_0x17f98a:0x2ef,_0x29a92c:0x296,_0x433a61:0x2c4,_0x3debc4:0xdf,_0x56355d:0x16e,_0x2f549c:0x142,_0xb2c6a7:0x15b,_0x5511fa:0xbe,_0x275eb6:0x140,_0x2b07b5:0x2c2,_0x41206f:0x2aa,_0x1c46db:0x2bd,_0x3ee94b:0x307,_0x4d2fac:0x302,_0x4e1aea:0x315,_0x576932:0x286,_0x168a46:0x2b6,_0x27d976:0x11d,_0x2510dd:0x12d,_0x36c42a:0x127,_0x13bebb:0x106,_0x3147f4:0x12e,_0x5a0ff6:0x13d,_0x326e76:0x11a,_0x3172eb:0x116,_0x46e962:0x13c,_0x983403:0x2da,_0x291a46:0x284},_0x3fd700={_0x3289b3:0x13f,_0x188a88:0x17b,_0x3c5014:0x180},_0x4f439b={_0x174cf0:0x1c8},_0x16f5b2={_0x430903:0x1af,_0x16b5b2:0x1d9};function _0xbbaa39(_0xd2c812,_0x66bf19,_0x288479,_0x179911){return _0x2b8011(_0xd2c812-0x135,_0x179911,_0x288479-_0x16f5b2._0x430903,_0xd2c812-_0x16f5b2._0x16b5b2);}const _0x4b03bd=_0x1cca29[_0xbbaa39(_0x41e43d._0x2fe8f2,_0x41e43d._0x4808fe,_0x41e43d._0x1e818d,_0x41e43d._0x411ab7)]??new AbortController()['signal'],_0x570ff6={'sessionId':_0x1cca29['sessionId'],'turnId':_0x1cca29[_0xbbaa39(0x29a,_0x41e43d._0x2ca402,0x2ce,_0x41e43d._0x507008)],'system':normalizeSystem(_0x1cca29[_0x409f5d(_0x41e43d._0x26cabd,_0x41e43d._0xcdfb77,_0x41e43d._0x4e9164,0xb1)]),'messages':(_0x1cca29['messages']??[])[_0x409f5d(_0x41e43d._0x3b10f7,_0x41e43d._0x51ddee,0x141,_0x41e43d._0x5dd1b6)](normalizeMessage),'lastResponse':void 0x0,'toolResults':[],'finalMessage':void 0x0,'sessionDir':typeof _0x59b511[_0x409f5d(0xb8,_0x41e43d._0x8b0d8f,_0x41e43d._0x1d4ff6,_0x41e43d._0x2df490)]===_0xbbaa39(_0x41e43d._0x30d17c,0x315,0x2c8,_0x41e43d._0x87d76d)?_0x59b511[_0x409f5d(0xd8,0xda,_0x41e43d._0x508286,_0x41e43d._0x170ef0)]():_0x59b511[_0x409f5d(_0x41e43d._0x5bd43a,_0x41e43d._0x8b0d8f,0xc2,0xe2)]},_0x31b546=makeExtensionContext(_0x570ff6);function _0x409f5d(_0x4fd2b0,_0x5a8192,_0xbeb90f,_0x1e10cc){return _0x2b8011(_0x4fd2b0-_0x4f439b._0x174cf0,_0x1e10cc,_0xbeb90f-0x11,_0x5a8192-0x13);}const _0x176426={'sessionId':_0x570ff6[_0xbbaa39(0x305,0x2d4,_0x41e43d._0x51e5fd,_0x41e43d._0x380965)],'turnId':_0x570ff6[_0x409f5d(0x82,_0x41e43d._0x1492db,_0x41e43d._0x253d0c,_0x41e43d._0x5eea00)],'state':_0x570ff6,'signal':_0x4b03bd,..._0x59b511['askUser']?{'askUser':_0x59b511['askUser']}:{},..._0x59b511[_0xbbaa39(0x2ce,_0x41e43d._0x12277b,_0x41e43d._0x5b2250,0x2c1)]?{'setTopic':_0x59b511[_0x409f5d(0x106,0x108,0xbf,_0x41e43d._0x51d71d)]}:{}},{stage:_0x5a1617,emit:_0xb478dc,stageUnchecked:_0x45d479,emitUnchecked:_0x41c478}=makeTurnGuards(_0x4b03bd,_0x59b511[_0xbbaa39(_0x41e43d._0xad84d0,_0x41e43d._0x42765b,0x2cc,0x284)],_0x59b511['onEvent'],_0x31b546,_0x176426),_0x3c7538=async(_0x2ad20b,_0x1cbea6)=>{const _0x5c8610={_0x3f600c:0xc5};function _0x801d47(_0x56bf30,_0x3b3803,_0x4b0f3c,_0xb6ea3e){return _0xbbaa39(_0x4b0f3c- -0x482,_0x3b3803-0x3f,_0x4b0f3c-_0x5c8610._0x3f600c,_0xb6ea3e);}const _0x414756=_0x1cbea6?{..._0x31b546,'turnMeta':_0x1cbea6}:_0x31b546;await _0x59b511['registry']['runObservers'](_0x801d47(-_0x3fd700._0x3289b3,-_0x3fd700._0x188a88,-0x193,-_0x3fd700._0x3c5014),structuredClone(_0x2ad20b),_0x414756);};let _0x30dd30=0x0;try{const _0x1ee63e=await _0x5a1617(_0x409f5d(0x10c,_0x41e43d._0x2ba2c9,_0x41e43d._0x2ce91e,0x11b),normalizeMessage(_0x1cca29[_0xbbaa39(_0x41e43d._0x466dc7,_0x41e43d._0x5cb52c,_0x41e43d._0x15e1c3,0x2b9)]));_0x570ff6[_0xbbaa39(_0x41e43d._0x7a72eb,_0x41e43d._0x15e1c3,_0x41e43d._0x5dad90,_0x41e43d._0x391940)][_0x409f5d(_0x41e43d._0x466b7c,_0x41e43d._0x1ff7cb,0x10b,0x174)](_0x1ee63e),await _0x3c7538(_0x1ee63e),await _0xb478dc({'type':_0x409f5d(_0x41e43d._0x19e0f0,_0x41e43d._0x35b46a,0x94,_0x41e43d._0x7a5859),'message':_0x1ee63e});while(!![]){throwIfAborted(_0x4b03bd),_0x30dd30+=0x1;const _0x9ff0da=createAssistantMessageId(_0x570ff6['turnId'],_0x30dd30),_0x4191d=createReasoningMessageId(_0x9ff0da),_0x1abcaf={'model':_0x59b511[_0xbbaa39(_0x41e43d._0x2ba70d,0x2a3,0x2b6,0x318)]['model'],..._0x59b511[_0x409f5d(0xf3,0x10f,0x128,0x14a)][_0xbbaa39(_0x41e43d._0x503d36,0x32a,0x356,0x344)]?{'provider':_0x59b511['chatModel'][_0x409f5d(0x187,_0x41e43d._0x511115,_0x41e43d._0xc737be,0x131)]}:{}};let _0x387b7b={'model':_0x59b511[_0x409f5d(0x11e,0x10f,0x160,0x110)][_0xbbaa39(0x2b9,_0x41e43d._0x5f5a25,_0x41e43d._0x271fde,0x2d6)],'maxTokens':_0x59b511['chatModel'][_0x409f5d(0x9f,0xe9,_0x41e43d._0x398b6c,_0x41e43d._0x2aecad)]??0x4000,'system':structuredClone(_0x570ff6[_0x409f5d(0x73,0xc2,_0x41e43d._0x2de3e8,0xdb)]),'messages':structuredClone(_0x570ff6[_0x409f5d(_0x41e43d._0x1932ea,0xf2,0x131,0xc7)]),'tools':_0x59b511['toolRuntime'][_0xbbaa39(_0x41e43d._0xc985e6,_0x41e43d._0x28bd67,_0x41e43d._0x205c9c,0x2dc)](),'metadata':{'sessionId':_0x570ff6[_0xbbaa39(0x305,_0x41e43d._0x2c202a,0x2e2,0x321)],'turnId':_0x570ff6[_0xbbaa39(0x29a,_0x41e43d._0x42ddfb,_0x41e43d._0x18a91b,_0x41e43d._0xc142e3)]},..._0x59b511[_0xbbaa39(0x2c7,0x2f7,_0x41e43d._0x5dad90,0x2bf)]?{'outputFormat':_0x59b511[_0x409f5d(0xfe,0x101,_0x41e43d._0x41afdb,0x14a)]}:{}};_0x387b7b=await _0x5a1617(_0xbbaa39(0x2ff,0x30e,0x31c,0x2de),_0x387b7b),await _0xb478dc({'type':_0xbbaa39(0x28f,_0x41e43d._0x59b1ab,0x24e,0x279),'request':_0x387b7b}),_0x1abcaf[_0xbbaa39(_0x41e43d._0x26ecb2,_0x41e43d._0x19ea95,0x2e9,0x31b)]=Date[_0xbbaa39(0x2a3,_0x41e43d._0x5fd2c4,0x285,_0x41e43d._0x25ab14)]();let _0x1518d=await executeModelRequest(_0x387b7b,_0x1cca29,_0x59b511,_0x176426,{'assistantMessageId':_0x9ff0da,'reasoningMessageId':_0x4191d,'meta':_0x1abcaf});_0x1abcaf['turnCompletedAt']=Date[_0x409f5d(_0x41e43d._0x19e0f0,_0x41e43d._0x4e9164,0xc2,_0x41e43d._0x2785da)](),_0x1518d=await _0x5a1617(_0xbbaa39(_0x41e43d._0x5bcdbc,_0x41e43d._0x2dec21,_0x41e43d._0x2ef80d,0x2f1),_0x1518d),await _0xb478dc({'type':'model_response','response':_0x1518d}),_0x570ff6[_0xbbaa39(0x29e,_0x41e43d._0x3cc0f8,_0x41e43d._0x58bd21,0x2da)]=_0x1518d;let _0x4b61d1=await _0x5a1617('beforeAssistantAppend',withMessageId(responseToAssistantMessage(_0x1518d),_0x9ff0da));_0x4b61d1=withMessageId(_0x4b61d1,_0x9ff0da);const _0x4eb6e6=getToolUseBlocks(_0x4b61d1),_0x2661b7=await Promise[_0xbbaa39(_0x41e43d._0x248f9c,0x272,_0x41e43d._0xe05a1d,0x28f)](_0x4eb6e6[_0xbbaa39(0x2d2,0x28d,0x2b0,_0x41e43d._0x107a9e)](_0xcfab76=>_0x5a1617('beforeToolExecution',_0xcfab76)));_0x2661b7[_0xbbaa39(_0x41e43d._0x3082e1,_0x41e43d._0xb34842,0x2d7,_0x41e43d._0x59b1ab)]>0x0&&(_0x4b61d1=replaceToolUseBlocks(_0x4b61d1,_0x2661b7));const _0xdafead=withMessageId(_0x4b61d1,_0x9ff0da);_0x4b61d1=_0xdafead;const _0x407700=createReasoningMessage(_0x4b61d1),_0xb2cbed=createAssistantTextMessage(_0x4b61d1),_0x5ad7b5=createToolUseMessage(_0x4b61d1);_0x407700&&await _0xb478dc({'type':_0xbbaa39(0x314,_0x41e43d._0x242fb3,_0x41e43d._0xace28b,_0x41e43d._0x3060e9),'message':withMessageId(_0x407700,_0x4191d)});_0xb2cbed&&await _0xb478dc({'type':'assistant_message','message':withMessageId(_0xb2cbed,_0x9ff0da)});_0x5ad7b5&&await _0xb478dc({'type':'tool_use_message','message':withMessageId(_0x5ad7b5,_0x9ff0da)});_0x570ff6[_0x409f5d(0xff,_0x41e43d._0x1f3003,0xcf,_0x41e43d._0x3b8b6d)]['push'](_0xdafead);_0x2661b7[_0xbbaa39(0x294,0x2ad,_0x41e43d._0x424254,_0x41e43d._0x40e43b)]>0x0&&await _0x3c7538(_0xdafead,_0x1abcaf);for(const _0x3ed100 of _0x2661b7){await _0xb478dc({'type':_0x409f5d(_0x41e43d._0x2301b9,_0x41e43d._0x2c608e,0xd4,0x13e),'toolCall':_0x3ed100});}if(_0x2661b7[_0x409f5d(0x100,0xce,_0x41e43d._0x573b5d,_0x41e43d._0x500c66)]===0x0){const _0x216864=await _0x5a1617(_0xbbaa39(0x284,_0x41e43d._0x17b680,0x296,0x2b9),_0x4b61d1),_0x533b56=withMessageId(_0x216864,_0x9ff0da);return _0x570ff6[_0xbbaa39(_0x41e43d._0x5668d1,_0x41e43d._0x3c7e7a,_0x41e43d._0x5ce537,0x2bb)]=_0x533b56,_0x570ff6[_0x409f5d(_0x41e43d._0x555f67,_0x41e43d._0x1f3003,0xf4,_0x41e43d._0x284f94)][_0x570ff6[_0xbbaa39(0x2b8,_0x41e43d._0xf869d7,_0x41e43d._0x290f67,_0x41e43d._0x17f98a)][_0xbbaa39(_0x41e43d._0x3082e1,0x26f,0x254,0x2e7)]-0x1]=_0x533b56,await _0x3c7538(_0x533b56,_0x1abcaf),await _0xb478dc({'type':_0xbbaa39(_0x41e43d._0x29a92c,0x2bd,_0x41e43d._0x433a61,0x2d7),'message':_0x533b56}),throwIfAborted(_0x4b03bd),await _0x59b511[_0x409f5d(0xfb,_0x41e43d._0x3debc4,0xbd,0xa3)][_0x409f5d(_0x41e43d._0x56355d,_0x41e43d._0x2f549c,_0x41e43d._0xb2c6a7,0x107)](_0x409f5d(_0x41e43d._0x5511fa,0xf6,0x13d,_0x41e43d._0x275eb6),_0x570ff6,_0x31b546),await _0xb478dc({'type':_0xbbaa39(0x2f2,_0x41e43d._0x2b07b5,_0x41e43d._0x41206f,_0x41e43d._0x1c46db),'state':_0x570ff6}),{'status':_0xbbaa39(_0x41e43d._0x3ee94b,_0x41e43d._0x4d2fac,0x2dc,0x35a),'finalMessage':_0x533b56,'state':_0x570ff6};}let _0x30a5a2=await _0x59b511['toolRuntime']['executeCalls'](_0x2661b7,_0x176426);const _0x1e1f46=_0x30a5a2[_0xbbaa39(0x2d4,0x28c,_0x41e43d._0x290f67,_0x41e43d._0x4e1aea)](isAbortedToolResult),_0x211de8=_0x1e1f46?_0x45d479:_0x5a1617,_0x3d89bd=_0x1e1f46?_0x41c478:_0xb478dc;_0x30a5a2=await Promise[_0xbbaa39(0x29b,0x273,_0x41e43d._0x576932,_0x41e43d._0x168a46)](_0x30a5a2[_0x409f5d(_0x41e43d._0x27d976,0x10c,_0x41e43d._0x2510dd,0xef)](_0x408a68=>_0x211de8('afterToolResult',_0x408a68))),_0x570ff6['toolResults']['push'](..._0x30a5a2);for(const _0x4234e3 of _0x30a5a2){await _0x3d89bd({'type':_0x409f5d(0x159,_0x41e43d._0x36c42a,_0x41e43d._0x13bebb,_0x41e43d._0x3147f4),'result':_0x4234e3});}const _0x27dfcd=await _0x211de8('beforeToolResultAppend',createToolResultUserMessage(_0x30a5a2));await _0x3d89bd({'type':_0x409f5d(0x160,0x11b,0xca,_0x41e43d._0x5a0ff6),'message':_0x27dfcd}),_0x570ff6[_0x409f5d(_0x41e43d._0x326e76,_0x41e43d._0x1f3003,_0x41e43d._0x3172eb,0xa9)]['push'](_0x27dfcd),await _0x3c7538(_0x27dfcd);if(_0x1e1f46)return{'status':'aborted','state':_0x570ff6};}}catch(_0x598276){if(!_0x4b03bd[_0x409f5d(0x110,0x114,_0x41e43d._0x46e962,0x165)])throw new TurnFailedError(_0x598276,_0x570ff6);return{'status':_0xbbaa39(_0x41e43d._0x983403,0x2a6,_0x41e43d._0x3c7e7a,_0x41e43d._0x291a46),'state':_0x570ff6};}}function createSessionId(){const _0x684774={_0x42f36a:0x2f2,_0xebf0bf:0x2e4,_0x3761a4:0x335,_0x36d740:0x2b9,_0x1275e4:0x34a,_0x385fb4:0x308,_0x4f7c8c:0x2ea},_0x149fc1={_0x5d9cd3:0x160},_0x5ed145={_0x2eec56:0x164,_0x7158c1:0x1ee};function _0xd28d1c(_0x276589,_0x4d4ebb,_0x2dba72,_0x46c739){return _0x2b8011(_0x276589-0x64,_0x46c739,_0x2dba72-_0x5ed145._0x2eec56,_0x276589-_0x5ed145._0x7158c1);}function _0x4e8dc7(_0x11744e,_0x43623e,_0x43e817,_0x2babf5){return _0x2b8011(_0x11744e-_0x149fc1._0x5d9cd3,_0x43623e,_0x43e817-0x1a9,_0x11744e- -0x1c6);}return _0xd28d1c(_0x684774._0x42f36a,_0x684774._0xebf0bf,_0x684774._0x3761a4,0x29f)+Date[_0xd28d1c(0x2b8,_0x684774._0x36d740,0x267,0x2c8)]()+'-'+Math[_0xd28d1c(0x2fe,_0x684774._0x1275e4,_0x684774._0x385fb4,_0x684774._0x4f7c8c)]()['toString'](0x10)['slice'](0x2,0xa);}function createTurnId(_0x58ee4){const _0x1b8bfe={_0x5a5842:0x79,_0x57fe85:0x8f,_0x22ad3a:0xbc},_0x10643a={_0x3669ac:0x1c5,_0x18499c:0x166};function _0x2988fa(_0x200781,_0x30d764,_0x28104a,_0x531733){return _0x2b8011(_0x200781-_0x10643a._0x3669ac,_0x531733,_0x28104a-_0x10643a._0x18499c,_0x30d764- -0x117);}return _0x2988fa(-_0x1b8bfe._0x5a5842,-0x73,-_0x1b8bfe._0x57fe85,-_0x1b8bfe._0x22ad3a)+_0x58ee4;}function createDefaultMessage(_0x15bb43){if(_0x15bb43===void 0x0)return void 0x0;return normalizeUserInput(_0x15bb43);}function normalizeUserInput(_0x2e35b1){const _0x1e5bc6={_0xed13ef:0x13a,_0xcad59b:0x25c,_0x5193ed:0x1d7,_0x28613b:0x207},_0x278a52={_0xee638:0x46f},_0x49c062={_0x305c2d:0x3e};function _0x45673a(_0x2d2b87,_0x5bfe99,_0x30fc7b,_0x348609){return _0x106530(_0x30fc7b,_0x5bfe99-0x1e9,_0x30fc7b-0xf2,_0x2d2b87- -_0x49c062._0x305c2d);}function _0x25f044(_0x2728f4,_0x24df05,_0xe3220a,_0x4eeae0){return _0x106530(_0x2728f4,_0x24df05-0x8c,_0xe3220a-0x7a,_0x4eeae0- -_0x278a52._0xee638);}if(typeof _0x2e35b1===_0x45673a(0x186,_0x1e5bc6._0xed13ef,0x1d7,0x17c))return{'role':_0x25f044(-0x239,-0x223,-0x2a7,-_0x1e5bc6._0xcad59b),'content':[{'type':_0x45673a(0x218,0x252,_0x1e5bc6._0x5193ed,_0x1e5bc6._0x28613b),'text':_0x2e35b1}]};return normalizeMessage(_0x2e35b1);}function resolveChatModel(_0x5d86ea){const _0x4d8b65={_0x4a92df:0xf9,_0x50d4ff:0x147,_0x25826c:0xec,_0x30a03b:0x25d,_0x473f8c:0x262,_0x5a9e4a:0x12c,_0x571c7b:0xef},_0x5e556b={_0x550727:0x1d};function _0x3f492f(_0x1dd9f0,_0x10bdf0,_0x3302f2,_0x5515fe){return _0x106530(_0x5515fe,_0x10bdf0-0x143,_0x3302f2-_0x5e556b._0x550727,_0x1dd9f0- -0x412);}function _0x5587fd(_0xbadf17,_0x217239,_0x56cb40,_0x6588f8){return _0x2b8011(_0xbadf17-0xba,_0x217239,_0x56cb40-0x8e,_0xbadf17-0x30);}if(!_0x5d86ea[_0x5587fd(0x12c,_0x4d8b65._0x4a92df,_0x4d8b65._0x50d4ff,_0x4d8b65._0x25826c)])throw new Error(_0x3f492f(-_0x4d8b65._0x30a03b,-_0x4d8b65._0x473f8c,-0x285,-0x246));return _0x5d86ea[_0x5587fd(_0x4d8b65._0x5a9e4a,0x101,0xe7,_0x4d8b65._0x571c7b)];}function createRegistry(_0x2e01aa){const _0x4348fe={_0x468c52:0x237,_0x26acc9:0x2a6,_0x431dd8:0x28c,_0xc26d6b:0x2a9,_0x5a2d42:0x215,_0x37c014:0x6d,_0x2ee234:0x18,_0x43280e:0x8a,_0x571802:0xb7},_0x2cd4fb={_0xf81122:0x1c3,_0x272f2b:0x68},_0x5e5971={_0xe859cc:0x1e7,_0xde6b7:0x224};function _0x51fa3b(_0x487740,_0x27c494,_0xeb9f5f,_0x1b2140){return _0x106530(_0xeb9f5f,_0x27c494-0x1a4,_0xeb9f5f-_0x5e5971._0xe859cc,_0x487740- -_0x5e5971._0xde6b7);}function _0x2f9e00(_0x3258f4,_0x3d22d0,_0x2b8f83,_0x259f11){return _0x106530(_0x3d22d0,_0x3d22d0-_0x2cd4fb._0xf81122,_0x2b8f83-_0x2cd4fb._0x272f2b,_0x3258f4- -0x466);}if(_0x2e01aa[_0x2f9e00(-0x28a,-_0x4348fe._0x468c52,-_0x4348fe._0x26acc9,-0x23f)])return _0x2e01aa[_0x2f9e00(-0x28a,-0x27b,-_0x4348fe._0x431dd8,-_0x4348fe._0xc26d6b)];const _0x13791f=createExtensionRegistry(),_0x17a574=_0x2e01aa[_0x2f9e00(-0x254,-0x253,-0x22c,-_0x4348fe._0x5a2d42)]??[];for(const _0x2fee2b of _0x17a574){_0x13791f[_0x51fa3b(-_0x4348fe._0x37c014,-_0x4348fe._0x2ee234,-_0x4348fe._0x43280e,-_0x4348fe._0x571802)](_0x2fee2b);}return _0x13791f;}var Agent=class{['_systemPrompt'];['deps'];[_0x2b8011(0xf3,0x85,0x104,0xdb)];[_0x106530(0x210,0x250,0x27f,0x23c)];['messages'];[_0x2b8011(0xd8,0x10b,0x162,0x11a)];[_0x2b8011(0xc3,0xdf,0x7b,0xc8)];constructor(_0x90fb6f={}){const _0x268c77={_0x157816:0x13e,_0x4c95a2:0x141,_0xf61e80:0x141,_0x3b2807:0x110,_0x381973:0x21b,_0xa8e2e8:0x270,_0x2a5e12:0x1ec,_0x50ba80:0x214,_0x11276a:0xd0,_0x1e5256:0x12b,_0xd6a229:0xf4,_0x2b3f36:0x20f,_0x33dd9e:0x218,_0x5315d5:0x13b,_0x4febe2:0x148,_0x355bba:0x225,_0x248b5f:0x1cf,_0x2d1dca:0x26c,_0x72f501:0x233,_0x485c59:0x164,_0x2f4abb:0x100,_0x28c277:0xc2,_0xd7c737:0x213,_0x3f918e:0xd4},_0x348f5a={_0x549c7d:0x488,_0x59169a:0x48e},_0x30f58a={_0x4155b0:0x114,_0x1bb0f4:0x15},_0xdac617={_0x24834e:0x45,_0x3ff1d4:0x308};this[_0x5e4120(_0x268c77._0x157816,0x102,0x115,_0x268c77._0x4c95a2)]=_0x90fb6f[_0x5e4120(0x166,0x16c,0x172,_0x268c77._0xf61e80)]??createSessionId(),this[_0x5e4120(0xa7,_0x268c77._0x3b2807,0xa6,0xdd)]=0x0,this[_0x506d0a(-0x235,-0x22c,-_0x268c77._0x381973,-0x254)]=_0x90fb6f[_0x506d0a(-0x226,-0x242,-0x1f5,-0x235)]??'';function _0x506d0a(_0x435ae2,_0x18c855,_0x5dfc88,_0x55a858){return _0x2b8011(_0x435ae2-_0xdac617._0x24834e,_0x55a858,_0x5dfc88-0xc3,_0x5dfc88- -_0xdac617._0x3ff1d4);}this[_0x506d0a(-_0x268c77._0xa8e2e8,-_0x268c77._0x2a5e12,-0x229,-_0x268c77._0x50ba80)]=(_0x90fb6f[_0x5e4120(_0x268c77._0x11276a,_0x268c77._0x1e5256,0x13d,_0x268c77._0xd6a229)]??[])[_0x506d0a(-0x21d,-0x214,-_0x268c77._0x2b3f36,-_0x268c77._0x33dd9e)](normalizeMessage),this['defaultMessage']=createDefaultMessage(_0x90fb6f[_0x5e4120(0xf2,_0x268c77._0x5315d5,_0x268c77._0x4febe2,0xf7)]);function _0x5e4120(_0x4bab46,_0x377bc5,_0x327552,_0x197cc0){return _0x2b8011(_0x4bab46-_0x30f58a._0x4155b0,_0x4bab46,_0x327552-0x1e6,_0x197cc0-_0x30f58a._0x1bb0f4);}this['metrics']=createAgentMetrics({'getContextWindowLimit':_0x90fb6f[_0x506d0a(-0x1da,-_0x268c77._0x355bba,-_0x268c77._0x248b5f,-0x1b5)]});const _0x3f8df5=_0x90fb6f['onEvent'],_0x4906b4=async(_0x44a8f8,_0x3b6e5d)=>{const _0x5b135c={_0x4f74e2:0x158,_0x4a2a07:0x52};this['metrics'][_0x1d569e(_0x348f5a._0x549c7d,_0x348f5a._0x59169a,0x4ba,0x479)](_0x44a8f8);function _0x1d569e(_0x573da4,_0x6d379d,_0x12dbaa,_0x38b98b){return _0x506d0a(_0x573da4-_0x5b135c._0x4f74e2,_0x6d379d-_0x5b135c._0x4a2a07,_0x6d379d-0x669,_0x38b98b);}await _0x3f8df5?.(_0x44a8f8,_0x3b6e5d);},_0x4ade40=createInternalToolRuntime(_0x90fb6f[_0x506d0a(-0x27e,-_0x268c77._0x2d1dca,-_0x268c77._0x72f501,-_0x268c77._0x2a5e12)]??[],{'onEvent':_0x4906b4,'onToolCall':_0x90fb6f[_0x5e4120(_0x268c77._0x485c59,0xd9,0xcf,0x115)]});this[_0x5e4120(0xf1,_0x268c77._0x2f4abb,0xe3,_0x268c77._0x28c277)]={'registry':createRegistry(_0x90fb6f),'chatModel':resolveChatModel(_0x90fb6f),'toolRuntime':_0x4ade40,'askUser':_0x90fb6f['askUser'],'setTopic':_0x90fb6f[_0x506d0a(-_0x268c77._0x33dd9e,-0x211,-_0x268c77._0xd7c737,-0x24e)],'onEvent':_0x4906b4,'sessionDir':_0x90fb6f[_0x5e4120(0x107,0xe3,_0x268c77._0x3f918e,0xdc)],'outputFormat':_0x90fb6f['outputFormat']};}get[_0x2b8011(0xea,0x129,0x122,0x113)](){return this['_systemPrompt'];}[_0x106530(0x243,0x24f,0x251,0x1fc)](_0x1c727c=[]){const _0x2df620={_0x245052:0xd6,_0x2e3ac3:0xe9,_0x18f75e:0x150,_0x5d5feb:0x11a,_0x21fcbb:0x11d,_0x355246:0xaa,_0x1dbcd9:0x9c},_0x12495f={_0x1767bc:0x3b},_0x40f192={_0xe36642:0xac};function _0x3d064a(_0x4e539d,_0x245464,_0x451dbd,_0xbbee96){return _0x106530(_0x451dbd,_0x245464-_0x40f192._0xe36642,_0x451dbd-0xcb,_0x245464- -0x2a6);}function _0x3d188e(_0x58deb3,_0x15371e,_0x2565d1,_0x36d52a){return _0x106530(_0x15371e,_0x15371e-0x14,_0x2565d1-_0x12495f._0x1767bc,_0x58deb3- -0xe7);}this[_0x3d188e(_0x2df620._0x245052,0x11b,0xd1,_0x2df620._0x2e3ac3)][_0x3d188e(_0x2df620._0x18f75e,_0x2df620._0x5d5feb,_0x2df620._0x21fcbb,0x10b)][_0x3d064a(-0xa4,-_0x2df620._0x355246,-_0x2df620._0x1dbcd9,-0x8c)](_0x1c727c);}[_0x2b8011(0x11d,0x10e,0x12f,0x10c)](){const _0x1e143d={_0xda7f1c:0x15a,_0x257ce9:0x152,_0x14fb83:0x155},_0x1e0c0f={_0x3e80bf:0xbc},_0x2a91dc={_0x3f5f90:0x12a,_0x3da057:0x1bb,_0x328eb4:0x408};function _0x53b0ad(_0x5ed9a9,_0x370a42,_0x1a9e62,_0x41fbd9){return _0x106530(_0x5ed9a9,_0x370a42-_0x2a91dc._0x3f5f90,_0x1a9e62-_0x2a91dc._0x3da057,_0x370a42- -_0x2a91dc._0x328eb4);}function _0x36a154(_0x1a49e9,_0x13016f,_0x54a604,_0x3b3e32){return _0x2b8011(_0x1a49e9-0x10,_0x1a49e9,_0x54a604-_0x1e0c0f._0x3e80bf,_0x54a604-0xa5);}return this[_0x36a154(0x17d,_0x1e143d._0xda7f1c,_0x1e143d._0x257ce9,0x156)]['toolRuntime'][_0x36a154(0x16f,_0x1e143d._0x14fb83,0x179,0x135)]();}[_0x106530(0x242,0x26b,0x203,0x23a)](_0x400f10,_0x1e1b5f={}){const _0x35dfa4={_0x974d3:0x239,_0x3fbe56:0x21b,_0x9c8c42:0x23c,_0x314bbd:0x2e7,_0x2198f7:0x309,_0x1d2030:0x317,_0x3dd723:0x345,_0x326faa:0x300,_0x568161:0x2f7,_0x4ee209:0x2da},_0x351c1a={_0x4752ee:0x14f,_0x333d07:0x1d9},_0x3ea568={_0x8f3bd0:0x183,_0x299d65:0xbf,_0x18d999:0x238};this[_0x4e39d4(-_0x35dfa4._0x974d3,-0x222,-_0x35dfa4._0x3fbe56,-_0x35dfa4._0x9c8c42)]=_0x400f10;function _0x172736(_0x30d8ae,_0x2e5e39,_0x249db5,_0x502794){return _0x2b8011(_0x30d8ae-_0x3ea568._0x8f3bd0,_0x30d8ae,_0x249db5-_0x3ea568._0x299d65,_0x2e5e39-_0x3ea568._0x18d999);}function _0x4e39d4(_0x267604,_0x455772,_0x39b6bd,_0x45d02e){return _0x106530(_0x267604,_0x455772-_0x351c1a._0x4752ee,_0x39b6bd-_0x351c1a._0x333d07,_0x45d02e- -0x439);}_0x1e1b5f[_0x172736(_0x35dfa4._0x314bbd,0x2e2,0x2fe,0x2a4)]===!![]&&(this[_0x172736(_0x35dfa4._0x2198f7,_0x35dfa4._0x1d2030,_0x35dfa4._0x3dd723,0x356)]=[],this[_0x172736(0x307,_0x35dfa4._0x326faa,_0x35dfa4._0x568161,_0x35dfa4._0x4ee209)]=0x0);}[_0x2b8011(0x13b,0x12f,0x125,0x13a)](_0x21d143){const _0x299ddc={_0x206399:0x1d6,_0x35e035:0x1df},_0x2f5f08={_0xdf3a92:0x178,_0x110b66:0xa8};function _0x357863(_0x4ca705,_0x4f3311,_0x26a071,_0x452da7){return _0x2b8011(_0x4ca705-_0x2f5f08._0xdf3a92,_0x4ca705,_0x26a071-_0x2f5f08._0x110b66,_0x4f3311- -0x302);}this[_0x357863(-0x1f7,-_0x299ddc._0x206399,-_0x299ddc._0x35e035,-0x186)]=_0x21d143;}['setChatModel'](_0x195a70){const _0x12c7be={_0x3ac966:0x228,_0x1002e9:0x20a,_0x376e31:0x25b},_0xc3b1f4={_0x510210:0x179,_0x3eaee2:0x3c7};function _0x352e26(_0x3a9d4c,_0x2afcf9,_0x212b6d,_0x110604){return _0x106530(_0x3a9d4c,_0x2afcf9-_0xc3b1f4._0x510210,_0x212b6d-0x6,_0x212b6d- -_0xc3b1f4._0x3eaee2);}this[_0x352e26(-_0x12c7be._0x3ac966,-0x1da,-_0x12c7be._0x1002e9,-_0x12c7be._0x376e31)]['chatModel']=_0x195a70;}async[_0x106530(0x268,0x235,0x205,0x254)](_0x67d35=this['defaultMessage'],_0xd4914={}){const _0x28bc06={_0x196fc2:0x478,_0x3a7f72:0xf5,_0x151122:0x149,_0x2532f1:0xc3,_0x3eb1e1:0xef,_0x55cb0b:0x7a,_0x2e9eba:0x7e,_0x40608e:0x7b,_0x4746f1:0x4e4,_0x6dce84:0x4f4,_0x2d6b9b:0xa8,_0x2dd024:0xd3,_0x54bf11:0x76,_0x44efbd:0xb5,_0x1c58d8:0x83,_0x435c18:0xcb,_0x232b61:0x4ec,_0x3a2726:0x553,_0x28119f:0x549,_0x32c037:0x485,_0x17af84:0x490,_0x2d0dde:0x79,_0x389e6e:0xca},_0x195e20={_0x491a51:0x134,_0x35ef6f:0x142},_0x4c822c={_0x28568e:0x85,_0x379d51:0x37};if(!_0x67d35)throw new Error('Agent.send\x20requires\x20a\x20message\x20when\x20no\x20default\x20message\x20is\x20configured');function _0x22e42e(_0x5611aa,_0x387393,_0x4ac31b,_0x3c39c0){return _0x2b8011(_0x5611aa-0x4a,_0x387393,_0x4ac31b-_0x4c822c._0x28568e,_0x5611aa- -_0x4c822c._0x379d51);}this[_0x4268b0(0x4b8,_0x28bc06._0x196fc2,0x4e1,0x47a)]+=0x1;function _0x4268b0(_0x491069,_0x481499,_0x4d9556,_0x567c18){return _0x106530(_0x567c18,_0x481499-_0x195e20._0x491a51,_0x4d9556-_0x195e20._0x35ef6f,_0x491069-0x2e0);}try{const _0x527711=await runTurn({'sessionId':this[_0x22e42e(_0x28bc06._0x3a7f72,_0x28bc06._0x151122,_0x28bc06._0x2532f1,_0x28bc06._0x3eb1e1)],'turnId':createTurnId(this[_0x22e42e(0x91,_0x28bc06._0x55cb0b,_0x28bc06._0x2e9eba,_0x28bc06._0x40608e)]),'streaming':_0xd4914['streaming'],'signal':_0xd4914[_0x4268b0(_0x28bc06._0x4746f1,0x505,0x4b9,_0x28bc06._0x6dce84)],'system':this[_0x22e42e(0xdc,0xd1,0x125,0xbc)],'messages':this[_0x22e42e(_0x28bc06._0x2d6b9b,0xf0,0x55,_0x28bc06._0x2dd024)],'message':normalizeUserInput(_0x67d35)},this[_0x22e42e(_0x28bc06._0x54bf11,0x29,0x54,_0x28bc06._0x44efbd)]);return this['messages']=_0x527711['state']['messages'][_0x22e42e(0xc2,0x9e,_0x28bc06._0x1c58d8,_0x28bc06._0x435c18)](normalizeMessage),_0x527711;}catch(_0x26e92e){if(_0x26e92e instanceof TurnFailedError){this[_0x4268b0(0x4cf,0x4d1,_0x28bc06._0x232b61,0x496)]=synthesizeMissingToolResults(_0x26e92e[_0x4268b0(0x50b,0x4f4,_0x28bc06._0x3a2726,_0x28bc06._0x28119f)][_0x4268b0(0x4cf,_0x28bc06._0x32c037,_0x28bc06._0x17af84,0x4b5)][_0x22e42e(0xc2,_0x28bc06._0x2d0dde,0xc2,_0x28bc06._0x389e6e)](normalizeMessage));throw _0x26e92e['cause'];}throw _0x26e92e;}}};export{normalizeToolOutputValue,createToolOutput,ToolExecutionError,defineTool,ToolRegistry,validateToolInput,deriveFinalToolOutput,createInternalToolRuntime,createExtensionRegistry,createAgentMetrics,runTurn,Agent};
@@ -1 +0,0 @@
1
- (function(_0x5500d6,_0xc2910a){const _0x20407e={_0x866ef5:0x250,_0x476bef:0x27d,_0x4a48f4:0x28a,_0x17bfff:0x262,_0x5787a1:0x253,_0x2d0b9d:0x24b,_0x26f271:0x1d,_0x525daf:0x3e,_0x467d8b:0x270,_0x1806ec:0x28d,_0x11cd4c:0x26f,_0x23d47e:0x25b,_0x492ee4:0x1d,_0x2cba7b:0x10,_0x4f8c9d:0x1,_0x2f135d:0x26b,_0x3f4a5e:0x239,_0x582480:0x12,_0xf9afac:0x2};function _0x157301(_0x110099,_0x5ac0cb,_0x20ebe1,_0x2322f2){return _0x26e7(_0x110099-0x1cc,_0x2322f2);}const _0x3b79d7=_0x5500d6();function _0x5e6f8a(_0x315294,_0x146abc,_0x31ca75,_0x1b1374){return _0x26e7(_0x315294- -0x78,_0x31ca75);}while(!![]){try{const _0x5632ba=parseInt(_0x157301(_0x20407e._0x866ef5,0x268,0x252,0x234))/0x1+parseInt(_0x157301(_0x20407e._0x476bef,_0x20407e._0x4a48f4,_0x20407e._0x17bfff,0x296))/0x2+parseInt(_0x157301(_0x20407e._0x5787a1,_0x20407e._0x2d0b9d,0x264,0x259))/0x3*(-parseInt(_0x5e6f8a(0x2c,_0x20407e._0x26f271,_0x20407e._0x525daf,0x46))/0x4)+parseInt(_0x157301(0x26e,0x25b,_0x20407e._0x467d8b,_0x20407e._0x1806ec))/0x5*(parseInt(_0x157301(_0x20407e._0x11cd4c,0x27f,0x258,_0x20407e._0x23d47e))/0x6)+-parseInt(_0x5e6f8a(_0x20407e._0x492ee4,_0x20407e._0x2cba7b,0x15,-_0x20407e._0x4f8c9d))/0x7+parseInt(_0x5e6f8a(0x25,0x40,0x26,0x14))/0x8+-parseInt(_0x157301(0x252,_0x20407e._0x2f135d,0x24e,_0x20407e._0x3f4a5e))/0x9*(-parseInt(_0x5e6f8a(_0x20407e._0x582480,0x18,0xb,-_0x20407e._0xf9afac))/0xa);if(_0x5632ba===_0xc2910a)break;else _0x3b79d7['push'](_0x3b79d7['shift']());}catch(_0x2a7366){_0x3b79d7['push'](_0x3b79d7['shift']());}}}(_0x1eab,0xa2b0f));import{resolveOpenAiReasoningConfig}from'./chunk-NYZR4XKO.js';import{normalizeContent}from'./chunk-QDOE7NWO.js';function systemToInstructions(_0x1f9857){const _0x3a5bfc={_0x176864:0x15,_0x579239:0x2,_0x5a5b92:0x16,_0x269d0f:0x30,_0x4bc9fc:0x140,_0x464101:0x125,_0x143a90:0x12c,_0x2c230d:0x143},_0x47f1ff={_0x58dda8:0x86};function _0x5588cd(_0x5ad251,_0x439c0b,_0x278e5e,_0x51e04a){return _0x26e7(_0x439c0b-_0x47f1ff._0x58dda8,_0x5ad251);}function _0x2b5415(_0x9efe5b,_0x51adea,_0x101c18,_0x70f343){return _0x26e7(_0x9efe5b- -0xa7,_0x70f343);}return normalizeContent(_0x1f9857)[_0x2b5415(-_0x3a5bfc._0x176864,-_0x3a5bfc._0x579239,-_0x3a5bfc._0x5a5b92,-_0x3a5bfc._0x269d0f)](_0x5b8d97=>_0x5b8d97[_0x5588cd(0x10b,0x11f,0x10e,0x12c)]===_0x5588cd(0xed,0xff,0x10a,0x110))['map'](_0x3b42fb=>_0x3b42fb[_0x5588cd(0x10b,0xff,0x109,0x106)])[_0x5588cd(_0x3a5bfc._0x4bc9fc,_0x3a5bfc._0x464101,_0x3a5bfc._0x143a90,_0x3a5bfc._0x2c230d)]('\x0a\x0a');}function pushUserContentMessage(_0x24c11a,_0x562f9e,_0x430a29){const _0x194bca={_0x3b9990:0x3ce};function _0x4ff073(_0x44a29a,_0x23995a,_0x1cb4b8,_0x5a9178){return _0x26e7(_0x5a9178-0x31e,_0x1cb4b8);}if(_0x430a29['length']===0x0)return;_0x24c11a[_0x4ff073(0x3b2,_0x194bca._0x3b9990,0x3be,0x3b8)]({'type':'message','role':_0x562f9e,'content':_0x430a29});}function hasSerializableToolUse(_0x1bc48e){const _0x52143f={_0x44a764:0x28d,_0x40d933:0x298,_0x1496a0:0x293,_0x10b46b:0x334,_0x5e6849:0x316,_0x181893:0x2f6,_0x1b505b:0x310,_0x26f7a9:0x30a},_0x18e54e={_0x20574a:0x201};function _0x172c21(_0x23b529,_0x2be64b,_0x27b238,_0x5b58a6){return _0x26e7(_0x2be64b-0x26a,_0x23b529);}function _0x1d1a44(_0x596a67,_0x4c4f06,_0x33efb9,_0x3c040b){return _0x26e7(_0x596a67-_0x18e54e._0x20574a,_0x3c040b);}return _0x1bc48e['id'][_0x1d1a44(_0x52143f._0x44a764,_0x52143f._0x40d933,_0x52143f._0x1496a0,0x298)]()['length']>0x0&&_0x1bc48e[_0x172c21(_0x52143f._0x10b46b,_0x52143f._0x5e6849,0x314,0x30a)][_0x172c21(0x2d7,_0x52143f._0x181893,_0x52143f._0x1b505b,_0x52143f._0x26f7a9)]()['length']>0x0;}function _0x26e7(_0x581069,_0x3433ff){_0x581069=_0x581069-0x78;const _0x1eabdf=_0x1eab();let _0x26e722=_0x1eabdf[_0x581069];if(_0x26e7['RxTiqp']===undefined){var _0x4044b1=function(_0x3c0b76){const _0x56cafa='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1f9857='',_0x5b8d97='';for(let _0x3b42fb=0x0,_0x24c11a,_0x562f9e,_0x430a29=0x0;_0x562f9e=_0x3c0b76['charAt'](_0x430a29++);~_0x562f9e&&(_0x24c11a=_0x3b42fb%0x4?_0x24c11a*0x40+_0x562f9e:_0x562f9e,_0x3b42fb++%0x4)?_0x1f9857+=String['fromCharCode'](0xff&_0x24c11a>>(-0x2*_0x3b42fb&0x6)):0x0){_0x562f9e=_0x56cafa['indexOf'](_0x562f9e);}for(let _0x1bc48e=0x0,_0x2e88e8=_0x1f9857['length'];_0x1bc48e<_0x2e88e8;_0x1bc48e++){_0x5b8d97+='%'+('00'+_0x1f9857['charCodeAt'](_0x1bc48e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5b8d97);};_0x26e7['JDQPTS']=_0x4044b1,_0x26e7['RIGDUU']={},_0x26e7['RxTiqp']=!![];}const _0x295c9b=_0x1eabdf[0x0],_0x5b673c=_0x581069+_0x295c9b,_0x43fbe6=_0x26e7['RIGDUU'][_0x5b673c];return!_0x43fbe6?(_0x26e722=_0x26e7['JDQPTS'](_0x26e722),_0x26e7['RIGDUU'][_0x5b673c]=_0x26e722):_0x26e722=_0x43fbe6,_0x26e722;}function hasSerializableToolResult(_0x2e88e8){const _0x4f543c={_0x26979f:0x3b7,_0x592687:0x3c3,_0x9cd587:0x3a2,_0x1775a0:0x3c1};function _0x526931(_0x522909,_0x5db301,_0x4f3472,_0x3ba0ad){return _0x26e7(_0x5db301-0x31f,_0x4f3472);}function _0x5d7773(_0x47b536,_0x1ec0e2,_0x24e9a4,_0x2f16a2){return _0x26e7(_0x24e9a4- -0xb2,_0x47b536);}return _0x2e88e8[_0x526931(0x3be,_0x4f543c._0x26979f,0x3cb,_0x4f543c._0x592687)]['trim']()[_0x526931(0x3aa,_0x4f543c._0x9cd587,0x394,_0x4f543c._0x1775a0)]>0x0;}function isResponseInputObject(_0x25dfad){const _0x5dcec4={_0xf8e3b:0x2fb,_0x45c1e9:0x321,_0x3dc355:0x2ff,_0xf4d6d0:0x31b,_0x5d5c7f:0x321,_0xc0b119:0x324,_0xd50d1b:0x309,_0x4645d8:0x2cd,_0x5ecfe5:0x2f5,_0x5b7686:0x2d1,_0x4fe629:0x315},_0x28fc6f={_0xdb172f:0x283};if(typeof _0x25dfad!==_0x5051ab(_0x5dcec4._0xf8e3b,0x312,_0x5dcec4._0x45c1e9,_0x5dcec4._0x3dc355)||_0x25dfad===null||Array[_0x5051ab(_0x5dcec4._0xf4d6d0,_0x5dcec4._0x5d5c7f,_0x5dcec4._0xc0b119,_0x5dcec4._0xd50d1b)](_0x25dfad))return![];const _0x14157f=_0x25dfad;function _0x2fcc53(_0x5e8f51,_0x197df8,_0x4fdcd1,_0x5d76ad){return _0x26e7(_0x4fdcd1- -0x378,_0x5e8f51);}function _0x5051ab(_0x4e1d4c,_0x14ad40,_0x36ba33,_0x16364c){return _0x26e7(_0x14ad40-_0x28fc6f._0xdb172f,_0x16364c);}return typeof _0x14157f[_0x2fcc53(-_0x5dcec4._0x4645d8,-_0x5dcec4._0x5ecfe5,-0x2df,-_0x5dcec4._0x5b7686)]===_0x5051ab(0x30a,0x314,0x331,_0x5dcec4._0x4fe629);}function isImageToolResultBlock(_0x4b885c){const _0x20b450={_0xfd943d:0x6e,_0x2fee82:0x76,_0x335b16:0x8b,_0x5da65e:0x89,_0x5ab84f:0x67,_0x5f9c18:0x5b,_0x2bf36a:0x58,_0x46d2a6:0x5a,_0x1c2ed6:0x83,_0x3e93fb:0x6d,_0x298b07:0x84,_0x49a517:0x6f,_0x222860:0x5b,_0x7df089:0x69,_0x1077f4:0x86,_0x5bb6a6:0x8c,_0x59e12e:0x7c,_0x4d8680:0x310,_0x3b29be:0x2ff,_0x40b946:0x32e,_0x548371:0x312,_0x6cfaf4:0x331},_0x5c8e34={_0x3b001a:0x27a};function _0x532ab6(_0x2bb9b0,_0x1f0743,_0x28b7bf,_0x3ec43d){return _0x26e7(_0x28b7bf-_0x5c8e34._0x3b001a,_0x3ec43d);}if(typeof _0x4b885c!==_0x1aaa20(-_0x20b450._0xfd943d,-_0x20b450._0x2fee82,-_0x20b450._0x335b16,-_0x20b450._0x5da65e)||_0x4b885c===null||Array[_0x1aaa20(-0x4c,-0x67,-0x6c,-0x51)](_0x4b885c))return![];const _0x2bc9ab=_0x4b885c;function _0x1aaa20(_0x3838,_0x1ef8db,_0x37c7c0,_0x8e7909){return _0x26e7(_0x1ef8db- -0x105,_0x3838);}return _0x2bc9ab[_0x1aaa20(-_0x20b450._0x5ab84f,-0x6c,-0x4f,-_0x20b450._0x5f9c18)]===_0x1aaa20(-0x62,-_0x20b450._0x2bf36a,-0x68,-_0x20b450._0x46d2a6)&&_0x2bc9ab[_0x1aaa20(-_0x20b450._0x1c2ed6,-0x6f,-_0x20b450._0x3e93fb,-0x8b)]?.['type']==='base64'&&typeof _0x2bc9ab[_0x1aaa20(-_0x20b450._0x298b07,-_0x20b450._0x49a517,-_0x20b450._0x222860,-_0x20b450._0x7df089)][_0x1aaa20(-_0x20b450._0x1077f4,-0x75,-_0x20b450._0x5bb6a6,-0x88)]===_0x1aaa20(-_0x20b450._0x59e12e,-0x74,-0x6e,-_0x20b450._0x49a517)&&typeof _0x2bc9ab[_0x532ab6(0x308,0x325,_0x20b450._0x4d8680,_0x20b450._0x3b29be)][_0x532ab6(_0x20b450._0x40b946,_0x20b450._0x548371,0x31b,_0x20b450._0x6cfaf4)]==='string';}function getToolResultText(_0x1f4b9e){const _0x4e98c6={_0x37290f:0x272,_0xcf1e92:0x256,_0x3233c2:0x26d,_0x41d7a7:0x25f,_0x2ca6b9:0x271,_0x55a59e:0x249,_0x2d1f9f:0x249,_0x458f76:0x266,_0x3ceb16:0x281},_0x363478={_0x40951b:0xd1,_0xdf5399:0xd2,_0x585869:0xc1},_0x3ee8b6={_0x4ed035:0x13a},_0x59e0e3={_0x2d00fb:0x13c};if(typeof _0x1f4b9e==='string')return _0x1f4b9e;function _0x1b7beb(_0x10a2c1,_0x1fc856,_0x1eb56e,_0x3bdaba){return _0x26e7(_0x1eb56e-0x1d3,_0x10a2c1);}function _0x1be104(_0x5411da,_0x409dd3,_0x490895,_0x565815){return _0x26e7(_0x490895-_0x59e0e3._0x2d00fb,_0x565815);}const _0x2c1f3d=_0x1f4b9e['filter'](_0x387295=>{function _0x3396a6(_0x412f7b,_0x289dbb,_0x14cd67,_0x55368d){return _0x26e7(_0x55368d- -_0x3ee8b6._0x4ed035,_0x289dbb);}return typeof _0x387295==='object'&&_0x387295!==null&&_0x387295['type']===_0x3396a6(-_0x363478._0x40951b,-_0x363478._0xdf5399,-0xcd,-_0x363478._0x585869);})['map'](_0x112f9a=>_0x112f9a[_0x1b7beb(0x259,0x241,0x24c,0x234)])[_0x1b7beb(0x253,0x291,_0x4e98c6._0x37290f,_0x4e98c6._0xcf1e92)]('\x0a\x0a')[_0x1b7beb(0x274,_0x4e98c6._0x3233c2,_0x4e98c6._0x41d7a7,0x277)]();return _0x2c1f3d[_0x1b7beb(_0x4e98c6._0x2ca6b9,_0x4e98c6._0x55a59e,0x256,_0x4e98c6._0x2d1f9f)]>0x0?_0x2c1f3d:_0x1b7beb(_0x4e98c6._0x458f76,0x267,_0x4e98c6._0x3ceb16,0x273);}function getToolResultImages(_0x2334a9){const _0x15bf71={_0x425398:0x1d4,_0x154bb7:0x318},_0x1083bb={_0x2be083:0x391};function _0x44ba30(_0x54a4b8,_0x451f17,_0x24a975,_0x20cb92){return _0x26e7(_0x54a4b8-0x13b,_0x20cb92);}function _0x33eddd(_0x6b3951,_0x3c6f81,_0x1af9de,_0x5bf0f1){return _0x26e7(_0x5bf0f1- -_0x1083bb._0x2be083,_0x3c6f81);}return Array[_0x44ba30(0x1d9,0x1bc,_0x15bf71._0x425398,0x1f8)](_0x2334a9)?_0x2334a9[_0x33eddd(-0x308,-0x2ea,-_0x15bf71._0x154bb7,-0x2ff)](isImageToolResultBlock):[];}function resolveReasoningVisibility(_0x503c5a){const _0x2303ce={_0x4a23b6:0xe7,_0x58c476:0xcd,_0x8a370a:0x104,_0x2c772f:0xd4,_0x769577:0xff},_0x414c91={_0x157142:0x38},_0x52c71a={_0x320c64:0x1e0};function _0x3107fa(_0x3862b4,_0x1e8bfa,_0x3fe621,_0x4b505a){return _0x26e7(_0x1e8bfa- -_0x52c71a._0x320c64,_0x3fe621);}function _0x30f99a(_0x46c048,_0x2bc6b2,_0x57d725,_0x1b06ba){return _0x26e7(_0x2bc6b2-_0x414c91._0x157142,_0x46c048);}return _0x503c5a[_0x30f99a(0xe1,0xcc,0xd6,_0x2303ce._0x4a23b6)]?.[_0x30f99a(0xd8,0xe8,_0x2303ce._0x58c476,_0x2303ce._0x8a370a)]??_0x30f99a(0xf1,0xe2,_0x2303ce._0x2c772f,_0x2303ce._0x769577);}function createOpenAiResponsesReasoning(_0x5b8a30){const _0x169609={_0x39d06d:0x10b,_0x29ca17:0x11b,_0x235e24:0x122,_0x2d2e76:0x98,_0x43e0d9:0xe7,_0x1e20a2:0xbd,_0x4fac5f:0xb2,_0x215a07:0xab,_0x2c829f:0xb7,_0x2dd0be:0x101,_0x375140:0x101,_0x47b9bf:0x108,_0x2725d0:0x10f,_0x30b80b:0x129,_0x51843f:0x13d,_0x21b5bf:0x9d,_0x1ac933:0x72,_0x5c47d4:0x6d,_0x1c7f19:0x75,_0x302bc9:0x8e,_0x2fdf4e:0x8e,_0x2e55ea:0x81};function _0x12a227(_0x37f4eb,_0x31546a,_0x5ac469,_0x1f5f23){return _0x26e7(_0x5ac469-0xb,_0x31546a);}const _0x50364d=resolveOpenAiReasoningConfig(_0x5b8a30[_0x5a9153(-_0x169609._0x39d06d,-0xf7,-0x10d,-_0x169609._0x29ca17)]);if(!_0x50364d)return{};const _0x326fd2={},_0x364556=_0x50364d[_0x5a9153(-_0x169609._0x235e24,-0x11c,-0x129,-0x10c)]??(resolveReasoningVisibility(_0x5b8a30)===_0x12a227(0xbf,_0x169609._0x2d2e76,0xb5,0x9d)?'auto':void 0x0);function _0x5a9153(_0x3cdc98,_0x415b5b,_0x26872b,_0x3275f9){return _0x26e7(_0x26872b- -0x1a1,_0x415b5b);}return _0x50364d[_0x5a9153(-_0x169609._0x43e0d9,-0x109,-0x101,-0x116)]&&(_0x326fd2[_0x12a227(_0x169609._0x1e20a2,_0x169609._0x4fac5f,_0x169609._0x215a07,_0x169609._0x2c829f)]=_0x50364d[_0x5a9153(-0x104,-_0x169609._0x2dd0be,-_0x169609._0x375140,-_0x169609._0x47b9bf)]),_0x364556&&(_0x326fd2[_0x5a9153(-0x110,-_0x169609._0x2725d0,-_0x169609._0x30b80b,-_0x169609._0x51843f)]=_0x364556),{..._0x50364d[_0x12a227(0x8a,0xae,0xa7,_0x169609._0x21b5bf)]===![]?{}:{'include':['reasoning.encrypted_content']},...Object[_0x12a227(_0x169609._0x1ac933,0x8a,0x86,_0x169609._0x5c47d4)](_0x326fd2)[_0x12a227(_0x169609._0x1c7f19,_0x169609._0x302bc9,_0x169609._0x2fdf4e,_0x169609._0x2e55ea)]>0x0?{'reasoning':_0x326fd2}:{}};}function pushAssistantProviderState(_0x524b8f,_0x5946d1){const _0x5e6fe0={_0x2c9cf7:0x137,_0x159f44:0x12d,_0x3853ec:0x14b,_0x27b0e1:0x122,_0x218fe7:0x151,_0x3862d2:0x158,_0x201719:0x14b,_0x271457:0x13d,_0x3eed8e:0x122,_0x5af7b4:0x12d,_0x6803fc:0x142,_0x2bb7a4:0x162,_0x3eb0a2:0x15e,_0x189c94:0x135},_0x52c6e2={_0x5c0d5e:0x334};if(_0x5946d1[_0x22d378(_0x5e6fe0._0x2c9cf7,_0x5e6fe0._0x159f44,_0x5e6fe0._0x3853ec,_0x5e6fe0._0x27b0e1)]!=='assistant')return![];function _0x174d88(_0x2ce9fa,_0xa0f2cc,_0x52cbab,_0x81ab5e){return _0x26e7(_0x81ab5e- -_0x52c6e2._0x5c0d5e,_0x52cbab);}const _0x55ef14=_0x5946d1[_0x22d378(_0x5e6fe0._0x218fe7,_0x5e6fe0._0x3862d2,0x13a,_0x5e6fe0._0x201719)]?.[_0x22d378(_0x5e6fe0._0x271457,_0x5e6fe0._0x3eed8e,0x13e,0x148)]??[];if(_0x55ef14[_0x22d378(_0x5e6fe0._0x5af7b4,_0x5e6fe0._0x6803fc,0x11f,0x129)]===0x0)return![];function _0x22d378(_0x24b235,_0xa5e5e8,_0x1ced16,_0x8bdf43){return _0x26e7(_0x24b235-0xaa,_0x8bdf43);}for(const _0x45db83 of _0x55ef14){isResponseInputObject(_0x45db83)&&_0x524b8f[_0x22d378(0x144,_0x5e6fe0._0x2bb7a4,_0x5e6fe0._0x3eb0a2,_0x5e6fe0._0x189c94)](structuredClone(_0x45db83));}return!![];}function toOpenAiResponsesRequest(_0x1c638a){const _0x4a5ed6={_0x317b19:0x385,_0x3d4e12:0x380,_0x315d6b:0x321,_0x5a202f:0x322,_0x5132a9:0x350,_0x234813:0x355,_0x274326:0x354,_0x2b837b:0x374,_0x39dc09:0x388,_0x531748:0x36d,_0x14da09:0x375,_0x2be532:0x35b,_0x29f224:0x326,_0x2d1ea7:0x34e,_0x235b9b:0x37d,_0x166546:0x392,_0x146342:0x38a,_0x5a5548:0x325,_0x5590a0:0x334,_0x121b95:0x34d,_0x22c48b:0x36f,_0x353231:0x341,_0x5698b5:0x367,_0x31507c:0x372,_0x355858:0x35c,_0x1fae74:0x39b,_0x3621de:0x388,_0x59d270:0x38e,_0x407ca7:0x38e,_0x502c08:0x35a,_0x36b6cc:0x380,_0x58de89:0x39b,_0x3786a6:0x37c,_0x448628:0x376,_0x392e86:0x363,_0x190f25:0x333,_0x162262:0x3ac,_0x1a1f4f:0x329,_0x33bcc2:0x33d,_0x4a2bd2:0x36b,_0x11d50b:0x380,_0x2f7493:0x38d,_0x169b4d:0x38b,_0x38f9f1:0x39c,_0x1ea4fe:0x35c,_0x19299e:0x343,_0x11f477:0x382,_0x54517d:0x362,_0x221f1d:0x362,_0x466d96:0x377,_0x40023d:0x39f,_0x40e78e:0x36d,_0x51a2c6:0x34a,_0x4e69dc:0x346,_0xfecb02:0x348,_0xc05a34:0x362,_0x45f3fa:0x36c,_0x2a0674:0x377,_0x46665f:0x36e,_0x2bc75d:0x37a,_0x1472c4:0x34f,_0x18e738:0x368,_0x570818:0x349,_0x4fbb38:0x352,_0xe94280:0x36a,_0x1302e4:0x37a,_0x185524:0x37f,_0xfdb6f1:0x361,_0x59dcaa:0x370,_0x2ce1c5:0x387,_0x431608:0x382,_0x567ae0:0x389,_0x1d3982:0x393,_0x188d25:0x390,_0x31d2ac:0x383,_0x239947:0x38e},_0x1de6e1={_0x58388f:0x335,_0x4b4193:0x34d,_0x46d49c:0xf1,_0x52f440:0x107};function _0x44fb29(_0x26e47e,_0x482833,_0x4d4340,_0x4b210d){return _0x26e7(_0x26e47e-0x2e7,_0x482833);}const _0x5797dc=[];for(const _0x5c8392 of _0x1c638a[_0x44fb29(0x399,_0x4a5ed6._0x317b19,0x3b7,_0x4a5ed6._0x3d4e12)]){if(pushAssistantProviderState(_0x5797dc,_0x5c8392))continue;const _0x401f03=[];for(const _0x37bd83 of normalizeContent(_0x5c8392[_0x1327d2(0x33c,_0x4a5ed6._0x315d6b,_0x4a5ed6._0x5a202f,_0x4a5ed6._0x5132a9)])){if(_0x37bd83[_0x1327d2(0x35b,0x36c,_0x4a5ed6._0x234813,_0x4a5ed6._0x274326)]==='text'){_0x401f03[_0x44fb29(0x381,0x375,0x39a,0x37d)](_0x5c8392[_0x44fb29(_0x4a5ed6._0x2b837b,_0x4a5ed6._0x39dc09,_0x4a5ed6._0x531748,0x361)]===_0x1327d2(_0x4a5ed6._0x14da09,0x36a,0x369,_0x4a5ed6._0x2be532)?{'type':_0x1327d2(0x344,_0x4a5ed6._0x29f224,0x359,0x32f),'text':_0x37bd83[_0x44fb29(0x360,_0x4a5ed6._0x2d1ea7,0x37e,_0x4a5ed6._0x235b9b)]}:{'type':_0x44fb29(_0x4a5ed6._0x166546,0x374,_0x4a5ed6._0x146342,0x39c),'text':_0x37bd83[_0x1327d2(0x33b,_0x4a5ed6._0x5a5548,0x345,_0x4a5ed6._0x5590a0)]});continue;}if(_0x37bd83[_0x1327d2(0x35b,_0x4a5ed6._0x121b95,0x378,0x379)]===_0x1327d2(_0x4a5ed6._0x22c48b,0x37a,0x38b,0x38e)){_0x401f03[_0x44fb29(0x381,0x379,_0x4a5ed6._0x531748,0x36c)]({'type':_0x1327d2(_0x4a5ed6._0x353231,0x343,0x34e,0x322),'image_url':_0x44fb29(_0x4a5ed6._0x5698b5,_0x4a5ed6._0x31507c,0x35f,_0x4a5ed6._0x355858)+_0x37bd83[_0x44fb29(0x37d,0x38e,_0x4a5ed6._0x1fae74,_0x4a5ed6._0x146342)]['media_type']+_0x44fb29(0x370,_0x4a5ed6._0x5698b5,0x369,0x362)+_0x37bd83[_0x44fb29(0x37d,0x36d,0x387,0x36f)][_0x44fb29(_0x4a5ed6._0x3621de,_0x4a5ed6._0x59d270,_0x4a5ed6._0x407ca7,0x386)]});continue;}pushUserContentMessage(_0x5797dc,_0x5c8392[_0x44fb29(_0x4a5ed6._0x2b837b,_0x4a5ed6._0x502c08,0x38d,0x382)],_0x401f03['splice'](0x0));if(_0x37bd83[_0x44fb29(_0x4a5ed6._0x36b6cc,0x385,_0x4a5ed6._0x58de89,0x37f)]===_0x1327d2(0x33f,0x32e,0x356,_0x4a5ed6._0x5132a9)){if(!hasSerializableToolUse(_0x37bd83))continue;_0x5797dc[_0x44fb29(0x381,_0x4a5ed6._0x3786a6,_0x4a5ed6._0x448628,_0x4a5ed6._0x392e86)]({'type':_0x1327d2(0x340,_0x4a5ed6._0x190f25,_0x4a5ed6._0x353231,0x341),'call_id':_0x37bd83['id'],'name':_0x37bd83[_0x44fb29(0x393,_0x4a5ed6._0x162262,0x3ad,0x39a)],'arguments':JSON[_0x1327d2(0x343,_0x4a5ed6._0x1a1f4f,0x362,_0x4a5ed6._0x33bcc2)](_0x37bd83[_0x44fb29(_0x4a5ed6._0x14da09,_0x4a5ed6._0x4a2bd2,0x357,0x392)]??{})});continue;}if(_0x37bd83[_0x44fb29(_0x4a5ed6._0x11d50b,_0x4a5ed6._0x2f7493,_0x4a5ed6._0x169b4d,_0x4a5ed6._0x38f9f1)]==='tool_result'){if(!hasSerializableToolResult(_0x37bd83))continue;const _0x5c5e01=getToolResultText(_0x37bd83['content']);_0x5797dc[_0x1327d2(_0x4a5ed6._0x1ea4fe,_0x4a5ed6._0x19299e,0x351,0x34d)]({'type':_0x1327d2(0x368,_0x4a5ed6._0x11f477,0x36a,_0x4a5ed6._0x54517d),'call_id':_0x37bd83[_0x44fb29(0x37f,_0x4a5ed6._0x221f1d,_0x4a5ed6._0x466d96,_0x4a5ed6._0x22c48b)],'output':_0x5c5e01});const _0x1db42e=getToolResultImages(_0x37bd83['content']);_0x1db42e['length']>0x0&&_0x5797dc[_0x44fb29(0x381,_0x4a5ed6._0x40023d,_0x4a5ed6._0x40e78e,0x384)]({'type':_0x1327d2(_0x4a5ed6._0x51a2c6,_0x4a5ed6._0x4e69dc,_0x4a5ed6._0xfecb02,_0x4a5ed6._0xc05a34),'role':'user','content':[{'type':_0x44fb29(_0x4a5ed6._0x166546,0x397,0x384,0x39b),'text':'Image\x20returned\x20by\x20ViewFile\x20for\x20tool\x20result\x20'+_0x37bd83['tool_use_id']+'.'},..._0x1db42e[_0x44fb29(_0x4a5ed6._0x45f3fa,_0x4a5ed6._0x2a0674,_0x4a5ed6._0x46665f,_0x4a5ed6._0x2bc75d)](_0x5534ff=>({'type':_0x1327d2(0x341,0x341,0x32f,0x356),'image_url':_0x44fb29(0x367,0x366,0x360,0x34b)+_0x5534ff[_0x1327d2(0x358,0x343,0x34d,0x365)]['media_type']+_0x44fb29(0x370,0x382,0x354,0x35a)+_0x5534ff[_0x1327d2(0x358,0x33d,0x351,0x376)][_0x1327d2(0x363,0x349,0x348,0x37d)]}))]});}}pushUserContentMessage(_0x5797dc,_0x5c8392[_0x1327d2(_0x4a5ed6._0x1472c4,0x368,_0x4a5ed6._0x18e738,0x35a)],_0x401f03);}function _0x1327d2(_0x1353db,_0x3226b7,_0x375c9e,_0x34a7aa){return _0x26e7(_0x1353db-0x2c2,_0x3226b7);}return{...createOpenAiResponsesReasoning(_0x1c638a),'model':_0x1c638a[_0x1327d2(_0x4a5ed6._0x121b95,_0x4a5ed6._0x570818,0x34c,_0x4a5ed6._0x4fbb38)],'instructions':systemToInstructions(_0x1c638a[_0x1327d2(_0x4a5ed6._0xe94280,0x37d,_0x4a5ed6._0x1302e4,_0x4a5ed6._0x234813)]),'input':_0x5797dc,'max_output_tokens':_0x1c638a[_0x1327d2(0x359,0x347,0x33c,0x375)],'tools':_0x1c638a[_0x44fb29(0x363,_0x4a5ed6._0x185524,0x358,_0x4a5ed6._0x51a2c6)][_0x44fb29(_0x4a5ed6._0x45f3fa,_0x4a5ed6._0xfdb6f1,_0x4a5ed6._0x59dcaa,_0x4a5ed6._0x2ce1c5)](_0x1578b4=>{const _0x3b0302={_0x50b15:0x260,_0x376f5c:0x6e};function _0xabb084(_0xb3c8ed,_0x1e8f74,_0x35d249,_0x5c68eb){return _0x1327d2(_0x5c68eb- -0x24,_0x1e8f74,_0x35d249-0x1e8,_0x5c68eb-0x182);}function _0x476c95(_0x34dbea,_0x353e18,_0x282fe9,_0x17d09c){return _0x1327d2(_0x17d09c- -_0x3b0302._0x50b15,_0x34dbea,_0x282fe9-0x1d3,_0x17d09c-_0x3b0302._0x376f5c);}return{'type':'function','name':_0x1578b4['name'],'description':_0x1578b4[_0xabb084(0x347,_0x1de6e1._0x58388f,0x348,_0x1de6e1._0x4b4193)],'parameters':_0x1578b4[_0x476c95(_0x1de6e1._0x46d49c,0x119,0x102,_0x1de6e1._0x52f440)]};}),..._0x1c638a[_0x44fb29(_0x4a5ed6._0x431608,0x381,_0x4a5ed6._0x567ae0,_0x4a5ed6._0x40e78e)]?{'text':{'format':{'type':'json_schema','name':_0x1c638a['outputFormat'][_0x44fb29(_0x4a5ed6._0x1d3982,0x38b,0x37c,_0x4a5ed6._0x567ae0)]??_0x44fb29(0x39b,0x3b5,0x394,0x387),'schema':_0x1c638a['outputFormat'][_0x44fb29(_0x4a5ed6._0x188d25,0x38e,_0x4a5ed6._0x31d2ac,_0x4a5ed6._0x239947)],'strict':_0x1c638a['outputFormat']['strict']??!![]}}}:{}};}export{toOpenAiResponsesRequest};function _0x1eab(){const _0x41ce89=['zwzMB3j0','zgf0yq','mteXmJeWAgXoqM9R','mtu2ywjVEgTk','mZuZodbRwwjxDeW','Aw5WDxrFC2nOzw1H','zNvUy3rPB25Fy2fSBf9VDxrWDxq','ChjVDMLKzxjtDgf0zq','C3LZDgvT','C2nOzw1H','DxnLCI12AxnPyMXL','Aw5WDxrFDgv4Da','BMfTzq','Aw1Hz2u','vg9VBcbYzxr1CM5LzcbPBwfNzsbJB250zw50lG','zgvZy3jPChrPB24','DMLZAwjPBgL0Eq','mtaXmZu4mNbdB0HmsW','BwvZC2fNzxm','yxnZAxn0yw50','C3rYDwn0DxjLzf9VDxrWDxq','C3vTBwfYEq','Dgv4Da','y29UDgvUDa','A2v5CW','Dg9VBhm','Dg9VBf91C2u','zNvUy3rPB25Fy2fSBa','Aw5WDxrFAw1Hz2u','zgf0ytO','C3rYAw5NAwz5','B3v0Chv0x3rLEhq','BgvUz3rO','odyYmde0z1res0HM','BwfW','nty1mJe0nhn4z2vLEa','ndqXDxP4wxjW','BwvZC2fNzq','o2jHC2u2ncW','mtbyrerqruG','Bw9KzwW','DhjPBq','CM9Szq','Aw5WDxq','B2jQzwn0','BwvKAwfFDhLWzq','C3rYAw5N','zMLSDgvY','B3bLBMfPuMvZCg9UC2vZt3v0Chv0','CMvHC29UAw5N','ode3mZK0mM1etNHbAa','C291CMnL','Bwf4vg9Rzw5Z','Dg9VBf91C2vFAwq','DhLWzq','ChvZAa','B3v0Chv0rM9YBwf0','Aw5JBhvKzuvUy3j5ChrLzenVBNrLBNq','ndq3mZuYog9Nq0LHrG','AxnbCNjHEq','AM9PBG'];_0x1eab=function(){return _0x41ce89;};return _0x1eab();}
@@ -1 +0,0 @@
1
- (function(_0x3eb3a4,_0x138b71){const _0x69fe33={_0x401f60:0x5d7,_0x53d7e1:0x5b8,_0x3e826f:0x5a9,_0x43dcd3:0x5c1,_0x5193e7:0x5ba,_0x5aa82a:0x5ab,_0x2a776a:0x5aa,_0x1831eb:0x593,_0x13c0f4:0x14e,_0x16faa9:0x145,_0x18786e:0x148,_0x54f446:0x5a4,_0x1a9268:0x5b0,_0x50c059:0x5be,_0x3ab79e:0x5bd,_0x3e73c0:0x5b0,_0x57f1ce:0x13d,_0x320864:0x13a,_0x53f78c:0x570,_0x479297:0x56f,_0x10aacf:0x57e,_0x7a1dc6:0x159},_0x25f9ed=_0x3eb3a4();function _0x52dfe0(_0x334819,_0xae7fed,_0xd9eac4,_0x14124d){return _0x509d(_0x334819- -0x339,_0xd9eac4);}function _0x5807f7(_0x468c8f,_0x1bab5a,_0x19c118,_0x408272){return _0x509d(_0x408272-0x3aa,_0x1bab5a);}while(!![]){try{const _0x44a626=-parseInt(_0x5807f7(_0x69fe33._0x401f60,0x5c2,0x5a7,_0x69fe33._0x53d7e1))/0x1*(-parseInt(_0x5807f7(0x5ad,0x598,0x5a1,0x5a9))/0x2)+-parseInt(_0x5807f7(0x5c4,0x5bb,_0x69fe33._0x3e826f,_0x69fe33._0x43dcd3))/0x3+parseInt(_0x5807f7(_0x69fe33._0x5193e7,0x5bb,_0x69fe33._0x5aa82a,0x5ae))/0x4+parseInt(_0x5807f7(_0x69fe33._0x2a776a,_0x69fe33._0x1831eb,0x586,0x59f))/0x5+-parseInt(_0x52dfe0(-0x146,-_0x69fe33._0x13c0f4,-_0x69fe33._0x16faa9,-_0x69fe33._0x18786e))/0x6*(parseInt(_0x5807f7(_0x69fe33._0x54f446,_0x69fe33._0x1a9268,0x5b0,0x5ad))/0x7)+parseInt(_0x5807f7(_0x69fe33._0x50c059,_0x69fe33._0x53d7e1,_0x69fe33._0x3ab79e,_0x69fe33._0x3e73c0))/0x8*(-parseInt(_0x52dfe0(-_0x69fe33._0x57f1ce,-_0x69fe33._0x320864,-0x12a,-0x150))/0x9)+parseInt(_0x5807f7(_0x69fe33._0x53f78c,_0x69fe33._0x479297,_0x69fe33._0x10aacf,0x586))/0xa*(parseInt(_0x52dfe0(-_0x69fe33._0x7a1dc6,-0x164,-0x13a,-0x14f))/0xb);if(_0x44a626===_0x138b71)break;else _0x25f9ed['push'](_0x25f9ed['shift']());}catch(_0x42e36c){_0x25f9ed['push'](_0x25f9ed['shift']());}}}(_0x3c10,0x443f1));function createTextBlock(_0x309a6e){const _0x4b227f={_0x3f56ad:0x1e6,_0x4ac3d0:0x1ef};function _0x2c0680(_0x52b35c,_0x301a70,_0x15f924,_0x2ae45e){return _0x509d(_0x52b35c- -0x32,_0x15f924);}return{'type':_0x2c0680(_0x4b227f._0x3f56ad,0x1ea,_0x4b227f._0x4ac3d0,0x1ea),'text':_0x309a6e};}function normalizeTextBlock(_0x38fc34){const _0x366266={_0x233706:0x3cb};function _0x4ca9fe(_0x5d2fca,_0x163117,_0x311dd8,_0x5c9c71){return _0x509d(_0x163117-0x199,_0x311dd8);}return createTextBlock(_0x38fc34[_0x4ca9fe(0x3bc,0x3b1,_0x366266._0x233706,0x3a7)]??'');}function normalizeContent(_0x47e7d7){const _0x3fd481={_0x52ed9b:0xd5,_0x3a52ff:0xc2,_0x3fc813:0xb0,_0x14769b:0x175,_0x113359:0x1aa,_0x3a81d5:0x19c},_0x5345b3={_0x3e7aed:0xaf,_0x343fb9:0x98,_0x3771e3:0xa9,_0x4f3d29:0x218},_0x602fe8={_0x45faf0:0x129},_0x47db9e={_0x3ef96a:0x37f};function _0x21b13c(_0xb83a5c,_0x471686,_0x53011c,_0x2fb419){return _0x509d(_0xb83a5c- -_0x47db9e._0x3ef96a,_0x2fb419);}function _0x2c33e3(_0x537d70,_0x20cbe3,_0x4096fa,_0x926762){return _0x509d(_0x4096fa- -0x139,_0x537d70);}if(typeof _0x47e7d7===_0x2c33e3(_0x3fd481._0x52ed9b,0xcd,_0x3fd481._0x3a52ff,_0x3fd481._0x3fc813))return[createTextBlock(_0x47e7d7)];if(!Array[_0x21b13c(-_0x3fd481._0x14769b,-0x15e,-0x171,-0x163)](_0x47e7d7))return[];return _0x47e7d7[_0x21b13c(-0x18f,-_0x3fd481._0x113359,-_0x3fd481._0x3a81d5,-0x177)](_0x298e9a=>{const _0x58b2f2={_0x4943ba:0x168,_0x1714bd:0xa2};function _0x1840ee(_0x182df4,_0x283b3a,_0x53a1e8,_0x356fa5){return _0x2c33e3(_0x53a1e8,_0x283b3a-0x1b4,_0x356fa5- -_0x58b2f2._0x4943ba,_0x356fa5-_0x58b2f2._0x1714bd);}function _0xb2103b(_0x5d7038,_0x382f83,_0x31dfa9,_0x3483ec){return _0x2c33e3(_0x382f83,_0x382f83-0x1a4,_0x5d7038-_0x602fe8._0x45faf0,_0x3483ec-0x1d7);}if(_0x298e9a[_0x1840ee(-_0x5345b3._0x3e7aed,-0xa1,-_0x5345b3._0x343fb9,-_0x5345b3._0x3771e3)]===_0xb2103b(0x208,0x1f8,_0x5345b3._0x4f3d29,0x20b))return normalizeTextBlock(_0x298e9a);return structuredClone(_0x298e9a);});}function normalizeSystem(_0x304351=[]){const _0x4136a7={_0x25498d:0x2ea};function _0x7fbd9d(_0x404706,_0x9f5cdc,_0x492f59,_0x2cc8f2){return _0x509d(_0x9f5cdc-0xe9,_0x2cc8f2);}function _0x2cc9f9(_0x99c9e3,_0x4df448,_0x2600f0,_0x3011ac){return _0x509d(_0x2600f0- -0x3c5,_0x4df448);}return normalizeContent(_0x304351)[_0x7fbd9d(0x2f6,_0x4136a7._0x25498d,0x302,0x2d3)](_0x1026e0=>_0x1026e0[_0x7fbd9d(0x2ef,0x2e1,0x2c4,0x2cb)]===_0x2cc9f9(-0x190,-0x1b6,-0x1ad,-0x193));}function _0x509d(_0x5d716d,_0x4e5428){_0x5d716d=_0x5d716d-0x1dc;const _0x3c1074=_0x3c10();let _0x509dd8=_0x3c1074[_0x5d716d];if(_0x509d['hPmJap']===undefined){var _0x1d05e6=function(_0x52fb61){const _0x2005b7='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x309a6e='',_0x38fc34='';for(let _0x47e7d7=0x0,_0x298e9a,_0x304351,_0x1026e0=0x0;_0x304351=_0x52fb61['charAt'](_0x1026e0++);~_0x304351&&(_0x298e9a=_0x47e7d7%0x4?_0x298e9a*0x40+_0x304351:_0x304351,_0x47e7d7++%0x4)?_0x309a6e+=String['fromCharCode'](0xff&_0x298e9a>>(-0x2*_0x47e7d7&0x6)):0x0){_0x304351=_0x2005b7['indexOf'](_0x304351);}for(let _0x493a7a=0x0,_0x56df8c=_0x309a6e['length'];_0x493a7a<_0x56df8c;_0x493a7a++){_0x38fc34+='%'+('00'+_0x309a6e['charCodeAt'](_0x493a7a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x38fc34);};_0x509d['IIuzJV']=_0x1d05e6,_0x509d['MrWbOt']={},_0x509d['hPmJap']=!![];}const _0x39acb2=_0x3c1074[0x0],_0x51cca3=_0x5d716d+_0x39acb2,_0x40a1b8=_0x509d['MrWbOt'][_0x51cca3];return!_0x40a1b8?(_0x509dd8=_0x509d['IIuzJV'](_0x509dd8),_0x509d['MrWbOt'][_0x51cca3]=_0x509dd8):_0x509dd8=_0x40a1b8,_0x509dd8;}function normalizeMessage(_0x493a7a){const _0x47c334={_0x12f3a3:0x170,_0x5c23bb:0x177,_0x32f3b1:0x187,_0x59ade9:0x15c,_0x378380:0x185,_0x4928ce:0x186,_0x40d488:0x181,_0x287f21:0x16d},_0x5bfc0c={_0x5708b0:0x351};function _0x3ced5c(_0x4402a0,_0x24f452,_0x3dfc50,_0xa4f0ed){return _0x509d(_0x4402a0- -0x36b,_0xa4f0ed);}function _0x194eaf(_0x4bb349,_0x74c89a,_0x4dba98,_0x5df394){return _0x509d(_0x4bb349- -_0x5bfc0c._0x5708b0,_0x74c89a);}return{...typeof _0x493a7a['id']===_0x3ced5c(-_0x47c334._0x12f3a3,-_0x47c334._0x5c23bb,-0x163,-0x176)?{'id':_0x493a7a['id']}:{},'role':_0x493a7a[_0x3ced5c(-0x174,-_0x47c334._0x32f3b1,-0x172,-0x17c)],'content':normalizeContent(_0x493a7a[_0x3ced5c(-_0x47c334._0x59ade9,-0x151,-0x171,-0x149)]),..._0x493a7a[_0x3ced5c(-0x186,-0x197,-0x167,-_0x47c334._0x378380)]?{'providerState':structuredClone(_0x493a7a[_0x3ced5c(-_0x47c334._0x4928ce,-_0x47c334._0x40d488,-_0x47c334._0x287f21,-0x18d)])}:{}};}function compileRequest(_0x56df8c){const _0x4783a0={_0x219f4f:0x19c,_0x25c934:0x1a7,_0x3dc669:0x169,_0x488f82:0x165,_0x598525:0x133,_0x43d624:0x1a5,_0x508cb0:0x1d0,_0x107102:0x1b7,_0x4988b0:0x18a,_0x57d087:0x19e,_0x36adda:0x1a9,_0x1579a0:0x132,_0x32979b:0x188,_0x21fbda:0x171,_0x345902:0x186,_0x515e8b:0x165,_0x1ddbec:0x140,_0x4ab337:0x13a};function _0x2b8ad9(_0xdc4b69,_0xdbe9a8,_0xbb9c93,_0x28f7e8){return _0x509d(_0x28f7e8- -0x39e,_0xbb9c93);}function _0x209aeb(_0x4ee5a3,_0x38301a,_0xa16ea0,_0x14f1dc){return _0x509d(_0x4ee5a3- -0x9f,_0xa16ea0);}return{'model':_0x56df8c[_0x2b8ad9(-_0x4783a0._0x219f4f,-0x1be,-_0x4783a0._0x25c934,-0x1b2)]??_0x209aeb(_0x4783a0._0x3dc669,_0x4783a0._0x488f82,0x186,0x151),'max_tokens':_0x56df8c[_0x209aeb(0x14b,0x14b,_0x4783a0._0x598525,0x15b)]??0x400,..._0x56df8c['reasoning']?{'reasoning':structuredClone(_0x56df8c[_0x2b8ad9(-0x1ab,-0x189,-0x1b3,-_0x4783a0._0x43d624)])}:{},'system':normalizeSystem(_0x56df8c[_0x2b8ad9(-0x1b1,-_0x4783a0._0x508cb0,-0x1bc,-_0x4783a0._0x107102)]),'messages':_0x56df8c[_0x2b8ad9(-_0x4783a0._0x4988b0,-_0x4783a0._0x57d087,-_0x4783a0._0x36adda,-0x18c)][_0x209aeb(0x151,0x15a,0x166,_0x4783a0._0x1579a0)](normalizeMessage),'tools':structuredClone(_0x56df8c[_0x2b8ad9(-0x18a,-0x192,-0x19f,-_0x4783a0._0x32979b)]??[]),'metadata':{'session_id':_0x56df8c[_0x209aeb(0x175,_0x4783a0._0x21fbda,_0x4783a0._0x345902,_0x4783a0._0x515e8b)],'turn_id':_0x56df8c[_0x209aeb(_0x4783a0._0x1ddbec,_0x4783a0._0x4ab337,0x124,0x132)]}};}function toChatRequest(_0x4ad75d){const _0x4e2675={_0x570620:0x5cd,_0x5fb9:0xae,_0x26f4c9:0x91,_0x9f1ddb:0x5d7,_0x157cf4:0x5e5,_0x2f77dd:0x5ee,_0xfc11ac:0xb1,_0x56157a:0xa9},_0x54a09e={_0x37f9e5:0x168},_0x41cfff={_0x3c4bc8:0x3dc};function _0x21b65c(_0x36b2b2,_0x3505e1,_0x1f84a9,_0x58c283){return _0x509d(_0x58c283-_0x41cfff._0x3c4bc8,_0x3505e1);}function _0x2c932c(_0x1c6c67,_0x558477,_0x3b3dbe,_0x510c09){return _0x509d(_0x510c09- -_0x54a09e._0x37f9e5,_0x1c6c67);}return{'model':_0x4ad75d['model'],'maxTokens':_0x4ad75d[_0x21b65c(_0x4e2675._0x570620,0x5ca,0x5ac,0x5c6)],..._0x4ad75d['reasoning']?{'reasoning':structuredClone(_0x4ad75d[_0x2c932c(0xa3,_0x4e2675._0x5fb9,0x8b,_0x4e2675._0x26f4c9)])}:{},'system':structuredClone(_0x4ad75d['system']),'messages':structuredClone(_0x4ad75d[_0x21b65c(_0x4e2675._0x9f1ddb,0x604,_0x4e2675._0x157cf4,_0x4e2675._0x2f77dd)]),'tools':structuredClone(_0x4ad75d['tools']),'metadata':{'sessionId':_0x4ad75d[_0x2c932c(0xbb,0x98,0xb3,0xa9)]['session_id'],'turnId':_0x4ad75d[_0x2c932c(0x93,_0x4e2675._0xfc11ac,0xaf,_0x4e2675._0x56157a)]['turn_id']},..._0x4ad75d['outputFormat']?{'outputFormat':structuredClone(_0x4ad75d['outputFormat'])}:{}};}function toModelRequest(_0x520094){const _0x3e78b8={_0x5606dc:0x7f,_0x227aed:0x65,_0x236f93:0x2f1,_0x1d193d:0x2c0,_0x41d6f0:0x2d0,_0x3a4515:0xa3,_0x2e8ac9:0x9d,_0x26090a:0x82,_0x15a632:0x2ec,_0x58c1e8:0x30b,_0x7ac5a0:0x2e2,_0x412efc:0x308,_0x2841a9:0x2e4,_0x5db6bd:0x2e5};function _0xcf0ab1(_0x584af2,_0x21a1ac,_0x3b5e5b,_0xe7cd87){return _0x509d(_0x584af2-0xdb,_0xe7cd87);}function _0x17ba70(_0x125761,_0x1895bb,_0x4c3645,_0xfb60e4){return _0x509d(_0xfb60e4- -0x296,_0x4c3645);}return{'model':_0x520094['model'],'max_tokens':_0x520094[_0x17ba70(-_0x3e78b8._0x5606dc,-0x6a,-_0x3e78b8._0x227aed,-0x81)],..._0x520094[_0xcf0ab1(0x2d4,0x2f3,_0x3e78b8._0x236f93,0x2f3)]?{'reasoning':structuredClone(_0x520094[_0xcf0ab1(0x2d4,0x2df,_0x3e78b8._0x1d193d,_0x3e78b8._0x41d6f0)])}:{},'system':structuredClone(_0x520094[_0x17ba70(-_0x3e78b8._0x3a4515,-0xa3,-0xab,-0xaf)]),'messages':structuredClone(_0x520094[_0x17ba70(-_0x3e78b8._0x2e8ac9,-0x7c,-_0x3e78b8._0x26090a,-0x84)]),'tools':structuredClone(_0x520094[_0xcf0ab1(_0x3e78b8._0x236f93,0x2e8,0x2d9,0x2da)]),'metadata':{'session_id':_0x520094['metadata'][_0xcf0ab1(0x2ef,0x2df,0x2f4,0x301)],'turn_id':_0x520094[_0xcf0ab1(_0x3e78b8._0x15a632,_0x3e78b8._0x58c1e8,_0x3e78b8._0x7ac5a0,_0x3e78b8._0x412efc)]['turnId']},..._0x520094[_0xcf0ab1(0x2e2,0x2e8,_0x3e78b8._0x2841a9,_0x3e78b8._0x5db6bd)]?{'outputFormat':structuredClone(_0x520094['outputFormat'])}:{}};}function toProviderModelRequest(_0x2723bb){const _0x5949c3={_0x1cdd74:0x4aa,_0x54a77c:0x4ca,_0x1ea616:0x4bf},_0x585ccd={_0x1e8c9d:0x5b};function _0x32cbe9(_0x20bff0,_0x38e676,_0x15331e,_0x45c270){return _0x509d(_0x45c270-_0x585ccd._0x1e8c9d,_0x20bff0);}function _0x3afbc2(_0x254ad0,_0x23050e,_0x583893,_0x488b42){return _0x509d(_0x583893-0x2ad,_0x254ad0);}return{'model':_0x2723bb[_0x3afbc2(_0x5949c3._0x1cdd74,0x49c,0x499,0x4a5)],'max_tokens':_0x2723bb['maxTokens'],'system':structuredClone(_0x2723bb['system']),'messages':structuredClone(_0x2723bb[_0x3afbc2(_0x5949c3._0x54a77c,0x4c0,_0x5949c3._0x1ea616,0x4be)]),'tools':structuredClone(_0x2723bb[_0x32cbe9(0x288,0x267,0x274,0x271)])};}function toChatResponse(_0x474dae){const _0xb6ce33={_0x826d6d:0x9a,_0x1ae876:0x8d,_0x305d63:0xa7,_0x3e2cd3:0x7f,_0x56c2df:0x75,_0x4e8e11:0x51,_0x14f054:0x5b,_0x2bd99b:0x74,_0x467f1a:0x61,_0x2b0842:0x45,_0x20524f:0x3e,_0x3f4128:0x39,_0x43ac95:0x58,_0x2aadd9:0x5f,_0x4c94da:0x7a,_0xd27b2c:0x7e,_0x6c09ea:0x6d,_0x6aa020:0x63},_0x537e37={_0x4fe751:0x24e};function _0x3c5994(_0x362da7,_0x4c26dd,_0x4eb759,_0x4e79dc){return _0x509d(_0x4eb759- -0x182,_0x4c26dd);}function _0x3e54f5(_0x2d5c65,_0x442af1,_0x527a97,_0x2a58c4){return _0x509d(_0x442af1- -_0x537e37._0x4fe751,_0x2d5c65);}return{'id':_0x474dae['id'],'content':structuredClone(_0x474dae[_0x3c5994(0x95,_0xb6ce33._0x826d6d,_0xb6ce33._0x1ae876,_0xb6ce33._0x305d63)]),'stopReason':_0x474dae[_0x3c5994(0x96,_0xb6ce33._0x3e2cd3,0x89,_0xb6ce33._0x56c2df)],'usage':{'inputTokens':_0x474dae[_0x3c5994(0x72,_0xb6ce33._0x3e2cd3,0x6b,0x62)][_0x3c5994(_0xb6ce33._0x4e8e11,0x65,_0xb6ce33._0x14f054,0x3d)],'outputTokens':_0x474dae['usage']['output_tokens'],..._0x474dae[_0x3e54f5(-_0xb6ce33._0x2bd99b,-_0xb6ce33._0x467f1a,-0x53,-0x73)][_0x3e54f5(-_0xb6ce33._0x2b0842,-_0xb6ce33._0x20524f,-0x30,-_0xb6ce33._0x3f4128)]!==void 0x0?{'reasoningTokens':_0x474dae[_0x3e54f5(-_0xb6ce33._0x43ac95,-0x61,-_0xb6ce33._0x2aadd9,-_0xb6ce33._0x43ac95)][_0x3c5994(_0xb6ce33._0x4c94da,_0xb6ce33._0xd27b2c,0x8e,0x7f)]}:{}},..._0x474dae[_0x3c5994(_0xb6ce33._0x3e2cd3,_0xb6ce33._0x6c09ea,_0xb6ce33._0x6aa020,0x80)]?{'providerState':structuredClone(_0x474dae['providerState'])}:{}};}function toModelResponse(_0x1947a0){const _0x2a24ba={_0x4475a0:0xb6,_0x4c83ee:0x1d4,_0x4a0b54:0x1e9,_0x562405:0x204,_0x308c15:0x96,_0x14bdee:0x95,_0x176065:0x89,_0x461db4:0x6d,_0x2388b5:0x1d0,_0x529fa1:0x1e0,_0x539e47:0x1fa,_0x211a62:0x1da,_0x7163dc:0x1e5,_0x4f8e37:0xa9,_0x319f42:0xa0,_0x3d82e3:0xa5,_0x1c2cdd:0xa4,_0x5820b0:0xac},_0x1ff534={_0x35037e:0x298};function _0x3292c2(_0x5aacc2,_0x2f5166,_0x33aaef,_0x52a12f){return _0x509d(_0x33aaef- -_0x1ff534._0x35037e,_0x52a12f);}function _0x51a2a3(_0x14334f,_0x5f2caa,_0x3dc078,_0x20f8ff){return _0x509d(_0x3dc078- -0x3cd,_0x5f2caa);}return{'id':_0x1947a0['id'],'type':_0x3292c2(-0x9d,-0xb7,-_0x2a24ba._0x4475a0,-0xb5),'role':_0x51a2a3(-_0x2a24ba._0x4c83ee,-0x1f6,-_0x2a24ba._0x4a0b54,-_0x2a24ba._0x562405),'content':structuredClone(_0x1947a0[_0x3292c2(-_0x2a24ba._0x308c15,-_0x2a24ba._0x14bdee,-_0x2a24ba._0x176065,-_0x2a24ba._0x461db4)]),'stop_reason':_0x1947a0['stopReason'],'stop_sequence':null,'usage':{'input_tokens':_0x1947a0['usage'][_0x51a2a3(-0x1c3,-0x1f4,-0x1db,-0x1bd)],'output_tokens':_0x1947a0[_0x51a2a3(-0x1e0,-_0x2a24ba._0x2388b5,-_0x2a24ba._0x529fa1,-0x1db)][_0x51a2a3(-_0x2a24ba._0x2388b5,-0x1dd,-0x1ec,-0x1ff)],..._0x1947a0[_0x51a2a3(-0x1ce,-_0x2a24ba._0x539e47,-_0x2a24ba._0x529fa1,-0x1e1)]['reasoningTokens']!==void 0x0?{'reasoning_tokens':_0x1947a0['usage'][_0x51a2a3(-0x1be,-_0x2a24ba._0x211a62,-0x1d9,-_0x2a24ba._0x7163dc)]}:{}},..._0x1947a0[_0x3292c2(-0xac,-_0x2a24ba._0x4f8e37,-0xb3,-_0x2a24ba._0x319f42)]?{'providerState':structuredClone(_0x1947a0[_0x3292c2(-_0x2a24ba._0x3d82e3,-_0x2a24ba._0x1c2cdd,-0xb3,-_0x2a24ba._0x5820b0)])}:{}};}function responseToAssistantMessage(_0x142748){const _0x4244ea={_0xbf926b:0x47,_0x3a2e73:0x3c,_0x1de014:0x24,_0x2f45f5:0x34,_0x5e07ad:0x3ed,_0x1f7944:0x3ee,_0x5a5012:0x404,_0x17f4b6:0x3d,_0x1db9aa:0x25,_0x3f4ca8:0x5a,_0x43f3f9:0x3d,_0x345994:0x48,_0x2e537e:0x43},_0x488aef={_0x382895:0x1fa};function _0x567e04(_0x5a81f6,_0x2fd871,_0x27b290,_0x269f05){return _0x509d(_0x2fd871- -0x1a8,_0x27b290);}function _0x89d447(_0x4e08be,_0x2368b0,_0x58e08d,_0x5da4cb){return _0x509d(_0x2368b0-_0x488aef._0x382895,_0x5da4cb);}return{'role':_0x567e04(_0x4244ea._0xbf926b,_0x4244ea._0x3a2e73,_0x4244ea._0x1de014,_0x4244ea._0x2f45f5),'content':normalizeContent(_0x142748[_0x89d447(_0x4244ea._0x5e07ad,0x409,_0x4244ea._0x1f7944,_0x4244ea._0x5a5012)]),..._0x142748[_0x567e04(0x3c,_0x4244ea._0x17f4b6,_0x4244ea._0x1db9aa,0x39)]?{'providerState':structuredClone(_0x142748[_0x567e04(_0x4244ea._0x3f4ca8,_0x4244ea._0x43f3f9,_0x4244ea._0x345994,_0x4244ea._0x2e537e)])}:{}};}function createReasoningMessage(_0x1a118a){const _0x362167={_0x2f8556:0x428,_0x3c0bc0:0x40f,_0x416fd1:0x4f0,_0x47cadd:0x4ea,_0x412333:0x505},_0x3ef351={_0x3e4f2e:0x306},_0x323f7a={_0x28e3f4:0x204},_0xff6ba2={_0xbbead2:0x34c,_0x2d4a08:0x368,_0x14fded:0x365,_0x44314b:0x362,_0x5e5566:0x361,_0x4c43bb:0x54f,_0x39723c:0x376,_0x43b171:0x367},_0x244124={_0xb9df00:0xed},_0x2f90b0=normalizeContent(_0x1a118a?.[_0x3dbec8(_0x362167._0x2f8556,0x413,_0x362167._0x3c0bc0,0x42c)])[_0xce4b21(0x4ef,0x507,_0x362167._0x416fd1,0x4fa)](_0x3c2686=>{const _0x4fcff3={_0x154e03:0x100,_0x3bedb6:0x55,_0x349d68:0x58};function _0x10130a(_0x59c8d8,_0x45fce5,_0x367588,_0xc1d5c5){return _0xce4b21(_0x59c8d8-_0x244124._0xb9df00,_0xc1d5c5- -0x19d,_0x59c8d8,_0xc1d5c5-0x70);}function _0x5094f8(_0x3fe366,_0x41ae57,_0x3331ff,_0x28e36d){return _0xce4b21(_0x3fe366-_0x4fcff3._0x154e03,_0x3331ff-_0x4fcff3._0x3bedb6,_0x3fe366,_0x28e36d-_0x4fcff3._0x349d68);}return _0x3c2686[_0x10130a(_0xff6ba2._0xbbead2,0x366,_0xff6ba2._0x2d4a08,0x361)]===_0x10130a(0x34c,_0xff6ba2._0x14fded,0x348,0x357)||_0x3c2686[_0x10130a(_0xff6ba2._0x44314b,_0xff6ba2._0x14fded,_0xff6ba2._0x5e5566,_0xff6ba2._0x5e5566)]===_0x5094f8(_0xff6ba2._0x4c43bb,0x547,0x55b,0x575)||_0x3c2686[_0x10130a(_0xff6ba2._0x39723c,0x363,_0xff6ba2._0x43b171,0x361)]===_0x5094f8(0x573,0x54e,0x568,0x54b);});function _0x3dbec8(_0x404d21,_0xd4fbdc,_0x31f4fc,_0x140b63){return _0x509d(_0xd4fbdc-_0x323f7a._0x28e3f4,_0x31f4fc);}if(_0x2f90b0['length']===0x0)return void 0x0;function _0xce4b21(_0x416367,_0x564b65,_0x31d8c7,_0x50e9a6){return _0x509d(_0x564b65-_0x3ef351._0x3e4f2e,_0x31d8c7);}return{'role':_0xce4b21(0x4e3,_0x362167._0x47cadd,0x4db,_0x362167._0x412333),'content':_0x2f90b0};}function createAssistantTextMessage(_0x22eaef){const _0x95d8fe={_0x2df341:0x35,_0x2d47c1:0x177,_0x1e16be:0x18e,_0x55909f:0x163},_0x4b741d={_0x1a6185:0x6d},_0x1c0467={_0x164791:0x351,_0x55e9b9:0x31e,_0x14cb36:0x315,_0x282c4f:0x460,_0x80d16f:0x45c},_0x525495=normalizeContent(_0x22eaef?.[_0x5146de(-_0x95d8fe._0x2df341,-0x3b,-0x31,-0x1d)])['filter'](_0x55cf66=>{const _0x552501={_0x32eb64:0x1b0};function _0xab26e8(_0x4bb491,_0x137d6f,_0x2e2c7e,_0x167ebd){return _0x5146de(_0x2e2c7e,_0x137d6f-0x114,_0x2e2c7e-0xeb,_0x4bb491-0x367);}function _0x519f35(_0x5a9991,_0x8ce9c1,_0x1bfb0b,_0x43e497){return _0x5146de(_0x8ce9c1,_0x8ce9c1-0x1d8,_0x1bfb0b-_0x552501._0x32eb64,_0x5a9991-0x474);}return _0x55cf66[_0xab26e8(0x333,_0x1c0467._0x164791,_0x1c0467._0x55e9b9,_0x1c0467._0x14cb36)]===_0x519f35(_0x1c0467._0x282c4f,0x46b,0x450,_0x1c0467._0x80d16f);});function _0x15ba52(_0x58ef55,_0x19818d,_0x3d2d45,_0x147cb6){return _0x509d(_0x58ef55- -_0x4b741d._0x1a6185,_0x3d2d45);}function _0x5146de(_0x43c62b,_0x12ef8d,_0x8accb,_0x3089ea){return _0x509d(_0x3089ea- -0x22c,_0x43c62b);}if(_0x525495['length']===0x0)return void 0x0;return{'role':_0x15ba52(_0x95d8fe._0x2d47c1,_0x95d8fe._0x1e16be,_0x95d8fe._0x55909f,0x175),'content':_0x525495};}function createToolUseMessage(_0x8462b){const _0x22c520={_0x5bc8e2:0x1db,_0x16ab0b:0x1b,_0x157288:0x11},_0x2febfc={_0xa1d716:0x518,_0x9c8a32:0x531,_0x47c167:0x53f,_0x174864:0x538},_0x386ba8={_0x2748b6:0x354,_0x26cac9:0x19a,_0x12419d:0x65},_0xce3b7={_0x3a4664:0x194,_0x3322c8:0x11e},_0x1039d5={_0x32d3f1:0x34};function _0xf647ae(_0x553db5,_0xb9fd31,_0x8385d5,_0x457a27){return _0x509d(_0xb9fd31- -_0x1039d5._0x32d3f1,_0x553db5);}function _0x28c9aa(_0x3482e0,_0x1581be,_0x5d7e87,_0x2faff5){return _0x509d(_0x1581be- -0x238,_0x3482e0);}const _0x4a5b3a=normalizeContent(_0x8462b?.[_0xf647ae(0x1f8,_0x22c520._0x5bc8e2,0x1f6,0x1c0)])[_0x28c9aa(-_0x22c520._0x16ab0b,-0x37,-0x28,-0x27)](_0x5abb41=>{function _0xdcb1ab(_0x530935,_0x3382ee,_0x5d8bd4,_0x54211f){return _0xf647ae(_0x54211f,_0x3382ee-_0xce3b7._0x3a4664,_0x5d8bd4-_0xce3b7._0x3322c8,_0x54211f-0x71);}function _0xfdeecf(_0x57167d,_0x32101b,_0x22b0b3,_0x5cae8c){return _0xf647ae(_0x32101b,_0x57167d-_0x386ba8._0x2748b6,_0x22b0b3-_0x386ba8._0x26cac9,_0x5cae8c-_0x386ba8._0x12419d);}return _0x5abb41[_0xfdeecf(_0x2febfc._0xa1d716,0x533,0x51a,_0x2febfc._0x9c8a32)]===_0xfdeecf(0x529,0x534,_0x2febfc._0x47c167,_0x2febfc._0x174864);});if(_0x4a5b3a[_0x28c9aa(-0x14,-0x25,-_0x22c520._0x157288,-0x3b)]===0x0)return void 0x0;return{'role':'assistant','content':_0x4a5b3a};}function _0x23d55a(_0x2226d3,_0x2ecf5d,_0x15a004,_0x44edf8){const _0x4c21a5={_0x418b21:0xd3};return _0x509d(_0x15a004- -_0x4c21a5._0x418b21,_0x44edf8);}function getTextFromMessage(_0x143f68){const _0x4310ad={_0xdc4512:0x3be,_0x4fefcc:0x3b6,_0x24b94d:0x3b0,_0x1d9330:0x38f,_0x11cf19:0x3ac},_0xa3a1e={_0x404ed5:0x1af};function _0x35dca9(_0xc0796e,_0x334157,_0x28c150,_0x20d3ee){return _0x509d(_0x20d3ee- -0x391,_0x28c150);}function _0x126f7d(_0x168329,_0x193da,_0x369d4b,_0x31d094){return _0x509d(_0x369d4b-_0xa3a1e._0x404ed5,_0x168329);}return normalizeContent(_0x143f68?.[_0x126f7d(0x3cf,0x3bf,_0x4310ad._0xdc4512,0x3bf)])['filter'](_0x1d0898=>_0x1d0898['type']===_0x35dca9(-0x15c,-0x17f,-0x15e,-0x179))[_0x126f7d(_0x4310ad._0x4fefcc,_0x4310ad._0x24b94d,0x39f,_0x4310ad._0x1d9330)](_0x9e5dec=>_0x9e5dec['text'])[_0x126f7d(0x3c8,0x3a7,_0x4310ad._0x11cf19,0x39c)]('\x0a');}function getReasoningTextFromMessage(_0x1fd1ac){const _0x1ce7ad={_0x3e23a6:0x22e},_0x430b21={_0x2675d1:0xf5,_0x31c168:0xfe,_0x5e30ab:0x10d,_0x2f1c96:0x270,_0x1827d0:0x273,_0x4f0c1d:0x28d,_0x2095a5:0x288,_0x7bf2c5:0x104,_0x5412e9:0x102,_0x4ed33a:0xe8,_0x300bcf:0x278,_0xfdd0f1:0x262,_0x2e4330:0x280,_0x42177a:0x263,_0x3e1062:0x260,_0x99db08:0x26f,_0x57a37e:0x286,_0x34a719:0x274,_0x1eef20:0x121,_0x33dc33:0x11c,_0x2a8f33:0x27c,_0x2a3c66:0x28b,_0x17fbda:0x268,_0x23cab3:0x27f,_0x112f6e:0x28f,_0x18e871:0x27c,_0x37a3a6:0x290,_0x115725:0x2a1,_0x46f3b0:0xf5,_0x128e3f:0xea},_0x2eedd0={_0x462687:0x43};function _0x436f28(_0x2b92de,_0x4023a0,_0x174c23,_0x32171d){return _0x509d(_0x32171d-_0x2eedd0._0x462687,_0x174c23);}return normalizeContent(_0x1fd1ac?.['content'])[_0x436f28(0x220,_0x1ce7ad._0x3e23a6,0x23d,0x23d)](_0x2981ef=>{const _0x5ccf06={_0x1c50ed:0x122};function _0x4389fb(_0x11f2a1,_0x4711d5,_0x30da4a,_0xfdf7c6){return _0x436f28(_0x11f2a1-0x1c8,_0x4711d5-0xf1,_0xfdf7c6,_0x30da4a-0x30);}if(_0x2981ef[_0x165ff7(_0x430b21._0x2675d1,_0x430b21._0x31c168,0x102,_0x430b21._0x5e30ab)]===_0x4389fb(_0x430b21._0x2f1c96,0x265,_0x430b21._0x1827d0,0x260))return _0x2981ef['thinking'][_0x4389fb(_0x430b21._0x4f0c1d,0x292,0x27f,_0x430b21._0x2095a5)]()['length']>0x0?[_0x2981ef['thinking']]:[];if(_0x2981ef[_0x165ff7(0xf6,_0x430b21._0x7bf2c5,_0x430b21._0x5412e9,_0x430b21._0x4ed33a)]==='anthropic_redacted_thinking')return[_0x4389fb(_0x430b21._0x300bcf,0x24e,0x25b,_0x430b21._0xfdd0f1)];if(_0x2981ef['type']!==_0x4389fb(0x281,0x27c,_0x430b21._0x2e4330,_0x430b21._0x42177a))return[];const _0x9f1e3=_0x2981ef['summary'][_0x4389fb(0x26d,_0x430b21._0x3e1062,0x263,_0x430b21._0x99db08)](_0x5509b5=>_0x5509b5['text'])[_0x4389fb(0x25a,_0x430b21._0x57a37e,_0x430b21._0x34a719,_0x430b21._0x42177a)](_0x11006f=>_0x11006f[_0x4389fb(0x297,0x269,0x27f,0x264)]()[_0x4389fb(0x274,0x26d,0x286,0x296)]>0x0)[_0x165ff7(0xf5,_0x430b21._0x1eef20,0x107,_0x430b21._0x33dc33)]('\x0a\x0a');function _0x165ff7(_0x295fd2,_0x4ceb7d,_0x576fe7,_0x270e86){return _0x436f28(_0x295fd2-0x110,_0x4ceb7d-_0x5ccf06._0x1c50ed,_0x270e86,_0x576fe7- -0x139);}if(_0x9f1e3['length']>0x0)return[_0x9f1e3];if(_0x2981ef[_0x4389fb(0x26f,_0x430b21._0x2a8f33,_0x430b21._0x2a3c66,0x27a)]&&_0x2981ef['text'][_0x4389fb(0x283,_0x430b21._0x17fbda,_0x430b21._0x23cab3,_0x430b21._0x112f6e)]()['length']>0x0)return[_0x2981ef[_0x4389fb(_0x430b21._0x18e871,_0x430b21._0x37a3a6,0x28b,_0x430b21._0x115725)]];return _0x2981ef[_0x165ff7(0xe9,_0x430b21._0x46f3b0,0xfb,_0x430b21._0x128e3f)]?['(encrypted\x20reasoning)']:[];})['join']('\x0a\x0a');}function getToolUseBlocks(_0x34f8f0){const _0x2a6a03={_0x2fc5ce:0x4d1,_0x4cc6c7:0x4de};function _0x230445(_0x247a65,_0x2cc171,_0x7bf678,_0x55c84f){return _0x509d(_0x2cc171- -0x22,_0x55c84f);}function _0x2ba5ec(_0x3e1f16,_0x569ed0,_0x77e6fb,_0x4b3c68){return _0x509d(_0x77e6fb-0x2d8,_0x4b3c68);}return normalizeContent(_0x34f8f0?.[_0x2ba5ec(0x4fb,_0x2a6a03._0x2fc5ce,0x4e7,_0x2a6a03._0x4cc6c7)])['filter'](_0x1e4deb=>_0x1e4deb[_0x2ba5ec(0x4cc,0x4b6,0x4d0,0x4e7)]===_0x230445(0x1dc,0x1e7,0x205,0x1ca));}function getToolResultBlocks(_0x4b5488){const _0x11560e={_0x46677c:0x249,_0x1b2fe5:0x228,_0x553d30:0x226},_0x4ad884={_0x48831a:0x16};function _0x2c8c2e(_0x24f35a,_0x36f7b6,_0xf00968,_0xbe5e20){return _0x509d(_0x36f7b6-_0x4ad884._0x48831a,_0x24f35a);}function _0x370aeb(_0x871e50,_0x58a526,_0x1d4efb,_0x3141ef){return _0x509d(_0x58a526-0x25,_0x1d4efb);}return normalizeContent(_0x4b5488?.[_0x370aeb(_0x11560e._0x46677c,0x234,_0x11560e._0x1b2fe5,0x245)])[_0x370aeb(0x213,_0x11560e._0x553d30,0x222,0x22f)](_0x32af73=>_0x32af73[_0x370aeb(0x209,0x21d,0x21b,0x205)]===_0x370aeb(0x240,0x22a,0x242,0x216));}function createToolResultUserMessage(_0x275784){const _0x484f9e={_0x2e1852:0x319,_0x114bfe:0x324,_0x58a7cd:0x30c,_0x5c19bd:0x32c},_0x3a3221={_0x5e40ef:0x3ee,_0x16512b:0x3b6,_0x3de8e4:0x3ce,_0x441a0a:0x3e9,_0x30ba74:0x3ea,_0x64f44d:0x3c0,_0x373e4a:0x167,_0x3d2ddc:0x161,_0x1f7232:0x153,_0x45d16d:0x3d4,_0x441d8d:0x3cd,_0x248f33:0x3c8,_0x297263:0x3d1,_0x5dba18:0x3db},_0x2b3319={_0x4c97ca:0x46a,_0xd2993c:0x10b},_0x4a25f9={_0x2d13ce:0x2df};function _0x43a332(_0x554c01,_0x166a38,_0x47defe,_0x2b425d){return _0x509d(_0x554c01-0x128,_0x47defe);}function _0x44e680(_0x48fd54,_0x1472af,_0x210b2a,_0x3aab6d){return _0x509d(_0x48fd54- -_0x4a25f9._0x2d13ce,_0x3aab6d);}return{'role':_0x43a332(0x30e,_0x484f9e._0x2e1852,_0x484f9e._0x114bfe,_0x484f9e._0x58a7cd),'content':_0x275784[_0x43a332(0x318,0x304,_0x484f9e._0x5c19bd,0x327)](_0x21758d=>{const _0x382699={_0x548936:0xa7,_0xe76f57:0xf4};function _0x4b3c5d(_0x5e652f,_0x296bc3,_0x4dac8d,_0x43ba28){return _0x43a332(_0x296bc3-_0x382699._0x548936,_0x296bc3-_0x382699._0xe76f57,_0x5e652f,_0x43ba28-0x73);}function _0x561754(_0x51838b,_0x126581,_0x5a57e5,_0x546c3e){return _0x43a332(_0x546c3e- -_0x2b3319._0x4c97ca,_0x126581-_0x2b3319._0xd2993c,_0x5a57e5,_0x546c3e-0x0);}return{'type':_0x4b3c5d(_0x3a3221._0x5e40ef,0x3d4,_0x3a3221._0x16512b,0x3ea),'tool_use_id':_0x21758d[_0x4b3c5d(0x3bc,0x3ba,0x3a8,_0x3a3221._0x3de8e4)],'content':_0x21758d[_0x4b3c5d(_0x3a3221._0x441a0a,0x3de,_0x3a3221._0x30ba74,_0x3a3221._0x64f44d)]??_0x21758d[_0x561754(-_0x3a3221._0x373e4a,-_0x3a3221._0x3d2ddc,-0x161,-_0x3a3221._0x1f7232)],'is_error':_0x21758d[_0x4b3c5d(_0x3a3221._0x45d16d,_0x3a3221._0x441d8d,0x3ca,_0x3a3221._0x248f33)]===_0x4b3c5d(0x3bc,_0x3a3221._0x297263,_0x3a3221._0x5dba18,0x3bc)};})};}function _0x3c10(){const _0x494841=['Bwf4x3rVA2vUCW','y2fSBeLK','Bw9KzwW','DxnHz2u','yw50AhjVCgLJx3jLzgfJDgvKx3rOAw5RAw5N','B3v0Chv0','BwfW','zw5JCNLWDgvKq29UDgvUDa','Aw5WDxruB2TLBNm','nKLQsM5lza','CMvHC29UAw5Nvg9Rzw5Z','mJiZnJiXnxPOrMXtAa','vg9VBcbLEgvJDxrPB24GD2fZigLUDgvYCNvWDgvKigjLzM9YzsbJB21WBgv0Aw9UigfUzcbWCM9KDwnLzcbUBYbYzxn1BhqU','CM9Szq','DhLWzq','CMvHC29UAw5N','zMXHDe1HCa','C3rYAw5N','ndvjtK9Pu1K','AM9PBG','C3rHDhvZ','mZKXmeTXwLHXtW','yw50AhjVCgLJx3rOAw5RAw5N','zMLSDgvY','zxjYB3i','mtyXnZG4mKrTz1Pgqq','oty2mti4B1nrufHo','Dg9VBf9Yzxn1Bhq','ndKYodi0ELPlqvzi','B3v0Chv0rM9YBwf0','y2XHDwrLlxnVBM5LDc00ltiWmJuWnte0','Dg9VBf91C2u','AxnbCNjHEq','C3rVCf9YzwfZB24','DhjPBq','B3bLBMfPx3jLyxnVBMLUzW','mti3EMT3EwXy','y29UDgvUDa','CMvHC29UAw5Nx3rVA2vUCW','Bwv0ywrHDge','BwvZC2fNzxm','BgvUz3rO','C2vZC2LVBKLK','Bwf4vg9Rzw5Z','Dg9VBhm','ntm3nty3BfnUzNzs','Dgv4Da','mZbbt0vMteW','Aw5WDxrFDg9Rzw5Z','ChvZAa','DhvYBKLK','mJiYotu5EM1hAezX','B3v0Chv0vg9Rzw5Z','BwvZC2fNzq','Dg9VBf91C2vFAwq','yxnZAxn0yw50','ChjVDMLKzxjtDgf0zq','DxnLCG','C3LZDgvT','khjLzgfJDgvKihjLyxnVBMLUzYK','ywrK'];_0x3c10=function(){return _0x494841;};return _0x3c10();}var INTERRUPTED_TOOL_RESULT_TEXT=_0x23d55a(0x10b,0x109,0x123,0x12a);function synthesizeMissingToolResults(_0x4a4318){const _0x59517d={_0x4a5555:0x3d7,_0x3706cd:0x15a,_0xa93287:0x15c,_0x22f1ba:0x159,_0x48e651:0x12a,_0x3b6d38:0x141,_0x3aa872:0x3d9,_0x4a3329:0x14b,_0x45e579:0x14f},_0x5f1dfd={_0x5ec36d:0x167,_0x174e53:0x1f4},_0xc16fe2={_0x442f57:0x1d2,_0xf5a791:0x26a},_0x516905=new Set();function _0x171208(_0x52c6e1,_0x54ac5d,_0x4e81c7,_0x5b4a3d){return _0x23d55a(_0x52c6e1-_0xc16fe2._0x442f57,_0x54ac5d-0x183,_0x52c6e1- -_0xc16fe2._0xf5a791,_0x4e81c7);}for(const _0x119a86 of _0x4a4318){for(const _0x237e56 of getToolResultBlocks(_0x119a86)){_0x516905[_0x50ee40(0x3dc,0x3d0,0x3c8,_0x59517d._0x4a5555)](_0x237e56[_0x171208(-_0x59517d._0x3706cd,-0x154,-_0x59517d._0xa93287,-0x169)]);}}const _0x93bb62=[];function _0x50ee40(_0x2dfdaf,_0x4d11de,_0x4260b8,_0x33e1ac){return _0x23d55a(_0x2dfdaf-_0x5f1dfd._0x5ec36d,_0x4d11de-_0x5f1dfd._0x174e53,_0x2dfdaf-0x2c6,_0x4d11de);}for(const _0x2018bc of _0x4a4318){_0x93bb62[_0x171208(-0x15f,-0x155,-0x145,-_0x59517d._0x22f1ba)](_0x2018bc);const _0x14e1f7=getToolUseBlocks(_0x2018bc)['filter'](_0x14b43a=>!_0x516905['has'](_0x14b43a['id']));if(_0x14e1f7[_0x171208(-_0x59517d._0x48e651,-0x129,-0x144,-_0x59517d._0x3b6d38)]===0x0)continue;_0x93bb62['push']({'role':_0x50ee40(_0x59517d._0x3aa872,0x3e5,0x3d2,0x3d3),'content':_0x14e1f7[_0x171208(-0x14d,-_0x59517d._0x4a3329,-_0x59517d._0x45e579,-0x14d)](_0x22cb54=>({'type':_0x171208(-0x138,-0x154,-0x137,-0x139),'tool_use_id':_0x22cb54['id'],'content':INTERRUPTED_TOOL_RESULT_TEXT,'is_error':!![]}))});for(const _0xfc6a12 of _0x14e1f7){_0x516905['add'](_0xfc6a12['id']);}}return _0x93bb62;}export{createTextBlock,normalizeTextBlock,normalizeContent,normalizeSystem,normalizeMessage,compileRequest,toChatRequest,toModelRequest,toProviderModelRequest,toChatResponse,toModelResponse,responseToAssistantMessage,createReasoningMessage,createAssistantTextMessage,createToolUseMessage,getTextFromMessage,getReasoningTextFromMessage,getToolUseBlocks,getToolResultBlocks,createToolResultUserMessage,INTERRUPTED_TOOL_RESULT_TEXT,synthesizeMissingToolResults};