@nuvin/agent-core 0.0.0-rc.14 → 0.0.0-rc.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- (function(_0x402538,_0x5093c9){const _0x15d65e={_0x3e6b89:0x8f,_0x55b93a:0x6a,_0x167446:0x19,_0x2cab4a:0x68,_0x444a03:0x8f,_0x523a02:0x42,_0x408c18:0xbc,_0x7479cd:0xa9,_0x1107a5:0xb2,_0x36e1d6:0xa3,_0x42a8be:0x73,_0x504fc9:0xb3,_0x29773b:0xb4,_0x5c2d2b:0xbf,_0xe473c7:0x3ee,_0x102cf0:0x411,_0x1141b1:0x3b,_0x83288b:0x36,_0x3841d5:0x60,_0x39f6c4:0x449,_0x118ef6:0x43b},_0x5a189c={_0x4fb51b:0x2c4},_0x5f2c73=_0x402538();function _0x1a47e9(_0x48a45d,_0xeddb8c,_0x46fe0e,_0x4d8e98){return _0x4978(_0x4d8e98- -0xdf,_0x48a45d);}function _0x4918df(_0x5dc652,_0x1c8359,_0x1ef515,_0x120ed8){return _0x4978(_0x1c8359-_0x5a189c._0x4fb51b,_0x1ef515);}while(!![]){try{const _0x692729=parseInt(_0x1a47e9(_0x15d65e._0x3e6b89,0x42,_0x15d65e._0x55b93a,0x59))/0x1+-parseInt(_0x1a47e9(0x3a,0x5,0x88,0x50))/0x2*(parseInt(_0x1a47e9(_0x15d65e._0x167446,_0x15d65e._0x2cab4a,_0x15d65e._0x444a03,_0x15d65e._0x523a02))/0x3)+parseInt(_0x1a47e9(0x9f,0xb5,_0x15d65e._0x408c18,_0x15d65e._0x7479cd))/0x4+-parseInt(_0x1a47e9(0x5e,_0x15d65e._0x1107a5,_0x15d65e._0x36e1d6,_0x15d65e._0x42a8be))/0x5*(-parseInt(_0x1a47e9(_0x15d65e._0x504fc9,0x81,_0x15d65e._0x29773b,_0x15d65e._0x5c2d2b))/0x6)+-parseInt(_0x4918df(_0x15d65e._0xe473c7,0x425,_0x15d65e._0x102cf0,0x3f3))/0x7*(-parseInt(_0x1a47e9(_0x15d65e._0x1141b1,_0x15d65e._0x83288b,0x1d,_0x15d65e._0x3841d5))/0x8)+-parseInt(_0x4918df(0x4af,0x47d,0x4cf,0x4ac))/0x9+parseInt(_0x4918df(_0x15d65e._0x39f6c4,0x3fd,_0x15d65e._0x118ef6,0x3cd))/0xa;if(_0x692729===_0x5093c9)break;else _0x5f2c73['push'](_0x5f2c73['shift']());}catch(_0x462a43){_0x5f2c73['push'](_0x5f2c73['shift']());}}}(_0x362e,0xc13de));import{createAssistantTextMessage,createReasoningMessage,createToolResultUserMessage,createToolUseMessage,getToolUseBlocks,normalizeMessage,normalizeSystem,responseToAssistantMessage,synthesizeMissingToolResults}from'./chunk-SEP4YYY3.js';import{TurnFailedError}from'./chunk-FFIZ6TKW.js';import{addAbortListener,isAbortError,throwIfAborted,toAbortError}from'./chunk-X7VAACWY.js';function isJsonObject(_0x256849){return typeof _0x256849==='object'&&_0x256849!==null&&!Array['isArray'](_0x256849);}function _0x4978(_0x461fc5,_0x706a88){_0x461fc5=_0x461fc5-0x119;const _0x362e31=_0x362e();let _0x49780f=_0x362e31[_0x461fc5];if(_0x4978['vZWnOb']===undefined){var _0x3d6f9c=function(_0x5462d4){const _0x10a73d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x256849='',_0xecc54c='';for(let _0x29fd32=0x0,_0x157b89,_0x38d21f,_0x16b471=0x0;_0x38d21f=_0x5462d4['charAt'](_0x16b471++);~_0x38d21f&&(_0x157b89=_0x29fd32%0x4?_0x157b89*0x40+_0x38d21f:_0x38d21f,_0x29fd32++%0x4)?_0x256849+=String['fromCharCode'](0xff&_0x157b89>>(-0x2*_0x29fd32&0x6)):0x0){_0x38d21f=_0x10a73d['indexOf'](_0x38d21f);}for(let _0x1b8ac3=0x0,_0x5d5511=_0x256849['length'];_0x1b8ac3<_0x5d5511;_0x1b8ac3++){_0xecc54c+='%'+('00'+_0x256849['charCodeAt'](_0x1b8ac3)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xecc54c);};_0x4978['atFzHI']=_0x3d6f9c,_0x4978['YxLSjt']={},_0x4978['vZWnOb']=!![];}const _0x5a8b2b=_0x362e31[0x0],_0x14ca14=_0x461fc5+_0x5a8b2b,_0x328a71=_0x4978['YxLSjt'][_0x14ca14];return!_0x328a71?(_0x49780f=_0x4978['atFzHI'](_0x49780f),_0x4978['YxLSjt'][_0x14ca14]=_0x49780f):_0x49780f=_0x328a71,_0x49780f;}function isToolOutputEnvelope(_0xecc54c){const _0x4fdc36={_0xa777bb:0x18d,_0x41f26d:0x133,_0x1ae201:0xde,_0x176794:0xcf,_0x25b040:0x164,_0x43d514:0x1c2,_0x52d270:0x188},_0x4a7ad0={_0x2e385c:0x1c5},_0x31b5b2={_0x13ddbc:0x2e4};function _0xe65427(_0x89b2dc,_0x3ddbcd,_0x46edb7,_0x15a1b9){return _0x4978(_0x46edb7- -_0x31b5b2._0x13ddbc,_0x3ddbcd);}if(typeof _0xecc54c!==_0xe65427(-0xe7,-_0x4fdc36._0xa777bb,-0x139,-_0x4fdc36._0x41f26d)||_0xecc54c===null||Array[_0x14b007(-0x3a,-0xe,-0x1e,0x13)](_0xecc54c))return![];if(typeof _0xecc54c['output']!==_0x14b007(-0x6d,-0xa3,-_0x4fdc36._0x1ae201,-_0x4fdc36._0x176794))return![];function _0x14b007(_0xb47279,_0x790b2a,_0x721b2f,_0x50591f){return _0x4978(_0x790b2a- -_0x4a7ad0._0x2e385c,_0xb47279);}const _0x29fd32=_0xecc54c[_0xe65427(-_0x4fdc36._0x25b040,-_0x4fdc36._0x43d514,-_0x4fdc36._0x52d270,-0x15f)];return _0x29fd32===void 0x0||isJsonObject(_0x29fd32);}function validateAgainstSchema(_0x157b89,_0x38d21f,_0x16b471){const _0x4abb66={_0x5699ae:0xa8,_0x283ff8:0x7c,_0x82f51c:0x7a,_0x351bd6:0x1c0,_0x232fc4:0x2a,_0x3bfaac:0x9,_0xace4ca:0x48,_0x21b973:0x5e,_0x2efef5:0x1fa,_0x3943a1:0x58,_0x1806b7:0x33,_0x5a0331:0x6,_0x4f62ba:0x38,_0x11f048:0x1c8,_0x53cb8d:0x1b6,_0x4778f0:0x16d,_0x3635db:0x197,_0x110cff:0x18a,_0x362d02:0x16e,_0x580940:0x146,_0x77ba45:0x171,_0x3fcfff:0x39,_0x217f5d:0x44,_0x2b8259:0x190,_0x261446:0x135,_0x427ded:0x14a,_0x2dc9e7:0x3a,_0x27df7f:0x8a,_0x5f73c8:0x53,_0x7c6a98:0x3e,_0x4e0480:0x140,_0x1bb7e3:0x16c,_0x20e95c:0x167,_0x140040:0x1e4,_0x364ca7:0x1cf,_0x32a428:0x1aa},_0x4c10b9={_0x542bb2:0x545,_0x520642:0x54a,_0xa56436:0x529,_0x30e558:0x574},_0x594a97={_0x1f8966:0x1d8,_0x1442cc:0x4a2},_0x4597c4={_0x2e920e:0x2f7};function _0x135764(_0x283e57,_0x5b118c,_0x5500e0,_0xab8113){return _0x4978(_0x5500e0- -0x12c,_0xab8113);}function _0x4eb04f(_0x9e0df5,_0x3d0744,_0x4453e6,_0x3a4277){return _0x4978(_0x3d0744- -_0x4597c4._0x2e920e,_0x4453e6);}switch(_0x16b471[_0x135764(_0x4abb66._0x5699ae,_0x4abb66._0x283ff8,_0x4abb66._0x82f51c,0x54)]){case _0x4eb04f(-0x1f2,-0x1d5,-_0x4abb66._0x351bd6,-0x1cb):if(typeof _0x38d21f!==_0x135764(-_0x4abb66._0x232fc4,-_0x4abb66._0x3bfaac,-0xa,-_0x4abb66._0xace4ca))throw new Error(_0x135764(0x2e,0x4e,_0x4abb66._0x21b973,0x6c)+_0x157b89+_0x4eb04f(-0x195,-0x1b5,-_0x4abb66._0x2efef5,-0x208));return;case _0x135764(-_0x4abb66._0x3943a1,_0x4abb66._0x1806b7,-_0x4abb66._0x5a0331,_0x4abb66._0x4f62ba):if(typeof _0x38d21f!==_0x4eb04f(-_0x4abb66._0x11f048,-0x1d1,-0x1a4,-0x1c0))throw new Error(_0x4eb04f(-_0x4abb66._0x53cb8d,-_0x4abb66._0x4778f0,-_0x4abb66._0x3635db,-0x11c)+_0x157b89+_0x4eb04f(-_0x4abb66._0x110cff,-_0x4abb66._0x362d02,-_0x4abb66._0x580940,-_0x4abb66._0x77ba45));return;case'boolean':if(typeof _0x38d21f!==_0x135764(-_0x4abb66._0x3fcfff,_0x4abb66._0x217f5d,-0xd,-0x48))throw new Error(_0x4eb04f(-_0x4abb66._0x2b8259,-0x16d,-0x119,-0x1bc)+_0x157b89+_0x4eb04f(-_0x4abb66._0x261446,-0x15e,-0x1a4,-_0x4abb66._0x427ded));return;case _0x135764(_0x4abb66._0x2dc9e7,_0x4abb66._0x27df7f,_0x4abb66._0x5f73c8,_0x4abb66._0x7c6a98):if(!Array[_0x4eb04f(-0x160,-_0x4abb66._0x4e0480,-0x151,-0x118)](_0x38d21f))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x157b89+_0x4eb04f(-_0x4abb66._0x1bb7e3,-_0x4abb66._0x20e95c,-0x18e,-0x16b));_0x38d21f[_0x135764(0xc7,0x8b,0x8f,0xaa)]((_0x1b8ac3,_0x5d5511)=>{function _0x59d6a5(_0x1d3843,_0x3faf29,_0x380468,_0x38ccae){return _0x135764(_0x1d3843-0x188,_0x3faf29-_0x594a97._0x1f8966,_0x380468-_0x594a97._0x1442cc,_0x1d3843);}validateAgainstSchema(_0x157b89+'['+_0x5d5511+']',_0x1b8ac3,_0x16b471[_0x59d6a5(_0x4c10b9._0x542bb2,_0x4c10b9._0x520642,_0x4c10b9._0xa56436,_0x4c10b9._0x30e558)]);});return;case'object':if(!isJsonObject(_0x38d21f))throw new Error(_0x135764(0x32,0x80,0x5e,0x49)+_0x157b89+':\x20expected\x20object');for(const _0x5555e6 of _0x16b471[_0x4eb04f(-_0x4abb66._0x53cb8d,-0x1bd,-0x16b,-_0x4abb66._0x4778f0)]??[]){if(!(_0x5555e6 in _0x38d21f))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x157b89+':\x20missing\x20required\x20field\x20\x22'+_0x5555e6+'\x22');}for(const [_0x55920d,_0x53943c]of Object[_0x4eb04f(-_0x4abb66._0x140040,-_0x4abb66._0x364ca7,-0x187,-_0x4abb66._0x32a428)](_0x16b471['properties'])){_0x55920d in _0x38d21f&&validateAgainstSchema(_0x157b89+'.'+_0x55920d,_0x38d21f[_0x55920d],_0x53943c);}}}function normalizeToolOutputValue(_0x290632){const _0x12a4b5={_0x56ea99:0x5f,_0x13cbbd:0xf,_0x352f13:0x4c,_0x24a8e:0x247,_0x4e84b5:0x23b,_0x2ef129:0x62,_0x41d96a:0x7,_0x57d533:0x270,_0x2586ef:0x1f2,_0x528d78:0x234,_0x1dac1d:0x238,_0xfb01cc:0x252,_0x55585a:0x201,_0x22dcde:0x64,_0x2ccb66:0x58,_0x5798a9:0x53,_0x53ffcc:0x294,_0x34f8a6:0x29a,_0x58e2d3:0x26b,_0x4e6354:0x71},_0x67c986={_0x211167:0xdf},_0x49976f={_0x1ab81e:0x158};if(isToolOutputEnvelope(_0x290632))return{'output':_0x290632[_0xbf1ba4(_0x12a4b5._0x56ea99,_0x12a4b5._0x13cbbd,0x8a,_0x12a4b5._0x352f13)],'structured':_0x290632[_0x148432(_0x12a4b5._0x24a8e,0x21a,_0x12a4b5._0x4e84b5,0x25d)]??{'value':_0x290632[_0xbf1ba4(_0x12a4b5._0x2ef129,_0x12a4b5._0x41d96a,0x25,0x4c)]},..._0x290632['content']!==void 0x0?{'content':_0x290632[_0x148432(_0x12a4b5._0x57d533,_0x12a4b5._0x2586ef,_0x12a4b5._0x528d78,_0x12a4b5._0x1dac1d)]}:{}};if(typeof _0x290632===_0x148432(_0x12a4b5._0xfb01cc,0x248,_0x12a4b5._0x55585a,0x1ba))return{'output':_0x290632,'structured':{'value':_0x290632}};if(typeof _0x290632===_0xbf1ba4(_0x12a4b5._0x22dcde,_0x12a4b5._0x2ccb66,0x95,_0x12a4b5._0x5798a9)&&_0x290632!==null&&!Array[_0x148432(_0x12a4b5._0x53ffcc,_0x12a4b5._0x34f8a6,0x296,_0x12a4b5._0x58e2d3)](_0x290632))return{'output':JSON[_0xbf1ba4(0x8a,0x27,_0x12a4b5._0x4e6354,0x56)](_0x290632,null,0x2),'structured':_0x290632};function _0xbf1ba4(_0x26d7c7,_0x2afa13,_0x4c7de7,_0x3c4115){return _0x4978(_0x3c4115- -_0x49976f._0x1ab81e,_0x26d7c7);}function _0x148432(_0x2b1158,_0x190108,_0x3fdd11,_0x1eedbe){return _0x4978(_0x3fdd11-_0x67c986._0x211167,_0x2b1158);}return{'output':JSON['stringify'](_0x290632,null,0x2),'structured':{'value':_0x290632}};}function createToolOutput(_0x2c5466,_0x2442e9={'value':_0x2c5466},_0x103c26){return{'output':_0x2c5466,'structured':_0x2442e9,..._0x103c26!==void 0x0?{'content':_0x103c26}:{}};}var ToolExecutionError=class extends Error{[_0x2cb4b9(0x33,0x22,0x1e,0x49)];constructor(_0x24c76b,_0x349a52={}){const _0x1d6e1d={_0x5b59ba:0x4d5,_0x24be5a:0x519,_0x3754b4:0x4ca,_0xd35e67:0x469,_0xf17686:0x48f,_0x268383:0x427},_0x47c36a={_0x38a702:0x1e3};super(_0x24c76b),this[_0x1b1ef5(0x4cc,_0x1d6e1d._0x5b59ba,_0x1d6e1d._0x24be5a,_0x1d6e1d._0x3754b4)]='ToolExecutionError';function _0x1b1ef5(_0x1a4fba,_0x2feab5,_0x828bdb,_0x1fa160){return _0x2cb4b9(_0x828bdb,_0x2feab5-_0x47c36a._0x38a702,_0x1a4fba-0x44b,_0x1fa160-0x99);}function _0x353b4e(_0xe96eb0,_0x57adbd,_0xfa07f5,_0x3bdcaf){return _0x2cb4b9(_0xe96eb0,_0x57adbd-0x163,_0x3bdcaf-0xb8,_0x3bdcaf-0x32);}this[_0x1b1ef5(_0x1d6e1d._0xd35e67,0x49c,_0x1d6e1d._0xf17686,_0x1d6e1d._0x268383)]=_0x349a52;}};function defineTool(_0x4043da){return _0x4043da;}var ToolRegistry=class{[_0xc4fa22(0x476,0x41a,0x461,0x471)]=new Map();constructor(_0x50500f=[]){const _0xb9a0ca={_0x150a27:0x20a},_0x1e619f={_0x2a98b0:0x13};function _0x4f842a(_0x20064f,_0x30951f,_0x21be0f,_0x352a6b){return _0xc4fa22(_0x21be0f,_0x30951f-_0x1e619f._0x2a98b0,_0x352a6b- -0x237,_0x352a6b-0x18);}for(const _0x4a4ad3 of _0x50500f){this[_0x4f842a(0x22b,_0xb9a0ca._0x150a27,0x243,0x22c)](_0x4a4ad3);}}[_0xc4fa22(0x420,0x462,0x463,0x48a)](_0x55710b){const _0x2e40bf={_0x65ffdd:0x166,_0x110c16:0x148},_0x25a155={_0x3c1d05:0x1b9,_0x3b08db:0x550},_0x32a1b0={_0x42154d:0x183};function _0x478154(_0x149f21,_0x5ac6a0,_0x1e778e,_0x392c8b){return _0x2cb4b9(_0x5ac6a0,_0x5ac6a0-0x132,_0x392c8b-_0x32a1b0._0x42154d,_0x392c8b-0x164);}function _0x4250df(_0x3af6e2,_0x5a6a99,_0x4124a2,_0x3cb2f4){return _0xc4fa22(_0x3af6e2,_0x5a6a99-_0x25a155._0x3c1d05,_0x5a6a99- -_0x25a155._0x3b08db,_0x3cb2f4-0xdb);}this[_0x478154(0x18b,0x17b,0x187,0x1be)][_0x4250df(-_0x2e40bf._0x65ffdd,-_0x2e40bf._0x110c16,-0x101,-0xfb)](_0x55710b['name'],_0x55710b);}[_0xc4fa22(0x470,0x45e,0x432,0x3fc)](_0x5a4d8e){const _0x2d0a46={_0x520271:0x2c,_0x81ff03:0xb1,_0x56e6c2:0x6b,_0x43c8be:0x5c},_0x462b1a={_0x5cf5c9:0x13,_0x5e05ea:0x159},_0x183831={_0x1a944a:0x12,_0x22b529:0x1df};function _0x255007(_0x3647b5,_0x25771a,_0x589119,_0x34be31){return _0x2cb4b9(_0x3647b5,_0x25771a-0xd9,_0x25771a-_0x183831._0x1a944a,_0x34be31-_0x183831._0x22b529);}function _0x1ed563(_0x4653cc,_0x4dd4af,_0x110f5b,_0x223a51){return _0x2cb4b9(_0x223a51,_0x4dd4af-_0x462b1a._0x5cf5c9,_0x110f5b-0x2e,_0x223a51-_0x462b1a._0x5e05ea);}return this[_0x1ed563(0x17,_0x2d0a46._0x520271,0x69,_0x2d0a46._0x81ff03)][_0x1ed563(_0x2d0a46._0x56e6c2,0x7,0x3a,_0x2d0a46._0x43c8be)](_0x5a4d8e);}[_0x2cb4b9(-0x1a,0x28,0x18,0x6a)](){const _0x1cb74b={_0x1f689c:0x3cb,_0x1fb01e:0x3f5},_0x6f0274={_0x235358:0x77},_0x72221c={_0x219705:0x15c,_0x4c3453:0x177};function _0x5bf590(_0x2699ef,_0x27757b,_0x4fd80d,_0x3e1bab){return _0x2cb4b9(_0x3e1bab,_0x27757b-_0x72221c._0x219705,_0x4fd80d- -0x204,_0x3e1bab-_0x72221c._0x4c3453);}function _0x152bc9(_0x1cc265,_0x2f4508,_0x51e481,_0x3ee187){return _0xc4fa22(_0x1cc265,_0x2f4508-0xac,_0x3ee187- -_0x6f0274._0x235358,_0x3ee187-0xd);}return[...this[_0x152bc9(0x3ec,0x3ab,_0x1cb74b._0x1f689c,0x3ea)][_0x152bc9(0x3b6,0x3de,0x3de,_0x1cb74b._0x1fb01e)]()];}[_0x2cb4b9(0x7e,0xc6,0x82,0x77)](){const _0xa98985={_0x3df280:0x39,_0x4349b3:0x6,_0x654ffe:0x3c,_0x2f8393:0x114,_0x11859c:0x150},_0x24a32e={_0x3f5d10:0xdf,_0x44450a:0x130},_0x46cf0c={_0x2a2df7:0x9a},_0x21ed73={_0x314c6a:0x69,_0xacb23f:0x19c};function _0x5ab2c8(_0x31ef43,_0x10477d,_0x45a415,_0x37f0ca){return _0xc4fa22(_0x31ef43,_0x10477d-_0x21ed73._0x314c6a,_0x10477d- -0x444,_0x37f0ca-_0x21ed73._0xacb23f);}function _0x3650ea(_0x2a3ee3,_0x1820bc,_0x4ed948,_0x140ef0){return _0xc4fa22(_0x4ed948,_0x1820bc-0xe0,_0x140ef0- -0x592,_0x140ef0-_0x46cf0c._0x2a2df7);}return this[_0x5ab2c8(-_0xa98985._0x3df280,-_0xa98985._0x4349b3,_0xa98985._0x654ffe,0x42)]()[_0x3650ea(-0x15f,-0x19f,-_0xa98985._0x2f8393,-_0xa98985._0x11859c)](_0x16a1dc=>{const _0x4a2082={_0x94d67a:0x11c,_0x17ae49:0x1ca};function _0x566693(_0x2301aa,_0xf527e1,_0x4389fb,_0x2f6169){return _0x3650ea(_0x2301aa-_0x4a2082._0x94d67a,_0xf527e1-0x60,_0x2301aa,_0xf527e1-_0x4a2082._0x17ae49);}return{'name':_0x16a1dc[_0x566693(0xbc,_0x24a32e._0x3f5d10,0x112,_0x24a32e._0x44450a)],'description':_0x16a1dc['description'],'input_schema':_0x16a1dc['inputSchema']};});}};function validateToolInput(_0x57c157,_0x2c36cf){const _0x5c1452={_0x1519d9:0x424,_0x5d104d:0x3ce},_0x46be6e={_0x5275b0:0x1f0,_0x153c93:0x39a};function _0x25992a(_0x2b0cde,_0x541fc0,_0x19adca,_0x524b0a){return _0x2cb4b9(_0x2b0cde,_0x541fc0-_0x46be6e._0x5275b0,_0x19adca-_0x46be6e._0x153c93,_0x524b0a-0x125);}return validateAgainstSchema(_0x25992a(0x3f4,_0x5c1452._0x1519d9,0x3f6,_0x5c1452._0x5d104d),_0x57c157,_0x2c36cf),_0x57c157;}function deriveFinalToolOutput(_0x38b176){const _0x23d991={_0x1d52c1:0x48c,_0x326359:0x486,_0x457107:0x30,_0x6cea31:0xe,_0x5e7e81:0x468,_0x583114:0x442,_0x380724:0x44a,_0x2bf0a0:0x488,_0x1616b7:0x79,_0x117d45:0x50d,_0x3c4415:0x517,_0x2592ae:0x4aa,_0x2d5770:0x4e0,_0x4ed428:0x3f,_0x5a931a:0x5b},_0x518026={_0x19aed0:0x156,_0x459d2e:0x471};function _0x55d96b(_0x141568,_0x500052,_0x3cefa2,_0x614317){return _0x2cb4b9(_0x141568,_0x500052-_0x518026._0x19aed0,_0x614317-_0x518026._0x459d2e,_0x614317-0x1a2);}if(_0x38b176['length']===0x0)return{'output':'','structured':{}};if(_0x38b176[_0x55d96b(_0x23d991._0x1d52c1,0x438,0x492,_0x23d991._0x326359)]===0x1)return{'output':_0x38b176[0x0][_0x51a5d0(_0x23d991._0x457107,-0x2f,_0x23d991._0x6cea31,-0x5)],'structured':_0x38b176[0x0][_0x55d96b(_0x23d991._0x5e7e81,0x4e1,0x4d2,0x48f)],..._0x38b176[0x0][_0x55d96b(0x4b9,_0x23d991._0x583114,_0x23d991._0x380724,_0x23d991._0x2bf0a0)]!==void 0x0?{'content':_0x38b176[0x0][_0x51a5d0(-0x3a,-0x82,-0x41,-_0x23d991._0x1616b7)]}:{}};function _0x51a5d0(_0x2edf3d,_0x441f81,_0x35c429,_0x38ce2b){return _0x2cb4b9(_0x441f81,_0x441f81-0x22,_0x35c429- -0x58,_0x38ce2b-0x9d);}const _0x555588=_0x38b176[_0x55d96b(_0x23d991._0x117d45,_0x23d991._0x3c4415,_0x23d991._0x2592ae,_0x23d991._0x2d5770)](_0x23f994=>_0x23f994[_0x51a5d0(-0x1d,-0xf,-0x41,-0x6b)]!==void 0x0);return{'output':_0x38b176[_0x51a5d0(-0x4b,-_0x23d991._0x4ed428,-0x3c,-_0x23d991._0x5a931a)](_0x56469d=>_0x56469d[_0x55d96b(0x4ce,0x4fc,0x4d5,0x4d7)])['join'](''),'structured':{'chunks':_0x38b176['map'](_0x33b020=>_0x33b020['structured'])},..._0x555588['length']===0x1?{'content':_0x555588[0x0]['content']}:{}};}function _0xc4fa22(_0x2623c5,_0x73c40d,_0x218b82,_0x120dd9){const _0x1099c2={_0x1410ce:0x2e8};return _0x4978(_0x218b82-_0x1099c2._0x1410ce,_0x2623c5);}function createToolMeta(){return{'transforms':[]};}function createErrorToolResult(_0x2ed34f,_0x255fe1,_0x329ada,_0x5078ef=[]){const _0x6dcdcb={_0x2c6031:0xd4},_0x3fcd20={_0xc39298:0x38,_0x5bfb08:0x120,_0x1bf77a:0xc1};function _0x2ac10f(_0xdc496b,_0x9bc53b,_0x4b44ee,_0x33e69d){return _0x2cb4b9(_0xdc496b,_0x9bc53b-_0x3fcd20._0xc39298,_0x33e69d- -_0x3fcd20._0x5bfb08,_0x33e69d-_0x3fcd20._0x1bf77a);}return{'callId':_0x2ed34f['id'],'toolName':_0x2ed34f[_0x2ac10f(-_0x6dcdcb._0x2c6031,-0xd2,-0x94,-0x9f)],'status':'error','output':_0x255fe1,'structured':_0x329ada,'chunks':_0x5078ef,'meta':createToolMeta()};}function createRejectedToolResult(_0x5cc0bd,_0x41b098){const _0x355c74={_0x43e0ee:0x2be,_0x27541b:0x287,_0x18686b:0x75,_0x2a2078:0x89,_0x5cb5a1:0x5b,_0x1341e7:0x8c,_0x10eb98:0x18,_0x268ec4:0x14,_0x32b75a:0x19,_0x2bf24d:0xb,_0x53d8ac:0xad,_0x4aa2dd:0x2b2,_0x4e193a:0x294};function _0x568b84(_0x211980,_0x533e2a,_0x47b5ca,_0x497001){return _0x2cb4b9(_0x497001,_0x533e2a-0x114,_0x47b5ca-0x2d0,_0x497001-0x106);}const _0x3f2514=_0x41b098?.[_0x568b84(0x2ec,0x310,_0x355c74._0x43e0ee,_0x355c74._0x27541b)]()[_0x5e99d1(-_0x355c74._0x18686b,-0x26,-0x58,-_0x355c74._0x2a2078)]?_0x41b098:_0x5e99d1(-0x5f,-0x44,-_0x355c74._0x5cb5a1,-_0x355c74._0x1341e7)+_0x5cc0bd[_0x5e99d1(-_0x355c74._0x10eb98,0x14,_0x355c74._0x268ec4,_0x355c74._0x32b75a)];function _0x5e99d1(_0x2ee137,_0x18eae2,_0x2d68a2,_0x37bf15){return _0xc4fa22(_0x2ee137,_0x18eae2-0x61,_0x2d68a2- -0x493,_0x37bf15-0x1f2);}return createErrorToolResult(_0x5cc0bd,_0x3f2514,{'error':_0x5e99d1(-0xb,-0x2d,-_0x355c74._0x2bf24d,0x49),..._0x41b098?.[_0x5e99d1(-_0x355c74._0x53d8ac,-0xa8,-0x7f,-0xce)]()[_0x568b84(_0x355c74._0x4aa2dd,_0x355c74._0x4e193a,0x2e5,0x298)]?{'reason':_0x41b098}:{}});}function createAbortedToolResult(_0x5d42a7,_0x4f6e1a,_0x4362e3=[]){const _0x236721=toAbortError(_0x4f6e1a);return createErrorToolResult(_0x5d42a7,_0x236721['message'],{'error':_0x236721['message'],'aborted':!![]},_0x4362e3);}function createSuccessToolResult(_0x208f2e,_0xe8265d,_0x649195){const _0xa31e5c={_0x1685a5:0x143,_0x5b52c8:0x160,_0x1e4982:0x17f,_0x30b4fc:0x14c,_0x19c791:0x15f,_0x4e0733:0x192,_0x1531d4:0x1aa,_0x1429c1:0x1c8},_0x51e1e9={_0x1e4924:0x44c},_0x7715cf={_0x57edb6:0xe0};function _0x226f88(_0x39a244,_0xe7a62a,_0x203932,_0x2e267c){return _0xc4fa22(_0xe7a62a,_0xe7a62a-0x1c7,_0x39a244- -0x5cf,_0x2e267c-_0x7715cf._0x57edb6);}function _0x1443ad(_0x3caa5d,_0x4a0346,_0x186b08,_0x152248){return _0xc4fa22(_0x4a0346,_0x4a0346-0x179,_0x186b08- -_0x51e1e9._0x1e4924,_0x152248-0x13b);}return{'callId':_0x208f2e['id'],'toolName':_0x208f2e['name'],'status':'ok','output':_0xe8265d[_0x226f88(-_0xa31e5c._0x1685a5,-0xfa,-_0xa31e5c._0x5b52c8,-_0xa31e5c._0x1e4982)],'structured':_0xe8265d[_0x226f88(-0x18b,-0x191,-_0xa31e5c._0x30b4fc,-0x1df)],..._0xe8265d[_0x226f88(-0x192,-0x1ca,-0x150,-_0xa31e5c._0x19c791)]!==void 0x0?{'content':_0xe8265d[_0x226f88(-_0xa31e5c._0x4e0733,-0x1a9,-_0xa31e5c._0x1531d4,-_0xa31e5c._0x1429c1)]}:{},'chunks':_0x649195,'meta':createToolMeta()};}function createUnknownToolResult(_0xe30945){const _0x2a765e={_0x23a8ea:0x4ce,_0x13f950:0x4b1,_0xa66927:0x4d3,_0x56e64b:0x574,_0x2e8cd8:0x57c,_0x127f47:0x56d,_0x5188a2:0x537,_0x1a4fd1:0x586,_0x407482:0x531},_0x1ba3b6={_0x1a6c9e:0x614,_0x394de7:0x1ae},_0x57f710={_0x1fc603:0x58};function _0x5a397b(_0x3d9063,_0xa15de7,_0x4dbf67,_0x52095f){return _0x2cb4b9(_0x4dbf67,_0xa15de7-_0x57f710._0x1fc603,_0x3d9063-0x4f3,_0x52095f-0x14b);}function _0x471f0a(_0x44e918,_0x200ccc,_0x42cf77,_0x397079){return _0xc4fa22(_0x397079,_0x200ccc-0x114,_0x42cf77- -_0x1ba3b6._0x1a6c9e,_0x397079-_0x1ba3b6._0x394de7);}return createErrorToolResult(_0xe30945,_0x5a397b(_0x2a765e._0x23a8ea,_0x2a765e._0x13f950,0x4ba,_0x2a765e._0xa66927)+_0xe30945[_0x5a397b(_0x2a765e._0x56e64b,_0x2a765e._0x2e8cd8,_0x2a765e._0x127f47,0x5c0)],{'error':_0x5a397b(_0x2a765e._0x5188a2,0x554,_0x2a765e._0x1a4fd1,_0x2a765e._0x407482)});}function isDispatchDecision(_0x450734){const _0x30e379={_0x699433:0x14a,_0x144b90:0x16d,_0x30edc1:0x1ca,_0x5be3fc:0x19c,_0x31b007:0x1b6,_0xd47551:0x1c7,_0x2de2ed:0x1bd,_0x697ad0:0x192},_0x1deb4b={_0x42d9f0:0x1ea,_0xf987d0:0x1d1};function _0x51491d(_0x19be9a,_0x5e4b14,_0x23c8be,_0x4a7c8f){return _0x2cb4b9(_0x5e4b14,_0x5e4b14-_0x1deb4b._0x42d9f0,_0x4a7c8f- -0x1da,_0x4a7c8f-_0x1deb4b._0xf987d0);}if(typeof _0x450734!==_0x51491d(-0x19a,-_0x30e379._0x699433,-0x12c,-_0x30e379._0x144b90)||_0x450734===null)return![];function _0x4b3243(_0x504203,_0x5345da,_0x20db63,_0x2beb64){return _0xc4fa22(_0x2beb64,_0x5345da-0x11f,_0x5345da- -0x29a,_0x2beb64-0x4a);}return _0x450734['action']===_0x4b3243(0x1b2,_0x30e379._0x30edc1,_0x30e379._0x5be3fc,0x219)||_0x450734[_0x51491d(-_0x30e379._0x31b007,-0x1ac,-0x1fa,-_0x30e379._0xd47551)]===_0x51491d(-0x175,-_0x30e379._0x2de2ed,-0x14c,-_0x30e379._0x697ad0);}function normalizeExecutionError(_0x3b76af){const _0x42e046={_0x1b9c6c:0xd1,_0x58aec4:0x101,_0x2aebe0:0xfc,_0x18e20c:0x11b,_0xf75d2:0x90,_0x46f9fa:0x190,_0x4e45bc:0x169},_0x3fcc41={_0x260036:0x1cb},_0x24df75={_0x563f19:0x19d};function _0x118951(_0x17f5f3,_0xde8194,_0x3a61f9,_0x333455){return _0xc4fa22(_0xde8194,_0xde8194-0x27,_0x17f5f3- -0x2b0,_0x333455-_0x24df75._0x563f19);}if(_0x3b76af instanceof ToolExecutionError)return{'errorMessage':_0x3b76af['message'],'structured':{'error':_0x3b76af[_0xfec736(0x9c,0x122,_0x42e046._0x1b9c6c,0x8e)],..._0x3b76af[_0xfec736(_0x42e046._0x58aec4,0xad,0xd5,0x11f)]}};function _0xfec736(_0x3e614a,_0xfb618f,_0x17c527,_0x9021fb){return _0x2cb4b9(_0x3e614a,_0xfb618f-_0x3fcc41._0x260036,_0x17c527-0xb7,_0x9021fb-0x116);}if(_0x3b76af instanceof Error)return{'errorMessage':_0x3b76af[_0xfec736(_0x42e046._0x2aebe0,_0x42e046._0x18e20c,0xd1,_0x42e046._0xf75d2)],'structured':{'error':_0x3b76af[_0x118951(_0x42e046._0x46f9fa,0x19a,_0x42e046._0x4e45bc,0x193)]}};const _0x170e1a=String(_0x3b76af);return{'errorMessage':_0x170e1a,'structured':{'error':_0x170e1a}};}async function emitEvent(_0x5997dc,_0x5bc323,_0xd4d442){await _0x5997dc?.(_0x5bc323,_0xd4d442);}async function resolveDispatchDecision(_0x27df97,_0x222680,_0x12f3c2){const _0x31c65c={_0x2095f2:0x380,_0x1b37a3:0x331,_0x2fa3fa:0x378,_0x1ecaf8:0x4fb,_0x17dff1:0x4f0,_0x5d2a4d:0x323,_0x1e3619:0x385,_0x2d61dd:0x3a3,_0x5ac293:0x3cf},_0x506956={_0x261f27:0x10d,_0x5f08b3:0x17b,_0x2d764f:0x156,_0x56e695:0x190,_0x26984e:0x1c2,_0x160772:0x5b,_0x17cd56:0x85,_0x365a45:0x4d,_0x1d6d3a:0x6,_0x37f198:0x6e},_0xdeb8a2={_0x2e9a07:0x2a4,_0x10ae34:0x2a6,_0x55a527:0x1ae,_0x265a0e:0x1eb,_0x55889a:0x1a9,_0xf7d720:0x326,_0x57f5de:0x2fd},_0x4993a0={_0x28b424:0x6e,_0x2b1b4c:0xfc},_0x1d08a2={_0x46b1ac:0x187},_0x182fcd={_0x32d994:0x4a};if(!_0x27df97)return{'action':_0x6b27d6(0x3d0,0x3cf,0x3f0,0x3e4)};function _0xcad17b(_0x366796,_0x287792,_0x52e531,_0x1231a0){return _0xc4fa22(_0x52e531,_0x287792-_0x182fcd._0x32d994,_0x287792-0x82,_0x1231a0-0x1ad);}const _0x12be15=Promise['resolve']()['then'](()=>_0x27df97(_0x222680,_0x12f3c2));function _0x6b27d6(_0x521f53,_0x2e113f,_0x481fa1,_0x37aa6b){return _0x2cb4b9(_0x37aa6b,_0x2e113f-_0x1d08a2._0x46b1ac,_0x2e113f-0x387,_0x37aa6b-0xa7);}if(!_0x12f3c2[_0x6b27d6(0x368,_0x31c65c._0x2095f2,_0x31c65c._0x1b37a3,_0x31c65c._0x2fa3fa)]){const _0x2effe6=await _0x12be15;return isDispatchDecision(_0x2effe6)?_0x2effe6:{'action':_0xcad17b(_0x31c65c._0x1ecaf8,_0x31c65c._0x17dff1,0x4e3,0x50d)};}const _0x3dde43=new Promise((_0x470c4e,_0x33ba41)=>{function _0x51149c(_0x23effc,_0xa955c6,_0x47663d,_0x425c93){return _0xcad17b(_0x23effc-_0x4993a0._0x28b424,_0x425c93- -0x663,_0x47663d,_0x425c93-_0x4993a0._0x2b1b4c);}const _0xba5ae4=()=>{const _0x15e378={_0x162669:0x15a};function _0x5be6d4(_0x206276,_0x4f795c,_0x50f036,_0x1242e9){return _0x4978(_0x4f795c-_0x15e378._0x162669,_0x206276);}_0x12f3c2[_0x5be6d4(_0xdeb8a2._0x2e9a07,0x291,_0xdeb8a2._0x10ae34,0x283)]?.[_0x2e2f77(_0xdeb8a2._0x55a527,_0xdeb8a2._0x265a0e,0x1f4,_0xdeb8a2._0x55889a)]('abort',_0xba5ae4);function _0x2e2f77(_0x43e5ad,_0x4b6728,_0x590341,_0x51ecec){return _0x4978(_0x43e5ad- -0x1,_0x590341);}_0x33ba41(toAbortError(_0x12f3c2['signal']?.[_0x5be6d4(_0xdeb8a2._0xf7d720,_0xdeb8a2._0x57f5de,0x2df,0x340)]));};if(_0x12f3c2['signal']?.['aborted']){_0x33ba41(toAbortError(_0x12f3c2['signal'][_0x51149c(-_0x506956._0x261f27,-_0x506956._0x5f08b3,-0x18b,-_0x506956._0x2d764f)]));return;}function _0x14af4d(_0x56fc8e,_0x45a994,_0x803d12,_0x4c9886){return _0x6b27d6(_0x56fc8e-0x160,_0x56fc8e- -0x450,_0x803d12-0xa2,_0x803d12);}_0x12f3c2[_0x51149c(-_0x506956._0x56e695,-0x19f,-0x19c,-_0x506956._0x26984e)]?.[_0x14af4d(-0xa7,-_0x506956._0x160772,-_0x506956._0x17cd56,-0x88)](_0x14af4d(-_0x506956._0x365a45,_0x506956._0x1d6d3a,-0x4a,-_0x506956._0x37f198),_0xba5ae4,{'once':!![]});}),_0x1866d8=await Promise[_0x6b27d6(_0x31c65c._0x5d2a4d,0x374,_0x31c65c._0x1e3619,0x395)]([_0x12be15,_0x3dde43]);return isDispatchDecision(_0x1866d8)?_0x1866d8:{'action':_0x6b27d6(_0x31c65c._0x2d61dd,_0x31c65c._0x5ac293,0x39e,0x3c9)};}async function executeToolCall(_0x564ba1,_0xb60e9,_0x248e6a,_0x2c33c8,_0x460775){const _0x6cface={_0x3ff848:0x365,_0x5a13a8:0x326,_0x4a4001:0x355,_0x5ae0de:0x180,_0x5d5eb2:0x1a8,_0x293d1b:0x1da,_0x272a00:0x1a5,_0x5b9a3b:0x1ed,_0x3b3752:0x227,_0xd70507:0x190,_0x481633:0x1aa,_0x13ffc4:0x2f7,_0x1b1b9a:0x311,_0x4755b9:0x169,_0x28197f:0x18a,_0x3f431a:0x1d6,_0x5c3e64:0x21d,_0x393300:0x1e0,_0xdce547:0x306,_0x4c3f6c:0x375,_0x3fcd22:0x326,_0x3a075f:0x186,_0x3eba57:0x1c7,_0x4dd295:0x337,_0x15219c:0x326,_0x3970dd:0x1f6,_0x4b8d77:0x1cd,_0x30847b:0x374,_0x14a2d7:0x2ef,_0x3a1fdd:0x2f4,_0x25d4dc:0x36c,_0x4133c0:0x370,_0x5555e4:0x15e,_0x1a5bdb:0x150,_0x217ce8:0x366,_0x270a53:0x3ab,_0xf98c7f:0x195,_0xec3bd9:0x189,_0x2ea574:0x1b1,_0x2ac143:0x195,_0x22b7ff:0x1a9,_0xb7f478:0x393,_0x14c7f2:0x3c7,_0x8d7b19:0x3ca},_0x3d241c={_0x24841f:0x3e6},_0x3d5201={_0x12bacb:0x1b6},_0x56d752={_0x558010:0x1d5,_0xf26d49:0x32d};function _0x764dbc(_0x468f7f,_0x52bd1d,_0x348eb2,_0xc5f0b8){return _0x2cb4b9(_0x468f7f,_0x52bd1d-_0x56d752._0x558010,_0xc5f0b8-_0x56d752._0xf26d49,_0xc5f0b8-0xc3);}const _0x2c95e7={..._0x248e6a,'toolCallId':_0xb60e9['id']};throwIfAborted(_0x2c95e7['signal']);const _0x317e25=await resolveDispatchDecision(_0x2c33c8,_0xb60e9,_0x2c95e7);throwIfAborted(_0x2c95e7[_0x764dbc(_0x6cface._0x3ff848,0x338,0x2e9,_0x6cface._0x5a13a8)]);if(_0x317e25['action']===_0x764dbc(_0x6cface._0x4a4001,0x342,0x383,0x36b)){const _0xcbba4b=createRejectedToolResult(_0xb60e9,_0x317e25[_0x5d2f58(-0x144,-_0x6cface._0x5ae0de,-0x181,-0x186)]);return await emitEvent(_0x460775,{'type':'tool_rejected','toolCall':_0xb60e9,'result':_0xcbba4b},_0x2c95e7),_0xcbba4b;}const _0x58e1f0=_0x564ba1[_0x5d2f58(-_0x6cface._0x5d5eb2,-0x227,-_0x6cface._0x293d1b,-0x20a)](_0xb60e9['name']);if(!_0x58e1f0){const _0x43a065=createUnknownToolResult(_0xb60e9);return await emitEvent(_0x460775,{'type':'tool_completed','toolCall':_0xb60e9,'result':_0x43a065},_0x2c95e7),_0x43a065;}throwIfAborted(_0x2c95e7[_0x5d2f58(-0x23b,-_0x6cface._0x272a00,-_0x6cface._0x5b9a3b,-_0x6cface._0x3b3752)]),await emitEvent(_0x460775,{'type':_0x5d2f58(-_0x6cface._0xd70507,-0x19a,-_0x6cface._0x481633,-0x1c0),'toolCall':_0xb60e9},_0x2c95e7);function _0x5d2f58(_0x2cf323,_0x834914,_0x34f3f4,_0x261cc4){return _0xc4fa22(_0x2cf323,_0x834914-_0x3d5201._0x12bacb,_0x34f3f4- -0x60c,_0x261cc4-0x170);}try{throwIfAborted(_0x2c95e7[_0x764dbc(0x333,_0x6cface._0x13ffc4,_0x6cface._0x1b1b9a,0x326)]);const _0x558906=validateToolInput(_0xb60e9[_0x5d2f58(-0x13a,-_0x6cface._0x4755b9,-_0x6cface._0x28197f,-0x163)],_0x58e1f0[_0x5d2f58(-_0x6cface._0x3f431a,-_0x6cface._0x5c3e64,-_0x6cface._0x393300,-0x1a9)]),_0x5f02bb=await _0x58e1f0[_0x764dbc(_0x6cface._0xdce547,0x304,0x35e,0x330)](_0x558906,_0x2c95e7),_0x3c65e1=[],_0x2406aa=addAbortListener(_0x2c95e7['signal'],()=>{const _0x98df81={_0x11258e:0x183};function _0x52f071(_0x58f812,_0x33717b,_0x3b8017,_0x1d6e91){return _0x5d2f58(_0x58f812,_0x33717b-0x135,_0x1d6e91-0x592,_0x1d6e91-_0x98df81._0x11258e);}void _0x5f02bb['return'](void 0x0)[_0x52f071(0x3c8,0x3a6,0x3cc,_0x3d241c._0x24841f)](()=>{});});try{throwIfAborted(_0x2c95e7[_0x764dbc(_0x6cface._0x4c3f6c,0x30c,0x2e6,_0x6cface._0x3fcd22)]);let _0x5616de=await _0x5f02bb['next']();while(!_0x5616de[_0x5d2f58(-_0x6cface._0x3a075f,-0x20e,-_0x6cface._0x3eba57,-0x1e6)]){throwIfAborted(_0x2c95e7[_0x764dbc(0x315,0x353,_0x6cface._0x4dd295,_0x6cface._0x15219c)]);const _0x5cd989=normalizeToolOutputValue(_0x5616de[_0x5d2f58(-0x19a,-0x11a,-0x168,-0x17d)]);_0x3c65e1[_0x5d2f58(-0x25a,-_0x6cface._0x3970dd,-0x209,-_0x6cface._0x4b8d77)](_0x5cd989),await emitEvent(_0x460775,{'type':_0x764dbc(0x348,0x312,_0x6cface._0x30847b,0x343),'toolCall':_0xb60e9,'chunk':_0x5cd989},_0x2c95e7),throwIfAborted(_0x2c95e7[_0x764dbc(_0x6cface._0x14a2d7,_0x6cface._0x3a1fdd,0x2fd,0x326)]),_0x5616de=await _0x5f02bb[_0x764dbc(_0x6cface._0x25d4dc,0x350,0x3bb,_0x6cface._0x4133c0)]();}throwIfAborted(_0x2c95e7[_0x5d2f58(-0x1f1,-0x203,-0x1ed,-0x214)]);const _0x1a9e71=_0x5616de[_0x5d2f58(-_0x6cface._0x5555e4,-_0x6cface._0x1a5bdb,-0x168,-0x124)]===void 0x0?deriveFinalToolOutput(_0x3c65e1):normalizeToolOutputValue(_0x5616de[_0x764dbc(_0x6cface._0x217ce8,0x396,0x3ff,_0x6cface._0x270a53)]),_0x291d43=createSuccessToolResult(_0xb60e9,_0x1a9e71,_0x3c65e1);return await emitEvent(_0x460775,{'type':_0x5d2f58(-0x1a7,-0x168,-_0x6cface._0xf98c7f,-_0x6cface._0xec3bd9),'toolCall':_0xb60e9,'result':_0x291d43},_0x2c95e7),_0x291d43;}catch(_0x33ea77){if(isAbortError(_0x33ea77)){const _0x230c12=createAbortedToolResult(_0xb60e9,_0x33ea77,_0x3c65e1);return await emitEvent(_0x460775,{'type':_0x764dbc(0x388,0x375,0x354,0x37e),'toolCall':_0xb60e9,'result':_0x230c12},_0x2c95e7),_0x230c12;}const {errorMessage:_0x35ad9b,structured:_0x4ef7ca}=normalizeExecutionError(_0x33ea77),_0x113f34=createErrorToolResult(_0xb60e9,_0x35ad9b,_0x4ef7ca,_0x3c65e1);return await emitEvent(_0x460775,{'type':_0x5d2f58(-_0x6cface._0x2ea574,-0x1a8,-_0x6cface._0x2ac143,-0x1e7),'toolCall':_0xb60e9,'result':_0x113f34},_0x2c95e7),_0x113f34;}finally{_0x2406aa();}}catch(_0xae89){if(isAbortError(_0xae89)){const _0x372549=createAbortedToolResult(_0xb60e9,_0xae89);return await emitEvent(_0x460775,{'type':_0x5d2f58(-0x147,-_0x6cface._0x22b7ff,-0x195,-0x172),'toolCall':_0xb60e9,'result':_0x372549},_0x2c95e7),_0x372549;}const {errorMessage:_0x15052e,structured:_0x34d561}=normalizeExecutionError(_0xae89),_0x447b10=createErrorToolResult(_0xb60e9,_0x15052e,_0x34d561);return await emitEvent(_0x460775,{'type':_0x764dbc(_0x6cface._0xb7f478,_0x6cface._0x14c7f2,_0x6cface._0x8d7b19,0x37e),'toolCall':_0xb60e9,'result':_0x447b10},_0x2c95e7),_0x447b10;}}function createInternalToolRuntime(_0x4d9c1f=[],_0x32fb3d={}){const _0x4b512b={_0x256cda:0x1df,_0x9a1294:0x1da,_0x4c727e:0x201},_0x1338ed={_0x475aee:0x225},_0x43f8f0={_0x1b37f0:0x61,_0x206174:0x33,_0x18e980:0x10,_0x460c6f:0x17};let _0x24c671=new ToolRegistry(_0x4d9c1f);return{'listToolSchemas'(){const _0x2dcc54={_0x36ab04:0x1d0};function _0x5f848d(_0x169f36,_0x4f777f,_0x1ec1a7,_0x4fec41){return _0x4978(_0x1ec1a7- -_0x2dcc54._0x36ab04,_0x4f777f);}return _0x24c671[_0x5f848d(-_0x43f8f0._0x1b37f0,_0x43f8f0._0x206174,-_0x43f8f0._0x18e980,-_0x43f8f0._0x460c6f)]();},'setTools'(_0x193ea5){_0x24c671=new ToolRegistry(_0x193ea5);},async 'executeCalls'(_0x5d3c08,_0x1af978){const _0x1b7201={_0x14e406:0x51};return await Promise['all'](_0x5d3c08['map'](async _0xf15e0c=>{function _0x23d457(_0x45c19c,_0xef8d61,_0x1bcf59,_0xe06aa1){return _0x4978(_0x1bcf59-_0x1b7201._0x14e406,_0xe06aa1);}return await executeToolCall(_0x24c671,_0xf15e0c,_0x1af978,_0x32fb3d[_0x23d457(_0x1338ed._0x475aee,0x217,0x1e7,0x213)],_0x32fb3d['onEvent']);}));},async 'execute'(_0xa503b0,_0x3d6bb7){const [_0x39d6da]=await this[_0x300217(-_0x4b512b._0x256cda,-0x221,-_0x4b512b._0x9a1294,-_0x4b512b._0x4c727e)]([_0xa503b0],_0x3d6bb7);function _0x300217(_0x207b96,_0x3c3984,_0x5bd9a5,_0xedee2){return _0x4978(_0x207b96- -0x34f,_0x3c3984);}return _0x39d6da;}};}function getOrderedObserverExtensions(_0x157264,_0xe956de){const _0x55511b={_0x4d8dc6:0x74,_0x27260c:0x39},_0x5e91fc={_0x15ee48:0x25a,_0x5900b9:0x264,_0x1b4327:0x265,_0x2aa648:0x2c4,_0x56099c:0x2c3,_0x243767:0x2cf,_0x3e86b8:0x2d5,_0x4dbd64:0x31b},_0x53a7a1={_0x45b035:0x259},_0x48cefd={_0x13b1e2:0x10e,_0x10b3ae:0xe1,_0x3c31df:0x2a6},_0x377e4b={_0x459e04:0x66},_0x1d3b20={_0x18c0de:0x128};function _0x14def8(_0x342f9a,_0x591a7b,_0xc5658c,_0x421011){return _0x2cb4b9(_0x591a7b,_0x591a7b-_0x1d3b20._0x18c0de,_0x421011- -0x36,_0x421011-0x142);}function _0x3181c5(_0x5b0615,_0x410ed1,_0xf6c53c,_0x1a71e7){return _0xc4fa22(_0x410ed1,_0x410ed1-0xbf,_0xf6c53c- -0x348,_0x1a71e7-_0x377e4b._0x459e04);}return _0x157264[_0x14def8(0x56,0x78,_0x55511b._0x4d8dc6,_0x55511b._0x27260c)](_0x247872=>{function _0xb1d24e(_0x56baa5,_0x47d1c0,_0x5837c1,_0x41b45c){return _0x14def8(_0x56baa5-_0x48cefd._0x13b1e2,_0x41b45c,_0x5837c1-_0x48cefd._0x10b3ae,_0x56baa5-_0x48cefd._0x3c31df);}function _0x5c0446(_0x147a94,_0x568f64,_0x4624f5,_0x35292b){return _0x14def8(_0x147a94-0x187,_0x4624f5,_0x4624f5-0x166,_0x147a94-_0x53a7a1._0x45b035);}return _0x247872[_0x5c0446(0x28e,0x2b0,_0x5e91fc._0x15ee48,_0x5e91fc._0x5900b9)]!==![]&&_0x247872[_0xb1d24e(0x29a,_0x5e91fc._0x1b4327,0x254,_0x5e91fc._0x2aa648)]===_0xe956de&&_0x247872[_0xb1d24e(0x2b0,0x2dd,0x2da,_0x5e91fc._0x56099c)]===_0xb1d24e(_0x5e91fc._0x243767,0x28a,_0x5e91fc._0x3e86b8,_0x5e91fc._0x4dbd64);})['sort']((_0x3611de,_0x17c0ee)=>_0x3611de[_0x14def8(0x71,0x5,-0x1d,0x27)]-_0x17c0ee['order']);}function _0x2cb4b9(_0x4f725e,_0x5e9398,_0x3f3164,_0xc54931){return _0x4978(_0x3f3164- -0x13e,_0x4f725e);}function getOrderedTransformerExtensions(_0x394e97,_0x464aa9){const _0x520997={_0xe3a044:0x1d1,_0x472f02:0x1dd,_0x3c6b0a:0x1ce,_0x13390b:0x1c0},_0x59882b={_0x25003f:0x1cd,_0x5b4c08:0x1b4,_0x4e9796:0x1ba,_0x40bb69:0x1d0,_0x286306:0x208,_0x7285ba:0x154,_0xa77de1:0x10a},_0x1e54b8={_0x43fd5d:0x15e,_0x5a9064:0x9b},_0x321738={_0x316474:0x185,_0x872cde:0x120};function _0x2412e3(_0x31f280,_0x568b16,_0x32ee0e,_0x2c5ce1){return _0xc4fa22(_0x32ee0e,_0x568b16-0x3,_0x568b16-0x1f,_0x2c5ce1-0x4b);}function _0x2d1ee7(_0x1dab20,_0x44cb21,_0x4e51c5,_0x39308d){return _0x2cb4b9(_0x1dab20,_0x44cb21-0xf3,_0x4e51c5-_0x321738._0x316474,_0x39308d-_0x321738._0x872cde);}return _0x394e97[_0x2d1ee7(_0x520997._0xe3a044,0x1fe,0x1f4,0x1bd)](_0x4b1f2e=>{function _0x4b9475(_0xf8955e,_0x2751c9,_0x1d94f4,_0x5dfff0){return _0x2d1ee7(_0x1d94f4,_0x2751c9-0x121,_0x5dfff0- -0x29f,_0x5dfff0-0x182);}function _0x297da9(_0x520c26,_0xe4c0fd,_0xbb302d,_0x19f9b0){return _0x2d1ee7(_0xbb302d,_0xe4c0fd-_0x1e54b8._0x43fd5d,_0xe4c0fd-0xb,_0x19f9b0-_0x1e54b8._0x5a9064);}return _0x4b1f2e[_0x297da9(0x1b6,0x1fb,_0x59882b._0x25003f,_0x59882b._0x5b4c08)]!==![]&&_0x4b1f2e[_0x297da9(0x169,_0x59882b._0x4e9796,0x1e1,0x17d)]===_0x464aa9&&_0x4b1f2e[_0x297da9(0x21a,_0x59882b._0x40bb69,_0x59882b._0x286306,0x1df)]===_0x4b9475(-0x120,-_0x59882b._0x7285ba,-0x128,-_0x59882b._0xa77de1);})[_0x2d1ee7(0x1a9,_0x520997._0x472f02,_0x520997._0x3c6b0a,_0x520997._0x13390b)]((_0x2aa368,_0x589ed6)=>_0x2aa368[_0x2d1ee7(0x1dd,0x1c6,0x1e2,0x1f3)]-_0x589ed6[_0x2d1ee7(0x225,0x1f8,0x1e2,0x1c8)]);}function createExtensionRegistry(){const _0x45875d={_0x274d02:0xae,_0x124dee:0xe4,_0x369330:0x130,_0x395a36:0xaf},_0x131cc1={_0x271d19:0x119},_0x3d1539={_0x529c0f:0x19a,_0x5f29de:0x1ab},_0x406564=[];return{'register'(_0x314340){const _0x7109a7={_0x1425e2:0x7f};function _0x59476e(_0x12453d,_0x15e0b1,_0x1e7987,_0x3141a4){return _0x4978(_0x15e0b1-_0x7109a7._0x1425e2,_0x1e7987);}_0x406564[_0x59476e(0x153,_0x3d1539._0x529c0f,0x1dc,_0x3d1539._0x5f29de)](_0x314340);},async 'runTransformers'(_0x27b5b0,_0x4948e2,_0x5113d7){let _0x1d7751=_0x4948e2;function _0x336c58(_0x4aaa73,_0x3d6769,_0x39b194,_0x2d4a7b){return _0x4978(_0x3d6769- -0x28b,_0x4aaa73);}for(const _0x1a1ff7 of getOrderedTransformerExtensions(_0x406564,_0x27b5b0)){_0x1d7751=await _0x1a1ff7[_0x336c58(-_0x131cc1._0x271d19,-0x105,-0xed,-0xdd)](_0x1d7751,_0x5113d7);}return _0x1d7751;},async 'runObservers'(_0x49053e,_0x288583,_0x5b8ba3){function _0x57b6f9(_0x5700a2,_0x5458b9,_0x23622d,_0x2ac495){return _0x4978(_0x5458b9- -0x26a,_0x23622d);}for(const _0x429c8b of getOrderedObserverExtensions(_0x406564,_0x49053e)){await _0x429c8b[_0x57b6f9(-_0x45875d._0x274d02,-_0x45875d._0x124dee,-_0x45875d._0x369330,-_0x45875d._0x395a36)](_0x288583,_0x5b8ba3);}}};}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(_0x47371b={}){const _0x193fec={_0x5a7350:0x232,_0x59e3d9:0x221},_0x277acc={_0x2b8cfa:0xaa,_0x3c0c2f:0x130,_0x3b7b14:0x138,_0x248d3d:0x147,_0x2dc889:0x7,_0xae1bce:0x3f,_0x5dc0bd:0x8a,_0x52aee8:0x5b,_0x181ceb:0x1de,_0x3509c0:0x1be,_0x4ff0b3:0x187,_0x263bd8:0xb2,_0x27cdbf:0x9f,_0x181e4c:0x1bb,_0x14ca73:0x194,_0x45367d:0x1f0,_0x38caf8:0x151,_0x418246:0x18c,_0x5432a3:0x15b,_0x3ed5ed:0x143,_0x263557:0x1b9,_0x56b491:0x1fb,_0x987d2e:0x42,_0xcde29c:0x18c,_0xdf35fe:0xf1,_0x49286c:0x93,_0x21c145:0x154,_0x316e7c:0x19f,_0x5d1106:0x1a8,_0x1d887d:0x1ce,_0x359130:0x1ed,_0x2ad0cc:0x1eb,_0x176094:0x72,_0x4d71da:0x80,_0x49ef5a:0xb,_0x366f66:0x87,_0x272f7e:0x69,_0x2d4141:0x5a,_0x2a0623:0xb3,_0x2b2c4d:0x10a,_0x28f72c:0x1d,_0x8d9703:0x6f};let _0x48f5e3=createEmptySnapshot();const _0x5f618c=new Set();let _0x2bc53e;const _0x42dddd=()=>{const _0x40f847={..._0x48f5e3};for(const _0x63e47d of _0x5f618c)_0x63e47d(_0x40f847);};return{'getSnapshot'(){return{..._0x48f5e3};},'recordEvent'(_0x567268){const _0x2983bf={_0x549c1e:0x1e7};function _0x1d71fc(_0x4c1c90,_0x15f437,_0x2b2053,_0x4f16b8){return _0x4978(_0x4f16b8- -_0x2983bf._0x549c1e,_0x2b2053);}if(_0x567268['type']==='model_request'){_0x2bc53e=Date[_0x1d71fc(-0x99,-0xe0,-0x83,-_0x277acc._0x2b8cfa)]();const _0x2764e8=_0x47371b[_0xda3e3b(-_0x277acc._0x3c0c2f,-0x16b,-_0x277acc._0x3b7b14,-_0x277acc._0x248d3d)]?.(_0x567268['request']);_0x2764e8!==void 0x0&&(_0x48f5e3={..._0x48f5e3,'contextWindowLimit':_0x2764e8},_0x42dddd());return;}if(_0x567268[_0x1d71fc(-0x33,-0x81,-0x81,-0x41)]===_0x1d71fc(-_0x277acc._0x2dc889,-_0x277acc._0xae1bce,-_0x277acc._0x5dc0bd,-_0x277acc._0x52aee8)){const _0x2fc32c=_0x567268[_0xda3e3b(-_0x277acc._0x181ceb,-0x18c,-_0x277acc._0x3509c0,-_0x277acc._0x4ff0b3)][_0x1d71fc(-0xdb,-_0x277acc._0x263bd8,-0xae,-_0x277acc._0x27cdbf)][_0xda3e3b(-0x1bc,-_0x277acc._0x181e4c,-_0x277acc._0x14ca73,-_0x277acc._0x45367d)],_0x4180f0=_0x567268[_0xda3e3b(-_0x277acc._0x38caf8,-_0x277acc._0x418246,-_0x277acc._0x5432a3,-_0x277acc._0x3ed5ed)][_0xda3e3b(-0x163,-0x1b6,-_0x277acc._0x263557,-_0x277acc._0x56b491)][_0x1d71fc(-0x7c,-0x8f,-0x81,-_0x277acc._0x987d2e)],_0x334dca=_0x567268[_0xda3e3b(-0x140,-_0x277acc._0xcde29c,-0x15c,-0x15b)]['usage']['reasoningTokens']??0x0,_0x493987=_0x2fc32c+_0x4180f0,_0x3d0a36=_0x2bc53e===void 0x0?0x0:Date[_0x1d71fc(-_0x277acc._0xdf35fe,-0x7b,-_0x277acc._0x49286c,-_0x277acc._0x2b8cfa)]()-_0x2bc53e;_0x2bc53e=void 0x0,_0x48f5e3={..._0x48f5e3,'totalTokens':_0x48f5e3['totalTokens']+_0x493987,'totalInputTokens':_0x48f5e3[_0xda3e3b(-_0x277acc._0x21c145,-_0x277acc._0x14ca73,-_0x277acc._0x316e7c,-0x1d0)]+_0x2fc32c,'totalOutputTokens':_0x48f5e3[_0xda3e3b(-0x1bb,-0x18b,-0x1d6,-_0x277acc._0x5d1106)]+_0x4180f0,'totalReasoningTokens':_0x48f5e3[_0xda3e3b(-0x1f9,-_0x277acc._0x1d887d,-_0x277acc._0x359130,-0x1b0)]+_0x334dca,'modelCallCount':_0x48f5e3['modelCallCount']+0x1,'totalModelTimeMs':_0x48f5e3[_0xda3e3b(-0x214,-0x1e1,-0x209,-_0x277acc._0x2ad0cc)]+_0x3d0a36,'currentTokens':_0x493987,'currentInputTokens':_0x2fc32c,'currentOutputTokens':_0x4180f0,'currentReasoningTokens':_0x334dca,'currentModelTimeMs':_0x3d0a36,..._0x48f5e3[_0x1d71fc(-_0x277acc._0x176094,-0x93,-_0x277acc._0x4d71da,-0x55)]&&_0x493987>0x0?{'contextWindowUsage':_0x493987/_0x48f5e3[_0x1d71fc(-0x23,-0x42,-0x6f,-0x55)]}:{}},_0x42dddd();return;}function _0xda3e3b(_0x595960,_0x26a07a,_0x4c2428,_0xa9ac6e){return _0x4978(_0x26a07a- -0x2fe,_0x595960);}if(_0x567268[_0x1d71fc(_0x277acc._0x49ef5a,-_0x277acc._0x366f66,-_0x277acc._0x272f7e,-0x41)]===_0x1d71fc(-_0x277acc._0x176094,-0x5a,-_0x277acc._0x2d4141,-0x46)){_0x48f5e3={..._0x48f5e3,'toolCallCount':_0x48f5e3[_0x1d71fc(-0xa9,-0xd0,-0x102,-_0x277acc._0x2a0623)]+0x1},_0x42dddd();return;}_0x567268['type']===_0xda3e3b(-0x19c,-0x152,-_0x277acc._0x2b2c4d,-0x15d)&&(_0x48f5e3={..._0x48f5e3,'requestCount':_0x48f5e3[_0x1d71fc(-_0x277acc._0x28f72c,-0x85,-_0x277acc._0x8d9703,-0x37)]+0x1},_0x42dddd());},'reset'(){_0x48f5e3=createEmptySnapshot(),_0x2bc53e=void 0x0,_0x42dddd();},'subscribe'(_0x2c99c9){const _0x291a9a={_0x126adb:0x18e,_0x1ca888:0x13b},_0x2f47e9={_0x24f892:0x78},_0x285bd5={_0x3e6b0e:0x9f};_0x5f618c[_0x5cab14(0x251,_0x193fec._0x5a7350,_0x193fec._0x59e3d9,0x27f)](_0x2c99c9);function _0x5cab14(_0xb8abe,_0x259e0a,_0x5be865,_0x5cbdd1){return _0x4978(_0xb8abe-_0x285bd5._0x3e6b0e,_0x5cbdd1);}return()=>{function _0x1e4df5(_0x3c4dfc,_0x30a73d,_0x4c889e,_0x377be1){return _0x5cab14(_0x3c4dfc- -_0x2f47e9._0x24f892,_0x30a73d-0x17c,_0x4c889e-0x1ce,_0x30a73d);}_0x5f618c[_0x1e4df5(_0x291a9a._0x126adb,0x1dd,_0x291a9a._0x1ca888,0x174)](_0x2c99c9);};}};}function makeExtensionContext(_0x2fd77d){return{'state':_0x2fd77d};}async function runStage(_0x26537e,_0x68fa74,_0x212dd4,_0x4cf2f7){const _0x5a2253={_0x38bbb8:0x3ba},_0x56e381={_0x22ee75:0x19f,_0x35c59c:0x12a};function _0xbcd00(_0x213993,_0x229c36,_0x394228,_0x204aa9){return _0x2cb4b9(_0x229c36,_0x229c36-_0x56e381._0x22ee75,_0x213993-0x37d,_0x204aa9-_0x56e381._0x35c59c);}const _0x54b45c=await _0x26537e['runTransformers'](_0x68fa74,_0x212dd4,_0x4cf2f7);return await _0x26537e[_0xbcd00(0x3f3,_0x5a2253._0x38bbb8,0x40f,0x43a)](_0x68fa74,_0x54b45c,_0x4cf2f7),_0x54b45c;}async function emitEvent2(_0x181f8e,_0x210d0b,_0x140938){await _0x181f8e?.(_0x210d0b,_0x140938);}function _0x362e(){const _0x23dc96=['Dg9VBf91C2u','DhjHBNnMB3jTzxi','DxnLCL9TzxnZywDL','vg9VBcbLEgvJDxrPB24GCMvQzwn0zwqGzM9Yia','ywn0Aw9U','otCYmtqWChnNrfzS','BgvUz3rO','Dg9VBf9VDxrWDxrFy2H1BMS','y29UDgvUDa','BgLZDa','y29UDgvUDeLUzgv4','BwvZC2fNzq','Bwv0CMLJCW','BwfW','C2v0u2vZC2LVBKLK','C3rYDwn0DxjLza','zg9Uzq','Dg9VBfj1BNrPBwu','C2v0vg9VBhm','ywrKrxzLBNrmAxn0zw5LCG','n0LtEg5zAG','C2vZC2LVBKLK','Bw9KzwXFCMvXDwvZDa','CMvJB3jKrxzLBNq','Dg9VBf91C2vFy2H1BMS','BgfZDfjLC3bVBNnL','zgvSzxrL','C3rHz2u','yMvMB3jLvg9VBev4zwn1DgLVBG','Dg90ywXjBNb1DfrVA2vUCW','B25fDMvUDa','CMvHC29UAw5NtwvZC2fNzuLK','DhvYBI0','C2vZC2LVBI0','C3rHDgu','zxHLy3v0zunHBgXZ','C2vUza','CMvZCg9UC2u','Dg90ywXpDxrWDxruB2TLBNm','C3rYzwfTAw5N','CMvNAxn0CNK','Aw5KzxG','DxnLCG','y2f0y2G','Dg9VBhncEu5HBwu','Dg9VBf9ZDgfYDgvK','CMvNAxn0zxi','CMvQzwn0','Dg9VBf91C2vFzgvSDge','A2LUza','yxjYyxK','x3n5C3rLBvbYB21WDa','BMv4Da','Dw5RBM93BL90B29S','ywz0zxjnB2rLBfjLC3bVBNnL','DMfSDwvZ','zxH0zw5ZAw9UCW','CNvU','C29YDa','mZq3mte4neLMz2HRDq','oIbLEhbLy3rLzcbUDw1Izxi','sw52ywXPzcb0B29SigLUChv0igf0ia','B3v0Chv0sw5KzxG','Bw9KzwXFCMvZCg9UC2u','zNvUy3rPB24','C3rYzwfT','Dg9VBf9JB21WBgv0zwq','oIbLEhbLy3rLzcbHCNjHEq','y2f1C2u','y29UDgv4DfDPBMrVD0XPBwL0','z2v0q29UDgv4DfDPBMrVD0XPBwL0','Aw5WDxrezwX0yq','zgvSDge','B25uB29Sq2fSBa','DhvYBKLK','zgvMyxvSDe1LC3nHz2u','oIbLEhbLy3rLzcbIB29SzwfU','Aw5WDxq','B3jKzxi','zMLUywXnzxnZywDL','B2jZzxj2zxi','nKntCwvjrW','Dg9VBf91C2vFBwvZC2fNzq','Dg9VBf9YzwPLy3rLza','Dg9VBf9JywXS','C2vZC2LVBKrPCG','CMvHC29U','B3v0Chv0','B3v0Chv0vg9Rzw5Z','DhLWzq','yw50AhjVCgLJx3rOAw5RAw5Nx2rLBhrH','yxnRvxnLCG','zw5HyMXLza','DhvYBKLUzgv4','B2jQzwn0','DhvYBL9JB21WBgv0zq','zMLSDgvY','C3rYAw5NAwz5','CMvTB3zLrxzLBNrmAxn0zw5LCG','CMvXDwvZDenVDw50','CMvHC29UAw5Nx21LC3nHz2u','ywrK','AxrLBxm','CNvUt2jZzxj2zxjZ','C3vTBwfYEuLUzgv4','B3bLBMfPx3jLyxnVBMLUz19KzwX0yq','AxnbCNjHEq','ywjVCNrLza','ndC0nZG3ofPOtur6vq','ywjVCNq','zM9YrwfJAa','DMfSDwu','Bw9KzwW','y29TCgXLDgu','BMfTzq','BgLZDfrVB2Xty2HLBwfZ','vw5RBM93BIb0B29SoIa','qwDLBNqGCMvXDwLYzxmGysbJAgf0tw9KzwW','ChvZAa','ywXS','Dg90ywXnB2rLBfrPBwvnCW','Dg9VBfjLC3vSDhm','yM9VBgvHBG','C2v0','ndGWue9OCKXH','C3rYAw5N','BwvZC2fNzxm','ywz0zxjuDxjUq29TCgXLDgu','C3LZDgvT','BNvTyMvY','C3LZDgvTuhjVBxb0','zw50CMLLCW','CMvHC29UAw5Nx2nODw5R','Dg9tDhjPBMC','CMfJzq','DhjPBq','y2HHDe1VzgvS','tw9KzwWGC3rYzwfTigvUzgvKihDPDgHVDxqGysbMAw5HBcbYzxnWB25Zzq','mtuYotjoBfHOsKm','Dg90ywXszwfZB25PBMDuB2TLBNm','yxnZAxn0yw50twvZC2fNzuLK','AxrLBuLK','qwDLBNqUC2vUzcbYzxf1AxjLCYbHig1LC3nHz2uGD2HLBIbUBYbKzwzHDwX0ig1LC3nHz2uGAxmGy29UzMLNDxjLza','Dg9VBenHBgXdB3vUDa','ywz0zxjnzxnZywDLqxbWzw5K','yxnZAxn0yw50x21LC3nHz2u','C2LNBMfS','ntm2mtG0sxvAuw5z','nJq3mZm5mgLUt0nKqq','CMvXDwLYzwq','CMvZzxrnzxnZywDLCW','B3bLBMfPx3jLyxnVBMLUz19ZDw1Tyxj5x2rLBhrH','BM93','zgvWCW','mJm3mZm4nfbssLvXsG','yMvMB3jLqxnZAxn0yw50qxbWzw5K','zxHLy3v0zq','oIbLEhbLy3rLzcbZDhjPBMC','Aw5WDxruB2TLBNm','Aw5WDxrty2HLBwe','DgHPBMTPBMC','Dg9VBf9Yzxn1Bhq','C2XPy2u','DxnHz2u','oNjLyxnVBMLUzW','z2v0','Dgv4Da','y29UDgvUDf9KzwX0yq'];_0x362e=function(){return _0x23dc96;};return _0x362e();}function replaceToolUseBlocks(_0x30d3d8,_0x11417d){const _0x46ea00={_0x23b4e9:0x1b9,_0x58ad81:0x1ec,_0x1c841d:0x1ce},_0x510235={_0x2ef922:0x2e8},_0xd92313={_0x502ef9:0x142},_0x1d9e56={_0x56aae3:0x1d0,_0x2965e5:0x121},_0x13e45f={_0x5aa540:0x81};function _0x544924(_0x439913,_0x26f5ae,_0xdde8f4,_0x5d5862){return _0xc4fa22(_0x5d5862,_0x26f5ae-_0x13e45f._0x5aa540,_0xdde8f4- -0x51c,_0x5d5862-0x1e8);}let _0x360331=0x0;function _0x36609e(_0x27e391,_0x1d7e6b,_0x7ccb58,_0x1e9f5b){return _0x2cb4b9(_0x1d7e6b,_0x1d7e6b-0x52,_0x1e9f5b- -_0x1d9e56._0x56aae3,_0x1e9f5b-_0x1d9e56._0x2965e5);}return{..._0x30d3d8,'content':_0x30d3d8[_0x36609e(-0x1c4,-0x1fd,-0x184,-_0x46ea00._0x23b4e9)][_0x36609e(-_0x46ea00._0x58ad81,-0x1cf,-_0x46ea00._0x1c841d,-0x1b4)](_0x26c926=>{if(_0x26c926['type']!==_0x26cc89(_0x510235._0x2ef922,0x353,0x306,0x2e7))return _0x26c926;const _0x4f75c3=_0x11417d[_0x360331];_0x360331+=0x1;function _0x26cc89(_0x49cf7e,_0x3cb54c,_0x1826fd,_0x136d91){return _0x544924(_0x49cf7e-0x76,_0x3cb54c-_0xd92313._0x502ef9,_0x1826fd-0x3ed,_0x49cf7e);}return structuredClone(_0x4f75c3);})};}function createAssistantMessageId(_0x3aef7e,_0x1c0a56){return _0x3aef7e+':assistant:'+_0x1c0a56;}function createReasoningMessageId(_0xb798ec){const _0x3acc06={_0x455a88:0x3,_0x5a906b:0x6b},_0x1b69f9={_0x2db45f:0x65};function _0x57b150(_0x55a6ff,_0x40ae77,_0x35a99f,_0x541440){return _0xc4fa22(_0x35a99f,_0x40ae77-0x157,_0x541440- -0x3da,_0x541440-_0x1b69f9._0x2db45f);}return _0xb798ec+_0x57b150(0x90,_0x3acc06._0x455a88,_0x3acc06._0x5a906b,0x57);}function withMessageId(_0x1ea88f,_0x21292d){if(_0x1ea88f['id']===_0x21292d)return _0x1ea88f;return{..._0x1ea88f,'id':_0x21292d};}function createAssistantChunkEvent(_0x3823a7,_0x4f3fe3){const _0x302a94={_0x17ef61:0x6b,_0x3d4afb:0x34,_0x235539:0x7a,_0x3165ec:0x22,_0x685deb:0x2e2,_0x3027aa:0x291,_0x2f3867:0x290,_0x2af535:0x28e,_0x4e5970:0x27c,_0x115bde:0x5d,_0x266948:0x17,_0x24ec41:0x42},_0x5cab2c={_0x46f006:0x102,_0xb6b6ef:0x78};function _0x13a39c(_0x4af16e,_0x549964,_0x48bfea,_0x21846b){return _0x2cb4b9(_0x4af16e,_0x549964-0x1f,_0x21846b-0x26e,_0x21846b-0x2f);}function _0x51bb22(_0x336d96,_0x38ebf1,_0x6f3495,_0x14a64b){return _0x2cb4b9(_0x14a64b,_0x38ebf1-_0x5cab2c._0x46f006,_0x336d96- -_0x5cab2c._0xb6b6ef,_0x14a64b-0x1be);}if(_0x3823a7['type']!==_0x51bb22(-0x6a,-0x73,-0xa5,-0xaa))return void 0x0;if(_0x3823a7[_0x51bb22(-_0x302a94._0x17ef61,-_0x302a94._0x3d4afb,-_0x302a94._0x235539,-_0x302a94._0x3165ec)]===void 0x0)return void 0x0;return{'type':'assistant_chunk','index':_0x3823a7[_0x13a39c(0x2b1,_0x302a94._0x685deb,_0x302a94._0x3027aa,0x2a6)]??0x0,'messageId':_0x4f3fe3,'chunk':{'type':_0x13a39c(0x239,_0x302a94._0x2f3867,_0x302a94._0x2af535,_0x302a94._0x4e5970),'index':_0x3823a7[_0x51bb22(-0x40,-_0x302a94._0x115bde,-_0x302a94._0x266948,-0x4a)]??0x0,'text':_0x3823a7[_0x51bb22(-0x6b,-_0x302a94._0x24ec41,-0x92,-0x67)]}};}function createToolUseChunkEvent(_0xf46b91,_0x25ccaa){const _0x80ccc1={_0x4dec9f:0x1f,_0xfef93c:0x249,_0x5d7577:0xa,_0x5a5626:0x35,_0x5e17bd:0x2d3,_0x12d0ea:0x33,_0x145dcb:0x2b3,_0x28f929:0x2b7},_0x4d3918={_0xf4b9bf:0x15c,_0x26dbe9:0x46f};function _0x46a174(_0x4f9cac,_0x5aa512,_0x3efa5e,_0x1fa974){return _0xc4fa22(_0x3efa5e,_0x5aa512-0xee,_0x5aa512- -0x1c9,_0x1fa974-0x82);}function _0x573c8b(_0xebe059,_0x53465b,_0x147406,_0xc01577){return _0xc4fa22(_0x53465b,_0x53465b-_0x4d3918._0xf4b9bf,_0xebe059- -_0x4d3918._0x26dbe9,_0xc01577-0x53);}if(_0xf46b91[_0x573c8b(_0x80ccc1._0x4dec9f,-0x5,0x33,-0x2b)]!=='tool_use_delta')return void 0x0;return{'type':_0x46a174(0x23d,0x284,0x2a1,_0x80ccc1._0xfef93c),'index':_0xf46b91[_0x46a174(0x2b4,0x295,0x27e,0x2a5)]??0x0,'messageId':_0x25ccaa,'chunk':{'type':_0x573c8b(-_0x80ccc1._0x5d7577,0x3c,-0x43,-_0x80ccc1._0x5a5626),'id':_0xf46b91['id']??'','index':_0xf46b91[_0x46a174(0x245,0x295,0x274,_0x80ccc1._0x5e17bd)]??0x0,..._0xf46b91[_0x573c8b(0x38,_0x80ccc1._0x12d0ea,0x40,0x19)]!==void 0x0?{'name':_0xf46b91[_0x573c8b(0x38,0xd,0x79,0x3a)]}:{},..._0xf46b91['inputDelta']!==void 0x0?{'inputDelta':_0xf46b91[_0x46a174(0x274,_0x80ccc1._0x145dcb,0x291,_0x80ccc1._0x28f929)]}:{}}};}function createReasoningChunkEvent(_0x17dc8f,_0x30f0c){const _0x1f089d={_0x81cc1b:0x2ef,_0x13c2ae:0x286,_0x5539fa:0x2c0,_0x51fc17:0x332,_0x8b1104:0x2fc,_0x384050:0x327,_0x1197d1:0x309,_0x23cbc2:0x31d,_0x320a96:0x26f,_0x37bc59:0x2bb,_0x6601f6:0x29a,_0x2ebf88:0xba,_0x31f223:0xe8,_0x2eebdc:0x74,_0x5c75be:0xce,_0x417c24:0x2c6,_0x290821:0x271,_0xf46bac:0xe6,_0x334463:0x2f2,_0x2743ad:0x2db,_0x49d3fb:0x2d8,_0x31a252:0x336,_0x718b84:0x2ec,_0x39bf70:0x32b,_0x20fc75:0x2ba,_0x31efc8:0x30b,_0x590236:0xfd,_0xb8284e:0xad,_0x9168ba:0xf9,_0x1c45b9:0x32c},_0x1834bd={_0x39a340:0x10a,_0x45373b:0x54a},_0x476095={_0x470d60:0x35};function _0x55b7db(_0x256ac6,_0x142194,_0x1818c2,_0x5a8329){return _0xc4fa22(_0x1818c2,_0x142194-_0x476095._0x470d60,_0x5a8329- -0x172,_0x5a8329-0x107);}function _0x2bca49(_0x287f48,_0x3bf5f8,_0x99679d,_0x145c4a){return _0xc4fa22(_0x287f48,_0x3bf5f8-_0x1834bd._0x39a340,_0x99679d- -_0x1834bd._0x45373b,_0x145c4a-0x3);}switch(_0x17dc8f[_0x55b7db(0x2d2,0x331,_0x1f089d._0x81cc1b,0x31c)]){case _0x55b7db(0x2fc,0x34e,0x33d,0x31d):return{'type':_0x55b7db(_0x1f089d._0x13c2ae,0x2b9,_0x1f089d._0x5539fa,0x29f),'index':_0x17dc8f[_0x55b7db(_0x1f089d._0x51fc17,_0x1f089d._0x8b1104,_0x1f089d._0x384050,0x2ec)],'messageId':_0x30f0c,'chunk':{'type':_0x55b7db(0x2fa,_0x1f089d._0x1197d1,0x347,_0x1f089d._0x23cbc2),'index':_0x17dc8f['index']??0x0,'thinking':_0x17dc8f['thinking']??''},'text':_0x17dc8f[_0x55b7db(_0x1f089d._0x320a96,0x2cf,0x2ef,_0x1f089d._0x37bc59)]??''};case'openai_reasoning_delta':return{'type':_0x55b7db(0x28c,_0x1f089d._0x6601f6,0x292,0x29f),'index':_0x17dc8f[_0x55b7db(0x2fe,0x2d1,0x317,0x2cd)],'messageId':_0x30f0c,'chunk':{'type':_0x2bca49(-_0x1f089d._0x2ebf88,-_0x1f089d._0x31f223,-0xac,-_0x1f089d._0x2eebdc),'contentIndex':_0x17dc8f['contentIndex']??0x0,'delta':_0x17dc8f[_0x2bca49(-_0x1f089d._0x5c75be,-0x116,-0xcd,-0xdc)]??'','itemId':_0x17dc8f[_0x55b7db(0x2aa,_0x1f089d._0x417c24,_0x1f089d._0x290821,0x2a8)]??'','outputIndex':_0x17dc8f[_0x2bca49(-0x116,-0x9e,-0xd7,-_0x1f089d._0xf46bac)]??0x0},'text':_0x17dc8f['delta']??''};case'openai_reasoning_summary_delta':return{'type':_0x55b7db(_0x1f089d._0x334463,_0x1f089d._0x2743ad,0x25e,0x29f),'index':_0x17dc8f[_0x55b7db(_0x1f089d._0x49d3fb,_0x1f089d._0x31a252,_0x1f089d._0x718b84,_0x1f089d._0x39bf70)],'messageId':_0x30f0c,'chunk':{'type':_0x2bca49(-0x15e,-0x14e,-0x126,-0xf3),'delta':_0x17dc8f[_0x55b7db(0x31c,0x350,_0x1f089d._0x20fc75,_0x1f089d._0x31efc8)]??'','itemId':_0x17dc8f['itemId']??'','outputIndex':_0x17dc8f['outputIndex']??0x0,'summaryIndex':_0x17dc8f[_0x2bca49(-0x59,-_0x1f089d._0x590236,-_0x1f089d._0xb8284e,-_0x1f089d._0x9168ba)]??0x0},'text':_0x17dc8f[_0x55b7db(_0x1f089d._0x1c45b9,0x33e,0x30d,0x30b)]??''};default:return void 0x0;}}function isAbortedToolResult(_0x2de873){const _0x37a24c={_0x34871d:0x38c,_0x19b92e:0x3b1,_0x3a6b66:0x38b},_0xd40f38={_0x318cd6:0x393,_0x5160d6:0xe3};function _0x282295(_0x96fa82,_0x29b12e,_0x3e1981,_0x3ac140){return _0x2cb4b9(_0x3e1981,_0x29b12e-0x145,_0x29b12e-_0xd40f38._0x318cd6,_0x3ac140-_0xd40f38._0x5160d6);}return _0x2de873['status']==='error'&&_0x2de873[_0x282295(_0x37a24c._0x34871d,_0x37a24c._0x19b92e,0x3b8,_0x37a24c._0x3a6b66)]['aborted']===!![];}async function executeModelRequest(_0x48c4bc,_0x270a41,_0x3c2bb0,_0x902a5b,_0x2f1be5){const _0x14f496={_0x5a0dcc:0x35d,_0x509282:0x315,_0x5379b4:0x2da,_0x5c5be0:0x308,_0x32d9f8:0x30a,_0x5271d6:0x381,_0x4b8aa8:0x3fc,_0x2154fc:0x3c4,_0x4ad559:0x3cf,_0x3d14a3:0x2ee,_0x29701b:0x2e4,_0x234b44:0x2f4,_0xeeeecc:0x36d,_0x56dba7:0x33b,_0x20124b:0x32b,_0x2aead6:0x353,_0x4162c1:0x39a,_0x43d39c:0x31f,_0x5c6709:0x314,_0x559ccb:0x2db,_0xded0fc:0x341,_0x569fe4:0x318,_0x9024e6:0x311,_0x394877:0x2d9,_0x917101:0x33a,_0x26eca2:0x32a,_0x36a42a:0x300,_0x1c8ff6:0x348,_0x4f1f4d:0x31a,_0x4a21ed:0x31d,_0x47d565:0x358,_0x592c0c:0x2f9,_0x5b8a9f:0x2ef,_0x2e3780:0x351,_0xf8edb7:0x2c2,_0x49cb51:0x2cd,_0x39c89c:0x2ca,_0x19e93e:0x342,_0x3da4f1:0x2a4},_0x41f827={_0x51de44:0x6},_0x361b39={_0x30850e:0x14,_0xbb393e:0x2eb,_0x3175af:0x1dc};throwIfAborted(_0x270a41[_0x225005(_0x14f496._0x5a0dcc,0x2f5,0x348,_0x14f496._0x509282)]);if(!_0x270a41['streaming']||!_0x3c2bb0[_0x47c22e(0x29c,_0x14f496._0x5379b4,0x2d9,_0x14f496._0x5c5be0)]['stream'])return await _0x3c2bb0[_0x225005(_0x14f496._0x32d9f8,0x35f,0x33e,_0x14f496._0x5271d6)][_0x225005(_0x14f496._0x4b8aa8,_0x14f496._0x2154fc,_0x14f496._0x4ad559,0x37b)](_0x48c4bc,{'signal':_0x270a41[_0x47c22e(_0x14f496._0x3d14a3,_0x14f496._0x29701b,0x2d1,_0x14f496._0x234b44)]});let _0x6f0db;for await(const _0x5995cc of _0x3c2bb0[_0x225005(_0x14f496._0xeeeecc,0x38c,0x33e,0x2f8)][_0x47c22e(0x35b,_0x14f496._0x56dba7,0x35a,0x311)](_0x48c4bc,{'signal':_0x270a41[_0x47c22e(0x2ac,0x2e4,0x2fa,_0x14f496._0x20124b)]})){throwIfAborted(_0x270a41['signal']);if(_0x5995cc[_0x47c22e(0x352,_0x14f496._0x2aead6,0x305,_0x14f496._0x4162c1)]==='done'){_0x6f0db=_0x5995cc[_0x47c22e(0x32f,_0x14f496._0x43d39c,_0x14f496._0x5c6709,_0x14f496._0x559ccb)];continue;}if(_0x5995cc[_0x47c22e(_0x14f496._0xded0fc,0x353,0x350,0x37b)]==='provider_retry'){await emitEvent2(_0x3c2bb0[_0x47c22e(0x30e,_0x14f496._0x569fe4,0x30a,_0x14f496._0x9024e6)],_0x5995cc,_0x902a5b);continue;}const _0x3fb6b4=createReasoningChunkEvent(_0x5995cc,_0x2f1be5[_0x47c22e(_0x14f496._0x394877,0x319,0x316,_0x14f496._0x917101)]);if(_0x3fb6b4&&_0x3fb6b4['type']==='reasoning_chunk'&&_0x3fb6b4['text'][_0x47c22e(_0x14f496._0x26eca2,_0x14f496._0x36a42a,0x2d8,_0x14f496._0x1c8ff6)]>0x0){await emitEvent2(_0x3c2bb0[_0x47c22e(_0x14f496._0x4f1f4d,0x318,_0x14f496._0x4a21ed,_0x14f496._0x47d565)],_0x3fb6b4,_0x902a5b);continue;}const _0x49a9c6=createAssistantChunkEvent(_0x5995cc,_0x2f1be5['assistantMessageId']);if(_0x49a9c6){await emitEvent2(_0x3c2bb0[_0x47c22e(_0x14f496._0x592c0c,0x318,_0x14f496._0x5b8a9f,_0x14f496._0x2e3780)],_0x49a9c6,_0x902a5b);continue;}const _0x57cc61=createToolUseChunkEvent(_0x5995cc,_0x2f1be5[_0x47c22e(_0x14f496._0xf8edb7,0x2de,_0x14f496._0x49cb51,_0x14f496._0x39c89c)]);_0x57cc61&&await emitEvent2(_0x3c2bb0[_0x225005(0x39b,_0x14f496._0x19e93e,0x37c,0x3c6)],_0x57cc61,_0x902a5b);}if(!_0x6f0db)throw new Error(_0x47c22e(_0x14f496._0x3da4f1,0x2db,_0x14f496._0xf8edb7,0x2b3));function _0x47c22e(_0x3adf3b,_0xc0fd74,_0x1884c7,_0x566937){return _0x2cb4b9(_0x566937,_0xc0fd74-_0x361b39._0x30850e,_0xc0fd74-_0x361b39._0xbb393e,_0x566937-_0x361b39._0x3175af);}function _0x225005(_0x4a6121,_0x50a0f0,_0x4b4f65,_0x3e30da){return _0xc4fa22(_0x3e30da,_0x50a0f0-_0x41f827._0x51de44,_0x4b4f65- -0xd7,_0x3e30da-0x1d7);}return _0x6f0db;}function makeTurnGuards(_0x1b39c0,_0x42608c,_0x220585,_0x25853b,_0x5a8949){return{async 'stage'(_0x4fc6ea,_0x47742d){return throwIfAborted(_0x1b39c0),await runStage(_0x42608c,_0x4fc6ea,_0x47742d,_0x25853b);},async 'emit'(_0x38bbad){throwIfAborted(_0x1b39c0),await emitEvent2(_0x220585,_0x38bbad,_0x5a8949);},async 'stageUnchecked'(_0x235a56,_0x1e7408){return await runStage(_0x42608c,_0x235a56,_0x1e7408,_0x25853b);},async 'emitUnchecked'(_0x57a5b6){await emitEvent2(_0x220585,_0x57a5b6,_0x5a8949);}};}async function runTurn(_0x3b22c1,_0x2f0d57){const _0x389beb={_0xd258e9:0x2ac,_0x412270:0x305,_0x2bda95:0x2a7,_0x36f781:0x2af,_0x413622:0x30c,_0x289122:0x2d,_0x1b7aa9:0x28,_0xea4978:0x63,_0x5d8410:0x27a,_0x364c9:0x2a0,_0x18a895:0x2d,_0x44f71b:0x20,_0x1d9913:0x26,_0x1dcecf:0x2d,_0x458ec5:0x281,_0x566ad6:0x292,_0x43f99b:0x221,_0x4645a9:0x29e,_0x519814:0x28b,_0x31eafc:0x26f,_0x1424a5:0x20f,_0x3939b0:0x21a,_0x40edcc:0x23b,_0x368ae7:0x285,_0x122eb8:0x3b,_0x5e2ede:0xb,_0x2cdaca:0x52,_0x2c11d8:0x3f,_0x283abf:0x1d,_0x2d87d7:0x5a,_0x45d564:0x294,_0x5c72f4:0x2a9,_0x4784da:0x2a5,_0x24ddb6:0x23,_0x155f52:0x22,_0x48a7b0:0x263,_0x25a0f0:0x22d,_0x197a4d:0x279,_0x841f0a:0x82,_0x3f56fa:0x6d,_0x1f5f4f:0x50,_0x209062:0x76,_0x5803b9:0x271,_0x1f8987:0x272,_0x5c85c7:0x1ed,_0x3b6bfc:0x262,_0x22255e:0x23a,_0x522d20:0x2b0,_0x35b2e2:0x21,_0x354e90:0xf,_0x57ed6b:0x288,_0x138a13:0x55,_0xb5c7a4:0x42,_0x3e090:0x39,_0xe6b29d:0x1b,_0x595b8d:0x2a3,_0x264a57:0x26f,_0x1119e4:0x2d7,_0x3238c9:0x289,_0x5d8070:0x2bc,_0x116e49:0x23e,_0x125005:0x22,_0xa43c7b:0x71,_0x330e88:0x5a,_0x141e32:0x3c,_0x3a0ba5:0x54,_0x1c1a53:0x2ad,_0x1b89a5:0x28c,_0x5306ed:0x2ec,_0x38070c:0x244,_0xc56abb:0x25f,_0xf28401:0x22c,_0x3ef06d:0x2c0,_0x2a8181:0x2fe,_0x498084:0x2c8,_0x1d74d0:0x10,_0x2daece:0x6a,_0x5dc4be:0x2c,_0x2c5a0e:0x48,_0x51b8b1:0x27,_0x14c45a:0x2c0,_0x5a12ed:0x2d7,_0xca1d46:0x28,_0x4519b5:0x67,_0x2e5a18:0x28b,_0x55123a:0x7,_0x41757d:0x89,_0xb5687d:0x4d,_0x198af1:0x91,_0x4b3736:0x51,_0x57e3fb:0x96,_0x1d2f66:0x273,_0x2cccc6:0x2c6,_0x5bf538:0x2a1,_0x12d089:0x2a4,_0x1da4ff:0xe,_0x4e64a6:0x1b,_0x23e42a:0x11,_0x16758e:0x25,_0x1fc4fc:0x19,_0x4730cf:0x29d,_0x449067:0x2e1,_0x251ea8:0x2bc,_0x36f8b0:0x2f2,_0x3712d9:0xb,_0x291db7:0x43,_0x12281e:0x64,_0x532494:0x85,_0x4bd65a:0x248,_0x5121d5:0x1ee,_0x107b9e:0x234},_0x2e3a07={_0x4c621d:0x18b},_0x38cdeb={_0xd0213f:0x142,_0x20867b:0x128},_0x5b9826={_0x332a6e:0x303,_0x50153c:0x30b,_0x2701dc:0x2cb,_0x2dda20:0x2c3,_0x122d9c:0x285},_0x4ee12a={_0x16854b:0x571,_0x2d4eab:0x10c,_0xe0e00f:0x144},_0x112ae9=_0x3b22c1['signal']??new AbortController()[_0x47e4d8(-_0x389beb._0xd258e9,-0x26a,-0x2a2,-0x274)],_0x38a040={'sessionId':_0x3b22c1[_0x177665(-0x1d,0x8,-0x13,-0x29)],'turnId':_0x3b22c1['turnId'],'system':normalizeSystem(_0x3b22c1[_0x47e4d8(-0x2be,-0x28a,-_0x389beb._0x412270,-0x307)]),'messages':(_0x3b22c1[_0x47e4d8(-0x2c0,-_0x389beb._0x2bda95,-_0x389beb._0x36f781,-_0x389beb._0x413622)]??[])[_0x177665(_0x389beb._0x289122,_0x389beb._0x1b7aa9,-0x1b,-_0x389beb._0xea4978)](normalizeMessage),'lastResponse':void 0x0,'toolResults':[],'finalMessage':void 0x0,'sessionDir':typeof _0x2f0d57[_0x47e4d8(-0x241,-0x23a,-0x224,-0x1f8)]===_0x47e4d8(-0x256,-_0x389beb._0x5d8410,-_0x389beb._0x364c9,-0x258)?_0x2f0d57[_0x177665(0x3e,0x41,_0x389beb._0x18a895,-_0x389beb._0x44f71b)]():_0x2f0d57[_0x177665(_0x389beb._0x1d9913,0x68,_0x389beb._0x1dcecf,0x75)]},_0x296cf9=makeExtensionContext(_0x38a040),_0x388743={'sessionId':_0x38a040[_0x47e4d8(-_0x389beb._0x458ec5,-0x26b,-_0x389beb._0x566ad6,-0x2cb)],'turnId':_0x38a040[_0x47e4d8(-0x24c,-_0x389beb._0x43f99b,-_0x389beb._0x4645a9,-_0x389beb._0x519814)],'state':_0x38a040,'signal':_0x112ae9,..._0x2f0d57[_0x47e4d8(-0x23b,-_0x389beb._0x31eafc,-_0x389beb._0x1424a5,-_0x389beb._0x3939b0)]?{'askUser':_0x2f0d57[_0x47e4d8(-_0x389beb._0x40edcc,-0x287,-0x26c,-_0x389beb._0x368ae7)]}:{}},{stage:_0x59a856,emit:_0x13fa84,stageUnchecked:_0x4fe36b,emitUnchecked:_0x2b3c59}=makeTurnGuards(_0x112ae9,_0x2f0d57[_0x177665(-0x22,-_0x389beb._0x122eb8,0x0,_0x389beb._0x5e2ede)],_0x2f0d57[_0x177665(-_0x389beb._0x2cdaca,_0x389beb._0x2c11d8,-0xa,0xc)],_0x296cf9,_0x388743),_0x45a435=async _0x30dd92=>{const _0x2fc7e2={_0x4bd496:0x104,_0x18c1cb:0x15f,_0x4e6070:0x8f};function _0x4ac482(_0x560105,_0x9c7279,_0x3d8eb9,_0x204934){return _0x47e4d8(_0x560105-_0x4ee12a._0x16854b,_0x9c7279-_0x4ee12a._0x2d4eab,_0x3d8eb9-_0x4ee12a._0xe0e00f,_0x9c7279);}function _0x2e9a85(_0x4ae563,_0x4132b5,_0x5d4aac,_0x1ec2dd){return _0x177665(_0x4ae563-_0x2fc7e2._0x4bd496,_0x1ec2dd,_0x4ae563-_0x2fc7e2._0x18c1cb,_0x1ec2dd-_0x2fc7e2._0x4e6070);}await _0x2f0d57[_0x4ac482(_0x5b9826._0x332a6e,0x2f0,_0x5b9826._0x50153c,_0x5b9826._0x2701dc)]['runObservers'](_0x4ac482(_0x5b9826._0x2dda20,_0x5b9826._0x122d9c,0x2cf,0x29b),structuredClone(_0x30dd92),_0x296cf9);};let _0x207da5=0x0;function _0x47e4d8(_0x541b66,_0xd8c411,_0x1d4f49,_0x5809f3){return _0x2cb4b9(_0x5809f3,_0xd8c411-_0x38cdeb._0xd0213f,_0x541b66- -0x2a5,_0x5809f3-_0x38cdeb._0x20867b);}function _0x177665(_0x56369e,_0xdadf78,_0x5dd231,_0x398fee){return _0x2cb4b9(_0xdadf78,_0xdadf78-_0x2e3a07._0x4c621d,_0x5dd231- -0x37,_0x398fee-0x25);}try{const _0x485617=await _0x59a856('onUserMessage',normalizeMessage(_0x3b22c1['message']));_0x38a040[_0x177665(-_0x389beb._0x283abf,-0x6a,-0x52,-0x30)][_0x177665(-0x2d,-0xa8,-_0x389beb._0x2d87d7,-0x7)](_0x485617),await _0x45a435(_0x485617),await _0x13fa84({'type':_0x47e4d8(-_0x389beb._0x45d564,-_0x389beb._0x5c72f4,-0x242,-_0x389beb._0x4784da),'message':_0x485617});while(!![]){throwIfAborted(_0x112ae9),_0x207da5+=0x1;const _0x44120c=createAssistantMessageId(_0x38a040[_0x177665(0x6b,-_0x389beb._0x24ddb6,_0x389beb._0x155f52,0x56)],_0x207da5),_0x12b50c=createReasoningMessageId(_0x44120c);let _0x491e36={'model':_0x2f0d57['chatModel'][_0x47e4d8(-0x226,-_0x389beb._0x48a7b0,-_0x389beb._0x25a0f0,-_0x389beb._0x197a4d)],'maxTokens':_0x2f0d57['chatModel']['maxTokens']??0x4000,'system':structuredClone(_0x38a040[_0x177665(-_0x389beb._0x841f0a,-_0x389beb._0x3f56fa,-_0x389beb._0x1f5f4f,-_0x389beb._0x209062)]),'messages':structuredClone(_0x38a040[_0x47e4d8(-0x2c0,-_0x389beb._0x5803b9,-0x312,-0x2e9)]),'tools':_0x2f0d57[_0x47e4d8(-0x285,-0x26e,-_0x389beb._0x1f8987,-0x24f)][_0x47e4d8(-0x223,-0x205,-0x1ed,-_0x389beb._0x5c85c7)](),'metadata':{'sessionId':_0x38a040[_0x47e4d8(-0x281,-_0x389beb._0x3b6bfc,-_0x389beb._0x22255e,-_0x389beb._0x522d20)],'turnId':_0x38a040[_0x177665(0x50,_0x389beb._0x35b2e2,0x22,-_0x389beb._0x354e90)]}};_0x491e36=await _0x59a856('beforeModelRequest',_0x491e36),await _0x13fa84({'type':_0x47e4d8(-0x280,-0x2a5,-_0x389beb._0x57ed6b,-0x2c6),'request':_0x491e36});let _0x390827=await executeModelRequest(_0x491e36,_0x3b22c1,_0x2f0d57,_0x388743,{'assistantMessageId':_0x44120c,'reasoningMessageId':_0x12b50c});_0x390827=await _0x59a856(_0x177665(_0x389beb._0x138a13,-_0x389beb._0xb5c7a4,0xe,_0x389beb._0x3e090),_0x390827),await _0x13fa84({'type':'model_response','response':_0x390827}),_0x38a040[_0x177665(-0x3,0x35,-_0x389beb._0x354e90,_0x389beb._0xe6b29d)]=_0x390827;let _0x453a73=await _0x59a856(_0x47e4d8(-_0x389beb._0x595b8d,-_0x389beb._0x264a57,-0x28a,-_0x389beb._0x1119e4),withMessageId(responseToAssistantMessage(_0x390827),_0x44120c));_0x453a73=withMessageId(_0x453a73,_0x44120c);const _0x1372f0=getToolUseBlocks(_0x453a73),_0x5d7a47=await Promise['all'](_0x1372f0[_0x47e4d8(-_0x389beb._0x3238c9,-_0x389beb._0x5d8070,-0x23b,-_0x389beb._0x116e49)](_0x5c4260=>_0x59a856(_0x47e4d8(-0x27a,-0x297,-0x268,-0x2b3),_0x5c4260)));_0x5d7a47[_0x177665(-0x61,_0x389beb._0x1b7aa9,-_0x389beb._0x125005,-_0x389beb._0xa43c7b)]>0x0&&(_0x453a73=replaceToolUseBlocks(_0x453a73,_0x5d7a47));const _0x57cf90=withMessageId(_0x453a73,_0x44120c);_0x453a73=_0x57cf90;const _0x32bbd1=createReasoningMessage(_0x453a73),_0x3d785b=createAssistantTextMessage(_0x453a73),_0x59e0ac=createToolUseMessage(_0x453a73);_0x32bbd1&&await _0x13fa84({'type':_0x177665(_0x389beb._0x330e88,-0x8,_0x389beb._0x141e32,_0x389beb._0x3a0ba5),'message':withMessageId(_0x32bbd1,_0x12b50c)});_0x3d785b&&await _0x13fa84({'type':_0x47e4d8(-_0x389beb._0x1c1a53,-_0x389beb._0x1b89a5,-_0x389beb._0x5306ed,-0x25c),'message':withMessageId(_0x3d785b,_0x44120c)});_0x59e0ac&&await _0x13fa84({'type':_0x47e4d8(-_0x389beb._0x38070c,-_0x389beb._0xc56abb,-_0x389beb._0xf28401,-0x23b),'message':withMessageId(_0x59e0ac,_0x44120c)});_0x38a040[_0x47e4d8(-_0x389beb._0x3ef06d,-0x30f,-0x2e9,-_0x389beb._0x2a8181)][_0x47e4d8(-_0x389beb._0x498084,-0x2f3,-0x299,-0x29f)](_0x57cf90);_0x5d7a47[_0x177665(_0x389beb._0x1d74d0,-0x4d,-0x22,-0x76)]>0x0&&await _0x45a435(_0x57cf90);for(const _0x42c8a8 of _0x5d7a47){await _0x13fa84({'type':_0x177665(-0x13,_0x389beb._0x2daece,_0x389beb._0x5dc4be,0x8),'toolCall':_0x42c8a8});}if(_0x5d7a47[_0x177665(_0x389beb._0x125005,-0x3d,-0x22,0x2e)]===0x0){const _0x450dc9=await _0x59a856('beforeFinalOutput',_0x453a73),_0x461a72=withMessageId(_0x450dc9,_0x44120c);return _0x38a040[_0x177665(0x34,_0x389beb._0x2c5a0e,_0x389beb._0x51b8b1,_0x389beb._0xea4978)]=_0x461a72,_0x38a040[_0x47e4d8(-_0x389beb._0x14c45a,-_0x389beb._0x1b89a5,-_0x389beb._0x5a12ed,-0x28b)][_0x38a040[_0x177665(-0x1a,-0x3b,-0x52,-0x18)][_0x177665(0x25,-_0x389beb._0xca1d46,-0x22,-_0x389beb._0x4519b5)]-0x1]=_0x461a72,await _0x45a435(_0x461a72),await _0x13fa84({'type':'final_message','message':_0x461a72}),throwIfAborted(_0x112ae9),await _0x2f0d57[_0x47e4d8(-0x26e,-_0x389beb._0x2e5a18,-_0x389beb._0x522d20,-0x240)][_0x177665(0x7,_0x389beb._0x55123a,0x3f,_0x389beb._0x41757d)](_0x177665(-_0x389beb._0xb5687d,-_0x389beb._0x198af1,-_0x389beb._0x4b3736,-_0x389beb._0x57e3fb),_0x38a040,_0x296cf9),await _0x13fa84({'type':'turn_complete','state':_0x38a040}),{'status':'completed','finalMessage':_0x461a72,'state':_0x38a040};}let _0xbf32ed=await _0x2f0d57['toolRuntime'][_0x47e4d8(-_0x389beb._0x1d2f66,-0x27b,-_0x389beb._0x2cccc6,-_0x389beb._0x5bf538)](_0x5d7a47,_0x388743);const _0x98c40b=_0xbf32ed['some'](isAbortedToolResult),_0x507b59=_0x98c40b?_0x4fe36b:_0x59a856,_0x3f0cba=_0x98c40b?_0x2b3c59:_0x13fa84;_0xbf32ed=await Promise[_0x47e4d8(-0x2c7,-_0x389beb._0x197a4d,-_0x389beb._0x12d089,-0x292)](_0xbf32ed[_0x177665(-_0x389beb._0x1da4ff,-0x9,-_0x389beb._0x4e64a6,-_0x389beb._0x23e42a)](_0x1e016d=>_0x507b59('afterToolResult',_0x1e016d))),_0x38a040[_0x47e4d8(-0x2c5,-_0x389beb._0x5803b9,-0x2f6,-_0x389beb._0x2bda95)][_0x177665(-_0x389beb._0x16758e,-_0x389beb._0x1fc4fc,-0x5a,-0x9)](..._0xbf32ed);for(const _0x183dfa of _0xbf32ed){await _0x3f0cba({'type':_0x47e4d8(-_0x389beb._0x4730cf,-0x2c8,-_0x389beb._0x449067,-_0x389beb._0x251ea8),'result':_0x183dfa});}const _0x3d3fe7=await _0x507b59('beforeToolResultAppend',createToolResultUserMessage(_0xbf32ed));await _0x3f0cba({'type':'tool_result_message','message':_0x3d3fe7}),_0x38a040[_0x47e4d8(-0x2c0,-0x2ae,-0x29e,-_0x389beb._0x36f8b0)]['push'](_0x3d3fe7),await _0x45a435(_0x3d3fe7);if(_0x98c40b)return{'status':_0x177665(0x93,_0x389beb._0x3712d9,_0x389beb._0x291db7,0x79),'state':_0x38a040};}}catch(_0x27d5d6){if(!_0x112ae9[_0x177665(0x36,_0x389beb._0x12281e,_0x389beb._0x291db7,_0x389beb._0x532494)])throw new TurnFailedError(_0x27d5d6,_0x38a040);return{'status':_0x47e4d8(-0x22b,-_0x389beb._0x4bd65a,-_0x389beb._0x5121d5,-_0x389beb._0x107b9e),'state':_0x38a040};}}function createSessionId(){const _0x3e3bdd={_0x25c835:0x36a,_0x403ea9:0x34e,_0xe0de99:0x353,_0x20ee3d:0x31d,_0x56ed68:0x2b8,_0x132c4f:0x343,_0x4cd808:0x30a,_0x73f925:0x2e8,_0x19a50d:0x357,_0x7bccb8:0x2fc},_0x243b45={_0x12b14:0x2bc,_0x3ac574:0xef},_0x1a734a={_0x4ce4c1:0x4a,_0xad7e68:0x31e,_0x4dc5b5:0x125};function _0x22f774(_0x13e1eb,_0x1b2472,_0x20cdc2,_0x1579d3){return _0x2cb4b9(_0x1b2472,_0x1b2472-_0x1a734a._0x4ce4c1,_0x1579d3-_0x1a734a._0xad7e68,_0x1579d3-_0x1a734a._0x4dc5b5);}function _0x2fb32f(_0x4ffca1,_0x385a6b,_0xf5fdf9,_0x1d56c3){return _0x2cb4b9(_0x385a6b,_0x385a6b-0x38,_0x4ffca1-_0x243b45._0x12b14,_0x1d56c3-_0x243b45._0x3ac574);}return _0x22f774(0x33b,0x34d,_0x3e3bdd._0x25c835,_0x3e3bdd._0x403ea9)+Date[_0x22f774(_0x3e3bdd._0xe0de99,0x300,0x33c,_0x3e3bdd._0x20ee3d)]()+'-'+Math['random']()[_0x22f774(_0x3e3bdd._0x56ed68,_0x3e3bdd._0x132c4f,0x313,_0x3e3bdd._0x4cd808)](0x10)[_0x22f774(_0x3e3bdd._0x73f925,_0x3e3bdd._0x19a50d,_0x3e3bdd._0x7bccb8,0x327)](0x2,0xa);}function createTurnId(_0xa01604){const _0x542a94={_0x1d492b:0x70,_0x30a846:0x8b,_0x243a24:0x41};function _0x3f9552(_0x2b3dec,_0x4652cf,_0x18803e,_0x3694ef){return _0xc4fa22(_0x18803e,_0x4652cf-0xe0,_0x4652cf- -0x3e5,_0x3694ef-0x130);}return _0x3f9552(0xb3,_0x542a94._0x1d492b,_0x542a94._0x30a846,_0x542a94._0x243a24)+_0xa01604;}function createDefaultMessage(_0x40a1ab){if(_0x40a1ab===void 0x0)return void 0x0;return normalizeUserInput(_0x40a1ab);}function normalizeUserInput(_0x2fe224){const _0x19d363={_0x35d59e:0x2d,_0x1cafa7:0xb,_0x4b4611:0x5b,_0x3600b9:0xa0,_0x8b216:0x99},_0x2d1dfb={_0x123878:0xa0};if(typeof _0x2fe224===_0x24fc94(_0x19d363._0x35d59e,0x67,_0x19d363._0x1cafa7,-0x13))return{'role':_0x113783(_0x19d363._0x4b4611,0x2c,_0x19d363._0x3600b9,_0x19d363._0x8b216),'content':[{'type':'text','text':_0x2fe224}]};function _0x24fc94(_0x5b7fb2,_0xa642e1,_0x5c0bef,_0x3328a){return _0xc4fa22(_0x3328a,_0xa642e1-0x2d,_0x5b7fb2- -0x3dd,_0x3328a-0x9b);}function _0x113783(_0x32c29c,_0x4f2a41,_0x2ab13d,_0x2eee60){return _0xc4fa22(_0x2ab13d,_0x4f2a41-0x1be,_0x32c29c- -0x404,_0x2eee60-_0x2d1dfb._0x123878);}return normalizeMessage(_0x2fe224);}function resolveChatModel(_0x2f6f11){const _0xc0b621={_0x3bfae8:0xda,_0xf9f810:0xae,_0x308a49:0x13f},_0x1c7e3e={_0x373682:0xd6,_0x2cc728:0x85},_0x456285={_0x4cf803:0x1c2};function _0x2b92cf(_0x1df4cd,_0x2d2ae2,_0x3335b9,_0x41dbb8){return _0xc4fa22(_0x1df4cd,_0x2d2ae2-0xdf,_0x2d2ae2- -0x240,_0x41dbb8-_0x456285._0x4cf803);}function _0x4b2224(_0x472918,_0x1960d3,_0x10ba83,_0x4f4101){return _0x2cb4b9(_0x10ba83,_0x1960d3-0x5d,_0x472918- -_0x1c7e3e._0x373682,_0x4f4101-_0x1c7e3e._0x2cc728);}if(!_0x2f6f11[_0x4b2224(-0xe7,-_0xc0b621._0x3bfae8,-0xb0,-_0xc0b621._0xf9f810)])throw new Error(_0x4b2224(-0xfa,-_0xc0b621._0x308a49,-0x10b,-0x109));return _0x2f6f11['chatModel'];}function createRegistry(_0x434dee){const _0x12407a={_0x4331fa:0x235,_0x13ee57:0x25e,_0x2ca5c5:0xaf,_0x212de8:0x1fb,_0x5ae7e7:0x25f},_0x5cac4d={_0xe5447d:0x122,_0x566039:0xd5},_0x1a2e6e={_0x3ef134:0xb0,_0x2275a9:0x38};if(_0x434dee[_0x7cf638(0x1fe,_0x12407a._0x4331fa,0x227,_0x12407a._0x13ee57)])return _0x434dee[_0x1f675c(0xeb,_0x12407a._0x2ca5c5,0xce,0xd8)];const _0x1420e4=createExtensionRegistry();function _0x7cf638(_0x4eeba6,_0x4fa6f6,_0x446e6f,_0x30dbe4){return _0xc4fa22(_0x4eeba6,_0x4fa6f6-_0x1a2e6e._0x3ef134,_0x4fa6f6- -0x228,_0x30dbe4-_0x1a2e6e._0x2275a9);}const _0x573568=_0x434dee[_0x7cf638(_0x12407a._0x212de8,0x245,_0x12407a._0x5ae7e7,0x256)]??[];for(const _0xf5ac06 of _0x573568){_0x1420e4['register'](_0xf5ac06);}function _0x1f675c(_0x7855ec,_0xf8b047,_0x4af51d,_0x547f96){return _0x2cb4b9(_0x4af51d,_0xf8b047-_0x5cac4d._0xe5447d,_0xf8b047-0x78,_0x547f96-_0x5cac4d._0x566039);}return _0x1420e4;}var Agent=class{['_systemPrompt'];[_0x2cb4b9(0x4f,-0x19,0x0,-0x1d)];['metrics'];['sessionId'];[_0x2cb4b9(-0x57,-0x60,-0x1b,-0x39)];[_0x2cb4b9(0x8d,0x6f,0x5a,0x50)];[_0x2cb4b9(0xaf,0xad,0x6c,0x7e)];constructor(_0x5d0fb6={}){const _0x49a09a={_0x12b79e:0x1e,_0x54929f:0x1f,_0x1864b2:0x1f,_0x583db3:0x22,_0x2eac62:0x47d,_0x47d48b:0x3ff,_0x2492a7:0x4bd,_0x3bceb1:0x4dd,_0x56c12:0x49a,_0x33b720:0x3c,_0x3326bb:0xa,_0x38c25d:0x5e,_0x8463b4:0x489,_0xeb071e:0x474,_0x5b00e4:0x45,_0x40bb90:0x4f4,_0x17ce5c:0x54,_0x12b943:0x11},_0x1fcc86={_0x5f0c6e:0x21,_0x1791aa:0x2c3},_0x1f91f8={_0x4fe510:0x1eb},_0x270384={_0x6e6f7:0x10c,_0x186c1c:0x10,_0x414582:0x5a},_0x4ce0c0={_0x125227:0x46e,_0x5e6b01:0xf2};function _0x2f42ba(_0x194045,_0x27e56e,_0x52ba65,_0x643e83){return _0x2cb4b9(_0x27e56e,_0x27e56e-0x88,_0x194045-_0x4ce0c0._0x125227,_0x643e83-_0x4ce0c0._0x5e6b01);}function _0x394a45(_0xf77702,_0xe2b1b8,_0x2aee27,_0x52c6ba){return _0x2cb4b9(_0x52c6ba,_0xe2b1b8-_0x270384._0x6e6f7,_0xe2b1b8- -_0x270384._0x186c1c,_0x52c6ba-_0x270384._0x414582);}this[_0x394a45(-_0x49a09a._0x12b79e,0x14,-0x30,-_0x49a09a._0x54929f)]=_0x5d0fb6[_0x394a45(-_0x49a09a._0x1864b2,0x14,_0x49a09a._0x583db3,0x5c)]??createSessionId(),this[_0x2f42ba(0x4da,0x4e1,0x4ef,0x4a5)]=0x0,this[_0x394a45(0x11,0x32,0x1b,0x86)]=_0x5d0fb6['systemPrompt']??'',this[_0x2f42ba(0x453,0x47d,_0x49a09a._0x2eac62,0x43d)]=(_0x5d0fb6[_0x2f42ba(0x453,0x42e,_0x49a09a._0x47d48b,0x466)]??[])[_0x2f42ba(0x48a,_0x49a09a._0x2492a7,_0x49a09a._0x3bceb1,_0x49a09a._0x56c12)](normalizeMessage),this[_0x394a45(0x55,0x4a,_0x49a09a._0x33b720,0x16)]=createDefaultMessage(_0x5d0fb6[_0x394a45(-0x23,_0x49a09a._0x3326bb,0x4f,_0x49a09a._0x38c25d)]),this[_0x2f42ba(_0x49a09a._0x8463b4,0x472,_0x49a09a._0xeb071e,0x475)]=createAgentMetrics({'getContextWindowLimit':_0x5d0fb6[_0x394a45(0x6a,_0x49a09a._0x5b00e4,0x88,0x96)]});const _0x5aad7a=_0x5d0fb6[_0x394a45(-0x17,0x1d,0x38,0x5f)],_0xeea11d=async(_0x1c6f7f,_0x202713)=>{function _0x5b529e(_0x43bdb6,_0x5b235a,_0x148004,_0x5e0aa5){return _0x2f42ba(_0x43bdb6- -_0x1f91f8._0x4fe510,_0x148004,_0x148004-0x6d,_0x5e0aa5-0x1bb);}function _0x57c173(_0x46c878,_0x102731,_0x219ec1,_0x5e9abb){return _0x394a45(_0x46c878-0xf4,_0x219ec1-0x16,_0x219ec1-0xa,_0x5e9abb);}this[_0x57c173(0x12,0x62,_0x1fcc86._0x5f0c6e,-0x1)][_0x5b529e(0x2a9,0x292,0x2f5,_0x1fcc86._0x1791aa)](_0x1c6f7f),await _0x5aad7a?.(_0x1c6f7f,_0x202713);},_0x172db0=createInternalToolRuntime(_0x5d0fb6['tools']??[],{'onEvent':_0xeea11d,'onToolCall':_0x5d0fb6['onToolCall']});this['deps']={'registry':createRegistry(_0x5d0fb6),'chatModel':resolveChatModel(_0x5d0fb6),'toolRuntime':_0x172db0,'askUser':_0x5d0fb6[_0x2f42ba(0x4d8,_0x49a09a._0x40bb90,0x4be,0x4a3)],'onEvent':_0xeea11d,'sessionDir':_0x5d0fb6[_0x394a45(0x82,_0x49a09a._0x17ce5c,_0x49a09a._0x12b943,0x6c)]};}get[_0x2cb4b9(0x3d,-0x64,-0x17,-0x32)](){const _0x4dc7de={_0x25b176:0x99,_0x13b569:0x44};function _0x420b36(_0x3d222c,_0xb709ef,_0x5e12a5,_0x4c2c5a){return _0x2cb4b9(_0xb709ef,_0xb709ef-0x179,_0x3d222c-0x43,_0x4c2c5a-0x37);}return this[_0x420b36(0x85,_0x4dc7de._0x25b176,_0x4dc7de._0x13b569,0xcf)];}[_0xc4fa22(0x44f,0x40e,0x447,0x47b)](_0x1f1d48=[]){const _0x4714fb={_0x3d75c8:0x323,_0x18ce2b:0x307,_0x549386:0x322,_0x1fb78c:0x343,_0x82a87:0x363,_0x311092:0x38b,_0x9dcb40:0x344},_0x3f50ea={_0x253809:0x23};function _0x81b50a(_0x637205,_0xa784d2,_0x459b87,_0x566c79){return _0xc4fa22(_0x566c79,_0xa784d2-0x1e3,_0xa784d2- -0x1f3,_0x566c79-_0x3f50ea._0x253809);}function _0x508d12(_0x5d25b4,_0xc1f5ce,_0x43a808,_0x31a357){return _0x2cb4b9(_0x31a357,_0xc1f5ce-0x1c,_0x43a808-0x323,_0x31a357-0x11c);}this[_0x508d12(0x2ea,0x2e8,_0x4714fb._0x3d75c8,0x2f4)][_0x508d12(_0x4714fb._0x18ce2b,_0x4714fb._0x549386,_0x4714fb._0x1fb78c,_0x4714fb._0x82a87)][_0x508d12(_0x4714fb._0x311092,0x32d,_0x4714fb._0x9dcb40,0x2f0)](_0x1f1d48);}['setSystemPrompt'](_0x49566e,_0x356f36={}){const _0x2c600a={_0x10c59f:0x27f,_0x2a9872:0x267},_0x84293f={_0x234422:0x21,_0x46e8af:0x280};this['_systemPrompt']=_0x49566e;function _0x17b005(_0xe20799,_0x2d233e,_0x1d603b,_0x534257){return _0x2cb4b9(_0x1d603b,_0x2d233e-_0x84293f._0x234422,_0x2d233e- -_0x84293f._0x46e8af,_0x534257-0xc2);}_0x356f36[_0x17b005(-_0x2c600a._0x10c59f,-0x283,-0x24c,-_0x2c600a._0x2a9872)]===!![]&&(this['messages']=[],this['turnIndex']=0x0);}[_0xc4fa22(0x3ff,0x48a,0x443,0x428)](_0x5d7a03){const _0x3831e2={_0x157cef:0x463};function _0x59c8a1(_0x22204f,_0x588de7,_0x42297b,_0x408b33){return _0xc4fa22(_0x588de7,_0x588de7-0x2e,_0x408b33- -_0x3831e2._0x157cef,_0x408b33-0x8b);}this[_0x59c8a1(0xa,-0x60,-0x48,-0x19)]=_0x5d7a03;}['setChatModel'](_0x38a7be){const _0x47646d={_0x576f9e:0x9d,_0x343c2e:0x42,_0x1e84b1:0xac,_0x47bec3:0x58},_0x3fb7df={_0xa69579:0x44d},_0x13f727={_0x5ca168:0x112};function _0x205ff6(_0x13c2b9,_0x16ed4d,_0x231802,_0x1f15a2){return _0xc4fa22(_0x13c2b9,_0x16ed4d-_0x13f727._0x5ca168,_0x1f15a2- -0x3bd,_0x1f15a2-0x1b1);}function _0x4823cd(_0xbe77cb,_0x183730,_0x44abcf,_0x1a336b){return _0x2cb4b9(_0x44abcf,_0x183730-0x1d8,_0xbe77cb-_0x3fb7df._0xa69579,_0x1a336b-0x1d9);}this[_0x205ff6(_0x47646d._0x576f9e,_0x47646d._0x343c2e,_0x47646d._0x1e84b1,0x69)][_0x205ff6(0x42,0x3a,0x16,_0x47646d._0x47bec3)]=_0x38a7be;}async[_0xc4fa22(0x445,0x47d,0x459,0x45e)](_0x30a059=this[_0xc4fa22(0x4b9,0x493,0x480,0x441)],_0x55a03a={}){const _0x2218e8={_0x1a9e40:0x22e,_0x4b9af8:0x276,_0x331b5f:0x24b,_0x1657f7:0x2d7,_0x37da30:0x2b8,_0x141143:0x30b,_0x2df868:0x2c3,_0x51b2e4:0x279,_0x419a37:0x2cf,_0x3ce988:0x2a8,_0x29d999:0x298,_0x1cfd95:0x217,_0x5333ab:0x234,_0x594ec0:0x249,_0xb52722:0x282,_0x141f97:0x25e,_0x502dbb:0x26f,_0x76da31:0x284,_0x184969:0x24c,_0x5a8269:0x2fd,_0x4177fc:0x29b,_0x29f0cc:0x26f,_0x1b4c73:0x284,_0x161fae:0x2b6,_0x31ab24:0x2e7,_0x5d73d4:0x250,_0x3aed72:0x2f3,_0x27ed76:0x2d4,_0x441290:0x30c,_0x2160b8:0x2de},_0x26f8b1={_0xe8c097:0xbf},_0x539a29={_0x4bf881:0x14,_0xce65e:0x29f};if(!_0x30a059)throw new Error(_0xbef2e8(_0x2218e8._0x1a9e40,_0x2218e8._0x4b9af8,0x269,_0x2218e8._0x331b5f));function _0x46bc76(_0xe52669,_0x6295a4,_0x463266,_0x49de5e){return _0x2cb4b9(_0x49de5e,_0x6295a4-_0x539a29._0x4bf881,_0x463266-_0x539a29._0xce65e,_0x49de5e-0x145);}function _0xbef2e8(_0x201bff,_0xfdd5d4,_0x4b90d5,_0x445412){return _0x2cb4b9(_0x201bff,_0xfdd5d4-_0x26f8b1._0xe8c097,_0xfdd5d4-0x281,_0x445412-0xf4);}this[_0x46bc76(_0x2218e8._0x1657f7,_0x2218e8._0x37da30,_0x2218e8._0x141143,0x2ba)]+=0x1;try{const _0x524421=await runTurn({'sessionId':this[_0x46bc76(0x2fb,0x295,_0x2218e8._0x2df868,_0x2218e8._0x51b2e4)],'turnId':createTurnId(this[_0x46bc76(0x2cf,0x346,0x30b,0x2be)]),'streaming':_0x55a03a[_0xbef2e8(_0x2218e8._0x419a37,0x2b7,_0x2218e8._0x3ce988,0x2f8)],'signal':_0x55a03a[_0x46bc76(0x298,0x261,_0x2218e8._0x29d999,0x281)],'system':this[_0xbef2e8(0x26f,0x26a,_0x2218e8._0x1cfd95,0x237)],'messages':this[_0x46bc76(_0x2218e8._0x5333ab,_0x2218e8._0x594ec0,0x284,_0x2218e8._0x4b9af8)],'message':normalizeUserInput(_0x30a059)},this[_0x46bc76(_0x2218e8._0xb52722,0x26f,0x29f,0x2d2)]);return this['messages']=_0x524421['state'][_0x46bc76(_0x2218e8._0x419a37,0x29e,0x284,_0x2218e8._0x141f97)]['map'](normalizeMessage),_0x524421;}catch(_0x161660){if(_0x161660 instanceof TurnFailedError){this[_0x46bc76(0x24c,_0x2218e8._0x502dbb,_0x2218e8._0x76da31,_0x2218e8._0x184969)]=synthesizeMissingToolResults(_0x161660[_0x46bc76(_0x2218e8._0x5a8269,0x2d1,0x2d0,_0x2218e8._0x4177fc)][_0x46bc76(_0x2218e8._0x29f0cc,0x29b,_0x2218e8._0x1b4c73,_0x2218e8._0x161fae)][_0xbef2e8(0x279,0x29d,_0x2218e8._0x31ab24,_0x2218e8._0x5d73d4)](normalizeMessage));throw _0x161660[_0xbef2e8(_0x2218e8._0x3aed72,_0x2218e8._0x27ed76,_0x2218e8._0x441290,_0x2218e8._0x2160b8)];}throw _0x161660;}}};export{normalizeToolOutputValue,createToolOutput,ToolExecutionError,defineTool,ToolRegistry,validateToolInput,deriveFinalToolOutput,createInternalToolRuntime,createExtensionRegistry,createAgentMetrics,runTurn,Agent};
1
+ (function(_0x24fe51,_0xa102be){const _0x25a467={_0x49d3f9:0x9c,_0x5ed1e7:0x38,_0x11fc98:0x253,_0xa4fa4d:0x26b,_0x12a0ec:0x20d,_0x69db95:0x266,_0x1c167d:0x27c,_0xcc8a55:0x263,_0x4dca9b:0x7,_0x8a9a7c:0xd,_0x4a8b9b:0x11,_0x4795c8:0x51,_0x1a9fdb:0x34,_0x5da7f1:0x6a,_0x4eb6e0:0x0,_0xbfcda3:0x209},_0x4b2f67={_0x3cf1b2:0xa2};function _0x46cb45(_0x487470,_0x20783b,_0x4729b0,_0x3da095){return _0x5603(_0x487470-0x16a,_0x4729b0);}const _0x309e66=_0x24fe51();function _0xa2b762(_0x246dab,_0x238c8c,_0x4bdf3e,_0x1f2a1e){return _0x5603(_0x1f2a1e- -_0x4b2f67._0x3cf1b2,_0x4bdf3e);}while(!![]){try{const _0x2439c3=-parseInt(_0xa2b762(0xfa,0x95,0xc6,0xa7))/0x1*(-parseInt(_0xa2b762(_0x25a467._0x49d3f9,_0x25a467._0x5ed1e7,0xac,0x88))/0x2)+-parseInt(_0x46cb45(_0x25a467._0x11fc98,_0x25a467._0xa4fa4d,_0x25a467._0x12a0ec,_0x25a467._0x69db95))/0x3+-parseInt(_0xa2b762(-0x5,-0x7,0x36,0x13))/0x4*(-parseInt(_0x46cb45(0x23e,_0x25a467._0x1c167d,0x268,_0x25a467._0xcc8a55))/0x5)+-parseInt(_0xa2b762(-_0x25a467._0x4dca9b,-_0x25a467._0x8a9a7c,0x4b,_0x25a467._0x4a8b9b))/0x6*(-parseInt(_0xa2b762(_0x25a467._0x4795c8,0x6d,0x17,0x67))/0x7)+-parseInt(_0xa2b762(-0x1,-_0x25a467._0x1a9fdb,_0x25a467._0x5da7f1,0x17))/0x8+-parseInt(_0xa2b762(0x83,_0x25a467._0x4eb6e0,-0x11,0x3d))/0x9+parseInt(_0x46cb45(0x229,0x1d8,_0x25a467._0xbfcda3,0x22e))/0xa;if(_0x2439c3===_0xa102be)break;else _0x309e66['push'](_0x309e66['shift']());}catch(_0x22024d){_0x309e66['push'](_0x309e66['shift']());}}}(_0x1f62,0x9ae1d));import{createAssistantTextMessage,createReasoningMessage,createToolResultUserMessage,createToolUseMessage,getToolUseBlocks,normalizeMessage,normalizeSystem,responseToAssistantMessage,synthesizeMissingToolResults}from'./chunk-SEP4YYY3.js';import{TurnFailedError}from'./chunk-FFIZ6TKW.js';import{addAbortListener,isAbortError,throwIfAborted,toAbortError}from'./chunk-X7VAACWY.js';function _0x3b1855(_0x2053a3,_0x4fecf0,_0x227abd,_0x1b10dd){return _0x5603(_0x1b10dd- -0x110,_0x2053a3);}function isJsonObject(_0x1e28b6){const _0x172b6f={_0x3dfd43:0x15c,_0x5b2d12:0x158},_0x2c626e={_0x23dedb:0x25c};function _0x562641(_0xfbf187,_0x2aaf50,_0x1eb934,_0x57b189){return _0x5603(_0xfbf187-0x1e1,_0x1eb934);}function _0x1bdbfe(_0x37062e,_0x500eef,_0x2c4ed6,_0x4cc1f5){return _0x5603(_0x2c4ed6- -_0x2c626e._0x23dedb,_0x500eef);}return typeof _0x1e28b6===_0x1bdbfe(-0x106,-_0x172b6f._0x3dfd43,-0x12b,-0x100)&&_0x1e28b6!==null&&!Array[_0x1bdbfe(-0x1ab,-0x1a4,-0x17f,-_0x172b6f._0x5b2d12)](_0x1e28b6);}function isToolOutputEnvelope(_0x56abea){const _0xa7e510={_0x5a1b64:0x3d3,_0x581984:0x3dd,_0x2058b:0x347,_0x5f2d2f:0x31c,_0x500e47:0x70,_0x4217cf:0x3e,_0x53a226:0x10,_0x458056:0x3},_0x16d7a7={_0x6f0a1c:0x258};function _0x7000c0(_0x4897fb,_0x3b7330,_0x3e73e0,_0xbe576b){return _0x5603(_0x3e73e0-_0x16d7a7._0x6f0a1c,_0x3b7330);}function _0x24c2d5(_0x4d27e7,_0x1d59f5,_0x3062f7,_0x382323){return _0x5603(_0x4d27e7- -0x106,_0x3062f7);}if(typeof _0x56abea!==_0x7000c0(_0xa7e510._0x5a1b64,_0xa7e510._0x581984,0x389,0x3de)||_0x56abea===null||Array[_0x7000c0(_0xa7e510._0x2058b,_0xa7e510._0x5f2d2f,0x335,0x380)](_0x56abea))return![];if(typeof _0x56abea['output']!==_0x24c2d5(-0x3b,-_0xa7e510._0x500e47,-0xf,-0x59))return![];const _0x5a6ae0=_0x56abea[_0x24c2d5(_0xa7e510._0x4217cf,-_0xa7e510._0x53a226,-_0xa7e510._0x458056,0x5d)];return _0x5a6ae0===void 0x0||isJsonObject(_0x5a6ae0);}function _0x17dcb0(_0x3589d3,_0x510292,_0x6647c3,_0xfcf91e){const _0x59d1e7={_0xaa24fe:0x338};return _0x5603(_0xfcf91e-_0x59d1e7._0xaa24fe,_0x3589d3);}function validateAgainstSchema(_0x1807d5,_0x5d8297,_0x2dc00b){const _0x5bd5ad={_0x294744:0x1b7,_0x507b89:0x171,_0x14b8d3:0x1e8,_0x190c6c:0x208,_0xb5d3f9:0x1ea,_0x1290c6:0x66,_0x12be4d:0x50,_0x1dbc9c:0x216,_0x3faf23:0x23b,_0x42f22e:0x1a,_0x385ddc:0x1ed,_0x22344a:0x21b,_0x2e8a31:0x230,_0x2bf511:0x18,_0x3b5140:0x65,_0x216716:0x216,_0xa96ea1:0x1e2,_0x3e54d6:0x197,_0xa3ab3b:0x73,_0x2a04e7:0xb5,_0x5b80f2:0x8e,_0x2daf06:0x1b1,_0x24c32c:0x1ab,_0x19d576:0x1c,_0xab83ce:0x40,_0x488273:0x6e,_0x3d530e:0x1ae,_0x4f0098:0x1ec,_0x54d4aa:0x20,_0x3247fc:0x53,_0x584256:0x1a,_0x43fc59:0x1ed,_0x215c4d:0x1a0,_0x26d8fd:0x183,_0x25ba35:0xbe,_0x41b84f:0xbc,_0x33ff95:0xb2,_0x4c5ffd:0x196,_0x5e7dff:0x1e5,_0x529f39:0x29,_0x2427b5:0x25,_0x3ab99c:0xc},_0x477fa5={_0x138d5f:0x43d,_0x5417d9:0x3cb},_0xd48ad2={_0x42b2f1:0x14b},_0x4ac301={_0xd46898:0x2d3};function _0x152d27(_0x3f7053,_0x464c35,_0x15563a,_0x497287){return _0x5603(_0x3f7053- -_0x4ac301._0xd46898,_0x464c35);}function _0x2ebaab(_0x4192a3,_0x2db4a3,_0xbb426,_0x49d221){return _0x5603(_0x49d221- -_0xd48ad2._0x42b2f1,_0x4192a3);}switch(_0x2dc00b[_0x152d27(-_0x5bd5ad._0x294744,-_0x5bd5ad._0x507b89,-0x20a,-_0x5bd5ad._0x14b8d3)]){case _0x152d27(-_0x5bd5ad._0x190c6c,-0x1e2,-0x1fa,-_0x5bd5ad._0xb5d3f9):if(typeof _0x5d8297!==_0x2ebaab(-_0x5bd5ad._0x1290c6,-_0x5bd5ad._0x12be4d,-0x5f,-0x80))throw new Error(_0x152d27(-_0x5bd5ad._0x1dbc9c,-_0x5bd5ad._0x3faf23,-0x25a,-0x23b)+_0x1807d5+_0x2ebaab(0x56,0x34,-_0x5bd5ad._0x42f22e,0x0));return;case _0x152d27(-_0x5bd5ad._0x385ddc,-_0x5bd5ad._0x22344a,-_0x5bd5ad._0x2e8a31,-0x1cb):if(typeof _0x5d8297!==_0x2ebaab(-_0x5bd5ad._0x2bf511,-0x97,-0x52,-_0x5bd5ad._0x3b5140))throw new Error(_0x152d27(-_0x5bd5ad._0x216716,-0x259,-0x20a,-0x1db)+_0x1807d5+':\x20expected\x20number');return;case'boolean':if(typeof _0x5d8297!==_0x152d27(-_0x5bd5ad._0xa96ea1,-0x1fa,-0x18b,-_0x5bd5ad._0x3e54d6))throw new Error(_0x2ebaab(-0xac,-_0x5bd5ad._0xa3ab3b,-_0x5bd5ad._0x2a04e7,-_0x5bd5ad._0x5b80f2)+_0x1807d5+':\x20expected\x20boolean');return;case _0x152d27(-0x1ec,-0x1ba,-_0x5bd5ad._0x2daf06,-_0x5bd5ad._0x24c32c):if(!Array[_0x2ebaab(-_0x5bd5ad._0x19d576,-0x96,-_0x5bd5ad._0xab83ce,-_0x5bd5ad._0x488273)](_0x5d8297))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x1807d5+_0x152d27(-0x1fa,-0x1b2,-0x1fd,-0x1f5));_0x5d8297[_0x152d27(-_0x5bd5ad._0x3d530e,-0x1ec,-0x1ad,-_0x5bd5ad._0x4f0098)]((_0x4f08b6,_0x2c4879)=>{function _0x42e13a(_0x5435dc,_0xfb2caa,_0x45ba1e,_0x2a4c51){return _0x152d27(_0xfb2caa-0x5b4,_0x5435dc,_0x45ba1e-0x1d8,_0x2a4c51-0x1d6);}validateAgainstSchema(_0x1807d5+'['+_0x2c4879+']',_0x4f08b6,_0x2dc00b[_0x42e13a(_0x477fa5._0x138d5f,0x3f7,_0x477fa5._0x5417d9,0x3fa)]);});return;case _0x2ebaab(_0x5bd5ad._0x54d4aa,-_0x5bd5ad._0x3247fc,-0x5b,-_0x5bd5ad._0x584256):if(!isJsonObject(_0x5d8297))throw new Error(_0x152d27(-0x216,-0x203,-_0x5bd5ad._0x43fc59,-0x253)+_0x1807d5+_0x152d27(-_0x5bd5ad._0x215c4d,-0x198,-_0x5bd5ad._0x26d8fd,-0x155));for(const _0x5e3db5 of _0x2dc00b['required']??[]){if(!(_0x5e3db5 in _0x5d8297))throw new Error(_0x2ebaab(-_0x5bd5ad._0x25ba35,-_0x5bd5ad._0x41b84f,-_0x5bd5ad._0x33ff95,-_0x5bd5ad._0x5b80f2)+_0x1807d5+_0x152d27(-_0x5bd5ad._0x4c5ffd,-0x166,-0x1c2,-_0x5bd5ad._0x5e7dff)+_0x5e3db5+'\x22');}for(const [_0x51e7ff,_0x11bf58]of Object['entries'](_0x2dc00b[_0x2ebaab(-0x61,-_0x5bd5ad._0x529f39,_0x5bd5ad._0x2427b5,-_0x5bd5ad._0x3ab99c)])){_0x51e7ff in _0x5d8297&&validateAgainstSchema(_0x1807d5+'.'+_0x51e7ff,_0x5d8297[_0x51e7ff],_0x11bf58);}}}function normalizeToolOutputValue(_0x14c142){const _0x5656d1={_0xd2aace:0x1ea,_0x11a4bb:0x2a6,_0x4cbb76:0x26f,_0x2ca847:0x266,_0x2af616:0x276,_0xa23b39:0x231,_0x8fe8ec:0x389,_0x5dcc5e:0x1e9,_0x308302:0x1ae,_0x3edada:0x263,_0x584569:0x319,_0x24cd42:0x22d,_0x2d47cd:0x1dc,_0x4f8497:0x298,_0x115bd3:0x2db,_0x54609b:0x2a4},_0x106af7={_0x216fa9:0x132},_0x242f81={_0x5e5861:0x219};function _0xf3f068(_0x2889e3,_0x1e376c,_0x3a03e4,_0x875e41){return _0x5603(_0x3a03e4-_0x242f81._0x5e5861,_0x2889e3);}if(isToolOutputEnvelope(_0x14c142))return{'output':_0x14c142[_0x205897(0x1ea,0x196,0x1f6,_0x5656d1._0xd2aace)],'structured':_0x14c142[_0x205897(_0x5656d1._0x11a4bb,_0x5656d1._0x4cbb76,_0x5656d1._0x2ca847,_0x5656d1._0x2af616)]??{'value':_0x14c142['output']},..._0x14c142[_0x205897(0x24e,_0x5656d1._0xa23b39,0x27d,0x27f)]!==void 0x0?{'content':_0x14c142[_0xf3f068(_0x5656d1._0x8fe8ec,0x32b,0x366,0x319)]}:{}};function _0x205897(_0x27f95d,_0x40b28f,_0x43cdfd,_0x147e1d){return _0x5603(_0x147e1d-_0x106af7._0x216fa9,_0x40b28f);}if(typeof _0x14c142===_0x205897(_0x5656d1._0x5dcc5e,_0x5656d1._0x308302,0x212,0x1fd))return{'output':_0x14c142,'structured':{'value':_0x14c142}};if(typeof _0x14c142===_0x205897(0x234,0x232,0x256,_0x5656d1._0x3edada)&&_0x14c142!==null&&!Array[_0xf3f068(0x317,0x341,0x2f6,_0x5656d1._0x584569)](_0x14c142))return{'output':JSON[_0x205897(_0x5656d1._0x24cd42,_0x5656d1._0x2d47cd,0x1e5,0x1f4)](_0x14c142,null,0x2),'structured':_0x14c142};return{'output':JSON[_0xf3f068(_0x5656d1._0x4f8497,0x2cd,_0x5656d1._0x115bd3,_0x5656d1._0x54609b)](_0x14c142,null,0x2),'structured':{'value':_0x14c142}};}function createToolOutput(_0x4d9ade,_0x526c75={'value':_0x4d9ade},_0x5e9513){return{'output':_0x4d9ade,'structured':_0x526c75,..._0x5e9513!==void 0x0?{'content':_0x5e9513}:{}};}var ToolExecutionError=class extends Error{[_0x17dcb0(0x486,0x454,0x464,0x47c)];constructor(_0x95972f,_0x4ec1ff={}){const _0x2a6ecd={_0x217d39:0xa4,_0x23a803:0x14a,_0xe12229:0x44,_0x271772:0x6,_0x1ac720:0x1d},_0x387dde={_0x580a1b:0x8b,_0x57190a:0x476},_0x3edb0e={_0x54726c:0x93,_0x36b091:0xd3};super(_0x95972f);function _0x5de4e7(_0x35e6e5,_0x39f761,_0x238dea,_0xfb6106){return _0x17dcb0(_0x35e6e5,_0x39f761-_0x3edb0e._0x54726c,_0x238dea-_0x3edb0e._0x36b091,_0xfb6106- -0x2bf);}this[_0x5f5350(-_0x2a6ecd._0x217d39,-0x76,-0xb6,-0x8e)]=_0x5de4e7(_0x2a6ecd._0x23a803,0x15b,0x137,0x14c);function _0x5f5350(_0x5a783e,_0x320da3,_0x4f3b99,_0x2bc417){return _0x17dcb0(_0x4f3b99,_0x320da3-_0x387dde._0x580a1b,_0x4f3b99-0x1e3,_0x320da3- -_0x387dde._0x57190a);}this[_0x5f5350(_0x2a6ecd._0xe12229,_0x2a6ecd._0x271772,0x0,_0x2a6ecd._0x1ac720)]=_0x4ec1ff;}};function defineTool(_0x24c61b){return _0x24c61b;}var ToolRegistry=class{[_0x17dcb0(0x413,0x442,0x468,0x43e)]=new Map();constructor(_0x3168b7=[]){const _0x1e611e={_0x40c1be:0x3e3,_0x4ca2b7:0x3b7,_0x3f72f6:0x3a0,_0x354e66:0x3cf},_0x43fe52={_0x34644c:0x51};function _0x134aed(_0x32ddbe,_0x56db90,_0x4c2acb,_0x15e3d5){return _0x3b1855(_0x15e3d5,_0x56db90-0x87,_0x4c2acb-_0x43fe52._0x34644c,_0x4c2acb-0x40b);}for(const _0x2523ca of _0x3168b7){this[_0x134aed(_0x1e611e._0x40c1be,_0x1e611e._0x4ca2b7,_0x1e611e._0x3f72f6,_0x1e611e._0x354e66)](_0x2523ca);}}[_0x17dcb0(0x3bf,0x38e,0x41f,0x3dd)](_0x47ac79){const _0x2aabf5={_0x548aa4:0x1,_0x1fbb8d:0x7,_0x575adc:0xe,_0x151316:0x51,_0x5e73a6:0x22},_0x151ddd={_0xa92cba:0x84,_0x3d61f1:0x100},_0x28e884={_0x2c9866:0xbc,_0x20be85:0x19b,_0x1f7d81:0xb};function _0x151096(_0xe88224,_0x466a4b,_0x1675e2,_0x22e95b){return _0x3b1855(_0x466a4b,_0x466a4b-_0x28e884._0x2c9866,_0x1675e2-_0x28e884._0x20be85,_0x1675e2-_0x28e884._0x1f7d81);}function _0x1905ad(_0x19a56f,_0x314311,_0x20fb5f,_0x548e65){return _0x17dcb0(_0x19a56f,_0x314311-_0x151ddd._0xa92cba,_0x20fb5f-0x1ad,_0x314311- -_0x151ddd._0x3d61f1);}this[_0x151096(_0x2aabf5._0x548aa4,-_0x2aabf5._0x1fbb8d,0x1,-0x45)]['set'](_0x47ac79[_0x151096(-_0x2aabf5._0x575adc,-_0x2aabf5._0x151316,-0x3d,-_0x2aabf5._0x5e73a6)],_0x47ac79);}[_0x17dcb0(0x42e,0x43b,0x3d1,0x3f6)](_0x494e8c){const _0x37835d={_0xb89a1b:0x2d5},_0xed564a={_0x38f309:0x182};function _0x2665ac(_0x3c1390,_0x12cdf9,_0x4df231,_0xfe37e7){return _0x3b1855(_0x12cdf9,_0x12cdf9-_0xed564a._0x38f309,_0x4df231-0x1d2,_0xfe37e7- -0x283);}return this['toolsByName'][_0x2665ac(-0x316,-0x286,-0x2f8,-_0x37835d._0xb89a1b)](_0x494e8c);}[_0x17dcb0(0x396,0x41e,0x40d,0x3e9)](){const _0x1b1252={_0x1047c1:0xe},_0x2a128c={_0xb3c8ff:0x175};function _0x2ae27d(_0x282023,_0x204082,_0x2a10d5,_0x3424ce){return _0x3b1855(_0x3424ce,_0x204082-_0x2a128c._0xb3c8ff,_0x2a10d5-0x1e7,_0x2a10d5-0x49);}return[...this[_0x2ae27d(0x72,-_0x1b1252._0x1047c1,0x3f,0x77)]['values']()];}[_0x17dcb0(0x3a7,0x3f8,0x3ae,0x3f4)](){const _0x5cdefb={_0x43ae68:0x179,_0x500d97:0x170},_0x22ec68={_0x133bbe:0x22c,_0x35e569:0x1f6,_0xe6c3cc:0x1d9,_0x39aea2:0x205},_0x5f152b={_0x130b98:0x39},_0x39d2bc={_0x1aa319:0xe8,_0x5c100a:0x5ba},_0x10a5ff={_0x3ff12e:0x1bb,_0x35941e:0xd0,_0x4a759a:0x242};function _0x1a1104(_0x14d3ed,_0x3271c4,_0x28cf19,_0x361005){return _0x3b1855(_0x3271c4,_0x3271c4-_0x10a5ff._0x3ff12e,_0x28cf19-_0x10a5ff._0x35941e,_0x14d3ed-_0x10a5ff._0x4a759a);}function _0x52ca38(_0x803859,_0x4add0e,_0x4ed57a,_0xc4c8d4){return _0x17dcb0(_0x4ed57a,_0x4add0e-0x2d,_0x4ed57a-_0x39d2bc._0x1aa319,_0xc4c8d4- -_0x39d2bc._0x5c100a);}return this[_0x1a1104(0x1e3,0x212,0x218,0x1c1)]()[_0x52ca38(-_0x5cdefb._0x43ae68,-0x1a6,-0x161,-_0x5cdefb._0x500d97)](_0x596a4d=>{const _0x542cba={_0x27d7d9:0x109,_0x5166d6:0x8,_0x451b3f:0x3d9};function _0x54f5b9(_0x1eab3b,_0x111c93,_0x21e4b,_0x511959){return _0x52ca38(_0x1eab3b-0x3c,_0x111c93-_0x5f152b._0x130b98,_0x21e4b,_0x511959- -0x72);}function _0x1b0b91(_0x35807f,_0x579980,_0xdcfab1,_0x507ed1){return _0x52ca38(_0x35807f-_0x542cba._0x27d7d9,_0x579980-_0x542cba._0x5166d6,_0x35807f,_0x507ed1-_0x542cba._0x451b3f);}return{'name':_0x596a4d[_0x54f5b9(-0x240,-0x1ea,-0x268,-_0x22ec68._0x133bbe)],'description':_0x596a4d[_0x54f5b9(-_0x22ec68._0x35e569,-0x1d9,-_0x22ec68._0xe6c3cc,-_0x22ec68._0x39aea2)],'input_schema':_0x596a4d['inputSchema']};});}};function _0x5603(_0x3c3b00,_0x4a8253){_0x3c3b00=_0x3c3b00-0xa5;const _0x1f62f0=_0x1f62();let _0x560352=_0x1f62f0[_0x3c3b00];if(_0x5603['XshzMH']===undefined){var _0x26520f=function(_0x179f1b){const _0x50120e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1e28b6='',_0x56abea='';for(let _0x5a6ae0=0x0,_0x1807d5,_0x5d8297,_0x2dc00b=0x0;_0x5d8297=_0x179f1b['charAt'](_0x2dc00b++);~_0x5d8297&&(_0x1807d5=_0x5a6ae0%0x4?_0x1807d5*0x40+_0x5d8297:_0x5d8297,_0x5a6ae0++%0x4)?_0x1e28b6+=String['fromCharCode'](0xff&_0x1807d5>>(-0x2*_0x5a6ae0&0x6)):0x0){_0x5d8297=_0x50120e['indexOf'](_0x5d8297);}for(let _0x4f08b6=0x0,_0x2c4879=_0x1e28b6['length'];_0x4f08b6<_0x2c4879;_0x4f08b6++){_0x56abea+='%'+('00'+_0x1e28b6['charCodeAt'](_0x4f08b6)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x56abea);};_0x5603['HATujj']=_0x26520f,_0x5603['sIMMIX']={},_0x5603['XshzMH']=!![];}const _0x34732c=_0x1f62f0[0x0],_0x1ef6b7=_0x3c3b00+_0x34732c,_0x43955a=_0x5603['sIMMIX'][_0x1ef6b7];return!_0x43955a?(_0x560352=_0x5603['HATujj'](_0x560352),_0x5603['sIMMIX'][_0x1ef6b7]=_0x560352):_0x560352=_0x43955a,_0x560352;}function validateToolInput(_0x17680b,_0x5c9851){const _0x3d1f83={_0x35d404:0xae},_0x12ac00={_0x581c7e:0x1cd,_0x39ef72:0x68};validateAgainstSchema(_0x4fecfd(0x88,0xd2,0x88,_0x3d1f83._0x35d404),_0x17680b,_0x5c9851);function _0x4fecfd(_0x1f1ace,_0x354b93,_0x2318d4,_0x18c0e8){return _0x17dcb0(_0x2318d4,_0x354b93-_0x12ac00._0x581c7e,_0x2318d4-_0x12ac00._0x39ef72,_0x354b93- -0x35f);}return _0x17680b;}function deriveFinalToolOutput(_0x434ab6){const _0x33e525={_0x30a553:0x10b,_0x5bc18c:0x196,_0x962eb7:0xd7,_0x3b3b4c:0x110,_0x1ace9f:0x127,_0x656eef:0x12b,_0x423ae2:0x17a,_0x46df5b:0x165,_0x1c8ba9:0x143,_0x2f73a1:0xdb,_0x2edc75:0x116,_0x1cfab2:0x146,_0x4b9f00:0xfd,_0x38334e:0x14f},_0x57536e={_0x2bcab2:0x24,_0x107d13:0x5b0},_0x44a406={_0x50afda:0x5d,_0x5e6e9e:0x2fb};if(_0x434ab6[_0x41c951(-0x148,-_0x33e525._0x30a553,-0x109,-_0x33e525._0x5bc18c)]===0x0)return{'output':'','structured':{}};function _0x404b04(_0x53c894,_0x2b3c7e,_0x279787,_0x3254a0){return _0x17dcb0(_0x53c894,_0x2b3c7e-_0x44a406._0x50afda,_0x279787-0xac,_0x3254a0- -_0x44a406._0x5e6e9e);}function _0x41c951(_0x2f1f0,_0x57f7af,_0x4759eb,_0xa06525){return _0x17dcb0(_0x4759eb,_0x57f7af-0x15c,_0x4759eb-_0x57536e._0x2bcab2,_0x2f1f0- -_0x57536e._0x107d13);}if(_0x434ab6['length']===0x1)return{'output':_0x434ab6[0x0]['output'],'structured':_0x434ab6[0x0]['structured'],..._0x434ab6[0x0][_0x41c951(-0x12b,-_0x33e525._0x962eb7,-_0x33e525._0x3b3b4c,-_0x33e525._0x1ace9f)]!==void 0x0?{'content':_0x434ab6[0x0][_0x41c951(-_0x33e525._0x656eef,-_0x33e525._0x423ae2,-0x156,-_0x33e525._0x46df5b)]}:{}};const _0x4365ba=_0x434ab6[_0x404b04(_0x33e525._0x1c8ba9,0x111,_0x33e525._0x2f73a1,0x117)](_0x149d16=>_0x149d16[_0x404b04(0x182,0x194,0x1d4,0x18a)]!==void 0x0);return{'output':_0x434ab6[_0x41c951(-0x166,-0x121,-_0x33e525._0x2edc75,-0x192)](_0x239143=>_0x239143[_0x41c951(-0x1c0,-0x205,-0x208,-0x200)])['join'](''),'structured':{'chunks':_0x434ab6[_0x404b04(_0x33e525._0x1cfab2,_0x33e525._0x4b9f00,0x180,_0x33e525._0x38334e)](_0x15e119=>_0x15e119[_0x404b04(0x174,0x153,0x15b,0x181)])},..._0x4365ba['length']===0x1?{'content':_0x4365ba[0x0]['content']}:{}};}function createToolMeta(){return{'transforms':[]};}function createErrorToolResult(_0x2c7c43,_0x1b7858,_0x2d1dcb,_0x5dca2c=[]){const _0x115741={_0x3bc543:0x78,_0x1d9304:0x47,_0x1e26ad:0x8c},_0x4fdc9c={_0x4639c5:0x5a};function _0x17a67f(_0x17d66c,_0x10d95a,_0x38f5f6,_0x3b2eb2){return _0x3b1855(_0x17d66c,_0x10d95a-0x38,_0x38f5f6-_0x4fdc9c._0x4639c5,_0x3b2eb2-0xae);}return{'callId':_0x2c7c43['id'],'toolName':_0x2c7c43['name'],'status':_0x17a67f(_0x115741._0x3bc543,_0x115741._0x1d9304,0x81,_0x115741._0x1e26ad),'output':_0x1b7858,'structured':_0x2d1dcb,'chunks':_0x5dca2c,'meta':createToolMeta()};}function createRejectedToolResult(_0x3745b5,_0x4cb86e){const _0x1e1198={_0x236124:0x253,_0x56a159:0x2e0,_0x1105e3:0x2e7,_0x3f0ad2:0x310,_0xbefdd7:0x2da,_0x5c013b:0x271,_0x5a8229:0x2a8,_0x2124ca:0x334,_0x216a0a:0x338},_0xaaf401={_0x1cf8fb:0x1b},_0x19ab7a={_0x563def:0xaf},_0x3551f1=_0x4cb86e?.[_0x55713e(-0x1e0,-0x22b,-_0x1e1198._0x236124,-0x266)]()[_0x1e513b(_0x1e1198._0x56a159,0x2e5,_0x1e1198._0x1105e3,_0x1e1198._0x3f0ad2)]?_0x4cb86e:'Tool\x20execution\x20rejected\x20for\x20'+_0x3745b5[_0x1e513b(_0x1e1198._0xbefdd7,0x27f,_0x1e1198._0x5c013b,_0x1e1198._0x5a8229)];function _0x1e513b(_0x3a8213,_0x2adb24,_0x179880,_0x1fd657){return _0x17dcb0(_0x2adb24,_0x2adb24-_0x19ab7a._0x563def,_0x179880-0x19c,_0x1fd657- -0x158);}function _0x55713e(_0x278ed3,_0xbac6da,_0x46a9d3,_0x2a57f3){return _0x17dcb0(_0x278ed3,_0xbac6da-0x90,_0x46a9d3-_0xaaf401._0x1cf8fb,_0xbac6da- -0x6b4);}return createErrorToolResult(_0x3745b5,_0x3551f1,{'error':_0x1e513b(0x2f2,0x2be,0x289,0x2dc),..._0x4cb86e?.['trim']()[_0x1e513b(_0x1e1198._0x2124ca,0x2bb,_0x1e1198._0x216a0a,0x310)]?{'reason':_0x4cb86e}:{}});}function createAbortedToolResult(_0x1b4598,_0x431581,_0x3d764d=[]){const _0x194b6d={_0x51e102:0x23,_0x30d701:0x6c},_0x148102={_0x153f43:0x115,_0x2903cb:0x39},_0x34b131=toAbortError(_0x431581);function _0x2f10d7(_0x16ff5b,_0x3ac3aa,_0x456ca0,_0x57e503){return _0x3b1855(_0x456ca0,_0x3ac3aa-0xa1,_0x456ca0-_0x148102._0x153f43,_0x3ac3aa-_0x148102._0x2903cb);}return createErrorToolResult(_0x1b4598,_0x34b131[_0x2f10d7(_0x194b6d._0x51e102,_0x194b6d._0x30d701,0x91,0x8d)],{'error':_0x34b131['message'],'aborted':!![]},_0x3d764d);}function createSuccessToolResult(_0x41036e,_0x16c60a,_0x394268){const _0x4e3020={_0x56911f:0xc2,_0x409279:0x7c,_0x3ac70f:0xd1,_0x57bb9e:0xa0,_0x13976e:0x13d,_0x460d28:0x13e,_0x516284:0x157,_0x49ca27:0x1a3},_0x3800d3={_0x227b8b:0x11a};function _0x2f34de(_0x28ff31,_0x4761e8,_0x14e429,_0x27c5e2){return _0x3b1855(_0x27c5e2,_0x4761e8-0x195,_0x14e429-0x15e,_0x14e429-_0x3800d3._0x227b8b);}function _0x1cf63a(_0x2afd0b,_0x485175,_0x2e7acd,_0x17703e){return _0x3b1855(_0x2e7acd,_0x485175-0x8d,_0x2e7acd-0x3f,_0x17703e- -0xde);}return{'callId':_0x41036e['id'],'toolName':_0x41036e['name'],'status':'ok','output':_0x16c60a[_0x2f34de(0x110,0x9f,_0x4e3020._0x56911f,_0x4e3020._0x409279)],'structured':_0x16c60a[_0x1cf63a(-_0x4e3020._0x3ac70f,-_0x4e3020._0x57bb9e,-0x93,-0xaa)],..._0x16c60a[_0x2f34de(_0x4e3020._0x13976e,_0x4e3020._0x460d28,_0x4e3020._0x516284,_0x4e3020._0x49ca27)]!==void 0x0?{'content':_0x16c60a[_0x1cf63a(-0xc5,-0xa9,-0x4e,-0xa1)]}:{},'chunks':_0x394268,'meta':createToolMeta()};}function createUnknownToolResult(_0x3cadc8){const _0x4a7976={_0x592bde:0x120,_0x4c09be:0x384,_0x508c0c:0x361,_0x3aba97:0x309,_0x10dd28:0x12d},_0x5d726a={_0x1002b7:0x172,_0x1c5895:0x141,_0x5111f1:0x30b},_0x50048a={_0x3378bb:0xd7};function _0x20fd17(_0x1e25c7,_0xec8279,_0x219c14,_0x5e1a7d){return _0x17dcb0(_0x5e1a7d,_0xec8279-0x10d,_0x219c14-_0x50048a._0x3378bb,_0xec8279- -0xb5);}function _0x57d25f(_0x103eb2,_0x5dc8ab,_0x2aad4c,_0x1e3325){return _0x17dcb0(_0x2aad4c,_0x5dc8ab-_0x5d726a._0x1002b7,_0x2aad4c-_0x5d726a._0x1c5895,_0x103eb2- -_0x5d726a._0x5111f1);}return createErrorToolResult(_0x3cadc8,_0x57d25f(_0x4a7976._0x592bde,0x15e,0x108,0x13b)+_0x3cadc8[_0x20fd17(_0x4a7976._0x4c09be,0x34b,_0x4a7976._0x508c0c,_0x4a7976._0x3aba97)],{'error':_0x57d25f(_0x4a7976._0x10dd28,0x14b,0x10a,0x10e)});}function isDispatchDecision(_0x5d6731){const _0x132223={_0xb8dde4:0x33,_0x58030b:0x87,_0x235b00:0x9c,_0x454bd5:0x8d,_0x24a365:0x12e,_0x19416a:0xd7,_0x48a116:0x13f,_0x548241:0xf5},_0xabcdb3={_0x5646a1:0x37,_0x365e8f:0x1bb,_0x15db6a:0x234},_0x2a97c3={_0x25d146:0x11b,_0x1fcfb8:0x90};if(typeof _0x5d6731!==_0x306d2a(-_0x132223._0xb8dde4,-0x24,-0x61,-0x6f)||_0x5d6731===null)return![];function _0x306d2a(_0x386d80,_0x37f976,_0x1d24b3,_0x1e95aa){return _0x3b1855(_0x1d24b3,_0x37f976-0x125,_0x1d24b3-_0x2a97c3._0x25d146,_0x1e95aa- -_0x2a97c3._0x1fcfb8);}function _0x892f28(_0x512ec3,_0x30439e,_0x4ea6b2,_0x476db8){return _0x3b1855(_0x4ea6b2,_0x30439e-_0xabcdb3._0x5646a1,_0x4ea6b2-_0xabcdb3._0x365e8f,_0x476db8- -_0xabcdb3._0x15db6a);}return _0x5d6731['action']===_0x306d2a(-0x60,-_0x132223._0x58030b,-_0x132223._0x235b00,-_0x132223._0x454bd5)||_0x5d6731[_0x306d2a(-0xcc,-0xb2,-_0x132223._0x24a365,-_0x132223._0x19416a)]===_0x306d2a(-_0x132223._0x48a116,-_0x132223._0x548241,-0xa2,-_0x132223._0x548241);}function normalizeExecutionError(_0x43faa0){const _0x5e9c1e={_0x13650e:0x224,_0x512357:0x1a4,_0x2f41f2:0x1aa,_0xe207cb:0x173,_0x2cf033:0x181,_0x4eb363:0x18a,_0x243a4e:0x1e6,_0x2f6e7f:0x19c,_0x2ef0a2:0x1d1,_0x4b15a5:0x119},_0x552c09={_0x50356e:0x8a,_0x1abf25:0x134},_0x2165f3={_0xab0877:0x5d,_0xdc4bd7:0x19e};function _0xa2fde6(_0x356522,_0x225096,_0x51c8a8,_0x31b596){return _0x3b1855(_0x225096,_0x225096-_0x2165f3._0xab0877,_0x51c8a8-0x1ad,_0x51c8a8-_0x2165f3._0xdc4bd7);}function _0x20684a(_0x1a4e17,_0x54f063,_0x39df1f,_0x290011){return _0x3b1855(_0x1a4e17,_0x54f063-_0x552c09._0x50356e,_0x39df1f-0x13b,_0x290011-_0x552c09._0x1abf25);}if(_0x43faa0 instanceof ToolExecutionError)return{'errorMessage':_0x43faa0[_0xa2fde6(_0x5e9c1e._0x13650e,0x223,0x1d1,_0x5e9c1e._0x512357)],'structured':{'error':_0x43faa0[_0xa2fde6(0x19b,0x1d8,0x1d1,_0x5e9c1e._0x2f41f2)],..._0x43faa0[_0x20684a(_0x5e9c1e._0xe207cb,_0x5e9c1e._0x2cf033,_0x5e9c1e._0x4eb363,0x168)]}};if(_0x43faa0 instanceof Error)return{'errorMessage':_0x43faa0[_0xa2fde6(_0x5e9c1e._0x243a4e,_0x5e9c1e._0x2f6e7f,_0x5e9c1e._0x2ef0a2,0x18f)],'structured':{'error':_0x43faa0[_0x20684a(0x194,0x12e,_0x5e9c1e._0x4b15a5,0x167)]}};const _0x555cc0=String(_0x43faa0);return{'errorMessage':_0x555cc0,'structured':{'error':_0x555cc0}};}async function emitEvent(_0x34fd86,_0x15d9fb,_0x1e5564){await _0x34fd86?.(_0x15d9fb,_0x1e5564);}async function resolveDispatchDecision(_0x39fc76,_0x3d8fec,_0x24bf5f){const _0x13d2a2={_0x5ec413:0x5a,_0x62c6c6:0x36d,_0xac3dcf:0x281,_0x184edd:0x2a8,_0x285598:0x2ae,_0x151fd1:0xb0,_0x224493:0xa9,_0x227389:0x9,_0x525127:0x29},_0x19c792={_0x394b31:0x17,_0x2dea3e:0x129},_0x167bbd={_0xa360e5:0x18a,_0x3082c0:0x165,_0x49a60d:0x162,_0x2fa043:0x189,_0x14b50e:0x1ea,_0x45e081:0x131,_0x29f088:0x150},_0x2b2948={_0x3745e7:0x186,_0x4e4068:0xdc,_0x20727b:0x3ba};if(!_0x39fc76)return{'action':'run'};function _0x2d9aca(_0x2a2283,_0x4f1f48,_0x8f7e59,_0x724ace){return _0x17dcb0(_0x4f1f48,_0x4f1f48-_0x2b2948._0x3745e7,_0x8f7e59-_0x2b2948._0x4e4068,_0x8f7e59- -_0x2b2948._0x20727b);}const _0x1d73d8=Promise[_0x2d9aca(0x61,_0x13d2a2._0x5ec413,0x63,0x19)]()['then'](()=>_0x39fc76(_0x3d8fec,_0x24bf5f));if(!_0x24bf5f[_0x20e5c0(0x321,0x389,_0x13d2a2._0x62c6c6,0x339)]){const _0x2c307f=await _0x1d73d8;return isDispatchDecision(_0x2c307f)?_0x2c307f:{'action':_0x20e5c0(_0x13d2a2._0xac3dcf,0x28c,_0x13d2a2._0x184edd,_0x13d2a2._0x285598)};}const _0x4df6bb=new Promise((_0x498ebf,_0x3c90cb)=>{const _0x30d654={_0x4efef4:0x126,_0x5a6614:0x163},_0x386790={_0x42521f:0x1d5,_0x24ac48:0x182,_0x1e7cbd:0x19f,_0x19c58d:0x16e,_0x5b0da7:0xe5,_0xdded63:0x158,_0x4ca585:0x1df,_0x3d9905:0x170,_0x3b9997:0x19f,_0x247674:0x52},_0x5bb518={_0x5340f0:0x69},_0x30cc4e=()=>{function _0x366ec3(_0xa17ec2,_0x52b7b4,_0x55cc6f,_0x3a773d){return _0x5603(_0x3a773d- -0x7f,_0x52b7b4);}_0x24bf5f[_0xaeaba2(0x1c3,_0x386790._0x42521f,_0x386790._0x24ac48,_0x386790._0x1e7cbd)]?.['removeEventListener'](_0xaeaba2(0xd4,_0x386790._0x19c58d,_0x386790._0x5b0da7,0x119),_0x30cc4e);function _0xaeaba2(_0x4cc434,_0x2f2f38,_0x14c845,_0x1947d6){return _0x5603(_0x1947d6-_0x5bb518._0x5340f0,_0x14c845);}_0x3c90cb(toAbortError(_0x24bf5f[_0xaeaba2(_0x386790._0xdded63,_0x386790._0x4ca585,_0x386790._0x3d9905,_0x386790._0x3b9997)]?.[_0x366ec3(0x26,0x63,_0x386790._0x247674,0x5d)]));};function _0x8564d(_0x190ffe,_0x26dcfa,_0x4e2585,_0x5f478d){return _0x20e5c0(_0x190ffe-0x5c,_0x26dcfa-0x171,_0x190ffe,_0x5f478d- -0x565);}function _0xfdfd31(_0x153a3a,_0x1f6ea0,_0xeecec4,_0x2a9394){return _0x20e5c0(_0x153a3a-0xdd,_0x1f6ea0-_0x30d654._0x4efef4,_0x153a3a,_0x2a9394- -_0x30d654._0x5a6614);}if(_0x24bf5f[_0xfdfd31(0x215,0x19b,0x19b,0x1d6)]?.[_0xfdfd31(_0x167bbd._0xa360e5,_0x167bbd._0x3082c0,_0x167bbd._0x49a60d,0x1ab)]){_0x3c90cb(toAbortError(_0x24bf5f['signal']['reason']));return;}_0x24bf5f['signal']?.[_0xfdfd31(_0x167bbd._0x2fa043,0x1ef,_0x167bbd._0x14b50e,0x19f)](_0xfdfd31(_0x167bbd._0x45e081,0x140,0x106,_0x167bbd._0x29f088),_0x30cc4e,{'once':!![]});}),_0x30baef=await Promise[_0x2d9aca(0xa3,0x94,_0x13d2a2._0x151fd1,_0x13d2a2._0x224493)]([_0x1d73d8,_0x4df6bb]);function _0x20e5c0(_0x4297bc,_0xdeb62a,_0x1e85da,_0x49cf68){return _0x3b1855(_0x1e85da,_0xdeb62a-_0x19c792._0x394b31,_0x1e85da-_0x19c792._0x2dea3e,_0x49cf68-0x313);}return isDispatchDecision(_0x30baef)?_0x30baef:{'action':_0x2d9aca(0x20,_0x13d2a2._0x227389,_0x13d2a2._0x525127,0x76)};}async function executeToolCall(_0xc1071,_0x114ea1,_0x2a84d3,_0xb8fd7d,_0x2bf758){const _0xac3e94={_0x2b9903:0x404,_0x16eff1:0x411,_0x208910:0x426,_0x4cc741:0x3fd,_0x330fa6:0x38b,_0x308b17:0x369,_0x46271d:0x336,_0xd61bb9:0x36e,_0x81aa23:0x395,_0x54e4c2:0x39a,_0x2cc805:0x368,_0x70a285:0x3ff,_0x5d20fd:0x414,_0x2caabc:0x3e8,_0x487200:0x3a6,_0x5d56bd:0x3d6,_0x1853cf:0x3aa,_0x6a2b52:0x3ef,_0x3dccf1:0x3c5,_0x4d2a26:0x3fc,_0x14fdfe:0x438,_0x153aa5:0x3e3,_0xfccc8:0x387,_0x19f644:0x412,_0x40f7c9:0x472,_0x503c26:0x427,_0x4c55ca:0x417,_0x17af60:0x3b0,_0x18d28c:0x3f7,_0x4cb870:0x3ec,_0x2332b6:0x34e,_0x51564d:0x39b,_0x9b4a2e:0x42a,_0xbe264f:0x43d,_0x2e22bb:0x3c8,_0x1bc525:0x41d,_0x352950:0x3e9,_0x53f4bf:0x3f0,_0x49efe7:0x3a3,_0x7f90e3:0x3a0,_0x3a2f87:0x3f3,_0x187760:0x444},_0x4079a2={_0x43c87:0x16b,_0x3f72b8:0x11b,_0x5ef393:0x195,_0x59f1d2:0x40c},_0x47f9e3={_0x425981:0xde,_0x29df71:0x174,_0x38a93a:0x48},_0x1e6631={_0x4ab553:0x10c,_0x23a45b:0x5d},_0x282369={..._0x2a84d3,'toolCallId':_0x114ea1['id']};throwIfAborted(_0x282369[_0x42cf11(_0xac3e94._0x2b9903,_0xac3e94._0x16eff1,_0xac3e94._0x208910,0x3eb)]);function _0x3f00a4(_0x50b9cb,_0x389c69,_0x19bf84,_0x4c7426){return _0x17dcb0(_0x389c69,_0x389c69-_0x1e6631._0x4ab553,_0x19bf84-_0x1e6631._0x23a45b,_0x4c7426- -0x98);}const _0x46b104=await resolveDispatchDecision(_0xb8fd7d,_0x114ea1,_0x282369);throwIfAborted(_0x282369[_0x42cf11(0x430,0x3e3,_0xac3e94._0x208910,_0xac3e94._0x4cc741)]);if(_0x46b104[_0x3f00a4(0x380,0x378,_0xac3e94._0x330fa6,_0xac3e94._0x308b17)]==='reject'){const _0x5ea89e=createRejectedToolResult(_0x114ea1,_0x46b104[_0x3f00a4(0x375,_0xac3e94._0x46271d,_0xac3e94._0xd61bb9,0x37c)]);return await emitEvent(_0x2bf758,{'type':'tool_rejected','toolCall':_0x114ea1,'result':_0x5ea89e},_0x282369),_0x5ea89e;}const _0x38ea7a=_0xc1071[_0x42cf11(0x371,_0xac3e94._0x81aa23,0x3ae,0x3df)](_0x114ea1[_0x3f00a4(_0xac3e94._0x54e4c2,0x33d,0x396,_0xac3e94._0x2cc805)]);function _0x42cf11(_0x21ff86,_0x2f8dad,_0x18c1c7,_0x5205a3){return _0x17dcb0(_0x21ff86,_0x2f8dad-_0x47f9e3._0x425981,_0x18c1c7-_0x47f9e3._0x29df71,_0x18c1c7- -_0x47f9e3._0x38a93a);}if(!_0x38ea7a){const _0x2d68aa=createUnknownToolResult(_0x114ea1);return await emitEvent(_0x2bf758,{'type':'tool_completed','toolCall':_0x114ea1,'result':_0x2d68aa},_0x282369),_0x2d68aa;}throwIfAborted(_0x282369[_0x3f00a4(_0xac3e94._0x70a285,_0xac3e94._0x5d20fd,0x41f,0x3d6)]),await emitEvent(_0x2bf758,{'type':_0x42cf11(0x3f1,0x412,_0xac3e94._0x2caabc,0x41d),'toolCall':_0x114ea1},_0x282369);try{throwIfAborted(_0x282369[_0x3f00a4(_0xac3e94._0x487200,0x3db,0x3bb,_0xac3e94._0x5d56bd)]);const _0x4c2750=validateToolInput(_0x114ea1['input'],_0x38ea7a[_0x42cf11(0x40c,_0xac3e94._0x1853cf,0x3b7,_0xac3e94._0x6a2b52)]),_0x3c3d9d=await _0x38ea7a['execute'](_0x4c2750,_0x282369),_0x137f6e=[],_0x4f0ce2=addAbortListener(_0x282369[_0x3f00a4(0x42b,_0xac3e94._0x3dccf1,_0xac3e94._0x4d2a26,0x3d6)],()=>{const _0x47db7f={_0x3aa8a3:0x43,_0x442bea:0x582},_0x4940bb={_0x1cedd5:0x1a8};function _0x592cc8(_0x411868,_0x5f123c,_0x315e8b,_0x131ccc){return _0x3f00a4(_0x411868-_0x4940bb._0x1cedd5,_0x315e8b,_0x315e8b-0x189,_0x131ccc-0xc4);}function _0x34b508(_0x2b6188,_0x2d8a6f,_0x81d028,_0x441d17){return _0x42cf11(_0x2b6188,_0x2d8a6f-_0x47db7f._0x3aa8a3,_0x81d028- -_0x47db7f._0x442bea,_0x441d17-0x13);}void _0x3c3d9d[_0x34b508(-_0x4079a2._0x43c87,-_0x4079a2._0x3f72b8,-0x14b,-_0x4079a2._0x5ef393)](void 0x0)[_0x592cc8(0x426,0x3e7,0x404,_0x4079a2._0x59f1d2)](()=>{});});try{throwIfAborted(_0x282369[_0x42cf11(0x40d,0x3d9,0x426,_0xac3e94._0x14fdfe)]);let _0x3b54cc=await _0x3c3d9d[_0x3f00a4(_0xac3e94._0x153aa5,0x3d4,_0xac3e94._0xfccc8,0x3d5)]();while(!_0x3b54cc[_0x42cf11(_0xac3e94._0x19f644,_0xac3e94._0x40f7c9,_0xac3e94._0x503c26,0x3e6)]){throwIfAborted(_0x282369[_0x42cf11(0x3d0,0x450,_0xac3e94._0x208910,0x3e1)]);const _0x443a3c=normalizeToolOutputValue(_0x3b54cc[_0x42cf11(_0xac3e94._0x54e4c2,_0xac3e94._0x4c55ca,0x3e6,_0xac3e94._0x17af60)]);_0x137f6e[_0x3f00a4(_0xac3e94._0x18d28c,_0xac3e94._0x70a285,0x3f5,_0xac3e94._0x4cb870)](_0x443a3c),await emitEvent(_0x2bf758,{'type':_0x3f00a4(0x3d4,_0xac3e94._0x2332b6,_0xac3e94._0x51564d,0x3a2),'toolCall':_0x114ea1,'chunk':_0x443a3c},_0x282369),throwIfAborted(_0x282369[_0x42cf11(_0xac3e94._0x9b4a2e,0x44c,0x426,_0xac3e94._0xbe264f)]),_0x3b54cc=await _0x3c3d9d['next']();}throwIfAborted(_0x282369['signal']);const _0x12ece1=_0x3b54cc['value']===void 0x0?deriveFinalToolOutput(_0x137f6e):normalizeToolOutputValue(_0x3b54cc['value']),_0x3dc4f0=createSuccessToolResult(_0x114ea1,_0x12ece1,_0x137f6e);return await emitEvent(_0x2bf758,{'type':_0x42cf11(0x41b,_0xac3e94._0x2e22bb,0x3f3,0x405),'toolCall':_0x114ea1,'result':_0x3dc4f0},_0x282369),_0x3dc4f0;}catch(_0x3ba8b7){if(isAbortError(_0x3ba8b7)){const _0x2fa7df=createAbortedToolResult(_0x114ea1,_0x3ba8b7,_0x137f6e);return await emitEvent(_0x2bf758,{'type':_0x42cf11(_0xac3e94._0x1bc525,_0xac3e94._0x352950,0x3f3,_0xac3e94._0x53f4bf),'toolCall':_0x114ea1,'result':_0x2fa7df},_0x282369),_0x2fa7df;}const {errorMessage:_0x57a176,structured:_0x235657}=normalizeExecutionError(_0x3ba8b7),_0x1b9125=createErrorToolResult(_0x114ea1,_0x57a176,_0x235657,_0x137f6e);return await emitEvent(_0x2bf758,{'type':_0x3f00a4(0x352,0x370,0x392,_0xac3e94._0x49efe7),'toolCall':_0x114ea1,'result':_0x1b9125},_0x282369),_0x1b9125;}finally{_0x4f0ce2();}}catch(_0x4dd3a3){if(isAbortError(_0x4dd3a3)){const _0xae9570=createAbortedToolResult(_0x114ea1,_0x4dd3a3);return await emitEvent(_0x2bf758,{'type':_0x42cf11(_0xac3e94._0x7f90e3,0x3e9,_0xac3e94._0x3a2f87,0x3a2),'toolCall':_0x114ea1,'result':_0xae9570},_0x282369),_0xae9570;}const {errorMessage:_0x31fe36,structured:_0x361319}=normalizeExecutionError(_0x4dd3a3),_0x182ef4=createErrorToolResult(_0x114ea1,_0x31fe36,_0x361319);return await emitEvent(_0x2bf758,{'type':_0x42cf11(0x3f5,_0xac3e94._0x187760,_0xac3e94._0x3a2f87,0x3fb),'toolCall':_0x114ea1,'result':_0x182ef4},_0x282369),_0x182ef4;}}function createInternalToolRuntime(_0x2332fa=[],_0x30eaf5={}){const _0x69014={_0x13773e:0x244,_0x3c65c4:0x254,_0x5d522e:0x24a,_0x33948d:0x259},_0x2b0621={_0x245160:0x15a},_0x35d497={_0x2cbb50:0x66,_0x3b7934:0xb7,_0x393dff:0xb1,_0x55444e:0x1a4,_0x47d732:0x12f},_0x26be73={_0x3ee243:0x29c};let _0x1d7cb6=new ToolRegistry(_0x2332fa);return{'listToolSchemas'(){function _0x5cd673(_0x56c816,_0x3e7b4d,_0x207364,_0x32f900){return _0x5603(_0x3e7b4d- -0x3ac,_0x207364);}return _0x1d7cb6[_0x5cd673(-0x2d5,-0x2f0,-0x33f,-_0x26be73._0x3ee243)]();},'setTools'(_0x389556){_0x1d7cb6=new ToolRegistry(_0x389556);},async 'executeCalls'(_0x36302d,_0x5f486c){const _0x39be2={_0xf62da8:0xa6,_0x30fc6b:0xa7,_0x5a9c17:0x97,_0x30afc4:0xbf};function _0x2fb1e3(_0x345710,_0x52e463,_0x3d448f,_0x393b93){return _0x5603(_0x393b93-0x54,_0x3d448f);}function _0x549437(_0x3aaf75,_0xa113c3,_0x43acc2,_0xe44af2){return _0x5603(_0xa113c3- -0x43,_0x43acc2);}return await Promise[_0x549437(0x1b,_0x35d497._0x2cbb50,_0x35d497._0x3b7934,_0x35d497._0x393dff)](_0x36302d[_0x2fb1e3(0x142,_0x35d497._0x55444e,_0x35d497._0x47d732,0x166)](async _0x2d5b44=>{const _0x1915e8={_0x103551:0x1b1,_0x55e396:0x182},_0xdcdbc9={_0x41c49e:0xe7,_0x4ccdbf:0x1db,_0xce5a9e:0x27e};function _0x110623(_0x51a560,_0x5d051b,_0x4c9a68,_0x247041){return _0x2fb1e3(_0x51a560-_0xdcdbc9._0x41c49e,_0x5d051b-_0xdcdbc9._0x4ccdbf,_0x247041,_0x5d051b- -_0xdcdbc9._0xce5a9e);}function _0x206b08(_0x2b8075,_0x479683,_0xf6acaf,_0x278918){return _0x2fb1e3(_0x2b8075-_0x1915e8._0x103551,_0x479683-_0x1915e8._0x55e396,_0x479683,_0xf6acaf- -0xdc);}return await executeToolCall(_0x1d7cb6,_0x2d5b44,_0x5f486c,_0x30eaf5[_0x206b08(0xac,_0x39be2._0xf62da8,0x8c,_0x39be2._0x30fc6b)],_0x30eaf5[_0x206b08(_0x39be2._0x5a9c17,_0x39be2._0x30afc4,0x6f,0x4c)]);}));},async 'execute'(_0x1c9e7b,_0x385f24){function _0x93b2fa(_0x464505,_0x48158d,_0x4be6e1,_0x55d2c3){return _0x5603(_0x464505-_0x2b0621._0x245160,_0x4be6e1);}const [_0x25c098]=await this[_0x93b2fa(_0x69014._0x13773e,_0x69014._0x3c65c4,_0x69014._0x5d522e,_0x69014._0x33948d)]([_0x1c9e7b],_0x385f24);return _0x25c098;}};}function getOrderedObserverExtensions(_0x431916,_0x30b747){const _0x555559={_0x399b54:0x277,_0xcc2c0f:0x26f,_0x320483:0x4c,_0x132a6e:0x8f},_0x5e9165={_0x2a1a78:0x11b,_0x45edb2:0xc7},_0xaadc87={_0x18b446:0x28,_0x1c10a8:0xd9},_0x227e89={_0x1d74f5:0x2fc};function _0x2d0e4e(_0x16ece2,_0x434ed7,_0x3ae69e,_0x10c4f8){return _0x3b1855(_0x16ece2,_0x434ed7-0xb4,_0x3ae69e-0x187,_0x3ae69e-_0x227e89._0x1d74f5);}function _0x24e836(_0x59a8de,_0x371314,_0x29af41,_0x23d49c){return _0x3b1855(_0x23d49c,_0x371314-0x1c6,_0x29af41-_0xaadc87._0x18b446,_0x29af41-_0xaadc87._0x1c10a8);}return _0x431916[_0x2d0e4e(_0x555559._0x399b54,_0x555559._0xcc2c0f,0x2c6,0x2c2)](_0x1c1ad4=>{const _0x5f15c4={_0x4a658b:0x6c,_0x57661d:0x54};function _0x56aac8(_0x1b95cf,_0x3d21ae,_0x399a54,_0x221c7a){return _0x2d0e4e(_0x1b95cf,_0x3d21ae-_0x5f15c4._0x4a658b,_0x399a54- -0x252,_0x221c7a-_0x5f15c4._0x57661d);}return _0x1c1ad4['enabled']!==![]&&_0x1c1ad4['stage']===_0x30b747&&_0x1c1ad4['kind']===_0x56aac8(0xd1,_0x5e9165._0x2a1a78,_0x5e9165._0x45edb2,0x8d);})[_0x24e836(_0x555559._0x320483,0x3e,_0x555559._0x132a6e,0xa9)]((_0x510374,_0x157458)=>_0x510374[_0x2d0e4e(0x2c5,0x2c1,0x2e9,0x2d5)]-_0x157458[_0x2d0e4e(0x2ec,0x333,0x2e9,0x2f3)]);}function getOrderedTransformerExtensions(_0x4b17c8,_0x57c8f0){const _0x401f0f={_0x5011c2:0xa6,_0x238ef9:0xad,_0x3e98dc:0x3,_0x48f1f8:0x21},_0x132e77={_0x5a4997:0x1ce,_0x2a285f:0x19d,_0xca1fb6:0xc8,_0x19ab17:0xd6},_0x559c15={_0x6d7d9d:0x1f7},_0x215572={_0x35ec51:0x1a2,_0x164717:0x3aa},_0x15249d={_0x5f0ba3:0x238};function _0x178651(_0x44b06f,_0x3c8215,_0x2d9e56,_0x93c38d){return _0x3b1855(_0x3c8215,_0x3c8215-0x145,_0x2d9e56-0x154,_0x93c38d- -_0x15249d._0x5f0ba3);}function _0x51b4e4(_0x25be7b,_0xf5026d,_0x33bd6b,_0x452372){return _0x17dcb0(_0x452372,_0xf5026d-_0x215572._0x35ec51,_0x33bd6b-0x160,_0x33bd6b- -_0x215572._0x164717);}return _0x4b17c8[_0x51b4e4(0x87,_0x401f0f._0x5011c2,0x68,_0x401f0f._0x238ef9)](_0x5dd89f=>{const _0x38a4b7={_0x488286:0x53};function _0xc5a0a7(_0x325b61,_0x34d5ed,_0x226701,_0x4c9023){return _0x51b4e4(_0x325b61-0x14d,_0x34d5ed-0x129,_0x226701- -_0x559c15._0x6d7d9d,_0x325b61);}function _0x16697f(_0x2d2820,_0x22a253,_0x5538d2,_0x1736c8){return _0x51b4e4(_0x2d2820-_0x38a4b7._0x488286,_0x22a253-0x1e6,_0x22a253- -0x127,_0x2d2820);}return _0x5dd89f[_0xc5a0a7(-0x13f,-0x17e,-0x18b,-0x1e1)]!==![]&&_0x5dd89f[_0xc5a0a7(-_0x132e77._0x5a4997,-0x1ab,-0x19b,-_0x132e77._0x2a285f)]===_0x57c8f0&&_0x5dd89f[_0x16697f(-_0x132e77._0xca1fb6,-0xeb,-_0x132e77._0x19ab17,-0xfd)]==='transformer';})[_0x51b4e4(-_0x401f0f._0x3e98dc,0x13,0x54,_0x401f0f._0x48f1f8)]((_0x5437b4,_0x3864bf)=>_0x5437b4['order']-_0x3864bf[_0x178651(-0x298,-0x225,-0x293,-0x24b)]);}function createExtensionRegistry(){const _0x434ac6={_0x49048a:0x45c,_0x39f35c:0x3c7},_0x350056={_0x1e92fd:0x3c7,_0x3e1861:0x3db,_0xa4313f:0x414},_0xb17c6c=[];return{'register'(_0x3e2cc8){const _0x3ebcad={_0x2c4df5:0x28f};function _0x57ff88(_0x3d2dc5,_0x3631c8,_0x1f8a4a,_0x46d30e){return _0x5603(_0x1f8a4a-_0x3ebcad._0x2c4df5,_0x3631c8);}_0xb17c6c[_0x57ff88(_0x350056._0x1e92fd,_0x350056._0x3e1861,_0x350056._0x3e1861,_0x350056._0xa4313f)](_0x3e2cc8);},async 'runTransformers'(_0x39fad2,_0x5e41ba,_0x1397b5){let _0x28c94d=_0x5e41ba;for(const _0x281007 of getOrderedTransformerExtensions(_0xb17c6c,_0x39fad2)){_0x28c94d=await _0x281007['run'](_0x28c94d,_0x1397b5);}return _0x28c94d;},async 'runObservers'(_0x34bb9b,_0x6a6442,_0x1d5e52){function _0x28979e(_0x57c625,_0x4bd11a,_0x616698,_0x58ddfe){return _0x5603(_0x57c625-0x35a,_0x4bd11a);}for(const _0x457c1c of getOrderedObserverExtensions(_0xb17c6c,_0x34bb9b)){await _0x457c1c[_0x28979e(0x405,_0x434ac6._0x49048a,_0x434ac6._0x39f35c,0x40e)](_0x6a6442,_0x1d5e52);}}};}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(_0x1863de={}){const _0x3ae1d4={_0x70a9b5:0x8d,_0x9392f9:0x8f,_0xb0e1a9:0xa1},_0x509e30={_0x2ebc2e:0x291,_0x5bc68d:0x371,_0x3fe5d6:0x322,_0xcd36ae:0x347,_0x532379:0x3ab,_0x49f0ee:0x225,_0x18c00e:0x231,_0x14489d:0x1c1,_0x13ee34:0x200,_0x4e751a:0x1bb,_0x3c04c0:0x265,_0x587cc:0x246,_0x862b4d:0x222,_0x503427:0x359,_0xf7e0aa:0x398,_0x2a390c:0x308,_0x28532d:0x388,_0x395ef3:0x3ad,_0x18117c:0x38b,_0x1f7179:0x381,_0x4bb50e:0x368,_0x1fc4bf:0x1f8,_0x46246c:0x22d,_0x35966c:0x1f4,_0x33202d:0x38d,_0x316679:0x394,_0x4ebe6a:0x26f,_0x42e994:0x24c,_0x3951c3:0x37f,_0x20e200:0x3d2,_0x1f9528:0x3d1,_0x192f00:0x214,_0x4e1903:0x1f0,_0x5e07b6:0x273,_0x16733c:0x2be,_0x6cd555:0x1ea,_0xeafb99:0x235,_0x111db8:0x399,_0x181586:0x35d,_0x1bdeb8:0x344,_0x22c360:0x36f,_0x1a6da8:0x338,_0x26e68c:0x305,_0x5244ab:0x348,_0x3e4ae6:0x1c6,_0x1c2572:0x3a5,_0x416a93:0x3c6,_0x1f1a18:0x3b4,_0x420f98:0x356,_0x5cd212:0x3a0,_0x12667d:0x219,_0x44b68d:0x248,_0x503538:0x27a,_0x436e05:0x231},_0x45f235={_0xf804bf:0x329};let _0x3e6ba3=createEmptySnapshot();const _0xb5d6d0=new Set();let _0x47c79f;const _0x33cb04=()=>{const _0x5e51f9={..._0x3e6ba3};for(const _0x1e7a15 of _0xb5d6d0)_0x1e7a15(_0x5e51f9);};return{'getSnapshot'(){return{..._0x3e6ba3};},'recordEvent'(_0x4323a3){const _0x241d62={_0x22356f:0x284};if(_0x4323a3['type']==='model_request'){_0x47c79f=Date[_0x3f0909(-_0x509e30._0x2ebc2e,-0x262,-0x26f,-0x22e)]();const _0x131007=_0x1863de[_0x36e690(_0x509e30._0x5bc68d,0x352,_0x509e30._0x3fe5d6,_0x509e30._0xcd36ae)]?.(_0x4323a3[_0x36e690(0x374,0x3b6,_0x509e30._0x532379,_0x509e30._0x532379)]);_0x131007!==void 0x0&&(_0x3e6ba3={..._0x3e6ba3,'contextWindowLimit':_0x131007},_0x33cb04());return;}function _0x3f0909(_0x40d25c,_0x56cd5f,_0x34fe34,_0x2beab9){return _0x5603(_0x34fe34- -_0x45f235._0xf804bf,_0x2beab9);}if(_0x4323a3[_0x3f0909(-_0x509e30._0x49f0ee,-0x24f,-0x20d,-_0x509e30._0x18c00e)]===_0x3f0909(-0x222,-0x1bc,-0x1e1,-_0x509e30._0x14489d)){const _0x41bd67=_0x4323a3[_0x3f0909(-0x1e0,-0x1d2,-_0x509e30._0x13ee34,-_0x509e30._0x4e751a)][_0x3f0909(-_0x509e30._0x3c04c0,-_0x509e30._0x587cc,-_0x509e30._0x862b4d,-0x1e4)][_0x36e690(_0x509e30._0x503427,_0x509e30._0xf7e0aa,_0x509e30._0x2a390c,_0x509e30._0x28532d)],_0x5a10a9=_0x4323a3[_0x36e690(_0x509e30._0x395ef3,0x3da,0x3a0,0x399)][_0x36e690(_0x509e30._0x18117c,0x3ca,_0x509e30._0x1f7179,_0x509e30._0x4bb50e)]['outputTokens'],_0x342e88=_0x4323a3[_0x3f0909(-0x201,-_0x509e30._0x1fc4bf,-0x200,-0x245)][_0x3f0909(-_0x509e30._0x46246c,-0x232,-0x222,-_0x509e30._0x35966c)][_0x36e690(0x345,_0x509e30._0x33202d,0x311,_0x509e30._0x316679)]??0x0,_0x32eb65=_0x41bd67+_0x5a10a9,_0x32efa4=_0x47c79f===void 0x0?0x0:Date[_0x3f0909(-0x2a0,-0x293,-_0x509e30._0x4ebe6a,-_0x509e30._0x42e994)]()-_0x47c79f;_0x47c79f=void 0x0,_0x3e6ba3={..._0x3e6ba3,'totalTokens':_0x3e6ba3[_0x36e690(_0x509e30._0x3951c3,_0x509e30._0x20e200,0x37f,_0x509e30._0x1f9528)]+_0x32eb65,'totalInputTokens':_0x3e6ba3[_0x3f0909(-_0x509e30._0x192f00,-_0x509e30._0x4e1903,-0x1df,-0x192)]+_0x41bd67,'totalOutputTokens':_0x3e6ba3[_0x3f0909(-0x26d,-0x234,-0x27f,-0x22f)]+_0x5a10a9,'totalReasoningTokens':_0x3e6ba3[_0x3f0909(-_0x509e30._0x5e07b6,-0x271,-0x283,-_0x509e30._0x16733c)]+_0x342e88,'modelCallCount':_0x3e6ba3[_0x3f0909(-_0x509e30._0x6cd555,-0x245,-_0x509e30._0xeafb99,-0x20b)]+0x1,'totalModelTimeMs':_0x3e6ba3[_0x36e690(_0x509e30._0x111db8,_0x509e30._0x181586,_0x509e30._0x1bdeb8,_0x509e30._0x22c360)]+_0x32efa4,'currentTokens':_0x32eb65,'currentInputTokens':_0x41bd67,'currentOutputTokens':_0x5a10a9,'currentReasoningTokens':_0x342e88,'currentModelTimeMs':_0x32efa4,..._0x3e6ba3['contextWindowLimit']&&_0x32eb65>0x0?{'contextWindowUsage':_0x32eb65/_0x3e6ba3[_0x36e690(_0x509e30._0x1a6da8,_0x509e30._0x26e68c,0x301,_0x509e30._0x5244ab)]}:{}},_0x33cb04();return;}function _0x36e690(_0xcd5052,_0xd5712,_0x3268a8,_0x51c1d3){return _0x5603(_0xcd5052-_0x241d62._0x22356f,_0x51c1d3);}if(_0x4323a3[_0x3f0909(-0x1ea,-0x1c8,-0x20d,-_0x509e30._0x3e4ae6)]===_0x36e690(_0x509e30._0x1c2572,_0x509e30._0x416a93,_0x509e30._0x1f1a18,0x36c)){_0x3e6ba3={..._0x3e6ba3,'toolCallCount':_0x3e6ba3[_0x36e690(0x370,0x3ab,_0x509e30._0x420f98,0x34c)]+0x1},_0x33cb04();return;}_0x4323a3[_0x36e690(_0x509e30._0x5cd212,0x3ac,0x37b,0x3e2)]===_0x3f0909(-_0x509e30._0x12667d,-0x217,-_0x509e30._0x44b68d,-0x25d)&&(_0x3e6ba3={..._0x3e6ba3,'requestCount':_0x3e6ba3[_0x3f0909(-0x29c,-0x24c,-_0x509e30._0x503538,-_0x509e30._0x436e05)]+0x1},_0x33cb04());},'reset'(){_0x3e6ba3=createEmptySnapshot(),_0x47c79f=void 0x0,_0x33cb04();},'subscribe'(_0x43dfdb){return _0xb5d6d0['add'](_0x43dfdb),()=>{function _0x5e2dae(_0x283f04,_0x2181f5,_0x11a3b6,_0x5ca778){return _0x5603(_0x283f04- -0x13,_0x5ca778);}_0xb5d6d0[_0x5e2dae(0xbe,_0x3ae1d4._0x70a9b5,_0x3ae1d4._0x9392f9,_0x3ae1d4._0xb0e1a9)](_0x43dfdb);};}};}function makeExtensionContext(_0x3a0873){return{'state':_0x3a0873};}async function runStage(_0x17d02b,_0x8ef503,_0x2cf13c,_0x10f664){const _0x19ad44={_0x534eb0:0x220,_0x3e077e:0x217},_0x389aeb={_0x5ce1a8:0xdc,_0x4447d9:0x196,_0x429dce:0x248},_0x1ca352={_0x2de2d5:0xc8};function _0x201966(_0xb1a429,_0x511904,_0x660ef6,_0x314bcd){return _0x3b1855(_0x511904,_0x511904-0x113,_0x660ef6-_0x1ca352._0x2de2d5,_0x660ef6- -0x1e2);}function _0x17f585(_0x36f473,_0x1dc7b2,_0x2aa372,_0x2d6d64){return _0x17dcb0(_0x2d6d64,_0x1dc7b2-_0x389aeb._0x5ce1a8,_0x2aa372-_0x389aeb._0x4447d9,_0x2aa372- -_0x389aeb._0x429dce);}const _0x16e6ed=await _0x17d02b[_0x201966(-0x1fc,-0x231,-_0x19ad44._0x534eb0,-0x223)](_0x8ef503,_0x2cf13c,_0x10f664);return await _0x17d02b[_0x201966(-0x206,-_0x19ad44._0x3e077e,-0x1cc,-0x19c)](_0x8ef503,_0x16e6ed,_0x10f664),_0x16e6ed;}async function emitEvent2(_0x5d1709,_0x276093,_0x5d2b04){await _0x5d1709?.(_0x276093,_0x5d2b04);}function replaceToolUseBlocks(_0x1765a6,_0x412dd1){const _0x2161a2={_0x1ea228:0x251,_0x53c1d3:0x21c};let _0x823b81=0x0;return{..._0x1765a6,'content':_0x1765a6['content']['map'](_0x147cbe=>{if(_0x147cbe[_0x250f45(_0x2161a2._0x1ea228,_0x2161a2._0x53c1d3,0x255,0x22b)]!=='tool_use')return _0x147cbe;const _0x2ec77c=_0x412dd1[_0x823b81];_0x823b81+=0x1;function _0x250f45(_0x39bee2,_0x3430ab,_0x2d0bec,_0xeb1aa6){return _0x5603(_0x3430ab-0x100,_0x39bee2);}return structuredClone(_0x2ec77c);})};}function createAssistantMessageId(_0x22103d,_0xca24cc){const _0x1e6fde={_0x1931ae:0x3e1},_0x37ff9d={_0x183d88:0x12e};function _0x5ce7ef(_0x5f5b0e,_0x46b126,_0x1c7e79,_0x196346){return _0x17dcb0(_0x1c7e79,_0x46b126-_0x37ff9d._0x183d88,_0x1c7e79-0x16b,_0x46b126- -0x72);}return _0x22103d+_0x5ce7ef(0x3f0,_0x1e6fde._0x1931ae,0x3a1,0x41b)+_0xca24cc;}function createReasoningMessageId(_0x3e4323){const _0x1110f2={_0x1a0110:0x2be,_0x37bda1:0x2bd,_0x5c34c3:0x27a},_0x2cfd66={_0xdcd048:0x1d5};function _0x14f1ac(_0x452d6c,_0x208985,_0xfd0969,_0x314ffe){return _0x17dcb0(_0x208985,_0x208985-0x13b,_0xfd0969-0x119,_0x314ffe- -_0x2cfd66._0xdcd048);}return _0x3e4323+_0x14f1ac(_0x1110f2._0x1a0110,_0x1110f2._0x37bda1,0x244,_0x1110f2._0x5c34c3);}function _0x1f62(){const _0x2d735a=['DgHPBMTPBMC','zgvWCW','BgvUz3rO','B2jQzwn0','CMfJzq','oIbLEhbLy3rLzcbVyMPLy3q','C3LZDgvT','BMv4Da','C2LNBMfS','zg9Uzq','ywz0zxjuDxjUq29TCgXLDgu','C2v0u2vZC2LVBKLK','CMfUzg9T','yMvMB3jLvg9VBev4zwn1DgLVBG','zgvMyxvSDe1LC3nHz2u','oIbTAxnZAw5NihjLCxvPCMvKigzPzwXKici','B25vC2vYtwvZC2fNzq','ChjVCgvYDgLLCW','CMvHC29UAw5Nx21LC3nHz2u','DhvYBKLUzgv4','C29Tzq','BwvZC2fNzq','C3rYDwn0DxjLza','yMvMB3jLrMLUywXpDxrWDxq','C2v0vg9VBhm','CMv0DxjU','Bw9KzwXFCMvZCg9UC2u','m2DgrxrMqW','Dg90ywXjBNb1DfrVA2vUCW','oIbLEhbLy3rLzcbZDhjPBMC','ChvZAa','y29UDgvUDa','C2vZC2LVBI0','Dg9VBfj1BNrPBwu','C3rYzwfTAw5N','DhjPBq','CMvNAxn0zxi','Dg90ywXszwfZB25PBMDuB2TLBNm','C2vZC2LVBKrPCG','y2f0y2G','ywXS','Dg90ywXpDxrWDxruB2TLBNm','CNvU','Bwf4vg9Rzw5Z','ywz0zxjnzxnZywDLqxbWzw5K','A2LUza','CMvXDwvZDenVDw50','ywjVCNq','BgLZDa','DxnLCG','mZbot3vfuwS','y29UDgv4DfDPBMrVD0XPBwL0','mZaXodbYvNnpvw8','B3v0Chv0sw5KzxG','ywz0zxjnB2rLBfjLC3bVBNnL','B3v0Chv0','nJuYoty4ogHrzfbguW','BM93','Bw9KzwXFCMvXDwvZDa','BgLZDfrVB2Xty2HLBwfZ','sw52ywXPzcb0B29SigLUChv0igf0ia','z2v0','mty0ntaXnZbHsvz1Bhu','C3rHDgu','CMvHC29UAw5Nvg9Rzw5Z','C3rYAw5NAwz5','C3LZDgvTuhjVBxb0','tw9KzwWGC3rYzwfTigvUzgvKihDPDgHVDxqGysbMAw5HBcbYzxnWB25Zzq','C2vZC2LVBKLK','C29YDa','Aw5WDxrty2HLBwe','BMfTzq','ywn0Aw9U','C3vTBwfYEuLUzgv4','C3rYAw5N','AxrLBuLK','C2vUza','C3rHz2u','y2HHDe1VzgvS','C2v0q2HHDe1VzgvS','zgvSzxrL','CNvUvhjHBNnMB3jTzxjZ','vg9VBev4zwn1DgLVBKvYCM9Y','mJK1qw95DxPh','Aw5WDxruB2TLBNm','Aw5WDxrezwX0yq','B3bLBMfPx3jLyxnVBMLUz19ZDw1Tyxj5x2rLBhrH','zMLUywXFBwvZC2fNzq','oIbLEhbLy3rLzcbHCNjHEq','zMLSDgvY','DhvYBI0','CMvHC29U','AxnbCNjHEq','zw5HyMXLza','mJiXntK4ovb2sMLRuG','Dg9VBf9Yzxn1Bhq','DhvYBL9JB21WBgv0zq','x3n5C3rLBvbYB21WDa','C3rYzwfT','yxnZAxn0yw50x2nODw5R','CMvZB2X2zq','BNvTyMvY','yxjYyxK','CMvJB3jKrxzLBNq','mZq1mZa5m3rODwrdwq','zxHLy3v0zunHBgXZ','Dg9VBhm','Dg9VBenHBgXdB3vUDa','z2v0q29UDgv4DfDPBMrVD0XPBwL0','zxjYB3i','zgvZy3jPChrPB24','CMvXDwvZDa','yM9VBgvHBG','CMvNAxn0CNK','vw5RBM93BIb0B29SoIa','Bw9KzwXdywXSq291BNq','B3bLBMfPx3jLyxnVBMLUz19KzwX0yq','DMfSDwu','B25fDMvUDa','Dg9VBf9ZDgfYDgvK','Aw5WDxq','Dg9VBf91C2vFBwvZC2fNzq','Dg90ywXuB2TLBNm','Dg9VBf9YzwPLy3rLza','B3jKzxi','zxH0zw5ZAw9UCW','ywrKrxzLBNrmAxn0zw5LCG','Dw5RBM93BL90B29S','C2v0u3LZDgvTuhjVBxb0','Dg9VBf9VDxrWDxrFy2H1BMS','Dg9VBf9JB21WBgv0zwq','CMvHC29UAw5Nx2nODw5R','yMvMB3jLqxnZAxn0yw50qxbWzw5K','Dg9VBhncEu5HBwu','DxnHz2u','y29TCgXLDgvK','nJq4mta5veflvhHA','DhvYBKLK','ywjVCNrLza','yxnZAxn0yw50x21LC3nHz2u','yxnRvxnLCG','DxnLCL9TzxnZywDL','Bw9KzwW','C2XPy2u','y29UDgvUDf9KzwX0yq','BwfW','CMvQzwn0','B25uB29Sq2fSBa','Dg90ywXnB2rLBfrPBwvnCW','AxrLBxm','oNjLyxnVBMLUzW','yw50AhjVCgLJx3rOAw5RAw5Nx2rLBhrH','CMvZzxrnzxnZywDLCW','zNvUy3rPB24','oMfZC2LZDgfUDdO','DhLWzq','Dg9VBf91C2vFy2H1BMS','Aw5KzxG','zgvSDge','yxnZAxn0yw50twvZC2fNzuLK','Dg9VBf9JywXS','Dg9VBf91C2vFzgvSDge','yMvMB3jLvg9VBfjLC3vSDefWCgvUza','Dgv4Da','zM9YrwfJAa','CNvUt2jZzxj2zxjZ','BwvZC2fNzxm','y29TCgXLDgu','CMvZCg9UC2u','mtK2ntaYBejdz2zA','qwDLBNqUC2vUzcbYzxf1AxjLCYbHig1LC3nHz2uGD2HLBIbUBYbKzwzHDwX0ig1LC3nHz2uGAxmGy29UzMLNDxjLza','Bwv0CMLJCW','B2jZzxj2zxi'];_0x1f62=function(){return _0x2d735a;};return _0x1f62();}function withMessageId(_0x889bb6,_0x457b93){if(_0x889bb6['id']===_0x457b93)return _0x889bb6;return{..._0x889bb6,'id':_0x457b93};}function createAssistantChunkEvent(_0x5a3a34,_0x4af7fc){const _0x7a0468={_0x3027ef:0x4f6,_0x1865bb:0x290,_0x568b5b:0x527,_0x2e7ede:0x527,_0x1ba70b:0x4ee,_0x31e726:0x4ba,_0x46721f:0x2de,_0x460618:0x297,_0x595495:0x2bc,_0x2f46ec:0x4e8,_0xa7b006:0x501,_0xe77038:0x49a,_0x20c7bb:0x2e1,_0x49f22a:0x2fb,_0x171845:0x2ea},_0x575a7a={_0x3f6ec7:0xef,_0x301dce:0x172},_0x2e1064={_0xf822fd:0x1c3};if(_0x5a3a34[_0x4ce895(_0x7a0468._0x3027ef,0x4c7,0x4e6,0x532)]!==_0x1e38b1(_0x7a0468._0x1865bb,0x28a,0x30b,0x2d7))return void 0x0;if(_0x5a3a34[_0x4ce895(_0x7a0468._0x568b5b,_0x7a0468._0x2e7ede,_0x7a0468._0x1ba70b,_0x7a0468._0x31e726)]===void 0x0)return void 0x0;function _0x4ce895(_0x5c5844,_0x46d795,_0x284b5a,_0x6826ef){return _0x17dcb0(_0x46d795,_0x46d795-0xf4,_0x284b5a-_0x2e1064._0xf822fd,_0x284b5a-0x92);}function _0x1e38b1(_0x57cf84,_0x8c1b66,_0x5105ef,_0x45539c){return _0x17dcb0(_0x57cf84,_0x8c1b66-0x19,_0x5105ef-_0x575a7a._0x3f6ec7,_0x45539c- -_0x575a7a._0x301dce);}return{'type':_0x1e38b1(_0x7a0468._0x46721f,_0x7a0468._0x460618,_0x7a0468._0x595495,0x2aa),'index':_0x5a3a34[_0x4ce895(0x4f1,0x4ad,_0x7a0468._0x2f46ec,0x512)]??0x0,'messageId':_0x4af7fc,'chunk':{'type':'content_delta','index':_0x5a3a34[_0x4ce895(_0x7a0468._0xa7b006,0x4c8,_0x7a0468._0x2f46ec,_0x7a0468._0xe77038)]??0x0,'text':_0x5a3a34[_0x1e38b1(0x2cc,_0x7a0468._0x20c7bb,_0x7a0468._0x49f22a,_0x7a0468._0x171845)]}};}function createToolUseChunkEvent(_0x1cc4c4,_0x187898){const _0x5acd03={_0x4cba1e:0x183,_0xd73ea1:0x15a,_0x297bef:0x13b,_0x22c063:0x195,_0x4eb84c:0x151,_0x33d9cd:0x117,_0x43dd26:0x19a,_0x438c4b:0x156,_0x195d72:0x9e,_0x1fc362:0x8a,_0x470333:0x11d,_0x3633d4:0x176,_0x2faf0f:0x6b,_0x1cb708:0x8,_0x321790:0x87,_0x2e3313:0x61,_0x5869c2:0x30,_0x230b37:0x4d},_0x16f593={_0x3d9cb3:0x1e,_0x343b84:0x89},_0x96f74={_0x373dc6:0xd3,_0x4ac066:0x163};function _0x1f8c84(_0x580b38,_0x3b9119,_0x4a7c7c,_0x2bbb3f){return _0x3b1855(_0x3b9119,_0x3b9119-_0x96f74._0x373dc6,_0x4a7c7c-0x1b4,_0x2bbb3f- -_0x96f74._0x4ac066);}if(_0x1cc4c4[_0x1f8c84(-0x18a,-0x14c,-_0x5acd03._0x4cba1e,-0x157)]!==_0x1f8c84(-_0x5acd03._0xd73ea1,-_0x5acd03._0x297bef,-_0x5acd03._0x22c063,-_0x5acd03._0x4eb84c))return void 0x0;function _0x203ee1(_0x816304,_0x1a2c3c,_0x4b1e10,_0x26773d){return _0x3b1855(_0x4b1e10,_0x1a2c3c-_0x16f593._0x3d9cb3,_0x4b1e10-_0x16f593._0x343b84,_0x26773d-0x78);}return{'type':_0x1f8c84(-0x111,-_0x5acd03._0x33d9cd,-_0x5acd03._0x43dd26,-_0x5acd03._0x438c4b),'index':_0x1cc4c4['index']??0x0,'messageId':_0x187898,'chunk':{'type':_0x203ee1(0x8e,0x7c,_0x5acd03._0x195d72,_0x5acd03._0x1fc362),'id':_0x1cc4c4['id']??'','index':_0x1cc4c4[_0x1f8c84(-_0x5acd03._0x470333,-_0x5acd03._0x3633d4,-0x1a8,-0x155)]??0x0,..._0x1cc4c4[_0x203ee1(_0x5acd03._0x2faf0f,-_0x5acd03._0x1cb708,-0x6,0x30)]!==void 0x0?{'name':_0x1cc4c4[_0x203ee1(_0x5acd03._0x321790,0x7b,_0x5acd03._0x2e3313,_0x5acd03._0x5869c2)]}:{},..._0x1cc4c4[_0x203ee1(0x86,_0x5acd03._0x230b37,0x77,0x3e)]!==void 0x0?{'inputDelta':_0x1cc4c4[_0x203ee1(0x8d,0x5c,0x4e,0x3e)]}:{}}};}function createReasoningChunkEvent(_0x1bd4a6,_0x1d4b60){const _0x37b3cd={_0x55a7e2:0x153,_0x489386:0x14a,_0x5d9bd1:0x4a9,_0x1d5c67:0x4df,_0x365b73:0x101,_0x4dda63:0xf9,_0x13a097:0x105,_0x22483d:0x4c9,_0x986810:0x4ef,_0x56e635:0x4f0,_0xf1673e:0x4da,_0xbfdd3a:0x4a7,_0x517088:0x4ba,_0x1bdd8b:0x49f,_0x508202:0x4b0,_0x589212:0xf2,_0x742656:0x115,_0x3f54bf:0xea,_0x4e5b9f:0xc6,_0x23d4e6:0xa5,_0x4bb0f6:0x162,_0x571407:0x114,_0x486056:0x7c,_0x51e5a3:0xcf,_0x2e8956:0xa6,_0x2141b3:0xd4,_0x16e527:0xda,_0x9375af:0x118,_0x10c3cc:0x4b2,_0x54f641:0x478,_0xa43051:0x46c,_0x392c9e:0x47b,_0x5a586b:0x4a6,_0x1b4afe:0x462,_0x468fb6:0x49c,_0x3f6d08:0x45c},_0x1e2722={_0xeecb5d:0xcb},_0x44eef1={_0x2eecb6:0xde,_0x1386bf:0x158};function _0x5efa30(_0x273a3b,_0x55acd7,_0x130602,_0x3fea6a){return _0x3b1855(_0x130602,_0x55acd7-_0x44eef1._0x2eecb6,_0x130602-_0x44eef1._0x1386bf,_0x3fea6a-0x4bc);}function _0x500672(_0x9bae00,_0x17501e,_0x35be0b,_0x242400){return _0x3b1855(_0x35be0b,_0x17501e-_0x1e2722._0xeecb5d,_0x35be0b-0x16b,_0x9bae00-0x10d);}switch(_0x1bd4a6[_0x500672(0x119,_0x37b3cd._0x55a7e2,0x13c,_0x37b3cd._0x489386)]){case _0x5efa30(_0x37b3cd._0x5d9bd1,_0x37b3cd._0x1d5c67,0x4ed,0x4c4):return{'type':_0x500672(_0x37b3cd._0x365b73,_0x37b3cd._0x4dda63,0x121,_0x37b3cd._0x13a097),'index':_0x1bd4a6['index'],'messageId':_0x1d4b60,'chunk':{'type':_0x5efa30(_0x37b3cd._0x22483d,_0x37b3cd._0x986810,0x4db,0x4c4),'index':_0x1bd4a6[_0x5efa30(0x4f5,0x507,0x4e0,0x4ca)]??0x0,'thinking':_0x1bd4a6[_0x5efa30(_0x37b3cd._0x56e635,0x4a6,0x48d,_0x37b3cd._0xf1673e)]??''},'text':_0x1bd4a6[_0x5efa30(_0x37b3cd._0xbfdd3a,_0x37b3cd._0x517088,0x4d9,0x4da)]??''};case'openai_reasoning_delta':return{'type':_0x5efa30(0x476,_0x37b3cd._0x1bdd8b,0x482,_0x37b3cd._0x508202),'index':_0x1bd4a6['contentIndex'],'messageId':_0x1d4b60,'chunk':{'type':_0x500672(_0x37b3cd._0x589212,0xf8,_0x37b3cd._0x742656,0xfa),'contentIndex':_0x1bd4a6['contentIndex']??0x0,'delta':_0x1bd4a6['delta']??'','itemId':_0x1bd4a6[_0x500672(0xc9,_0x37b3cd._0x3f54bf,0xc7,_0x37b3cd._0x4e5b9f)]??'','outputIndex':_0x1bd4a6[_0x500672(0xb3,0x102,0xe0,_0x37b3cd._0x23d4e6)]??0x0},'text':_0x1bd4a6[_0x500672(0x11c,_0x37b3cd._0x4bb0f6,_0x37b3cd._0x571407,0xfc)]??''};case'openai_reasoning_summary_delta':return{'type':'reasoning_chunk','index':_0x1bd4a6[_0x500672(0xc7,_0x37b3cd._0x486056,_0x37b3cd._0x51e5a3,_0x37b3cd._0x2e8956)],'messageId':_0x1d4b60,'chunk':{'type':_0x500672(_0x37b3cd._0x2141b3,_0x37b3cd._0x16e527,_0x37b3cd._0x9375af,0xe1),'delta':_0x1bd4a6['delta']??'','itemId':_0x1bd4a6[_0x5efa30(0x4cc,0x454,_0x37b3cd._0x10c3cc,_0x37b3cd._0x54f641)]??'','outputIndex':_0x1bd4a6[_0x5efa30(_0x37b3cd._0xa43051,_0x37b3cd._0x392c9e,_0x37b3cd._0x5a586b,_0x37b3cd._0x1b4afe)]??0x0,'summaryIndex':_0x1bd4a6[_0x5efa30(_0x37b3cd._0x468fb6,_0x37b3cd._0x3f6d08,0x48c,0x476)]??0x0},'text':_0x1bd4a6['delta']??''};default:return void 0x0;}}function isAbortedToolResult(_0x1cf9b7){const _0xc29ff5={_0x3921f9:0x1d0,_0x5cf81a:0x221,_0x5013fb:0x57,_0x5dbd36:0x2f,_0x1d81d4:0x1d6},_0x44930c={_0x58c992:0x15,_0x547a48:0x256},_0x2e671e={_0x1073d4:0xce,_0x4808d9:0x14};function _0x2abd39(_0x320257,_0x58abe4,_0x99442,_0x1de626){return _0x17dcb0(_0x99442,_0x58abe4-_0x2e671e._0x1073d4,_0x99442-_0x2e671e._0x4808d9,_0x320257- -0x477);}function _0x1e1e48(_0x1f20e4,_0x1a85dc,_0x299443,_0x57f8ea){return _0x17dcb0(_0x57f8ea,_0x1a85dc-_0x44930c._0x58c992,_0x299443-0x126,_0x299443- -_0x44930c._0x547a48);}return _0x1cf9b7['status']===_0x1e1e48(0x1be,0x1b5,_0xc29ff5._0x3921f9,_0xc29ff5._0x5cf81a)&&_0x1cf9b7[_0x2abd39(0x5,_0xc29ff5._0x5013fb,0x43,_0xc29ff5._0x5dbd36)][_0x1e1e48(0x220,0x1be,0x1ed,_0xc29ff5._0x1d81d4)]===!![];}async function executeModelRequest(_0x45d531,_0x39fbe5,_0x7a5a27,_0x427ec8,_0x1b0840){const _0x2ccf24={_0x452ff0:0x4a0,_0x531c69:0x485,_0x2ebee3:0x29f,_0x3ed556:0x297,_0x4e26ce:0x41f,_0x10c19c:0x291,_0x4a5040:0x246,_0x537251:0x279,_0x179a8b:0x26b,_0x15b8a5:0x3fb,_0x811ad2:0x404,_0x501ad0:0x238,_0x16f4fd:0x232,_0x3ffc78:0x4c3,_0x549cf4:0x4be,_0x547ec1:0x485,_0x4efd4e:0x4bb,_0x5a8615:0x4ba,_0x586424:0x478,_0xd993d6:0x46a,_0x3ca829:0x446,_0x472f4c:0x43a,_0x29aeb3:0x273,_0x5ae0b5:0x22b,_0x55ea90:0x20a,_0xbb8b08:0x446,_0x3f034f:0x3f5,_0x2448c5:0x421,_0x1b4104:0x44b,_0x1f2989:0x277,_0x5bd64c:0x284,_0x822da4:0x2ad,_0x222a6a:0x45c,_0xf170b3:0x42b,_0x3d645c:0x277,_0x3ae685:0x297,_0x3d253a:0x25b,_0xd9137f:0x415,_0x4d67dd:0x443,_0x5b36e6:0x413,_0x3f1b30:0x444},_0x1f9d2d={_0x47bee1:0x4c};throwIfAborted(_0x39fbe5[_0x1c79da(0x46d,_0x2ccf24._0x452ff0,_0x2ccf24._0x531c69,0x4d8)]);if(!_0x39fbe5['streaming']||!_0x7a5a27[_0x34cbe3(-0x251,-_0x2ccf24._0x2ebee3,-_0x2ccf24._0x3ed556,-0x2e4)][_0x34cbe3(-0x2da,-0x28b,-_0x2ccf24._0x2ebee3,-0x26f)])return await _0x7a5a27[_0x1c79da(_0x2ccf24._0x4e26ce,0x3c9,0x41e,0x3f6)][_0x34cbe3(-_0x2ccf24._0x10c19c,-_0x2ccf24._0x4a5040,-0x212,-_0x2ccf24._0x537251)](_0x45d531,{'signal':_0x39fbe5[_0x34cbe3(-0x259,-0x238,-0x209,-0x24e)]});function _0x1c79da(_0x87981,_0x2fcd5b,_0x3647d0,_0x433e21){return _0x3b1855(_0x87981,_0x2fcd5b-_0x1f9d2d._0x47bee1,_0x3647d0-0xb,_0x3647d0-0x45f);}function _0x34cbe3(_0x4fb87a,_0x129d73,_0x308ff6,_0x2b9fda){return _0x17dcb0(_0x308ff6,_0x129d73-0x1ba,_0x308ff6-0x76,_0x129d73- -0x6a6);}let _0x2b541d;for await(const _0xa4eda3 of _0x7a5a27[_0x34cbe3(-0x2e6,-0x29f,-_0x2ccf24._0x179a8b,-0x2b8)][_0x1c79da(_0x2ccf24._0x15b8a5,0x424,0x432,_0x2ccf24._0x811ad2)](_0x45d531,{'signal':_0x39fbe5[_0x34cbe3(-0x251,-_0x2ccf24._0x501ad0,-0x289,-_0x2ccf24._0x16f4fd)]})){throwIfAborted(_0x39fbe5[_0x1c79da(_0x2ccf24._0x3ffc78,_0x2ccf24._0x549cf4,_0x2ccf24._0x547ec1,_0x2ccf24._0x4efd4e)]);if(_0xa4eda3['type']===_0x1c79da(0x449,0x43f,0x486,0x436)){_0x2b541d=_0xa4eda3[_0x1c79da(_0x2ccf24._0x5a8615,0x4ba,_0x2ccf24._0x586424,0x4a9)];continue;}if(_0xa4eda3['type']==='provider_retry'){await emitEvent2(_0x7a5a27[_0x1c79da(0x435,_0x2ccf24._0xd993d6,_0x2ccf24._0x3ca829,_0x2ccf24._0x472f4c)],_0xa4eda3,_0x427ec8);continue;}const _0x52df2e=createReasoningChunkEvent(_0xa4eda3,_0x1b0840['reasoningMessageId']);if(_0x52df2e&&_0x52df2e[_0x1c79da(0x45f,0x4b5,0x46b,0x41f)]===_0x1c79da(_0x2ccf24._0x586424,0x4a7,0x453,0x487)&&_0x52df2e[_0x34cbe3(-0x27e,-0x24a,-0x213,-_0x2ccf24._0x29aeb3)][_0x34cbe3(-0x204,-0x23e,-_0x2ccf24._0x5ae0b5,-_0x2ccf24._0x55ea90)]>0x0){await emitEvent2(_0x7a5a27[_0x1c79da(0x411,0x44f,_0x2ccf24._0xbb8b08,_0x2ccf24._0x3f034f)],_0x52df2e,_0x427ec8);continue;}const _0x58e980=createAssistantChunkEvent(_0xa4eda3,_0x1b0840[_0x1c79da(0x446,_0x2ccf24._0x2448c5,0x46f,_0x2ccf24._0x1b4104)]);if(_0x58e980){await emitEvent2(_0x7a5a27[_0x34cbe3(-0x25b,-_0x2ccf24._0x1f2989,-_0x2ccf24._0x5bd64c,-_0x2ccf24._0x822da4)],_0x58e980,_0x427ec8);continue;}const _0x211f64=createToolUseChunkEvent(_0xa4eda3,_0x1b0840[_0x1c79da(_0x2ccf24._0x222a6a,_0x2ccf24._0xf170b3,0x46f,0x471)]);_0x211f64&&await emitEvent2(_0x7a5a27[_0x34cbe3(-0x258,-_0x2ccf24._0x3d645c,-_0x2ccf24._0x3ae685,-_0x2ccf24._0x3d253a)],_0x211f64,_0x427ec8);}if(!_0x2b541d)throw new Error(_0x1c79da(_0x2ccf24._0xd9137f,_0x2ccf24._0x4d67dd,_0x2ccf24._0x5b36e6,_0x2ccf24._0x3f1b30));return _0x2b541d;}function makeTurnGuards(_0x104846,_0x42b4b6,_0x5b85f6,_0x39e125,_0x24f0b8){return{async 'stage'(_0x4e5489,_0x2b1d47){return throwIfAborted(_0x104846),await runStage(_0x42b4b6,_0x4e5489,_0x2b1d47,_0x39e125);},async 'emit'(_0x48095f){throwIfAborted(_0x104846),await emitEvent2(_0x5b85f6,_0x48095f,_0x24f0b8);},async 'stageUnchecked'(_0x68a31e,_0x3311ca){return await runStage(_0x42b4b6,_0x68a31e,_0x3311ca,_0x39e125);},async 'emitUnchecked'(_0x39420b){await emitEvent2(_0x5b85f6,_0x39420b,_0x24f0b8);}};}async function runTurn(_0x2ca2b5,_0x274858){const _0x500ee0={_0xea27c5:0xa0,_0x378d9a:0x22,_0x113571:0x63,_0x122874:0xd,_0x485be5:0x62,_0x52118f:0x91,_0x253e51:0x30,_0x403658:0x6e,_0x2081ea:0x105,_0x2e563c:0xdd,_0x1b09c6:0xd9,_0x1d7c3c:0x32,_0x2d8142:0xdb,_0x48dafe:0x39,_0x1c2c81:0x65,_0x45c03a:0x6f,_0x1f2ecc:0x8e,_0x3a7fbc:0x6b,_0x349522:0x42,_0x47be0f:0x5,_0x511fc5:0x76,_0x51fd74:0x87,_0x5b4347:0x11,_0x468a10:0x74,_0x1bbe6b:0x67,_0x1db5b4:0x2c,_0x58ad47:0x2d,_0x5155d0:0x33,_0x974803:0x29,_0x588d44:0x19,_0x1d4449:0x6e,_0x24f14a:0x59,_0x4cc7e0:0x18,_0x32fc:0xc,_0x1e0f76:0x10a,_0x10a464:0x19,_0x29639c:0x66,_0x42cb5d:0x86,_0x3a456e:0xc9,_0x543d67:0x1b,_0x2402c1:0x14,_0x186a1d:0x6e,_0x2f8cab:0x8f,_0x89b68f:0x4f,_0x356d41:0x50,_0x450eba:0x27,_0x195bf8:0x3b,_0x3671a7:0x8c,_0x313cf7:0x40,_0x36b706:0x4e,_0x1eb0d7:0x74,_0x32959:0x26,_0x4148f8:0x60,_0x3b45d9:0x78,_0x2d038d:0x93,_0x73cb5f:0x5d,_0x24e85b:0x73,_0xcb9d08:0xe,_0x548961:0x4d,_0x26004b:0x80,_0x328aed:0x39,_0x5f582a:0x7f,_0x3c1161:0x53,_0x1714a5:0x70,_0x832be5:0x4,_0x4e070a:0x52,_0x38596b:0x6e,_0x4915f0:0x85,_0x5458be:0x64,_0x5b9fd1:0x1d,_0x264d57:0x1,_0x1e98da:0x3d,_0x57c027:0x25,_0x23daac:0xc4,_0x2cf98f:0x2a,_0x415fbf:0x96,_0x47b109:0x12,_0x57dd28:0x77,_0x23a384:0x34,_0xa96497:0xc,_0x32f638:0x94,_0x1eea0e:0x32,_0x13d609:0x83,_0x55c4d6:0x37,_0x1383b8:0x22,_0x4b268f:0x37,_0x584ac8:0x16,_0x30470a:0xf},_0x46990c={_0x5dd613:0x11e,_0x4586d7:0xd6},_0x58b78f={_0x302ca0:0x135,_0x5da93e:0x0,_0x184f43:0x3c},_0x5727ee={_0x1122dd:0x1a5,_0x239ed8:0x157,_0x502d78:0x19d,_0x2be844:0x15,_0x14ee37:0x5,_0x14bb3c:0x41,_0x409bf:0x64,_0x5c36cc:0x24,_0x2d9b93:0x23},_0x5c09ff={_0x34b7e1:0x3d,_0x5c43c9:0x1bf,_0x470f4d:0x51},_0x50e065=_0x2ca2b5[_0x191b6a(-_0x500ee0._0xea27c5,-0x43,0x6,-0x4a)]??new AbortController()[_0x191b6a(-_0x500ee0._0x378d9a,-0x26,-_0x500ee0._0x113571,-0x4a)],_0x5a2e34={'sessionId':_0x2ca2b5[_0x36f0e2(-0xf,-0x42,-0x13,-0x10)],'turnId':_0x2ca2b5[_0x36f0e2(0x36,_0x500ee0._0x122874,0x1d,_0x500ee0._0x485be5)],'system':normalizeSystem(_0x2ca2b5['system']),'messages':(_0x2ca2b5[_0x36f0e2(0x53,_0x500ee0._0x52118f,0x44,0x93)]??[])[_0x191b6a(-0x7d,-_0x500ee0._0x253e51,-0xc0,-_0x500ee0._0x403658)](normalizeMessage),'lastResponse':void 0x0,'toolResults':[],'finalMessage':void 0x0,'sessionDir':typeof _0x274858[_0x191b6a(-0x92,-_0x500ee0._0x2081ea,-_0x500ee0._0x2e563c,-_0x500ee0._0x1b09c6)]===_0x36f0e2(0x46,0x2c,0x46,_0x500ee0._0x1d7c3c)?_0x274858['sessionDir']():_0x274858[_0x191b6a(-0xe9,-_0x500ee0._0x2d8142,-0xa8,-0xd9)]},_0x2e3b4c=makeExtensionContext(_0x5a2e34),_0x4447db={'sessionId':_0x5a2e34['sessionId'],'turnId':_0x5a2e34['turnId'],'state':_0x5a2e34,'signal':_0x50e065,..._0x274858[_0x36f0e2(_0x500ee0._0x48dafe,0x4c,0x70,_0x500ee0._0x1c2c81)]?{'askUser':_0x274858['askUser']}:{}},{stage:_0x1c642f,emit:_0x5c41da,stageUnchecked:_0x41f04e,emitUnchecked:_0x5b3078}=makeTurnGuards(_0x50e065,_0x274858[_0x191b6a(-0xdc,-_0x500ee0._0x45c03a,-0x95,-_0x500ee0._0x1f2ecc)],_0x274858['onEvent'],_0x2e3b4c,_0x4447db),_0x1054f2=async _0x22f9cc=>{const _0x8830a4={_0x533f50:0x1a6,_0x5bdf0b:0x1c6};function _0x530b08(_0x512d6a,_0x30024e,_0x367d62,_0x38a96a){return _0x36f0e2(_0x512d6a- -_0x5c09ff._0x34b7e1,_0x30024e-_0x5c09ff._0x5c43c9,_0x30024e,_0x38a96a-_0x5c09ff._0x470f4d);}function _0x1308f0(_0x433170,_0x3ee54b,_0x4bc59a,_0x1ce4a7){return _0x36f0e2(_0x3ee54b- -0x175,_0x3ee54b-_0x8830a4._0x533f50,_0x433170,_0x1ce4a7-_0x8830a4._0x5bdf0b);}await _0x274858[_0x1308f0(-_0x5727ee._0x1122dd,-_0x5727ee._0x239ed8,-0x12b,-_0x5727ee._0x502d78)][_0x530b08(_0x5727ee._0x2be844,0x32,-_0x5727ee._0x14ee37,_0x5727ee._0x14bb3c)](_0x530b08(-_0x5727ee._0x409bf,-0x8d,-_0x5727ee._0x5c36cc,-_0x5727ee._0x2d9b93),structuredClone(_0x22f9cc),_0x2e3b4c);};function _0x36f0e2(_0x148d0e,_0x85b70e,_0x4efb23,_0x327181){return _0x3b1855(_0x4efb23,_0x85b70e-_0x58b78f._0x302ca0,_0x4efb23-_0x58b78f._0x5da93e,_0x148d0e-_0x58b78f._0x184f43);}let _0x4c3a54=0x0;function _0x191b6a(_0x3891f8,_0x230bef,_0x4abac8,_0x38c6f1){return _0x17dcb0(_0x230bef,_0x230bef-_0x46990c._0x5dd613,_0x4abac8-_0x46990c._0x4586d7,_0x38c6f1- -0x4b8);}try{const _0x4592d2=await _0x1c642f(_0x191b6a(-0x66,-0x3f,-_0x500ee0._0x3a7fbc,-_0x500ee0._0x349522),normalizeMessage(_0x2ca2b5['message']));_0x5a2e34[_0x36f0e2(0x53,_0x500ee0._0x47be0f,0x51,0x5)][_0x191b6a(-_0x500ee0._0x511fc5,-_0x500ee0._0x1d7c3c,-_0x500ee0._0x51fd74,-0x34)](_0x4592d2),await _0x1054f2(_0x4592d2),await _0x5c41da({'type':_0x36f0e2(0x3a,-_0x500ee0._0x5b4347,_0x500ee0._0x468a10,_0x500ee0._0x1bbe6b),'message':_0x4592d2});while(!![]){throwIfAborted(_0x50e065),_0x4c3a54+=0x1;const _0x40f156=createAssistantMessageId(_0x5a2e34[_0x36f0e2(0x36,0x5e,_0x500ee0._0x1db5b4,-0x18)],_0x4c3a54),_0x399642=createReasoningMessageId(_0x40f156);let _0x3bbc25={'model':_0x274858[_0x36f0e2(-0x5,_0x500ee0._0x58ad47,-0x3a,-0x3a)][_0x36f0e2(0x3b,_0x500ee0._0x5155d0,_0x500ee0._0x974803,_0x500ee0._0x588d44)],'maxTokens':_0x274858[_0x36f0e2(-0x5,_0x500ee0._0x48dafe,-0x10,0x4b)][_0x191b6a(-0x129,-0xa8,-0x95,-0xd4)]??0x4000,'system':structuredClone(_0x5a2e34[_0x36f0e2(0x60,0x93,_0x500ee0._0x1d4449,0x68)]),'messages':structuredClone(_0x5a2e34[_0x191b6a(-0x5b,-0x5,-0xa6,-_0x500ee0._0x24f14a)]),'tools':_0x274858['toolRuntime'][_0x36f0e2(-_0x500ee0._0x4cc7e0,-_0x500ee0._0x32fc,-_0x500ee0._0x122874,-0x2e)](),'metadata':{'sessionId':_0x5a2e34[_0x191b6a(-0x7e,-0xb3,-_0x500ee0._0x1e0f76,-0xbb)],'turnId':_0x5a2e34['turnId']}};_0x3bbc25=await _0x1c642f('beforeModelRequest',_0x3bbc25),await _0x5c41da({'type':_0x36f0e2(-_0x500ee0._0x10a464,-_0x500ee0._0x29639c,-0x31,-0x5e),'request':_0x3bbc25});let _0x236ea6=await executeModelRequest(_0x3bbc25,_0x2ca2b5,_0x274858,_0x4447db,{'assistantMessageId':_0x40f156,'reasoningMessageId':_0x399642});_0x236ea6=await _0x1c642f(_0x191b6a(-0x11a,-0x11d,-_0x500ee0._0x42cb5d,-_0x500ee0._0x3a456e),_0x236ea6),await _0x5c41da({'type':'model_response','response':_0x236ea6}),_0x5a2e34['lastResponse']=_0x236ea6;let _0xfda5fb=await _0x1c642f(_0x36f0e2(0x31,0x4b,_0x500ee0._0x543d67,_0x500ee0._0x2402c1),withMessageId(responseToAssistantMessage(_0x236ea6),_0x40f156));_0xfda5fb=withMessageId(_0xfda5fb,_0x40f156);const _0x7249f8=getToolUseBlocks(_0xfda5fb),_0x487891=await Promise[_0x191b6a(-0xd7,-0xe7,-0x118,-0xd7)](_0x7249f8[_0x191b6a(-0x7d,-_0x500ee0._0x485be5,-0xb3,-_0x500ee0._0x186a1d)](_0x1c3464=>_0x1c642f(_0x36f0e2(0x67,0x3f,0x9d,0xa4),_0x1c3464)));_0x487891[_0x191b6a(-_0x500ee0._0x2f8cab,-0x19,-_0x500ee0._0x89b68f,-_0x500ee0._0x356d41)]>0x0&&(_0xfda5fb=replaceToolUseBlocks(_0xfda5fb,_0x487891));const _0x303720=withMessageId(_0xfda5fb,_0x40f156);_0xfda5fb=_0x303720;const _0x5eaa29=createReasoningMessage(_0xfda5fb),_0x9ad44d=createAssistantTextMessage(_0xfda5fb),_0x353372=createToolUseMessage(_0xfda5fb);_0x5eaa29&&await _0x5c41da({'type':_0x191b6a(-_0x500ee0._0x450eba,-_0x500ee0._0x195bf8,-_0x500ee0._0x3671a7,-_0x500ee0._0x313cf7),'message':withMessageId(_0x5eaa29,_0x399642)});_0x9ad44d&&await _0x5c41da({'type':_0x191b6a(-0x24,-0x68,-_0x500ee0._0x36b706,-_0x500ee0._0x1eb0d7),'message':withMessageId(_0x9ad44d,_0x40f156)});_0x353372&&await _0x5c41da({'type':_0x36f0e2(_0x500ee0._0x32959,0x1,_0x500ee0._0x4148f8,0x1f),'message':withMessageId(_0x353372,_0x40f156)});_0x5a2e34['messages'][_0x36f0e2(_0x500ee0._0x3b45d9,_0x500ee0._0x2d038d,0x48,0x7c)](_0x303720);_0x487891[_0x191b6a(-_0x500ee0._0x73cb5f,-_0x500ee0._0x24e85b,-_0x500ee0._0xcb9d08,-_0x500ee0._0x356d41)]>0x0&&await _0x1054f2(_0x303720);for(const _0x427755 of _0x487891){await _0x5c41da({'type':_0x36f0e2(_0x500ee0._0x548961,_0x500ee0._0x26004b,0x8,0x7f),'toolCall':_0x427755});}if(_0x487891[_0x36f0e2(0x5c,0x16,_0x500ee0._0x328aed,0x4b)]===0x0){const _0x306eef=await _0x1c642f(_0x191b6a(-0x6d,-_0x500ee0._0x5f582a,-_0x500ee0._0x3c1161,-0x3b),_0xfda5fb),_0x1ef797=withMessageId(_0x306eef,_0x40f156);return _0x5a2e34['finalMessage']=_0x1ef797,_0x5a2e34['messages'][_0x5a2e34[_0x36f0e2(0x53,_0x500ee0._0x1714a5,0x62,0x56)]['length']-0x1]=_0x1ef797,await _0x1054f2(_0x1ef797),await _0x5c41da({'type':_0x36f0e2(_0x500ee0._0x832be5,0x20,0x39,_0x500ee0._0x4e070a),'message':_0x1ef797}),throwIfAborted(_0x50e065),await _0x274858[_0x191b6a(-_0x500ee0._0x38596b,-0x8c,-0x3e,-_0x500ee0._0x1f2ecc)][_0x191b6a(-0x2e,-_0x500ee0._0x4915f0,-0x43,-0x5a)](_0x36f0e2(_0x500ee0._0x5458be,_0x500ee0._0x5b9fd1,0x17,0x90),_0x5a2e34,_0x2e3b4c),await _0x5c41da({'type':_0x36f0e2(0xd,-_0x500ee0._0x264d57,_0x500ee0._0x1e98da,_0x500ee0._0x57c027),'state':_0x5a2e34}),{'status':_0x191b6a(-0x6e,-_0x500ee0._0x2f8cab,-0x7a,-0x78),'finalMessage':_0x1ef797,'state':_0x5a2e34};}let _0x59d3ff=await _0x274858[_0x36f0e2(0x7b,0x59,_0x500ee0._0x23daac,0x3e)][_0x36f0e2(0x16,0x2f,_0x500ee0._0x832be5,_0x500ee0._0x2cf98f)](_0x487891,_0x4447db);const _0x1250bd=_0x59d3ff[_0x36f0e2(_0x500ee0._0x186a1d,0x40,_0x500ee0._0x415fbf,0x4c)](isAbortedToolResult),_0x2c5511=_0x1250bd?_0x41f04e:_0x1c642f,_0x4f59=_0x1250bd?_0x5b3078:_0x5c41da;_0x59d3ff=await Promise[_0x36f0e2(-0x2b,0xe,-0x16,-_0x500ee0._0x47b109)](_0x59d3ff[_0x191b6a(-0xb9,-0x6e,-_0x500ee0._0x42cb5d,-0x6e)](_0x2745db=>_0x2c5511('afterToolResult',_0x2745db))),_0x5a2e34['toolResults'][_0x191b6a(-0x2a,-0x7,-_0x500ee0._0x57dd28,-_0x500ee0._0x23a384)](..._0x59d3ff);for(const _0x43b418 of _0x59d3ff){await _0x4f59({'type':_0x36f0e2(_0x500ee0._0xa96497,0x2,0x3d,-_0x500ee0._0x48dafe),'result':_0x43b418});}const _0x32e198=await _0x2c5511(_0x191b6a(-_0x500ee0._0x32f638,-0x1a,-_0x500ee0._0x47b109,-0x5d),createToolResultUserMessage(_0x59d3ff));await _0x4f59({'type':'tool_result_message','message':_0x32e198}),_0x5a2e34[_0x191b6a(-0x32,-0x90,-_0x500ee0._0x1eea0e,-0x59)][_0x36f0e2(_0x500ee0._0x3b45d9,0x6c,_0x500ee0._0x13d609,0x64)](_0x32e198),await _0x1054f2(_0x32e198);if(_0x1250bd)return{'status':_0x36f0e2(0x37,-_0x500ee0._0x32fc,-0x7,0x53),'state':_0x5a2e34};}}catch(_0x40406a){if(!_0x50e065[_0x36f0e2(_0x500ee0._0x55c4d6,0x1b,_0x500ee0._0x1383b8,0x8c)])throw new TurnFailedError(_0x40406a,_0x5a2e34);return{'status':_0x36f0e2(_0x500ee0._0x4b268f,_0x500ee0._0x584ac8,_0x500ee0._0x3671a7,_0x500ee0._0x30470a),'state':_0x5a2e34};}}function createSessionId(){const _0x27cd4f={_0x4d7104:0x28,_0x3b1bc0:0x28,_0x4f8137:0x6c,_0x535dd2:0x29,_0x59fb67:0x21,_0x318ce1:0x14,_0x310a6f:0xf,_0x246304:0xc},_0x5d1dce={_0x4b0aee:0x17a,_0x2e6cd2:0x45e},_0x29ee21={_0x421ca4:0xee,_0x4cc0b7:0x76,_0x101843:0x1c};function _0x4b010f(_0xcae192,_0x20268d,_0x4d6837,_0x59f8fb){return _0x17dcb0(_0xcae192,_0x20268d-_0x29ee21._0x421ca4,_0x4d6837-_0x29ee21._0x4cc0b7,_0x4d6837- -_0x29ee21._0x101843);}function _0x526abe(_0x5beea5,_0x28b0a2,_0x21691b,_0x4084a1){return _0x17dcb0(_0x5beea5,_0x28b0a2-_0x5d1dce._0x4b0aee,_0x21691b-0xab,_0x28b0a2- -_0x5d1dce._0x2e6cd2);}return _0x526abe(0x8,_0x27cd4f._0x4d7104,0x2,0x57)+Date[_0x526abe(-_0x27cd4f._0x3b1bc0,-_0x27cd4f._0x4f8137,-_0x27cd4f._0x535dd2,-0x22)]()+'-'+Math[_0x526abe(_0x27cd4f._0x59fb67,_0x27cd4f._0x318ce1,0x12,_0x27cd4f._0x310a6f)]()['toString'](0x10)[_0x526abe(_0x27cd4f._0x246304,-0x16,0x3d,0x2d)](0x2,0xa);}function createTurnId(_0x14eef0){const _0x5c363a={_0x251f97:0x20};function _0x485809(_0x3d4220,_0x4c4020,_0x2fb43e,_0x4a0467){return _0x17dcb0(_0x3d4220,_0x4c4020-0x6f,_0x2fb43e-0x10,_0x4c4020- -0x46a);}return _0x485809(-0x58,-0x57,-_0x5c363a._0x251f97,-0x80)+_0x14eef0;}function createDefaultMessage(_0x51d3e9){if(_0x51d3e9===void 0x0)return void 0x0;return normalizeUserInput(_0x51d3e9);}function normalizeUserInput(_0x830f73){const _0x47bead={_0x14dd92:0x49f,_0x40522d:0x484,_0x223424:0xf3,_0x4a1a09:0xb9,_0x3cdcea:0x141},_0x11167c={_0x2520a9:0x1dc},_0x1bb769={_0x57d6b3:0x1da,_0x43d46e:0x175};if(typeof _0x830f73===_0x540ee7(0x483,_0x47bead._0x14dd92,_0x47bead._0x40522d,0x4a1))return{'role':_0x4165af(0x88,_0x47bead._0x223424,_0x47bead._0x4a1a09,0x7d),'content':[{'type':_0x4165af(_0x47bead._0x3cdcea,0xf1,0x12b,0xdd),'text':_0x830f73}]};function _0x540ee7(_0x4a08da,_0x91232d,_0xbdb38e,_0x405ff9){return _0x3b1855(_0x91232d,_0x91232d-_0x1bb769._0x57d6b3,_0xbdb38e-_0x1bb769._0x43d46e,_0x4a08da-0x4c8);}function _0x4165af(_0x1bd5b0,_0x548ef5,_0xdfd706,_0xfa1d94){return _0x17dcb0(_0xfa1d94,_0x548ef5-0x183,_0xdfd706-_0x11167c._0x2520a9,_0xdfd706- -0x331);}return normalizeMessage(_0x830f73);}function resolveChatModel(_0x4c2f9b){const _0x4bbcf2={_0x1f4596:0xbe,_0x455728:0x87},_0x2f9727={_0x3e7e00:0x178,_0x39b3af:0xa4};function _0x37c8bf(_0x55ce3a,_0x1ffec9,_0x33d777,_0x4d8c84){return _0x3b1855(_0x33d777,_0x1ffec9-_0x2f9727._0x3e7e00,_0x33d777-_0x2f9727._0x39b3af,_0x55ce3a- -0x36);}if(!_0x4c2f9b['chatModel'])throw new Error('Agent\x20requires\x20a\x20chatModel');return _0x4c2f9b[_0x37c8bf(-0x77,-0x72,-_0x4bbcf2._0x1f4596,-_0x4bbcf2._0x455728)];}function createRegistry(_0x3bc4f3){const _0x5d1edf={_0x1ff951:0x8e,_0x367365:0x4d},_0xeb8f06={_0x1b7eb6:0x55b},_0x1d6760={_0x44933e:0x374};if(_0x3bc4f3['registry'])return _0x3bc4f3['registry'];const _0x47b16e=createExtensionRegistry(),_0x54bafe=_0x3bc4f3[_0x11b6e1(0xa0,_0x5d1edf._0x1ff951,0xd1,0xc2)]??[];function _0x11b6e1(_0x145039,_0x54e571,_0x4d3287,_0x13684a){return _0x17dcb0(_0x4d3287,_0x54e571-0x1b5,_0x4d3287-0x124,_0x13684a- -_0x1d6760._0x44933e);}for(const _0x4ce133 of _0x54bafe){_0x47b16e[_0x11b6e1(0xa4,_0x5d1edf._0x367365,0xa0,0x69)](_0x4ce133);}function _0x8c50a0(_0x21d89e,_0x371ae4,_0x36bfa6,_0xc071ff){return _0x17dcb0(_0x371ae4,_0x371ae4-0xd,_0x36bfa6-0x45,_0x36bfa6- -_0xeb8f06._0x1b7eb6);}return _0x47b16e;}var Agent=class{[_0x17dcb0(0x43f,0x456,0x403,0x41a)];[_0x3b1855(0x6,-0x30,-0x1,0x1f)];[_0x17dcb0(0x41d,0x495,0x43a,0x464)];[_0x17dcb0(0x454,0x3f8,0x450,0x3fd)];['messages'];[_0x17dcb0(0x4a3,0x489,0x433,0x474)];[_0x17dcb0(0x47c,0x44c,0x44f,0x479)];constructor(_0x2a4c3d={}){const _0x5ef755={_0x3160ee:0x225,_0x4072a9:0x1f1,_0x523a68:0x1fd,_0x1168db:0x4d6,_0x137863:0x521,_0xd36203:0x4d9,_0x2cc90b:0x4c5,_0x34670d:0x4a3,_0x154a1a:0x4f5,_0xc4f9c2:0x540,_0x216545:0x507,_0x501b17:0x52e,_0x1330d4:0x25c,_0x109f89:0x233,_0x113895:0x4d7,_0x35abb4:0x480,_0x2eb82d:0x217,_0x1c3ebf:0x1f0,_0x30e3e5:0x216,_0x902ce9:0x24a,_0x494c8c:0x240,_0x3ec8a4:0x223,_0x2cb5c8:0x244},_0x3afc0a={_0x5bd8d4:0xa8},_0x2cb0b6={_0x4c96e2:0x1e2,_0x5841da:0x1e3,_0x40c375:0x18b,_0x2810b7:0x1c0,_0x6c7db5:0x372,_0x5e57ae:0x360},_0x5b1323={_0x3ab57d:0x11c},_0x4d6196={_0x43d987:0xd9,_0x272e16:0x20c};this[_0xad3ce9(0x1c4,0x246,_0x5ef755._0x3160ee,_0x5ef755._0x4072a9)]=_0x2a4c3d[_0xad3ce9(0x19e,0x1f9,_0x5ef755._0x523a68,_0x5ef755._0x4072a9)]??createSessionId();function _0xad3ce9(_0x5a8434,_0x4380f0,_0x4deaba,_0x1bafa7){return _0x17dcb0(_0x4380f0,_0x4380f0-_0x4d6196._0x43d987,_0x4deaba-0xf8,_0x1bafa7- -_0x4d6196._0x272e16);}this[_0x2d05d1(0x4db,_0x5ef755._0x1168db,_0x5ef755._0x137863,_0x5ef755._0xd36203)]=0x0,this['_systemPrompt']=_0x2a4c3d[_0x2d05d1(0x48a,_0x5ef755._0x2cc90b,_0x5ef755._0x34670d,_0x5ef755._0x154a1a)]??'',this['messages']=(_0x2a4c3d[_0x2d05d1(_0x5ef755._0xc4f9c2,0x524,_0x5ef755._0x216545,_0x5ef755._0x501b17)]??[])['map'](normalizeMessage),this['defaultMessage']=createDefaultMessage(_0x2a4c3d[_0xad3ce9(_0x5ef755._0x1330d4,0x220,_0x5ef755._0x109f89,0x26f)]),this[_0xad3ce9(0x267,0x26c,0x239,0x258)]=createAgentMetrics({'getContextWindowLimit':_0x2a4c3d['getContextWindowLimit']});const _0x28247a=_0x2a4c3d[_0x2d05d1(0x500,0x4ea,_0x5ef755._0x113895,_0x5ef755._0x35abb4)],_0x572d19=async(_0x46700a,_0x2d1979)=>{const _0x327739={_0x222979:0x101,_0x4597fd:0x103};function _0x11c605(_0x58d6bc,_0x1fb3c5,_0x34a445,_0x847bd6){return _0xad3ce9(_0x58d6bc-0x18e,_0x34a445,_0x34a445-0xd5,_0x847bd6-_0x5b1323._0x3ab57d);}function _0x20e791(_0x4df62f,_0x15d349,_0x2f46f6,_0x2750f7){return _0xad3ce9(_0x4df62f-_0x327739._0x222979,_0x2f46f6,_0x2f46f6-_0x327739._0x4597fd,_0x2750f7- -0x98);}this[_0x20e791(_0x2cb0b6._0x4c96e2,_0x2cb0b6._0x5841da,_0x2cb0b6._0x40c375,_0x2cb0b6._0x2810b7)][_0x11c605(_0x2cb0b6._0x6c7db5,0x34c,_0x2cb0b6._0x5e57ae,0x330)](_0x46700a),await _0x28247a?.(_0x46700a,_0x2d1979);};function _0x2d05d1(_0x343087,_0x5a068e,_0xef75b9,_0x4126fd){return _0x17dcb0(_0x5a068e,_0x5a068e-0x1ae,_0xef75b9-0x137,_0xef75b9-_0x3afc0a._0x5bd8d4);}const _0x101fc2=createInternalToolRuntime(_0x2a4c3d[_0xad3ce9(_0x5ef755._0x2eb82d,0x24f,_0x5ef755._0x1c3ebf,0x217)]??[],{'onEvent':_0x572d19,'onToolCall':_0x2a4c3d[_0xad3ce9(_0x5ef755._0x30e3e5,_0x5ef755._0x902ce9,0x1eb,_0x5ef755._0x494c8c)]});this['deps']={'registry':createRegistry(_0x2a4c3d),'chatModel':resolveChatModel(_0x2a4c3d),'toolRuntime':_0x101fc2,'askUser':_0x2a4c3d[_0xad3ce9(_0x5ef755._0x3ec8a4,0x23f,_0x5ef755._0x2cb5c8,0x239)],'onEvent':_0x572d19,'sessionDir':_0x2a4c3d['sessionDir']};}get['systemPrompt'](){return this['_systemPrompt'];}[_0x17dcb0(0x45c,0x4d2,0x4a9,0x47e)](_0x10a642=[]){const _0x58bd9f={_0x5366ff:0x24f,_0x53e61b:0x1fe,_0x4f705d:0x258,_0x5d5124:0x26e,_0x518d91:0x213},_0x58e2f5={_0x39a618:0xcd},_0x756383={_0xe0f1b4:0x108,_0x2b4a4c:0x118,_0x3e5422:0x495};function _0x542fc9(_0x3a4c7c,_0x1aba60,_0x409e26,_0x53d3fd){return _0x3b1855(_0x3a4c7c,_0x1aba60-_0x756383._0xe0f1b4,_0x409e26-_0x756383._0x2b4a4c,_0x1aba60-_0x756383._0x3e5422);}function _0x5aed99(_0x4aa995,_0x46f5b1,_0x5dff54,_0x371034){return _0x3b1855(_0x5dff54,_0x46f5b1-0x13,_0x5dff54-_0x58e2f5._0x39a618,_0x4aa995- -0x28e);}this['deps'][_0x5aed99(-_0x58bd9f._0x5366ff,-0x21a,-_0x58bd9f._0x53e61b,-0x20b)][_0x5aed99(-_0x58bd9f._0x4f705d,-0x23e,-_0x58bd9f._0x5d5124,-_0x58bd9f._0x518d91)](_0x10a642);}[_0x17dcb0(0x42f,0x3f6,0x47a,0x439)](_0x10ca91,_0x396122={}){const _0x32981f={_0x2a3a1a:0x2e8,_0x243e69:0x25a,_0x324e3a:0x2bd,_0x1b9bb4:0x2d4,_0x1b7945:0x2c3,_0x47f42a:0x174,_0x1b4292:0x169,_0x5c4e53:0x157,_0x2621fd:0x182,_0x2c143a:0x18c},_0x1bead3={_0x5b0798:0x1a7};function _0x4d7c80(_0x3528ad,_0x254028,_0x32123c,_0x3a8fe4){return _0x3b1855(_0x3528ad,_0x254028-_0x1bead3._0x5b0798,_0x32123c-0x1db,_0x254028- -0x18b);}this[_0x5435f5(0x29d,_0x32981f._0x2a3a1a,_0x32981f._0x243e69,_0x32981f._0x324e3a)]=_0x10ca91;function _0x5435f5(_0x233b56,_0x50e54f,_0x273aad,_0x45851b){return _0x3b1855(_0x50e54f,_0x50e54f-0x181,_0x273aad-0x158,_0x233b56-0x2cb);}_0x396122[_0x5435f5(_0x32981f._0x1b9bb4,_0x32981f._0x1b7945,0x303,0x2f8)]===!![]&&(this[_0x4d7c80(-0x172,-_0x32981f._0x47f42a,-_0x32981f._0x1b4292,-_0x32981f._0x5c4e53)]=[],this[_0x4d7c80(-_0x32981f._0x2621fd,-0x15a,-0x1a0,-_0x32981f._0x2c143a)]=0x0);}[_0x17dcb0(0x494,0x472,0x466,0x471)](_0x4c8850){const _0xfcd492={_0x4ad825:0xd7},_0x4527c4={_0x2e95fc:0x99};function _0x58fbbd(_0x4a6128,_0x54034d,_0x552440,_0x33357b){return _0x3b1855(_0x33357b,_0x54034d-0x11f,_0x552440-0xd0,_0x4a6128- -_0x4527c4._0x2e95fc);}this[_0x58fbbd(-0xe4,-_0xfcd492._0x4ad825,-0x107,-0xc3)]=_0x4c8850;}[_0x3b1855(-0x72,-0x65,-0x28,-0x40)](_0x330bfe){const _0x3b951e={_0xf8277c:0x48,_0x4e82d9:0x90,_0x4a754f:0x47,_0x24cf93:0xf,_0x5a192b:0xd2,_0x45ca54:0x104,_0x3790b6:0xee},_0x1d5721={_0x401785:0x57,_0xf9924e:0x29},_0x1e2011={_0x42a3d3:0xde,_0x4b9e8b:0x316};function _0x450df2(_0x1a0012,_0x151ddf,_0x491c5c,_0x5dca89){return _0x17dcb0(_0x151ddf,_0x151ddf-_0x1e2011._0x42a3d3,_0x491c5c-0x44,_0x491c5c- -_0x1e2011._0x4b9e8b);}function _0x4ea686(_0x229b47,_0x40ccef,_0x392ef6,_0x337947){return _0x3b1855(_0x337947,_0x40ccef-_0x1d5721._0x401785,_0x392ef6-0x149,_0x229b47-_0x1d5721._0xf9924e);}this[_0x4ea686(_0x3b951e._0xf8277c,_0x3b951e._0x4e82d9,_0x3b951e._0x4a754f,_0x3b951e._0x24cf93)][_0x450df2(_0x3b951e._0x5a192b,_0x3b951e._0x45ca54,0xf1,_0x3b951e._0x3790b6)]=_0x330bfe;}async[_0x3b1855(-0x27,-0x61,-0x5e,-0x43)](_0x72d0f0=this[_0x17dcb0(0x4a7,0x41e,0x42a,0x474)],_0x304d83={}){const _0x3deb61={_0x203e6f:0x22e,_0x29ccf0:0x270,_0x20af28:0x1ca,_0x481a0d:0x276,_0x122899:0x260,_0x4c1edf:0x2be,_0x29a8f1:0x285,_0x26b72c:0x2a4,_0x12f18a:0x24f,_0x4e838b:0xfa,_0xfb6829:0x220,_0x5b9111:0x25c,_0x12de09:0x17e,_0x54f90d:0x1c7,_0x5a6b09:0x148,_0x1ea33f:0x1b6,_0x1f1b4d:0x258,_0x5a6c96:0x10c,_0x36f05a:0x223,_0x16ceeb:0x243,_0x2e070b:0x1f5,_0x27ddf2:0x176,_0x123ae0:0x15a,_0xc05e63:0x146,_0x2855ee:0x227,_0x5bf11a:0x247},_0xc8ee9b={_0x456207:0x148};function _0x3b234e(_0x3b7209,_0x781974,_0x3040ac,_0x1f48ff){return _0x3b1855(_0x781974,_0x781974-0x157,_0x3040ac-0x141,_0x3b7209-0x15f);}if(!_0x72d0f0)throw new Error(_0x40adb5(0x2aa,_0x3deb61._0x203e6f,0x260,_0x3deb61._0x29ccf0));function _0x40adb5(_0x2a0cc2,_0x229a35,_0xdd911,_0x161d15){return _0x3b1855(_0x161d15,_0x229a35-_0xc8ee9b._0x456207,_0xdd911-0x162,_0xdd911-0x245);}this[_0x3b234e(0x190,0x1b2,0x1a0,_0x3deb61._0x20af28)]+=0x1;try{const _0x4eb03e=await runTurn({'sessionId':this['sessionId'],'turnId':createTurnId(this[_0x40adb5(0x254,0x2a6,_0x3deb61._0x481a0d,_0x3deb61._0x122899)]),'streaming':_0x304d83[_0x40adb5(_0x3deb61._0x4c1edf,0x27d,_0x3deb61._0x29a8f1,_0x3deb61._0x26b72c)],'signal':_0x304d83[_0x40adb5(0x221,0x232,0x26b,_0x3deb61._0x12f18a)],'system':this[_0x3b234e(0x112,0x14c,0xfd,_0x3deb61._0x4e838b)],'messages':this[_0x40adb5(0x224,_0x3deb61._0xfb6829,_0x3deb61._0x5b9111,_0x3deb61._0x26b72c)],'message':normalizeUserInput(_0x72d0f0)},this[_0x3b234e(_0x3deb61._0x12de09,0x181,_0x3deb61._0x54f90d,_0x3deb61._0x5a6b09)]);return this[_0x3b234e(0x176,0x131,_0x3deb61._0x1ea33f,0x1a5)]=_0x4eb03e['state'][_0x40adb5(0x216,_0x3deb61._0x1f1b4d,0x25c,0x24a)][_0x3b234e(0x161,0x15f,_0x3deb61._0x5a6c96,0x19a)](normalizeMessage),_0x4eb03e;}catch(_0x2fe7af){if(_0x2fe7af instanceof TurnFailedError){this['messages']=synthesizeMissingToolResults(_0x2fe7af[_0x40adb5(_0x3deb61._0x36f05a,_0x3deb61._0x16ceeb,_0x3deb61._0x2e070b,0x1a5)][_0x3b234e(_0x3deb61._0x27ddf2,_0x3deb61._0x123ae0,0x191,_0x3deb61._0xc05e63)][_0x40adb5(_0x3deb61._0x2855ee,0x206,_0x3deb61._0x5bf11a,0x202)](normalizeMessage));throw _0x2fe7af['cause'];}throw _0x2fe7af;}}};export{normalizeToolOutputValue,createToolOutput,ToolExecutionError,defineTool,ToolRegistry,validateToolInput,deriveFinalToolOutput,createInternalToolRuntime,createExtensionRegistry,createAgentMetrics,runTurn,Agent};
@@ -1 +1 @@
1
- (function(_0x30f087,_0x540b83){var _0x4b8f75={_0x1f97ee:0x3f9,_0xb410d5:0x407,_0x5b2e9e:0x402,_0x3e4eb8:0x406,_0x5dc8d1:0x40c,_0x685e9d:0x3f4,_0x392ede:0x3ff,_0x4a9a03:0x2e7,_0x334589:0x2e4,_0x20e126:0x409,_0x589fb1:0x3f5,_0x291a33:0x3f9,_0x1380cd:0x401,_0x406704:0x3f6,_0x3b4508:0x40e,_0x1615fb:0x3ff,_0x2ac0c4:0x3fa,_0x31922c:0x403,_0x3405c3:0x2ee},_0x4fcea0=_0x30f087();function _0x2849eb(_0x5922fd,_0x9e215e,_0x12b721,_0x177d33){return _0x5eec(_0x9e215e-0x253,_0x12b721);}function _0x265f4f(_0x134177,_0x40f844,_0x4ccb2b,_0x54209a){return _0x5eec(_0x134177-0x364,_0x54209a);}while(!![]){try{var _0x237885=parseInt(_0x265f4f(0x403,0x402,_0x4b8f75._0x1f97ee,0x405))/0x1*(-parseInt(_0x265f4f(_0x4b8f75._0xb410d5,_0x4b8f75._0x5b2e9e,_0x4b8f75._0x3e4eb8,_0x4b8f75._0x5dc8d1))/0x2)+parseInt(_0x265f4f(0x3fc,_0x4b8f75._0x685e9d,0x3f4,0x3f6))/0x3+-parseInt(_0x265f4f(0x409,0x412,0x404,_0x4b8f75._0x392ede))/0x4*(-parseInt(_0x2849eb(_0x4b8f75._0x4a9a03,_0x4b8f75._0x334589,0x2dd,0x2e2))/0x5)+parseInt(_0x265f4f(_0x4b8f75._0x3e4eb8,0x3fd,_0x4b8f75._0x20e126,0x401))/0x6*(parseInt(_0x265f4f(0x3fe,0x3fd,_0x4b8f75._0x589fb1,_0x4b8f75._0x291a33))/0x7)+-parseInt(_0x265f4f(_0x4b8f75._0x392ede,0x404,0x3fb,0x3fa))/0x8+parseInt(_0x265f4f(_0x4b8f75._0x1380cd,0x40c,_0x4b8f75._0x406704,0x408))/0x9*(parseInt(_0x265f4f(0x405,_0x4b8f75._0x20e126,0x411,_0x4b8f75._0x3b4508))/0xa)+-parseInt(_0x265f4f(_0x4b8f75._0x5b2e9e,_0x4b8f75._0x1615fb,_0x4b8f75._0x2ac0c4,_0x4b8f75._0x31922c))/0xb*(parseInt(_0x2849eb(_0x4b8f75._0x3405c3,0x2ea,0x2e3,0x2e6))/0xc);if(_0x237885===_0x540b83)break;else _0x4fcea0['push'](_0x4fcea0['shift']());}catch(_0x344a9d){_0x4fcea0['push'](_0x4fcea0['shift']());}}}(_0x4549,0xd7b16));var OperationAbortedError=class extends Error{[_0x30d797(0x292,0x296,0x29e,0x28b)]=_0x27ab05(0x3a9,0x3ad,0x3a9,0x3aa);constructor(_0x37d904=_0x30d797(0x288,0x292,0x290,0x28f)){var _0x17b7aa={_0x3bfbd3:0x47,_0x639d63:0x3c,_0x57ffc0:0x252,_0x5c1b7b:0x259,_0x20fdae:0x24d},_0x27e565={_0x5801e3:0x5f4,_0x28de84:0xdb,_0x476668:0x129},_0x2324c4={_0x117689:0x115,_0x5c2be1:0x23e};super(_0x37d904);function _0x5a076d(_0x10bd71,_0x465539,_0x51f265,_0x587216){return _0x30d797(_0x10bd71-_0x2324c4._0x117689,_0x10bd71- -_0x2324c4._0x5c2be1,_0x51f265-0x12e,_0x587216);}function _0x23cc38(_0x53e59a,_0x217c24,_0x44ae3c,_0x4bbe5b){return _0x27ab05(_0x53e59a- -_0x27e565._0x5801e3,_0x217c24,_0x44ae3c-_0x27e565._0x28de84,_0x4bbe5b-_0x27e565._0x476668);}this[_0x5a076d(_0x17b7aa._0x3bfbd3,_0x17b7aa._0x639d63,0x51,0x4f)]=_0x23cc38(-_0x17b7aa._0x57ffc0,-_0x17b7aa._0x5c1b7b,-_0x17b7aa._0x20fdae,-0x24d);}};function toAbortError(_0x327a6f){var _0xcf76f4={_0x123b68:0x6d,_0x411e75:0x62},_0x4b035c={_0x3acfc3:0x297,_0x101685:0xf7,_0x333cf4:0x14b},_0x861af={_0x10ffba:0xb4};function _0x3d7c6a(_0x5edf21,_0x25181f,_0x540551,_0x2b0f3f){return _0x30d797(_0x5edf21-_0x861af._0x10ffba,_0x5edf21- -0x22b,_0x540551-0x5c,_0x25181f);}if(isAbortError(_0x327a6f))return _0x327a6f;function _0x5b58b1(_0xee56b6,_0x1d96ab,_0x3928eb,_0x238f55){return _0x27ab05(_0x238f55- -_0x4b035c._0x3acfc3,_0x3928eb,_0x3928eb-_0x4b035c._0x101685,_0x238f55-_0x4b035c._0x333cf4);}if(_0x327a6f instanceof Error)return new OperationAbortedError(_0x327a6f['message']);if(typeof _0x327a6f===_0x3d7c6a(_0xcf76f4._0x123b68,0x62,_0xcf76f4._0x411e75,0x73)&&_0x327a6f[_0x5b58b1(0x10c,0x112,0x114,0x115)]>0x0)return new OperationAbortedError(_0x327a6f);return new OperationAbortedError();}function _0x30d797(_0x1ede36,_0x32f935,_0x521035,_0x8efb52){return _0x5eec(_0x32f935-0x1f2,_0x8efb52);}function isAbortError(_0x4ec3e5){var _0x5c9581={_0x2bd52c:0x3d2,_0x3032e1:0x3d2,_0x1f310f:0x5b,_0x3f61e8:0x61,_0x23ab30:0x62,_0x63e85:0x5d,_0x459112:0x69,_0x2df79d:0x3e3,_0x1c0a65:0x3db},_0x3e807f={_0x25666b:0x1e7,_0x56b7f8:0x45},_0x1810b6={_0xa94bea:0x69,_0x112627:0xdc};function _0x31f903(_0x1d4f54,_0x598ea9,_0x24a353,_0xd031a8){return _0x30d797(_0x1d4f54-_0x1810b6._0xa94bea,_0x1d4f54- -0x229,_0x24a353-_0x1810b6._0x112627,_0x24a353);}function _0x5b11fe(_0x1a66d1,_0x1c4b20,_0x168123,_0x2d97e0){return _0x27ab05(_0x2d97e0-0x2c,_0x1c4b20,_0x168123-_0x3e807f._0x25666b,_0x2d97e0-_0x3e807f._0x56b7f8);}return _0x4ec3e5 instanceof OperationAbortedError||_0x4ec3e5 instanceof Error&&(_0x4ec3e5[_0x5b11fe(_0x5c9581._0x2bd52c,_0x5c9581._0x3032e1,0x3d2,0x3cf)]===_0x31f903(_0x5c9581._0x1f310f,_0x5c9581._0x3f61e8,_0x5c9581._0x23ab30,_0x5c9581._0x63e85)||_0x31f903(0x6d,0x6d,0x65,_0x5c9581._0x459112)in _0x4ec3e5&&_0x4ec3e5[_0x5b11fe(_0x5c9581._0x2df79d,0x3dd,_0x5c9581._0x1c0a65,0x3e0)]===_0x31f903(0x62,0x6b,_0x5c9581._0x23ab30,_0x5c9581._0x63e85));}function _0x5eec(_0x4ba747,_0x37c6ba){_0x4ba747=_0x4ba747-0x90;var _0x45498a=_0x4549();var _0x5eec5c=_0x45498a[_0x4ba747];if(_0x5eec['TAjlLR']===undefined){var _0xa26122=function(_0x25bfc7){var _0x167406='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x37d904='',_0x327a6f='';for(var _0x4ec3e5=0x0,_0x516c06,_0x553dad,_0x1eaf77=0x0;_0x553dad=_0x25bfc7['charAt'](_0x1eaf77++);~_0x553dad&&(_0x516c06=_0x4ec3e5%0x4?_0x516c06*0x40+_0x553dad:_0x553dad,_0x4ec3e5++%0x4)?_0x37d904+=String['fromCharCode'](0xff&_0x516c06>>(-0x2*_0x4ec3e5&0x6)):0x0){_0x553dad=_0x167406['indexOf'](_0x553dad);}for(var _0x3d521b=0x0,_0x53057f=_0x37d904['length'];_0x3d521b<_0x53057f;_0x3d521b++){_0x327a6f+='%'+('00'+_0x37d904['charCodeAt'](_0x3d521b)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x327a6f);};_0x5eec['DsbxVW']=_0xa26122,_0x5eec['Qcelca']={},_0x5eec['TAjlLR']=!![];}var _0x208631=_0x45498a[0x0],_0x1495f8=_0x4ba747+_0x208631,_0x386cc1=_0x5eec['Qcelca'][_0x1495f8];return!_0x386cc1?(_0x5eec5c=_0x5eec['DsbxVW'](_0x5eec5c),_0x5eec['Qcelca'][_0x1495f8]=_0x5eec5c):_0x5eec5c=_0x386cc1,_0x5eec5c;}function _0x4549(){var _0x95d9ee=['mtfRveziBw8','mZiWwLbXtgTq','t3bLCMf0Aw9UigfIB3j0zwq','mJC0mtaWwNHSr0fr','mJa5ngj1uerdvW','mZaWmefPuhLhBW','y29Kzq','mZq5mdqZnMzOr2PVsW','C3rYAw5N','ywjVCNq','mtbnwvPNuvC','qwjVCNrfCNjVCG','BMfTzq','CMvHC29U','ywjVCNrLza','CMvTB3zLrxzLBNrmAxn0zw5LCG','mZe5mZaWnJHkzeT0qK8','ndCWmZK3ou9QAMPgEq','qujpuLrFrvjs','mtqXmZnyBgnQwfy','nJK2nte2mfblu3fLvG','BgvUz3rO','mJG4y0vhuLHf'];_0x4549=function(){return _0x95d9ee;};return _0x4549();}function _0x27ab05(_0x3230db,_0x59139f,_0x24fd84,_0x4f7edb){var _0x55a324={_0x41c58b:0x310};return _0x5eec(_0x3230db-_0x55a324._0x41c58b,_0x59139f);}function throwIfAborted(_0x516c06){var _0x12d32d={_0x36ea95:0xb7,_0x33fd77:0x250,_0x373474:0x24c},_0x4a4926={_0x4dcae2:0x345},_0x1c6613={_0x2763bf:0x26};function _0x9ac6c5(_0x2fc12f,_0x177e6e,_0x27e5d7,_0x2c48b2){return _0x30d797(_0x2fc12f-_0x1c6613._0x2763bf,_0x27e5d7- -0x4d2,_0x27e5d7-0x6c,_0x2c48b2);}if(!_0x516c06?.[_0x358bac(-0xbe,-0xbf,-0xca,-_0x12d32d._0x36ea95)])return;function _0x358bac(_0x5363b4,_0x4cbd92,_0x3f72af,_0x9e55bd){return _0x30d797(_0x5363b4-0x0,_0x5363b4- -_0x4a4926._0x4dcae2,_0x3f72af-0xe7,_0x4cbd92);}throw toAbortError(_0x516c06[_0x9ac6c5(-0x256,-_0x12d32d._0x33fd77,-_0x12d32d._0x373474,-0x256)]);}function addAbortListener(_0x553dad,_0x1eaf77){var _0x3ca88f={_0x33b9c8:0x35,_0x42ad5f:0x42,_0x335fbe:0x44,_0x4d2f0f:0x48},_0x525d63={_0xef9568:0xc0,_0x565002:0xcb,_0x74f28e:0xd5,_0x11800b:0xce,_0x5e755f:0x28c,_0x1a0536:0x297},_0x2a37f6={_0x51835e:0x1ac,_0x100f60:0x2d0},_0x52da93={_0x48a542:0x3e4,_0x40edf0:0x36,_0x11f0e0:0x1e4},_0xd62840={_0x393e5d:0x157,_0x4ed0a0:0x190};function _0xd8e2b1(_0x177d83,_0x3befa2,_0x4749b2,_0x3fb6cc){return _0x30d797(_0x177d83-_0xd62840._0x393e5d,_0x3befa2- -0x4aa,_0x4749b2-_0xd62840._0x4ed0a0,_0x4749b2);}if(!_0x553dad)return()=>{};if(_0x553dad[_0x54ed2c(-0x41,-_0x3ca88f._0x33b9c8,-0x37,-0x3f)])return _0x1eaf77(),()=>{};const _0x3d521b=()=>{_0x1eaf77();};_0x553dad['addEventListener'](_0x54ed2c(-_0x3ca88f._0x42ad5f,-_0x3ca88f._0x335fbe,-_0x3ca88f._0x4d2f0f,-_0x3ca88f._0x335fbe),_0x3d521b,{'once':!![]});function _0x54ed2c(_0x1d63a2,_0x3c1105,_0x206a0e,_0x57ca1b){return _0x27ab05(_0x57ca1b- -_0x52da93._0x48a542,_0x206a0e,_0x206a0e-_0x52da93._0x40edf0,_0x57ca1b-_0x52da93._0x11f0e0);}return()=>{var _0x520a74={_0x3a065b:0x180,_0x55a176:0x2ed};function _0x4ed8ba(_0x175239,_0xa5fccf,_0x497720,_0x3f45bc){return _0xd8e2b1(_0x175239-_0x520a74._0x3a065b,_0xa5fccf-_0x520a74._0x55a176,_0x175239,_0x3f45bc-0x146);}function _0x29e4d7(_0x32a236,_0xc109f1,_0x11c459,_0xb8154d){return _0x54ed2c(_0x32a236-_0x2a37f6._0x51835e,_0xc109f1-0x107,_0xb8154d,_0xc109f1-_0x2a37f6._0x100f60);}_0x553dad[_0x4ed8ba(_0x525d63._0xef9568,_0x525d63._0x565002,_0x525d63._0x74f28e,_0x525d63._0x11800b)](_0x29e4d7(0x290,_0x525d63._0x5e755f,_0x525d63._0x1a0536,0x298),_0x3d521b);};}export{OperationAbortedError,toAbortError,isAbortError,throwIfAborted,addAbortListener};
1
+ function _0x333e(_0x43856e,_0x38e812){_0x43856e=_0x43856e-0x141;var _0x15d8ee=_0x15d8();var _0x333ea0=_0x15d8ee[_0x43856e];if(_0x333e['hmxOYj']===undefined){var _0x2325f7=function(_0x39ecf4){var _0x1a3843='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x191b8c='',_0x127a03='';for(var _0x2a0c06=0x0,_0x421c1d,_0x19ff0f,_0x4198b9=0x0;_0x19ff0f=_0x39ecf4['charAt'](_0x4198b9++);~_0x19ff0f&&(_0x421c1d=_0x2a0c06%0x4?_0x421c1d*0x40+_0x19ff0f:_0x19ff0f,_0x2a0c06++%0x4)?_0x191b8c+=String['fromCharCode'](0xff&_0x421c1d>>(-0x2*_0x2a0c06&0x6)):0x0){_0x19ff0f=_0x1a3843['indexOf'](_0x19ff0f);}for(var _0x1dfb58=0x0,_0x46ff96=_0x191b8c['length'];_0x1dfb58<_0x46ff96;_0x1dfb58++){_0x127a03+='%'+('00'+_0x191b8c['charCodeAt'](_0x1dfb58)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x127a03);};_0x333e['ESTeNz']=_0x2325f7,_0x333e['YmTWvW']={},_0x333e['hmxOYj']=!![];}var _0x2961f1=_0x15d8ee[0x0],_0x58c453=_0x43856e+_0x2961f1,_0x4e3059=_0x333e['YmTWvW'][_0x58c453];return!_0x4e3059?(_0x333ea0=_0x333e['ESTeNz'](_0x333ea0),_0x333e['YmTWvW'][_0x58c453]=_0x333ea0):_0x333ea0=_0x4e3059,_0x333ea0;}(function(_0x51e922,_0x5488cc){var _0xaf5ed7={_0x2c0570:0x25c,_0x274819:0x249,_0x236000:0x254,_0x46e3b6:0x269,_0x3f6e9a:0x263,_0x33a691:0x267,_0x417032:0x25f,_0x355aed:0x254,_0x137975:0x25a,_0x2b0864:0x484,_0x573aff:0x490,_0x55d1d3:0x484,_0x25526c:0x47f,_0x135b41:0x25e,_0x6e5774:0x256,_0x53c8d1:0x256,_0x377827:0x260,_0x315567:0x260,_0x37b85d:0x489,_0x2aaac0:0x48a,_0x19406c:0x484,_0x236f57:0x25e,_0x21fcdd:0x25d},_0x4ae3c9=_0x51e922();function _0x1b26e6(_0x5a5f7b,_0x31467b,_0x504496,_0x5c3c29){return _0x333e(_0x5c3c29- -0x3a6,_0x31467b);}function _0x13a1fa(_0x1c227c,_0x296241,_0x88d5d8,_0x35fcc1){return _0x333e(_0x35fcc1-0x341,_0x1c227c);}while(!![]){try{var _0x3f535f=-parseInt(_0x1b26e6(-0x250,-_0xaf5ed7._0x2c0570,-_0xaf5ed7._0x274819,-_0xaf5ed7._0x236000))/0x1*(parseInt(_0x1b26e6(-_0xaf5ed7._0x46e3b6,-_0xaf5ed7._0x3f6e9a,-_0xaf5ed7._0x33a691,-_0xaf5ed7._0x417032))/0x2)+parseInt(_0x1b26e6(-0x259,-_0xaf5ed7._0x355aed,-0x25d,-_0xaf5ed7._0x137975))/0x3+parseInt(_0x13a1fa(0x48b,0x48f,_0xaf5ed7._0x2b0864,0x486))/0x4+-parseInt(_0x13a1fa(_0xaf5ed7._0x573aff,_0xaf5ed7._0x55d1d3,_0xaf5ed7._0x25526c,0x489))/0x5+-parseInt(_0x1b26e6(-_0xaf5ed7._0x135b41,-_0xaf5ed7._0x6e5774,-0x25d,-0x257))/0x6+parseInt(_0x1b26e6(-_0xaf5ed7._0x53c8d1,-_0xaf5ed7._0x377827,-_0xaf5ed7._0x137975,-_0xaf5ed7._0x315567))/0x7*(parseInt(_0x13a1fa(0x48a,0x493,_0xaf5ed7._0x37b85d,0x48e))/0x8)+-parseInt(_0x13a1fa(_0xaf5ed7._0x2aaac0,0x48f,0x483,_0xaf5ed7._0x19406c))/0x9*(-parseInt(_0x1b26e6(-0x266,-_0xaf5ed7._0x236f57,-0x267,-_0xaf5ed7._0x21fcdd))/0xa);if(_0x3f535f===_0x5488cc)break;else _0x4ae3c9['push'](_0x4ae3c9['shift']());}catch(_0x42c5cc){_0x4ae3c9['push'](_0x4ae3c9['shift']());}}}(_0x15d8,0xbbfd2));var OperationAbortedError=class extends Error{[_0x912c05(0x85,0x80,0x86,0x7a)]='ABORT_ERR';constructor(_0x191b8c='Operation\x20aborted'){var _0x1b0de8={_0x390608:0x303,_0x445f2b:0x30a,_0x2f2db6:0xe0},_0x3719de={_0x135013:0x16a,_0x372099:0x172},_0x2bc042={_0x4ca099:0x284};function _0x2f117d(_0x5df478,_0x40947e,_0x5844ec,_0x4ab945){return _0x912c05(_0x5df478,_0x4ab945-_0x2bc042._0x4ca099,_0x5844ec-0x95,_0x4ab945-0x172);}function _0x2ca78d(_0x216772,_0x4f7948,_0x49d9a2,_0x3f6df2){return _0x912c05(_0x4f7948,_0x3f6df2- -_0x3719de._0x135013,_0x49d9a2-_0x3719de._0x372099,_0x3f6df2-0x10b);}super(_0x191b8c),this[_0x2f117d(0x30b,_0x1b0de8._0x390608,0x304,_0x1b0de8._0x445f2b)]=_0x2ca78d(-0xe9,-_0x1b0de8._0x2f2db6,-0xed,-0xe5);}};function _0x15d8(){var _0x3a787f=['odfWAvvJqNa','BwvZC2fNzq','odi5mti0AwvNzhHd','mZy2odm3mwjPEgfxBW','mLjjAMPVwa','mZKWntC4mg1Sq2vmDa','mti0nZK0mhjiz2HNva','BgvUz3rO','y29Kzq','mZGZndG3m3nhB0riDG','oejqt011rG','ywrKrxzLBNrmAxn0zw5LCG','odi2nde5nLLnzeLfuq','qwjVCNrfCNjVCG','BMfTzq','mJa0mJq3sfjTDKXg','CMvHC29U','CMvTB3zLrxzLBNrmAxn0zw5LCG','ywjVCNrLza','C3rYAw5N','ywjVCNq'];_0x15d8=function(){return _0x3a787f;};return _0x15d8();}function toAbortError(_0x127a03){var _0x1f7571={_0x2a1e27:0xad,_0x553eaf:0x503,_0x2a252f:0x505},_0x21982c={_0x31a84e:0x113,_0x3ecbea:0x12e},_0x556d29={_0x4c989d:0x121,_0xf83784:0x172};if(isAbortError(_0x127a03))return _0x127a03;if(_0x127a03 instanceof Error)return new OperationAbortedError(_0x127a03[_0x14a632(-0xa9,-0xac,-0xa8,-_0x1f7571._0x2a1e27)]);if(typeof _0x127a03===_0x4446d1(_0x1f7571._0x553eaf,0x506,_0x1f7571._0x2a252f,0x502)&&_0x127a03[_0x4446d1(0x50c,0x513,0x50e,0x50c)]>0x0)return new OperationAbortedError(_0x127a03);function _0x14a632(_0x4065da,_0x39dfa7,_0x143872,_0x1c6e22){return _0x912c05(_0x39dfa7,_0x143872- -_0x556d29._0x4c989d,_0x143872-0x19b,_0x1c6e22-_0x556d29._0xf83784);}function _0x4446d1(_0x3f988a,_0x12d406,_0x3baf55,_0x3206a1){return _0x912c05(_0x3f988a,_0x3baf55-0x48f,_0x3baf55-_0x21982c._0x31a84e,_0x3206a1-_0x21982c._0x3ecbea);}return new OperationAbortedError();}function isAbortError(_0x2a0c06){function _0x1c7521(_0x5d492f,_0x322d94,_0x1bea72,_0x59bbf7){return _0x912c05(_0x1bea72,_0x5d492f-0x43,_0x1bea72-0x16e,_0x59bbf7-0x174);}return _0x2a0c06 instanceof OperationAbortedError||_0x2a0c06 instanceof Error&&(_0x2a0c06[_0x1c7521(0xc9,0xcf,0xc5,0xc0)]==='AbortError'||'code'in _0x2a0c06&&_0x2a0c06['code']==='ABORT_ERR');}function throwIfAborted(_0x421c1d){var _0x4b0e68={_0xc22fbd:0x50,_0x158e24:0x55},_0x1a0e2e={_0x34d640:0xbf,_0x2d586b:0xf8};if(!_0x421c1d?.['aborted'])return;function _0x3e390d(_0x365e9d,_0x5e9535,_0x4f3bbb,_0x130eef){return _0x912c05(_0x5e9535,_0x365e9d- -0x2d,_0x4f3bbb-_0x1a0e2e._0x34d640,_0x130eef-_0x1a0e2e._0x2d586b);}throw toAbortError(_0x421c1d[_0x3e390d(0x5b,_0x4b0e68._0xc22fbd,0x55,_0x4b0e68._0x158e24)]);}function _0x912c05(_0xa1f33a,_0x15b962,_0x17e6e6,_0x3017c7){return _0x333e(_0x15b962- -0xcb,_0xa1f33a);}function addAbortListener(_0x19ff0f,_0x4198b9){var _0x99b600={_0x1955e6:0x343,_0x8750a0:0x33b,_0x376c5c:0x43d},_0x21cef6={_0x541b8b:0x4f4},_0x2423c1={_0x37de20:0x166,_0x2e7bd3:0xa5},_0x11e572={_0x5a5d5c:0x2c0};if(!_0x19ff0f)return()=>{};if(_0x19ff0f[_0x46b619(0x351,0x34a,0x342,0x349)])return _0x4198b9(),()=>{};const _0x1dfb58=()=>{_0x4198b9();};_0x19ff0f[_0x46b619(0x348,_0x99b600._0x1955e6,0x341,_0x99b600._0x8750a0)](_0x3f7ad1(0x43f,0x445,_0x99b600._0x376c5c,_0x99b600._0x376c5c),_0x1dfb58,{'once':!![]});function _0x46b619(_0x175857,_0x2fc188,_0x1ac4cd,_0x2a109f){return _0x912c05(_0x2a109f,_0x2fc188-_0x11e572._0x5a5d5c,_0x1ac4cd-0x9f,_0x2a109f-0x199);}function _0x3f7ad1(_0x2aa316,_0x50e5c7,_0x47e645,_0x5e0342){return _0x912c05(_0x47e645,_0x5e0342-0x3c6,_0x47e645-0x192,_0x5e0342-0x8a);}return()=>{function _0x316ed9(_0x230b77,_0x54d189,_0xf70b35,_0x32fe58){return _0x3f7ad1(_0x230b77-_0x2423c1._0x37de20,_0x54d189-0x56,_0x32fe58,_0xf70b35-_0x2423c1._0x2e7bd3);}_0x19ff0f[_0x316ed9(0x4fd,0x4f9,0x4f4,_0x21cef6._0x541b8b)]('abort',_0x1dfb58);};}export{OperationAbortedError,toAbortError,isAbortError,throwIfAborted,addAbortListener};
@@ -1 +1 @@
1
- (function(_0x440ee0,_0x45cc0d){const _0x870555={_0x45b187:0x177,_0x23e72d:0x188,_0x4526fa:0x17d,_0x332c9c:0x24a,_0x3c2f08:0x24f,_0x20011b:0x247,_0x4288c7:0x185,_0x45c763:0x23e,_0xcf3434:0x235,_0x3ed62d:0x248,_0x1e5830:0x18a,_0x5e42b6:0x231,_0x1679a8:0x172,_0xe48e8b:0x183},_0x416d33={_0x55271c:0x37e};function _0x44b7d5(_0x320699,_0x3fdedc,_0x2dcc9e,_0x3fbfdf){return _0x46ab(_0x2dcc9e- -0x2c0,_0x3fdedc);}function _0x5854c8(_0x462950,_0x5e3975,_0x1b480a,_0x51a7d5){return _0x46ab(_0x462950- -_0x416d33._0x55271c,_0x5e3975);}const _0x35c337=_0x440ee0();while(!![]){try{const _0x1b3b1c=-parseInt(_0x44b7d5(-0x17b,-0x184,-0x17c,-_0x870555._0x45b187))/0x1*(-parseInt(_0x44b7d5(-0x177,-_0x870555._0x23e72d,-_0x870555._0x4526fa,-0x175))/0x2)+parseInt(_0x5854c8(-_0x870555._0x332c9c,-0x23f,-0x24b,-_0x870555._0x3c2f08))/0x3+-parseInt(_0x5854c8(-_0x870555._0x20011b,-0x23f,-0x246,-_0x870555._0x3c2f08))/0x4*(-parseInt(_0x44b7d5(-0x17a,-_0x870555._0x4288c7,-0x185,-0x18d))/0x5)+-parseInt(_0x5854c8(-_0x870555._0x45c763,-0x240,-_0x870555._0xcf3434,-_0x870555._0x3ed62d))/0x6*(-parseInt(_0x44b7d5(-0x180,-_0x870555._0x1e5830,-0x181,-0x187))/0x7)+parseInt(_0x5854c8(-0x234,-0x22d,-_0x870555._0x5e42b6,-0x228))/0x8+-parseInt(_0x44b7d5(-_0x870555._0x1679a8,-_0x870555._0xe48e8b,-0x17a,-0x178))/0x9+-parseInt(_0x44b7d5(-0x174,-0x16b,-_0x870555._0x45b187,-0x17b))/0xa;if(_0x1b3b1c===_0x45cc0d)break;else _0x35c337['push'](_0x35c337['shift']());}catch(_0x4a7450){_0x35c337['push'](_0x35c337['shift']());}}}(_0x5e11,0x6d880));import{toOpenAiResponsesRequest}from'../chunk-T7UKN6FZ.js';import'../chunk-NYZR4XKO.js';function _0x5e11(){const _0x359df4=['Aw1Hz2u','Aw5KzxG','mtuWodq4otbpyKLTwvG','mJKWnteXmKHVzhb3AG','mZK3nJjfqurWqLu','Aw1Hz2uVANbLzW','BgvUz3rO','ndeYvg5nBvDK','zNjVBq','DgvZDa','CMvWBgfJzq','mZuZndv5yMHOzwW','Aw1Hz2uVANbN','zMLSDgvY','Dgv4Da','mtq3n1nQs09Szq','mtm0ntHRsMHJzg4','ChvZAa','Bwf0y2HbBgW','mKfjsenkrG','nJK0mZyYEK5prKDl','C2XPy2u','mJGZnta1ng1mwffPDG'];_0x5e11=function(){return _0x359df4;};return _0x5e11();}import{INTERRUPTED_TOOL_RESULT_TEXT,compileRequest,createAssistantTextMessage,createReasoningMessage,createTextBlock,createToolResultUserMessage,createToolUseMessage,getReasoningTextFromMessage,getTextFromMessage,getToolResultBlocks,getToolUseBlocks,normalizeContent,normalizeMessage,normalizeSystem,normalizeTextBlock,responseToAssistantMessage,synthesizeMissingToolResults,toChatRequest,toChatResponse,toModelRequest,toModelResponse,toProviderModelRequest}from'../chunk-SEP4YYY3.js';var DATA_URI_REGEX=/data:(image\/(?:png|jpeg|jpg|gif|webp));base64,([A-Za-z0-9+/\r\n]+={0,2})/g;function normalizeMediaType(_0x21095f){const _0x151f1f={_0x4efe89:0x1df,_0x5f04b2:0x1e9,_0x13e860:0x1e2,_0x99a396:0x1e0},_0x4e2dd7={_0x1da836:0x58};function _0x48f263(_0x38eeff,_0x4e7a6b,_0x903a88,_0x393394){return _0x46ab(_0x903a88-0xa9,_0x38eeff);}function _0x33ec4d(_0xc39f76,_0x503c08,_0x3e5ff8,_0x3cf32e){return _0x46ab(_0xc39f76- -_0x4e2dd7._0x1da836,_0x3cf32e);}return _0x21095f===_0x48f263(0x1d9,_0x151f1f._0x4efe89,0x1e5,_0x151f1f._0x5f04b2)?_0x48f263(0x1de,_0x151f1f._0x13e860,0x1de,_0x151f1f._0x99a396):_0x21095f;}function isValidBase64(_0x596e78){const _0x280fea={_0x173b44:0x16f,_0x449973:0x173,_0x165200:0x17e,_0x3a678f:0x158,_0x25a4df:0x157,_0x2e2d5d:0x15c,_0x263c5e:0x14c},_0x3c62ee={_0x41c3e5:0x2a9};if(_0x596e78[_0x11181a(-0x176,-_0x280fea._0x173b44,-_0x280fea._0x449973,-_0x280fea._0x165200)]===0x0||_0x596e78['length']%0x4!==0x0)return![];function _0x207e6a(_0x5771e5,_0x579fa8,_0x5505bd,_0x478263){return _0x46ab(_0x579fa8-0x1e,_0x5771e5);}function _0x11181a(_0x314c43,_0x3ffabc,_0x3db6b1,_0xf7adce){return _0x46ab(_0x3db6b1- -_0x3c62ee._0x41c3e5,_0x3ffabc);}return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/[_0x207e6a(_0x280fea._0x3a678f,_0x280fea._0x25a4df,_0x280fea._0x2e2d5d,_0x280fea._0x263c5e)](_0x596e78);}function _0x46ab(_0x2a1069,_0x517ccb){_0x2a1069=_0x2a1069-0x134;const _0x5e117c=_0x5e11();let _0x46ab99=_0x5e117c[_0x2a1069];if(_0x46ab['jeWZfr']===undefined){var _0x5f1adb=function(_0x3f451d){const _0x5deac0='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x21095f='',_0x596e78='';for(let _0x37244=0x0,_0x598eb3,_0x54ea5d,_0x31823f=0x0;_0x54ea5d=_0x3f451d['charAt'](_0x31823f++);~_0x54ea5d&&(_0x598eb3=_0x37244%0x4?_0x598eb3*0x40+_0x54ea5d:_0x54ea5d,_0x37244++%0x4)?_0x21095f+=String['fromCharCode'](0xff&_0x598eb3>>(-0x2*_0x37244&0x6)):0x0){_0x54ea5d=_0x5deac0['indexOf'](_0x54ea5d);}for(let _0x4696a5=0x0,_0x29f0ec=_0x21095f['length'];_0x4696a5<_0x29f0ec;_0x4696a5++){_0x596e78+='%'+('00'+_0x21095f['charCodeAt'](_0x4696a5)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x596e78);};_0x46ab['CbgGAT']=_0x5f1adb,_0x46ab['kIuhzU']={},_0x46ab['jeWZfr']=!![];}const _0x1f83b1=_0x5e117c[0x0],_0x384fa6=_0x2a1069+_0x1f83b1,_0x38151c=_0x46ab['kIuhzU'][_0x384fa6];return!_0x38151c?(_0x46ab99=_0x46ab['CbgGAT'](_0x46ab99),_0x46ab['kIuhzU'][_0x384fa6]=_0x46ab99):_0x46ab99=_0x38151c,_0x46ab99;}function collectImageMatches(_0x37244){const _0x20bea8={_0x290b2e:0x24c,_0x260e82:0x248,_0x1de29b:0x24a,_0x2495f0:0x24d,_0xae04a:0x248};function _0x5b76da(_0x5460cf,_0x3bfdd9,_0x4674f8,_0x47286c){return _0x46ab(_0x3bfdd9- -0x38c,_0x4674f8);}DATA_URI_REGEX['lastIndex']=0x0;function _0x1142bd(_0x16e215,_0x359ebd,_0x2a82ae,_0x5b3c97){return _0x46ab(_0x5b3c97-0x3a9,_0x16e215);}return Array[_0x5b76da(-0x24a,-0x254,-0x253,-_0x20bea8._0x290b2e)](_0x37244[_0x5b76da(-_0x20bea8._0x260e82,-_0x20bea8._0x1de29b,-0x24a,-_0x20bea8._0x2495f0)](DATA_URI_REGEX))[_0x5b76da(-_0x20bea8._0x2495f0,-0x24f,-0x250,-_0x20bea8._0xae04a)](_0x598eb3=>{const _0x54ea5d=(_0x598eb3[0x2]??'')['replace'](/[\r\n]/g,'');return isValidBase64(_0x54ea5d);});}function hasPastedImages(_0x31823f){const _0x46d176={_0x58a7f0:0x2c3,_0x31ec0e:0x2cc,_0x3f58cd:0x2d2},_0x2aa717={_0x471285:0x196};function _0x4d4805(_0x52ad1f,_0x4e8ca1,_0x430bec,_0x18f765){return _0x46ab(_0x4e8ca1-_0x2aa717._0x471285,_0x18f765);}return collectImageMatches(_0x31823f)[_0x4d4805(_0x46d176._0x58a7f0,_0x46d176._0x31ec0e,_0x46d176._0x3f58cd,0x2c5)]>0x0;}function contentFromPastedText(_0x4696a5){const _0x53033e={_0x4015d9:0xb,_0x2f99b1:0xc,_0x4f24dc:0x9,_0x1975f9:0x3,_0x7e2039:0x8,_0x1ac7b6:0xd3,_0x2e3b60:0xc5,_0x2f0e57:0xd4,_0x555ad3:0xd1,_0x4d018f:0xde,_0x264780:0xd9,_0x24a680:0xe1,_0x5dc1ea:0xe2,_0xd93de3:0xd9,_0x2b94dd:0xeb,_0x410159:0xec,_0xfc697b:0x1},_0x23babc={_0x5411f1:0x13e},_0x2072d5={_0x25e647:0x218},_0x29f0ec=collectImageMatches(_0x4696a5);function _0x537a92(_0x4477d2,_0x2e1bfb,_0x4ee64c,_0x22afaa){return _0x46ab(_0x22afaa- -_0x2072d5._0x25e647,_0x4477d2);}function _0x5506ab(_0x1c0c6a,_0xda532e,_0x350387,_0x5a26e8){return _0x46ab(_0x5a26e8- -_0x23babc._0x5411f1,_0x350387);}const _0x47254e=[];let _0x55e9be=0x0;for(const _0x2cc90e of _0x29f0ec){const _0x1fa98d=_0x2cc90e[_0x5506ab(0x4,_0x53033e._0x4015d9,_0x53033e._0x2f99b1,0xa)]??0x0,[_0x36f4d0,_0x564fbc,_0x9c839a]=_0x2cc90e;_0x1fa98d>_0x55e9be&&_0x47254e[_0x5506ab(-0x3,0x1,-_0x53033e._0x4f24dc,_0x53033e._0x1975f9)]({'type':'text','text':_0x4696a5[_0x5506ab(0x5,0xe,0x9,0x7)](_0x55e9be,_0x1fa98d)}),_0x47254e[_0x5506ab(0x0,0xc,_0x53033e._0x7e2039,0x3)]({'type':_0x537a92(-_0x53033e._0x1ac7b6,-_0x53033e._0x2e3b60,-_0x53033e._0x2f0e57,-_0x53033e._0x555ad3),'source':{'type':'base64','media_type':normalizeMediaType(_0x564fbc),'data':_0x9c839a[_0x537a92(-0xdb,-0xe8,-0xd7,-_0x53033e._0x4d018f)](/[\r\n]/g,'')}}),_0x55e9be=_0x1fa98d+_0x36f4d0[_0x537a92(-_0x53033e._0x264780,-0xd7,-_0x53033e._0x24a680,-_0x53033e._0x5dc1ea)];}return _0x55e9be<_0x4696a5[_0x537a92(-0xe9,-0xe2,-0xe5,-0xe2)]&&_0x47254e['push']({'type':_0x5506ab(-0x4,_0x53033e._0x4015d9,0x7,0x0),'text':_0x4696a5[_0x537a92(-0xd1,-0xd7,-_0x53033e._0xd93de3,-_0x53033e._0x1ac7b6)](_0x55e9be)}),_0x47254e[_0x537a92(-_0x53033e._0x2b94dd,-_0x53033e._0x264780,-_0x53033e._0x410159,-0xe2)]>0x0?_0x47254e:[{'type':_0x5506ab(-_0x53033e._0xfc697b,-_0x53033e._0x4015d9,_0x53033e._0x2f99b1,0x0),'text':_0x4696a5}];}export{INTERRUPTED_TOOL_RESULT_TEXT,compileRequest,contentFromPastedText,createAssistantTextMessage,createReasoningMessage,createTextBlock,createToolResultUserMessage,createToolUseMessage,getReasoningTextFromMessage,getTextFromMessage,getToolResultBlocks,getToolUseBlocks,hasPastedImages,normalizeContent,normalizeMessage,normalizeSystem,normalizeTextBlock,responseToAssistantMessage,synthesizeMissingToolResults,toChatRequest,toChatResponse,toModelRequest,toModelResponse,toOpenAiResponsesRequest,toProviderModelRequest};
1
+ (function(_0x51f603,_0x5a1e9d){const _0x42e1a2={_0x19e5a3:0x247,_0x39ede3:0x24f,_0x4e3433:0x241,_0x2bf482:0x184,_0x492461:0x181,_0x4e1e2f:0x17c,_0x106593:0x183,_0x3ce653:0x182,_0x3eaf2e:0x17b,_0x45dc9d:0x177,_0x19c281:0x234,_0x335768:0x239,_0x349a0e:0x23e,_0x285e1b:0x235,_0x58abe2:0x24d,_0x39c24e:0x243,_0x4daf06:0x238,_0xd68030:0x173},_0x2c5238={_0x1857f9:0x252};function _0x3b3442(_0xb2674d,_0x16f2d5,_0x2753cf,_0x2a6672){return _0x22fd(_0x16f2d5- -0x312,_0x2a6672);}const _0xe36089=_0x51f603();function _0x39420c(_0x236514,_0x47f14f,_0x2b1491,_0x1ba976){return _0x22fd(_0x47f14f- -_0x2c5238._0x1857f9,_0x2b1491);}while(!![]){try{const _0x1d1329=parseInt(_0x3b3442(-0x23f,-_0x42e1a2._0x19e5a3,-0x245,-_0x42e1a2._0x39ede3))/0x1+parseInt(_0x3b3442(-_0x42e1a2._0x4e3433,-0x240,-0x247,-0x248))/0x2*(parseInt(_0x39420c(-0x180,-_0x42e1a2._0x2bf482,-_0x42e1a2._0x492461,-0x187))/0x3)+parseInt(_0x39420c(-_0x42e1a2._0x4e1e2f,-_0x42e1a2._0x492461,-0x181,-_0x42e1a2._0x106593))/0x4*(-parseInt(_0x39420c(-_0x42e1a2._0x3ce653,-_0x42e1a2._0x3eaf2e,-_0x42e1a2._0x45dc9d,-0x175))/0x5)+parseInt(_0x3b3442(-_0x42e1a2._0x19c281,-_0x42e1a2._0x335768,-0x232,-0x237))/0x6+-parseInt(_0x3b3442(-0x236,-_0x42e1a2._0x349a0e,-0x243,-_0x42e1a2._0x285e1b))/0x7*(parseInt(_0x3b3442(-_0x42e1a2._0x58abe2,-_0x42e1a2._0x39c24e,-_0x42e1a2._0x4daf06,-0x248))/0x8)+-parseInt(_0x39420c(-_0x42e1a2._0xd68030,-0x177,-0x179,-_0x42e1a2._0x492461))/0x9*(-parseInt(_0x39420c(-0x17a,-0x174,-0x17c,-0x16d))/0xa)+-parseInt(_0x3b3442(-0x240,-0x23d,-0x23f,-0x23b))/0xb;if(_0x1d1329===_0x5a1e9d)break;else _0xe36089['push'](_0xe36089['shift']());}catch(_0xee0247){_0xe36089['push'](_0xe36089['shift']());}}}(_0x2853,0x6396d));import{toOpenAiResponsesRequest}from'../chunk-T7UKN6FZ.js';import'../chunk-NYZR4XKO.js';import{INTERRUPTED_TOOL_RESULT_TEXT,compileRequest,createAssistantTextMessage,createReasoningMessage,createTextBlock,createToolResultUserMessage,createToolUseMessage,getReasoningTextFromMessage,getTextFromMessage,getToolResultBlocks,getToolUseBlocks,normalizeContent,normalizeMessage,normalizeSystem,normalizeTextBlock,responseToAssistantMessage,synthesizeMissingToolResults,toChatRequest,toChatResponse,toModelRequest,toModelResponse,toProviderModelRequest}from'../chunk-SEP4YYY3.js';var DATA_URI_REGEX=/data:(image\/(?:png|jpeg|jpg|gif|webp));base64,([A-Za-z0-9+/\r\n]+={0,2})/g;function _0x22fd(_0x152834,_0x1cd49c){_0x152834=_0x152834-0xcb;const _0x2853aa=_0x2853();let _0x22fda4=_0x2853aa[_0x152834];if(_0x22fd['JJiAEQ']===undefined){var _0x34a9d8=function(_0x5bdede){const _0x22dd4f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4c3103='',_0x2b5d47='';for(let _0x265aaa=0x0,_0xe5d3a8,_0x45b0bd,_0x5d31ea=0x0;_0x45b0bd=_0x5bdede['charAt'](_0x5d31ea++);~_0x45b0bd&&(_0xe5d3a8=_0x265aaa%0x4?_0xe5d3a8*0x40+_0x45b0bd:_0x45b0bd,_0x265aaa++%0x4)?_0x4c3103+=String['fromCharCode'](0xff&_0xe5d3a8>>(-0x2*_0x265aaa&0x6)):0x0){_0x45b0bd=_0x22dd4f['indexOf'](_0x45b0bd);}for(let _0x24feb4=0x0,_0x57ff18=_0x4c3103['length'];_0x24feb4<_0x57ff18;_0x24feb4++){_0x2b5d47+='%'+('00'+_0x4c3103['charCodeAt'](_0x24feb4)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2b5d47);};_0x22fd['lqmnFo']=_0x34a9d8,_0x22fd['MXHEiO']={},_0x22fd['JJiAEQ']=!![];}const _0x15c2ee=_0x2853aa[0x0],_0x2deb6a=_0x152834+_0x15c2ee,_0x427cd1=_0x22fd['MXHEiO'][_0x2deb6a];return!_0x427cd1?(_0x22fda4=_0x22fd['lqmnFo'](_0x22fda4),_0x22fd['MXHEiO'][_0x2deb6a]=_0x22fda4):_0x22fda4=_0x427cd1,_0x22fda4;}function normalizeMediaType(_0x4c3103){return _0x4c3103==='image/jpg'?'image/jpeg':_0x4c3103;}function isValidBase64(_0x2b5d47){const _0x2540db={_0x23234a:0x261,_0x12d5ae:0x267,_0x209a4a:0x266},_0x304a34={_0x6b38a:0x381},_0x35db0b={_0x5083d9:0x334};function _0x1c632d(_0x5c3865,_0x589582,_0x43ea3a,_0x59944d){return _0x22fd(_0x43ea3a- -_0x35db0b._0x5083d9,_0x59944d);}function _0x57026f(_0x3ff47a,_0x4de749,_0x380cfa,_0x4f7273){return _0x22fd(_0x4de749-_0x304a34._0x6b38a,_0x3ff47a);}if(_0x2b5d47[_0x57026f(0x44c,0x44d,0x44c,0x453)]===0x0||_0x2b5d47[_0x1c632d(-0x263,-_0x2540db._0x23234a,-0x268,-0x270)]%0x4!==0x0)return![];return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/[_0x1c632d(-0x262,-0x265,-_0x2540db._0x12d5ae,-_0x2540db._0x209a4a)](_0x2b5d47);}function collectImageMatches(_0x265aaa){const _0x4787cf={_0x233dd5:0x2e0,_0x8dc158:0x2f9,_0x528d18:0x2f4,_0x2d4d91:0x2ee,_0x157af1:0x2f2,_0x46006d:0x2f9},_0x5256cb={_0x1439cd:0x312,_0x2b1e6b:0x30c,_0x456c47:0x317,_0x85a4da:0x311},_0x25c858={_0x487c85:0x149,_0x31bdb6:0x182};function _0x4d91cb(_0x56ca7b,_0x5ded36,_0xae924a,_0x443396){return _0x22fd(_0xae924a-0xc0,_0x443396);}DATA_URI_REGEX[_0x58c73b(0x2e3,0x2ed,0x2eb,_0x4787cf._0x233dd5)]=0x0;function _0x58c73b(_0x50d635,_0x37dc77,_0xc93a19,_0x1274d6){return _0x22fd(_0xc93a19-0x218,_0x1274d6);}return Array['from'](_0x265aaa[_0x58c73b(_0x4787cf._0x8dc158,0x2f2,0x2f7,0x2f0)](DATA_URI_REGEX))[_0x58c73b(_0x4787cf._0x528d18,_0x4787cf._0x2d4d91,_0x4787cf._0x157af1,_0x4787cf._0x46006d)](_0xe5d3a8=>{const _0x45b0bd=(_0xe5d3a8[0x2]??'')[_0x5556ba(_0x5256cb._0x1439cd,_0x5256cb._0x2b1e6b,_0x5256cb._0x456c47,_0x5256cb._0x85a4da)](/[\r\n]/g,'');function _0x5556ba(_0x4b240f,_0x1b113d,_0x109e4d,_0x3561ea){return _0x4d91cb(_0x4b240f-0x36,_0x1b113d-_0x25c858._0x487c85,_0x4b240f-_0x25c858._0x31bdb6,_0x1b113d);}return isValidBase64(_0x45b0bd);});}function _0x2853(){const _0x113174=['mZmYnJzfExHOvxi','BgfZDeLUzgv4','mJu3nJe0n0vnB3HxDa','ndCWnJe2m0fUrKnLCG','Dgv4Da','nvjuDKz5yW','ChvZAa','ndG0nta5meHQz2PSEa','zMLSDgvY','ouf0vvrnvG','Aw1Hz2u','Aw5KzxG','nJqWodm3mevcyMLvBa','Bwf0y2HbBgW','nZu4ntKYEgnLyMPl','BgvUz3rO','DgvZDa','mJfotKTsufq','mtz2vNffy3m','CMvWBgfJzq','mZaWnJmZmLztzKjsvG'];_0x2853=function(){return _0x113174;};return _0x2853();}function hasPastedImages(_0x5d31ea){return collectImageMatches(_0x5d31ea)['length']>0x0;}function contentFromPastedText(_0x24feb4){const _0x7a0302={_0x212ed5:0x2c2,_0x126c9c:0x2be,_0x239d69:0x2cd,_0x1d2fe1:0x2c8,_0x50d4a1:0xd6,_0xb19977:0xe8,_0x39715a:0xdb,_0x32265e:0xe0,_0x99d12:0xd5,_0x402c1b:0xd4,_0x3619e2:0x2de,_0x35dba1:0x2d4,_0x923249:0x2dc,_0x2e69de:0x2cd,_0x488fb6:0x2c3,_0x2701b3:0x2c4,_0x4825e0:0xd8,_0x5ec945:0xd5,_0x4e1e66:0xd0,_0x720a81:0xdb,_0x2524b3:0xda},_0x2283a8={_0x51e77a:0x4},_0x57ff18=collectImageMatches(_0x24feb4),_0x26074d=[];function _0x2db892(_0x3fbb06,_0x4bf071,_0x4cfcf1,_0x2753dd){return _0x22fd(_0x3fbb06- -0x3a5,_0x4cfcf1);}let _0x229205=0x0;for(const _0x5d3767 of _0x57ff18){const _0x532396=_0x5d3767[_0x2db892(-0x2c8,-_0x7a0302._0x212ed5,-_0x7a0302._0x126c9c,-_0x7a0302._0x126c9c)]??0x0,[_0x2f0a1f,_0x49d0f6,_0x2cdf14]=_0x5d3767;_0x532396>_0x229205&&_0x26074d[_0x2db892(-_0x7a0302._0x239d69,-_0x7a0302._0x1d2fe1,-0x2d0,-0x2c6)]({'type':'text','text':_0x24feb4['slice'](_0x229205,_0x532396)}),_0x26074d['push']({'type':_0x2bdd76(_0x7a0302._0x50d4a1,_0x7a0302._0xb19977,_0x7a0302._0x39715a,_0x7a0302._0x32265e),'source':{'type':'base64','media_type':normalizeMediaType(_0x49d0f6),'data':_0x2cdf14[_0x2bdd76(_0x7a0302._0x99d12,0xc9,0xc9,_0x7a0302._0x402c1b)](/[\r\n]/g,'')}}),_0x229205=_0x532396+_0x2f0a1f[_0x2bdd76(0xc9,0xcc,0xc6,0xd0)];}_0x229205<_0x24feb4[_0x2db892(-0x2d9,-_0x7a0302._0x3619e2,-_0x7a0302._0x35dba1,-_0x7a0302._0x923249)]&&_0x26074d[_0x2db892(-_0x7a0302._0x2e69de,-_0x7a0302._0x488fb6,-0x2ca,-_0x7a0302._0x2701b3)]({'type':'text','text':_0x24feb4['slice'](_0x229205)});function _0x2bdd76(_0x567fdc,_0x5af1a1,_0xcc5097,_0x297254){return _0x22fd(_0x297254-_0x2283a8._0x51e77a,_0x567fdc);}return _0x26074d[_0x2bdd76(_0x7a0302._0x4825e0,_0x7a0302._0x5ec945,0xda,_0x7a0302._0x4e1e66)]>0x0?_0x26074d:[{'type':_0x2bdd76(0xd8,_0x7a0302._0x720a81,_0x7a0302._0x2524b3,0xda),'text':_0x24feb4}];}export{INTERRUPTED_TOOL_RESULT_TEXT,compileRequest,contentFromPastedText,createAssistantTextMessage,createReasoningMessage,createTextBlock,createToolResultUserMessage,createToolUseMessage,getReasoningTextFromMessage,getTextFromMessage,getToolResultBlocks,getToolUseBlocks,hasPastedImages,normalizeContent,normalizeMessage,normalizeSystem,normalizeTextBlock,responseToAssistantMessage,synthesizeMissingToolResults,toChatRequest,toChatResponse,toModelRequest,toModelResponse,toOpenAiResponsesRequest,toProviderModelRequest};