@nuvin/agent-core 0.1.0-rc.10 → 0.1.0-rc.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/VERSION +2 -2
- package/dist/agent/index.js +1 -1
- package/dist/chunk-BLGBVFVX.js +1 -1
- package/dist/chunk-FFIZ6TKW.js +1 -1
- package/dist/chunk-LIJXXCAA.js +1 -1
- package/dist/chunk-NYZR4XKO.js +1 -1
- package/dist/chunk-X7VAACWY.js +1 -1
- package/dist/chunk-YWQXXHHU.js +1 -1
- package/dist/formats/index.js +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/models/index.js +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/tools/index.js +1 -1
- package/package.json +1 -1
package/dist/chunk-LIJXXCAA.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x3c56d3,_0x264316){const _0x15b61d={_0x269a46:0x2f0,_0x5f1ed6:0x36a,_0x592e30:0x308,_0x184235:0x2bc,_0x3384c6:0x2f0,_0x34bece:0x2fe,_0x504ef8:0x2b3,_0x4d25c5:0x358,_0x5907ef:0x201,_0x569262:0x20c,_0xa0d13a:0x1f4,_0x84ab9e:0x161,_0x1b9721:0x2f9,_0x188a20:0x332,_0x10e992:0x2d3,_0x569c4f:0x32b,_0x819758:0x2ce,_0x156b9e:0x2ff},_0x28c516={_0x1d2432:0x3b5};function _0x725ffd(_0x4385fe,_0x4a9200,_0xcc7a16,_0x22b80b){return _0x49c0(_0x4a9200- -_0x28c516._0x1d2432,_0xcc7a16);}function _0x45e2c8(_0x31340d,_0x51a792,_0x31769d,_0xb7fc8e){return _0x49c0(_0xb7fc8e-0x112,_0x31340d);}const _0x2559d9=_0x3c56d3();while(!![]){try{const _0x5348ae=parseInt(_0x725ffd(-_0x15b61d._0x269a46,-0x336,-_0x15b61d._0x5f1ed6,-0x35c))/0x1+-parseInt(_0x725ffd(-_0x15b61d._0x592e30,-_0x15b61d._0x184235,-0x2a8,-_0x15b61d._0x3384c6))/0x2*(-parseInt(_0x725ffd(-0x2ea,-0x2b7,-_0x15b61d._0x34bece,-_0x15b61d._0x504ef8))/0x3)+-parseInt(_0x45e2c8(0x1b6,0x170,0x1f3,0x19a))/0x4*(-parseInt(_0x725ffd(-0x35b,-0x338,-0x32d,-_0x15b61d._0x4d25c5))/0x5)+-parseInt(_0x45e2c8(0x1c3,_0x15b61d._0x5907ef,0x17c,0x1d2))/0x6*(-parseInt(_0x45e2c8(0x199,_0x15b61d._0x569262,_0x15b61d._0xa0d13a,0x1b4))/0x7)+-parseInt(_0x45e2c8(_0x15b61d._0x84ab9e,0x197,0x1ce,0x192))/0x8+-parseInt(_0x725ffd(-0x2c6,-_0x15b61d._0x1b9721,-_0x15b61d._0x188a20,-_0x15b61d._0x10e992))/0x9+-parseInt(_0x725ffd(-0x351,-0x2fc,-_0x15b61d._0x569c4f,-_0x15b61d._0x819758))/0xa*(parseInt(_0x725ffd(-0x376,-0x331,-_0x15b61d._0x156b9e,-_0x15b61d._0x1b9721))/0xb);if(_0x5348ae===_0x264316)break;else _0x2559d9['push'](_0x2559d9['shift']());}catch(_0x2dbc9e){_0x2559d9['push'](_0x2559d9['shift']());}}}(_0x35d5,0x5d22c));import{createAssistantTextMessage,createReasoningMessage,createToolResultUserMessage,createToolUseMessage,getToolUseBlocks,normalizeMessage,normalizeSystem,responseToAssistantMessage,synthesizeMissingToolResults}from'./chunk-YWQXXHHU.js';import{TurnFailedError}from'./chunk-FFIZ6TKW.js';import{addAbortListener,isAbortError,throwIfAborted,toAbortError}from'./chunk-X7VAACWY.js';function isJsonObject(_0xa6db0c){const _0x27d63e={_0xdf9ae7:0xee,_0x100da8:0x147,_0x34da64:0x145,_0x1f0c0f:0x3ab,_0xa37415:0x3af,_0x38bf89:0x3b7,_0x11cf67:0x3ee},_0x4934b4={_0x357b79:0x265},_0x5c00ca={_0x21cff9:0x309};function _0x2a0286(_0x31a70d,_0x3452b7,_0x58558b,_0x2e1c5e){return _0x49c0(_0x3452b7-_0x5c00ca._0x21cff9,_0x2e1c5e);}function _0x3ad678(_0xa2fc93,_0x55817c,_0x37833e,_0x37c472){return _0x49c0(_0x37c472- -_0x4934b4._0x357b79,_0x37833e);}return typeof _0xa6db0c===_0x3ad678(-_0x27d63e._0xdf9ae7,-0x18d,-_0x27d63e._0x100da8,-_0x27d63e._0x34da64)&&_0xa6db0c!==null&&!Array[_0x2a0286(_0x27d63e._0x1f0c0f,_0x27d63e._0xa37415,_0x27d63e._0x38bf89,_0x27d63e._0x11cf67)](_0xa6db0c);}function isToolOutputEnvelope(_0x245e91){const _0x50c326={_0x23dc3e:0x78,_0x171c98:0x74,_0x25688a:0x97,_0x4c20e1:0x41b,_0x12faae:0x427,_0x52bd71:0x3f8,_0x24c4fe:0x466,_0x1555ce:0x4be,_0xb2d505:0x485,_0x4693ae:0x412,_0x291b02:0x466},_0x31d1fa={_0x20033d:0x375},_0x2be752={_0x3c401e:0x1b7};function _0x2b223d(_0x4eaa25,_0x2d723d,_0x426535,_0x570218){return _0x49c0(_0x426535- -_0x2be752._0x3c401e,_0x2d723d);}function _0x5f1c86(_0x361e70,_0x48d541,_0x4c7bd0,_0x49b01a){return _0x49c0(_0x361e70-_0x31d1fa._0x20033d,_0x48d541);}if(typeof _0x245e91!==_0x2b223d(-_0x50c326._0x23dc3e,-_0x50c326._0x171c98,-_0x50c326._0x25688a,-0xc0)||_0x245e91===null||Array[_0x5f1c86(_0x50c326._0x4c20e1,_0x50c326._0x12faae,0x467,_0x50c326._0x52bd71)](_0x245e91))return![];if(typeof _0x245e91[_0x5f1c86(_0x50c326._0x24c4fe,_0x50c326._0x1555ce,_0x50c326._0xb2d505,0x470)]!==_0x5f1c86(_0x50c326._0x4693ae,_0x50c326._0x291b02,0x3b9,0x42e))return![];const _0x59470d=_0x245e91['structured'];return _0x59470d===void 0x0||isJsonObject(_0x59470d);}function validateAgainstSchema(_0x95447f,_0x64835f,_0x57fbfb){const _0x3d4fea={_0x2dc8ec:0xfa,_0x52181c:0xba,_0x21a390:0x419,_0x42d4b3:0x38a,_0x4530d8:0xa9,_0x200ede:0xa7,_0x4e20a6:0x6e,_0xd1ade7:0x4d,_0x50220a:0x98,_0x4690fc:0x69,_0x7a133f:0x101,_0x3891c1:0xd5,_0x25a3c0:0x70,_0x2b663f:0xb9,_0x48ca86:0x380,_0x16060b:0x3d1,_0x2e85c4:0x129,_0x135313:0x128,_0x206696:0x43d,_0x103d40:0x409,_0x2a48d6:0x3c4,_0x21eb68:0x3ea,_0x1042a8:0x3f6,_0x360195:0x37c,_0x4596e2:0x3ac,_0x29c44c:0x369,_0x27da29:0x3af,_0x291d6e:0x378,_0xb3b23c:0x3d8,_0x4c5816:0x3d1,_0x2475d1:0x3c1,_0x89d8eb:0x3ba,_0xf310fa:0x371,_0x9e5190:0x3d6,_0x175903:0x390},_0x1577b2={_0x48d7fc:0x12,_0x576d0a:0x3c,_0x40e4e3:0x37},_0x2068ad={_0x4802b8:0x174},_0x21ac21={_0x3f1258:0x2f5};function _0x2c8158(_0x2def5d,_0x240904,_0x202932,_0x2ee77f){return _0x49c0(_0x2ee77f-_0x21ac21._0x3f1258,_0x202932);}function _0xa649f7(_0x325262,_0xebc9a7,_0x32c720,_0x145eb0){return _0x49c0(_0xebc9a7- -_0x2068ad._0x4802b8,_0x145eb0);}switch(_0x57fbfb['type']){case _0xa649f7(-_0x3d4fea._0x2dc8ec,-0xd7,-0xb8,-_0x3d4fea._0x52181c):if(typeof _0x64835f!=='string')throw new Error(_0x2c8158(_0x3d4fea._0x21a390,0x410,_0x3d4fea._0x42d4b3,0x3d1)+_0x95447f+_0xa649f7(-0xe4,-_0x3d4fea._0x4530d8,-_0x3d4fea._0x200ede,-_0x3d4fea._0x4e20a6));return;case'number':if(typeof _0x64835f!=='number')throw new Error(_0xa649f7(-_0x3d4fea._0xd1ade7,-_0x3d4fea._0x50220a,-0xa8,-_0x3d4fea._0x4690fc)+_0x95447f+_0xa649f7(-0xb7,-_0x3d4fea._0x7a133f,-_0x3d4fea._0x3891c1,-0x119));return;case _0xa649f7(-0x43,-_0x3d4fea._0x25a3c0,-0x38,-0xbf):if(typeof _0x64835f!=='boolean')throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x95447f+_0xa649f7(-0x59,-0x96,-0x57,-_0x3d4fea._0x2b663f));return;case'array':if(!Array['isArray'](_0x64835f))throw new Error(_0x2c8158(0x3ed,_0x3d4fea._0x48ca86,0x403,_0x3d4fea._0x16060b)+_0x95447f+_0xa649f7(-_0x3d4fea._0x2e85c4,-0xe1,-0x105,-_0x3d4fea._0x135313));_0x64835f[_0x2c8158(_0x3d4fea._0x206696,_0x3d4fea._0x103d40,0x414,0x3f6)]((_0x348c06,_0x16cd3e)=>{function _0x1d1fb1(_0x5dbd36,_0x1d60c5,_0x15be46,_0x239c14){return _0x2c8158(_0x5dbd36-0x128,_0x1d60c5-0x74,_0x5dbd36,_0x239c14- -0x406);}validateAgainstSchema(_0x95447f+'['+_0x16cd3e+']',_0x348c06,_0x57fbfb[_0x1d1fb1(-0x62,_0x1577b2._0x48d7fc,-_0x1577b2._0x576d0a,-_0x1577b2._0x40e4e3)]);});return;case _0x2c8158(_0x3d4fea._0x2a48d6,_0x3d4fea._0x21eb68,_0x3d4fea._0x1042a8,0x415):if(!isJsonObject(_0x64835f))throw new Error(_0x2c8158(0x3f0,_0x3d4fea._0x360195,0x422,0x3d1)+_0x95447f+':\x20expected\x20object');for(const _0x1b0563 of _0x57fbfb[_0x2c8158(_0x3d4fea._0x4596e2,_0x3d4fea._0x29c44c,0x375,_0x3d4fea._0x27da29)]??[]){if(!(_0x1b0563 in _0x64835f))throw new Error(_0x2c8158(_0x3d4fea._0x291d6e,0x3f7,_0x3d4fea._0xb3b23c,_0x3d4fea._0x4c5816)+_0x95447f+_0xa649f7(-0xe9,-0x95,-0x99,-0x58)+_0x1b0563+'\x22');}for(const [_0x368e31,_0x5fb15b]of Object[_0x2c8158(0x3bc,0x3ed,_0x3d4fea._0x2475d1,_0x3d4fea._0x89d8eb)](_0x57fbfb[_0x2c8158(_0x3d4fea._0xf310fa,0x35b,_0x3d4fea._0x9e5190,_0x3d4fea._0x175903)])){_0x368e31 in _0x64835f&&validateAgainstSchema(_0x95447f+'.'+_0x368e31,_0x64835f[_0x368e31],_0x5fb15b);}}}function normalizeToolOutputValue(_0x5c8d9c){const _0x51c5f8={_0x103b26:0x2cb,_0x3a0635:0x87,_0x7c5514:0xb8,_0x1c0cbd:0xb6,_0x39b266:0xc7,_0x3c3676:0x338,_0x1adf97:0x26f,_0x381232:0x2dd,_0x2df4cc:0xe6},_0xdda58b={_0x3c735e:0x204};function _0x16b80c(_0x42a855,_0x360a3c,_0x3f72a2,_0x4a4f16){return _0x49c0(_0x4a4f16- -0x18c,_0x42a855);}function _0x48166d(_0x346b69,_0x18beb3,_0x33e8c9,_0x536c7e){return _0x49c0(_0x18beb3-_0xdda58b._0x3c735e,_0x536c7e);}if(isToolOutputEnvelope(_0x5c8d9c))return{'output':_0x5c8d9c[_0x48166d(0x2e3,0x2f5,_0x51c5f8._0x103b26,0x33f)],'structured':_0x5c8d9c[_0x16b80c(-_0x51c5f8._0x3a0635,-_0x51c5f8._0x7c5514,-_0x51c5f8._0x1c0cbd,-0xa9)]??{'value':_0x5c8d9c[_0x16b80c(-0x85,-_0x51c5f8._0x39b266,-0x48,-0x9b)]},..._0x5c8d9c[_0x16b80c(-0x71,-0x4c,-0x9d,-0x97)]!==void 0x0?{'content':_0x5c8d9c[_0x48166d(_0x51c5f8._0x3c3676,0x2f9,0x2d7,0x2a5)]}:{}};if(typeof _0x5c8d9c===_0x48166d(_0x51c5f8._0x1adf97,0x2a1,0x25a,_0x51c5f8._0x381232))return{'output':_0x5c8d9c,'structured':{'value':_0x5c8d9c}};if(typeof _0x5c8d9c==='object'&&_0x5c8d9c!==null&&!Array[_0x16b80c(-0x118,-0xfc,-0x10c,-_0x51c5f8._0x2df4cc)](_0x5c8d9c))return{'output':JSON['stringify'](_0x5c8d9c,null,0x2),'structured':_0x5c8d9c};return{'output':JSON[_0x16b80c(-0xce,-0xdf,-0x105,-0xdc)](_0x5c8d9c,null,0x2),'structured':{'value':_0x5c8d9c}};}function createToolOutput(_0xb0be7c,_0x2a2653={'value':_0xb0be7c},_0x2429b6){return{'output':_0xb0be7c,'structured':_0x2a2653,..._0x2429b6!==void 0x0?{'content':_0x2429b6}:{}};}var ToolExecutionError=class extends Error{[_0x383f4b(0x35e,0x38b,0x32d,0x32d)];constructor(_0x21eb53,_0x390508={}){const _0x54c30d={_0x5dee09:0x442,_0x539b99:0x432,_0xa4baae:0x3d3,_0x27be0e:0x3a7,_0x9b775f:0x3d8,_0x435348:0x3e2,_0x418c08:0x484,_0x30eee3:0x49d,_0x2cb3ea:0x485},_0x46f4f5={_0x311c43:0x127,_0x12befc:0x1ec},_0x3fb9f3={_0x197f61:0xd6};super(_0x21eb53);function _0x2e9108(_0x38569d,_0x63ba16,_0x7d08e4,_0xf15799){return _0x383f4b(_0xf15799-0xbe,_0x63ba16-0x1a5,_0x7d08e4,_0xf15799-_0x3fb9f3._0x197f61);}function _0x3cc6ea(_0x518172,_0x2f3d7d,_0xdbdcf,_0x43adde){return _0x383f4b(_0xdbdcf-_0x46f4f5._0x311c43,_0x2f3d7d-_0x46f4f5._0x12befc,_0x518172,_0x43adde-0x175);}this[_0x3cc6ea(0x4bb,_0x54c30d._0x5dee09,0x468,_0x54c30d._0x539b99)]=_0x2e9108(_0x54c30d._0xa4baae,_0x54c30d._0x27be0e,_0x54c30d._0x9b775f,_0x54c30d._0x435348),this[_0x3cc6ea(_0x54c30d._0x418c08,_0x54c30d._0x30eee3,_0x54c30d._0x2cb3ea,0x46b)]=_0x390508;}};function defineTool(_0x175b97){return _0x175b97;}var ToolRegistry=class{[_0x3061cd(0x36e,0x3bb,0x3b6,0x395)]=new Map();constructor(_0xd156ba=[]){const _0x1ebb25={_0x2080df:0x35d},_0x259081={_0x249239:0x1bb};function _0x412988(_0x344fe7,_0x3adcc4,_0x7f39db,_0x449467){return _0x383f4b(_0x3adcc4- -0x60c,_0x3adcc4-_0x259081._0x249239,_0x344fe7,_0x449467-0x138);}for(const _0x3f1c07 of _0xd156ba){this[_0x412988(-0x331,-0x31b,-0x322,-_0x1ebb25._0x2080df)](_0x3f1c07);}}[_0x3061cd(0x36b,0x38d,0x384,0x3a8)](_0x4d26eb){const _0x3e76a4={_0x14c6ad:0x3fb,_0x153016:0x43c,_0x5a41d2:0x459,_0x1a8c4b:0x483,_0x373084:0x41d,_0x2cabfe:0x3ce},_0x1a6b4b={_0x4f0432:0x1c8},_0x3dfc3f={_0x26ce21:0xd9};function _0xd54bd7(_0x2af12f,_0x4ceffa,_0x4a90e9,_0xe69eb1){return _0x3061cd(_0x2af12f-_0x3dfc3f._0x26ce21,_0x4a90e9-0xb4,_0x4a90e9-0xa,_0x4ceffa);}function _0x4f4b24(_0x3e10e5,_0x26c613,_0x3bb1a0,_0xd6f8f1){return _0x3061cd(_0x3e10e5-0x3c,_0x26c613-0x40,_0x3bb1a0-_0x1a6b4b._0x4f0432,_0xd6f8f1);}this[_0x4f4b24(0x435,_0x3e76a4._0x14c6ad,0x3be,_0x3e76a4._0x153016)][_0xd54bd7(0x45a,_0x3e76a4._0x5a41d2,0x483,_0x3e76a4._0x1a8c4b)](_0x4d26eb[_0x4f4b24(0x3e0,_0x3e76a4._0x373084,_0x3e76a4._0x2cabfe,0x436)],_0x4d26eb);}[_0x3061cd(0x42c,0x3d9,0x3d8,0x428)](_0x29b8cf){const _0x494e55={_0xc62b4d:0x142},_0x1619b3={_0x4476bf:0x16,_0x4ae121:0x2aa,_0x2866d4:0xf5};function _0x44a8d8(_0x27a7bc,_0x23b418,_0x41aaa7,_0x4946ce){return _0x3061cd(_0x27a7bc-_0x1619b3._0x4476bf,_0x23b418- -_0x1619b3._0x4ae121,_0x41aaa7-_0x1619b3._0x2866d4,_0x27a7bc);}return this['toolsByName'][_0x44a8d8(0x102,0x12f,0x15c,_0x494e55._0xc62b4d)](_0x29b8cf);}[_0x383f4b(0x368,0x352,0x352,0x392)](){const _0x591a38={_0x44266d:0x10,_0x3cb213:0x70,_0x541e91:0x48,_0x302487:0x53},_0x379519={_0xa8001d:0x1d};function _0x483523(_0x1f2db4,_0x1eca36,_0x5e6fc0,_0x55d65b){return _0x383f4b(_0x5e6fc0- -0x3e4,_0x1eca36-0xd4,_0x1f2db4,_0x55d65b-_0x379519._0xa8001d);}return[...this['toolsByName'][_0x483523(-_0x591a38._0x44266d,-_0x591a38._0x3cb213,-_0x591a38._0x541e91,-_0x591a38._0x302487)]()];}[_0x383f4b(0x323,0x2de,0x348,0x347)](){const _0x1a28cd={_0x728ee1:0x177,_0x1144c6:0x167},_0x7e4ade={_0x2136e9:0x3fb,_0x2f7e59:0x395,_0x34ace2:0x3da,_0x227c3e:0x393,_0x726449:0x3b2,_0xac5e0c:0x3d1},_0x46d369={_0x3e8cf2:0x2c1,_0x4d8391:0x138},_0x57ac82={_0x2f1eb0:0x1f,_0x142b39:0x2a9,_0x2197b3:0x8b},_0x9aa18a={_0x44c6ca:0x1a1,_0x1ce614:0x2ac,_0x27458a:0xe6};function _0x4e9053(_0x1180f3,_0x5b9ea2,_0xe2cf44,_0x226317){return _0x3061cd(_0x1180f3-_0x9aa18a._0x44c6ca,_0xe2cf44- -_0x9aa18a._0x1ce614,_0xe2cf44-_0x9aa18a._0x27458a,_0x5b9ea2);}return this['list']()[_0x4e9053(0x145,_0x1a28cd._0x728ee1,0x14c,_0x1a28cd._0x1144c6)](_0x1b0f63=>{function _0x476487(_0x2d36f6,_0x3911c0,_0x41229d,_0x4e8ad6){return _0x4e9053(_0x2d36f6-_0x57ac82._0x2f1eb0,_0x2d36f6,_0x4e8ad6-_0x57ac82._0x142b39,_0x4e8ad6-_0x57ac82._0x2197b3);}function _0xa0abfb(_0xcad193,_0x31e7d3,_0x17fc58,_0x1bc531){return _0x4e9053(_0xcad193-0x3d,_0xcad193,_0x17fc58-_0x46d369._0x3e8cf2,_0x1bc531-_0x46d369._0x4d8391);}return{'name':_0x1b0f63[_0x476487(_0x7e4ade._0x2136e9,0x3b3,_0x7e4ade._0x2f7e59,_0x7e4ade._0x34ace2)],'description':_0x1b0f63[_0x476487(0x395,0x3a6,_0x7e4ade._0x227c3e,0x3a4)],'input_schema':_0x1b0f63[_0x476487(0x3c0,0x3c3,_0x7e4ade._0x726449,_0x7e4ade._0xac5e0c)]};});}};function validateToolInput(_0x3e30ec,_0x2ea109){const _0x3a65e8={_0x24c2b9:0x337},_0x43120f={_0x1c72db:0x138,_0x56e305:0x127,_0xac7e64:0x80};function _0x2743ed(_0x7ee765,_0x55ef8b,_0x4c49a4,_0x3d10db){return _0x3061cd(_0x7ee765-_0x43120f._0x1c72db,_0x3d10db- -_0x43120f._0x56e305,_0x4c49a4-_0x43120f._0xac7e64,_0x55ef8b);}return validateAgainstSchema(_0x2743ed(_0x3a65e8._0x24c2b9,0x34d,0x316,0x309),_0x3e30ec,_0x2ea109),_0x3e30ec;}function deriveFinalToolOutput(_0x54ec5c){const _0xb0a3c1={_0x5e06f2:0x200,_0x4f1c86:0x213,_0x397187:0x1de,_0x5a119e:0x1f5,_0x5a5b8d:0x258,_0x233881:0x29f,_0x179c89:0x210,_0x15f786:0x1c,_0x57695f:0x3d,_0x4d62be:0x20a,_0x54b61e:0x202,_0x4f612d:0x1c7,_0x312ba7:0x235,_0x1ab4ca:0x270,_0x9c2404:0x1ed,_0x1f8483:0x8,_0x37c673:0x51,_0x175879:0x6d,_0x47cad6:0x249,_0x159366:0x1f6},_0x17b9a0={_0x3808e8:0x3ad,_0x458669:0x11f,_0x13004f:0x186};if(_0x54ec5c[_0x5459bb(-0x73,-0x67,-0x83,-0x86)]===0x0)return{'output':'','structured':{}};function _0x34822c(_0x4e7eed,_0x4f5fc3,_0x531db8,_0x5dd215){return _0x3061cd(_0x4e7eed-0xf8,_0x4e7eed- -0x1c3,_0x531db8-0x69,_0x5dd215);}function _0x5459bb(_0xd5d871,_0xf0654,_0x341199,_0x2f6a19){return _0x383f4b(_0x2f6a19- -_0x17b9a0._0x3808e8,_0xf0654-_0x17b9a0._0x458669,_0x341199,_0x2f6a19-_0x17b9a0._0x13004f);}if(_0x54ec5c[_0x34822c(_0xb0a3c1._0x5e06f2,_0xb0a3c1._0x4f1c86,_0xb0a3c1._0x397187,0x229)]===0x1)return{'output':_0x54ec5c[0x0][_0x34822c(0x245,_0xb0a3c1._0x5a119e,0x270,_0xb0a3c1._0x5a5b8d)],'structured':_0x54ec5c[0x0]['structured'],..._0x54ec5c[0x0][_0x34822c(0x249,0x1fa,_0xb0a3c1._0x233881,_0xb0a3c1._0x179c89)]!==void 0x0?{'content':_0x54ec5c[0x0][_0x5459bb(-_0xb0a3c1._0x15f786,-0x6e,-0x4c,-_0xb0a3c1._0x57695f)]}:{}};const _0x4666ad=_0x54ec5c[_0x34822c(_0xb0a3c1._0x4d62be,_0xb0a3c1._0x54b61e,0x21d,_0xb0a3c1._0x4f612d)](_0x5de876=>_0x5de876[_0x34822c(0x249,0x25c,0x290,0x257)]!==void 0x0);return{'output':_0x54ec5c[_0x34822c(_0xb0a3c1._0x312ba7,_0xb0a3c1._0x1ab4ca,_0xb0a3c1._0x9c2404,0x1eb)](_0x3bc648=>_0x3bc648['output'])['join'](''),'structured':{'chunks':_0x54ec5c[_0x5459bb(-0x51,-0x86,-_0xb0a3c1._0x1f8483,-_0xb0a3c1._0x37c673)](_0x5e4068=>_0x5e4068[_0x34822c(0x237,0x267,0x289,0x21d)])},..._0x4666ad[_0x5459bb(-0x3e,-_0xb0a3c1._0x175879,-0x3f,-0x86)]===0x1?{'content':_0x4666ad[0x0][_0x34822c(_0xb0a3c1._0x47cad6,0x26a,0x26e,_0xb0a3c1._0x159366)]}:{}};}function createToolMeta(){return{'transforms':[]};}function _0x383f4b(_0x41b252,_0xa3e467,_0x4a7406,_0x5ea41b){return _0x49c0(_0x41b252-0x27b,_0x4a7406);}function createErrorToolResult(_0x406325,_0x3d1fd8,_0x199e59,_0x428b2d=[]){const _0x461072={_0x44f96f:0x233,_0x4b2bcd:0x262,_0x2c569a:0x24e,_0x32b5c0:0x23f},_0x30da5a={_0x73f6b:0xfe},_0x428785={_0x4d5c0f:0xa5};function _0x310959(_0x7f3264,_0x7c2047,_0x56feec,_0x19c47d){return _0x383f4b(_0x7f3264- -0xf5,_0x7c2047-0x198,_0x56feec,_0x19c47d-_0x428785._0x4d5c0f);}function _0x2853e6(_0x23447d,_0x592a52,_0x301bbe,_0x461a26){return _0x383f4b(_0x592a52- -0x52a,_0x592a52-_0x30da5a._0x73f6b,_0x461a26,_0x461a26-0xea);}return{'callId':_0x406325['id'],'toolName':_0x406325[_0x310959(0x24c,_0x461072._0x44f96f,_0x461072._0x4b2bcd,0x264)],'status':_0x2853e6(-_0x461072._0x2c569a,-0x20a,-0x1f6,-_0x461072._0x32b5c0),'output':_0x3d1fd8,'structured':_0x199e59,'chunks':_0x428b2d,'meta':createToolMeta()};}function createRejectedToolResult(_0x50ff02,_0x5396e6){const _0x3c8d29={_0x52246d:0x30b,_0x2b4201:0x337,_0x2f4bd6:0x37e,_0x4f58cb:0x39f,_0x37c549:0x318,_0x1206ca:0x160,_0x225b70:0x12e,_0x307d1d:0x195,_0x122106:0x2e4,_0x5643c3:0x2fa,_0x4788b8:0x370},_0x583a28={_0x2fd083:0x1ee,_0x47acde:0x4f9},_0x2f082e={_0x1d04f7:0x174,_0x2e683d:0x8a,_0x558c64:0x64};function _0x5b5e7c(_0x10fe5d,_0x5aa1ef,_0x19dc9b,_0x4cbebc){return _0x3061cd(_0x10fe5d-_0x2f082e._0x1d04f7,_0x4cbebc- -_0x2f082e._0x2e683d,_0x19dc9b-_0x2f082e._0x558c64,_0x19dc9b);}function _0x3870bc(_0x231d12,_0xf50eab,_0x378eee,_0x196b8b){return _0x3061cd(_0x231d12-_0x583a28._0x2fd083,_0x231d12- -_0x583a28._0x47acde,_0x378eee-0x127,_0x378eee);}const _0x244484=_0x5396e6?.[_0x5b5e7c(0x2e0,_0x3c8d29._0x52246d,0x354,_0x3c8d29._0x2b4201)]()[_0x5b5e7c(_0x3c8d29._0x2f4bd6,0x315,0x317,0x339)]?_0x5396e6:'Tool\x20execution\x20rejected\x20for\x20'+_0x50ff02[_0x5b5e7c(_0x3c8d29._0x4f58cb,_0x3c8d29._0x37c549,0x323,0x353)];return createErrorToolResult(_0x50ff02,_0x244484,{'error':_0x3870bc(-_0x3c8d29._0x1206ca,-_0x3c8d29._0x225b70,-0x195,-_0x3c8d29._0x307d1d),..._0x5396e6?.[_0x5b5e7c(_0x3c8d29._0x122106,0x323,_0x3c8d29._0x5643c3,0x337)]()[_0x5b5e7c(0x32f,0x344,_0x3c8d29._0x4788b8,0x339)]?{'reason':_0x5396e6}:{}});}function createAbortedToolResult(_0x20a0cd,_0x26b046,_0x49dea3=[]){const _0xd0fe1e={_0xafb78e:0x1b5,_0x37c6f3:0x16f,_0x759562:0x1c2,_0x178aed:0x17b},_0x1fdafd={_0xd79820:0x1d};function _0x24b5c5(_0x37e452,_0x13cbb2,_0xa0e37,_0x2d4325){return _0x383f4b(_0x13cbb2- -0x29d,_0x13cbb2-0x5d,_0xa0e37,_0x2d4325-0x2d);}const _0x22992e=toAbortError(_0x26b046);function _0x27bf3(_0x113389,_0x295f09,_0x1e3187,_0x5d7be1){return _0x383f4b(_0x113389- -0x19f,_0x295f09-0xef,_0x295f09,_0x5d7be1-_0x1fdafd._0xd79820);}return createErrorToolResult(_0x20a0cd,_0x22992e[_0x27bf3(_0xd0fe1e._0xafb78e,0x185,0x1d5,0x1d5)],{'error':_0x22992e[_0x27bf3(_0xd0fe1e._0xafb78e,_0xd0fe1e._0x37c6f3,_0xd0fe1e._0x759562,_0xd0fe1e._0x178aed)],'aborted':!![]},_0x49dea3);}function _0x35d5(){const _0x9d770e=['DhjHBNnMB3jTzxi','ywjVCNq','CMvHC29UAw5Nq29TCgXLDgvKqxq','DhvYBLn0yxj0zwrbDa','zgvMyxvSDe1LC3nHz2u','mtq5mgz3weXYtW','Dg9VBenHBgXdB3vUDa','nJqZmJyWD0Xtsgfk','mJuYmtG1nLbeDg5VBG','CMvJB3jKrxzLBNq','Dg9VBf9YzwPLy3rLza','DxnHz2u','ntvZufzXAKq','oNjLyxnVBMLUzW','y29UDgvUDeLUzgv4','CMvHC29UAw5Nx2nODw5R','mZqYog5NEfviBW','CMvHC29UAw5NtwvZC2fNzuLK','Dgv4Da','B3v0Chv0vg9Rzw5Z','Bw9KzwXFCMvZCg9UC2u','ChjVDMLKzxi','qwDLBNqGCMvXDwLYzxmGysbJAgf0tw9KzwW','BM93','zgvZy3jPChrPB24','DhvYBL9JB21WBgv0zq','zxHLy3v0zunHBgXZ','oIbLEhbLy3rLzcbHCNjHEq','ywz0zxjuB29SuMvZDwX0','C2v0vg9WAwm','B3bLBMfPx3jLyxnVBMLUz19KzwX0yq','x3n5C3rLBvbYB21WDa','CMvHC29UAw5Nu3rHCNrLzef0','y2HHDe1VzgvS','DhvYBKLUzgv4','ChjVCgvYDgLLCW','Dg90ywXszwfZB25PBMDuB2TLBNm','C3rYAw5N','CMfUzg9T','ywXS','ywz0zxjnB2rLBfjLC3bVBNnL','CMvTB3zLrxzLBNrmAxn0zw5LCG','mtC4ndGXmuvcrg1eAG','Dg90ywXuB2TLBNm','Dg9VBhncEu5HBwu','zxjYB3i','AxnbCNjHEq','y29TCgXLDgvK','BgLZDfrVB2Xty2HLBwfZ','vg9VBev4zwn1DgLVBKvYCM9Y','DhjPBq','yMvMB3jLvg9VBfjLC3vSDefWCgvUza','BgvUz3rO','CNvUvhjHBNnMB3jTzxjZ','CNvU','Dg9VBf9Yzxn1BhrFBwvZC2fNzq','C3rYAw5NAwz5','Dg9VBf91C2u','yMvMB3jLvg9VBev4zwn1DgLVBG','y2f1C2u','C3vTBwfYEuLUzgv4','ywjVCNrLza','zMLSDgvY','B3bLBMfPx3jLyxnVBMLUz19ZDw1Tyxj5x2rLBhrH','C2v0','mteYnJa2mg9jvhviwq','CMvXDwLYzwq','ywn0Aw9U','ntKWodeWneL0CxHYyW','Aw5WDxrty2HLBwe','BMv4Da','C3LZDgvT','mtjrCez3Bvi','yxnZAxn0yw50twvZC2fNzuLK','z2v0','B25fDMvUDa','DMfSDwu','zw50CMLLCW','BMfTzq','z2v0q29UDgv4DfDPBMrVD0XPBwL0','AxrLBuLK','zgvSDge','Dg9VBf91C2vFBwvZC2fNzq','oIbLEhbLy3rLzcbZDhjPBMC','CMfJzq','ChvZAa','C2LNBMfS','zgvSzxrL','y2f0y2G','C2vUza','DgHPBMTPBMC','Bwv0CMLJCW','y29UDgv4DfDPBMrVD0XPBwL0','C2vZC2LVBKrPCG','CMv0DxjU','C2v0q2HHDe1VzgvS','z2v0vg9VBhm','BwvZC2fNzq','AxrLBxm','zw5HyMXLza','sw52ywXPzcb0B29SigLUChv0igf0ia','DhvYBKnVBxbSzxrLzef0','oIbLEhbLy3rLzcbIB29SzwfU','oIbTAxnZAw5NihjLCxvPCMvKigzPzwXKici','zgvWCW','BwfW','C3rYzwfT','C3rYDwn0DxjLza','Dg9VBf9VDxrWDxrFy2H1BMS','Dg9VBf9JB21WBgv0zwq','CNvUt2jZzxj2zxjZ','Dg9VBf9Yzxn1Bhq','zNvUy3rPB24','DhvYBI0','DhvYBKLK','CMvZCg9UC2u','yMvMB3jLrMLUywXpDxrWDxq','BgLZDa','Bwv0yq','C3LZDgvTuhjVBxb0','C2v0u3LZDgvTuhjVBxb0','B3v0Chv0','B3v0Chv0rM9YBwf0','Aw5KzxG','ChjVDMLKzxjFCMv0CNK','y29UDgvUDa','C2v0vg9VBhm','CMvHC29U','ywrK','ndyWEe5dDuvN','BwvZC2fNzxm','Dg90ywXjBNb1DfrVA2vUCW','Bw9KzwXdywXSq291BNq','Dg9VBfj1BNrPBwu','nJyYmuDfrKPiqq','A2LUza','ywz0zxjnzxnZywDLqxbWzw5K','zM9YrwfJAa','C2XPy2u','Bwf4vg9Rzw5Z','yM9VBgvHBG','Dw5RBM93BL90B29S','Bw9KzwW','Aw5WDxrezwX0yq','DgHLBG','oMfZC2LZDgfUDdO','C3rHz2u','C3rYzwfTAw5N','zMLUywXFBwvZC2fNzq','CMvQzwn0','Dg9VBhm','y29UDgvUDf9KzwX0yq','y29TCgXLDgu','Dg9VBf91C2vFzgvSDge','CMvNAxn0CNK','CMvXDwvZDa','Dg9tDhjPBMC','C2vZC2LVBKLK','CMvHC29UAw5Nvg9Rzw5Z','yxnZAxn0yw50x2nODw5R','Dg9VBf9JywXS','Aw5WDxq','yxnRvxnLCG','yw50AhjVCgLJx3rOAw5RAw5Nx2rLBhrH','ywrKrxzLBNrmAxn0zw5LCG','yMvMB3jLqxnZAxn0yw50qxbWzw5K','C29Tzq','B3v0Chv0sw5KzxG','B2jQzwn0','DMfSDwvZ','B25uB29Sq2fSBa','DhLWzq','Dg9VBfjLC3vSDhm','oIbLEhbLy3rLzcbUDw1Izxi','CMvXDwvZDenVDw50','CMvHC29UAw5Nx21LC3nHz2u','CMvNAxn0zxi','B3jKzxi'];_0x35d5=function(){return _0x9d770e;};return _0x35d5();}function createSuccessToolResult(_0x3f778f,_0x1b2eeb,_0x25562b){const _0x516a13={_0x5b8024:0x3ae,_0x1f7f0d:0x3f8,_0x4b3dff:0x489,_0x49c9fa:0x431,_0x6548d2:0x458,_0x3bbd99:0x3d9,_0x351da0:0x423,_0x237d3e:0x402,_0x3a3baf:0x42d,_0x5eff36:0x46c,_0x144e19:0x487,_0x5d3de3:0x448,_0x2c15b8:0x46b,_0x386fa5:0x434},_0x51e3af={_0x2fd441:0xc5};function _0x26cef1(_0x561652,_0x3f384c,_0x5c24a3,_0x3ba917){return _0x383f4b(_0x3ba917-0xb7,_0x3f384c-0x3a,_0x561652,_0x3ba917-0x31);}function _0x3b44b6(_0x2afca5,_0x586cb1,_0x461c6c,_0x2b4268){return _0x383f4b(_0x586cb1-_0x51e3af._0x2fd441,_0x586cb1-0x19d,_0x461c6c,_0x2b4268-0x1ac);}return{'callId':_0x3f778f['id'],'toolName':_0x3f778f[_0x26cef1(_0x516a13._0x5b8024,0x43a,0x3fa,_0x516a13._0x1f7f0d)],'status':'ok','output':_0x1b2eeb[_0x3b44b6(_0x516a13._0x4b3dff,_0x516a13._0x49c9fa,_0x516a13._0x6548d2,_0x516a13._0x3bbd99)],'structured':_0x1b2eeb[_0x3b44b6(0x3ec,_0x516a13._0x351da0,_0x516a13._0x237d3e,_0x516a13._0x3a3baf)],..._0x1b2eeb[_0x3b44b6(_0x516a13._0x5eff36,0x435,_0x516a13._0x144e19,_0x516a13._0x5d3de3)]!==void 0x0?{'content':_0x1b2eeb[_0x26cef1(_0x516a13._0x2c15b8,0x3fd,_0x516a13._0x386fa5,0x427)]}:{},'chunks':_0x25562b,'meta':createToolMeta()};}function createUnknownToolResult(_0x417b8a){const _0x464d3b={_0x2b378b:0x280,_0x3f8bdc:0x27e,_0x94600:0x2d0,_0x42d576:0x2ba,_0x13162e:0x23c,_0x3f9206:0x291},_0x33acbc={_0xbb00e:0x6ad,_0x96247b:0x1e4},_0x4c93cb={_0xc42acb:0x3a2};function _0x582b3e(_0x14a283,_0x1ff272,_0x4e245e,_0x5356b1){return _0x383f4b(_0x1ff272- -_0x4c93cb._0xc42acb,_0x1ff272-0x1a8,_0x5356b1,_0x5356b1-0x197);}function _0x51acde(_0x2c3967,_0x3215e3,_0x418df7,_0x5e3fbb){return _0x3061cd(_0x2c3967-0xe2,_0x5e3fbb- -_0x33acbc._0xbb00e,_0x418df7-_0x33acbc._0x96247b,_0x3215e3);}return createErrorToolResult(_0x417b8a,'Unknown\x20tool:\x20'+_0x417b8a[_0x51acde(-_0x464d3b._0x2b378b,-0x2fe,-_0x464d3b._0x3f8bdc,-_0x464d3b._0x94600)],{'error':_0x51acde(-0x29d,-_0x464d3b._0x42d576,-_0x464d3b._0x13162e,-_0x464d3b._0x3f9206)});}function isDispatchDecision(_0x3e8e23){const _0x6d56e9={_0x1032a0:0x358,_0x3a8f3b:0x342,_0x2d8a31:0x3a9,_0x47e059:0x334,_0x54d147:0x2f3,_0x3f55aa:0x33a,_0x451d29:0x2dc},_0x20801c={_0x4f01c6:0xc5,_0x341d9a:0xb4,_0x3d9431:0x1b2},_0x477c05={_0xe6e985:0x43};if(typeof _0x3e8e23!==_0x1463f7(_0x6d56e9._0x1032a0,_0x6d56e9._0x3a8f3b,_0x6d56e9._0x2d8a31,_0x6d56e9._0x47e059)||_0x3e8e23===null)return![];function _0x1463f7(_0x4de5ba,_0x5a40d1,_0x142d44,_0x148782){return _0x383f4b(_0x4de5ba- -_0x477c05._0xe6e985,_0x5a40d1-0x195,_0x148782,_0x148782-0x4e);}function _0x45a4c0(_0x2ec842,_0x597e7a,_0x1cef06,_0x3e2b57){return _0x383f4b(_0x1cef06- -_0x20801c._0x4f01c6,_0x597e7a-_0x20801c._0x341d9a,_0x3e2b57,_0x3e2b57-_0x20801c._0x3d9431);}return _0x3e8e23['action']===_0x45a4c0(0x2ce,0x26d,0x2c3,0x2dc)||_0x3e8e23[_0x1463f7(_0x6d56e9._0x54d147,0x2b4,0x2dd,0x2b8)]===_0x1463f7(0x2e6,_0x6d56e9._0x3f55aa,0x2d4,_0x6d56e9._0x451d29);}function normalizeExecutionError(_0x598a3e){const _0x3a4adf={_0x3897a2:0x185,_0x2d77dc:0x17f,_0x228fd0:0x1a2,_0x247582:0x143,_0x228316:0x161,_0x52a907:0x17c},_0x14a964={_0x194138:0x19f,_0x4ebc47:0x1e2},_0x5bfc5c={_0xc625f0:0x13b};function _0x49ca5c(_0x1a4072,_0x474a25,_0x34720a,_0x50aa54){return _0x3061cd(_0x1a4072-0x43,_0x34720a- -0x27f,_0x34720a-_0x5bfc5c._0xc625f0,_0x474a25);}if(_0x598a3e instanceof ToolExecutionError)return{'errorMessage':_0x598a3e[_0x3ae235(_0x3a4adf._0x3897a2,0x186,0x1dd,0x16f)],'structured':{'error':_0x598a3e[_0x3ae235(0x185,0x16e,_0x3a4adf._0x2d77dc,0x1af)],..._0x598a3e[_0x49ca5c(_0x3a4adf._0x228fd0,0x17d,0x17b,_0x3a4adf._0x247582)]}};if(_0x598a3e instanceof Error)return{'errorMessage':_0x598a3e['message'],'structured':{'error':_0x598a3e[_0x3ae235(0x185,0x1ad,_0x3a4adf._0x228316,_0x3a4adf._0x52a907)]}};function _0x3ae235(_0x1c9446,_0x3a850d,_0x4382e6,_0x249243){return _0x383f4b(_0x1c9446- -0x1cf,_0x3a850d-_0x14a964._0x194138,_0x249243,_0x249243-_0x14a964._0x4ebc47);}const _0x85356f=String(_0x598a3e);return{'errorMessage':_0x85356f,'structured':{'error':_0x85356f}};}async function emitEvent(_0x1c8072,_0x3035cd,_0x4077fa){await _0x1c8072?.(_0x3035cd,_0x4077fa);}async function resolveDispatchDecision(_0x25aaaf,_0xd32423,_0x1868ce){const _0x134cfb={_0x39b213:0x38,_0x1e9f21:0x198,_0x467e7f:0x16f,_0x17d978:0x15b,_0xf25b84:0x1a9,_0x2ac96a:0x1d1,_0x4a4afd:0x58,_0xd38583:0xf},_0x542ba7={_0x4c2791:0x494,_0x14d6f0:0x462,_0xfdaeea:0x404,_0x387e8f:0x3f6,_0x540561:0x449,_0x35cb9d:0x111,_0x469f27:0x12c,_0x397973:0x130,_0x4f335c:0x104,_0x1e720e:0xde,_0x305b13:0x165},_0x17fdd4={_0x5de928:0x3a2,_0x6b1336:0x31e,_0x184fe0:0x37e,_0x18f418:0x36e,_0xd6bb22:0x2fa,_0x28bdb1:0x337,_0x8c6844:0x374,_0x1f756c:0x29e,_0x4d336c:0x2d6,_0x1791f9:0x3b6,_0x1a8b4c:0x3b5},_0x1bcfcd={_0x36e89c:0x4f,_0x5c2364:0x43a},_0x5c3041={_0x4fbaa5:0x4f2,_0x3f5985:0x177};function _0x24ecc3(_0x2b4a72,_0x270432,_0x4d44af,_0x59b80f){return _0x383f4b(_0x270432- -_0x5c3041._0x4fbaa5,_0x270432-_0x5c3041._0x3f5985,_0x59b80f,_0x59b80f-0x2c);}function _0x4597dd(_0x4c2a8d,_0x50b625,_0xb20edf,_0x2470ee){return _0x3061cd(_0x4c2a8d-0x1a1,_0x2470ee- -0x3bd,_0xb20edf-0x1a5,_0x4c2a8d);}if(!_0x25aaaf)return{'action':_0x4597dd(-0x40,_0x134cfb._0x39b213,-0x40,0x8)};const _0x20904f=Promise['resolve']()[_0x24ecc3(-_0x134cfb._0x1e9f21,-_0x134cfb._0x467e7f,-_0x134cfb._0x17d978,-0x1a0)](()=>_0x25aaaf(_0xd32423,_0x1868ce));if(!_0x1868ce[_0x24ecc3(-0x173,-_0x134cfb._0xf25b84,-0x160,-0x1f0)]){const _0x56fc7f=await _0x20904f;return isDispatchDecision(_0x56fc7f)?_0x56fc7f:{'action':_0x24ecc3(-_0x134cfb._0x2ac96a,-0x1c9,-0x1e2,-0x1e5)};}const _0x8dbbe9=new Promise((_0x595b5d,_0x2e6eea)=>{const _0x5f46b8={_0x488208:0x1cf};function _0x1af674(_0x4ad007,_0x3f5d8f,_0x1ded90,_0x1fdae4){return _0x4597dd(_0x1ded90,_0x3f5d8f-0x128,_0x1ded90-_0x1bcfcd._0x36e89c,_0x1fdae4-_0x1bcfcd._0x5c2364);}function _0x5e48d9(_0x510c2f,_0x4f301e,_0x58c68e,_0x2d6660){return _0x24ecc3(_0x510c2f-0x109,_0x510c2f-0x6f,_0x58c68e-_0x5f46b8._0x488208,_0x2d6660);}const _0x873520=()=>{const _0x1c7db8={_0x50209f:0x296};_0x1868ce[_0x114508(_0x17fdd4._0x5de928,_0x17fdd4._0x6b1336,0x364,_0x17fdd4._0x184fe0)]?.[_0x114508(_0x17fdd4._0x18f418,_0x17fdd4._0xd6bb22,_0x17fdd4._0x28bdb1,_0x17fdd4._0x8c6844)](_0x431344(_0x17fdd4._0x1f756c,0x2ef,_0x17fdd4._0x4d336c,0x2dc),_0x873520);function _0x114508(_0x38f168,_0x106071,_0x518f3c,_0x28a1f0){return _0x49c0(_0x518f3c-_0x1c7db8._0x50209f,_0x28a1f0);}function _0x431344(_0x3c265f,_0x4a6089,_0x5766da,_0x1f3f15){return _0x49c0(_0x5766da-0x25d,_0x3c265f);}_0x2e6eea(toAbortError(_0x1868ce[_0x114508(0x39e,0x391,0x364,0x3b7)]?.[_0x114508(0x347,_0x17fdd4._0x1791f9,0x38d,_0x17fdd4._0x1a8b4c)]));};if(_0x1868ce[_0x1af674(0x423,_0x542ba7._0x4c2791,0x42e,_0x542ba7._0x14d6f0)]?.[_0x1af674(0x496,_0x542ba7._0xfdaeea,_0x542ba7._0x387e8f,_0x542ba7._0x540561)]){_0x2e6eea(toAbortError(_0x1868ce['signal'][_0x5e48d9(-_0x542ba7._0x35cb9d,-_0x542ba7._0x469f27,-0xde,-_0x542ba7._0x397973)]));return;}_0x1868ce['signal']?.[_0x5e48d9(-0xec,-_0x542ba7._0x4f335c,-_0x542ba7._0x1e720e,-0xe8)](_0x5e48d9(-0x18f,-_0x542ba7._0x305b13,-0x15b,-0x1d1),_0x873520,{'once':!![]});}),_0x4e7464=await Promise[_0x4597dd(0x75,_0x134cfb._0x4a4afd,-_0x134cfb._0xd38583,0x26)]([_0x20904f,_0x8dbbe9]);return isDispatchDecision(_0x4e7464)?_0x4e7464:{'action':_0x24ecc3(-0x211,-0x1c9,-0x1b2,-0x218)};}async function executeToolCall(_0x6cc90a,_0x398c19,_0x4bb119,_0x3926aa,_0x3738c8){const _0x44c93c={_0x1daafc:0x52,_0x1668c2:0x38,_0x106c29:0x9d,_0x3e9a95:0x32,_0x1cb573:0xf8,_0x14bfcf:0xe8,_0x39c2df:0xda,_0x494ed4:0xaa,_0x23fe5f:0xda,_0x4b4bc0:0x15f,_0x3bc884:0x116,_0x213ff1:0x14a,_0x4fc357:0x86,_0x2575a3:0x90,_0x5213e7:0x4c,_0x5b60d5:0x90,_0x365535:0x117,_0x206a2e:0x78,_0x47bafd:0xa8,_0x2dc584:0x13c,_0x1d2fc6:0x11c,_0x2e0038:0x52,_0x5d693c:0x6f,_0x42e32e:0x43,_0x240169:0x10c,_0x1290af:0xbb,_0x534a93:0xa1,_0x49e3d1:0xc1,_0x311a58:0x109,_0x1637c7:0xd9,_0x59bec2:0x10b,_0x4f6abd:0xc7,_0x5f1391:0x80,_0x1a01d9:0x45,_0x5eb378:0x37,_0x30a72c:0x8,_0x40452d:0x24,_0x2fd353:0x80,_0x2bcfbc:0x62,_0x684096:0x75,_0x2be8cf:0x88,_0x518e26:0x60,_0x1988c8:0x9e,_0x49da44:0x8c,_0x44b063:0xc7,_0x2466b0:0xda,_0x4b396b:0xb3,_0x17e590:0x10,_0x5cd29a:0x7c,_0x35781b:0x3b,_0x4b24e1:0x16,_0x1345aa:0x17,_0x3f7bd4:0x131,_0x3efdf7:0x9f,_0x26a31c:0x2,_0x116cec:0x12c},_0xcddb18={_0x13d66d:0x1ae,_0x397b13:0x1b4},_0xa1480a={_0x1455a8:0x13f,_0x28dde2:0x1aa},_0x1a178f={_0x2de5ff:0x437};function _0x370334(_0x248927,_0x2931f0,_0x4534f5,_0x19d727){return _0x3061cd(_0x248927-0xe5,_0x248927- -_0x1a178f._0x2de5ff,_0x4534f5-0x98,_0x2931f0);}const _0x4b0c80={..._0x4bb119,'toolCallId':_0x398c19['id']};throwIfAborted(_0x4b0c80[_0x370334(-_0x44c93c._0x1daafc,-_0x44c93c._0x1668c2,-_0x44c93c._0x106c29,-0x1)]);let _0x331691;function _0x1d7ac3(_0x1b219b,_0x2d62fe,_0x4d884a,_0x3a9b47){return _0x383f4b(_0x4d884a- -0x278,_0x2d62fe-_0xa1480a._0x1455a8,_0x3a9b47,_0x3a9b47-_0xa1480a._0x28dde2);}try{_0x331691=await resolveDispatchDecision(_0x3926aa,_0x398c19,_0x4b0c80);}catch(_0x44e38b){if(isAbortError(_0x44e38b)){const _0x1a4ab6=createAbortedToolResult(_0x398c19,_0x44e38b);return await emitEvent(_0x3738c8,{'type':_0x370334(-0x3b,-0x73,-_0x44c93c._0x3e9a95,-0x45),'toolCall':_0x398c19,'result':_0x1a4ab6},_0x4b0c80),_0x1a4ab6;}const {errorMessage:_0x141a55,structured:_0x5f1610}=normalizeExecutionError(_0x44e38b),_0x491ff0=createErrorToolResult(_0x398c19,_0x141a55,_0x5f1610);return await emitEvent(_0x3738c8,{'type':_0x1d7ac3(0xc9,_0x44c93c._0x1cb573,_0x44c93c._0x14bfcf,0x13d),'toolCall':_0x398c19,'result':_0x491ff0},_0x4b0c80),_0x491ff0;}throwIfAborted(_0x4b0c80['signal']);if(_0x331691[_0x1d7ac3(_0x44c93c._0x39c2df,0x67,0xbe,_0x44c93c._0x494ed4)]===_0x1d7ac3(0x110,_0x44c93c._0x23fe5f,0x110,_0x44c93c._0x4b4bc0)){const _0x2cd964=createRejectedToolResult(_0x398c19,_0x331691[_0x1d7ac3(0xc9,_0x44c93c._0x3bc884,0xfa,_0x44c93c._0x213ff1)]);return await emitEvent(_0x3738c8,{'type':_0x370334(-0x9e,-0xdb,-_0x44c93c._0x14bfcf,-0xe9),'toolCall':_0x398c19,'result':_0x2cd964},_0x4b0c80),_0x2cd964;}const _0x126523=_0x6cc90a[_0x370334(-0x5e,-0x79,-0xab,-_0x44c93c._0x4fc357)](_0x398c19[_0x370334(-0x5a,-0x30,-_0x44c93c._0x2575a3,-_0x44c93c._0x5213e7)]);if(!_0x126523){const _0x4d0d54=createUnknownToolResult(_0x398c19);return await emitEvent(_0x3738c8,{'type':_0x1d7ac3(0x9a,_0x44c93c._0x5b60d5,_0x44c93c._0x14bfcf,_0x44c93c._0x365535),'toolCall':_0x398c19,'result':_0x4d0d54},_0x4b0c80),_0x4d0d54;}throwIfAborted(_0x4b0c80[_0x1d7ac3(0x103,_0x44c93c._0x206a2e,0xd1,0xf3)]),await emitEvent(_0x3738c8,{'type':'tool_started','toolCall':_0x398c19},_0x4b0c80);try{throwIfAborted(_0x4b0c80[_0x370334(-_0x44c93c._0x1daafc,-_0x44c93c._0x47bafd,-0x1e,-0x1c)]);const _0x5a8189=validateToolInput(_0x398c19[_0x1d7ac3(_0x44c93c._0x2dc584,0x16c,_0x44c93c._0x1d2fc6,0x12d)],_0x126523['inputSchema']),_0x5e64ff=await _0x126523['execute'](_0x5a8189,_0x4b0c80),_0x36b926=[],_0x5758c1=addAbortListener(_0x4b0c80[_0x370334(-_0x44c93c._0x2e0038,-_0x44c93c._0x5d693c,-0x69,-_0x44c93c._0x42e32e)],()=>{const _0xfb7539={_0x1f42f2:0x27},_0x6d1cf9={_0x39ab5b:0x140};function _0x820738(_0x554a0e,_0xaa9f5,_0x142091,_0x1d9ff5){return _0x370334(_0x554a0e-0x404,_0xaa9f5,_0x142091-0x6,_0x1d9ff5-_0x6d1cf9._0x39ab5b);}function _0x4a468e(_0x456d33,_0x5a9fcb,_0x522f24,_0x51fe8b){return _0x1d7ac3(_0x456d33-0x11e,_0x5a9fcb-_0xfb7539._0x1f42f2,_0x522f24- -0x28d,_0x51fe8b);}void _0x5e64ff[_0x4a468e(-0x1cb,-_0xcddb18._0x13d66d,-_0xcddb18._0x397b13,-0x201)](void 0x0)[_0x4a468e(-0x174,-0x20b,-0x1ba,-0x1c4)](()=>{});});try{throwIfAborted(_0x4b0c80[_0x1d7ac3(_0x44c93c._0x240169,0xa9,0xd1,_0x44c93c._0x1290af)]);let _0x2b3053=await _0x5e64ff[_0x1d7ac3(_0x44c93c._0x534a93,0xb9,_0x44c93c._0x49e3d1,0xc3)]();while(!_0x2b3053['done']){throwIfAborted(_0x4b0c80[_0x1d7ac3(_0x44c93c._0x311a58,0xd2,0xd1,_0x44c93c._0x1637c7)]);const _0x4ad997=normalizeToolOutputValue(_0x2b3053[_0x1d7ac3(_0x44c93c._0x106c29,_0x44c93c._0x59bec2,_0x44c93c._0x4f6abd,_0x44c93c._0x5f1391)]);_0x36b926['push'](_0x4ad997),await emitEvent(_0x3738c8,{'type':_0x370334(-0x3c,-_0x44c93c._0x1a01d9,-_0x44c93c._0x5eb378,-0x7a),'toolCall':_0x398c19,'chunk':_0x4ad997},_0x4b0c80),throwIfAborted(_0x4b0c80[_0x370334(-0x52,-_0x44c93c._0x30a72c,-_0x44c93c._0x40452d,-_0x44c93c._0x2fd353)]),_0x2b3053=await _0x5e64ff[_0x370334(-_0x44c93c._0x2bcfbc,-_0x44c93c._0x684096,-_0x44c93c._0x2be8cf,-_0x44c93c._0x518e26)]();}throwIfAborted(_0x4b0c80[_0x370334(-0x52,-0xb,-0x53,-_0x44c93c._0x1988c8)]);const _0x279138=_0x2b3053[_0x1d7ac3(_0x44c93c._0x49da44,0x110,_0x44c93c._0x44b063,_0x44c93c._0x2466b0)]===void 0x0?deriveFinalToolOutput(_0x36b926):normalizeToolOutputValue(_0x2b3053[_0x370334(-0x5c,-_0x44c93c._0x4b396b,-_0x44c93c._0x17e590,-_0x44c93c._0x5cd29a)]),_0x22bb42=createSuccessToolResult(_0x398c19,_0x279138,_0x36b926);return await emitEvent(_0x3738c8,{'type':_0x370334(-_0x44c93c._0x35781b,-_0x44c93c._0x4b24e1,-_0x44c93c._0x1345aa,-0x7b),'toolCall':_0x398c19,'result':_0x22bb42},_0x4b0c80),_0x22bb42;}catch(_0x215631){if(isAbortError(_0x215631)){const _0x5a656f=createAbortedToolResult(_0x398c19,_0x215631,_0x36b926);return await emitEvent(_0x3738c8,{'type':'tool_completed','toolCall':_0x398c19,'result':_0x5a656f},_0x4b0c80),_0x5a656f;}const {errorMessage:_0x40ec39,structured:_0x5382f8}=normalizeExecutionError(_0x215631),_0x4537fb=createErrorToolResult(_0x398c19,_0x40ec39,_0x5382f8,_0x36b926);return await emitEvent(_0x3738c8,{'type':_0x1d7ac3(_0x44c93c._0x3f7bd4,0xc3,0xe8,_0x44c93c._0x3efdf7),'toolCall':_0x398c19,'result':_0x4537fb},_0x4b0c80),_0x4537fb;}finally{_0x5758c1();}}catch(_0x45309b){if(isAbortError(_0x45309b)){const _0x192a29=createAbortedToolResult(_0x398c19,_0x45309b);return await emitEvent(_0x3738c8,{'type':_0x370334(-_0x44c93c._0x35781b,-0x2a,0xa,-_0x44c93c._0x26a31c),'toolCall':_0x398c19,'result':_0x192a29},_0x4b0c80),_0x192a29;}const {errorMessage:_0x114390,structured:_0x4f9d23}=normalizeExecutionError(_0x45309b),_0x3939a6=createErrorToolResult(_0x398c19,_0x114390,_0x4f9d23);return await emitEvent(_0x3738c8,{'type':_0x1d7ac3(0xe2,0xc6,0xe8,_0x44c93c._0x116cec),'toolCall':_0x398c19,'result':_0x3939a6},_0x4b0c80),_0x3939a6;}}function createInternalToolRuntime(_0x2b74b7=[],_0x5c281c={}){const _0x12e7de={_0x37a4ee:0x35e,_0xa06c0:0x319,_0x557840:0x353},_0x501cba={_0x452366:0x3d1,_0x5975cf:0x146},_0x2cc63f={_0x3e2b62:0x200,_0xe7262a:0x23c,_0x443554:0x1f8,_0x5539d1:0x2cc,_0x428a84:0x32d,_0x141850:0x32e},_0x80eac5={_0x4b2d07:0x332},_0xd75056={_0x40689a:0x361};let _0x2cc7f1=new ToolRegistry(_0x2b74b7);return{'listToolSchemas'(){const _0x139a29={_0x54da70:0x2f6};function _0x340170(_0x522758,_0x4fdf95,_0x43ae12,_0x394117){return _0x49c0(_0x43ae12-_0x139a29._0x54da70,_0x4fdf95);}return _0x2cc7f1[_0x340170(0x3dd,0x3e3,0x39e,_0xd75056._0x40689a)]();},'setTools'(_0xf71fff){_0x2cc7f1=new ToolRegistry(_0xf71fff);},async 'executeCalls'(_0x27e152,_0x42ada0){const _0x1cee3c={_0x21721f:0x102,_0x1008e9:0x11e},_0x33c8d5={_0x186304:0xf1,_0x2ff3d2:0x14e,_0x3ce5f2:0x2c0};function _0x62a6b1(_0x552e11,_0x40d43e,_0x3c841b,_0x2fe6a3){return _0x49c0(_0x552e11-_0x80eac5._0x4b2d07,_0x3c841b);}function _0x26e43f(_0x5d9552,_0x4b1b59,_0x2c1e64,_0x26392e){return _0x49c0(_0x2c1e64- -0x1ea,_0x26392e);}return await Promise[_0x62a6b1(_0x501cba._0x452366,0x3a2,0x3a1,0x3b5)](_0x27e152[_0x26e43f(-0xfd,-0xc6,-0x109,-_0x501cba._0x5975cf)](async _0x2fcd34=>{function _0x4c0289(_0x2d6001,_0x121ec8,_0x1a6fc0,_0x54bade){return _0x26e43f(_0x2d6001-_0x33c8d5._0x186304,_0x121ec8-_0x33c8d5._0x2ff3d2,_0x54bade-_0x33c8d5._0x3ce5f2,_0x1a6fc0);}function _0x3d1139(_0x813be5,_0x2fbd3d,_0x244ca9,_0x565e96){return _0x62a6b1(_0x2fbd3d- -_0x1cee3c._0x21721f,_0x2fbd3d-_0x1cee3c._0x1008e9,_0x565e96,_0x565e96-0x19c);}return await executeToolCall(_0x2cc7f1,_0x2fcd34,_0x42ada0,_0x5c281c[_0x4c0289(_0x2cc63f._0x3e2b62,_0x2cc63f._0xe7262a,0x249,_0x2cc63f._0x443554)],_0x5c281c[_0x3d1139(_0x2cc63f._0x5539d1,0x2f3,_0x2cc63f._0x428a84,_0x2cc63f._0x141850)]);}));},async 'execute'(_0x54310f,_0x22fb6c){function _0x2f90f6(_0x286210,_0x524001,_0x413a57,_0x47fe6f){return _0x49c0(_0x524001-0x2a5,_0x286210);}const [_0x3a1211]=await this[_0x2f90f6(_0x12e7de._0x37a4ee,0x337,_0x12e7de._0xa06c0,_0x12e7de._0x557840)]([_0x54310f],_0x22fb6c);return _0x3a1211;}};}function getOrderedObserverExtensions(_0x826105,_0x1168f1){const _0x321e09={_0x39582e:0x204,_0x31c8e7:0x1fd,_0x1ec649:0x1fd},_0x25141d={_0x259436:0x2b0,_0x8d08a5:0x2bd,_0x24a637:0x307,_0x2b5914:0x12d,_0x43b08b:0x1b1,_0x3bd520:0x27e},_0x2a29da={_0x13bdf3:0x99},_0x36ad90={_0x137cae:0x6b},_0x5e24bd={_0x4fb911:0x1d9,_0x59e491:0x3d};function _0x15c98e(_0x2da17d,_0x25a0a9,_0x5a7e5e,_0xcf5340){return _0x3061cd(_0x2da17d-_0x5e24bd._0x4fb911,_0xcf5340- -0x117,_0x5a7e5e-_0x5e24bd._0x59e491,_0x25a0a9);}function _0x54a2f0(_0x14b8e3,_0x3948e0,_0x751821,_0x22a3e7){return _0x3061cd(_0x14b8e3-_0x36ad90._0x137cae,_0x3948e0- -0x1d0,_0x751821-0x114,_0x14b8e3);}return _0x826105[_0x54a2f0(_0x321e09._0x39582e,_0x321e09._0x31c8e7,0x1ad,_0x321e09._0x1ec649)](_0x349a3c=>{const _0x4c5f0e={_0x32baf7:0x3c7};function _0x1d1978(_0x5e01db,_0x5321ad,_0x3cdd72,_0x4c4782){return _0x54a2f0(_0x5321ad,_0x5e01db- -_0x4c5f0e._0x32baf7,_0x3cdd72-0x129,_0x4c4782-0x179);}function _0x1ff5c7(_0x209598,_0x3ec0c3,_0x500e8b,_0x3fcfc3){return _0x54a2f0(_0x3ec0c3,_0x209598- -0x4d2,_0x500e8b-0x1b2,_0x3fcfc3-_0x2a29da._0x13bdf3);}return _0x349a3c[_0x1ff5c7(-_0x25141d._0x259436,-0x2c8,-_0x25141d._0x8d08a5,-_0x25141d._0x24a637)]!==![]&&_0x349a3c[_0x1d1978(-0x176,-0x1ab,-_0x25141d._0x2b5914,-_0x25141d._0x43b08b)]===_0x1168f1&&_0x349a3c[_0x1ff5c7(-0x28c,-_0x25141d._0x3bd520,-0x2a0,-0x2a8)]==='observer';})['sort']((_0x2c40d1,_0x273807)=>_0x2c40d1[_0x54a2f0(0x1a4,0x1be,0x216,0x1b8)]-_0x273807['order']);}function getOrderedTransformerExtensions(_0x1fefc6,_0x20b66d){const _0xc8ae8e={_0x282b9e:0x234,_0x5d6922:0x234,_0x4ef388:0x202},_0x5835f6={_0x4015c2:0x243,_0x3bd59d:0x21c,_0x41eba6:0x1ed,_0x37edcd:0x1fc,_0x38ac0f:0x212,_0x3147a5:0x245,_0x229d26:0x27f,_0x52f77f:0x2be,_0x5c28c2:0x286},_0x3fedc3={_0x57697f:0x46},_0x208af9={_0x4f0699:0x1f,_0x10a4ce:0xc7},_0x454b8e={_0x9f6981:0x131};function _0x2ce911(_0x15a6d9,_0x527e1f,_0x3eef5c,_0x24df0a){return _0x383f4b(_0x3eef5c- -0x12f,_0x527e1f-_0x454b8e._0x9f6981,_0x15a6d9,_0x24df0a-0x12e);}function _0x804462(_0xfeb0bd,_0x461a36,_0xcb5faa,_0x55c099){return _0x383f4b(_0x461a36- -0x299,_0x461a36-_0x208af9._0x4f0699,_0xcb5faa,_0x55c099-_0x208af9._0x10a4ce);}return _0x1fefc6[_0x2ce911(_0xc8ae8e._0x282b9e,_0xc8ae8e._0x5d6922,_0xc8ae8e._0x4ef388,0x1b5)](_0xbeb31d=>{const _0x53b0d0={_0x548c9b:0xed};function _0xe232f0(_0x23161e,_0x20d1fa,_0x52eda1,_0x3645db){return _0x2ce911(_0x23161e,_0x20d1fa-_0x53b0d0._0x548c9b,_0x20d1fa- -0x443,_0x3645db-0x67);}function _0x2ef34d(_0x4683a5,_0x3a2e80,_0x1c2d7c,_0x45e6da){return _0x2ce911(_0x1c2d7c,_0x3a2e80-_0x3fedc3._0x57697f,_0x4683a5- -0x4bc,_0x45e6da-0x142);}return _0xbeb31d[_0xe232f0(-_0x5835f6._0x4015c2,-_0x5835f6._0x3bd59d,-0x1d8,-0x1ce)]!==![]&&_0xbeb31d[_0xe232f0(-0x1c2,-_0x5835f6._0x41eba6,-0x203,-0x1ee)]===_0x20b66d&&_0xbeb31d[_0xe232f0(-_0x5835f6._0x37edcd,-0x1f8,-0x1ee,-_0x5835f6._0x38ac0f)]===_0xe232f0(-_0x5835f6._0x3147a5,-_0x5835f6._0x229d26,-_0x5835f6._0x52f77f,-_0x5835f6._0x5c28c2);})['sort']((_0x1147f2,_0x3afacb)=>_0x1147f2[_0x804462(0x7f,0x59,0xb0,0x2a)]-_0x3afacb[_0x2ce911(0x186,0x19e,0x1c3,0x1e1)]);}function createExtensionRegistry(){const _0x5b5d9e={_0x5f1e09:0x3c8,_0x2c59b3:0x3ce},_0x24ca6c={_0x362ea8:0x31a},_0x3a3fed={_0x2cd05f:0x3f2},_0x4fbb9e={_0x4dafc2:0x344},_0x3387cd={_0x41296b:0x239,_0x33dadd:0x24b,_0x51fb4f:0x26a,_0x114bfd:0x230},_0x278b34=[];return{'register'(_0x39e28a){function _0xf955a3(_0x5eeb09,_0x11d04e,_0x39b354,_0x1a9d18){return _0x49c0(_0x1a9d18- -0x2fd,_0x5eeb09);}_0x278b34[_0xf955a3(-_0x3387cd._0x41296b,-_0x3387cd._0x33dadd,-_0x3387cd._0x51fb4f,-_0x3387cd._0x114bfd)](_0x39e28a);},async 'runTransformers'(_0x1c8cd,_0x445862,_0x122ade){function _0x256db4(_0x323f32,_0x166e6c,_0x56b0b5,_0x2427b4){return _0x49c0(_0x323f32-_0x4fbb9e._0x4dafc2,_0x56b0b5);}let _0x1c153f=_0x445862;for(const _0x5889bd of getOrderedTransformerExtensions(_0x278b34,_0x1c8cd)){_0x1c153f=await _0x5889bd[_0x256db4(_0x3a3fed._0x2cd05f,0x3a3,0x3e5,0x420)](_0x1c153f,_0x122ade);}return _0x1c153f;},async 'runObservers'(_0x238054,_0x5c4337,_0x2f33d1){function _0x1d8d18(_0x23f4c2,_0x151d72,_0x3eaecd,_0x5f6477){return _0x49c0(_0x23f4c2-_0x24ca6c._0x362ea8,_0x3eaecd);}for(const _0x451d71 of getOrderedObserverExtensions(_0x278b34,_0x238054)){await _0x451d71[_0x1d8d18(_0x5b5d9e._0x5f1e09,_0x5b5d9e._0x2c59b3,0x3cc,0x39e)](_0x5c4337,_0x2f33d1);}}};}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(_0x3607d1={}){const _0x35a493={_0x22e458:0x30f},_0x162c72={_0xa0ea:0x4b,_0x14a5e2:0xf,_0x549b12:0x39,_0xe1fd96:0x25,_0x490faa:0x27e,_0x1884f9:0x24f,_0x48ad98:0x229,_0x589868:0x256,_0xb3cb90:0x27d,_0x4339cc:0x218,_0x40f8ee:0x260,_0x459371:0x1ce,_0x48795c:0x1f4,_0x29ce2c:0x71,_0x358004:0xdc,_0x162e99:0xcb,_0x21226b:0xda,_0x26393b:0x256,_0xcac0f8:0x1ff,_0x3909c8:0x296,_0x4762fb:0x23b,_0xf7447b:0x2d8,_0x301db4:0x1b3,_0x578545:0x20e,_0x361931:0x27c,_0x33c919:0x21a,_0x51c54e:0x91,_0x4a82da:0x8f,_0x24e7fc:0x8c,_0x2def63:0x60,_0x4f07b8:0x71,_0x2c29d2:0x92,_0x50c608:0x4c,_0x4fab54:0x39,_0x31d1d8:0x27b,_0x3e45a5:0x1e9,_0x50a2c8:0x5c,_0x33919e:0x71,_0x2951b7:0xf7,_0x1ce99e:0xcb,_0x1e20e7:0x9e,_0x31d71b:0x20b,_0x496db4:0x187},_0x1e6294={_0x4fe789:0x16b},_0x552ee1={_0x24dc5f:0x15c};let _0x155a98=createEmptySnapshot();const _0x79c359=new Set();let _0x1e3d72;const _0x1a4758=()=>{const _0x1ee945={..._0x155a98};for(const _0x14e56d of _0x79c359)_0x14e56d(_0x1ee945);};return{'getSnapshot'(){return{..._0x155a98};},'recordEvent'(_0x5e8002){if(_0x5e8002[_0x5774cc(-_0x162c72._0xa0ea,_0x162c72._0x14a5e2,-_0x162c72._0x549b12,-_0x162c72._0xe1fd96)]==='model_request'){_0x1e3d72=Date['now']();const _0x2fa267=_0x3607d1[_0x5774cc(-0x55,-0x46,-0x95,-0xcc)]?.(_0x5e8002[_0x5ea683(_0x162c72._0x490faa,_0x162c72._0x1884f9,0x289,_0x162c72._0x48ad98)]);_0x2fa267!==void 0x0&&(_0x155a98={..._0x155a98,'contextWindowLimit':_0x2fa267},_0x1a4758());return;}function _0x5774cc(_0x538db5,_0x26b7f5,_0x146c29,_0x5e530c){return _0x49c0(_0x146c29- -_0x552ee1._0x24dc5f,_0x538db5);}if(_0x5e8002['type']==='model_response'){const _0x5eb0de=_0x5e8002[_0x5ea683(_0x162c72._0x589868,_0x162c72._0xb3cb90,_0x162c72._0x4339cc,_0x162c72._0x40f8ee)][_0x5ea683(0x1ee,_0x162c72._0x459371,_0x162c72._0x48795c,0x1de)]['inputTokens'],_0x48d676=_0x5e8002[_0x5774cc(-0x9b,-0x1c,-_0x162c72._0x29ce2c,-0x77)][_0x5774cc(-_0x162c72._0x358004,-0xbd,-0xd9,-_0x162c72._0x162e99)][_0x5774cc(-0x113,-_0x162c72._0x21226b,-0xd1,-0xcd)],_0x456502=_0x5e8002[_0x5ea683(_0x162c72._0x26393b,0x292,_0x162c72._0xcac0f8,_0x162c72._0x3909c8)][_0x5ea683(0x1ee,0x1c5,0x1da,0x1b2)][_0x5ea683(0x281,_0x162c72._0x4762fb,_0x162c72._0xf7447b,0x26b)]??0x0,_0x10d5e0=_0x5eb0de+_0x48d676,_0x176ea9=_0x1e3d72===void 0x0?0x0:Date[_0x5ea683(0x1fa,_0x162c72._0x301db4,0x1ce,0x1c8)]()-_0x1e3d72;_0x1e3d72=void 0x0,_0x155a98={..._0x155a98,'totalTokens':_0x155a98[_0x5ea683(_0x162c72._0x578545,0x213,0x22b,0x204)]+_0x10d5e0,'totalInputTokens':_0x155a98[_0x5ea683(0x266,_0x162c72._0x361931,_0x162c72._0x33c919,0x284)]+_0x5eb0de,'totalOutputTokens':_0x155a98['totalOutputTokens']+_0x48d676,'totalReasoningTokens':_0x155a98[_0x5774cc(-_0x162c72._0x51c54e,-_0x162c72._0x4a82da,-0xc0,-0xef)]+_0x456502,'modelCallCount':_0x155a98[_0x5774cc(-0x39,-_0x162c72._0x24e7fc,-_0x162c72._0x2def63,-0x52)]+0x1,'totalModelTimeMs':_0x155a98['totalModelTimeMs']+_0x176ea9,'currentTokens':_0x10d5e0,'currentInputTokens':_0x5eb0de,'currentOutputTokens':_0x48d676,'currentReasoningTokens':_0x456502,'currentModelTimeMs':_0x176ea9,..._0x155a98[_0x5774cc(-_0x162c72._0x4f07b8,-_0x162c72._0x2c29d2,-0x88,-0xb2)]&&_0x10d5e0>0x0?{'contextWindowUsage':_0x10d5e0/_0x155a98['contextWindowLimit']}:{}},_0x1a4758();return;}if(_0x5e8002[_0x5774cc(0x12,-_0x162c72._0x50c608,-_0x162c72._0x4fab54,-0x5c)]===_0x5ea683(0x283,0x22f,0x27a,_0x162c72._0x31d1d8)){_0x155a98={..._0x155a98,'toolCallCount':_0x155a98[_0x5ea683(_0x162c72._0x3e45a5,0x1db,0x1e7,0x19e)]+0x1},_0x1a4758();return;}function _0x5ea683(_0x1b5d19,_0xe950dc,_0x1f734f,_0x4011e1){return _0x49c0(_0x1b5d19-_0x1e6294._0x4fe789,_0x4011e1);}_0x5e8002[_0x5774cc(-0x79,-_0x162c72._0x50a2c8,-0x39,-_0x162c72._0x33919e)]===_0x5774cc(-_0x162c72._0x2951b7,-0xf1,-_0x162c72._0x1ce99e,-_0x162c72._0x1e20e7)&&(_0x155a98={..._0x155a98,'requestCount':_0x155a98[_0x5ea683(0x1df,_0x162c72._0x31d71b,_0x162c72._0x496db4,0x1e5)]+0x1},_0x1a4758());},'reset'(){_0x155a98=createEmptySnapshot(),_0x1e3d72=void 0x0,_0x1a4758();},'subscribe'(_0x4c88bd){const _0xedb74e={_0x4351ca:0x154};function _0xf282bd(_0x2af621,_0x3c9c54,_0x3bce8c,_0xa792d){return _0x49c0(_0x2af621-0x219,_0xa792d);}return _0x79c359[_0xf282bd(0x311,_0x35a493._0x22e458,0x301,0x363)](_0x4c88bd),()=>{const _0x5df7f3={_0x2dae91:0x115,_0x4c25de:0x64};function _0x560d1c(_0x44f204,_0x311caa,_0x45c324,_0x2ab892){return _0xf282bd(_0x44f204- -0x14a,_0x311caa-_0x5df7f3._0x2dae91,_0x45c324-_0x5df7f3._0x4c25de,_0x2ab892);}_0x79c359[_0x560d1c(0x19e,_0xedb74e._0x4351ca,0x1a7,0x1e1)](_0x4c88bd);};}};}function _0x3061cd(_0x4a83f8,_0x259533,_0x336745,_0x28a143){return _0x49c0(_0x259533-0x317,_0x28a143);}function makeExtensionContext(_0x3a59f6){return{'state':_0x3a59f6};}async function runStage(_0x38f3c5,_0x4a6d1a,_0xf0602f,_0x1a09d1){const _0x557261={_0x5ef33a:0x197,_0x19892b:0x1d1,_0x106cdb:0x15e,_0x5e310e:0x127},_0x106413={_0x2dc079:0x55b,_0x14a058:0x1e9},_0x453ef8={_0x3adf7b:0x5e2},_0x3b0354=await _0x38f3c5[_0x458d47(-0x1c7,-0x17f,-_0x557261._0x5ef33a,-_0x557261._0x19892b)](_0x4a6d1a,_0xf0602f,_0x1a09d1);function _0x1c343c(_0x172ae2,_0x172349,_0x4406ae,_0xd612c4){return _0x3061cd(_0x172ae2-0x64,_0x172ae2- -_0x453ef8._0x3adf7b,_0x4406ae-0x150,_0xd612c4);}await _0x38f3c5[_0x458d47(-0x18e,-0x134,-_0x557261._0x106cdb,-_0x557261._0x5e310e)](_0x4a6d1a,_0x3b0354,_0x1a09d1);function _0x458d47(_0x4a0848,_0xa674c0,_0x1f57f6,_0x181168){return _0x3061cd(_0x4a0848-0xed,_0x1f57f6- -_0x106413._0x2dc079,_0x1f57f6-_0x106413._0x14a058,_0x4a0848);}return _0x3b0354;}async function emitEvent2(_0x244a82,_0xf29552,_0x25b59f){await _0x244a82?.(_0xf29552,_0x25b59f);}function replaceToolUseBlocks(_0x5204c0,_0x136a6e){const _0x56ebed={_0x8de871:0x73,_0x1f5614:0xbc,_0xf2e138:0x442,_0x13a71b:0x403,_0x319ca6:0x424,_0x1e9bdf:0x496},_0x24242a={_0x50cc70:0x4e1,_0x1f250b:0x4e1,_0x1de803:0x2c7},_0x412a54={_0x329d41:0x9c},_0x4e8d1f={_0x5816ff:0x9c,_0x67e5fa:0x5a},_0x31380e={_0x10ac33:0x4a,_0x4dd8e1:0xec};function _0xb29f9e(_0x142793,_0x5f253b,_0x567ab6,_0x27f410){return _0x3061cd(_0x142793-0xac,_0x142793-_0x31380e._0x10ac33,_0x567ab6-_0x31380e._0x4dd8e1,_0x567ab6);}function _0x56577f(_0xf1fa07,_0x1f6674,_0x28d95a,_0x286b43){return _0x383f4b(_0x1f6674- -0x41c,_0x1f6674-0xb6,_0xf1fa07,_0x286b43-0x67);}let _0x44ef2d=0x0;return{..._0x5204c0,'content':_0x5204c0[_0x56577f(-_0x56ebed._0x8de871,-0xac,-_0x56ebed._0x1f5614,-0x99)][_0xb29f9e(_0x56ebed._0xf2e138,_0x56ebed._0x13a71b,_0x56ebed._0x319ca6,_0x56ebed._0x1e9bdf)](_0x23a918=>{if(_0x23a918[_0x49bb87(0x4d4,_0x24242a._0x50cc70,0x4af,_0x24242a._0x1f250b)]!==_0x3919(0x2f1,_0x24242a._0x1de803,0x2e6,0x336))return _0x23a918;function _0x49bb87(_0x16b1a1,_0x1f7c4c,_0xedd1a6,_0x5b6889){return _0xb29f9e(_0x5b6889-0x5d,_0x1f7c4c-_0x4e8d1f._0x5816ff,_0x16b1a1,_0x5b6889-_0x4e8d1f._0x67e5fa);}const _0x1f4f94=_0x136a6e[_0x44ef2d];function _0x3919(_0x36a9c7,_0x3b9629,_0x60b920,_0x45cedb){return _0x56577f(_0x60b920,_0x36a9c7-0x3e1,_0x60b920-_0x412a54._0x329d41,_0x45cedb-0x2b);}return _0x44ef2d+=0x1,structuredClone(_0x1f4f94);})};}function createAssistantMessageId(_0x27746e,_0x2795a3){const _0x17a0e7={_0x761011:0x47e,_0xf50354:0x43c},_0x275aa7={_0x5c2b90:0x2e};function _0x33469d(_0x231925,_0x5839d0,_0x197f55,_0x22359c){return _0x3061cd(_0x231925-0x1f,_0x5839d0-_0x275aa7._0x5c2b90,_0x197f55-0x193,_0x22359c);}return _0x27746e+_0x33469d(_0x17a0e7._0x761011,0x44e,0x49b,_0x17a0e7._0xf50354)+_0x2795a3;}function createReasoningMessageId(_0xe17f27){const _0x1137db={_0x5b5775:0x1c4};function _0x372aad(_0x2a3676,_0xc5e7d2,_0x3bc961,_0x53136c){return _0x383f4b(_0xc5e7d2- -0x15a,_0xc5e7d2-0x1a9,_0x3bc961,_0x53136c-0x147);}return _0xe17f27+_0x372aad(_0x1137db._0x5b5775,0x1a6,0x157,0x1a9);}function withMessageId(_0x416657,_0x3af623){if(_0x416657['id']===_0x3af623)return _0x416657;return{..._0x416657,'id':_0x3af623};}function _0x49c0(_0x514749,_0x28c67d){_0x514749=_0x514749-0x73;const _0x35d57b=_0x35d5();let _0x49c0d9=_0x35d57b[_0x514749];if(_0x49c0['NODvQN']===undefined){var _0x11bbd0=function(_0x4e9088){const _0x10e83='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xa6db0c='',_0x245e91='';for(let _0x59470d=0x0,_0x95447f,_0x64835f,_0x57fbfb=0x0;_0x64835f=_0x4e9088['charAt'](_0x57fbfb++);~_0x64835f&&(_0x95447f=_0x59470d%0x4?_0x95447f*0x40+_0x64835f:_0x64835f,_0x59470d++%0x4)?_0xa6db0c+=String['fromCharCode'](0xff&_0x95447f>>(-0x2*_0x59470d&0x6)):0x0){_0x64835f=_0x10e83['indexOf'](_0x64835f);}for(let _0x348c06=0x0,_0x16cd3e=_0xa6db0c['length'];_0x348c06<_0x16cd3e;_0x348c06++){_0x245e91+='%'+('00'+_0xa6db0c['charCodeAt'](_0x348c06)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x245e91);};_0x49c0['HmlzUB']=_0x11bbd0,_0x49c0['nrrLkz']={},_0x49c0['NODvQN']=!![];}const _0x5ae514=_0x35d57b[0x0],_0x3ea798=_0x514749+_0x5ae514,_0x4f79c6=_0x49c0['nrrLkz'][_0x3ea798];return!_0x4f79c6?(_0x49c0d9=_0x49c0['HmlzUB'](_0x49c0d9),_0x49c0['nrrLkz'][_0x3ea798]=_0x49c0d9):_0x49c0d9=_0x4f79c6,_0x49c0d9;}function createAssistantChunkEvent(_0x2318bc,_0x1e31e4){const _0x23b0cc={_0xa4be7c:0x136,_0x327817:0xf8,_0x4d6bd7:0xd2,_0x1a1643:0x10f,_0x340773:0xbc,_0xcf08de:0x10c,_0x51aed9:0x4,_0x375fb5:0x7c,_0x3be080:0x25,_0x253967:0x1a,_0x4c71e5:0x69,_0x5c6f15:0x13c,_0x12765a:0x104,_0x508623:0x128,_0x5322f8:0x60,_0x42e7bd:0x3a,_0x557a60:0xb},_0x48ba67={_0x20413e:0x532,_0x2925e0:0x1e3},_0x20c04e={_0x5199f2:0x365,_0x5e18c7:0xc9,_0xa92748:0x1cf};function _0x390743(_0x30ee52,_0xfa5879,_0x1ed09e,_0x4f176c){return _0x383f4b(_0x30ee52- -_0x20c04e._0x5199f2,_0xfa5879-_0x20c04e._0x5e18c7,_0x4f176c,_0x4f176c-_0x20c04e._0xa92748);}if(_0x2318bc[_0x5fc2f5(-_0x23b0cc._0xa4be7c,-0x142,-_0x23b0cc._0x327817,-_0x23b0cc._0x4d6bd7)]!==_0x5fc2f5(-_0x23b0cc._0x1a1643,-_0x23b0cc._0x340773,-_0x23b0cc._0xcf08de,-0x156))return void 0x0;function _0x5fc2f5(_0x495881,_0xb5f586,_0x53b561,_0x28ead5){return _0x3061cd(_0x495881-0x8,_0x53b561- -_0x48ba67._0x20413e,_0x53b561-_0x48ba67._0x2925e0,_0xb5f586);}if(_0x2318bc['text']===void 0x0)return void 0x0;return{'type':_0x390743(0x2d,_0x23b0cc._0x51aed9,0x40,_0x23b0cc._0x375fb5),'index':_0x2318bc['index']??0x0,'messageId':_0x1e31e4,'chunk':{'type':_0x390743(_0x23b0cc._0x3be080,-0x2a,-_0x23b0cc._0x253967,_0x23b0cc._0x4c71e5),'index':_0x2318bc[_0x5fc2f5(-_0x23b0cc._0x5c6f15,-_0x23b0cc._0x12765a,-_0x23b0cc._0x508623,-0x118)]??0x0,'text':_0x2318bc[_0x390743(-_0x23b0cc._0x5322f8,-_0x23b0cc._0x42e7bd,-_0x23b0cc._0x557a60,-0x92)]}};}function createToolUseChunkEvent(_0x3ac2a7,_0x5c2ccb){const _0xf48339={_0x1c031e:0x16f,_0x1b9269:0x11e,_0xf87ae9:0x192,_0x2974bf:0x138,_0x515e3b:0x19f,_0x2364cf:0x1d6,_0x5d7703:0x1ef,_0x5d4e54:0x101,_0x4bed6f:0x1cc,_0x2abb09:0x18b,_0x58f053:0x174,_0x375822:0x12e,_0x5b7220:0xed,_0x5f4be1:0x163},_0x5a5e2e={_0x10aac8:0x24,_0x42fb82:0x50b,_0x1b8e0b:0x15c},_0x2dac21={_0x3394fc:0x41};function _0x1ef3e2(_0x1a197f,_0x269b87,_0x15932b,_0x104aaa){return _0x383f4b(_0x1a197f- -0x50d,_0x269b87-0x97,_0x269b87,_0x104aaa-_0x2dac21._0x3394fc);}if(_0x3ac2a7[_0x1ef3e2(-_0xf48339._0x1c031e,-_0xf48339._0x1b9269,-0x15d,-_0xf48339._0xf87ae9)]!==_0x7d7f85(-0x126,-0x12d,-_0xf48339._0x2974bf,-0xe3))return void 0x0;function _0x7d7f85(_0x7d805d,_0x1eb991,_0x2ba8c8,_0xa55d35){return _0x3061cd(_0x7d805d-_0x5a5e2e._0x10aac8,_0xa55d35- -_0x5a5e2e._0x42fb82,_0x2ba8c8-_0x5a5e2e._0x1b8e0b,_0x1eb991);}return{'type':'tool_use_chunk','index':_0x3ac2a7[_0x1ef3e2(-_0xf48339._0x515e3b,-0x1ce,-_0xf48339._0x2364cf,-_0xf48339._0x5d7703)]??0x0,'messageId':_0x5c2ccb,'chunk':{'type':_0x7d7f85(-0xfa,-0x9e,-0xbd,-0xe3),'id':_0x3ac2a7['id']??'','index':_0x3ac2a7[_0x7d7f85(-0xe7,-0x158,-0x14d,-_0xf48339._0x5d4e54)]??0x0,..._0x3ac2a7[_0x1ef3e2(-_0xf48339._0x4bed6f,-0x1ba,-_0xf48339._0x2abb09,-0x1e0)]!==void 0x0?{'name':_0x3ac2a7[_0x7d7f85(-0x170,-0x11a,-_0xf48339._0x58f053,-_0xf48339._0x375822)]}:{},..._0x3ac2a7[_0x7d7f85(-0x13c,-0xcd,-0xb1,-_0xf48339._0x5b7220)]!==void 0x0?{'inputDelta':_0x3ac2a7[_0x1ef3e2(-0x18b,-0x1b3,-0x175,-_0xf48339._0x5f4be1)]}:{}}};}function createReasoningChunkEvent(_0x5872d4,_0x5a7743){const _0x521d1f={_0x73527f:0x139,_0x13c8d1:0x14b,_0x50bd3f:0x8e,_0x6ca9e6:0xbb,_0x2fde9f:0x170,_0x443039:0xea,_0xfe826b:0xe4,_0x406d99:0x49,_0x3d981f:0x112,_0x4aecbb:0xe8,_0xcde7a2:0xe0,_0x3a047a:0x15c,_0x853778:0x83,_0x26febb:0x31,_0x7a3f0d:0x71,_0x28364d:0xc7,_0x306ca2:0x99,_0x4c821f:0x93,_0x1e8908:0x51,_0x979f6c:0x51,_0x7635e0:0x5e,_0x3ea78b:0x1ae,_0x1b967b:0x34,_0x499074:0x65,_0xdf62de:0x5a,_0x3302c1:0xcb,_0x295db9:0x53,_0x437aa2:0x28,_0x35a4c7:0x55,_0x33c20f:0xb7},_0x22bea0={_0x4cbb77:0x150};function _0x495f95(_0x50872c,_0x1940db,_0x2c9aab,_0x30aaf1){return _0x3061cd(_0x50872c-0x163,_0x1940db- -0x2d7,_0x2c9aab-_0x22bea0._0x4cbb77,_0x30aaf1);}function _0x218f12(_0x2486a7,_0x566297,_0x590525,_0x5eed78){return _0x3061cd(_0x2486a7-0x1d,_0x566297- -0x430,_0x590525-0x81,_0x2486a7);}switch(_0x5872d4['type']){case _0x495f95(_0x521d1f._0x73527f,0x15b,_0x521d1f._0x13c8d1,0x19a):return{'type':_0x218f12(-_0x521d1f._0x50bd3f,-0x92,-_0x521d1f._0x6ca9e6,-0x45),'index':_0x5872d4[_0x495f95(_0x521d1f._0x2fde9f,0x133,_0x521d1f._0x443039,_0x521d1f._0xfe826b)],'messageId':_0x5a7743,'chunk':{'type':_0x218f12(0x57,0x2,-_0x521d1f._0x406d99,-0x21),'index':_0x5872d4['index']??0x0,'thinking':_0x5872d4[_0x495f95(0xeb,_0x521d1f._0x3d981f,_0x521d1f._0x4aecbb,_0x521d1f._0xcde7a2)]??''},'text':_0x5872d4[_0x495f95(0xc9,0x112,0x139,_0x521d1f._0x3a047a)]??''};case _0x218f12(-0x3a,-_0x521d1f._0x853778,-_0x521d1f._0x26febb,-_0x521d1f._0x7a3f0d):return{'type':_0x495f95(0x103,_0x521d1f._0x28364d,_0x521d1f._0x306ca2,0xd8),'index':_0x5872d4[_0x218f12(-0xaa,-_0x521d1f._0x4c821f,-0x89,-0x7a)],'messageId':_0x5a7743,'chunk':{'type':'openai_reasoning_delta','contentIndex':_0x5872d4[_0x218f12(-0xd2,-0x93,-_0x521d1f._0x1e8908,-0xb4)]??0x0,'delta':_0x5872d4['delta']??'','itemId':_0x5872d4[_0x218f12(-0x5d,-_0x521d1f._0x979f6c,-_0x521d1f._0x7635e0,-0x76)]??'','outputIndex':_0x5872d4[_0x495f95(0x135,0x15f,_0x521d1f._0x3ea78b,0x1a8)]??0x0},'text':_0x5872d4['delta']??''};case _0x218f12(-0x41,-0x62,-_0x521d1f._0x1b967b,-0x21):return{'type':'reasoning_chunk','index':_0x5872d4[_0x218f12(-_0x521d1f._0x26febb,-_0x521d1f._0x499074,-0x56,-_0x521d1f._0xdf62de)],'messageId':_0x5a7743,'chunk':{'type':'openai_reasoning_summary_delta','delta':_0x5872d4[_0x495f95(0xf6,0x109,0x130,_0x521d1f._0x3302c1)]??'','itemId':_0x5872d4['itemId']??'','outputIndex':_0x5872d4[_0x218f12(-_0x521d1f._0x295db9,0x6,-_0x521d1f._0x437aa2,_0x521d1f._0x35a4c7)]??0x0,'summaryIndex':_0x5872d4[_0x495f95(_0x521d1f._0x33c20f,0xf4,0xc8,_0x521d1f._0x28364d)]??0x0},'text':_0x5872d4['delta']??''};default:return void 0x0;}}function isAbortedToolResult(_0x57ad4c){const _0x29786f={_0x1ff40a:0x82,_0x1d96b3:0x7c,_0x123aad:0x5a},_0x4cf46a={_0xc75592:0x13a,_0x32c046:0xdd},_0x49bbd3={_0x28d903:0x3e0,_0xec08ad:0x19b};function _0x126f40(_0x33c0ad,_0x5e20bc,_0x4da66b,_0x12fd22){return _0x383f4b(_0x12fd22- -_0x49bbd3._0x28d903,_0x5e20bc-0xe0,_0x4da66b,_0x12fd22-_0x49bbd3._0xec08ad);}function _0xb52ad7(_0x3b4396,_0x8b1f4c,_0x516c22,_0x69cd1f){return _0x383f4b(_0x3b4396- -0x50a,_0x8b1f4c-_0x4cf46a._0xc75592,_0x8b1f4c,_0x69cd1f-_0x4cf46a._0x32c046);}return _0x57ad4c['status']==='error'&&_0x57ad4c[_0x126f40(-0x2c,-0xd7,-0x9b,-_0x29786f._0x1ff40a)][_0x126f40(-0xac,-_0x29786f._0x1d96b3,-_0x29786f._0x123aad,-0xb0)]===!![];}async function executeModelRequest(_0x570f04,_0x1728d8,_0x4ddb08,_0x10762b,_0x43c4e6){const _0x46e778={_0x5aba33:0x9,_0x378ea9:0x10,_0x173b42:0x35,_0x2e92f6:0x30,_0xda36f2:0x149,_0x3a82fb:0x1b2,_0x1d7832:0x1d9,_0xba4648:0x42,_0x3d30ce:0x5,_0x378513:0x0,_0x41c3c2:0x6,_0x179353:0x1db,_0x3570ba:0x194,_0x1f7e4c:0x4,_0x15562c:0x2b,_0x3d49dd:0x11e,_0x4b9317:0x15f,_0x3a97e3:0x12,_0x211337:0x128,_0x5afb2b:0x196,_0x3b5d52:0x152,_0x1da961:0x1a2,_0x2203be:0x1a1,_0x4befa1:0x195,_0x3c018b:0x15e,_0x1bd0ca:0x124,_0x530897:0x13f,_0x14117f:0x20,_0x156b64:0x1a1,_0x32a42d:0x1b3,_0x1caa06:0x90,_0x4e2c87:0x124,_0x26e9a8:0x142,_0x497152:0x35,_0x520274:0x160,_0x2d8ed2:0x1c5,_0x1e93be:0x98,_0x33530b:0x2f,_0x27b9fe:0x15c,_0x5213e6:0x194,_0x108ebe:0x1e9,_0x2430eb:0x19e,_0x410af4:0x1c1,_0x226161:0x1bd,_0x3f93e1:0x16c,_0x1945c6:0x13a,_0x35d8f8:0x36,_0xa4e44f:0x1f,_0x19ef33:0x6d,_0x2dd560:0x5a,_0xfcbdd:0x38,_0x25a669:0x40,_0x1fd38f:0xc,_0x491bbc:0x62,_0x318d8a:0x92,_0x252b49:0x73,_0x145a50:0x87,_0x3500ae:0x26,_0x3865b7:0xd,_0x2c7051:0xf},_0x4cba8f={_0x2d7eee:0x349,_0x520944:0x135};function _0x1c4bdc(_0x22bd67,_0x173855,_0x5eb907,_0x11bd21){return _0x383f4b(_0x22bd67- -_0x4cba8f._0x2d7eee,_0x173855-_0x4cba8f._0x520944,_0x5eb907,_0x11bd21-0x103);}throwIfAborted(_0x1728d8['signal']);if(!_0x1728d8[_0x1c4bdc(0x3d,-_0x46e778._0x5aba33,0x28,-_0x46e778._0x378ea9)]||!_0x4ddb08[_0x1c4bdc(-_0x46e778._0x173b42,-0x8e,-_0x46e778._0x2e92f6,0x8)]['stream'])return await _0x4ddb08[_0x393b1f(-_0x46e778._0xda36f2,-_0x46e778._0x3a82fb,-_0x46e778._0x1d7832,-0x194)][_0x1c4bdc(_0x46e778._0xba4648,0x91,_0x46e778._0x3d30ce,0x13)](_0x570f04,{'signal':_0x1728d8[_0x1c4bdc(_0x46e778._0x378513,0x0,0x3f,-_0x46e778._0x41c3c2)]});function _0x393b1f(_0x2ab58b,_0x4c35d7,_0x397384,_0x31aff4){return _0x383f4b(_0x31aff4- -0x4a8,_0x4c35d7-0xff,_0x4c35d7,_0x31aff4-0xf2);}let _0x8498d8;for await(const _0x14d68b of _0x4ddb08[_0x393b1f(-_0x46e778._0x179353,-0x1bb,-0x18c,-_0x46e778._0x3570ba)][_0x1c4bdc(0x14,0x22,_0x46e778._0x1f7e4c,_0x46e778._0x15562c)](_0x570f04,{'signal':_0x1728d8[_0x393b1f(-_0x46e778._0x3d49dd,-0x112,-0x12e,-_0x46e778._0x4b9317)]})){throwIfAborted(_0x1728d8[_0x1c4bdc(0x0,0x2b,0x53,0xf)]);if(_0x14d68b[_0x1c4bdc(0x55,_0x46e778._0x3a97e3,0x9c,0x7f)]==='done'){_0x43c4e6[_0x393b1f(-_0x46e778._0x211337,-_0x46e778._0x5afb2b,-_0x46e778._0x3b5d52,-0x13f)][_0x393b1f(-0x18f,-_0x46e778._0x1da961,-_0x46e778._0x2203be,-_0x46e778._0x4befa1)]!==void 0x0&&_0x43c4e6[_0x393b1f(-_0x46e778._0x3c018b,-_0x46e778._0x1bd0ca,-0x128,-_0x46e778._0x530897)]['reasoningCompletedAt']===void 0x0&&(_0x43c4e6[_0x1c4bdc(_0x46e778._0x14117f,0x25,0x22,0x6)][_0x393b1f(-0x19e,-_0x46e778._0x156b64,-_0x46e778._0x1d7832,-_0x46e778._0x32a42d)]=Date[_0x1c4bdc(-0x3f,-0x33,-0x60,-_0x46e778._0x1caa06)]());_0x8498d8=_0x14d68b[_0x393b1f(-0x145,-_0x46e778._0x4e2c87,-0x114,-_0x46e778._0x26e9a8)];continue;}if(_0x14d68b[_0x1c4bdc(0x55,0x90,0x3e,0x1f)]===_0x1c4bdc(0x26,-0xa,_0x46e778._0x497152,-_0x46e778._0x15562c)){await emitEvent2(_0x4ddb08['onEvent'],_0x14d68b,_0x10762b);continue;}const _0x154824=createReasoningChunkEvent(_0x14d68b,_0x43c4e6[_0x393b1f(-_0x46e778._0x520274,-0x18d,-_0x46e778._0x2d8ed2,-0x1a4)]);if(_0x154824&&_0x154824['type']==='reasoning_chunk'&&_0x154824[_0x1c4bdc(-0x44,-_0x46e778._0x1e93be,-0x74,-0x27)]['length']>0x0){_0x43c4e6[_0x1c4bdc(0x20,0x55,_0x46e778._0x33530b,0x1a)][_0x393b1f(-_0x46e778._0x27b9fe,-0x172,-0x1a1,-0x195)]===void 0x0&&(_0x43c4e6['meta'][_0x393b1f(-0x1a3,-0x13c,-0x1c2,-_0x46e778._0x4befa1)]=Date[_0x393b1f(-_0x46e778._0x5213e6,-_0x46e778._0x108ebe,-0x1db,-_0x46e778._0x2430eb)]());await emitEvent2(_0x4ddb08['onEvent'],_0x154824,_0x10762b);continue;}const _0xe65ba4=createAssistantChunkEvent(_0x14d68b,_0x43c4e6[_0x393b1f(-_0x46e778._0x410af4,-0x15d,-_0x46e778._0x226161,-_0x46e778._0x3f93e1)]);if(_0xe65ba4){_0x43c4e6[_0x393b1f(-_0x46e778._0x1945c6,-0x16e,-0x101,-_0x46e778._0x530897)][_0x1c4bdc(-_0x46e778._0x35d8f8,_0x46e778._0xa4e44f,-_0x46e778._0x19ef33,-_0x46e778._0x2dd560)]!==void 0x0&&_0x43c4e6[_0x1c4bdc(_0x46e778._0x14117f,-_0x46e778._0xfcbdd,_0x46e778._0x25a669,0x6d)][_0x1c4bdc(-0x54,-_0x46e778._0x1fd38f,-0x5e,-0x2a)]===void 0x0&&(_0x43c4e6[_0x1c4bdc(0x20,0x3d,0x50,_0x46e778._0x491bbc)][_0x1c4bdc(-0x54,-_0x46e778._0x318d8a,-_0x46e778._0x252b49,-_0x46e778._0x145a50)]=Date[_0x1c4bdc(-0x3f,-_0x46e778._0x3500ae,-0x48,-0x4e)]());await emitEvent2(_0x4ddb08[_0x1c4bdc(-0xb,0x3a,-0x26,-0x36)],_0xe65ba4,_0x10762b);continue;}const _0x48f228=createToolUseChunkEvent(_0x14d68b,_0x43c4e6[_0x1c4bdc(-_0x46e778._0x3865b7,_0x46e778._0x2c7051,-0x4c,-0x1e)]);_0x48f228&&await emitEvent2(_0x4ddb08['onEvent'],_0x48f228,_0x10762b);}if(!_0x8498d8)throw new Error('Model\x20stream\x20ended\x20without\x20a\x20final\x20response');return _0x8498d8;}function makeTurnGuards(_0x1abb68,_0x4d227a,_0x2adb70,_0x4f2a96,_0x1000b4){return{async 'stage'(_0x42a910,_0xd8ca89){return throwIfAborted(_0x1abb68),await runStage(_0x4d227a,_0x42a910,_0xd8ca89,_0x4f2a96);},async 'emit'(_0x7e2b34){throwIfAborted(_0x1abb68),await emitEvent2(_0x2adb70,_0x7e2b34,_0x1000b4);},async 'stageUnchecked'(_0x544302,_0x386cf0){return await runStage(_0x4d227a,_0x544302,_0x386cf0,_0x4f2a96);},async 'emitUnchecked'(_0x3ae494){await emitEvent2(_0x2adb70,_0x3ae494,_0x1000b4);}};}async function runTurn(_0x3c9f8c,_0x6eed6d){const _0x3b4339={_0x28c776:0x34d,_0x491272:0x317,_0xcd45e9:0x37b,_0x5b73f4:0x362,_0x395e8b:0x312,_0x418b32:0x32b,_0x1bebf0:0x334,_0xf92e29:0x35a,_0x4105f3:0x318,_0x42b699:0x335,_0x1dd3e8:0x3b7,_0x1efd11:0x3da,_0x5dba6b:0x425,_0x4bd5c7:0x3d4,_0x5b42ab:0x445,_0x566ab1:0x41f,_0x589d19:0x41b,_0x58eae8:0x3c8,_0x3a8a1a:0x396,_0x3b2be5:0x323,_0x32756b:0x3b3,_0x1962dd:0x376,_0x1c3e31:0x380,_0xd29287:0x2ae,_0x2e3c0f:0x318,_0x1e2a38:0x2f9,_0x4958a1:0x2be,_0x2d8930:0x358,_0x24b667:0x3bd,_0xa4ae97:0x39e,_0x102c89:0x375,_0x3f6989:0x349,_0x97fd9c:0x364,_0x281aa8:0x443,_0x3dd4bc:0x3f1,_0x2c11b6:0x408,_0x180d98:0x2f6,_0x3a764c:0x353,_0x111e22:0x350,_0x3cf751:0x33e,_0x145bc0:0x30c,_0x1619ed:0x31f,_0xb7e16b:0x430,_0x4eef61:0x402,_0x3c1f27:0x2c5,_0x479756:0x352,_0x3c4585:0x345,_0x1fd53c:0x404,_0x45651:0x33d,_0x4dcf8e:0x44a,_0x242d79:0x3f7,_0x58d754:0x29b,_0x92b1bb:0x31d,_0x383b47:0x2f7,_0x3e8cd8:0x371,_0x4d6913:0x343,_0x38347e:0x377,_0x3ecbdb:0x394,_0x25aeda:0x386,_0x455bd9:0x304,_0x21c125:0x348,_0x13f889:0x2ef,_0x15c18d:0x3fd,_0x191da7:0x3a5,_0x129f0f:0x3cb,_0x59ab47:0x3a0,_0x42e4ba:0x36b,_0x170ec5:0x34c,_0x1b73cd:0x37d,_0x4cfaa4:0x39a,_0x65ef65:0x3e6,_0x5b82e7:0x2b4,_0xedac3f:0x333,_0x538ae9:0x328,_0x3e1e3f:0x2b7,_0x41b37b:0x280,_0x38707:0x346,_0x1accef:0x2dd,_0x197e59:0x2d3,_0x1947cf:0x443,_0x251791:0x43b,_0x375bb1:0x422,_0x3ae5bb:0x3d2,_0x288f20:0x3f4,_0x3785e2:0x404,_0x459dde:0x3b1,_0x4b025b:0x32d,_0x5b3aa4:0x332,_0xdc5ab6:0x32a,_0x3d1a4d:0x355,_0x6f4ee3:0x34c,_0x599cdf:0x3ff,_0x51443d:0x442,_0x4bea28:0x3d6,_0x1e4973:0x411,_0xd806bb:0x3c2,_0x17a9de:0x3b9,_0x223ebb:0x3eb,_0x58627d:0x2f1,_0x3b555f:0x3aa,_0x348238:0x3ac,_0x5e3adc:0x382,_0x4b4bbd:0x35d,_0x5742e7:0x3be,_0x2a8297:0x41a,_0x4f7f8a:0x45d,_0x47ce10:0x3a4,_0x33bd89:0x370,_0x20c7dc:0x407,_0x59b9be:0x447,_0x3ef7bf:0x43d,_0x8df6d7:0x39d,_0x4303c5:0x347,_0x16827c:0x30b,_0x199baf:0x360,_0x3fb2a7:0x3b4,_0xe503a0:0x399,_0x8d0a2f:0x3fe,_0x340598:0x387,_0x43321e:0x3ae,_0x2287e2:0x3ba},_0x510c99={_0x3aba60:0x251,_0x554c24:0x29f,_0x488ae8:0x126,_0x2a5511:0x188,_0x4fa008:0x2b1},_0x47952b={_0x482377:0x12,_0x59bf77:0x95,_0x200280:0x1e7},_0x11c45={_0x307389:0x1b,_0x46a319:0x190,_0xd3be7a:0x1b6},_0x1b0a1a={_0x79e3c9:0x12},_0x50ae7f=_0x3c9f8c[_0x1b4019(_0x3b4339._0x28c776,_0x3b4339._0x491272,_0x3b4339._0xcd45e9,0x32e)]??new AbortController()[_0x1b4019(_0x3b4339._0x5b73f4,_0x3b4339._0x395e8b,_0x3b4339._0x418b32,0x32e)];function _0x13c67f(_0x2ed31b,_0x3e8cf4,_0x584c22,_0x1bb358){return _0x3061cd(_0x2ed31b-0x164,_0x1bb358- -_0x1b0a1a._0x79e3c9,_0x584c22-0x121,_0x3e8cf4);}const _0xeb683e={'sessionId':_0x3c9f8c['sessionId'],'turnId':_0x3c9f8c[_0x1b4019(0x2fa,0x35c,0x34f,0x34a)],'system':normalizeSystem(_0x3c9f8c['system']),'messages':(_0x3c9f8c[_0x1b4019(_0x3b4339._0x1bebf0,0x36a,0x387,_0x3b4339._0xf92e29)]??[])['map'](normalizeMessage),'lastResponse':void 0x0,'toolResults':[],'finalMessage':void 0x0,'sessionDir':typeof _0x6eed6d[_0x1b4019(_0x3b4339._0x4105f3,0x2e7,0x33f,_0x3b4339._0x42b699)]===_0x13c67f(_0x3b4339._0x1dd3e8,0x43c,0x421,0x3ed)?_0x6eed6d['sessionDir']():_0x6eed6d[_0x13c67f(0x3b2,0x416,0x3d8,_0x3b4339._0x1efd11)]},_0x5aa937=makeExtensionContext(_0xeb683e),_0x378dbf={'sessionId':_0xeb683e[_0x13c67f(_0x3b4339._0x5dba6b,_0x3b4339._0x4bd5c7,0x3cc,0x41a)],'turnId':_0xeb683e['turnId'],'state':_0xeb683e,'signal':_0x50ae7f,..._0x6eed6d[_0x13c67f(0x467,_0x3b4339._0x5b42ab,0x438,_0x3b4339._0x566ab1)]?{'askUser':_0x6eed6d[_0x13c67f(_0x3b4339._0x589d19,0x418,0x472,0x41f)]}:{},..._0x6eed6d[_0x13c67f(_0x3b4339._0x58eae8,_0x3b4339._0x5b73f4,0x3cd,0x39a)]?{'setTopic':_0x6eed6d['setTopic']}:{}},{stage:_0x67884,emit:_0x113c40,stageUnchecked:_0x2f286e,emitUnchecked:_0x2d1bff}=makeTurnGuards(_0x50ae7f,_0x6eed6d[_0x1b4019(0x384,0x3a3,_0x3b4339._0x3a8a1a,0x372)],_0x6eed6d[_0x1b4019(0x331,0x365,0x2e9,_0x3b4339._0x3b2be5)],_0x5aa937,_0x378dbf);function _0x1b4019(_0x4bd7e8,_0x14a92f,_0x2ff8e8,_0xe91d80){return _0x383f4b(_0xe91d80- -_0x11c45._0x307389,_0x14a92f-_0x11c45._0x46a319,_0x14a92f,_0xe91d80-_0x11c45._0xd3be7a);}const _0x210257=async(_0x3a4063,_0x3adc75)=>{const _0x1ecf3d={_0x110e6f:0xe1};function _0x57db58(_0x26d111,_0x20c3e5,_0x12a8d1,_0x14236e){return _0x1b4019(_0x26d111-_0x47952b._0x482377,_0x20c3e5,_0x12a8d1-_0x47952b._0x59bf77,_0x26d111- -_0x47952b._0x200280);}function _0x35050f(_0x4c8682,_0x380679,_0x5cbd38,_0x2274c7){return _0x1b4019(_0x4c8682-0x1f1,_0x380679,_0x5cbd38-_0x1ecf3d._0x110e6f,_0x2274c7- -0x611);}const _0x7c149c=_0x3adc75?{..._0x5aa937,'turnMeta':_0x3adc75}:_0x5aa937;await _0x6eed6d[_0x35050f(-0x280,-_0x510c99._0x3aba60,-0x249,-_0x510c99._0x554c24)][_0x57db58(0x15f,_0x510c99._0x488ae8,0x107,_0x510c99._0x2a5511)](_0x35050f(-0x2c7,-0x2bc,-0x2c0,-_0x510c99._0x4fa008),structuredClone(_0x3a4063),_0x7c149c);};let _0x29399b=0x0;try{const _0x102e4b=await _0x67884('onUserMessage',normalizeMessage(_0x3c9f8c['message']));_0xeb683e[_0x1b4019(_0x3b4339._0x32756b,_0x3b4339._0x1962dd,_0x3b4339._0x1c3e31,0x35a)]['push'](_0x102e4b),await _0x210257(_0x102e4b),await _0x113c40({'type':'user_message','message':_0x102e4b});while(!![]){throwIfAborted(_0x50ae7f),_0x29399b+=0x1;const _0x37113c=createAssistantMessageId(_0xeb683e[_0x13c67f(0x402,0x3f4,0x3a5,0x3ef)],_0x29399b),_0x49574c=createReasoningMessageId(_0x37113c),_0x46a505={'model':_0x6eed6d['chatModel']['model'],..._0x6eed6d[_0x1b4019(0x322,_0x3b4339._0xd29287,_0x3b4339._0x2e3c0f,_0x3b4339._0x1e2a38)]['provider']?{'provider':_0x6eed6d['chatModel'][_0x1b4019(0x2a2,_0x3b4339._0x4958a1,0x310,0x2ed)]}:{}};let _0x1b4012={'model':_0x6eed6d[_0x13c67f(_0x3b4339._0x2d8930,0x3d6,_0x3b4339._0x24b667,_0x3b4339._0xa4ae97)][_0x1b4019(_0x3b4339._0x102c89,0x3a1,_0x3b4339._0x3f6989,0x366)],..._0x6eed6d[_0x13c67f(0x383,0x398,_0x3b4339._0x97fd9c,_0x3b4339._0xa4ae97)][_0x13c67f(_0x3b4339._0x281aa8,0x412,_0x3b4339._0x3dd4bc,_0x3b4339._0x2c11b6)]!==void 0x0?{'maxTokens':_0x6eed6d[_0x1b4019(_0x3b4339._0x180d98,0x2ba,0x2d5,0x2f9)][_0x1b4019(_0x3b4339._0x3a764c,0x37c,_0x3b4339._0x111e22,0x363)]}:{},'system':structuredClone(_0xeb683e[_0x1b4019(0x2fb,_0x3b4339._0x3cf751,_0x3b4339._0x145bc0,_0x3b4339._0x1619ed)]),'messages':structuredClone(_0xeb683e['messages']),'tools':_0x6eed6d[_0x13c67f(_0x3b4339._0xb7e16b,0x3ba,0x3bd,_0x3b4339._0x4eef61)][_0x1b4019(_0x3b4339._0x3c1f27,_0x3b4339._0x479756,_0x3b4339._0x3c4585,0x308)](),'metadata':{'sessionId':_0xeb683e[_0x13c67f(_0x3b4339._0x1fd53c,0x42e,0x3f0,0x41a)],'turnId':_0xeb683e[_0x1b4019(_0x3b4339._0x45651,0x352,0x309,0x34a)]},..._0x6eed6d['outputFormat']?{'outputFormat':_0x6eed6d[_0x13c67f(0x405,0x42c,_0x3b4339._0x4dcf8e,_0x3b4339._0x242d79)]}:{}};_0x1b4012=await _0x67884('beforeModelRequest',_0x1b4012),await _0x113c40({'type':'model_request','request':_0x1b4012}),_0x46a505[_0x1b4019(_0x3b4339._0x58d754,_0x3b4339._0x92b1bb,_0x3b4339._0x383b47,0x2db)]=Date[_0x13c67f(_0x3b4339._0x3e8cd8,_0x3b4339._0x4d6913,_0x3b4339._0x38347e,_0x3b4339._0x3ecbdb)]();let _0x31d83b=await executeModelRequest(_0x1b4012,_0x3c9f8c,_0x6eed6d,_0x378dbf,{'assistantMessageId':_0x37113c,'reasoningMessageId':_0x49574c,'meta':_0x46a505});_0x46a505[_0x1b4019(_0x3b4339._0x25aeda,_0x3b4339._0x455bd9,_0x3b4339._0x92b1bb,0x33d)]=Date[_0x1b4019(0x2d9,_0x3b4339._0x21c125,0x2df,_0x3b4339._0x13f889)](),_0x31d83b=await _0x67884(_0x13c67f(_0x3b4339._0x15c18d,0x3d7,0x3e3,_0x3b4339._0x191da7),_0x31d83b),await _0x113c40({'type':_0x13c67f(_0x3b4339._0x129f0f,_0x3b4339._0x59ab47,0x338,0x391),'response':_0x31d83b}),_0xeb683e['lastResponse']=_0x31d83b;let _0x445c9d=await _0x67884(_0x1b4019(0x39d,_0x3b4339._0x42e4ba,_0x3b4339._0x170ec5,_0x3b4339._0x1b73cd),withMessageId(responseToAssistantMessage(_0x31d83b),_0x37113c));_0x445c9d=withMessageId(_0x445c9d,_0x37113c);const _0x4de71c=getToolUseBlocks(_0x445c9d),_0x2bcc84=await Promise['all'](_0x4de71c[_0x13c67f(0x40d,_0x3b4339._0x4cfaa4,0x3f6,_0x3b4339._0x65ef65)](_0x115834=>_0x67884(_0x1b4019(0x2f8,0x304,0x2be,0x312),_0x115834)));_0x2bcc84[_0x1b4019(_0x3b4339._0x5b82e7,_0x3b4339._0xedac3f,_0x3b4339._0x538ae9,0x30c)]>0x0&&(_0x445c9d=replaceToolUseBlocks(_0x445c9d,_0x2bcc84));const _0x5d3e76=withMessageId(_0x445c9d,_0x37113c);_0x445c9d=_0x5d3e76;const _0x4f8e05=createReasoningMessage(_0x445c9d),_0x490b40=createAssistantTextMessage(_0x445c9d),_0x14f184=createToolUseMessage(_0x445c9d);_0x4f8e05&&await _0x113c40({'type':_0x1b4019(_0x3b4339._0x3e1e3f,_0x3b4339._0x41b37b,0x31b,0x2d5),'message':withMessageId(_0x4f8e05,_0x49574c)});_0x490b40&&await _0x113c40({'type':'assistant_message','message':withMessageId(_0x490b40,_0x37113c)});_0x14f184&&await _0x113c40({'type':_0x1b4019(_0x3b4339._0x38707,_0x3b4339._0x1accef,_0x3b4339._0x197e59,0x32a),'message':withMessageId(_0x14f184,_0x37113c)});_0xeb683e[_0x13c67f(_0x3b4339._0x1947cf,_0x3b4339._0x251791,0x3d2,0x3ff)][_0x13c67f(0x38c,_0x3b4339._0x375bb1,0x3fb,_0x3b4339._0x3ae5bb)](_0x5d3e76);_0x2bcc84[_0x13c67f(_0x3b4339._0x288f20,_0x3b4339._0x3785e2,0x373,_0x3b4339._0x459dde)]>0x0&&await _0x210257(_0x5d3e76,_0x46a505);for(const _0x416f14 of _0x2bcc84){await _0x113c40({'type':_0x1b4019(0x336,0x353,_0x3b4339._0x4b025b,0x378),'toolCall':_0x416f14});}if(_0x2bcc84[_0x1b4019(_0x3b4339._0x5b3aa4,_0x3b4339._0x418b32,0x362,0x30c)]===0x0){const _0x3e1f79=await _0x67884(_0x1b4019(_0x3b4339._0xdc5ab6,_0x3b4339._0x3d1a4d,0x394,_0x3b4339._0x6f4ee3),_0x445c9d),_0x7dde68=withMessageId(_0x3e1f79,_0x37113c);return _0xeb683e['finalMessage']=_0x7dde68,_0xeb683e[_0x13c67f(0x445,0x41e,0x405,_0x3b4339._0x599cdf)][_0xeb683e['messages']['length']-0x1]=_0x7dde68,await _0x210257(_0x7dde68,_0x46a505),await _0x113c40({'type':_0x13c67f(_0x3b4339._0x51443d,0x3c8,_0x3b4339._0x4bea28,_0x3b4339._0x1e4973),'message':_0x7dde68}),throwIfAborted(_0x50ae7f),await _0x6eed6d['registry'][_0x13c67f(_0x3b4339._0xd806bb,0x442,_0x3b4339._0x17a9de,_0x3b4339._0x223ebb)]('afterTurnComplete',_0xeb683e,_0x5aa937),await _0x113c40({'type':_0x1b4019(0x325,0x31e,0x2c8,_0x3b4339._0x58627d),'state':_0xeb683e}),{'status':_0x13c67f(0x38a,_0x3b4339._0x59ab47,_0x3b4339._0x3b555f,_0x3b4339._0x348238),'finalMessage':_0x7dde68,'state':_0xeb683e};}let _0x19978c=await _0x6eed6d[_0x1b4019(_0x3b4339._0x3cf751,0x330,_0x3b4339._0x5e3adc,_0x3b4339._0x4b4bbd)][_0x13c67f(_0x3b4339._0x5742e7,0x3ba,0x397,0x397)](_0x2bcc84,_0x378dbf);const _0x2e86ee=_0x19978c[_0x13c67f(_0x3b4339._0x2a8297,_0x3b4339._0x4f7f8a,0x41b,0x423)](isAbortedToolResult),_0x3237b8=_0x2e86ee?_0x2f286e:_0x67884,_0x1b805e=_0x2e86ee?_0x2d1bff:_0x113c40;_0x19978c=await Promise[_0x13c67f(0x39a,0x363,_0x3b4339._0x5742e7,_0x3b4339._0x47ce10)](_0x19978c[_0x1b4019(_0x3b4339._0x33bd89,0x357,_0x3b4339._0x1619ed,0x341)](_0x231173=>_0x3237b8(_0x13c67f(0x386,0x3a4,0x3dc,0x399),_0x231173))),_0xeb683e[_0x13c67f(_0x3b4339._0x20c7dc,_0x3b4339._0x59b9be,_0x3b4339._0x3ef7bf,0x429)]['push'](..._0x19978c);for(const _0x3b54f6 of _0x19978c){await _0x1b805e({'type':_0x1b4019(_0x3b4339._0x8df6d7,0x333,0x300,_0x3b4339._0x4303c5),'result':_0x3b54f6});}const _0x56464b=await _0x3237b8(_0x1b4019(0x34a,0x303,0x2dd,_0x3b4339._0x16827c),createToolResultUserMessage(_0x19978c));await _0x1b805e({'type':_0x13c67f(_0x3b4339._0x1efd11,_0x3b4339._0x199baf,0x3f6,_0x3b4339._0x3fb2a7),'message':_0x56464b}),_0xeb683e[_0x1b4019(_0x3b4339._0xe503a0,0x308,0x35a,0x35a)][_0x13c67f(_0x3b4339._0x8d0a2f,_0x3b4339._0x340598,_0x3b4339._0x242d79,0x3d2)](_0x56464b),await _0x210257(_0x56464b);if(_0x2e86ee)return{'status':'aborted','state':_0xeb683e};}}catch(_0x3be110){if(!_0x50ae7f[_0x13c67f(_0x3b4339._0x43321e,0x3ce,0x40e,_0x3b4339._0x2287e2)])throw new TurnFailedError(_0x3be110,_0xeb683e);return{'status':'aborted','state':_0xeb683e};}}function createSessionId(){const _0x4b07f8={_0x933e16:0x31,_0x237046:0x1c,_0x1d3ca3:0x15,_0x199808:0xd,_0x1980e5:0xc1,_0x2b95c5:0x2d,_0x560ef5:0x4a,_0xd6652e:0x15a,_0x1437b3:0x187,_0x452e8a:0x198},_0x585002={_0x10ab4a:0x1e9};function _0x3cb2ef(_0x47e484,_0x326369,_0x56e5df,_0x159284){return _0x383f4b(_0x56e5df- -0x326,_0x326369-0xb4,_0x47e484,_0x159284-0x1e);}function _0x13c594(_0x2ab643,_0x3fe7be,_0x2938fc,_0x3e1990){return _0x383f4b(_0x3fe7be- -0x1f6,_0x3fe7be-_0x585002._0x10ab4a,_0x2938fc,_0x3e1990-0x61);}return'session-'+Date[_0x3cb2ef(-_0x4b07f8._0x933e16,-0x9,-_0x4b07f8._0x237046,-0x2d)]()+'-'+Math[_0x3cb2ef(0x1b,-_0x4b07f8._0x1d3ca3,-_0x4b07f8._0x199808,-0x2f)]()[_0x3cb2ef(_0x4b07f8._0x1980e5,_0x4b07f8._0x2b95c5,0x69,_0x4b07f8._0x560ef5)](0x10)[_0x13c594(_0x4b07f8._0xd6652e,_0x4b07f8._0x1437b3,_0x4b07f8._0x452e8a,0x14f)](0x2,0xa);}function createTurnId(_0x47fc35){const _0x105358={_0x5cd252:0x17c},_0x1f6609={_0x1f77a9:0x284};function _0x1b755a(_0x2197ce,_0x291387,_0x4412b3,_0x19e39c){return _0x3061cd(_0x2197ce-0x1b8,_0x19e39c- -_0x1f6609._0x1f77a9,_0x4412b3-0x1f4,_0x2197ce);}return _0x1b755a(0x1c3,0x181,0x182,_0x105358._0x5cd252)+_0x47fc35;}function createDefaultMessage(_0x16c7e4){if(_0x16c7e4===void 0x0)return void 0x0;return normalizeUserInput(_0x16c7e4);}function normalizeUserInput(_0x4da278){const _0x19c950={_0x17e645:0x3b3,_0xd0736d:0x35e,_0x4717ce:0x3a6,_0x1c76cc:0x37b},_0x553f29={_0x162b3a:0x8e,_0x322549:0x6d,_0x540914:0xd3},_0x48ee77={_0x2cb9b1:0x5f,_0x2c83f3:0x1b0};if(typeof _0x4da278===_0xbb54e(_0x19c950._0x17e645,_0x19c950._0xd0736d,0x3cc,_0x19c950._0x4717ce))return{'role':'user','content':[{'type':_0x3f56c6(0x381,0x364,0x33e,_0x19c950._0x1c76cc),'text':_0x4da278}]};function _0x3f56c6(_0x34e634,_0x5dd729,_0x34dbe6,_0x185390){return _0x383f4b(_0x5dd729-_0x48ee77._0x2cb9b1,_0x5dd729-_0x48ee77._0x2c83f3,_0x185390,_0x185390-0x1af);}function _0xbb54e(_0x19575d,_0x2ce51f,_0x47fdd9,_0x53a01d){return _0x383f4b(_0x53a01d-_0x553f29._0x162b3a,_0x2ce51f-_0x553f29._0x322549,_0x47fdd9,_0x53a01d-_0x553f29._0x540914);}return normalizeMessage(_0x4da278);}function resolveChatModel(_0x19337b){const _0x47d317={_0x439e9f:0x32a,_0x4861e4:0x330,_0x364001:0xbc,_0x5e0cc8:0x77,_0x2e420b:0xb3,_0x4345db:0xbe,_0x13fb2a:0xfe},_0x2f3fd4={_0x42868f:0x3bc,_0x1be047:0x1db,_0xb46fbe:0x1a0},_0x560629={_0x581652:0xdf,_0x3c5d76:0x6b};function _0x33aca4(_0x415f87,_0x245207,_0x5e3425,_0x149846){return _0x3061cd(_0x415f87-_0x560629._0x581652,_0x149846- -0x6e0,_0x5e3425-_0x560629._0x3c5d76,_0x415f87);}if(!_0x19337b[_0x33aca4(-_0x47d317._0x439e9f,-0x354,-0x370,-_0x47d317._0x4861e4)])throw new Error(_0x4c1f27(-_0x47d317._0x364001,-_0x47d317._0x5e0cc8,-0xa4,-_0x47d317._0x2e420b));function _0x4c1f27(_0x5b225c,_0x137683,_0x29eab3,_0x70369a){return _0x383f4b(_0x70369a- -_0x2f3fd4._0x42868f,_0x137683-_0x2f3fd4._0x1be047,_0x5b225c,_0x70369a-_0x2f3fd4._0xb46fbe);}return _0x19337b[_0x4c1f27(-0x71,-_0x47d317._0x4345db,-_0x47d317._0x13fb2a,-0xa8)];}function createRegistry(_0x551aab){const _0x4a04f4={_0x4a02a7:0x59,_0x250549:0xe,_0xbd6651:0x1ba,_0x2f4145:0x18b,_0x291e8e:0x146,_0x11b0ea:0x100,_0x347a37:0xcc},_0x589a60={_0x59cd26:0x170,_0x58e4b9:0x44f,_0x2b82b8:0x118};if(_0x551aab[_0x1011ed(-_0x4a04f4._0x4a02a7,-0x2d,-_0x4a04f4._0x250549,-0x26)])return _0x551aab[_0x4aa10e(-_0x4a04f4._0xbd6651,-_0x4a04f4._0x2f4145,-0x19e,-_0x4a04f4._0x291e8e)];function _0x4aa10e(_0xd8e934,_0x5c139e,_0x3d8603,_0x1130ea){return _0x3061cd(_0xd8e934-0x1ef,_0x5c139e- -0x5b4,_0x3d8603-0x8c,_0xd8e934);}const _0x29d5a0=createExtensionRegistry(),_0x16dedb=_0x551aab['extensions']??[];function _0x1011ed(_0x5c1cda,_0x5c13f5,_0x1d1621,_0x45a04e){return _0x3061cd(_0x5c1cda-_0x589a60._0x59cd26,_0x45a04e- -_0x589a60._0x58e4b9,_0x1d1621-_0x589a60._0x2b82b8,_0x5c1cda);}for(const _0x1932d4 of _0x16dedb){_0x29d5a0[_0x1011ed(-0xa6,-_0x4a04f4._0x11b0ea,-_0x4a04f4._0x347a37,-0xc2)](_0x1932d4);}return _0x29d5a0;}var Agent=class{[_0x383f4b(0x312,0x35d,0x341,0x367)];[_0x383f4b(0x35b,0x392,0x3a4,0x373)];[_0x383f4b(0x34e,0x389,0x2fe,0x323)];[_0x383f4b(0x390,0x399,0x3d3,0x33e)];['messages'];['defaultMessage'];['turnIndex'];constructor(_0x472ba2={}){const _0x1fdbe0={_0xfd4d19:0x1cd,_0x520995:0x108,_0x379ecc:0xcc,_0x17a228:0x140,_0x45f2cd:0x149,_0x1c8557:0x1d1,_0x5609bd:0x1c2,_0x6a2186:0x1e3,_0xd82d16:0x98,_0x31a118:0xa6,_0x5dcf43:0xae,_0x39d4c5:0x14b,_0x229c78:0x60,_0x1aabf0:0x37,_0x13efd0:0x7e,_0x21c3fa:0x7b,_0x49b7f6:0x87,_0x50a5e2:0x1c5,_0x511608:0x1e1,_0x3546b9:0x238,_0x489d1d:0xaf,_0x5ea99d:0x85,_0x2a040f:0x1bf,_0x5131d:0x1ed,_0x3d5db9:0x177,_0x245513:0x1ad,_0x446b65:0x1e0},_0x2d041c={_0x14430b:0x9b,_0x52eb6e:0x43,_0x12113a:0x116,_0x3d320c:0x19d,_0x480276:0x168,_0x6dbf7f:0x16c},_0xf81365={_0x31c989:0x130,_0x2e732c:0x48},_0x12ec24={_0x5d6ef3:0x2a},_0x57f4ac={_0x1ae1fa:0x3d,_0x4d897d:0x244};this[_0x4c44be(0x207,0x1e8,_0x1fdbe0._0xfd4d19,0x1f5)]=_0x472ba2[_0x3e79a1(_0x1fdbe0._0x520995,_0x1fdbe0._0x379ecc,0x111,0x107)]??createSessionId(),this['turnIndex']=0x0;function _0x4c44be(_0x87954c,_0x5c097b,_0x2faf36,_0xf5338f){return _0x3061cd(_0x87954c-_0x57f4ac._0x1ae1fa,_0x5c097b- -_0x57f4ac._0x4d897d,_0x2faf36-0x192,_0xf5338f);}this[_0x4c44be(0x127,0x16a,_0x1fdbe0._0x17a228,_0x1fdbe0._0x45f2cd)]=_0x472ba2[_0x4c44be(_0x1fdbe0._0x1c8557,_0x1fdbe0._0x5609bd,_0x1fdbe0._0x6a2186,0x1ff)]??'',this[_0x3e79a1(0x5f,0xb1,0x105,0xd4)]=(_0x472ba2['messages']??[])[_0x3e79a1(0xd0,_0x1fdbe0._0xd82d16,_0x1fdbe0._0x31a118,_0x1fdbe0._0x5dcf43)](normalizeMessage);function _0x3e79a1(_0x55db75,_0x49dd83,_0x43547b,_0x470ab6){return _0x3061cd(_0x55db75-0x44,_0x49dd83- -0x360,_0x43547b-0xaa,_0x43547b);}this[_0x4c44be(_0x1fdbe0._0x45f2cd,0x14f,_0x1fdbe0._0x39d4c5,0x18c)]=createDefaultMessage(_0x472ba2['message']),this[_0x3e79a1(_0x1fdbe0._0x229c78,0x8a,0x88,_0x1fdbe0._0x1aabf0)]=createAgentMetrics({'getContextWindowLimit':_0x472ba2[_0x3e79a1(0x77,_0x1fdbe0._0x13efd0,_0x1fdbe0._0x21c3fa,_0x1fdbe0._0x49b7f6)]});const _0x5b0ab6=_0x472ba2['onEvent'],_0x258e62=async(_0x1ec32c,_0x51a11c)=>{this[_0x1b0dd5(0x73,_0x2d041c._0x14430b,_0x2d041c._0x52eb6e,0x72)][_0x191ffe(-_0x2d041c._0x12113a,-_0x2d041c._0x3d320c,-_0x2d041c._0x480276,-_0x2d041c._0x6dbf7f)](_0x1ec32c);function _0x191ffe(_0x22387c,_0x4ba810,_0xe38541,_0x692b5c){return _0x3e79a1(_0x22387c-0x14a,_0x692b5c- -0x1a4,_0xe38541,_0x692b5c-_0x12ec24._0x5d6ef3);}function _0x1b0dd5(_0x13b3f5,_0x170e68,_0x2560d9,_0x36ce20){return _0x3e79a1(_0x13b3f5-_0xf81365._0x31c989,_0x2560d9- -0x47,_0x170e68,_0x36ce20-_0xf81365._0x2e732c);}await _0x5b0ab6?.(_0x1ec32c,_0x51a11c);},_0x146a52=createInternalToolRuntime(_0x472ba2[_0x4c44be(_0x1fdbe0._0x50a5e2,_0x1fdbe0._0x511608,_0x1fdbe0._0x3546b9,0x219)]??[],{'onEvent':_0x258e62,'onToolCall':_0x472ba2[_0x3e79a1(0xfb,0xd9,_0x1fdbe0._0x489d1d,_0x1fdbe0._0x5ea99d)]});this['deps']={'registry':createRegistry(_0x472ba2),'chatModel':resolveChatModel(_0x472ba2),'toolRuntime':_0x146a52,'askUser':_0x472ba2[_0x4c44be(_0x1fdbe0._0x2a040f,_0x1fdbe0._0x5131d,0x1cf,0x238)],'setTopic':_0x472ba2[_0x4c44be(0x165,0x168,0x118,_0x1fdbe0._0x3d5db9)],'onEvent':_0x258e62,'sessionDir':_0x472ba2[_0x3e79a1(0xb8,0x8c,0x42,0xca)],'outputFormat':_0x472ba2[_0x4c44be(0x1e9,0x1c5,_0x1fdbe0._0x245513,_0x1fdbe0._0x446b65)]};}get[_0x383f4b(0x36a,0x32f,0x345,0x3a2)](){return this['_systemPrompt'];}['setTools'](_0x3c7f9e=[]){const _0x538e9f={_0x5c2b3b:0x65,_0x31f595:0x204,_0x476df:0x254,_0x24ff1a:0x247,_0x853b05:0x20a,_0x3742e8:0x1c1},_0x1ec754={_0x4a1f6f:0x115},_0x40a00a={_0x4e51c0:0x15d};function _0x4fe773(_0x7a64ce,_0x2dab25,_0x47b4e0,_0x13b5a0){return _0x3061cd(_0x7a64ce-_0x40a00a._0x4e51c0,_0x7a64ce- -0x210,_0x47b4e0-0x8a,_0x2dab25);}function _0x4baad5(_0x5b8bae,_0x8aca77,_0x238f0b,_0x476eac){return _0x3061cd(_0x5b8bae-_0x1ec754._0x4a1f6f,_0x8aca77- -0x45c,_0x238f0b-0x137,_0x476eac);}this[_0x4baad5(-0x5c,-_0x538e9f._0x5c2b3b,-0xac,-0x14)][_0x4fe773(_0x538e9f._0x31f595,0x249,_0x538e9f._0x476df,_0x538e9f._0x24ff1a)][_0x4fe773(0x1fd,_0x538e9f._0x853b05,_0x538e9f._0x3742e8,0x218)](_0x3c7f9e);}[_0x383f4b(0x353,0x397,0x32f,0x397)](){const _0x59d6f5={_0x504ca1:0x267,_0x18a5be:0x27b},_0x239307={_0x3331aa:0x86,_0x578ece:0x5},_0x46f5e5={_0x501aef:0xd7,_0x5ca07d:0x158};function _0x37ed1b(_0x1eb243,_0x254a8e,_0x531802,_0x36177d){return _0x3061cd(_0x1eb243-_0x46f5e5._0x501aef,_0x254a8e- -_0x46f5e5._0x5ca07d,_0x531802-0x1ab,_0x531802);}function _0x44b2f7(_0xc7d065,_0x507c52,_0x2309cc,_0x10603a){return _0x383f4b(_0x2309cc- -_0x239307._0x3331aa,_0x507c52-_0x239307._0x578ece,_0x10603a,_0x10603a-0x5a);}return this[_0x37ed1b(0x278,0x29f,0x298,0x274)]['toolRuntime'][_0x37ed1b(0x227,_0x59d6f5._0x504ca1,_0x59d6f5._0x18a5be,0x266)]();}[_0x383f4b(0x36b,0x35a,0x3a8,0x357)](_0xee21d3,_0x19ffd7={}){const _0x2921dd={_0xae0204:0x373,_0x33daf0:0x3ff,_0x355b25:0x3cc},_0x1a7cc8={_0x54d995:0xba};function _0x1d0bfc(_0x43911b,_0x2ab981,_0x1dfc00,_0x322ed6){return _0x383f4b(_0x322ed6-_0x1a7cc8._0x54d995,_0x2ab981-0x3a,_0x1dfc00,_0x322ed6-0x199);}this[_0x1d0bfc(0x409,_0x2921dd._0xae0204,_0x2921dd._0x33daf0,_0x2921dd._0x355b25)]=_0xee21d3,_0x19ffd7['resetMessages']===!![]&&(this['messages']=[],this['turnIndex']=0x0);}['setSessionId'](_0x24e787){this['sessionId']=_0x24e787;}[_0x3061cd(0x434,0x3ee,0x397,0x426)](_0x466d25){const _0x3c299d={_0x31877d:0xd7,_0x3595e4:0x107},_0x47a583={_0x20aae9:0x68};function _0x4fa02e(_0x386350,_0x2e053e,_0x3e580e,_0x167f71){return _0x383f4b(_0x167f71- -0x446,_0x2e053e-_0x47a583._0x20aae9,_0x2e053e,_0x167f71-0x58);}this[_0x4fa02e(-0xcc,-_0x3c299d._0x31877d,-_0x3c299d._0x3595e4,-0xeb)]['chatModel']=_0x466d25;}async[_0x3061cd(0x3ed,0x3e8,0x3f5,0x405)](_0xfd2df=this[_0x3061cd(0x351,0x393,0x3e2,0x347)],_0x134766={}){const _0x29cb24={_0x242cd6:0x2b1,_0x177835:0x2a0,_0x1a007c:0x2b5,_0xb8b689:0x2b6,_0x34c0c0:0xa1,_0xdd6bd2:0x28f,_0x58fbcb:0x221,_0x1b1d1f:0x50,_0x3d1528:0x25,_0x357b21:0x285,_0x28b4b3:0x283,_0x148546:0xc,_0x4f85dc:0x230,_0x53a715:0x250,_0x17b58e:0x285,_0xe3a74c:0x26c,_0x4ec242:0x2ac,_0x550161:0x2,_0x50adc3:0x3c},_0x49cad1={_0x3bbf91:0x120,_0x56aabc:0x185},_0x29f431={_0x46e440:0x132};function _0x54e55c(_0x4400f8,_0x5a7536,_0x33c75e,_0x1610b1){return _0x3061cd(_0x4400f8-_0x29f431._0x46e440,_0x5a7536- -0x406,_0x33c75e-0x10e,_0x33c75e);}function _0x2b44ad(_0x4db1f9,_0x2c89f4,_0x41c81c,_0x1d9138){return _0x383f4b(_0x2c89f4- -0xf0,_0x2c89f4-_0x49cad1._0x3bbf91,_0x4db1f9,_0x1d9138-_0x49cad1._0x56aabc);}if(!_0xfd2df)throw new Error('Agent.send\x20requires\x20a\x20message\x20when\x20no\x20default\x20message\x20is\x20configured');this['turnIndex']+=0x1;try{const _0x363384=await runTurn({'sessionId':this[_0x2b44ad(_0x29cb24._0x242cd6,_0x29cb24._0x177835,_0x29cb24._0x1a007c,_0x29cb24._0xb8b689)],'turnId':createTurnId(this[_0x54e55c(-0x5b,-0x55,-_0x29cb24._0x34c0c0,-0xc)]),'streaming':_0x134766[_0x2b44ad(0x288,0x296,0x287,0x2c8)],'signal':_0x134766[_0x2b44ad(0x259,0x259,_0x29cb24._0xdd6bd2,_0x29cb24._0x58fbcb)],'system':this['systemPrompt'],'messages':this['messages'],'message':normalizeUserInput(_0xfd2df)},this[_0x54e55c(-_0x29cb24._0x1b1d1f,-0xf,-_0x29cb24._0x3d1528,0xe)]);return this[_0x2b44ad(0x237,_0x29cb24._0x357b21,0x29e,_0x29cb24._0x28b4b3)]=_0x363384['state'][_0x54e55c(0x59,0xb,0x47,_0x29cb24._0x148546)][_0x2b44ad(0x265,0x26c,0x25a,_0x29cb24._0x4f85dc)](normalizeMessage),_0x363384;}catch(_0x45c3c7){if(_0x45c3c7 instanceof TurnFailedError){this[_0x2b44ad(_0x29cb24._0x53a715,_0x29cb24._0x17b58e,0x250,0x298)]=synthesizeMissingToolResults(_0x45c3c7['state']['messages'][_0x2b44ad(0x2ab,_0x29cb24._0xe3a74c,0x2a6,_0x29cb24._0x4ec242)](normalizeMessage));throw _0x45c3c7[_0x54e55c(_0x29cb24._0x550161,-_0x29cb24._0x50adc3,-0x6a,-0x90)];}throw _0x45c3c7;}}};export{normalizeToolOutputValue,createToolOutput,ToolExecutionError,defineTool,ToolRegistry,validateToolInput,deriveFinalToolOutput,createInternalToolRuntime,createExtensionRegistry,createAgentMetrics,runTurn,Agent};
|
|
1
|
+
(function(_0x507a82,_0x32fb96){const _0x312b04={_0x5e804c:0x37c,_0x1ab973:0x347,_0x58dabe:0x35b,_0x25bebc:0x355,_0x544b98:0x544,_0x35a8b9:0x528,_0x1f1a7a:0x39b,_0x55bdf7:0x57f,_0x3afd67:0x349,_0x5d8711:0x569,_0x27559c:0x365,_0x517dfd:0x5ad,_0x484947:0x601,_0x559987:0x55e},_0x1f3c03={_0x13e700:0xf6},_0x33a7ea={_0x2d7281:0x328},_0x23e825=_0x507a82();function _0x4521a2(_0x7ad893,_0x5bf528,_0x5ea08e,_0x504caa){return _0x2e7a(_0x7ad893-_0x33a7ea._0x2d7281,_0x5ea08e);}function _0x550ca4(_0x2522a9,_0x266b00,_0x3cc2ea,_0x5bd1d3){return _0x2e7a(_0x3cc2ea-_0x1f3c03._0x13e700,_0x266b00);}while(!![]){try{const _0x2aec51=-parseInt(_0x550ca4(_0x312b04._0x5e804c,_0x312b04._0x1ab973,_0x312b04._0x58dabe,_0x312b04._0x25bebc))/0x1+parseInt(_0x4521a2(0x5a6,0x5e0,0x5ad,0x583))/0x2*(-parseInt(_0x4521a2(_0x312b04._0x544b98,0x589,0x567,_0x312b04._0x35a8b9))/0x3)+parseInt(_0x550ca4(_0x312b04._0x1f1a7a,0x382,0x359,0x387))/0x4+-parseInt(_0x4521a2(_0x312b04._0x55bdf7,0x5a9,0x549,0x59b))/0x5*(parseInt(_0x550ca4(0x33b,0x34a,_0x312b04._0x3afd67,0x398))/0x6)+parseInt(_0x4521a2(_0x312b04._0x5d8711,0x5a6,0x5a7,0x568))/0x7+-parseInt(_0x550ca4(_0x312b04._0x27559c,0x32d,0x33c,0x385))/0x8+parseInt(_0x4521a2(_0x312b04._0x517dfd,_0x312b04._0x484947,_0x312b04._0x559987,0x5c8))/0x9*(parseInt(_0x550ca4(0x37b,0x2fe,0x326,0x2da))/0xa);if(_0x2aec51===_0x32fb96)break;else _0x23e825['push'](_0x23e825['shift']());}catch(_0x544e06){_0x23e825['push'](_0x23e825['shift']());}}}(_0x41a2,0x82915));import{createAssistantTextMessage,createReasoningMessage,createToolResultUserMessage,createToolUseMessage,getToolUseBlocks,normalizeMessage,normalizeSystem,responseToAssistantMessage,synthesizeMissingToolResults}from'./chunk-YWQXXHHU.js';import{TurnFailedError}from'./chunk-FFIZ6TKW.js';import{addAbortListener,isAbortError,throwIfAborted,toAbortError}from'./chunk-X7VAACWY.js';function isJsonObject(_0x59c219){const _0x512eb2={_0x4e7bfa:0xaf,_0xd1cb9a:0x281,_0x5d9c9a:0x2c3},_0x54367f={_0xa683d0:0x35e};function _0x391c6d(_0xb36c0e,_0x1cc5b7,_0x24a457,_0x37b99e){return _0x2e7a(_0x24a457- -_0x54367f._0xa683d0,_0x1cc5b7);}function _0x236a09(_0x2ef76b,_0x5e8ab3,_0x5cbf94,_0x4480cd){return _0x2e7a(_0x5cbf94-0x36,_0x5e8ab3);}return typeof _0x59c219===_0x391c6d(-0x111,-_0x512eb2._0x4e7bfa,-0xc8,-0x76)&&_0x59c219!==null&&!Array[_0x236a09(0x29b,_0x512eb2._0xd1cb9a,_0x512eb2._0x5d9c9a,0x2d8)](_0x59c219);}function isToolOutputEnvelope(_0x20be66){const _0x4c9a04={_0x2ac499:0x480,_0x1151b8:0x46b,_0xa5844a:0x455,_0x477f7e:0x1c3,_0x50ff57:0x1f9,_0x4330be:0x204,_0x1e630d:0x3eb,_0x269296:0x3c1,_0x2f8a70:0x1de,_0x11ec4b:0x190,_0x3e56bf:0x1df},_0x440904={_0x47e843:0x1f3};if(typeof _0x20be66!=='object'||_0x20be66===null||Array[_0x1953c3(0x4d0,_0x4c9a04._0x2ac499,_0x4c9a04._0x1151b8,_0x4c9a04._0xa5844a)](_0x20be66))return![];if(typeof _0x20be66[_0x8c281f(_0x4c9a04._0x477f7e,_0x4c9a04._0x50ff57,_0x4c9a04._0x4330be,0x1a3)]!==_0x1953c3(0x3ce,_0x4c9a04._0x1e630d,0x432,_0x4c9a04._0x269296))return![];const _0x422006=_0x20be66[_0x8c281f(_0x4c9a04._0x2f8a70,0x20a,_0x4c9a04._0x11ec4b,_0x4c9a04._0x3e56bf)];function _0x1953c3(_0x20740a,_0x2a5c0a,_0x573398,_0x394adb){return _0x2e7a(_0x2a5c0a-_0x440904._0x47e843,_0x20740a);}function _0x8c281f(_0x2a5a1c,_0x199839,_0x3f15a7,_0x15e29e){return _0x2e7a(_0x2a5a1c- -0x60,_0x3f15a7);}return _0x422006===void 0x0||isJsonObject(_0x422006);}function validateAgainstSchema(_0x2503dd,_0x21f62f,_0x73da62){const _0x4f7390={_0x566903:0x5e5,_0x57135a:0x613,_0x25149c:0x5dc,_0x361ee3:0x586,_0x3eb64b:0x591,_0x2c5c99:0x527,_0x14ec3b:0x544,_0x2ac42f:0x5b7,_0x1867e4:0x593,_0x32cc6d:0x46b,_0x2904da:0x5c1,_0x1e68f5:0x582,_0x286db6:0x5be,_0x977a55:0x591,_0x393870:0x5ab,_0x4b94cf:0x517,_0x4b7461:0x581,_0x5b3148:0x587,_0x34b204:0x615,_0x57fd75:0x5f4,_0x7f4051:0x5d7,_0x5357b4:0x5c2,_0x6b83ae:0x5ae,_0x5147f4:0x4fd,_0x3ed45c:0x577,_0x1acbcb:0x53d,_0x4c6de1:0x4cf,_0x4a5c15:0x4ea,_0x3e7f8d:0x5b9},_0x13d7c5={_0x415d4d:0xb1,_0x4c599c:0xa5,_0x3fcf8d:0x50},_0x38eccd={_0x5d6ccd:0x2a7},_0x577b98={_0x3ef476:0x367};function _0x43a47f(_0x12dce9,_0x1abee4,_0x12414e,_0x37e96e){return _0x2e7a(_0x12414e-_0x577b98._0x3ef476,_0x12dce9);}function _0x530073(_0x3172e3,_0x5a1df0,_0x527022,_0x4ea0e5){return _0x2e7a(_0x527022-_0x38eccd._0x5d6ccd,_0x3172e3);}switch(_0x73da62[_0x43a47f(_0x4f7390._0x566903,_0x4f7390._0x57135a,_0x4f7390._0x25149c,0x5be)]){case'string':if(typeof _0x21f62f!==_0x43a47f(_0x4f7390._0x361ee3,0x595,0x55f,_0x4f7390._0x3eb64b))throw new Error(_0x530073(0x532,_0x4f7390._0x2c5c99,0x517,_0x4f7390._0x14ec3b)+_0x2503dd+':\x20expected\x20string');return;case _0x43a47f(_0x4f7390._0x2ac42f,0x520,0x566,_0x4f7390._0x1867e4):if(typeof _0x21f62f!==_0x530073(_0x4f7390._0x32cc6d,0x471,0x4a6,0x4d6))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x2503dd+_0x43a47f(_0x4f7390._0x2904da,0x565,_0x4f7390._0x1e68f5,_0x4f7390._0x286db6));return;case _0x43a47f(_0x4f7390._0x977a55,0x5bc,_0x4f7390._0x393870,0x565):if(typeof _0x21f62f!==_0x43a47f(0x5f8,0x596,0x5ab,0x5b7))throw new Error(_0x530073(0x555,0x540,_0x4f7390._0x4b94cf,0x553)+_0x2503dd+':\x20expected\x20boolean');return;case _0x43a47f(0x5be,_0x4f7390._0x4b7461,_0x4f7390._0x5b3148,0x5bd):if(!Array[_0x43a47f(_0x4f7390._0x34b204,0x5d4,_0x4f7390._0x57fd75,_0x4f7390._0x7f4051)](_0x21f62f))throw new Error(_0x43a47f(_0x4f7390._0x5357b4,0x591,0x5d7,_0x4f7390._0x6b83ae)+_0x2503dd+':\x20expected\x20array');_0x21f62f[_0x530073(0x4d0,_0x4f7390._0x5147f4,0x504,0x556)]((_0x224250,_0x332c19)=>{const _0x214d28={_0x2587ae:0x14b,_0x1ead15:0x626};function _0x1d332c(_0x71f11e,_0x445bf0,_0x2717b0,_0x1a1ebb){return _0x43a47f(_0x1a1ebb,_0x445bf0-_0x214d28._0x2587ae,_0x445bf0- -_0x214d28._0x1ead15,_0x1a1ebb-0x9a);}validateAgainstSchema(_0x2503dd+'['+_0x332c19+']',_0x224250,_0x73da62[_0x1d332c(-_0x13d7c5._0x415d4d,-_0x13d7c5._0x4c599c,-0x99,-_0x13d7c5._0x3fcf8d)]);});return;case _0x530073(_0x4f7390._0x3ed45c,0x4f3,_0x4f7390._0x1acbcb,0x516):if(!isJsonObject(_0x21f62f))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x2503dd+_0x530073(0x55e,0x537,0x520,_0x4f7390._0x4c6de1));for(const _0x2846f8 of _0x73da62[_0x530073(0x586,0x539,0x52d,0x4fe)]??[]){if(!(_0x2846f8 in _0x21f62f))throw new Error(_0x530073(0x509,_0x4f7390._0x4a5c15,0x517,0x517)+_0x2503dd+':\x20missing\x20required\x20field\x20\x22'+_0x2846f8+'\x22');}for(const [_0x3df601,_0x3ea30b]of Object['entries'](_0x73da62[_0x43a47f(_0x4f7390._0x3e7f8d,0x579,0x5a9,0x5f1)])){_0x3df601 in _0x21f62f&&validateAgainstSchema(_0x2503dd+'.'+_0x3df601,_0x21f62f[_0x3df601],_0x3ea30b);}}}function normalizeToolOutputValue(_0xd5cb55){const _0xc2f1f8={_0x4b1ad5:0x347,_0x1c3dff:0x301,_0x271f27:0xb8,_0xfdcadb:0x99,_0x4cf2e4:0x88,_0x22a892:0xaf,_0x42dc08:0x10a,_0x25fb20:0x296,_0x508b80:0x378,_0xf469cb:0x338,_0x545d98:0x374,_0x16d7eb:0x7a,_0x4e598e:0xc4,_0x56b428:0x78},_0x30a0c8={_0xe38be6:0x2d5};if(isToolOutputEnvelope(_0xd5cb55))return{'output':_0xd5cb55[_0x448eca(0x31c,_0xc2f1f8._0x4b1ad5,0x2ce,_0xc2f1f8._0x1c3dff)],'structured':_0xd5cb55[_0x448eca(0x373,0x2db,0x316,0x31c)]??{'value':_0xd5cb55[_0x448eca(0x334,0x331,0x34e,0x301)]},..._0xd5cb55[_0x3561e8(-_0xc2f1f8._0x271f27,-0x60,-0x108,-_0xc2f1f8._0xfdcadb)]!==void 0x0?{'content':_0xd5cb55[_0x3561e8(-_0xc2f1f8._0x271f27,-_0xc2f1f8._0x4cf2e4,-_0xc2f1f8._0x22a892,-_0xc2f1f8._0x42dc08)]}:{}};function _0x3561e8(_0x4e5158,_0x172f08,_0x127c01,_0x547de4){return _0x2e7a(_0x4e5158- -_0x30a0c8._0xe38be6,_0x172f08);}if(typeof _0xd5cb55===_0x448eca(0x2e2,_0xc2f1f8._0x25fb20,0x327,0x2d6))return{'output':_0xd5cb55,'structured':{'value':_0xd5cb55}};if(typeof _0xd5cb55===_0x448eca(_0xc2f1f8._0x508b80,_0xc2f1f8._0xf469cb,0x3b4,_0xc2f1f8._0x545d98)&&_0xd5cb55!==null&&!Array['isArray'](_0xd5cb55))return{'output':JSON[_0x3561e8(-_0xc2f1f8._0x16d7eb,-_0xc2f1f8._0x4e598e,-_0xc2f1f8._0x56b428,-0x3c)](_0xd5cb55,null,0x2),'structured':_0xd5cb55};function _0x448eca(_0x631f0e,_0x523383,_0x515874,_0x274a4f){return _0x2e7a(_0x274a4f-0xde,_0x523383);}return{'output':JSON['stringify'](_0xd5cb55,null,0x2),'structured':{'value':_0xd5cb55}};}function createToolOutput(_0x3bb10a,_0x767bc3={'value':_0x3bb10a},_0x5d3b04){return{'output':_0x3bb10a,'structured':_0x767bc3,..._0x5d3b04!==void 0x0?{'content':_0x5d3b04}:{}};}var ToolExecutionError=class extends Error{['structured'];constructor(_0x35e5d4,_0x4cd8a3={}){const _0x266457={_0x2713de:0x19e,_0x486bb7:0x16c,_0x9a9755:0x4c},_0xa0f889={_0xd8277b:0x139};super(_0x35e5d4);function _0x255a69(_0x109582,_0x549de4,_0x292540,_0x501184){return _0x2e7a(_0x549de4- -_0xa0f889._0xd8277b,_0x501184);}function _0x5c4943(_0x1dad71,_0x29a7a1,_0x1a2b77,_0x4e0e10){return _0x2e7a(_0x1dad71- -0x28a,_0x29a7a1);}this[_0x255a69(_0x266457._0x2713de,0x155,_0x266457._0x486bb7,0x17c)]='ToolExecutionError',this[_0x5c4943(-_0x266457._0x9a9755,-0x6c,-0x30,-0x1c)]=_0x4cd8a3;}};function defineTool(_0x55cad2){return _0x55cad2;}var ToolRegistry=class{[_0x17556f(-0xb7,-0x9c,-0xf4,-0xce)]=new Map();constructor(_0x29346d=[]){const _0x3f2e55={_0x23778c:0x5a3,_0x1dbe7b:0x5e5},_0x2ea1d4={_0x179b96:0x6a9};function _0x2ed3c2(_0x593787,_0x65aa94,_0x4e421f,_0x5ecd57){return _0x17556f(_0x65aa94-_0x2ea1d4._0x179b96,_0x593787,_0x4e421f-0x1e4,_0x5ecd57-0x10);}for(const _0x2295cd of _0x29346d){this[_0x2ed3c2(_0x3f2e55._0x23778c,0x5b3,_0x3f2e55._0x1dbe7b,0x58c)](_0x2295cd);}}['register'](_0x3385f1){const _0x418cc1={_0x38fbcd:0xfc,_0x1cbd6f:0xee,_0x487287:0xe8,_0x233871:0x4c9,_0x389da2:0x438},_0x2fb959={_0x5b5112:0x528,_0x159ff5:0x16c},_0x1d6444={_0x51e21b:0x60,_0x492dc5:0x122};function _0x1cfe2f(_0x2aa134,_0x19f749,_0x2f9cbb,_0x3607f3){return _0x17556f(_0x19f749- -0x37,_0x3607f3,_0x2f9cbb-_0x1d6444._0x51e21b,_0x3607f3-_0x1d6444._0x492dc5);}function _0x94f344(_0x387944,_0x14f9d6,_0x1c5176,_0xfd72a7){return _0x17556f(_0xfd72a7-_0x2fb959._0x5b5112,_0x14f9d6,_0x1c5176-_0x2fb959._0x159ff5,_0xfd72a7-0xc5);}this[_0x1cfe2f(-_0x418cc1._0x38fbcd,-_0x418cc1._0x1cbd6f,-0x146,-_0x418cc1._0x487287)][_0x94f344(0x4aa,0x4c5,_0x418cc1._0x233871,0x487)](_0x3385f1[_0x94f344(0x4e0,0x456,_0x418cc1._0x389da2,0x48d)],_0x3385f1);}[_0xa63705(0x242,0x2b0,0x294,0x2d9)](_0x38c6cf){const _0x5ab660={_0xa8ee70:0x5f3,_0x29a1c6:0x66f,_0x41f3af:0x5b8},_0x2779be={_0x2c72bb:0x62e},_0x4b5314={_0x445fbc:0x116,_0x1cfd4e:0x13d};function _0x226c20(_0x444d5d,_0x5d2b22,_0x33a03e,_0x533c35){return _0x17556f(_0x444d5d-0x6f7,_0x5d2b22,_0x33a03e-_0x4b5314._0x445fbc,_0x533c35-_0x4b5314._0x1cfd4e);}function _0x310e57(_0xdb112e,_0x4aeeca,_0x56854c,_0x45ff9b){return _0x17556f(_0x56854c-_0x2779be._0x2c72bb,_0x4aeeca,_0x56854c-0x115,_0x45ff9b-0x12f);}return this[_0x226c20(0x640,0x602,_0x5ab660._0xa8ee70,_0x5ab660._0x29a1c6)][_0x226c20(0x5f5,0x628,0x60c,_0x5ab660._0x41f3af)](_0x38c6cf);}[_0x17556f(-0x115,-0x15c,-0x152,-0x128)](){const _0x21bacf={_0x543212:0x65,_0x2a0f37:0x26,_0x52baea:0x85},_0x29252d={_0x13ca3a:0x11c};function _0x5c0c4d(_0x53f0a1,_0x3c1e7b,_0x2198da,_0x451732){return _0x17556f(_0x53f0a1-_0x29252d._0x13ca3a,_0x451732,_0x2198da-0x167,_0x451732-0x47);}return[...this[_0x5c0c4d(_0x21bacf._0x543212,0x1a,_0x21bacf._0x2a0f37,_0x21bacf._0x52baea)]['values']()];}[_0xa63705(0x27a,0x2d5,0x2bb,0x282)](){const _0x2cc538={_0x39797d:0x178,_0x1cc645:0x127},_0x14998c={_0x454f21:0x638,_0x4198fa:0x664,_0xfad9c0:0x544,_0x310a13:0x517,_0x35f797:0x598,_0x45c484:0x5f1,_0x565dd7:0x60e},_0x27de89={_0x5dcba2:0x95};function _0x1c0846(_0x3afe04,_0x3ab13f,_0x5306be,_0x2ee230){return _0xa63705(_0x3afe04-0x1e5,_0x2ee230,_0x5306be- -0x39d,_0x2ee230-_0x27de89._0x5dcba2);}function _0x440271(_0xa671ee,_0x432714,_0xaa0dbd,_0x39e3d5){return _0xa63705(_0xa671ee-0x185,_0xa671ee,_0x432714- -0x136,_0x39e3d5-0x77);}return this[_0x440271(_0x2cc538._0x39797d,0x14b,0x199,0x189)]()[_0x440271(0x15d,0x181,_0x2cc538._0x1cc645,0x12b)](_0x4f979c=>{const _0x180933={_0x515d13:0xaf,_0x351e7a:0x6da},_0x3bb25c={_0x24dc89:0x681};function _0x11d33c(_0x2a9866,_0x5ac7c7,_0x5626ef,_0x1c2a46){return _0x1c0846(_0x2a9866-0xd3,_0x5ac7c7-0x26,_0x5ac7c7-_0x3bb25c._0x24dc89,_0x2a9866);}function _0x1820b1(_0x524efd,_0x245301,_0x23bf11,_0x1b9be0){return _0x1c0846(_0x524efd-0x1ba,_0x245301-_0x180933._0x515d13,_0x245301-_0x180933._0x351e7a,_0x524efd);}return{'name':_0x4f979c[_0x1820b1(0x644,_0x14998c._0x454f21,_0x14998c._0x4198fa,0x642)],'description':_0x4f979c[_0x11d33c(0x4f4,_0x14998c._0xfad9c0,_0x14998c._0x310a13,_0x14998c._0x35f797)],'input_schema':_0x4f979c[_0x1820b1(0x5b3,_0x14998c._0x45c484,0x598,_0x14998c._0x565dd7)]};});}};function validateToolInput(_0x266452,_0x2195dd){const _0x5d1f49={_0x37488a:0x3ea,_0x342a61:0x419,_0x493d95:0x403},_0x58c37b={_0x377d63:0x135};validateAgainstSchema(_0x43b886(_0x5d1f49._0x37488a,_0x5d1f49._0x342a61,0x40e,_0x5d1f49._0x493d95),_0x266452,_0x2195dd);function _0x43b886(_0xc36982,_0x4f381d,_0x5289ff,_0x406b2d){return _0x17556f(_0x4f381d-0x4ed,_0x406b2d,_0x5289ff-0xff,_0x406b2d-_0x58c37b._0x377d63);}return _0x266452;}function deriveFinalToolOutput(_0x4259bd){const _0x20fce8={_0xe91748:0x2f7,_0x21ac07:0x351,_0x5305ee:0x2ef,_0x39ae22:0x308,_0x18c511:0x31d,_0xf0e4b1:0x2f0,_0x34a040:0x352,_0x278a38:0x330,_0x36dfac:0x32c,_0x1c8e87:0x3a9,_0x1404bc:0x2f1,_0x11a05d:0x340,_0x371de4:0x33c,_0x249cfe:0x2ae,_0x2eeb9c:0x2ec,_0x1c9c3e:0x33a,_0x8a0b89:0x3b0,_0x444a49:0x369},_0x119c4a={_0x1cd153:0x1bc},_0x27850b={_0x4db9b5:0xd8};if(_0x4259bd[_0x5ab4ea(0x314,0x318,0x307,_0x20fce8._0xe91748)]===0x0)return{'output':'','structured':{}};function _0x5ab4ea(_0x34dfdc,_0x3868a4,_0xad8d68,_0x2e7bb5){return _0x17556f(_0xad8d68-0x3e5,_0x3868a4,_0xad8d68-_0x27850b._0x4db9b5,_0x2e7bb5-0xa6);}if(_0x4259bd[_0x5ab4ea(_0x20fce8._0x21ac07,_0x20fce8._0x5305ee,0x307,_0x20fce8._0x39ae22)]===0x1)return{'output':_0x4259bd[0x0][_0x30bdf6(_0x20fce8._0x18c511,_0x20fce8._0xf0e4b1,_0x20fce8._0x34a040,0x341)],'structured':_0x4259bd[0x0]['structured'],..._0x4259bd[0x0][_0x5ab4ea(0x2fa,0x30d,0x2d9,0x2cf)]!==void 0x0?{'content':_0x4259bd[0x0]['content']}:{}};function _0x30bdf6(_0x142aab,_0xfdc2a8,_0x2e9c64,_0x88336f){return _0x17556f(_0x88336f-0x447,_0x2e9c64,_0x2e9c64-0x161,_0x88336f-_0x119c4a._0x1cd153);}const _0x5e4d2a=_0x4259bd[_0x30bdf6(_0x20fce8._0x278a38,0x36a,_0x20fce8._0x36dfac,0x374)](_0x5a396a=>_0x5a396a['content']!==void 0x0);return{'output':_0x4259bd[_0x30bdf6(0x3a4,_0x20fce8._0x1c8e87,0x349,0x368)](_0x2a85a7=>_0x2a85a7[_0x5ab4ea(0x328,0x2e5,0x2df,0x327)])[_0x5ab4ea(0x2d5,0x337,_0x20fce8._0x1404bc,_0x20fce8._0x11a05d)](''),'structured':{'chunks':_0x4259bd[_0x5ab4ea(_0x20fce8._0x371de4,_0x20fce8._0x249cfe,0x306,_0x20fce8._0x2eeb9c)](_0x1cd6f8=>_0x1cd6f8['structured'])},..._0x5e4d2a[_0x30bdf6(_0x20fce8._0x1c9c3e,_0x20fce8._0x8a0b89,0x32c,_0x20fce8._0x444a49)]===0x1?{'content':_0x5e4d2a[0x0]['content']}:{}};}function createToolMeta(){return{'transforms':[]};}function createErrorToolResult(_0x39ae94,_0x134142,_0x507130,_0x1ad380=[]){const _0x50628c={_0x1114a0:0x19f},_0x170bbd={_0x5bad2a:0x23d,_0x5b6004:0x1d8,_0x4f683e:0x174};function _0x217674(_0x4375e1,_0xc988a,_0x144d33,_0x124fef){return _0x17556f(_0x4375e1-_0x170bbd._0x5bad2a,_0x144d33,_0x144d33-_0x170bbd._0x5b6004,_0x124fef-_0x170bbd._0x4f683e);}return{'callId':_0x39ae94['id'],'toolName':_0x39ae94[_0x217674(0x1a2,0x14a,0x191,_0x50628c._0x1114a0)],'status':'error','output':_0x134142,'structured':_0x507130,'chunks':_0x1ad380,'meta':createToolMeta()};}function _0x41a2(){const _0x5ddd94=['C2v0q2HHDe1VzgvS','CMvHC29UAw5Nu3rHCNrLzef0','C3rHz2u','zxjYB3i','C3rYAw5N','DhvYBKLUzgv4','Dg9VBf9Yzxn1Bhq','yw50AhjVCgLJx3rOAw5RAw5Nx2rLBhrH','ChvZAa','C3LZDgvTuhjVBxb0','Dg9VBfjLC3vSDhm','BNvTyMvY','Bw9KzwXFCMvZCg9UC2u','DgHPBMTPBMC','Bw9KzwXFCMvXDwvZDa','B25fDMvUDa','DhjHBNnMB3jTzxi','C3LZDgvT','yMvMB3jLqxnZAxn0yw50qxbWzw5K','A2LUza','ywXS','y29TCgXLDgu','tw9KzwWGC3rYzwfTigvUzgvKihDPDgHVDxqGysbMAw5HBcbYzxnWB25Zzq','CMvZzxrnzxnZywDLCW','Dg9VBf9ZDgfYDgvK','y29UDgv4DfDPBMrVD0XPBwL0','C2v0vg9WAwm','CMvHC29UAw5Nx21LC3nHz2u','CMvZCg9UC2u','CMvHC29UAw5Nx2nODw5R','CMvXDwvZDenVDw50','C29Tzq','BgLZDa','C2XPy2u','ywjVCNrLza','vw5RBM93BIb0B29SoIa','Dg90ywXnB2rLBfrPBwvnCW','zg9Uzq','AxrLBxm','oIbLEhbLy3rLzcbUDw1Izxi','m29hswjQDW','y29UDgvUDa','zgvWCW','CMvHC29UAw5NtwvZC2fNzuLK','yxjYyxK','qwDLBNqUC2vUzcbYzxf1AxjLCYbHig1LC3nHz2uGD2HLBIbUBYbKzwzHDwX0ig1LC3nHz2uGAxmGy29UzMLNDxjLza','CMvJB3jKrxzLBNq','B3v0Chv0','Dg90ywXszwfZB25PBMDuB2TLBNm','CNvUt2jZzxj2zxjZ','Aw5WDxruB2TLBNm','z2v0','CMvHC29U','Dg9VBf9JywXS','B3jKzxi','z2v0vg9VBhm','B2jZzxj2zxi','B3v0Chv0rM9YBwf0','CNvU','ywz0zxjnzxnZywDLqxbWzw5K','mtK5otKWAMnPverP','DgHLBG','y29UDgvUDeLUzgv4','CMvNAxn0zxi','ywjVCNq','AM9PBG','CMvQzwn0','DxnHz2u','DhvYBKLK','CMfJzq','Dg9VBf9Yzxn1BhrFBwvZC2fNzq','y29UDgvUDf9KzwX0yq','ywz0zxjnB2rLBfjLC3bVBNnL','DhvYBLn0yxj0zwrbDa','C3rYDwn0DxjLza','zMLUywXnzxnZywDL','DhjPBq','mZGZmJK0mwXQD0vKCa','ChjVCgvYDgLLCW','DMfSDwu','yM9VBgvHBG','ChjVDMLKzxi','mZe3mtKYogL3DgrOwa','Aw5WDxrty2HLBwe','Dg90ywXuB2TLBNm','CNvUvhjHBNnMB3jTzxjZ','BwfW','BgvUz3rO','DhvYBI0','z2v0q29UDgv4DfDPBMrVD0XPBwL0','BgLZDfrVB2Xty2HLBwfZ','Dg90ywXjBNb1DfrVA2vUCW','AxrLBuLK','Bw9KzwXdywXSq291BNq','C2vZC2LVBKrPCG','nK9MCxjSsW','Dg9tDhjPBMC','Aw5WDxq','zMLSDgvY','mZKXmJi0nuPAr2vNCa','C3rHDgu','BMv4Da','y2f0y2G','C3rYAw5NAwz5','Dg9VBf9YzwPLy3rLza','zM9YrwfJAa','ywz0zxjuDxjUq29TCgXLDgu','zgvMyxvSDe1LC3nHz2u','CMvZB2X2zq','B3v0Chv0sw5KzxG','CMvNAxn0CNK','mZi1ntq0nfDJvfDzCG','yxnZAxn0yw50x2nODw5R','mta0ndCYnK5UwKzXzW','BwvZC2fNzxm','B3bLBMfPx3jLyxnVBMLUz19ZDw1Tyxj5x2rLBhrH','yMvMB3jLvg9VBev4zwn1DgLVBG','zgvSzxrL','CMvXDwvZDa','C2vZC2LVBKLK','yxnZAxn0yw50x21LC3nHz2u','C3rHDhvZ','Aw5KzxG','C29YDa','sw52ywXPzcb0B29SigLUChv0igf0ia','Aw5WDxrezwX0yq','Dg9VBhncEu5HBwu','oNjLyxnVBMLUzW','y29TCgXLDgvK','DhLWzq','C3vTBwfYEuLUzgv4','zxHLy3v0zq','x3n5C3rLBvbYB21WDa','oIbLEhbLy3rLzcbVyMPLy3q','Dg9VBf91C2vFzgvSDge','C3rYzwfTAw5N','Bw9KzwW','zw5HyMXLza','mZy1nZq4wuDOufv2','y2HHDe1VzgvS','Bwv0CMLJCW','BwvZC2fNzq','Bwv0yq','qwDLBNqGCMvXDwLYzxmGysbJAgf0tw9KzwW','Dg9VBhm','nZeXz0rbBfjk','CMvXDwLYzwq','B3bLBMfPx3jLyxnVBMLUz19KzwX0yq','C2v0','CMvHC29UAw5Nq29TCgXLDgvKqxq','BM93','C2LNBMfS','zMLUywXFBwvZC2fNzq','AxnbCNjHEq','BMfTzq','C2v0u3LZDgvTuhjVBxb0','Bwf4vg9Rzw5Z','vg9VBcbLEgvJDxrPB24GCMvQzwn0zwqGzM9Yia','Dgv4Da','B3v0Chv0vg9Rzw5Z','C2vUza','C3rYzwfT','B2jQzwn0','ywrK','ywrKrxzLBNrmAxn0zw5LCG','zgvSDge','Dg9VBenHBgXdB3vUDa','zxH0zw5ZAw9UCW','Dg9VBf91C2vFBwvZC2fNzq','B25uB29Sq2fSBa','ywn0Aw9U','yxnRvxnLCG','Dg9VBfj1BNrPBwu','yMvMB3jLvg9VBfjLC3vSDefWCgvUza','Dg9VBf9JB21WBgv0zwq','zxHLy3v0zunHBgXZ','BgfZDfjLC3bVBNnL','oMfZC2LZDgfUDdO','zgvZy3jPChrPB24'];_0x41a2=function(){return _0x5ddd94;};return _0x41a2();}function createRejectedToolResult(_0x254162,_0x539e4d){const _0x49ab5e={_0x742d65:0x176,_0x8d6366:0x37a,_0x31fb44:0x34f,_0x12d49a:0x307,_0x161e23:0x1e7,_0x506ea2:0x348,_0x4cec06:0x2d4,_0x48640d:0x309,_0x151f35:0x2e5},_0x3f5ad2={_0x28722a:0x25f,_0x506551:0x1e9},_0x523a82=_0x539e4d?.[_0x2135dc(0x1b0,0x1b8,_0x49ab5e._0x742d65,0x134)]()['length']?_0x539e4d:_0x1a89af(_0x49ab5e._0x8d6366,_0x49ab5e._0x31fb44,0x300,_0x49ab5e._0x12d49a)+_0x254162[_0x2135dc(_0x49ab5e._0x161e23,0x18b,0x1c4,0x20a)];function _0x1a89af(_0x98745d,_0x3fe20c,_0x395c3d,_0x2b57b0){return _0x17556f(_0x3fe20c-0x3e7,_0x395c3d,_0x395c3d-0xad,_0x2b57b0-0x1d2);}function _0x2135dc(_0x5e1ff8,_0x39cb26,_0x29dd35,_0x2347c8){return _0x17556f(_0x29dd35-_0x3f5ad2._0x28722a,_0x2347c8,_0x29dd35-0x1df,_0x2347c8-_0x3f5ad2._0x506551);}return createErrorToolResult(_0x254162,_0x523a82,{'error':_0x1a89af(_0x49ab5e._0x506ea2,0x31a,0x369,_0x49ab5e._0x4cec06),..._0x539e4d?.['trim']()[_0x1a89af(0x2f0,_0x49ab5e._0x48640d,0x2ea,_0x49ab5e._0x151f35)]?{'reason':_0x539e4d}:{}});}function createAbortedToolResult(_0x4f6768,_0x1ab0dc,_0x2391c9=[]){const _0x5360e2={_0x30de8c:0x34c,_0x58d553:0x38e,_0x41f4b4:0x37c,_0x37cfe8:0x379,_0x4f1f6e:0x325,_0x482db2:0x3b3},_0x200716={_0x5cd143:0x336,_0x35e6ad:0x130},_0x2b781e={_0x311747:0x421,_0x172928:0x81,_0x20e1d4:0xd1},_0x13683f=toAbortError(_0x1ab0dc);function _0x1bce19(_0x5a7a41,_0x349801,_0x539415,_0x13136f){return _0x17556f(_0x13136f-_0x2b781e._0x311747,_0x5a7a41,_0x539415-_0x2b781e._0x172928,_0x13136f-_0x2b781e._0x20e1d4);}function _0x4b074b(_0x3bff13,_0x38bdd3,_0x692249,_0x4ee086){return _0x17556f(_0x38bdd3-_0x200716._0x5cd143,_0x4ee086,_0x692249-_0x200716._0x35e6ad,_0x4ee086-0x37);}return createErrorToolResult(_0x4f6768,_0x13683f[_0x1bce19(_0x5360e2._0x30de8c,_0x5360e2._0x58d553,_0x5360e2._0x41f4b4,_0x5360e2._0x37cfe8)],{'error':_0x13683f[_0x1bce19(0x383,_0x5360e2._0x4f1f6e,_0x5360e2._0x482db2,_0x5360e2._0x37cfe8)],'aborted':!![]},_0x2391c9);}function createSuccessToolResult(_0x730c79,_0x182a25,_0x207891){const _0x455747={_0x5c3132:0xf4,_0x5b28e1:0x10a,_0x1491cb:0x142,_0x25ed12:0xf2,_0x598c97:0xfe,_0x49299a:0xad,_0x453ff5:0x113,_0x136d39:0xd1,_0x42b39e:0xf3,_0x1815d9:0x9c,_0x124444:0xe9,_0x2fcba6:0xd1,_0xd422ac:0x98},_0x15a723={_0x23eb16:0x1dd,_0x4abf63:0xb1,_0x21b6e3:0x141},_0x4da832={_0x270b51:0x301};function _0x463fa4(_0x1b1c1f,_0x4c6c4e,_0xdb3cf9,_0x2c6e74){return _0x17556f(_0x2c6e74-_0x4da832._0x270b51,_0xdb3cf9,_0xdb3cf9-0x56,_0x2c6e74-0xb4);}function _0x20fc69(_0x212126,_0x589094,_0x2bceb6,_0x47fe74){return _0x17556f(_0x2bceb6-_0x15a723._0x23eb16,_0x47fe74,_0x2bceb6-_0x15a723._0x4abf63,_0x47fe74-_0x15a723._0x21b6e3);}return{'callId':_0x730c79['id'],'toolName':_0x730c79[_0x20fc69(_0x455747._0x5c3132,_0x455747._0x5b28e1,_0x455747._0x1491cb,_0x455747._0x25ed12)],'status':'ok','output':_0x182a25[_0x20fc69(_0x455747._0x598c97,0x91,0xd7,_0x455747._0x49299a)],'structured':_0x182a25[_0x20fc69(_0x455747._0x25ed12,_0x455747._0x453ff5,0xf2,0x107)],..._0x182a25[_0x20fc69(0x116,0xc6,_0x455747._0x136d39,_0x455747._0x42b39e)]!==void 0x0?{'content':_0x182a25[_0x20fc69(_0x455747._0x1815d9,_0x455747._0x124444,_0x455747._0x2fcba6,_0x455747._0xd422ac)]}:{},'chunks':_0x207891,'meta':createToolMeta()};}function createUnknownToolResult(_0x25ad36){const _0x1cadd4={_0x195384:0x3ce,_0x4f2606:0x3b3,_0x4871fc:0x41c,_0x104170:0x47,_0x35c2d7:0x47},_0x187a0c={_0x1fac80:0x187},_0xa1fd07={_0x4be274:0xe2,_0x3a2587:0x10a,_0x3bad45:0x67};function _0xf97970(_0x369e78,_0x3e9672,_0xe58830,_0x2b2c8e){return _0x17556f(_0x369e78-_0xa1fd07._0x4be274,_0x3e9672,_0xe58830-_0xa1fd07._0x3a2587,_0x2b2c8e-_0xa1fd07._0x3bad45);}function _0x114ed5(_0x2a3ad6,_0x27f6a9,_0x26b807,_0x46ce59){return _0xa63705(_0x2a3ad6-0x194,_0x26b807,_0x2a3ad6-0x14a,_0x46ce59-_0x187a0c._0x1fac80);}return createErrorToolResult(_0x25ad36,_0x114ed5(_0x1cadd4._0x195384,_0x1cadd4._0x4f2606,0x410,_0x1cadd4._0x4871fc)+_0x25ad36[_0xf97970(_0x1cadd4._0x104170,_0x1cadd4._0x35c2d7,0x2f,0xf)],{'error':'unknown_tool'});}function isDispatchDecision(_0x49a105){const _0x282ae3={_0x191bdc:0x1f,_0x44aa74:0x4a,_0x46abbc:0x5a8,_0x3d4b8:0x535,_0x192079:0x627,_0x3ac60d:0x5f4},_0x4aff86={_0x4baa8f:0x302};function _0x36ef86(_0x2b7361,_0x377279,_0x4638ce,_0x1d68a4){return _0xa63705(_0x2b7361-0x125,_0x2b7361,_0x1d68a4-0x2e9,_0x1d68a4-0x1e3);}function _0x26dcb7(_0x4c676f,_0x17c7e8,_0x321db8,_0x3fff9c){return _0xa63705(_0x4c676f-0x1c8,_0x4c676f,_0x3fff9c- -_0x4aff86._0x4baa8f,_0x3fff9c-0xb);}if(typeof _0x49a105!==_0x26dcb7(0x3f,-_0x282ae3._0x191bdc,-_0x282ae3._0x44aa74,0x1)||_0x49a105===null)return![];return _0x49a105[_0x36ef86(_0x282ae3._0x46abbc,0x630,0x5bc,0x5f4)]===_0x36ef86(0x58a,0x58f,_0x282ae3._0x3d4b8,0x58c)||_0x49a105[_0x36ef86(_0x282ae3._0x192079,0x5e4,0x5bc,_0x282ae3._0x3ac60d)]==='run';}function normalizeExecutionError(_0x5481b2){const _0x16937d={_0x5505ed:0xbc,_0x48c9ba:0x74,_0x275a8e:0x99,_0x3089b9:0xbf},_0x564a6d={_0x5d6357:0x2f,_0x3fb63b:0x171},_0x1b8c28={_0x1f7523:0x1bf};if(_0x5481b2 instanceof ToolExecutionError)return{'errorMessage':_0x5481b2[_0x453ec3(-0x52,-0x79,-0xc4,-0x7e)],'structured':{'error':_0x5481b2['message'],..._0x5481b2[_0x453ec3(-0xa0,-_0x16937d._0x5505ed,-_0x16937d._0x48c9ba,-_0x16937d._0x275a8e)]}};function _0x3100f1(_0x39aab3,_0x1644cf,_0x1dcae5,_0x124adb){return _0x17556f(_0x124adb-0x48,_0x39aab3,_0x1dcae5-_0x1b8c28._0x1f7523,_0x124adb-0x166);}function _0x453ec3(_0x33a90d,_0x2d643c,_0x5c794a,_0x3e265a){return _0x17556f(_0x2d643c-_0x564a6d._0x5d6357,_0x33a90d,_0x5c794a-_0x564a6d._0x3fb63b,_0x3e265a-0x1dd);}if(_0x5481b2 instanceof Error)return{'errorMessage':_0x5481b2[_0x453ec3(-0xbe,-0x79,-0xa7,-_0x16937d._0x3089b9)],'structured':{'error':_0x5481b2['message']}};const _0x27859e=String(_0x5481b2);return{'errorMessage':_0x27859e,'structured':{'error':_0x27859e}};}async function emitEvent(_0x3b03d2,_0x46506f,_0x34fcf3){await _0x3b03d2?.(_0x46506f,_0x34fcf3);}async function resolveDispatchDecision(_0x2820e2,_0x13abd2,_0x1f3cbb){const _0x138756={_0x2dc70c:0x459,_0x938f22:0x45a,_0x5ac2a5:0x485,_0x435ef7:0x4be,_0x3e9362:0x4b7,_0x2f0593:0x143,_0x53a3d9:0x156,_0x44a280:0x520,_0x812c8e:0x4c6,_0x1042e1:0x142,_0x23a834:0x4c7,_0x759f56:0x485,_0x1c2738:0x4dd},_0x44b23e={_0x31d6a2:0x8c,_0x5222f0:0xe5,_0x8b9be:0xc6,_0x418481:0x7c,_0x23bf0e:0xac,_0x203672:0x78},_0x5688fb={_0x1047d1:0x3,_0x56e034:0xb1,_0x3d237f:0x456},_0x260e7e={_0x5782c5:0xd,_0x1f1e3a:0x158},_0xad0e17={_0x4b8b33:0x16d,_0x3e8245:0xc8};function _0x3e5270(_0x48aeb1,_0x303461,_0x2c9da5,_0x19cbf7){return _0xa63705(_0x48aeb1-_0xad0e17._0x4b8b33,_0x19cbf7,_0x2c9da5-0x1ea,_0x19cbf7-_0xad0e17._0x3e8245);}if(!_0x2820e2)return{'action':_0x3e5270(_0x138756._0x2dc70c,_0x138756._0x938f22,_0x138756._0x5ac2a5,_0x138756._0x435ef7)};const _0x5c43cc=Promise[_0x3e5270(0x45f,0x4c3,_0x138756._0x3e9362,0x48b)]()[_0x4193bb(_0x138756._0x2f0593,0x152,0x146,_0x138756._0x53a3d9)](()=>_0x2820e2(_0x13abd2,_0x1f3cbb));if(!_0x1f3cbb[_0x3e5270(_0x138756._0x44a280,_0x138756._0x812c8e,0x4e2,0x4a8)]){const _0x1867b9=await _0x5c43cc;return isDispatchDecision(_0x1867b9)?_0x1867b9:{'action':'run'};}function _0x4193bb(_0x51f4a8,_0x49d920,_0x4e6b10,_0x5b95f8){return _0xa63705(_0x51f4a8-_0x260e7e._0x5782c5,_0x49d920,_0x4e6b10- -_0x260e7e._0x1f1e3a,_0x5b95f8-0x53);}const _0xb95c92=new Promise((_0x5f2bbd,_0xb78b23)=>{const _0x38e617={_0x31aa87:0x3f,_0x2661db:0x44,_0x4524d0:0x65,_0x3c7c2a:0x41,_0x17b75a:0x18,_0x19feaa:0x5b,_0x39b549:0x13,_0x3895cc:0x46,_0x29b464:0x1f},_0x19d95f={_0x42be66:0x247},_0x3b1e02={_0xa8b01d:0xe8,_0x26a1bf:0x118};function _0xcb43b5(_0xfa82ff,_0x44f92a,_0x593c30,_0x2a1362){return _0x4193bb(_0xfa82ff-_0x3b1e02._0xa8b01d,_0x2a1362,_0xfa82ff- -0x101,_0x2a1362-_0x3b1e02._0x26a1bf);}function _0x574fd5(_0x3083fc,_0x2a5d74,_0x337654,_0x59a019){return _0x3e5270(_0x3083fc-_0x5688fb._0x1047d1,_0x2a5d74-_0x5688fb._0x56e034,_0x3083fc- -_0x5688fb._0x3d237f,_0x59a019);}const _0x4a25db=()=>{function _0x426e35(_0x16ca98,_0x36647e,_0x1bb246,_0x4b96a5){return _0x2e7a(_0x4b96a5- -_0x19d95f._0x42be66,_0x16ca98);}function _0x59b0cb(_0x43028c,_0x59164e,_0x32309f,_0x526245){return _0x2e7a(_0x43028c- -0x273,_0x59164e);}_0x1f3cbb[_0x426e35(-0x9,0x9,_0x38e617._0x31aa87,_0x38e617._0x2661db)]?.['removeEventListener'](_0x59b0cb(-_0x38e617._0x31aa87,-_0x38e617._0x4524d0,-_0x38e617._0x3c7c2a,-0x86),_0x4a25db),_0xb78b23(toAbortError(_0x1f3cbb[_0x59b0cb(_0x38e617._0x17b75a,_0x38e617._0x19feaa,-0x27,0x6)]?.[_0x426e35(_0x38e617._0x39b549,-_0x38e617._0x3895cc,-_0x38e617._0x2661db,-_0x38e617._0x29b464)]));};if(_0x1f3cbb[_0x574fd5(_0x44b23e._0x31d6a2,_0x44b23e._0x5222f0,0x5f,_0x44b23e._0x8b9be)]?.['aborted']){_0xb78b23(toAbortError(_0x1f3cbb['signal'][_0xcb43b5(0x3c,0x67,0x40,_0x44b23e._0x418481)]));return;}_0x1f3cbb['signal']?.[_0xcb43b5(_0x44b23e._0x23bf0e,_0x44b23e._0x203672,0xee,0xf3)]('abort',_0x4a25db,{'once':!![]});}),_0x33d9e2=await Promise[_0x4193bb(0x162,0x116,0x14e,_0x138756._0x1042e1)]([_0x5c43cc,_0xb95c92]);return isDispatchDecision(_0x33d9e2)?_0x33d9e2:{'action':_0x3e5270(0x454,_0x138756._0x23a834,_0x138756._0x759f56,_0x138756._0x1c2738)};}async function executeToolCall(_0x2e2e4a,_0x4382f9,_0x5d29d3,_0x41348a,_0x1da3da){const _0x447be7={_0x246ef8:0x2c,_0x2c8795:0x35,_0x35f14d:0x2bb,_0x4a28af:0xb0,_0x18081f:0x1b,_0x45d74c:0x62,_0x5a14d1:0x2c6,_0x2613bf:0x2a1,_0x2ae7ca:0x240,_0x593cc4:0x280,_0x42be7f:0x2b9,_0x59fe0c:0x2a6,_0x56bfae:0x307,_0x1a448a:0x26a,_0x43076d:0x223,_0x5520ac:0x70,_0x4b1a08:0x3c,_0x301b00:0xf,_0x189506:0x11,_0x5b330d:0xa,_0x2754c7:0x2e4,_0x11ab27:0x5c,_0x2cbba2:0x34,_0x8f208:0x292,_0x431544:0x2da,_0x34c7aa:0x2e4,_0x562eb6:0x291,_0x48e6d0:0x26a,_0xcabb83:0x2b2,_0x5bc556:0x272,_0x41c354:0x307,_0x537d6c:0x31,_0x27420c:0x24,_0xccc4a4:0x313,_0x14c979:0x2dd,_0x11d0cb:0x28,_0x1e62b2:0x2,_0x392d23:0x2b,_0x5a4db7:0x22e,_0x44c747:0x234,_0x4a838b:0x29,_0x361444:0x2a,_0x43e15d:0x4a,_0x1890ae:0x57},_0x292ec7={_0x4e9c31:0x5e5,_0x4afeb8:0x570,_0x37b9d0:0x595},_0x407150={_0xa3564c:0x6a,_0x2b8ba9:0x288,_0x5f175d:0xc8},_0x53f3f7={..._0x5d29d3,'toolCallId':_0x4382f9['id']};throwIfAborted(_0x53f3f7['signal']);let _0x183317;try{_0x183317=await resolveDispatchDecision(_0x41348a,_0x4382f9,_0x53f3f7);}catch(_0xf05c93){if(isAbortError(_0xf05c93)){const _0x9f6483=createAbortedToolResult(_0x4382f9,_0xf05c93);return await emitEvent(_0x1da3da,{'type':'tool_completed','toolCall':_0x4382f9,'result':_0x9f6483},_0x53f3f7),_0x9f6483;}const {errorMessage:_0x3049ca,structured:_0x18707c}=normalizeExecutionError(_0xf05c93),_0x3f0c4a=createErrorToolResult(_0x4382f9,_0x3049ca,_0x18707c);return await emitEvent(_0x1da3da,{'type':_0x1898f8(-_0x447be7._0x246ef8,-0x82,-0x3a,-_0x447be7._0x2c8795),'toolCall':_0x4382f9,'result':_0x3f0c4a},_0x53f3f7),_0x3f0c4a;}throwIfAborted(_0x53f3f7[_0x304f13(0x2c0,0x2fa,_0x447be7._0x35f14d,0x2e4)]);if(_0x183317[_0x1898f8(0x83,0x9b,0x31,_0x447be7._0x4a28af)]===_0x1898f8(_0x447be7._0x18081f,0x4a,-0xf,_0x447be7._0x45d74c)){const _0x3ba4f6=createRejectedToolResult(_0x4382f9,_0x183317['reason']);return await emitEvent(_0x1da3da,{'type':'tool_rejected','toolCall':_0x4382f9,'result':_0x3ba4f6},_0x53f3f7),_0x3ba4f6;}const _0x45df15=_0x2e2e4a[_0x304f13(_0x447be7._0x5a14d1,_0x447be7._0x2613bf,_0x447be7._0x2ae7ca,_0x447be7._0x593cc4)](_0x4382f9[_0x304f13(_0x447be7._0x42be7f,_0x447be7._0x59fe0c,_0x447be7._0x56bfae,0x2e7)]);if(!_0x45df15){const _0x5948a6=createUnknownToolResult(_0x4382f9);return await emitEvent(_0x1da3da,{'type':_0x304f13(0x26d,_0x447be7._0x1a448a,_0x447be7._0x43076d,0x248),'toolCall':_0x4382f9,'result':_0x5948a6},_0x53f3f7),_0x5948a6;}throwIfAborted(_0x53f3f7[_0x1898f8(_0x447be7._0x5520ac,_0x447be7._0x4b1a08,0x6f,0x7a)]),await emitEvent(_0x1da3da,{'type':_0x1898f8(-_0x447be7._0x301b00,_0x447be7._0x189506,_0x447be7._0x5b330d,-0x4),'toolCall':_0x4382f9},_0x53f3f7);function _0x304f13(_0x1fe36d,_0x31756d,_0x43fffe,_0x21faeb){return _0x17556f(_0x21faeb-0x382,_0x1fe36d,_0x43fffe-0x1e3,_0x21faeb-0x162);}function _0x1898f8(_0x7ef69,_0x5e0511,_0x53675d,_0x5ae20e){return _0xa63705(_0x7ef69-_0x407150._0xa3564c,_0x5e0511,_0x7ef69- -_0x407150._0x2b8ba9,_0x5ae20e-_0x407150._0x5f175d);}try{throwIfAborted(_0x53f3f7[_0x304f13(0x2e9,0x299,_0x447be7._0x56bfae,_0x447be7._0x2754c7)]);const _0x300417=validateToolInput(_0x4382f9['input'],_0x45df15[_0x1898f8(0x2c,0x6b,0x69,0x4c)]),_0x5c19a7=await _0x45df15[_0x1898f8(_0x447be7._0x11ab27,_0x447be7._0x4a28af,_0x447be7._0x2cbba2,0x5f)](_0x300417,_0x53f3f7),_0x2420e9=[],_0x108b50=addAbortListener(_0x53f3f7['signal'],()=>{const _0x22baa9={_0x2a6295:0x57b,_0x4cb5ad:0xf7};function _0x2adb40(_0x438aab,_0xcbdb9d,_0x345a05,_0x589661){return _0x1898f8(_0xcbdb9d-_0x22baa9._0x2a6295,_0x438aab,_0x345a05-_0x22baa9._0x4cb5ad,_0x589661-0x118);}void _0x5c19a7['return'](void 0x0)[_0x2adb40(_0x292ec7._0x4e9c31,0x5ba,_0x292ec7._0x4afeb8,_0x292ec7._0x37b9d0)](()=>{});});try{throwIfAborted(_0x53f3f7[_0x304f13(_0x447be7._0x8f208,_0x447be7._0x431544,0x2ea,_0x447be7._0x34c7aa)]);let _0x12ad3b=await _0x5c19a7[_0x304f13(_0x447be7._0x562eb6,_0x447be7._0x48e6d0,0x2d4,_0x447be7._0xcabb83)]();while(!_0x12ad3b[_0x304f13(0x299,0x269,0x25b,_0x447be7._0x5bc556)]){throwIfAborted(_0x53f3f7[_0x304f13(0x2ad,0x31c,_0x447be7._0x41c354,0x2e4)]);const _0x49c992=normalizeToolOutputValue(_0x12ad3b['value']);_0x2420e9[_0x1898f8(-0x1f,-0x1f,-0x20,_0x447be7._0x537d6c)](_0x49c992),await emitEvent(_0x1da3da,{'type':'tool_output_chunk','toolCall':_0x4382f9,'chunk':_0x49c992},_0x53f3f7),throwIfAborted(_0x53f3f7['signal']),_0x12ad3b=await _0x5c19a7[_0x1898f8(0x3e,0x45,_0x447be7._0x27420c,0x38)]();}throwIfAborted(_0x53f3f7[_0x304f13(_0x447be7._0xccc4a4,0x2de,_0x447be7._0x14c979,0x2e4)]);const _0x570387=_0x12ad3b[_0x1898f8(_0x447be7._0x11d0cb,0x4b,0x55,_0x447be7._0x1e62b2)]===void 0x0?deriveFinalToolOutput(_0x2420e9):normalizeToolOutputValue(_0x12ad3b[_0x1898f8(0x28,-0x28,0x82,-_0x447be7._0x392d23)]),_0x13bc16=createSuccessToolResult(_0x4382f9,_0x570387,_0x2420e9);return await emitEvent(_0x1da3da,{'type':_0x304f13(0x215,0x29a,_0x447be7._0x5a4db7,0x248),'toolCall':_0x4382f9,'result':_0x13bc16},_0x53f3f7),_0x13bc16;}catch(_0x1f0a20){if(isAbortError(_0x1f0a20)){const _0x26c767=createAbortedToolResult(_0x4382f9,_0x1f0a20,_0x2420e9);return await emitEvent(_0x1da3da,{'type':_0x304f13(0x223,0x258,_0x447be7._0x44c747,0x248),'toolCall':_0x4382f9,'result':_0x26c767},_0x53f3f7),_0x26c767;}const {errorMessage:_0x1bfc1b,structured:_0x268c41}=normalizeExecutionError(_0x1f0a20),_0x363c38=createErrorToolResult(_0x4382f9,_0x1bfc1b,_0x268c41,_0x2420e9);return await emitEvent(_0x1da3da,{'type':_0x1898f8(-_0x447be7._0x246ef8,-_0x447be7._0x4a838b,0x6,-_0x447be7._0x361444),'toolCall':_0x4382f9,'result':_0x363c38},_0x53f3f7),_0x363c38;}finally{_0x108b50();}}catch(_0x3e9dbc){if(isAbortError(_0x3e9dbc)){const _0x27769f=createAbortedToolResult(_0x4382f9,_0x3e9dbc);return await emitEvent(_0x1da3da,{'type':_0x1898f8(-0x2c,-_0x447be7._0x43e15d,-_0x447be7._0x1890ae,-0x3d),'toolCall':_0x4382f9,'result':_0x27769f},_0x53f3f7),_0x27769f;}const {errorMessage:_0x4de18c,structured:_0x4595e5}=normalizeExecutionError(_0x3e9dbc),_0x25a51a=createErrorToolResult(_0x4382f9,_0x4de18c,_0x4595e5);return await emitEvent(_0x1da3da,{'type':'tool_completed','toolCall':_0x4382f9,'result':_0x25a51a},_0x53f3f7),_0x25a51a;}}function createInternalToolRuntime(_0x339bb6=[],_0x1c8a50={}){const _0x4d6951={_0x179cf9:0x3c0,_0xc77da1:0x3ce,_0x5edae5:0x41e},_0x369a18={_0x1ca791:0x149,_0x316653:0x112};let _0x51a60d=new ToolRegistry(_0x339bb6);return{'listToolSchemas'(){return _0x51a60d['listToolSchemas']();},'setTools'(_0x2c7677){_0x51a60d=new ToolRegistry(_0x2c7677);},async 'executeCalls'(_0x3dbb50,_0x3308bd){const _0x168a47={_0x4bccd7:0x6e},_0x17e9f0={_0xd1cf27:0x88,_0x2f3164:0xae},_0x2dbc40={_0x5a3b5a:0x393};function _0x497bab(_0x50beed,_0x255056,_0x264d7c,_0x2328ae){return _0x2e7a(_0x50beed- -_0x2dbc40._0x5a3b5a,_0x255056);}return await Promise['all'](_0x3dbb50[_0x497bab(-_0x369a18._0x1ca791,-_0x369a18._0x316653,-0x15d,-0x14e)](async _0x361906=>{function _0x432e1c(_0x193e97,_0x28bcf6,_0xbcdae5,_0x59d1f4){return _0x497bab(_0x28bcf6-_0x17e9f0._0xd1cf27,_0x59d1f4,_0xbcdae5-_0x17e9f0._0x2f3164,_0x59d1f4-0x85);}return await executeToolCall(_0x51a60d,_0x361906,_0x3308bd,_0x1c8a50[_0x432e1c(-0x4f,-_0x168a47._0x4bccd7,-0x17,-0x6e)],_0x1c8a50['onEvent']);}));},async 'execute'(_0x363a2a,_0xf84590){function _0x2cd22c(_0x320ca5,_0x52ca13,_0xc44bd1,_0x1b5cc2){return _0x2e7a(_0x52ca13-0x1de,_0x320ca5);}const [_0x5ea197]=await this[_0x2cd22c(_0x4d6951._0x179cf9,_0x4d6951._0xc77da1,0x390,_0x4d6951._0x5edae5)]([_0x363a2a],_0xf84590);return _0x5ea197;}};}function getOrderedObserverExtensions(_0x22edee,_0x2989f4){const _0x14749c={_0x25c433:0x10c,_0x55c73e:0x12f,_0x5928b4:0x51f},_0x3c0f22={_0x2ee419:0xcf,_0x16f270:0x95,_0x5af800:0x4b,_0x192c21:0xb,_0xe65941:0x1d,_0xaa49cc:0xe,_0x410c4e:0x69,_0x56cfb1:0x44},_0xfc48ab={_0x47c252:0x288,_0xcc403b:0xf8},_0x417044={_0x342f9f:0x3e9,_0x386a1c:0x4},_0x16f2a5={_0x12ccbc:0x7};function _0x4196d6(_0x35fff5,_0x229a96,_0x22edbf,_0x1f4860){return _0xa63705(_0x35fff5-0x193,_0x1f4860,_0x22edbf-0x1fa,_0x1f4860-_0x16f2a5._0x12ccbc);}function _0x19a47a(_0x230d30,_0x187e43,_0xacd782,_0x16e644){return _0xa63705(_0x230d30-0x3a,_0x187e43,_0x230d30- -_0x417044._0x342f9f,_0x16e644-_0x417044._0x386a1c);}return _0x22edee[_0x19a47a(-0x126,-_0x14749c._0x25c433,-0x16b,-_0x14749c._0x55c73e)](_0x20a2ae=>{const _0x5c602f={_0x2736b7:0x18b};function _0x4b8575(_0x2297f5,_0x1a92a2,_0x201cae,_0x3ae24f){return _0x19a47a(_0x3ae24f-_0xfc48ab._0x47c252,_0x201cae,_0x201cae-0x93,_0x3ae24f-_0xfc48ab._0xcc403b);}function _0x320312(_0xaf644a,_0x22b2e0,_0x53e016,_0x13f342){return _0x19a47a(_0x13f342-0x194,_0x53e016,_0x53e016-_0x5c602f._0x2736b7,_0x13f342-0x5f);}return _0x20a2ae[_0x320312(0x65,_0x3c0f22._0x2ee419,0xc6,_0x3c0f22._0x16f270)]!==![]&&_0x20a2ae[_0x320312(-_0x3c0f22._0x5af800,_0x3c0f22._0x192c21,_0x3c0f22._0xe65941,_0x3c0f22._0xaa49cc)]===_0x2989f4&&_0x20a2ae['kind']===_0x320312(_0x3c0f22._0x410c4e,0x7c,0x14,_0x3c0f22._0x56cfb1);})[_0x4196d6(0x4f2,0x524,0x4d6,_0x14749c._0x5928b4)]((_0x1ebf07,_0xe376a8)=>_0x1ebf07['order']-_0xe376a8[_0x19a47a(-0x152,-0x13a,-0x190,-0x160)]);}function getOrderedTransformerExtensions(_0x3b8773,_0x1abb67){const _0x196eed={_0x483ed6:0x1b8,_0x5b1648:0x134},_0xd1976c={_0xd847e4:0x189,_0x125c60:0x289,_0x5cc76e:0x2ca},_0xd5fc29={_0x359863:0x198,_0x2bdc7b:0x495},_0x3e4dd3={_0x2c2e7e:0x2c};function _0x54aeb1(_0x33e377,_0x37e9fb,_0x32c68b,_0x17da23){return _0xa63705(_0x33e377-0x5e,_0x17da23,_0x37e9fb- -0x439,_0x17da23-0xea);}function _0x4e4f59(_0x2e0910,_0xc7f429,_0x514d0d,_0x1add74){return _0xa63705(_0x2e0910-0x150,_0x514d0d,_0x2e0910- -0x354,_0x1add74-0x1b9);}return _0x3b8773[_0x54aeb1(-0x19b,-0x176,-_0x196eed._0x483ed6,-0x161)](_0x51d0a4=>{function _0x1d8904(_0xd40315,_0xb90e29,_0xc76ea1,_0x3d1b16){return _0x54aeb1(_0xd40315-0x19e,_0xc76ea1-_0x3e4dd3._0x2c2e7e,_0xc76ea1-0x180,_0xb90e29);}function _0x2c4b16(_0x4075c2,_0x53302b,_0x52054c,_0x43bdc0){return _0x54aeb1(_0x4075c2-_0xd5fc29._0x359863,_0x53302b-_0xd5fc29._0x2bdc7b,_0x52054c-0x1,_0x52054c);}return _0x51d0a4['enabled']!==![]&&_0x51d0a4[_0x2c4b16(0x2fb,0x2bf,0x2f0,0x317)]===_0x1abb67&&_0x51d0a4[_0x1d8904(-0x1cf,-0x156,-0x199,-_0xd1976c._0xd847e4)]===_0x2c4b16(_0xd1976c._0x125c60,0x2cd,0x2a8,_0xd1976c._0x5cc76e);})[_0x54aeb1(-_0x196eed._0x5b1648,-0x15d,-0x168,-0x11a)]((_0x10c10d,_0x418c87)=>_0x10c10d[_0x54aeb1(-0x152,-0x1a2,-0x1ab,-0x178)]-_0x418c87['order']);}function createExtensionRegistry(){const _0x23ceae={_0x5f57c7:0x5be},_0x51266b={_0x56d732:0x39e},_0xa5570f={_0x47ab53:0x9b,_0x16d4e3:0x81},_0x1fa5e5={_0x523322:0x1b5},_0x3144da={_0x47d3bb:0x14e},_0x27995f=[];return{'register'(_0x5e710d){function _0x3671cf(_0x173ee1,_0x187ecb,_0x2b7db3,_0x8a3b7b){return _0x2e7a(_0x187ecb- -0xa6,_0x173ee1);}_0x27995f[_0x3671cf(_0x3144da._0x47d3bb,0x156,0x11f,0x136)](_0x5e710d);},async 'runTransformers'(_0x3b55d0,_0x2d5d07,_0x5cc3af){let _0x3dfead=_0x2d5d07;for(const _0x7ccf45 of getOrderedTransformerExtensions(_0x27995f,_0x3b55d0)){_0x3dfead=await _0x7ccf45[_0x4529a1(0x79,_0xa5570f._0x47ab53,0x22,_0xa5570f._0x16d4e3)](_0x3dfead,_0x5cc3af);}function _0x4529a1(_0x1eacbe,_0xa4cdc1,_0x593b6e,_0x1f648a){return _0x2e7a(_0x1eacbe- -_0x1fa5e5._0x523322,_0x1f648a);}return _0x3dfead;},async 'runObservers'(_0x425364,_0x2a4cf4,_0x27455b){function _0x444e01(_0x4a429d,_0x49dceb,_0x2125ca,_0x5170c0){return _0x2e7a(_0x4a429d-_0x51266b._0x56d732,_0x2125ca);}for(const _0x837db6 of getOrderedObserverExtensions(_0x27995f,_0x425364)){await _0x837db6[_0x444e01(0x5cc,0x5a5,0x5b3,_0x23ceae._0x5f57c7)](_0x2a4cf4,_0x27455b);}}};}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(_0x3ad270={}){const _0xc59129={_0x460c33:0x39b,_0x252081:0x353,_0x3ba4db:0x3c3},_0x3c5c26={_0x1c964c:0x342,_0x4a981b:0x38a,_0x244396:0x3ac,_0x2fd7b1:0x2e5,_0x270e40:0x2d1,_0x56d332:0xc4,_0x516e91:0x9a,_0x22987b:0x330,_0x272d36:0x35f,_0x5272d7:0xc8,_0x1c39e9:0x39a,_0x3af8d0:0x33f,_0x593283:0x7a,_0x154502:0x8f,_0x225cd2:0x7e,_0xb3d398:0x84,_0x12fd60:0x320,_0x521deb:0x2b5,_0x2d2aa8:0x322,_0x55bc3e:0x3b,_0x47fdf1:0x2e,_0xa67fa1:0x5d,_0x4fcc7d:0x53,_0x5683ad:0x32e,_0x36ab22:0x3a0,_0x152bbf:0x37c,_0x431bdd:0x324,_0xee8dc8:0x323,_0xdddcd6:0x370,_0x2fb01f:0x353,_0x51354d:0x3b1,_0x4f10f5:0x32b,_0x10dd2c:0x2e2,_0x2af661:0x306,_0x353ed6:0x2fc,_0x2df132:0x34c,_0x2a41c0:0x300,_0x1d6e63:0x8e,_0x559243:0x98,_0x56f8df:0x50,_0x275235:0x2f4,_0x2bfe56:0x2f5,_0xbe364c:0x2f0,_0x124da2:0x2b5,_0x5ef0f1:0x358,_0xa90c73:0x388,_0x194005:0x30c,_0x2ab34e:0x35a,_0x3cdbec:0x362,_0x64e8ed:0x33b,_0x5b8695:0x3d0,_0x90cca0:0x325,_0x3ca913:0x394,_0x406d01:0x7c,_0x231512:0x31,_0x315341:0x59};let _0x417076=createEmptySnapshot();const _0x38d3f2=new Set();let _0x56f85d;const _0x415436=()=>{const _0x40b072={..._0x417076};for(const _0x2a6888 of _0x38d3f2)_0x2a6888(_0x40b072);};return{'getSnapshot'(){return{..._0x417076};},'recordEvent'(_0x16b087){const _0x6869a0={_0x33395a:0x1b9};if(_0x16b087[_0x49ae81(0x358,_0x3c5c26._0x1c964c,_0x3c5c26._0x4a981b,_0x3c5c26._0x244396)]===_0x49ae81(_0x3c5c26._0x2fd7b1,0x2eb,0x2aa,_0x3c5c26._0x270e40)){_0x56f85d=Date[_0x50b53d(_0x3c5c26._0x56d332,0xd4,0xd1,_0x3c5c26._0x516e91)]();const _0x581a9d=_0x3ad270[_0x49ae81(_0x3c5c26._0x22987b,_0x3c5c26._0x272d36,0x36a,0x2f8)]?.(_0x16b087[_0x50b53d(_0x3c5c26._0x5272d7,0x70,0xb1,0x71)]);_0x581a9d!==void 0x0&&(_0x417076={..._0x417076,'contextWindowLimit':_0x581a9d},_0x415436());return;}if(_0x16b087[_0x49ae81(0x358,0x379,_0x3c5c26._0x1c39e9,_0x3c5c26._0x3af8d0)]===_0x50b53d(0x5b,_0x3c5c26._0x593283,0x47,_0x3c5c26._0x154502)){const _0x1d3f09=_0x16b087['response'][_0x50b53d(0x9f,0x42,_0x3c5c26._0x225cd2,_0x3c5c26._0xb3d398)][_0x49ae81(0x309,_0x3c5c26._0x12fd60,_0x3c5c26._0x521deb,_0x3c5c26._0x2d2aa8)],_0x28be6e=_0x16b087[_0x50b53d(_0x3c5c26._0x55bc3e,0x29,0x57,_0x3c5c26._0x47fdf1)][_0x50b53d(0x4f,_0x3c5c26._0xa67fa1,_0x3c5c26._0x225cd2,_0x3c5c26._0x4fcc7d)][_0x49ae81(0x376,_0x3c5c26._0x5683ad,_0x3c5c26._0x36ab22,_0x3c5c26._0x152bbf)],_0xda704f=_0x16b087[_0x49ae81(0x2f3,0x2a6,0x334,_0x3c5c26._0x431bdd)][_0x49ae81(0x31a,_0x3c5c26._0xee8dc8,0x343,_0x3c5c26._0xdddcd6)]['reasoningTokens']??0x0,_0x1eb7bb=_0x1d3f09+_0x28be6e,_0x47e6e1=_0x56f85d===void 0x0?0x0:Date[_0x49ae81(0x36d,_0x3c5c26._0x2fb01f,_0x3c5c26._0x51354d,0x31c)]()-_0x56f85d;_0x56f85d=void 0x0,_0x417076={..._0x417076,'totalTokens':_0x417076[_0x49ae81(_0x3c5c26._0x4f10f5,_0x3c5c26._0x10dd2c,0x337,_0x3c5c26._0x2af661)]+_0x1eb7bb,'totalInputTokens':_0x417076[_0x49ae81(0x332,_0x3c5c26._0x353ed6,0x376,0x334)]+_0x1d3f09,'totalOutputTokens':_0x417076['totalOutputTokens']+_0x28be6e,'totalReasoningTokens':_0x417076[_0x49ae81(0x307,_0x3c5c26._0x2df132,_0x3c5c26._0x2a41c0,0x2ee)]+_0xda704f,'modelCallCount':_0x417076[_0x50b53d(_0x3c5c26._0x1d6e63,0xa0,_0x3c5c26._0x559243,_0x3c5c26._0x56f8df)]+0x1,'totalModelTimeMs':_0x417076[_0x49ae81(0x2fb,_0x3c5c26._0x275235,_0x3c5c26._0x2bfe56,0x34e)]+_0x47e6e1,'currentTokens':_0x1eb7bb,'currentInputTokens':_0x1d3f09,'currentOutputTokens':_0x28be6e,'currentReasoningTokens':_0xda704f,'currentModelTimeMs':_0x47e6e1,..._0x417076['contextWindowLimit']&&_0x1eb7bb>0x0?{'contextWindowUsage':_0x1eb7bb/_0x417076[_0x49ae81(_0x3c5c26._0xbe364c,0x312,0x323,_0x3c5c26._0x124da2)]}:{}},_0x415436();return;}if(_0x16b087[_0x49ae81(_0x3c5c26._0x5ef0f1,_0x3c5c26._0xa90c73,0x305,0x3a5)]===_0x49ae81(_0x3c5c26._0x194005,_0x3c5c26._0x2ab34e,_0x3c5c26._0x3cdbec,_0x3c5c26._0x64e8ed)){_0x417076={..._0x417076,'toolCallCount':_0x417076[_0x49ae81(0x37d,_0x3c5c26._0x5b8695,_0x3c5c26._0x90cca0,_0x3c5c26._0x3ca913)]+0x1},_0x415436();return;}function _0x50b53d(_0xee4eab,_0x161143,_0x5f07d6,_0x5d53c3){return _0x2e7a(_0x5f07d6- -_0x6869a0._0x33395a,_0x161143);}function _0x49ae81(_0x39fc50,_0x5d85df,_0x144707,_0xcb166a){return _0x2e7a(_0x39fc50-0xe3,_0x5d85df);}_0x16b087['type']==='turn_complete'&&(_0x417076={..._0x417076,'requestCount':_0x417076[_0x50b53d(_0x3c5c26._0x406d01,_0x3c5c26._0x231512,_0x3c5c26._0x315341,0xac)]+0x1},_0x415436());},'reset'(){_0x417076=createEmptySnapshot(),_0x56f85d=void 0x0,_0x415436();},'subscribe'(_0x3386bf){const _0x282b68={_0x371629:0x138,_0x5b4532:0xed,_0x4f27ec:0x125,_0x5068f8:0x157};_0x38d3f2[_0x472026(_0xc59129._0x460c33,0x3ed,_0xc59129._0x252081,_0xc59129._0x3ba4db)](_0x3386bf);function _0x472026(_0x1aa251,_0x7829c5,_0x147ecd,_0x125a38){return _0x2e7a(_0x1aa251-0x104,_0x147ecd);}return()=>{const _0x2e64f1={_0x50ba15:0x4a5,_0x4240f3:0x1d2};function _0x1f6532(_0x2eae43,_0x2167a2,_0x1bd954,_0x4407d4){return _0x472026(_0x2eae43- -_0x2e64f1._0x50ba15,_0x2167a2-0x177,_0x4407d4,_0x4407d4-_0x2e64f1._0x4240f3);}_0x38d3f2[_0x1f6532(-_0x282b68._0x371629,-_0x282b68._0x5b4532,-_0x282b68._0x4f27ec,-_0x282b68._0x5068f8)](_0x3386bf);};}};}function _0x2e7a(_0x5d5f99,_0x39cd41){_0x5d5f99=_0x5d5f99-0x1ed;const _0x41a2bd=_0x41a2();let _0x2e7a59=_0x41a2bd[_0x5d5f99];if(_0x2e7a['CymZhJ']===undefined){var _0x1e04e0=function(_0x14af27){const _0x56ca88='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x59c219='',_0x20be66='';for(let _0x422006=0x0,_0x2503dd,_0x21f62f,_0x73da62=0x0;_0x21f62f=_0x14af27['charAt'](_0x73da62++);~_0x21f62f&&(_0x2503dd=_0x422006%0x4?_0x2503dd*0x40+_0x21f62f:_0x21f62f,_0x422006++%0x4)?_0x59c219+=String['fromCharCode'](0xff&_0x2503dd>>(-0x2*_0x422006&0x6)):0x0){_0x21f62f=_0x56ca88['indexOf'](_0x21f62f);}for(let _0x224250=0x0,_0x332c19=_0x59c219['length'];_0x224250<_0x332c19;_0x224250++){_0x20be66+='%'+('00'+_0x59c219['charCodeAt'](_0x224250)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x20be66);};_0x2e7a['GOwQYg']=_0x1e04e0,_0x2e7a['xwOkxg']={},_0x2e7a['CymZhJ']=!![];}const _0x467f32=_0x41a2bd[0x0],_0x23456e=_0x5d5f99+_0x467f32,_0x29e15f=_0x2e7a['xwOkxg'][_0x23456e];return!_0x29e15f?(_0x2e7a59=_0x2e7a['GOwQYg'](_0x2e7a59),_0x2e7a['xwOkxg'][_0x23456e]=_0x2e7a59):_0x2e7a59=_0x29e15f,_0x2e7a59;}function makeExtensionContext(_0x5aab20){return{'state':_0x5aab20};}async function runStage(_0x442638,_0x1a706e,_0x4c836c,_0x25d6f4){const _0x43704a={_0x127cbb:0x1b1,_0x4babc4:0x168,_0x44e32d:0x162},_0x218a1b={_0x1fcf68:0x80,_0x583cc7:0x1a6},_0x55cbd9=await _0x442638[_0x44fd3e(-_0x43704a._0x127cbb,-0x160,-_0x43704a._0x4babc4,-_0x43704a._0x44e32d)](_0x1a706e,_0x4c836c,_0x25d6f4);function _0x44fd3e(_0x15a65e,_0x467dec,_0x4047ce,_0x39c382){return _0x17556f(_0x467dec- -0x80,_0x39c382,_0x4047ce-_0x218a1b._0x1fcf68,_0x39c382-_0x218a1b._0x583cc7);}return await _0x442638['runObservers'](_0x1a706e,_0x55cbd9,_0x25d6f4),_0x55cbd9;}function _0x17556f(_0x3520af,_0x3cd2ac,_0xa87e1d,_0x1e01e6){const _0x52692b={_0x40f561:0x329};return _0x2e7a(_0x3520af- -_0x52692b._0x40f561,_0x3cd2ac);}async function emitEvent2(_0x495712,_0x312839,_0xc5411){await _0x495712?.(_0x312839,_0xc5411);}function replaceToolUseBlocks(_0x71b422,_0x4e0f71){const _0x54a54a={_0x5d48a2:0x5e4,_0x1b5e8f:0x5b7,_0x45baaa:0x5f6},_0x44d796={_0x5059d5:0x553},_0x3da19a={_0x5a55ff:0x6d5,_0x58f153:0x189,_0x2ef2ae:0x1ef};let _0x51519d=0x0;function _0x479dba(_0x4576d5,_0x2d3db6,_0x1f343a,_0x3463f3){return _0x17556f(_0x3463f3-_0x3da19a._0x5a55ff,_0x4576d5,_0x1f343a-_0x3da19a._0x58f153,_0x3463f3-_0x3da19a._0x2ef2ae);}return{..._0x71b422,'content':_0x71b422['content'][_0x479dba(_0x54a54a._0x5d48a2,0x5dc,_0x54a54a._0x1b5e8f,_0x54a54a._0x45baaa)](_0x5af112=>{const _0x50269b={_0x58559c:0x54};if(_0x5af112[_0x145671(0x526,0x577,0x526,_0x44d796._0x5059d5)]!=='tool_use')return _0x5af112;const _0x40de50=_0x4e0f71[_0x51519d];function _0x145671(_0x979a7f,_0xb21b4a,_0x443b08,_0x642515){return _0x479dba(_0x642515,_0xb21b4a-_0x50269b._0x58559c,_0x443b08-0x14d,_0xb21b4a- -0xaa);}return _0x51519d+=0x1,structuredClone(_0x40de50);})};}function createAssistantMessageId(_0x2d6a13,_0x5eadfb){const _0x9ed295={_0x4018bb:0x8d,_0x5d0451:0x2c,_0x16a31a:0x4b},_0x26d516={_0x2aae44:0xee};function _0x300bec(_0xcaaa6a,_0x877d97,_0x5492f8,_0x2dcb3f){return _0xa63705(_0xcaaa6a-0x34,_0x877d97,_0x5492f8- -0x2e1,_0x2dcb3f-_0x26d516._0x2aae44);}return _0x2d6a13+_0x300bec(-_0x9ed295._0x4018bb,-_0x9ed295._0x5d0451,-0x82,-_0x9ed295._0x16a31a)+_0x5eadfb;}function _0xa63705(_0x56482e,_0x2d03bd,_0x241cb6,_0x346299){return _0x2e7a(_0x241cb6-0x6d,_0x2d03bd);}function createReasoningMessageId(_0xf74b16){const _0x59f557={_0x489631:0xf6,_0x5443e1:0xfa,_0x115917:0x147},_0x14222b={_0x23a405:0x1ac};function _0x31a086(_0x5aa237,_0x3b3720,_0x5deefe,_0x5c22b3){return _0x17556f(_0x5aa237-_0x14222b._0x23a405,_0x3b3720,_0x5deefe-0x12f,_0x5c22b3-0xa1);}return _0xf74b16+_0x31a086(_0x59f557._0x489631,_0x59f557._0x5443e1,0xda,_0x59f557._0x115917);}function withMessageId(_0x25e199,_0x5cfab5){if(_0x25e199['id']===_0x5cfab5)return _0x25e199;return{..._0x25e199,'id':_0x5cfab5};}function createAssistantChunkEvent(_0x13382f,_0x24460a){const _0x14e016={_0xf0b5c:0x247,_0x2082e4:0x2a0,_0x3b9470:0x42,_0x1db885:0x3a,_0x27b0e3:0x10,_0x32b38a:0x258,_0x565b26:0x224,_0x1d12c9:0x5e,_0x5d5414:0xd9,_0x591fa7:0xdb,_0x529c62:0x91,_0x58a3ec:0x40,_0x3c3ff7:0x2e},_0x152592={_0x13b5d1:0x339},_0x43e18b={_0x1e3f93:0x140};if(_0x13382f[_0x54c018(0x24f,_0x14e016._0xf0b5c,0x269,_0x14e016._0x2082e4)]!=='content_delta')return void 0x0;if(_0x13382f[_0xe0af33(-_0x14e016._0x3b9470,-0x89,-_0x14e016._0x1db885,-_0x14e016._0x27b0e3)]===void 0x0)return void 0x0;function _0x54c018(_0x26bbca,_0x428553,_0x5f4679,_0x49dcbb){return _0xa63705(_0x26bbca-0x1e2,_0x428553,_0x5f4679- -0x79,_0x49dcbb-_0x43e18b._0x1e3f93);}function _0xe0af33(_0x4ab9c6,_0x4fd7f7,_0x4c1f5d,_0x203b54){return _0xa63705(_0x4ab9c6-0x46,_0x203b54,_0x4c1f5d- -_0x152592._0x13b5d1,_0x203b54-0x99);}return{'type':_0x54c018(0x254,0x24c,_0x14e016._0x32b38a,_0x14e016._0x565b26),'index':_0x13382f[_0xe0af33(-0x11,-0x15,-_0x14e016._0x1d12c9,-_0x14e016._0x27b0e3)]??0x0,'messageId':_0x24460a,'chunk':{'type':_0xe0af33(-_0x14e016._0x5d5414,-_0x14e016._0x591fa7,-_0x14e016._0x529c62,-_0x14e016._0x58a3ec),'index':_0x13382f[_0xe0af33(-0x6e,-0x72,-0x5e,-_0x14e016._0x3c3ff7)]??0x0,'text':_0x13382f['text']}};}function createToolUseChunkEvent(_0x2c862b,_0x3e8f96){const _0x1f2a1f={_0x422485:0xe0,_0x18fede:0x13a,_0x11502d:0x5b2,_0x31bbd4:0x596,_0x31f735:0x112,_0x2754bf:0xf0,_0x12587b:0x595,_0x5d0ec6:0x58a,_0x3ac2b9:0x5aa,_0x1c741d:0x11e,_0x1927c6:0xe5,_0x450dc0:0x115,_0x104d4c:0x57b},_0x582084={_0x9ec593:0xbd,_0x52a7d7:0x2af,_0x4b3f1c:0x156},_0x4e57cd={_0xaf5502:0x83,_0x38b4fa:0x61,_0x26d9fd:0x11d};if(_0x2c862b[_0x191b4a(-0x137,-0xfd,-_0x1f2a1f._0x422485,-_0x1f2a1f._0x18fede)]!==_0x5506d2(_0x1f2a1f._0x11502d,_0x1f2a1f._0x31bbd4,0x563,0x59c))return void 0x0;function _0x191b4a(_0x4a0741,_0x47b5e6,_0x4b0e8a,_0x3b9149){return _0x17556f(_0x4a0741- -_0x4e57cd._0xaf5502,_0x4b0e8a,_0x4b0e8a-_0x4e57cd._0x38b4fa,_0x3b9149-_0x4e57cd._0x26d9fd);}function _0x5506d2(_0x1d75d4,_0x170014,_0x370f2e,_0x25051f){return _0xa63705(_0x1d75d4-_0x582084._0x9ec593,_0x370f2e,_0x170014-_0x582084._0x52a7d7,_0x25051f-_0x582084._0x4b3f1c);}return{'type':'tool_use_chunk','index':_0x2c862b['index']??0x0,'messageId':_0x3e8f96,'chunk':{'type':_0x191b4a(-0x132,-_0x1f2a1f._0x31f735,-0x125,-_0x1f2a1f._0x2754bf),'id':_0x2c862b['id']??'','index':_0x2c862b[_0x5506d2(_0x1f2a1f._0x12587b,_0x1f2a1f._0x5d0ec6,_0x1f2a1f._0x3ac2b9,0x54e)]??0x0,..._0x2c862b['name']!==void 0x0?{'name':_0x2c862b[_0x191b4a(-_0x1f2a1f._0x1c741d,-_0x1f2a1f._0x1927c6,-0xfb,-_0x1f2a1f._0x450dc0)]}:{},..._0x2c862b[_0x5506d2(0x55c,0x58d,0x573,_0x1f2a1f._0x104d4c)]!==void 0x0?{'inputDelta':_0x2c862b['inputDelta']}:{}}};}function createReasoningChunkEvent(_0x820fdc,_0xac5501){const _0x1a453d={_0x59273c:0x68a,_0x369c89:0x19c,_0x189bd2:0x16e,_0x1a474a:0x1ea,_0x500012:0x1fb,_0x1642b8:0x58e,_0x5a9c00:0x5df,_0x4ed0f3:0x597,_0xa3e728:0x17d,_0x18a397:0x13d,_0x18ebc7:0x1cd,_0x12ce18:0x1a0,_0x5b8e21:0x1d9,_0x444dc1:0x237,_0x182019:0x1df,_0x5f429e:0x5ff,_0x524847:0x67a,_0x1ccae0:0x693,_0xc706e5:0x6ba,_0x42c232:0x1b2,_0x4868df:0x194,_0x5273b4:0x5ea,_0x4b40ca:0x5e6,_0x614301:0x1c1,_0x130b1b:0x207,_0x161abb:0x204,_0x271b0e:0x68a,_0x3ee8e8:0x1d7,_0x39edbe:0x1f9,_0x34fd81:0x1e0,_0x59ef2b:0x1c1,_0x353afc:0x1c6,_0x1df8f5:0x69e,_0x96bbd1:0x630},_0x4257b8={_0x574457:0x80};function _0x5d0477(_0x14eee5,_0x567dc8,_0x131898,_0x1aa20a){return _0xa63705(_0x14eee5-0x64,_0x131898,_0x14eee5- -0x122,_0x1aa20a-0xce);}function _0x3598c8(_0x15e55d,_0x4363a9,_0x1a33d6,_0x23c7b5){return _0xa63705(_0x15e55d-_0x4257b8._0x574457,_0x1a33d6,_0x15e55d-0x36c,_0x23c7b5-0x52);}switch(_0x820fdc[_0x3598c8(0x64e,0x68d,_0x1a453d._0x59273c,0x66a)]){case _0x5d0477(0x146,_0x1a453d._0x369c89,0x109,_0x1a453d._0x189bd2):return{'type':'reasoning_chunk','index':_0x820fdc[_0x5d0477(0x1b9,0x1fd,_0x1a453d._0x1a474a,_0x1a453d._0x500012)],'messageId':_0xac5501,'chunk':{'type':'anthropic_thinking_delta','index':_0x820fdc['index']??0x0,'thinking':_0x820fdc[_0x3598c8(0x5da,0x5c9,_0x1a453d._0x1642b8,_0x1a453d._0x5a9c00)]??''},'text':_0x820fdc[_0x3598c8(0x5da,0x601,_0x1a453d._0x4ed0f3,0x617)]??''};case _0x5d0477(0x1d2,0x1fc,0x1c2,0x1de):return{'type':'reasoning_chunk','index':_0x820fdc[_0x5d0477(_0x1a453d._0xa3e728,0x1be,_0x1a453d._0x18a397,_0x1a453d._0xa3e728)],'messageId':_0xac5501,'chunk':{'type':'openai_reasoning_delta','contentIndex':_0x820fdc[_0x5d0477(0x17d,0x187,_0x1a453d._0x18ebc7,_0x1a453d._0x12ce18)]??0x0,'delta':_0x820fdc[_0x5d0477(0x1e4,_0x1a453d._0x5b8e21,_0x1a453d._0x444dc1,_0x1a453d._0x182019)]??'','itemId':_0x820fdc['itemId']??'','outputIndex':_0x820fdc[_0x3598c8(0x63a,0x5f0,_0x1a453d._0x5f429e,_0x1a453d._0x524847)]??0x0},'text':_0x820fdc[_0x3598c8(0x672,_0x1a453d._0x1ccae0,_0x1a453d._0xc706e5,0x67c)]??''};case _0x5d0477(_0x1a453d._0x42c232,_0x1a453d._0x4868df,0x17d,0x1ad):return{'type':_0x3598c8(_0x1a453d._0x5273b4,0x5d5,_0x1a453d._0x4b40ca,0x5dd),'index':_0x820fdc[_0x5d0477(_0x1a453d._0x614301,_0x1a453d._0x130b1b,0x208,_0x1a453d._0x161abb)],'messageId':_0xac5501,'chunk':{'type':_0x5d0477(0x1b2,0x1a2,0x17b,0x159),'delta':_0x820fdc[_0x3598c8(0x672,0x618,_0x1a453d._0x271b0e,0x67c)]??'','itemId':_0x820fdc[_0x5d0477(0x19b,_0x1a453d._0x3ee8e8,0x1b6,0x175)]??'','outputIndex':_0x820fdc[_0x5d0477(0x1ac,_0x1a453d._0x39edbe,0x19d,_0x1a453d._0x34fd81)]??0x0,'summaryIndex':_0x820fdc[_0x5d0477(_0x1a453d._0x59ef2b,0x1bb,_0x1a453d._0x353afc,0x175)]??0x0},'text':_0x820fdc[_0x3598c8(0x672,_0x1a453d._0x1df8f5,0x647,_0x1a453d._0x96bbd1)]??''};default:return void 0x0;}}function isAbortedToolResult(_0x1eb788){const _0x3159a7={_0x1c0e46:0x33,_0x1e6c74:0x18,_0x253298:0x14,_0x2b393d:0x82,_0x121719:0x27,_0x401ec3:0x6f},_0x477db4={_0x302881:0xa4,_0x370437:0x4b,_0x3f54cd:0xca},_0x46327e={_0x4298c4:0xc4};function _0xb9ceaa(_0x5036c3,_0x938b80,_0x6797f3,_0x4caa6f){return _0x17556f(_0x4caa6f-0x6da,_0x5036c3,_0x6797f3-_0x46327e._0x4298c4,_0x4caa6f-0xb1);}function _0x34056f(_0x4898b5,_0x46f1ec,_0x3dc177,_0x271222){return _0x17556f(_0x271222-_0x477db4._0x302881,_0x4898b5,_0x3dc177-_0x477db4._0x370437,_0x271222-_0x477db4._0x3f54cd);}return _0x1eb788[_0x34056f(_0x3159a7._0x1c0e46,-0x63,0x1,-_0x3159a7._0x1e6c74)]===_0xb9ceaa(0x593,0x55f,0x589,0x5a8)&&_0x1eb788[_0x34056f(-0x5a,-_0x3159a7._0x253298,-0x87,-0x47)][_0x34056f(-0x69,-_0x3159a7._0x2b393d,-_0x3159a7._0x121719,-_0x3159a7._0x401ec3)]===!![];}async function executeModelRequest(_0x393b7a,_0x40d80f,_0x25d5c7,_0x491e70,_0x4bf663){const _0xef5393={_0x5c2656:0x156,_0x324f29:0xcc,_0x3b2017:0xfb,_0x19b4e2:0x119,_0x6efc33:0x111,_0x528d94:0x105,_0x275e1d:0x74,_0x363dff:0xf2,_0x306709:0xf0,_0x4bac1d:0x13d,_0x459d01:0x162,_0x236e4d:0x147,_0xd910af:0x17b,_0x57190e:0xf1,_0x21207b:0x155,_0x3d346c:0x10f,_0x56d2d9:0x89,_0x547d57:0xed,_0x470e0a:0xcb,_0x247065:0x116,_0x5e952d:0x7d,_0x58696b:0xa7,_0x243499:0x180,_0x2ebd56:0x184,_0x584bba:0xe8,_0xa2d90d:0x16e,_0x1beee1:0xe8,_0x12ff2e:0x134,_0x42fa49:0x17c,_0x4d274e:0x124,_0x4614b1:0x15f,_0x144d95:0x147,_0x14600a:0xd1,_0x4e0fe4:0x76,_0xa2a5a1:0xb5,_0x5a7895:0xfa,_0x2f8310:0x14f,_0x43232a:0xe4,_0x59c3c0:0xcf,_0x4564c1:0xab,_0x3c4798:0x64,_0x5a282a:0xdd,_0x43d437:0x12c,_0x10b86e:0x186,_0x347e3e:0xe5,_0x2081a0:0xbf,_0x46a02a:0x8f,_0x2ff041:0x79,_0x1624eb:0x61,_0x3c86dd:0x16b,_0x2a4c9b:0x11c,_0x18b082:0x127,_0x74badc:0xf0,_0x295a37:0x82,_0x234af0:0x188,_0x55dc52:0x196,_0x11aa04:0x8f,_0x4e1159:0x110,_0x7f0c30:0x123,_0x32b43d:0xf8,_0x5ed778:0x15a,_0x112fad:0x10b,_0x5edd5f:0xfe,_0x5002d5:0x6a,_0x40f2d1:0x9d,_0x485f3c:0xeb,_0xc794a4:0xee,_0x52efe5:0xd8,_0x4f1565:0xa4,_0x5f14f6:0x92},_0x736aa9={_0x2cd45c:0x1f3,_0x18b7f9:0x1b0};throwIfAborted(_0x40d80f[_0x903b1e(_0xef5393._0x5c2656,0x125,_0xef5393._0x324f29,0xfe)]);function _0x903b1e(_0x30cf70,_0x588d4e,_0x38ad14,_0x2a84ff){return _0x17556f(_0x588d4e-0x1c3,_0x2a84ff,_0x38ad14-0x92,_0x2a84ff-0x169);}if(!_0x40d80f['streaming']||!_0x25d5c7[_0x903b1e(_0xef5393._0x3b2017,0x119,0xe2,0xd0)]['stream'])return await _0x25d5c7[_0x903b1e(0xe5,_0xef5393._0x19b4e2,_0xef5393._0x6efc33,0xd9)][_0x30a500(_0xef5393._0x528d94,0x68,0xbb,_0xef5393._0x275e1d)](_0x393b7a,{'signal':_0x40d80f[_0x30a500(_0xef5393._0x363dff,_0xef5393._0x306709,_0xef5393._0x4bac1d,0xfe)]});function _0x30a500(_0x496898,_0x2ae611,_0x56a015,_0x707a3d){return _0xa63705(_0x496898-_0x736aa9._0x2cd45c,_0x2ae611,_0x56a015- -0x1bb,_0x707a3d-_0x736aa9._0x18b7f9);}let _0x5ad653;for await(const _0x20edb9 of _0x25d5c7['chatModel'][_0x30a500(_0xef5393._0x4bac1d,_0xef5393._0x459d01,_0xef5393._0x236e4d,_0xef5393._0xd910af)](_0x393b7a,{'signal':_0x40d80f['signal']})){throwIfAborted(_0x40d80f[_0x30a500(_0xef5393._0x57190e,0x114,0x13d,0xe8)]);if(_0x20edb9[_0x903b1e(_0xef5393._0x21207b,_0xef5393._0x3d346c,0x113,0xe0)]===_0x30a500(_0xef5393._0x56d2d9,_0xef5393._0x547d57,_0xef5393._0x470e0a,_0xef5393._0x247065)){_0x4bf663['meta'][_0x30a500(_0xef5393._0x5e952d,0x5e,_0xef5393._0x58696b,0x52)]!==void 0x0&&_0x4bf663[_0x30a500(_0xef5393._0x243499,_0xef5393._0x2ebd56,0x134,0x170)][_0x903b1e(0xd0,0x123,0x132,_0xef5393._0x584bba)]===void 0x0&&(_0x4bf663[_0x30a500(_0xef5393._0xa2d90d,_0xef5393._0x1beee1,_0xef5393._0x12ff2e,0x17d)]['reasoningCompletedAt']=Date[_0x903b1e(_0xef5393._0x42fa49,_0xef5393._0x4d274e,_0xef5393._0x4614b1,_0xef5393._0x144d95)]());_0x5ad653=_0x20edb9['response'];continue;}if(_0x20edb9[_0x903b1e(0xfe,0x10f,0x10d,0x104)]==='provider_retry'){await emitEvent2(_0x25d5c7[_0x30a500(_0xef5393._0x14600a,_0xef5393._0x4e0fe4,_0xef5393._0xa2a5a1,0xba)],_0x20edb9,_0x491e70);continue;}const _0x2e873b=createReasoningChunkEvent(_0x20edb9,_0x4bf663[_0x903b1e(0xc4,0xb9,0xff,_0xef5393._0x5a7895)]);if(_0x2e873b&&_0x2e873b[_0x30a500(_0xef5393._0x2f8310,_0xef5393._0x43232a,0x127,0x108)]===_0x903b1e(_0xef5393._0x59c3c0,_0xef5393._0x4564c1,_0xef5393._0x3c4798,_0xef5393._0x5a282a)&&_0x2e873b[_0x903b1e(0x13c,_0xef5393._0x43d437,0x126,_0xef5393._0x10b86e)][_0x903b1e(0xcc,_0xef5393._0x347e3e,0x108,_0xef5393._0x2081a0)]>0x0){_0x4bf663['meta'][_0x903b1e(0xb5,_0xef5393._0x46a02a,_0xef5393._0x2ff041,_0xef5393._0x1624eb)]===void 0x0&&(_0x4bf663[_0x903b1e(_0xef5393._0x3c86dd,_0xef5393._0x2a4c9b,0x15b,_0xef5393._0x18b082)][_0x30a500(_0xef5393._0x74badc,_0xef5393._0x295a37,0xa7,0x64)]=Date[_0x30a500(_0xef5393._0x234af0,0x172,0x13c,_0xef5393._0x55dc52)]());await emitEvent2(_0x25d5c7['onEvent'],_0x2e873b,_0x491e70);continue;}const _0x262175=createAssistantChunkEvent(_0x20edb9,_0x4bf663['assistantMessageId']);if(_0x262175){_0x4bf663['meta'][_0x903b1e(_0xef5393._0x275e1d,_0xef5393._0x11aa04,0xbf,0x46)]!==void 0x0&&_0x4bf663[_0x30a500(0xde,0xf2,0x134,0x121)][_0x903b1e(_0xef5393._0x4e1159,_0xef5393._0x7f0c30,_0xef5393._0x32b43d,_0xef5393._0x5ed778)]===void 0x0&&(_0x4bf663[_0x903b1e(0x172,0x11c,0x151,0x107)]['reasoningCompletedAt']=Date[_0x903b1e(0x14d,_0xef5393._0x4d274e,_0xef5393._0x112fad,_0xef5393._0x5edd5f)]());await emitEvent2(_0x25d5c7[_0x903b1e(_0xef5393._0x5002d5,_0xef5393._0x40f2d1,0xbd,_0xef5393._0x485f3c)],_0x262175,_0x491e70);continue;}const _0x56afe2=createToolUseChunkEvent(_0x20edb9,_0x4bf663['assistantMessageId']);_0x56afe2&&await emitEvent2(_0x25d5c7[_0x903b1e(0x7c,_0xef5393._0x40f2d1,0xae,_0xef5393._0xc794a4)],_0x56afe2,_0x491e70);}if(!_0x5ad653)throw new Error(_0x903b1e(_0xef5393._0x52efe5,_0xef5393._0x4f1565,0x95,_0xef5393._0x5f14f6));return _0x5ad653;}function makeTurnGuards(_0x4f596d,_0x5d399c,_0x475991,_0x3e3b7f,_0x2544c1){return{async 'stage'(_0x1305e8,_0x10f6e7){return throwIfAborted(_0x4f596d),await runStage(_0x5d399c,_0x1305e8,_0x10f6e7,_0x3e3b7f);},async 'emit'(_0xb3582a){throwIfAborted(_0x4f596d),await emitEvent2(_0x475991,_0xb3582a,_0x2544c1);},async 'stageUnchecked'(_0x2a323d,_0x6a2c86){return await runStage(_0x5d399c,_0x2a323d,_0x6a2c86,_0x3e3b7f);},async 'emitUnchecked'(_0x3cf70e){await emitEvent2(_0x475991,_0x3cf70e,_0x2544c1);}};}async function runTurn(_0x1fcc16,_0x1ff53c){const _0x3c7a42={_0x32f3db:0x30c,_0x55e2f2:0x29f,_0x195e1c:0x2cc,_0x93d06a:0x405,_0x2297f7:0x3e3,_0x6176a8:0x2d2,_0x47d9cd:0x371,_0xf7636e:0x39e,_0x3aeb0c:0x3f4,_0xf74e73:0x3cc,_0x2f40e5:0x37a,_0x372512:0x3b7,_0x134020:0x3eb,_0xe1f557:0x3b2,_0x119191:0x379,_0x17e1be:0x290,_0x4aba1f:0x280,_0x5bec5e:0x3ba,_0x2ca87c:0x2dd,_0x44286d:0x2fc,_0x4dfe6b:0x24c,_0x2df0b2:0x299,_0x536f19:0x241,_0x17ed12:0x25a,_0x5c47f4:0x28f,_0x2e6542:0x2bf,_0x232942:0x2f8,_0x3593fa:0x2a4,_0x2e02e9:0x27b,_0x35497f:0x2a5,_0x1cbff1:0x32a,_0x11265b:0x354,_0x29b9db:0x340,_0x13a714:0x2ce,_0xfda6f1:0x2e2,_0x2a3db8:0x3a0,_0x28af31:0x292,_0x39e253:0x39d,_0x27a6dd:0x26f,_0x461d33:0x2ad,_0x54baed:0x3e4,_0x2480ae:0x3a6,_0x41bc29:0x35a,_0x272b80:0x3c8,_0x58b374:0x26b,_0x3536ae:0x3b7,_0x34c70e:0x362,_0x72d31d:0x402,_0x1dfa84:0x426,_0x449337:0x385,_0x2133d5:0x366,_0x88687c:0x32b,_0x161f1d:0x22f,_0x416f3d:0x380,_0x95ebe2:0x3cf,_0x44aa9a:0x24d,_0x2a6a80:0x3e6,_0x6e2921:0x3d6,_0x1fb358:0x42f,_0x1d3cc0:0x2e7,_0x21cd6d:0x2d4,_0x4ec419:0x2e9,_0x2d82f4:0x213,_0xcb089a:0x251,_0xc811a0:0x2c9,_0x45ec69:0x2d7,_0x128d60:0x286,_0x76bce0:0x25b,_0x35fca5:0x22b,_0x20a70b:0x289,_0x947b67:0x23e,_0x1c9e4b:0x42b,_0x1d810d:0x2f4,_0x17696d:0x2a3,_0x23f0ce:0x263,_0x5565e2:0x256,_0x4162ea:0x21b,_0x1bcfa2:0x25d,_0x52b7eb:0x3ee,_0x2ef681:0x3e9,_0x21466c:0x3cb,_0x5f28b6:0x3a3,_0x5ce76b:0x36c,_0x4d3274:0x335,_0xbfdb4a:0x39a,_0xa64366:0x38d,_0x47b788:0x354,_0x2d776f:0x382,_0xd296ee:0x360,_0xed1a60:0x288,_0x55723a:0x378,_0x4d8b16:0x3be,_0x4f32cb:0x385,_0x4bf54c:0x1fd,_0x36204f:0x28d,_0x3fe4f3:0x390,_0x598ef4:0x3c1,_0x2b5704:0x278,_0x482893:0x238,_0xf687a8:0x224,_0x469d55:0x2c2,_0x292ff3:0x376,_0x2be6f8:0x367,_0x467cbe:0x392,_0x43cf80:0x390,_0x147dd6:0x254,_0x56d5f0:0x226},_0x4aa163={_0x2d3d68:0x2f,_0xbf256b:0xc,_0x4f3b5a:0x62},_0x2f5ec3={_0x49d5a4:0x1b5,_0x31e513:0xf6},_0x5da41b={_0x109225:0x15e},_0x3490ab={_0x5d2256:0x1},_0x265689={_0x1e216f:0x60},_0x593d4a=_0x1fcc16[_0x1c4776(0x2c9,_0x3c7a42._0x32f3db,_0x3c7a42._0x55e2f2,_0x3c7a42._0x195e1c)]??new AbortController()[_0x23a432(_0x3c7a42._0x93d06a,0x445,_0x3c7a42._0x2297f7,0x45b)],_0x43033c={'sessionId':_0x1fcc16[_0x1c4776(0x2a9,0x2f9,0x302,_0x3c7a42._0x6176a8)],'turnId':_0x1fcc16['turnId'],'system':normalizeSystem(_0x1fcc16[_0x23a432(0x37f,_0x3c7a42._0x47d9cd,0x347,_0x3c7a42._0xf7636e)]),'messages':(_0x1fcc16[_0x23a432(0x3e0,0x3f1,0x3fa,_0x3c7a42._0x3aeb0c)]??[])[_0x23a432(0x3c4,_0x3c7a42._0xf74e73,_0x3c7a42._0x2f40e5,_0x3c7a42._0x372512)](normalizeMessage),'lastResponse':void 0x0,'toolResults':[],'finalMessage':void 0x0,'sessionDir':typeof _0x1ff53c[_0x23a432(0x3cc,_0x3c7a42._0x134020,_0x3c7a42._0xe1f557,0x37a)]==='function'?_0x1ff53c[_0x23a432(0x3cc,_0x3c7a42._0x119191,0x3f3,0x3f2)]():_0x1ff53c[_0x1c4776(_0x3c7a42._0x17e1be,0x286,_0x3c7a42._0x4aba1f,0x252)]},_0x5f1765=makeExtensionContext(_0x43033c);function _0x23a432(_0x2dce6f,_0x19410a,_0x5c2b2c,_0x3b5256){return _0xa63705(_0x2dce6f-0xeb,_0x19410a,_0x2dce6f-0x10d,_0x3b5256-_0x265689._0x1e216f);}function _0x1c4776(_0x1c8ff6,_0x10d2f3,_0x59d3af,_0x47b1f5){return _0x17556f(_0x1c8ff6-0x367,_0x10d2f3,_0x59d3af-_0x3490ab._0x5d2256,_0x47b1f5-0x190);}const _0x66a4b3={'sessionId':_0x43033c['sessionId'],'turnId':_0x43033c[_0x23a432(0x3b2,_0x3c7a42._0x5bec5e,0x3a9,0x3ee)],'state':_0x43033c,'signal':_0x593d4a,..._0x1ff53c['askUser']?{'askUser':_0x1ff53c[_0x1c4776(_0x3c7a42._0x2ca87c,_0x3c7a42._0x44286d,0x2d8,0x2ae)]}:{},..._0x1ff53c[_0x1c4776(_0x3c7a42._0x4dfe6b,0x280,_0x3c7a42._0x2df0b2,0x285)]?{'setTopic':_0x1ff53c['setTopic']}:{}},{stage:_0x4bc483,emit:_0x531437,stageUnchecked:_0x4ffc59,emitUnchecked:_0x324bae}=makeTurnGuards(_0x593d4a,_0x1ff53c['registry'],_0x1ff53c[_0x1c4776(_0x3c7a42._0x536f19,0x203,_0x3c7a42._0x17ed12,_0x3c7a42._0x5c47f4)],_0x5f1765,_0x66a4b3),_0x323de9=async(_0x4d131c,_0x335b89)=>{const _0x2547ab=_0x335b89?{..._0x5f1765,'turnMeta':_0x335b89}:_0x5f1765;function _0xffd138(_0x50c1bf,_0x3051fd,_0x4ffc78,_0x229571){return _0x1c4776(_0x3051fd-_0x5da41b._0x109225,_0x229571,_0x4ffc78-0x1dc,_0x229571-0x149);}function _0x4eb1c5(_0x2fb4ad,_0x4301fd,_0x4fea0c,_0x535302){return _0x23a432(_0x535302- -0x370,_0x4fea0c,_0x4fea0c-_0x2f5ec3._0x49d5a4,_0x535302-_0x2f5ec3._0x31e513);}await _0x1ff53c['registry'][_0x4eb1c5(0x2d,-0xa,0x7c,_0x4aa163._0x2d3d68)](_0x4eb1c5(0x91,_0x4aa163._0xbf256b,_0x4aa163._0x4f3b5a,0x39),structuredClone(_0x4d131c),_0x2547ab);};let _0x5813bf=0x0;try{const _0x31d2ee=await _0x4bc483('onUserMessage',normalizeMessage(_0x1fcc16[_0x1c4776(_0x3c7a42._0x2e6542,0x313,0x272,_0x3c7a42._0x232942)]));_0x43033c[_0x1c4776(_0x3c7a42._0x3593fa,0x26d,_0x3c7a42._0x2e02e9,_0x3c7a42._0x35497f)][_0x23a432(0x376,_0x3c7a42._0x1cbff1,_0x3c7a42._0x11265b,_0x3c7a42._0x29b9db)](_0x31d2ee),await _0x323de9(_0x31d2ee),await _0x531437({'type':'user_message','message':_0x31d2ee});while(!![]){throwIfAborted(_0x593d4a),_0x5813bf+=0x1;const _0x7c5479=createAssistantMessageId(_0x43033c['turnId'],_0x5813bf),_0x3c8170=createReasoningMessageId(_0x7c5479),_0x141361={'model':_0x1ff53c[_0x1c4776(0x2bd,_0x3c7a42._0x13a714,_0x3c7a42._0xfda6f1,0x309)][_0x23a432(0x3f6,0x41d,0x3e6,_0x3c7a42._0x2a3db8)],..._0x1ff53c[_0x1c4776(0x2bd,_0x3c7a42._0x28af31,0x2c0,0x2fa)][_0x23a432(0x3bf,0x411,0x36c,_0x3c7a42._0x39e253)]?{'provider':_0x1ff53c['chatModel']['provider']}:{}};let _0x5f21d3={'model':_0x1ff53c['chatModel']['model'],..._0x1ff53c[_0x1c4776(0x2bd,0x280,0x275,0x2ef)]['maxTokens']!==void 0x0?{'maxTokens':_0x1ff53c[_0x1c4776(0x2bd,0x2b2,0x268,_0x3c7a42._0x27a6dd)][_0x1c4776(0x2ce,0x2dc,_0x3c7a42._0x461d33,0x2e2)]}:{},'system':structuredClone(_0x43033c['system']),'messages':structuredClone(_0x43033c['messages']),'tools':_0x1ff53c['toolRuntime'][_0x23a432(0x3c8,_0x3c7a42._0x54baed,0x414,_0x3c7a42._0x2480ae)](),'metadata':{'sessionId':_0x43033c['sessionId'],'turnId':_0x43033c['turnId']},..._0x1ff53c['outputFormat']?{'outputFormat':_0x1ff53c[_0x23a432(0x3a7,_0x3c7a42._0x41bc29,_0x3c7a42._0x272b80,0x3aa)]}:{}};_0x5f21d3=await _0x4bc483('beforeModelRequest',_0x5f21d3),await _0x531437({'type':_0x1c4776(0x240,_0x3c7a42._0x58b374,0x25c,0x20a),'request':_0x5f21d3}),_0x141361[_0x23a432(_0x3c7a42._0x3536ae,_0x3c7a42._0x34c70e,_0x3c7a42._0x72d31d,0x405)]=Date['now']();let _0x443ff6=await executeModelRequest(_0x5f21d3,_0x1fcc16,_0x1ff53c,_0x66a4b3,{'assistantMessageId':_0x7c5479,'reasoningMessageId':_0x3c8170,'meta':_0x141361});_0x141361['turnCompletedAt']=Date[_0x23a432(0x404,0x44a,0x458,_0x3c7a42._0x1dfa84)](),_0x443ff6=await _0x4bc483(_0x23a432(0x3b6,0x3e1,_0x3c7a42._0x449337,_0x3c7a42._0x2133d5),_0x443ff6),await _0x531437({'type':_0x23a432(_0x3c7a42._0x2f40e5,0x379,0x357,_0x3c7a42._0x88687c),'response':_0x443ff6}),_0x43033c[_0x1c4776(_0x3c7a42._0x161f1d,0x214,0x1ee,0x256)]=_0x443ff6;let _0x164267=await _0x4bc483(_0x23a432(_0x3c7a42._0x416f3d,_0x3c7a42._0x95ebe2,0x38d,0x3b1),withMessageId(responseToAssistantMessage(_0x443ff6),_0x7c5479));_0x164267=withMessageId(_0x164267,_0x7c5479);const _0x113f56=getToolUseBlocks(_0x164267),_0x33a897=await Promise['all'](_0x113f56['map'](_0x491318=>_0x4bc483(_0x1c4776(0x2a6,0x2ed,0x2b2,0x2a2),_0x491318)));_0x33a897[_0x23a432(0x3c5,0x3e4,0x3ef,0x409)]>0x0&&(_0x164267=replaceToolUseBlocks(_0x164267,_0x33a897));const _0x15dc7e=withMessageId(_0x164267,_0x7c5479);_0x164267=_0x15dc7e;const _0x22af31=createReasoningMessage(_0x164267),_0x5edbf8=createAssistantTextMessage(_0x164267),_0x26a93c=createToolUseMessage(_0x164267);_0x22af31&&await _0x531437({'type':_0x1c4776(_0x3c7a42._0x44aa9a,0x23b,0x22b,0x255),'message':withMessageId(_0x22af31,_0x3c8170)});_0x5edbf8&&await _0x531437({'type':_0x23a432(_0x3c7a42._0x2a6a80,_0x3c7a42._0x6e2921,_0x3c7a42._0x1fb358,0x38c),'message':withMessageId(_0x5edbf8,_0x7c5479)});_0x26a93c&&await _0x531437({'type':_0x1c4776(0x2da,_0x3c7a42._0x1d3cc0,0x318,_0x3c7a42._0x21cd6d),'message':withMessageId(_0x26a93c,_0x7c5479)});_0x43033c[_0x1c4776(_0x3c7a42._0x3593fa,_0x3c7a42._0x4ec419,0x25a,0x294)]['push'](_0x15dc7e);_0x33a897['length']>0x0&&await _0x323de9(_0x15dc7e,_0x141361);for(const _0x255ad2 of _0x33a897){await _0x531437({'type':_0x1c4776(0x267,_0x3c7a42._0x2d82f4,_0x3c7a42._0xcb089a,0x26c),'toolCall':_0x255ad2});}if(_0x33a897[_0x1c4776(0x289,_0x3c7a42._0xc811a0,0x2cd,_0x3c7a42._0x45ec69)]===0x0){const _0x14db64=await _0x4bc483('beforeFinalOutput',_0x164267),_0x2c9a98=withMessageId(_0x14db64,_0x7c5479);return _0x43033c[_0x1c4776(0x27d,_0x3c7a42._0x128d60,_0x3c7a42._0x76bce0,_0x3c7a42._0x35fca5)]=_0x2c9a98,_0x43033c['messages'][_0x43033c['messages'][_0x1c4776(_0x3c7a42._0x20a70b,_0x3c7a42._0x947b67,0x2a0,0x259)]-0x1]=_0x2c9a98,await _0x323de9(_0x2c9a98,_0x141361),await _0x531437({'type':_0x23a432(0x406,0x432,_0x3c7a42._0x1c9e4b,0x3ca),'message':_0x2c9a98}),throwIfAborted(_0x593d4a),await _0x1ff53c[_0x1c4776(0x2a0,_0x3c7a42._0x1d810d,0x2f8,_0x3c7a42._0x17696d)][_0x1c4776(_0x3c7a42._0x23f0ce,0x247,_0x3c7a42._0x5565e2,_0x3c7a42._0x4162ea)](_0x1c4776(0x29c,0x246,0x2a6,_0x3c7a42._0x1bcfa2),_0x43033c,_0x5f1765),await _0x531437({'type':'turn_complete','state':_0x43033c}),{'status':_0x23a432(_0x3c7a42._0x52b7eb,_0x3c7a42._0x2ef681,_0x3c7a42._0x21466c,_0x3c7a42._0x5f28b6),'finalMessage':_0x2c9a98,'state':_0x43033c};}let _0x43c28b=await _0x1ff53c['toolRuntime'][_0x23a432(0x36a,_0x3c7a42._0x5ce76b,_0x3c7a42._0x4d3274,_0x3c7a42._0xbfdb4a)](_0x33a897,_0x66a4b3);const _0xd9a0b0=_0x43c28b[_0x23a432(_0x3c7a42._0xa64366,0x3e3,0x373,_0x3c7a42._0x47b788)](isAbortedToolResult),_0x1be17d=_0xd9a0b0?_0x4ffc59:_0x4bc483,_0x3fc52b=_0xd9a0b0?_0x324bae:_0x531437;_0x43c28b=await Promise[_0x23a432(_0x3c7a42._0x2d776f,_0x3c7a42._0xd296ee,0x3cc,0x3d1)](_0x43c28b[_0x1c4776(_0x3c7a42._0xed1a60,0x253,0x27a,0x236)](_0x3200a9=>_0x1be17d('afterToolResult',_0x3200a9))),_0x43033c[_0x23a432(_0x3c7a42._0x55723a,_0x3c7a42._0x4d8b16,0x344,_0x3c7a42._0x4f32cb)][_0x1c4776(0x23a,_0x3c7a42._0x4bf54c,0x23e,_0x3c7a42._0x36204f)](..._0x43c28b);for(const _0x42a9dd of _0x43c28b){await _0x3fc52b({'type':_0x23a432(0x374,0x3a7,_0x3c7a42._0x3fe4f3,_0x3c7a42._0x598ef4),'result':_0x42a9dd});}const _0x3bee02=await _0x1be17d(_0x1c4776(0x22c,0x1ec,0x286,0x1ef),createToolResultUserMessage(_0x43c28b));await _0x3fc52b({'type':_0x1c4776(_0x3c7a42._0x2b5704,_0x3c7a42._0x482893,_0x3c7a42._0xf687a8,_0x3c7a42._0x469d55),'message':_0x3bee02}),_0x43033c['messages'][_0x23a432(_0x3c7a42._0x292ff3,0x330,_0x3c7a42._0x2be6f8,_0x3c7a42._0x467cbe)](_0x3bee02),await _0x323de9(_0x3bee02);if(_0xd9a0b0)return{'status':_0x23a432(_0x3c7a42._0x43cf80,0x33f,0x39a,0x3dc),'state':_0x43033c};}}catch(_0xe1b7a){if(!_0x593d4a['aborted'])throw new TurnFailedError(_0xe1b7a,_0x43033c);return{'status':_0x1c4776(_0x3c7a42._0x147dd6,0x286,0x239,_0x3c7a42._0x56d5f0),'state':_0x43033c};}}function createSessionId(){const _0xc1143d={_0x332308:0x327,_0x5a63eb:0x36c,_0x5284c7:0x1dc,_0x3d7c18:0x1ef,_0x2c30ae:0x1a2},_0x268a02={_0x34a68b:0x1b5,_0x81fb6d:0x1ec},_0x1cef78={_0xcff708:0x4e};function _0x3f38f6(_0x4eda4f,_0x5d8d01,_0x2fbbf1,_0x4c1a64){return _0x17556f(_0x5d8d01-0x2c3,_0x4eda4f,_0x2fbbf1-_0x1cef78._0xcff708,_0x4c1a64-0x1ec);}function _0x428aaa(_0x22f9cb,_0x1148d9,_0x1f3cc9,_0x3df02d){return _0xa63705(_0x22f9cb-_0x268a02._0x34a68b,_0x1148d9,_0x3df02d-0xab,_0x3df02d-_0x268a02._0x81fb6d);}return'session-'+Date['now']()+'-'+Math['random']()[_0x428aaa(0x3b3,_0xc1143d._0x332308,0x39a,_0xc1143d._0x5a63eb)](0x10)[_0x3f38f6(_0xc1143d._0x5284c7,0x1af,_0xc1143d._0x3d7c18,_0xc1143d._0x2c30ae)](0x2,0xa);}function createTurnId(_0xf8f95d){const _0x520391={_0x451662:0x1d9},_0x3d402f={_0x220b96:0x84,_0x5ceafc:0x107,_0x2aa3a7:0x13};function _0x4b8f77(_0x5990d8,_0xd5fd48,_0x224f1e,_0x544655){return _0xa63705(_0x5990d8-_0x3d402f._0x220b96,_0x5990d8,_0xd5fd48- -_0x3d402f._0x5ceafc,_0x544655-_0x3d402f._0x2aa3a7);}return _0x4b8f77(0x1ee,0x1b2,_0x520391._0x451662,0x165)+_0xf8f95d;}function createDefaultMessage(_0x1b595c){if(_0x1b595c===void 0x0)return void 0x0;return normalizeUserInput(_0x1b595c);}function normalizeUserInput(_0xbcf659){const _0x484cb2={_0x690f96:0x387,_0x1a43c2:0x391,_0x4f23c4:0x33d,_0x55d28a:0x405,_0x33bf30:0x423,_0x24b2bf:0x441},_0x299548={_0x4088a1:0x4b8},_0x5d0660={_0x1e1edb:0xbf};function _0x12472b(_0x764bd6,_0x3b0ffe,_0x3c3689,_0x1f0b03){return _0xa63705(_0x764bd6-0x80,_0x3c3689,_0x3b0ffe-0x184,_0x1f0b03-_0x5d0660._0x1e1edb);}if(typeof _0xbcf659===_0x38e535(_0x484cb2._0x690f96,0x3cf,_0x484cb2._0x1a43c2,_0x484cb2._0x4f23c4))return{'role':'user','content':[{'type':_0x38e535(0x421,_0x484cb2._0x55d28a,_0x484cb2._0x33bf30,_0x484cb2._0x24b2bf),'text':_0xbcf659}]};function _0x38e535(_0x462401,_0x45e225,_0x20089e,_0x3e0f07){return _0x17556f(_0x462401-_0x299548._0x4088a1,_0x45e225,_0x20089e-0xd4,_0x3e0f07-0x7d);}return normalizeMessage(_0xbcf659);}function resolveChatModel(_0x4b92e6){const _0x466343={_0x55aea8:0x589,_0x2f3964:0x57e},_0x20f37d={_0x2982a3:0x299};function _0x1c5a10(_0x199e0a,_0x371670,_0x208d1b,_0x1ea5f1){return _0xa63705(_0x199e0a-0x16d,_0x208d1b,_0x371670-_0x20f37d._0x2982a3,_0x1ea5f1-0x190);}if(!_0x4b92e6['chatModel'])throw new Error(_0x1c5a10(0x581,_0x466343._0x55aea8,_0x466343._0x2f3964,0x595));return _0x4b92e6['chatModel'];}function createRegistry(_0x272cbe){const _0x294a8f={_0x458cda:0x9e,_0x13e603:0x66,_0x5e6068:0xd7,_0x16920a:0xd0},_0x4595e3={_0x801bcb:0x112,_0x490fcd:0x231,_0x1f4d5c:0x5a},_0xeff3ba={_0x3fb10e:0x9b};function _0x53fe3a(_0x459493,_0x584de0,_0x2177b9,_0x2293dd){return _0x17556f(_0x459493-0x68a,_0x584de0,_0x2177b9-_0xeff3ba._0x3fb10e,_0x2293dd-0x1e9);}if(_0x272cbe[_0x4ea8fc(_0x294a8f._0x458cda,_0x294a8f._0x13e603,0x7d,0x55)])return _0x272cbe['registry'];const _0x2eddcc=createExtensionRegistry(),_0x554593=_0x272cbe[_0x4ea8fc(_0x294a8f._0x5e6068,0xac,0x107,_0x294a8f._0x16920a)]??[];function _0x4ea8fc(_0x7c708f,_0x449a80,_0x45db5e,_0x21c335){return _0xa63705(_0x7c708f-_0x4595e3._0x801bcb,_0x449a80,_0x7c708f- -_0x4595e3._0x490fcd,_0x21c335-_0x4595e3._0x1f4d5c);}for(const _0x50e361 of _0x554593){_0x2eddcc['register'](_0x50e361);}return _0x2eddcc;}var Agent=class{[_0xa63705(0x2e3,0x31e,0x2e5,0x2ca)];[_0x17556f(-0x10b,-0xee,-0x120,-0x163)];[_0xa63705(0x343,0x306,0x2ed,0x2c9)];[_0xa63705(0x2be,0x30c,0x2d8,0x2c8)];['messages'];[_0xa63705(0x308,0x315,0x2cc,0x290)];[_0xa63705(0x213,0x220,0x266,0x265)];constructor(_0x50b221={}){const _0x4d920f={_0xdf800a:0x145,_0x4bd407:0x190,_0x316d9b:0x1d7,_0x45fdcc:0x1cc,_0x36b1b1:0xff,_0x164131:0x14c,_0x34bec5:0x128,_0x5e7d97:0x19a,_0x28acd5:0x177,_0x375cb1:0x1eb,_0x3aebd6:0x165,_0x40b4b7:0x138,_0x279479:0x141,_0x32fa73:0x1a6,_0xbd5ca8:0x1de,_0x260e66:0x15a,_0x1da89f:0x10e,_0xa1e390:0x160,_0x311809:0x165,_0x38dd5a:0x152,_0x213acb:0xff,_0x45d6b2:0xfd},_0x5a1d34={_0x254708:0x7d},_0x53c161={_0xdec8e5:0xc2,_0x55942d:0xd7},_0x5a1386={_0x3f12d5:0x73};this[_0x36f6af(_0x4d920f._0xdf800a,_0x4d920f._0x4bd407,_0x4d920f._0x316d9b,0x1e3)]=_0x50b221['sessionId']??createSessionId();function _0x13d1e5(_0x48de95,_0x539c71,_0x3e6f4f,_0x3a8f81){return _0x17556f(_0x48de95- -0x89,_0x539c71,_0x3e6f4f-_0x5a1386._0x3f12d5,_0x3a8f81-0x10c);}this['turnIndex']=0x0,this[_0x36f6af(_0x4d920f._0x45fdcc,0x19d,0x14f,0x1d9)]=_0x50b221['systemPrompt']??'',this[_0x13d1e5(-0x14c,-0x1a5,-_0x4d920f._0x36b1b1,-0x10a)]=(_0x50b221[_0x13d1e5(-_0x4d920f._0x164131,-_0x4d920f._0x34bec5,-_0x4d920f._0x5e7d97,-0x19f)]??[])['map'](normalizeMessage),this['defaultMessage']=createDefaultMessage(_0x50b221['message']),this[_0x36f6af(_0x4d920f._0x28acd5,0x1a5,_0x4d920f._0x375cb1,0x1a3)]=createAgentMetrics({'getContextWindowLimit':_0x50b221[_0x13d1e5(-_0x4d920f._0x3aebd6,-0x1a2,-_0x4d920f._0x40b4b7,-0x18a)]});const _0x199f6b=_0x50b221[_0x36f6af(0x116,_0x4d920f._0x34bec5,0x154,0x10e)],_0x28cb93=async(_0x3a8291,_0x44affe)=>{function _0x5ca991(_0x32cd46,_0xd3577a,_0x1f5d0f,_0x379916){return _0x13d1e5(_0x379916-0x14d,_0xd3577a,_0x1f5d0f-_0x53c161._0xdec8e5,_0x379916-_0x53c161._0x55942d);}this['metrics'][_0x5ca991(-_0x5a1d34._0x254708,-0x39,-0x7c,-0x43)](_0x3a8291),await _0x199f6b?.(_0x3a8291,_0x44affe);};function _0x36f6af(_0x4f2042,_0x4363ff,_0x3f1b2d,_0x208e5b){return _0x17556f(_0x4363ff-0x24e,_0x208e5b,_0x3f1b2d-0x4e,_0x208e5b-0x97);}const _0x1fb160=createInternalToolRuntime(_0x50b221[_0x13d1e5(-0x12e,-0x138,-0x165,-_0x4d920f._0x279479)]??[],{'onEvent':_0x28cb93,'onToolCall':_0x50b221[_0x36f6af(0x1b0,0x1c2,_0x4d920f._0x32fa73,_0x4d920f._0xbd5ca8)]});this[_0x36f6af(0x11b,0x143,0x109,0x16b)]={'registry':createRegistry(_0x50b221),'chatModel':resolveChatModel(_0x50b221),'toolRuntime':_0x1fb160,'askUser':_0x50b221[_0x13d1e5(-0x113,-_0x4d920f._0x260e66,-_0x4d920f._0x1da89f,-0x116)],'setTopic':_0x50b221['setTopic'],'onEvent':_0x28cb93,'sessionDir':_0x50b221[_0x13d1e5(-_0x4d920f._0xa1e390,-0x188,-0x130,-_0x4d920f._0x311809)],'outputFormat':_0x50b221[_0x36f6af(0x148,_0x4d920f._0x38dd5a,_0x4d920f._0x213acb,_0x4d920f._0x45d6b2)]};}get[_0x17556f(-0x12c,-0x12c,-0x13f,-0x17b)](){return this['_systemPrompt'];}['setTools'](_0x3e458c=[]){const _0x2ce28f={_0x3125b8:0x1aa,_0x4c3141:0x172,_0x25482e:0x18d,_0xd9715e:0x22d},_0x1381ca={_0x8997c3:0x1e5,_0x2747ee:0x4d,_0x16d5ec:0x181};function _0x30d38d(_0x23c9f8,_0x5854bd,_0x3d9087,_0x3cbedf){return _0xa63705(_0x23c9f8-_0x1381ca._0x8997c3,_0x23c9f8,_0x3cbedf-_0x1381ca._0x2747ee,_0x3cbedf-_0x1381ca._0x16d5ec);}function _0x3aefa4(_0x37c5e2,_0x2036ad,_0x2c49a3,_0x168b04){return _0xa63705(_0x37c5e2-0x8d,_0x2036ad,_0x2c49a3- -0x435,_0x168b04-0x14);}this[_0x3aefa4(-0x162,-0x1b9,-_0x2ce28f._0x3125b8,-_0x2ce28f._0x4c3141)][_0x3aefa4(-_0x2ce28f._0x25482e,-_0x2ce28f._0xd9715e,-0x1db,-0x1f3)]['setTools'](_0x3e458c);}[_0x17556f(-0xfe,-0xef,-0xe9,-0x13b)](){const _0x5f16cb={_0x368b2d:0x3f,_0x4f1996:0x7b,_0x9432ce:0x4f,_0x2990df:0x33f,_0x2e7610:0x396},_0x387f97={_0xfeea5d:0x177},_0x133fe4={_0x2e8fc9:0xf5};function _0x5c75e1(_0x56497e,_0x617fea,_0x52427e,_0x4aa78e){return _0xa63705(_0x56497e-0x1d8,_0x52427e,_0x617fea- -0x2d5,_0x4aa78e-_0x133fe4._0x2e8fc9);}function _0x2828a9(_0xe5b3bd,_0x229e49,_0xf04a91,_0x394232){return _0x17556f(_0xf04a91-0x41a,_0xe5b3bd,_0xf04a91-0x1a8,_0x394232-_0x387f97._0xfeea5d);}return this['deps'][_0x5c75e1(-_0x5f16cb._0x368b2d,-_0x5f16cb._0x4f1996,-_0x5f16cb._0x9432ce,-0x51)][_0x2828a9(0x301,0x323,_0x5f16cb._0x2990df,_0x5f16cb._0x2e7610)]();}[_0xa63705(0x342,0x2be,0x2fc,0x32d)](_0x276538,_0x1ff951={}){const _0x31cc33={_0x31d20d:0x99,_0x3274f6:0x5a,_0xc0b5b0:0x6c,_0x197ce8:0x22,_0x475e21:0x2c,_0x4bfe12:0x38,_0x2cacad:0x87,_0x3e5341:0x45,_0x3ce153:0xeb,_0x8bd981:0xbd},_0x53cd08={_0x42a02d:0x147,_0x393225:0x37c},_0x297c29={_0x1c50f0:0x14a};function _0x1da230(_0x22b47c,_0x2fad77,_0x9671a4,_0x26288f){return _0x17556f(_0x9671a4-_0x297c29._0x1c50f0,_0x26288f,_0x9671a4-0x1d0,_0x26288f-0x78);}this[_0x1da230(0x96,0x6a,_0x31cc33._0x31d20d,_0x31cc33._0x3274f6)]=_0x276538;function _0x5b61a0(_0x57b976,_0xb5c5a1,_0x4f2806,_0x3cb4cc){return _0xa63705(_0x57b976-_0x53cd08._0x42a02d,_0x4f2806,_0xb5c5a1- -_0x53cd08._0x393225,_0x3cb4cc-0x5c);}_0x1ff951[_0x1da230(_0x31cc33._0xc0b5b0,-_0x31cc33._0x197ce8,_0x31cc33._0x475e21,0x5e)]===!![]&&(this[_0x1da230(_0x31cc33._0x4bfe12,0x30,_0x31cc33._0x2cacad,_0x31cc33._0x3e5341)]=[],this[_0x5b61a0(-0x120,-0x116,-_0x31cc33._0x3ce153,-_0x31cc33._0x8bd981)]=0x0);}['setSessionId'](_0x581e75){const _0x142e83={_0x25c2ed:0xc9,_0x4523dc:0xce};function _0x3c1872(_0x212128,_0x3fe066,_0x27556b,_0x1c1b71){return _0xa63705(_0x212128-0x107,_0x27556b,_0x3fe066- -0x3a1,_0x1c1b71-0xde);}this[_0x3c1872(-0x106,-_0x142e83._0x25c2ed,-_0x142e83._0x4523dc,-0xf7)]=_0x581e75;}[_0x17556f(-0x135,-0xf6,-0x189,-0x102)](_0x33723c){const _0x1c6a54={_0x4995bb:0x32a,_0x207013:0x2bc,_0x1e460a:0x30c,_0x2a483c:0x2b3,_0x38ecb0:0x367,_0x467c66:0x317},_0xe3735f={_0x256df5:0x417,_0x5ac6c6:0x102,_0x229b1e:0x1e3};function _0x4dc39a(_0x5eed26,_0x5f1b23,_0x1f8d44,_0x449fd6){return _0x17556f(_0x1f8d44-_0xe3735f._0x256df5,_0x5f1b23,_0x1f8d44-_0xe3735f._0x5ac6c6,_0x449fd6-_0xe3735f._0x229b1e);}function _0x192664(_0x3da763,_0x31149c,_0x2f27bb,_0xcf7f5e){return _0xa63705(_0x3da763-0x21,_0xcf7f5e,_0x2f27bb- -0x455,_0xcf7f5e-0x15);}this[_0x4dc39a(_0x1c6a54._0x4995bb,_0x1c6a54._0x207013,_0x1c6a54._0x1e460a,_0x1c6a54._0x2a483c)][_0x4dc39a(_0x1c6a54._0x38ecb0,_0x1c6a54._0x467c66,0x36d,0x330)]=_0x33723c;}async[_0x17556f(-0x95,-0x44,-0xa5,-0xd3)](_0x378d58=this[_0xa63705(0x2a0,0x2f6,0x2cc,0x2ee)],_0x34e6d7={}){const _0x4ac372={_0x31ed9f:0x170,_0x1571cf:0x1c2,_0x5c5361:0x1f8,_0x29d6e1:0x93,_0x24efb2:0x20c,_0x46a752:0x1e7,_0x334af0:0x21c,_0xe0be76:0x271,_0x28b09f:0x22c,_0x39c16d:0x80,_0x6f7166:0xc8,_0x1ac0d3:0x1bf,_0x1e761a:0x83,_0x2fe70d:0x7e,_0x1df424:0x36,_0x3ba3d0:0x41,_0x8296a7:0x5f,_0x3ef61d:0x1c,_0x48f0cb:0x7b,_0x5d416f:0x5a,_0x442c92:0x93};function _0x3c0a1e(_0x5b4b8a,_0x235500,_0x2909ad,_0x2ec07f){return _0xa63705(_0x5b4b8a-0x1b9,_0x5b4b8a,_0x235500- -0xcc,_0x2ec07f-0x1e9);}if(!_0x378d58)throw new Error(_0x3c0a1e(_0x4ac372._0x31ed9f,_0x4ac372._0x1571cf,_0x4ac372._0x5c5361,0x18b));function _0x197c8b(_0x5f55a3,_0x3c4a72,_0x4ddc41,_0x2be264){return _0xa63705(_0x5f55a3-0x151,_0x5f55a3,_0x2be264- -0x332,_0x2be264-0x13b);}this[_0x197c8b(-_0x4ac372._0x29d6e1,-0x92,-0x89,-0xcc)]+=0x1;try{const _0x18d176=await runTurn({'sessionId':this[_0x3c0a1e(0x1e7,_0x4ac372._0x24efb2,0x25a,_0x4ac372._0x46a752)],'turnId':createTurnId(this['turnIndex']),'streaming':_0x34e6d7[_0x3c0a1e(0x1e7,_0x4ac372._0x334af0,0x208,_0x4ac372._0xe0be76)],'signal':_0x34e6d7[_0x3c0a1e(0x264,_0x4ac372._0x28b09f,0x247,0x22d)],'system':this[_0x197c8b(-_0x4ac372._0x39c16d,-0x81,-0x6e,-_0x4ac372._0x6f7166)],'messages':this['messages'],'message':normalizeUserInput(_0x378d58)},this[_0x3c0a1e(0x1bc,_0x4ac372._0x1ac0d3,0x1ba,0x171)]);return this[_0x197c8b(-_0x4ac372._0x1e761a,-_0x4ac372._0x2fe70d,-0xa,-0x5f)]=_0x18d176[_0x197c8b(-0x18,-_0x4ac372._0x1df424,-0x67,-0x6d)][_0x197c8b(-0x58,-0x8c,-0x1a,-0x5f)][_0x197c8b(-_0x4ac372._0x3ba3d0,-0x78,-0x22,-0x7b)](normalizeMessage),_0x18d176;}catch(_0x483073){if(_0x483073 instanceof TurnFailedError){this[_0x197c8b(-0x2f,-0x36,-0x57,-_0x4ac372._0x8296a7)]=synthesizeMissingToolResults(_0x483073['state'][_0x197c8b(-_0x4ac372._0x3ef61d,-_0x4ac372._0x48f0cb,-0x9d,-_0x4ac372._0x8296a7)][_0x197c8b(-_0x4ac372._0x5d416f,-_0x4ac372._0x442c92,-0x54,-0x7b)](normalizeMessage));throw _0x483073['cause'];}throw _0x483073;}}};export{normalizeToolOutputValue,createToolOutput,ToolExecutionError,defineTool,ToolRegistry,validateToolInput,deriveFinalToolOutput,createInternalToolRuntime,createExtensionRegistry,createAgentMetrics,runTurn,Agent};
|
package/dist/chunk-NYZR4XKO.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xe7aa12,_0x2c8bec){var _0x346923={_0x4d353c:0x1ca,_0x33f43a:0x1d0,_0x2e86af:0xb3,_0x379016:0xb6,_0x140347:0x1d4,_0x254762:0x1d8,_0x271c89:0xb2,_0x521cae:0xba,_0x426be2:0xb4,_0x49486b:0x1d5,_0x46023b:0xc1,_0x45aeec:0x1e1,_0x3829a4:0x1d5,_0x2f5f86:0x1d9,_0x991cbd:0x1e2,_0x652f39:0x1df,_0x1bee04:0x1cb,_0x4e1c5c:0x1d5,_0x36cf96:0x1db},_0x52defb={_0x4d3307:0x1c},_0x18cc33={_0x29a6d7:0x2a7};function _0x36b4cb(_0x2d9cad,_0xb74233,_0x44e50e,_0x5a82c9){return _0x4f15(_0xb74233- -_0x18cc33._0x29a6d7,_0x2d9cad);}var _0x29b3e6=_0xe7aa12();function _0x1f01b4(_0x4428a8,_0x1645b0,_0x5b8cbb,_0x8a4e44){return _0x4f15(_0x1645b0- -_0x52defb._0x4d3307,_0x5b8cbb);}while(!![]){try{var _0x3b9a95=-parseInt(_0x1f01b4(_0x346923._0x4d353c,0x1d2,_0x346923._0x33f43a,0x1d0))/0x1+-parseInt(_0x36b4cb(-0xb0,-_0x346923._0x2e86af,-0xb1,-_0x346923._0x379016))/0x2+-parseInt(_0x1f01b4(_0x346923._0x140347,0x1dc,0x1d9,_0x346923._0x254762))/0x3*(parseInt(_0x36b4cb(-_0x346923._0x271c89,-_0x346923._0x521cae,-_0x346923._0x426be2,-0xc1))/0x4)+-parseInt(_0x1f01b4(0x1d0,_0x346923._0x33f43a,_0x346923._0x49486b,0x1d8))/0x5*(-parseInt(_0x36b4cb(-0xc0,-0xbd,-0xbe,-_0x346923._0x46023b))/0x6)+-parseInt(_0x1f01b4(0x1e1,0x1db,_0x346923._0x254762,_0x346923._0x45aeec))/0x7*(-parseInt(_0x1f01b4(0x1d7,0x1cf,_0x346923._0x3829a4,0x1c8))/0x8)+parseInt(_0x1f01b4(0x1d6,0x1d6,0x1d5,_0x346923._0x2f5f86))/0x9*(-parseInt(_0x1f01b4(_0x346923._0x991cbd,0x1da,0x1d3,_0x346923._0x652f39))/0xa)+-parseInt(_0x1f01b4(_0x346923._0x1bee04,0x1d4,0x1ce,_0x346923._0x4e1c5c))/0xb*(-parseInt(_0x1f01b4(0x1d8,0x1dd,_0x346923._0x36cf96,0x1e0))/0xc);if(_0x3b9a95===_0x2c8bec)break;else _0x29b3e6['push'](_0x29b3e6['shift']());}catch(_0x1a9cc){_0x29b3e6['push'](_0x29b3e6['shift']());}}}(_0x4c63,0x83547));function _0x4c63(){var _0x27f8a1=['mtGXnta0mfLlEgr0qG','zwzMB3j0','mtbYuwftve4','mJu1mdeWELz2C1Pb','mty4rejhz1HR','mZG3odu0nfDcz21mrq','yxv0BW','mZbJrvfwt2W','ofLMChHArq','otmZodm1wLjkruvV','mti4ntj6EvvRrLa','mtaYndi5m2r1uMfoCW','B3bLBMfP','nZDtu1vxt1i','yw50AhjVCgLJ','nti0nZCYoxrkAeLwCa','zw5HyMXLza'];_0x4c63=function(){return _0x27f8a1;};return _0x4c63();}var ANTHROPIC_AUTO_BUDGET_TOKENS={'low':0x400,'medium':0x800,'high':0x1000};function mapAutoReasoningEffortToBudgetTokens(_0x2c0348){return ANTHROPIC_AUTO_BUDGET_TOKENS[_0x2c0348];}function _0x4f15(_0x42f493,_0xec61cc){_0x42f493=_0x42f493-0x1ea;var _0x4c63ea=_0x4c63();var _0x4f1525=_0x4c63ea[_0x42f493];if(_0x4f15['FhIlAx']===undefined){var _0x369231=function(_0x29b2e1){var _0x397708='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x2c0348='',_0x522386='';for(var _0x26b424=0x0,_0x134065,_0x2e68c9,_0x24b6a8=0x0;_0x2e68c9=_0x29b2e1['charAt'](_0x24b6a8++);~_0x2e68c9&&(_0x134065=_0x26b424%0x4?_0x134065*0x40+_0x2e68c9:_0x2e68c9,_0x26b424++%0x4)?_0x2c0348+=String['fromCharCode'](0xff&_0x134065>>(-0x2*_0x26b424&0x6)):0x0){_0x2e68c9=_0x397708['indexOf'](_0x2e68c9);}for(var _0x7783b7=0x0,_0x27b6ec=_0x2c0348['length'];_0x7783b7<_0x27b6ec;_0x7783b7++){_0x522386+='%'+('00'+_0x2c0348['charCodeAt'](_0x7783b7)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x522386);};_0x4f15['Xovpim']=_0x369231,_0x4f15['qIoYGI']={},_0x4f15['FhIlAx']=!![];}var _0x307df5=_0x4c63ea[0x0],_0xc9b126=_0x42f493+_0x307df5,_0x23fb36=_0x4f15['qIoYGI'][_0xc9b126];return!_0x23fb36?(_0x4f1525=_0x4f15['Xovpim'](_0x4f1525),_0x4f15['qIoYGI'][_0xc9b126]=_0x4f1525):_0x4f1525=_0x23fb36,_0x4f1525;}function resolveAnthropicThinkingConfig(_0x522386){var _0xb271d1={_0x1d508c:0x2bf,_0x1e677f:0x2b7,_0x44d1c8:0x2ba,_0xf80b63:0x35e,_0x295ef6:0x36b,_0x2f4e82:0x364,_0x19b0ce:0x2cd,_0x50ec52:0x2cd,_0x42af2b:0x2c4,_0x2b40b9:0x2bb},_0x5a0c41={_0x457758:0x16a};if(!_0x522386)return void 0x0;function _0x1fadf1(_0x2136eb,_0x225ff6,_0x356b6a,_0x4e9432){return _0x4f15(_0x4e9432-_0x5a0c41._0x457758,_0x225ff6);}if(_0x522386[_0x5f067a(_0xb271d1._0x1d508c,0x2be,0x2be,0x2c3)])return structuredClone(_0x522386[_0x5f067a(0x2bf,_0xb271d1._0x1e677f,_0xb271d1._0x44d1c8,0x2b7)]);if(!_0x522386[_0x1fadf1(0x360,_0xb271d1._0xf80b63,_0xb271d1._0x295ef6,_0xb271d1._0x2f4e82)])return void 0x0;function _0x5f067a(_0x30030e,_0x26c04d,_0x5244a6,_0x11c149){return _0x4f15(_0x30030e-0xce,_0x26c04d);}return{'type':_0x5f067a(0x2c1,0x2c0,0x2c0,0x2c5),'budgetTokens':mapAutoReasoningEffortToBudgetTokens(_0x522386[_0x5f067a(0x2c8,_0xb271d1._0x19b0ce,_0xb271d1._0x50ec52,_0xb271d1._0x42af2b)][_0x5f067a(0x2c3,0x2c2,_0xb271d1._0x2b40b9,0x2c3)])};}function resolveOpenAiReasoningConfig(_0x26b424){var _0x16133f={_0xef38d5:0x34a,_0x2de57e:0x354},_0x4c616d={_0x3dcbd8:0x161};if(!_0x26b424)return void 0x0;const _0x134065=_0x26b424['auto']?{'effort':_0x26b424['auto']['effort']}:void 0x0;if(!_0x26b424[_0xb87e4d(0x350,_0x16133f._0xef38d5,0x34c,_0x16133f._0x2de57e)])return _0x134065;function _0xb87e4d(_0xee704f,_0x1926d7,_0x34ed3a,_0x4e09af){return _0x4f15(_0xee704f-_0x4c616d._0x3dcbd8,_0x34ed3a);}return{..._0x134065??{},...structuredClone(_0x26b424['openai'])};}export{mapAutoReasoningEffortToBudgetTokens,resolveAnthropicThinkingConfig,resolveOpenAiReasoningConfig};
|
package/dist/chunk-X7VAACWY.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x22f6(_0x10874e,_0x5f1a0d){_0x10874e=_0x10874e-0x9d;var _0x42e6af=_0x42e6();var _0x22f69f=_0x42e6af[_0x10874e];if(_0x22f6['IabOQm']===undefined){var _0x10a3fc=function(_0xcc0361){var _0x4efe55='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x5a0bd0='',_0xaa75f7='';for(var _0x54610b=0x0,_0x44a73d,_0x311345,_0x1329db=0x0;_0x311345=_0xcc0361['charAt'](_0x1329db++);~_0x311345&&(_0x44a73d=_0x54610b%0x4?_0x44a73d*0x40+_0x311345:_0x311345,_0x54610b++%0x4)?_0x5a0bd0+=String['fromCharCode'](0xff&_0x44a73d>>(-0x2*_0x54610b&0x6)):0x0){_0x311345=_0x4efe55['indexOf'](_0x311345);}for(var _0x566b9f=0x0,_0x18becc=_0x5a0bd0['length'];_0x566b9f<_0x18becc;_0x566b9f++){_0xaa75f7+='%'+('00'+_0x5a0bd0['charCodeAt'](_0x566b9f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xaa75f7);};_0x22f6['glSzTr']=_0x10a3fc,_0x22f6['zcVhra']={},_0x22f6['IabOQm']=!![];}var _0x2dffd2=_0x42e6af[0x0],_0x3852cd=_0x10874e+_0x2dffd2,_0x22b7eb=_0x22f6['zcVhra'][_0x3852cd];return!_0x22b7eb?(_0x22f69f=_0x22f6['glSzTr'](_0x22f69f),_0x22f6['zcVhra'][_0x3852cd]=_0x22f69f):_0x22f69f=_0x22b7eb,_0x22f69f;}(function(_0x140451,_0x2f45df){var _0x67e43c={_0x5e520a:0x387,_0x857179:0x38f,_0x12e200:0x384,_0x57b71a:0x38f,_0xdc4384:0x390,_0x3a74f3:0x38e,_0x3a3ddb:0x38f,_0x2b0c2d:0x388,_0x5ea61d:0x385,_0x516c04:0x121,_0x3ff127:0x117,_0x295508:0x11c,_0x243562:0x394,_0x40cb08:0x392,_0x538c25:0x38f,_0x3108e0:0x11e,_0x5108f9:0x382,_0xd39050:0x391,_0x4a86f6:0x11e,_0x294db0:0x11f,_0x4e06eb:0x114},_0x230275=_0x140451();function _0x5f2bd2(_0x594075,_0x49f76e,_0x2c56ff,_0x3b7db4){return _0x22f6(_0x594075-0x2e6,_0x2c56ff);}function _0x3402fd(_0x334d19,_0x4ecfc9,_0x18b34c,_0x928470){return _0x22f6(_0x4ecfc9-0x70,_0x18b34c);}while(!![]){try{var _0x344f34=-parseInt(_0x5f2bd2(_0x67e43c._0x5e520a,_0x67e43c._0x857179,0x385,_0x67e43c._0x12e200))/0x1+parseInt(_0x5f2bd2(0x385,0x38b,0x37f,_0x67e43c._0x57b71a))/0x2*(-parseInt(_0x5f2bd2(0x384,_0x67e43c._0xdc4384,_0x67e43c._0x3a74f3,0x37e))/0x3)+parseInt(_0x5f2bd2(0x386,0x38c,0x390,0x37f))/0x4*(parseInt(_0x5f2bd2(_0x67e43c._0x3a3ddb,_0x67e43c._0x2b0c2d,_0x67e43c._0x5ea61d,0x38a))/0x5)+-parseInt(_0x3402fd(0x12a,_0x67e43c._0x516c04,_0x67e43c._0x3ff127,_0x67e43c._0x295508))/0x6*(parseInt(_0x5f2bd2(_0x67e43c._0x243562,0x395,_0x67e43c._0x40cb08,_0x67e43c._0x538c25))/0x7)+-parseInt(_0x3402fd(_0x67e43c._0x295508,0x116,_0x67e43c._0x3108e0,0x119))/0x8+-parseInt(_0x5f2bd2(0x388,_0x67e43c._0x5108f9,_0x67e43c._0xd39050,0x37e))/0x9+-parseInt(_0x3402fd(_0x67e43c._0x4a86f6,0x115,0x111,_0x67e43c._0x294db0))/0xa*(-parseInt(_0x3402fd(_0x67e43c._0x4e06eb,_0x67e43c._0x294db0,0x122,0x123))/0xb);if(_0x344f34===_0x2f45df)break;else _0x230275['push'](_0x230275['shift']());}catch(_0x4543fc){_0x230275['push'](_0x230275['shift']());}}}(_0x42e6,0x1bf4a));var OperationAbortedError=class extends Error{[_0x2a2f20(0xcd,0xd7,0xc8,0xd8)]=_0x2a2f20(0xd8,0xd6,0xd8,0xcd);constructor(_0x5a0bd0=_0x2a2f20(0xd2,0xda,0xcc,0xd5)){var _0x45e80e={_0x48ef71:0x2bb,_0x46ddf5:0x2c0,_0x56d22f:0x2b9},_0x321396={_0x1d01e3:0x19,_0x398455:0x3e6};function _0x3fecca(_0x4e6612,_0x49524b,_0x58942a,_0x16d2cc){return _0x326391(_0x4e6612-_0x321396._0x1d01e3,_0x49524b-0x10e,_0x58942a,_0x16d2cc- -_0x321396._0x398455);}super(_0x5a0bd0),this[_0x3fecca(-_0x45e80e._0x48ef71,-0x2af,-_0x45e80e._0x46ddf5,-_0x45e80e._0x56d22f)]='AbortError';}};function _0x326391(_0x1f03a7,_0x578d94,_0x27008a,_0x412da8){var _0x3b1cb4={_0x231642:0x89};return _0x22f6(_0x412da8-_0x3b1cb4._0x231642,_0x27008a);}function toAbortError(_0xaa75f7){var _0x5acd56={_0x508f97:0x2f2,_0x594dc6:0x2f9,_0x541111:0x2e8,_0x329812:0x14f},_0x2a690d={_0x529bfd:0x1a9,_0x58b8f8:0x127,_0x59829a:0x27d};function _0x537b2e(_0x113069,_0x5e558f,_0x2cbcf0,_0x3f2964){return _0x326391(_0x113069-_0x2a690d._0x529bfd,_0x5e558f-_0x2a690d._0x58b8f8,_0x2cbcf0,_0x5e558f- -_0x2a690d._0x59829a);}if(isAbortError(_0xaa75f7))return _0xaa75f7;function _0x1c4e74(_0x493fcd,_0x1ae2b5,_0x1c5479,_0x3c8d7f){return _0x2a2f20(_0x1ae2b5-0x230,_0x1ae2b5-0x1ae,_0x493fcd,_0x3c8d7f-0x1c1);}if(_0xaa75f7 instanceof Error)return new OperationAbortedError(_0xaa75f7['message']);if(typeof _0xaa75f7===_0x1c4e74(0x2f6,_0x5acd56._0x508f97,_0x5acd56._0x594dc6,_0x5acd56._0x541111)&&_0xaa75f7[_0x537b2e(-0x151,-0x14d,-_0x5acd56._0x329812,-0x148)]>0x0)return new OperationAbortedError(_0xaa75f7);return new OperationAbortedError();}function isAbortError(_0x54610b){var _0x496f93={_0x1b4107:0x98,_0x2c8f4f:0x93,_0xe4960b:0xa2,_0x42366f:0x346,_0x3553ea:0x34c,_0x309c5a:0x33e,_0xdd3cbd:0x349,_0x48842c:0x338,_0x5ce1b2:0x33a,_0x74486b:0x34e,_0x5a9e15:0x350,_0x166293:0x353},_0x194d26={_0x35b3c7:0x95};function _0x4a4544(_0x1a1bc4,_0x38114e,_0x9f426a,_0x327c12){return _0x326391(_0x1a1bc4-0x171,_0x38114e-0x15a,_0x327c12,_0x1a1bc4-0x212);}function _0x40478f(_0x5d088b,_0x104b1a,_0x25b0b3,_0xb04f2){return _0x326391(_0x5d088b-0x51,_0x104b1a-0x1c6,_0xb04f2,_0x5d088b- -_0x194d26._0x35b3c7);}return _0x54610b instanceof OperationAbortedError||_0x54610b instanceof Error&&(_0x54610b[_0x40478f(0x98,_0x496f93._0x1b4107,_0x496f93._0x2c8f4f,_0x496f93._0xe4960b)]===_0x4a4544(_0x496f93._0x42366f,_0x496f93._0x3553ea,0x342,_0x496f93._0x309c5a)||_0x4a4544(0x343,_0x496f93._0xdd3cbd,_0x496f93._0x48842c,_0x496f93._0x5ce1b2)in _0x54610b&&_0x54610b['code']===_0x4a4544(_0x496f93._0x74486b,_0x496f93._0x5a9e15,0x349,_0x496f93._0x166293));}function throwIfAborted(_0x44a73d){var _0x6b96f2={_0x4812e7:0x1d6,_0xceb296:0x1d7,_0x48fa29:0x1db,_0x13ea5c:0x1dd},_0x4e8db5={_0x5d371d:0x18a},_0x4ddc09={_0x240555:0x40};function _0x40e3cb(_0xb95f1f,_0x6a9fc8,_0x158c1d,_0x36ff2f){return _0x326391(_0xb95f1f-_0x4ddc09._0x240555,_0x6a9fc8-0xf,_0x158c1d,_0x36ff2f-0xa2);}if(!_0x44a73d?.[_0x40e3cb(0x1d5,_0x6b96f2._0x4812e7,_0x6b96f2._0xceb296,_0x6b96f2._0x48fa29)])return;function _0x3f5e67(_0x277fa3,_0xa95e64,_0x1f7f29,_0x251ecd){return _0x2a2f20(_0x1f7f29-0x137,_0xa95e64-0x3,_0xa95e64,_0x251ecd-_0x4e8db5._0x5d371d);}throw toAbortError(_0x44a73d[_0x40e3cb(_0x6b96f2._0x13ea5c,0x1d7,0x1cc,_0x6b96f2._0xceb296)]);}function addAbortListener(_0x311345,_0x1329db){var _0x30dd7={_0x56e5bc:0xfd,_0x58ab1f:0xfa},_0x5da7bf={_0x4e517c:0x301,_0x793edb:0x2f9,_0xac4f31:0x304,_0x2918f8:0x2ff},_0xfffddd={_0x4e28ab:0x9b},_0x567ce2={_0x5cfa70:0x322},_0x50fae3={_0x403da3:0x26,_0x7d1232:0xdd},_0x4ad9b0={_0x4df39c:0x1f4,_0x57596e:0x23d};if(!_0x311345)return()=>{};if(_0x311345['aborted'])return _0x1329db(),()=>{};function _0x29683e(_0x489f64,_0x46ca81,_0x544850,_0x1f86c3){return _0x326391(_0x489f64-0xf6,_0x46ca81-_0x4ad9b0._0x4df39c,_0x46ca81,_0x544850- -_0x4ad9b0._0x57596e);}function _0x3cca46(_0x54090f,_0x3df1f2,_0x17e95e,_0x38ee5c){return _0x2a2f20(_0x38ee5c-_0x50fae3._0x403da3,_0x3df1f2-_0x50fae3._0x7d1232,_0x17e95e,_0x38ee5c-0xf9);}const _0x566b9f=()=>{_0x1329db();};return _0x311345[_0x3cca46(0xf9,0x103,_0x30dd7._0x56e5bc,_0x30dd7._0x56e5bc)](_0x3cca46(0xfe,0xee,_0x30dd7._0x58ab1f,0xf5),_0x566b9f,{'once':!![]}),()=>{function _0x42cbe3(_0x860539,_0x57183a,_0x5cdadd,_0x2ec2b6){return _0x3cca46(_0x860539-0x8d,_0x57183a-0x120,_0x5cdadd,_0x57183a-_0x567ce2._0x5cfa70);}function _0x1ea2e5(_0x22e6d7,_0x4160f8,_0x4f582e,_0x3319a1){return _0x29683e(_0x22e6d7-0x82,_0x3319a1,_0x22e6d7-0x40e,_0x3319a1-_0xfffddd._0x4e28ab);}_0x311345[_0x1ea2e5(0x2fd,_0x5da7bf._0x4e517c,0x302,_0x5da7bf._0x793edb)](_0x1ea2e5(_0x5da7bf._0xac4f31,_0x5da7bf._0x2918f8,0x307,0x302),_0x566b9f);};}function _0x42e6(){var _0x484317=['y29Kzq','mtm1CM9dALDZ','ywjVCNq','qwjVCNrfCNjVCG','CMvHC29U','t3bLCMf0Aw9UigfIB3j0zwq','mtrXCKnTBLC','nJu5mtuXouzyyvvOBq','ywjVCNrLza','ndG1odiWCNrvuLzs','ywrKrxzLBNrmAxn0zw5LCG','qujpuLrFrvjs','C3rYAw5N','mtyYnduZtwPeDMrJ','mNLKBvDTDa','mtq5mMjwwvzzuq','mtm4mdK4DMrQC2vz','mJa0nJqYq1H0qMXf','CMvTB3zLrxzLBNrmAxn0zw5LCG','BMfTzq','mtbUqxjXrKe','otqYotm2sNLrqMP3','BgvUz3rO'];_0x42e6=function(){return _0x484317;};return _0x42e6();}function _0x2a2f20(_0x470f57,_0x104025,_0x223895,_0x20c17b){return _0x22f6(_0x470f57-0x25,_0x223895);}export{OperationAbortedError,toAbortError,isAbortError,throwIfAborted,addAbortListener};
|