@nuvin/agent-core 0.0.0-rc.5 → 0.0.0-rc.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/VERSION +2 -2
- package/dist/agent/index.d.ts +2 -2
- package/dist/agent/index.js +1 -1
- package/dist/chunk-4DNIDCX7.js +1 -0
- package/dist/chunk-G2FR4UGO.js +1 -1
- package/dist/chunk-NYZR4XKO.js +1 -1
- package/dist/chunk-P54V754C.js +1 -1
- package/dist/chunk-X7VAACWY.js +1 -1
- package/dist/formats/index.d.ts +6 -3
- package/dist/formats/index.js +1 -1
- package/dist/models/index.d.ts +3 -3
- package/dist/models/index.js +1 -1
- package/dist/{provider-adapters-Cb5hUJoD.d.ts → provider-adapters-aW7frG5B.d.ts} +1 -1
- package/dist/shared/index.d.ts +2 -2
- package/dist/shared/index.js +1 -1
- package/dist/tools/index.d.ts +9 -1
- package/dist/tools/index.js +1 -1
- package/dist/{types-QPBW5jHO.d.ts → types-BS0Io2Vs.d.ts} +2 -2
- package/package.json +1 -1
- package/dist/chunk-LXQDGX4K.js +0 -1
package/dist/VERSION
CHANGED
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RunTurnDeps, M as Message, A as AgentOptions, a as AgentInput, b as AgentSendOptions, T as TurnResult, E as ExtensionRegistry, c as TurnInput } from '../types-
|
|
2
|
-
export { d as TurnState } from '../types-
|
|
1
|
+
import { R as RunTurnDeps, M as Message, A as AgentOptions, a as AgentInput, b as AgentSendOptions, T as TurnResult, E as ExtensionRegistry, c as TurnInput } from '../types-BS0Io2Vs.js';
|
|
2
|
+
export { d as TurnState } from '../types-BS0Io2Vs.js';
|
|
3
3
|
|
|
4
4
|
declare class Agent {
|
|
5
5
|
private _systemPrompt;
|
package/dist/agent/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _0xe690(_0x1d8096,_0x54a605){_0x1d8096=_0x1d8096-0xee;var _0x40636f=_0x4063();var _0xe69009=_0x40636f[_0x1d8096];if(_0xe690['Pwjpdk']===undefined){var _0x362f48=function(_0x4b790e){var _0x50c71a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x2a901d='',_0x4bd862='';for(var _0x47f9bd=0x0,_0x421f56,_0x3be4ed,_0x435c0a=0x0;_0x3be4ed=_0x4b790e['charAt'](_0x435c0a++);~_0x3be4ed&&(_0x421f56=_0x47f9bd%0x4?_0x421f56*0x40+_0x3be4ed:_0x3be4ed,_0x47f9bd++%0x4)?_0x2a901d+=String['fromCharCode'](0xff&_0x421f56>>(-0x2*_0x47f9bd&0x6)):0x0){_0x3be4ed=_0x50c71a['indexOf'](_0x3be4ed);}for(var _0x16e5b8=0x0,_0x61c3cd=_0x2a901d['length'];_0x16e5b8<_0x61c3cd;_0x16e5b8++){_0x4bd862+='%'+('00'+_0x2a901d['charCodeAt'](_0x16e5b8)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4bd862);};_0xe690['fWYRBI']=_0x362f48,_0xe690['TkXfVl']={},_0xe690['Pwjpdk']=!![];}var _0x364e3e=_0x40636f[0x0],_0x420415=_0x1d8096+_0x364e3e,_0x9f0c30=_0xe690['TkXfVl'][_0x420415];return!_0x9f0c30?(_0xe69009=_0xe690['fWYRBI'](_0xe69009),_0xe690['TkXfVl'][_0x420415]=_0xe69009):_0xe69009=_0x9f0c30,_0xe69009;}(function(_0x4ee528,_0xc2d3d0){var _0x360e2a={_0x27afbf:0x1fd,_0xe4edcf:0x1fa,_0x1c7444:0x201,_0x13e29b:0x1ff,_0x39527c:0x135,_0x59adc8:0x136,_0x315f3d:0x204,_0x34788f:0x1f7,_0x3cbcac:0x1f8,_0x509155:0x1fb,_0x5721da:0x13c,_0x4f5c96:0x139,_0x30792e:0x137,_0x1468d2:0x204,_0x47eda1:0x205,_0x13fa11:0x204,_0x5d2930:0x135,_0x2fff12:0x131,_0x1ac877:0x1f9},_0x59cf75={_0x4bc8d0:0x41};function _0x475b8a(_0x6ecb13,_0x20d275,_0x4f1e51,_0x3d49af){return _0xe690(_0x20d275-_0x59cf75._0x4bc8d0,_0x3d49af);}var _0x3c0291=_0x4ee528();function _0x438d1e(_0xb7ccc0,_0x4140c3,_0x336e3b,_0x2dab50){return _0xe690(_0x2dab50- -0x2f2,_0x336e3b);}while(!![]){try{var _0x50a1e5=parseInt(_0x438d1e(-_0x360e2a._0x27afbf,-_0x360e2a._0xe4edcf,-_0x360e2a._0x1c7444,-_0x360e2a._0x13e29b))/0x1+parseInt(_0x475b8a(0x132,0x137,_0x360e2a._0x39527c,0x13c))/0x2*(parseInt(_0x475b8a(_0x360e2a._0x59adc8,0x130,0x12c,0x136))/0x3)+parseInt(_0x438d1e(-0x200,-_0x360e2a._0x315f3d,-0x204,-0x200))/0x4*(parseInt(_0x438d1e(-0x1ff,-_0x360e2a._0x34788f,-_0x360e2a._0x3cbcac,-_0x360e2a._0x509155))/0x5)+-parseInt(_0x475b8a(_0x360e2a._0x5721da,_0x360e2a._0x4f5c96,_0x360e2a._0x5721da,0x134))/0x6*(-parseInt(_0x475b8a(0x137,_0x360e2a._0x39527c,0x136,_0x360e2a._0x30792e))/0x7)+parseInt(_0x438d1e(-_0x360e2a._0x1468d2,-0x201,-_0x360e2a._0x47eda1,-_0x360e2a._0x13fa11))/0x8+-parseInt(_0x475b8a(_0x360e2a._0x5d2930,0x131,0x130,_0x360e2a._0x2fff12))/0x9*(parseInt(_0x438d1e(-0x1fc,-0x200,-0x1fe,-_0x360e2a._0x1c7444))/0xa)+-parseInt(_0x438d1e(-0x1fb,-_0x360e2a._0x1ac877,-0x203,-_0x360e2a._0x27afbf))/0xb;if(_0x50a1e5===_0xc2d3d0)break;else _0x3c0291['push'](_0x3c0291['shift']());}catch(_0x1239cf){_0x3c0291['push'](_0x3c0291['shift']());}}}(_0x4063,0x7a779));import{Agent,createExtensionRegistry,runTurn}from'../chunk-P54V754C.js';import'../chunk-G2FR4UGO.js';import'../chunk-X7VAACWY.js';export{Agent,createExtensionRegistry,runTurn};function _0x4063(){var _0x2ca3ff=['mtu0mdK4nKXgvwj4BG','mZmXmtmXmMrPEeDjEq','oda2otfRAenMD3a','ndvOwxLfEfK','mta0mZmWmgTyALrkrq','mtu1mtuZmK1osLncBa','ntKYndy5AxLZqMHi','n05iwxHPsG','mti1mJC1mtviyujAtu0','mZHQD2joEgG','nxjQChnLua'];_0x4063=function(){return _0x2ca3ff;};return _0x4063();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x7200bc,_0x2caeb9){const _0x5dc98e={_0x4631d8:0x22,_0x578378:0xf9,_0x5d2f54:0x11f,_0x1deeb3:0x63,_0x4e1e3d:0x49,_0x13c45d:0x55,_0x18087c:0x10d,_0x60196:0x118,_0x305e56:0xfa,_0x5717af:0x103,_0x28942f:0xe0,_0x5a1135:0x10a,_0x17e9c7:0x128,_0x1e60d5:0x111,_0x5c3383:0x12,_0x2ad0d1:0x38,_0x3b5af1:0x110,_0xf2f6b8:0x108,_0x32e7ed:0x112,_0x22403a:0xe9,_0x19d79c:0x46,_0x11c5a5:0x21,_0x23cd8b:0x1f},_0x3edb84={_0x3a0fd1:0x120};function _0x9f94f1(_0x5365c1,_0x58feef,_0xde55d5,_0x76be75){return _0x55e4(_0x58feef-0x1a,_0x76be75);}const _0x3ac232=_0x7200bc();function _0x509c01(_0x13017b,_0x3b21d7,_0x3303ec,_0xaa0530){return _0x55e4(_0x13017b- -_0x3edb84._0x3a0fd1,_0x3b21d7);}while(!![]){try{const _0x20b508=-parseInt(_0x509c01(-0x33,-0x26,-_0x5dc98e._0x4631d8,-0x23))/0x1*(-parseInt(_0x9f94f1(_0x5dc98e._0x578378,0x112,0x124,_0x5dc98e._0x5d2f54))/0x2)+-parseInt(_0x509c01(-0x45,-_0x5dc98e._0x1deeb3,-0x58,-_0x5dc98e._0x4e1e3d))/0x3*(parseInt(_0x509c01(-0x3c,-0x2c,-_0x5dc98e._0x13c45d,-0x3f))/0x4)+parseInt(_0x9f94f1(_0x5dc98e._0x18087c,0x10f,_0x5dc98e._0x60196,0x111))/0x5*(parseInt(_0x9f94f1(0x117,_0x5dc98e._0x305e56,0x10a,_0x5dc98e._0x5717af))/0x6)+parseInt(_0x9f94f1(0xf5,0xf1,_0x5dc98e._0x28942f,0x100))/0x7*(parseInt(_0x9f94f1(_0x5dc98e._0x5a1135,0x116,_0x5dc98e._0x17e9c7,_0x5dc98e._0x1e60d5))/0x8)+-parseInt(_0x509c01(-0x26,-_0x5dc98e._0x5c3383,-0x14,-_0x5dc98e._0x2ad0d1))/0x9*(parseInt(_0x9f94f1(_0x5dc98e._0x3b5af1,_0x5dc98e._0xf2f6b8,_0x5dc98e._0x32e7ed,_0x5dc98e._0x22403a))/0xa)+parseInt(_0x509c01(-0x2f,-_0x5dc98e._0x19d79c,-0x22,-0x1b))/0xb+parseInt(_0x509c01(-_0x5dc98e._0x11c5a5,-0x21,-0x5,-0x5))/0xc*(-parseInt(_0x509c01(-_0x5dc98e._0x23cd8b,-0x30,-0xf,-0x31))/0xd);if(_0x20b508===_0x2caeb9)break;else _0x3ac232['push'](_0x3ac232['shift']());}catch(_0x531816){_0x3ac232['push'](_0x3ac232['shift']());}}}(_0x2a76,0x6101f));import{resolveOpenAiReasoningConfig}from'./chunk-NYZR4XKO.js';import{normalizeContent}from'./chunk-G2FR4UGO.js';function systemToInstructions(_0x2e593f){const _0x4ca23e={_0x3d67b6:0x31b,_0x323d14:0x311},_0x2ef67c={_0x4e20b9:0x75};function _0x2d2514(_0x108d7a,_0x9747b,_0x3af2f8,_0x1aa7ac){return _0x55e4(_0x3af2f8- -_0x2ef67c._0x4e20b9,_0x9747b);}function _0x277825(_0x4ba280,_0xd75793,_0x596392,_0xc4791c){return _0x55e4(_0x596392-0x238,_0xd75793);}return normalizeContent(_0x2e593f)[_0x277825(0x308,0x325,_0x4ca23e._0x3d67b6,_0x4ca23e._0x323d14)](_0x1165a5=>_0x1165a5[_0x277825(0x340,0x334,0x349,0x33a)]===_0x277825(0x31f,0x310,0x314,0x312))['map'](_0x1e75e4=>_0x1e75e4['text'])['join']('\x0a\x0a');}function pushUserContentMessage(_0x362846,_0x1d9901,_0x3817ea){const _0x12825e={_0x3d2e67:0x7c,_0x18f736:0x6d,_0xcffe2b:0x29,_0x1c692a:0x1f,_0x48bde1:0x10,_0x32100b:0x24},_0x37d6ef={_0x17f4fc:0xf3};function _0x30ec4d(_0x1fce4d,_0x2bd2cb,_0x5944bb,_0x379414){return _0x55e4(_0x379414- -0xb3,_0x2bd2cb);}function _0x410d78(_0x242e9d,_0x38e507,_0xee67f5,_0x3b061c){return _0x55e4(_0x242e9d- -_0x37d6ef._0x17f4fc,_0x38e507);}if(_0x3817ea[_0x30ec4d(0x50,_0x12825e._0x3d2e67,_0x12825e._0x18f736,0x60)]===0x0)return;_0x362846[_0x30ec4d(_0x12825e._0xcffe2b,0x4a,_0x12825e._0x1c692a,0x33)]({'type':_0x410d78(_0x12825e._0x48bde1,_0x12825e._0x32100b,0x3,0xb),'role':_0x1d9901,'content':_0x3817ea});}function _0x55e4(_0x636da6,_0x3a509e){_0x636da6=_0x636da6-0xd7;const _0x2a7626=_0x2a76();let _0x55e459=_0x2a7626[_0x636da6];if(_0x55e4['rbYYFb']===undefined){var _0x2f3e27=function(_0x2acdc0){const _0x43cdbd='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2e593f='',_0x1165a5='';for(let _0x1e75e4=0x0,_0x362846,_0x1d9901,_0x3817ea=0x0;_0x1d9901=_0x2acdc0['charAt'](_0x3817ea++);~_0x1d9901&&(_0x362846=_0x1e75e4%0x4?_0x362846*0x40+_0x1d9901:_0x1d9901,_0x1e75e4++%0x4)?_0x2e593f+=String['fromCharCode'](0xff&_0x362846>>(-0x2*_0x1e75e4&0x6)):0x0){_0x1d9901=_0x43cdbd['indexOf'](_0x1d9901);}for(let _0x5594e8=0x0,_0x64f7ae=_0x2e593f['length'];_0x5594e8<_0x64f7ae;_0x5594e8++){_0x1165a5+='%'+('00'+_0x2e593f['charCodeAt'](_0x5594e8)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1165a5);};_0x55e4['pOGYaG']=_0x2f3e27,_0x55e4['DncdGc']={},_0x55e4['rbYYFb']=!![];}const _0x4c2b91=_0x2a7626[0x0],_0x78160c=_0x636da6+_0x4c2b91,_0x3fccbc=_0x55e4['DncdGc'][_0x78160c];return!_0x3fccbc?(_0x55e459=_0x55e4['pOGYaG'](_0x55e459),_0x55e4['DncdGc'][_0x78160c]=_0x55e459):_0x55e459=_0x3fccbc,_0x55e459;}function hasSerializableToolUse(_0x5594e8){const _0x4482e3={_0x13eec4:0x298,_0x542af2:0x290,_0x27945b:0x274,_0x2da9a9:0x164,_0x49b9fa:0x180,_0x5ef09b:0x16b,_0x7b582f:0x194,_0x29ba1f:0x19f,_0x477a25:0x19c,_0x4af38d:0x171,_0x302d7d:0x171,_0x3b6deb:0x16f,_0x2e8b4b:0x297,_0x2f46a1:0x28b};function _0x54b08c(_0xf3012c,_0x4b4b02,_0x52fc93,_0x2601a6){return _0x55e4(_0xf3012c- -0x277,_0x2601a6);}function _0x426dd6(_0x858cfb,_0x872606,_0x10a81b,_0x4473bd){return _0x55e4(_0x10a81b- -0x396,_0x4473bd);}return _0x5594e8['id'][_0x426dd6(-0x276,-_0x4482e3._0x13eec4,-_0x4482e3._0x542af2,-_0x4482e3._0x27945b)]()[_0x54b08c(-_0x4482e3._0x2da9a9,-_0x4482e3._0x49b9fa,-_0x4482e3._0x5ef09b,-0x165)]>0x0&&_0x5594e8[_0x54b08c(-0x19d,-_0x4482e3._0x7b582f,-_0x4482e3._0x29ba1f,-_0x4482e3._0x477a25)][_0x54b08c(-_0x4482e3._0x4af38d,-_0x4482e3._0x302d7d,-_0x4482e3._0x3b6deb,-0x16f)]()[_0x426dd6(-_0x4482e3._0x2e8b4b,-0x284,-0x283,-_0x4482e3._0x2f46a1)]>0x0;}function hasSerializableToolResult(_0x64f7ae){const _0x3a8269={_0x19cb1c:0x218};function _0x35091c(_0xaa08d3,_0x18db67,_0x5e766e,_0x3ffa82){return _0x55e4(_0x18db67- -0x2ed,_0x3ffa82);}return _0x64f7ae[_0x35091c(-0x1ec,-0x1fd,-_0x3a8269._0x19cb1c,-0x1e4)]['trim']()['length']>0x0;}function isResponseInputObject(_0x3e4c62){const _0x5e6df1={_0x15042b:0x3e,_0x389e0b:0x3f,_0x21a1d4:0x27,_0x2f0d93:0xba,_0x382dd0:0xc8,_0x346ce8:0x1e,_0x11f6a0:0x9,_0x5b41c2:0x28,_0x37e859:0x35},_0x11a849={_0x253836:0x46},_0x59186d={_0x225203:0x11a};function _0x5eb04c(_0x375507,_0x51ceff,_0x286ec0,_0x522e1d){return _0x55e4(_0x522e1d- -_0x59186d._0x225203,_0x286ec0);}if(typeof _0x3e4c62!==_0x5eb04c(-_0x5e6df1._0x15042b,-_0x5e6df1._0x389e0b,-0x12,-_0x5e6df1._0x21a1d4)||_0x3e4c62===null||Array[_0x5ed9ad(0xa2,0xb7,_0x5e6df1._0x2f0d93,_0x5e6df1._0x382dd0)](_0x3e4c62))return![];function _0x5ed9ad(_0x3f3c07,_0x322388,_0x595497,_0x3f3d45){return _0x55e4(_0x322388- -_0x11a849._0x253836,_0x3f3d45);}const _0x3d537d=_0x3e4c62;return typeof _0x3d537d[_0x5eb04c(0xc,-_0x5e6df1._0x346ce8,0x9,-_0x5e6df1._0x11f6a0)]===_0x5eb04c(-_0x5e6df1._0x5b41c2,-0x32,-0x49,-_0x5e6df1._0x37e859);}function isImageToolResultBlock(_0x44d2d2){const _0x2595b1={_0x1accaf:0x2e3,_0x52b846:0x2c4,_0x22d46f:0x147,_0x572b7f:0x151,_0xd6c651:0x15c,_0x12def5:0x175,_0x4d71e4:0x16d,_0x1d101c:0x2e0,_0x56cf4b:0x2cb,_0x116799:0x299,_0x3e14aa:0x2c4,_0x55d899:0x2b6,_0x59fd0c:0x29f},_0x126a77={_0x521bc9:0x58};function _0x36ec01(_0x268696,_0xfb4e38,_0x8fa478,_0xfd31ca){return _0x55e4(_0x268696-_0x126a77._0x521bc9,_0xfb4e38);}if(typeof _0x44d2d2!==_0x53590d(0x2ba,_0x2595b1._0x1accaf,_0x2595b1._0x52b846,0x2ad)||_0x44d2d2===null||Array['isArray'](_0x44d2d2))return![];const _0x9b789=_0x44d2d2;function _0x53590d(_0x46e81a,_0x10c660,_0x13c05d,_0x37b41c){return _0x55e4(_0x13c05d-0x1d1,_0x37b41c);}return _0x9b789['type']===_0x36ec01(0x136,_0x2595b1._0x22d46f,_0x2595b1._0x572b7f,0x11e)&&_0x9b789['source']?.['type']==='base64'&&typeof _0x9b789['source']['media_type']==='string'&&typeof _0x9b789[_0x36ec01(_0x2595b1._0xd6c651,0x145,_0x2595b1._0x12def5,_0x2595b1._0x4d71e4)][_0x53590d(0x2d1,0x2d7,_0x2595b1._0x1d101c,_0x2595b1._0x56cf4b)]===_0x53590d(_0x2595b1._0x116799,_0x2595b1._0x3e14aa,_0x2595b1._0x55d899,_0x2595b1._0x59fd0c);}function getToolResultText(_0x377516){const _0x54f684={_0xaccdb2:0x318,_0x4ad649:0x335,_0xcfdfc3:0x31f,_0xb23576:0x333,_0x4bb694:0x339,_0x45cbf8:0x335,_0x2ae618:0x30d,_0x272a12:0x356,_0x4dbb9a:0x363,_0x127259:0x35f,_0x2f83f7:0x355,_0x193c75:0x361},_0x1cbcc0={_0x1811cb:0x250},_0x4e2f0f={_0x509ca3:0xc6,_0x4c3729:0xba,_0x472c9c:0xdf,_0x4916e2:0xa6,_0x5ac178:0xa8,_0x4a2b49:0xbb,_0x37807d:0x62,_0x1ae422:0x93},_0x1d4963={_0x30f782:0x3d7};function _0x1b3caa(_0x3b058e,_0xf45872,_0xd4b109,_0xe06f61){return _0x55e4(_0xd4b109- -_0x1d4963._0x30f782,_0xf45872);}if(typeof _0x377516===_0x4b536a(_0x54f684._0xaccdb2,_0x54f684._0x4ad649,0x354,0x350))return _0x377516;const _0x290aa5=_0x377516[_0x4b536a(_0x54f684._0xcfdfc3,_0x54f684._0xb23576,0x346,0x324)](_0x43d4f9=>{const _0x197cf8={_0x3ec00c:0xa7},_0x5f44ab={_0x33a74d:0x3a1,_0x1f8415:0x17d};function _0x3d0688(_0x50ff68,_0xb665c4,_0xd67979,_0x28451d){return _0x4b536a(_0x50ff68-0x2d,_0xb665c4- -_0x5f44ab._0x33a74d,_0xd67979-_0x5f44ab._0x1f8415,_0x50ff68);}function _0x40a29c(_0x8a6dca,_0x5d3ed0,_0x1b8327,_0x530864){return _0x4b536a(_0x8a6dca-0xb8,_0x5d3ed0- -0x409,_0x1b8327-_0x197cf8._0x3ec00c,_0x530864);}return typeof _0x43d4f9===_0x40a29c(-0xcb,-_0x4e2f0f._0x509ca3,-_0x4e2f0f._0x4c3729,-_0x4e2f0f._0x472c9c)&&_0x43d4f9!==null&&_0x43d4f9[_0x40a29c(-_0x4e2f0f._0x4916e2,-_0x4e2f0f._0x5ac178,-_0x4e2f0f._0x4a2b49,-0x98)]===_0x3d0688(-_0x4e2f0f._0x37807d,-0x75,-_0x4e2f0f._0x1ae422,-0x82);})[_0x4b536a(0x323,_0x54f684._0x4bb694,_0x54f684._0x45cbf8,0x351)](_0x35ad5e=>_0x35ad5e[_0x1b3caa(-0x2f8,-0x319,-0x2fb,-0x30e)])[_0x1b3caa(-_0x54f684._0x2ae618,-0x30d,-0x2ef,-0x304)]('\x0a\x0a')[_0x4b536a(0x371,_0x54f684._0x272a12,0x366,0x362)]();function _0x4b536a(_0x57ed0a,_0x5aee22,_0x562541,_0x3a4a24){return _0x55e4(_0x5aee22-_0x1cbcc0._0x1811cb,_0x3a4a24);}return _0x290aa5[_0x4b536a(0x37f,_0x54f684._0x4dbb9a,0x35c,_0x54f684._0x127259)]>0x0?_0x290aa5:_0x4b536a(0x364,_0x54f684._0x2f83f7,0x357,_0x54f684._0x193c75);}function getToolResultImages(_0x35ccfc){const _0x33b0a9={_0x44e388:0x92,_0x59a80c:0x90};function _0x19995b(_0x18f719,_0x10dfad,_0x2be863,_0x33e377){return _0x55e4(_0x18f719- -0x175,_0x2be863);}return Array['isArray'](_0x35ccfc)?_0x35ccfc[_0x19995b(-_0x33b0a9._0x44e388,-0x90,-0x86,-_0x33b0a9._0x59a80c)](isImageToolResultBlock):[];}function resolveReasoningVisibility(_0x163528){const _0x223ca9={_0x19a037:0x421,_0x2607ce:0x415,_0x6e87cd:0x3f7,_0x3dc6c0:0x40a,_0x1aa5c5:0x313,_0x37d158:0x2f9},_0x554242={_0x8d9170:0x31c};function _0x30f4de(_0x4e1b59,_0x3b9db8,_0x328fe0,_0x52e807){return _0x55e4(_0x3b9db8-_0x554242._0x8d9170,_0x4e1b59);}function _0x30d436(_0x3cb506,_0x1dd0a9,_0x4e21e9,_0x37a6ab){return _0x55e4(_0x37a6ab-0x21c,_0x4e21e9);}return _0x163528[_0x30f4de(0x40a,0x423,_0x223ca9._0x19a037,0x409)]?.[_0x30f4de(0x420,_0x223ca9._0x2607ce,_0x223ca9._0x6e87cd,_0x223ca9._0x3dc6c0)]??_0x30d436(_0x223ca9._0x1aa5c5,0x2e1,0x2fb,_0x223ca9._0x37d158);}function createOpenAiResponsesReasoning(_0x4807d8){const _0x1dc136={_0x271b08:0x3b4,_0xe52021:0x3a8,_0x531c93:0x3ce,_0x144dbb:0x3d2,_0x2ebac1:0x3de,_0x3ec623:0x3e5,_0x28b3f4:0x1ad,_0x4e939f:0x3c0,_0x296c3e:0x3b8,_0x2b1e60:0x3c5,_0x5664ad:0x3cf,_0x16351d:0x3aa,_0x2aae50:0x3b5,_0xdac03b:0x399,_0x11b7df:0x1ca,_0xb8609c:0x1b3,_0x2e4727:0x1d8,_0x566065:0x1ef},_0x1ab8ff={_0x5b209f:0x2c0};function _0x498381(_0x454c94,_0x3fb2f2,_0x7021b3,_0x32a8a3){return _0x55e4(_0x454c94-0xc6,_0x32a8a3);}const _0x8ea926=resolveOpenAiReasoningConfig(_0x4807d8['reasoning']);if(!_0x8ea926)return{};const _0xe150e2={};function _0x4a870c(_0x2c16b7,_0x5348e2,_0x2fe91e,_0x5de10a){return _0x55e4(_0x2c16b7-_0x1ab8ff._0x5b209f,_0x5348e2);}const _0x2dda63=_0x8ea926[_0x4a870c(_0x1dc136._0x271b08,0x3c0,_0x1dc136._0xe52021,_0x1dc136._0x531c93)]??(resolveReasoningVisibility(_0x4807d8)==='user-visible'?_0x4a870c(_0x1dc136._0x144dbb,_0x1dc136._0x2ebac1,_0x1dc136._0x3ec623,0x3ed):void 0x0);return _0x8ea926['effort']&&(_0xe150e2[_0x498381(0x1c6,_0x1dc136._0x28b3f4,0x1d2,0x1cf)]=_0x8ea926[_0x4a870c(_0x1dc136._0x4e939f,_0x1dc136._0x296c3e,_0x1dc136._0xe52021,_0x1dc136._0x2b1e60)]),_0x2dda63&&(_0xe150e2[_0x4a870c(0x3b4,0x3b4,_0x1dc136._0x5664ad,_0x1dc136._0x16351d)]=_0x2dda63),{..._0x8ea926[_0x4a870c(0x3b6,_0x1dc136._0x296c3e,_0x1dc136._0x2aae50,_0x1dc136._0xdac03b)]===![]?{}:{'include':[_0x498381(0x1c4,0x1d8,_0x1dc136._0x11b7df,_0x1dc136._0xb8609c)]},...Object['keys'](_0xe150e2)[_0x498381(0x1d9,_0x1dc136._0x2e4727,0x1be,_0x1dc136._0x566065)]>0x0?{'reasoning':_0xe150e2}:{}};}function pushAssistantProviderState(_0x4ef8be,_0x20bd56){const _0x30888f={_0x4009aa:0x490,_0x47e813:0x5,_0x1c5d2a:0x2f,_0x499e9e:0x23,_0x5d4bb7:0x13,_0x3f4ca5:0x489,_0x4bac96:0x7,_0x28acbe:0x498,_0x16b34b:0x49f},_0x311c2a={_0x80e2ad:0xfd};if(_0x20bd56[_0x5e3a41(0x49f,_0x30888f._0x4009aa,0x4aa,0x480)]!==_0x2f0a42(_0x30888f._0x47e813,_0x30888f._0x1c5d2a,_0x30888f._0x499e9e,_0x30888f._0x5d4bb7))return![];function _0x2f0a42(_0x256265,_0x3afa94,_0x8b6a2e,_0x38b51d){return _0x55e4(_0x38b51d- -_0x311c2a._0x80e2ad,_0x8b6a2e);}function _0x5e3a41(_0x1b37ba,_0xf3ae1e,_0x5c8051,_0xaa561c){return _0x55e4(_0xf3ae1e-0x3a4,_0xaa561c);}const _0x51ca9a=_0x20bd56[_0x5e3a41(_0x30888f._0x3f4ca5,0x485,0x47a,0x473)]?.[_0x2f0a42(0x2,0x9,-0x1,0xe)]??[];if(_0x51ca9a[_0x2f0a42(0xd,0x33,_0x30888f._0x4bac96,0x16)]===0x0)return![];for(const _0x426339 of _0x51ca9a){isResponseInputObject(_0x426339)&&_0x4ef8be[_0x5e3a41(_0x30888f._0x28acbe,0x48a,_0x30888f._0x16b34b,0x479)](structuredClone(_0x426339));}return!![];}function _0x2a76(){const _0xc1a5dd=['B2jQzwn0','C3vTBwfYEq','mtvguxLzufK','Aw5JBhvKzuvUy3j5ChrLzenVBNrLBNq','zgf0ytO','ndb6Bvrrzum','DMLZAwjPBgL0Eq','mJm3odqZwffHBeTr','zgvZy3jPChrPB24','mZKXodK1mNbiy1f5rW','AxnbCNjHEq','CMvHC29UAw5NlMvUy3j5ChrLzf9JB250zw50','mJaZmJK1nMn5uwzLsG','zwzMB3j0','mtnsDw9oze4','Aw5WDxrFDgv4Da','BwvZC2fNzq','C291CMnL','vg9VBcbYzxr1CM5LzcbPBwfNzsbJB250zw50lG','DhjPBq','CMvHC29UAw5N','sw1Hz2uGCMv0DxjUzwqGyNKGvMLLD0zPBguGzM9YihrVB2WGCMvZDwX0ia','Aw5WDxrFAw1Hz2u','y29UDgvUDa','B3bLBMfPuMvZCg9UC2vZt3v0Chv0','Dg9VBf91C2u','Bwf4vg9Rzw5Z','C3LZDgvT','zgf0yq','yxnZAxn0yw50','DhLWzq','yxv0BW','BgvUz3rO','n2vUEg5rDa','BwvKAwfFDhLWzq','Aw5WDxq','BMfTzq','ndu5ndq3BfrsCuPV','Dgv4Da','DxnLCI12AxnPyMXL','Aw1Hz2u','Aw5WDxrFC2nOzw1H','mti2nduYnfzcExnkrW','ChjVDMLKzxjtDgf0zq','o2jHC2u2ncW','zMLSDgvY','ohfJre5LDG','C3rYAw5N','ChvZAa','DxnLCG','AM9PBG','BwfW','C3bSAwnL','BwvZC2fNzxm','CM9Szq','odC2mLLVs0LgBG','mJmWsMj0rufY','zNvUy3rPB25Fy2fSBa','Dg9VBf91C2vFAwq','mJaXodu0ngXPvgL6BG','zNvUy3rPB24'];_0x2a76=function(){return _0xc1a5dd;};return _0x2a76();}function toOpenAiResponsesRequest(_0x524667){const _0x4cee3={_0x28abbd:0x3f5,_0x4d9b3d:0x40d,_0x38289b:0x3f5,_0x5c2b85:0x20a,_0x3100ff:0x211,_0x40f726:0x212,_0x4a248:0x1fd,_0x48e693:0x221,_0x1f8ef5:0x225,_0x84f9a3:0x248,_0x11903e:0x230,_0x247ce1:0x203,_0x26eebe:0x20f,_0x2224a6:0x206,_0x35ac5b:0x218,_0x45b8b8:0x3fe,_0x5abdc5:0x414,_0x4292e6:0x205,_0x431c54:0x1fd,_0x4e048f:0x20b,_0xa6db37:0x3da,_0x1e0e14:0x400,_0x4b4bb1:0x208,_0x4be03c:0x3f0,_0x5a17ba:0x3ea,_0x111b6b:0x403,_0x5390f9:0x3e3,_0x463cdd:0x23a,_0x12795b:0x259,_0x4343f7:0x1f4,_0x1d048c:0x204,_0x1f1b42:0x213,_0x227b80:0x41c,_0xc3bfe4:0x415,_0x3ccc5c:0x401,_0x391b6f:0x20e,_0x3dfa33:0x211,_0x5698e9:0x3f0,_0x1625de:0x40a,_0x2540a9:0x1f3,_0x1ef5d6:0x22d,_0x5e5ea7:0x222,_0x2c028c:0x412,_0xa9e74f:0x414,_0x4876ac:0x3fa,_0x596692:0x3dd,_0x2ebd1e:0x22b,_0x4bd988:0x22d,_0x451324:0x239,_0x152b22:0x3de,_0x5ab552:0x3ec,_0x1fdd91:0x3fd,_0x3d9235:0x206,_0x8d5a44:0x207,_0x588565:0x3f3,_0x477e21:0x40a},_0x409d48={_0x4c075b:0x72,_0x26f040:0x7,_0x48f0c3:0x2a,_0x3cd466:0x4},_0x3ab790={_0x47225d:0x196,_0x1c88b5:0x3e5},_0x3b3668={_0x56b8c1:0x29d};function _0x493ce1(_0x27b626,_0x3e35ae,_0x282533,_0x463181){return _0x55e4(_0x3e35ae-0x30a,_0x463181);}const _0x191a4a=[];for(const _0x561064 of _0x524667[_0x493ce1(_0x4cee3._0x28abbd,0x3f5,_0x4cee3._0x4d9b3d,_0x4cee3._0x38289b)]){if(pushAssistantProviderState(_0x191a4a,_0x561064))continue;const _0x544507=[];for(const _0x125045 of normalizeContent(_0x561064[_0xada9cb(-_0x4cee3._0x5c2b85,-_0x4cee3._0x3100ff,-0x223,-0x20e)])){if(_0x125045['type']==='text'){_0x544507['push']({'type':_0xada9cb(-_0x4cee3._0x40f726,-_0x4cee3._0x4a248,-_0x4cee3._0x48e693,-_0x4cee3._0x1f8ef5),'text':_0x125045[_0xada9cb(-0x238,-_0x4cee3._0x84f9a3,-_0x4cee3._0x11903e,-0x227)]});continue;}if(_0x125045[_0xada9cb(-_0x4cee3._0x247ce1,-0x1fd,-0x1f0,-_0x4cee3._0x26eebe)]==='image'){_0x544507['push']({'type':'input_image','image_url':_0xada9cb(-0x21d,-_0x4cee3._0x2224a6,-_0x4cee3._0x35ac5b,-0x20d)+_0x125045[_0x493ce1(_0x4cee3._0x45b8b8,0x40e,_0x4cee3._0x5abdc5,0x400)]['media_type']+';base64,'+_0x125045['source'][_0xada9cb(-_0x4cee3._0x4292e6,-0x213,-_0x4cee3._0x431c54,-0x218)]});continue;}pushUserContentMessage(_0x191a4a,_0x561064[_0xada9cb(-0x228,-0x229,-0x225,-_0x4cee3._0x4e048f)],_0x544507[_0x493ce1(_0x4cee3._0xa6db37,0x3f4,0x3d5,_0x4cee3._0x1e0e14)](0x0));if(_0x125045['type']===_0xada9cb(-_0x4cee3._0x4b4bb1,-0x205,-0x20e,-0x204)){if(!hasSerializableToolUse(_0x125045))continue;_0x191a4a[_0x493ce1(0x3da,_0x4cee3._0x4be03c,_0x4cee3._0x5a17ba,0x3fd)]({'type':_0x493ce1(_0x4cee3._0x111b6b,0x3f9,0x3e4,_0x4cee3._0x5390f9),'call_id':_0x125045['id'],'name':_0x125045[_0xada9cb(-_0x4cee3._0x463cdd,-0x21b,-_0x4cee3._0x84f9a3,-0x257)],'arguments':JSON['stringify'](_0x125045[_0xada9cb(-0x23b,-_0x4cee3._0x12795b,-0x254,-0x224)]??{})});continue;}if(_0x125045['type']==='tool_result'){if(!hasSerializableToolResult(_0x125045))continue;const _0x3084fc=getToolResultText(_0x125045[_0xada9cb(-0x20a,-0x1fe,-_0x4cee3._0x4343f7,-_0x4cee3._0x1d048c)]);_0x191a4a[_0x493ce1(0x3f7,0x3f0,0x3da,_0x4cee3._0x5390f9)]({'type':'function_call_output','call_id':_0x125045[_0xada9cb(-0x224,-0x218,-0x206,-_0x4cee3._0x1f1b42)],'output':_0x3084fc});const _0x101d26=getToolResultImages(_0x125045[_0x493ce1(_0x4cee3._0x227b80,0x414,_0x4cee3._0xc3bfe4,_0x4cee3._0x3ccc5c)]);_0x101d26[_0xada9cb(-0x201,-_0x4cee3._0x1f1b42,-_0x4cee3._0x391b6f,-_0x4cee3._0x3dfa33)]>0x0&&_0x191a4a[_0x493ce1(0x407,_0x4cee3._0x5698e9,_0x4cee3._0x1625de,0x3e1)]({'type':_0xada9cb(-_0x4cee3._0x3dfa33,-_0x4cee3._0x2540a9,-0x208,-0x217),'role':_0xada9cb(-_0x4cee3._0x1ef5d6,-_0x4cee3._0x5e5ea7,-0x217,-0x23d),'content':[{'type':'input_text','text':_0x493ce1(_0x4cee3._0x227b80,_0x4cee3._0x2c028c,0x3f3,_0x4cee3._0xa9e74f)+_0x125045[_0x493ce1(0x3e3,_0x4cee3._0x4876ac,0x3e1,_0x4cee3._0x596692)]+'.'},..._0x101d26[_0xada9cb(-_0x4cee3._0x2ebd1e,-_0x4cee3._0x4bd988,-_0x4cee3._0x451324,-0x240)](_0x3dc820=>({'type':_0xada9cb(-0x20b,-0x212,-0x21c,-0x201),'image_url':_0x493ce1(0x419,0x401,0x3f9,0x3e7)+_0x3dc820[_0xada9cb(-0x210,-0x219,-0x229,-0x207)][_0xada9cb(-0x23c,-0x24f,-0x239,-0x23d)]+_0x493ce1(0x3d7,0x3ec,0x3fc,0x3d9)+_0x3dc820[_0xada9cb(-0x210,-0x21a,-0x22b,-0x216)]['data']}))]});}}pushUserContentMessage(_0x191a4a,_0x561064[_0x493ce1(_0x4cee3._0x152b22,0x3f6,_0x4cee3._0x5ab552,_0x4cee3._0x1fdd91)],_0x544507);}function _0xada9cb(_0x460160,_0x51b823,_0x2fa77d,_0x4087ed){return _0x55e4(_0x460160- -0x314,_0x4087ed);}return{...createOpenAiResponsesReasoning(_0x524667),'model':_0x524667['model'],'instructions':systemToInstructions(_0x524667[_0xada9cb(-_0x4cee3._0x3d9235,-0x210,-0x203,-0x215)]),'input':_0x191a4a,'max_output_tokens':_0x524667[_0xada9cb(-_0x4cee3._0x8d5a44,-0x20a,-0x219,-0x1ea)],'tools':_0x524667['tools'][_0x493ce1(0x3fe,_0x4cee3._0x588565,0x3ed,_0x4cee3._0x477e21)](_0x443d67=>{function _0x4b27af(_0x230c35,_0x15f97b,_0x4d6323,_0x3e149c){return _0xada9cb(_0x230c35-_0x3b3668._0x56b8c1,_0x15f97b-0x1db,_0x4d6323-0x6,_0x4d6323);}function _0x31fb81(_0x2f2f5d,_0x12d556,_0x595bec,_0x2843e4){return _0x493ce1(_0x2f2f5d-_0x3ab790._0x47225d,_0x12d556- -_0x3ab790._0x1c88b5,_0x595bec-0x4b,_0x595bec);}return{'type':_0x4b27af(0x7b,0x99,0x5f,_0x409d48._0x4c075b),'name':_0x443d67[_0x31fb81(0x1c,-0x1,_0x409d48._0x26f040,0x1c)],'description':_0x443d67[_0x31fb81(0x30,0x20,_0x409d48._0x48f0c3,0x18)],'parameters':_0x443d67[_0x31fb81(_0x409d48._0x3cd466,0x4,-0x14,-0x1b)]};})};}export{toOpenAiResponsesRequest};
|
package/dist/chunk-G2FR4UGO.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x1d34f9,_0x150be1){const _0xb623d1={_0x15c14d:0xa,_0x508922:0x5,_0x422ef3:0x9,_0x542ce8:0x1a,_0x122e08:0xe,_0x1a7775:0x17,_0x20d283:0x21,_0x2fee5c:0x37,_0x4c96d9:0x17,_0x4d4799:0x24,_0x354d0f:0x33,_0x10466f:0x26,_0x43c76f:0x35,_0x1f7884:0x22,_0x1278aa:0x28,_0x3af54c:0x14,_0xaa4384:0x3f,_0x320a70:0x46,_0x1250dc:0x1fb,_0x59b04d:0x204,_0x34fbd3:0x20b,_0x150c1d:0x20c,_0x10f5c0:0x209,_0x4eb9e1:0x223},_0x3aa6fc={_0x2ddd69:0x121},_0x3cb3b5={_0x575c0f:0x111};function _0x189598(_0x5131b4,_0x34a8bb,_0x401396,_0x38cd71){return _0x31ad(_0x38cd71-_0x3cb3b5._0x575c0f,_0x34a8bb);}const _0x1a720a=_0x1d34f9();function _0x48ebb7(_0x29e0cc,_0x2cbbe6,_0x3390ac,_0x32aa15){return _0x31ad(_0x29e0cc- -_0x3aa6fc._0x2ddd69,_0x32aa15);}while(!![]){try{const _0x26039d=-parseInt(_0x48ebb7(-_0xb623d1._0x15c14d,-_0xb623d1._0x508922,-0x11,_0xb623d1._0x422ef3))/0x1*(parseInt(_0x48ebb7(-_0xb623d1._0x542ce8,-_0xb623d1._0x15c14d,-0x17,-_0xb623d1._0x122e08))/0x2)+parseInt(_0x48ebb7(-0xb,-_0xb623d1._0x1a7775,-0x15,-0xd))/0x3+parseInt(_0x48ebb7(-_0xb623d1._0x20d283,-_0xb623d1._0x2fee5c,-_0xb623d1._0x4c96d9,-_0xb623d1._0x4d4799))/0x4+-parseInt(_0x48ebb7(-_0xb623d1._0x354d0f,-0x44,-_0xb623d1._0x10466f,-_0xb623d1._0x43c76f))/0x5*(-parseInt(_0x48ebb7(-_0xb623d1._0x1f7884,-_0xb623d1._0x1278aa,-_0xb623d1._0x3af54c,-0xf))/0x6)+parseInt(_0x48ebb7(-0x35,-_0xb623d1._0xaa4384,-0x21,-_0xb623d1._0x320a70))/0x7*(-parseInt(_0x189598(0x20e,0x1fd,0x202,_0xb623d1._0x1250dc))/0x8)+parseInt(_0x189598(0x205,_0xb623d1._0x59b04d,_0xb623d1._0x34fbd3,_0xb623d1._0x34fbd3))/0x9*(-parseInt(_0x189598(0x216,0x23f,0x244,0x22e))/0xa)+-parseInt(_0x189598(_0xb623d1._0x150c1d,_0xb623d1._0x10f5c0,0x20b,_0xb623d1._0x4eb9e1))/0xb;if(_0x26039d===_0x150be1)break;else _0x1a720a['push'](_0x1a720a['shift']());}catch(_0x5f3f43){_0x1a720a['push'](_0x1a720a['shift']());}}}(_0x5803,0x8c5d7));function createTextBlock(_0x5e7636){const _0x209e5c={_0x4928e8:0x252,_0x466e68:0x27c,_0x3d8205:0x271};function _0x5ef941(_0x278c60,_0x493b19,_0xe4b401,_0x40bf6a){return _0x31ad(_0x493b19-0x150,_0xe4b401);}return{'type':_0x5ef941(_0x209e5c._0x4928e8,0x264,_0x209e5c._0x466e68,_0x209e5c._0x3d8205),'text':_0x5e7636};}function normalizeTextBlock(_0x8d471d){const _0x5680e0={_0x303ff5:0x362,_0x4a3607:0x361,_0x2e8dfb:0x351},_0x16ef7a={_0x334256:0x24d};function _0x50c222(_0x24ea65,_0xcd97aa,_0x2d2619,_0x26d93c){return _0x31ad(_0xcd97aa-_0x16ef7a._0x334256,_0x2d2619);}return createTextBlock(_0x8d471d[_0x50c222(_0x5680e0._0x303ff5,_0x5680e0._0x4a3607,0x359,_0x5680e0._0x2e8dfb)]??'');}function normalizeContent(_0x4c6b51){const _0x48ad25={_0x18025b:0x127,_0x40d122:0x126,_0x18f173:0x129,_0x129af2:0x159,_0x12a7ad:0x158},_0x1523c1={_0xc26e0c:0x11f,_0x52fed8:0x10f,_0x484224:0x11e,_0x204650:0x127,_0x10842c:0x114},_0x191a8e={_0x2edde8:0x1b7,_0x78edfe:0x16},_0x51a209={_0x24d637:0x201},_0x4c1b65={_0x3a4935:0x236};if(typeof _0x4c6b51===_0x3d0bdc(-_0x48ad25._0x18025b,-_0x48ad25._0x40d122,-_0x48ad25._0x18f173,-0x11e))return[createTextBlock(_0x4c6b51)];function _0x3d0bdc(_0x123c37,_0x4dfbec,_0x49f81b,_0x522b13){return _0x31ad(_0x522b13- -_0x4c1b65._0x3a4935,_0x4dfbec);}function _0x4e3e7e(_0x27c88b,_0x29c8f8,_0x71d157,_0x7adc51){return _0x31ad(_0x29c8f8- -_0x51a209._0x24d637,_0x71d157);}if(!Array['isArray'](_0x4c6b51))return[];return _0x4c6b51[_0x3d0bdc(-0x12d,-_0x48ad25._0x129af2,-_0x48ad25._0x12a7ad,-0x142)](_0x421ff5=>{const _0x28362f={_0x3213c7:0x22f};if(_0x421ff5[_0x5bc162(0x106,_0x1523c1._0xc26e0c,0x110,_0x1523c1._0x52fed8)]===_0x5bc162(0x10d,_0x1523c1._0x484224,_0x1523c1._0x204650,_0x1523c1._0x10842c))return normalizeTextBlock(_0x421ff5);function _0x26f499(_0x237efd,_0x13a735,_0x49ce3c,_0x13a0c9){return _0x3d0bdc(_0x237efd-_0x191a8e._0x2edde8,_0x13a735,_0x49ce3c-_0x191a8e._0x78edfe,_0x49ce3c- -0xfd);}function _0x5bc162(_0x531a22,_0x38f061,_0x386509,_0x368751){return _0x3d0bdc(_0x531a22-0x1c9,_0x386509,_0x386509-0x161,_0x531a22-_0x28362f._0x3213c7);}return structuredClone(_0x421ff5);});}function normalizeSystem(_0x20f401=[]){const _0x4e429d={_0x252102:0x6e};function _0x16fb68(_0x3e64f7,_0x3a149b,_0x53b812,_0x26677e){return _0x31ad(_0x26677e- -0x16a,_0x3a149b);}function _0x385a3c(_0x20d6bf,_0x433c03,_0x459163,_0x318223){return _0x31ad(_0x459163- -0x3cc,_0x318223);}return normalizeContent(_0x20f401)[_0x16fb68(-0x70,-0x6c,-0x64,-_0x4e429d._0x252102)](_0x28f20c=>_0x28f20c[_0x385a3c(-0x2c7,-0x2cf,-0x2bf,-0x2b0)]===_0x385a3c(-0x2b3,-0x2b5,-0x2b8,-0x2a9));}function normalizeMessage(_0x36272f){const _0x23228e={_0x166093:0x0,_0x132c58:0x28,_0x4181fd:0x2a4,_0x322cde:0x2ae,_0x53484f:0x2b6,_0x2ced72:0x2a,_0x41aebc:0x38,_0x47c59d:0x4b},_0x59ef76={_0x348120:0x127};function _0x12f95a(_0x3270e6,_0x4667ef,_0x1fe33b,_0xd30cd0){return _0x31ad(_0x3270e6-0x1b8,_0xd30cd0);}function _0x35a307(_0x519dc0,_0x1fc8b6,_0x4ddb81,_0x267063){return _0x31ad(_0x1fc8b6- -_0x59ef76._0x348120,_0x267063);}return{...typeof _0x36272f['id']===_0x35a307(-0x25,-0xf,_0x23228e._0x166093,-_0x23228e._0x132c58)?{'id':_0x36272f['id']}:{},'role':_0x36272f[_0x12f95a(0x2a5,_0x23228e._0x4181fd,0x28c,_0x23228e._0x322cde)],'content':normalizeContent(_0x36272f[_0x12f95a(0x2ab,_0x23228e._0x53484f,0x2b1,0x2c4)]),..._0x36272f['providerState']?{'providerState':structuredClone(_0x36272f[_0x35a307(-_0x23228e._0x2ced72,-_0x23228e._0x41aebc,-_0x23228e._0x47c59d,-0x2c)])}:{}};}function _0x31ad(_0x2fbfae,_0x123533){_0x2fbfae=_0x2fbfae-0xea;const _0x58032b=_0x5803();let _0x31ada5=_0x58032b[_0x2fbfae];if(_0x31ad['uCTqSH']===undefined){var _0x426edd=function(_0x18707f){const _0x18f8d3='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5e7636='',_0x8d471d='';for(let _0x4c6b51=0x0,_0x421ff5,_0x20f401,_0x28f20c=0x0;_0x20f401=_0x18707f['charAt'](_0x28f20c++);~_0x20f401&&(_0x421ff5=_0x4c6b51%0x4?_0x421ff5*0x40+_0x20f401:_0x20f401,_0x4c6b51++%0x4)?_0x5e7636+=String['fromCharCode'](0xff&_0x421ff5>>(-0x2*_0x4c6b51&0x6)):0x0){_0x20f401=_0x18f8d3['indexOf'](_0x20f401);}for(let _0x36272f=0x0,_0x1a46a6=_0x5e7636['length'];_0x36272f<_0x1a46a6;_0x36272f++){_0x8d471d+='%'+('00'+_0x5e7636['charCodeAt'](_0x36272f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x8d471d);};_0x31ad['GAreyl']=_0x426edd,_0x31ad['CCNqiA']={},_0x31ad['uCTqSH']=!![];}const _0x54645b=_0x58032b[0x0],_0x83be1c=_0x2fbfae+_0x54645b,_0x59fe45=_0x31ad['CCNqiA'][_0x83be1c];return!_0x59fe45?(_0x31ada5=_0x31ad['GAreyl'](_0x31ada5),_0x31ad['CCNqiA'][_0x83be1c]=_0x31ada5):_0x31ada5=_0x59fe45,_0x31ada5;}function compileRequest(_0x1a46a6){const _0xb9b344={_0x161cab:0xd,_0x4dff68:0x4,_0x1300ae:0x8,_0x4a8289:0x2,_0x1bf42f:0x13,_0x14578e:0x3,_0x20f3ab:0x11,_0x7fefe3:0x14,_0x20b63c:0x3,_0xcd690d:0x2cf,_0x3acbad:0x2dc,_0x3085f4:0x2e8,_0x5397ca:0x302,_0x4d7431:0x2fa,_0x249b51:0x2fe,_0x562c30:0x2eb,_0x9fe2e:0x2f1},_0x2d6dc3={_0x148fc5:0x1e3};function _0x5eee64(_0x57e338,_0x408bb3,_0x10aa33,_0x59652f){return _0x31ad(_0x59652f- -0x117,_0x57e338);}function _0x4daa12(_0x576680,_0x1628a2,_0x2e0141,_0x47f8b0){return _0x31ad(_0x2e0141-_0x2d6dc3._0x148fc5,_0x576680);}return{'model':_0x1a46a6[_0x5eee64(_0xb9b344._0x161cab,-0x8,-0x19,-0x8)]??_0x5eee64(0x1,_0xb9b344._0x4dff68,-_0xb9b344._0x1300ae,-_0xb9b344._0x4a8289),'max_tokens':_0x1a46a6['max_tokens']??0x400,..._0x1a46a6[_0x5eee64(0xc,_0xb9b344._0x1bf42f,0x17,_0xb9b344._0x14578e)]?{'reasoning':structuredClone(_0x1a46a6[_0x5eee64(_0xb9b344._0x20f3ab,-_0xb9b344._0x7fefe3,-0x3,_0xb9b344._0x20b63c)])}:{},'system':normalizeSystem(_0x1a46a6['system']),'messages':_0x1a46a6[_0x4daa12(_0xb9b344._0xcd690d,_0xb9b344._0x3acbad,_0xb9b344._0x3085f4,_0xb9b344._0x5397ca)]['map'](normalizeMessage),'tools':structuredClone(_0x1a46a6['tools']??[]),'metadata':{'session_id':_0x1a46a6[_0x4daa12(_0xb9b344._0x4d7431,_0xb9b344._0x249b51,_0xb9b344._0x562c30,_0xb9b344._0x9fe2e)],'turn_id':_0x1a46a6['turnId']}};}function toChatRequest(_0x33db9f){const _0x5964b5={_0x3ed80e:0x32b,_0x311f11:0x34f,_0x14687b:0x32a,_0x3e9492:0x341,_0x11d371:0x4f7,_0x6d2bb7:0x4f1,_0x53262b:0x500,_0x257238:0x4fc,_0x5accd5:0x519,_0x329183:0x500,_0x4a8697:0x335,_0x2b309f:0x33a,_0x4871bd:0x347,_0x113d19:0x4e2,_0x2a0090:0x4d0,_0x301327:0x4da,_0x19afca:0x4d3};function _0x2e7949(_0x3c42ad,_0x55d131,_0x105ba9,_0x500843){return _0x31ad(_0x3c42ad-0x21c,_0x55d131);}function _0x12c49b(_0x29bc6f,_0x10ea46,_0xdcb2ca,_0x6bb2df){return _0x31ad(_0x10ea46-0x3e4,_0xdcb2ca);}return{'model':_0x33db9f[_0x2e7949(_0x5964b5._0x3ed80e,0x313,0x327,0x323)],'maxTokens':_0x33db9f['max_tokens'],..._0x33db9f[_0x2e7949(0x336,_0x5964b5._0x311f11,_0x5964b5._0x14687b,_0x5964b5._0x3e9492)]?{'reasoning':structuredClone(_0x33db9f[_0x12c49b(_0x5964b5._0x11d371,0x4fe,0x4e6,_0x5964b5._0x6d2bb7)])}:{},'system':structuredClone(_0x33db9f['system']),'messages':structuredClone(_0x33db9f[_0x12c49b(_0x5964b5._0x53262b,0x4e9,0x4e6,_0x5964b5._0x257238)]),'tools':structuredClone(_0x33db9f[_0x12c49b(_0x5964b5._0x5accd5,_0x5964b5._0x329183,0x519,0x512)]),'metadata':{'sessionId':_0x33db9f['metadata'][_0x2e7949(_0x5964b5._0x4a8697,_0x5964b5._0x2b309f,_0x5964b5._0x4871bd,0x331)],'turnId':_0x33db9f[_0x12c49b(0x4f6,_0x5964b5._0x113d19,0x4ec,_0x5964b5._0x2a0090)][_0x12c49b(_0x5964b5._0x301327,0x4dd,0x4ca,_0x5964b5._0x19afca)]}};}function toModelRequest(_0x240c25){const _0x2646ed={_0x3fc2d0:0x469,_0x261b32:0x266,_0x2408d0:0x25c,_0x1584c3:0x26c,_0x650c65:0x247,_0x298796:0x249,_0x353b7a:0x476,_0x59b742:0x48d,_0x3fcd53:0x473,_0x20e3c7:0x46e,_0x3d8548:0x47d,_0x54c82f:0x47a,_0x116a7a:0x479,_0x22ff42:0x245,_0x241ce6:0x263,_0x2eda6c:0x238,_0x1f2486:0x235},_0xa296f4={_0x4a6bde:0x14b},_0x2c2569={_0x4747fe:0x371};function _0x56d0a9(_0x4299e4,_0x556a07,_0x5769df,_0x2cefb8){return _0x31ad(_0x2cefb8-_0x2c2569._0x4747fe,_0x4299e4);}function _0x4599a9(_0x1c30c2,_0x154cfe,_0x56614a,_0x3d1992){return _0x31ad(_0x56614a-_0xa296f4._0x4a6bde,_0x154cfe);}return{'model':_0x240c25[_0x56d0a9(0x46b,_0x2646ed._0x3fc2d0,0x495,0x480)],'max_tokens':_0x240c25[_0x4599a9(0x269,_0x2646ed._0x261b32,_0x2646ed._0x2408d0,_0x2646ed._0x1584c3)],..._0x240c25[_0x56d0a9(0x47c,0x495,0x495,0x48b)]?{'reasoning':structuredClone(_0x240c25['reasoning'])}:{},'system':structuredClone(_0x240c25[_0x4599a9(_0x2646ed._0x650c65,_0x2646ed._0x298796,0x23d,0x253)]),'messages':structuredClone(_0x240c25['messages']),'tools':structuredClone(_0x240c25[_0x56d0a9(0x487,_0x2646ed._0x353b7a,0x484,_0x2646ed._0x59b742)]),'metadata':{'session_id':_0x240c25[_0x56d0a9(0x47d,_0x2646ed._0x3fcd53,_0x2646ed._0x20e3c7,0x46f)][_0x56d0a9(_0x2646ed._0x3d8548,_0x2646ed._0x54c82f,0x460,_0x2646ed._0x116a7a)],'turn_id':_0x240c25[_0x4599a9(_0x2646ed._0x22ff42,_0x2646ed._0x241ce6,0x249,0x259)][_0x4599a9(0x24c,_0x2646ed._0x2eda6c,0x23c,_0x2646ed._0x1f2486)]}};}function toProviderModelRequest(_0x425eff){const _0x286e2a={_0x9a1aa9:0x1c8,_0x1617ab:0x1bd,_0x139195:0x157,_0x6a344f:0x142,_0x65b5d3:0x1d7,_0x4627d6:0x1bf},_0x379caa={_0x507456:0x38};function _0x496727(_0x10ff1f,_0x290644,_0x1f9a58,_0x25ece2){return _0x31ad(_0x10ff1f-0xb9,_0x290644);}function _0x46b8df(_0x15a2ee,_0x5f47eb,_0x5436e3,_0x29b5e5){return _0x31ad(_0x15a2ee-_0x379caa._0x507456,_0x5f47eb);}return{'model':_0x425eff[_0x496727(_0x286e2a._0x9a1aa9,_0x286e2a._0x1617ab,0x1e0,0x1d8)],'max_tokens':_0x425eff[_0x46b8df(0x149,_0x286e2a._0x139195,0x138,_0x286e2a._0x6a344f)],'system':structuredClone(_0x425eff['system']),'messages':structuredClone(_0x425eff[_0x496727(0x1be,0x1c8,_0x286e2a._0x65b5d3,_0x286e2a._0x4627d6)]),'tools':structuredClone(_0x425eff['tools'])};}function toChatResponse(_0x4d5803){const _0x1c93e7={_0x1a432b:0x3c4,_0x55ec94:0x3a9,_0x29ffa2:0x3df,_0x283ff3:0x3e9,_0x1719fe:0x175,_0x3a3cdd:0x15c,_0x1d4c3a:0x180,_0x463b1b:0x18b,_0x3f532c:0x18e,_0x3ce0d4:0x173,_0x293632:0x18c},_0x22db98={_0x2a2afa:0x2cc};function _0x20a7e4(_0x5c0231,_0x2f4547,_0x347550,_0x471770){return _0x31ad(_0x347550-_0x22db98._0x2a2afa,_0x471770);}function _0x12b1de(_0x4fa3a9,_0xcaa10f,_0x265cb0,_0x563ac7){return _0x31ad(_0x563ac7- -0x27b,_0x265cb0);}return{'id':_0x4d5803['id'],'content':structuredClone(_0x4d5803[_0x12b1de(-0x190,-0x16f,-0x179,-0x188)]),'stopReason':_0x4d5803['stop_reason'],'usage':{'inputTokens':_0x4d5803[_0x20a7e4(_0x1c93e7._0x1a432b,_0x1c93e7._0x55ec94,0x3c2,0x3d5)][_0x20a7e4(0x3d7,0x3cb,_0x1c93e7._0x29ffa2,_0x1c93e7._0x283ff3)],'outputTokens':_0x4d5803['usage']['output_tokens'],..._0x4d5803['usage'][_0x12b1de(-_0x1c93e7._0x1719fe,-_0x1c93e7._0x3a3cdd,-0x16a,-0x16d)]!==void 0x0?{'reasoningTokens':_0x4d5803['usage']['reasoning_tokens']}:{}},..._0x4d5803[_0x12b1de(-_0x1c93e7._0x1d4c3a,-_0x1c93e7._0x463b1b,-0x19a,-0x18c)]?{'providerState':structuredClone(_0x4d5803[_0x12b1de(-0x178,-_0x1c93e7._0x3f532c,-_0x1c93e7._0x3ce0d4,-_0x1c93e7._0x293632)])}:{}};}function toModelResponse(_0x330c68){const _0x521212={_0x3a713e:0xc1,_0x4bf0ad:0xd0,_0x37f265:0xca,_0x2b51a6:0x379,_0x4e3a37:0x395,_0x3d2690:0x38e,_0x3dc2d3:0x37d,_0x31f54b:0x368,_0x4f9497:0xb4,_0xb0af7b:0xc9,_0x56d5fd:0xc6,_0x146baf:0xd6,_0x1b0dd4:0xda,_0x516c88:0x361,_0x25fff0:0x38a,_0x13e077:0xb7,_0x3f9b2f:0xba},_0x4b9227={_0x55de34:0x30},_0x403bb0={_0x438b37:0x287};function _0x592e4c(_0x4f5d11,_0x555c83,_0x1561ac,_0x562e1d){return _0x31ad(_0x4f5d11-_0x403bb0._0x438b37,_0x1561ac);}function _0x251072(_0x3a38da,_0x9541f0,_0x5ca25a,_0x2cf54b){return _0x31ad(_0x2cf54b- -_0x4b9227._0x55de34,_0x9541f0);}return{'id':_0x330c68['id'],'type':_0x251072(_0x521212._0x3a713e,_0x521212._0x4bf0ad,_0x521212._0x37f265,0xc7),'role':'assistant','content':structuredClone(_0x330c68['content']),'stop_reason':_0x330c68[_0x592e4c(0x384,_0x521212._0x2b51a6,_0x521212._0x4e3a37,_0x521212._0x3d2690)],'stop_sequence':null,'usage':{'input_tokens':_0x330c68[_0x592e4c(_0x521212._0x3dc2d3,0x389,_0x521212._0x31f54b,0x38d)][_0x251072(0xae,_0x521212._0x4f9497,0xb9,0xc0)],'output_tokens':_0x330c68['usage']['outputTokens'],..._0x330c68[_0x251072(_0x521212._0xb0af7b,0xb8,0xac,_0x521212._0x56d5fd)][_0x251072(0xb8,_0x521212._0x146baf,_0x521212._0x1b0dd4,0xd1)]!==void 0x0?{'reasoning_tokens':_0x330c68['usage']['reasoningTokens']}:{}},..._0x330c68[_0x592e4c(0x376,_0x521212._0x516c88,_0x521212._0x25fff0,0x38f)]?{'providerState':structuredClone(_0x330c68[_0x251072(_0x521212._0x13e077,_0x521212._0x3f9b2f,0xd3,0xbf)])}:{}};}function responseToAssistantMessage(_0x178065){const _0x5df9b0={_0xa878a6:0x5c,_0x227647:0x4b,_0x4a56e0:0x42,_0x2fd511:0x28,_0x234d7a:0x38,_0x3cd650:0x2d},_0x44e60e={_0x466fb0:0xaf};function _0x4c99b3(_0x1168f9,_0x4e8671,_0x1dbae3,_0x6710d7){return _0x31ad(_0x1168f9- -0x101,_0x4e8671);}function _0x10770c(_0xb9d875,_0x477aba,_0x4987a9,_0x1d7a84){return _0x31ad(_0xb9d875- -_0x44e60e._0x466fb0,_0x1d7a84);}return{'role':_0x10770c(_0x5df9b0._0xa878a6,_0x5df9b0._0x227647,_0x5df9b0._0x4a56e0,0x48),'content':normalizeContent(_0x178065[_0x4c99b3(-0xe,-0x25,-_0x5df9b0._0x2fd511,-0x14)]),..._0x178065['providerState']?{'providerState':structuredClone(_0x178065[_0x10770c(0x40,_0x5df9b0._0x234d7a,_0x5df9b0._0x3cd650,0x2f)])}:{}};}function _0x5803(){const _0x10be43=['BwvZC2fNzq','DgHPBMTPBMC','DhvYBL9Pza','ote3ntC3CvziB3fV','B3v0Chv0','zMLSDgvY','C3rVCfjLyxnVBG','Bwv0ywrHDge','nMXXtgvLBW','mtGZmtm5nMHZyvneDq','CMvHC29UAw5Nvg9Rzw5Z','C3vTBwfYEq','yw50AhjVCgLJx3jLzgfJDgvKx3rOAw5RAw5N','BgvUz3rO','BwvZC2fNzxm','zMXHDe1HCa','nZyZnZH2z2rLChK','C2vZC2LVBKLK','DhjPBq','y2fSBeLK','yxnZAxn0yw50','AM9PBG','DhLWzq','CMvHC29UAw5Nx3rVA2vUCW','Bw9KzwW','Dg9VBf9Yzxn1Bhq','Bwf4vg9Rzw5Z','mZeYmta1mLP1DuDTyW','Aw5WDxrFDg9Rzw5Z','Dgv4Da','y2XHDwrLlxnVBM5LDc00ltiWmJuWnte0','mJK2nJKYnvvluvLjza','mJzUsLHfzMi','C3rYAw5N','C2vZC2LVBL9Pza','CMvHC29UAw5N','B3bLBMfPx3jLyxnVBMLUzW','Dg9VBhm','nJbHD1r3D2K','mZi4zvbLuM9H','yw50AhjVCgLJx3rOAw5RAw5N','ntuZExPVvePr','CM9Szq','nta5odu3mhjXB3HUqq','ChjVDMLKzxjtDgf0zq','Aw5WDxruB2TLBNm','DhvYBKLK','C3LZDgvT','y29UDgvUDa','BwfW','kgvUy3j5ChrLzcbYzwfZB25PBMCP','DxnHz2u'];_0x5803=function(){return _0x10be43;};return _0x5803();}function createReasoningMessage(_0x19251c){const _0x43e5ad={_0x3e9252:0x1bb,_0x103b2e:0x1cd,_0x1afb07:0x1e2,_0x547ec6:0x1ce},_0x52ae75={_0x7a2d1f:0x2d2},_0x200679={_0x23158d:0x208,_0x11e8c5:0x1f8,_0x5496fa:0x1d6,_0x2b7ea8:0x1c6,_0x3f8c00:0x1ab,_0x38c36c:0x1cc,_0x53d219:0x1aa},_0x120f9b={_0x3a05d1:0x2dd},_0x4e1cc3=normalizeContent(_0x19251c?.['content'])['filter'](_0x2171ff=>{function _0x211843(_0x34518d,_0x4a8800,_0x4ce390,_0x390c2e){return _0x31ad(_0x4a8800-0xeb,_0x390c2e);}function _0x7d6831(_0x28e9c2,_0x8e93ca,_0x31c6b8,_0x4e5492){return _0x31ad(_0x4e5492- -_0x120f9b._0x3a05d1,_0x28e9c2);}return _0x2171ff['type']==='anthropic_redacted_thinking'||_0x2171ff[_0x211843(_0x200679._0x23158d,_0x200679._0x11e8c5,0x1e3,0x203)]===_0x211843(0x1e2,_0x200679._0x5496fa,_0x200679._0x2b7ea8,0x1e1)||_0x2171ff[_0x211843(0x204,0x1f8,0x1ee,0x1fb)]===_0x7d6831(-_0x200679._0x3f8c00,-_0x200679._0x38c36c,-_0x200679._0x53d219,-0x1c2);});function _0x3a3391(_0x10c6fc,_0x522e20,_0x18b268,_0x13ac05){return _0x31ad(_0x13ac05- -_0x52ae75._0x7a2d1f,_0x18b268);}if(_0x4e1cc3[_0x3a3391(-_0x43e5ad._0x3e9252,-_0x43e5ad._0x103b2e,-_0x43e5ad._0x1afb07,-_0x43e5ad._0x547ec6)]===0x0)return void 0x0;return{'role':'assistant','content':_0x4e1cc3};}function createAssistantTextMessage(_0x2ca0ed){const _0x3b23fc={_0x27d5c1:0x54,_0x418b8a:0x48c,_0x237a1:0x48d},_0x4e792e={_0xc203fc:0x48,_0x47213a:0x53,_0x832c88:0x31,_0x345b4b:0x3b,_0x406373:0x2e4},_0x589d2f={_0x20e828:0x1de,_0x355c24:0x1d1},_0xfaf7bf={_0x5e0ca1:0x49};function _0x3053b2(_0xd2ebaa,_0x288c70,_0x43e538,_0x66af4d){return _0x31ad(_0x288c70-0x3a8,_0x66af4d);}function _0x27dae6(_0xbf3851,_0x37c4b3,_0x338cee,_0x35e89f){return _0x31ad(_0x37c4b3- -0x13c,_0xbf3851);}const _0x391f2b=normalizeContent(_0x2ca0ed?.[_0x27dae6(-0x51,-0x49,-0x3d,-_0x3b23fc._0x27d5c1)])[_0x3053b2(_0x3b23fc._0x418b8a,0x4a4,_0x3b23fc._0x237a1,0x4af)](_0x49f5af=>{function _0x5d0f9b(_0x3cc341,_0x5c2399,_0x2c3f3f,_0x59f649){return _0x3053b2(_0x3cc341-0x64,_0x3cc341- -0x4fd,_0x2c3f3f-_0xfaf7bf._0x5e0ca1,_0x5c2399);}function _0xe1562b(_0x19c81d,_0x120b67,_0x1b9563,_0x1a9f18){return _0x3053b2(_0x19c81d-0xde,_0x1b9563- -_0x589d2f._0x20e828,_0x1b9563-_0x589d2f._0x355c24,_0x1a9f18);}return _0x49f5af[_0x5d0f9b(-_0x4e792e._0xc203fc,-_0x4e792e._0x47213a,-_0x4e792e._0x832c88,-_0x4e792e._0x345b4b)]===_0xe1562b(0x2e2,0x2e7,0x2de,_0x4e792e._0x406373);});if(_0x391f2b['length']===0x0)return void 0x0;return{'role':'assistant','content':_0x391f2b};}function createToolUseMessage(_0x48dd00){const _0x3146d3={_0x4e78ec:0x188,_0x1fa2eb:0x2b0,_0x399afb:0x2b2,_0x3af5de:0x17d,_0xa47b0:0x2a3,_0xa9a7f5:0x2c6},_0x4fe1bd={_0x44c686:0x20f,_0x4202bf:0x225,_0x4b0fee:0x21e},_0x5d638e={_0x347515:0x278};function _0x33a804(_0x27fc2e,_0x7bfee9,_0x548640,_0x123c78){return _0x31ad(_0x7bfee9- -_0x5d638e._0x347515,_0x548640);}function _0x5c9580(_0x25d8e4,_0x3fbd51,_0x326eae,_0x316905){return _0x31ad(_0x25d8e4-0x1af,_0x326eae);}const _0x2807a7=normalizeContent(_0x48dd00?.[_0x33a804(-_0x3146d3._0x4e78ec,-0x185,-0x19e,-0x188)])[_0x5c9580(0x2ab,_0x3146d3._0x1fa2eb,_0x3146d3._0x399afb,0x2a1)](_0x108473=>{const _0x2ed112={_0xa90b9f:0x4cb};function _0x22049c(_0x1a5e77,_0x74371d,_0x4789c9,_0xe8279d){return _0x5c9580(_0x1a5e77- -_0x2ed112._0xa90b9f,_0x74371d-0xc8,_0xe8279d,_0xe8279d-0xed);}return _0x108473[_0x22049c(-_0x4fe1bd._0x44c686,-_0x4fe1bd._0x4202bf,-0x208,-_0x4fe1bd._0x4b0fee)]==='tool_use';});if(_0x2807a7[_0x33a804(-_0x3146d3._0x3af5de,-0x174,-0x172,-0x15d)]===0x0)return void 0x0;return{'role':_0x5c9580(0x2ba,_0x3146d3._0xa47b0,0x2c8,_0x3146d3._0xa9a7f5),'content':_0x2807a7};}function getTextFromMessage(_0x4e024e){const _0x1d6977={_0x4c0cd3:0x397,_0x1e888e:0x39b,_0xf39fc7:0x3a0,_0x403e50:0x3a6,_0xd3286e:0x398,_0x252291:0x392,_0x55140e:0x2d8,_0x578125:0x2fb,_0x1c758d:0x2ec,_0x1d0285:0x2e8},_0x1c26f1={_0x1ea58e:0x1f8},_0x149a17={_0x286340:0x2ad};function _0x36f633(_0x4c5504,_0x20b298,_0x4eb572,_0xb9ff1a){return _0x31ad(_0xb9ff1a-_0x149a17._0x286340,_0x20b298);}function _0x18cddf(_0x4f3bc7,_0x447b41,_0x5f2c47,_0x3cf42c){return _0x31ad(_0x5f2c47-_0x1c26f1._0x1ea58e,_0x3cf42c);}return normalizeContent(_0x4e024e?.[_0x36f633(_0x1d6977._0x4c0cd3,0x388,_0x1d6977._0x1e888e,_0x1d6977._0xf39fc7)])[_0x36f633(_0x1d6977._0x403e50,_0x1d6977._0xd3286e,_0x1d6977._0x252291,0x3a9)](_0x1ff2df=>_0x1ff2df[_0x18cddf(0x314,0x303,0x305,0x311)]===_0x36f633(0x3b9,0x3ce,0x3ae,0x3c1))[_0x18cddf(_0x1d6977._0x55140e,_0x1d6977._0x578125,_0x1d6977._0x1c758d,_0x1d6977._0x1d0285)](_0xc7cb47=>_0xc7cb47['text'])['join']('\x0a');}function getReasoningTextFromMessage(_0x52a767){const _0x10acfd={_0x2b442b:0x64,_0x3dfa88:0x451,_0x3254a0:0x447,_0x10b4dd:0x77,_0x357440:0x67},_0x5690c6={_0x1c9e30:0xca,_0x4a54f7:0xb3,_0x3441d4:0xd5,_0x424be4:0x32c,_0x35fc68:0x2fb,_0xc7cf37:0x30f,_0x7c8d2a:0xdf,_0x30d205:0xc4,_0x3816f8:0xc1,_0x50f371:0xb8,_0x1e93e9:0xbe,_0x867221:0xbd,_0x14b1a8:0x2ee,_0x5ba367:0x2ff,_0x390e4b:0x308,_0x17c0b3:0x328,_0xa0dbc2:0x303,_0x1156dc:0x30b,_0x5687f2:0x2fe,_0x3f148b:0x314,_0x9fe7c1:0x324,_0x3f0186:0xa5,_0xce1344:0x9f,_0x45a6b2:0x310,_0x37b576:0x300,_0x30c88d:0x2ff},_0x1473cb={_0x181b3c:0xf5,_0x32635f:0x2ad,_0x51ec96:0xbd},_0x36fff2={_0x34bca3:0x71,_0x3a5054:0x11e,_0x33e0e4:0x53},_0x1811ab={_0x39e348:0xa2},_0x3a328e={_0x2c1ef5:0x34b};function _0x3ea923(_0x5686d2,_0x44dfb4,_0x1aecc5,_0x2fe2ab){return _0x31ad(_0x5686d2-_0x3a328e._0x2c1ef5,_0x2fe2ab);}function _0x1f14ca(_0x49b04a,_0x2a473f,_0x543fbc,_0x155369){return _0x31ad(_0x543fbc- -_0x1811ab._0x39e348,_0x49b04a);}return normalizeContent(_0x52a767?.[_0x1f14ca(0x57,_0x10acfd._0x2b442b,0x51,0x4e)])[_0x3ea923(_0x10acfd._0x3dfa88,0x46b,_0x10acfd._0x3254a0,0x464)](_0x41f89c=>{if(_0x41f89c[_0x5c77b8(-_0x5690c6._0x1c9e30,-0xb5,-_0x5690c6._0x4a54f7,-0xb5)]===_0x5c77b8(-0xda,-0xd2,-_0x5690c6._0x3441d4,-0xe6))return _0x41f89c['thinking'][_0x55bd0d(_0x5690c6._0x424be4,0x314,_0x5690c6._0x35fc68,0x30b)]()[_0x55bd0d(0x321,0x30f,0x328,_0x5690c6._0xc7cf37)]>0x0?[_0x41f89c[_0x5c77b8(-_0x5690c6._0x7c8d2a,-0xba,-0xc8,-_0x5690c6._0x30d205)]]:[];if(_0x41f89c[_0x55bd0d(0x311,0x318,0x329,0x31e)]===_0x55bd0d(0x2fa,0x30e,0x2fa,0x2f9))return['(redacted\x20reasoning)'];if(_0x41f89c[_0x5c77b8(-0xb5,-_0x5690c6._0x3816f8,-0xb3,-_0x5690c6._0x50f371)]!=='openai_reasoning')return[];function _0x5c77b8(_0x524a0d,_0xd60a6a,_0x576d1c,_0x183ccc){return _0x1f14ca(_0xd60a6a,_0xd60a6a-_0x36fff2._0x34bca3,_0x576d1c- -_0x36fff2._0x3a5054,_0x183ccc-_0x36fff2._0x33e0e4);}const _0x2f5f99=_0x41f89c[_0x5c77b8(-0xb1,-_0x5690c6._0x30d205,-_0x5690c6._0x1e93e9,-_0x5690c6._0x867221)][_0x55bd0d(_0x5690c6._0x14b1a8,_0x5690c6._0x5ba367,_0x5690c6._0x14b1a8,0x307)](_0x3e8888=>_0x3e8888[_0x5c77b8(-0xb6,-0xa9,-0xac,-0xb7)])[_0x55bd0d(0x2f7,0x307,_0x5690c6._0x390e4b,0x2f6)](_0x6245c6=>_0x6245c6[_0x55bd0d(0x32d,0x314,0x302,0x303)]()[_0x5c77b8(-0xcb,-0xa9,-0xbc,-0xca)]>0x0)[_0x55bd0d(_0x5690c6._0x17c0b3,0x317,0x2fd,_0x5690c6._0xa0dbc2)]('\x0a\x0a');if(_0x2f5f99[_0x55bd0d(_0x5690c6._0x35fc68,0x30f,0x328,0x309)]>0x0)return[_0x2f5f99];if(_0x41f89c['text']&&_0x41f89c[_0x55bd0d(_0x5690c6._0x1156dc,0x31f,0x30a,0x30f)][_0x55bd0d(_0x5690c6._0x5687f2,_0x5690c6._0x3f148b,0x319,_0x5690c6._0x9fe7c1)]()[_0x5c77b8(-0xa7,-0xab,-0xbc,-0xb2)]>0x0)return[_0x41f89c[_0x5c77b8(-_0x5690c6._0x3f0186,-_0x5690c6._0xce1344,-0xac,-_0x5690c6._0x3f0186)]];function _0x55bd0d(_0x48d1f6,_0x4b4769,_0x5d51d4,_0x42d8b2){return _0x1f14ca(_0x48d1f6,_0x4b4769-_0x1473cb._0x181b3c,_0x4b4769-_0x1473cb._0x32635f,_0x42d8b2-_0x1473cb._0x51ec96);}return _0x41f89c['encryptedContent']?[_0x55bd0d(_0x5690c6._0x45a6b2,_0x5690c6._0x37b576,0x2f4,_0x5690c6._0x30c88d)]:[];})[_0x1f14ca(_0x10acfd._0x10b4dd,0x81,0x6a,_0x10acfd._0x357440)]('\x0a\x0a');}function getToolUseBlocks(_0x303bfc){const _0x4a2f62={_0x4d3add:0x83},_0x4b756d={_0x39af6f:0x194},_0xa404cc={_0x511e2a:0x162};function _0x1d6893(_0x45e836,_0x1b50e4,_0x2195fd,_0x5a6699){return _0x31ad(_0x1b50e4- -_0xa404cc._0x511e2a,_0x5a6699);}function _0x1004a5(_0x58bc14,_0x1851ec,_0x4ff8b8,_0x3c697d){return _0x31ad(_0x3c697d-_0x4b756d._0x39af6f,_0x1851ec);}return normalizeContent(_0x303bfc?.[_0x1d6893(-0x6d,-0x6f,-_0x4a2f62._0x4d3add,-0x7e)])[_0x1004a5(0x281,0x2aa,0x29b,0x290)](_0x172f22=>_0x172f22[_0x1004a5(0x2a1,0x2b0,0x29d,0x2a1)]==='tool_use');}function getToolResultBlocks(_0x32cb62){const _0x1439fb={_0x582729:0xcf,_0x204a00:0xce,_0x3e9104:0xd6,_0x4e5e70:0xdb},_0x2d23c6={_0x248303:0x36};function _0x56b05d(_0x6dcffb,_0x3fcc02,_0x5ba044,_0x55e66b){return _0x31ad(_0x3fcc02-0x3a4,_0x6dcffb);}function _0x805efc(_0x2ccc7b,_0x53e06a,_0x2a764f,_0x4d14f7){return _0x31ad(_0x4d14f7- -_0x2d23c6._0x248303,_0x53e06a);}return normalizeContent(_0x32cb62?.[_0x805efc(0xae,0xad,_0x1439fb._0x582729,0xbd)])[_0x805efc(_0x1439fb._0x204a00,_0x1439fb._0x3e9104,_0x1439fb._0x4e5e70,0xc6)](_0x539969=>_0x539969[_0x56b05d(0x4bb,0x4b1,0x4ae,0x4c8)]===_0x805efc(0xcb,0xec,0xef,0xda));}function createToolResultUserMessage(_0x18323a){const _0x208f96={_0x74d4a9:0x24f,_0xc31470:0x254,_0x29c44b:0x255},_0x15ce02={_0x3aa8e2:0x27a,_0x4699e0:0x27d,_0x1a6709:0x295,_0x41525e:0x484},_0x5f0e79={_0x83106e:0x349};function _0x5eafbb(_0x5ecb2,_0x49184c,_0x21c837,_0x1d0cce){return _0x31ad(_0x1d0cce- -_0x5f0e79._0x83106e,_0x49184c);}return{'role':'user','content':_0x18323a[_0x5eafbb(-0x243,-_0x208f96._0x74d4a9,-_0x208f96._0xc31470,-_0x208f96._0x29c44b)](_0x590f3c=>{const _0x2a7f90={_0x26cfc4:0x16e,_0x206722:0x6c5},_0x46391f={_0x4dbe18:0x190,_0x4a9aea:0x15e,_0x3a4e5d:0x3e};function _0x10baa5(_0x11e78a,_0x507221,_0x3deb8e,_0xe92ef9){return _0x5eafbb(_0x11e78a-_0x46391f._0x4dbe18,_0x11e78a,_0x3deb8e-_0x46391f._0x4a9aea,_0x507221- -_0x46391f._0x3a4e5d);}function _0x4361a4(_0x232d8e,_0x28a2ae,_0x51cb95,_0x3939ae){return _0x5eafbb(_0x232d8e-0x12d,_0x51cb95,_0x51cb95-_0x2a7f90._0x26cfc4,_0x28a2ae-_0x2a7f90._0x206722);}return{'type':_0x4361a4(0x495,0x48c,0x4a0,0x47b),'tool_use_id':_0x590f3c[_0x10baa5(-_0x15ce02._0x3aa8e2,-_0x15ce02._0x4699e0,-0x297,-_0x15ce02._0x1a6709)],'content':_0x590f3c['content']??_0x590f3c[_0x4361a4(_0x15ce02._0x41525e,0x477,0x473,0x483)],'is_error':_0x590f3c['status']==='error'};})};}export{createTextBlock,normalizeTextBlock,normalizeContent,normalizeSystem,normalizeMessage,compileRequest,toChatRequest,toModelRequest,toProviderModelRequest,toChatResponse,toModelResponse,responseToAssistantMessage,createReasoningMessage,createAssistantTextMessage,createToolUseMessage,getTextFromMessage,getReasoningTextFromMessage,getToolUseBlocks,getToolResultBlocks,createToolResultUserMessage};
|
|
1
|
+
(function(_0x4d27d9,_0x13c0cb){const _0x4bd3b5={_0x80c9f1:0xbb,_0x2ab308:0xa6,_0x5034f1:0x1,_0x273200:0xd,_0x5c582a:0x1b,_0x2b645a:0xc6,_0x5011b1:0x9a,_0xc34def:0x12,_0x175fd8:0x21,_0x11ddcd:0xde,_0x193270:0xd6,_0x2ca310:0xbb},_0x812c8a={_0x28d825:0x114},_0x145b98={_0x27f674:0x1b8};function _0x2513c4(_0x2efef4,_0x10dc34,_0x468ffb,_0x5af1e6){return _0x188d(_0x10dc34- -_0x145b98._0x27f674,_0x5af1e6);}const _0x2398f1=_0x4d27d9();function _0x2c09d3(_0x2ab29d,_0x106b97,_0x3ce718,_0x3b8620){return _0x188d(_0x3ce718- -_0x812c8a._0x28d825,_0x106b97);}while(!![]){try{const _0x47933d=-parseInt(_0x2c09d3(_0x4bd3b5._0x80c9f1,_0x4bd3b5._0x2ab308,0xb2,0x9a))/0x1+parseInt(_0x2513c4(_0x4bd3b5._0x5034f1,_0x4bd3b5._0x273200,0x13,-0xf))/0x2*(-parseInt(_0x2c09d3(0xa6,0xc2,0xc1,0xbb))/0x3)+-parseInt(_0x2513c4(-0xb,0x1,-0x6,_0x4bd3b5._0x5c582a))/0x4*(-parseInt(_0x2c09d3(0xca,0xc9,0xbf,_0x4bd3b5._0x2b645a))/0x5)+-parseInt(_0x2c09d3(0x8e,0x96,_0x4bd3b5._0x5011b1,0xa7))/0x6+-parseInt(_0x2513c4(0x27,_0x4bd3b5._0xc34def,0x1a,_0x4bd3b5._0x175fd8))/0x7*(-parseInt(_0x2513c4(0x10,-0x2,0x13,-0x1a))/0x8)+parseInt(_0x2c09d3(0xc9,0xb8,0xc6,0xab))/0x9+-parseInt(_0x2c09d3(0xca,_0x4bd3b5._0x11ddcd,0xc5,0xc9))/0xa*(-parseInt(_0x2c09d3(_0x4bd3b5._0x193270,_0x4bd3b5._0x2ca310,0xc3,0xb0))/0xb);if(_0x47933d===_0x13c0cb)break;else _0x2398f1['push'](_0x2398f1['shift']());}catch(_0x187c66){_0x2398f1['push'](_0x2398f1['shift']());}}}(_0x544e,0xdf5f1));function createTextBlock(_0x4ee91a){const _0xaad905={_0x3ca124:0x193,_0x369bba:0x182};function _0x1c123a(_0x2d5caf,_0x1c0603,_0x2df6b0,_0x54b372){return _0x188d(_0x2df6b0- -0x337,_0x2d5caf);}return{'type':_0x1c123a(-_0xaad905._0x3ca124,-0x171,-_0xaad905._0x369bba,-0x18b),'text':_0x4ee91a};}function normalizeTextBlock(_0x4000ea){const _0x2e476b={_0x23e534:0x555,_0x413b53:0x559,_0x22a212:0x546};function _0x1203b4(_0x8d89e,_0x4687b2,_0x16d488,_0x510b75){return _0x188d(_0x4687b2-0x3a4,_0x510b75);}return createTextBlock(_0x4000ea[_0x1203b4(_0x2e476b._0x23e534,_0x2e476b._0x413b53,_0x2e476b._0x22a212,0x53f)]??'');}function normalizeContent(_0x3f6328){const _0x29895e={_0x4c2aa3:0x4c,_0x222237:0x53,_0x2a0c4e:0x5b},_0x2d698d={_0x53e5e9:0x546,_0x1cd355:0x54b,_0x3a4f08:0x53a},_0x44dfa6={_0x1b33b3:0x226};if(typeof _0x3f6328===_0x3e6674(0x6f,0x84,0x53,0x7c))return[createTextBlock(_0x3f6328)];if(!Array[_0x3e6674(_0x29895e._0x4c2aa3,_0x29895e._0x222237,0x57,_0x29895e._0x2a0c4e)](_0x3f6328))return[];function _0x3e6674(_0x3c1d8d,_0x3a9d3f,_0x4dc602,_0x33cd37){return _0x188d(_0x3c1d8d- -0x15e,_0x33cd37);}function _0x173f2b(_0x4a752a,_0x397781,_0x54d09f,_0x35e066){return _0x188d(_0x54d09f- -_0x44dfa6._0x1b33b3,_0x4a752a);}return _0x3f6328['map'](_0x4d458c=>{const _0x328389={_0x4010ae:0x4d2,_0x5a755b:0xb6,_0x120c44:0x14d};function _0x31a1a8(_0x3f43f0,_0x4a8ff5,_0x38afe4,_0x370103){return _0x3e6674(_0x3f43f0-_0x328389._0x4010ae,_0x4a8ff5-_0x328389._0x5a755b,_0x38afe4-_0x328389._0x120c44,_0x4a8ff5);}if(_0x4d458c[_0x31a1a8(_0x2d698d._0x53e5e9,0x52f,_0x2d698d._0x1cd355,_0x2d698d._0x3a4f08)]==='text')return normalizeTextBlock(_0x4d458c);return structuredClone(_0x4d458c);});}function normalizeSystem(_0x1834c0=[]){const _0x4c349a={_0x389052:0x2f};function _0x431eff(_0x1e8561,_0x56389c,_0x21e8c5,_0x41ed3b){return _0x188d(_0x1e8561-0x30,_0x56389c);}function _0x8a4ff0(_0x12a8be,_0x257a4b,_0x1231e0,_0x336797){return _0x188d(_0x1231e0-_0x4c349a._0x389052,_0x257a4b);}return normalizeContent(_0x1834c0)['filter'](_0x4dbd61=>_0x4dbd61[_0x431eff(0x202,0x20b,0x1e9,0x1ec)]===_0x431eff(0x1e5,0x1fc,0x1d8,0x1fe));}function normalizeMessage(_0x597bac){const _0x11f67e={_0x7392ba:0x1b4,_0x6dba0a:0x19a,_0x55480d:0x1a6,_0x38c80d:0x1bd,_0xf3beaa:0x1a9,_0x51af19:0x1a7},_0x4acea6={_0xd10885:0x368};function _0x41e0e7(_0x16c0c0,_0x2106ab,_0x1358da,_0x5b5b56){return _0x188d(_0x5b5b56- -0x375,_0x1358da);}function _0x76b360(_0x3fedfb,_0xa50401,_0x325681,_0x3e699e){return _0x188d(_0x3fedfb- -_0x4acea6._0xd10885,_0xa50401);}return{...typeof _0x597bac['id']===_0x41e0e7(-_0x11f67e._0x7392ba,-_0x11f67e._0x6dba0a,-0x193,-0x1a8)?{'id':_0x597bac['id']}:{},'role':_0x597bac['role'],'content':normalizeContent(_0x597bac[_0x76b360(-0x1bf,-0x1b0,-0x1b0,-0x1d9)]),..._0x597bac[_0x76b360(-0x1a9,-0x1c1,-_0x11f67e._0x55480d,-_0x11f67e._0x38c80d)]?{'providerState':structuredClone(_0x597bac[_0x76b360(-_0x11f67e._0xf3beaa,-0x198,-0x19b,-_0x11f67e._0x51af19)])}:{}};}function compileRequest(_0x41e433){const _0x269123={_0x2cc1d3:0x3c3,_0x1e7b2a:0x3d7,_0x200f13:0x3db,_0x43cb13:0x3c0,_0x118fa3:0x21c,_0x151dc7:0x1fd,_0x435b3f:0x3d1,_0x3ee6f9:0x3c4,_0x2fbfc9:0x3ae,_0x88b86e:0x3c8,_0x484eb4:0x3c8,_0x92965e:0x3ee,_0x37c4c8:0x3d4,_0x2bb0f1:0x3e6,_0x433c57:0x1f1,_0x75cb44:0x3e1,_0x195486:0x3fd},_0x45e303={_0x544f5b:0x3d6},_0x5b8428={_0x249d25:0x218};function _0x5d7b46(_0x2edbe7,_0x196622,_0x566292,_0x11adcc){return _0x188d(_0x196622-_0x5b8428._0x249d25,_0x566292);}function _0x4a7d1f(_0x1887cd,_0x296319,_0x455a5b,_0x2c9f4d){return _0x188d(_0x296319- -_0x45e303._0x544f5b,_0x455a5b);}return{'model':_0x41e433[_0x5d7b46(0x3c5,_0x269123._0x2cc1d3,0x3bb,0x3cc)]??'claude-sonnet-4-20250514','max_tokens':_0x41e433['max_tokens']??0x400,..._0x41e433[_0x5d7b46(_0x269123._0x1e7b2a,_0x269123._0x200f13,0x3bf,_0x269123._0x43cb13)]?{'reasoning':structuredClone(_0x41e433[_0x4a7d1f(-_0x269123._0x118fa3,-0x213,-_0x269123._0x151dc7,-0x219)])}:{},'system':normalizeSystem(_0x41e433[_0x5d7b46(_0x269123._0x435b3f,_0x269123._0x3ee6f9,_0x269123._0x2fbfc9,0x3aa)]),'messages':_0x41e433[_0x5d7b46(0x3e4,_0x269123._0x88b86e,_0x269123._0x200f13,_0x269123._0x484eb4)]['map'](normalizeMessage),'tools':structuredClone(_0x41e433[_0x5d7b46(_0x269123._0x92965e,0x3e8,_0x269123._0x37c4c8,_0x269123._0x2bb0f1)]??[]),'metadata':{'session_id':_0x41e433[_0x4a7d1f(-_0x269123._0x433c57,-0x1f9,-0x1ec,-0x1ea)],'turn_id':_0x41e433[_0x5d7b46(_0x269123._0x75cb44,0x3f4,_0x269123._0x195486,0x407)]}};}function toChatRequest(_0x1dd9b9){const _0x586957={_0x52dcc2:0x3ef,_0x52b930:0x3e1,_0x13840d:0x405,_0x59cfca:0x3d9,_0x59d7cf:0xc6,_0x43b1ca:0xba,_0xc03d23:0xcb,_0x5b239b:0xe0,_0x4120e7:0xba,_0x55c8d5:0xbb,_0x1efa53:0xcb,_0x2f61f3:0xb3,_0x15fe99:0xc7,_0x4c33a7:0xbe,_0x37a628:0x3fc,_0x306468:0x3e4,_0x36f40f:0x411,_0xc603ab:0x420,_0x119b41:0xd3,_0x153287:0xb7,_0x496742:0xc0};function _0x2b2312(_0x31b681,_0x275482,_0x1069f1,_0xeb6c87){return _0x188d(_0x275482- -0xf8,_0x31b681);}function _0x23848c(_0x1c3246,_0x4f65d5,_0x4ca2b4,_0x2c7c7d){return _0x188d(_0x1c3246-0x244,_0x4ca2b4);}return{'model':_0x1dd9b9[_0x23848c(_0x586957._0x52dcc2,_0x586957._0x52b930,_0x586957._0x13840d,_0x586957._0x59cfca)],'maxTokens':_0x1dd9b9[_0x2b2312(_0x586957._0x59d7cf,0xc3,_0x586957._0x43b1ca,0xc4)],..._0x1dd9b9[_0x2b2312(0xc5,_0x586957._0xc03d23,_0x586957._0x5b239b,_0x586957._0x4120e7)]?{'reasoning':structuredClone(_0x1dd9b9[_0x2b2312(_0x586957._0x55c8d5,_0x586957._0x1efa53,0xb9,_0x586957._0x2f61f3)])}:{},'system':structuredClone(_0x1dd9b9[_0x2b2312(_0x586957._0x15fe99,0xb4,0xd0,_0x586957._0x4c33a7)]),'messages':structuredClone(_0x1dd9b9[_0x23848c(0x3f4,0x3d9,_0x586957._0x37a628,_0x586957._0x306468)]),'tools':structuredClone(_0x1dd9b9[_0x23848c(0x414,_0x586957._0x36f40f,0x404,_0x586957._0xc603ab)]),'metadata':{'sessionId':_0x1dd9b9['metadata']['session_id'],'turnId':_0x1dd9b9['metadata'][_0x2b2312(_0x586957._0x119b41,_0x586957._0x153287,_0x586957._0x496742,0xcc)]}};}function toModelRequest(_0x215013){const _0x40a9fa={_0xb812c1:0x68,_0x3f467f:0x83,_0x22d228:0xa6,_0x16a075:0x8f,_0x4ca96e:0x7f,_0x36e63b:0x8e,_0x1f7e98:0x95,_0x26d45d:0x81,_0x4970ff:0x50,_0x251907:0x80,_0x28b9bd:0x79,_0x5f3735:0x96},_0x434fb3={_0x3ea9c5:0x146},_0x362555={_0x517b39:0x129};function _0x3fdc91(_0x54e41a,_0x1851e2,_0x5d26c4,_0x1a6120){return _0x188d(_0x54e41a- -_0x362555._0x517b39,_0x1a6120);}function _0x9f6c11(_0x570dd9,_0xabb057,_0x42a886,_0x25b787){return _0x188d(_0x42a886- -_0x434fb3._0x3ea9c5,_0x25b787);}return{'model':_0x215013[_0x9f6c11(0x6a,_0x40a9fa._0xb812c1,0x65,0x57)],'max_tokens':_0x215013[_0x9f6c11(0x78,_0x40a9fa._0x3f467f,0x6d,0x67)],..._0x215013[_0x3fdc91(0x9a,_0x40a9fa._0x22d228,0xa9,_0x40a9fa._0x16a075)]?{'reasoning':structuredClone(_0x215013[_0x3fdc91(0x9a,_0x40a9fa._0x4ca96e,_0x40a9fa._0x36e63b,0x80)])}:{},'system':structuredClone(_0x215013[_0x3fdc91(0x83,_0x40a9fa._0x3f467f,_0x40a9fa._0x1f7e98,_0x40a9fa._0x26d45d)]),'messages':structuredClone(_0x215013[_0x9f6c11(0x65,_0x40a9fa._0x4970ff,0x6a,_0x40a9fa._0x251907)]),'tools':structuredClone(_0x215013['tools']),'metadata':{'session_id':_0x215013['metadata']['sessionId'],'turn_id':_0x215013[_0x9f6c11(_0x40a9fa._0x28b9bd,_0x40a9fa._0x5f3735,0x95,0xaf)]['turnId']}};}function _0x544e(){const _0x7bf690=['AM9PBG','Dgv4Da','odG5oda4tvDIA2j0','C3rVCf9YzwfZB24','B3v0Chv0x3rVA2vUCW','mJqXmZC0mejHBuziyq','Dg9VBf91C2u','Bwf4x3rVA2vUCW','DhjPBq','kgvUy3j5ChrLzcbYzwfZB25PBMCP','DxnHz2u','ChjVDMLKzxjtDgf0zq','C3vTBwfYEq','y2fSBeLK','BwfW','CMvHC29UAw5N','zMLSDgvY','mtbkrK9ZD1m','mti5ntC1mffmr1DrAG','B3v0Chv0vg9Rzw5Z','C3rHDhvZ','CMvHC29UAw5Nx3rVA2vUCW','mJfTuerpreC','BwvZC2fNzq','C3rVCfjLyxnVBG','C3rYAw5N','yw50AhjVCgLJx3jLzgfJDgvKx3rOAw5RAw5N','yw50AhjVCgLJx3rOAw5RAw5N','Dg9VBhm','Aw5WDxrFDg9Rzw5Z','DhLWzq','nvHUyuH1vq','Dg9VBf9Yzxn1Bhq','nZyZmtG4zxnrshrs','yxnZAxn0yw50','mtCXmZK3mdv6rg9PwMK','DgHPBMTPBMC','mtbmww53tuO','mteXnJK4mtLiDxPQCgS','Bwv0ywrHDge','DhvYBKLK','C2vZC2LVBKLK','zxjYB3i','BgvUz3rO','y29UDgvUDa','AxnbCNjHEq','Bw9KzwW','C3LZDgvT','zw5JCNLWDgvKq29UDgvUDa','mtuYmJiWmeH4BNP0rq','DhvYBL9Pza','BwvZC2fNzxm','B3bLBMfPx3jLyxnVBMLUzW','CMvHC29UAw5Nvg9Rzw5Z','Bwf4vg9Rzw5Z'];_0x544e=function(){return _0x7bf690;};return _0x544e();}function toProviderModelRequest(_0x3436c5){const _0x5beec8={_0x11fd9c:0x23e,_0x4baa82:0x255,_0x205ca4:0x347,_0xbb74d3:0x341};function _0x41abca(_0x4244b4,_0x29203d,_0x352068,_0x458b6c){return _0x188d(_0x4244b4-0x97,_0x458b6c);}function _0x48f80e(_0x52f01e,_0x1eb176,_0x5efde6,_0x53f074){return _0x188d(_0x5efde6-0x186,_0x52f01e);}return{'model':_0x3436c5[_0x41abca(0x242,_0x5beec8._0x11fd9c,0x23b,_0x5beec8._0x4baa82)],'max_tokens':_0x3436c5['maxTokens'],'system':structuredClone(_0x3436c5['system']),'messages':structuredClone(_0x3436c5[_0x48f80e(_0x5beec8._0x205ca4,_0x5beec8._0xbb74d3,0x336,0x333)]),'tools':structuredClone(_0x3436c5[_0x41abca(0x267,0x26a,0x258,0x272)])};}function toChatResponse(_0x5161dc){const _0x4661aa={_0x20acc4:0x408,_0x13a127:0x3e6,_0x438fc0:0x3e2,_0x3bad77:0x126,_0x4f006d:0x12f,_0x2657ab:0x406,_0x4189f5:0x410,_0x23016f:0x3f8,_0x1a6525:0x423,_0x243652:0x437,_0x4200d3:0x135,_0x401003:0x13f,_0x13c49d:0x14c,_0x2a21e5:0x155,_0x22bb13:0x148,_0x3f098d:0x136,_0x341345:0x41b,_0x5af6fd:0x417,_0x9b55f7:0x402,_0x4def2e:0x41e,_0x129813:0x42c,_0x1974fc:0x411},_0x2916b8={_0x5c3cc2:0x252},_0x3c2dda={_0x3833e0:0x2f3};function _0x453186(_0x317bda,_0x24e469,_0x4fb96f,_0x1c1b95){return _0x188d(_0x24e469- -_0x3c2dda._0x3833e0,_0x4fb96f);}function _0x524d69(_0x2e8064,_0x314c5f,_0x46c349,_0x262818){return _0x188d(_0x314c5f-_0x2916b8._0x5c3cc2,_0x2e8064);}return{'id':_0x5161dc['id'],'content':structuredClone(_0x5161dc[_0x524d69(_0x4661aa._0x20acc4,0x3fb,_0x4661aa._0x13a127,_0x4661aa._0x438fc0)]),'stopReason':_0x5161dc[_0x453186(-0x12a,-0x13c,-_0x4661aa._0x3bad77,-_0x4661aa._0x4f006d)],'usage':{'inputTokens':_0x5161dc[_0x524d69(_0x4661aa._0x2657ab,_0x4661aa._0x4189f5,_0x4661aa._0x23016f,0x409)][_0x524d69(0x416,_0x4661aa._0x1a6525,0x436,_0x4661aa._0x243652)],'outputTokens':_0x5161dc[_0x453186(-0x130,-_0x4661aa._0x4200d3,-_0x4661aa._0x401003,-_0x4661aa._0x13c49d)][_0x453186(-_0x4661aa._0x2a21e5,-0x13b,-_0x4661aa._0x22bb13,-_0x4661aa._0x4f006d)],..._0x5161dc[_0x453186(-_0x4661aa._0x3f098d,-0x135,-0x129,-0x120)][_0x524d69(0x403,_0x4661aa._0x341345,0x40e,_0x4661aa._0x5af6fd)]!==void 0x0?{'reasoningTokens':_0x5161dc[_0x524d69(0x3f6,0x410,_0x4661aa._0x9b55f7,_0x4661aa._0x4def2e)]['reasoning_tokens']}:{}},..._0x5161dc['providerState']?{'providerState':structuredClone(_0x5161dc[_0x524d69(_0x4661aa._0x129813,_0x4661aa._0x1974fc,0x424,0x3f8)])}:{}};}function toModelResponse(_0x3e3c8f){const _0x5bbdb4={_0x360639:0x510,_0x544d2b:0x4fc,_0x5f3609:0x4f0,_0x4d26a8:0x2c5,_0x423c7d:0x2f5,_0x3af5e9:0x4d8,_0x20960a:0x4df,_0x25e30c:0x4da,_0x301deb:0x4c7,_0x3c76f5:0x2ca,_0x579387:0x2e5,_0x5c99d2:0x2d4,_0x3c3dc2:0x2b2,_0x3ccce2:0x2c2,_0x396f23:0x2c6,_0x4bffa5:0x2c8,_0xf6056a:0x2e6,_0x1d22a5:0x2d9,_0x1bfc20:0x2e8,_0x110be8:0x4ec,_0x254682:0x4f4,_0x220c96:0x4ef,_0x169a87:0x4ee,_0x4ccb24:0x4e1,_0x6c8ecd:0x4ff,_0x4445ae:0x4f0,_0x34a7e7:0x2c5,_0x4c4a73:0x2d5};function _0x5cac42(_0x4538f1,_0x267f99,_0x2e7d01,_0x3c9ba3){return _0x188d(_0x2e7d01-0x331,_0x267f99);}function _0x2856e9(_0xa229f,_0x5b1275,_0x4c91fa,_0x50c74f){return _0x188d(_0x4c91fa-0x108,_0x50c74f);}return{'id':_0x3e3c8f['id'],'type':_0x5cac42(0x4eb,_0x5bbdb4._0x360639,_0x5bbdb4._0x544d2b,_0x5bbdb4._0x5f3609),'role':_0x2856e9(0x2eb,_0x5bbdb4._0x4d26a8,0x2de,_0x5bbdb4._0x423c7d),'content':structuredClone(_0x3e3c8f[_0x5cac42(_0x5bbdb4._0x3af5e9,_0x5bbdb4._0x20960a,_0x5bbdb4._0x25e30c,_0x5bbdb4._0x301deb)]),'stop_reason':_0x3e3c8f[_0x2856e9(_0x5bbdb4._0x3c76f5,_0x5bbdb4._0x579387,_0x5bbdb4._0x5c99d2,0x2dc)],'stop_sequence':null,'usage':{'input_tokens':_0x3e3c8f['usage']['inputTokens'],'output_tokens':_0x3e3c8f[_0x2856e9(_0x5bbdb4._0x3c3dc2,_0x5bbdb4._0x3ccce2,_0x5bbdb4._0x396f23,_0x5bbdb4._0x4bffa5)][_0x2856e9(_0x5bbdb4._0xf6056a,_0x5bbdb4._0x1d22a5,0x2cf,_0x5bbdb4._0x1bfc20)],..._0x3e3c8f['usage']['reasoningTokens']!==void 0x0?{'reasoning_tokens':_0x3e3c8f[_0x5cac42(_0x5bbdb4._0x110be8,_0x5bbdb4._0x254682,_0x5bbdb4._0x220c96,0x4fb)][_0x5cac42(_0x5bbdb4._0x169a87,_0x5bbdb4._0x4ccb24,0x4e3,_0x5bbdb4._0x254682)]}:{}},..._0x3e3c8f[_0x5cac42(0x4f3,_0x5bbdb4._0x6c8ecd,_0x5bbdb4._0x4445ae,0x4ec)]?{'providerState':structuredClone(_0x3e3c8f[_0x2856e9(_0x5bbdb4._0x34a7e7,0x2c0,0x2c7,_0x5bbdb4._0x4c4a73)])}:{}};}function _0x188d(_0x4fae18,_0x4da065){_0x4fae18=_0x4fae18-0x1a7;const _0x544e76=_0x544e();let _0x188d18=_0x544e76[_0x4fae18];if(_0x188d['VNPbOk']===undefined){var _0x41603f=function(_0x5cf7f2){const _0x151964='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4ee91a='',_0x4000ea='';for(let _0x3f6328=0x0,_0x4d458c,_0x1834c0,_0x4dbd61=0x0;_0x1834c0=_0x5cf7f2['charAt'](_0x4dbd61++);~_0x1834c0&&(_0x4d458c=_0x3f6328%0x4?_0x4d458c*0x40+_0x1834c0:_0x1834c0,_0x3f6328++%0x4)?_0x4ee91a+=String['fromCharCode'](0xff&_0x4d458c>>(-0x2*_0x3f6328&0x6)):0x0){_0x1834c0=_0x151964['indexOf'](_0x1834c0);}for(let _0x597bac=0x0,_0x41e433=_0x4ee91a['length'];_0x597bac<_0x41e433;_0x597bac++){_0x4000ea+='%'+('00'+_0x4ee91a['charCodeAt'](_0x597bac)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4000ea);};_0x188d['cESYNx']=_0x41603f,_0x188d['KvoWhM']={},_0x188d['VNPbOk']=!![];}const _0x4cb136=_0x544e76[0x0],_0x1e2379=_0x4fae18+_0x4cb136,_0x18b685=_0x188d['KvoWhM'][_0x1e2379];return!_0x18b685?(_0x188d18=_0x188d['cESYNx'](_0x188d18),_0x188d['KvoWhM'][_0x1e2379]=_0x188d18):_0x188d18=_0x18b685,_0x188d18;}function responseToAssistantMessage(_0x55db10){const _0x463bd5={_0x1e0cee:0x169,_0x1af89f:0x13e,_0x590b2c:0x142,_0x1435fe:0x13,_0x412b89:0x2,_0xaa8eb7:0x46,_0x20e5a0:0x2e,_0x3d263a:0x2c};function _0x19ac47(_0x2e4022,_0x42036b,_0xccf8b2,_0x1a8185){return _0x188d(_0x42036b- -0x191,_0xccf8b2);}function _0x505b2c(_0x2a657f,_0x854336,_0x4c4e0b,_0x6b3811){return _0x188d(_0x6b3811- -0x87,_0x4c4e0b);}return{'role':_0x505b2c(_0x463bd5._0x1e0cee,_0x463bd5._0x1af89f,_0x463bd5._0x590b2c,0x14f),'content':normalizeContent(_0x55db10[_0x19ac47(_0x463bd5._0x1435fe,0x18,0x1,_0x463bd5._0x412b89)]),..._0x55db10[_0x19ac47(_0x463bd5._0xaa8eb7,_0x463bd5._0x20e5a0,0x45,_0x463bd5._0x3d263a)]?{'providerState':structuredClone(_0x55db10['providerState'])}:{}};}function createReasoningMessage(_0x1ebd02){const _0x50485c={_0x210b39:0x511,_0x3cb6d1:0x4e5,_0x51f521:0x516,_0x1ed4de:0x5,_0x5f23c1:0x26,_0x3f45a9:0x22},_0x5c845e={_0x5d9d15:0xcf,_0x141bee:0xce,_0x3aace6:0xeb,_0x1caeab:0xc5,_0x55bf29:0xc2,_0x381cd1:0xdc,_0x1cbe19:0x54c,_0x240fee:0x56a},_0x3ef823={_0x12a7a5:0x44d,_0x183f59:0x137};function _0x3b4634(_0x300ea9,_0x4adb7f,_0x21f1fa,_0x4ef821){return _0x188d(_0x4adb7f-0x357,_0x4ef821);}function _0x22f06c(_0x575968,_0x562a70,_0x206cfb,_0x121f56){return _0x188d(_0x562a70- -0x1cb,_0x575968);}const _0x32178c=normalizeContent(_0x1ebd02?.[_0x3b4634(_0x50485c._0x210b39,0x500,_0x50485c._0x3cb6d1,_0x50485c._0x51f521)])[_0x22f06c(-_0x50485c._0x1ed4de,-0x7,-0x5,-0xf)](_0x161a6d=>{const _0x94bf1d={_0x2e3be2:0x1b6};function _0x1055bd(_0x40340b,_0x565a6a,_0x1a53af,_0x27fb15){return _0x3b4634(_0x40340b-0x1ae,_0x27fb15- -_0x3ef823._0x12a7a5,_0x1a53af-_0x3ef823._0x183f59,_0x565a6a);}function _0x1e8fa1(_0x2171ac,_0xee547b,_0x59c5a2,_0x36fdde){return _0x22f06c(_0xee547b,_0x2171ac-0x57b,_0x59c5a2-_0x94bf1d._0x2e3be2,_0x36fdde-0xfd);}return _0x161a6d['type']===_0x1055bd(_0x5c845e._0x5d9d15,0xe6,0xdc,0xd8)||_0x161a6d['type']===_0x1055bd(_0x5c845e._0x141bee,_0x5c845e._0x3aace6,_0x5c845e._0x1caeab,0xd9)||_0x161a6d[_0x1055bd(_0x5c845e._0x55bf29,0xe5,0xde,_0x5c845e._0x381cd1)]===_0x1e8fa1(0x561,0x566,_0x5c845e._0x1cbe19,_0x5c845e._0x240fee);});if(_0x32178c[_0x22f06c(-_0x50485c._0x5f23c1,-0x23,-0x29,-_0x50485c._0x3f45a9)]===0x0)return void 0x0;return{'role':'assistant','content':_0x32178c};}function createAssistantTextMessage(_0x2471b6){const _0xef19f9={_0x10272c:0x400,_0x2035d9:0x54b},_0x219fa0={_0x2e263d:0x375},_0x22578f={_0x1d5e5e:0xfd,_0x1b6932:0x102,_0x58d23e:0xe5},_0xcb7ce1=normalizeContent(_0x2471b6?.[_0x39cab8(0x3de,0x3e4,0x3db,_0xef19f9._0x10272c)])['filter'](_0x477b8c=>{function _0x206b95(_0x323465,_0x393ece,_0x1688ac,_0x3a5977){return _0x39cab8(_0x323465-0x77,_0x393ece- -0x310,_0x323465,_0x3a5977-0x12b);}return _0x477b8c[_0x206b95(0x100,_0x22578f._0x1d5e5e,_0x22578f._0x1b6932,_0x22578f._0x58d23e)]==='text';});function _0xd7af2e(_0x23e896,_0x4c991f,_0x2f9e26,_0x1a3a5a){return _0x188d(_0x4c991f-_0x219fa0._0x2e263d,_0x2f9e26);}if(_0xcb7ce1['length']===0x0)return void 0x0;function _0x39cab8(_0x2f1793,_0xe06f0f,_0x55ffec,_0x7fb9e6){return _0x188d(_0xe06f0f-0x23b,_0x55ffec);}return{'role':_0xd7af2e(0x549,_0xef19f9._0x2035d9,0x531,0x540),'content':_0xcb7ce1};}function createToolUseMessage(_0x5c71ed){const _0x24f9e8={_0x698038:0x520,_0x4f365b:0x531,_0x2d028f:0x548,_0xdeba23:0x543,_0x43b52d:0x35,_0x188fd8:0x48,_0x34b964:0x70,_0x3b7943:0x6b},_0x5c4391={_0x5bdb0e:0x36d},_0x5ac25b={_0x5a3bec:0x49c,_0xfea889:0x48a,_0x517571:0x49e},_0x4a9560=normalizeContent(_0x5c71ed?.[_0x4803df(0x516,0x503,0x523,_0x24f9e8._0x698038)])[_0x4803df(_0x24f9e8._0x4f365b,_0x24f9e8._0x2d028f,0x53e,_0x24f9e8._0xdeba23)](_0x2088b3=>{const _0x4304b1={_0x2f09c9:0x1d4,_0x3b6b66:0xca};function _0x57cb86(_0x3f9e2c,_0x49d143,_0x5c346b,_0x574d72){return _0x17f022(_0x3f9e2c-_0x4304b1._0x2f09c9,_0x5c346b-0x43b,_0x5c346b-_0x4304b1._0x3b6b66,_0x49d143);}return _0x2088b3['type']===_0x57cb86(_0x5ac25b._0x5a3bec,0x470,_0x5ac25b._0xfea889,_0x5ac25b._0x517571);});if(_0x4a9560[_0x17f022(0x4f,0x3d,_0x24f9e8._0x43b52d,_0x24f9e8._0x188fd8)]===0x0)return void 0x0;function _0x17f022(_0x590819,_0x421821,_0x59507c,_0x32553b){return _0x188d(_0x421821- -0x16b,_0x32553b);}function _0x4803df(_0x64629d,_0x25b39b,_0x14035c,_0x146152){return _0x188d(_0x64629d-_0x5c4391._0x5bdb0e,_0x25b39b);}return{'role':_0x17f022(_0x24f9e8._0x34b964,_0x24f9e8._0x3b7943,0x76,0x6b),'content':_0x4a9560};}function getTextFromMessage(_0x478d27){const _0x3f27e3={_0x304456:0x5a6,_0x252b23:0x5a4,_0x4202e2:0x202,_0x32d56a:0x21e,_0x42e997:0x227,_0x1fcd42:0x1f4,_0x3c1284:0x210,_0x4ee3a9:0x226},_0x6a17c2={_0x3eb062:0x5c};function _0x3cc586(_0x2f5f64,_0x4809c2,_0x138aa8,_0x1e9715){return _0x188d(_0x1e9715-0x3e0,_0x4809c2);}function _0x47e4a1(_0x302574,_0x303287,_0x746362,_0x1be555){return _0x188d(_0x746362-_0x6a17c2._0x3eb062,_0x302574);}return normalizeContent(_0x478d27?.[_0x47e4a1(0x21c,0x210,0x205,0x210)])[_0x3cc586(0x5af,0x5ad,_0x3f27e3._0x304456,_0x3f27e3._0x252b23)](_0x23c646=>_0x23c646['type']===_0x47e4a1(0x224,0x207,0x211,0x211))[_0x47e4a1(0x214,_0x3f27e3._0x4202e2,_0x3f27e3._0x32d56a,_0x3f27e3._0x42e997)](_0x3620e3=>_0x3620e3['text'])[_0x47e4a1(0x20b,_0x3f27e3._0x1fcd42,_0x3f27e3._0x3c1284,_0x3f27e3._0x4ee3a9)]('\x0a');}function getReasoningTextFromMessage(_0x1783f6){const _0x2599c7={_0x33be79:0x3c1,_0x190ebd:0x3c7,_0x187c3b:0x3c0},_0x42ede7={_0x3383a7:0xa6,_0x3dd7b:0xb8,_0x24c073:0xac,_0x16a34c:0xc1,_0x50f519:0xbf,_0x26efa0:0xc6,_0x40c486:0xb2,_0x5aec3d:0xe3,_0x9c41e6:0xcf,_0x21a67:0xce,_0x1c54cb:0x1f0,_0xf94d5:0xbe,_0x43daea:0xc4,_0x5ea440:0xa9,_0x526694:0x9e,_0x20d494:0xb8,_0x226c96:0xf4,_0x445720:0xe6,_0x1f8fa7:0x1ea,_0x15235f:0x1dc,_0x523f67:0x1e5,_0xc81b29:0xd5,_0x1822cc:0xde,_0x4c6d2d:0xd2,_0x235a49:0x1ed,_0x491add:0x203,_0x5c76d7:0x1f0,_0x4f232a:0x1dc,_0x1ae50a:0x1f8,_0x358256:0x20f,_0x5a0738:0x1fd,_0x10905a:0xe7,_0x33d879:0xdd,_0x5c565a:0xd3},_0x4db2da={_0x1f7a26:0x20c};function _0x200192(_0x1e5b66,_0x45228b,_0x40a867,_0x52aa29){return _0x188d(_0x52aa29-_0x4db2da._0x1f7a26,_0x1e5b66);}return normalizeContent(_0x1783f6?.['content'])['flatMap'](_0x479ad6=>{function _0x4dc00d(_0x4f098a,_0x4426ea,_0x5a32c5,_0x4b831f){return _0x188d(_0x4b831f- -0x28a,_0x4f098a);}if(_0x479ad6[_0x4dc00d(-0xac,-0xa2,-_0x42ede7._0x3383a7,-_0x42ede7._0x3dd7b)]===_0x4dc00d(-0xd1,-_0x42ede7._0x24c073,-_0x42ede7._0x16a34c,-0xbb))return _0x479ad6[_0x4dc00d(-_0x42ede7._0x50f519,-_0x42ede7._0x3383a7,-_0x42ede7._0x26efa0,-_0x42ede7._0x40c486)][_0x4dc00d(-_0x42ede7._0x5aec3d,-0xb5,-_0x42ede7._0x9c41e6,-_0x42ede7._0x21a67)]()[_0x1a2be9(-0x1f4,-_0x42ede7._0x1c54cb,-0x1f4,-0x1fd)]>0x0?[_0x479ad6['thinking']]:[];if(_0x479ad6[_0x1a2be9(-0x1d0,-0x1ea,-0x1b7,-0x1d3)]===_0x4dc00d(-_0x42ede7._0xf94d5,-0xb8,-_0x42ede7._0x43daea,-0xbc))return['(redacted\x20reasoning)'];function _0x1a2be9(_0x44e7b1,_0x3e6451,_0x43484d,_0x98569b){return _0x188d(_0x98569b- -0x3a5,_0x44e7b1);}if(_0x479ad6[_0x4dc00d(-_0x42ede7._0x5ea440,-0x9d,-_0x42ede7._0x526694,-_0x42ede7._0x20d494)]!==_0x4dc00d(-_0x42ede7._0x226c96,-0xe7,-_0x42ede7._0x445720,-0xd9))return[];const _0x4ff9f7=_0x479ad6[_0x1a2be9(-_0x42ede7._0x1f8fa7,-_0x42ede7._0x15235f,-0x1ec,-_0x42ede7._0x523f67)]['map'](_0x53d25b=>_0x53d25b[_0x4dc00d(-0xc7,-0xef,-0xdd,-0xd5)])[_0x4dc00d(-0xcb,-0xd9,-_0x42ede7._0xc81b29,-_0x42ede7._0x26efa0)](_0x461343=>_0x461343[_0x1a2be9(-0x1d5,-0x1de,-0x1ed,-0x1e9)]()[_0x1a2be9(-0x1f8,-0x203,-0x1e6,-0x1fd)]>0x0)[_0x4dc00d(-_0x42ede7._0x1822cc,-_0x42ede7._0x4c6d2d,-0xf1,-0xd6)]('\x0a\x0a');if(_0x4ff9f7[_0x1a2be9(-0x1eb,-_0x42ede7._0x235a49,-0x20b,-0x1fd)]>0x0)return[_0x4ff9f7];if(_0x479ad6['text']&&_0x479ad6[_0x1a2be9(-_0x42ede7._0x491add,-0x1fd,-0x1e8,-_0x42ede7._0x5c76d7)][_0x1a2be9(-0x1e5,-0x1d4,-_0x42ede7._0x4f232a,-0x1e9)]()[_0x1a2be9(-_0x42ede7._0x1ae50a,-0x207,-_0x42ede7._0x358256,-_0x42ede7._0x5a0738)]>0x0)return[_0x479ad6['text']];return _0x479ad6[_0x4dc00d(-_0x42ede7._0x10905a,-0xf6,-_0x42ede7._0x33d879,-0xdd)]?[_0x4dc00d(-0xb7,-_0x42ede7._0x5c565a,-0xe4,-0xcd)]:[];})[_0x200192(0x3be,_0x2599c7._0x33be79,_0x2599c7._0x190ebd,_0x2599c7._0x187c3b)]('\x0a\x0a');}function getToolUseBlocks(_0x5a7ce1){const _0x1cf1bd={_0x4d8290:0x19e,_0x14d995:0x182},_0x50c203={_0x55ebea:0x3ac};function _0x4b8466(_0x35ef3d,_0x39258a,_0x553380,_0x52e39b){return _0x188d(_0x52e39b- -_0x50c203._0x55ebea,_0x35ef3d);}function _0x3dbfd3(_0x519d53,_0x1e6fb7,_0x260b71,_0x178c98){return _0x188d(_0x260b71- -0x3a,_0x178c98);}return normalizeContent(_0x5a7ce1?.['content'])[_0x3dbfd3(_0x1cf1bd._0x4d8290,0x170,0x18a,_0x1cf1bd._0x14d995)](_0x33f24a=>_0x33f24a[_0x4b8466(-0x1f1,-0x1f2,-0x1e4,-0x1da)]===_0x4b8466(-0x204,-0x209,-0x204,-0x1f2));}function getToolResultBlocks(_0x5cfc5c){const _0x38108f={_0x44e81c:0x391,_0x3f3b78:0x36c,_0x279e58:0x37f,_0x9eed45:0x133,_0x45f27f:0x114},_0x38f15a={_0x371bed:0x2e7},_0x8fb608={_0x53a354:0x1d6};function _0x30a0e9(_0x2fa8b0,_0x17e64c,_0x488d8b,_0x83b298){return _0x188d(_0x83b298-_0x8fb608._0x53a354,_0x488d8b);}function _0x3c509d(_0x43f593,_0x437296,_0x2e9215,_0x413e3c){return _0x188d(_0x43f593- -_0x38f15a._0x371bed,_0x413e3c);}return normalizeContent(_0x5cfc5c?.[_0x30a0e9(_0x38108f._0x44e81c,_0x38108f._0x3f3b78,0x37b,_0x38108f._0x279e58)])[_0x3c509d(-0x123,-0x10c,-_0x38108f._0x9eed45,-_0x38108f._0x45f27f)](_0x2aaacd=>_0x2aaacd[_0x30a0e9(0x39c,0x3a6,0x3a4,0x3a8)]==='tool_result');}function createToolResultUserMessage(_0x1c3b9e){const _0x198064={_0x42562c:0x2c,_0x509bcb:0x26,_0x557af9:0x37},_0x9ac7a7={_0x781334:0x15a,_0x462564:0x163,_0x325415:0x150,_0x4b2364:0x14e,_0xfa83d4:0x142,_0x452289:0x158,_0x918ae2:0x174,_0x5aca05:0x16e},_0x3f5e45={_0x54a4fb:0xcd,_0x12f769:0x15a,_0x51147f:0x16},_0x4db736={_0x17aab5:0x196};function _0x23997e(_0x1f7c5a,_0x37a7ad,_0x47c5f8,_0x4a0a6f){return _0x188d(_0x37a7ad- -_0x4db736._0x17aab5,_0x47c5f8);}return{'role':'user','content':_0x1c3b9e[_0x23997e(0x39,_0x198064._0x42562c,_0x198064._0x509bcb,_0x198064._0x557af9)](_0x12ca1b=>{const _0x571bcd={_0x14ac6e:0x19,_0x5bde73:0x125};function _0x5276aa(_0x11da68,_0xb78d38,_0xa9eea7,_0xdc679e){return _0x23997e(_0x11da68-_0x571bcd._0x14ac6e,_0xb78d38-_0x571bcd._0x5bde73,_0x11da68,_0xdc679e-0x13a);}function _0x4993a1(_0x47b9d4,_0x1f86ca,_0x4a3d3d,_0x4d596c){return _0x23997e(_0x47b9d4-_0x3f5e45._0x54a4fb,_0x4d596c-_0x3f5e45._0x12f769,_0x1f86ca,_0x4d596c-_0x3f5e45._0x51147f);}return{'type':_0x5276aa(_0x9ac7a7._0x781334,_0x9ac7a7._0x462564,0x159,0x16a),'tool_use_id':_0x12ca1b[_0x5276aa(0x141,_0x9ac7a7._0x325415,_0x9ac7a7._0x4b2364,0x150)],'content':_0x12ca1b['content']??_0x12ca1b['output'],'is_error':_0x12ca1b[_0x5276aa(_0x9ac7a7._0xfa83d4,0x157,0x153,_0x9ac7a7._0x452289)]===_0x4993a1(0x168,_0x9ac7a7._0x918ae2,_0x9ac7a7._0x5aca05,0x16b)};})};}export{createTextBlock,normalizeTextBlock,normalizeContent,normalizeSystem,normalizeMessage,compileRequest,toChatRequest,toModelRequest,toProviderModelRequest,toChatResponse,toModelResponse,responseToAssistantMessage,createReasoningMessage,createAssistantTextMessage,createToolUseMessage,getTextFromMessage,getReasoningTextFromMessage,getToolUseBlocks,getToolResultBlocks,createToolResultUserMessage};
|
package/dist/chunk-NYZR4XKO.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4c0da7,_0x5f2623){var _0x516a0e={_0x344212:0x20,_0x5dddeb:0x21,_0x42a9f9:0x26,_0x215c03:0x1f,_0xe46c76:0xad,_0x5abce4:0xad,_0x39ac3b:0xb3,_0x1c627e:0x21,_0x3afcfd:0x19,_0x34a4d1:0x21,_0x580916:0x1d,_0x529c6:0x14,_0x424623:0x1b,_0x1ad60a:0x24,_0x2e3e90:0x23,_0x159f52:0x24,_0x126212:0x15},_0x11ea8b={_0x2be722:0x47};function _0x6b50c0(_0x5ac4f1,_0x5bbe66,_0x4a5671,_0x42a991){return _0x17ed(_0x4a5671- -0xd1,_0x5ac4f1);}function _0x3e55c1(_0x3be3a6,_0x2e927c,_0x11192e,_0x3fbcfd){return _0x17ed(_0x3be3a6- -_0x11ea8b._0x2be722,_0x11192e);}var _0x3674ef=_0x4c0da7();while(!![]){try{var _0x560c9c=parseInt(_0x6b50c0(_0x516a0e._0x344212,0x27,0x26,0x21))/0x1+parseInt(_0x6b50c0(0x1a,0x1d,_0x516a0e._0x5dddeb,_0x516a0e._0x42a9f9))/0x2*(parseInt(_0x6b50c0(0x23,0x21,_0x516a0e._0x215c03,0x18))/0x3)+-parseInt(_0x3e55c1(0xa8,0xa2,_0x516a0e._0xe46c76,0xa7))/0x4+-parseInt(_0x3e55c1(_0x516a0e._0x5abce4,_0x516a0e._0x39ac3b,0xa7,0xaa))/0x5+-parseInt(_0x6b50c0(0x18,_0x516a0e._0x1c627e,_0x516a0e._0x3afcfd,_0x516a0e._0x34a4d1))/0x6*(-parseInt(_0x6b50c0(_0x516a0e._0x580916,_0x516a0e._0x529c6,_0x516a0e._0x424623,0x17))/0x7)+-parseInt(_0x6b50c0(0x25,_0x516a0e._0x1ad60a,0x1d,_0x516a0e._0x2e3e90))/0x8*(-parseInt(_0x6b50c0(0x25,0x2c,0x24,_0x516a0e._0x159f52))/0x9)+-parseInt(_0x6b50c0(0x1b,0x12,0x17,0x16))/0xa*(parseInt(_0x6b50c0(0x1f,_0x516a0e._0x126212,0x1c,_0x516a0e._0x424623))/0xb);if(_0x560c9c===_0x5f2623)break;else _0x3674ef['push'](_0x3674ef['shift']());}catch(_0x3f261a){_0x3674ef['push'](_0x3674ef['shift']());}}}(_0x2d79,0x9f6ad));var ANTHROPIC_AUTO_BUDGET_TOKENS={'low':0x400,'medium':0x800,'high':0x1000};function _0x17ed(_0x15591e,_0x3ff9de){_0x15591e=_0x15591e-0xe8;var _0x2d798e=_0x2d79();var _0x17ed2d=_0x2d798e[_0x15591e];if(_0x17ed['VYahNT']===undefined){var _0x388680=function(_0x1fb24e){var _0x561401='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x3057c7='',_0x266fff='';for(var _0x28941e=0x0,_0x18543b,_0x3a994a,_0x475f3a=0x0;_0x3a994a=_0x1fb24e['charAt'](_0x475f3a++);~_0x3a994a&&(_0x18543b=_0x28941e%0x4?_0x18543b*0x40+_0x3a994a:_0x3a994a,_0x28941e++%0x4)?_0x3057c7+=String['fromCharCode'](0xff&_0x18543b>>(-0x2*_0x28941e&0x6)):0x0){_0x3a994a=_0x561401['indexOf'](_0x3a994a);}for(var _0x4d8fbd=0x0,_0x24a774=_0x3057c7['length'];_0x4d8fbd<_0x24a774;_0x4d8fbd++){_0x266fff+='%'+('00'+_0x3057c7['charCodeAt'](_0x4d8fbd)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x266fff);};_0x17ed['InCqYL']=_0x388680,_0x17ed['BfKBWF']={},_0x17ed['VYahNT']=!![];}var _0x45ab2e=_0x2d798e[0x0],_0x199b1b=_0x15591e+_0x45ab2e,_0x97d61d=_0x17ed['BfKBWF'][_0x199b1b];return!_0x97d61d?(_0x17ed2d=_0x17ed['InCqYL'](_0x17ed2d),_0x17ed['BfKBWF'][_0x199b1b]=_0x17ed2d):_0x17ed2d=_0x97d61d,_0x17ed2d;}function _0x2d79(){var _0x4b2a8c=['mtm0oty1nLrvyNrJvG','mtiWodK0nfjwCMHuDG','mtC5n0H0Cez5DW','B3bLBMfP','mJCZmLL5AgHJwa','yw50AhjVCgLJ','mJqXmJKYmg12t1fuBq','ntrnuMDvBvC','yxv0BW','nJq4nZaXDvntwNrJ','nZKWyLLeDfnR','zw5HyMXLza','mty2nJjpEuHru3K','zwzMB3j0','mtm3ou1Ytw1sCa','mJiXmtC3qK1KBhHY'];_0x2d79=function(){return _0x4b2a8c;};return _0x2d79();}function mapAutoReasoningEffortToBudgetTokens(_0x3057c7){return ANTHROPIC_AUTO_BUDGET_TOKENS[_0x3057c7];}function resolveAnthropicThinkingConfig(_0x266fff){var _0x2765f4={_0x2f82f4:0x25,_0x5b50e2:0x2a,_0x288102:0x22,_0x441304:0x2d,_0xb60d21:0x2f,_0x4da581:0x31,_0x5b5ead:0x2d,_0x200e4d:0x1b,_0x1d3305:0x27,_0xe3f360:0x2e,_0x3b667f:0x2d,_0x438420:0x29,_0x51bff5:0x1d,_0x368176:0x26,_0x1aac7f:0x22};function _0x25a1c6(_0x3182b7,_0x2e500e,_0x51551f,_0x1895dd){return _0x17ed(_0x1895dd- -0x2af,_0x2e500e);}function _0x4c7874(_0x37deaa,_0x3027ab,_0x4b22ac,_0x15fc5f){return _0x17ed(_0x4b22ac- -0xc9,_0x37deaa);}if(!_0x266fff)return void 0x0;if(_0x266fff[_0x4c7874(0x32,_0x2765f4._0x2f82f4,_0x2765f4._0x5b50e2,_0x2765f4._0x288102)])return structuredClone(_0x266fff[_0x4c7874(0x2c,0x32,0x2a,_0x2765f4._0x441304)]);if(!_0x266fff[_0x4c7874(_0x2765f4._0xb60d21,_0x2765f4._0x4da581,_0x2765f4._0x5b5ead,0x31)])return void 0x0;return{'type':_0x4c7874(0x25,_0x2765f4._0x200e4d,0x20,_0x2765f4._0x1d3305),'budgetTokens':mapAutoReasoningEffortToBudgetTokens(_0x266fff[_0x4c7874(_0x2765f4._0xe3f360,0x30,_0x2765f4._0x3b667f,_0x2765f4._0x438420)][_0x4c7874(_0x2765f4._0x51bff5,_0x2765f4._0x368176,_0x2765f4._0x1aac7f,0x27)])};}function resolveOpenAiReasoningConfig(_0x28941e){var _0x3598ac={_0x590fdd:0x16a,_0x12316a:0x478,_0x1f21cb:0x479,_0x14055d:0x17c,_0x169874:0x176,_0x42f887:0x175,_0xdac5e2:0x474,_0x4b3eed:0x46c,_0x37f968:0x46f,_0x3ca208:0x46c,_0x1207dd:0x474,_0x3fbb9e:0x472},_0x58fa31={_0x4ac61c:0x267},_0x29de38={_0x1bccf9:0x383};if(!_0x28941e)return void 0x0;const _0x18543b=_0x28941e[_0x1c3747(-0x171,-0x16e,-_0x3598ac._0x590fdd,-0x174)]?{'effort':_0x28941e[_0x544b6d(0x479,0x47c,_0x3598ac._0x12316a,_0x3598ac._0x1f21cb)][_0x1c3747(-_0x3598ac._0x14055d,-0x17f,-_0x3598ac._0x169874,-_0x3598ac._0x42f887)]}:void 0x0;function _0x544b6d(_0x1e7409,_0x49dafa,_0x7f45f6,_0x339daf){return _0x17ed(_0x1e7409-_0x29de38._0x1bccf9,_0x49dafa);}function _0x1c3747(_0x32868d,_0x5b457e,_0xaf8739,_0x52877b){return _0x17ed(_0x32868d- -_0x58fa31._0x4ac61c,_0x5b457e);}if(!_0x28941e[_0x544b6d(_0x3598ac._0xdac5e2,_0x3598ac._0x4b3eed,_0x3598ac._0x37f968,_0x3598ac._0x3ca208)])return _0x18543b;return{..._0x18543b??{},...structuredClone(_0x28941e[_0x544b6d(_0x3598ac._0x1207dd,0x471,_0x3598ac._0x3fbb9e,_0x3598ac._0xdac5e2)])};}export{mapAutoReasoningEffortToBudgetTokens,resolveAnthropicThinkingConfig,resolveOpenAiReasoningConfig};
|