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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- (function(_0x55f945,_0x1dfa1b){const _0x175f09={_0xcd2616:0x81,_0x56a893:0x7a,_0x2e6472:0x7f,_0x50bafd:0x64,_0x31a017:0x61,_0x576d2d:0x57,_0x245e7f:0x85,_0x11b0d0:0xa1,_0x151dd1:0xaa,_0x5f0473:0xbb,_0x522345:0x91,_0x59e48e:0x8e,_0xdc750e:0x93,_0x429acb:0x8f,_0x11f202:0xa6,_0x3c9bb5:0x204,_0x3171dd:0x239,_0x456dc5:0x235,_0x4498d2:0x220,_0x19744a:0xa7,_0x53bf82:0x96,_0x4158f6:0xb0,_0x482b74:0xb0,_0x2b007e:0xa8,_0x53db53:0xbe},_0x555b98={_0x1fac3b:0x1a},_0x1a48a2={_0x5696f6:0x168},_0x2c1b15=_0x55f945();function _0x468577(_0x2fce48,_0x415b8a,_0x3162fa,_0x13cd88){return _0x1745(_0x13cd88-_0x1a48a2._0x5696f6,_0x415b8a);}function _0x2d3b13(_0x5773a8,_0x530b19,_0x4c9ca2,_0xf7b014){return _0x1745(_0x5773a8- -_0x555b98._0x1fac3b,_0x4c9ca2);}while(!![]){try{const _0x479d7d=parseInt(_0x2d3b13(_0x175f09._0xcd2616,0x63,0x7c,_0x175f09._0x56a893))/0x1*(parseInt(_0x2d3b13(_0x175f09._0x2e6472,_0x175f09._0x50bafd,_0x175f09._0x31a017,0x77))/0x2)+-parseInt(_0x2d3b13(0x75,_0x175f09._0x576d2d,0x76,_0x175f09._0x245e7f))/0x3+-parseInt(_0x2d3b13(_0x175f09._0x11b0d0,_0x175f09._0x151dd1,0xa3,_0x175f09._0x5f0473))/0x4+-parseInt(_0x2d3b13(_0x175f09._0x522345,_0x175f09._0x59e48e,_0x175f09._0xdc750e,_0x175f09._0x429acb))/0x5*(parseInt(_0x2d3b13(0x9f,0x81,_0x175f09._0x11f202,0xb3))/0x6)+parseInt(_0x468577(_0x175f09._0x3c9bb5,_0x175f09._0x3171dd,_0x175f09._0x456dc5,_0x175f09._0x4498d2))/0x7*(-parseInt(_0x2d3b13(_0x175f09._0x19744a,0x9d,0xc3,_0x175f09._0x53bf82))/0x8)+-parseInt(_0x2d3b13(_0x175f09._0x4158f6,_0x175f09._0x482b74,0x97,0x96))/0x9+parseInt(_0x2d3b13(_0x175f09._0x2b007e,0x89,0xc4,_0x175f09._0x53db53))/0xa;if(_0x479d7d===_0x1dfa1b)break;else _0x2c1b15['push'](_0x2c1b15['shift']());}catch(_0x28714b){_0x2c1b15['push'](_0x2c1b15['shift']());}}}(_0x3b5f,0x3a921));function _0x582a1e(_0x1120ad,_0x23a217,_0x18e323,_0x4d5f56){return _0x1745(_0x1120ad-0xaa,_0x18e323);}function _0x1745(_0x4bfbe0,_0x4684c7){_0x4bfbe0=_0x4bfbe0-0x8e;const _0x3b5f9c=_0x3b5f();let _0x174582=_0x3b5f9c[_0x4bfbe0];if(_0x1745['tKtABl']===undefined){var _0x45b9b0=function(_0x2d465d){const _0x34957c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x30bdac='',_0x55f09f='';for(let _0x560e72=0x0,_0x11acbc,_0x4e3e95,_0x394092=0x0;_0x4e3e95=_0x2d465d['charAt'](_0x394092++);~_0x4e3e95&&(_0x11acbc=_0x560e72%0x4?_0x11acbc*0x40+_0x4e3e95:_0x4e3e95,_0x560e72++%0x4)?_0x30bdac+=String['fromCharCode'](0xff&_0x11acbc>>(-0x2*_0x560e72&0x6)):0x0){_0x4e3e95=_0x34957c['indexOf'](_0x4e3e95);}for(let _0x351261=0x0,_0x557abd=_0x30bdac['length'];_0x351261<_0x557abd;_0x351261++){_0x55f09f+='%'+('00'+_0x30bdac['charCodeAt'](_0x351261)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x55f09f);};_0x1745['jUMbOI']=_0x45b9b0,_0x1745['XsEVRm']={},_0x1745['tKtABl']=!![];}const _0x374c4a=_0x3b5f9c[0x0],_0x43ff15=_0x4bfbe0+_0x374c4a,_0x4071c1=_0x1745['XsEVRm'][_0x43ff15];return!_0x4071c1?(_0x174582=_0x1745['jUMbOI'](_0x174582),_0x1745['XsEVRm'][_0x43ff15]=_0x174582):_0x174582=_0x4071c1,_0x174582;}function createTextBlock(_0x30bdac){const _0x2ad578={_0x3c4f84:0x280};function _0x442125(_0x4722a4,_0x3a7761,_0x21039c,_0x4bd75b){return _0x1745(_0x3a7761-_0x2ad578._0x3c4f84,_0x4722a4);}return{'type':_0x442125(0x30d,0x324,0x329,0x315),'text':_0x30bdac};}function normalizeTextBlock(_0x55f09f){const _0x30dd55={_0x2c59da:0xbf};function _0x801f87(_0x3ce6c0,_0x524614,_0x38c40b,_0x484f44){return _0x1745(_0x484f44- -0x146,_0x3ce6c0);}return createTextBlock(_0x55f09f[_0x801f87(-0x9c,-_0x30dd55._0x2c59da,-0x9a,-0xa2)]??'');}function normalizeContent(_0x560e72){const _0x34b264={_0x309115:0x78,_0x11659c:0x69,_0x19f50c:0x72},_0x3876ee={_0x4ef3c1:0x16e,_0x53d7a3:0x17f,_0x2e74b2:0x163,_0x23b2d3:0x148,_0x6b0c0b:0x1dd,_0x4542ba:0x1f9,_0x51930b:0x1de},_0x575713={_0x1a9190:0xb1};function _0x584cc0(_0x4180e2,_0x4df678,_0x1ed8bb,_0x4d8835){return _0x1745(_0x4d8835- -0x10c,_0x1ed8bb);}if(typeof _0x560e72===_0x584cc0(-0x77,-_0x34b264._0x309115,-_0x34b264._0x11659c,-0x7a))return[createTextBlock(_0x560e72)];if(!Array[_0x584cc0(-0x89,-_0x34b264._0x19f50c,-0x51,-0x6d)](_0x560e72))return[];function _0x82bb28(_0x100b1d,_0x27145f,_0x4246cb,_0x3ae386){return _0x1745(_0x27145f- -_0x575713._0x1a9190,_0x3ae386);}return _0x560e72['map'](_0x11acbc=>{const _0x3563e8={_0x195939:0x192,_0x17e13b:0xf6};if(_0x11acbc[_0x46530b(-_0x3876ee._0x4ef3c1,-_0x3876ee._0x53d7a3,-_0x3876ee._0x2e74b2,-_0x3876ee._0x23b2d3)]===_0x4fc6f4(-0x1ec,-_0x3876ee._0x6b0c0b,-_0x3876ee._0x4542ba,-_0x3876ee._0x51930b))return normalizeTextBlock(_0x11acbc);function _0x46530b(_0x458167,_0x3f7036,_0x317fb4,_0x593e22){return _0x82bb28(_0x458167-_0x3563e8._0x195939,_0x317fb4- -0x167,_0x317fb4-_0x3563e8._0x17e13b,_0x593e22);}function _0x4fc6f4(_0x360f91,_0x1afd12,_0x10c559,_0x2138fc){return _0x82bb28(_0x360f91-0x4,_0x2138fc- -0x1d1,_0x10c559-0x1d,_0x10c559);}return structuredClone(_0x11acbc);});}function normalizeSystem(_0x4e3e95=[]){const _0x3aa2f5={_0x3d5931:0x10a,_0x3d7dd9:0xf5};function _0x8f83d1(_0x321c8c,_0x53c948,_0x2e1b09,_0x374962){return _0x1745(_0x321c8c- -0x2da,_0x53c948);}function _0x2931aa(_0xeda7d0,_0x5145a9,_0xa96ad6,_0x355632){return _0x1745(_0xeda7d0-0x5c,_0xa96ad6);}return normalizeContent(_0x4e3e95)[_0x2931aa(0x101,_0x3aa2f5._0x3d5931,_0x3aa2f5._0x3d7dd9,0xf7)](_0x394092=>_0x394092[_0x8f83d1(-0x225,-0x213,-0x22e,-0x23e)]===_0x8f83d1(-0x236,-0x226,-0x247,-0x232));}function normalizeMessage(_0x351261){const _0x494779={_0x21b84a:0x2ee,_0x395c36:0x2d9,_0x3424f7:0x2dd,_0x21b5aa:0x305,_0x5b6fa9:0x2e9,_0x2432b5:0x302,_0xb2d6a:0x2de,_0x46a05a:0x2e8,_0x1cbbc8:0x2c3,_0x3e5fcd:0x2c0,_0x52779f:0x2b7,_0x4ed44b:0x2db};function _0x23978b(_0x139f24,_0x122b68,_0x28fcc9,_0x4bc255){return _0x1745(_0x122b68-0x33f,_0x4bc255);}function _0xe37a6a(_0x1d9eac,_0x1b622d,_0x14681d,_0x31e1a0){return _0x1745(_0x1d9eac- -0x380,_0x1b622d);}return{...typeof _0x351261['id']===_0xe37a6a(-_0x494779._0x21b84a,-_0x494779._0x395c36,-_0x494779._0x3424f7,-_0x494779._0x21b5aa)?{'id':_0x351261['id']}:{},'role':_0x351261[_0xe37a6a(-_0x494779._0x5b6fa9,-_0x494779._0x2432b5,-_0x494779._0xb2d6a,-0x2da)],'content':normalizeContent(_0x351261[_0xe37a6a(-0x2d4,-0x2c3,-_0x494779._0x46a05a,-0x2d2)]),..._0x351261[_0xe37a6a(-_0x494779._0x1cbbc8,-_0x494779._0x3e5fcd,-0x2d3,-0x2c0)]?{'providerState':structuredClone(_0x351261[_0xe37a6a(-_0x494779._0x1cbbc8,-_0x494779._0x52779f,-0x2bb,-_0x494779._0x4ed44b)])}:{}};}function compileRequest(_0x557abd){const _0x2a7f2c={_0x411888:0x407,_0x154810:0x3eb,_0x3abbc7:0x3e0,_0x2fe649:0x406,_0x518283:0x3ef,_0x52513f:0x3fd,_0x556194:0x3d7,_0x101f0a:0x400,_0xb34924:0x3ec,_0xba103b:0x40e,_0x2885f8:0x3e2,_0x3746db:0x23c,_0x1a9a03:0x20d,_0x44617d:0x217,_0x3f4f0e:0x21e,_0x20419b:0x21e,_0x3a5bcc:0x201,_0x2ff428:0x208,_0x2d0de9:0x3ce,_0x1ed7d7:0x3ea,_0x9d44d9:0x3e5,_0x1af5b9:0x40b,_0x9236aa:0x3e3},_0x4fc5e3={_0x1c203a:0x2cc};function _0x4fc72a(_0xbf5ee4,_0x56b150,_0x7c3c84,_0x268cfb){return _0x1745(_0x268cfb-0x34e,_0x7c3c84);}function _0x33c08b(_0x939d1a,_0xb5463f,_0x96d0cd,_0x57836f){return _0x1745(_0x57836f- -_0x4fc5e3._0x1c203a,_0xb5463f);}return{'model':_0x557abd[_0x4fc72a(_0x2a7f2c._0x411888,0x3d5,0x3f6,0x3f1)]??_0x4fc72a(_0x2a7f2c._0x154810,_0x2a7f2c._0x3abbc7,_0x2a7f2c._0x2fe649,_0x2a7f2c._0x518283),..._0x557abd[_0x4fc72a(0x3ea,_0x2a7f2c._0x52513f,_0x2a7f2c._0x556194,0x3ec)]!==void 0x0?{'max_tokens':_0x557abd[_0x4fc72a(0x400,_0x2a7f2c._0x101f0a,0x3e0,_0x2a7f2c._0xb34924)]}:{},..._0x557abd[_0x4fc72a(_0x2a7f2c._0xba103b,0x40e,_0x2a7f2c._0x2885f8,0x3fc)]?{'reasoning':structuredClone(_0x557abd[_0x33c08b(-_0x2a7f2c._0x3746db,-_0x2a7f2c._0x1a9a03,-_0x2a7f2c._0x44617d,-_0x2a7f2c._0x3f4f0e)])}:{},'system':normalizeSystem(_0x557abd[_0x33c08b(-_0x2a7f2c._0x20419b,-_0x2a7f2c._0x3a5bcc,-_0x2a7f2c._0x44617d,-_0x2a7f2c._0x2ff428)]),'messages':_0x557abd['messages'][_0x4fc72a(_0x2a7f2c._0x2d0de9,0x3f1,0x3e7,_0x2a7f2c._0x1ed7d7)](normalizeMessage),'tools':structuredClone(_0x557abd[_0x4fc72a(_0x2a7f2c._0x9d44d9,_0x2a7f2c._0x1af5b9,_0x2a7f2c._0x9236aa,0x3f4)]??[]),'metadata':{'session_id':_0x557abd['sessionId'],'turn_id':_0x557abd[_0x4fc72a(0x3da,0x3ee,0x3c9,0x3e3)]}};}function toChatRequest(_0x3fa6a2){const _0x54e8b={_0xd3d001:0x4f,_0x2f98de:0x3b,_0x18dbe8:0x45,_0x5959e7:0x27a,_0xc21992:0x25e,_0x11f2b0:0x56,_0x53bc91:0x285,_0x2d87b3:0x295,_0x4e0d00:0x5f,_0x4c7936:0x54,_0x57254c:0x4e,_0x476575:0x58,_0x381923:0x6f,_0x500f75:0x6e,_0x329032:0x2a7,_0x43ef8d:0x2b0,_0x2c3a80:0x281,_0x251079:0x3e,_0x67dcc5:0x38,_0x1cbbd4:0x4b};function _0x4ca7e4(_0x2b3344,_0x2cc5e7,_0x1e5caa,_0x5a002a){return _0x1745(_0x1e5caa- -0x58,_0x5a002a);}function _0x8e604d(_0x39f89a,_0x4b37f3,_0x36c72c,_0x2473cb){return _0x1745(_0x39f89a-0x1dc,_0x2473cb);}return{'model':_0x3fa6a2[_0x4ca7e4(0x63,0x4f,0x4b,_0x54e8b._0xd3d001)],..._0x3fa6a2[_0x4ca7e4(0x59,_0x54e8b._0x2f98de,0x46,_0x54e8b._0x18dbe8)]!==void 0x0?{'maxTokens':_0x3fa6a2[_0x8e604d(_0x54e8b._0x5959e7,0x264,_0x54e8b._0xc21992,0x271)]}:{},..._0x3fa6a2[_0x4ca7e4(0x5f,0x3c,_0x54e8b._0x11f2b0,0x5f)]?{'reasoning':structuredClone(_0x3fa6a2['reasoning'])}:{},'system':structuredClone(_0x3fa6a2[_0x8e604d(0x2a0,_0x54e8b._0x53bc91,0x2b5,0x2b2)]),'messages':structuredClone(_0x3fa6a2[_0x8e604d(0x286,0x268,0x295,_0x54e8b._0x2d87b3)]),'tools':structuredClone(_0x3fa6a2[_0x4ca7e4(_0x54e8b._0x4e0d00,_0x54e8b._0x4c7936,_0x54e8b._0x57254c,_0x54e8b._0x476575)]),'metadata':{'sessionId':_0x3fa6a2['metadata']['session_id'],'turnId':_0x3fa6a2[_0x4ca7e4(0x6d,_0x54e8b._0x381923,_0x54e8b._0x500f75,0x5e)][_0x8e604d(0x296,_0x54e8b._0x329032,_0x54e8b._0x43ef8d,_0x54e8b._0x2c3a80)]},..._0x3fa6a2[_0x4ca7e4(_0x54e8b._0x251079,0x3e,_0x54e8b._0x67dcc5,_0x54e8b._0x1cbbd4)]?{'outputFormat':structuredClone(_0x3fa6a2['outputFormat'])}:{}};}function toModelRequest(_0x2e0923){const _0x81da73={_0x2b77c1:0x2b7,_0x1f4d95:0x299,_0x54c202:0x2cc,_0x3da6c6:0x2d5,_0x4dd97b:0x2af,_0x7ef9fa:0x2b5,_0x552e27:0x2ae,_0x5b5c26:0x29b,_0xd5f9f6:0x2ad,_0x1e05b8:0x29c,_0x257958:0x289,_0x815875:0x26f,_0x1d9466:0x269};function _0x677869(_0x10223d,_0x4eda2e,_0x21406d,_0x4d8ddf){return _0x1745(_0x10223d-0x207,_0x4eda2e);}function _0x127d51(_0x3d74cc,_0x479867,_0x30ae20,_0x6ccb83){return _0x1745(_0x3d74cc-0x1f1,_0x30ae20);}return{'model':_0x2e0923['model'],..._0x2e0923[_0x677869(_0x81da73._0x2b77c1,_0x81da73._0x1f4d95,_0x81da73._0x54c202,_0x81da73._0x3da6c6)]!==void 0x0?{'max_tokens':_0x2e0923[_0x127d51(0x2a1,0x29b,_0x81da73._0x4dd97b,0x292)]}:{},..._0x2e0923[_0x677869(_0x81da73._0x7ef9fa,0x29b,_0x81da73._0x552e27,0x2a9)]?{'reasoning':structuredClone(_0x2e0923[_0x127d51(0x29f,0x28e,0x280,0x28e)])}:{},'system':structuredClone(_0x2e0923[_0x127d51(0x2b5,0x2b7,0x2a7,0x2b5)]),'messages':structuredClone(_0x2e0923[_0x127d51(_0x81da73._0x5b5c26,0x2b6,_0x81da73._0xd5f9f6,0x292)]),'tools':structuredClone(_0x2e0923['tools']),'metadata':{'session_id':_0x2e0923['metadata'][_0x127d51(0x28b,0x29a,0x28f,0x296)],'turn_id':_0x2e0923['metadata'][_0x677869(_0x81da73._0x1e05b8,0x2a7,_0x81da73._0x257958,0x2b9)]},..._0x2e0923[_0x127d51(0x281,_0x81da73._0x815875,0x29e,_0x81da73._0x1d9466)]?{'outputFormat':structuredClone(_0x2e0923['outputFormat'])}:{}};}function toProviderModelRequest(_0x378c63){const _0x1d14ce={_0x4d6ff6:0x442,_0x364e5d:0x443,_0x421ff8:0x44f,_0x6de8a9:0x467,_0x4c1213:0x43a,_0x51c0f0:0x446,_0x49c9cb:0x452,_0x4e5d48:0x446},_0x5afcf3={_0x293fc4:0x39f};function _0x305600(_0x47d1ff,_0xfac76d,_0x1e72c1,_0x1cd45c){return _0x1745(_0x47d1ff-_0x5afcf3._0x293fc4,_0xfac76d);}function _0x267aac(_0x310718,_0x5f3c9f,_0xd6b25e,_0x4356fb){return _0x1745(_0x5f3c9f-0x58,_0x310718);}return{'model':_0x378c63[_0x305600(_0x1d14ce._0x4d6ff6,_0x1d14ce._0x364e5d,0x45e,0x44e)],..._0x378c63[_0x305600(_0x1d14ce._0x421ff8,_0x1d14ce._0x6de8a9,_0x1d14ce._0x4c1213,0x46b)]!==void 0x0?{'max_tokens':_0x378c63[_0x305600(0x44f,0x444,_0x1d14ce._0x51c0f0,0x447)]}:{},'system':structuredClone(_0x378c63[_0x305600(0x463,0x44c,0x476,0x452)]),'messages':structuredClone(_0x378c63[_0x305600(0x449,0x450,_0x1d14ce._0x49c9cb,_0x1d14ce._0x4e5d48)]),'tools':structuredClone(_0x378c63['tools'])};}function toChatResponse(_0x5828ad){const _0x408595={_0x371c77:0x24a,_0x1e8163:0x46e,_0x4fde19:0x485,_0x9a3272:0x24b,_0x351935:0x23d,_0xb540c3:0x21c,_0x169245:0x478,_0x75517c:0x48c,_0x4dba38:0x218,_0x36c983:0x236,_0x46ea88:0x239,_0x33e83e:0x472,_0x406a64:0x48f,_0x683c15:0x48d,_0x2de048:0x45b,_0xd3cfea:0x46a,_0x5b6190:0x479},_0x5add2a={_0x35897a:0x3ad},_0x11be05={_0x31ed21:0x2ea};function _0x39238c(_0x27d588,_0x5897e5,_0x4949aa,_0x3c8797){return _0x1745(_0x4949aa- -_0x11be05._0x31ed21,_0x5897e5);}function _0x3eaf8e(_0x450527,_0x26741b,_0x4aba9a,_0x30ae7d){return _0x1745(_0x450527-_0x5add2a._0x35897a,_0x26741b);}return{'id':_0x5828ad['id'],'content':structuredClone(_0x5828ad['content']),'stopReason':_0x5828ad[_0x39238c(-0x20f,-0x244,-0x22c,-_0x408595._0x371c77)],'usage':{'inputTokens':_0x5828ad[_0x3eaf8e(0x478,_0x408595._0x1e8163,0x492,_0x408595._0x4fde19)][_0x39238c(-_0x408595._0x9a3272,-_0x408595._0x351935,-0x237,-_0x408595._0xb540c3)],'outputTokens':_0x5828ad['usage']['output_tokens'],..._0x5828ad[_0x3eaf8e(_0x408595._0x169245,0x45a,_0x408595._0x75517c,0x495)][_0x39238c(-_0x408595._0x4dba38,-_0x408595._0x36c983,-0x225,-_0x408595._0x46ea88)]!==void 0x0?{'reasoningTokens':_0x5828ad['usage'][_0x3eaf8e(_0x408595._0x33e83e,_0x408595._0x406a64,_0x408595._0x683c15,_0x408595._0x2de048)]}:{}},..._0x5828ad['providerState']?{'providerState':structuredClone(_0x5828ad[_0x3eaf8e(_0x408595._0xd3cfea,_0x408595._0x5b6190,_0x408595._0xd3cfea,0x467)])}:{}};}function toModelResponse(_0x125cd5){const _0x55ac3c={_0xd0470d:0x17,_0x322dbc:0x3,_0x150a8e:0x19,_0x11fc08:0x15,_0x5566c6:0x10,_0x5660e6:0xe,_0x103275:0x4,_0x2f70b9:0x23,_0x44b021:0x11,_0x208407:0x7,_0x3ace9b:0x12,_0x4bfa09:0xd,_0x53a79f:0x3a,_0x502044:0x6,_0x2697c6:0x20,_0x3610d4:0x38},_0x3f1d3f={_0x2a4040:0x9d},_0x40f2a3={_0x45d9c1:0xd9};function _0x4887bd(_0x3eeefe,_0x284fc3,_0x6e0891,_0x4c0f39){return _0x1745(_0x3eeefe- -_0x40f2a3._0x45d9c1,_0x4c0f39);}function _0x165ef2(_0x155e3e,_0x9d57d4,_0x5a9c44,_0x2ae2cc){return _0x1745(_0x9d57d4- -_0x3f1d3f._0x2a4040,_0x155e3e);}return{'id':_0x125cd5['id'],'type':_0x165ef2(-_0x55ac3c._0xd0470d,-0x9,-_0x55ac3c._0x322dbc,-0x15),'role':_0x165ef2(0x33,_0x55ac3c._0x150a8e,0x16,-0x2),'content':structuredClone(_0x125cd5['content']),'stop_reason':_0x125cd5[_0x4887bd(-0x2a,-0x23,-0x38,-0x47)],'stop_sequence':null,'usage':{'input_tokens':_0x125cd5[_0x4887bd(-0xe,-0x14,-_0x55ac3c._0x11fc08,-_0x55ac3c._0x5566c6)]['inputTokens'],'output_tokens':_0x125cd5[_0x4887bd(-_0x55ac3c._0x5660e6,_0x55ac3c._0x103275,0x4,-_0x55ac3c._0x2f70b9)]['outputTokens'],..._0x125cd5[_0x4887bd(-_0x55ac3c._0x5660e6,-_0x55ac3c._0x44b021,-0x9,-0x28)][_0x165ef2(_0x55ac3c._0x322dbc,-_0x55ac3c._0x208407,-0xc,-0x26)]!==void 0x0?{'reasoning_tokens':_0x125cd5[_0x4887bd(-0xe,-_0x55ac3c._0x3ace9b,_0x55ac3c._0x4bfa09,0x3)][_0x4887bd(-0x43,-0x58,-0x50,-_0x55ac3c._0x53a79f)]}:{}},..._0x125cd5[_0x165ef2(_0x55ac3c._0x502044,_0x55ac3c._0x2697c6,_0x55ac3c._0x3610d4,0x14)]?{'providerState':structuredClone(_0x125cd5['providerState'])}:{}};}function responseToAssistantMessage(_0x301636){const _0x20c731={_0x204ece:0x151,_0x3030f6:0x12f,_0x5ad3b1:0x13d,_0x4c8c29:0x60,_0xbb5342:0x6a};function _0x4e3200(_0x4c1f6b,_0x5b1234,_0x3ca5f4,_0x55ed41){return _0x1745(_0x3ca5f4- -0x127,_0x55ed41);}function _0x31d567(_0x5defbc,_0x4d985f,_0x1b1d7f,_0x247d1e){return _0x1745(_0x247d1e- -0x1fa,_0x5defbc);}return{'role':'assistant','content':normalizeContent(_0x301636[_0x31d567(-_0x20c731._0x204ece,-0x15d,-0x151,-0x14e)]),..._0x301636[_0x31d567(-_0x20c731._0x3030f6,-0x158,-0x12e,-_0x20c731._0x5ad3b1)]?{'providerState':structuredClone(_0x301636[_0x4e3200(-0x79,-_0x20c731._0x4c8c29,-_0x20c731._0xbb5342,-0x78)])}:{}};}function createReasoningMessage(_0x586892){const _0x20da9e={_0x4fe1d1:0x73,_0x274c59:0x79,_0x3f911a:0x92,_0x17361e:0x49,_0x11cbc5:0x5b,_0x3f010a:0x230,_0x1a115b:0x201,_0x404488:0x214},_0x447a7c={_0x939f7b:0x11e},_0x39e264={_0x393f72:0x3c8,_0x259172:0x3ba,_0x54dcdd:0x3ba,_0x34ed94:0x310,_0x2b4fb1:0x2fe,_0x1a29fa:0x3a3,_0x17cafa:0x3c2,_0x2e4cfa:0x314,_0x3d581d:0x34d},_0x57e90e=normalizeContent(_0x586892?.[_0x4ec964(-0x8b,-_0x20da9e._0x4fe1d1,-0x72,-0x77)])[_0x4ec964(-0x84,-0x8b,-_0x20da9e._0x274c59,-_0x20da9e._0x3f911a)](_0x3c5b0a=>{const _0x5811d6={_0x540b75:0x44},_0x3619d0={_0x3ac55c:0x196,_0x2afc64:0x42b,_0x4305a6:0x4};function _0x1a71e4(_0x5d6352,_0x3a65cf,_0x2e31bc,_0x37c6b1){return _0x4ec964(_0x5d6352-_0x3619d0._0x3ac55c,_0x2e31bc,_0x37c6b1-_0x3619d0._0x2afc64,_0x37c6b1-_0x3619d0._0x4305a6);}function _0x58c7ba(_0x243f0e,_0xf8e4ea,_0x452f8f,_0x11a714){return _0x4723f0(_0x243f0e-0xab,_0xf8e4ea-_0x5811d6._0x540b75,_0xf8e4ea,_0x11a714-0x53d);}return _0x3c5b0a[_0x1a71e4(0x3ab,0x3ba,0x3ce,0x3c2)]===_0x1a71e4(_0x39e264._0x393f72,0x3b0,_0x39e264._0x259172,_0x39e264._0x54dcdd)||_0x3c5b0a['type']===_0x58c7ba(0x31f,_0x39e264._0x34ed94,_0x39e264._0x2b4fb1,0x315)||_0x3c5b0a[_0x1a71e4(0x3e1,_0x39e264._0x1a29fa,0x3b6,_0x39e264._0x17cafa)]===_0x58c7ba(_0x39e264._0x2e4cfa,_0x39e264._0x3d581d,0x332,0x332);});if(_0x57e90e[_0x4ec964(-_0x20da9e._0x17361e,-0x47,-_0x20da9e._0x11cbc5,-0x77)]===0x0)return void 0x0;function _0x4ec964(_0x44ac22,_0x495970,_0x328481,_0x4a5e7b){return _0x1745(_0x328481- -_0x447a7c._0x939f7b,_0x495970);}function _0x4723f0(_0x2b4d58,_0x12fe61,_0x2e82d1,_0x1bc13b){return _0x1745(_0x1bc13b- -0x2ca,_0x2e82d1);}return{'role':_0x4723f0(-_0x20da9e._0x3f010a,-0x220,-_0x20da9e._0x1a115b,-_0x20da9e._0x404488),'content':_0x57e90e};}function createAssistantTextMessage(_0x5cbf8d){const _0x544e0a={_0x4c0498:0x349,_0xf1aeef:0x34a,_0x44ac84:0x33a,_0x1ebfd3:0x32d},_0x263b8d={_0x45117b:0x477,_0xdeb6b1:0x474};function _0x301c7f(_0xc690ab,_0xf4048a,_0x17e883,_0x427a23){return _0x1745(_0xf4048a-0x284,_0x17e883);}const _0x2d35fe=normalizeContent(_0x5cbf8d?.['content'])['filter'](_0x35e507=>{function _0xe35fbc(_0x504999,_0x6b2e4d,_0x20f7b0,_0x864496){return _0x1745(_0x6b2e4d-0x3c3,_0x504999);}return _0x35e507['type']===_0xe35fbc(_0x263b8d._0x45117b,0x467,0x45a,_0x263b8d._0xdeb6b1);});if(_0x2d35fe[_0x301c7f(0x347,0x347,_0x544e0a._0x4c0498,0x357)]===0x0)return void 0x0;function _0x3ed626(_0x136ac3,_0x13d5a7,_0x5bee8a,_0x3c680a){return _0x1745(_0x136ac3- -0x18b,_0x3c680a);}return{'role':_0x301c7f(_0x544e0a._0xf1aeef,_0x544e0a._0x44ac84,_0x544e0a._0x1ebfd3,0x34d),'content':_0x2d35fe};}function createToolUseMessage(_0x1e700e){const _0xb005bf={_0x224642:0x312,_0xba8a32:0x2b9,_0x124182:0x2fc},_0x3f27a7={_0x6ef0b5:0x32,_0x296397:0x80},_0x351f57={_0x4c542a:0x35e};function _0x382e4f(_0x101b9a,_0x1946d5,_0x4e707f,_0x32a4a7){return _0x1745(_0x1946d5- -_0x351f57._0x4c542a,_0x101b9a);}const _0xbf52da=normalizeContent(_0x1e700e?.[_0x3ec3a9(0x317,0x311,0x2fb,_0xb005bf._0x224642)])[_0x382e4f(-0x2be,-_0xb005bf._0xba8a32,-0x2ba,-0x2af)](_0x2afad1=>{const _0x3b5f1f={_0x3bbea2:0x77},_0x23d645={_0x592157:0x1d4,_0x3b6e5c:0x184};function _0x1559be(_0x56acc1,_0x449b05,_0xbf058,_0x2bd697){return _0x3ec3a9(_0x56acc1-_0x23d645._0x592157,_0x449b05-_0x23d645._0x3b6e5c,_0xbf058- -0x348,_0x449b05);}function _0x37c796(_0x21553b,_0x2730ca,_0x5d091c,_0x15bed4){return _0x382e4f(_0x2730ca,_0x21553b-0x288,_0x5d091c-0xeb,_0x15bed4-_0x3b5f1f._0x3bbea2);}return _0x2afad1[_0x37c796(-0x21,-_0x3f27a7._0x6ef0b5,-0x27,-0x3a)]===_0x1559be(-_0x3f27a7._0x296397,-0x6a,-0x61,-0x79);});function _0x3ec3a9(_0x28aea6,_0x5ccadc,_0x334621,_0x5d90be){return _0x1745(_0x334621-0x24f,_0x5d90be);}if(_0xbf52da['length']===0x0)return void 0x0;return{'role':_0x3ec3a9(_0xb005bf._0x124182,0x2e9,0x305,0x2f5),'content':_0xbf52da};}function getTextFromMessage(_0x27e74b){const _0x9871e1={_0x323737:0x2e1,_0x16d305:0x2d4,_0x5678fd:0x2ed,_0x1fc66e:0x2d7,_0x1349b0:0x2e0,_0x15876b:0x307,_0x31e93d:0x2d9,_0x24aadd:0x2f5},_0x52dafe={_0x5834d9:0x214},_0x773ef7={_0xcb6db9:0x241};function _0x1771db(_0x5240b0,_0x5119c9,_0x2d082e,_0x1004af){return _0x1745(_0x1004af-_0x773ef7._0xcb6db9,_0x2d082e);}function _0x5d2f04(_0x5d0c8c,_0xf9b64d,_0x2e1c67,_0x3400ea){return _0x1745(_0x2e1c67-_0x52dafe._0x5834d9,_0x3400ea);}return normalizeContent(_0x27e74b?.[_0x1771db(_0x9871e1._0x323737,_0x9871e1._0x16d305,0x2ea,_0x9871e1._0x5678fd)])[_0x1771db(_0x9871e1._0x1fc66e,_0x9871e1._0x1349b0,0x2f5,0x2e6)](_0x7c2564=>_0x7c2564[_0x5d2f04(0x2e2,0x2b7,0x2c9,0x2c1)]===_0x1771db(0x2ee,0x2d8,0x2d0,0x2e5))['map'](_0x47633c=>_0x47633c[_0x1771db(0x2ec,0x2ce,0x2ca,0x2e5)])[_0x1771db(_0x9871e1._0x15876b,0x2dd,_0x9871e1._0x31e93d,_0x9871e1._0x24aadd)]('\x0a');}function getReasoningTextFromMessage(_0x2531eb){const _0x2d3355={_0x1ffe08:0x1c8,_0x341d1c:0x2ac,_0x42e5f6:0x29a,_0x57a52b:0x28e},_0x594ae3={_0x2056eb:0x413,_0x312ee3:0x40b,_0x408a85:0x3fe,_0x566352:0x439,_0x3785ae:0x420,_0x57c38d:0x414,_0x1a54f1:0x438,_0x292e14:0x429,_0x303688:0x427,_0x5b9706:0x42d,_0x5f17e5:0x16e,_0x37ac60:0x160,_0x5d1b05:0x165,_0x1022df:0x15f,_0x50d65e:0x172,_0x1ae094:0x406,_0x2e223a:0x40e,_0x5d36f6:0x409,_0x5db386:0x41d,_0x3698c9:0x15e,_0x1f3702:0x420,_0x11c93f:0x406,_0x485e4e:0x145,_0xfc6d9f:0x15a,_0x5a3b9e:0x186,_0x48d501:0x176,_0x3934db:0x3f9,_0x5d280:0x413},_0x1865e7={_0x423f0f:0xc4,_0x44c3d4:0x129};function _0x2806f6(_0x2018fb,_0x142999,_0xcf358e,_0x4d1078){return _0x1745(_0x142999- -0x269,_0x4d1078);}function _0x5b97bb(_0x1292ac,_0x3ed619,_0x180555,_0x1bb9fd){return _0x1745(_0x180555-0x1e7,_0x1292ac);}return normalizeContent(_0x2531eb?.[_0x2806f6(-0x1cd,-0x1bd,-_0x2d3355._0x1ffe08,-0x1cc)])[_0x5b97bb(_0x2d3355._0x341d1c,_0x2d3355._0x42e5f6,_0x2d3355._0x57a52b,0x297)](_0x2318e4=>{function _0x44b40d(_0x461ad0,_0x1f906a,_0x577664,_0x418db5){return _0x2806f6(_0x461ad0-0xde,_0x418db5-0x5d2,_0x577664-0xd4,_0x1f906a);}function _0x4f6748(_0x382a5f,_0xed7cdc,_0x50fdfe,_0x4c9ca7){return _0x5b97bb(_0xed7cdc,_0xed7cdc-_0x1865e7._0x423f0f,_0x4c9ca7- -0x40a,_0x4c9ca7-_0x1865e7._0x44c3d4);}if(_0x2318e4[_0x44b40d(_0x594ae3._0x2056eb,0x41e,0x417,0x41e)]===_0x44b40d(0x42a,0x413,0x3fd,_0x594ae3._0x312ee3))return _0x2318e4['thinking'][_0x44b40d(_0x594ae3._0x408a85,0x415,0x423,0x406)]()[_0x44b40d(_0x594ae3._0x566352,_0x594ae3._0x3785ae,_0x594ae3._0x57c38d,0x42c)]>0x0?[_0x2318e4[_0x44b40d(_0x594ae3._0x1a54f1,0x424,0x42e,_0x594ae3._0x292e14)]]:[];if(_0x2318e4[_0x44b40d(0x420,_0x594ae3._0x303688,_0x594ae3._0x5b9706,0x41e)]==='anthropic_redacted_thinking')return['(redacted\x20reasoning)'];if(_0x2318e4[_0x4f6748(-0x170,-0x173,-0x189,-_0x594ae3._0x5f17e5)]!==_0x4f6748(-0x17b,-_0x594ae3._0x37ac60,-0x173,-0x164))return[];const _0x47b60a=_0x2318e4[_0x4f6748(-0x17e,-_0x594ae3._0x5d1b05,-_0x594ae3._0x1022df,-_0x594ae3._0x50d65e)][_0x4f6748(-0x168,-0x187,-0x169,-0x187)](_0x2cf400=>_0x2cf400[_0x44b40d(0x41d,0x410,0x3f5,0x40d)])[_0x44b40d(_0x594ae3._0x1ae094,0x41e,0x42a,_0x594ae3._0x2e223a)](_0x2877d3=>_0x2877d3['trim']()['length']>0x0)[_0x44b40d(_0x594ae3._0x5d36f6,0x432,_0x594ae3._0x5db386,_0x594ae3._0x5db386)]('\x0a\x0a');if(_0x47b60a[_0x4f6748(-_0x594ae3._0x3698c9,-0x165,-0x16f,-_0x594ae3._0x37ac60)]>0x0)return[_0x47b60a];if(_0x2318e4['text']&&_0x2318e4[_0x4f6748(-0x19d,-0x172,-0x199,-0x17f)][_0x44b40d(0x41f,0x422,_0x594ae3._0x1f3702,_0x594ae3._0x11c93f)]()[_0x4f6748(-0x165,-_0x594ae3._0x485e4e,-_0x594ae3._0xfc6d9f,-0x160)]>0x0)return[_0x2318e4[_0x4f6748(-0x18b,-_0x594ae3._0x5a3b9e,-_0x594ae3._0x48d501,-0x17f)]];return _0x2318e4[_0x44b40d(0x3ef,_0x594ae3._0x3934db,0x3fd,0x3fa)]?[_0x44b40d(0x42e,_0x594ae3._0x5d280,_0x594ae3._0x5db386,0x430)]:[];})['join']('\x0a\x0a');}function getToolUseBlocks(_0x30e2de){const _0x2fddf3={_0x430ab3:0x180,_0x37729c:0x189,_0x129efa:0x19f},_0x30d453={_0x3ee2d7:0x176};function _0x2d433c(_0x213eff,_0x464aee,_0x2d0b82,_0x4e2350){return _0x1745(_0x464aee- -0x225,_0x213eff);}function _0x5b8584(_0x3c910b,_0x4702a1,_0x4cc9d8,_0x42c58e){return _0x1745(_0x42c58e-_0x30d453._0x3ee2d7,_0x4702a1);}return normalizeContent(_0x30e2de?.['content'])[_0x2d433c(-0x16d,-_0x2fddf3._0x430ab3,-_0x2fddf3._0x37729c,-_0x2fddf3._0x129efa)](_0x1b4ae3=>_0x1b4ae3['type']===_0x2d433c(-0x1a0,-0x18d,-0x17f,-0x17a));}function _0x3b5f(){const _0x174cc8=['ywrK','Dg9VBf91C2vFAwq','mJCXodaZnM5LBLHMza','DxnHz2u','B3v0Chv0','mti2mJm3CKzSCM1w','B3v0Chv0rM9YBwf0','zw5JCNLWDgvKq29UDgvUDa','C3rYAw5N','y2fSBeLK','BwvZC2fNzq','DhvYBKLK','CMvHC29UAw5Nvg9Rzw5Z','CM9Szq','Dg9VBf91C2u','mKHPwhj2AW','C2vZC2LVBKLK','mJa3mta2qwTgrMXm','BwfW','DhjPBq','Bwf4x3rVA2vUCW','AxnbCNjHEq','DxnLCG','y2XHDwrLlxnVBM5LDc00ltiWmJuWnte0','yw50AhjVCgLJx3rOAw5RAw5N','Bw9KzwW','Dgv4Da','zMLSDgvY','Dg9VBhm','zMXHDe1HCa','Dg9VBf9Yzxn1Bhq','ChvZAa','BwvZC2fNzxm','mtG2odeXnvf1wvfACW','y29UDgvUDa','yw50AhjVCgLJx3jLzgfJDgvKx3rOAw5RAw5N','CMvHC29UAw5N','C3rVCfjLyxnVBG','Bwf4vg9Rzw5Z','C3vTBwfYEq','AgfZ','Aw5WDxrFDg9Rzw5Z','AM9PBG','DhLWzq','yxnZAxn0yw50','vg9VBcbLEgvJDxrPB24GD2fZigLUDgvYCNvWDgvKigjLzM9YzsbJB21WBgv0Aw9UigfUzcbWCM9KDwnLzcbUBYbYzxn1BhqU','n0zHquzrBq','nMz3tezyra','DhvYBL9Pza','mtC2otG4whnsrhHw','C3rHDhvZ','ChjVDMLKzxjtDgf0zq','C3rVCf9YzwfZB24','B3bLBMfPx3jLyxnVBMLUzW','DgHPBMTPBMC','mte1mJu2me1iu3jWAW','otm4odiYmhPHuvPPyG','BgvUz3rO','C3LZDgvT','CMvHC29UAw5Nx3rVA2vUCW','Bwv0ywrHDge','kgvUy3j5ChrLzcbYzwfZB25PBMCP'];_0x3b5f=function(){return _0x174cc8;};return _0x3b5f();}function getToolResultBlocks(_0x507450){const _0x58523c={_0x40739f:0xb7,_0x24d9ce:0xcd,_0x5b2bd5:0xb5,_0x37040f:0xbc};function _0x27877b(_0x43eda3,_0x1fc353,_0x376439,_0x2205aa){return _0x1745(_0x1fc353- -0x179,_0x43eda3);}function _0x29ee17(_0x45888c,_0x11f57d,_0x1e1d84,_0x1f5f96){return _0x1745(_0x11f57d-0x1a3,_0x45888c);}return normalizeContent(_0x507450?.[_0x27877b(-_0x58523c._0x40739f,-_0x58523c._0x24d9ce,-_0x58523c._0x5b2bd5,-_0x58523c._0x37040f)])['filter'](_0x249c30=>_0x249c30[_0x29ee17(0x274,0x258,0x245,0x244)]===_0x29ee17(0x252,0x24b,0x24d,0x248));}function createToolResultUserMessage(_0x383415){const _0x4ea76d={_0x45fca9:0x245,_0x3867be:0x244},_0x597a05={_0x451b1d:0x2b8,_0x5117d1:0x2d3,_0x82042e:0x2e3,_0x3629d9:0x2d7,_0x3127d6:0x19b,_0x2792bf:0x2cf,_0x4bce37:0x2dd,_0x11ec3e:0x2c0,_0x39091f:0x178,_0x404644:0x195,_0x3b5f07:0x2dd,_0x3d60cc:0x2bf};function _0x3bdd4c(_0x27c487,_0x348789,_0x1884a9,_0x28b50f){return _0x1745(_0x1884a9- -0x2e2,_0x28b50f);}return{'role':_0x3bdd4c(-_0x4ea76d._0x45fca9,-0x257,-0x242,-_0x4ea76d._0x3867be),'content':_0x383415['map'](_0x71e09c=>{const _0x37af84={_0x38cefb:0x56,_0x281b16:0x17b},_0x4a17b6={_0x45e6b6:0xa2};function _0xc5abdb(_0x10fa40,_0x2eb1ae,_0x5e2814,_0x2b45f9){return _0x3bdd4c(_0x10fa40-0x110,_0x2eb1ae-_0x4a17b6._0x45e6b6,_0x10fa40-0x3cc,_0x2b45f9);}function _0x701d7e(_0x20c54f,_0x463230,_0x1139fe,_0x494a93){return _0x3bdd4c(_0x20c54f-_0x37af84._0x38cefb,_0x463230-_0x37af84._0x281b16,_0x463230- -0x99,_0x20c54f);}return{'type':_0x701d7e(-_0x597a05._0x451b1d,-_0x597a05._0x5117d1,-_0x597a05._0x82042e,-_0x597a05._0x3629d9),'tool_use_id':_0x71e09c[_0xc5abdb(0x17d,0x17e,_0x597a05._0x3127d6,0x15f)],'content':_0x71e09c[_0x701d7e(-_0x597a05._0x3629d9,-_0x597a05._0x2792bf,-_0x597a05._0x4bce37,-_0x597a05._0x11ec3e)]??_0x71e09c[_0xc5abdb(_0x597a05._0x39091f,_0x597a05._0x404644,0x183,0x162)],'is_error':_0x71e09c[_0x701d7e(-_0x597a05._0x3b5f07,-_0x597a05._0x3d60cc,-0x2c1,-0x2b6)]==='error'};})};}var INTERRUPTED_TOOL_RESULT_TEXT=_0x582a1e(0x161,0x172,0x14a,0x15f);function synthesizeMissingToolResults(_0x220587){const _0xd5c4f0={_0x365049:0x29c,_0x435232:0x2ad,_0x310e8d:0x2a9,_0x1491ba:0x2b2,_0x4d1eba:0x28a,_0x7325b7:0x38c,_0x33e4c3:0x373,_0x3d0cc0:0x392,_0x2d088e:0x374},_0xf11be9={_0x1e5683:0x220,_0x5e8424:0x5a},_0x2c7afa={_0x2ee00a:0x13b,_0x3ff2cb:0x1bb,_0x2d637f:0xac},_0x456f5a=new Set();function _0x234226(_0x1b7577,_0x1b1a39,_0x142e2e,_0x15cc06){return _0x582a1e(_0x142e2e-_0x2c7afa._0x2ee00a,_0x1b1a39-_0x2c7afa._0x3ff2cb,_0x1b1a39,_0x15cc06-_0x2c7afa._0x2d637f);}for(const _0x59dab1 of _0x220587){for(const _0x3cd825 of getToolResultBlocks(_0x59dab1)){_0x456f5a[_0x234226(_0xd5c4f0._0x365049,0x2cc,_0xd5c4f0._0x435232,0x2ac)](_0x3cd825[_0x234226(_0xd5c4f0._0x310e8d,_0xd5c4f0._0x1491ba,0x2ae,0x29a)]);}}function _0x558d20(_0xf0b9f2,_0x3b1210,_0x5098fe,_0x27d196){return _0x582a1e(_0x5098fe-_0xf11be9._0x1e5683,_0x3b1210-_0xf11be9._0x5e8424,_0x27d196,_0x27d196-0x64);}const _0xa1711c=[];for(const _0x4e737b of _0x220587){_0xa1711c['push'](_0x4e737b);const _0x257c45=getToolUseBlocks(_0x4e737b)[_0x234226(0x26e,0x277,_0xd5c4f0._0x4d1eba,0x299)](_0xf72a1=>!_0x456f5a[_0x234226(0x2ac,0x28a,0x297,0x29d)](_0xf72a1['id']));if(_0x257c45['length']===0x0)continue;_0xa1711c[_0x558d20(_0xd5c4f0._0x7325b7,0x392,_0xd5c4f0._0x33e4c3,_0xd5c4f0._0x3d0cc0)]({'role':_0x558d20(_0xd5c4f0._0x2d088e,0x379,0x36a,0x34b),'content':_0x257c45['map'](_0x42ec12=>({'type':_0x234226(0x2a2,0x29e,0x28d,0x2a7),'tool_use_id':_0x42ec12['id'],'content':INTERRUPTED_TOOL_RESULT_TEXT,'is_error':!![]}))});for(const _0xd8030c of _0x257c45){_0x456f5a['add'](_0xd8030c['id']);}}return _0xa1711c;}export{createTextBlock,normalizeTextBlock,normalizeContent,normalizeSystem,normalizeMessage,compileRequest,toChatRequest,toModelRequest,toProviderModelRequest,toChatResponse,toModelResponse,responseToAssistantMessage,createReasoningMessage,createAssistantTextMessage,createToolUseMessage,getTextFromMessage,getReasoningTextFromMessage,getToolUseBlocks,getToolResultBlocks,createToolResultUserMessage,INTERRUPTED_TOOL_RESULT_TEXT,synthesizeMissingToolResults};
1
+ (function(_0x51ed11,_0xed4a67){const _0x237c50={_0x2c8173:0x3e5,_0x2f59d9:0x3e9,_0x4f0e9a:0x3de,_0x372c98:0x395,_0x3923b0:0x3ac,_0x2beafb:0x38d,_0x132874:0x39b,_0x5ac642:0x3a1,_0x39e0bd:0x3a5,_0xd69e5b:0x38e,_0xacbb8c:0x38b,_0x224327:0x39a,_0x51db0a:0x3f5,_0xa1db02:0x3f5,_0x1c5988:0x3db,_0x308e98:0x3dd,_0x587947:0x3dc,_0x4a3356:0x3d2,_0x5c5897:0x3c6},_0xd247a3={_0x230987:0x2de};function _0x238f1a(_0x2a52ff,_0x28eedc,_0xcee956,_0x3f7621){return _0x1e5a(_0x28eedc-_0xd247a3._0x230987,_0x3f7621);}const _0xbd928d=_0x51ed11();function _0x422912(_0x1859e1,_0x5cbedf,_0x21ae36,_0x3d9c30){return _0x1e5a(_0x5cbedf-0x297,_0x3d9c30);}while(!![]){try{const _0x1b345f=parseInt(_0x238f1a(_0x237c50._0x2c8173,0x3d7,0x3d9,0x3bb))/0x1*(-parseInt(_0x238f1a(_0x237c50._0x2f59d9,0x3d3,0x3cf,_0x237c50._0x4f0e9a))/0x2)+parseInt(_0x422912(0x39f,_0x237c50._0x372c98,_0x237c50._0x3923b0,0x37c))/0x3+parseInt(_0x422912(0x3a5,_0x237c50._0x2beafb,_0x237c50._0x132874,_0x237c50._0x5ac642))/0x4*(parseInt(_0x422912(0x3b6,_0x237c50._0x39e0bd,0x39f,_0x237c50._0xd69e5b))/0x5)+-parseInt(_0x422912(0x372,_0x237c50._0xacbb8c,0x37d,_0x237c50._0x224327))/0x6*(-parseInt(_0x238f1a(0x3db,_0x237c50._0x51db0a,0x3f8,_0x237c50._0xa1db02))/0x7)+-parseInt(_0x238f1a(0x3f1,_0x237c50._0x1c5988,_0x237c50._0x308e98,_0x237c50._0x587947))/0x8+-parseInt(_0x422912(0x38f,0x3a4,_0x237c50._0x3923b0,0x39f))/0x9+parseInt(_0x238f1a(0x3e8,0x3e1,_0x237c50._0x4a3356,_0x237c50._0x5c5897))/0xa*(parseInt(_0x422912(0x39a,0x3af,0x39e,0x3ab))/0xb);if(_0x1b345f===_0xed4a67)break;else _0xbd928d['push'](_0xbd928d['shift']());}catch(_0x3bdff0){_0xbd928d['push'](_0xbd928d['shift']());}}}(_0x1755,0x8f515));function createTextBlock(_0x19e6d0){const _0x1ed90b={_0xeca56d:0x1d1};function _0x60aba7(_0x4c12fd,_0x3270b1,_0x33acbc,_0x24b817){return _0x1e5a(_0x3270b1-0xd1,_0x33acbc);}return{'type':_0x60aba7(0x1f3,0x1ea,0x1de,_0x1ed90b._0xeca56d),'text':_0x19e6d0};}function normalizeTextBlock(_0x1de30a){const _0x1fca17={_0x1787ec:0x3,_0x4d87cf:0x1d};function _0x213586(_0x3d420f,_0x5068d8,_0x1c3541,_0x19f0e9){return _0x1e5a(_0x5068d8- -0x123,_0x1c3541);}return createTextBlock(_0x1de30a[_0x213586(_0x1fca17._0x1787ec,-0xa,-0x1,-_0x1fca17._0x4d87cf)]??'');}function normalizeContent(_0x430d19){const _0x4d3265={_0x45241d:0x12d,_0x365487:0x130},_0x9c3a71={_0xc0d9d9:0x397,_0x163dbf:0x389},_0x45b757={_0x3c6198:0x47b},_0x178f0d={_0x5cd15e:0x20b};if(typeof _0x430d19==='string')return[createTextBlock(_0x430d19)];if(!Array['isArray'](_0x430d19))return[];function _0x191d6a(_0x423aae,_0x2c88d5,_0x4f21ed,_0x4a3d1e){return _0x1e5a(_0x423aae- -_0x178f0d._0x5cd15e,_0x4f21ed);}return _0x430d19[_0x191d6a(-0x11f,-_0x4d3265._0x45241d,-_0x4d3265._0x365487,-0x119)](_0x405170=>{if(_0x405170['type']===_0x552843(0x36f,0x379,_0x9c3a71._0xc0d9d9,_0x9c3a71._0x163dbf))return normalizeTextBlock(_0x405170);function _0x552843(_0x141d2e,_0x4550b9,_0x529c89,_0x3a65e0){return _0x191d6a(_0x3a65e0-_0x45b757._0x3c6198,_0x4550b9-0xda,_0x141d2e,_0x3a65e0-0x175);}return structuredClone(_0x405170);});}function _0x1e5a(_0x10c293,_0x35de10){_0x10c293=_0x10c293-0xeb;const _0x1755f2=_0x1755();let _0x1e5aab=_0x1755f2[_0x10c293];if(_0x1e5a['ETbVzu']===undefined){var _0x385713=function(_0x290eb2){const _0x5d5f40='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x19e6d0='',_0x1de30a='';for(let _0x430d19=0x0,_0x405170,_0x3ddf1e,_0x288479=0x0;_0x3ddf1e=_0x290eb2['charAt'](_0x288479++);~_0x3ddf1e&&(_0x405170=_0x430d19%0x4?_0x405170*0x40+_0x3ddf1e:_0x3ddf1e,_0x430d19++%0x4)?_0x19e6d0+=String['fromCharCode'](0xff&_0x405170>>(-0x2*_0x430d19&0x6)):0x0){_0x3ddf1e=_0x5d5f40['indexOf'](_0x3ddf1e);}for(let _0x372d98=0x0,_0x21c941=_0x19e6d0['length'];_0x372d98<_0x21c941;_0x372d98++){_0x1de30a+='%'+('00'+_0x19e6d0['charCodeAt'](_0x372d98)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1de30a);};_0x1e5a['uAfiDc']=_0x385713,_0x1e5a['uaZarr']={},_0x1e5a['ETbVzu']=!![];}const _0x8b7523=_0x1755f2[0x0],_0x3005da=_0x10c293+_0x8b7523,_0x279775=_0x1e5a['uaZarr'][_0x3005da];return!_0x279775?(_0x1e5aab=_0x1e5a['uAfiDc'](_0x1e5aab),_0x1e5a['uaZarr'][_0x3005da]=_0x1e5aab):_0x1e5aab=_0x279775,_0x1e5aab;}function normalizeSystem(_0x3ddf1e=[]){const _0x996329={_0xe61175:0x167,_0x431996:0x152,_0x396c9:0x16d,_0x4ac04b:0x16f},_0x11bc0d={_0x3aa732:0x26c},_0x302264={_0x4ba6b2:0x228};function _0x25f036(_0x28a5f7,_0x4c07f6,_0x2e05f6,_0x18f948){return _0x1e5a(_0x2e05f6- -_0x302264._0x4ba6b2,_0x18f948);}function _0xbe9e0e(_0x376dfa,_0x246031,_0x3300e2,_0x54a7e6){return _0x1e5a(_0x3300e2- -_0x11bc0d._0x3aa732,_0x376dfa);}return normalizeContent(_0x3ddf1e)[_0xbe9e0e(-_0x996329._0xe61175,-_0x996329._0x431996,-_0x996329._0x396c9,-_0x996329._0x4ac04b)](_0x288479=>_0x288479[_0x25f036(-0x110,-0x10e,-0x10d,-0x108)]===_0x25f036(-0xf3,-0x129,-0x10f,-0xf5));}function normalizeMessage(_0x372d98){const _0x417218={_0x113b2f:0x2b8,_0x5ed566:0x35d,_0x150723:0x359,_0xa475bb:0x35a},_0x4a9f8b={_0xd9f8ac:0x254},_0x29994d={_0x33a3e2:0x1c6};function _0x10bc60(_0x604430,_0x5dec98,_0x3e0959,_0x1b93a1){return _0x1e5a(_0x5dec98-_0x29994d._0x33a3e2,_0x1b93a1);}function _0x49b677(_0x2d79da,_0x31dce4,_0xed54b1,_0x18e621){return _0x1e5a(_0x2d79da-_0x4a9f8b._0xd9f8ac,_0x31dce4);}return{...typeof _0x372d98['id']==='string'?{'id':_0x372d98['id']}:{},'role':_0x372d98[_0x10bc60(0x2b7,_0x417218._0x113b2f,0x2ab,0x2b0)],'content':normalizeContent(_0x372d98[_0x10bc60(0x2e1,0x2d8,0x2cb,0x2c2)]),..._0x372d98[_0x49b677(0x35a,_0x417218._0x5ed566,_0x417218._0x150723,_0x417218._0xa475bb)]?{'providerState':structuredClone(_0x372d98['providerState'])}:{}};}function compileRequest(_0x21c941){const _0x10d694={_0x566a24:0x341,_0x70d9d6:0x34a,_0x29ba7e:0x32e,_0x1cb087:0x239,_0x587069:0x226,_0x3f4b7d:0x23a,_0x53f518:0x212,_0x18bde7:0x23e,_0x315812:0x20e,_0x59030d:0x342,_0x5db431:0x38b,_0xed7ea2:0x369,_0x14190a:0x378,_0x26908e:0x374},_0xab7c77={_0xce1a58:0x12c};function _0x4c2985(_0x23fcfa,_0xafc207,_0x330c52,_0x3899ef){return _0x1e5a(_0x23fcfa-0x250,_0x3899ef);}function _0x45b547(_0x4d7f94,_0x29d43a,_0x26c9ca,_0x43e1a9){return _0x1e5a(_0x29d43a-_0xab7c77._0xce1a58,_0x43e1a9);}return{'model':_0x21c941['model']??_0x4c2985(_0x10d694._0x566a24,0x35d,_0x10d694._0x70d9d6,_0x10d694._0x29ba7e),..._0x21c941[_0x45b547(_0x10d694._0x1cb087,_0x10d694._0x587069,_0x10d694._0x3f4b7d,_0x10d694._0x53f518)]!==void 0x0?{'max_tokens':_0x21c941['max_tokens']}:{},..._0x21c941['reasoning']?{'reasoning':structuredClone(_0x21c941[_0x45b547(0x239,0x227,_0x10d694._0x18bde7,_0x10d694._0x315812)])}:{},'system':normalizeSystem(_0x21c941['system']),'messages':_0x21c941['messages'][_0x4c2985(0x33c,_0x10d694._0x59030d,0x326,0x34f)](normalizeMessage),'tools':structuredClone(_0x21c941[_0x4c2985(0x372,_0x10d694._0x5db431,0x35d,0x35e)]??[]),'metadata':{'session_id':_0x21c941['sessionId'],'turn_id':_0x21c941[_0x4c2985(0x361,_0x10d694._0xed7ea2,_0x10d694._0x14190a,_0x10d694._0x26908e)]}};}function toChatRequest(_0x551ed5){const _0x77084a={_0x2f1504:0x2d5,_0x1eb8b7:0x2f1,_0x5df1ab:0x2e7,_0x4e14e6:0x2da,_0x18aa3:0x2c9,_0x1b2c8c:0x2d9,_0x2cd46f:0x39a,_0x32fdd3:0x3a3,_0x2ed988:0x2fa,_0x5a9816:0x2f0,_0x292dec:0x2a9,_0x323e3a:0x2bc,_0x4ae63b:0x2b2,_0x7c3018:0x2da,_0x3c8126:0x2ea,_0x158b7e:0x2cf,_0x7bc260:0x3a8,_0x759c7:0x2c2},_0x1d6213={_0xb16969:0x3d4};function _0x72c5d4(_0x2003e8,_0x18c24d,_0x18c412,_0x41433e){return _0x1e5a(_0x41433e-0x290,_0x2003e8);}function _0x5b29f9(_0x1241be,_0x38ac4c,_0x14b51c,_0x2727f9){return _0x1e5a(_0x14b51c- -_0x1d6213._0xb16969,_0x2727f9);}return{'model':_0x551ed5[_0x5b29f9(-_0x77084a._0x2f1504,-_0x77084a._0x1eb8b7,-_0x77084a._0x5df1ab,-0x2e5)],..._0x551ed5[_0x5b29f9(-0x2e6,-0x2e0,-_0x77084a._0x4e14e6,-_0x77084a._0x18aa3)]!==void 0x0?{'maxTokens':_0x551ed5['max_tokens']}:{},..._0x551ed5['reasoning']?{'reasoning':structuredClone(_0x551ed5[_0x5b29f9(-0x2e4,-0x2c0,-_0x77084a._0x1b2c8c,-0x2da)])}:{},'system':structuredClone(_0x551ed5[_0x72c5d4(0x383,_0x77084a._0x2cd46f,_0x77084a._0x32fdd3,0x39b)]),'messages':structuredClone(_0x551ed5[_0x5b29f9(-_0x77084a._0x2ed988,-0x2f0,-0x2e6,-_0x77084a._0x5a9816)]),'tools':structuredClone(_0x551ed5[_0x5b29f9(-_0x77084a._0x292dec,-_0x77084a._0x323e3a,-_0x77084a._0x4ae63b,-_0x77084a._0x4ae63b)]),'metadata':{'sessionId':_0x551ed5[_0x5b29f9(-_0x77084a._0x7c3018,-_0x77084a._0x3c8126,-_0x77084a._0x158b7e,-0x2db)]['session_id'],'turnId':_0x551ed5['metadata']['turn_id']},..._0x551ed5[_0x72c5d4(_0x77084a._0x7bc260,0x37c,0x397,0x38c)]?{'outputFormat':structuredClone(_0x551ed5[_0x5b29f9(-0x2c8,-0x2e3,-0x2d8,-_0x77084a._0x759c7)])}:{}};}function toModelRequest(_0x1c2bbd){const _0x4ceb21={_0x523921:0x10d,_0x1dc5e1:0x118,_0x503ef2:0x11f,_0x1afa2c:0x103,_0x56e00d:0xe5,_0x263df7:0xf1,_0x1c25cf:0x109,_0x6c2ab6:0xe4,_0x235f82:0xf5,_0x4f4f7d:0xf9,_0x1df10d:0xe2,_0x29f8fa:0xe0,_0x1fafc4:0xd1,_0x186d50:0xd9,_0x52973c:0xde,_0x501ee9:0xd0,_0x1c112d:0xeb,_0x12d174:0xf7,_0x5c8f7e:0xfa,_0x2957ab:0xdd},_0x9d32a={_0x207ce8:0x1f0},_0x172456={_0x3aac0c:0x12};function _0x297e3c(_0x1ebc22,_0x3071fa,_0x341513,_0x519a43){return _0x1e5a(_0x3071fa- -_0x172456._0x3aac0c,_0x341513);}function _0x187496(_0x8797d,_0x2f9f97,_0x4ca5bf,_0x507150){return _0x1e5a(_0x507150- -_0x9d32a._0x207ce8,_0x2f9f97);}return{'model':_0x1c2bbd[_0x187496(-_0x4ceb21._0x523921,-_0x4ceb21._0x1dc5e1,-_0x4ceb21._0x503ef2,-_0x4ceb21._0x1afa2c)],..._0x1c2bbd['maxTokens']!==void 0x0?{'max_tokens':_0x1c2bbd['maxTokens']}:{},..._0x1c2bbd[_0x297e3c(_0x4ceb21._0x56e00d,0xe9,0xf0,_0x4ceb21._0x263df7)]?{'reasoning':structuredClone(_0x1c2bbd[_0x187496(-0x111,-_0x4ceb21._0x1c25cf,-_0x4ceb21._0x6c2ab6,-_0x4ceb21._0x235f82)])}:{},'system':structuredClone(_0x1c2bbd[_0x297e3c(0x112,_0x4ceb21._0x4f4f7d,_0x4ceb21._0x1df10d,_0x4ceb21._0x29f8fa)]),'messages':structuredClone(_0x1c2bbd['messages']),'tools':structuredClone(_0x1c2bbd[_0x187496(-_0x4ceb21._0x1fafc4,-_0x4ceb21._0x186d50,-_0x4ceb21._0x52973c,-0xce)]),'metadata':{'session_id':_0x1c2bbd[_0x187496(-0xe5,-0xee,-_0x4ceb21._0x501ee9,-_0x4ceb21._0x1c112d)][_0x187496(-0xc8,-0xf7,-_0x4ceb21._0x12d174,-0xe4)],'turn_id':_0x1c2bbd[_0x187496(-0xd4,-_0x4ceb21._0x5c8f7e,-_0x4ceb21._0x2957ab,-0xeb)]['turnId']},..._0x1c2bbd[_0x187496(-0xe3,-0xe5,-0xe9,-0xf4)]?{'outputFormat':structuredClone(_0x1c2bbd['outputFormat'])}:{}};}function toProviderModelRequest(_0x3b10d3){const _0x331364={_0x343b96:0x3ff,_0x575124:0x423,_0x1b4436:0x414,_0x17b876:0x40c,_0x107407:0x7e,_0x2c4c92:0x4d,_0x18fdf8:0x62,_0x5504fb:0x43e,_0xe98b05:0x41d},_0x3d15a6={_0x4a2a04:0x150};function _0x108b7b(_0x3a0511,_0x521e39,_0x431327,_0x4e7256){return _0x1e5a(_0x4e7256-0x301,_0x431327);}function _0x38b015(_0x3b1d2d,_0x284197,_0x254ca1,_0x40f8b3){return _0x1e5a(_0x40f8b3- -_0x3d15a6._0x4a2a04,_0x3b1d2d);}return{'model':_0x3b10d3['model'],..._0x3b10d3['maxTokens']!==void 0x0?{'max_tokens':_0x3b10d3[_0x108b7b(0x41e,_0x331364._0x343b96,_0x331364._0x575124,0x414)]}:{},'system':structuredClone(_0x3b10d3[_0x108b7b(0x416,_0x331364._0x1b4436,0x404,_0x331364._0x17b876)]),'messages':structuredClone(_0x3b10d3[_0x38b015(-0x56,-_0x331364._0x107407,-_0x331364._0x2c4c92,-_0x331364._0x18fdf8)]),'tools':structuredClone(_0x3b10d3[_0x108b7b(_0x331364._0x5504fb,0x40d,_0x331364._0xe98b05,0x423)])};}function toChatResponse(_0x564bef){const _0xbb71a5={_0x53644c:0x3f9,_0x28752c:0x3fa,_0x3d2627:0x196,_0x4c1931:0x179,_0x2cbf8c:0x402,_0x3edae6:0x403,_0x2bdc39:0x403,_0x2d9903:0x40e,_0x46ffba:0x162,_0x2e15bd:0x16a,_0x253ade:0x18d,_0x35930d:0x413};function _0x3c2795(_0x352415,_0x3b6146,_0x452b6e,_0x24168b){return _0x1e5a(_0x452b6e-0x2fa,_0x352415);}function _0x35ad32(_0xae4e85,_0x4dc99b,_0x5dff8c,_0x3fe05d){return _0x1e5a(_0x5dff8c-0x71,_0xae4e85);}return{'id':_0x564bef['id'],'content':structuredClone(_0x564bef[_0x3c2795(_0xbb71a5._0x53644c,0x417,0x40c,_0xbb71a5._0x28752c)]),'stopReason':_0x564bef['stop_reason'],'usage':{'inputTokens':_0x564bef[_0x35ad32(0x19c,_0xbb71a5._0x3d2627,0x185,_0xbb71a5._0x4c1931)][_0x3c2795(0x3f9,0x3e6,_0xbb71a5._0x2cbf8c,_0xbb71a5._0x3edae6)],'outputTokens':_0x564bef[_0x3c2795(_0xbb71a5._0x2bdc39,0x402,_0xbb71a5._0x2d9903,0x429)][_0x35ad32(_0xbb71a5._0x46ffba,0x17c,0x161,_0xbb71a5._0x2e15bd)],..._0x564bef[_0x3c2795(_0xbb71a5._0x2bdc39,0x404,_0xbb71a5._0x2d9903,0x41f)][_0x35ad32(0x1a2,0x1a5,_0xbb71a5._0x253ade,0x19f)]!==void 0x0?{'reasoningTokens':_0x564bef['usage']['reasoning_tokens']}:{}},..._0x564bef['providerState']?{'providerState':structuredClone(_0x564bef[_0x3c2795(0x3e5,_0xbb71a5._0x35930d,0x400,0x400)])}:{}};}function toModelResponse(_0x2f1933){const _0x6b158b={_0x47406e:0x65,_0x3ae380:0x5e,_0x1aac59:0x56,_0x7c6e84:0xb2,_0x57236f:0xab,_0x31742b:0x45,_0x270059:0x54,_0x45cd37:0x38,_0x536bed:0x64,_0x1a7836:0x54,_0x48b90f:0x4d,_0x4a3459:0x7f,_0x12b08d:0x83,_0x5b249c:0x93,_0x559663:0x8e,_0x3749a0:0x85,_0x58a521:0x4f,_0x538376:0x6e,_0x53bf93:0x58,_0x46da70:0x4a};function _0x20dd37(_0x359337,_0x4887fc,_0x113f9a,_0x38fa8c){return _0x1e5a(_0x38fa8c- -0x1a2,_0x4887fc);}function _0x515593(_0x485d1f,_0x52d9ef,_0x167510,_0x2ba29b){return _0x1e5a(_0x52d9ef- -0x168,_0x167510);}return{'id':_0x2f1933['id'],'type':_0x515593(-_0x6b158b._0x47406e,-_0x6b158b._0x3ae380,-0x56,-_0x6b158b._0x1aac59),'role':_0x20dd37(-_0x6b158b._0x7c6e84,-_0x6b158b._0x57236f,-0xa2,-0xa1),'content':structuredClone(_0x2f1933['content']),'stop_reason':_0x2f1933['stopReason'],'stop_sequence':null,'usage':{'input_tokens':_0x2f1933[_0x515593(-_0x6b158b._0x31742b,-_0x6b158b._0x270059,-0x3a,-_0x6b158b._0x45cd37)]['inputTokens'],'output_tokens':_0x2f1933[_0x515593(-_0x6b158b._0x536bed,-_0x6b158b._0x1a7836,-_0x6b158b._0x48b90f,-0x55)][_0x20dd37(-_0x6b158b._0x4a3459,-0x75,-0x76,-_0x6b158b._0x12b08d)],..._0x2f1933[_0x20dd37(-0x81,-_0x6b158b._0x5b249c,-0xa7,-0x8e)][_0x20dd37(-0x9e,-0x90,-_0x6b158b._0x559663,-_0x6b158b._0x3749a0)]!==void 0x0?{'reasoning_tokens':_0x2f1933[_0x515593(-_0x6b158b._0x58a521,-0x54,-0x66,-_0x6b158b._0x538376)]['reasoningTokens']}:{}},..._0x2f1933[_0x515593(-_0x6b158b._0x53bf93,-0x62,-_0x6b158b._0x46da70,-0x4e)]?{'providerState':structuredClone(_0x2f1933['providerState'])}:{}};}function _0x56269e(_0x170ad8,_0x1ea784,_0x493c58,_0x7e158c){const _0x29d5cf={_0x2e185f:0x1bc};return _0x1e5a(_0x493c58- -_0x29d5cf._0x2e185f,_0x1ea784);}function responseToAssistantMessage(_0xc5062e){const _0xd7e930={_0x167581:0x4,_0x281b8d:0x11d,_0x37bfb5:0x139,_0x52d6e9:0x135},_0x315fc0={_0x4803cd:0x10a},_0x374f60={_0x4dc2a0:0x17};function _0x4ac868(_0x3eb2e1,_0x206c69,_0x2611c0,_0x169f8e){return _0x1e5a(_0x3eb2e1-_0x374f60._0x4dc2a0,_0x169f8e);}function _0x2b5778(_0x186cb7,_0x277a4a,_0xc5329b,_0x56d0e2){return _0x1e5a(_0x277a4a- -_0x315fc0._0x4803cd,_0xc5329b);}return{'role':'assistant','content':normalizeContent(_0xc5062e['content']),..._0xc5062e[_0x2b5778(-0x1e,-_0xd7e930._0x167581,-0x20,-0xd)]?{'providerState':structuredClone(_0xc5062e[_0x4ac868(_0xd7e930._0x281b8d,_0xd7e930._0x37bfb5,0x132,_0xd7e930._0x52d6e9)])}:{}};}function createReasoningMessage(_0x4b48a1){const _0x730b05={_0x4ce887:0x258,_0x13ac9a:0x239,_0x5048f4:0x246,_0x4a8d55:0x269,_0x23d814:0x23e,_0x505410:0x24a,_0x2386c2:0x22f,_0x25a4c2:0x218,_0x290c93:0x1f9},_0x6aeb65={_0x246ac7:0x34f},_0x4a7efa={_0x2f3dea:0x2dd,_0x59118f:0x2f7,_0x31cad4:0x2d7,_0x5bfeef:0x2e1,_0x28c4b1:0x2f5,_0x11eb0:0x2dc,_0x52dcb3:0x2c2,_0x1111af:0xd3},_0x17ab89=normalizeContent(_0x4b48a1?.[_0x55581a(-_0x730b05._0x4ce887,-0x230,-_0x730b05._0x13ac9a,-0x23d)])[_0x55581a(-_0x730b05._0x5048f4,-_0x730b05._0x4a8d55,-_0x730b05._0x23d814,-0x250)](_0x772c62=>{const _0x35fe6c={_0x2fe341:0x1b2,_0x17f626:0x511},_0x1c1c3f={_0x16fb14:0x5,_0x1eb106:0x2f9};function _0x115e9e(_0x52938f,_0x5c2109,_0x2bda88,_0x33834e){return _0x3747fe(_0x33834e,_0x5c2109-_0x1c1c3f._0x16fb14,_0x2bda88-0x6c,_0x52938f-_0x1c1c3f._0x1eb106);}function _0xdd41e9(_0x4e5639,_0x35eadd,_0x50bbab,_0x1d33e5){return _0x55581a(_0x4e5639-_0x35fe6c._0x2fe341,_0x1d33e5,_0x50bbab-0x73,_0x4e5639-_0x35fe6c._0x17f626);}return _0x772c62[_0xdd41e9(_0x4a7efa._0x2f3dea,0x2c4,0x2d7,_0x4a7efa._0x59118f)]===_0x115e9e(0xe8,0xda,0xf0,0xdf)||_0x772c62['type']===_0xdd41e9(_0x4a7efa._0x31cad4,_0x4a7efa._0x5bfeef,0x2c6,0x2e0)||_0x772c62[_0xdd41e9(_0x4a7efa._0x2f3dea,_0x4a7efa._0x28c4b1,_0x4a7efa._0x11eb0,_0x4a7efa._0x52dcb3)]===_0x115e9e(0xe4,0xf9,_0x4a7efa._0x1111af,0xdc);});function _0x55581a(_0x3dc658,_0xda05df,_0x447d01,_0x511472){return _0x1e5a(_0x511472- -_0x6aeb65._0x246ac7,_0xda05df);}if(_0x17ab89[_0x55581a(-0x223,-_0x730b05._0x505410,-0x235,-_0x730b05._0x2386c2)]===0x0)return void 0x0;function _0x3747fe(_0x3f56f2,_0x16100f,_0x42716a,_0x3b64ee){return _0x1e5a(_0x3b64ee- -0x304,_0x3f56f2);}return{'role':_0x3747fe(-_0x730b05._0x25a4c2,-0x20d,-_0x730b05._0x290c93,-0x203),'content':_0x17ab89};}function createAssistantTextMessage(_0x276b3b){const _0x44d946={_0xd66e1f:0x41,_0x1f86d2:0x2a,_0x224eae:0x30,_0x625c43:0xc8},_0x1641e7={_0x8dfff6:0x2e3,_0x2c45ee:0x2c9};function _0x14068e(_0x5c4981,_0x323890,_0x6d6bdf,_0x2b89b7){return _0x1e5a(_0x2b89b7- -0x150,_0x5c4981);}const _0x2ab5aa=normalizeContent(_0x276b3b?.['content'])['filter'](_0x8742e=>{const _0x50be94={_0xa9f473:0x1b7};function _0x5f20f4(_0x3c19c7,_0x5804c1,_0x335a8f,_0x4bd439){return _0x1e5a(_0x4bd439-_0x50be94._0xa9f473,_0x5804c1);}return _0x8742e[_0x5f20f4(0x2be,_0x1641e7._0x8dfff6,_0x1641e7._0x2c45ee,0x2d2)]==='text';});if(_0x2ab5aa[_0x14068e(-_0x44d946._0xd66e1f,-0x32,-_0x44d946._0x1f86d2,-_0x44d946._0x224eae)]===0x0)return void 0x0;function _0x1fba67(_0x5cf90b,_0xbb659f,_0x338280,_0x5787d3){return _0x1e5a(_0x5cf90b- -0x1c9,_0x338280);}return{'role':_0x1fba67(-_0x44d946._0x625c43,-0xc1,-0xd6,-0xb5),'content':_0x2ab5aa};}function createToolUseMessage(_0x2869d9){const _0x57b0dc={_0x88dace:0xa3,_0x3cd8f3:0x72,_0x3758a2:0x71,_0x46ccae:0x89,_0x1cd4a5:0x88,_0x1f6795:0x7b,_0x494ad4:0x9e},_0x13d1ef={_0x1ba72f:0x19b},_0x1619b1={_0x3c7695:0x337},_0x3a14bf=normalizeContent(_0x2869d9?.[_0xa37d4b(-_0x57b0dc._0x88dace,-_0x57b0dc._0x3cd8f3,-_0x57b0dc._0x3758a2,-_0x57b0dc._0x46ccae)])['filter'](_0x13785b=>{const _0x264bc6={_0x41e088:0xd0},_0x50b7df={_0x575fe1:0xc1,_0x4b75d4:0x9c};function _0x319734(_0x3be352,_0x5998d6,_0x186a8b,_0x23e493){return _0xa37d4b(_0x23e493,_0x5998d6-0x21,_0x186a8b-_0x50b7df._0x575fe1,_0x186a8b-_0x50b7df._0x4b75d4);}function _0x495eeb(_0x38e4ee,_0x27c020,_0x5cac5e,_0x54cb4b){return _0xa37d4b(_0x54cb4b,_0x27c020-0x8e,_0x5cac5e-_0x264bc6._0x41e088,_0x27c020-0x3b7);}return _0x13785b[_0x495eeb(0x34f,_0x1619b1._0x3c7695,0x334,0x334)]===_0x495eeb(0x32c,0x314,0x32f,0x31d);});function _0xa37d4b(_0x211065,_0x339a19,_0x42ca1b,_0xd8dfae){return _0x1e5a(_0xd8dfae- -_0x13d1ef._0x1ba72f,_0x211065);}function _0x2ecae8(_0x220c9d,_0x4212d1,_0x5d4187,_0x30704e){return _0x1e5a(_0x4212d1-0x120,_0x30704e);}if(_0x3a14bf[_0xa37d4b(-0x96,-0x81,-_0x57b0dc._0x1cd4a5,-_0x57b0dc._0x1f6795)]===0x0)return void 0x0;return{'role':_0xa37d4b(-_0x57b0dc._0x494ad4,-0xb6,-0x7e,-0x9a),'content':_0x3a14bf};}function getTextFromMessage(_0x352836){const _0x2f669b={_0x3cf391:0x24e,_0x415cda:0x23f,_0x98118d:0x23a,_0x27fcc6:0x251,_0x5ebbf9:0x3e3,_0x57efe5:0x3e8,_0x5ee67d:0x417,_0x7a0bd1:0x40f,_0x4ac115:0x431};function _0x43c365(_0x35b1bc,_0x52a718,_0x3502c9,_0x4e721f){return _0x1e5a(_0x52a718-0x2f6,_0x35b1bc);}function _0x4887e6(_0x40d469,_0x517ea8,_0x44a4fd,_0x22ac34){return _0x1e5a(_0x40d469-0x14f,_0x517ea8);}return normalizeContent(_0x352836?.['content'])[_0x4887e6(_0x2f669b._0x3cf391,_0x2f669b._0x415cda,_0x2f669b._0x98118d,_0x2f669b._0x27fcc6)](_0x4ae2df=>_0x4ae2df[_0x43c365(0x41b,0x411,0x3fa,0x3fc)]==='text')[_0x43c365(0x3cd,0x3e2,_0x2f669b._0x5ebbf9,_0x2f669b._0x57efe5)](_0x5e714b=>_0x5e714b[_0x43c365(0x3f5,0x40f,0x409,0x402)])[_0x43c365(0x412,_0x2f669b._0x5ee67d,_0x2f669b._0x7a0bd1,_0x2f669b._0x4ac115)]('\x0a');}function getReasoningTextFromMessage(_0x4d1a2c){const _0x17e3a1={_0x5f37b7:0x10c,_0x5b9edf:0x111,_0x4d2ea3:0x106,_0x4b6f1a:0x11c,_0x54a2df:0x112,_0x3c6409:0x123,_0x49c823:0x149,_0x5f4b3d:0x160},_0x2dca5a={_0x5e5cb8:0x118,_0x216dd5:0xe5,_0x597c4c:0x31c,_0x515aa0:0x325,_0x16730e:0x118,_0x3957df:0x12e,_0x55f2af:0x129,_0x1e2898:0x32e,_0x1e890a:0x316,_0x4c003a:0x315,_0x48a10f:0x331,_0x3f04bc:0x305,_0x3e4002:0x313,_0x308cda:0x12d,_0x561244:0x2f2,_0x394c00:0x2fb,_0x4734ca:0x308,_0x1158c5:0x312,_0x4318ef:0x326,_0x2286d5:0x319,_0x2d1983:0x33a,_0x1b96ce:0x30e,_0x3f462a:0x103,_0x24baae:0xfb,_0x396dfb:0x103,_0x25fbb0:0x31f,_0xd0afc0:0x336,_0x1c8d85:0x317,_0x1eccf4:0x131,_0x2015d4:0xe0,_0x3aebe7:0xe9},_0x387cc6={_0x448c4e:0x27e},_0x3dc43d={_0x5694c2:0x219};function _0x398d38(_0x5162ea,_0x4c531b,_0x49f3ce,_0x5c07ce){return _0x1e5a(_0x4c531b- -_0x3dc43d._0x5694c2,_0x5162ea);}function _0x30a0ee(_0x47a483,_0x26a039,_0x1f618a,_0x236270){return _0x1e5a(_0x236270- -_0x387cc6._0x448c4e,_0x1f618a);}return normalizeContent(_0x4d1a2c?.[_0x398d38(-_0x17e3a1._0x5f37b7,-0x107,-_0x17e3a1._0x5b9edf,-_0x17e3a1._0x4d2ea3)])[_0x398d38(-_0x17e3a1._0x4b6f1a,-_0x17e3a1._0x54a2df,-0x122,-_0x17e3a1._0x3c6409)](_0x545f5d=>{const _0xa07a80={_0x29c68c:0x8},_0x38d870={_0x29ddf6:0x41f,_0x467c6f:0x2b,_0xf8f9b6:0xa5};function _0x3ec5ee(_0x3895b6,_0xc1dc05,_0x518ce6,_0x27eb5a){return _0x398d38(_0x518ce6,_0x3895b6-_0x38d870._0x29ddf6,_0x518ce6-_0x38d870._0x467c6f,_0x27eb5a-_0x38d870._0xf8f9b6);}function _0x10fe81(_0x5e5581,_0x6e9e43,_0x56b6aa,_0xee9f0c){return _0x30a0ee(_0x5e5581-0x1aa,_0x6e9e43-_0xa07a80._0x29c68c,_0xee9f0c,_0x6e9e43-0x62);}if(_0x545f5d[_0x10fe81(-0x11d,-0x101,-_0x2dca5a._0x5e5cb8,-_0x2dca5a._0x216dd5)]==='anthropic_thinking')return _0x545f5d[_0x3ec5ee(_0x2dca5a._0x597c4c,0x32e,0x32a,_0x2dca5a._0x515aa0)][_0x10fe81(-0x122,-_0x2dca5a._0x16730e,-_0x2dca5a._0x3957df,-_0x2dca5a._0x55f2af)]()['length']>0x0?[_0x545f5d[_0x3ec5ee(0x31c,_0x2dca5a._0x1e2898,0x300,_0x2dca5a._0x1e890a)]]:[];if(_0x545f5d[_0x10fe81(-0x111,-0x101,-0x104,-0x109)]==='anthropic_redacted_thinking')return[_0x3ec5ee(_0x2dca5a._0x4c003a,_0x2dca5a._0x48a10f,_0x2dca5a._0x3f04bc,_0x2dca5a._0x3e4002)];if(_0x545f5d['type']!==_0x10fe81(-0x13a,-_0x2dca5a._0x308cda,-0x118,-0x12e))return[];const _0x1a3af3=_0x545f5d['summary'][_0x3ec5ee(_0x2dca5a._0x561244,0x2e1,_0x2dca5a._0x394c00,0x30b)](_0x425cb8=>_0x425cb8[_0x3ec5ee(0x31f,0x324,0x337,0x335)])[_0x3ec5ee(_0x2dca5a._0x3f04bc,_0x2dca5a._0x4734ca,_0x2dca5a._0x3f04bc,0x318)](_0x21d127=>_0x21d127[_0x3ec5ee(0x30a,0x2f6,0x2f2,0x30f)]()['length']>0x0)[_0x3ec5ee(0x327,0x340,0x312,_0x2dca5a._0x1158c5)]('\x0a\x0a');if(_0x1a3af3[_0x3ec5ee(_0x2dca5a._0x4318ef,_0x2dca5a._0x2286d5,_0x2dca5a._0x2d1983,_0x2dca5a._0x1b96ce)]>0x0)return[_0x1a3af3];if(_0x545f5d[_0x10fe81(-0x11f,-_0x2dca5a._0x3f462a,-_0x2dca5a._0x24baae,-_0x2dca5a._0x396dfb)]&&_0x545f5d[_0x3ec5ee(_0x2dca5a._0x25fbb0,0x308,_0x2dca5a._0xd0afc0,_0x2dca5a._0x1c8d85)][_0x10fe81(-0x111,-0x118,-0x12c,-_0x2dca5a._0x1eccf4)]()[_0x10fe81(-_0x2dca5a._0x2015d4,-0xfc,-_0x2dca5a._0x3aebe7,-0xe2)]>0x0)return[_0x545f5d['text']];return _0x545f5d['encryptedContent']?['(encrypted\x20reasoning)']:[];})[_0x30a0ee(-_0x17e3a1._0x49c823,-0x145,-_0x17e3a1._0x5f4b3d,-0x15d)]('\x0a\x0a');}function getToolUseBlocks(_0x28e793){const _0x33af03={_0x1e875c:0x177},_0x487f94={_0x4ad0a2:0x15f};function _0x1034b0(_0x18d0f6,_0x3de740,_0x4c08e1,_0x405bab){return _0x1e5a(_0x405bab- -_0x487f94._0x4ad0a2,_0x4c08e1);}function _0x3fcced(_0x1fbe52,_0x9afbf9,_0x2a4685,_0x1153f6){return _0x1e5a(_0x2a4685- -_0x33af03._0x1e875c,_0x1153f6);}return normalizeContent(_0x28e793?.['content'])['filter'](_0x393cff=>_0x393cff[_0x3fcced(-0x69,-0x54,-0x5c,-0x6f)]===_0x3fcced(-0x92,-0x7c,-0x7f,-0x78));}function getToolResultBlocks(_0x374d77){const _0x224b6c={_0x1f8613:0x268};function _0x231496(_0x1ff25b,_0x551d53,_0x3ec0b9,_0x1ff151){return _0x1e5a(_0x1ff25b-0x169,_0x3ec0b9);}function _0x4d9d21(_0x97584d,_0x9c3c8e,_0x2734dc,_0x31a4b4){return _0x1e5a(_0x9c3c8e-0x24c,_0x97584d);}return normalizeContent(_0x374d77?.['content'])[_0x231496(_0x224b6c._0x1f8613,0x26d,_0x224b6c._0x1f8613,0x26f)](_0x18978a=>_0x18978a[_0x231496(0x284,0x273,0x29e,0x293)]==='tool_result');}function createToolResultUserMessage(_0x6592e5){const _0x854e4f={_0x4b8169:0x161,_0xf1eba3:0x162,_0x4a526d:0x16d,_0x356823:0x171,_0x408b28:0x13,_0x4834f5:0xd},_0x444707={_0x3a30f4:0x3b,_0x1bb315:0x55},_0x143757={_0x1dbaf6:0x62,_0x5ee782:0x1f1};function _0x4645d5(_0x17d84a,_0x422ccd,_0x248a0e,_0x445e18){return _0x1e5a(_0x248a0e- -0xff,_0x445e18);}function _0x4ec580(_0x423148,_0x24349e,_0xefc8de,_0x286ab5){return _0x1e5a(_0xefc8de- -0x276,_0x24349e);}return{'role':_0x4ec580(-_0x854e4f._0x4b8169,-_0x854e4f._0xf1eba3,-_0x854e4f._0x4a526d,-_0x854e4f._0x356823),'content':_0x6592e5[_0x4645d5(-0x26,-0x26,-_0x854e4f._0x408b28,-_0x854e4f._0x4834f5)](_0x29f66c=>{function _0x82b9a8(_0x50b3f1,_0x597ae6,_0x43c6f1,_0x3aaec5){return _0x4645d5(_0x50b3f1-_0x143757._0x1dbaf6,_0x597ae6-_0x143757._0x5ee782,_0x597ae6- -0x6f,_0x50b3f1);}return{'type':'tool_result','tool_use_id':_0x29f66c['callId'],'content':_0x29f66c['content']??_0x29f66c['output'],'is_error':_0x29f66c['status']===_0x82b9a8(-_0x444707._0x3a30f4,-0x54,-0x46,-_0x444707._0x1bb315)};})};}var INTERRUPTED_TOOL_RESULT_TEXT=_0x56269e(-0xa8,-0x87,-0x9e,-0x84);function _0x1755(){const _0x1ffeb4=['y2XHDwrLlxnVBM5LDc00ltiWmJuWnte0','CM9Szq','yw50AhjVCgLJx3jLzgfJDgvKx3rOAw5RAw5N','mtHIvM9bsMu','mJzZq3f5t28','mtCYzLPdtwHQ','Dg9VBf91C2vFAwq','Dg9VBf91C2u','nZCZntnuAg5wzLK','Bwf4x3rVA2vUCW','CMvHC29UAw5N','B3v0Chv0rM9YBwf0','odGZnJq4wfnxsxfx','mZm4ndq3nhvxs3jiyG','zMLSDgvY','AgfZ','yxnZAxn0yw50','ChvZAa','oteWr1PAuvjM','DhjPBq','Bwv0ywrHDge','ChjVDMLKzxjtDgf0zq','zMXHDe1HCa','Aw5WDxrFDg9Rzw5Z','DxnLCG','BwvZC2fNzq','C3LZDgvT','C2vZC2LVBKLK','mtyYndm2nuPcCgXvDq','mZeWodvzthHMvKW','khjLzgfJDgvKihjLyxnVBMLUzYK','ywrK','DhvYBKLK','y29UDgvUDa','Bwf4vg9Rzw5Z','DxnHz2u','yw50AhjVCgLJx3rOAw5RAw5N','DgHPBMTPBMC','nte2ndGXDNLxBe1f','mZiYndfJAuv1v28','Dgv4Da','zxjYB3i','DhLWzq','CMvHC29UAw5Nx3rVA2vUCW','CMvHC29UAw5Nvg9Rzw5Z','vg9VBcbLEgvJDxrPB24GD2fZigLUDgvYCNvWDgvKigjLzM9YzsbJB21WBgv0Aw9UigfUzcbWCM9KDwnLzcbUBYbYzxn1BhqU','B3v0Chv0vg9Rzw5Z','BgvUz3rO','AM9PBG','Dg9VBhm','Dg9VBf9Yzxn1Bhq','BwfW','Bw9KzwW','BwvZC2fNzxm','B3bLBMfPx3jLyxnVBMLUzW','B3v0Chv0x3rVA2vUCW'];_0x1755=function(){return _0x1ffeb4;};return _0x1755();}function synthesizeMissingToolResults(_0x26135b){const _0x55f4ee={_0x14201e:0x43,_0x8a0225:0x21,_0x2f5608:0x2c,_0xbfc09f:0x41,_0x10625c:0x31,_0x7aaee4:0x32,_0x139c2f:0x2c3,_0x588ab0:0x2aa,_0x3e4de9:0x296,_0x686bee:0x33,_0x88fb8a:0x26,_0x2cdb11:0x28,_0x4a424d:0x45,_0x53d8f3:0x1e,_0x3c4bdc:0x1c,_0x26b1fb:0x21},_0x975a40={_0x3f9391:0x8b},_0xc370db={_0x1ec36a:0x20c};function _0x1ce28c(_0x24db01,_0x5958e3,_0x47cfb0,_0x4226d2){return _0x56269e(_0x24db01-0x1a9,_0x4226d2,_0x47cfb0- -_0xc370db._0x1ec36a,_0x4226d2-0x11e);}const _0x3a98bf=new Set();for(const _0x1b0314 of _0x26135b){for(const _0x1c75b9 of getToolResultBlocks(_0x1b0314)){_0x3a98bf['add'](_0x1c75b9[_0xf758d9(-_0x55f4ee._0x14201e,-_0x55f4ee._0x8a0225,-0x3b,-0x3a)]);}}function _0xf758d9(_0x55198c,_0x40882f,_0x50baf8,_0x2f6299){return _0x56269e(_0x55198c-0x16b,_0x40882f,_0x2f6299-_0x975a40._0x3f9391,_0x2f6299-0x58);}const _0x10773c=[];for(const _0x1e8b25 of _0x26135b){_0x10773c[_0xf758d9(-_0x55f4ee._0x2f5608,-_0x55f4ee._0xbfc09f,-_0x55f4ee._0x10625c,-0x2f)](_0x1e8b25);const _0x5b4a62=getToolUseBlocks(_0x1e8b25)[_0xf758d9(-0x1a,-_0x55f4ee._0x7aaee4,-0x39,-0x32)](_0x5f433b=>!_0x3a98bf[_0x1ce28c(-0x2db,-0x2cf,-0x2c8,-0x2c6)](_0x5f433b['id']));if(_0x5b4a62[_0x1ce28c(-_0x55f4ee._0x139c2f,-_0x55f4ee._0x588ab0,-0x2a8,-_0x55f4ee._0x3e4de9)]===0x0)continue;_0x10773c[_0xf758d9(-0x1b,-_0x55f4ee._0x686bee,-0x28,-0x2f)]({'role':_0xf758d9(-0x31,-_0x55f4ee._0x88fb8a,-0x40,-_0x55f4ee._0x2cdb11),'content':_0x5b4a62[_0xf758d9(-0x51,-0x52,-_0x55f4ee._0x4a424d,-_0x55f4ee._0x4a424d)](_0x3f062f=>({'type':_0xf758d9(-0x56,-0x35,-0x39,-0x46),'tool_use_id':_0x3f062f['id'],'content':INTERRUPTED_TOOL_RESULT_TEXT,'is_error':!![]}))});for(const _0x36883c of _0x5b4a62){_0x3a98bf[_0xf758d9(-_0x55f4ee._0x53d8f3,-_0x55f4ee._0x3c4bdc,-0x37,-_0x55f4ee._0x26b1fb)](_0x36883c['id']);}}return _0x10773c;}export{createTextBlock,normalizeTextBlock,normalizeContent,normalizeSystem,normalizeMessage,compileRequest,toChatRequest,toModelRequest,toProviderModelRequest,toChatResponse,toModelResponse,responseToAssistantMessage,createReasoningMessage,createAssistantTextMessage,createToolUseMessage,getTextFromMessage,getReasoningTextFromMessage,getToolUseBlocks,getToolResultBlocks,createToolResultUserMessage,INTERRUPTED_TOOL_RESULT_TEXT,synthesizeMissingToolResults};
@@ -1 +1 @@
1
- (function(_0x3be327,_0x325340){const _0x3c8439={_0x7de393:0x4f7,_0x407640:0x4f0,_0x2436b0:0x4e6,_0x1889fd:0x4ef,_0x11002a:0x4ec,_0x8060a7:0x4e3,_0x3efb6e:0x4e4,_0x5ac7aa:0x4e2,_0x2f10fc:0x4d3,_0x37019e:0x4d7,_0x210cd0:0x4d7,_0x3e8ad5:0x4de,_0x441ec1:0x4c8,_0x416e42:0x4df,_0x27ccdb:0x4e4,_0x5a9c64:0x4ea,_0x579334:0x4ce,_0x1860d1:0x4c1,_0x51f677:0x4cc,_0x1c2420:0x4c3,_0x365b23:0x4c3,_0x55eb8a:0x4eb,_0xf37f64:0x4e1,_0x53c102:0x4e0,_0x537d06:0x4d4,_0x2278c6:0x4d6,_0x1d9da9:0x4cb};function _0x1b268e(_0x2b762f,_0x3d5825,_0x157da8,_0xc6e8df){return _0x52ef(_0x157da8-0x31f,_0xc6e8df);}function _0x7df694(_0x570dc9,_0x2ed798,_0x3f0f59,_0x4f827d){return _0x52ef(_0x570dc9-0x302,_0x2ed798);}const _0x1d3232=_0x3be327();while(!![]){try{const _0x44f34c=parseInt(_0x1b268e(_0x3c8439._0x7de393,_0x3c8439._0x407640,0x4f2,_0x3c8439._0x2436b0))/0x1*(-parseInt(_0x1b268e(_0x3c8439._0x1889fd,_0x3c8439._0x11002a,0x4e9,0x4f2))/0x2)+parseInt(_0x1b268e(_0x3c8439._0x8060a7,_0x3c8439._0x3efb6e,_0x3c8439._0x5ac7aa,0x4e4))/0x3*(-parseInt(_0x7df694(_0x3c8439._0x2f10fc,0x4db,_0x3c8439._0x37019e,_0x3c8439._0x210cd0))/0x4)+-parseInt(_0x1b268e(0x4dc,_0x3c8439._0x3e8ad5,0x4df,0x4df))/0x5*(-parseInt(_0x7df694(0x4c8,0x4c2,0x4bf,_0x3c8439._0x441ec1))/0x6)+parseInt(_0x1b268e(_0x3c8439._0x416e42,_0x3c8439._0x27ccdb,_0x3c8439._0x5a9c64,0x4e5))/0x7*(-parseInt(_0x7df694(0x4d1,_0x3c8439._0x579334,0x4c6,0x4c9))/0x8)+parseInt(_0x7df694(_0x3c8439._0x1860d1,_0x3c8439._0x51f677,_0x3c8439._0x1c2420,_0x3c8439._0x365b23))/0x9*(-parseInt(_0x1b268e(_0x3c8439._0x210cd0,_0x3c8439._0x55eb8a,_0x3c8439._0xf37f64,_0x3c8439._0x53c102))/0xa)+parseInt(_0x7df694(_0x3c8439._0x537d06,0x4d5,_0x3c8439._0x51f677,0x4cb))/0xb+parseInt(_0x7df694(0x4d0,_0x3c8439._0x2278c6,0x4ce,_0x3c8439._0x1d9da9))/0xc;if(_0x44f34c===_0x325340)break;else _0x1d3232['push'](_0x1d3232['shift']());}catch(_0x42accb){_0x1d3232['push'](_0x1d3232['shift']());}}}(_0x1ae1,0x7d923));import{toOpenAiResponsesRequest}from'../chunk-BLGBVFVX.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-YWQXXHHU.js';function _0x52ef(_0x53e304,_0x404030){_0x53e304=_0x53e304-0x1bc;const _0x1ae1f3=_0x1ae1();let _0x52efd6=_0x1ae1f3[_0x53e304];if(_0x52ef['EmIfYT']===undefined){var _0x2743b5=function(_0x4d29c8){const _0x113e48='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1ac915='',_0xee7f1b='';for(let _0x608356=0x0,_0x5e550f,_0x3aa2e6,_0x68cd51=0x0;_0x3aa2e6=_0x4d29c8['charAt'](_0x68cd51++);~_0x3aa2e6&&(_0x5e550f=_0x608356%0x4?_0x5e550f*0x40+_0x3aa2e6:_0x3aa2e6,_0x608356++%0x4)?_0x1ac915+=String['fromCharCode'](0xff&_0x5e550f>>(-0x2*_0x608356&0x6)):0x0){_0x3aa2e6=_0x113e48['indexOf'](_0x3aa2e6);}for(let _0x160211=0x0,_0x134222=_0x1ac915['length'];_0x160211<_0x134222;_0x160211++){_0xee7f1b+='%'+('00'+_0x1ac915['charCodeAt'](_0x160211)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xee7f1b);};_0x52ef['hUaXpI']=_0x2743b5,_0x52ef['VBDbLk']={},_0x52ef['EmIfYT']=!![];}const _0x1fb5a3=_0x1ae1f3[0x0],_0x320a96=_0x53e304+_0x1fb5a3,_0x184998=_0x52ef['VBDbLk'][_0x320a96];return!_0x184998?(_0x52efd6=_0x52ef['hUaXpI'](_0x52efd6),_0x52ef['VBDbLk'][_0x320a96]=_0x52efd6):_0x52efd6=_0x184998,_0x52efd6;}var DATA_URI_REGEX=/data:(image\/(?:png|jpeg|jpg|gif|webp));base64,([A-Za-z0-9+/\r\n]+={0,2})/g;function normalizeMediaType(_0x1ac915){const _0x361311={_0x1777fe:0x3a1,_0x1b6004:0x39f,_0x28bc11:0x36b,_0x9f4f70:0x36a,_0x3a7e41:0x373},_0xfdd7f0={_0x238b2b:0x1a1};function _0x4e84e4(_0x41f368,_0x3abd9a,_0x1a1bb8,_0x14bf58){return _0x52ef(_0x3abd9a-0x1e0,_0x41f368);}function _0x1c179a(_0x45b471,_0x15373b,_0x169c23,_0x35e0ae){return _0x52ef(_0x169c23-_0xfdd7f0._0x238b2b,_0x45b471);}return _0x1ac915===_0x4e84e4(0x39a,_0x361311._0x1777fe,_0x361311._0x1b6004,0x39f)?_0x1c179a(0x36c,_0x361311._0x28bc11,_0x361311._0x9f4f70,_0x361311._0x3a7e41):_0x1ac915;}function isValidBase64(_0xee7f1b){const _0x5b0ccb={_0x17856a:0x25e,_0x49c019:0x319,_0x340c95:0x310,_0x2f9b60:0x321,_0x4fc7bf:0x320,_0x4740e8:0x263,_0x11e8ca:0x261};function _0x4acf29(_0x422c73,_0x265332,_0x2d0d4d,_0x329a6b){return _0x52ef(_0x265332-0xa4,_0x329a6b);}function _0x316fc3(_0x2ff567,_0x2212d0,_0x88227a,_0x52c3a7){return _0x52ef(_0x2ff567-0x155,_0x2212d0);}if(_0xee7f1b[_0x4acf29(0x26f,0x268,_0x5b0ccb._0x17856a,0x262)]===0x0||_0xee7f1b[_0x316fc3(_0x5b0ccb._0x49c019,_0x5b0ccb._0x340c95,_0x5b0ccb._0x2f9b60,_0x5b0ccb._0x4fc7bf)]%0x4!==0x0)return![];return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/[_0x4acf29(0x257,0x261,_0x5b0ccb._0x4740e8,_0x5b0ccb._0x11e8ca)](_0xee7f1b);}function collectImageMatches(_0x608356){const _0x2d77b1={_0x445dc8:0x13d,_0x2d47c8:0x144,_0x57c89c:0x134},_0x2f6ae2={_0x387f36:0x20e,_0x58399d:0x211},_0xcf3b91={_0x5705b1:0xb,_0x555b39:0x111},_0x37a4a4={_0x1b42e9:0x93};function _0x7bdfd(_0x71d880,_0x586f10,_0x868837,_0x1b931d){return _0x52ef(_0x586f10- -0x321,_0x1b931d);}DATA_URI_REGEX[_0x103dde(_0x2d77b1._0x445dc8,0x13d,0x13f,_0x2d77b1._0x2d47c8)]=0x0;function _0x103dde(_0x583df7,_0x3af118,_0x434e33,_0x1d8280){return _0x52ef(_0x583df7- -_0x37a4a4._0x1b42e9,_0x1d8280);}return Array['from'](_0x608356[_0x103dde(_0x2d77b1._0x57c89c,0x13a,0x13f,0x13c)](DATA_URI_REGEX))['filter'](_0x5e550f=>{const _0x3aa2e6=(_0x5e550f[0x2]??'')[_0x4ffbc6(_0x2f6ae2._0x387f36,0x208,0x210,_0x2f6ae2._0x58399d)](/[\r\n]/g,'');function _0x4ffbc6(_0x299de4,_0x3e6f00,_0x27f7fc,_0x6f4508){return _0x103dde(_0x27f7fc-0xde,_0x3e6f00-_0xcf3b91._0x5705b1,_0x27f7fc-_0xcf3b91._0x555b39,_0x3e6f00);}return isValidBase64(_0x3aa2e6);});}function _0x1ae1(){const _0x89cd2f=['Bwf0y2HbBgW','C2XPy2u','Aw1Hz2uVANbLzW','mKX4r09ruW','ndaXmti4rujzBKfm','Dgv4Da','ChvZAa','mJi4nda4ndH5wMDnv3K','mZjKq3vYvNq','BgfZDeLUzgv4','mtzdDgrsu0C','mJyXmtCWog9vEMHfvG','ndq2mdG3zfDWzvv4','Aw1Hz2u','DgvZDa','Aw5KzxG','mJq0mZC2mw5QrhrxDq','mZvZBKLtD0e','Aw1Hz2uVANbN','mtb1vLbPyKi','nZaYntmXzNnkt21u','BgvUz3rO','CMvWBgfJzq','mJiWmZi2yKjPCeTh'];_0x1ae1=function(){return _0x89cd2f;};return _0x1ae1();}function hasPastedImages(_0x68cd51){function _0x4492e6(_0x19bd86,_0x3959a1,_0x73b485,_0x58d44b){return _0x52ef(_0x19bd86-0x359,_0x58d44b);}return collectImageMatches(_0x68cd51)[_0x4492e6(0x51d,0x511,0x518,0x527)]>0x0;}function contentFromPastedText(_0x160211){const _0x351f09={_0x41c18d:0x2ba,_0x538700:0x2be,_0x206403:0x52f,_0x484d20:0x2c4,_0x3d66d9:0x2d6,_0x415a9c:0x2cc,_0x74f054:0x2d0,_0x27fa83:0x537,_0x5d95f7:0x532,_0x5c1588:0x52d,_0x44dc04:0x530,_0x5e9186:0x535,_0x5d53bf:0x53a,_0x160144:0x2bc,_0xeb018f:0x2b4,_0x465263:0x531,_0x52b655:0x52e},_0x317b55={_0x14bb81:0x36d},_0x359212={_0x4efde9:0x100},_0x134222=collectImageMatches(_0x160211);function _0x43934b(_0x15255d,_0x3eb6e3,_0x136bf4,_0x241f2c){return _0x52ef(_0x136bf4-_0x359212._0x4efde9,_0x241f2c);}function _0x1c6e44(_0x3488c9,_0x347794,_0xe7ea0d,_0x58c55d){return _0x52ef(_0x58c55d-_0x317b55._0x14bb81,_0x347794);}const _0x430956=[];let _0x710b83=0x0;for(const _0x4be65e of _0x134222){const _0x5f1fd7=_0x4be65e[_0x43934b(_0x351f09._0x41c18d,0x2b2,_0x351f09._0x538700,0x2c5)]??0x0,[_0x430548,_0xba9711,_0x11eb95]=_0x4be65e;_0x5f1fd7>_0x710b83&&_0x430956[_0x1c6e44(0x53b,_0x351f09._0x206403,0x545,0x53a)]({'type':_0x43934b(_0x351f09._0x484d20,_0x351f09._0x3d66d9,_0x351f09._0x415a9c,_0x351f09._0x74f054),'text':_0x160211[_0x1c6e44(_0x351f09._0x27fa83,_0x351f09._0x5d95f7,_0x351f09._0x5c1588,0x535)](_0x710b83,_0x5f1fd7)}),_0x430956[_0x1c6e44(0x532,_0x351f09._0x44dc04,_0x351f09._0x5e9186,_0x351f09._0x5d53bf)]({'type':_0x43934b(0x2c4,0x2b7,_0x351f09._0x160144,_0x351f09._0xeb018f),'source':{'type':'base64','media_type':normalizeMediaType(_0xba9711),'data':_0x11eb95[_0x43934b(_0x351f09._0x74f054,0x2bd,0x2c5,0x2cb)](/[\r\n]/g,'')}}),_0x710b83=_0x5f1fd7+_0x430548[_0x1c6e44(0x535,0x53a,0x528,_0x351f09._0x465263)];}return _0x710b83<_0x160211[_0x1c6e44(0x53d,_0x351f09._0x52b655,0x52b,0x531)]&&_0x430956['push']({'type':'text','text':_0x160211[_0x1c6e44(0x534,0x53f,0x52b,0x535)](_0x710b83)}),_0x430956['length']>0x0?_0x430956:[{'type':'text','text':_0x160211}];}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(_0x24e8a8,_0x4ad27c){const _0x3cc2d6={_0x43a722:0x187,_0x2577d2:0x184,_0x425e4a:0x169,_0x5f030e:0x176,_0x122855:0x165,_0x42909b:0x166,_0x1ce037:0x163,_0x528998:0x188},_0x2da4f5=_0x24e8a8();function _0x14146b(_0x3ae272,_0x1d1567,_0x1082e1,_0xa19bfa){return _0x108d(_0x3ae272- -0x2af,_0x1d1567);}function _0x393aa7(_0x58e6c3,_0x18ee0d,_0x165ce8,_0x43b693){return _0x108d(_0x43b693-0x44,_0x165ce8);}while(!![]){try{const _0x33ac51=-parseInt(_0x14146b(-0x161,-0x163,-0x168,-0x163))/0x1+-parseInt(_0x393aa7(_0x3cc2d6._0x43a722,0x189,_0x3cc2d6._0x2577d2,0x181))/0x2+parseInt(_0x14146b(-_0x3cc2d6._0x425e4a,-0x165,-0x170,-0x160))/0x3*(parseInt(_0x14146b(-0x173,-_0x3cc2d6._0x5f030e,-0x16f,-0x16c))/0x4)+-parseInt(_0x393aa7(0x183,0x17f,0x183,0x189))/0x5*(parseInt(_0x393aa7(0x181,0x180,0x17e,0x187))/0x6)+-parseInt(_0x393aa7(0x188,0x184,0x17c,0x185))/0x7+parseInt(_0x14146b(-_0x3cc2d6._0x122855,-0x165,-_0x3cc2d6._0x42909b,-_0x3cc2d6._0x1ce037))/0x8+parseInt(_0x393aa7(0x18c,0x17e,0x190,_0x3cc2d6._0x528998))/0x9;if(_0x33ac51===_0x4ad27c)break;else _0x2da4f5['push'](_0x2da4f5['shift']());}catch(_0x10a9cb){_0x2da4f5['push'](_0x2da4f5['shift']());}}}(_0x1117,0xb8a8c));import{toOpenAiResponsesRequest}from'../chunk-BLGBVFVX.js';function _0x1117(){const _0x49e57f=['mtq2mejrtezbAq','mtCZmZfjtuDlvvy','BgfZDeLUzgv4','Aw1Hz2u','Dgv4Da','nZC2odK5mNbSteDAza','zNjVBq','ChvZAa','Aw1Hz2uVANbN','otaWodq1wMfSBNju','C2XPy2u','mJy4BKXTqw5V','mZC1otG2rKXgvNjh','BgvUz3rO','DgvZDa','CMvWBgfJzq','otC4nta0mwPktNvTsW','Bwf0y2HbBgW','ntK3mhfmy3PcwG','mtK1nZG3otHcvfrMC2m'];_0x1117=function(){return _0x49e57f;};return _0x1117();}import'../chunk-NYZR4XKO.js';function _0x108d(_0x465d0f,_0x2f5fc3){_0x465d0f=_0x465d0f-0x13c;const _0x111799=_0x1117();let _0x108d28=_0x111799[_0x465d0f];if(_0x108d['RNUSTT']===undefined){var _0x295c33=function(_0x3ab4e4){const _0x57f9c6='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5149ea='',_0x2dc572='';for(let _0x5a4c08=0x0,_0x52d986,_0x27828a,_0x4a0177=0x0;_0x27828a=_0x3ab4e4['charAt'](_0x4a0177++);~_0x27828a&&(_0x52d986=_0x5a4c08%0x4?_0x52d986*0x40+_0x27828a:_0x27828a,_0x5a4c08++%0x4)?_0x5149ea+=String['fromCharCode'](0xff&_0x52d986>>(-0x2*_0x5a4c08&0x6)):0x0){_0x27828a=_0x57f9c6['indexOf'](_0x27828a);}for(let _0x156b77=0x0,_0x252dd6=_0x5149ea['length'];_0x156b77<_0x252dd6;_0x156b77++){_0x2dc572+='%'+('00'+_0x5149ea['charCodeAt'](_0x156b77)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2dc572);};_0x108d['ZLzSEz']=_0x295c33,_0x108d['uVqJEc']={},_0x108d['RNUSTT']=!![];}const _0x196e22=_0x111799[0x0],_0x18ece3=_0x465d0f+_0x196e22,_0x2d5eb0=_0x108d['uVqJEc'][_0x18ece3];return!_0x2d5eb0?(_0x108d28=_0x108d['ZLzSEz'](_0x108d28),_0x108d['uVqJEc'][_0x18ece3]=_0x108d28):_0x108d28=_0x2d5eb0,_0x108d28;}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-YWQXXHHU.js';var DATA_URI_REGEX=/data:(image\/(?:png|jpeg|jpg|gif|webp));base64,([A-Za-z0-9+/\r\n]+={0,2})/g;function normalizeMediaType(_0x5149ea){const _0x429c05={_0x5c9cd7:0x144};function _0x3a3eea(_0x56158e,_0x51f2d5,_0x8bd3fa,_0x20b4e2){return _0x108d(_0x51f2d5- -0x9,_0x56158e);}return _0x5149ea===_0x3a3eea(0x147,_0x429c05._0x5c9cd7,0x143,0x13d)?'image/jpeg':_0x5149ea;}function isValidBase64(_0x2dc572){const _0x5d3c14={_0x4b1fc3:0x39f,_0x2a5f0f:0x3a4,_0x41c7c9:0x39c,_0x4c9d23:0x6c,_0xb678eb:0x64,_0x54af8b:0x5c,_0x53b3da:0x65,_0x2bd127:0x66},_0x251b50={_0x10d865:0x261};function _0x4d0768(_0x125746,_0x2ab541,_0x2965c1,_0x49d3fb){return _0x108d(_0x2ab541- -0xda,_0x49d3fb);}function _0x51773e(_0x1c1285,_0x1ddae8,_0x227760,_0x15a0e7){return _0x108d(_0x1c1285-_0x251b50._0x10d865,_0x1ddae8);}if(_0x2dc572[_0x51773e(_0x5d3c14._0x4b1fc3,0x3a9,_0x5d3c14._0x2a5f0f,_0x5d3c14._0x41c7c9)]===0x0||_0x2dc572[_0x4d0768(_0x5d3c14._0x4c9d23,_0x5d3c14._0xb678eb,_0x5d3c14._0x54af8b,0x5f)]%0x4!==0x0)return![];return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/[_0x4d0768(0x62,_0x5d3c14._0x53b3da,_0x5d3c14._0x2bd127,0x68)](_0x2dc572);}function collectImageMatches(_0x5a4c08){const _0x25182a={_0x5e366a:0x165,_0x5b3b50:0x163,_0x321853:0x15f,_0x1a2989:0x168,_0x4c2829:0x16e,_0x17c483:0x16c},_0x40d6bc={_0x453531:0x1a9,_0x2d9639:0x1a5,_0x56621d:0x1b4,_0x44a48d:0x1ae},_0x1f7439={_0x40fa52:0x2a8},_0x296b47={_0x14a78b:0x311};function _0x34d98a(_0x41cd26,_0x3873bc,_0x5c788d,_0x3e2625){return _0x108d(_0x3e2625- -_0x296b47._0x14a78b,_0x41cd26);}function _0x580ac9(_0xc54a57,_0x5cba48,_0x4692ee,_0x12d53e){return _0x108d(_0x4692ee- -_0x1f7439._0x40fa52,_0x12d53e);}return DATA_URI_REGEX[_0x580ac9(-_0x25182a._0x5e366a,-_0x25182a._0x5b3b50,-0x161,-0x161)]=0x0,Array[_0x580ac9(-_0x25182a._0x321853,-0x162,-0x15d,-0x15c)](_0x5a4c08[_0x580ac9(-_0x25182a._0x1a2989,-_0x25182a._0x4c2829,-0x166,-_0x25182a._0x17c483)](DATA_URI_REGEX))['filter'](_0x52d986=>{function _0x3b7c08(_0x16d58f,_0x33e86b,_0x5896b3,_0x24c050){return _0x580ac9(_0x16d58f-0x179,_0x33e86b-0xcc,_0x24c050- -0x46,_0x16d58f);}const _0x27828a=(_0x52d986[0x2]??'')[_0x3b7c08(-_0x40d6bc._0x453531,-_0x40d6bc._0x2d9639,-_0x40d6bc._0x56621d,-_0x40d6bc._0x44a48d)](/[\r\n]/g,'');return isValidBase64(_0x27828a);});}function hasPastedImages(_0x4a0177){const _0x162767={_0x365f4e:0x18b},_0x21c15f={_0x5e3ac9:0x50};function _0x264efa(_0x1a6545,_0x29d4e0,_0xe80e0a,_0xaeaa11){return _0x108d(_0xe80e0a-_0x21c15f._0x5e3ac9,_0xaeaa11);}return collectImageMatches(_0x4a0177)[_0x264efa(0x190,_0x162767._0x365f4e,0x18e,0x18a)]>0x0;}function contentFromPastedText(_0x156b77){const _0x5d9478={_0x1bea55:0x163,_0x1052d1:0x1c,_0x3bc53c:0x18,_0x38a84f:0x1d,_0x3ca7f3:0x1f,_0x49d669:0x17,_0x5a278d:0x26,_0x2f12b7:0x25,_0xac5571:0x25,_0x2330e4:0x10,_0x4343b9:0xc,_0x415dfd:0x155,_0x28b83e:0x151,_0x570229:0x15d,_0x212e63:0x27,_0x54eeb1:0x169,_0xaf219d:0x160,_0x2aed31:0x22,_0x56fcad:0x23,_0x3677da:0x1c,_0x29c53f:0x14,_0xa19c8a:0x16,_0x2a46e7:0x1e},_0x280f87={_0x33cdba:0x17},_0x22cfce={_0x24ce3e:0x12d},_0x252dd6=collectImageMatches(_0x156b77),_0x3e1c97=[];function _0x2c0d4b(_0xe2045b,_0x2dfea6,_0x35bc9e,_0x555593){return _0x108d(_0xe2045b- -_0x22cfce._0x24ce3e,_0x555593);}let _0x2f1d30=0x0;for(const _0x56e7c8 of _0x252dd6){const _0x284cb6=_0x56e7c8['index']??0x0,[_0x152c63,_0x45819a,_0x4cd521]=_0x56e7c8;_0x284cb6>_0x2f1d30&&_0x3e1c97[_0x121a39(0x169,_0x5d9478._0x1bea55,0x165,0x163)]({'type':_0x2c0d4b(_0x5d9478._0x1052d1,_0x5d9478._0x3bc53c,0x19,_0x5d9478._0x38a84f),'text':_0x156b77['slice'](_0x2f1d30,_0x284cb6)}),_0x3e1c97[_0x2c0d4b(_0x5d9478._0x3ca7f3,_0x5d9478._0x49d669,_0x5d9478._0x5a278d,_0x5d9478._0x2f12b7)]({'type':_0x2c0d4b(0x1b,_0x5d9478._0xac5571,0x14,0x11),'source':{'type':'base64','media_type':normalizeMediaType(_0x45819a),'data':_0x4cd521[_0x2c0d4b(0x13,_0x5d9478._0x2330e4,_0x5d9478._0x4343b9,0x15)](/[\r\n]/g,'')}}),_0x2f1d30=_0x284cb6+_0x152c63['length'];}_0x2f1d30<_0x156b77[_0x121a39(0x14e,_0x5d9478._0x415dfd,_0x5d9478._0x28b83e,_0x5d9478._0x570229)]&&_0x3e1c97[_0x2c0d4b(0x1f,_0x5d9478._0x212e63,0x1d,0x23)]({'type':_0x121a39(_0x5d9478._0x54eeb1,_0x5d9478._0xaf219d,0x159,0x16a),'text':_0x156b77[_0x2c0d4b(_0x5d9478._0x2aed31,_0x5d9478._0x56fcad,_0x5d9478._0x56fcad,0x22)](_0x2f1d30)});function _0x121a39(_0x49eed2,_0x3f8898,_0x1847e0,_0x217dda){return _0x108d(_0x3f8898-_0x280f87._0x33cdba,_0x49eed2);}return _0x3e1c97['length']>0x0?_0x3e1c97:[{'type':_0x2c0d4b(_0x5d9478._0x3677da,_0x5d9478._0x29c53f,_0x5d9478._0xa19c8a,_0x5d9478._0x2a46e7),'text':_0x156b77}];}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 +1 @@
1
- function _0x5c12(_0x58472f,_0xda4e33){_0x58472f=_0x58472f-0x1df;const _0x51a2b8=_0x51a2();let _0x5c1298=_0x51a2b8[_0x58472f];if(_0x5c12['KDCcyo']===undefined){var _0x151224=function(_0x547a4a){const _0x356980='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x13ff72='',_0x4273d7='';for(let _0x46bde4=0x0,_0x524bec,_0x30bcf5,_0x178ec1=0x0;_0x30bcf5=_0x547a4a['charAt'](_0x178ec1++);~_0x30bcf5&&(_0x524bec=_0x46bde4%0x4?_0x524bec*0x40+_0x30bcf5:_0x30bcf5,_0x46bde4++%0x4)?_0x13ff72+=String['fromCharCode'](0xff&_0x524bec>>(-0x2*_0x46bde4&0x6)):0x0){_0x30bcf5=_0x356980['indexOf'](_0x30bcf5);}for(let _0x4c1b75=0x0,_0x5cf8f6=_0x13ff72['length'];_0x4c1b75<_0x5cf8f6;_0x4c1b75++){_0x4273d7+='%'+('00'+_0x13ff72['charCodeAt'](_0x4c1b75)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4273d7);};_0x5c12['iEkFdp']=_0x151224,_0x5c12['pPUDfl']={},_0x5c12['KDCcyo']=!![];}const _0x4ee9a1=_0x51a2b8[0x0],_0x4dddad=_0x58472f+_0x4ee9a1,_0x4037d9=_0x5c12['pPUDfl'][_0x4dddad];return!_0x4037d9?(_0x5c1298=_0x5c12['iEkFdp'](_0x5c1298),_0x5c12['pPUDfl'][_0x4dddad]=_0x5c1298):_0x5c1298=_0x4037d9,_0x5c1298;}(function(_0xaaee16,_0x12dcac){const _0x5ee06={_0xc056e5:0x586,_0x3d01a7:0x584,_0x2bd86b:0x5a6,_0x3743a0:0x5a4,_0x1b2c5e:0x596,_0x47a8a1:0x58a,_0x29fc3f:0x5ba,_0x389d36:0x5c0,_0x5b1cbd:0x5c8,_0x351e0f:0x5b0,_0x3313a0:0x57b,_0x27b10f:0x59d,_0xc619dd:0x580,_0x1ecfc1:0x59a,_0xd9fea0:0x57f,_0x228409:0x2f,_0x83c1c9:0x25,_0x274091:0x50,_0x18fdaf:0x58f,_0x2e7f97:0x592,_0x39b461:0x583,_0x1cf487:0x59e};function _0x2be5da(_0x218ff2,_0x24896a,_0x28d554,_0x900d8b){return _0x5c12(_0x900d8b-0x395,_0x28d554);}const _0x27b8b6=_0xaaee16();function _0x25e0b6(_0x472555,_0x4b2f2f,_0x2a575b,_0x583d48){return _0x5c12(_0x2a575b- -0x254,_0x472555);}while(!![]){try{const _0x4571bd=-parseInt(_0x2be5da(0x594,0x56d,_0x5ee06._0xc056e5,_0x5ee06._0x3d01a7))/0x1+parseInt(_0x2be5da(_0x5ee06._0x2bd86b,_0x5ee06._0x3743a0,_0x5ee06._0x1b2c5e,_0x5ee06._0x47a8a1))/0x2*(-parseInt(_0x2be5da(_0x5ee06._0x29fc3f,_0x5ee06._0x389d36,_0x5ee06._0x5b1cbd,_0x5ee06._0x351e0f))/0x3)+parseInt(_0x2be5da(0x560,0x575,_0x5ee06._0x3313a0,0x574))/0x4*(parseInt(_0x2be5da(_0x5ee06._0x3d01a7,0x58c,_0x5ee06._0x3d01a7,_0x5ee06._0x27b10f))/0x5)+parseInt(_0x2be5da(_0x5ee06._0xc619dd,_0x5ee06._0x1ecfc1,_0x5ee06._0xd9fea0,0x581))/0x6+-parseInt(_0x25e0b6(-0x35,-0x5a,-0x4d,-0x34))/0x7*(-parseInt(_0x25e0b6(-_0x5ee06._0x228409,-0x49,-0x42,-0x5b))/0x8)+parseInt(_0x25e0b6(-0x69,-_0x5ee06._0x83c1c9,-0x47,-_0x5ee06._0x274091))/0x9+-parseInt(_0x2be5da(_0x5ee06._0x18fdaf,_0x5ee06._0x2e7f97,_0x5ee06._0x39b461,_0x5ee06._0x1cf487))/0xa;if(_0x4571bd===_0x12dcac)break;else _0x27b8b6['push'](_0x27b8b6['shift']());}catch(_0x526b9d){_0x27b8b6['push'](_0x27b8b6['shift']());}}}(_0x51a2,0x33e27));import{spawn}from'child_process';function _0x51a2(){const _0x1d652c=['qMXVy2TLzcbIEsbqCMvuB29SvxnLigHVB2SGzM9Yia','ugvYBwLZC2LVBIbKzw5PzwqGzM9Yia','mZC3mZGWwerlB05h','A2LSBa','CgLWzq','zgvUEq','sg9VAYb0Aw1LzcbVDxqGywz0zxiG','y29TBwfUza','ntC0t3z1Cvnm','CgfZCW','zxjYB3i','BgvUz3rO','ChvZAa','C3rHDhvZ','tM90AwzPy2f0Aw9U','BwfW','D3jPDgu','C3rKB3v0','Ag9VA3m','uhjLvg9VBfvZzq','BMfTzq','z2v0sg9VA3m','sg9VAYbIBg9JA2vKigv4zwn1DgLVBG','CNvU','ywXSB3C','CMvQzwn0','mJKZotq0n2XnD2v4yW','ntbAsKrfyLa','ndK1mtKWANPKAMXg','ywz0zxjuDxjUq29TCgXLDgu','C3rHDgu','ywz0zxjuB29SuMvZDwX0','mteXmJmXCLHetLvw','zgf0yq','CgvYBwLZC2LVBKrLy2LZAw9UuMvHC29U','xIG/oG','Ag9VA1nWzwnPzMLJt3v0Chv0','ogvQy0XOzG','rvbjueu','Ag9VAZPoB3rPzMLJyxrPB24','yMXVy2S','yMvMB3jLrMLUywXpDxrWDxq','zw5Kx3r1CM4','CgfYC2u','Dg9tDhjPBMC','DgLTzw91Da','mJu3n3H0reHltW','y2XVC2u','C2vZC2LVBKLK','DgvZDa','CMvHC29U','ug9ZDfrVB2XvC2u','Ag9VAZPtDg9W','DhjPBq','nZyXmZjlAhbfzNa','C3rKAw4','u0Lhs0Lmta','B3v0Chv0','Aw5WDxq','y29Kzq','y3DK','Dg9VBe5HBwu','AgfZsg9VA3m','BM93','Bwf0y2HLCG','B2jZzxj2zxi','u3rVCa','mtu4mda0nMPeq05tAW'];_0x51a2=function(){return _0x1d652c;};return _0x51a2();}var DEFAULT_TIMEOUT_S=0x3c;async function executeCommandHook(_0x13ff72,_0x4273d7,_0x46bde4=DEFAULT_TIMEOUT_S,_0x524bec){const _0x385bed={_0x102be9:0x29,_0x394d98:0x2c},_0x309a1c={_0x1a6f51:0x1ac,_0x2428ec:0x1a3,_0x1230de:0x1c3,_0x108b0b:0x1ac,_0x5e37ce:0x1c2,_0x2db376:0x20e,_0x4a9b84:0x20b,_0x481e1f:0x1b9,_0xbe8936:0x1ba,_0x3161ed:0x1c9,_0x2dccf7:0x1ab,_0x5cf0de:0x1b5,_0x2f7481:0x1cf,_0x585c0e:0x209,_0x525d34:0x1e7,_0x4ee479:0x1b8,_0x4339d7:0x19c,_0x3abdf1:0x1a2,_0xef00c5:0x1d4,_0x591a31:0x209,_0x3748bd:0x1e7,_0x20b033:0x1d3,_0x392691:0x1ca,_0x40ed9d:0x1d4,_0x3a11a5:0x220},_0x27bfee={_0x2331dc:0xe2,_0x3a2f09:0xc9},_0x2d2cf3={_0x14c985:0x2c0,_0x1bf2e6:0x2a9,_0xae8677:0x2ee,_0x5798e9:0x1e7,_0x255a91:0x1d3,_0x2c1726:0x1df,_0x1a69f5:0x1db,_0x6d164c:0x1da,_0x108450:0x2e2,_0x431dad:0x2c0,_0x10d603:0x2d7,_0x282f05:0x2e6,_0x1efcdf:0x1c8,_0x378e26:0x1c9,_0x6fc4b1:0x1da,_0x4db78d:0x1cb,_0x280da5:0x1bc,_0x1b9d62:0x286},_0x357733={_0x2a9482:0x196,_0x4ab62e:0x19a,_0x558632:0x1b3,_0x3fb527:0x3bd,_0x2e4abc:0x3c0,_0x183ddf:0x3f1,_0x58f825:0x193,_0x2b5c31:0x18a,_0x275ec6:0x1b4,_0x2dbeea:0x194,_0x4e696f:0x1bf},_0x187046={_0x3bc149:0xa,_0x4d35bc:0x18};function _0x4cf15a(_0x399e6f,_0x5bb99e,_0x423657,_0x51fda5){return _0x5c12(_0x423657- -0x1cf,_0x399e6f);}const _0x30bcf5=Date[_0x4cf15a(0xf,_0x385bed._0x102be9,0x19,_0x385bed._0x394d98)]();return new Promise(_0x178ec1=>{const _0x17cd95={_0x20f74c:0x301},_0x14eb13={_0x424e78:0x7a,_0x18ab0e:0xde},_0x3256a6={_0x577683:0x1ce,_0x451fe0:0x1f8,_0x1cfbc7:0x1db,_0x4e6da4:0x370},_0x23a070={_0x3c129e:0x37a,_0x2edb57:0xc3,_0x4bdf79:0x89},_0xa7b1fa={_0x3f255d:0x1a5},_0x3adefd={_0x413118:0x28f,_0x322b71:0x2a5},_0x53b09c={_0x372c5b:0x4d},_0x4c1b75=spawn('sh',['-c',_0x13ff72],{'stdio':[_0x12dc94(_0x309a1c._0x1a6f51,_0x309a1c._0x2428ec,0x196,_0x309a1c._0x1230de),_0x12dc94(_0x309a1c._0x108b0b,_0x309a1c._0x5e37ce,0x1c3,0x1a5),'pipe'],'env':{...process['env'],'CLAUDE_PROJECT_DIR':_0x524bec??process[_0x266f13(0x1f6,0x1f5,_0x309a1c._0x2db376,_0x309a1c._0x4a9b84)]()}});let _0x5cf8f6='';function _0x12dc94(_0x4913bb,_0x4a23b5,_0x4841aa,_0x592d03){return _0x4cf15a(_0x4841aa,_0x4a23b5-0xf6,_0x4913bb-0x18a,_0x592d03-0x172);}let _0x54841d='';_0x4c1b75[_0x12dc94(_0x309a1c._0x481e1f,0x1a0,_0x309a1c._0xbe8936,0x1ab)]['on'](_0x12dc94(_0x309a1c._0x3161ed,0x1d4,_0x309a1c._0x2dccf7,0x1df),_0x1e1507=>{function _0x57c566(_0x3c7084,_0x156c73,_0x4a3782,_0x3da2e5){return _0x266f13(_0x3c7084-0x89,_0x156c73-0x9,_0x156c73-_0x53b09c._0x372c5b,_0x3da2e5);}_0x5cf8f6+=_0x1e1507[_0x57c566(0x284,_0x3adefd._0x413118,0x2a8,_0x3adefd._0x322b71)]();});function _0x266f13(_0x132039,_0x2ae31a,_0x3f0dfc,_0x42e8cc){return _0x4cf15a(_0x42e8cc,_0x2ae31a-_0xa7b1fa._0x3f255d,_0x3f0dfc-0x1f8,_0x42e8cc-0x29);}_0x4c1b75['stderr']['on']('data',_0x54efec=>{const _0x4c6f1a={_0x4c103c:0x1ca,_0xb9b549:0xdb};function _0x16834b(_0x5b26dd,_0x5bbb9d,_0x194235,_0xb92d8b){return _0x12dc94(_0x5bbb9d- -_0x4c6f1a._0x4c103c,_0x5bbb9d-0xf5,_0x5b26dd,_0xb92d8b-_0x4c6f1a._0xb9b549);}_0x54841d+=_0x54efec[_0x16834b(0x27,_0x187046._0x3bc149,-0x18,-_0x187046._0x4d35bc)]();}),_0x4c1b75[_0x12dc94(0x19b,_0x309a1c._0x5cf0de,0x189,0x186)]['on'](_0x12dc94(0x1b2,0x1b6,0x1ad,_0x309a1c._0x2f7481),_0x3b9e9b=>{const _0xf4757={_0x4792e8:0x1b1};function _0x17802b(_0x4b15b8,_0x103f3a,_0xe1d1c1,_0x13ce3b){return _0x12dc94(_0x13ce3b- -_0x23a070._0x3c129e,_0x103f3a-_0x23a070._0x2edb57,_0x4b15b8,_0x13ce3b-_0x23a070._0x4bdf79);}function _0x313ee3(_0x10b20e,_0xa99778,_0x117dcd,_0xfe87e6){return _0x12dc94(_0x117dcd-_0xf4757._0x4792e8,_0xa99778-0xf3,_0xfe87e6,_0xfe87e6-0x120);}if(_0x3b9e9b[_0x17802b(-_0x3256a6._0x577683,-0x1bb,-_0x3256a6._0x451fe0,-_0x3256a6._0x1cfbc7)]!==_0x313ee3(0x36b,_0x3256a6._0x4e6da4,0x37f,0x36e))throw _0x3b9e9b;}),_0x4c1b75[_0x266f13(0x1eb,0x20d,_0x309a1c._0x585c0e,_0x309a1c._0x525d34)][_0x12dc94(_0x309a1c._0x4ee479,_0x309a1c._0x4339d7,_0x309a1c._0x3abdf1,_0x309a1c._0xef00c5)](JSON['stringify'](_0x4273d7)),_0x4c1b75[_0x266f13(0x21f,0x227,_0x309a1c._0x591a31,_0x309a1c._0x3748bd)]['end']();const _0x5e713c=setTimeout(()=>{const _0x375b3c={_0x1e976a:0x221,_0xaa9580:0xaa},_0x2d1762={_0x42ba68:0x9a,_0x36fb3b:0xf0,_0x4e6b2a:0x3af};_0x4c1b75[_0x402409(-_0x357733._0x2a9482,-_0x357733._0x4ab62e,-0x179,-_0x357733._0x558632)](_0x2f750f(0x3d7,0x3b9,0x3a0,_0x357733._0x3fb527));function _0x402409(_0x43111b,_0x323adb,_0x16517a,_0xfd9528){return _0x266f13(_0x43111b-_0x2d1762._0x42ba68,_0x323adb-_0x2d1762._0x36fb3b,_0x43111b- -_0x2d1762._0x4e6b2a,_0x16517a);}function _0x2f750f(_0x3a750b,_0x4a2278,_0x1dec28,_0x338444){return _0x12dc94(_0x338444-_0x375b3c._0x1e976a,_0x4a2278-_0x375b3c._0xaa9580,_0x3a750b,_0x338444-0x12d);}_0x178ec1({'status':_0x2f750f(0x3d3,_0x357733._0x2e4abc,_0x357733._0x183ddf,0x3d3),'error':_0x402409(-_0x357733._0x58f825,-_0x357733._0x2b5c31,-_0x357733._0x275ec6,-_0x357733._0x2dbeea)+_0x46bde4+'s','duration_ms':Date[_0x402409(-0x19e,-_0x357733._0x275ec6,-0x1b4,-_0x357733._0x4e696f)]()-_0x30bcf5});},_0x46bde4*0x3e8);_0x4c1b75['on'](_0x12dc94(0x1d7,_0x309a1c._0x20b033,_0x309a1c._0x392691,_0x309a1c._0x40ed9d),_0x88ef16=>{const _0x409012={_0x29f491:0x1d4};clearTimeout(_0x5e713c);function _0x462bc1(_0x16a49f,_0xc1d4a9,_0x423dfd,_0x1a5660){return _0x12dc94(_0x16a49f-0x29,_0xc1d4a9-_0x14eb13._0x424e78,_0x423dfd,_0x1a5660-_0x14eb13._0x18ab0e);}const _0x403149=Date[_0x4c459b(0x2b2,0x28a,0x293,0x28d)]()-_0x30bcf5;if(_0x88ef16===0x2){_0x178ec1({'status':_0x4c459b(0x2ae,0x2cf,_0x2d2cf3._0x14c985,0x2bd),'output':{'decision':_0x4c459b(_0x2d2cf3._0x1bf2e6,0x2a0,_0x2d2cf3._0x14c985,0x29f),'reason':_0x54841d[_0x4c459b(_0x2d2cf3._0xae8677,0x2b3,0x2cd,0x2ba)]()||_0x462bc1(_0x2d2cf3._0x5798e9,_0x2d2cf3._0x255a91,0x1e9,_0x2d2cf3._0x2c1726)},'duration_ms':_0x403149});return;}if(_0x88ef16!==0x0){_0x178ec1({'status':_0x462bc1(_0x2d2cf3._0x1a69f5,0x1cf,_0x2d2cf3._0x6d164c,0x1f8),'error':'Hook\x20exited\x20with\x20code\x20'+_0x88ef16+(_0x54841d[_0x4c459b(_0x2d2cf3._0x108450,_0x2d2cf3._0x431dad,0x2cd,0x2e7)]()?':\x20'+_0x54841d['trim']():''),'duration_ms':_0x403149});return;}const _0x15431a=_0x5cf8f6[_0x4c459b(_0x2d2cf3._0x10d603,_0x2d2cf3._0x282f05,0x2cd,0x2cb)]();function _0x4c459b(_0x223c36,_0x5141fc,_0x318b5e,_0x1ca343){return _0x12dc94(_0x318b5e-0xf0,_0x5141fc-0x14f,_0x5141fc,_0x1ca343-_0x409012._0x29f491);}if(_0x15431a['length']===0x0){_0x178ec1({'status':_0x462bc1(_0x2d2cf3._0x6d164c,_0x2d2cf3._0x1efcdf,_0x2d2cf3._0x378e26,0x1cd),'duration_ms':_0x403149});return;}try{const _0xd63c4=JSON[_0x4c459b(0x2a7,0x2cc,0x2c3,0x2ac)](_0x15431a);_0x178ec1({'status':_0x462bc1(_0x2d2cf3._0x6fc4b1,_0x2d2cf3._0x4db78d,0x1d8,_0x2d2cf3._0x280da5),'output':_0xd63c4,'duration_ms':_0x403149});}catch{_0x178ec1({'status':_0x4c459b(_0x2d2cf3._0x1b9d62,0x2b3,0x2a1,0x2b2),'duration_ms':_0x403149});}}),_0x4c1b75['on'](_0x266f13(0x23b,0x23c,_0x309a1c._0x3a11a5,0x23f),_0x2faf91=>{clearTimeout(_0x5e713c);function _0x30324c(_0x54514e,_0x44eb23,_0x4a4e8b,_0x11e430){return _0x266f13(_0x54514e-0x1ab,_0x44eb23-0x6d,_0x44eb23- -_0x17cd95._0x20f74c,_0x54514e);}_0x178ec1({'status':_0x30324c(-_0x27bfee._0x2331dc,-0xe1,-_0x27bfee._0x3a2f09,-0xe7),'error':_0x2faf91['message'],'duration_ms':Date['now']()-_0x30bcf5});});});}function createHookExtensions(_0xe49da8,_0x4da69b,_0x539246={}){const _0x4c2279={_0x4f3a12:0x383,_0x286c8c:0x36f,_0x53ecee:0x368,_0x56c279:0x37c,_0x41335c:0x36f,_0x2d2f21:0x376,_0x36e0f1:0x365,_0x430767:0x30b,_0x21ccc5:0x32b,_0x5b3e0f:0x342,_0x280514:0x31b,_0x2b0a12:0x33a,_0x369d5d:0x384,_0x515779:0x3a4,_0x31a542:0x36f,_0x40df97:0x333,_0x36dac9:0x30e,_0x217c24:0x35c,_0x12812c:0x363,_0x37e195:0x373,_0x4e0228:0x353,_0x1d15b6:0x355,_0x7ddfa3:0x34d,_0x20e564:0x335,_0x48caf3:0x33e},_0x5eb1c4={_0x5b7747:0xdc,_0x528863:0x10e,_0x33704e:0xd5,_0x35368a:0xe0,_0x1c3220:0x3ee,_0x2e9d79:0x3f0},_0x492c14={_0x1d50c6:0xfd,_0x42dd1c:0xe3,_0x5218b3:0x3de,_0x53196e:0x3e5,_0x6690df:0x3c2,_0x2e969f:0x3f9,_0x217752:0x40a,_0x22d57c:0x40d,_0x1a4eb5:0x3ea,_0x548ef5:0x410,_0x28d59e:0x401},_0x2b2db2={_0x5181a4:0x90},_0x47cb52={_0x32b36f:0x12f,_0x1e7f72:0xd1},_0x410c2d={_0x1d9357:0x55b,_0x3006bc:0x53f,_0x4fb5da:0x4c,_0xc0ed5a:0x30,_0x2ff057:0x24,_0x341de9:0x25,_0x35f901:0xa,_0x3861d9:0x50e,_0x52ecb5:0x523,_0x21d11f:0x1d,_0x40693d:0x11,_0x326b5e:0x1a,_0x16f78c:0x1f,_0x14df28:0x1b,_0x1581bc:0x518,_0x26f93b:0x551,_0x28be26:0x510,_0x1a3c50:0x547,_0x7bace8:0x557},_0x53fec7={_0x4dd929:0x163},_0x13bd9e={_0x410463:0x141};function _0x3c7323(_0x13fdd7,_0x1e6bb1,_0x4500c6,_0x2f0388){return _0x5c12(_0x2f0388-_0x13bd9e._0x410463,_0x4500c6);}function _0x2aa48a(_0xf60a3a,_0xa07e10,_0x4452ca,_0x2fd3f5){return _0x5c12(_0xf60a3a-_0x53fec7._0x4dd929,_0x4452ca);}const _0x2838ef=[],{sessionId:_0x2be401,projectDir:_0x17fdf0}=_0x539246,_0x5d0fb9=_0xcdffa8=>_0xe49da8[_0x3c7323(0x309,0x30d,0x32c,0x328)]?_0xe49da8[_0x3c7323(0x319,0x30e,0x320,0x328)](_0xcdffa8):_0xe49da8[_0x2aa48a(0x365,0x374,0x36c,0x369)](_0xcdffa8)[_0x2aa48a(0x35b,0x339,0x37d,0x349)]>0x0;return _0x5d0fb9(_0x2aa48a(_0x4c2279._0x4f3a12,_0x4c2279._0x286c8c,0x367,0x39e))&&_0x2838ef[_0x2aa48a(0x35c,_0x4c2279._0x53ecee,_0x4c2279._0x56c279,0x347)]({'id':'hook:PostToolUse','stage':_0x2aa48a(_0x4c2279._0x41335c,_0x4c2279._0x2d2f21,0x360,_0x4c2279._0x36e0f1),'kind':_0x3c7323(_0x4c2279._0x430767,0x340,0x338,_0x4c2279._0x21ccc5),'order':0x0,'enabled':!![],'run':async(_0x2465c1,_0x1d7547)=>{const _0x4236a4={_0x3951b7:0x12},_0x408522={_0x5be2a7:0x24,_0xd933a5:0x1fc},_0x4399bc=_0xe49da8[_0xb179b0(_0x410c2d._0x1d9357,0x55a,0x524,_0x410c2d._0x3006bc)](_0x278059(0x31,_0x410c2d._0x4fb5da,0x4f,_0x410c2d._0xc0ed5a),_0x2465c1[_0x278059(-_0x410c2d._0x2ff057,-0x8,-_0x410c2d._0x341de9,-_0x410c2d._0x35f901)]);function _0xb179b0(_0x33acfd,_0x2eb659,_0x33ebc,_0x4af5c6){return _0x3c7323(_0x33acfd-0x91,_0x2eb659-_0x408522._0x5be2a7,_0x33acfd,_0x4af5c6-_0x408522._0xd933a5);}function _0x278059(_0x3afb8e,_0x2e1c8d,_0x364888,_0x34bf6c){return _0x3c7323(_0x3afb8e-0x16,_0x2e1c8d-_0x4236a4._0x3951b7,_0x2e1c8d,_0x34bf6c- -0x331);}for(const _0x44349d of _0x4399bc){const _0x1e26b5={'tool_name':_0x2465c1[_0xb179b0(0x53d,_0x410c2d._0x3861d9,0x50f,_0x410c2d._0x52ecb5)],'tool_input':void 0x0,'tool_output':_0x2465c1['output'],'tool_result_status':_0x2465c1[_0x278059(-0x14,_0x410c2d._0x21d11f,-_0x410c2d._0x40693d,_0x410c2d._0x35f901)],'session_id':_0x2be401??_0x1d7547[_0x278059(0x1e,_0x410c2d._0x326b5e,_0x410c2d._0x16f78c,_0x410c2d._0x14df28)]['sessionId']};await _0x4da69b(_0x44349d[_0xb179b0(_0x410c2d._0x1581bc,_0x410c2d._0x26f93b,_0x410c2d._0x28be26,0x531)],_0x1e26b5,_0x44349d[_0xb179b0(0x539,_0x410c2d._0x1a3c50,0x551,_0x410c2d._0x7bace8)],_0x17fdf0);}}}),_0x5d0fb9(_0x3c7323(_0x4c2279._0x5b3e0f,0x330,0x318,0x32c))&&_0x2838ef[_0x3c7323(0x33a,_0x4c2279._0x280514,0x34d,_0x4c2279._0x2b0a12)]({'id':_0x2aa48a(_0x4c2279._0x369d5d,0x378,_0x4c2279._0x515779,0x396),'stage':_0x2aa48a(0x379,0x37a,_0x4c2279._0x31a542,0x391),'kind':_0x3c7323(0x340,_0x4c2279._0x40df97,_0x4c2279._0x36dac9,0x32b),'order':0x0,'enabled':!![],'run':async(_0x3f1f6b,_0x509cbd)=>{function _0x275096(_0x41c94d,_0x4df258,_0x12ef9e,_0x3ac673){return _0x2aa48a(_0x12ef9e- -0x282,_0x4df258-_0x47cb52._0x32b36f,_0x4df258,_0x3ac673-_0x47cb52._0x1e7f72);}function _0x371b5f(_0x4a9816,_0x426867,_0x16173d,_0x5100a1){return _0x2aa48a(_0x4a9816-_0x2b2db2._0x5181a4,_0x426867-0xac,_0x16173d,_0x5100a1-0x19);}const _0x2f2dde=_0xe49da8[_0x275096(_0x492c14._0x1d50c6,0xd6,_0x492c14._0x42dd1c,0xe5)](_0x371b5f(_0x492c14._0x5218b3,_0x492c14._0x53196e,_0x492c14._0x6690df,_0x492c14._0x2e969f));for(const _0x30a423 of _0x2f2dde){const _0x4fc350={'stop_reason':_0x371b5f(_0x492c14._0x217752,_0x492c14._0x22d57c,0x3fe,_0x492c14._0x1a4eb5),'session_id':_0x2be401??_0x509cbd['state'][_0x371b5f(_0x492c14._0x548ef5,_0x492c14._0x28d59e,0x416,0x405)]};await _0x4da69b(_0x30a423[_0x371b5f(0x3e7,0x3c8,0x3f4,0x3dd)],_0x4fc350,_0x30a423['timeout'],_0x17fdf0);}}}),_0x5d0fb9(_0x2aa48a(0x35e,0x33c,0x33c,0x380))&&_0x2838ef[_0x2aa48a(_0x4c2279._0x217c24,_0x4c2279._0x12812c,0x343,_0x4c2279._0x37e195)]({'id':_0x3c7323(0x345,_0x4c2279._0x4e0228,0x358,_0x4c2279._0x1d15b6),'stage':_0x3c7323(_0x4c2279._0x4e0228,0x339,0x35f,0x34b),'kind':_0x2aa48a(_0x4c2279._0x7ddfa3,0x341,_0x4c2279._0x20e564,_0x4c2279._0x48caf3),'order':0x0,'enabled':!![],'run':async(_0x2aa3e3,_0x4007fb)=>{const _0x40f2c5={_0x310a0d:0x1d1};function _0x410d4a(_0x5da64c,_0x41b034,_0x161d91,_0x35b48e){return _0x2aa48a(_0x41b034-0x99,_0x41b034-0x192,_0x5da64c,_0x35b48e-_0x40f2c5._0x310a0d);}const _0x54fcf8=_0xe49da8[_0x3c0844(-_0x5eb1c4._0x5b7747,-0xfb,-0xfe,-_0x5eb1c4._0x528863)]('Notification');function _0x3c0844(_0x1abbd2,_0x11c097,_0x4d6e7d,_0x31945e){return _0x2aa48a(_0x11c097- -0x460,_0x11c097-0x104,_0x1abbd2,_0x31945e-0x81);}for(const _0x1bcfe7 of _0x54fcf8){const _0x5eb3b6={'message':'Agent\x20finished\x20responding','session_id':_0x2be401??_0x2aa3e3[_0x3c0844(-_0x5eb1c4._0x33704e,-_0x5eb1c4._0x35368a,-0xf2,-0xce)]};await _0x4da69b(_0x1bcfe7[_0x410d4a(_0x5eb1c4._0x1c3220,_0x5eb1c4._0x2e9d79,0x402,0x3d5)],_0x5eb3b6,_0x1bcfe7['timeout'],_0x17fdf0);}}}),_0x2838ef;}function createHookOnToolCallMiddleware(_0x231fbe,_0x1aad32,_0x13a7d5,_0xfb9e97={}){const _0x19c689={_0x49ecb6:0xe5,_0x35afa7:0xd5,_0x4ca89c:0xbb,_0x3171e8:0xc3,_0x1850fb:0xc2,_0x2079fb:0xef,_0x3527d9:0xda,_0x51f173:0x217,_0x48de49:0x1fa,_0x44cc67:0xeb,_0x52246b:0xc6,_0x2bfb13:0xb1,_0x378aa2:0xb0,_0x1641ea:0xf3,_0x1c4cde:0xfe,_0x12dd51:0x1bc,_0x4c2f15:0xd0,_0x5cd200:0xc8,_0x1b4dd1:0xe3,_0x5a9afe:0xf1,_0x5e02f7:0x1ce,_0x212f98:0x1c8,_0x25e9be:0x1d3,_0x4d919e:0x1cc,_0x2e8e5f:0xd9,_0xa069ae:0xc0,_0x4eada3:0xdd,_0x45a8ef:0x1dc,_0x422e52:0x1e3,_0x51a693:0x1b7,_0x1683f4:0x1da,_0xf8eb84:0x1df,_0x544bda:0x1e6,_0x2d76b9:0x1fc,_0x1dee1b:0x1c6,_0x268145:0x1c9,_0xe14d25:0x1b6,_0x3fa0d1:0x1e1,_0x5db4d3:0x1d7,_0x4e2ccd:0xf0,_0x20eec2:0x1b3,_0x47bee0:0x1b9,_0x4d8bbb:0xe8},{sessionId:_0x3040a2,projectDir:_0x557c56}=_0xfb9e97;return async(_0x5a5399,_0x5f24d0)=>{const _0x31bc4a=_0x231fbe[_0x187aa1(-0xd3,-_0x19c689._0x49ecb6,-0xd7,-0xf5)](_0x187aa1(-_0x19c689._0x35afa7,-_0x19c689._0x4ca89c,-0xc9,-_0x19c689._0x3171e8),_0x5a5399[_0x187aa1(-0xd4,-0xbd,-_0x19c689._0x1850fb,-0xb9)]);function _0x187aa1(_0x4a4da7,_0x3b1380,_0x3fa72e,_0x4a530e){return _0x5c12(_0x4a4da7- -0x2d5,_0x3fa72e);}for(const _0x240c5b of _0x31bc4a){const _0x67f88d={'tool_name':_0x5a5399[_0x187aa1(-0xd4,-_0x19c689._0x2079fb,-0xf2,-_0x19c689._0x3527d9)],'tool_input':_0x5a5399[_0x40c3a8(-0x1f2,-_0x19c689._0x51f173,-0x202,-_0x19c689._0x48de49)],'session_id':_0x3040a2},_0x5d2bd4=await _0x1aad32(_0x240c5b[_0x187aa1(-0xe1,-_0x19c689._0x44cc67,-_0x19c689._0x52246b,-0xe6)],_0x67f88d,_0x240c5b[_0x187aa1(-_0x19c689._0x4ca89c,-0xa4,-_0x19c689._0x2bfb13,-_0x19c689._0x378aa2)],_0x557c56),_0x2af446=_0x5d2bd4[_0x187aa1(-_0x19c689._0x1641ea,-_0x19c689._0x1c4cde,-0xf1,-0x10c)]?.[_0x40c3a8(-_0x19c689._0x12dd51,-0x1da,-0x1e1,-0x1cc)]?.['permissionDecision'];if(_0x2af446===_0x187aa1(-_0x19c689._0x4c2f15,-0xb7,-_0x19c689._0x3171e8,-0xc2))return{'action':_0x187aa1(-0xd1,-0xaf,-0xdc,-_0x19c689._0x5cd200)};if(_0x2af446===_0x187aa1(-_0x19c689._0x1b4dd1,-0xe1,-0xe5,-_0x19c689._0x5a9afe))return{'action':'reject','reason':_0x5d2bd4['output']?.[_0x40c3a8(-_0x19c689._0x5e02f7,-_0x19c689._0x212f98,-_0x19c689._0x25e9be,-_0x19c689._0x4d919e)]?.[_0x187aa1(-0xc6,-_0x19c689._0x2e8e5f,-_0x19c689._0xa069ae,-_0x19c689._0x4eada3)]||_0x40c3a8(-0x1ea,-0x1fd,-0x1e5,-0x1ef)+_0x5a5399['name']};if(_0x5d2bd4[_0x40c3a8(-0x1c4,-_0x19c689._0x45a8ef,-0x1cc,-_0x19c689._0x422e52)]===_0x40c3a8(-_0x19c689._0x51a693,-_0x19c689._0x1683f4,-_0x19c689._0xf8eb84,-_0x19c689._0x212f98)||_0x5d2bd4[_0x40c3a8(-_0x19c689._0x544bda,-_0x19c689._0x2d76b9,-0x201,-0x1fb)]?.['decision']===_0x40c3a8(-_0x19c689._0x1dee1b,-_0x19c689._0x268145,-_0x19c689._0xe14d25,-0x1c8))return{'action':_0x40c3a8(-_0x19c689._0x3fa0d1,-0x1b7,-0x1e2,-_0x19c689._0x5db4d3),'reason':_0x5d2bd4[_0x187aa1(-_0x19c689._0x1641ea,-0x111,-0x10a,-_0x19c689._0x4e2ccd)]?.[_0x40c3a8(-_0x19c689._0x20eec2,-0x1ad,-_0x19c689._0x47bee0,-0x1be)]||_0x187aa1(-_0x19c689._0x4d8bbb,-0xfa,-0xfb,-0x109)+_0x5a5399[_0x40c3a8(-0x1de,-0x1ef,-0x1f7,-0x1dc)]};}function _0x40c3a8(_0x4f0aaf,_0x4527b5,_0x51879b,_0x1cfa9a){return _0x5c12(_0x1cfa9a- -0x3dd,_0x4f0aaf);}return _0x13a7d5(_0x5a5399,_0x5f24d0);};}var DEFAULT_TIMEOUT_S2=0x3c;function createHookRegistry(_0x49afcc){const _0x1f1f37={_0x4380ba:0x16d,_0x439a1f:0x160,_0x572c34:0x171,_0x141c7f:0x153,_0x4cb6a6:0x189,_0xe27d7a:0x16c,_0x227e0e:0x161,_0x150838:0x176,_0x57cc2c:0x152,_0x7c7ae8:0x177,_0x300ba6:0x167,_0x442212:0x15c,_0x177f7d:0x16a,_0x4cf5c4:0x132,_0x392000:0x17b,_0x2274d4:0x16f,_0x49b8d2:0x186,_0x5c7a19:0x17d,_0x12fc99:0x14b,_0x27dae7:0x155,_0x286000:0x16d,_0x2665cd:0x186,_0x65103c:0x167},_0x5bfebc={_0x30ed7a:0x35a},_0x4d0f8b={_0x204267:0x366},_0x63dd08={_0x5914c2:0x4d2,_0x5c7fdd:0x4b8,_0x17e6ab:0x4e2},_0x1b3ab0={_0x32c62c:0x2cf};return{'hasHooks'(_0x4d4d51){function _0x386dd2(_0x30ab82,_0x54de2b,_0x523d28,_0x571c2f){return _0x5c12(_0x571c2f-_0x1b3ab0._0x32c62c,_0x523d28);}return(_0x49afcc[_0x4d4d51]?.[_0x386dd2(_0x63dd08._0x5914c2,_0x63dd08._0x5c7fdd,_0x63dd08._0x17e6ab,0x4c7)]??0x0)>0x0;},'getHooks'(_0x4942f9,_0x3d97a1){function _0x2d1678(_0x30eba7,_0x47f269,_0x34bcf7,_0x20b503){return _0x5c12(_0x20b503- -_0x4d0f8b._0x204267,_0x47f269);}const _0x4943e4=_0x49afcc[_0x4942f9];function _0x234178(_0x4039aa,_0x350e57,_0x118943,_0x1c712f){return _0x5c12(_0x350e57- -_0x5bfebc._0x30ed7a,_0x118943);}if(!_0x4943e4)return[];const _0x3b66e9=[];for(const _0x11d35d of _0x4943e4){if(!_0x11d35d[_0x234178(-0x18c,-0x171,-_0x1f1f37._0x4380ba,-_0x1f1f37._0x439a1f)]||_0x11d35d[_0x234178(-0x18c,-_0x1f1f37._0x572c34,-_0x1f1f37._0x141c7f,-_0x1f1f37._0x4cb6a6)]==='*'){_0x3b66e9[_0x234178(-_0x1f1f37._0xe27d7a,-_0x1f1f37._0x227e0e,-_0x1f1f37._0x150838,-_0x1f1f37._0x57cc2c)](..._0x11d35d[_0x2d1678(-0x167,-0x163,-_0x1f1f37._0x7c7ae8,-_0x1f1f37._0x300ba6)][_0x2d1678(-0x161,-_0x1f1f37._0x442212,-0x186,-_0x1f1f37._0x177f7d)](_0x45e737=>({'command':_0x45e737[_0x2d1678(-0x18b,-0x154,-0x176,-0x172)],'timeout':_0x45e737[_0x2d1678(-0x134,-0x16d,-0x143,-0x14c)]??DEFAULT_TIMEOUT_S2})));continue;}if(_0x3d97a1===void 0x0)continue;const _0x51f25c=new RegExp(_0x234178(-_0x1f1f37._0x4cf5c4,-0x14a,-0x14d,-0x133)+_0x11d35d[_0x2d1678(-_0x1f1f37._0x392000,-_0x1f1f37._0x2274d4,-_0x1f1f37._0x49b8d2,-_0x1f1f37._0x5c7a19)]+')$');_0x51f25c[_0x2d1678(-_0x1f1f37._0x12fc99,-0x12d,-_0x1f1f37._0x27dae7,-0x148)](_0x3d97a1)&&_0x3b66e9[_0x2d1678(-0x162,-0x16d,-0x185,-_0x1f1f37._0x286000)](..._0x11d35d[_0x2d1678(-_0x1f1f37._0x2665cd,-_0x1f1f37._0x2274d4,-0x162,-_0x1f1f37._0x65103c)]['map'](_0x3f486c=>({'command':_0x3f486c[_0x2d1678(-0x171,-0x191,-0x164,-0x172)],'timeout':_0x3f486c['timeout']??DEFAULT_TIMEOUT_S2})));}return _0x3b66e9;}};}export{createHookExtensions,createHookOnToolCallMiddleware,createHookRegistry,executeCommandHook};
1
+ (function(_0x4915fa,_0x30cad4){const _0x397bf3={_0x34d6c8:0x1fc,_0x5a0480:0x203,_0x4ea95a:0x21f,_0x2695c6:0x256,_0x5650d8:0x294,_0x5c95ae:0x297,_0x591b6b:0x2ba,_0x17100e:0x29e,_0x4b82b2:0x2d4,_0x171898:0x2b6,_0x1831b2:0x2a8,_0x700c91:0x2c6,_0x2194af:0x23d,_0x57a1ed:0x2ce,_0x6788b0:0x2d2,_0x2dde3a:0x2d6,_0x5dd04a:0x263,_0x110680:0x2b4,_0x1d0ac0:0x2a7,_0x2d7180:0x201,_0xf3418b:0x240,_0x4d9e92:0x21e,_0x234e90:0x2a5,_0x1fdc3a:0x29d},_0x53205c={_0x47c53b:0x193};function _0x4a934f(_0x5c110f,_0x3716ea,_0x5f4153,_0x1b5933){return _0x2d38(_0x5f4153-_0x53205c._0x47c53b,_0x5c110f);}const _0x2dd4c0=_0x4915fa();function _0x99d5d3(_0x179049,_0x35feb9,_0x1d990f,_0x353777){return _0x2d38(_0x35feb9- -0x353,_0x353777);}while(!![]){try{const _0xe69579=parseInt(_0x4a934f(_0x397bf3._0x34d6c8,_0x397bf3._0x5a0480,_0x397bf3._0x4ea95a,0x22d))/0x1*(parseInt(_0x4a934f(_0x397bf3._0x2695c6,0x253,0x261,0x279))/0x2)+parseInt(_0x99d5d3(-_0x397bf3._0x5650d8,-_0x397bf3._0x5c95ae,-0x294,-_0x397bf3._0x591b6b))/0x3*(parseInt(_0x99d5d3(-_0x397bf3._0x17100e,-0x2bf,-0x2d4,-_0x397bf3._0x4b82b2))/0x4)+-parseInt(_0x4a934f(0x23b,0x222,0x228,0x227))/0x5+parseInt(_0x99d5d3(-0x2c9,-_0x397bf3._0x171898,-_0x397bf3._0x1831b2,-_0x397bf3._0x700c91))/0x6*(parseInt(_0x4a934f(0x241,0x24e,_0x397bf3._0x2194af,0x25d))/0x7)+parseInt(_0x99d5d3(-_0x397bf3._0x57a1ed,-0x2b5,-_0x397bf3._0x6788b0,-_0x397bf3._0x2dde3a))/0x8+-parseInt(_0x4a934f(_0x397bf3._0x5dd04a,0x258,0x263,0x27b))/0x9*(-parseInt(_0x99d5d3(-0x2ae,-_0x397bf3._0x110680,-_0x397bf3._0x1d0ac0,-0x2d5))/0xa)+parseInt(_0x4a934f(_0x397bf3._0x2d7180,_0x397bf3._0xf3418b,0x220,_0x397bf3._0x4d9e92))/0xb*(-parseInt(_0x99d5d3(-_0x397bf3._0x234e90,-0x2bd,-0x2b6,-_0x397bf3._0x1fdc3a))/0xc);if(_0xe69579===_0x30cad4)break;else _0x2dd4c0['push'](_0x2dd4c0['shift']());}catch(_0x3f5df0){_0x2dd4c0['push'](_0x2dd4c0['shift']());}}}(_0x5937,0xa1492));import{spawn}from'child_process';var DEFAULT_TIMEOUT_S=0x3c;function _0x2d38(_0x68b95b,_0x16d076){_0x68b95b=_0x68b95b-0x8b;const _0x5937c4=_0x5937();let _0x2d38c5=_0x5937c4[_0x68b95b];if(_0x2d38['AuhDFy']===undefined){var _0xb3c500=function(_0x46b06d){const _0x14c2f5='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x404e2d='',_0x44abad='';for(let _0x52e853=0x0,_0x23bbee,_0x4c25ea,_0x27303b=0x0;_0x4c25ea=_0x46b06d['charAt'](_0x27303b++);~_0x4c25ea&&(_0x23bbee=_0x52e853%0x4?_0x23bbee*0x40+_0x4c25ea:_0x4c25ea,_0x52e853++%0x4)?_0x404e2d+=String['fromCharCode'](0xff&_0x23bbee>>(-0x2*_0x52e853&0x6)):0x0){_0x4c25ea=_0x14c2f5['indexOf'](_0x4c25ea);}for(let _0x4c60ed=0x0,_0x1afc86=_0x404e2d['length'];_0x4c60ed<_0x1afc86;_0x4c60ed++){_0x44abad+='%'+('00'+_0x404e2d['charCodeAt'](_0x4c60ed)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x44abad);};_0x2d38['OOQTxY']=_0xb3c500,_0x2d38['tdmGuQ']={},_0x2d38['AuhDFy']=!![];}const _0x44ba5f=_0x5937c4[0x0],_0x2c01f6=_0x68b95b+_0x44ba5f,_0x27659a=_0x2d38['tdmGuQ'][_0x2c01f6];return!_0x27659a?(_0x2d38c5=_0x2d38['OOQTxY'](_0x2d38c5),_0x2d38['tdmGuQ'][_0x2c01f6]=_0x2d38c5):_0x2d38c5=_0x27659a,_0x2d38c5;}async function executeCommandHook(_0x404e2d,_0x44abad,_0x52e853=DEFAULT_TIMEOUT_S,_0x23bbee){const _0xc3e03b={_0x1b6ac4:0x169,_0xff64e7:0x17e,_0x10a585:0x17f,_0x2d3fa7:0x16b,_0x44a121:0x18d,_0x2854ba:0x17d,_0x1cd996:0x16e,_0x5f0c8d:0x187,_0x3085d0:0xae,_0x3bb23b:0xad,_0x2827df:0xb4,_0x12f565:0x171,_0x1bd650:0xa8,_0x561e20:0x96,_0x7715f:0xb0,_0x44c238:0x95,_0x1d6307:0xb7,_0x31377c:0xc5,_0x49d4ac:0xd3,_0x2b5774:0xac,_0xa90f97:0x9d,_0x253e3c:0x193,_0x240d81:0x17e,_0x2d19df:0x160,_0x5bae97:0x178,_0x597984:0x174,_0x31fc0f:0x179},_0xe7d076={_0x360d3e:0x166,_0x11c443:0x14a,_0x57c220:0x3a1,_0x387260:0x3b5,_0x4ca284:0x398,_0x574069:0x39f,_0x5175df:0x38f,_0x54f031:0x169,_0x895b5c:0x16d,_0x9489:0x37c,_0x106e7a:0x37d,_0x136bdd:0x3c7,_0xa88aac:0x3ce,_0x10d275:0x183,_0x2f7776:0x176,_0x4c9698:0x392},_0x29241b={_0xb3ed34:0x3fe,_0x41ea2d:0x3f0},_0x2d112b={_0x370de0:0x1cb,_0x13500a:0x1df,_0x4a7fea:0x1cc},_0x901bb1={_0x56899a:0x165},_0x4c25ea=Date['now']();return new Promise(_0x27303b=>{const _0x52bf9d={_0x522451:0x2b4,_0x49a063:0x28f,_0x2338b3:0x29d,_0xc7713d:0x426,_0x30becf:0x43e,_0x16d5e9:0x44f},_0x271338={_0x53b4a9:0x3db,_0x4b2bf0:0x3d8,_0x46b823:0x3d9,_0x5d279f:0x3b9,_0x5e43ba:0x3c,_0x5f2232:0x19,_0x4fb3c3:0x49},_0x3c8f12={_0x3bfd91:0x122},_0x319447={_0x43a881:0xc6},_0xcf568b={_0x10fb4c:0x219},_0x4c60ed=spawn('sh',['-c',_0x404e2d],{'stdio':[_0x473de0(-_0xc3e03b._0x1b6ac4,-_0xc3e03b._0xff64e7,-_0xc3e03b._0x10a585,-_0xc3e03b._0x2d3fa7),'pipe',_0x473de0(-_0xc3e03b._0x44a121,-0x15d,-_0xc3e03b._0x2854ba,-0x16b)],'env':{...process[_0x473de0(-0x162,-0x130,-0x158,-0x154)],'CLAUDE_PROJECT_DIR':_0x23bbee??process[_0x473de0(-0x179,-_0xc3e03b._0x1cd996,-0x1a2,-_0xc3e03b._0x5f0c8d)]()}});function _0x473de0(_0x1eb510,_0x48ac82,_0x399808,_0x537207){return _0x2d38(_0x537207- -_0xcf568b._0x10fb4c,_0x1eb510);}let _0x1afc86='';function _0x10eb7e(_0x23b793,_0x17612e,_0x4c9e9f,_0x21f80b){return _0x2d38(_0x17612e- -_0x901bb1._0x56899a,_0x21f80b);}let _0x3ec6cf='';_0x4c60ed[_0x10eb7e(-_0xc3e03b._0x3085d0,-0xbd,-_0xc3e03b._0x3bb23b,-_0xc3e03b._0x2827df)]['on'](_0x473de0(-_0xc3e03b._0x12f565,-0x166,-0x162,-0x157),_0x18bf67=>{const _0x3aa4cb={_0x496de7:0xf7};function _0x58ac0f(_0x326de5,_0x4711ee,_0xf9c6bf,_0x463c25){return _0x473de0(_0xf9c6bf,_0x4711ee-_0x3aa4cb._0x496de7,_0xf9c6bf-0x41,_0x326de5-0x320);}_0x1afc86+=_0x18bf67[_0x58ac0f(0x1cd,_0x2d112b._0x370de0,_0x2d112b._0x13500a,_0x2d112b._0x4a7fea)]();}),_0x4c60ed[_0x10eb7e(-0xc0,-0xae,-0xcb,-_0xc3e03b._0x1bd650)]['on']('data',_0x170ddf=>{function _0x157d27(_0x51329b,_0xa71213,_0x340165,_0x18d5b5){return _0x473de0(_0x51329b,_0xa71213-0x179,_0x340165-_0x319447._0x43a881,_0x340165-0x543);}_0x3ec6cf+=_0x170ddf[_0x157d27(0x3e5,_0x29241b._0xb3ed34,_0x29241b._0x41ea2d,0x403)]();}),_0x4c60ed[_0x10eb7e(-_0xc3e03b._0x561e20,-0xac,-_0xc3e03b._0x7715f,-_0xc3e03b._0x44c238)]['on'](_0x10eb7e(-_0xc3e03b._0x1d6307,-_0xc3e03b._0x31377c,-0xb1,-_0xc3e03b._0x49d4ac),_0x27bc9d=>{const _0x532a21={_0xc9e32:0x1bd,_0x39c847:0x5b,_0x5e7914:0x538};function _0x439b3d(_0x321fc6,_0x242c86,_0x35bac9,_0x203b2f){return _0x473de0(_0x242c86,_0x242c86-0x18f,_0x35bac9-0x1bf,_0x321fc6-_0x3c8f12._0x3bfd91);}function _0x2d8876(_0x5c63d3,_0x1037bd,_0x394c20,_0x27990d){return _0x473de0(_0x394c20,_0x1037bd-_0x532a21._0xc9e32,_0x394c20-_0x532a21._0x39c847,_0x27990d-_0x532a21._0x5e7914);}if(_0x27bc9d[_0x2d8876(_0x271338._0x53b4a9,_0x271338._0x4b2bf0,_0x271338._0x46b823,_0x271338._0x5d279f)]!==_0x439b3d(-_0x271338._0x5e43ba,-_0x271338._0x5f2232,-_0x271338._0x4fb3c3,-0x48))throw _0x27bc9d;}),_0x4c60ed[_0x10eb7e(-_0xc3e03b._0x2b5774,-0xac,-0xa2,-0x9a)][_0x10eb7e(-_0xc3e03b._0xa90f97,-0xb4,-0xc8,-0xaf)](JSON[_0x473de0(-0x17d,-0x15d,-_0xc3e03b._0x253e3c,-_0xc3e03b._0x240d81)](_0x44abad)),_0x4c60ed['stdin'][_0x473de0(-0x17f,-0x1a4,-0x17f,-0x181)]();const _0x3d63e2=setTimeout(()=>{const _0x1baa7e={_0x12209a:0x2,_0x208e6f:0x4f0},_0x41d1fa={_0x309ab9:0x142};_0x4c60ed['kill'](_0xbef8e1(-_0x52bf9d._0x522451,-_0x52bf9d._0x49a063,-_0x52bf9d._0x2338b3,-0x296));function _0xbef8e1(_0x12ecac,_0x1b022f,_0x1a2239,_0x28db61){return _0x10eb7e(_0x12ecac-0x13,_0x28db61- -0x1e0,_0x1a2239-_0x41d1fa._0x309ab9,_0x1a2239);}function _0x2e65ec(_0x3fca77,_0xcfe2e7,_0x17b82a,_0x33c820){return _0x10eb7e(_0x3fca77-_0x1baa7e._0x12209a,_0x33c820-_0x1baa7e._0x208e6f,_0x17b82a-0x71,_0xcfe2e7);}_0x27303b({'status':'error','error':_0x2e65ec(0x432,_0x52bf9d._0xc7713d,0x438,_0x52bf9d._0x30becf)+_0x52e853+'s','duration_ms':Date[_0x2e65ec(0x451,_0x52bf9d._0x16d5e9,0x427,0x440)]()-_0x4c25ea});},_0x52e853*0x3e8);_0x4c60ed['on']('close',_0x366429=>{const _0x51e6db={_0x29241e:0x148,_0x5d8c84:0x45d,_0x4bca4e:0x43};clearTimeout(_0x3d63e2);const _0x51e31b=Date['now']()-_0x4c25ea;function _0x814813(_0x306a70,_0x30cbbd,_0x58858b,_0x20a895){return _0x10eb7e(_0x306a70-0x128,_0x306a70-0x227,_0x58858b-0x12d,_0x20a895);}if(_0x366429===0x2){_0x27303b({'status':_0x814813(_0xe7d076._0x360d3e,0x152,_0xe7d076._0x11c443,0x16a),'output':{'decision':_0x1aed87(0x37d,0x3b9,0x39c,0x385),'reason':_0x3ec6cf['trim']()||'Hook\x20blocked\x20execution'},'duration_ms':_0x51e31b});return;}if(_0x366429!==0x0){_0x27303b({'status':_0x1aed87(_0xe7d076._0x57c220,_0xe7d076._0x387260,_0xe7d076._0x4ca284,0x39d),'error':'Hook\x20exited\x20with\x20code\x20'+_0x366429+(_0x3ec6cf[_0x1aed87(0x3bb,0x39c,_0xe7d076._0x574069,_0xe7d076._0x5175df)]()?':\x20'+_0x3ec6cf[_0x814813(_0xe7d076._0x54f031,_0xe7d076._0x895b5c,0x16f,0x179)]():''),'duration_ms':_0x51e31b});return;}const _0x58949a=_0x1afc86[_0x1aed87(_0xe7d076._0x9489,0x396,_0xe7d076._0x574069,_0xe7d076._0x106e7a)]();if(_0x58949a[_0x1aed87(_0xe7d076._0x136bdd,_0xe7d076._0xa88aac,0x3b2,0x3cf)]===0x0){_0x27303b({'status':'pass','duration_ms':_0x51e31b});return;}function _0x1aed87(_0x2bed84,_0xc5d48e,_0x4ed372,_0x39c94d){return _0x10eb7e(_0x2bed84-_0x51e6db._0x29241e,_0x4ed372-_0x51e6db._0x5d8c84,_0x4ed372-_0x51e6db._0x4bca4e,_0x39c94d);}try{const _0x3ab98d=JSON['parse'](_0x58949a);_0x27303b({'status':_0x814813(0x176,_0xe7d076._0x10d275,0x18b,_0xe7d076._0x2f7776),'output':_0x3ab98d,'duration_ms':_0x51e31b});}catch{_0x27303b({'status':_0x1aed87(0x399,_0xe7d076._0x4c9698,0x3ac,0x3c8),'duration_ms':_0x51e31b});}}),_0x4c60ed['on'](_0x473de0(-_0xc3e03b._0x2d19df,-_0xc3e03b._0x5bae97,-_0xc3e03b._0x597984,-_0xc3e03b._0x31fc0f),_0x1a8f70=>{clearTimeout(_0x3d63e2),_0x27303b({'status':'error','error':_0x1a8f70['message'],'duration_ms':Date['now']()-_0x4c25ea});});});}function createHookExtensions(_0x4792f0,_0x192e24,_0x4260aa={}){const _0x2f2232={_0xde67b7:0x1f9,_0x1e03cd:0x241,_0x1f6ca4:0x224,_0x33b8c7:0x22d,_0x1bc746:0x20b,_0x151590:0x20d,_0x2cf362:0x238,_0x2e646f:0x235,_0x3dd0f4:0x240,_0x40bf9e:0x23a,_0x2e5a33:0x23f,_0x24f6d1:0x21a,_0x5636c6:0x237,_0x4345c3:0x24b,_0x1271a3:0x253,_0x498a1c:0x23f,_0x21451f:0x25d},_0x11e024={_0x281ff8:0x2d1,_0x4bf777:0x1bd,_0x9c8bb0:0x2eb,_0x3c82ed:0x301,_0x44cfc9:0x2be,_0x37688d:0x2cf,_0x40c49e:0x2c7,_0x496c8c:0x2c4,_0x2bf5dd:0x189,_0x5692eb:0x185},_0x12fbbc={_0x46cbc8:0x199,_0x2ead24:0x160,_0x4badad:0x168,_0xeda84f:0x192,_0x5de960:0x1b2,_0x147c2a:0x196,_0x322b7d:0x186,_0x1755c0:0x159,_0x132b92:0x17c,_0x2d5e99:0x137,_0x180d6b:0x19f,_0xdb14ad:0x180,_0x1b1adb:0x195,_0x572ee2:0x18e,_0x3cedd4:0x12a,_0x4ad4f4:0x126,_0x5b5f39:0x145},_0x4dd688={_0x4fe2b6:0x170},_0x225e71={_0x1d07d7:0x175,_0x39b11f:0x16c,_0xba1ad3:0x163,_0x5b265d:0x121,_0x175d77:0x127,_0x364e2d:0x144,_0x67ef6f:0xe4,_0xba0818:0x115,_0x3fc0f9:0x125,_0x3599df:0x11e,_0x50421e:0x100,_0x16b959:0x13c,_0x4dfb71:0x15c,_0x447b27:0xfa,_0x2d9d4a:0x121,_0x2d6ac4:0x11d,_0x139b4b:0xfb,_0x306e32:0x117,_0x38733f:0x139},_0x5489d3={_0x562d78:0x103},_0x4bcd53=[],{sessionId:_0x50d48e,projectDir:_0x3c10c2}=_0x4260aa;function _0x306558(_0x4386b5,_0x2e37a7,_0x32040c,_0x5e660c){return _0x2d38(_0x5e660c-_0x5489d3._0x562d78,_0x2e37a7);}const _0xefe686=_0x4d9336=>_0x4792f0['hasHooks']?_0x4792f0[_0x306558(0x1ac,0x1d6,0x1d5,0x1c2)](_0x4d9336):_0x4792f0[_0x9e113e(0x205,0x200,0x222,0x202)](_0x4d9336)[_0x9e113e(0x22d,0x22a,0x239,0x23c)]>0x0;_0xefe686(_0x9e113e(0x229,0x213,0x206,_0x2f2232._0xde67b7))&&_0x4bcd53[_0x9e113e(0x24d,_0x2f2232._0x1e03cd,0x220,_0x2f2232._0x1f6ca4)]({'id':_0x9e113e(0x24c,_0x2f2232._0x33b8c7,0x232,_0x2f2232._0x1bc746),'stage':_0x9e113e(0x218,0x216,_0x2f2232._0x151590,_0x2f2232._0x2cf362),'kind':_0x9e113e(_0x2f2232._0x2e646f,0x237,0x229,0x226),'order':0x0,'enabled':!![],'run':async(_0x28d861,_0x1a382a)=>{const _0x582417={_0x27ebbe:0x61},_0x467e98={_0x1f1e48:0x320};function _0x2dd05c(_0x17c10a,_0x2f6b10,_0x5d6e52,_0x42e457){return _0x9e113e(_0x17c10a-0xb,_0x5d6e52- -_0x467e98._0x1f1e48,_0x17c10a,_0x42e457-0x102);}const _0x459700=_0x4792f0[_0x27d41f(-_0x225e71._0x1d07d7,-0x140,-_0x225e71._0x39b11f,-_0x225e71._0xba1ad3)](_0x2dd05c(-0xef,-_0x225e71._0x5b265d,-0x10d,-_0x225e71._0x175d77),_0x28d861[_0x27d41f(-0x133,-_0x225e71._0x364e2d,-0x115,-_0x225e71._0x175d77)]);function _0x27d41f(_0x1f6d9d,_0x916c38,_0x4f4866,_0x161c9d){return _0x9e113e(_0x1f6d9d-_0x582417._0x27ebbe,_0x161c9d- -0x363,_0x4f4866,_0x161c9d-0x2);}for(const _0x625491 of _0x459700){const _0x2a96bf={'tool_name':_0x28d861[_0x2dd05c(-0xf6,-0xcf,-_0x225e71._0x67ef6f,-0xc9)],'tool_input':void 0x0,'tool_output':_0x28d861[_0x2dd05c(-_0x225e71._0xba0818,-0x12e,-_0x225e71._0x3fc0f9,-_0x225e71._0x3599df)],'tool_result_status':_0x28d861[_0x2dd05c(-0x10e,-0xeb,-_0x225e71._0x50421e,-0x11a)],'session_id':_0x50d48e??_0x1a382a[_0x2dd05c(-0xf9,-0xed,-0xe8,-0xef)][_0x27d41f(-_0x225e71._0x16b959,-0x14e,-0x16b,-_0x225e71._0x4dfb71)]};await _0x192e24(_0x625491[_0x2dd05c(-_0x225e71._0x447b27,-_0x225e71._0x2d9d4a,-0x10b,-0x100)],_0x2a96bf,_0x625491[_0x2dd05c(-_0x225e71._0x2d6ac4,-_0x225e71._0x139b4b,-_0x225e71._0x306e32,-_0x225e71._0x38733f)],_0x3c10c2);}}});function _0x9e113e(_0x506562,_0x229c8a,_0x2f7c42,_0x294ef5){return _0x2d38(_0x229c8a-_0x4dd688._0x4fe2b6,_0x2f7c42);}return _0xefe686('Stop')&&_0x4bcd53[_0x9e113e(_0x2f2232._0x3dd0f4,0x241,_0x2f2232._0x2e646f,0x25d)]({'id':_0x9e113e(0x235,_0x2f2232._0x40bf9e,_0x2f2232._0x2e5a33,_0x2f2232._0x24f6d1),'stage':'beforeFinalOutput','kind':_0x9e113e(0x22a,_0x2f2232._0x5636c6,_0x2f2232._0x4345c3,_0x2f2232._0x1271a3),'order':0x0,'enabled':!![],'run':async(_0x587b95,_0x3d168b)=>{const _0x5e9831={_0x4ce190:0x19c},_0x352aab={_0x385aad:0xdf};function _0x25c3a4(_0x410e0d,_0x1cc94e,_0x5e97be,_0x50e011){return _0x9e113e(_0x410e0d-0x176,_0x410e0d- -_0x352aab._0x385aad,_0x5e97be,_0x50e011-0x72);}function _0xc1e32d(_0x21f4b5,_0x5aec38,_0xd62890,_0xde44b4){return _0x9e113e(_0x21f4b5-0xff,_0xd62890- -0x87,_0xde44b4,_0xde44b4-_0x5e9831._0x4ce190);}const _0x49ef29=_0x4792f0[_0xc1e32d(_0x12fbbc._0x46cbc8,_0x12fbbc._0x2ead24,0x179,_0x12fbbc._0x4badad)](_0xc1e32d(0x1af,_0x12fbbc._0xeda84f,_0x12fbbc._0x5de960,0x1ca));for(const _0x18b58a of _0x49ef29){const _0x20d3bd={'stop_reason':_0xc1e32d(0x1b1,0x17c,_0x12fbbc._0x147c2a,_0x12fbbc._0x322b7d),'session_id':_0x50d48e??_0x3d168b[_0x25c3a4(_0x12fbbc._0x1755c0,_0x12fbbc._0x132b92,_0x12fbbc._0x2d5e99,0x144)][_0xc1e32d(0x18a,_0x12fbbc._0x180d6b,_0x12fbbc._0xdb14ad,_0x12fbbc._0x4badad)]};await _0x192e24(_0x18b58a[_0xc1e32d(_0x12fbbc._0x1b1adb,0x1b2,_0x12fbbc._0x572ee2,0x196)],_0x20d3bd,_0x18b58a[_0x25c3a4(_0x12fbbc._0x3cedd4,_0x12fbbc._0x4ad4f4,0x146,_0x12fbbc._0x5b5f39)],_0x3c10c2);}}}),_0xefe686(_0x9e113e(0x241,_0x2f2232._0x498a1c,0x24a,_0x2f2232._0x21451f))&&_0x4bcd53['push']({'id':'hook:Notification','stage':'afterTurnComplete','kind':'observer','order':0x0,'enabled':!![],'run':async(_0x2c81a7,_0x892537)=>{const _0x3a541c={_0x33bd40:0x33},_0x4a66b0={_0x31e3a0:0x6a,_0x8835b:0x96},_0x2c07fa=_0x4792f0[_0x3bd7fb(0x2ba,0x2c8,0x2c3,_0x11e024._0x281ff8)](_0x441685(0x1be,0x1a8,0x1a9,_0x11e024._0x4bf777));function _0x3bd7fb(_0x3ef171,_0x11dca3,_0x5a3788,_0x310f7e){return _0x306558(_0x3ef171-_0x4a66b0._0x31e3a0,_0x5a3788,_0x5a3788-_0x4a66b0._0x8835b,_0x3ef171-0x127);}function _0x441685(_0x48b3d4,_0x1bc038,_0x83eb40,_0x18b785){return _0x306558(_0x48b3d4-_0x3a541c._0x33bd40,_0x18b785,_0x83eb40-0x1e7,_0x48b3d4- -0x14);}for(const _0x59b523 of _0x2c07fa){const _0x3df358={'message':_0x3bd7fb(_0x11e024._0x9c8bb0,_0x11e024._0x3c82ed,0x309,0x2e3),'session_id':_0x50d48e??_0x2c81a7[_0x3bd7fb(0x2c1,0x2b4,_0x11e024._0x44cfc9,0x2c4)]};await _0x192e24(_0x59b523[_0x3bd7fb(_0x11e024._0x37688d,_0x11e024._0x40c49e,_0x11e024._0x40c49e,_0x11e024._0x496c8c)],_0x3df358,_0x59b523[_0x441685(0x188,_0x11e024._0x2bf5dd,_0x11e024._0x5692eb,0x1a2)],_0x3c10c2);}}}),_0x4bcd53;}function _0x5937(){const _0x8e48bf=['nta4mwjzywrNCa','mtC3mdC4nZDswuziuxC','ugvYBwLZC2LVBIbKzw5PzwqGzM9Yia','Aw5WDxq','z2v0sg9VA3m','zgvJAxnPB24','y3DK','uhjLvg9VBfvZzq','mZmXmdmYnfvzDxfxBG','mJeYnJe1nxn0vfHpsG','mtjMwKDqDMG','C2vZC2LVBKLK','zw5K','DgLTzw91Da','y29Kzq','C3rYAw5NAwz5','CgvYBwLZC2LVBKrLy2LZAw9U','ntrRzfDtzva','nJm3otyWmfnTt3HKtW','otG5mZy3mfLxEKDouW','zxjYB3i','CMvQzwn0','xIG/oG','ug9ZDfrVB2XvC2u','yMXVy2S','y29TBwfUza','ywz0zxjuB29SuMvZDwX0','DhjPBq','C3rKB3v0','BwfW','mJm2odHbvLzNsgC','Ag9VA3m','Ag9VA1nWzwnPzMLJt3v0Chv0','zw5Kx3r1CM4','CgLWzq','u0Lhs0Lmta','C3rHDhvZ','D3jPDgu','CNvU','sg9VAYb0Aw1LzcbVDxqGywz0zxiG','CgfZCW','BM93','Bwf0y2HLCG','C3rKzxjY','ywXSB3C','C3rKAw4','BgvUz3rO','rvbjueu','m3bryNffBa','Ag9VAZPqB3n0vg9VBfvZzq','BMfTzq','AgfZsg9VA3m','CMvHC29U','qwDLBNqGzMLUAxnOzwqGCMvZCg9UzgLUzW','zgf0yq','qMXVy2TLzcbIEsbqCMvuB29SvxnLigHVB2SGzM9Yia','DgvZDa','zw52','Dg9tDhjPBMC','B2jZzxj2zxi','C3rHDgu','u3rVCa','Ag9VAZPtDg9W','zgvUEq','Dg9VBe5HBwu','CgvYBwLZC2LVBKrLy2LZAw9UuMvHC29U','mJbPqKzpv3i','tM90AwzPy2f0Aw9U','owrgD3Dvzq','ChvZAa','B3v0Chv0'];_0x5937=function(){return _0x8e48bf;};return _0x5937();}function createHookOnToolCallMiddleware(_0x50fc15,_0x8d10f1,_0x17c2c1,_0x46708d={}){const _0x3703f3={_0x47058e:0x114,_0x5c88bc:0x11b,_0x2ccba4:0x113,_0x535836:0x1ce,_0x7c047c:0x1a5,_0x4cfa9a:0x1cf,_0x23fda2:0x1ba,_0x869d47:0x1ad,_0x4629c7:0x1aa,_0x17f8d4:0x12e,_0x3b3c4d:0x127,_0x44b90f:0x10a,_0x3ee050:0x119,_0x114d29:0x11d,_0x4181f8:0x11f,_0x10eb14:0x1a2,_0x3940ee:0x1bf,_0x20f184:0x1a5,_0x448db8:0x132,_0x5219b1:0x1a8,_0x507ebe:0x1b3,_0x565f36:0x1c5,_0x4187e1:0x199,_0x2b4562:0x1cb,_0x24684b:0x1b9,_0x23cb99:0x1dd,_0x477c91:0x1c2,_0x132b50:0x12f,_0x4241d7:0x1bf,_0x14e5cd:0x1af,_0x558fc5:0x19e,_0x4f0982:0x11c,_0x4f97f7:0x129,_0x167d9c:0xfd,_0x21f0c6:0x196,_0x23e5af:0x1bb,_0x3f326d:0x123,_0x3213ad:0x123,_0x1ba855:0x10f,_0x1f3886:0x1af,_0x47a361:0x1ca,_0x379752:0x1e1,_0x5c9988:0x1fd,_0x34a6bf:0x1e0,_0x59da88:0x1c5,_0x61cf02:0x1ab,_0x50b8e3:0x18e,_0x833e34:0x19f,_0x5f47bf:0x14c,_0x4ec315:0x16a,_0x1a4b5f:0x12c},_0x48a3d9={_0x3dd78c:0x8e},{sessionId:_0x538e69,projectDir:_0xf3f24d}=_0x46708d;return async(_0x3bb6f3,_0x77dd5e)=>{const _0x2f6add=_0x50fc15[_0x4320a4(0x11e,0x121,0x132,0x139)](_0x4320a4(0x121,_0x3703f3._0x47058e,_0x3703f3._0x5c88bc,_0x3703f3._0x2ccba4),_0x3bb6f3[_0x166c89(-_0x3703f3._0x535836,-0x1c7,-0x1ad,-_0x3703f3._0x7c047c)]);function _0x4320a4(_0x4f1507,_0x20f970,_0x98709b,_0x320e5b){return _0x2d38(_0x4f1507-_0x48a3d9._0x3dd78c,_0x98709b);}function _0x166c89(_0x8e00b7,_0x30004b,_0x1167d3,_0x569317){return _0x2d38(_0x1167d3- -0x26b,_0x569317);}for(const _0x2d1856 of _0x2f6add){const _0x1bfc16={'tool_name':_0x3bb6f3[_0x166c89(-_0x3703f3._0x4cfa9a,-_0x3703f3._0x23fda2,-_0x3703f3._0x869d47,-_0x3703f3._0x4629c7)],'tool_input':_0x3bb6f3[_0x4320a4(0x11d,0x109,0x13a,_0x3703f3._0x17f8d4)],'session_id':_0x538e69},_0x5bebdd=await _0x8d10f1(_0x2d1856['command'],_0x1bfc16,_0x2d1856[_0x4320a4(_0x3703f3._0x3b3c4d,_0x3703f3._0x44b90f,0x112,0x14a)],_0xf3f24d),_0x4d5034=_0x5bebdd[_0x4320a4(_0x3703f3._0x3ee050,_0x3703f3._0x114d29,0x10a,_0x3703f3._0x4181f8)]?.[_0x166c89(-0x1a4,-_0x3703f3._0x10eb14,-_0x3703f3._0x3940ee,-_0x3703f3._0x20f184)]?.[_0x4320a4(0x12a,_0x3703f3._0x448db8,0x133,0x13c)];if(_0x4d5034===_0x166c89(-0x1b7,-_0x3703f3._0x5219b1,-_0x3703f3._0x507ebe,-_0x3703f3._0x565f36))return{'action':_0x166c89(-_0x3703f3._0x4187e1,-_0x3703f3._0x2b4562,-_0x3703f3._0x24684b,-_0x3703f3._0x23cb99)};if(_0x4d5034===_0x166c89(-0x1a7,-0x1bb,-0x1a0,-_0x3703f3._0x477c91))return{'action':_0x4320a4(_0x3703f3._0x132b50,0x129,0x110,0x130),'reason':_0x5bebdd['output']?.[_0x166c89(-0x1d5,-0x1b9,-_0x3703f3._0x4241d7,-0x1ac)]?.[_0x166c89(-_0x3703f3._0x14e5cd,-0x18d,-_0x3703f3._0x558fc5,-0x1bd)]||_0x4320a4(_0x3703f3._0x4f0982,_0x3703f3._0x4f97f7,0xfe,_0x3703f3._0x167d9c)+_0x3bb6f3[_0x166c89(-0x1af,-0x1aa,-0x1ad,-_0x3703f3._0x21f0c6)]};if(_0x5bebdd[_0x166c89(-0x1c5,-_0x3703f3._0x23fda2,-_0x3703f3._0x23e5af,-0x1a2)]===_0x4320a4(0x132,_0x3703f3._0x3f326d,0x140,_0x3703f3._0x3213ad)||_0x5bebdd['output']?.[_0x4320a4(0x11f,0x102,0x124,_0x3703f3._0x1ba855)]==='block')return{'action':_0x166c89(-_0x3703f3._0x1f3886,-0x1c8,-_0x3703f3._0x47a361,-_0x3703f3._0x379752),'reason':_0x5bebdd[_0x166c89(-_0x3703f3._0x5c9988,-0x1be,-_0x3703f3._0x34a6bf,-0x1c8)]?.[_0x166c89(-0x1bb,-_0x3703f3._0x59da88,-_0x3703f3._0x61cf02,-0x1ad)]||_0x166c89(-_0x3703f3._0x50b8e3,-0x1a8,-0x1a8,-_0x3703f3._0x833e34)+_0x3bb6f3[_0x4320a4(_0x3703f3._0x5f47bf,_0x3703f3._0x4ec315,0x163,_0x3703f3._0x1a4b5f)]};}return _0x17c2c1(_0x3bb6f3,_0x77dd5e);};}var DEFAULT_TIMEOUT_S2=0x3c;function createHookRegistry(_0x28b1d3){const _0x56628a={_0x2700ea:0x452,_0x29e497:0x470,_0x2574a6:0x311,_0x1820b3:0x2e9,_0x4d5870:0x44b,_0x42b71c:0x43b,_0x3d460d:0x45f,_0x2d0c73:0x43d,_0x4657e7:0x45d,_0x3c5cd9:0x477,_0x45f8d6:0x2d7,_0x4e6ef0:0x2e5,_0x4e9870:0x2e8,_0x4424dd:0x2fb,_0x43c457:0x2d8,_0x1142ca:0x317,_0x278a54:0x2e0},_0xcb5433={_0x3550b5:0x3a0};return{'hasHooks'(_0x4293a5){return(_0x28b1d3[_0x4293a5]?.['length']??0x0)>0x0;},'getHooks'(_0x3a316d,_0x333451){const _0x3bddf7={_0x4394d6:0x3a9},_0xa1df56=_0x28b1d3[_0x3a316d];if(!_0xa1df56)return[];function _0x4838d7(_0x199867,_0xdb4f65,_0x67396f,_0x360b9f){return _0x2d38(_0x199867-_0xcb5433._0x3550b5,_0x360b9f);}function _0x2f5cdc(_0xd371e0,_0x723ccf,_0x11e2d8,_0x43502e){return _0x2d38(_0x43502e- -_0x3bddf7._0x4394d6,_0xd371e0);}const _0x5103ba=[];for(const _0x349338 of _0xa1df56){if(!_0x349338[_0x4838d7(0x456,_0x56628a._0x2700ea,0x44b,_0x56628a._0x29e497)]||_0x349338[_0x2f5cdc(-0x308,-_0x56628a._0x2574a6,-0x2ff,-0x2f3)]==='*'){_0x5103ba[_0x2f5cdc(-0x2d5,-_0x56628a._0x1820b3,-0x2f1,-0x2d8)](..._0x349338[_0x4838d7(_0x56628a._0x4d5870,0x464,_0x56628a._0x42b71c,_0x56628a._0x3d460d)]['map'](_0x3fccee=>({'command':_0x3fccee[_0x2f5cdc(-0x30f,-0x30a,-0x307,-0x304)],'timeout':_0x3fccee[_0x4838d7(0x439,0x43a,0x45b,0x44c)]??DEFAULT_TIMEOUT_S2})));continue;}if(_0x333451===void 0x0)continue;const _0x5ac30c=new RegExp(_0x4838d7(0x442,_0x56628a._0x2d0c73,0x449,0x44e)+_0x349338[_0x4838d7(0x456,0x476,_0x56628a._0x4657e7,_0x56628a._0x3c5cd9)]+')$');_0x5ac30c[_0x2f5cdc(-0x2fc,-0x2e5,-_0x56628a._0x45f8d6,-_0x56628a._0x4e6ef0)](_0x333451)&&_0x5103ba[_0x2f5cdc(-_0x56628a._0x4e9870,-_0x56628a._0x4424dd,-0x2b7,-_0x56628a._0x43c457)](..._0x349338[_0x2f5cdc(-_0x56628a._0x1142ca,-0x2ec,-0x2ef,-0x2fe)][_0x2f5cdc(-0x2fa,-0x310,-_0x56628a._0x278a54,-0x300)](_0x555883=>({'command':_0x555883[_0x4838d7(0x445,0x469,0x456,0x43d)],'timeout':_0x555883[_0x4838d7(0x439,0x422,0x433,0x442)]??DEFAULT_TIMEOUT_S2})));}return _0x5103ba;}};}export{createHookExtensions,createHookOnToolCallMiddleware,createHookRegistry,executeCommandHook};