@nuvin/agent-core 0.0.0-rc.10 → 0.0.0-rc.12

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.
@@ -660,7 +660,7 @@ interface OpenAiInputImage {
660
660
  interface OpenAiInputMessage {
661
661
  type: "message";
662
662
  role: MessageRole;
663
- content: Array<OpenAiInputImage | OpenAiInputText>;
663
+ content: Array<OpenAiInputImage | OpenAiInputText | OpenAiOutputTextPart>;
664
664
  }
665
665
  interface OpenAiFunctionCall {
666
666
  type: "function_call";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuvin/agent-core",
3
- "version": "0.0.0-rc.10",
3
+ "version": "0.0.0-rc.12",
4
4
  "private": false,
5
5
  "description": "Core agent, model, format, and tool primitives for Nuvin",
6
6
  "license": "Apache-2.0",
@@ -1 +0,0 @@
1
- (function(_0x4658a8,_0x44401b){const _0x3d5258={_0x2cf83d:0x139,_0x3cfb4d:0x142,_0x32fa39:0x1a3,_0x2f26c8:0x1ec,_0x4d9411:0x153,_0xa55e85:0x172,_0xfa2fca:0x177,_0x48183a:0x1de,_0x1e05c1:0x1fd,_0x4d9854:0x1e8,_0xc7fb44:0x22b,_0x57551e:0x195,_0x2bbb6b:0x1f2,_0x279a66:0x231,_0x359459:0x1dd,_0x565b7b:0x20a,_0x2f32d2:0xb5,_0x26ce2d:0xcc,_0x5a6560:0xc1,_0x403594:0x13e,_0x37dc90:0x112},_0x58fb88={_0x251065:0x31d},_0xb22dc0=_0x4658a8();function _0x5c59b6(_0x566a4f,_0x226f08,_0xb37aef,_0x2de7ce){return _0x959d(_0x566a4f- -0x4b,_0xb37aef);}function _0x30ad7a(_0x2bfbe0,_0x107c4b,_0xac6b90,_0x21ed29){return _0x959d(_0x107c4b- -_0x58fb88._0x251065,_0x2bfbe0);}while(!![]){try{const _0x144dac=-parseInt(_0x30ad7a(-0x12e,-_0x3d5258._0x2cf83d,-0xf0,-_0x3d5258._0x3cfb4d))/0x1*(parseInt(_0x5c59b6(_0x3d5258._0x32fa39,_0x3d5258._0x2f26c8,0x1be,0x16c))/0x2)+-parseInt(_0x5c59b6(0x19f,_0x3d5258._0x4d9411,_0x3d5258._0xa55e85,_0x3d5258._0xfa2fca))/0x3*(parseInt(_0x5c59b6(0x1c8,0x180,_0x3d5258._0x48183a,0x1bf))/0x4)+parseInt(_0x5c59b6(0x1b7,0x161,_0x3d5258._0x1e05c1,0x1cc))/0x5+-parseInt(_0x5c59b6(_0x3d5258._0x4d9854,_0x3d5258._0xc7fb44,_0x3d5258._0x57551e,0x207))/0x6+-parseInt(_0x5c59b6(_0x3d5258._0x2bbb6b,_0x3d5258._0x279a66,_0x3d5258._0x359459,_0x3d5258._0x565b7b))/0x7*(-parseInt(_0x30ad7a(-_0x3d5258._0x2f32d2,-0xde,-0xac,-0xb6))/0x8)+-parseInt(_0x30ad7a(-0xb2,-_0x3d5258._0x26ce2d,-0xcb,-_0x3d5258._0x5a6560))/0x9+parseInt(_0x30ad7a(-0xb1,-0x9c,-0xb0,-0x87))/0xa*(parseInt(_0x30ad7a(-0x10c,-_0x3d5258._0x403594,-0xf8,-_0x3d5258._0x37dc90))/0xb);if(_0x144dac===_0x44401b)break;else _0xb22dc0['push'](_0xb22dc0['shift']());}catch(_0x139e6e){_0xb22dc0['push'](_0xb22dc0['shift']());}}}(_0x57e9,0x8e32f));import{createAssistantTextMessage,createReasoningMessage,createToolResultUserMessage,createToolUseMessage,getToolUseBlocks,normalizeMessage,normalizeSystem,responseToAssistantMessage}from'./chunk-G2FR4UGO.js';import{addAbortListener,isAbortError,throwIfAborted,toAbortError}from'./chunk-X7VAACWY.js';function isJsonObject(_0x47d19f){const _0x5440dd={_0x131d9e:0xec,_0x67c94f:0x135,_0x384460:0xe2,_0x254fae:0xa0},_0x32b2c2={_0x14a219:0x146};function _0x385526(_0x3c3998,_0x2ab0a6,_0x4d11c5,_0x25eeca){return _0x959d(_0x25eeca- -_0x32b2c2._0x14a219,_0x2ab0a6);}function _0x216bf0(_0xce16c5,_0x17a308,_0x2d0074,_0x717a6c){return _0x959d(_0xce16c5- -0x1dc,_0x717a6c);}return typeof _0x47d19f===_0x385526(0x120,_0x5440dd._0x131d9e,_0x5440dd._0x67c94f,0xfc)&&_0x47d19f!==null&&!Array[_0x385526(_0x5440dd._0x384460,_0x5440dd._0x254fae,0xf7,0xbe)](_0x47d19f);}function isToolOutputEnvelope(_0x43f75f){const _0xaaae41={_0x14dcce:0x122,_0x51fb06:0x1f6,_0x114fa7:0x1f2,_0x5900db:0x183,_0x1654b6:0x197},_0x479947={_0x4b9c9f:0x3db},_0x15a3b6={_0x5edba6:0xba};if(typeof _0x43f75f!=='object'||_0x43f75f===null||Array[_0x7e3b83(_0xaaae41._0x14dcce,0x14a,0x159,0x10b)](_0x43f75f))return![];if(typeof _0x43f75f[_0x7e3b83(0x193,0x1bd,_0xaaae41._0x51fb06,_0xaaae41._0x114fa7)]!=='string')return![];const _0x2b88be=_0x43f75f[_0x7e3b83(0x17e,0x16b,_0xaaae41._0x5900db,_0xaaae41._0x1654b6)];function _0x7e3b83(_0x3812b8,_0x32f37b,_0x25e455,_0x76405b){return _0x959d(_0x32f37b- -_0x15a3b6._0x5edba6,_0x3812b8);}function _0x594b54(_0x5eceec,_0xcd2c68,_0x209eb5,_0xa1eff5){return _0x959d(_0x5eceec- -_0x479947._0x4b9c9f,_0xcd2c68);}return _0x2b88be===void 0x0||isJsonObject(_0x2b88be);}function validateAgainstSchema(_0x2420f8,_0x33870b,_0x3eb8cd){const _0x72ba40={_0x5759cb:0x12a,_0x2a1d87:0x39,_0x489ba1:0x58,_0x397cad:0x69,_0x311499:0x7a,_0x200227:0x64,_0x5bf395:0xf5,_0x5cf088:0xec,_0x285c70:0xf8,_0x3f5c0d:0xa5,_0x20f5e5:0x5c,_0x17189c:0x4b,_0x311a77:0x127,_0x1a1cd7:0x11d,_0x14ed02:0x11b,_0x5a0c79:0xa8,_0x48f91a:0x30,_0x277e63:0x68,_0x47d45d:0x5a,_0xa299e8:0x44,_0x42836d:0xb8,_0x5423cf:0x11e,_0x30f955:0x152,_0x5d12d7:0x15f,_0x26780a:0x106,_0x3d7058:0xf7,_0x2d3135:0x13e,_0x19a8ac:0xda,_0x24fa5e:0x160,_0x56b11c:0x7a,_0x23cc27:0xcf,_0x4cf9e6:0x81,_0x1ae964:0x53,_0x159c8a:0x4,_0x58facd:0xb,_0x2feb81:0x4,_0x4038dd:0x4,_0x37c0db:0x70,_0xe1546d:0x101},_0x492655={_0x1d78d6:0x16c,_0x1df1f5:0x1d2},_0x2dfb6c={_0x5af47f:0x35a};function _0x3030c5(_0x48ae98,_0x202e4e,_0x4170cf,_0x350e6a){return _0x959d(_0x202e4e- -_0x2dfb6c._0x5af47f,_0x48ae98);}function _0x273b05(_0x2aa60f,_0x5649c3,_0x3999d1,_0x459c5c){return _0x959d(_0x2aa60f- -0x282,_0x3999d1);}switch(_0x3eb8cd[_0x3030c5(-_0x72ba40._0x5759cb,-0x14f,-0x13f,-0x13a)]){case'string':if(typeof _0x33870b!==_0x273b05(-_0x72ba40._0x2a1d87,-0x1b,-_0x72ba40._0x489ba1,-_0x72ba40._0x397cad))throw new Error(_0x273b05(-_0x72ba40._0x311499,-_0x72ba40._0x200227,-0x4b,-0x88)+_0x2420f8+_0x3030c5(-_0x72ba40._0x5bf395,-_0x72ba40._0x5cf088,-_0x72ba40._0x285c70,-_0x72ba40._0x3f5c0d));return;case'number':if(typeof _0x33870b!=='number')throw new Error(_0x273b05(-_0x72ba40._0x311499,-0x41,-0x2b,-0xa4)+_0x2420f8+_0x273b05(-0x61,-_0x72ba40._0x20f5e5,-0x3b,-_0x72ba40._0x17189c));return;case _0x273b05(-0x71,-0x65,-0xae,-0x8e):if(typeof _0x33870b!==_0x3030c5(-_0x72ba40._0x311a77,-0x149,-_0x72ba40._0x1a1cd7,-_0x72ba40._0x14ed02))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x2420f8+_0x273b05(-_0x72ba40._0x5a0c79,-0x6e,-0xe6,-0x71));return;case _0x273b05(-0x85,-0x61,-_0x72ba40._0x48f91a,-_0x72ba40._0x277e63):if(!Array[_0x273b05(-0x7e,-_0x72ba40._0x47d45d,-_0x72ba40._0xa299e8,-_0x72ba40._0x42836d)](_0x33870b))throw new Error(_0x3030c5(-_0x72ba40._0x5423cf,-_0x72ba40._0x30f955,-0x161,-_0x72ba40._0x5d12d7)+_0x2420f8+':\x20expected\x20array');_0x33870b[_0x3030c5(-_0x72ba40._0x26780a,-0x11c,-_0x72ba40._0x3d7058,-_0x72ba40._0x2d3135)]((_0x430ac8,_0x4d6399)=>{const _0x1a55c6={_0x2a679d:0x2c9,_0x3ce4f0:0x118};function _0x5539e6(_0x48fee8,_0x58bf14,_0x2a4f2b,_0x56aa29){return _0x3030c5(_0x2a4f2b,_0x48fee8-_0x1a55c6._0x2a679d,_0x2a4f2b-_0x1a55c6._0x3ce4f0,_0x56aa29-0x2a);}validateAgainstSchema(_0x2420f8+'['+_0x4d6399+']',_0x430ac8,_0x3eb8cd[_0x5539e6(0x18e,0x17a,_0x492655._0x1d78d6,_0x492655._0x1df1f5)]);});return;case _0x3030c5(-_0x72ba40._0x19a8ac,-0x118,-0x161,-0x13c):if(!isJsonObject(_0x33870b))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x2420f8+_0x3030c5(-0x176,-0x17c,-_0x72ba40._0x24fa5e,-0x16a));for(const _0x52ad42 of _0x3eb8cd[_0x3030c5(-0xab,-0xf1,-0x107,-0xca)]??[]){if(!(_0x52ad42 in _0x33870b))throw new Error(_0x273b05(-_0x72ba40._0x56b11c,-_0x72ba40._0x23cc27,-_0x72ba40._0x4cf9e6,-_0x72ba40._0x1ae964)+_0x2420f8+_0x273b05(-_0x72ba40._0x159c8a,-0x20,_0x72ba40._0x58facd,_0x72ba40._0x2feb81)+_0x52ad42+'\x22');}for(const [_0x4488d1,_0x2bcd04]of Object[_0x273b05(-_0x72ba40._0x17189c,-0x4c,_0x72ba40._0x4038dd,-_0x72ba40._0x37c0db)](_0x3eb8cd[_0x3030c5(-0x111,-0x12e,-0x114,-_0x72ba40._0xe1546d)])){_0x4488d1 in _0x33870b&&validateAgainstSchema(_0x2420f8+'.'+_0x4488d1,_0x33870b[_0x4488d1],_0x2bcd04);}}}function normalizeToolOutputValue(_0x23133a){const _0x1ea589={_0x1030cc:0x52d,_0x19b8ff:0x5b6,_0x4d0dae:0x23d,_0x1d8f64:0x291,_0x1c587f:0x569,_0x2026b4:0x523,_0x7ea788:0x550,_0x5b319a:0x56f,_0x12e18c:0x538,_0x3236dc:0x546,_0x2b51a2:0x52f,_0x5c4f85:0x1be,_0x3c36f4:0x1bc},_0x5c08c9={_0x11ed09:0x2ef};if(isToolOutputEnvelope(_0x23133a))return{'output':_0x23133a[_0x4751a1(_0x1ea589._0x1030cc,_0x1ea589._0x19b8ff,0x566,0x558)],'structured':_0x23133a['structured']??{'value':_0x23133a[_0x2ee300(_0x1ea589._0x4d0dae,0x282,_0x1ea589._0x1d8f64,0x27e)]},..._0x23133a[_0x4751a1(0x59c,0x54e,_0x1ea589._0x1c587f,_0x1ea589._0x2026b4)]!==void 0x0?{'content':_0x23133a[_0x4751a1(_0x1ea589._0x7ea788,0x548,_0x1ea589._0x1c587f,0x53c)]}:{}};function _0x4751a1(_0x3b9304,_0x162fe8,_0xa57f2b,_0x158fe9){return _0x959d(_0xa57f2b-_0x5c08c9._0x11ed09,_0x158fe9);}function _0x2ee300(_0x890621,_0x5aef6e,_0x877bb3,_0x4645d7){return _0x959d(_0x890621- -0x3a,_0x877bb3);}if(typeof _0x23133a===_0x4751a1(0x51b,_0x1ea589._0x5b319a,_0x1ea589._0x12e18c,0x53f))return{'output':_0x23133a,'structured':{'value':_0x23133a}};if(typeof _0x23133a===_0x4751a1(_0x1ea589._0x3236dc,0x525,0x531,_0x1ea589._0x2b51a2)&&_0x23133a!==null&&!Array['isArray'](_0x23133a))return{'output':JSON[_0x4751a1(0x4b7,0x4d7,0x4e7,0x523)](_0x23133a,null,0x2),'structured':_0x23133a};return{'output':JSON[_0x2ee300(_0x1ea589._0x5c4f85,_0x1ea589._0x3c36f4,0x1e9,0x19a)](_0x23133a,null,0x2),'structured':{'value':_0x23133a}};}function createToolOutput(_0x12eaac,_0x5feffa={'value':_0x12eaac},_0x4241e0){return{'output':_0x12eaac,'structured':_0x5feffa,..._0x4241e0!==void 0x0?{'content':_0x4241e0}:{}};}var ToolExecutionError=class extends Error{[_0x3fa381(-0x18f,-0x1ca,-0x1b1,-0x14e)];constructor(_0x51d47a,_0x25f2b3={}){const _0x4f4f8f={_0x2ab6e4:0xce,_0x5af07b:0xc2,_0x5098c3:0x108,_0x31fb93:0x168,_0x549dac:0x13f,_0x2d40c1:0x15b},_0x1100b6={_0x4e783c:0x50,_0x5adf9d:0x1dd},_0xe04520={_0x2c25fc:0x16b};super(_0x51d47a),this[_0x38ac62(-_0x4f4f8f._0x2ab6e4,-_0x4f4f8f._0x5af07b,-_0x4f4f8f._0x5098c3,-0x11c)]='ToolExecutionError';function _0x1cde9d(_0x55097f,_0x131063,_0x89f18f,_0x2e534b){return _0x3fa381(_0x55097f-0x382,_0x89f18f,_0x89f18f-0x1b7,_0x2e534b-_0xe04520._0x2c25fc);}function _0x38ac62(_0x136450,_0x11ccb4,_0x1be6c4,_0x26d760){return _0x3fa381(_0x1be6c4-_0x1100b6._0x4e783c,_0x26d760,_0x1be6c4-_0x1100b6._0x5adf9d,_0x26d760-0xba);}this[_0x38ac62(-0x133,-_0x4f4f8f._0x31fb93,-_0x4f4f8f._0x549dac,-_0x4f4f8f._0x2d40c1)]=_0x25f2b3;}};function defineTool(_0x527b51){return _0x527b51;}var ToolRegistry=class{[_0x3fa381(-0x185,-0x1ac,-0x162,-0x15c)]=new Map();constructor(_0x53df7e=[]){for(const _0x433b62 of _0x53df7e){this['register'](_0x433b62);}}[_0x3588de(0x676,0x5e4,0x627,0x5e3)](_0x1ad571){const _0x2f76a6={_0x14a724:0x49a,_0x5ff189:0x449},_0x21919b={_0x8047de:0x1e1};function _0xcbfc6c(_0x4a8117,_0x16f8f2,_0x29dce5,_0x380cb9){return _0x3588de(_0x4a8117-0xe3,_0x16f8f2-0x8b,_0x380cb9- -_0x21919b._0x8047de,_0x4a8117);}this['toolsByName']['set'](_0x1ad571[_0xcbfc6c(0x47c,0x48d,_0x2f76a6._0x14a724,_0x2f76a6._0x5ff189)],_0x1ad571);}[_0x3588de(0x598,0x5b4,0x5e7,0x614)](_0x146e7c){const _0x26da29={_0x4dd736:0x345,_0xf9c9c1:0x341,_0x23e906:0x2fa,_0x1588d0:0x34f},_0x2e4b39={_0xc3a43d:0x1c2},_0x538219={_0x3c8cee:0x131,_0x3b49ef:0x1d};function _0x3aebcc(_0x1be2c6,_0x436847,_0x56b21f,_0x55a1c8){return _0x3588de(_0x1be2c6-_0x538219._0x3c8cee,_0x436847-_0x538219._0x3b49ef,_0x436847- -0x8d,_0x56b21f);}function _0x20fce3(_0x23bd32,_0x4e96ed,_0x330f2d,_0x391219){return _0x3588de(_0x23bd32-0xc9,_0x4e96ed-_0x2e4b39._0xc3a43d,_0x23bd32- -0x2ed,_0x391219);}return this[_0x20fce3(0x310,_0x26da29._0x4dd736,_0x26da29._0xf9c9c1,0x2fa)][_0x20fce3(_0x26da29._0x23e906,0x2f8,_0x26da29._0x1588d0,0x309)](_0x146e7c);}[_0x3588de(0x5aa,0x5fe,0x5d7,0x61d)](){const _0x5166b9={_0x5394eb:0x2f3,_0x506e73:0x36b,_0x377a35:0x37e,_0x461e62:0x382},_0x34ff6b={_0xdcd497:0xc,_0x5c76ef:0x2bf},_0x268a7b={_0x4d6203:0x159};function _0x2735de(_0x451d81,_0x2f5395,_0x59be63,_0x14c110){return _0x3588de(_0x451d81-0xf2,_0x2f5395-_0x268a7b._0x4d6203,_0x14c110- -0x21b,_0x59be63);}function _0xeecdec(_0x728723,_0x39f78a,_0x3f577c,_0x4156a8){return _0x3588de(_0x728723-0x44,_0x39f78a-_0x34ff6b._0xdcd497,_0x39f78a- -_0x34ff6b._0x5c76ef,_0x3f577c);}return[...this[_0xeecdec(_0x5166b9._0x5394eb,0x33e,_0x5166b9._0x506e73,0x339)][_0xeecdec(_0x5166b9._0x377a35,_0x5166b9._0x461e62,0x355,_0x5166b9._0x506e73)]()];}['listToolSchemas'](){const _0x1b851f={_0x242b89:0x196,_0x548c50:0x1e6,_0x34bf60:0x1d9,_0x134b2a:0x527},_0x159384={_0x137c4b:0x36d,_0x1e70d6:0x30a,_0xc4d206:0x331,_0x3572a8:0x304},_0x56f82f={_0x427471:0x135,_0x3fdade:0x213},_0x2a74ad={_0x1be47c:0x690,_0x540be6:0xf5};function _0x5e4347(_0x4e1b74,_0x259c79,_0xa579dd,_0x568ce3){return _0x3fa381(_0x568ce3-_0x2a74ad._0x1be47c,_0xa579dd,_0xa579dd-_0x2a74ad._0x540be6,_0x568ce3-0x111);}function _0x186272(_0x16c533,_0x481705,_0x23bbd1,_0x4a6397){return _0x3fa381(_0x4a6397- -0x2e,_0x16c533,_0x23bbd1-0x14b,_0x4a6397-0xf6);}return this[_0x186272(-_0x1b851f._0x242b89,-0x1b5,-_0x1b851f._0x548c50,-_0x1b851f._0x34bf60)]()[_0x5e4347(0x572,0x54b,_0x1b851f._0x134b2a,0x540)](_0x565780=>{const _0x4ffd11={_0x5905a6:0x111};function _0x2e04b1(_0x9e53e5,_0xf6777,_0x4fe583,_0x563ebe){return _0x5e4347(_0x9e53e5-0x199,_0xf6777-_0x56f82f._0x427471,_0xf6777,_0x563ebe- -_0x56f82f._0x3fdade);}function _0x1472ca(_0x418af0,_0x25a9df,_0x5dcab3,_0x1b4f87){return _0x5e4347(_0x418af0-_0x4ffd11._0x5905a6,_0x25a9df-0x1e1,_0x418af0,_0x5dcab3- -0x15d);}return{'name':_0x565780[_0x2e04b1(_0x159384._0x137c4b,_0x159384._0x1e70d6,0x374,0x325)],'description':_0x565780[_0x2e04b1(_0x159384._0xc4d206,0x2db,0x2ea,_0x159384._0x3572a8)],'input_schema':_0x565780['inputSchema']};});}};function validateToolInput(_0x2bb83d,_0x2399cb){const _0x3aab66={_0x2dafc7:0x154,_0x5c2f76:0x11b},_0xecfc02={_0xe7b359:0x1dd,_0x12a73e:0xde};validateAgainstSchema(_0x277dfc(-0xeb,-_0x3aab66._0x2dafc7,-0x10c,-_0x3aab66._0x5c2f76),_0x2bb83d,_0x2399cb);function _0x277dfc(_0x37c734,_0xa8d622,_0x1022e6,_0x1ee898){return _0x3588de(_0x37c734-_0xecfc02._0xe7b359,_0xa8d622-_0xecfc02._0x12a73e,_0x1ee898- -0x723,_0x1022e6);}return _0x2bb83d;}function _0x3fa381(_0xc5dfd0,_0x27b014,_0x268b51,_0x2fd249){const _0x4628e8={_0x8aab25:0x3b4};return _0x959d(_0xc5dfd0- -_0x4628e8._0x8aab25,_0x27b014);}function deriveFinalToolOutput(_0x348a13){const _0x1b31cc={_0x2a4560:0x310,_0x3277de:0x318,_0x3d064f:0x2f1,_0x1309d2:0x309,_0xbfead9:0x2c4,_0x21a5bc:0x2fb,_0x26e149:0x30a,_0xa1a4b0:0x390,_0x47d777:0x380,_0x30b114:0x343,_0x2facbb:0x34d,_0x484c12:0x3c0,_0x2b88ea:0x3c8,_0x165573:0x398,_0x5a616e:0x2c5,_0x3ed396:0x30f,_0x4be618:0x2cc,_0x138027:0x333,_0x1b013a:0x2f7,_0x2a538b:0x2d4,_0x13e813:0x2db,_0xfb2ffb:0x3ca,_0x1bcabe:0x3df},_0x1309c6={_0x140f76:0x87};function _0x467c1d(_0x85cce,_0x4383b7,_0x4aee38,_0x9fcdd6){return _0x3fa381(_0x9fcdd6-0x447,_0x85cce,_0x4aee38-_0x1309c6._0x140f76,_0x9fcdd6-0x13f);}if(_0x348a13[_0x467c1d(0x32f,_0x1b31cc._0x2a4560,_0x1b31cc._0x3277de,0x309)]===0x0)return{'output':'','structured':{}};if(_0x348a13[_0x467c1d(_0x1b31cc._0x3d064f,0x331,0x2e2,_0x1b31cc._0x1309d2)]===0x1)return{'output':_0x348a13[0x0][_0x467c1d(0x319,_0x1b31cc._0xbfead9,_0x1b31cc._0x21a5bc,_0x1b31cc._0x26e149)],'structured':_0x348a13[0x0][_0x480ade(_0x1b31cc._0xa1a4b0,_0x1b31cc._0x47d777,_0x1b31cc._0x30b114,0x355)],..._0x348a13[0x0][_0x480ade(_0x1b31cc._0x2facbb,_0x1b31cc._0x484c12,0x398,0x37d)]!==void 0x0?{'content':_0x348a13[0x0][_0x480ade(_0x1b31cc._0x2b88ea,0x390,_0x1b31cc._0x165573,0x342)]}:{}};const _0x473a4a=_0x348a13['filter'](_0x4bb79a=>_0x4bb79a['content']!==void 0x0);function _0x480ade(_0x258171,_0x100524,_0xdd8f2f,_0x5ef02b){return _0x3fa381(_0xdd8f2f-0x4d2,_0x258171,_0xdd8f2f-0x118,_0x5ef02b-0x1bb);}return{'output':_0x348a13[_0x467c1d(0x302,0x2ef,_0x1b31cc._0x5a616e,0x2f7)](_0x57a5f2=>_0x57a5f2[_0x480ade(0x3db,0x382,0x395,0x396)])[_0x480ade(0x338,0x300,_0x1b31cc._0x3ed396,0x313)](''),'structured':{'chunks':_0x348a13[_0x467c1d(_0x1b31cc._0x4be618,_0x1b31cc._0x138027,0x30b,_0x1b31cc._0x1b013a)](_0x4cb269=>_0x4cb269[_0x480ade(0x334,0x376,0x343,0x369)])},..._0x473a4a[_0x467c1d(0x2e6,_0x1b31cc._0x2a538b,_0x1b31cc._0x13e813,_0x1b31cc._0x1309d2)]===0x1?{'content':_0x473a4a[0x0][_0x480ade(_0x1b31cc._0xfb2ffb,_0x1b31cc._0x1bcabe,0x398,0x345)]}:{}};}function _0x3588de(_0x5896e0,_0x176343,_0x52c529,_0x173d95){return _0x959d(_0x52c529-0x3ce,_0x173d95);}function createToolMeta(){return{'transforms':[]};}function createErrorToolResult(_0x2f1f50,_0x163a0a,_0x530fe2,_0x2c74cc=[]){const _0x1d33ce={_0x2a29b5:0x103,_0x42b34b:0x14b},_0x1444f9={_0x45c872:0x1aa,_0x24d1d1:0x1a3};function _0x32dd34(_0x318384,_0x5607d9,_0x1e4255,_0x488987){return _0x3fa381(_0x488987-0x306,_0x1e4255,_0x1e4255-_0x1444f9._0x45c872,_0x488987-_0x1444f9._0x24d1d1);}return{'callId':_0x2f1f50['id'],'toolName':_0x2f1f50['name'],'status':_0x32dd34(0x140,0x167,_0x1d33ce._0x2a29b5,_0x1d33ce._0x42b34b),'output':_0x163a0a,'structured':_0x530fe2,'chunks':_0x2c74cc,'meta':createToolMeta()};}function createRejectedToolResult(_0x2efafc,_0x13373a){const _0x5798a7={_0x2cc952:0xc3,_0x910c67:0x10b,_0x1bcc20:0x198,_0x386832:0x196,_0x4ef4d3:0x523,_0x2c672a:0x513,_0x3e0133:0x519,_0x3d1f75:0x4d5,_0x6e566:0x4ac,_0x702aff:0x4c8,_0x63aec2:0x506,_0x621c40:0x4f4},_0x4f2aa0={_0x3b7b73:0x67b,_0x563e95:0x12,_0x47d3f4:0x18b},_0x543cb3={_0x219bd9:0x179};function _0x272f1d(_0x39a904,_0x233bf7,_0x8f8ed3,_0x39584f){return _0x3fa381(_0x39a904-0x291,_0x39584f,_0x8f8ed3-_0x543cb3._0x219bd9,_0x39584f-0x100);}const _0x282e99=_0x13373a?.[_0x272f1d(0xc2,0x109,_0x5798a7._0x2cc952,0xdf)]()[_0x272f1d(0x153,_0x5798a7._0x910c67,0x15f,_0x5798a7._0x1bcc20)]?_0x13373a:_0x272f1d(0x15d,0x193,_0x5798a7._0x386832,0x16d)+_0x2efafc[_0x539f2d(0x53f,0x4f0,_0x5798a7._0x4ef4d3,0x4cd)];function _0x539f2d(_0x1f0428,_0x25cf0e,_0x2f6fcb,_0xfc22a8){return _0x3fa381(_0x2f6fcb-_0x4f2aa0._0x3b7b73,_0x1f0428,_0x2f6fcb-_0x4f2aa0._0x563e95,_0xfc22a8-_0x4f2aa0._0x47d3f4);}return createErrorToolResult(_0x2efafc,_0x282e99,{'error':_0x539f2d(0x4fd,_0x5798a7._0x2c672a,0x512,_0x5798a7._0x3e0133),..._0x13373a?.[_0x539f2d(_0x5798a7._0x3d1f75,0x4e2,_0x5798a7._0x6e566,_0x5798a7._0x702aff)]()[_0x539f2d(_0x5798a7._0x63aec2,0x57c,0x53d,_0x5798a7._0x621c40)]?{'reason':_0x13373a}:{}});}function createAbortedToolResult(_0x771061,_0x5b34da,_0x5bb549=[]){const _0x1300d7={_0x2db6c7:0x123},_0x442d20={_0x597349:0x21,_0x500392:0x12e};function _0x52089e(_0x416cb0,_0x2573f5,_0x27b60d,_0x6a5600){return _0x3fa381(_0x27b60d-0xd4,_0x2573f5,_0x27b60d-_0x442d20._0x597349,_0x6a5600-_0x442d20._0x500392);}const _0x344fe5=toAbortError(_0x5b34da);return createErrorToolResult(_0x771061,_0x344fe5[_0x52089e(-_0x1300d7._0x2db6c7,-0xe0,-0x108,-0xe1)],{'error':_0x344fe5['message'],'aborted':!![]},_0x5bb549);}function createSuccessToolResult(_0x30b0bc,_0x2b9792,_0x442876){const _0x4254fc={_0xd07683:0x353,_0xaa2e6:0x359,_0x589eb5:0x328,_0x22013d:0x338,_0x54bb19:0x5da,_0x2f8962:0x62e,_0x4fbd79:0x58f,_0x1852ed:0x5da,_0xbea604:0x5ea,_0x3c3fb3:0x63f,_0x4fdd2c:0x62f,_0x3fdba4:0x676,_0x2d6027:0x35a},_0x337a33={_0x123481:0x769},_0x4a5f18={_0x59eb92:0x56,_0x511f84:0x2d1};function _0x355f0b(_0x26bd3e,_0xc7806d,_0x4f8e10,_0x49c8a3){return _0x3588de(_0x26bd3e-_0x4a5f18._0x59eb92,_0xc7806d-0xf7,_0xc7806d- -_0x4a5f18._0x511f84,_0x49c8a3);}function _0x34f4ff(_0x59d78d,_0x380158,_0x3fdf3e,_0x5b0b26){return _0x3fa381(_0x380158-_0x337a33._0x123481,_0x59d78d,_0x3fdf3e-0x188,_0x5b0b26-0x1b8);}return{'callId':_0x30b0bc['id'],'toolName':_0x30b0bc[_0x355f0b(_0x4254fc._0xd07683,_0x4254fc._0xaa2e6,_0x4254fc._0x589eb5,_0x4254fc._0x22013d)],'status':'ok','output':_0x2b9792[_0x34f4ff(_0x4254fc._0x54bb19,0x62c,_0x4254fc._0x2f8962,0x65a)],'structured':_0x2b9792[_0x34f4ff(_0x4254fc._0x4fbd79,_0x4254fc._0x1852ed,0x60c,_0x4254fc._0xbea604)],..._0x2b9792[_0x34f4ff(_0x4254fc._0x3c3fb3,_0x4254fc._0x4fdd2c,_0x4254fc._0x3fdba4,0x650)]!==void 0x0?{'content':_0x2b9792[_0x355f0b(_0x4254fc._0x2d6027,0x377,0x36b,0x35d)]}:{},'chunks':_0x442876,'meta':createToolMeta()};}function createUnknownToolResult(_0x4a2f42){const _0x133058={_0x5306a2:0x1b3,_0x41a95c:0x1c7,_0x179972:0x246},_0x211028={_0x198ca4:0x1e0,_0x5c72fe:0x418};function _0x4508f5(_0x53f6cd,_0x57ea98,_0x44065a,_0x152f8d){return _0x3588de(_0x53f6cd-0x179,_0x57ea98-0xf8,_0x53f6cd- -0xc3,_0x57ea98);}function _0x2d2ace(_0x491449,_0x3f7c94,_0xe1c6b7,_0x409881){return _0x3588de(_0x491449-0xbe,_0x3f7c94-_0x211028._0x198ca4,_0x491449- -_0x211028._0x5c72fe,_0x3f7c94);}return createErrorToolResult(_0x4a2f42,_0x2d2ace(0x1ee,_0x133058._0x5306a2,0x237,0x1a4)+_0x4a2f42[_0x2d2ace(0x212,_0x133058._0x41a95c,_0x133058._0x179972,0x1bd)],{'error':'unknown_tool'});}function isDispatchDecision(_0x36a0dc){const _0x5a6cbb={_0x10275b:0x523,_0x2d19e9:0x55e,_0x29d689:0x535},_0x2399fc={_0x102459:0x1a7,_0x3ec15b:0x15,_0x51bcd1:0x8d},_0x5e700e={_0x31a9b3:0x63};function _0x12c1e4(_0x42e312,_0x5531fd,_0x388629,_0x321d01){return _0x3588de(_0x42e312-0x15b,_0x5531fd-_0x5e700e._0x31a9b3,_0x321d01- -0xb8,_0x42e312);}function _0x345b22(_0x4a1941,_0x124825,_0x1d0c6b,_0x1dfd90){return _0x3588de(_0x4a1941-_0x2399fc._0x102459,_0x124825-_0x2399fc._0x3ec15b,_0x1d0c6b- -_0x2399fc._0x51bcd1,_0x4a1941);}if(typeof _0x36a0dc!=='object'||_0x36a0dc===null)return![];return _0x36a0dc[_0x345b22(_0x5a6cbb._0x10275b,0x5a4,_0x5a6cbb._0x2d19e9,0x592)]===_0x12c1e4(_0x5a6cbb._0x29d689,0x541,0x559,0x54b)||_0x36a0dc['action']==='run';}function normalizeExecutionError(_0x5e8f44){const _0x45a060={_0x498cf6:0x50d,_0x18a407:0x51f,_0x2a0d8f:0x4f6,_0x2b5ffc:0x4e1,_0x41644c:0xd4,_0x1d5e77:0x523},_0x1b04b4={_0x37c096:0x140,_0x26ef48:0x145},_0x185159={_0x37e96d:0x34};if(_0x5e8f44 instanceof ToolExecutionError)return{'errorMessage':_0x5e8f44[_0x1ac96c(_0x45a060._0x498cf6,_0x45a060._0x18a407,_0x45a060._0x2a0d8f,_0x45a060._0x2b5ffc)],'structured':{'error':_0x5e8f44['message'],..._0x5e8f44[_0x56deac(0xe8,0xc5,_0x45a060._0x41644c,0xa1)]}};if(_0x5e8f44 instanceof Error)return{'errorMessage':_0x5e8f44['message'],'structured':{'error':_0x5e8f44[_0x1ac96c(0x521,_0x45a060._0x1d5e77,0x4f6,0x527)]}};function _0x1ac96c(_0x4a0bf6,_0x44ec23,_0x16c76d,_0x560ed3){return _0x3588de(_0x4a0bf6-0x1e9,_0x44ec23-_0x185159._0x37e96d,_0x16c76d- -0xb0,_0x44ec23);}const _0x45f26c=String(_0x5e8f44);function _0x56deac(_0x2209f2,_0x2fe84b,_0xef969c,_0x2de093){return _0x3fa381(_0x2fe84b-0x254,_0x2209f2,_0xef969c-_0x1b04b4._0x37c096,_0x2de093-_0x1b04b4._0x26ef48);}return{'errorMessage':_0x45f26c,'structured':{'error':_0x45f26c}};}async function emitEvent(_0x2592de,_0x51d471,_0x2f6108){await _0x2592de?.(_0x51d471,_0x2f6108);}async function resolveDispatchDecision(_0x4210bb,_0x2bda86,_0x37bd12){const _0x8d322f={_0x31f10a:0x497,_0x16f7f8:0x44f,_0x3ad4a4:0x401,_0x40d1f1:0x55b,_0x20d558:0x572,_0x452466:0x460,_0x1087c4:0x440,_0x2e9190:0x47d,_0x4ff7b0:0x5c7},_0x266891={_0x27a2c6:0xd},_0x51b694={_0x27bf38:0x104,_0x2344ed:0x13e,_0x3047d3:0x115,_0x482478:0x154,_0x187d78:0x13f,_0x4b2181:0x161,_0x264bf2:0x159},_0xe3c8b={_0x4b3a38:0x161,_0xb9a339:0x704,_0xc1a2b5:0xf3},_0x3ca79c={_0x348357:0x53,_0x412196:0x36,_0x287181:0x8,_0x597afa:0xf1,_0x90e510:0xaf,_0x416371:0xa9,_0x12fb63:0xd1,_0x52e87:0x2e,_0x39a045:0xa},_0x1d6380={_0x9ab7e7:0xcd,_0x20ad65:0x3fb,_0x136e8d:0xe8},_0x467ff0={_0x4207fa:0x737};if(!_0x4210bb)return{'action':_0x5b4f06(0x462,0x43e,0x437,_0x8d322f._0x31f10a)};function _0x5831f1(_0x38a0ad,_0x5a9af2,_0x207148,_0x6c285d){return _0x3fa381(_0x207148-_0x467ff0._0x4207fa,_0x5a9af2,_0x207148-0x177,_0x6c285d-0xe);}const _0x2ef32b=Promise['resolve']()[_0x5b4f06(_0x8d322f._0x16f7f8,_0x8d322f._0x3ad4a4,0x45d,0x452)](()=>_0x4210bb(_0x2bda86,_0x37bd12));if(!_0x37bd12['signal']){const _0x18ff15=await _0x2ef32b;return isDispatchDecision(_0x18ff15)?_0x18ff15:{'action':_0x5831f1(_0x8d322f._0x40d1f1,0x59e,_0x8d322f._0x20d558,0x598)};}const _0x5a45a3=new Promise((_0xda6c39,_0x13cfff)=>{function _0x544f50(_0xee85e9,_0x5ebaa1,_0x1fd2b7,_0x496482){return _0x5831f1(_0xee85e9-_0x1d6380._0x9ab7e7,_0x5ebaa1,_0xee85e9- -_0x1d6380._0x20ad65,_0x496482-_0x1d6380._0x136e8d);}const _0x4c4ea4=()=>{const _0x4f9480={_0x49365a:0x309};function _0x3fb23d(_0x490402,_0x2e4501,_0x2f9263,_0x37a21d){return _0x959d(_0x2e4501- -0x1f6,_0x490402);}_0x37bd12[_0x3fb23d(-_0x3ca79c._0x348357,-0xa,-_0x3ca79c._0x412196,-_0x3ca79c._0x287181)]?.[_0xf62c63(-_0x3ca79c._0x597afa,-_0x3ca79c._0x90e510,-_0x3ca79c._0x416371,-0x103)](_0xf62c63(-0x9e,-0x5e,-_0x3ca79c._0x12fb63,-0xf2),_0x4c4ea4);function _0xf62c63(_0x52e30e,_0x2ba6a4,_0x2ee5cc,_0x4689dc){return _0x959d(_0x52e30e- -_0x4f9480._0x49365a,_0x2ba6a4);}_0x13cfff(toAbortError(_0x37bd12[_0x3fb23d(-_0x3ca79c._0x52e87,-_0x3ca79c._0x39a045,-0x5a,0x2b)]?.['reason']));};if(_0x37bd12['signal']?.[_0x36f2e4(-0x175,-0x112,-0xe2,-0x135)]){_0x13cfff(toAbortError(_0x37bd12['signal'][_0x36f2e4(-_0x51b694._0x27bf38,-0x144,-_0x51b694._0x2344ed,-_0x51b694._0x3047d3)]));return;}function _0x36f2e4(_0x2cee5b,_0x3eca59,_0x4f4ad5,_0x997ce1){return _0x5831f1(_0x2cee5b-_0xe3c8b._0x4b3a38,_0x3eca59,_0x997ce1- -_0xe3c8b._0xb9a339,_0x997ce1-_0xe3c8b._0xc1a2b5);}_0x37bd12[_0x36f2e4(-_0x51b694._0x482478,-0x197,-_0x51b694._0x187d78,-0x195)]?.['addEventListener'](_0x36f2e4(-0xf9,-_0x51b694._0x4b2181,-_0x51b694._0x264bf2,-0x116),_0x4c4ea4,{'once':!![]});});function _0x5b4f06(_0x3a14de,_0x11d76b,_0x2bd3c2,_0x5cc5b5){return _0x3fa381(_0x3a14de-0x627,_0x5cc5b5,_0x2bd3c2-0x117,_0x5cc5b5-_0x266891._0x27a2c6);}const _0x2b2056=await Promise[_0x5b4f06(0x47d,_0x8d322f._0x452466,_0x8d322f._0x1087c4,_0x8d322f._0x2e9190)]([_0x2ef32b,_0x5a45a3]);return isDispatchDecision(_0x2b2056)?_0x2b2056:{'action':_0x5831f1(_0x8d322f._0x4ff7b0,0x542,0x572,0x57d)};}async function executeToolCall(_0x42cc95,_0x9c5caa,_0x3cba1d,_0x101d91,_0x42995c){const _0x1f4ffe={_0x5cbc5b:0x1b4,_0x442ad5:0x191,_0x352a2a:0x1e8,_0x37ea6b:0x279,_0x186ac8:0x22f,_0xd112cb:0x229,_0x16b281:0x222,_0x181529:0x247,_0x40d378:0x245,_0x1790b2:0x25d,_0xa2b083:0x1a5,_0x2153d8:0x143,_0x39f695:0x163,_0x6c2884:0x17a,_0x2fb0d4:0x111,_0x629317:0xfc,_0xc1caea:0xfb,_0x180b63:0x1d7,_0x34f734:0x213,_0x77b6c3:0x254,_0x267400:0x24d,_0xeba077:0x1c3,_0x43bfea:0x19e,_0x3ca3c7:0x1a2,_0x19abd7:0x21c,_0x3e376e:0x296,_0x3fbb59:0x259,_0x1d42d6:0x1e6,_0x4f6922:0x204,_0x552c6b:0x1e9,_0x2bb304:0x2ab,_0x399b9d:0x271,_0x43e21a:0x1ef,_0xfb3598:0x1bd,_0x465a07:0x25e,_0x39a50f:0x19c,_0x2359cb:0x1a4,_0x22f6b6:0x19f},_0x25913f={_0x1120e5:0x46},_0x15d1c9={_0x2efa46:0x19e},_0x1c9e96={_0x17a79b:0xdb,_0x49e401:0x782},_0x3f0a2a={_0x51ec1b:0x6f,_0x198008:0x3bc},_0x89c1bd={..._0x3cba1d,'toolCallId':_0x9c5caa['id']};function _0x24fc01(_0x3b10cc,_0x1136d0,_0x1f36f9,_0x266ed9){return _0x3588de(_0x3b10cc-0x1c1,_0x1136d0-_0x3f0a2a._0x51ec1b,_0x1f36f9- -_0x3f0a2a._0x198008,_0x1136d0);}throwIfAborted(_0x89c1bd[_0x3d88a2(-_0x1f4ffe._0x5cbc5b,-0x1c8,-_0x1f4ffe._0x442ad5,-_0x1f4ffe._0x352a2a)]);const _0x2210c8=await resolveDispatchDecision(_0x101d91,_0x9c5caa,_0x89c1bd);throwIfAborted(_0x89c1bd['signal']);if(_0x2210c8[_0x24fc01(_0x1f4ffe._0x37ea6b,0x1e1,_0x1f4ffe._0x186ac8,0x218)]===_0x24fc01(_0x1f4ffe._0xd112cb,_0x1f4ffe._0x16b281,_0x1f4ffe._0x181529,0x22b)){const _0x5291c3=createRejectedToolResult(_0x9c5caa,_0x2210c8['reason']);return await emitEvent(_0x42995c,{'type':_0x24fc01(0x29b,_0x1f4ffe._0x40d378,_0x1f4ffe._0x1790b2,0x249),'toolCall':_0x9c5caa,'result':_0x5291c3},_0x89c1bd),_0x5291c3;}const _0x31c08c=_0x42cc95['get'](_0x9c5caa[_0x3d88a2(-_0x1f4ffe._0xa2b083,-0x158,-_0x1f4ffe._0x2153d8,-0x178)]);if(!_0x31c08c){const _0x148b5b=createUnknownToolResult(_0x9c5caa);return await emitEvent(_0x42995c,{'type':'tool_completed','toolCall':_0x9c5caa,'result':_0x148b5b},_0x89c1bd),_0x148b5b;}throwIfAborted(_0x89c1bd['signal']);function _0x3d88a2(_0x300295,_0x400dba,_0x162978,_0xa6ff0a){return _0x3588de(_0x300295-0x1cb,_0x400dba-_0x1c9e96._0x17a79b,_0x400dba- -_0x1c9e96._0x49e401,_0x162978);}await emitEvent(_0x42995c,{'type':'tool_started','toolCall':_0x9c5caa},_0x89c1bd);try{throwIfAborted(_0x89c1bd[_0x3d88a2(-0x1b6,-0x1c8,-0x179,-0x182)]);const _0x57d365=validateToolInput(_0x9c5caa[_0x3d88a2(-_0x1f4ffe._0x39f695,-_0x1f4ffe._0x6c2884,-0x189,-0x15a)],_0x31c08c[_0x3d88a2(-_0x1f4ffe._0x2fb0d4,-0x145,-_0x1f4ffe._0x629317,-_0x1f4ffe._0xc1caea)]),_0x4adddf=await _0x31c08c[_0x3d88a2(-0x1ce,-_0x1f4ffe._0x180b63,-_0x1f4ffe._0x34f734,-0x1a1)](_0x57d365,_0x89c1bd),_0x1a833f=[],_0x1be406=addAbortListener(_0x89c1bd[_0x24fc01(_0x1f4ffe._0x77b6c3,_0x1f4ffe._0x267400,0x1fe,_0x1f4ffe._0xeba077)],()=>{function _0x1dbb41(_0x568767,_0x4e64c1,_0x590e3a,_0x578a86){return _0x3d88a2(_0x568767-0x189,_0x578a86-_0x15d1c9._0x2efa46,_0x4e64c1,_0x578a86-0x1e6);}void _0x4adddf[_0x1dbb41(0x6b,_0x25913f._0x1120e5,0x27,0x1b)](void 0x0)['catch'](()=>{});});try{throwIfAborted(_0x89c1bd[_0x3d88a2(-_0x1f4ffe._0x43bfea,-0x1c8,-_0x1f4ffe._0x3ca3c7,-0x1e1)]);let _0x5c883f=await _0x4adddf[_0x24fc01(_0x1f4ffe._0x19abd7,_0x1f4ffe._0x3e376e,_0x1f4ffe._0x3fbb59,0x2a2)]();while(!_0x5c883f['done']){throwIfAborted(_0x89c1bd[_0x3d88a2(-0x18f,-0x1c8,-_0x1f4ffe._0x1d42d6,-0x1dd)]);const _0xadc7a=normalizeToolOutputValue(_0x5c883f[_0x3d88a2(-0x1e4,-0x1ae,-_0x1f4ffe._0x4f6922,-_0x1f4ffe._0x552c6b)]);_0x1a833f[_0x24fc01(_0x1f4ffe._0x2bb304,0x2d2,0x294,_0x1f4ffe._0x399b9d)](_0xadc7a),await emitEvent(_0x42995c,{'type':'tool_output_chunk','toolCall':_0x9c5caa,'chunk':_0xadc7a},_0x89c1bd),throwIfAborted(_0x89c1bd[_0x24fc01(0x24f,0x1d8,0x1fe,0x1d4)]),_0x5c883f=await _0x4adddf['next']();}throwIfAborted(_0x89c1bd['signal']);const _0x2d14bc=_0x5c883f[_0x3d88a2(-_0x1f4ffe._0x43e21a,-0x1ae,-0x1bc,-_0x1f4ffe._0xfb3598)]===void 0x0?deriveFinalToolOutput(_0x1a833f):normalizeToolOutputValue(_0x5c883f[_0x24fc01(_0x1f4ffe._0x465a07,0x250,0x218,0x262)]),_0x4956de=createSuccessToolResult(_0x9c5caa,_0x2d14bc,_0x1a833f);return await emitEvent(_0x42995c,{'type':'tool_completed','toolCall':_0x9c5caa,'result':_0x4956de},_0x89c1bd),_0x4956de;}catch(_0x42f7eb){if(isAbortError(_0x42f7eb)){const _0x9eed37=createAbortedToolResult(_0x9c5caa,_0x42f7eb,_0x1a833f);return await emitEvent(_0x42995c,{'type':'tool_completed','toolCall':_0x9c5caa,'result':_0x9eed37},_0x89c1bd),_0x9eed37;}const {errorMessage:_0x120a1b,structured:_0x51aee8}=normalizeExecutionError(_0x42f7eb),_0x478de5=createErrorToolResult(_0x9c5caa,_0x120a1b,_0x51aee8,_0x1a833f);return await emitEvent(_0x42995c,{'type':_0x3d88a2(-_0x1f4ffe._0x39a50f,-_0x1f4ffe._0x2359cb,-0x1ce,-_0x1f4ffe._0x22f6b6),'toolCall':_0x9c5caa,'result':_0x478de5},_0x89c1bd),_0x478de5;}finally{_0x1be406();}}catch(_0x1f065b){if(isAbortError(_0x1f065b)){const _0x457962=createAbortedToolResult(_0x9c5caa,_0x1f065b);return await emitEvent(_0x42995c,{'type':'tool_completed','toolCall':_0x9c5caa,'result':_0x457962},_0x89c1bd),_0x457962;}const {errorMessage:_0x2dfcfa,structured:_0x1769b9}=normalizeExecutionError(_0x1f065b),_0x18817d=createErrorToolResult(_0x9c5caa,_0x2dfcfa,_0x1769b9);return await emitEvent(_0x42995c,{'type':'tool_completed','toolCall':_0x9c5caa,'result':_0x18817d},_0x89c1bd),_0x18817d;}}function _0x57e9(){const _0x36330c=['C3rYzwfT','B2jQzwn0','zMLUywXnzxnZywDL','Dg9VBenHBgXdB3vUDa','yxnRvxnLCG','CMvHC29UAw5Nx21LC3nHz2u','BMv4Da','B3jKzxi','C3rYAw5N','C3vTBwfYEuLUzgv4','Dg9VBf9YzwPLy3rLza','ywjVCNrLza','B3bLBMfPx3jLyxnVBMLUz19KzwX0yq','oMfZC2LZDgfUDdO','C2v0u3LZDgvTuhjVBxb0','A2LUza','mtaXmJGXndfeD2LMshG','Dg9VBf91C2vFBwvZC2fNzq','qwDLBNqUC2vUzcbYzxf1AxjLCYbHig1LC3nHz2uGD2HLBIbUBYbKzwzHDwX0ig1LC3nHz2uGAxmGy29UzMLNDxjLza','CMvHC29UAw5Nx2nODw5R','C2vZC2LVBI0','yMvMB3jLvg9VBev4zwn1DgLVBG','yMvMB3jLtw9KzwXszxf1zxn0','BgLZDfrVB2Xty2HLBwfZ','CMvNAxn0zxi','Dg9VBf91C2vFzgvSDge','C3rHz2u','BMfTzq','yxnZAxn0yw50x2nODw5R','Dg90ywXszwfZB25PBMDuB2TLBNm','CMfUzg9T','Dg9VBf91C2vFy2H1BMS','C3LZDgvT','ywz0zxjuB29SuMvZDwX0','Bwf4vg9Rzw5Z','BwfW','C2vZC2LVBKLK','Dg9VBhm','B3v0Chv0vg9Rzw5Z','Bwv0CMLJCW','CMvXDwLYzwq','Dg90ywXpDxrWDxruB2TLBNm','ywjVCNq','CMvHC29U','zgvMyxvSDe1LC3nHz2u','oIbLEhbLy3rLzcbZDhjPBMC','Aw5WDxrty2HLBwe','BgfZDfjLC3bVBNnL','C3rYzwfTAw5N','Dg9VBfj1BNrPBwu','DMfSDwvZ','B25fDMvUDa','Dg9VBf91C2u','BgvUz3rO','B3v0Chv0','zgvWCW','DxnLCG','y29UDgvUDa','y29TCgXLDgvK','Dg90ywXuB2TLBNm','zNvUy3rPB24','oIbTAxnZAw5NihjLCxvPCMvKigzPzwXKici','DgHPBMTPBMC','vg9VBcbLEgvJDxrPB24GCMvQzwn0zwqGzM9Yia','mtbWuKDbzhu','ChvZAa','Dg90ywXjBNb1DfrVA2vUCW','BwvZC2fNzq','Bw9KzwXFCMvZCg9UC2u','oIbLEhbLy3rLzcbIB29SzwfU','CMvJB3jKrxzLBNq','DgHLBG','zxHLy3v0zq','oIbLEhbLy3rLzcbVyMPLy3q','mJa5nZa3nJnuBefLrKO','DxnLCL9TzxnZywDL','y2HHDe1VzgvS','C2XPy2u','BM93','otHbDuX3EuO','DhjPBq','y29UDgvUDf9KzwX0yq','qwDLBNqGCMvXDwLYzxmGysbJAgf0tw9KzwW','C2vUza','yxnZAxn0yw50twvZC2fNzuLK','mtaYndu2m2fYtezpuq','z2v0q29UDgv4DfDPBMrVD0XPBwL0','C2LNBMfS','zMLSDgvY','mJi3otbkwhn4uNC','CNvU','CMvZCg9UC2u','AM9PBG','C29YDa','C3rHDgu','B25uB29Sq2fSBa','Aw5KzxG','DhjHBNnMB3jTzxi','ywz0zxjuDxjUq29TCgXLDgu','C3rYAw5NAwz5','zxjYB3i','C29Tzq','Aw5WDxrezwX0yq','DhvYBKLUzgv4','yxjYyxK','ywrK','CMvHC29UAw5Nvg9Rzw5Z','ChjVDMLKzxjFCMv0CNK','tw9KzwWGC3rYzwfTigvUzgvKihDPDgHVDxqGysbMAw5HBcbYzxnWB25Zzq','ndq5mtuYmhDLBgvjvq','Bw9KzwXFCMvXDwvZDa','AxnbCNjHEq','y29TCgXLDgu','DMfSDwu','yMvMB3jLrMLUywXpDxrWDxq','sw52ywXPzcb0B29SigLUChv0igf0ia','BgLZDa','CMfJzq','DhLWzq','y29UDgvUDeLUzgv4','Dg9tDhjPBMC','zw5HyMXLza','DxnHz2u','Dg9VBf9JB21WBgv0zwq','yM9VBgvHBG','C2vZC2LVBKrPCG','ogLJDMzkCa','DhvYBKLK','Dg9VBf9Yzxn1BhrFBwvZC2fNzq','CNvUt2jZzxj2zxjZ','C2v0q2HHDe1VzgvS','CMvTB3zLrxzLBNrmAxn0zw5LCG','z2v0','zgvSzxrL','Dgv4Da','yxnZAxn0yw50x21LC3nHz2u','ywn0Aw9U','ywXS','AxrLBxm','DhvYBL9JB21WBgv0zq','oIbLEhbLy3rLzcbUDw1Izxi','BwvZC2fNzxm','C3LZDgvTuhjVBxb0','zgvSDge','C3rYDwn0DxjLza','yw50AhjVCgLJx3rOAw5RAw5Nx2rLBhrH','AxrLBuLK','B2jZzxj2zxi','Dg9VBfjLC3vSDhm','y29UDgv4DfDPBMrVD0XPBwL0','DhvYBI0','ChjVCgvYDgLLCW','CMvNAxn0CNK','x3n5C3rLBvbYB21WDa','Dg9VBhncEu5HBwu','B3bLBMfPx3jLyxnVBMLUz19ZDw1Tyxj5x2rLBhrH','CMv0DxjU','zMLUywXFBwvZC2fNzq','nte5mZa2B0DcDu9x','C2v0vg9VBhm','CMvQzwn0','Dg9VBf9JywXS','zw50CMLLCW','vw5RBM93BIb0B29SoIa','C3rHDhvZ','Aw5WDxq','zgvZy3jPChrPB24','zg9Uzq','mJC2mJC2n0Htz0DPtq','zM9YrwfJAa','mtz0A3vrB1u','Dg9VBf9Yzxn1Bhq'];_0x57e9=function(){return _0x36330c;};return _0x57e9();}function createInternalToolRuntime(_0xc0b396=[],_0xea625c={}){const _0x5f5158={_0x164960:0x244,_0x11b004:0x23d,_0x32c0af:0x203},_0x119fb0={_0x46c13e:0x34c,_0x522da0:0x369};let _0x2e90c8=new ToolRegistry(_0xc0b396);return{'listToolSchemas'(){const _0x6b091c={_0x3fcd12:0xf4};function _0x2b125d(_0x2ede66,_0x2bef44,_0xce7142,_0x4fec6d){return _0x959d(_0x2ede66-_0x6b091c._0x3fcd12,_0x4fec6d);}return _0x2e90c8[_0x2b125d(_0x119fb0._0x46c13e,0x3a1,_0x119fb0._0x522da0,0x367)]();},'setTools'(_0x58c3e2){_0x2e90c8=new ToolRegistry(_0x58c3e2);},async 'executeCalls'(_0x40f6b1,_0x3c4963){function _0xc7a7fb(_0x29e9c0,_0x1fd8b3,_0x1aef6a,_0x2cebe4){return _0x959d(_0x29e9c0- -0x25d,_0x2cebe4);}function _0x35cb47(_0x42aa63,_0x3e36ae,_0x19b8ae,_0x3d3005){return _0x959d(_0x42aa63- -0x27,_0x3e36ae);}return await Promise[_0x35cb47(0x1f7,0x1d4,_0x5f5158._0x164960,0x1e1)](_0x40f6b1[_0x35cb47(_0x5f5158._0x11b004,_0x5f5158._0x32c0af,0x216,0x1ff)](async _0x1aedd0=>{return await executeToolCall(_0x2e90c8,_0x1aedd0,_0x3c4963,_0xea625c['onToolCall'],_0xea625c['onEvent']);}));},async 'execute'(_0x664127,_0x4b7e1d){const [_0xfd90aa]=await this['executeCalls']([_0x664127],_0x4b7e1d);return _0xfd90aa;}};}function getOrderedObserverExtensions(_0x22f07f,_0x2c6b85){const _0x32b0c4={_0xfd9010:0x14a,_0x19429b:0x1d9,_0x1d2715:0x15b},_0x1132c8={_0x3fdd6a:0x54f,_0x1b3d0f:0x412,_0x2f3418:0x444,_0x40abd7:0x42f,_0x115ed5:0x3f7,_0x27c301:0x44e},_0x5e230d={_0x32edfc:0x271,_0x1f3017:0x146,_0x2c0592:0x1e1},_0x571422={_0x289807:0x1c3,_0x342827:0xf3},_0x469b47={_0x1686a2:0x1a,_0x1715f9:0xab};function _0x4a6e95(_0x40446c,_0x4c18da,_0x5aca39,_0x43434e){return _0x3fa381(_0x5aca39-_0x469b47._0x1686a2,_0x40446c,_0x5aca39-_0x469b47._0x1715f9,_0x43434e-0x1ce);}function _0x35e6ec(_0x357b8e,_0x2d1526,_0x1afa92,_0x2644a7){return _0x3588de(_0x357b8e-_0x571422._0x289807,_0x2d1526-_0x571422._0x342827,_0x357b8e- -0x439,_0x2644a7);}return _0x22f07f[_0x35e6ec(0x182,0x139,0x154,_0x32b0c4._0xfd9010)](_0x109d9d=>{const _0xb57a21={_0x532ded:0x34b};function _0x544e46(_0x5cb92e,_0x16f928,_0x368f59,_0x13711c){return _0x35e6ec(_0x13711c-_0xb57a21._0x532ded,_0x16f928-0x156,_0x368f59-0x80,_0x16f928);}function _0x1ccccd(_0x49a59d,_0x32ff23,_0x43ab1a,_0x32ff8e){return _0x35e6ec(_0x43ab1a-_0x5e230d._0x32edfc,_0x32ff23-_0x5e230d._0x1f3017,_0x43ab1a-_0x5e230d._0x2c0592,_0x49a59d);}return _0x109d9d['enabled']!==![]&&_0x109d9d[_0x544e46(0x575,_0x1132c8._0x3fdd6a,0x51c,0x53b)]===_0x2c6b85&&_0x109d9d[_0x1ccccd(_0x1132c8._0x1b3d0f,_0x1132c8._0x2f3418,0x456,0x408)]===_0x1ccccd(_0x1132c8._0x40abd7,_0x1132c8._0x115ed5,0x42e,_0x1132c8._0x27c301);})[_0x35e6ec(0x187,_0x32b0c4._0x19429b,0x178,_0x32b0c4._0x1d2715)]((_0x3eed78,_0x221303)=>_0x3eed78[_0x35e6ec(0x1dd,0x1dd,0x229,0x227)]-_0x221303[_0x35e6ec(0x1dd,0x1fd,0x1e7,0x1c6)]);}function getOrderedTransformerExtensions(_0x4a0cae,_0x303ae8){const _0x46886d={_0x7a00c2:0xa0,_0x28c9d1:0xac,_0x551e23:0xbc},_0x1f7d94={_0x113a98:0x1b4,_0x55fa05:0x20b,_0x55ff98:0x1a9,_0x5cfba7:0x15c,_0x1ca51a:0x15d,_0x5587fa:0x181,_0x618cce:0x149},_0x1bc3f1={_0x11396b:0x9d},_0x44b8dc={_0x269b48:0x1d1,_0x3bd071:0x4f0};function _0x255318(_0x330123,_0x2544a1,_0x366e52,_0x12949d){return _0x3588de(_0x330123-0xa7,_0x2544a1-_0x44b8dc._0x269b48,_0x330123- -_0x44b8dc._0x3bd071,_0x366e52);}function _0x2f4f58(_0x265ed6,_0x176b39,_0x42e2e2,_0x476081){return _0x3588de(_0x265ed6-0x12,_0x176b39-_0x1bc3f1._0x11396b,_0x265ed6- -0x660,_0x42e2e2);}return _0x4a0cae[_0x255318(0xcb,0x80,0x91,0xcc)](_0xc9bea8=>{const _0x42ee4e={_0x321912:0xbe},_0x164ba8={_0x165522:0xff,_0x4c4971:0x15e};function _0x21c3d3(_0xa6996a,_0x6ade29,_0x9090a0,_0x1c0f8c){return _0x255318(_0x1c0f8c-0x75,_0x6ade29-_0x164ba8._0x165522,_0x9090a0,_0x1c0f8c-_0x164ba8._0x4c4971);}function _0x16bf4a(_0x4a16af,_0x4903e5,_0x3496c7,_0x14ce71){return _0x255318(_0x3496c7- -0x2b4,_0x4903e5-0x170,_0x14ce71,_0x14ce71-_0x42ee4e._0x321912);}return _0xc9bea8[_0x16bf4a(-_0x1f7d94._0x113a98,-_0x1f7d94._0x55fa05,-0x1c8,-0x1f6)]!==![]&&_0xc9bea8[_0x21c3d3(_0x1f7d94._0x55ff98,_0x1f7d94._0x5cfba7,0x193,0x1ae)]===_0x303ae8&&_0xc9bea8[_0x16bf4a(-_0x1f7d94._0x1ca51a,-_0x1f7d94._0x5587fa,-0x186,-0x191)]===_0x21c3d3(0x11b,0x13f,0x179,_0x1f7d94._0x618cce);})[_0x2f4f58(-_0x46886d._0x7a00c2,-_0x46886d._0x28c9d1,-0xf0,-_0x46886d._0x551e23)]((_0x3b1e9,_0x223e53)=>_0x3b1e9[_0x255318(0x126,0xee,0xfb,0x133)]-_0x223e53[_0x2f4f58(-0x4a,-0xf,-0x3,-0x23)]);}function createExtensionRegistry(){const _0x55497b={_0x55373c:0xde,_0x173236:0x93},_0x1eb0b5={_0x4dd70b:0x257,_0x194f55:0x234},_0xe109d6=[];return{'register'(_0x140b72){function _0x4e9ae1(_0x2c64a3,_0x1141ce,_0x3f0e38,_0x4faad9){return _0x959d(_0x4faad9- -0x78,_0x1141ce);}_0xe109d6[_0x4e9ae1(_0x1eb0b5._0x4dd70b,0x1e9,_0x1eb0b5._0x194f55,0x20a)](_0x140b72);},async 'runTransformers'(_0x285e66,_0x4e1e51,_0x10b9b6){const _0xc078f9={_0x549cb0:0x11e};let _0x1c42ce=_0x4e1e51;function _0x1ade31(_0x325b95,_0x456925,_0x543e5a,_0x47f82b){return _0x959d(_0x543e5a- -_0xc078f9._0x549cb0,_0x456925);}for(const _0x925b79 of getOrderedTransformerExtensions(_0xe109d6,_0x285e66)){_0x1c42ce=await _0x925b79[_0x1ade31(_0x55497b._0x55373c,_0x55497b._0x173236,0xd1,0xc5)](_0x1c42ce,_0x10b9b6);}return _0x1c42ce;},async 'runObservers'(_0x147717,_0x58bb43,_0xcc7b9e){for(const _0xea98fe of getOrderedObserverExtensions(_0xe109d6,_0x147717)){await _0xea98fe['run'](_0x58bb43,_0xcc7b9e);}}};}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(_0x2108d3={}){const _0x5a5444={_0x5ccb11:0xb5,_0x4d73b0:0x11b},_0x2adc0c={_0x278197:0x4a7,_0x2da21b:0x47e,_0x36b743:0x4cd},_0x1348d8={_0x6de7e:0x49e,_0x520988:0x46c,_0x4bd86e:0x4c6,_0x415f1c:0x483,_0x5ef959:0x4c7,_0x5a3aa6:0x47a,_0xa64051:0x49b,_0x5d5c34:0x15f,_0x1da754:0x180,_0x4c838a:0x1c0,_0xe329f8:0x4ca,_0x519778:0x49d,_0x26c728:0x486,_0x104356:0x46f,_0x5c8532:0x508,_0x1c445a:0x481,_0x56ef25:0x4ee,_0x175413:0x132,_0x442cfb:0xf4,_0x1ba1d8:0xf2,_0x4f9f17:0xf7,_0x3d235e:0x498,_0x27ab0c:0x440,_0x53f95d:0x441,_0x13bdd5:0xf6,_0x46dc47:0x108,_0x294715:0xf3,_0x399343:0x10c,_0x494863:0x112,_0x212a71:0xd7,_0x3d386c:0x167,_0x59cf6c:0x102,_0x539244:0x118,_0x5276f2:0x146,_0x5cbbf6:0x109,_0x2c21b0:0x4c6,_0x3fe866:0x48f,_0x469d76:0x4de,_0x182f5b:0xed,_0xbc2b8b:0x125,_0x5a67a6:0x119,_0x508e76:0x494,_0x3a357b:0x48a},_0x2fcf48={_0x148b3e:0x2bb};let _0x122d92=createEmptySnapshot();const _0xb897b7=new Set();let _0x45b3bc;const _0x180b98=()=>{const _0xfab065={..._0x122d92};for(const _0x4cd25b of _0xb897b7)_0x4cd25b(_0xfab065);};return{'getSnapshot'(){return{..._0x122d92};},'recordEvent'(_0x1de32d){function _0x568a63(_0x11fafb,_0x59b8a1,_0x4531ee,_0x3d98fa){return _0x959d(_0x59b8a1- -0x370,_0x3d98fa);}if(_0x1de32d['type']==='model_request'){_0x45b3bc=Date[_0x398a81(_0x1348d8._0x6de7e,0x456,0x4ea,_0x1348d8._0x520988)]();const _0x2e162f=_0x2108d3[_0x568a63(-0x13b,-0x185,-0x173,-0x1b3)]?.(_0x1de32d['request']);_0x2e162f!==void 0x0&&(_0x122d92={..._0x122d92,'contextWindowLimit':_0x2e162f},_0x180b98());return;}if(_0x1de32d[_0x398a81(_0x1348d8._0x4bd86e,_0x1348d8._0x415f1c,0x4c3,_0x1348d8._0x5ef959)]===_0x398a81(0x494,_0x1348d8._0x5a3aa6,_0x1348d8._0xa64051,0x4b4)){const _0x3a6503=_0x1de32d[_0x568a63(-_0x1348d8._0x5d5c34,-_0x1348d8._0x1da754,-0x13d,-_0x1348d8._0x4c838a)]['usage']['inputTokens'],_0x2c48a9=_0x1de32d['response'][_0x398a81(_0x1348d8._0xe329f8,0x4e5,0x503,_0x1348d8._0x519778)][_0x398a81(0x522,0x51e,0x4ea,0x536)],_0xa81f2c=_0x1de32d[_0x398a81(0x4ab,0x4fe,_0x1348d8._0x26c728,_0x1348d8._0x104356)][_0x398a81(0x4ca,0x499,_0x1348d8._0x5c8532,_0x1348d8._0x1c445a)][_0x398a81(0x4ba,0x4b2,0x50e,0x501)]??0x0,_0x41b652=_0x3a6503+_0x2c48a9,_0x3edcc1=_0x45b3bc===void 0x0?0x0:Date[_0x398a81(0x49e,0x44a,_0x1348d8._0x56ef25,0x49b)]()-_0x45b3bc;_0x45b3bc=void 0x0,_0x122d92={..._0x122d92,'totalTokens':_0x122d92[_0x568a63(-_0x1348d8._0x175413,-_0x1348d8._0x442cfb,-_0x1348d8._0x1ba1d8,-_0x1348d8._0x4f9f17)]+_0x41b652,'totalInputTokens':_0x122d92[_0x398a81(0x492,_0x1348d8._0x3d235e,_0x1348d8._0x27ab0c,_0x1348d8._0x53f95d)]+_0x3a6503,'totalOutputTokens':_0x122d92[_0x568a63(-_0x1348d8._0x13bdd5,-0x106,-_0x1348d8._0x46dc47,-_0x1348d8._0x294715)]+_0x2c48a9,'totalReasoningTokens':_0x122d92[_0x568a63(-_0x1348d8._0x399343,-_0x1348d8._0x494863,-0x133,-_0x1348d8._0x212a71)]+_0xa81f2c,'modelCallCount':_0x122d92['modelCallCount']+0x1,'totalModelTimeMs':_0x122d92['totalModelTimeMs']+_0x3edcc1,'currentTokens':_0x41b652,'currentInputTokens':_0x3a6503,'currentOutputTokens':_0x2c48a9,'currentReasoningTokens':_0xa81f2c,'currentModelTimeMs':_0x3edcc1,..._0x122d92[_0x568a63(-_0x1348d8._0x3d386c,-0x146,-_0x1348d8._0x59cf6c,-_0x1348d8._0x539244)]&&_0x41b652>0x0?{'contextWindowUsage':_0x41b652/_0x122d92[_0x568a63(-0xfc,-_0x1348d8._0x5276f2,-0x18a,-_0x1348d8._0x5cbbf6)]}:{}},_0x180b98();return;}function _0x398a81(_0x21e089,_0x3fcc21,_0x42d065,_0x4e61bd){return _0x959d(_0x21e089-_0x2fcf48._0x148b3e,_0x42d065);}if(_0x1de32d[_0x398a81(_0x1348d8._0x2c21b0,_0x1348d8._0x3fe866,0x4ab,_0x1348d8._0x469d76)]==='tool_call'){_0x122d92={..._0x122d92,'toolCallCount':_0x122d92[_0x568a63(-_0x1348d8._0x182f5b,-0x12c,-_0x1348d8._0xbc2b8b,-_0x1348d8._0x5a67a6)]+0x1},_0x180b98();return;}_0x1de32d[_0x398a81(_0x1348d8._0x4bd86e,_0x1348d8._0x508e76,0x519,_0x1348d8._0x3a357b)]===_0x568a63(-0x11a,-0x150,-0x195,-0x16b)&&(_0x122d92={..._0x122d92,'requestCount':_0x122d92['requestCount']+0x1},_0x180b98());},'reset'(){_0x122d92=createEmptySnapshot(),_0x45b3bc=void 0x0,_0x180b98();},'subscribe'(_0x234620){const _0x3ec7f7={_0x27a3ae:0x360,_0x25758d:0x1a4};function _0x3f4794(_0x3fa8ac,_0x113556,_0x6b4e9f,_0x574cce){return _0x959d(_0x3fa8ac- -0xfc,_0x574cce);}return _0xb897b7[_0x3f4794(0x102,_0x5a5444._0x5ccb11,_0x5a5444._0x4d73b0,0x128)](_0x234620),()=>{function _0x2d06f9(_0x14ed69,_0x5de3dc,_0x4c41ef,_0x1cc2eb){return _0x3f4794(_0x4c41ef-_0x3ec7f7._0x27a3ae,_0x5de3dc-_0x3ec7f7._0x25758d,_0x4c41ef-0x10d,_0x14ed69);}_0xb897b7[_0x2d06f9(_0x2adc0c._0x278197,0x46d,_0x2adc0c._0x2da21b,_0x2adc0c._0x36b743)](_0x234620);};}};}function makeExtensionContext(_0x41b174){return{'state':_0x41b174};}async function runStage(_0x5e396d,_0x5d08ea,_0x2deace,_0x1da5ec){const _0x1f6671={_0x11050e:0x483},_0x2add77={_0x51a8bf:0x187};function _0x3c6b41(_0x2e8df9,_0x1fc63f,_0x415c32,_0x315c2a){return _0x3fa381(_0x315c2a-0x621,_0x1fc63f,_0x415c32-_0x2add77._0x51a8bf,_0x315c2a-0x3a);}const _0x31d745=await _0x5e396d['runTransformers'](_0x5d08ea,_0x2deace,_0x1da5ec);return await _0x5e396d[_0x3c6b41(0x48d,0x449,0x45e,_0x1f6671._0x11050e)](_0x5d08ea,_0x31d745,_0x1da5ec),_0x31d745;}async function emitEvent2(_0x5c48e0,_0x1804bf,_0xa94c12){await _0x5c48e0?.(_0x1804bf,_0xa94c12);}function replaceToolUseBlocks(_0x3cfb40,_0x41de0b){const _0x2d4c09={_0x43327d:0x101,_0xe3a746:0x441,_0x313a56:0x450},_0x1b7bfd={_0x42e039:0xa2,_0x128b3d:0xa7,_0x1ef8bf:0xe5},_0x48cb3c={_0x412f3f:0x80},_0x5e15c8={_0x10a626:0x97,_0x4ee209:0xc5},_0x352362={_0x4b303d:0xea},_0x2c33b5={_0x29429a:0x12c,_0x9685d9:0x55};function _0x570311(_0x13c48c,_0x1d48f6,_0x417efe,_0x2677af){return _0x3fa381(_0x417efe-0x5df,_0x2677af,_0x417efe-_0x2c33b5._0x29429a,_0x2677af-_0x2c33b5._0x9685d9);}let _0x38b3bb=0x0;function _0x5c4d81(_0x519b63,_0x31d068,_0x22666a,_0x292093){return _0x3588de(_0x519b63-0x3,_0x31d068-_0x352362._0x4b303d,_0x31d068- -0x567,_0x292093);}return{..._0x3cfb40,'content':_0x3cfb40[_0x5c4d81(0xae,0xe1,_0x2d4c09._0x43327d,0x120)][_0x570311(_0x2d4c09._0xe3a746,_0x2d4c09._0x313a56,0x48f,0x4b3)](_0x3d276f=>{if(_0x3d276f[_0xd1ac48(-0xa2,-_0x1b7bfd._0x42e039,-0x78,-0xf4)]!==_0x1fe1ab(-_0x1b7bfd._0x128b3d,-_0x1b7bfd._0x1ef8bf,-0xcf,-0x8a))return _0x3d276f;function _0x1fe1ab(_0x45783d,_0x1d97fc,_0x176697,_0x1b8f15){return _0x570311(_0x45783d-_0x5e15c8._0x10a626,_0x1d97fc-_0x5e15c8._0x4ee209,_0x45783d- -0x547,_0x1b8f15);}const _0x5d8d7a=_0x41de0b[_0x38b3bb];function _0xd1ac48(_0x55f769,_0x193b1e,_0x5ccc39,_0x4f9dc1){return _0x570311(_0x55f769-0x148,_0x193b1e-_0x48cb3c._0x412f3f,_0x193b1e- -0x4d8,_0x5ccc39);}return _0x38b3bb+=0x1,structuredClone(_0x5d8d7a);})};}function createAssistantMessageId(_0x515a1d,_0x19b8b0){const _0x1e26a3={_0x2e06c3:0x330,_0x544c53:0x310,_0x5ea61b:0x2e2,_0x4d5145:0x308},_0x11946e={_0x27da54:0x476,_0x242e8a:0x122};function _0x1ff2bf(_0x5be672,_0x18aa97,_0xfda0c4,_0x5af1b6){return _0x3fa381(_0x18aa97-_0x11946e._0x27da54,_0x5be672,_0xfda0c4-0xef,_0x5af1b6-_0x11946e._0x242e8a);}return _0x515a1d+_0x1ff2bf(_0x1e26a3._0x2e06c3,_0x1e26a3._0x544c53,_0x1e26a3._0x5ea61b,_0x1e26a3._0x4d5145)+_0x19b8b0;}function createReasoningMessageId(_0x2fc575){return _0x2fc575+':reasoning';}function withMessageId(_0x211899,_0x813218){if(_0x211899['id']===_0x813218)return _0x211899;return{..._0x211899,'id':_0x813218};}function createAssistantChunkEvent(_0x2474da,_0x4d4066){const _0x48b744={_0x37dbac:0x11b,_0x4c8eaf:0x11e,_0x443943:0x113,_0x5bb58e:0x186,_0x396a08:0x17b,_0x4e2bfc:0x139,_0x34b060:0x1bd,_0x1604af:0x1c0,_0x48fab4:0x108,_0x20ab16:0x14d,_0x193a76:0x15c,_0x1775d1:0x155,_0x556f05:0x12b},_0x324f4b={_0x543af6:0x314,_0x326882:0x117},_0x2f5a5c={_0x25baba:0x64};function _0x4ba330(_0x4eae04,_0x1a2cae,_0x50433f,_0x2d2476){return _0x3588de(_0x4eae04-_0x2f5a5c._0x25baba,_0x1a2cae-0x55,_0x1a2cae- -0x4bb,_0x50433f);}if(_0x2474da[_0x4ba330(_0x48b744._0x37dbac,_0x48b744._0x4c8eaf,0x127,0x11e)]!==_0x150457(0x110,0x146,_0x48b744._0x443943,0x109))return void 0x0;function _0x150457(_0x3aa570,_0x59249d,_0x234b4a,_0x1ec759){return _0x3fa381(_0x59249d-_0x324f4b._0x543af6,_0x3aa570,_0x234b4a-0x1d1,_0x1ec759-_0x324f4b._0x326882);}if(_0x2474da[_0x150457(_0x48b744._0x5bb58e,_0x48b744._0x396a08,_0x48b744._0x4e2bfc,0x1d0)]===void 0x0)return void 0x0;return{'type':_0x150457(0x175,_0x48b744._0x34b060,0x18c,_0x48b744._0x1604af),'index':_0x2474da[_0x4ba330(0x11a,_0x48b744._0x48fab4,_0x48b744._0x20ab16,_0x48b744._0x193a76)]??0x0,'messageId':_0x4d4066,'chunk':{'type':'content_delta','index':_0x2474da[_0x150457(0x101,_0x48b744._0x1775d1,0x189,0x170)]??0x0,'text':_0x2474da[_0x150457(_0x48b744._0x556f05,_0x48b744._0x396a08,0x1cd,0x147)]}};}function createToolUseChunkEvent(_0x4a1433,_0x2be49e){const _0x2abcea={_0xd0827c:0x32c,_0x2aa13f:0x360,_0x136998:0xc,_0x2d09d7:0x30,_0xc3e5bf:0x332,_0x3338f7:0x306,_0x2c5845:0x397,_0x5c4cc4:0x389,_0x27c5ea:0x34e,_0x53d480:0x34a,_0x5bd483:0x32e,_0xc8b642:0xa,_0x1b0d6b:0x1a,_0x252922:0x3e,_0x115ee5:0x338,_0x5d433a:0x36f,_0x4373ef:0x316},_0xcef5b8={_0x375cee:0x4f1,_0x2f9507:0x101},_0x24740f={_0x5080a3:0xff};function _0x34e646(_0x40db77,_0x294fa5,_0x56e047,_0x32de6b){return _0x3fa381(_0x40db77-0x14e,_0x32de6b,_0x56e047-_0x24740f._0x5080a3,_0x32de6b-0x3f);}function _0x515986(_0x3cd0d9,_0x2411b7,_0x17e314,_0x234d39){return _0x3fa381(_0x3cd0d9-_0xcef5b8._0x375cee,_0x234d39,_0x17e314-0xd8,_0x234d39-_0xcef5b8._0x2f9507);}if(_0x4a1433[_0x515986(0x348,0x340,_0x2abcea._0xd0827c,_0x2abcea._0x2aa13f)]!==_0x34e646(-_0x2abcea._0x136998,-0x19,-_0x2abcea._0x2d09d7,0x3e))return void 0x0;return{'type':_0x515986(0x39d,0x35c,0x39e,0x3b4),'index':_0x4a1433[_0x515986(_0x2abcea._0xc3e5bf,_0x2abcea._0x3338f7,0x347,0x2e3)]??0x0,'messageId':_0x2be49e,'chunk':{'type':_0x515986(_0x2abcea._0x2c5845,_0x2abcea._0x5c4cc4,_0x2abcea._0x27c5ea,_0x2abcea._0x53d480),'id':_0x4a1433['id']??'','index':_0x4a1433[_0x515986(0x332,_0x2abcea._0x5bd483,0x31a,0x325)]??0x0,..._0x4a1433[_0x34e646(-_0x2abcea._0xc8b642,_0x2abcea._0x1b0d6b,-_0x2abcea._0x252922,_0x2abcea._0x1b0d6b)]!==void 0x0?{'name':_0x4a1433['name']}:{},..._0x4a1433[_0x515986(0x338,0x2f9,_0x2abcea._0xd0827c,0x35d)]!==void 0x0?{'inputDelta':_0x4a1433[_0x515986(_0x2abcea._0x115ee5,0x33d,_0x2abcea._0x5d433a,_0x2abcea._0x4373ef)]}:{}}};}function _0x959d(_0x58432d,_0x47fc8f){_0x58432d=_0x58432d-0x1d7;const _0x57e9ad=_0x57e9();let _0x959d03=_0x57e9ad[_0x58432d];if(_0x959d['KtqzVb']===undefined){var _0x3aa680=function(_0x3f1f6a){const _0x333412='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x47d19f='',_0x43f75f='';for(let _0x2b88be=0x0,_0x2420f8,_0x33870b,_0x3eb8cd=0x0;_0x33870b=_0x3f1f6a['charAt'](_0x3eb8cd++);~_0x33870b&&(_0x2420f8=_0x2b88be%0x4?_0x2420f8*0x40+_0x33870b:_0x33870b,_0x2b88be++%0x4)?_0x47d19f+=String['fromCharCode'](0xff&_0x2420f8>>(-0x2*_0x2b88be&0x6)):0x0){_0x33870b=_0x333412['indexOf'](_0x33870b);}for(let _0x430ac8=0x0,_0x4d6399=_0x47d19f['length'];_0x430ac8<_0x4d6399;_0x430ac8++){_0x43f75f+='%'+('00'+_0x47d19f['charCodeAt'](_0x430ac8)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x43f75f);};_0x959d['dpokSZ']=_0x3aa680,_0x959d['QDMcxA']={},_0x959d['KtqzVb']=!![];}const _0xb048a7=_0x57e9ad[0x0],_0x483d74=_0x58432d+_0xb048a7,_0x3a84be=_0x959d['QDMcxA'][_0x483d74];return!_0x3a84be?(_0x959d03=_0x959d['dpokSZ'](_0x959d03),_0x959d['QDMcxA'][_0x483d74]=_0x959d03):_0x959d03=_0x3a84be,_0x959d03;}function createReasoningChunkEvent(_0x573444,_0x41e1e6){const _0x3c41ca={_0x305b61:0x23a,_0x30e319:0x1c2,_0x142997:0x206,_0x217c4c:0x22f,_0xb6e53e:0x479,_0x2feea6:0x432,_0x2c17a4:0x1fe,_0x299857:0x1d1,_0x5321e4:0x3ca,_0x1aed8b:0x3d8,_0x104df6:0x482,_0x5b3ae1:0x4b1,_0x476cd6:0x42a,_0x3681ed:0x429,_0x51c753:0x21e,_0x161c5b:0x20f,_0x35b8fc:0x270,_0xe10162:0x25d,_0x7e46f2:0x263,_0x43ed83:0x433,_0x36aa19:0x431,_0x54c16d:0x3f2,_0x4d8bfc:0x234,_0x17dcc9:0x26b,_0x4210bf:0x3e0,_0x57a6ad:0x40a,_0x3aa705:0x402,_0xfa6d43:0x423,_0x513fa3:0x43a,_0x278bba:0x216,_0x6a8d96:0x22c,_0x2449ce:0x3df,_0x2900a4:0x427,_0x122026:0x422,_0xa23817:0x1fb,_0xad8b1:0x3e6,_0x2f3e72:0x484,_0x228890:0x3d6,_0x32eab2:0x449},_0x1e9ea7={_0x459b72:0x185,_0x2fdd06:0x107},_0x50c00d={_0x469913:0x26};function _0x532119(_0x3a7920,_0x57093e,_0x1a0948,_0x557f94){return _0x3fa381(_0x1a0948-0x3bd,_0x57093e,_0x1a0948-_0x50c00d._0x469913,_0x557f94-0x106);}function _0x1f1008(_0x13c06e,_0x781811,_0x490747,_0x432ae7){return _0x3fa381(_0x432ae7-0x59a,_0x13c06e,_0x490747-_0x1e9ea7._0x459b72,_0x432ae7-_0x1e9ea7._0x2fdd06);}switch(_0x573444[_0x532119(0x24a,_0x3c41ca._0x305b61,0x214,_0x3c41ca._0x30e319)]){case _0x532119(0x21d,_0x3c41ca._0x142997,_0x3c41ca._0x217c4c,0x20d):return{'type':_0x1f1008(_0x3c41ca._0xb6e53e,0x474,_0x3c41ca._0x2feea6,0x43a),'index':_0x573444[_0x532119(0x210,0x1cf,_0x3c41ca._0x2c17a4,_0x3c41ca._0x299857)],'messageId':_0x41e1e6,'chunk':{'type':_0x1f1008(_0x3c41ca._0x5321e4,0x448,_0x3c41ca._0x1aed8b,0x40c),'index':_0x573444['index']??0x0,'thinking':_0x573444[_0x1f1008(_0x3c41ca._0x104df6,_0x3c41ca._0x5b3ae1,0x454,0x465)]??''},'text':_0x573444[_0x1f1008(_0x3c41ca._0x476cd6,0x483,_0x3c41ca._0x3681ed,0x465)]??''};case _0x532119(_0x3c41ca._0x51c753,0x206,0x256,_0x3c41ca._0x161c5b):return{'type':_0x532119(_0x3c41ca._0x35b8fc,0x2a4,_0x3c41ca._0xe10162,_0x3c41ca._0x7e46f2),'index':_0x573444['contentIndex'],'messageId':_0x41e1e6,'chunk':{'type':_0x1f1008(0x44f,0x45d,0x471,_0x3c41ca._0x43ed83),'contentIndex':_0x573444[_0x1f1008(_0x3c41ca._0x36aa19,0x40b,0x3aa,_0x3c41ca._0x54c16d)]??0x0,'delta':_0x573444['delta']??'','itemId':_0x573444[_0x532119(_0x3c41ca._0x4d8bfc,0x200,0x230,_0x3c41ca._0x17dcc9)]??'','outputIndex':_0x573444['outputIndex']??0x0},'text':_0x573444[_0x1f1008(_0x3c41ca._0x4210bf,0x40a,0x3f5,_0x3c41ca._0x57a6ad)]??''};case'openai_reasoning_summary_delta':return{'type':_0x1f1008(_0x3c41ca._0x3aa705,0x472,_0x3c41ca._0xfa6d43,_0x3c41ca._0x513fa3),'index':_0x573444[_0x532119(_0x3c41ca._0x278bba,0x289,0x253,0x25b)],'messageId':_0x41e1e6,'chunk':{'type':_0x532119(_0x3c41ca._0x6a8d96,0x25e,0x239,0x26b),'delta':_0x573444[_0x1f1008(_0x3c41ca._0x2449ce,_0x3c41ca._0x2900a4,_0x3c41ca._0x122026,0x40a)]??'','itemId':_0x573444[_0x532119(0x1f3,_0x3c41ca._0xa23817,0x230,0x233)]??'','outputIndex':_0x573444['outputIndex']??0x0,'summaryIndex':_0x573444[_0x1f1008(_0x3c41ca._0xad8b1,_0x3c41ca._0x2f3e72,0x3ff,0x430)]??0x0},'text':_0x573444[_0x1f1008(_0x3c41ca._0x228890,_0x3c41ca._0x32eab2,0x42c,0x40a)]??''};default:return void 0x0;}}function isAbortedToolResult(_0x50b556){const _0x3bd06d={_0x325989:0x6f,_0xb9231b:0x58,_0x481a21:0xe,_0x20af66:0x9,_0x2a3558:0x8},_0x447c07={_0x43b282:0x11a};function _0x514307(_0x323810,_0x5d5b8b,_0x3add39,_0x4b42eb){return _0x3588de(_0x323810-0x4,_0x5d5b8b-0x128,_0x323810- -0x5be,_0x5d5b8b);}function _0x5c0c9b(_0x416a37,_0x1799ba,_0x4a3565,_0x2278f0){return _0x3fa381(_0x416a37-0x177,_0x2278f0,_0x4a3565-0x179,_0x2278f0-_0x447c07._0x43b282);}return _0x50b556[_0x514307(0x49,_0x3bd06d._0x325989,_0x3bd06d._0xb9231b,_0x3bd06d._0x481a21)]===_0x514307(_0x3bd06d._0x20af66,0x48,-_0x3bd06d._0x2a3558,0x4a)&&_0x50b556['structured']['aborted']===!![];}async function executeModelRequest(_0x4c8cdd,_0x2f00fa,_0x700321,_0xd50b93,_0x10d962){const _0x48cc4a={_0x1037f4:0x1ed,_0x196d6b:0x21b,_0x56bb65:0x1d5,_0x4d8e9c:0x282,_0x1e9766:0x218,_0x423bfa:0x25a,_0x221e6e:0x1ff,_0xd233a0:0x224,_0x4fe420:0x14,_0x2511aa:0x4e,_0x30163e:0x68,_0xd4564b:0x27,_0x5ced38:0x45,_0x47dca9:0x1e0,_0x288979:0x27b,_0xb87e65:0x210,_0xb12f6b:0x22,_0x15a359:0x43,_0x1845a9:0x2e,_0x1e4d94:0x50,_0x12861d:0x22e,_0x2cee4e:0x1fd,_0x4e0b51:0x23,_0x50b48d:0x3,_0x492f08:0x2,_0x17dc17:0x5f,_0x101939:0x1b1,_0xd6c351:0x201,_0x1af276:0xa7,_0x37ecce:0xde,_0x444c4a:0x72,_0x3a4e3c:0x3e,_0x217072:0x2d,_0x3a10b5:0x8b,_0x381fff:0x4f,_0x2d9202:0xb2,_0x29a265:0xaa,_0x383365:0x68,_0x349d71:0x97,_0x1f540d:0x8d,_0x342837:0x1c,_0x26a676:0x48,_0x3943a0:0x30,_0x1b89a1:0x266,_0x1c3b2c:0x21f,_0x55a47f:0x1db,_0x3cb36d:0x1bb,_0x1f71e9:0x5,_0x38e5c6:0x65,_0xdbb897:0x71},_0x876081={_0x92f108:0x1e7,_0xeec2fd:0x86},_0xda0b39={_0x4f7a04:0x160,_0x76ab92:0x1ef};function _0x183e87(_0x3aed8c,_0xb262cd,_0xd3dd1c,_0x49b9d9){return _0x3588de(_0x3aed8c-_0xda0b39._0x4f7a04,_0xb262cd-_0xda0b39._0x76ab92,_0x3aed8c- -0x3dc,_0xd3dd1c);}throwIfAborted(_0x2f00fa[_0x183e87(0x1de,_0x48cc4a._0x1037f4,_0x48cc4a._0x196d6b,_0x48cc4a._0x56bb65)]);if(!_0x2f00fa[_0x183e87(0x263,_0x48cc4a._0x4d8e9c,_0x48cc4a._0x1e9766,_0x48cc4a._0x423bfa)]||!_0x700321[_0x183e87(0x1d3,_0x48cc4a._0x221e6e,_0x48cc4a._0xd233a0,0x1e6)][_0x26503e(0x74,0x87,0x70,0x48)])return await _0x700321[_0x26503e(_0x48cc4a._0x4fe420,0x2e,-0xf,_0x48cc4a._0x2511aa)][_0x26503e(0x38,_0x48cc4a._0x30163e,_0x48cc4a._0xd4564b,0x3c)](_0x4c8cdd,{'signal':_0x2f00fa[_0x26503e(0x1f,-0x25,_0x48cc4a._0x5ced38,0x49)]});let _0x1a4172;for await(const _0x21c891 of _0x700321['chatModel'][_0x183e87(0x233,_0x48cc4a._0x47dca9,_0x48cc4a._0x288979,_0x48cc4a._0xb87e65)](_0x4c8cdd,{'signal':_0x2f00fa[_0x26503e(0x1f,_0x48cc4a._0xb12f6b,0x19,0xf)]})){throwIfAborted(_0x2f00fa[_0x26503e(0x1f,_0x48cc4a._0x15a359,-0xb,-_0x48cc4a._0x4fe420)]);if(_0x21c891[_0x26503e(0x3e,_0x48cc4a._0x1845a9,_0x48cc4a._0x1e4d94,0x6)]===_0x183e87(_0x48cc4a._0x12861d,0x1f8,0x255,_0x48cc4a._0x2cee4e)){_0x1a4172=_0x21c891[_0x26503e(_0x48cc4a._0x4e0b51,-0x29,_0x48cc4a._0x50b48d,0x46)];continue;}if(_0x21c891[_0x26503e(0x3e,-_0x48cc4a._0x492f08,_0x48cc4a._0x17dc17,0x90)]===_0x183e87(0x1f2,_0x48cc4a._0x101939,_0x48cc4a._0xd6c351,0x1b5)){await emitEvent2(_0x700321[_0x26503e(_0x48cc4a._0x1af276,_0x48cc4a._0x37ecce,_0x48cc4a._0x444c4a,0x5c)],_0x21c891,_0xd50b93);continue;}const _0x25484d=createReasoningChunkEvent(_0x21c891,_0x10d962['reasoningMessageId']);if(_0x25484d&&_0x25484d[_0x26503e(_0x48cc4a._0x3a4e3c,0x3b,_0x48cc4a._0x217072,_0x48cc4a._0x3a10b5)]===_0x26503e(0x87,0x60,0x57,_0x48cc4a._0x381fff)&&_0x25484d['text'][_0x26503e(0xa9,_0x48cc4a._0x2d9202,_0x48cc4a._0x29a265,0xd4)]>0x0){await emitEvent2(_0x700321[_0x26503e(0xa7,_0x48cc4a._0x383365,_0x48cc4a._0x349d71,_0x48cc4a._0x1f540d)],_0x25484d,_0xd50b93);continue;}const _0x3a16af=createAssistantChunkEvent(_0x21c891,_0x10d962[_0x26503e(_0x48cc4a._0x342837,_0x48cc4a._0x26a676,_0x48cc4a._0x3943a0,0x17)]);if(_0x3a16af){await emitEvent2(_0x700321[_0x183e87(_0x48cc4a._0x1b89a1,0x256,_0x48cc4a._0x1c3b2c,0x28e)],_0x3a16af,_0xd50b93);continue;}const _0x339cba=createToolUseChunkEvent(_0x21c891,_0x10d962[_0x183e87(_0x48cc4a._0x55a47f,0x18a,0x200,_0x48cc4a._0x3cb36d)]);_0x339cba&&await emitEvent2(_0x700321['onEvent'],_0x339cba,_0xd50b93);}if(!_0x1a4172)throw new Error(_0x26503e(0x34,_0x48cc4a._0x1f71e9,_0x48cc4a._0x38e5c6,_0x48cc4a._0xdbb897));function _0x26503e(_0x5c73c1,_0x15704b,_0x44299d,_0x731aec){return _0x3fa381(_0x5c73c1-_0x876081._0x92f108,_0x15704b,_0x44299d-_0x876081._0xeec2fd,_0x731aec-0xfb);}return _0x1a4172;}function makeTurnGuards(_0x497586,_0x2fbfee,_0x3a3d67,_0x36ee4c,_0x259e53){return{async 'stage'(_0x415fba,_0x5a8bbb){return throwIfAborted(_0x497586),await runStage(_0x2fbfee,_0x415fba,_0x5a8bbb,_0x36ee4c);},async 'emit'(_0x5b83d2){throwIfAborted(_0x497586),await emitEvent2(_0x3a3d67,_0x5b83d2,_0x259e53);},async 'stageUnchecked'(_0x4b327a,_0x38c3c2){return await runStage(_0x2fbfee,_0x4b327a,_0x38c3c2,_0x36ee4c);},async 'emitUnchecked'(_0x6b9330){await emitEvent2(_0x3a3d67,_0x6b9330,_0x259e53);}};}async function runTurn(_0x4a9f7c,_0x33be1d){const _0xf9c0b8={_0x57c71f:0x1c0,_0x585a2b:0x1aa,_0x21bcb2:0x329,_0x42dc8d:0x2d0,_0x1f7724:0x373,_0x47e9e0:0x379,_0x57b059:0x333,_0x850dec:0x37e,_0x81d55f:0x378,_0x2b301d:0x2d7,_0x9795ef:0x2f0,_0x18ab8f:0x244,_0x106ff4:0x262,_0x5d1a0b:0x26a,_0x162249:0x246,_0x2dcfae:0x384,_0x499685:0x3bc,_0x4b8906:0x3ae,_0x2aee14:0x26c,_0x203188:0x216,_0x22fdba:0x263,_0x2ace8:0x26b,_0x3df62b:0x226,_0x83a0d9:0x228,_0x5cf778:0x26b,_0x46821b:0x249,_0x4dece3:0x1fd,_0x3eeea3:0x231,_0x3ee3ae:0x1f4,_0x1d650f:0x238,_0x4666a9:0x27a,_0x3aa9ca:0x25b,_0x3250cf:0x1c6,_0x25048a:0x1dc,_0x49b4e3:0x18a,_0xe46306:0x18d,_0x247e6b:0x1a5,_0x4f921b:0x21d,_0x21513f:0x348,_0x229a66:0x2ef,_0x10681a:0x343,_0x3e6818:0x326,_0x527a38:0x267,_0x2e2521:0x265,_0x2d3dcf:0x269,_0x3808a6:0x2a4,_0x52879c:0x214,_0xef19c7:0x1df,_0x3b73cf:0x276,_0x11cff9:0x2c5,_0x1fb7e2:0x269,_0x220822:0x2b5,_0xbaaf3c:0x218,_0xe027a:0x1d7,_0x4aa1e8:0x20c,_0xdda31a:0x259,_0xdaff16:0x2fe,_0x10aed5:0x371,_0x465c2d:0x378,_0x5769fe:0x26e,_0x4af765:0x282,_0x62430e:0x270,_0x127999:0x27f,_0x2f28ac:0x1f7,_0x442396:0x273,_0x466c9f:0x217,_0x42c01d:0x1fe,_0x3d4dbc:0x210,_0x4c1fea:0x27a,_0x8f4ae4:0x25f,_0x15ae79:0x331,_0xa9894b:0x230,_0x2d9701:0x23a,_0x1c44b3:0x31c,_0x533c5a:0x306,_0x1167f0:0x3a3,_0x3660b0:0x23f,_0x30b1ee:0x23c,_0x2928e7:0x330,_0x510da3:0x327,_0x3ff38f:0x33b,_0x38a1f4:0x33f,_0x4de9e7:0x21a,_0x2b8d24:0x1f2,_0x36222a:0x359,_0x21b4fe:0x30e,_0x2e0b9c:0x37a,_0x465f94:0x352,_0x52a98f:0x378,_0x3d805b:0x3d8,_0x20aa59:0x308,_0x4f4941:0x2cb,_0x2f1485:0x33a,_0x51f3dc:0x2a8,_0x1389fa:0x268,_0x5daae3:0x2b0,_0x48a10b:0x22d,_0x33a9ff:0x1d8,_0x191196:0x314,_0x10bd79:0x2ce,_0x438ed0:0x254,_0x182ff5:0x22b,_0x10330a:0x286,_0x557e2b:0x35a,_0x48960d:0x371,_0x1ec2c2:0x358,_0x8596eb:0x35e,_0x2ced8f:0x35a,_0x1e3de9:0x346},_0x3ee071={_0x3a3e3:0xaf},_0x2ca7b7={_0x3289e6:0x4fb,_0x2654f7:0x4eb,_0x58f502:0x443,_0x3ca0e4:0x419},_0x4136e0={_0x214527:0x46,_0x4bd1e0:0x226,_0x451d92:0xce},_0xb348a3={_0x430a5d:0x1e4,_0xed7b31:0x6b},_0x48dee7={_0x549a67:0x4c2,_0x8726f8:0xc8,_0x429992:0x10d};function _0x34ea01(_0x4805dd,_0x585952,_0xd7e9f5,_0x403971){return _0x3fa381(_0x4805dd-_0x48dee7._0x549a67,_0x585952,_0xd7e9f5-_0x48dee7._0x8726f8,_0x403971-_0x48dee7._0x429992);}const _0x337d39=_0x4a9f7c[_0x2624c4(0x1db,0x1f0,_0xf9c0b8._0x57c71f,_0xf9c0b8._0x585a2b)]??new AbortController()[_0x34ea01(0x2fa,0x331,_0xf9c0b8._0x21bcb2,_0xf9c0b8._0x42dc8d)],_0xa017ce={'sessionId':_0x4a9f7c[_0x34ea01(_0xf9c0b8._0x1f7724,_0xf9c0b8._0x47e9e0,_0xf9c0b8._0x57b059,_0xf9c0b8._0x850dec)],'turnId':_0x4a9f7c[_0x34ea01(0x322,_0xf9c0b8._0x81d55f,_0xf9c0b8._0x2b301d,_0xf9c0b8._0x9795ef)],'system':normalizeSystem(_0x4a9f7c['system']),'messages':(_0x4a9f7c[_0x2624c4(0x1ed,0x226,_0xf9c0b8._0x18ab8f,0x1d4)]??[])[_0x2624c4(_0xf9c0b8._0x106ff4,0x268,_0xf9c0b8._0x5d1a0b,_0xf9c0b8._0x162249)](normalizeMessage),'lastResponse':void 0x0,'toolResults':[],'finalMessage':void 0x0,'sessionDir':typeof _0x33be1d['sessionDir']===_0x34ea01(0x38b,_0xf9c0b8._0x2dcfae,_0xf9c0b8._0x499685,_0xf9c0b8._0x4b8906)?_0x33be1d[_0x2624c4(0x253,0x216,0x217,_0xf9c0b8._0x2aee14)]():_0x33be1d[_0x2624c4(0x1d2,_0xf9c0b8._0x203188,_0xf9c0b8._0x22fdba,_0xf9c0b8._0x2ace8)]},_0x515ff8=makeExtensionContext(_0xa017ce),_0x1861e1={'sessionId':_0xa017ce[_0x2624c4(_0xf9c0b8._0x3df62b,0x269,0x226,_0xf9c0b8._0x83a0d9)],'turnId':_0xa017ce['turnId'],'state':_0xa017ce,'signal':_0x337d39,..._0x33be1d['askUser']?{'askUser':_0x33be1d[_0x2624c4(_0xf9c0b8._0x5cf778,_0xf9c0b8._0x46821b,_0xf9c0b8._0x4dece3,0x28d)]}:{}},{stage:_0x56b0e8,emit:_0x2fc24d,stageUnchecked:_0x40da79,emitUnchecked:_0x502cc8}=makeTurnGuards(_0x337d39,_0x33be1d[_0x2624c4(0x1f2,_0xf9c0b8._0x3eeea3,_0xf9c0b8._0x3ee3ae,_0xf9c0b8._0x1d650f)],_0x33be1d[_0x2624c4(0x2c4,0x278,_0xf9c0b8._0x4666a9,_0xf9c0b8._0x3aa9ca)],_0x515ff8,_0x1861e1),_0x527708=async _0x389e81=>{function _0x142e36(_0x2629f2,_0x523a38,_0x4e7390,_0x773fa5){return _0x2624c4(_0x2629f2-_0xb348a3._0x430a5d,_0x523a38-0x2ba,_0x4e7390-_0xb348a3._0xed7b31,_0x773fa5);}function _0x35f696(_0x105b0e,_0x144a71,_0x4bddd6,_0x17b7c0){return _0x2624c4(_0x105b0e-_0x4136e0._0x214527,_0x17b7c0-_0x4136e0._0x4bd1e0,_0x4bddd6-_0x4136e0._0x451d92,_0x105b0e);}await _0x33be1d[_0x142e36(_0x2ca7b7._0x3289e6,_0x2ca7b7._0x2654f7,0x4ea,0x528)][_0x35f696(0x419,_0x2ca7b7._0x58f502,_0x2ca7b7._0x3ca0e4,0x440)]('afterMessageAppend',structuredClone(_0x389e81),_0x515ff8);};let _0x23fe4e=0x0;function _0x2624c4(_0x201589,_0x556733,_0x1e79fd,_0x35fc6d){return _0x3fa381(_0x556733-0x3b8,_0x35fc6d,_0x1e79fd-0x103,_0x35fc6d-_0x3ee071._0x3a3e3);}try{const _0x54faa5=await _0x56b0e8('onUserMessage',normalizeMessage(_0x4a9f7c[_0x2624c4(_0xf9c0b8._0x3250cf,_0xf9c0b8._0x25048a,_0xf9c0b8._0x49b4e3,_0xf9c0b8._0xe46306)]));_0xa017ce['messages'][_0x2624c4(0x2cd,0x286,0x2b7,0x26b)](_0x54faa5),await _0x527708(_0x54faa5),await _0x2fc24d({'type':_0x2624c4(_0xf9c0b8._0x247e6b,0x1e4,0x209,_0xf9c0b8._0x4f921b),'message':_0x54faa5});while(!![]){throwIfAborted(_0x337d39),_0x23fe4e+=0x1;const _0x3159ed=createAssistantMessageId(_0xa017ce[_0x34ea01(0x322,0x329,_0xf9c0b8._0x21513f,_0xf9c0b8._0x21513f)],_0x23fe4e),_0x4d1149=createReasoningMessageId(_0x3159ed);let _0x1da291={'model':_0x33be1d['chatModel']['model'],'maxTokens':_0x33be1d[_0x34ea01(_0xf9c0b8._0x229a66,0x2c0,_0xf9c0b8._0x10681a,_0xf9c0b8._0x3e6818)][_0x2624c4(0x249,_0xf9c0b8._0x527a38,0x231,0x299)]??0x4000,'system':structuredClone(_0xa017ce[_0x2624c4(0x21c,_0xf9c0b8._0x2e2521,_0xf9c0b8._0x2d3dcf,_0xf9c0b8._0x3808a6)]),'messages':structuredClone(_0xa017ce[_0x2624c4(_0xf9c0b8._0x52879c,0x226,_0xf9c0b8._0xef19c7,0x20f)]),'tools':_0x33be1d[_0x2624c4(0x272,_0xf9c0b8._0x3b73cf,0x235,_0xf9c0b8._0x11cff9)][_0x34ea01(0x366,0x37c,0x34c,0x310)](),'metadata':{'sessionId':_0xa017ce[_0x2624c4(0x26a,_0xf9c0b8._0x1fb7e2,_0xf9c0b8._0x220822,0x29e)],'turnId':_0xa017ce[_0x2624c4(0x20e,_0xf9c0b8._0xbaaf3c,_0xf9c0b8._0xbaaf3c,_0xf9c0b8._0xe027a)]}};_0x1da291=await _0x56b0e8(_0x34ea01(0x365,0x36a,0x399,0x33d),_0x1da291),await _0x2fc24d({'type':_0x2624c4(_0xf9c0b8._0x4aa1e8,0x207,0x1e5,_0xf9c0b8._0xdda31a),'request':_0x1da291});let _0x360d0d=await executeModelRequest(_0x1da291,_0x4a9f7c,_0x33be1d,_0x1861e1,{'assistantMessageId':_0x3159ed,'reasoningMessageId':_0x4d1149});_0x360d0d=await _0x56b0e8('afterModelResponse',_0x360d0d),await _0x2fc24d({'type':_0x34ea01(0x2e7,_0xf9c0b8._0x57b059,0x2c5,_0xf9c0b8._0xdaff16),'response':_0x360d0d}),_0xa017ce[_0x34ea01(0x37e,_0xf9c0b8._0x10aed5,_0xf9c0b8._0x465c2d,0x355)]=_0x360d0d;let _0x4fed5d=await _0x56b0e8('beforeAssistantAppend',withMessageId(responseToAssistantMessage(_0x360d0d),_0x3159ed));_0x4fed5d=withMessageId(_0x4fed5d,_0x3159ed);const _0x20de52=getToolUseBlocks(_0x4fed5d),_0x5dcc19=await Promise['all'](_0x20de52[_0x2624c4(_0xf9c0b8._0x5769fe,0x268,_0xf9c0b8._0x4af765,_0xf9c0b8._0x62430e)](_0x14dc42=>_0x56b0e8(_0x2624c4(0x22f,0x25a,0x2a5,0x289),_0x14dc42)));_0x5dcc19[_0x2624c4(0x276,0x27a,_0xf9c0b8._0x127999,0x24f)]>0x0&&(_0x4fed5d=replaceToolUseBlocks(_0x4fed5d,_0x5dcc19));const _0x10db3d=withMessageId(_0x4fed5d,_0x3159ed);_0x4fed5d=_0x10db3d;const _0x179e0d=createReasoningMessage(_0x4fed5d),_0x33e4a4=createAssistantTextMessage(_0x4fed5d),_0x335c9=createToolUseMessage(_0x4fed5d);_0x179e0d&&await _0x2fc24d({'type':_0x2624c4(0x213,0x24a,0x29a,0x286),'message':withMessageId(_0x179e0d,_0x4d1149)});_0x33e4a4&&await _0x2fc24d({'type':_0x2624c4(_0xf9c0b8._0x2f28ac,0x220,_0xf9c0b8._0x442396,0x1e8),'message':withMessageId(_0x33e4a4,_0x3159ed)});_0x335c9&&await _0x2fc24d({'type':_0x2624c4(_0xf9c0b8._0x5d1a0b,0x256,_0xf9c0b8._0x1d650f,_0xf9c0b8._0x466c9f),'message':withMessageId(_0x335c9,_0x3159ed)});_0xa017ce[_0x2624c4(_0xf9c0b8._0x42c01d,0x226,0x1ed,_0xf9c0b8._0x3d4dbc)]['push'](_0x10db3d);_0x5dcc19[_0x2624c4(0x24a,_0xf9c0b8._0x4c1fea,0x29c,0x258)]>0x0&&await _0x527708(_0x10db3d);for(const _0x62aac5 of _0x5dcc19){await _0x2fc24d({'type':_0x2624c4(0x1e4,0x23a,0x239,_0xf9c0b8._0x8f4ae4),'toolCall':_0x62aac5});}if(_0x5dcc19[_0x34ea01(0x384,0x365,_0xf9c0b8._0x57b059,_0xf9c0b8._0x15ae79)]===0x0){const _0x26d50b=await _0x56b0e8(_0x2624c4(_0xf9c0b8._0xa9894b,0x20b,_0xf9c0b8._0x2d9701,0x1ec),_0x4fed5d),_0x3dfb5f=withMessageId(_0x26d50b,_0x3159ed);return _0xa017ce[_0x34ea01(0x351,_0xf9c0b8._0x1c44b3,_0xf9c0b8._0x533c5a,_0xf9c0b8._0x1167f0)]=_0x3dfb5f,_0xa017ce[_0x2624c4(0x24d,0x226,_0xf9c0b8._0x3660b0,_0xf9c0b8._0x30b1ee)][_0xa017ce[_0x34ea01(_0xf9c0b8._0x2928e7,0x32d,0x2f3,0x32c)]['length']-0x1]=_0x3dfb5f,await _0x527708(_0x3dfb5f),await _0x2fc24d({'type':_0x34ea01(0x340,_0xf9c0b8._0x510da3,0x336,0x339),'message':_0x3dfb5f}),throwIfAborted(_0x337d39),await _0x33be1d[_0x34ea01(_0xf9c0b8._0x3ff38f,0x386,0x357,_0xf9c0b8._0x38a1f4)][_0x2624c4(0x23e,_0xf9c0b8._0x4de9e7,_0xf9c0b8._0x2b8d24,0x249)](_0x34ea01(0x305,_0xf9c0b8._0x36222a,_0xf9c0b8._0x21b4fe,0x2e8),_0xa017ce,_0x515ff8),await _0x2fc24d({'type':_0x34ea01(0x32e,_0xf9c0b8._0x2e0b9c,_0xf9c0b8._0x465f94,0x313),'state':_0xa017ce}),{'status':_0x34ea01(0x389,0x35a,_0xf9c0b8._0x52a98f,_0xf9c0b8._0x3d805b),'finalMessage':_0x3dfb5f,'state':_0xa017ce};}let _0x4f871e=await _0x33be1d['toolRuntime']['executeCalls'](_0x5dcc19,_0x1861e1);const _0x306346=_0x4f871e[_0x34ea01(_0xf9c0b8._0x20aa59,_0xf9c0b8._0x4f4941,_0xf9c0b8._0x2f1485,0x309)](isAbortedToolResult),_0x289a2a=_0x306346?_0x40da79:_0x56b0e8,_0x1f367b=_0x306346?_0x502cc8:_0x2fc24d;_0x4f871e=await Promise[_0x2624c4(0x26b,0x222,_0xf9c0b8._0x25048a,0x262)](_0x4f871e[_0x2624c4(_0xf9c0b8._0x51f3dc,_0xf9c0b8._0x1389fa,_0xf9c0b8._0x5daae3,0x29a)](_0x8c8f07=>_0x289a2a(_0x2624c4(0x24c,0x266,0x2a7,0x260),_0x8c8f07))),_0xa017ce[_0x2624c4(0x1ff,_0xf9c0b8._0x48a10b,_0xf9c0b8._0x33a9ff,0x207)]['push'](..._0x4f871e);for(const _0x224403 of _0x4f871e){await _0x1f367b({'type':_0x34ea01(0x34e,_0xf9c0b8._0x191196,0x3a3,0x352),'result':_0x224403});}const _0x107d0c=await _0x289a2a('beforeToolResultAppend',createToolResultUserMessage(_0x4f871e));await _0x1f367b({'type':_0x34ea01(0x323,0x2ce,_0xf9c0b8._0x10bd79,0x358),'message':_0x107d0c}),_0xa017ce[_0x2624c4(_0xf9c0b8._0x438ed0,_0xf9c0b8._0x3df62b,0x26a,_0xf9c0b8._0x182ff5)][_0x2624c4(0x26c,_0xf9c0b8._0x10330a,0x2c8,0x2c7)](_0x107d0c),await _0x527708(_0x107d0c);if(_0x306346)return{'status':_0x34ea01(_0xf9c0b8._0x557e2b,0x350,0x399,0x38b),'state':_0xa017ce};}}catch(_0x2aa560){if(!_0x337d39[_0x34ea01(0x35a,_0xf9c0b8._0x48960d,_0xf9c0b8._0x1ec2c2,_0xf9c0b8._0x8596eb)])throw _0x2aa560;return{'status':_0x34ea01(_0xf9c0b8._0x2ced8f,_0xf9c0b8._0x1e3de9,0x35a,0x37b),'state':_0xa017ce};}}function createSessionId(){const _0x5316b0={_0x379e4e:0x1eb,_0x2a9381:0x1ba,_0x57bb3a:0x1b8,_0x37e76e:0x170,_0x4ff429:0x1b9,_0x454faf:0x20e,_0x7af98e:0x16f},_0x5240f1={_0x249898:0x9f,_0x4b398a:0xd0},_0xa2c669={_0x1c2338:0x341,_0x1d93fe:0xf6};function _0x9eaebf(_0x8e598f,_0xa6e517,_0x5023d3,_0x19998d){return _0x3fa381(_0x8e598f-_0xa2c669._0x1c2338,_0x5023d3,_0x5023d3-0x1ec,_0x19998d-_0xa2c669._0x1d93fe);}function _0x5a210a(_0x396fa3,_0x443a55,_0x1370d2,_0x1639ab){return _0x3588de(_0x396fa3-_0x5240f1._0x249898,_0x443a55-_0x5240f1._0x4b398a,_0x1639ab- -0x459,_0x1370d2);}return _0x5a210a(_0x5316b0._0x379e4e,_0x5316b0._0x2a9381,_0x5316b0._0x57bb3a,0x1ca)+Date[_0x9eaebf(_0x5316b0._0x37e76e,_0x5316b0._0x4ff429,0x168,0x126)]()+'-'+Math[_0x5a210a(_0x5316b0._0x454faf,0x20e,0x21f,0x1d4)]()[_0x5a210a(0x173,0x1c1,0x1a9,0x182)](0x10)[_0x9eaebf(_0x5316b0._0x7af98e,0x1bb,0x1a6,0x195)](0x2,0xa);}function createTurnId(_0x556f24){const _0x4c5c08={_0x170960:0x53a,_0x5dc811:0x4ce,_0x1ebe76:0x4a2,_0x20f7cd:0x4e7},_0x17742d={_0x183352:0x112};function _0x166bdf(_0x2857f4,_0x32f875,_0x16bb5b,_0x5e13a9){return _0x3588de(_0x2857f4-0xab,_0x32f875-0xb5,_0x5e13a9- -_0x17742d._0x183352,_0x2857f4);}return _0x166bdf(_0x4c5c08._0x170960,_0x4c5c08._0x5dc811,_0x4c5c08._0x1ebe76,_0x4c5c08._0x20f7cd)+_0x556f24;}function createDefaultMessage(_0xa593ab){if(_0xa593ab===void 0x0)return void 0x0;return normalizeUserInput(_0xa593ab);}function normalizeUserInput(_0x32eb38){const _0x53bd8a={_0x46a7c1:0x172,_0x2374a0:0x106,_0x3b15eb:0x25,_0x4ae126:0x7a},_0x408950={_0x5b15a3:0x1ee,_0x1f524f:0x49a},_0x14f820={_0x1a7207:0x19d,_0x3d993c:0x1ea};if(typeof _0x32eb38===_0x1662b3(0x168,_0x53bd8a._0x46a7c1,0x170,0x17d))return{'role':_0x35a859(0x8a,_0x53bd8a._0x2374a0,0xca,0xd8),'content':[{'type':_0x35a859(0x92,_0x53bd8a._0x3b15eb,0x9e,_0x53bd8a._0x4ae126),'text':_0x32eb38}]};function _0x35a859(_0x4d5578,_0x17a972,_0x916e50,_0x741b05){return _0x3588de(_0x4d5578-_0x14f820._0x1a7207,_0x17a972-_0x14f820._0x3d993c,_0x741b05- -0x56f,_0x17a972);}function _0x1662b3(_0x423c69,_0x18d60f,_0x42cdcc,_0x57b332){return _0x3588de(_0x423c69-_0x408950._0x5b15a3,_0x18d60f-0x108,_0x57b332- -_0x408950._0x1f524f,_0x42cdcc);}return normalizeMessage(_0x32eb38);}function resolveChatModel(_0xca71c5){const _0x104b69={_0x514397:0xa7,_0x20917e:0x100,_0x5cbac9:0xee,_0x2e806e:0xf4,_0x203d4b:0xf8,_0x38186f:0xf2,_0x2338a0:0xee},_0x49e6ef={_0x1ae317:0x220,_0x5a1509:0x74},_0x1a60d2={_0x5c9004:0x27,_0xc57a1a:0xbf};function _0x2a3669(_0x1cb30d,_0x3b970f,_0x5944a1,_0x3abd63){return _0x3fa381(_0x3abd63-0x2c1,_0x3b970f,_0x5944a1-_0x1a60d2._0x5c9004,_0x3abd63-_0x1a60d2._0xc57a1a);}function _0x4ee4d5(_0x46c850,_0x493eba,_0x2f127f,_0x50a70c){return _0x3fa381(_0x50a70c-_0x49e6ef._0x1ae317,_0x46c850,_0x2f127f-_0x49e6ef._0x5a1509,_0x50a70c-0x111);}if(!_0xca71c5[_0x2a3669(_0x104b69._0x514397,0xce,_0x104b69._0x20917e,_0x104b69._0x5cbac9)])throw new Error(_0x2a3669(0xd2,0xaf,_0x104b69._0x5cbac9,_0x104b69._0x2e806e));return _0xca71c5[_0x2a3669(0x124,_0x104b69._0x203d4b,_0x104b69._0x38186f,_0x104b69._0x2338a0)];}function createRegistry(_0x505a1b){const _0x968c8b={_0x40765d:0x56f,_0x5cd94f:0x58d,_0x259074:0x4b3,_0x55e22c:0x50e,_0x3e9e10:0x557,_0x187a42:0x59b,_0x4c43e2:0x5cf},_0x32179f={_0x2de31f:0x166};function _0x3d2cf5(_0x23f8c7,_0x77cee6,_0x2f75bd,_0x268215){return _0x3588de(_0x23f8c7-_0x32179f._0x2de31f,_0x77cee6-0x115,_0x77cee6- -0x8c,_0x268215);}if(_0x505a1b[_0x3d2cf5(0x59a,_0x968c8b._0x40765d,0x57c,_0x968c8b._0x5cd94f)])return _0x505a1b[_0x5d0c58(0x4e8,_0x968c8b._0x259074,_0x968c8b._0x55e22c,0x4db)];const _0x4ef5fb=createExtensionRegistry(),_0xfa51b1=_0x505a1b['extensions']??[];for(const _0x25f8ed of _0xfa51b1){_0x4ef5fb[_0x3d2cf5(_0x968c8b._0x3e9e10,_0x968c8b._0x187a42,0x599,_0x968c8b._0x4c43e2)](_0x25f8ed);}function _0x5d0c58(_0x4803a3,_0x156ed2,_0x171408,_0x2fec69){return _0x3fa381(_0x4803a3-0x66f,_0x156ed2,_0x171408-0xf6,_0x2fec69-0x1e9);}return _0x4ef5fb;}var Agent=class{[_0x3588de(0x643,0x5d1,0x5fc,0x643)];['deps'];['metrics'];['sessionId'];[_0x3588de(0x5c8,0x5df,0x5f0,0x61c)];['defaultMessage'];[_0x3fa381(-0x1b8,-0x1dd,-0x190,-0x1af)];constructor(_0x17d649={}){const _0x5887b4={_0x35e951:0x22b,_0x39c71c:0x1dd,_0x283ad3:0x208,_0x5e32a5:0x20f,_0x58c55a:0x23e,_0x5dd6f4:0x5fd,_0x572f90:0x5da,_0x48b8e6:0x5c0,_0x5063c4:0x5fa,_0x503cee:0x245,_0x21bbe5:0x582,_0xc9cb0c:0x5b6,_0x60953e:0x642,_0x3455ab:0x5fb,_0x43d9a5:0x68c,_0x1ce91f:0x1be,_0x350c4b:0x22c,_0x418be2:0x1f7,_0x5a0862:0x640,_0xfcac0c:0x603,_0x256e42:0x5ce,_0x3edd6f:0x607,_0x447876:0x5ab,_0x3caea8:0x21e,_0x166411:0x24b,_0x24f52e:0x1db,_0x204954:0x218,_0x3ed480:0x25b,_0x14c5c5:0x5ec},_0x2c7116={_0x2b882c:0x12c},_0x1fd84c={_0x476bbf:0x4f,_0x59888b:0x1de},_0x57a020={_0x44bf95:0x387,_0x43fe9a:0x32,_0x205086:0x4c},_0x43bae8={_0x4a44d5:0x15,_0x4d22fb:0xda};function _0x53de0a(_0x4964da,_0x28be3f,_0x1d9c6d,_0x169bb7){return _0x3588de(_0x4964da-_0x43bae8._0x4a44d5,_0x28be3f-_0x43bae8._0x4d22fb,_0x4964da-0xc,_0x169bb7);}this[_0x3ad639(0x23c,_0x5887b4._0x35e951,0x238,0x288)]=_0x17d649['sessionId']??createSessionId(),this[_0x3ad639(_0x5887b4._0x39c71c,_0x5887b4._0x283ad3,0x1cf,_0x5887b4._0x5e32a5)]=0x0,this[_0x3ad639(0x1df,_0x5887b4._0x58c55a,0x201,0x1c0)]=_0x17d649[_0x53de0a(_0x5887b4._0x5dd6f4,_0x5887b4._0x572f90,_0x5887b4._0x48b8e6,_0x5887b4._0x5063c4)]??'',this[_0x3ad639(0x1b8,0x1d7,0x1f5,0x1f5)]=(_0x17d649[_0x3ad639(_0x5887b4._0x503cee,0x1f7,0x1f5,0x200)]??[])['map'](normalizeMessage),this['defaultMessage']=createDefaultMessage(_0x17d649[_0x53de0a(0x5b2,0x5fa,_0x5887b4._0x21bbe5,_0x5887b4._0xc9cb0c)]),this[_0x53de0a(_0x5887b4._0x60953e,_0x5887b4._0x3455ab,0x62b,_0x5887b4._0x43d9a5)]=createAgentMetrics({'getContextWindowLimit':_0x17d649[_0x3ad639(0x20e,0x1f4,_0x5887b4._0x1ce91f,0x1c0)]});const _0x4d3c78=_0x17d649[_0x3ad639(_0x5887b4._0x350c4b,0x200,0x247,_0x5887b4._0x418be2)];function _0x3ad639(_0x34018e,_0x56d7fa,_0x1252e1,_0x401e38){return _0x3fa381(_0x1252e1-_0x57a020._0x44bf95,_0x34018e,_0x1252e1-_0x57a020._0x43fe9a,_0x401e38-_0x57a020._0x205086);}const _0x50c466=async(_0x49de31,_0x2f64a7)=>{this['metrics'][_0x307259(0x180,_0x2c7116._0x2b882c,0x14e,0xea)](_0x49de31);function _0x307259(_0x2bed14,_0x3ecda4,_0x3ffba1,_0x162de5){return _0x53de0a(_0x3ecda4- -0x489,_0x3ecda4-_0x1fd84c._0x476bbf,_0x3ffba1-_0x1fd84c._0x59888b,_0x2bed14);}await _0x4d3c78?.(_0x49de31,_0x2f64a7);},_0x365830=createInternalToolRuntime(_0x17d649[_0x53de0a(_0x5887b4._0x5a0862,_0x5887b4._0xfcac0c,0x689,0x624)]??[],{'onEvent':_0x50c466,'onToolCall':_0x17d649[_0x53de0a(_0x5887b4._0x256e42,_0x5887b4._0x3edd6f,0x586,_0x5887b4._0x447876)]});this[_0x3ad639(_0x5887b4._0x3caea8,0x228,_0x5887b4._0x166411,0x21e)]={'registry':createRegistry(_0x17d649),'chatModel':resolveChatModel(_0x17d649),'toolRuntime':_0x365830,'askUser':_0x17d649[_0x3ad639(_0x5887b4._0x24f52e,0x218,_0x5887b4._0x204954,_0x5887b4._0x3ed480)],'onEvent':_0x50c466,'sessionDir':_0x17d649[_0x53de0a(_0x5887b4._0x14c5c5,0x5f7,0x5c0,0x5f1)]};}get[_0x3fa381(-0x191,-0x1a9,-0x14f,-0x1b2)](){return this['_systemPrompt'];}['setTools'](_0x36b0f8=[]){const _0x2e616a={_0x5ae310:0xfa,_0x3b8dc2:0xb6},_0x453f4b={_0x189e7d:0xf4};function _0x2a53de(_0x320a25,_0x3de489,_0x12ac79,_0x5d55a0){return _0x3588de(_0x320a25-0x1a0,_0x3de489-_0x453f4b._0x189e7d,_0x3de489- -0x508,_0x5d55a0);}this['deps']['toolRuntime'][_0x2a53de(0x135,_0x2e616a._0x5ae310,_0x2e616a._0x3b8dc2,0xdd)](_0x36b0f8);}[_0x3588de(0x5e0,0x5f2,0x61d,0x5d3)](_0xb2ccc1,_0x20254f={}){const _0x2b9a9e={_0x337990:0xf7,_0xc94ebe:0x101,_0x2204f1:0x332,_0x3fe464:0x337,_0x442a5a:0x31a},_0x190f20={_0x4bc9d8:0x74,_0x4001ff:0xb7,_0x14a420:0x54a},_0x3dd3b0={_0x1a61fd:0x4d2,_0x4960e3:0x169};function _0x41a7b6(_0xe75f50,_0x36c239,_0x3cb036,_0xc9279){return _0x3fa381(_0xe75f50-_0x3dd3b0._0x1a61fd,_0x36c239,_0x3cb036-0x11c,_0xc9279-_0x3dd3b0._0x4960e3);}this[_0x3bb401(_0x2b9a9e._0x337990,_0x2b9a9e._0xc94ebe,0x92,0xb2)]=_0xb2ccc1;function _0x3bb401(_0x28802b,_0x2d0219,_0x15a761,_0x22f174){return _0x3588de(_0x28802b-_0x190f20._0x4bc9d8,_0x2d0219-_0x190f20._0x4001ff,_0x22f174- -_0x190f20._0x14a420,_0x28802b);}_0x20254f['resetMessages']===!![]&&(this[_0x41a7b6(0x340,_0x2b9a9e._0x2204f1,_0x2b9a9e._0x3fe464,0x368)]=[],this[_0x41a7b6(_0x2b9a9e._0x442a5a,0x32b,0x35a,0x358)]=0x0);}['setSessionId'](_0x4f9d08){const _0x1dc9a7={_0x311912:0x51f};function _0x148c92(_0xadadb9,_0x4db31a,_0x570517,_0x140ea3){return _0x3588de(_0xadadb9-0x1e6,_0x4db31a-0x1f0,_0x140ea3- -0x148,_0x570517);}this[_0x148c92(0x495,_0x1dc9a7._0x311912,0x53e,0x4eb)]=_0x4f9d08;}[_0x3fa381(-0x19d,-0x195,-0x175,-0x195)](_0x13ad81){const _0x26e962={_0x57f14c:0x26,_0x7a31b1:0x63,_0x38c5bc:0x2e,_0x52eb6f:0x81},_0x1a630f={_0x5f0f4d:0x162},_0x2e11ce={_0xf74b0a:0x25b,_0x4d4cb6:0xf};function _0x200191(_0x58543a,_0x36d448,_0xba34da,_0x4e1457){return _0x3fa381(_0x4e1457-_0x2e11ce._0xf74b0a,_0x58543a,_0xba34da-0x129,_0x4e1457-_0x2e11ce._0x4d4cb6);}function _0x49786c(_0x16b6f5,_0x38b921,_0x3b36cb,_0x4de92d){return _0x3fa381(_0x38b921-_0x1a630f._0x5f0f4d,_0x3b36cb,_0x3b36cb-0x1f2,_0x4de92d-0x19c);}this[_0x49786c(0x74,_0x26e962._0x57f14c,_0x26e962._0x7a31b1,-_0x26e962._0x38c5bc)][_0x200191(_0x26e962._0x52eb6f,0x88,0x38,0x88)]=_0x13ad81;}async[_0x3588de(0x5bd,0x570,0x5b6,0x59c)](_0x57d9da=this[_0x3588de(0x5e6,0x61b,0x63b,0x643)],_0x15ad86={}){const _0x19ca0c={_0x579855:0x398,_0x1e4bf8:0x36b,_0x49d874:0x370,_0x9eba59:0x38c,_0x21beff:0x398,_0x4d3ffe:0x36d,_0x5778d8:0x393,_0x59d56d:0x38f,_0x47befc:0x357,_0xc75110:0x3bf,_0x25582c:0x3f9,_0x21ce40:0x375,_0x504070:0x422,_0x48ab87:0x3a5,_0xf0612:0x403,_0x4f0d99:0x390,_0x5d6f1d:0x36c,_0x27d614:0x394,_0x1ac86a:0x369},_0x105eac={_0x5ad50f:0x551},_0x1ca347={_0x43dd8e:0x1da};function _0x61d5d5(_0x194af0,_0x2c0d4e,_0x3d12ba,_0x21f1b8){return _0x3588de(_0x194af0-_0x1ca347._0x43dd8e,_0x2c0d4e-0x16,_0x2c0d4e- -0x2a7,_0x21f1b8);}if(!_0x57d9da)throw new Error(_0x61d5d5(0x371,0x37a,0x3cd,_0x19ca0c._0x579855));function _0x45142a(_0x18decb,_0x1659bb,_0x21d5af,_0xdca8d7){return _0x3fa381(_0x18decb-_0x105eac._0x5ad50f,_0xdca8d7,_0x21d5af-0x105,_0xdca8d7-0xaf);}this[_0x45142a(0x399,_0x19ca0c._0x1e4bf8,_0x19ca0c._0x49d874,0x381)]+=0x1;const _0x33d041=await runTurn({'sessionId':this[_0x61d5d5(0x377,_0x19ca0c._0x9eba59,0x3d0,0x3b1)],'turnId':createTurnId(this[_0x61d5d5(0x354,0x323,_0x19ca0c._0x1e4bf8,0x346)]),'streaming':_0x15ad86[_0x61d5d5(0x3b5,_0x19ca0c._0x21beff,_0x19ca0c._0x4d3ffe,_0x19ca0c._0x5778d8)],'signal':_0x15ad86[_0x45142a(0x389,_0x19ca0c._0x59d56d,0x37f,_0x19ca0c._0x47befc)],'system':this[_0x45142a(0x3c0,0x3d0,0x36c,0x378)],'messages':this[_0x45142a(_0x19ca0c._0xc75110,_0x19ca0c._0x25582c,_0x19ca0c._0x21ce40,0x3f8)],'message':normalizeUserInput(_0x57d9da)},this[_0x45142a(0x415,_0x19ca0c._0x504070,0x41a,0x3d2)]);return this[_0x45142a(_0x19ca0c._0xc75110,_0x19ca0c._0x48ab87,0x37c,_0x19ca0c._0xf0612)]=_0x33d041[_0x45142a(_0x19ca0c._0x4f0d99,0x38c,0x369,_0x19ca0c._0x5d6f1d)][_0x61d5d5(_0x19ca0c._0x27d614,0x349,0x36a,_0x19ca0c._0x1ac86a)][_0x61d5d5(0x36d,0x38b,0x370,0x33d)](normalizeMessage),_0x33d041;}};export{normalizeToolOutputValue,createToolOutput,ToolExecutionError,defineTool,ToolRegistry,validateToolInput,deriveFinalToolOutput,createInternalToolRuntime,createExtensionRegistry,createAgentMetrics,runTurn,Agent};
@@ -1 +0,0 @@
1
- (function(_0x5b2190,_0x2e7193){const _0x1bea76={_0x5d5065:0x180,_0x3f6b8a:0x190,_0x2b3c1e:0x186,_0xa8bf9d:0x160,_0x16fe88:0x163,_0x4d988c:0x18e,_0x1599ef:0x1a5,_0x4c0388:0x19e,_0x2b1bfb:0x15f,_0x2afb6e:0x159,_0x53aaf7:0x14f,_0x2e440b:0x2fd,_0x525fa9:0x2f1,_0x511aeb:0x2e6,_0x5dc205:0x2fe,_0x2bd995:0x17b,_0x9cbd7c:0x174,_0x2602e8:0x18b,_0x4aa72a:0x2b8,_0x1115d9:0x2a9,_0x32a49a:0x2de,_0x265837:0x2c8,_0x284437:0x2f1,_0x4c4956:0x2cc,_0x1e1507:0x166},_0xe64105={_0x19643e:0xcb},_0xdb819a={_0x1ce87a:0x95},_0x5e75ee=_0x5b2190();function _0x226c59(_0x2ae031,_0x488c0b,_0x1362e3,_0x37fa03){return _0x12e5(_0x2ae031- -_0xdb819a._0x1ce87a,_0x1362e3);}function _0x21b97b(_0x36fbfc,_0x5ae596,_0x181d37,_0x2c7cae){return _0x12e5(_0x5ae596-_0xe64105._0x19643e,_0x36fbfc);}while(!![]){try{const _0x5d0aa8=-parseInt(_0x226c59(_0x1bea76._0x5d5065,0x193,_0x1bea76._0x3f6b8a,_0x1bea76._0x2b3c1e))/0x1*(-parseInt(_0x226c59(_0x1bea76._0xa8bf9d,0x177,_0x1bea76._0x16fe88,0x145))/0x2)+-parseInt(_0x226c59(_0x1bea76._0x4d988c,_0x1bea76._0x1599ef,0x182,_0x1bea76._0x4c0388))/0x3*(-parseInt(_0x226c59(_0x1bea76._0x2b1bfb,0x15e,_0x1bea76._0x2afb6e,_0x1bea76._0x53aaf7))/0x4)+-parseInt(_0x21b97b(0x2e6,0x2e8,_0x1bea76._0x2e440b,_0x1bea76._0x525fa9))/0x5*(-parseInt(_0x21b97b(0x2d4,_0x1bea76._0x511aeb,0x2d2,_0x1bea76._0x5dc205))/0x6)+parseInt(_0x226c59(0x177,0x175,_0x1bea76._0x2bd995,0x183))/0x7*(parseInt(_0x226c59(_0x1bea76._0x9cbd7c,0x182,_0x1bea76._0x2602e8,0x16b))/0x8)+-parseInt(_0x21b97b(_0x1bea76._0x4aa72a,0x2bd,0x2b0,_0x1bea76._0x1115d9))/0x9+parseInt(_0x21b97b(0x2f5,_0x1bea76._0x32a49a,_0x1bea76._0x265837,_0x1bea76._0x284437))/0xa+-parseInt(_0x21b97b(0x2d0,_0x1bea76._0x4c4956,0x2d9,0x2c4))/0xb*(parseInt(_0x226c59(0x17f,_0x1bea76._0x1e1507,0x189,0x18f))/0xc);if(_0x5d0aa8===_0x2e7193)break;else _0x5e75ee['push'](_0x5e75ee['shift']());}catch(_0x11ab34){_0x5e75ee['push'](_0x5e75ee['shift']());}}}(_0x4487,0xcc906));function _0x4487(){const _0xa55898=['Dg9VBf91C2u','CM9Szq','sw1Hz2uGCMv0DxjUzwqGyNKGvMLLD0zPBguGzM9YihrVB2WGCMvZDwX0ia','C3LZDgvT','C291CMnL','y29UDgvUDa','ntK3mJyWBeTdAgD4','otqZnZC0ohjnqMfeEa','mNnbB2nPBG','Dgv4Da','CMvHC29UAw5N','zMLSDgvY','DhjPBq','AxnbCNjHEq','nJbKq0Xmzwy','C3bSAwnL','mJiYnZm1yMjcrfvH','BMfTzq','Bwf4vg9Rzw5Z','zwzMB3j0','ChjVDMLKzxjtDgf0zq','C3rYAw5NAwz5','m0nTsgTOza','C3vTBwfYEq','DxnLCI12AxnPyMXL','DxnLCG','zNvUy3rPB24','ChvZAa','C3rYAw5N','CMvHC29UAw5NlMvUy3j5ChrLzf9JB250zw50','zNvUy3rPB25Fy2fSBf9VDxrWDxq','zgf0ytO','mta1ntC4mtb1y29HvKy','AM9PBG','nJuYode2nff6uKHRva','mtG1nta0wLbgtvDS','DhLWzq','Aw5WDxrFAw1Hz2u','yMfZzty0','Dg9VBf91C2vFAwq','B3bLBMfPuMvZCg9UC2vZt3v0Chv0','BwvKAwfFDhLWzq','Aw5JBhvKzuvUy3j5ChrLzenVBNrLBNq','Aw5WDxq','vg9VBcbYzxr1CM5LzcbPBwfNzsbJB250zw50lG','zgf0yq','BwvZC2fNzxm','mJjhsvPOAxO','Dg9VBf9Yzxn1Bhq','B2jQzwn0','BwfW','Bw9KzwW','A2v5CW','Aw5WDxrFDgv4Da','BgvUz3rO','oeP5whHLqW','Aw1Hz2u','zgvZy3jPChrPB24','odGYodqWn1PRt2LXrW'];_0x4487=function(){return _0xa55898;};return _0x4487();}import{resolveOpenAiReasoningConfig}from'./chunk-NYZR4XKO.js';import{normalizeContent}from'./chunk-G2FR4UGO.js';function systemToInstructions(_0x5d363a){const _0x2af792={_0x59e9e7:0x1ee,_0xc068de:0x1dd,_0x23eb79:0x1d9,_0x33f50d:0x1d7},_0xba98fc={_0x172b77:0x2d1};function _0x4dfd41(_0x464634,_0x43fa83,_0x5386e9,_0x26cda7){return _0x12e5(_0x5386e9- -_0xba98fc._0x172b77,_0x26cda7);}function _0x4a60fe(_0x346ce3,_0x3bda6c,_0xbec7d9,_0x42d1a4){return _0x12e5(_0x346ce3- -0x2a,_0x42d1a4);}return normalizeContent(_0x5d363a)[_0x4a60fe(_0x2af792._0x59e9e7,_0x2af792._0xc068de,_0x2af792._0x23eb79,_0x2af792._0x33f50d)](_0x4ae85f=>_0x4ae85f[_0x4a60fe(0x1cc,0x1df,0x1d5,0x1e0)]===_0x4a60fe(0x1ec,0x1dc,0x1df,0x1ea))[_0x4dfd41(-0xd9,-0xba,-0xcd,-0xc8)](_0x59bbbb=>_0x59bbbb[_0x4dfd41(-0xb8,-0xc6,-0xbb,-0xc5)])['join']('\x0a\x0a');}function pushUserContentMessage(_0x305e30,_0x3526ad,_0x43e0de){const _0x17cbad={_0xd3a00f:0x230,_0x5a3e56:0x221,_0x538128:0x230},_0x5464e8={_0xe242f2:0x7};function _0x1c821d(_0x423e92,_0x195f6c,_0xeaeccf,_0x411c1b){return _0x12e5(_0x195f6c- -_0x5464e8._0xe242f2,_0xeaeccf);}if(_0x43e0de['length']===0x0)return;_0x305e30[_0x1c821d(_0x17cbad._0xd3a00f,_0x17cbad._0x5a3e56,0x22c,_0x17cbad._0x538128)]({'type':'message','role':_0x3526ad,'content':_0x43e0de});}function hasSerializableToolUse(_0x43f6b9){const _0x40cbb6={_0x6067:0x5b3,_0x247a80:0x59c,_0x358954:0x58d,_0x224374:0x593,_0x4e4d8b:0x5b9,_0x5a3e41:0x5a3,_0x4879ee:0x56c,_0x58f34e:0x586,_0x507722:0x58a},_0x5cfd59={_0x5ee442:0x213},_0x435477={_0x135baf:0x37e};function _0x5b31c5(_0x42f847,_0x5192ef,_0xe032d8,_0x24a280){return _0x12e5(_0xe032d8-_0x435477._0x135baf,_0x24a280);}function _0x35be27(_0xe8674a,_0x1d70c8,_0x2dd8f7,_0x1c0aea){return _0x12e5(_0x1d70c8- -_0x5cfd59._0x5ee442,_0x2dd8f7);}return _0x43f6b9['id'][_0x5b31c5(_0x40cbb6._0x6067,_0x40cbb6._0x247a80,0x597,0x5a6)]()[_0x5b31c5(0x58d,_0x40cbb6._0x358954,0x586,0x577)]>0x0&&_0x43f6b9[_0x5b31c5(_0x40cbb6._0x224374,_0x40cbb6._0x4e4d8b,0x59c,_0x40cbb6._0x5a3e41)]['trim']()[_0x5b31c5(0x575,_0x40cbb6._0x4879ee,_0x40cbb6._0x58f34e,_0x40cbb6._0x507722)]>0x0;}function hasSerializableToolResult(_0x4a370e){const _0x5e997f={_0x2c270d:0x45a,_0x4764e8:0x42c},_0x468ce3={_0x372867:0x23c};function _0x1f5880(_0x4b1b9b,_0x3f8005,_0x580d76,_0x57d445){return _0x12e5(_0x3f8005-_0x468ce3._0x372867,_0x580d76);}return _0x4a370e['tool_use_id']['trim']()[_0x1f5880(_0x5e997f._0x2c270d,0x444,0x439,_0x5e997f._0x4764e8)]>0x0;}function isResponseInputObject(_0x5d9868){const _0x58686f={_0x95cb6f:0x499,_0x18ef5c:0x47e,_0x26d76a:0x226,_0x10d671:0x22d,_0x341c1b:0x211,_0x17824b:0x202,_0x31c217:0x473},_0x1b2c98={_0x27a2de:0x27b};function _0x489062(_0x43e478,_0x188d15,_0x48f748,_0xad7adf){return _0x12e5(_0x48f748-_0x1b2c98._0x27a2de,_0xad7adf);}function _0x5096aa(_0x142f69,_0x490ab5,_0x1f8d67,_0x2d9b66){return _0x12e5(_0x2d9b66-0x13,_0x142f69);}if(typeof _0x5d9868!==_0x489062(_0x58686f._0x95cb6f,0x491,_0x58686f._0x18ef5c,0x47f)||_0x5d9868===null||Array[_0x5096aa(0x23e,_0x58686f._0x26d76a,0x249,_0x58686f._0x10d671)](_0x5d9868))return![];const _0xbacc60=_0x5d9868;return typeof _0xbacc60[_0x5096aa(0x1f0,_0x58686f._0x341c1b,_0x58686f._0x17824b,0x209)]===_0x489062(_0x58686f._0x31c217,0x456,0x469,0x44b);}function isImageToolResultBlock(_0x1cecf3){const _0x31b861={_0x2f77a0:0x187,_0x20fdc6:0x19f,_0x248962:0x18a,_0x301db1:0x180,_0x57ecc6:0x16f,_0x5ef364:0x229,_0x4ca383:0x23f,_0x1296bb:0x1b6,_0x39ec61:0x246,_0x2a5ff4:0x237,_0x3d0ca0:0x244,_0x10579b:0x1b1,_0x12e26d:0x19a,_0x50de9e:0x198,_0x473995:0x237,_0x35076d:0x223,_0x4185c5:0x22b,_0x272a56:0x23e,_0x587aa0:0x244,_0xe9645d:0x192,_0x5ec2e2:0x189,_0x31175b:0x196,_0x1f751a:0x1a9},_0x2cb1bc={_0x421784:0x33},_0x3f6e90={_0xd2b65:0x395};if(typeof _0x1cecf3!=='object'||_0x1cecf3===null||Array[_0x53e784(-0x160,-0x18e,-0x17b,-0x17c)](_0x1cecf3))return![];function _0x53e784(_0x4e97f6,_0x1bd4f4,_0x178aee,_0x584245){return _0x12e5(_0x178aee- -_0x3f6e90._0xd2b65,_0x1bd4f4);}function _0x3daccd(_0x3bcf06,_0x41f538,_0x48fb05,_0x2f477e){return _0x12e5(_0x48fb05-_0x2cb1bc._0x421784,_0x3bcf06);}const _0x55da23=_0x1cecf3;return _0x55da23[_0x53e784(-_0x31b861._0x2f77a0,-0x18a,-_0x31b861._0x20fdc6,-_0x31b861._0x248962)]===_0x53e784(-_0x31b861._0x301db1,-0x1a1,-0x18b,-_0x31b861._0x57ecc6)&&_0x55da23['source']?.[_0x3daccd(0x223,0x233,_0x31b861._0x5ef364,_0x31b861._0x4ca383)]===_0x53e784(-0x1bb,-_0x31b861._0x1296bb,-0x19d,-0x1b1)&&typeof _0x55da23[_0x3daccd(_0x31b861._0x39ec61,_0x31b861._0x2a5ff4,_0x31b861._0x3d0ca0,0x260)][_0x53e784(-_0x31b861._0x10579b,-0x1b7,-_0x31b861._0x12e26d,-_0x31b861._0x50de9e)]===_0x3daccd(_0x31b861._0x473995,_0x31b861._0x35076d,0x221,0x207)&&typeof _0x55da23[_0x3daccd(_0x31b861._0x4185c5,_0x31b861._0x272a56,_0x31b861._0x587aa0,0x236)][_0x53e784(-_0x31b861._0xe9645d,-_0x31b861._0x5ec2e2,-_0x31b861._0x31175b,-0x19a)]===_0x53e784(-_0x31b861._0x1f751a,-_0x31b861._0x5ec2e2,-0x1a7,-0x19a);}function _0x12e5(_0xfad092,_0x47d513){_0xfad092=_0xfad092-0x1ee;const _0x44872e=_0x4487();let _0x12e589=_0x44872e[_0xfad092];if(_0x12e5['DCWUDP']===undefined){var _0x128cd5=function(_0x4040cd){const _0x5ad65c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5d363a='',_0x4ae85f='';for(let _0x59bbbb=0x0,_0x305e30,_0x3526ad,_0x43e0de=0x0;_0x3526ad=_0x4040cd['charAt'](_0x43e0de++);~_0x3526ad&&(_0x305e30=_0x59bbbb%0x4?_0x305e30*0x40+_0x3526ad:_0x3526ad,_0x59bbbb++%0x4)?_0x5d363a+=String['fromCharCode'](0xff&_0x305e30>>(-0x2*_0x59bbbb&0x6)):0x0){_0x3526ad=_0x5ad65c['indexOf'](_0x3526ad);}for(let _0x43f6b9=0x0,_0x4a370e=_0x5d363a['length'];_0x43f6b9<_0x4a370e;_0x43f6b9++){_0x4ae85f+='%'+('00'+_0x5d363a['charCodeAt'](_0x43f6b9)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4ae85f);};_0x12e5['LRnWUC']=_0x128cd5,_0x12e5['sJvwgw']={},_0x12e5['DCWUDP']=!![];}const _0x1fb913=_0x44872e[0x0],_0x5714cb=_0xfad092+_0x1fb913,_0x4ae2f3=_0x12e5['sJvwgw'][_0x5714cb];return!_0x4ae2f3?(_0x12e589=_0x12e5['LRnWUC'](_0x12e589),_0x12e5['sJvwgw'][_0x5714cb]=_0x12e589):_0x12e589=_0x4ae2f3,_0x12e589;}function getToolResultText(_0x2ff404){const _0x4fbb37={_0x55e990:0x1ad,_0x102fa7:0x190,_0x2a0cd5:0x175,_0x151caa:0x162,_0x67188c:0x17c,_0x3c8c97:0x1ad,_0x4874b5:0x1a0,_0x425471:0x15f,_0x127fe5:0x172,_0x48d7ee:0x176},_0x555b09={_0x1a42ae:0x35d},_0x1602e3={_0x14af9e:0x2d2,_0x3dad59:0x2b4,_0x7d707c:0x2ba},_0x4cf6d5={_0x4e4bae:0x18f};function _0x2884ba(_0x11e149,_0x43b7de,_0x375229,_0x4f2c13){return _0x12e5(_0x4f2c13- -0x88,_0x375229);}if(typeof _0x2ff404==='string')return _0x2ff404;const _0x2a17b9=_0x2ff404[_0x2884ba(0x19b,0x185,_0x4fbb37._0x55e990,_0x4fbb37._0x102fa7)](_0x453068=>{const _0x188054={_0x4e9d06:0xb0};function _0x562229(_0xbe2410,_0x493d0e,_0x1536b8,_0x5fcae7){return _0x2884ba(_0xbe2410-0xec,_0x493d0e-_0x4cf6d5._0x4e4bae,_0x1536b8,_0x493d0e-0x146);}function _0x184990(_0x5868d6,_0x586227,_0x2f824f,_0x330242){return _0x2884ba(_0x5868d6-0x19,_0x586227-_0x188054._0x4e9d06,_0x5868d6,_0x2f824f- -0x97);}return typeof _0x453068===_0x184990(0xd5,0xc7,0xe4,0xe3)&&_0x453068!==null&&_0x453068[_0x562229(_0x1602e3._0x14af9e,_0x1602e3._0x3dad59,_0x1602e3._0x7d707c,0x29c)]===_0x184990(0x104,0xf4,0xf7,0xe1);})[_0x2884ba(_0x4fbb37._0x2a0cd5,0x176,_0x4fbb37._0x151caa,_0x4fbb37._0x67188c)](_0x1f60ed=>_0x1f60ed['text'])[_0x426a56(0x53b,0x55e,0x53a,0x550)]('\x0a\x0a')[_0x2884ba(_0x4fbb37._0x3c8c97,0x181,_0x4fbb37._0x4874b5,0x191)]();function _0x426a56(_0x376fe5,_0x1a6d25,_0x3ab8dc,_0x5842e6){return _0x12e5(_0x5842e6-_0x555b09._0x1a42ae,_0x1a6d25);}return _0x2a17b9['length']>0x0?_0x2a17b9:_0x2884ba(_0x4fbb37._0x425471,0x17c,_0x4fbb37._0x127fe5,_0x4fbb37._0x48d7ee);}function getToolResultImages(_0x5a2737){const _0xa19a07={_0x14b944:0x270};function _0x3d490f(_0x422e53,_0x443e69,_0x43d58d,_0x436232){return _0x12e5(_0x43d58d- -_0xa19a07._0x14b944,_0x422e53);}return Array['isArray'](_0x5a2737)?_0x5a2737[_0x3d490f(-0x72,-0x3c,-0x58,-0x68)](isImageToolResultBlock):[];}function resolveReasoningVisibility(_0x2b559a){const _0x266ca8={_0x407ab7:0x479,_0x38c8d9:0x462};function _0x30b0d0(_0x3c4fbd,_0x43e734,_0x4e7515,_0x27ddee){return _0x12e5(_0x4e7515-0x23d,_0x43e734);}return _0x2b559a['reasoning']?.['visibility']??_0x30b0d0(_0x266ca8._0x407ab7,0x459,_0x266ca8._0x38c8d9,0x46b);}function createOpenAiResponsesReasoning(_0x1ec910){const _0x5f4409={_0x49d3b5:0x444,_0x50071f:0x443,_0x270554:0x48a,_0x27703b:0x45e,_0x2ce4a9:0x451,_0x546752:0x46d,_0x339643:0x49f,_0x1d7ab1:0x493,_0x2beb9f:0x486,_0x197af2:0x497,_0xf96b61:0x47e,_0x41924d:0x486,_0x42b6f5:0x47f,_0x267361:0x48a,_0xe90c48:0x43e,_0x30dcb5:0x428,_0x416f70:0x455,_0xb0ab05:0x474,_0x1636d6:0x466},_0x4993ed={_0x540677:0x266};function _0x120f97(_0x5bece5,_0x151435,_0x35fb8e,_0x1d96ae){return _0x12e5(_0x35fb8e-0x22c,_0x1d96ae);}const _0x4e133a=resolveOpenAiReasoningConfig(_0x1ec910[_0x120f97(0x438,_0x5f4409._0x49d3b5,_0x5f4409._0x50071f,0x451)]);function _0x28c0bf(_0x39fddd,_0x5350ed,_0x120de2,_0x3e06b0){return _0x12e5(_0x3e06b0-_0x4993ed._0x540677,_0x120de2);}if(!_0x4e133a)return{};const _0x38afcd={},_0x354e58=_0x4e133a[_0x28c0bf(0x4a3,0x483,0x484,_0x5f4409._0x270554)]??(resolveReasoningVisibility(_0x1ec910)===_0x120f97(0x46c,_0x5f4409._0x27703b,_0x5f4409._0x2ce4a9,_0x5f4409._0x546752)?'auto':void 0x0);return _0x4e133a[_0x28c0bf(_0x5f4409._0x339643,0x487,_0x5f4409._0x1d7ab1,_0x5f4409._0x2beb9f)]&&(_0x38afcd[_0x28c0bf(0x488,0x480,_0x5f4409._0x197af2,_0x5f4409._0x2beb9f)]=_0x4e133a[_0x28c0bf(0x475,_0x5f4409._0xf96b61,0x4a0,_0x5f4409._0x41924d)]),_0x354e58&&(_0x38afcd[_0x28c0bf(0x477,_0x5f4409._0x42b6f5,0x488,_0x5f4409._0x267361)]=_0x354e58),{..._0x4e133a[_0x120f97(_0x5f4409._0xe90c48,0x42c,_0x5f4409._0x30dcb5,0x431)]===![]?{}:{'include':[_0x28c0bf(0x445,0x445,0x455,_0x5f4409._0x416f70)]},...Object[_0x28c0bf(_0x5f4409._0xb0ab05,_0x5f4409._0x1636d6,0x477,0x46c)](_0x38afcd)['length']>0x0?{'reasoning':_0x38afcd}:{}};}function pushAssistantProviderState(_0x455580,_0x36d8ad){const _0x352d59={_0xf59184:0x2a9,_0x554ad6:0x277,_0x36e3c0:0x27f,_0x59c76f:0x27f,_0x21e337:0x2a6,_0x58bcf8:0x2b7},_0x8b97f3={_0x5b20:0x60};if(_0x36d8ad['role']!=='assistant')return![];const _0x3f5ccb=_0x36d8ad[_0x22b90f(0x293,_0x352d59._0xf59184,0x2a2,0x2b0)]?.[_0x22b90f(_0x352d59._0x554ad6,0x279,0x26c,0x289)]??[];if(_0x3f5ccb[_0x345bcc(0x268,_0x352d59._0x36e3c0,_0x352d59._0x59c76f,0x276)]===0x0)return![];for(const _0x4d2ccb of _0x3f5ccb){isResponseInputObject(_0x4d2ccb)&&_0x455580[_0x22b90f(0x2a0,0x2cc,_0x352d59._0x21e337,_0x352d59._0x58bcf8)](structuredClone(_0x4d2ccb));}function _0x345bcc(_0x23c18a,_0x512109,_0x534ba5,_0x180b03){return _0x12e5(_0x23c18a-_0x8b97f3._0x5b20,_0x512109);}function _0x22b90f(_0xa9831d,_0x32085c,_0x351fae,_0x350036){return _0x12e5(_0x350036-0x8f,_0x32085c);}return!![];}function toOpenAiResponsesRequest(_0x5e149a){const _0x5807a0={_0x571595:0x517,_0x126e72:0x512,_0x3d2a3c:0x528,_0x77a049:0x535,_0x3e3e9a:0x524,_0x3b654e:0x16f,_0x2b2145:0x183,_0x14de7c:0x187,_0x4ddb84:0x18f,_0x2cb9cc:0x533,_0x5d815a:0x53a,_0x2e99c2:0x53e,_0x12ba99:0x171,_0x3a34cc:0x170,_0x42de5e:0x180,_0x4f10d9:0x520,_0x2fdddc:0x528,_0x4aa598:0x4f6,_0x132fd2:0x508,_0x2ffd54:0x50d,_0x3fac3d:0x51e,_0x31ee48:0x526,_0xf6ce61:0x15d,_0x2f9c04:0x152,_0x1a132e:0x175,_0x3c25d3:0x18a,_0x2d3d13:0x4f4,_0x2a0973:0x4f5,_0x38e842:0x509,_0x1112de:0x523,_0x83bf90:0x178,_0x54da3d:0x176,_0x2c7bbb:0x16b,_0x1dce36:0x193,_0x5a1d55:0x195,_0x47fc9e:0x1b2,_0x4e597f:0x15a,_0x173d76:0x163,_0x5627eb:0x530,_0x3c7141:0x555,_0x5a2bf8:0x51d,_0x4b7750:0x197,_0x4f73aa:0x51e,_0x962fc2:0x520,_0x5b8e72:0x52f,_0x4b2257:0x514,_0x29f819:0x521,_0x46322b:0x19f,_0x154ac4:0x1a1,_0x309e29:0x17f,_0x55d390:0x15e,_0x24f821:0x169,_0x38549f:0x172,_0x47cc67:0x1a7,_0x5c9edf:0x18c,_0x1d413d:0x18b,_0x49f5e8:0x517,_0x4ae106:0x19c,_0x2ee3fc:0x19f,_0x5cb600:0x532,_0x3b3bfc:0x51a,_0x4c111b:0x188,_0xd925d0:0x50b,_0x2c228a:0x4ff,_0x26389e:0x511,_0x2a1eac:0x516,_0x5e0d31:0x516,_0x46491c:0x521,_0x256371:0x53d,_0x3a1cdb:0x516,_0x4f5fc9:0x531,_0xe85e00:0x18f,_0x5f4511:0x1b5,_0x568af5:0x52d,_0x19a7c6:0x4fa},_0x54bdc5={_0x4d43e0:0x2fa},_0xd5b740={_0x61ebf9:0x87};function _0x2cb9db(_0x1107fa,_0x362a30,_0x39b9a8,_0x51bc56){return _0x12e5(_0x51bc56- -_0xd5b740._0x61ebf9,_0x362a30);}const _0x56f49e=[];for(const _0x22820f of _0x5e149a[_0x45630f(_0x5807a0._0x571595,0x519,_0x5807a0._0x126e72,_0x5807a0._0x3d2a3c)]){if(pushAssistantProviderState(_0x56f49e,_0x22820f))continue;const _0x2612c8=[];for(const _0x15f59d of normalizeContent(_0x22820f[_0x45630f(_0x5807a0._0x77a049,0x51e,_0x5807a0._0x3e3e9a,0x52b)])){if(_0x15f59d[_0x2cb9db(0x166,0x16c,0x183,_0x5807a0._0x3b654e)]===_0x2cb9db(0x1a7,_0x5807a0._0x2b2145,_0x5807a0._0x14de7c,_0x5807a0._0x4ddb84)){_0x2612c8[_0x45630f(0x534,_0x5807a0._0x2cb9cc,_0x5807a0._0x5d815a,_0x5807a0._0x2e99c2)]({'type':_0x2cb9db(0x176,_0x5807a0._0x12ba99,_0x5807a0._0x3a34cc,_0x5807a0._0x42de5e),'text':_0x15f59d[_0x45630f(_0x5807a0._0x4f10d9,0x51c,_0x5807a0._0x2fdddc,0x524)]});continue;}if(_0x15f59d[_0x45630f(_0x5807a0._0x4aa598,0x503,_0x5807a0._0x132fd2,_0x5807a0._0x2ffd54)]===_0x45630f(0x51c,0x504,0x51c,0x527)){_0x2612c8[_0x45630f(_0x5807a0._0x3fac3d,_0x5807a0._0x31ee48,_0x5807a0._0x5d815a,0x539)]({'type':_0x2cb9db(0x187,0x17b,_0x5807a0._0x2b2145,_0x5807a0._0x3a34cc),'image_url':_0x2cb9db(_0x5807a0._0xf6ce61,0x164,_0x5807a0._0x2f9c04,0x16a)+_0x15f59d[_0x2cb9db(0x186,_0x5807a0._0x1a132e,0x175,_0x5807a0._0x3c25d3)][_0x45630f(_0x5807a0._0x2d3d13,_0x5807a0._0x2a0973,0x50d,_0x5807a0._0x132fd2)]+';base64,'+_0x15f59d[_0x45630f(0x538,_0x5807a0._0x38e842,_0x5807a0._0x1112de,0x525)][_0x2cb9db(_0x5807a0._0x83bf90,_0x5807a0._0x54da3d,0x17a,_0x5807a0._0x83bf90)]});continue;}pushUserContentMessage(_0x56f49e,_0x22820f[_0x2cb9db(_0x5807a0._0x2c7bbb,_0x5807a0._0x1dce36,0x18e,0x187)],_0x2612c8[_0x2cb9db(0x180,_0x5807a0._0x5a1d55,_0x5807a0._0x47fc9e,0x195)](0x0));if(_0x15f59d[_0x2cb9db(0x152,_0x5807a0._0x4e597f,_0x5807a0._0x173d76,_0x5807a0._0x3b654e)]===_0x45630f(0x532,0x509,0x51f,_0x5807a0._0x5627eb)){if(!hasSerializableToolUse(_0x15f59d))continue;_0x56f49e[_0x45630f(_0x5807a0._0x3c7141,_0x5807a0._0x5a2bf8,0x53a,0x54e)]({'type':'function_call','call_id':_0x15f59d['id'],'name':_0x15f59d[_0x2cb9db(0x17b,0x199,0x1a5,_0x5807a0._0x4b7750)],'arguments':JSON[_0x45630f(0x526,0x536,0x534,0x546)](_0x15f59d[_0x45630f(0x4fb,_0x5807a0._0x4f73aa,0x50f,_0x5807a0._0x962fc2)]??{})});continue;}if(_0x15f59d['type']===_0x45630f(_0x5807a0._0x5b8e72,0x510,_0x5807a0._0x4b2257,_0x5807a0._0x29f819)){if(!hasSerializableToolResult(_0x15f59d))continue;const _0x3092da=getToolResultText(_0x15f59d[_0x2cb9db(0x17e,_0x5807a0._0x46322b,_0x5807a0._0x154ac4,0x18b)]);_0x56f49e[_0x2cb9db(0x1b3,0x186,0x1aa,0x1a1)]({'type':_0x2cb9db(0x173,_0x5807a0._0x309e29,_0x5807a0._0x55d390,_0x5807a0._0x24f821),'call_id':_0x15f59d[_0x2cb9db(0x16f,0x185,0x186,_0x5807a0._0x38549f)],'output':_0x3092da});const _0x514851=getToolResultImages(_0x15f59d[_0x2cb9db(_0x5807a0._0x47cc67,_0x5807a0._0x5c9edf,_0x5807a0._0x47cc67,_0x5807a0._0x1d413d)]);_0x514851[_0x45630f(_0x5807a0._0x3e3e9a,_0x5807a0._0x49f5e8,0x51a,0x52e)]>0x0&&_0x56f49e['push']({'type':'message','role':_0x2cb9db(_0x5807a0._0x4ae106,0x1b0,0x183,_0x5807a0._0x2ee3fc),'content':[{'type':_0x45630f(_0x5807a0._0x5cb600,_0x5807a0._0x3b3bfc,0x519,0x535),'text':_0x2cb9db(0x19f,_0x5807a0._0x38549f,0x17f,_0x5807a0._0x4c111b)+_0x15f59d[_0x45630f(0x4fd,0x50b,_0x5807a0._0xd925d0,_0x5807a0._0x2c228a)]+'.'},..._0x514851[_0x45630f(0x4f8,_0x5807a0._0x26389e,_0x5807a0._0x2a1eac,_0x5807a0._0x5e0d31)](_0x14e422=>({'type':_0x45630f(0x50f,0x50c,0x509,0x50c),'image_url':'data:'+_0x14e422[_0x2cb9db(0x1a0,0x1a2,0x1a0,0x18a)][_0x2cb9db(0x171,0x156,0x192,0x174)]+';base64,'+_0x14e422[_0x45630f(0x534,0x517,0x523,0x517)][_0x2cb9db(0x18d,0x162,0x17e,0x178)]}))]});}}pushUserContentMessage(_0x56f49e,_0x22820f[_0x45630f(0x535,_0x5807a0._0x46491c,_0x5807a0._0x4f10d9,_0x5807a0._0x256371)],_0x2612c8);}function _0x45630f(_0x540be1,_0x13ba4c,_0x4b1ebc,_0x1d10a6){return _0x12e5(_0x4b1ebc-0x312,_0x1d10a6);}return{...createOpenAiResponsesReasoning(_0x5e149a),'model':_0x5e149a[_0x45630f(0x51a,0x50c,0x517,_0x5807a0._0x3a1cdb)],'instructions':systemToInstructions(_0x5e149a[_0x45630f(_0x5807a0._0x4f5fc9,0x52f,0x522,0x530)]),'input':_0x56f49e,'max_output_tokens':_0x5e149a[_0x2cb9db(0x1a6,_0x5807a0._0xe85e00,_0x5807a0._0x5f4511,0x198)],'tools':_0x5e149a['tools'][_0x45630f(0x500,_0x5807a0._0x568af5,0x516,_0x5807a0._0x19a7c6)](_0x320378=>{const _0x1cc905={_0x17d7e3:0x108};function _0xda380(_0x6d27f2,_0x411387,_0x42ffb4,_0x430930){return _0x45630f(_0x6d27f2-_0x1cc905._0x17d7e3,_0x411387-0x16e,_0x42ffb4- -0x172,_0x430930);}function _0x59e608(_0x5ba0ba,_0x2e579b,_0x225214,_0x1f2884){return _0x45630f(_0x5ba0ba-0x4f,_0x2e579b-0x133,_0x225214- -0x237,_0x1f2884);}return{'type':_0x59e608(_0x54bdc5._0x4d43e0,0x316,0x302,0x308),'name':_0x320378['name'],'description':_0x320378[_0xda380(0x3ac,0x3b1,0x3ab,0x397)],'parameters':_0x320378['input_schema']};})};}export{toOpenAiResponsesRequest};
@@ -1 +0,0 @@
1
- (function(_0x548a8d,_0x4d4df3){const _0x51a616={_0x3c9e57:0x257,_0x1be475:0x24a,_0x434458:0x1a9,_0x4309b9:0x271,_0x457f4c:0x27b,_0x453bde:0x260,_0x9f3ac9:0x261,_0x2508f6:0x284,_0x2d21d9:0x26a,_0x5bd9b6:0x28c,_0x3fcbe3:0x291,_0x4d5a2f:0x177,_0x1f2c52:0x27d,_0x5b2cc8:0x274,_0x4ec36e:0x273,_0xd48ee9:0x19a,_0x2fe74f:0x250,_0xbf2073:0x1a0},_0x56c78f={_0x241075:0xe6},_0x2288f7={_0x1cf3d4:0x316};function _0x3aeb57(_0x49df3a,_0xf05d6f,_0x13f065,_0x573a14){return _0x54f2(_0xf05d6f- -_0x2288f7._0x1cf3d4,_0x49df3a);}function _0x378d2(_0x544e55,_0x4624fc,_0x236144,_0x479b09){return _0x54f2(_0x236144-_0x56c78f._0x241075,_0x4624fc);}const _0x337bf6=_0x548a8d();while(!![]){try{const _0x2dc977=parseInt(_0x378d2(0x242,0x23f,_0x51a616._0x3c9e57,_0x51a616._0x1be475))/0x1*(-parseInt(_0x3aeb57(-_0x51a616._0x434458,-0x1a4,-0x18a,-0x1b9))/0x2)+-parseInt(_0x378d2(_0x51a616._0x4309b9,_0x51a616._0x457f4c,_0x51a616._0x453bde,_0x51a616._0x9f3ac9))/0x3*(parseInt(_0x378d2(0x285,_0x51a616._0x2508f6,_0x51a616._0x2d21d9,0x258))/0x4)+parseInt(_0x378d2(0x27a,_0x51a616._0x5bd9b6,0x281,_0x51a616._0x3fcbe3))/0x5*(-parseInt(_0x3aeb57(-0x19d,-0x182,-0x176,-_0x51a616._0x4d5a2f))/0x6)+-parseInt(_0x378d2(_0x51a616._0x1f2c52,_0x51a616._0x5b2cc8,0x278,_0x51a616._0x4ec36e))/0x7+-parseInt(_0x3aeb57(-0x1ad,-_0x51a616._0xd48ee9,-0x1b5,-0x189))/0x8+parseInt(_0x378d2(0x26d,0x261,0x26b,_0x51a616._0x2fe74f))/0x9+parseInt(_0x3aeb57(-_0x51a616._0xbf2073,-0x198,-0x197,-0x18c))/0xa;if(_0x2dc977===_0x4d4df3)break;else _0x337bf6['push'](_0x337bf6['shift']());}catch(_0xf5a07a){_0x337bf6['push'](_0x337bf6['shift']());}}}(_0x4488,0x4edb3));function createTextBlock(_0x2e4e1a){return{'type':'text','text':_0x2e4e1a};}function normalizeTextBlock(_0x1a2bec){return createTextBlock(_0x1a2bec['text']??'');}function normalizeContent(_0x1f7988){const _0xaccd37={_0x1d1381:0x26d,_0x2ae9dc:0x287,_0x1bb24c:0x33c},_0x4a7bc5={_0x35ecb4:0x33,_0xb0ace5:0x1f},_0x4e3c21={_0x1cd323:0x1f3,_0x2cc674:0x2c,_0x50a438:0x23d},_0x5dd1c1={_0xe573d9:0x1a5},_0xa5f79a={_0x356131:0xe0};function _0x392d64(_0x495d70,_0x52f175,_0x261e8e,_0x573ab6){return _0x54f2(_0x573ab6-_0xa5f79a._0x356131,_0x52f175);}if(typeof _0x1f7988==='string')return[createTextBlock(_0x1f7988)];function _0x500169(_0x5b7900,_0x5ee37a,_0x5e8ec8,_0x5c3ebf){return _0x54f2(_0x5c3ebf-_0x5dd1c1._0xe573d9,_0x5b7900);}if(!Array[_0x392d64(_0xaccd37._0x1d1381,_0xaccd37._0x2ae9dc,0x28a,0x27e)](_0x1f7988))return[];return _0x1f7988[_0x500169(_0xaccd37._0x1bb24c,0x349,0x331,0x345)](_0x422773=>{function _0x146b52(_0x3bc11b,_0x13db61,_0x63701a,_0x2e40bf){return _0x392d64(_0x3bc11b-_0x4e3c21._0x1cd323,_0x63701a,_0x63701a-_0x4e3c21._0x2cc674,_0x3bc11b- -_0x4e3c21._0x50a438);}if(_0x422773[_0x146b52(_0x4a7bc5._0x35ecb4,0x27,0x25,_0x4a7bc5._0xb0ace5)]==='text')return normalizeTextBlock(_0x422773);return structuredClone(_0x422773);});}function normalizeSystem(_0x17a4d1=[]){const _0x2add69={_0x40fb04:0x134,_0x571c4b:0x121},_0x1ef61e={_0x27e6c4:0x249};function _0x22eb44(_0xe5c300,_0x5a10a3,_0x588413,_0x45e753){return _0x54f2(_0x45e753-_0x1ef61e._0x27e6c4,_0xe5c300);}function _0x5199a6(_0x479d53,_0x5810b6,_0xfc39ba,_0x3c9f1){return _0x54f2(_0xfc39ba- -0x6a,_0x479d53);}return normalizeContent(_0x17a4d1)[_0x5199a6(0x106,_0x2add69._0x40fb04,_0x2add69._0x571c4b,0x10e)](_0x3dbb39=>_0x3dbb39[_0x22eb44(0x3ec,0x3e2,0x3bf,0x3d9)]===_0x5199a6(0x114,0x13b,0x12d,0x13a));}function normalizeMessage(_0x28fc51){const _0x3d8444={_0x4f7f77:0xee,_0x374b4d:0x1be,_0x4cd2b6:0x1a7,_0x590196:0x18e,_0xa13b02:0xf0,_0x5c865d:0xd7,_0x4f1fe5:0xd8,_0xcaf4b6:0xfd},_0x4cf877={_0x4d0922:0x2f},_0x20788b={_0x5ce50f:0xa1};function _0x12896a(_0x3ae67d,_0x377339,_0x9fe7e6,_0x1b65b0){return _0x54f2(_0x377339- -_0x20788b._0x5ce50f,_0x1b65b0);}function _0x24e4d9(_0x43e737,_0x50afca,_0x1ae037,_0x5434a4){return _0x54f2(_0x50afca-_0x4cf877._0x4d0922,_0x5434a4);}return{...typeof _0x28fc51['id']===_0x12896a(0xf4,0xf4,_0x3d8444._0x4f7f77,0xd9)?{'id':_0x28fc51['id']}:{},'role':_0x28fc51['role'],'content':normalizeContent(_0x28fc51[_0x24e4d9(_0x3d8444._0x374b4d,_0x3d8444._0x4cd2b6,_0x3d8444._0x590196,0x1bf)]),..._0x28fc51[_0x12896a(0xf8,_0x3d8444._0xa13b02,_0x3d8444._0x5c865d,0xef)]?{'providerState':structuredClone(_0x28fc51[_0x12896a(_0x3d8444._0x4f1fe5,_0x3d8444._0xa13b02,0x109,_0x3d8444._0xcaf4b6)])}:{}};}function compileRequest(_0x2c6e00){const _0x4422e0={_0x4ae2cd:0x38b,_0x572460:0x122,_0x509fd8:0x110,_0x437fc9:0x101,_0x555d9d:0x116,_0x5c3ae6:0x10b,_0xf916e1:0xff,_0x8d5122:0x12b,_0x2f3de8:0x118,_0x379199:0x388,_0x133753:0x390,_0x320461:0x39f,_0x216e1a:0x385,_0x30c76c:0x38a,_0x45cfbc:0x372,_0xcdcf69:0x377,_0x59f11f:0xf0,_0x402674:0x11e},_0x1912b4={_0x2ffa19:0x210},_0x3c327b={_0x4d7b62:0x2a6};function _0x59fcea(_0x1ac74b,_0x146473,_0x42ade2,_0x3a05b7){return _0x54f2(_0x1ac74b- -_0x3c327b._0x4d7b62,_0x42ade2);}function _0x18b1af(_0x1250dd,_0x5f5d10,_0x330735,_0x1cda36){return _0x54f2(_0x330735-_0x1912b4._0x2ffa19,_0x1cda36);}return{'model':_0x2c6e00[_0x18b1af(0x37d,0x398,_0x4422e0._0x4ae2cd,0x386)]??'claude-sonnet-4-20250514','max_tokens':_0x2c6e00[_0x59fcea(-0x119,-0x10d,-0x131,-_0x4422e0._0x572460)]??0x400,..._0x2c6e00[_0x59fcea(-_0x4422e0._0x509fd8,-_0x4422e0._0x437fc9,-_0x4422e0._0x555d9d,-_0x4422e0._0x5c3ae6)]?{'reasoning':structuredClone(_0x2c6e00[_0x59fcea(-_0x4422e0._0x509fd8,-_0x4422e0._0xf916e1,-_0x4422e0._0x8d5122,-_0x4422e0._0x2f3de8)])}:{},'system':normalizeSystem(_0x2c6e00[_0x18b1af(_0x4422e0._0x379199,_0x4422e0._0x133753,_0x4422e0._0x320461,_0x4422e0._0x216e1a)]),'messages':_0x2c6e00['messages']['map'](normalizeMessage),'tools':structuredClone(_0x2c6e00[_0x18b1af(0x380,_0x4422e0._0x30c76c,0x391,0x3a4)]??[]),'metadata':{'session_id':_0x2c6e00[_0x18b1af(0x373,_0x4422e0._0x45cfbc,0x37f,_0x4422e0._0xcdcf69)],'turn_id':_0x2c6e00[_0x59fcea(-0x109,-0x116,-_0x4422e0._0x59f11f,-_0x4422e0._0x402674)]}};}function toChatRequest(_0x97f22){const _0x347680={_0x2c00f9:0x163,_0x32c1a5:0x174,_0x5a1ac9:0x171,_0x4ed7b0:0x159,_0x297d3a:0x6e,_0x3befff:0x86,_0x31cf6b:0x6c,_0x2a5f58:0x9a,_0x1a8535:0x154,_0x2c83bd:0x13c,_0x122496:0xac,_0x229816:0xa2,_0x3190e6:0xb4,_0x42cf52:0x98};function _0x47ae4e(_0x199de7,_0x3ecd60,_0x34d698,_0xf0b46c){return _0x54f2(_0xf0b46c- -0x34,_0x199de7);}function _0x58ca9f(_0xba8d55,_0x136321,_0x59079c,_0x55e2d0){return _0x54f2(_0x136321- -0x21c,_0x59079c);}return{'model':_0x97f22['model'],'maxTokens':_0x97f22[_0x47ae4e(_0x347680._0x2c00f9,_0x347680._0x32c1a5,_0x347680._0x5a1ac9,_0x347680._0x4ed7b0)],..._0x97f22[_0x58ca9f(-_0x347680._0x297d3a,-0x86,-0x85,-0x76)]?{'reasoning':structuredClone(_0x97f22[_0x58ca9f(-0x73,-_0x347680._0x3befff,-_0x347680._0x31cf6b,-0x75)])}:{},'system':structuredClone(_0x97f22['system']),'messages':structuredClone(_0x97f22['messages']),'tools':structuredClone(_0x97f22[_0x58ca9f(-0xb4,-0x9b,-0x8f,-_0x347680._0x2a5f58)]),'metadata':{'sessionId':_0x97f22[_0x47ae4e(0x145,0x144,_0x347680._0x1a8535,_0x347680._0x2c83bd)]['session_id'],'turnId':_0x97f22[_0x58ca9f(-0xbd,-_0x347680._0x122496,-0xb2,-_0x347680._0x229816)][_0x58ca9f(-_0x347680._0x229816,-0xa8,-_0x347680._0x3190e6,-_0x347680._0x42cf52)]}};}function toModelRequest(_0x504917){const _0x4f2bca={_0x4825ce:0x1f7,_0x237650:0xa0,_0x43888f:0x21a,_0x52bb9e:0x213,_0x5981c3:0x200,_0x2a6b69:0x206,_0x1908ce:0x1f9,_0x4903bf:0x208,_0x3cf0b0:0x210,_0x35788d:0x1fd,_0x5869f2:0x1e3,_0x2b62ed:0xce,_0x3e4829:0x1da,_0x248cd8:0x1ec};function _0x13908a(_0x8c384e,_0x58334b,_0x54f554,_0x58cee9){return _0x54f2(_0x58334b- -0x241,_0x54f554);}function _0x504616(_0x57c77a,_0x263c16,_0x43b82e,_0x2f73aa){return _0x54f2(_0x43b82e-0x7c,_0x263c16);}return{'model':_0x504917[_0x504616(0x208,0x1db,_0x4f2bca._0x4825ce,0x1eb)],'max_tokens':_0x504917[_0x13908a(-0xb8,-_0x4f2bca._0x237650,-0x84,-0xba)],..._0x504917[_0x504616(_0x4f2bca._0x43888f,_0x4f2bca._0x52bb9e,0x212,_0x4f2bca._0x5981c3)]?{'reasoning':structuredClone(_0x504917['reasoning'])}:{},'system':structuredClone(_0x504917[_0x13908a(-0xa9,-0xb2,-0xc7,-0xb5)]),'messages':structuredClone(_0x504917[_0x504616(_0x4f2bca._0x2a6b69,0x1de,_0x4f2bca._0x1908ce,_0x4f2bca._0x4903bf)]),'tools':structuredClone(_0x504917[_0x504616(_0x4f2bca._0x3cf0b0,_0x4f2bca._0x5981c3,_0x4f2bca._0x35788d,_0x4f2bca._0x5869f2)]),'metadata':{'session_id':_0x504917['metadata'][_0x13908a(-_0x4f2bca._0x2b62ed,-0xd2,-0xdc,-0xc7)],'turn_id':_0x504917[_0x504616(_0x4f2bca._0x3e4829,0x1e7,_0x4f2bca._0x248cd8,0x1d4)]['turnId']}};}function toProviderModelRequest(_0x265db4){const _0xe79aa1={_0x4eb125:0x15c,_0x59b183:0x18e,_0x1e33cd:0x18a,_0x142063:0x4f3},_0x3428cc={_0x57371e:0x372};function _0x217b90(_0x2dc454,_0x535511,_0x3772f8,_0x4f1bc3){return _0x54f2(_0x535511-_0x3428cc._0x57371e,_0x3772f8);}function _0x4453ab(_0x2e8f09,_0x4221d1,_0x251976,_0x396a65){return _0x54f2(_0x4221d1- -0x301,_0x251976);}return{'model':_0x265db4['model'],'max_tokens':_0x265db4['maxTokens'],'system':structuredClone(_0x265db4[_0x4453ab(-0x176,-0x172,-_0xe79aa1._0x4eb125,-0x17d)]),'messages':structuredClone(_0x265db4[_0x4453ab(-_0xe79aa1._0x59b183,-0x184,-0x17d,-_0xe79aa1._0x1e33cd)]),'tools':structuredClone(_0x265db4[_0x217b90(0x4dd,_0xe79aa1._0x142063,0x4d8,0x4f2)])};}function toChatResponse(_0x1094f7){const _0x580185={_0x21994d:0x542,_0x2f7f6a:0x55b,_0x21c7ee:0x529,_0x3135d3:0x554,_0xcef8fc:0x55a,_0x4bfcd5:0x1c,_0x1cc2dd:0x569,_0x49042b:0x550,_0x598625:0x582,_0x4b8615:0x56e,_0x490d47:0x55e,_0x781c65:0x2e,_0x55d977:0x1c,_0x5dcde6:0x37,_0x54c7ea:0x45,_0x16dcb5:0x4e,_0x5db55f:0x546,_0xd876b8:0x557,_0x55f0a1:0x3d,_0x62517:0x2c,_0x42998f:0x40},_0x4d394f={_0x894c26:0x3ca},_0x5981c={_0x271a13:0x151};function _0x103b94(_0x1fbd6f,_0x10ba61,_0x55555a,_0x4764c0){return _0x54f2(_0x4764c0- -_0x5981c._0x271a13,_0x55555a);}function _0x29cf0d(_0x3aead9,_0x4f519e,_0x54ab73,_0xb5272a){return _0x54f2(_0x3aead9-_0x4d394f._0x894c26,_0x54ab73);}return{'id':_0x1094f7['id'],'content':structuredClone(_0x1094f7[_0x29cf0d(_0x580185._0x21994d,_0x580185._0x2f7f6a,0x55c,_0x580185._0x21c7ee)]),'stopReason':_0x1094f7[_0x29cf0d(_0x580185._0x3135d3,_0x580185._0xcef8fc,0x56a,0x54f)],'usage':{'inputTokens':_0x1094f7[_0x103b94(_0x580185._0x4bfcd5,0x51,0x2d,0x37)][_0x29cf0d(_0x580185._0x1cc2dd,_0x580185._0x49042b,_0x580185._0x598625,_0x580185._0x4b8615)],'outputTokens':_0x1094f7[_0x29cf0d(0x552,0x557,_0x580185._0x490d47,0x56a)]['output_tokens'],..._0x1094f7[_0x103b94(0x47,_0x580185._0x781c65,_0x580185._0x55d977,_0x580185._0x5dcde6)][_0x29cf0d(0x53d,0x527,0x52c,0x54a)]!==void 0x0?{'reasoningTokens':_0x1094f7[_0x103b94(_0x580185._0x54c7ea,0x4f,_0x580185._0x16dcb5,_0x580185._0x5dcde6)][_0x29cf0d(0x53d,0x53e,0x54b,_0x580185._0x5db55f)]}:{}},..._0x1094f7[_0x29cf0d(_0x580185._0x2f7f6a,_0x580185._0x3135d3,0x54c,_0x580185._0xd876b8)]?{'providerState':structuredClone(_0x1094f7[_0x103b94(0x48,_0x580185._0x55f0a1,_0x580185._0x62517,_0x580185._0x42998f)])}:{}};}function toModelResponse(_0xc35279){const _0x491a2a={_0x5a5b7a:0x189,_0x5617cd:0x164,_0x579766:0x16f,_0x4d0793:0x180,_0x5ce6fd:0x272,_0x34f74f:0x186,_0x1851d6:0x175,_0x35c8df:0x184,_0xc5031a:0x293,_0x51b96c:0x298,_0x225238:0x288,_0x2138cd:0x186,_0x49ef7b:0x17f,_0x5f0553:0x173,_0x20357f:0x29d,_0x9dd926:0x28e,_0x52cdfb:0x292},_0x2824d8={_0x290549:0x10c},_0x4a7c06={_0x2ed383:0x3};function _0x545b6c(_0x353dbc,_0x3cf9c2,_0x37ef69,_0x793f9d){return _0x54f2(_0x793f9d- -_0x4a7c06._0x2ed383,_0x3cf9c2);}function _0x49cdda(_0x2b81d4,_0x48d1af,_0x28b868,_0x5b3361){return _0x54f2(_0x2b81d4-_0x2824d8._0x290549,_0x48d1af);}return{'id':_0xc35279['id'],'type':_0x545b6c(_0x491a2a._0x5a5b7a,_0x491a2a._0x5617cd,_0x491a2a._0x579766,_0x491a2a._0x4d0793),'role':'assistant','content':structuredClone(_0xc35279[_0x49cdda(0x284,0x268,_0x491a2a._0x5ce6fd,0x29c)]),'stop_reason':_0xc35279[_0x545b6c(0x178,_0x491a2a._0x34f74f,_0x491a2a._0x1851d6,_0x491a2a._0x35c8df)],'stop_sequence':null,'usage':{'input_tokens':_0xc35279[_0x49cdda(0x294,_0x491a2a._0xc5031a,_0x491a2a._0x51b96c,_0x491a2a._0x225238)]['inputTokens'],'output_tokens':_0xc35279[_0x49cdda(0x294,0x2a5,0x2a4,0x282)]['outputTokens'],..._0xc35279['usage'][_0x545b6c(_0x491a2a._0x2138cd,_0x491a2a._0x34f74f,0x182,0x173)]!==void 0x0?{'reasoning_tokens':_0xc35279[_0x545b6c(_0x491a2a._0x49ef7b,0x195,0x198,0x185)][_0x545b6c(0x182,0x16b,0x16f,_0x491a2a._0x5f0553)]}:{}},..._0xc35279['providerState']?{'providerState':structuredClone(_0xc35279[_0x49cdda(_0x491a2a._0x20357f,_0x491a2a._0x9dd926,_0x491a2a._0x52cdfb,0x2ab)])}:{}};}function responseToAssistantMessage(_0xbde95a){const _0x449e36={_0x482bcd:0x23d,_0x4ff1b2:0x24b};function _0x215095(_0x1f2126,_0x3b480a,_0x334f40,_0x257b4c){return _0x54f2(_0x334f40- -0x25b,_0x257b4c);}function _0x21a53d(_0x40b3ec,_0x12f910,_0x48b72f,_0x49bfe5){return _0x54f2(_0x48b72f-0xca,_0x12f910);}return{'role':_0x215095(-0xf8,-0xe6,-0xed,-0xe5),'content':normalizeContent(_0xbde95a[_0x21a53d(0x249,_0x449e36._0x482bcd,0x242,0x240)]),..._0xbde95a[_0x21a53d(_0x449e36._0x4ff1b2,0x251,0x25b,0x264)]?{'providerState':structuredClone(_0xbde95a['providerState'])}:{}};}function _0x54f2(_0x1f3b7a,_0x3aca77){_0x1f3b7a=_0x1f3b7a-0x16d;const _0x4488b6=_0x4488();let _0x54f283=_0x4488b6[_0x1f3b7a];if(_0x54f2['QokwTq']===undefined){var _0x26677a=function(_0x57abc9){const _0x4e611e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2e4e1a='',_0x1a2bec='';for(let _0x1f7988=0x0,_0x422773,_0x17a4d1,_0x3dbb39=0x0;_0x17a4d1=_0x57abc9['charAt'](_0x3dbb39++);~_0x17a4d1&&(_0x422773=_0x1f7988%0x4?_0x422773*0x40+_0x17a4d1:_0x17a4d1,_0x1f7988++%0x4)?_0x2e4e1a+=String['fromCharCode'](0xff&_0x422773>>(-0x2*_0x1f7988&0x6)):0x0){_0x17a4d1=_0x4e611e['indexOf'](_0x17a4d1);}for(let _0x28fc51=0x0,_0x2c6e00=_0x2e4e1a['length'];_0x28fc51<_0x2c6e00;_0x28fc51++){_0x1a2bec+='%'+('00'+_0x2e4e1a['charCodeAt'](_0x28fc51)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1a2bec);};_0x54f2['MuCNSJ']=_0x26677a,_0x54f2['cLWiWO']={},_0x54f2['QokwTq']=!![];}const _0x7127df=_0x4488b6[0x0],_0x430b3e=_0x1f3b7a+_0x7127df,_0x40e273=_0x54f2['cLWiWO'][_0x430b3e];return!_0x40e273?(_0x54f283=_0x54f2['MuCNSJ'](_0x54f283),_0x54f2['cLWiWO'][_0x430b3e]=_0x54f283):_0x54f283=_0x40e273,_0x54f283;}function createReasoningMessage(_0x45745d){const _0x456b40={_0x4d065e:0x82,_0xeb8937:0x81,_0x23bcef:0x8d,_0x4c3cff:0x83,_0x238ec7:0xc9,_0x3803fa:0xbd,_0x17892d:0xae,_0x1531f4:0xae,_0x107b3d:0x9d},_0x18ea0d={_0x3bb5a4:0xe6,_0x4ed511:0xf3,_0x503232:0x1c5,_0x4c9f07:0x1d7,_0x12fccf:0x1e7,_0x1e218e:0x1d1,_0x21161b:0x1e4,_0x279a85:0x1e9},_0x542e62={_0x5bbddd:0x5d,_0x18307e:0x1a7,_0x24b7b5:0x144};function _0x8d168d(_0x3d4461,_0x30ba39,_0x17cd61,_0xa8defb){return _0x54f2(_0x17cd61- -0xd1,_0x30ba39);}function _0x5abc9f(_0xd5f75b,_0x883c64,_0xa3f52d,_0x17d824){return _0x54f2(_0x17d824- -0xf5,_0x883c64);}const _0x295738=normalizeContent(_0x45745d?.[_0x5abc9f(_0x456b40._0x4d065e,_0x456b40._0xeb8937,_0x456b40._0x23bcef,_0x456b40._0x4c3cff)])[_0x8d168d(0xd3,_0x456b40._0x238ec7,0xba,0xce)](_0xb4b859=>{const _0x435748={_0x56423b:0xc6};function _0x45c9bd(_0x580279,_0x2abbeb,_0x12e581,_0x415cf8){return _0x5abc9f(_0x580279-_0x542e62._0x5bbddd,_0x2abbeb,_0x12e581-_0x542e62._0x18307e,_0x12e581-_0x542e62._0x24b7b5);}function _0x34fb6f(_0x1e03ab,_0x140d58,_0x2aac99,_0x3f4a7d){return _0x5abc9f(_0x1e03ab-0x10d,_0x2aac99,_0x2aac99-_0x435748._0x56423b,_0x3f4a7d- -0x18e);}return _0xb4b859[_0x34fb6f(-0x104,-_0x18ea0d._0x3bb5a4,-0xe5,-_0x18ea0d._0x4ed511)]==='anthropic_redacted_thinking'||_0xb4b859[_0x45c9bd(_0x18ea0d._0x503232,_0x18ea0d._0x4c9f07,0x1df,0x1ce)]===_0x45c9bd(0x1d2,_0x18ea0d._0x12fccf,0x1dd,0x1ef)||_0xb4b859['type']===_0x45c9bd(_0x18ea0d._0x1e218e,_0x18ea0d._0x21161b,_0x18ea0d._0x279a85,0x1f1);});if(_0x295738[_0x8d168d(0xa8,_0x456b40._0x3803fa,_0x456b40._0x17892d,0x9f)]===0x0)return void 0x0;return{'role':_0x8d168d(_0x456b40._0x1531f4,0xa5,_0x456b40._0x107b3d,0xa5),'content':_0x295738};}function createAssistantTextMessage(_0x30eb33){const _0x49f549={_0x408380:0x242,_0x31c91f:0x249,_0x3deb0d:0x237,_0x21c438:0xca,_0x3ef1b9:0xcb,_0x52b873:0xbf,_0x3a9378:0xd2,_0x5cb83d:0x24c,_0x4f11fe:0x25c},_0xaed9ca={_0x4b28f9:0xad},_0x20f587={_0x421a70:0x4a3,_0xae7829:0x498,_0x26ecfc:0x4c5,_0x5f2b79:0x4aa,_0x15cc8c:0x49b,_0xf70fc6:0x4ac},_0xfd6740={_0x44b491:0xa8},_0x2e8016={_0x4f5766:0x3ba};function _0x471019(_0x4c54c2,_0x539306,_0x4af1f9,_0xc01dfb){return _0x54f2(_0x4c54c2- -_0x2e8016._0x4f5766,_0x4af1f9);}const _0xe094c4=normalizeContent(_0x30eb33?.[_0x471019(-_0x49f549._0x408380,-_0x49f549._0x31c91f,-_0x49f549._0x3deb0d,-0x240)])[_0x328822(_0x49f549._0x21c438,0xea,0xde,0xeb)](_0x11593e=>{function _0x459ad1(_0x134f28,_0x1cf9dd,_0x462d8a,_0x104592){return _0x471019(_0x104592-0x6cf,_0x1cf9dd-_0xfd6740._0x44b491,_0x134f28,_0x104592-0x1e3);}function _0x2ad41a(_0x202dc5,_0x32fe02,_0x23b49a,_0x2d4a88){return _0x328822(_0x202dc5-0x46,_0x32fe02-0x29,_0x23b49a-0x1b8,_0x202dc5);}return _0x11593e[_0x459ad1(_0x20f587._0x421a70,_0x20f587._0xae7829,0x4b8,0x4a5)]===_0x459ad1(_0x20f587._0x26ecfc,_0x20f587._0x5f2b79,_0x20f587._0x15cc8c,_0x20f587._0xf70fc6);});if(_0xe094c4[_0x328822(_0x49f549._0x3ef1b9,_0x49f549._0x52b873,_0x49f549._0x3a9378,0xd4)]===0x0)return void 0x0;function _0x328822(_0x9f2e26,_0x4be95a,_0x2b759d,_0x38f870){return _0x54f2(_0x2b759d- -_0xaed9ca._0x4b28f9,_0x38f870);}return{'role':_0x471019(-_0x49f549._0x5cb83d,-_0x49f549._0x408380,-_0x49f549._0x4f11fe,-0x23a),'content':_0xe094c4};}function createToolUseMessage(_0x30ebc0){const _0x407458={_0x3d3d1a:0xb,_0x5ed157:0xe,_0x32c955:0x6,_0x198e20:0x11,_0xe04345:0x5,_0x1ce639:0x2,_0x3131be:0x3,_0x386fb0:0x17,_0x3a58f5:0x0,_0x2d34cc:0x26},_0x31257e={_0x4e8927:0x328,_0x38dc21:0x328,_0x1590f4:0x332},_0x1af4bf={_0x330e3f:0x1c4,_0x494bb8:0x327},_0x414957={_0x19950a:0x185},_0x2f58f8={_0x18bbc8:0x182};function _0xda4a16(_0x30f3d6,_0x2b2519,_0x3d6273,_0x593758){return _0x54f2(_0x593758- -_0x2f58f8._0x18bbc8,_0x2b2519);}function _0x35d943(_0x502e92,_0x4c2563,_0x1b6ed4,_0x2fb3ea){return _0x54f2(_0x502e92- -_0x414957._0x19950a,_0x1b6ed4);}const _0x50eabb=normalizeContent(_0x30ebc0?.[_0xda4a16(-_0x407458._0x3d3d1a,-0x1,_0x407458._0x5ed157,-0xa)])[_0x35d943(_0x407458._0x32c955,-_0x407458._0x198e20,0x11,_0x407458._0xe04345)](_0x90adf7=>{function _0x48095d(_0x22930b,_0x463eb2,_0x2ef71a,_0x590bc4){return _0xda4a16(_0x22930b-_0x1af4bf._0x330e3f,_0x590bc4,_0x2ef71a-0x2f,_0x463eb2-_0x1af4bf._0x494bb8);}return _0x90adf7[_0x48095d(_0x31257e._0x4e8927,0x335,_0x31257e._0x38dc21,_0x31257e._0x1590f4)]==='tool_use';});if(_0x50eabb[_0xda4a16(_0x407458._0x1ce639,-0x7,0xe,-_0x407458._0x3131be)]===0x0)return void 0x0;return{'role':_0x35d943(-_0x407458._0x386fb0,_0x407458._0x3a58f5,-0x17,-_0x407458._0x2d34cc),'content':_0x50eabb};}function getTextFromMessage(_0x1542e4){const _0x111d2a={_0x1fb562:0x28c,_0x264964:0x2a2,_0x5d2e8b:0x29b,_0x3e14e7:0x29d,_0x255320:0x2b0,_0x2d3c3c:0x2a2},_0x5762d5={_0x551e37:0x19b};function _0x2fe07a(_0x55a4e9,_0x45239c,_0x576c4e,_0x2d6bd5){return _0x54f2(_0x45239c- -_0x5762d5._0x551e37,_0x2d6bd5);}function _0x545aec(_0x29db08,_0x522d6d,_0x5815ec,_0x45a824){return _0x54f2(_0x29db08-0x114,_0x522d6d);}return normalizeContent(_0x1542e4?.[_0x545aec(_0x111d2a._0x1fb562,0x282,0x29a,_0x111d2a._0x264964)])[_0x545aec(0x29f,0x2b5,0x2a0,_0x111d2a._0x5d2e8b)](_0x27c3f7=>_0x27c3f7['type']==='text')['map'](_0x5a52b0=>_0x5a52b0[_0x2fe07a(-0xd,-0x4,-0x13,-0xe)])[_0x545aec(_0x111d2a._0x3e14e7,_0x111d2a._0x255320,0x2ac,_0x111d2a._0x2d3c3c)]('\x0a');}function _0x4488(){const _0x5866ba=['CMvHC29UAw5Nvg9Rzw5Z','Dg9VBf9Yzxn1Bhq','y29UDgvUDa','kgvUy3j5ChrLzcbYzwfZB25PBMCP','mta1ntfit0XNtxG','Bw9KzwW','nJe5oty4uMzktxzz','BwvZC2fNzxm','mti4oty2mJbnv1r1zNK','BgvUz3rO','zw5JCNLWDgvKq29UDgvUDa','Dg9VBhm','C3vTBwfYEq','BwvZC2fNzq','mJeYz2jQDhfl','mZG1mZK0ng5eqxnTrq','khjLzgfJDgvKihjLyxnVBMLUzYK','C3rVCfjLyxnVBG','DxnHz2u','AM9PBG','C3rVCf9YzwfZB24','zMLSDgvY','B3v0Chv0','Bwf4x3rVA2vUCW','yw50AhjVCgLJx3rOAw5RAw5N','C3LZDgvT','DhLWzq','ChjVDMLKzxjtDgf0zq','nde4otmYnw1wAKzlCa','yw50AhjVCgLJx3jLzgfJDgvKx3rOAw5RAw5N','ndu0mdjAvNDnthi','C3rYAw5N','CMvHC29UAw5N','Dgv4Da','C3rHDhvZ','zMXHDe1HCa','B3bLBMfPx3jLyxnVBMLUzW','mJK1qu1yz1DA','DgHPBMTPBMC','DhvYBKLK','AxnbCNjHEq','Aw5WDxrFDg9Rzw5Z','BwfW','Bwf4vg9Rzw5Z','DhjPBq','Dg9VBf91C2u','y2fSBeLK','yxnZAxn0yw50','C2vZC2LVBKLK','Bwv0ywrHDge','mtHNEwHKv1i','otu2mMvszgHzwG','CMvHC29UAw5Nx3rVA2vUCW','DhvYBL9Pza','DxnLCG'];_0x4488=function(){return _0x5866ba;};return _0x4488();}function getReasoningTextFromMessage(_0x36d93c){const _0x4785c4={_0x25ff45:0xd2,_0xcc4799:0xcf,_0x4ce614:0xb2,_0x2c1bb9:0xd1,_0x46baf6:0xe4},_0x2a1dde={_0x2cfc98:0x113,_0x425166:0x126,_0x1979f8:0x13b,_0x2e7a40:0x464,_0x163fd2:0x44b,_0x524c7e:0x471,_0x31535f:0x468,_0x57ca08:0x12c,_0x42f922:0x121,_0x1e72ca:0x125,_0x32c79b:0x11e,_0x222de5:0x11a,_0x528d48:0x13f,_0x6a2426:0x467,_0x5b7957:0x478,_0x20cc95:0x47d,_0x24367f:0x46f,_0x16f838:0x11b,_0x3b92ec:0x12a,_0x5f554f:0x47b,_0x113e34:0x463,_0x35dce4:0x44b,_0x206606:0x45a,_0xe72bfe:0x128,_0x22fd89:0x14c,_0x3c4f2e:0x136,_0x8c014b:0x134,_0x430763:0x11c,_0x3954c4:0x10c,_0x5bf75a:0x45a,_0x5cdc47:0x483,_0x28c1f2:0x110,_0x4f105b:0x127,_0x4707f6:0x118,_0x6625b:0x460,_0x41f2db:0x470},_0x367640={_0x1d3a2a:0x4b,_0x34887d:0x40},_0x665075={_0x484a98:0x25c},_0x3e9d50={_0x167c3e:0x37d};function _0x554d23(_0x90dcbb,_0x80f964,_0x583bcc,_0x2e8202){return _0x54f2(_0x80f964-_0x3e9d50._0x167c3e,_0x90dcbb);}function _0x4c6d34(_0x31971d,_0xd6a734,_0x206360,_0x1cd74d){return _0x54f2(_0x31971d- -_0x665075._0x484a98,_0xd6a734);}return normalizeContent(_0x36d93c?.[_0x4c6d34(-0xe4,-0xe9,-_0x4785c4._0x25ff45,-_0x4785c4._0xcc4799)])[_0x4c6d34(-0xc3,-_0x4785c4._0x4ce614,-0xab,-_0x4785c4._0x2c1bb9)](_0x5e1d5f=>{const _0x51405e={_0x4b8c01:0x9a};function _0x24df74(_0x91c0ed,_0xa6d460,_0x287748,_0x4fdddc){return _0x4c6d34(_0xa6d460-0x1ed,_0x4fdddc,_0x287748-_0x367640._0x1d3a2a,_0x4fdddc-_0x367640._0x34887d);}if(_0x5e1d5f[_0x24df74(_0x2a1dde._0x2cfc98,0x121,_0x2a1dde._0x425166,_0x2a1dde._0x1979f8)]==='anthropic_thinking')return _0x5e1d5f[_0x3bcfa4(0x47d,0x47c,_0x2a1dde._0x2e7a40,0x476)][_0x3bcfa4(0x483,0x46e,0x483,0x473)]()[_0x3bcfa4(0x460,0x451,_0x2a1dde._0x163fd2,0x463)]>0x0?[_0x5e1d5f[_0x3bcfa4(0x47d,_0x2a1dde._0x524c7e,0x462,_0x2a1dde._0x31535f)]]:[];if(_0x5e1d5f[_0x24df74(_0x2a1dde._0x57ca08,_0x2a1dde._0x42f922,0x108,_0x2a1dde._0x1e72ca)]===_0x24df74(_0x2a1dde._0x32c79b,0x124,_0x2a1dde._0x222de5,_0x2a1dde._0x528d48))return[_0x3bcfa4(_0x2a1dde._0x6a2426,_0x2a1dde._0x5b7957,_0x2a1dde._0x20cc95,_0x2a1dde._0x24367f)];if(_0x5e1d5f[_0x24df74(0x10a,_0x2a1dde._0x42f922,_0x2a1dde._0x16f838,_0x2a1dde._0x3b92ec)]!==_0x3bcfa4(_0x2a1dde._0x5f554f,0x482,0x47a,0x468))return[];function _0x3bcfa4(_0x5b8e03,_0x192f0a,_0x5edfad,_0x58d6cb){return _0x4c6d34(_0x5b8e03-0x53d,_0x192f0a,_0x5edfad-_0x51405e._0x4b8c01,_0x58d6cb-0x1b2);}const _0x38370c=_0x5e1d5f[_0x3bcfa4(_0x2a1dde._0x113e34,_0x2a1dde._0x35dce4,_0x2a1dde._0x206606,0x471)][_0x24df74(_0x2a1dde._0xe72bfe,0x131,_0x2a1dde._0x22fd89,0x132)](_0x552efb=>_0x552efb['text'])[_0x24df74(_0x2a1dde._0x32c79b,0x11c,_0x2a1dde._0x3c4f2e,0x137)](_0x235b66=>_0x235b66['trim']()[_0x24df74(0x129,0x110,0x118,0x103)]>0x0)[_0x24df74(_0x2a1dde._0x8c014b,_0x2a1dde._0x222de5,_0x2a1dde._0x430763,_0x2a1dde._0x3954c4)]('\x0a\x0a');if(_0x38370c[_0x3bcfa4(0x460,0x450,_0x2a1dde._0x5bf75a,0x455)]>0x0)return[_0x38370c];if(_0x5e1d5f['text']&&_0x5e1d5f['text'][_0x3bcfa4(_0x2a1dde._0x5cdc47,0x480,0x469,0x49b)]()[_0x24df74(0x107,_0x2a1dde._0x28c1f2,_0x2a1dde._0x4f105b,0xfd)]>0x0)return[_0x5e1d5f[_0x24df74(_0x2a1dde._0x3b92ec,0x128,_0x2a1dde._0x3c4f2e,0x126)]];return _0x5e1d5f[_0x24df74(0xf7,0x111,0x10e,_0x2a1dde._0x4707f6)]?[_0x3bcfa4(0x45a,0x470,_0x2a1dde._0x6625b,_0x2a1dde._0x41f2db)]:[];})[_0x4c6d34(-0xd3,-0xb8,-0xc6,-_0x4785c4._0x46baf6)]('\x0a\x0a');}function getToolUseBlocks(_0x1dbb6a){const _0x12f8be={_0x48a11f:0xbd,_0x1fe195:0xac,_0xfd7e12:0x96,_0x1ed401:0xbf},_0xe39556={_0x17a186:0x27b};function _0x2336b7(_0x56d2d5,_0x17b9c6,_0x3f383e,_0x505dcf){return _0x54f2(_0x17b9c6- -_0xe39556._0x17a186,_0x3f383e);}function _0x458ec7(_0x3d34ae,_0x912f31,_0x472589,_0x18d461){return _0x54f2(_0x912f31- -0xcc,_0x18d461);}return normalizeContent(_0x1dbb6a?.[_0x458ec7(_0x12f8be._0x48a11f,_0x12f8be._0x1fe195,0x94,_0x12f8be._0xfd7e12)])[_0x458ec7(0xaa,_0x12f8be._0x1ed401,0xbd,0xd6)](_0x39d9a=>_0x39d9a[_0x458ec7(0xc8,0xc4,0xd4,0xd9)]===_0x2336b7(-0xe8,-0xd8,-0xda,-0xef));}function getToolResultBlocks(_0x479c67){const _0x2887a9={_0x4718c2:0x36,_0x3d939c:0x49,_0x3edeff:0x25,_0x598431:0x13,_0x2f42f0:0x1d},_0x438c9e={_0x21a73c:0x179};function _0x3ae71c(_0x4b9b79,_0x15a601,_0x234c77,_0x5ae5c5){return _0x54f2(_0x5ae5c5- -0x1a8,_0x234c77);}function _0x380087(_0x299095,_0x3fbfab,_0x10fdfd,_0x3027eb){return _0x54f2(_0x3fbfab- -_0x438c9e._0x21a73c,_0x3027eb);}return normalizeContent(_0x479c67?.[_0x3ae71c(-0x36,-_0x2887a9._0x4718c2,-_0x2887a9._0x3d939c,-0x30)])[_0x3ae71c(-_0x2887a9._0x3edeff,-_0x2887a9._0x598431,-0x1c,-_0x2887a9._0x2f42f0)](_0x10870d=>_0x10870d[_0x3ae71c(-0xe,-0x33,-0x27,-0x18)]===_0x380087(-0x15,-0x2,0x15,0x4));}function createToolResultUserMessage(_0x387deb){const _0x213e72={_0x4b4ba0:0xcb,_0x4e93b1:0xf3,_0x30aa76:0x552,_0x360189:0x52e,_0x34689f:0x541},_0x56fc80={_0x4a74f5:0x1fc,_0x444e1c:0x473,_0x4f4efa:0x21a,_0x3ebfd8:0x214,_0x4521c0:0x1fa,_0x5ca12e:0x215},_0x297bc7={_0x44160f:0x6c,_0x439d3e:0x2d4,_0x16b5b4:0x102},_0x597d4c={_0x13a796:0x258};function _0x111ef1(_0x29b62c,_0xd56633,_0x36ab42,_0x730021){return _0x54f2(_0x730021-0x3a1,_0x36ab42);}function _0x5c37ab(_0x49833f,_0x28d0c9,_0x26c31c,_0x3bd2fb){return _0x54f2(_0x28d0c9- -_0x597d4c._0x13a796,_0x3bd2fb);}return{'role':_0x5c37ab(-_0x213e72._0x4b4ba0,-0xe3,-_0x213e72._0x4e93b1,-0xd5),'content':_0x387deb[_0x111ef1(_0x213e72._0x30aa76,_0x213e72._0x360189,0x549,_0x213e72._0x34689f)](_0x4aa49b=>{const _0x2cca1a={_0x4bf4df:0xd3,_0x5efdec:0x53f};function _0x29dc7b(_0xd60f22,_0x503a63,_0x90c1f2,_0x28a828){return _0x5c37ab(_0xd60f22-_0x2cca1a._0x4bf4df,_0xd60f22-_0x2cca1a._0x5efdec,_0x90c1f2-0x166,_0x503a63);}function _0x2f0f84(_0x1b5625,_0x11ded5,_0x35508c,_0x2abad2){return _0x5c37ab(_0x1b5625-_0x297bc7._0x44160f,_0x11ded5-_0x297bc7._0x439d3e,_0x35508c-_0x297bc7._0x16b5b4,_0x35508c);}return{'type':'tool_result','tool_use_id':_0x4aa49b[_0x2f0f84(_0x56fc80._0x4a74f5,0x1e9,0x1e6,0x1e6)],'content':_0x4aa49b['content']??_0x4aa49b[_0x29dc7b(_0x56fc80._0x444e1c,0x468,0x484,0x479)],'is_error':_0x4aa49b[_0x2f0f84(_0x56fc80._0x4f4efa,_0x56fc80._0x3ebfd8,_0x56fc80._0x4521c0,_0x56fc80._0x5ca12e)]==='error'};})};}export{createTextBlock,normalizeTextBlock,normalizeContent,normalizeSystem,normalizeMessage,compileRequest,toChatRequest,toModelRequest,toProviderModelRequest,toChatResponse,toModelResponse,responseToAssistantMessage,createReasoningMessage,createAssistantTextMessage,createToolUseMessage,getTextFromMessage,getReasoningTextFromMessage,getToolUseBlocks,getToolResultBlocks,createToolResultUserMessage};