@nuvin/agent-core 0.0.0-rc.0 → 0.0.0-rc.2

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/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2025 Marsch Huynh
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/dist/VERSION CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "version": "0.0.0-rc.0",
3
- "commit": "73762ef"
2
+ "version": "0.0.0-rc.2",
3
+ "commit": "0ec77b2"
4
4
  }
@@ -1,14 +1,25 @@
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-BueDJWnx.js';
2
- export { d as TurnState } from '../types-BueDJWnx.js';
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-QPBW5jHO.js';
2
+ export { d as TurnState } from '../types-QPBW5jHO.js';
3
3
 
4
4
  declare class Agent {
5
5
  readonly deps: RunTurnDeps;
6
6
  readonly sessionId: string;
7
- readonly systemPrompt: string;
7
+ private _systemPrompt;
8
8
  messages: Message[];
9
9
  readonly defaultMessage?: Message;
10
10
  turnIndex: number;
11
11
  constructor(options?: AgentOptions);
12
+ get systemPrompt(): string;
13
+ setTools(tools?: AgentOptions["tools"]): void;
14
+ setSystemPrompt(systemPrompt: string, options?: {
15
+ resetMessages?: boolean;
16
+ }): void;
17
+ /**
18
+ * Replace the chat model used for subsequent turns. Existing conversation
19
+ * state is preserved; the next call to {@link send} uses the new model.
20
+ * Useful for runtime model switching (e.g. via a `/model` slash command).
21
+ */
22
+ setChatModel(chatModel: RunTurnDeps["chatModel"]): void;
12
23
  send(input?: AgentInput | undefined, options?: AgentSendOptions): Promise<TurnResult>;
13
24
  }
14
25
 
@@ -1 +1 @@
1
- (function(_0x34c93a,_0x3d2ca1){var _0x352734={_0x5b602d:0x16d,_0x48c695:0x16e,_0x4be499:0x168,_0x5197f9:0xfc,_0x4228e9:0xf8,_0xea7db6:0x173,_0x432996:0x16e,_0x4fb2c3:0x16f,_0x416a4f:0x170,_0xd489ce:0x171,_0x2729fc:0x172,_0x1ec9f7:0xfa,_0x19a4fe:0xf9,_0x4c6c50:0xf9,_0x2b0a36:0xfd,_0x10452b:0xf2,_0x5c84ff:0xf6,_0x1199fc:0x16a,_0x2c196c:0x170,_0x22c8fe:0x16b,_0x227d1c:0x104,_0x276ac1:0xfe,_0x2519c5:0x167,_0x355a9d:0x16c},_0xaebc43={_0x50dd40:0x7e},_0x169f6a=_0x34c93a();function _0x50f644(_0xeb3187,_0x1a3cb6,_0x1dfe88,_0x4c8b21){return _0x1089(_0x1a3cb6- -_0xaebc43._0x50dd40,_0x1dfe88);}function _0x3d6e09(_0x5de20a,_0x431d38,_0x295ceb,_0x188d77){return _0x1089(_0x431d38- -0xed,_0x295ceb);}while(!![]){try{var _0x14aa6d=parseInt(_0x50f644(_0x352734._0x5b602d,0x169,0x163,_0x352734._0x48c695))/0x1*(parseInt(_0x50f644(0x16e,0x16d,_0x352734._0x4be499,0x167))/0x2)+-parseInt(_0x3d6e09(0x102,0x100,0x103,0x105))/0x3+-parseInt(_0x3d6e09(_0x352734._0x5197f9,_0x352734._0x4228e9,0xf8,0xfd))/0x4*(-parseInt(_0x50f644(_0x352734._0xea7db6,_0x352734._0x432996,_0x352734._0xea7db6,_0x352734._0x4fb2c3))/0x5)+-parseInt(_0x50f644(_0x352734._0x48c695,_0x352734._0x416a4f,_0x352734._0xd489ce,_0x352734._0x2729fc))/0x6*(parseInt(_0x3d6e09(_0x352734._0x1ec9f7,_0x352734._0x19a4fe,_0x352734._0x4c6c50,_0x352734._0x2b0a36))/0x7)+-parseInt(_0x3d6e09(0xf4,0xf7,_0x352734._0x10452b,_0x352734._0x5c84ff))/0x8+parseInt(_0x50f644(_0x352734._0x4fb2c3,_0x352734._0x1199fc,_0x352734._0x2c196c,_0x352734._0x48c695))/0x9*(parseInt(_0x50f644(0x16c,_0x352734._0x22c8fe,0x16d,0x16a))/0xa)+parseInt(_0x3d6e09(_0x352734._0x227d1c,0x102,_0x352734._0x276ac1,0x105))/0xb*(parseInt(_0x50f644(_0x352734._0x2519c5,_0x352734._0x355a9d,0x172,_0x352734._0xd489ce))/0xc);if(_0x14aa6d===_0x3d2ca1)break;else _0x169f6a['push'](_0x169f6a['shift']());}catch(_0x538147){_0x169f6a['push'](_0x169f6a['shift']());}}}(_0x5931,0xdfe93));function _0x1089(_0x4314ee,_0x1f4b63){_0x4314ee=_0x4314ee-0x1e4;var _0x59312c=_0x5931();var _0x1089da=_0x59312c[_0x4314ee];if(_0x1089['YfOpxX']===undefined){var _0x47907e=function(_0x1d16bd){var _0x24cb95='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x569684='',_0x57553e='';for(var _0x1ece4a=0x0,_0x3b1af4,_0x4e408c,_0x2bad62=0x0;_0x4e408c=_0x1d16bd['charAt'](_0x2bad62++);~_0x4e408c&&(_0x3b1af4=_0x1ece4a%0x4?_0x3b1af4*0x40+_0x4e408c:_0x4e408c,_0x1ece4a++%0x4)?_0x569684+=String['fromCharCode'](0xff&_0x3b1af4>>(-0x2*_0x1ece4a&0x6)):0x0){_0x4e408c=_0x24cb95['indexOf'](_0x4e408c);}for(var _0x321e17=0x0,_0x34c22f=_0x569684['length'];_0x321e17<_0x34c22f;_0x321e17++){_0x57553e+='%'+('00'+_0x569684['charCodeAt'](_0x321e17)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x57553e);};_0x1089['hZTfOR']=_0x47907e,_0x1089['xTWokH']={},_0x1089['YfOpxX']=!![];}var _0x4c70e5=_0x59312c[0x0],_0x388714=_0x4314ee+_0x4c70e5,_0xdb99e7=_0x1089['xTWokH'][_0x388714];return!_0xdb99e7?(_0x1089da=_0x1089['hZTfOR'](_0x1089da),_0x1089['xTWokH'][_0x388714]=_0x1089da):_0x1089da=_0xdb99e7,_0x1089da;}function _0x5931(){var _0x278e21=['mtqXmti3ofPnvMz6sW','mJCZmZvvEMDIvva','mtiZnduZnNbhAuPIrW','mtC1nJG4neHMDwTfqG','ndLwBKnnrvC','mJe3odGZCgjNteXs','otbjz3zurg4','otm0ntbIzgfytLq','nJmYne1XtLfArq','mtrPyuf0sg8','nuvzswLzsG','mtK0oduWmfbxzKzjCq'];_0x5931=function(){return _0x278e21;};return _0x5931();}import{Agent,createExtensionRegistry,runTurn}from'../chunk-EJTTW4JQ.js';import'../chunk-C6OLKGP6.js';import'../chunk-X7VAACWY.js';export{Agent,createExtensionRegistry,runTurn};
1
+ (function(_0x2fcc78,_0x4735f8){var _0x1d6329={_0x2e3f3f:0x165,_0x31217f:0x15f,_0x118731:0x15c,_0x3074ce:0x35c,_0xcd5cca:0x35d,_0x197242:0x35a,_0x1fc663:0x354,_0x294668:0x354,_0xe832a2:0x352,_0x154e45:0x161,_0x187607:0x163,_0x19f4da:0x357,_0x499025:0x162,_0x31bdcf:0x160},_0x4c56b9={_0x3172e4:0x22d},_0x2b87bd={_0x38e309:0x35},_0x474d56=_0x2fcc78();function _0xd7c729(_0xb6e8db,_0x149e39,_0xbfd5d5,_0x2a481d){return _0x1142(_0x149e39-_0x2b87bd._0x38e309,_0xbfd5d5);}function _0x13e511(_0x3c859a,_0x5c3672,_0x3b80f9,_0x3974f6){return _0x1142(_0x3974f6-_0x4c56b9._0x3172e4,_0x3b80f9);}while(!![]){try{var _0x230431=parseInt(_0xd7c729(0x161,0x161,_0x1d6329._0x2e3f3f,0x163))/0x1+-parseInt(_0xd7c729(0x15d,_0x1d6329._0x31217f,_0x1d6329._0x118731,0x15c))/0x2*(-parseInt(_0x13e511(_0x1d6329._0x3074ce,_0x1d6329._0xcd5cca,0x359,_0x1d6329._0x197242))/0x3)+-parseInt(_0x13e511(_0x1d6329._0x1fc663,_0x1d6329._0x294668,_0x1d6329._0xe832a2,0x354))/0x4+parseInt(_0xd7c729(0x159,0x15d,0x160,_0x1d6329._0x154e45))/0x5+-parseInt(_0xd7c729(_0x1d6329._0x187607,0x163,0x15f,0x163))/0x6+parseInt(_0x13e511(_0x1d6329._0x294668,_0x1d6329._0x19f4da,0x35c,0x358))/0x7+parseInt(_0xd7c729(_0x1d6329._0x499025,0x15e,_0x1d6329._0x31bdcf,_0x1d6329._0x31bdcf))/0x8;if(_0x230431===_0x4735f8)break;else _0x474d56['push'](_0x474d56['shift']());}catch(_0x1b58cb){_0x474d56['push'](_0x474d56['shift']());}}}(_0x2562,0x9e513));import{Agent,createExtensionRegistry,runTurn}from'../chunk-VFTQW5WK.js';import'../chunk-G2FR4UGO.js';function _0x2562(){var _0x2a1c3c=['ntiZodC5uffzvNrq','m3PtAhneBa','ndGYodeXmez0zeTmtq','mJCXmtGWnerhzvf5Cq','mti3nJyXnuPJELnmvq','nJiZnJu2v1vyq2rt','mte4mJeXme9nC25huG','ndC4mdiYm0X5CLbRuq'];_0x2562=function(){return _0x2a1c3c;};return _0x2562();}import'../chunk-X7VAACWY.js';function _0x1142(_0x281374,_0x1f94dc){_0x281374=_0x281374-0x127;var _0x25626c=_0x2562();var _0x1142ef=_0x25626c[_0x281374];if(_0x1142['sCZPbE']===undefined){var _0x30f7fd=function(_0x2a45a3){var _0x1a96a3='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x3a1f14='',_0x42f2a0='';for(var _0x456ad4=0x0,_0x16c3de,_0x39132b,_0x121b23=0x0;_0x39132b=_0x2a45a3['charAt'](_0x121b23++);~_0x39132b&&(_0x16c3de=_0x456ad4%0x4?_0x16c3de*0x40+_0x39132b:_0x39132b,_0x456ad4++%0x4)?_0x3a1f14+=String['fromCharCode'](0xff&_0x16c3de>>(-0x2*_0x456ad4&0x6)):0x0){_0x39132b=_0x1a96a3['indexOf'](_0x39132b);}for(var _0x48cb1c=0x0,_0xf50eda=_0x3a1f14['length'];_0x48cb1c<_0xf50eda;_0x48cb1c++){_0x42f2a0+='%'+('00'+_0x3a1f14['charCodeAt'](_0x48cb1c)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x42f2a0);};_0x1142['echOgx']=_0x30f7fd,_0x1142['OvrIsg']={},_0x1142['sCZPbE']=!![];}var _0x34a016=_0x25626c[0x0],_0xc1fe58=_0x281374+_0x34a016,_0x5a4de7=_0x1142['OvrIsg'][_0xc1fe58];return!_0x5a4de7?(_0x1142ef=_0x1142['echOgx'](_0x1142ef),_0x1142['OvrIsg'][_0xc1fe58]=_0x1142ef):_0x1142ef=_0x5a4de7,_0x1142ef;}export{Agent,createExtensionRegistry,runTurn};
@@ -0,0 +1 @@
1
+ (function(_0x2f0c6d,_0xa699fe){const _0x1d56cb={_0xb2ee84:0x108,_0x5950f5:0xf0,_0x56956d:0xed,_0x224e1a:0xd4,_0x2984ce:0xd7,_0x1c757c:0xe2,_0x389405:0xfe,_0x187dcb:0xe8,_0x5dabe4:0xec,_0x54c074:0xea,_0x197b37:0xea,_0x1f4faa:0x4d5,_0x3f34b4:0x4b8,_0x501b3a:0x119,_0x58246c:0xfe,_0x1e0f94:0x4d9,_0x451868:0x4e1,_0x1eb413:0x4dc,_0x99c96:0x4bd},_0x42d5dd={_0xd6632c:0x325},_0x1bfcef=_0x2f0c6d();function _0x3478ec(_0x234ba7,_0x503779,_0x5307b3,_0x74c3b8){return _0x8ee9(_0x74c3b8-_0x42d5dd._0xd6632c,_0x5307b3);}function _0xc5088e(_0x2d0a9a,_0x1834de,_0x1011cc,_0x25555e){return _0x8ee9(_0x25555e- -0x29e,_0x1834de);}while(!![]){try{const _0x5445a0=-parseInt(_0xc5088e(-0xe6,-_0x1d56cb._0xb2ee84,-_0x1d56cb._0x5950f5,-0xef))/0x1+-parseInt(_0xc5088e(-0xd8,-0xea,-0xe1,-0xe6))/0x2*(-parseInt(_0xc5088e(-_0x1d56cb._0x56956d,-_0x1d56cb._0x224e1a,-0xc7,-0xe3))/0x3)+-parseInt(_0xc5088e(-_0x1d56cb._0x2984ce,-_0x1d56cb._0x1c757c,-0xde,-0xd8))/0x4+parseInt(_0xc5088e(-_0x1d56cb._0x389405,-0xdd,-_0x1d56cb._0x187dcb,-_0x1d56cb._0x5dabe4))/0x5*(-parseInt(_0xc5088e(-0x100,-0xd4,-0xeb,-0xe7))/0x6)+-parseInt(_0xc5088e(-_0x1d56cb._0x187dcb,-_0x1d56cb._0x5950f5,-_0x1d56cb._0x54c074,-_0x1d56cb._0x197b37))/0x7*(parseInt(_0x3478ec(_0x1d56cb._0x1f4faa,0x4bd,_0x1d56cb._0x3f34b4,0x4c9))/0x8)+-parseInt(_0xc5088e(-0x125,-_0x1d56cb._0x501b3a,-_0x1d56cb._0x58246c,-0x109))/0x9+parseInt(_0x3478ec(0x4cb,0x4fc,_0x1d56cb._0x1e0f94,_0x1d56cb._0x451868))/0xa*(parseInt(_0x3478ec(0x4b9,_0x1d56cb._0x1eb413,_0x1d56cb._0x99c96,0x4c5))/0xb);if(_0x5445a0===_0xa699fe)break;else _0x1bfcef['push'](_0x1bfcef['shift']());}catch(_0x99fe63){_0x1bfcef['push'](_0x1bfcef['shift']());}}}(_0x2c69,0x3d086));function createTextBlock(_0x1427c4){return{'type':'text','text':_0x1427c4};}function normalizeTextBlock(_0x1242db){const _0x194b48={_0x3746aa:0x1a1},_0x5a628d={_0x2cbd69:0x4};function _0x4704e9(_0xec108e,_0x1a4fe0,_0x2df325,_0xf52649){return _0x8ee9(_0x1a4fe0- -_0x5a628d._0x2cbd69,_0x2df325);}return createTextBlock(_0x1242db[_0x4704e9(0x17d,0x197,_0x194b48._0x3746aa,0x19c)]??'');}function normalizeContent(_0x1810a7){const _0x48869c={_0x5b15f2:0x343,_0x3adba9:0x360,_0x225acf:0x35b},_0x2e400b={_0x18e0ce:0x2b7,_0x51ab16:0x2b1,_0x42cbb9:0x464,_0x13f7b4:0x475,_0x4af765:0x45f},_0x594e64={_0x1cc301:0x1f4},_0x2529ac={_0xdb507d:0x112};function _0x2e9e51(_0x16b4ca,_0x34841d,_0x31efa2,_0x29b877){return _0x8ee9(_0x31efa2- -_0x2529ac._0xdb507d,_0x16b4ca);}function _0x197e1e(_0x5a69aa,_0x388694,_0x4593cc,_0x175f48){return _0x8ee9(_0x4593cc-0x1c2,_0x5a69aa);}if(typeof _0x1810a7==='string')return[createTextBlock(_0x1810a7)];if(!Array[_0x197e1e(_0x48869c._0x5b15f2,0x36f,0x358,0x342)](_0x1810a7))return[];return _0x1810a7[_0x197e1e(_0x48869c._0x3adba9,0x375,_0x48869c._0x225acf,0x367)](_0x26bc3c=>{const _0x4f72b9={_0xee52f7:0x107};function _0x2d644b(_0x432bbd,_0x46ebf0,_0x13f0b1,_0x54b3cb){return _0x2e9e51(_0x432bbd,_0x46ebf0-0x1cd,_0x54b3cb-_0x594e64._0x1cc301,_0x54b3cb-0x101);}function _0x330b02(_0x1fd33e,_0x68a627,_0x18c889,_0x14fab9){return _0x197e1e(_0x1fd33e,_0x68a627-0x1bc,_0x68a627-_0x4f72b9._0xee52f7,_0x14fab9-0xf7);}if(_0x26bc3c[_0x2d644b(_0x2e400b._0x18e0ce,0x2b3,_0x2e400b._0x51ab16,0x29b)]===_0x330b02(0x47d,_0x2e400b._0x42cbb9,_0x2e400b._0x13f7b4,_0x2e400b._0x4af765))return normalizeTextBlock(_0x26bc3c);return structuredClone(_0x26bc3c);});}function normalizeSystem(_0x7da41a=[]){const _0x345cc8={_0x508a51:0xc4};function _0x1db72b(_0x24e751,_0x2e6c84,_0xc4c07b,_0x48e915){return _0x8ee9(_0x2e6c84- -0x10c,_0x48e915);}return normalizeContent(_0x7da41a)[_0x1db72b(0xcb,0xb7,_0x345cc8._0x508a51,0xa1)](_0x586f2e=>_0x586f2e['type']==='text');}function normalizeMessage(_0x3695b8){const _0x2fd94c={_0x360a73:0x103,_0x33ccb3:0xef,_0xf77c31:0x102,_0x42188d:0x15c,_0x26c2da:0x168,_0xb9ff6:0x153,_0xad1c58:0x158,_0x2a324e:0x138,_0xcdd6b4:0x12d},_0x3607c0={_0x1b5f58:0x58};function _0x21a73d(_0x60cda7,_0x1ecacc,_0xf020e5,_0x29554f){return _0x8ee9(_0xf020e5- -_0x3607c0._0x1b5f58,_0x1ecacc);}function _0x392f9f(_0x5125c2,_0x2adf2c,_0xa7c60b,_0x4d3a79){return _0x8ee9(_0x5125c2- -0x2b9,_0x2adf2c);}return{...typeof _0x3695b8['id']===_0x392f9f(-_0x2fd94c._0x360a73,-_0x2fd94c._0x33ccb3,-0x11f,-_0x2fd94c._0xf77c31)?{'id':_0x3695b8['id']}:{},'role':_0x3695b8[_0x21a73d(_0x2fd94c._0x42188d,_0x2fd94c._0x26c2da,_0x2fd94c._0xb9ff6,0x15e)],'content':normalizeContent(_0x3695b8[_0x21a73d(0x166,0x173,_0x2fd94c._0xad1c58,0x155)]),..._0x3695b8['providerState']?{'providerState':structuredClone(_0x3695b8[_0x21a73d(0x149,0x140,_0x2fd94c._0x2a324e,_0x2fd94c._0xcdd6b4)])}:{}};}function compileRequest(_0x46ded6){const _0x1ceb0a={_0x44ef22:0x152,_0x1f5781:0x166,_0x2f32ef:0x145,_0x454a0b:0x13a,_0x4266a1:0x14f,_0x395828:0x141,_0x3f3cd7:0x136,_0xca7804:0x157,_0x35f484:0x163,_0x8e4e39:0x148,_0x5ec859:0x13f,_0x3e01b4:0x15b,_0x4769af:0x140,_0x288428:0x149,_0x3e5865:0x156,_0x439afe:0x146,_0x4c46b3:0x151},_0x4a8ce9={_0x5127f:0x2ec};function _0x3bb899(_0x40204d,_0x153649,_0x24d7ad,_0x963545){return _0x8ee9(_0x963545- -0x2fb,_0x40204d);}function _0x3f1614(_0x5ca7b4,_0x37f99d,_0x395183,_0x564022){return _0x8ee9(_0x395183- -_0x4a8ce9._0x5127f,_0x5ca7b4);}return{'model':_0x46ded6['model']??_0x3f1614(-0x141,-_0x1ceb0a._0x44ef22,-0x149,-0x131),'max_tokens':_0x46ded6[_0x3bb899(-_0x1ceb0a._0x1f5781,-0x14b,-_0x1ceb0a._0x2f32ef,-0x15c)]??0x400,..._0x46ded6[_0x3bb899(-0x14c,-0x14f,-_0x1ceb0a._0x454a0b,-_0x1ceb0a._0x4266a1)]?{'reasoning':structuredClone(_0x46ded6[_0x3f1614(-_0x1ceb0a._0x395828,-0x158,-0x140,-_0x1ceb0a._0x3f3cd7)])}:{},'system':normalizeSystem(_0x46ded6['system']),'messages':_0x46ded6[_0x3bb899(-0x140,-0x124,-0x145,-0x13d)][_0x3bb899(-0x15d,-_0x1ceb0a._0xca7804,-_0x1ceb0a._0x35f484,-0x162)](normalizeMessage),'tools':structuredClone(_0x46ded6[_0x3f1614(-_0x1ceb0a._0x8e4e39,-_0x1ceb0a._0x5ec859,-_0x1ceb0a._0x3e01b4,-_0x1ceb0a._0x4769af)]??[]),'metadata':{'session_id':_0x46ded6[_0x3bb899(-0x139,-_0x1ceb0a._0x288428,-_0x1ceb0a._0x3e5865,-_0x1ceb0a._0x439afe)],'turn_id':_0x46ded6[_0x3bb899(-0x139,-0x13c,-_0x1ceb0a._0x3e01b4,-_0x1ceb0a._0x4c46b3)]}};}function _0x8ee9(_0x5dad79,_0x144cdf){_0x5dad79=_0x5dad79-0x190;const _0x2c699c=_0x2c69();let _0x8ee9f5=_0x2c699c[_0x5dad79];if(_0x8ee9['FLuBAQ']===undefined){var _0x3efbf8=function(_0x123930){const _0x2deb2e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1427c4='',_0x1242db='';for(let _0x1810a7=0x0,_0x26bc3c,_0x7da41a,_0x586f2e=0x0;_0x7da41a=_0x123930['charAt'](_0x586f2e++);~_0x7da41a&&(_0x26bc3c=_0x1810a7%0x4?_0x26bc3c*0x40+_0x7da41a:_0x7da41a,_0x1810a7++%0x4)?_0x1427c4+=String['fromCharCode'](0xff&_0x26bc3c>>(-0x2*_0x1810a7&0x6)):0x0){_0x7da41a=_0x2deb2e['indexOf'](_0x7da41a);}for(let _0x3695b8=0x0,_0x46ded6=_0x1427c4['length'];_0x3695b8<_0x46ded6;_0x3695b8++){_0x1242db+='%'+('00'+_0x1427c4['charCodeAt'](_0x3695b8)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1242db);};_0x8ee9['kzMgEP']=_0x3efbf8,_0x8ee9['aRwICs']={},_0x8ee9['FLuBAQ']=!![];}const _0x5a1bf1=_0x2c699c[0x0],_0x2f18bc=_0x5dad79+_0x5a1bf1,_0x38040c=_0x8ee9['aRwICs'][_0x2f18bc];return!_0x38040c?(_0x8ee9f5=_0x8ee9['kzMgEP'](_0x8ee9f5),_0x8ee9['aRwICs'][_0x2f18bc]=_0x8ee9f5):_0x8ee9f5=_0x38040c,_0x8ee9f5;}function toChatRequest(_0x45743a){const _0x368938={_0x922773:0x232,_0x34e5cc:0x22a,_0x5cc07c:0x241,_0x3dc655:0x22b,_0x334ab5:0x24a,_0x290799:0x253,_0x45e4fa:0x23c,_0x50859a:0x21c,_0x3d60e7:0x23d,_0x1e892f:0x26c,_0x378357:0x360,_0x40dbc1:0x34c,_0x103a2c:0x383,_0x4936c3:0x39c,_0x29e891:0x37b},_0x5e6d69={_0x29e6f2:0x95},_0x5a1a25={_0x4b193f:0x1c2};function _0x35479c(_0x42d82b,_0x2c08f7,_0x4ee66e,_0x2f4604){return _0x8ee9(_0x2c08f7-_0x5a1a25._0x4b193f,_0x42d82b);}function _0x49e603(_0x2cfb0b,_0x36794c,_0x4e5b42,_0x356274){return _0x8ee9(_0x36794c-_0x5e6d69._0x29e6f2,_0x356274);}return{'model':_0x45743a[_0x49e603(0x21e,_0x368938._0x922773,_0x368938._0x34e5cc,0x241)],'maxTokens':_0x45743a['max_tokens'],..._0x45743a['reasoning']?{'reasoning':structuredClone(_0x45743a[_0x49e603(0x25d,_0x368938._0x5cc07c,0x238,_0x368938._0x3dc655)])}:{},'system':structuredClone(_0x45743a['system']),'messages':structuredClone(_0x45743a[_0x49e603(_0x368938._0x334ab5,_0x368938._0x290799,_0x368938._0x45e4fa,0x265)]),'tools':structuredClone(_0x45743a[_0x49e603(0x22d,0x226,0x22c,_0x368938._0x50859a)]),'metadata':{'sessionId':_0x45743a[_0x49e603(_0x368938._0x3d60e7,0x256,_0x368938._0x1e892f,0x25e)][_0x35479c(0x37c,_0x368938._0x378357,0x35c,_0x368938._0x40dbc1)],'turnId':_0x45743a[_0x35479c(0x36e,_0x368938._0x103a2c,_0x368938._0x4936c3,_0x368938._0x29e891)]['turn_id']}};}function toModelRequest(_0x439115){const _0x73eed2={_0x329bc1:0x4c4,_0xdb06ba:0x4b0,_0x2d3922:0x4dc,_0x1df76e:0x4bc,_0x151825:0x4c1,_0x5236b8:0x4d0,_0x1e2e8a:0x4ce,_0x34038b:0x4b7,_0x15b952:0x4bf,_0x5abaea:0x222,_0x4cabee:0x4b6,_0x3fd3d3:0x4d1,_0x58be1d:0x1f2,_0x5f4a64:0x1fd,_0x2f6d1f:0x21e,_0x28a023:0x234,_0x488016:0x22d,_0x5556a0:0x207,_0x5bfca4:0x238,_0x4173b9:0x22e,_0x185aa0:0x4cc,_0x1a90d8:0x4da,_0x42f3ce:0x4d4};function _0x2581bf(_0x48b063,_0x3476ff,_0x2e08b7,_0x338ba8){return _0x8ee9(_0x338ba8-0x6c,_0x48b063);}function _0x56c001(_0x1267bb,_0x53d464,_0x48a3e8,_0x246dd2){return _0x8ee9(_0x246dd2-0x313,_0x53d464);}return{'model':_0x439115[_0x56c001(0x4bc,0x49b,_0x73eed2._0x329bc1,_0x73eed2._0xdb06ba)],'max_tokens':_0x439115[_0x56c001(_0x73eed2._0x2d3922,_0x73eed2._0x1df76e,_0x73eed2._0x151825,_0x73eed2._0x5236b8)],..._0x439115['reasoning']?{'reasoning':structuredClone(_0x439115[_0x56c001(_0x73eed2._0x1e2e8a,0x4d8,_0x73eed2._0x34038b,_0x73eed2._0x15b952)])}:{},'system':structuredClone(_0x439115[_0x2581bf(_0x73eed2._0x5abaea,0x242,0x23a,0x226)]),'messages':structuredClone(_0x439115[_0x56c001(0x4ec,_0x73eed2._0x4cabee,_0x73eed2._0x3fd3d3,_0x73eed2._0x3fd3d3)]),'tools':structuredClone(_0x439115[_0x2581bf(0x1f1,_0x73eed2._0x58be1d,0x1fd,_0x73eed2._0x5f4a64)]),'metadata':{'session_id':_0x439115[_0x2581bf(_0x73eed2._0x2f6d1f,_0x73eed2._0x28a023,0x213,_0x73eed2._0x488016)][_0x2581bf(_0x73eed2._0x5556a0,_0x73eed2._0x5bfca4,_0x73eed2._0x4173b9,0x221)],'turn_id':_0x439115[_0x56c001(_0x73eed2._0x185aa0,0x4ea,_0x73eed2._0x1a90d8,_0x73eed2._0x42f3ce)]['turnId']}};}function toProviderModelRequest(_0x18d079){const _0x38f0ba={_0x311314:0x10d,_0x4a6d34:0xfc,_0x5df87b:0x105,_0x2b3614:0xfd,_0x42d4b:0x489,_0x2aa7c3:0x483,_0x5a03a1:0x48a,_0x3a42d8:0x124,_0x5d578a:0x117},_0x964e68={_0x4684ad:0x2d2},_0x8fd511={_0x50c3e6:0x2b5};function _0x119a0a(_0x39ffb0,_0x4d83a3,_0xcc9cbb,_0x298a05){return _0x8ee9(_0x4d83a3- -_0x8fd511._0x50c3e6,_0x298a05);}function _0x254287(_0x342338,_0x18f008,_0x452760,_0x1b5cec){return _0x8ee9(_0x452760-_0x964e68._0x4684ad,_0x342338);}return{'model':_0x18d079[_0x119a0a(-_0x38f0ba._0x311314,-0x118,-0x128,-0xfd)],'max_tokens':_0x18d079[_0x119a0a(-_0x38f0ba._0x4a6d34,-0xf8,-_0x38f0ba._0x5df87b,-_0x38f0ba._0x2b3614)],'system':structuredClone(_0x18d079['system']),'messages':structuredClone(_0x18d079[_0x254287(_0x38f0ba._0x42d4b,_0x38f0ba._0x2aa7c3,0x490,_0x38f0ba._0x5a03a1)]),'tools':structuredClone(_0x18d079[_0x119a0a(-0x11d,-_0x38f0ba._0x3a42d8,-_0x38f0ba._0x5d578a,-0x120)])};}function toChatResponse(_0x173e54){const _0x1b82bf={_0x3a8f0b:0x1c2,_0xea496c:0xcd,_0x908734:0xd2,_0x583321:0xcc,_0x31e3f9:0xbb,_0x3b9a0a:0xce,_0x24284c:0xb3,_0x100ed9:0x84,_0x3ded89:0x89,_0x3df170:0xa1,_0x459fef:0xb0,_0x375265:0xaf,_0x3e7953:0xcf,_0x45acb2:0x1d7,_0x1eb6af:0x1a7,_0x2c07a6:0x1da,_0x1f9d44:0xd0,_0x29f89c:0xda,_0x5b7504:0x1bc,_0x50ea5f:0x1af},_0x3814c5={_0x5a3351:0x260},_0x1731dc={_0x4fcd76:0x2c};function _0x1294e7(_0x2357f7,_0x47f5d0,_0x4b8410,_0x38009b){return _0x8ee9(_0x4b8410-_0x1731dc._0x4fcd76,_0x47f5d0);}function _0x2ac048(_0x6b31b7,_0x2ae9de,_0x432ed5,_0x21dbca){return _0x8ee9(_0x2ae9de- -_0x3814c5._0x5a3351,_0x6b31b7);}return{'id':_0x173e54['id'],'content':structuredClone(_0x173e54[_0x1294e7(0x1cf,0x1e2,0x1dc,_0x1b82bf._0x3a8f0b)]),'stopReason':_0x173e54[_0x2ac048(-0xca,-_0x1b82bf._0xea496c,-0xd2,-0xce)],'usage':{'inputTokens':_0x173e54[_0x2ac048(-_0x1b82bf._0x908734,-_0x1b82bf._0x583321,-0xbc,-_0x1b82bf._0x31e3f9)][_0x2ac048(-0xbe,-_0x1b82bf._0x3b9a0a,-_0x1b82bf._0x24284c,-0xba)],'outputTokens':_0x173e54['usage'][_0x2ac048(-_0x1b82bf._0x100ed9,-0x9e,-_0x1b82bf._0x3ded89,-_0x1b82bf._0x3df170)],..._0x173e54[_0x2ac048(-_0x1b82bf._0x459fef,-0xcc,-0xb8,-0xcd)][_0x2ac048(-_0x1b82bf._0x375265,-0xc9,-_0x1b82bf._0x3e7953,-0xcf)]!==void 0x0?{'reasoningTokens':_0x173e54[_0x1294e7(0x1a6,_0x1b82bf._0x45acb2,0x1c0,_0x1b82bf._0x1eb6af)][_0x1294e7(_0x1b82bf._0x2c07a6,0x1a9,0x1c3,0x1df)]}:{}},..._0x173e54[_0x2ac048(-0xd9,-_0x1b82bf._0x1f9d44,-_0x1b82bf._0x29f89c,-0xb4)]?{'providerState':structuredClone(_0x173e54[_0x1294e7(0x1d3,0x1d1,_0x1b82bf._0x5b7504,_0x1b82bf._0x50ea5f)])}:{}};}function toModelResponse(_0x322855){const _0x5bed94={_0x5d8e2d:0x13,_0x5bf191:0x2,_0x4f5da9:0x9,_0x446861:0x6,_0x5299e6:0x12,_0x11da55:0x40,_0x3bc2a8:0xb,_0x3d1b1d:0x3,_0x29a65a:0x11,_0x1c291e:0x17,_0x1b3f8c:0x30,_0x2f3be9:0x1b,_0x52e9e1:0x213,_0x1832d9:0x216,_0x5d17ce:0x1fd,_0x3a4f56:0x249,_0x4e5843:0x233,_0x18ca67:0x259,_0x4c44cf:0x21e,_0x2e6792:0x216,_0x92b9c0:0x207,_0x2d01a8:0x12,_0x4f751b:0x29,_0x591c0e:0x212,_0x11ecc6:0x224,_0xa86c0b:0x217},_0x323cd4={_0x24c066:0x82};function _0x5600df(_0x586ec3,_0xd14df6,_0x4166b0,_0x27fbbd){return _0x8ee9(_0x27fbbd- -0x1b9,_0xd14df6);}function _0x4a75ce(_0x4c011e,_0x22c8a5,_0x584e21,_0x19c087){return _0x8ee9(_0x22c8a5-_0x323cd4._0x24c066,_0x19c087);}return{'id':_0x322855['id'],'type':'message','role':'assistant','content':structuredClone(_0x322855[_0x5600df(-_0x5bed94._0x5d8e2d,_0x5bed94._0x5bf191,0xa,-_0x5bed94._0x4f5da9)]),'stop_reason':_0x322855[_0x5600df(-0x1b,_0x5bed94._0x446861,-0xc,-_0x5bed94._0x5299e6)],'stop_sequence':null,'usage':{'input_tokens':_0x322855[_0x5600df(-0x36,-_0x5bed94._0x11da55,-_0x5bed94._0x3bc2a8,-0x25)][_0x5600df(0x2,-_0x5bed94._0x3d1b1d,-0x11,-_0x5bed94._0x29a65a)],'output_tokens':_0x322855[_0x5600df(-_0x5bed94._0x1c291e,-_0x5bed94._0x1b3f8c,-_0x5bed94._0x2f3be9,-0x25)][_0x5600df(_0x5bed94._0x3bc2a8,-_0x5bed94._0x1c291e,-0x9,-0x6)],..._0x322855[_0x4a75ce(_0x5bed94._0x52e9e1,_0x5bed94._0x1832d9,_0x5bed94._0x5d17ce,0x223)][_0x4a75ce(_0x5bed94._0x3a4f56,0x241,_0x5bed94._0x4e5843,_0x5bed94._0x18ca67)]!==void 0x0?{'reasoning_tokens':_0x322855[_0x4a75ce(_0x5bed94._0x4c44cf,_0x5bed94._0x2e6792,_0x5bed94._0x92b9c0,0x208)]['reasoningTokens']}:{}},..._0x322855[_0x5600df(-0x31,-_0x5bed94._0x2d01a8,-0x1a,-_0x5bed94._0x4f751b)]?{'providerState':structuredClone(_0x322855[_0x4a75ce(0x20f,_0x5bed94._0x591c0e,_0x5bed94._0x11ecc6,_0x5bed94._0xa86c0b)])}:{}};}function responseToAssistantMessage(_0x2b125d){const _0x2198cd={_0x58862f:0xb0,_0x4dab6c:0x9e,_0x58013f:0xd7,_0x285650:0xd7,_0xdf5246:0x1df,_0x482beb:0x1f2,_0x137f6f:0x1dd},_0x250537={_0x2e6882:0x267},_0xa9c4b4={_0x357062:0x376};function _0x1209a2(_0x17aec6,_0x18b050,_0x419fa7,_0x349798){return _0x8ee9(_0x17aec6- -_0xa9c4b4._0x357062,_0x18b050);}function _0x283359(_0x107812,_0x47d103,_0x15386e,_0x333ccf){return _0x8ee9(_0x47d103- -_0x250537._0x2e6882,_0x107812);}return{'role':'assistant','content':normalizeContent(_0x2b125d[_0x283359(-_0x2198cd._0x58862f,-0xb7,-0x9d,-_0x2198cd._0x4dab6c)]),..._0x2b125d[_0x283359(-_0x2198cd._0x58013f,-_0x2198cd._0x285650,-0xc5,-0xbe)]?{'providerState':structuredClone(_0x2b125d[_0x1209a2(-0x1e6,-_0x2198cd._0xdf5246,-_0x2198cd._0x482beb,-_0x2198cd._0x137f6f)])}:{}};}function _0x2c69(){const _0x41491c=['Aw5WDxrFDg9Rzw5Z','C3rVCf9YzwfZB24','DxnHz2u','mZu1mJq4t0H5A0PW','AxnbCNjHEq','CMvHC29UAw5Nx3rVA2vUCW','DgHPBMTPBMC','BwfW','C3vTBwfYEq','Dgv4Da','yw50AhjVCgLJx3rOAw5RAw5N','Bw9KzwW','C2vZC2LVBL9Pza','Bwf4x3rVA2vUCW','mZa1nZaXALniC25n','AM9PBG','BgvUz3rO','y2XHDwrLlxnVBM5LDc00ltiWmJuWnte0','mJyYndHOuxzgwe4','zxjYB3i','yxnZAxn0yw50','C3rVCfjLyxnVBG','Aw5WDxruB2TLBNm','B3bLBMfPx3jLyxnVBMLUzW','DhvYBKLK','CM9Szq','CMvHC29UAw5N','DhjPBq','Dg9VBf9Yzxn1Bhq','mJyWndKZwKPWtfLI','y29UDgvUDa','zMXHDe1HCa','mtC0nZCWyK9mDgLZ','B3v0Chv0vg9Rzw5Z','mtyXDwv5qM50','C2vZC2LVBKLK','C3rYAw5N','mJrhD1zTteu','nJC3ofLprg94yq','DhLWzq','C3LZDgvT','mJqWC1PIyMj0','mJqWCgLOq2Tn','Bwf4vg9Rzw5Z','BwvZC2fNzxm','CMvHC29UAw5Nvg9Rzw5Z','khjLzgfJDgvKihjLyxnVBMLUzYK','Bwv0ywrHDge','B3v0Chv0x3rVA2vUCW','zMLSDgvY','yw50AhjVCgLJx3jLzgfJDgvKx3rOAw5RAw5N','B3v0Chv0','nJKXndGWswH5qLvQ','zw5JCNLWDgvKq29UDgvUDa','ChjVDMLKzxjtDgf0zq','Dg9VBhm'];_0x2c69=function(){return _0x41491c;};return _0x2c69();}function createReasoningMessage(_0x3e524f){const _0x1b8307={_0x43a7fb:0x3c2,_0x1346d8:0x3d6,_0x5ed7c0:0x3e9,_0xfb6703:0x31d,_0x5e2922:0x315},_0x306cb6={_0x284a7d:0x492,_0x529860:0x25,_0x3d9622:0x28,_0x48f2f3:0x1f,_0x28fb8d:0x8,_0x50292b:0x1f,_0x38af51:0x2a},_0x4a0c15=normalizeContent(_0x3e524f?.[_0xed29db(_0x1b8307._0x43a7fb,_0x1b8307._0x1346d8,_0x1b8307._0x5ed7c0,_0x1b8307._0x1346d8)])[_0x5990f1(0x314,0x32e,0x330,_0x1b8307._0xfb6703)](_0x3c9328=>{const _0x422a9d={_0x2be544:0x36,_0x4409d6:0xbd},_0x211de5={_0x5b7fd0:0x168};function _0x334b54(_0x21055a,_0x427912,_0x16b26c,_0x2347e6){return _0xed29db(_0x21055a-_0x211de5._0x5b7fd0,_0x427912-0x5,_0x427912,_0x16b26c- -0x3ba);}function _0x190ef6(_0x41e019,_0x1facf5,_0x515b37,_0x53c28c){return _0xed29db(_0x41e019-_0x422a9d._0x2be544,_0x1facf5-0x114,_0x53c28c,_0x1facf5-_0x422a9d._0x4409d6);}return _0x3c9328[_0x190ef6(_0x306cb6._0x284a7d,0x49c,0x4ab,0x4a6)]==='anthropic_redacted_thinking'||_0x3c9328[_0x334b54(0x25,0x17,_0x306cb6._0x529860,_0x306cb6._0x3d9622)]===_0x334b54(_0x306cb6._0x48f2f3,-0xe,_0x306cb6._0x28fb8d,0x19)||_0x3c9328['type']===_0x334b54(0x1,_0x306cb6._0x50292b,0x15,_0x306cb6._0x38af51);});if(_0x4a0c15[_0xed29db(0x3bd,0x3d8,0x3de,0x3c8)]===0x0)return void 0x0;function _0x5990f1(_0x2332b4,_0x34c438,_0xe0f6fb,_0x5c79b3){return _0x8ee9(_0xe0f6fb-0x16d,_0x5c79b3);}function _0xed29db(_0x2061b0,_0x27c5fc,_0x3e5d86,_0x5b3bee){return _0x8ee9(_0x5b3bee-0x226,_0x3e5d86);}return{'role':_0x5990f1(0x305,_0x1b8307._0x5e2922,0x313,0x311),'content':_0x4a0c15};}function createAssistantTextMessage(_0x1308e2){const _0x5455b6={_0x2df1bc:0x57e,_0xf032f0:0x572,_0x555602:0x53a,_0x341a91:0x551,_0x4eef61:0x53e,_0x1e21b5:0xe9},_0x3ab857={_0x4a52f3:0x3af},_0x5888d4={_0x3242db:0xbf};function _0x534a39(_0x40f751,_0x3812db,_0x29c795,_0xfbfd33){return _0x8ee9(_0x40f751- -_0x5888d4._0x3242db,_0x29c795);}const _0x18f3d8=normalizeContent(_0x1308e2?.['content'])[_0x53bd4a(_0x5455b6._0x2df1bc,0x57d,_0x5455b6._0xf032f0,0x564)](_0x2c0535=>{return _0x2c0535['type']==='text';});if(_0x18f3d8[_0x53bd4a(_0x5455b6._0x555602,0x55f,_0x5455b6._0x341a91,_0x5455b6._0x4eef61)]===0x0)return void 0x0;function _0x53bd4a(_0x31bda2,_0x524313,_0xadea38,_0x26a969){return _0x8ee9(_0xadea38-_0x3ab857._0x4a52f3,_0x524313);}return{'role':_0x534a39(0xe7,_0x5455b6._0x1e21b5,0xe5,0xe2),'content':_0x18f3d8};}function createToolUseMessage(_0x3118c6){const _0x19f3be={_0xc6107a:0x521,_0x4d57ce:0x522,_0x31af8e:0x538,_0x5be1bf:0x550,_0x3ae381:0x535,_0x134232:0x52a,_0x2220c8:0x515,_0x58adfc:0x21f,_0xe1aaa0:0x228},_0x172292={_0x54b159:0x3c4},_0x2c7121={_0x1fdf39:0x16f,_0x3edd45:0x15},_0x22a1e4=normalizeContent(_0x3118c6?.[_0x1c4c22(_0x19f3be._0xc6107a,_0x19f3be._0x4d57ce,_0x19f3be._0x31af8e,0x52a)])[_0x1c4c22(_0x19f3be._0x5be1bf,_0x19f3be._0x3ae381,0x51f,_0x19f3be._0x134232)](_0xad7653=>{function _0x1583d0(_0x51ac34,_0x16aba9,_0x4a255b,_0x3a3338){return _0x1c4c22(_0x16aba9,_0x4a255b- -0x641,_0x4a255b-_0x2c7121._0x1fdf39,_0x3a3338-_0x2c7121._0x3edd45);}return _0xad7653[_0x1583d0(-0x104,-0x119,-0x116,-0x11c)]==='tool_use';});function _0x1c4c22(_0x4e9222,_0x427590,_0x2c07a0,_0x3657fe){return _0x8ee9(_0x427590-0x372,_0x4e9222);}function _0xa54f2d(_0x44fb3b,_0x888008,_0x5dfa08,_0x59b740){return _0x8ee9(_0x888008- -_0x172292._0x54b159,_0x59b740);}if(_0x22a1e4[_0x1c4c22(0x501,0x514,0x503,_0x19f3be._0x2220c8)]===0x0)return void 0x0;return{'role':_0xa54f2d(-_0x19f3be._0x58adfc,-0x21e,-0x22b,-_0x19f3be._0xe1aaa0),'content':_0x22a1e4};}function getTextFromMessage(_0x4fd2e8){const _0x29a949={_0x11a4ad:0xf0,_0x4602bc:0x4ba,_0x23e891:0x4ac,_0x19f796:0xea,_0x2d23f9:0xe4,_0x567b99:0xf8,_0x53037a:0xf5},_0x166ec8={_0x15b463:0x30c},_0x4b4ffc={_0x4129f6:0xac};function _0x29cf27(_0x4cca53,_0x4b05bb,_0x14861e,_0x591b9f){return _0x8ee9(_0x591b9f- -_0x4b4ffc._0x4129f6,_0x4b05bb);}function _0x3fda64(_0x4ca5ce,_0x217272,_0x1eb972,_0x3a7466){return _0x8ee9(_0x4ca5ce-_0x166ec8._0x15b463,_0x3a7466);}return normalizeContent(_0x4fd2e8?.[_0x29cf27(0x101,_0x29a949._0x11a4ad,0xf1,0x104)])['filter'](_0x5d6440=>_0x5d6440[_0x29cf27(0xf1,0xf5,0xfa,0x10d)]===_0x29cf27(0xfd,0xe3,0x101,0xef))[_0x3fda64(0x4a5,_0x29a949._0x4602bc,_0x29a949._0x23e891,0x4b4)](_0x29179a=>_0x29179a['text'])[_0x29cf27(_0x29a949._0x19f796,_0x29a949._0x2d23f9,_0x29a949._0x567b99,_0x29a949._0x53037a)]('\x0a');}function getReasoningTextFromMessage(_0x1964e4){const _0x3c6620={_0x469451:0x146,_0x5e62e3:0x15c},_0x575a0e={_0x3a394f:0x2a0,_0x58411d:0x4db,_0x3c0746:0x4d1,_0x31b2ba:0x4c7,_0x2accb2:0x4bb,_0x1e55b5:0x2cc,_0x51c984:0x2d2,_0x7dccd5:0x2b8,_0x262363:0x4ea,_0x131619:0x4e7,_0x111a8e:0x4ee,_0xd4932c:0x4fd,_0xc09ee:0x4fc,_0x25f00c:0x4f2,_0x272fab:0x4e6,_0x5c1912:0x2e1,_0x19b135:0x2d9,_0x16fba3:0x4d4,_0x499c8b:0x4c8,_0x2165f0:0x2b6,_0x2fdea4:0x4cf,_0x51cadb:0x4bd,_0x47eb36:0x4d8,_0x25991c:0x2b2,_0x24958d:0x2de,_0x3ae96f:0x2e8,_0x3fd31d:0x2cd,_0x5401c7:0x2bb,_0x963040:0x2e7,_0x44750d:0x2e5};function _0x1f303c(_0x5790e5,_0x203499,_0xf81a76,_0x4fe7ae){return _0x8ee9(_0x5790e5- -0x5d,_0x203499);}return normalizeContent(_0x1964e4?.['content'])[_0x1f303c(0x154,_0x3c6620._0x469451,_0x3c6620._0x5e62e3,0x170)](_0x398ba4=>{const _0x3c04ec={_0x562846:0x38b,_0xa955e2:0x130},_0x420a57={_0x2f0f20:0x17d,_0x5afcce:0x1e1};if(_0x398ba4['type']===_0x576ce3(0x4c3,0x4ca,0x4c3,0x4c6))return _0x398ba4[_0x173531(_0x575a0e._0x3a394f,0x2d0,0x2be,0x2b8)][_0x576ce3(0x4e5,_0x575a0e._0x58411d,0x4d1,_0x575a0e._0x3c0746)]()[_0x576ce3(_0x575a0e._0x31b2ba,0x4d0,0x4e7,_0x575a0e._0x2accb2)]>0x0?[_0x398ba4[_0x173531(_0x575a0e._0x1e55b5,0x2ae,_0x575a0e._0x51c984,_0x575a0e._0x7dccd5)]]:[];function _0x173531(_0x187266,_0x3549f3,_0x42c31f,_0x5025b6){return _0x1f303c(_0x5025b6-_0x420a57._0x2f0f20,_0x187266,_0x42c31f-_0x420a57._0x5afcce,_0x5025b6-0xc2);}function _0x576ce3(_0x580c29,_0x1fb239,_0xfbc494,_0x32c454){return _0x1f303c(_0x1fb239-_0x3c04ec._0x562846,_0xfbc494,_0xfbc494-_0x3c04ec._0xa955e2,_0x32c454-0xea);}if(_0x398ba4[_0x576ce3(_0x575a0e._0x262363,_0x575a0e._0x131619,_0x575a0e._0x111a8e,_0x575a0e._0xd4932c)]===_0x576ce3(_0x575a0e._0xc09ee,_0x575a0e._0x25f00c,0x4dd,0x500))return[_0x576ce3(0x4e5,0x4ee,_0x575a0e._0x272fab,0x4e7)];if(_0x398ba4[_0x173531(_0x575a0e._0x5c1912,0x2cf,0x2d1,_0x575a0e._0x19b135)]!==_0x576ce3(0x4bb,0x4d7,_0x575a0e._0x16fba3,0x4c5))return[];const _0x46ba6e=_0x398ba4[_0x576ce3(0x4cc,_0x575a0e._0x499c8b,0x4e2,0x4bf)][_0x173531(0x2ae,_0x575a0e._0x2165f0,0x2b2,0x2b9)](_0x23dee9=>_0x23dee9[_0x576ce3(0x4e5,0x4c9,0x4b7,0x4de)])['filter'](_0x2586d9=>_0x2586d9[_0x173531(0x2cc,0x2dc,0x2bb,0x2cd)]()[_0x576ce3(0x4b4,0x4d0,0x4cd,0x4de)]>0x0)[_0x576ce3(0x4e6,_0x575a0e._0x2fdea4,_0x575a0e._0x51cadb,0x4df)]('\x0a\x0a');if(_0x46ba6e['length']>0x0)return[_0x46ba6e];if(_0x398ba4['text']&&_0x398ba4[_0x576ce3(0x4c1,0x4c9,0x4d8,_0x575a0e._0x47eb36)][_0x173531(_0x575a0e._0x25991c,_0x575a0e._0x24958d,_0x575a0e._0x3ae96f,_0x575a0e._0x3fd31d)]()['length']>0x0)return[_0x398ba4[_0x173531(0x2ba,0x2c0,0x2c7,_0x575a0e._0x5401c7)]];return _0x398ba4[_0x173531(_0x575a0e._0x963040,_0x575a0e._0x44750d,0x2f6,0x2e7)]?['(encrypted\x20reasoning)']:[];})['join']('\x0a\x0a');}function getToolUseBlocks(_0x59566c){const _0x4c4ef3={_0x2d04da:0x4e9,_0x2d2dfd:0x4bf,_0x36e39e:0x4d2,_0x5cd068:0xfb,_0x44fd56:0xd3};function _0x3fd373(_0x13a951,_0x50f860,_0x42d50d,_0x1879cb){return _0x8ee9(_0x13a951- -0xda,_0x50f860);}function _0x40889e(_0x19a551,_0x5eb1ff,_0x5ab43e,_0x32f70a){return _0x8ee9(_0x5eb1ff-0x325,_0x32f70a);}return normalizeContent(_0x59566c?.[_0x40889e(_0x4c4ef3._0x2d04da,0x4d5,_0x4c4ef3._0x2d2dfd,_0x4c4ef3._0x36e39e)])[_0x3fd373(0xe9,_0x4c4ef3._0x5cd068,_0x4c4ef3._0x44fd56,0xe9)](_0x2c9763=>_0x2c9763[_0x3fd373(0xdf,0xfb,0xc3,0xef)]==='tool_use');}function getToolResultBlocks(_0x2bcb0f){const _0x1ab66b={_0xf59bf8:0x477,_0x2fbccd:0x465},_0x182a1c={_0x3882c5:0xfb};function _0x2ab46e(_0x3bdb9b,_0x4961ad,_0x5ab5dc,_0x35b223){return _0x8ee9(_0x4961ad-_0x182a1c._0x3882c5,_0x3bdb9b);}function _0x517129(_0x6c5167,_0x2fbbf9,_0x5ea99d,_0x5c43e8){return _0x8ee9(_0x2fbbf9-0x2c7,_0x5c43e8);}return normalizeContent(_0x2bcb0f?.[_0x517129(0x47f,_0x1ab66b._0xf59bf8,_0x1ab66b._0x2fbccd,0x45b)])['filter'](_0x122fe5=>_0x122fe5[_0x2ab46e(0x2bd,0x2b4,0x2c2,0x2b7)]===_0x2ab46e(0x292,0x2a9,0x2c3,0x29d));}function createToolResultUserMessage(_0x37d312){const _0x26b8fc={_0x1d9533:0x1e3,_0x32908b:0x1e7},_0x216af4={_0x1b8a4d:0x7a,_0x21a1d1:0x140,_0x4920a5:0x111,_0x3ef0c6:0x120,_0x3dbac8:0x141,_0x3f2649:0xa1,_0x47dba7:0xaa,_0x24dbc1:0x96},_0x1d285d={_0x5b392e:0x2fd,_0x424599:0x56};function _0x22cf8b(_0x3886bb,_0x36596c,_0x47352b,_0x30c8da){return _0x8ee9(_0x47352b- -0x383,_0x36596c);}return{'role':'user','content':_0x37d312[_0x22cf8b(-_0x26b8fc._0x1d9533,-0x1f1,-0x1ea,-_0x26b8fc._0x32908b)](_0x274966=>{const _0x3f0d77={_0x31c035:0x46};function _0x25d0cd(_0x2e3319,_0x765dd8,_0xae9ee7,_0x16081e){return _0x22cf8b(_0x2e3319-0x9,_0x765dd8,_0xae9ee7-_0x1d285d._0x5b392e,_0x16081e-_0x1d285d._0x424599);}function _0x9184bb(_0x44badb,_0x1f8c97,_0x6219b9,_0x583d4d){return _0x22cf8b(_0x44badb-_0x3f0d77._0x31c035,_0x6219b9,_0x583d4d-0x148,_0x583d4d-0x3b);}return{'type':_0x9184bb(-0x9f,-0x8e,-_0x216af4._0x1b8a4d,-0x8d),'tool_use_id':_0x274966['callId'],'content':_0x274966[_0x25d0cd(_0x216af4._0x21a1d1,_0x216af4._0x4920a5,0x12a,_0x216af4._0x3ef0c6)]??_0x274966[_0x25d0cd(0x12d,_0x216af4._0x3dbac8,0x13f,0x13c)],'is_error':_0x274966['status']===_0x9184bb(-_0x216af4._0x3f2649,-0x83,-_0x216af4._0x47dba7,-_0x216af4._0x24dbc1)};})};}export{createTextBlock,normalizeTextBlock,normalizeContent,normalizeSystem,normalizeMessage,compileRequest,toChatRequest,toModelRequest,toProviderModelRequest,toChatResponse,toModelResponse,responseToAssistantMessage,createReasoningMessage,createAssistantTextMessage,createToolUseMessage,getTextFromMessage,getReasoningTextFromMessage,getToolUseBlocks,getToolResultBlocks,createToolResultUserMessage};
@@ -0,0 +1 @@
1
+ (function(_0x44b797,_0x3ac7c3){const _0x275d7c={_0x20a57b:0x208,_0x4ce273:0x1e4,_0x2516e8:0x1f7,_0x2651c7:0x31e,_0x2e82c8:0x310,_0x3dde3b:0x30e,_0x163f12:0x1ec,_0x663b3f:0x1de,_0x5bf604:0x1f1,_0x1884ba:0x1c8,_0x14d367:0x1fb,_0x398fd5:0x20c,_0x1f96ff:0x2f1,_0x4301f8:0x30c,_0x330168:0x2fd},_0x4507ed={_0x3bb784:0x10c};function _0x2c2b15(_0x2a7940,_0x2bce76,_0x2478af,_0x2f2d1e){return _0x4289(_0x2478af-_0x4507ed._0x3bb784,_0x2a7940);}const _0x35edfa=_0x44b797();function _0x97acaa(_0x2c0758,_0x58087d,_0x392aba,_0x3690c0){return _0x4289(_0x2c0758- -0x3e2,_0x392aba);}while(!![]){try{const _0x4695e2=-parseInt(_0x2c2b15(0x1fe,_0x275d7c._0x20a57b,0x1ef,0x1ea))/0x1*(-parseInt(_0x2c2b15(_0x275d7c._0x4ce273,0x1e8,0x1fc,_0x275d7c._0x2516e8))/0x2)+-parseInt(_0x97acaa(-_0x275d7c._0x2651c7,-_0x275d7c._0x2e82c8,-0x316,-_0x275d7c._0x3dde3b))/0x3+parseInt(_0x2c2b15(0x1ea,_0x275d7c._0x163f12,0x1e6,_0x275d7c._0x663b3f))/0x4+-parseInt(_0x2c2b15(0x201,0x1f5,_0x275d7c._0x5bf604,_0x275d7c._0x2516e8))/0x5+parseInt(_0x2c2b15(_0x275d7c._0x1884ba,0x1c2,0x1d4,0x1de))/0x6+parseInt(_0x2c2b15(_0x275d7c._0x14d367,_0x275d7c._0x398fd5,0x1fe,0x219))/0x7*(-parseInt(_0x97acaa(-0x2f9,-_0x275d7c._0x1f96ff,-0x2ec,-0x312))/0x8)+parseInt(_0x97acaa(-_0x275d7c._0x4301f8,-0x325,-_0x275d7c._0x330168,-0x31c))/0x9;if(_0x4695e2===_0x3ac7c3)break;else _0x35edfa['push'](_0x35edfa['shift']());}catch(_0x408cac){_0x35edfa['push'](_0x35edfa['shift']());}}}(_0x2a3c,0x8579e));import{resolveOpenAiReasoningConfig}from'./chunk-NYZR4XKO.js';import{normalizeContent}from'./chunk-G2FR4UGO.js';function systemToInstructions(_0x3f5188){const _0x573213={_0x1201b9:0xa5,_0x1b39d5:0x7c,_0x57caf4:0x94,_0x45c17c:0x70,_0x40e29b:0x96,_0x373a7b:0x8a,_0x3e55c1:0x8e,_0x57b2ad:0xb8,_0x11bee6:0x9f},_0x4cc013={_0xc7e614:0x48};function _0x33290a(_0xf1f643,_0x38913d,_0x44a235,_0x37dff9){return _0x4289(_0x37dff9- -0x168,_0x44a235);}function _0x46bf2c(_0x3bb139,_0x567b55,_0x60c383,_0x5dd653){return _0x4289(_0x5dd653- -_0x4cc013._0xc7e614,_0x3bb139);}return normalizeContent(_0x3f5188)[_0x33290a(-_0x573213._0x1201b9,-0xaf,-_0x573213._0x1b39d5,-_0x573213._0x57caf4)](_0x433e67=>_0x433e67[_0x33290a(-0x67,-0x8d,-0x66,-0x72)]===_0x33290a(-0x86,-0xaa,-0x88,-0xa3))[_0x33290a(-_0x573213._0x45c17c,-0x9e,-_0x573213._0x40e29b,-_0x573213._0x373a7b)](_0x6aaeb6=>_0x6aaeb6['text'])[_0x33290a(-0xb7,-_0x573213._0x3e55c1,-_0x573213._0x57b2ad,-_0x573213._0x11bee6)]('\x0a\x0a');}function pushTextMessage(_0x1712ac,_0x2d7d6a,_0x427cbe){const _0x480027={_0x6305a5:0x54,_0x42ee5a:0x4e,_0x100a93:0x66,_0x2f8bf5:0x4f,_0x2cd55b:0x1,_0x5da02e:0x36,_0x1a61ed:0x2f},_0x1ce3df={_0x63309b:0x9e,_0xd97a77:0x91,_0x93891:0x96,_0x5e878c:0x8c,_0x59ec01:0x4e,_0x2982c9:0x56,_0x43dbfc:0x77},_0x420ebe={_0x338066:0x1ab},_0x1d8dd5={_0x101400:0x296},_0x1affdd={_0x42b4f0:0xa5};function _0x3c8551(_0x4f00e4,_0x2ba27b,_0x493ca8,_0x1d05a0){return _0x4289(_0x2ba27b- -_0x1affdd._0x42b4f0,_0x4f00e4);}if(_0x427cbe[_0x3c8551(_0x480027._0x6305a5,_0x480027._0x42ee5a,_0x480027._0x100a93,_0x480027._0x2f8bf5)]===0x0)return;function _0x1a8f42(_0x2a4794,_0x2b26de,_0x2f1468,_0x23a971){return _0x4289(_0x2f1468-_0x1d8dd5._0x101400,_0x2a4794);}const _0x4ec5d2={'type':_0x3c8551(0x9,0x1c,0x10,-_0x480027._0x2cd55b),'role':_0x2d7d6a,'content':_0x427cbe[_0x3c8551(0x42,0x39,_0x480027._0x5da02e,_0x480027._0x1a61ed)](_0x2ba939=>{function _0x1363c7(_0x353c5b,_0x5a7ea7,_0x483064,_0x3bc325){return _0x3c8551(_0x483064,_0x353c5b-0x391,_0x483064-0x41,_0x3bc325-0xa0);}function _0x3ddae6(_0x16eb2e,_0x15b77a,_0x287d23,_0x215230){return _0x3c8551(_0x16eb2e,_0x215230-0x3c,_0x287d23-_0x420ebe._0x338066,_0x215230-0x1e7);}return{'type':_0x3ddae6(_0x1ce3df._0x63309b,_0x1ce3df._0xd97a77,_0x1ce3df._0x93891,_0x1ce3df._0x5e878c),'text':_0x2ba939[_0x3ddae6(_0x1ce3df._0x59ec01,_0x1ce3df._0x2982c9,_0x1ce3df._0x43dbfc,0x5c)]};})};_0x1712ac['push'](_0x4ec5d2);}function _0x4289(_0x55a252,_0xc981fe){_0x55a252=_0x55a252-0xbe;const _0x2a3c70=_0x2a3c();let _0x428918=_0x2a3c70[_0x55a252];if(_0x4289['ZjqCfz']===undefined){var _0x4f8940=function(_0x3f5de6){const _0x40f15e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3f5188='',_0x433e67='';for(let _0x6aaeb6=0x0,_0x1712ac,_0x2d7d6a,_0x427cbe=0x0;_0x2d7d6a=_0x3f5de6['charAt'](_0x427cbe++);~_0x2d7d6a&&(_0x1712ac=_0x6aaeb6%0x4?_0x1712ac*0x40+_0x2d7d6a:_0x2d7d6a,_0x6aaeb6++%0x4)?_0x3f5188+=String['fromCharCode'](0xff&_0x1712ac>>(-0x2*_0x6aaeb6&0x6)):0x0){_0x2d7d6a=_0x40f15e['indexOf'](_0x2d7d6a);}for(let _0x4ec5d2=0x0,_0x2ba939=_0x3f5188['length'];_0x4ec5d2<_0x2ba939;_0x4ec5d2++){_0x433e67+='%'+('00'+_0x3f5188['charCodeAt'](_0x4ec5d2)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x433e67);};_0x4289['XmAAyI']=_0x4f8940,_0x4289['caOJVn']={},_0x4289['ZjqCfz']=!![];}const _0x133239=_0x2a3c70[0x0],_0x33d971=_0x55a252+_0x133239,_0xf3d1c4=_0x4289['caOJVn'][_0x33d971];return!_0xf3d1c4?(_0x428918=_0x4289['XmAAyI'](_0x428918),_0x4289['caOJVn'][_0x33d971]=_0x428918):_0x428918=_0xf3d1c4,_0x428918;}function hasSerializableToolUse(_0x1d51fe){const _0x54b859={_0x3caf3e:0x15e,_0x2a5cb2:0x26,_0x6fa549:0x134},_0x15a44a={_0x389cc4:0xd0};function _0x11b378(_0x221684,_0xc2c79d,_0x242210,_0x19668f){return _0x4289(_0xc2c79d- -_0x15a44a._0x389cc4,_0x221684);}function _0x4f0efd(_0x2e832c,_0x11a2ab,_0x3efb7e,_0x216cd2){return _0x4289(_0x3efb7e- -0x231,_0x216cd2);}return _0x1d51fe['id'][_0x4f0efd(-0x171,-0x169,-0x16e,-_0x54b859._0x3caf3e)]()[_0x11b378(0xb,0x23,_0x54b859._0x2a5cb2,0xc)]>0x0&&_0x1d51fe['name']['trim']()[_0x4f0efd(-_0x54b859._0x6fa549,-0x13b,-0x13e,-0x126)]>0x0;}function hasSerializableToolResult(_0x101f13){const _0x385057={_0x539505:0x464,_0x3a06f4:0x479,_0x4a6c12:0x478,_0x22e493:0x439,_0x517698:0xc6};function _0x11876e(_0x107bfa,_0x537942,_0x521461,_0x4be19a){return _0x4289(_0x4be19a- -0x1a1,_0x537942);}function _0x44bedb(_0x4b2799,_0x5c1409,_0x13bdd0,_0x10171c){return _0x4289(_0x10171c-0x38e,_0x4b2799);}return _0x101f13[_0x44bedb(0x46e,_0x385057._0x539505,_0x385057._0x3a06f4,_0x385057._0x4a6c12)][_0x44bedb(_0x385057._0x22e493,0x457,0x45b,0x451)]()[_0x11876e(-0xc9,-_0x385057._0x517698,-0xb2,-0xae)]>0x0;}function isResponseInputObject(_0x422216){const _0x5247a5={_0x32f67c:0x2d6,_0x1daa87:0x2e3},_0x1211c6={_0x3f22ab:0x28f};if(typeof _0x422216!==_0xcbe562(0x2cc,_0x5247a5._0x32f67c,0x2e2,0x2dd)||_0x422216===null||Array[_0x1928b6(0x33c,0x338,0x34e,0x335)](_0x422216))return![];function _0xcbe562(_0x42f7b6,_0x41c7ca,_0xc2aeec,_0xa95387){return _0x4289(_0xa95387-0x200,_0xc2aeec);}const _0x1cf8d6=_0x422216;function _0x1928b6(_0x51f7cb,_0x5ebbe1,_0x3af47f,_0x4f88af){return _0x4289(_0x3af47f-_0x1211c6._0x3f22ab,_0x51f7cb);}return typeof _0x1cf8d6[_0xcbe562(0x2f1,_0x5247a5._0x1daa87,0x303,0x2f6)]===_0xcbe562(0x2e8,0x2e3,0x2e9,0x2df);}function isImageToolResultBlock(_0x270fae){const _0x53f030={_0x1a265d:0x52,_0x4f003a:0x54,_0x1b04e3:0x62,_0x3c831e:0x59,_0x2d7f5c:0x2c,_0x3bb1ba:0x44,_0x367939:0x3d,_0x1f6353:0x3a,_0x27137d:0x55,_0x4bd2b6:0x17,_0x8a49e9:0x10,_0x1d5c4a:0x15,_0x2ed8df:0x25,_0x4a5423:0x5d,_0x3f62d5:0x45,_0x45b018:0x4,_0x29b24b:0x17,_0xf685fe:0x13,_0x3dac70:0x21,_0x2f2d2a:0xb,_0x39cfe4:0xa,_0x291782:0x18,_0x2a2295:0x20,_0xf3ac73:0x1c,_0x2b751e:0x43,_0x5008b7:0x5c,_0x5af4b8:0xf},_0xd9e9b2={_0x212182:0xea},_0x3205d5={_0x196d4d:0x84};function _0x3de528(_0x13f846,_0x51018e,_0x4778e8,_0x1d0e76){return _0x4289(_0x1d0e76- -_0x3205d5._0x196d4d,_0x51018e);}function _0x4dbdeb(_0x1b1446,_0xec407,_0x32dc42,_0x5c4966){return _0x4289(_0xec407- -_0xd9e9b2._0x212182,_0x32dc42);}if(typeof _0x270fae!==_0x3de528(_0x53f030._0x1a265d,_0x53f030._0x4f003a,_0x53f030._0x1b04e3,_0x53f030._0x3c831e)||_0x270fae===null||Array[_0x3de528(_0x53f030._0x2d7f5c,0x53,0x3a,0x3b)](_0x270fae))return![];const _0x28168e=_0x270fae;return _0x28168e['type']===_0x3de528(_0x53f030._0x3bb1ba,_0x53f030._0x367939,_0x53f030._0x1f6353,_0x53f030._0x27137d)&&_0x28168e[_0x4dbdeb(-0x2f,-_0x53f030._0x4bd2b6,-_0x53f030._0x8a49e9,-_0x53f030._0x1d5c4a)]?.[_0x4dbdeb(0x10,0xc,-0x2,_0x53f030._0x2ed8df)]===_0x3de528(_0x53f030._0x4a5423,_0x53f030._0x3f62d5,0x57,0x60)&&typeof _0x28168e[_0x4dbdeb(_0x53f030._0x45b018,-_0x53f030._0x29b24b,-0x2e,-0xa)][_0x4dbdeb(0x8,-_0x53f030._0xf685fe,-_0x53f030._0x3dac70,-0x6)]===_0x4dbdeb(-0xe,-_0x53f030._0x2f2d2a,_0x53f030._0x39cfe4,0x3)&&typeof _0x28168e[_0x4dbdeb(-_0x53f030._0x291782,-_0x53f030._0x29b24b,-_0x53f030._0x2a2295,-_0x53f030._0xf3ac73)][_0x3de528(0x62,0x5f,_0x53f030._0x2b751e,_0x53f030._0x5008b7)]===_0x4dbdeb(-0x1f,-0xb,0xc,_0x53f030._0x5af4b8);}function getToolResultText(_0x261f2a){const _0x2aa200={_0x698cf3:0x1e7,_0x50bea9:0x1b0,_0xa90007:0x1cf,_0x416789:0x1e5,_0x303594:0x140,_0x143e5b:0x14d,_0x2d03c0:0x160,_0xedc99e:0x12b,_0xb6e8e7:0x12e,_0x2cb603:0x114,_0x5e8dcf:0x14c},_0x35f4dc={_0x18b700:0x1b0,_0x1438dc:0x1aa,_0x5d1949:0x1b9,_0x34e1b6:0x58,_0x2bd75a:0x3c,_0xdfe814:0x4d,_0x556572:0x57},_0x380adf={_0x1982e0:0x78,_0x4fb81a:0x6d},_0x3e93e7={_0x2788d0:0x2ac};if(typeof _0x261f2a===_0x13f39c(-_0x2aa200._0x698cf3,-0x1cd,-_0x2aa200._0x50bea9,-0x1e5))return _0x261f2a;function _0x1009a6(_0xfa99fe,_0x3f0be1,_0x42b229,_0x363b49){return _0x4289(_0xfa99fe- -0x21e,_0x3f0be1);}function _0x13f39c(_0x29767e,_0x2638c5,_0x19ce9f,_0x507341){return _0x4289(_0x2638c5- -_0x3e93e7._0x2788d0,_0x19ce9f);}const _0x549199=_0x261f2a[_0x13f39c(-0x1d8,-0x1d8,-_0x2aa200._0xa90007,-_0x2aa200._0x416789)](_0x27074b=>{const _0xe9fe56={_0x1533e6:0x115};function _0x42dc64(_0x2e831f,_0x22b88f,_0x4d46d5,_0x96ab90){return _0x13f39c(_0x2e831f-0x5a,_0x96ab90-0x190,_0x22b88f,_0x96ab90-_0xe9fe56._0x1533e6);}function _0x46280d(_0x11bfa4,_0x1e21b3,_0x250e62,_0x45da6b){return _0x1009a6(_0x45da6b- -_0x380adf._0x1982e0,_0x250e62,_0x250e62-_0x380adf._0x4fb81a,_0x45da6b-0x1e2);}return typeof _0x27074b===_0x46280d(-_0x35f4dc._0x18b700,-0x1b6,-_0x35f4dc._0x1438dc,-_0x35f4dc._0x5d1949)&&_0x27074b!==null&&_0x27074b['type']===_0x42dc64(-_0x35f4dc._0x34e1b6,-_0x35f4dc._0x2bd75a,-_0x35f4dc._0xdfe814,-_0x35f4dc._0x556572);})[_0x1009a6(-_0x2aa200._0x303594,-0x142,-_0x2aa200._0x143e5b,-0x15c)](_0x2d253d=>_0x2d253d[_0x13f39c(-0x1f7,-0x1e7,-0x200,-0x1cf)])[_0x1009a6(-0x155,-0x168,-0x16c,-_0x2aa200._0x2d03c0)]('\x0a\x0a')['trim']();return _0x549199[_0x1009a6(-_0x2aa200._0xedc99e,-_0x2aa200._0xb6e8e7,-_0x2aa200._0x2cb603,-_0x2aa200._0x2cb603)]>0x0?_0x549199:_0x1009a6(-0x13d,-_0x2aa200._0xb6e8e7,-0x13b,-_0x2aa200._0x5e8dcf);}function getToolResultImages(_0x331154){const _0x1b5b50={_0x1b1c39:0x254,_0x37c747:0x3ed,_0x4c9b58:0x404},_0x32d67e={_0x2160b2:0x30c};function _0x4dcadb(_0x4d9aef,_0x35ea29,_0x12396f,_0x8ae09d){return _0x4289(_0x12396f- -_0x32d67e._0x2160b2,_0x4d9aef);}function _0x19b6e9(_0x516ab8,_0x5f1061,_0x301255,_0x2354f0){return _0x4289(_0x5f1061-0x32a,_0x2354f0);}return Array[_0x4dcadb(-0x253,-_0x1b5b50._0x1b1c39,-0x24d,-0x267)](_0x331154)?_0x331154[_0x19b6e9(_0x1b5b50._0x37c747,0x3fe,0x3e3,_0x1b5b50._0x4c9b58)](isImageToolResultBlock):[];}function resolveReasoningVisibility(_0x50292b){const _0xf560d0={_0x23ef7d:0x344},_0x1c7de1={_0x32cae8:0x270};function _0x85bf01(_0x1ebed8,_0x124c98,_0x2b034f,_0x93dab){return _0x4289(_0x2b034f-_0x1c7de1._0x32cae8,_0x124c98);}return _0x50292b['reasoning']?.[_0x85bf01(_0xf560d0._0x23ef7d,0x349,0x357,0x340)]??'user-visible';}function createOpenAiResponsesReasoning(_0x4b011d){const _0x3d79ce={_0x447a51:0xa9,_0x44d9cc:0xc1,_0x332c4f:0x316,_0x1c3bbc:0x333,_0x16ec74:0x320,_0x98fc06:0x330,_0xdadf73:0x313,_0x3fecf4:0x319,_0x26bfee:0x313,_0x3ebc9b:0xc1,_0x2db326:0xca,_0x39e2f8:0x300,_0x4dac3f:0x317,_0x5db2b5:0x9f,_0x3a8933:0xb3,_0x566c88:0xae,_0xf37893:0x98,_0x673b9b:0xaa,_0x355f25:0xb3},_0x5cf630={_0x42df1b:0x244},_0xbbc3a7={_0x14aae7:0x170},_0x44cd03=resolveOpenAiReasoningConfig(_0x4b011d[_0x61441d(-_0x3d79ce._0x447a51,-_0x3d79ce._0x44d9cc,-0x93,-0x97)]);function _0x61441d(_0x4776d8,_0x48fc2c,_0x27e8df,_0x3640f4){return _0x4289(_0x4776d8- -_0xbbc3a7._0x14aae7,_0x3640f4);}if(!_0x44cd03)return{};const _0x1bfec6={},_0x9d8c5a=_0x44cd03[_0x308c41(_0x3d79ce._0x332c4f,_0x3d79ce._0x1c3bbc,_0x3d79ce._0x16ec74,0x31f)]??(resolveReasoningVisibility(_0x4b011d)===_0x308c41(0x332,_0x3d79ce._0x98fc06,0x328,0x34e)?_0x308c41(_0x3d79ce._0xdadf73,_0x3d79ce._0x3fecf4,_0x3d79ce._0x26bfee,0x311):void 0x0);_0x44cd03[_0x61441d(-0xae,-0xa1,-_0x3d79ce._0x3ebc9b,-_0x3d79ce._0x2db326)]&&(_0x1bfec6[_0x308c41(0x306,0x320,_0x3d79ce._0x39e2f8,_0x3d79ce._0x4dac3f)]=_0x44cd03['effort']);_0x9d8c5a&&(_0x1bfec6['summary']=_0x9d8c5a);function _0x308c41(_0x409d8d,_0x1dce20,_0x765fb8,_0x3ba6ad){return _0x4289(_0x409d8d-_0x5cf630._0x42df1b,_0x765fb8);}return{..._0x44cd03['includeEncryptedContent']===![]?{}:{'include':[_0x61441d(-_0x3d79ce._0x5db2b5,-_0x3d79ce._0x3a8933,-0xb9,-_0x3d79ce._0x566c88)]},...Object[_0x61441d(-_0x3d79ce._0xf37893,-0x7c,-_0x3d79ce._0x673b9b,-_0x3d79ce._0x355f25)](_0x1bfec6)[_0x308c41(0x337,0x332,0x349,0x33b)]>0x0?{'reasoning':_0x1bfec6}:{}};}function _0x2a3c(){const _0x1cce10=['Aw1Hz2u','mtq5ntmZnKDjANHesG','CM9Szq','zNvUy3rPB25Fy2fSBa','B2jQzwn0','BwfW','C3rYAw5N','zgf0yq','vg9VBcbYzxr1CM5LzcbPBwfNzsbJB250zw50lG','ChvZAa','mtuZnZmWzuDZBLPS','yMfZzty0','mJi0nJqYnxv0z0rMua','y29UDgvUDa','DMLZAwjPBgL0Eq','o2jHC2u2ncW','mtKYmZi3mK5cqwjsrG','Dg9VBf91C2vFAwq','zgvZy3jPChrPB24','Aw5WDxrFC2nOzw1H','C3bSAwnL','DxnLCI12AxnPyMXL','Dg9VBhm','nhj2B21cta','zNvUy3rPB25Fy2fSBf9VDxrWDxq','mtrLC2nLs2G','BgvUz3rO','B3bLBMfPuMvZCg9UC2vZt3v0Chv0','Aw5WDxrFDgv4Da','DhLWzq','Aw5WDxq','AxnbCNjHEq','Dg9VBf9Yzxn1Bhq','BwvZC2fNzq','zwzMB3j0','DhjPBq','ntqZnZC3s2ndB0vP','Dgv4Da','Dg9VBf91C2u','CMvHC29UAw5N','mteYmdeYmKnszevZwa','AM9PBG','DxnLCG','yxnZAxn0yw50','Bw9KzwW','BMfTzq','Aw5WDxrFAw1Hz2u','yxv0BW','zgf0ytO','CMvHC29UAw5NlMvUy3j5ChrLzf9JB250zw50','C3vTBwfYEq','C291CMnL','zMLSDgvY','BwvZC2fNzxm','nZeXmdG5mwfnq25eta','BwvKAwfFDhLWzq','A2v5CW'];_0x2a3c=function(){return _0x1cce10;};return _0x2a3c();}function pushAssistantProviderState(_0x496187,_0x1e6959){const _0xed9e3c={_0x5af800:0x1e5,_0x3da6b7:0x1d2,_0x2333cd:0x1f3,_0x6702a4:0x12,_0x410ee4:0x218,_0x5a3f0b:0x1fe,_0x526a86:0x41,_0x390ba3:0x1e5,_0x2c4d8e:0x1eb},_0x4799be={_0x1e1c28:0x10a};function _0xde022d(_0x4ba30c,_0x2e9d4e,_0x53172a,_0x817579){return _0x4289(_0x4ba30c- -0xb2,_0x2e9d4e);}if(_0x1e6959[_0x58d2b4(0x1f7,_0xed9e3c._0x5af800,_0xed9e3c._0x3da6b7,_0xed9e3c._0x2333cd)]!==_0xde022d(0x19,_0xed9e3c._0x6702a4,0x28,0x1f))return![];const _0xb838c=_0x1e6959['providerState']?.[_0x58d2b4(_0xed9e3c._0x410ee4,_0xed9e3c._0x5a3f0b,0x206,0x213)]??[];if(_0xb838c[_0xde022d(_0xed9e3c._0x526a86,0x4d,0x57,0x5e)]===0x0)return![];function _0x58d2b4(_0x48e8fe,_0x21054b,_0x55fc12,_0x35fb80){return _0x4289(_0x21054b-_0x4799be._0x1e1c28,_0x48e8fe);}for(const _0x3a7cd0 of _0xb838c){isResponseInputObject(_0x3a7cd0)&&_0x496187[_0x58d2b4(_0xed9e3c._0x390ba3,0x1ec,0x1d1,_0xed9e3c._0x2c4d8e)](structuredClone(_0x3a7cd0));}return!![];}function toOpenAiResponsesRequest(_0x3dcd80){const _0xe615d3={_0xd85987:0x45c,_0x5b5f20:0x2fb,_0x55dfc3:0x311,_0x5ce0b0:0x2fd,_0x56b215:0x32d,_0x534f82:0x2f6,_0x22a071:0x46e,_0x381308:0x482,_0xf1d2a:0x316,_0x1d7218:0x2fd,_0x4d4462:0x473,_0x5169ba:0x440,_0x3c441a:0x45d,_0x2238e2:0x2f0,_0x3b8a8a:0x485,_0x5e9656:0x47b,_0x4dd8ce:0x2d9,_0x1d282c:0x2cf,_0x57526b:0x2df,_0x32af8c:0x2d4,_0x1014fc:0x308,_0x436190:0x2f9,_0x15985e:0x460,_0x3b9dee:0x487,_0x3faee6:0x469,_0x526645:0x47b,_0x5742c9:0x46c,_0x365f8f:0x486,_0x4c373:0x461,_0x13169b:0x488,_0x2ddb62:0x2d6,_0x678f7f:0x2e4,_0x4d8394:0x2d7,_0x8f8fb1:0x310,_0x49535f:0x48c,_0x188ebb:0x489,_0x486cfa:0x473,_0x3f8f25:0x46f,_0x3f1959:0x470,_0x6f29cb:0x471,_0x42654d:0x2e7,_0x4608a6:0x2cb,_0x31e455:0x2fd,_0x144e04:0x484,_0x3d2f4b:0x47b},_0x51ce2a={_0x48d0a6:0x338,_0x27ea5b:0x335,_0x1c52f5:0x342,_0x5410bb:0x2b4,_0x1f6ea5:0x351},_0x5d0d03={_0x236e58:0x395},_0x470ca6={_0x56b0f9:0x21b},_0x46d856=[];function _0x3d4a3c(_0x2a4e2d,_0x202e40,_0x3bb1a5,_0x4bf12a){return _0x4289(_0x2a4e2d-_0x470ca6._0x56b0f9,_0x3bb1a5);}for(const _0x1db904 of _0x3dcd80[_0x5e5387(_0xe615d3._0xd85987,0x46e,0x46a,0x469)]){if(pushAssistantProviderState(_0x46d856,_0x1db904))continue;const _0x586f78=[];for(const _0xea6f78 of normalizeContent(_0x1db904[_0x3d4a3c(0x301,0x316,_0xe615d3._0x5b5f20,0x30a)])){if(_0xea6f78[_0x3d4a3c(_0xe615d3._0x55dfc3,_0xe615d3._0x5ce0b0,_0xe615d3._0x56b215,_0xe615d3._0x534f82)]==='text'){_0x586f78['push'](_0xea6f78);continue;}pushTextMessage(_0x46d856,_0x1db904[_0x5e5387(_0xe615d3._0x22a071,0x45f,0x470,0x486)],_0x586f78[_0x5e5387(0x477,0x499,_0xe615d3._0x381308,0x49d)](0x0));if(_0xea6f78[_0x3d4a3c(0x311,0x315,_0xe615d3._0xf1d2a,_0xe615d3._0x1d7218)]===_0x5e5387(_0xe615d3._0x4d4462,_0xe615d3._0x5169ba,0x45b,_0xe615d3._0x3c441a)){if(!hasSerializableToolUse(_0xea6f78))continue;_0x46d856[_0x3d4a3c(0x2fd,0x2e5,_0xe615d3._0x2238e2,0x319)]({'type':_0x5e5387(_0xe615d3._0x3b8a8a,0x463,0x471,_0xe615d3._0x5e9656),'call_id':_0xea6f78['id'],'name':_0xea6f78[_0x5e5387(_0xe615d3._0x3c441a,0x479,0x462,0x45e)],'arguments':JSON['stringify'](_0xea6f78[_0x3d4a3c(_0xe615d3._0x4dd8ce,_0xe615d3._0x1d282c,_0xe615d3._0x57526b,_0xe615d3._0x32af8c)]??{})});continue;}if(_0xea6f78[_0x3d4a3c(0x311,_0xe615d3._0x1014fc,0x310,_0xe615d3._0x436190)]===_0x5e5387(0x467,_0xe615d3._0x15985e,0x455,_0xe615d3._0x15985e)){if(!hasSerializableToolResult(_0xea6f78))continue;const _0x5260ec=getToolResultText(_0xea6f78[_0x5e5387(_0xe615d3._0x3b9dee,_0xe615d3._0x3faee6,_0xe615d3._0x526645,_0xe615d3._0x5742c9)]);_0x46d856['push']({'type':_0x5e5387(0x488,0x490,_0xe615d3._0x365f8f,0x46e),'call_id':_0xea6f78[_0x3d4a3c(0x305,_0xe615d3._0x1014fc,0x2f5,0x2fb)],'output':_0x5260ec});const _0x542490=getToolResultImages(_0xea6f78[_0x5e5387(0x469,_0xe615d3._0x4c373,0x47b,_0xe615d3._0x13169b)]);_0x542490[_0x3d4a3c(0x30e,0x30c,0x304,0x322)]>0x0&&_0x46d856['push']({'type':_0x3d4a3c(0x2dc,_0xe615d3._0x2ddb62,_0xe615d3._0x678f7f,_0xe615d3._0x4d8394),'role':_0x5e5387(0x476,0x46a,0x45f,0x46a),'content':[{'type':_0x3d4a3c(_0xe615d3._0x8f8fb1,0x315,0x303,0x32c),'text':'Image\x20returned\x20by\x20ViewFile\x20for\x20tool\x20result\x20'+_0xea6f78[_0x5e5387(_0xe615d3._0x49535f,_0xe615d3._0x188ebb,0x47f,0x495)]+'.'},..._0x542490[_0x5e5387(0x466,0x463,_0xe615d3._0x486cfa,_0xe615d3._0x4c373)](_0x166269=>({'type':_0x3d4a3c(0x2e9,0x2ee,0x2d8,0x300),'image_url':_0x3d4a3c(0x2eb,0x2e4,0x2de,0x2e5)+_0x166269['source'][_0x3d4a3c(0x2f2,0x2fa,0x300,0x2fc)]+_0x3d4a3c(0x303,0x313,0x30f,0x300)+_0x166269[_0x5e5387(0x473,0x44c,0x468,0x44c)][_0x3d4a3c(0x2fb,0x2ef,0x30f,0x30f)]}))]});}}pushTextMessage(_0x46d856,_0x1db904[_0x5e5387(0x45f,_0xe615d3._0x3f8f25,_0xe615d3._0x3f1959,_0xe615d3._0x6f29cb)],_0x586f78);}function _0x5e5387(_0x59d041,_0x7c8f6d,_0x50e1ea,_0x4b7d80){return _0x4289(_0x50e1ea-_0x5d0d03._0x236e58,_0x4b7d80);}return{...createOpenAiResponsesReasoning(_0x3dcd80),'model':_0x3dcd80[_0x3d4a3c(_0xe615d3._0x42654d,0x2d6,_0xe615d3._0x4608a6,_0xe615d3._0x31e455)],'instructions':systemToInstructions(_0x3dcd80['system']),'input':_0x46d856,'max_output_tokens':_0x3dcd80['maxTokens'],'tools':_0x3dcd80[_0x5e5387(0x490,0x48d,_0xe615d3._0x144e04,_0xe615d3._0x3d2f4b)][_0x3d4a3c(_0xe615d3._0x436190,0x303,0x2f7,0x2dd)](_0x5e8ad0=>{const _0x9a975d={_0xe95266:0x69,_0x57d2f1:0xa6,_0x220420:0x732},_0x4732f7={_0x3b3f6a:0x50,_0x426f3c:0xdf};function _0x117c9e(_0x309689,_0x23ce36,_0x1b8cff,_0x7df4cb){return _0x3d4a3c(_0x309689-_0x4732f7._0x3b3f6a,_0x23ce36-0xd6,_0x7df4cb,_0x7df4cb-_0x4732f7._0x426f3c);}function _0x1f5ddf(_0x445105,_0x5d67a8,_0x3a6e76,_0x15d27e){return _0x5e5387(_0x445105-_0x9a975d._0xe95266,_0x5d67a8-_0x9a975d._0x57d2f1,_0x445105- -_0x9a975d._0x220420,_0x15d27e);}return{'type':'function','name':_0x5e8ad0[_0x117c9e(_0x51ce2a._0x48d0a6,_0x51ce2a._0x27ea5b,_0x51ce2a._0x1c52f5,0x352)],'description':_0x5e8ad0[_0x1f5ddf(-0x2b2,-0x2c2,-_0x51ce2a._0x5410bb,-0x2cf)],'parameters':_0x5e8ad0[_0x117c9e(0x357,_0x51ce2a._0x1f6ea5,0x372,0x346)]};})};}export{toOpenAiResponsesRequest};
@@ -1 +1 @@
1
- function _0x1261(){var _0x44716f=['yw50AhjVCgLJ','B3bLBMfP','yxv0BW','nMH2tKPIEa','zw5HyMXLza','mtaXmZCZmdLNCMvbz3i','mtGXmtK3ogzYu2n6zW','ndG2nZi5mtjdD3Pyqva','zwzMB3j0','odq2ndK5mhPAu2DkEa','nZK2ndeXz3f1qw5f','mJuXnJa0nMz0DurytG','ndq2nZmXnMPTEwrusq'];_0x1261=function(){return _0x44716f;};return _0x1261();}(function(_0x4659b2,_0x2ee426){var _0x4c94f0={_0x50bb89:0x29,_0x3a340c:0x26,_0x480890:0x492,_0x1827ff:0x495,_0x8cf710:0x493,_0x46cd53:0x499,_0x1972f1:0x21,_0x20050:0x22,_0x4785fe:0x49f,_0x4e19bc:0x497,_0x452566:0x2e,_0xe10cf4:0x2b};function _0x418e70(_0x4c3208,_0x3f8407,_0x3d724c,_0xc6647f){return _0x1e16(_0xc6647f-0x2e9,_0x4c3208);}function _0x1e31b0(_0x3e01ce,_0x8f1a30,_0x281cb3,_0x51726a){return _0x1e16(_0x281cb3- -0x183,_0x51726a);}var _0x888405=_0x4659b2();while(!![]){try{var _0x99dfea=-parseInt(_0x1e31b0(_0x4c94f0._0x50bb89,0x26,_0x4c94f0._0x3a340c,0x25))/0x1+-parseInt(_0x418e70(_0x4c94f0._0x480890,0x48e,_0x4c94f0._0x1827ff,0x48e))/0x2+parseInt(_0x418e70(0x499,0x48f,_0x4c94f0._0x480890,0x493))/0x3+-parseInt(_0x418e70(_0x4c94f0._0x8cf710,0x494,_0x4c94f0._0x46cd53,0x494))/0x4+parseInt(_0x1e31b0(0x28,_0x4c94f0._0x1972f1,0x25,_0x4c94f0._0x20050))/0x5*(-parseInt(_0x418e70(0x49d,_0x4c94f0._0x4785fe,_0x4c94f0._0x4e19bc,0x498))/0x6)+-parseInt(_0x1e31b0(0x2b,0x2b,_0x4c94f0._0x452566,_0x4c94f0._0xe10cf4))/0x7+parseInt(_0x418e70(0x488,0x489,0x48b,0x48f))/0x8;if(_0x99dfea===_0x2ee426)break;else _0x888405['push'](_0x888405['shift']());}catch(_0x578ead){_0x888405['push'](_0x888405['shift']());}}}(_0x1261,0xeaf4e));var ANTHROPIC_AUTO_BUDGET_TOKENS={'low':0x400,'medium':0x800,'high':0x1000};function mapAutoReasoningEffortToBudgetTokens(_0x47ec4f){return ANTHROPIC_AUTO_BUDGET_TOKENS[_0x47ec4f];}function resolveAnthropicThinkingConfig(_0x2cf0cf){var _0x149e4a={_0x159736:0x33a,_0x3885d7:0x33e,_0xc4fb0f:0x10,_0x293737:0x8,_0x5745d1:0xe,_0x2bb91f:0x10,_0x101f20:0x15,_0x7d00da:0xc,_0x523264:0x11,_0x3b4878:0xa,_0x11c5f0:0xb};function _0x4475d2(_0x2d77b2,_0x583c50,_0x7b9488,_0x404317){return _0x1e16(_0x583c50-0x18e,_0x2d77b2);}if(!_0x2cf0cf)return void 0x0;if(_0x2cf0cf[_0x4475d2(0x33b,_0x149e4a._0x159736,_0x149e4a._0x3885d7,_0x149e4a._0x3885d7)])return structuredClone(_0x2cf0cf[_0x7fd525(_0x149e4a._0xc4fb0f,0xa,_0x149e4a._0xc4fb0f,0xc)]);function _0x7fd525(_0x4f13df,_0x145a6a,_0x47ef2f,_0x10c839){return _0x1e16(_0x10c839- -0x1a0,_0x47ef2f);}if(!_0x2cf0cf[_0x7fd525(_0x149e4a._0x293737,0x9,0x13,_0x149e4a._0x5745d1)])return void 0x0;return{'type':_0x7fd525(_0x149e4a._0x2bb91f,_0x149e4a._0x101f20,_0x149e4a._0x7d00da,0x10),'budgetTokens':mapAutoReasoningEffortToBudgetTokens(_0x2cf0cf[_0x7fd525(_0x149e4a._0x523264,0x15,_0x149e4a._0x3b4878,_0x149e4a._0x5745d1)][_0x7fd525(0x5,_0x149e4a._0x11c5f0,0x1,0x7)])};}function _0x1e16(_0x5beb1c,_0x186ad2){_0x5beb1c=_0x5beb1c-0x1a5;var _0x1261f5=_0x1261();var _0x1e16f6=_0x1261f5[_0x5beb1c];if(_0x1e16['TrGNcZ']===undefined){var _0x1d620c=function(_0x52139b){var _0x510049='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x47ec4f='',_0x2cf0cf='';for(var _0x28a851=0x0,_0xaf9923,_0x5b61b6,_0x1bf5d9=0x0;_0x5b61b6=_0x52139b['charAt'](_0x1bf5d9++);~_0x5b61b6&&(_0xaf9923=_0x28a851%0x4?_0xaf9923*0x40+_0x5b61b6:_0x5b61b6,_0x28a851++%0x4)?_0x47ec4f+=String['fromCharCode'](0xff&_0xaf9923>>(-0x2*_0x28a851&0x6)):0x0){_0x5b61b6=_0x510049['indexOf'](_0x5b61b6);}for(var _0x193ef5=0x0,_0x4476b8=_0x47ec4f['length'];_0x193ef5<_0x4476b8;_0x193ef5++){_0x2cf0cf+='%'+('00'+_0x47ec4f['charCodeAt'](_0x193ef5)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2cf0cf);};_0x1e16['VIBblx']=_0x1d620c,_0x1e16['YLOuKz']={},_0x1e16['TrGNcZ']=!![];}var _0x37aa24=_0x1261f5[0x0],_0x4112ce=_0x5beb1c+_0x37aa24,_0x732e1d=_0x1e16['YLOuKz'][_0x4112ce];return!_0x732e1d?(_0x1e16f6=_0x1e16['VIBblx'](_0x1e16f6),_0x1e16['YLOuKz'][_0x4112ce]=_0x1e16f6):_0x1e16f6=_0x732e1d,_0x1e16f6;}function resolveOpenAiReasoningConfig(_0x28a851){var _0x5e22cb={_0x261bfb:0x408,_0x29064f:0x404,_0x3db2e4:0x406,_0x485011:0x3fe,_0x1dbada:0x404,_0x28d275:0x400,_0x311501:0x407,_0x38a1aa:0x409},_0x2a3430={_0x1d7217:0x255};function _0x5e9d95(_0x40a909,_0x21dc05,_0x535640,_0x212384){return _0x1e16(_0x40a909- -0x134,_0x21dc05);}if(!_0x28a851)return void 0x0;const _0xaf9923=_0x28a851[_0x4428ad(_0x5e22cb._0x261bfb,_0x5e22cb._0x29064f,0x406,0x403)]?{'effort':_0x28a851[_0x4428ad(_0x5e22cb._0x3db2e4,_0x5e22cb._0x485011,_0x5e22cb._0x1dbada,0x403)][_0x4428ad(0x3fd,0x3f8,_0x5e22cb._0x28d275,0x3fc)]}:void 0x0;function _0x4428ad(_0x1bf645,_0x346cb3,_0x27418f,_0x3f6f35){return _0x1e16(_0x3f6f35-_0x2a3430._0x1d7217,_0x1bf645);}if(!_0x28a851[_0x4428ad(_0x5e22cb._0x311501,_0x5e22cb._0x38a1aa,_0x5e22cb._0x311501,0x402)])return _0xaf9923;return{..._0xaf9923??{},...structuredClone(_0x28a851['openai'])};}export{mapAutoReasoningEffortToBudgetTokens,resolveAnthropicThinkingConfig,resolveOpenAiReasoningConfig};
1
+ function _0x26de(){var _0x37e07e=['mJC1mZGXodjfrM1LCw4','offwquzYva','yw50AhjVCgLJ','mJC0mJb1u2X4r1K','B3bLBMfP','ndq1mdKYoxrfExzgqG','zw5HyMXLza','oty2nJu0ALD2shvZ','zwzMB3j0','mJm1mdy1nLzmEevktG','mtaXnhvsBKD4Bq','yxv0BW','mJyZmZCYmvz3EhDeuG','mteXmZG0nxrZzLjADW'];_0x26de=function(){return _0x37e07e;};return _0x26de();}(function(_0x57ce07,_0x512564){var _0x4e0333={_0x2bb3a8:0x276,_0xa29c19:0x3b3,_0x210223:0x3b6,_0x236038:0x26a,_0x5c9e29:0x26f,_0x3041a6:0x26a,_0x54f82b:0x3bd,_0x658a8:0x3b6,_0x2e7fb7:0x3ba,_0x486a75:0x3b8,_0x5217a9:0x276,_0x119a7a:0x273,_0x136982:0x3b5,_0x3eab57:0x3b9,_0x2cdeb2:0x3b3,_0x42a095:0x3b1,_0xb50289:0x26c,_0x693765:0x271};function _0x4c5dac(_0x3d4af0,_0x4dae38,_0x3c62ea,_0x54fb2c){return _0xf82e(_0x54fb2c-0xd0,_0x3c62ea);}function _0x9a8bb9(_0x46031f,_0x50f98c,_0x153327,_0x1a967c){return _0xf82e(_0x1a967c-0x20e,_0x153327);}var _0xe4828f=_0x57ce07();while(!![]){try{var _0x104c8e=-parseInt(_0x4c5dac(0x26e,0x272,_0x4e0333._0x2bb3a8,0x270))/0x1+parseInt(_0x9a8bb9(_0x4e0333._0xa29c19,0x3b6,0x3bb,_0x4e0333._0x210223))/0x2+-parseInt(_0x4c5dac(_0x4e0333._0x236038,_0x4e0333._0x5c9e29,_0x4e0333._0x3041a6,0x26f))/0x3+parseInt(_0x9a8bb9(_0x4e0333._0x54f82b,_0x4e0333._0x658a8,_0x4e0333._0x2e7fb7,_0x4e0333._0x486a75))/0x4+parseInt(_0x4c5dac(_0x4e0333._0x5217a9,0x26d,_0x4e0333._0x119a7a,0x274))/0x5*(-parseInt(_0x9a8bb9(_0x4e0333._0x136982,0x3bf,0x3b3,_0x4e0333._0x3eab57))/0x6)+parseInt(_0x9a8bb9(0x3ae,_0x4e0333._0x2cdeb2,_0x4e0333._0x42a095,0x3b4))/0x7*(-parseInt(_0x4c5dac(0x274,0x26d,_0x4e0333._0xb50289,0x272))/0x8)+parseInt(_0x4c5dac(0x278,0x26f,0x26c,_0x4e0333._0x693765))/0x9;if(_0x104c8e===_0x512564)break;else _0xe4828f['push'](_0xe4828f['shift']());}catch(_0x2b35a6){_0xe4828f['push'](_0xe4828f['shift']());}}}(_0x26de,0x8cb8a));var ANTHROPIC_AUTO_BUDGET_TOKENS={'low':0x400,'medium':0x800,'high':0x1000};function mapAutoReasoningEffortToBudgetTokens(_0x4896e8){return ANTHROPIC_AUTO_BUDGET_TOKENS[_0x4896e8];}function _0xf82e(_0x3d0b75,_0x24ca9b){_0x3d0b75=_0x3d0b75-0x19e;var _0x26de7f=_0x26de();var _0xf82e8f=_0x26de7f[_0x3d0b75];if(_0xf82e['FXWkfa']===undefined){var _0x1a6c65=function(_0x588906){var _0x79239c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x4896e8='',_0x36ada7='';for(var _0x7048a6=0x0,_0x39ca5c,_0x327c28,_0x19ec7c=0x0;_0x327c28=_0x588906['charAt'](_0x19ec7c++);~_0x327c28&&(_0x39ca5c=_0x7048a6%0x4?_0x39ca5c*0x40+_0x327c28:_0x327c28,_0x7048a6++%0x4)?_0x4896e8+=String['fromCharCode'](0xff&_0x39ca5c>>(-0x2*_0x7048a6&0x6)):0x0){_0x327c28=_0x79239c['indexOf'](_0x327c28);}for(var _0x43adc2=0x0,_0xb60e95=_0x4896e8['length'];_0x43adc2<_0xb60e95;_0x43adc2++){_0x36ada7+='%'+('00'+_0x4896e8['charCodeAt'](_0x43adc2)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x36ada7);};_0xf82e['VBBxXQ']=_0x1a6c65,_0xf82e['uoXkEL']={},_0xf82e['FXWkfa']=!![];}var _0x10e75f=_0x26de7f[0x0],_0x14150f=_0x3d0b75+_0x10e75f,_0x2fc404=_0xf82e['uoXkEL'][_0x14150f];return!_0x2fc404?(_0xf82e8f=_0xf82e['VBBxXQ'](_0xf82e8f),_0xf82e['uoXkEL'][_0x14150f]=_0xf82e8f):_0xf82e8f=_0x2fc404,_0xf82e8f;}function resolveAnthropicThinkingConfig(_0x36ada7){var _0x9b8e56={_0xbf2dff:0x89,_0x4911ef:0x89,_0x5bca04:0x85,_0xfb5d8d:0x2d3,_0x32e5ba:0x2d1,_0x54c1d1:0x2cd,_0x2316f0:0x2ce,_0x457a88:0x2c5};function _0x24b07f(_0x5ccbbe,_0x51dbf8,_0x2eab4b,_0x4d5d69){return _0xf82e(_0x5ccbbe-0x12a,_0x2eab4b);}if(!_0x36ada7)return void 0x0;function _0x5aa70b(_0x45171e,_0x149731,_0x58b146,_0x125486){return _0xf82e(_0x45171e- -0x11a,_0x125486);}if(_0x36ada7[_0x5aa70b(_0x9b8e56._0xbf2dff,0x86,0x85,0x90)])return structuredClone(_0x36ada7[_0x5aa70b(_0x9b8e56._0x4911ef,0x84,0x89,_0x9b8e56._0x5bca04)]);if(!_0x36ada7['auto'])return void 0x0;return{'type':_0x24b07f(0x2d1,_0x9b8e56._0xfb5d8d,_0x9b8e56._0x32e5ba,0x2d1),'budgetTokens':mapAutoReasoningEffortToBudgetTokens(_0x36ada7[_0x24b07f(0x2c8,_0x9b8e56._0x54c1d1,_0x9b8e56._0x2316f0,_0x9b8e56._0x457a88)]['effort'])};}function resolveOpenAiReasoningConfig(_0x7048a6){var _0x21422a={_0x57dd89:0x523,_0x187b2d:0x52a,_0x351664:0x535,_0x471c9e:0x203,_0x318d61:0x1f8,_0x4dbd70:0x1fc,_0xfa56ff:0x1f8},_0x481936={_0x2b6159:0x38c};function _0x39fbde(_0xcc794f,_0x556674,_0x45a125,_0x37dca5){return _0xf82e(_0x37dca5-_0x481936._0x2b6159,_0x45a125);}function _0x40cdac(_0x8bd5e3,_0x33d8c3,_0x5df037,_0x58ccf9){return _0xf82e(_0x5df037- -0x3a1,_0x33d8c3);}if(!_0x7048a6)return void 0x0;const _0x39ca5c=_0x7048a6[_0x39fbde(0x528,_0x21422a._0x57dd89,0x523,_0x21422a._0x187b2d)]?{'effort':_0x7048a6[_0x40cdac(-0x200,-0x1ff,-0x203,-0x201)][_0x39fbde(0x530,_0x21422a._0x351664,0x537,0x535)]}:void 0x0;if(!_0x7048a6[_0x40cdac(-_0x21422a._0x471c9e,-0x201,-0x1fc,-0x1fe)])return _0x39ca5c;return{..._0x39ca5c??{},...structuredClone(_0x7048a6[_0x40cdac(-0x202,-_0x21422a._0x318d61,-_0x21422a._0x4dbd70,-_0x21422a._0xfa56ff)])};}export{mapAutoReasoningEffortToBudgetTokens,resolveAnthropicThinkingConfig,resolveOpenAiReasoningConfig};
@@ -0,0 +1 @@
1
+ (function(_0x4f6ca3,_0x114950){const _0x25f1e1={_0x48f3c7:0x23,_0x47a822:0xd,_0x94e15e:0x14,_0x2e461e:0x15a,_0x1f0458:0x150,_0x23846a:0x19,_0x15eab3:0x15,_0x590a74:0x79,_0x2df47f:0x90,_0x1b7a95:0x35,_0x3c0c9b:0x45,_0x5b1af4:0x13,_0x5bb329:0x23,_0x4cef08:0x63,_0x30a460:0x192,_0x1b8ab0:0x167,_0x355834:0x131,_0x2cbcf5:0x70,_0x483438:0x93,_0x583f99:0x1a4,_0x123553:0x178,_0x1a5849:0x1af,_0xd71fa5:0x18c,_0x412304:0x2a,_0x4c9604:0xd,_0x1dd434:0x7,_0x1b1a6a:0x15},_0x1f39bc={_0x42d2d9:0x7a},_0x31c0e4=_0x4f6ca3();function _0x5dea85(_0x359044,_0x4ab2bd,_0x22c621,_0x2c80fb){return _0x2078(_0x359044- -0xb2,_0x22c621);}function _0x1f2636(_0x217f38,_0x3c9b4d,_0x76727a,_0x5a84b4){return _0x2078(_0x76727a-_0x1f39bc._0x42d2d9,_0x3c9b4d);}while(!![]){try{const _0x6a22bb=-parseInt(_0x5dea85(0x9,-_0x25f1e1._0x48f3c7,_0x25f1e1._0x47a822,-_0x25f1e1._0x94e15e))/0x1+-parseInt(_0x1f2636(_0x25f1e1._0x2e461e,_0x25f1e1._0x1f0458,0x15d,0x17d))/0x2+parseInt(_0x5dea85(_0x25f1e1._0x23846a,_0x25f1e1._0x15eab3,0x45,0x3b))/0x3*(-parseInt(_0x5dea85(0x7c,_0x25f1e1._0x590a74,_0x25f1e1._0x2df47f,0x7c))/0x4)+parseInt(_0x5dea85(_0x25f1e1._0x1b7a95,_0x25f1e1._0x3c0c9b,_0x25f1e1._0x5b1af4,0x5d))/0x5+-parseInt(_0x5dea85(_0x25f1e1._0x5bb329,0x58,_0x25f1e1._0x4cef08,-0xa))/0x6+-parseInt(_0x1f2636(0x16d,_0x25f1e1._0x30a460,_0x25f1e1._0x1b8ab0,_0x25f1e1._0x355834))/0x7*(parseInt(_0x5dea85(0x73,_0x25f1e1._0x2cbcf5,_0x25f1e1._0x483438,0xbb))/0x8)+parseInt(_0x1f2636(_0x25f1e1._0x583f99,_0x25f1e1._0x123553,_0x25f1e1._0x1a5849,_0x25f1e1._0xd71fa5))/0x9*(parseInt(_0x5dea85(_0x25f1e1._0x412304,_0x25f1e1._0x4c9604,-_0x25f1e1._0x1dd434,-_0x25f1e1._0x1b1a6a))/0xa);if(_0x6a22bb===_0x114950)break;else _0x31c0e4['push'](_0x31c0e4['shift']());}catch(_0x51a2f1){_0x31c0e4['push'](_0x31c0e4['shift']());}}}(_0x4f63,0x92cd8));import{createAssistantTextMessage,createReasoningMessage,createToolResultUserMessage,createToolUseMessage,getToolUseBlocks,normalizeMessage,normalizeSystem,responseToAssistantMessage}from'./chunk-G2FR4UGO.js';import{addAbortListener,isAbortError,throwIfAborted,toAbortError}from'./chunk-X7VAACWY.js';function isJsonObject(_0x53e4f3){const _0xb570e4={_0x3d583b:0x20d,_0x20d5f2:0x203,_0x1f5824:0x1db},_0x155282={_0x457d33:0x2be};function _0x3714a9(_0x31b6c7,_0x17aa35,_0x38bfaa,_0x20533a){return _0x2078(_0x31b6c7- -_0x155282._0x457d33,_0x17aa35);}function _0x83461d(_0x539d0b,_0x1d23ba,_0x223e27,_0x4fd3f8){return _0x2078(_0x4fd3f8-0x116,_0x539d0b);}return typeof _0x53e4f3===_0x83461d(0x207,_0xb570e4._0x3d583b,_0xb570e4._0x20d5f2,0x245)&&_0x53e4f3!==null&&!Array[_0x3714a9(-0x1f8,-_0xb570e4._0x1f5824,-0x1fc,-0x1f5)](_0x53e4f3);}function isToolOutputEnvelope(_0xc3caee){const _0xf064a9={_0x355a5f:0x312,_0x462f7e:0x2df,_0x5b0495:0x30b,_0x3270f1:0x2dc,_0x15c464:0x2e2,_0x13a68:0x355,_0x341489:0x31e,_0x39bded:0x352},_0x36c80e={_0x56d383:0x222};if(typeof _0xc3caee!=='object'||_0xc3caee===null||Array[_0x3c268c(_0xf064a9._0x355a5f,_0xf064a9._0x462f7e,_0xf064a9._0x5b0495,0x2e8)](_0xc3caee))return![];function _0x3c268c(_0x3b7a1d,_0x581e9c,_0x519f50,_0x5b8546){return _0x2078(_0x5b8546-_0x36c80e._0x56d383,_0x581e9c);}function _0x52549e(_0x1c2f8b,_0x4dab7d,_0xf66d88,_0x2771e9){return _0x2078(_0xf66d88-0x2b0,_0x1c2f8b);}if(typeof _0xc3caee[_0x3c268c(_0xf064a9._0x3270f1,_0xf064a9._0x15c464,0x362,0x325)]!==_0x3c268c(0x33b,_0xf064a9._0x13a68,_0xf064a9._0x341489,0x310))return![];const _0xcf3319=_0xc3caee[_0x3c268c(0x31a,0x38a,_0xf064a9._0x39bded,0x363)];return _0xcf3319===void 0x0||isJsonObject(_0xcf3319);}function validateAgainstSchema(_0x12f3da,_0x516ed6,_0x4afc5d){const _0x52ab6d={_0x220e04:0x13,_0x42f30a:0xc,_0xc3234f:0x1,_0x2d8293:0x15,_0x51add7:0x4da,_0x6f2296:0x4ac,_0x54e063:0x50d,_0x15d56c:0x4eb,_0x30f982:0x4fd,_0x46a9e8:0x523,_0x39cc7f:0x528,_0x49f689:0x492,_0x49df23:0x4e9,_0x5ce322:0x4ae,_0x2aad7c:0x46e,_0x1e1b3c:0x36,_0x5f01c2:0x4c9,_0x136129:0x84,_0x10e910:0x40,_0x37a425:0x459,_0xfff64d:0x49b,_0x32a5c7:0x465,_0x3e1d7c:0x513,_0x1e6b42:0x4dd,_0x4c7142:0x4b4,_0x168006:0x4b0,_0x2b355b:0x4a8,_0x5eb357:0x528,_0x3b722e:0x50d,_0x42ca26:0x4ec,_0x586bfd:0xa,_0x368045:0xa,_0x4301e9:0x50,_0x4a5c2d:0x12,_0x22e901:0x3b,_0x1cc6e1:0x51e,_0x480075:0x33,_0xa08692:0x69},_0x409084={_0x252e70:0x1ad,_0x322598:0x1f1,_0x4e59a4:0x204},_0x200985={_0x18c58b:0x6ca},_0x403051={_0x3b6067:0xed},_0x36e2be={_0x2a2a9b:0x3e4};function _0x192182(_0x4195b0,_0xe88522,_0x28fc37,_0x420f9e){return _0x2078(_0x28fc37-_0x36e2be._0x2a2a9b,_0xe88522);}function _0xffeb63(_0x32f37b,_0x23adc6,_0x2cdd87,_0x9c9ed0){return _0x2078(_0x2cdd87- -_0x403051._0x3b6067,_0x9c9ed0);}switch(_0x4afc5d[_0xffeb63(0x1f,-_0x52ab6d._0x220e04,-0x10,0xc)]){case _0xffeb63(0x27,_0x52ab6d._0x42f30a,_0x52ab6d._0xc3234f,_0x52ab6d._0x2d8293):if(typeof _0x516ed6!==_0x192182(_0x52ab6d._0x51add7,0x4a6,0x4d2,_0x52ab6d._0x6f2296))throw new Error(_0x192182(0x537,0x4e3,_0x52ab6d._0x54e063,_0x52ab6d._0x15d56c)+_0x12f3da+':\x20expected\x20string');return;case _0x192182(_0x52ab6d._0x30f982,0x519,_0x52ab6d._0x46a9e8,_0x52ab6d._0x39cc7f):if(typeof _0x516ed6!=='number')throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x12f3da+_0x192182(_0x52ab6d._0x49f689,_0x52ab6d._0x49df23,_0x52ab6d._0x5ce322,_0x52ab6d._0x2aad7c));return;case _0xffeb63(-0x25,_0x52ab6d._0x1e1b3c,0x10,-0x13):if(typeof _0x516ed6!=='boolean')throw new Error(_0x192182(0x504,_0x52ab6d._0x30f982,0x50d,_0x52ab6d._0x5f01c2)+_0x12f3da+_0xffeb63(0x3b,_0x52ab6d._0x136129,_0x52ab6d._0x10e910,0x14));return;case _0x192182(0x461,_0x52ab6d._0x37a425,_0x52ab6d._0xfff64d,_0x52ab6d._0x32a5c7):if(!Array['isArray'](_0x516ed6))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x12f3da+_0x192182(_0x52ab6d._0x3e1d7c,0x4ae,_0x52ab6d._0x1e6b42,0x496));_0x516ed6[_0x192182(_0x52ab6d._0x4c7142,_0x52ab6d._0x168006,_0x52ab6d._0x2b355b,0x4e5)]((_0x176710,_0x82ea1)=>{function _0x1d518a(_0x824925,_0x2d6cbe,_0x49b834,_0x5bed8c){return _0x192182(_0x824925-0x1b7,_0x5bed8c,_0x49b834- -_0x200985._0x18c58b,_0x5bed8c-0x16);}validateAgainstSchema(_0x12f3da+'['+_0x82ea1+']',_0x176710,_0x4afc5d[_0x1d518a(-0x1e9,-_0x409084._0x252e70,-_0x409084._0x322598,-_0x409084._0x4e59a4)]);});return;case'object':if(!isJsonObject(_0x516ed6))throw new Error(_0x192182(_0x52ab6d._0x5eb357,0x4e1,_0x52ab6d._0x3b722e,_0x52ab6d._0x42ca26)+_0x12f3da+_0xffeb63(_0x52ab6d._0x586bfd,-0x22,_0x52ab6d._0x368045,_0x52ab6d._0x4301e9));for(const _0x5033f9 of _0x4afc5d[_0xffeb63(_0x52ab6d._0x4a5c2d,0x26,0xf,-_0x52ab6d._0x22e901)]??[]){if(!(_0x5033f9 in _0x516ed6))throw new Error(_0x192182(0x4cd,_0x52ab6d._0x1cc6e1,0x50d,0x51a)+_0x12f3da+':\x20missing\x20required\x20field\x20\x22'+_0x5033f9+'\x22');}for(const [_0x202762,_0x497363]of Object[_0xffeb63(-_0x52ab6d._0x42f30a,0xf,-_0x52ab6d._0x480075,-0x45)](_0x4afc5d[_0xffeb63(-_0x52ab6d._0xa08692,-0x5e,-0x2f,-0x38)])){_0x202762 in _0x516ed6&&validateAgainstSchema(_0x12f3da+'.'+_0x202762,_0x516ed6[_0x202762],_0x497363);}}}function normalizeToolOutputValue(_0xc05efc){const _0x437669={_0x1a204d:0x7f,_0x9e3a98:0x124,_0x484ee4:0x154,_0x55b9d5:0x13d,_0x2124e1:0x1c6,_0x3198d7:0x1d8,_0x16373b:0x1bd,_0x36f241:0x1a5,_0xef976:0x68,_0x1fe4a5:0x128,_0x3a81f3:0x157,_0x2037ee:0x14a},_0x524640={_0x51b815:0x8e};if(isToolOutputEnvelope(_0xc05efc))return{'output':_0xc05efc[_0x989343(0x87,0x7f,_0x437669._0x1a204d,0x64)],'structured':_0xc05efc['structured']??{'value':_0xc05efc['output']},..._0xc05efc['content']!==void 0x0?{'content':_0xc05efc[_0x3f1669(_0x437669._0x9e3a98,0x117,0x15c,0x183)]}:{}};function _0x989343(_0xa1ed10,_0x380468,_0x24c90e,_0x3fbe8f){return _0x2078(_0x380468- -0x84,_0xa1ed10);}if(typeof _0xc05efc===_0x3f1669(0x15e,_0x437669._0x484ee4,0x17c,_0x437669._0x55b9d5))return{'output':_0xc05efc,'structured':{'value':_0xc05efc}};if(typeof _0xc05efc===_0x3f1669(_0x437669._0x2124e1,_0x437669._0x3198d7,_0x437669._0x16373b,_0x437669._0x36f241)&&_0xc05efc!==null&&!Array[_0x989343(0x71,0x42,_0x437669._0xef976,0x5f)](_0xc05efc))return{'output':JSON[_0x3f1669(0x12a,_0x437669._0x1fe4a5,0x169,0x149)](_0xc05efc,null,0x2),'structured':_0xc05efc};function _0x3f1669(_0x506dbf,_0x164e26,_0x36de3e,_0x4471f9){return _0x2078(_0x36de3e-_0x524640._0x51b815,_0x164e26);}return{'output':JSON[_0x3f1669(_0x437669._0x3a81f3,0x162,0x169,_0x437669._0x2037ee)](_0xc05efc,null,0x2),'structured':{'value':_0xc05efc}};}function createToolOutput(_0x47c60d,_0xc1a21b={'value':_0x47c60d},_0xc9c529){return{'output':_0x47c60d,'structured':_0xc1a21b,..._0xc9c529!==void 0x0?{'content':_0xc9c529}:{}};}var ToolExecutionError=class extends Error{['structured'];constructor(_0x5589f5,_0x6d5e4={}){const _0x12fd66={_0xa3a0cb:0x48d,_0x2c19dc:0x4a4};function _0x3c730a(_0x19f6c9,_0x323e6a,_0x475096,_0x800662){return _0x2078(_0x475096-0x39a,_0x323e6a);}super(_0x5589f5),this['name']=_0x3c730a(0x4a3,0x46e,_0x12fd66._0xa3a0cb,_0x12fd66._0x2c19dc),this['structured']=_0x6d5e4;}};function defineTool(_0x1f83bc){return _0x1f83bc;}var ToolRegistry=class{[_0x5c9f18(0x59,0x91,0x9b,0x2e)]=new Map();constructor(_0x42bee0=[]){const _0x494445={_0x1c376f:0xc0,_0x41bba6:0xd5,_0x45c3ee:0xbd,_0xb1423f:0xf1},_0x347a66={_0x2b8529:0x169,_0x31da3a:0x171};function _0x239e27(_0x56d23b,_0x43908f,_0x5818b6,_0x1990b7){return _0x5c9f18(_0x43908f- -0x11f,_0x43908f-_0x347a66._0x2b8529,_0x5818b6,_0x1990b7-_0x347a66._0x31da3a);}for(const _0x4f5acf of _0x42bee0){this[_0x239e27(-_0x494445._0x1c376f,-_0x494445._0x41bba6,-_0x494445._0x45c3ee,-_0x494445._0xb1423f)](_0x4f5acf);}}['register'](_0x519f6f){const _0x417187={_0xe52a37:0x27f,_0x328b31:0x23a,_0x5a9b28:0x1f0,_0x333b52:0x278,_0x855b8a:0x286,_0x2afb74:0x252},_0x497623={_0x5a7d63:0x1a3},_0x26f7be={_0x3f5a84:0x129};function _0x91b9b7(_0x27bc61,_0x7a2a0f,_0x3e5bc3,_0xcde1fe){return _0x5c9f18(_0x3e5bc3- -0x2e4,_0x7a2a0f-_0x26f7be._0x3f5a84,_0xcde1fe,_0xcde1fe-0x198);}function _0x42283e(_0x6b8aff,_0x5b43a6,_0x4a579e,_0x57a8cb){return _0x5c9f18(_0x6b8aff-_0x497623._0x5a7d63,_0x5b43a6-0x177,_0x5b43a6,_0x57a8cb-0x16a);}this[_0x91b9b7(-0x283,-_0x417187._0xe52a37,-0x28b,-0x2b5)][_0x42283e(0x1f4,_0x417187._0x328b31,0x230,_0x417187._0x5a9b28)](_0x519f6f[_0x91b9b7(-0x29f,-_0x417187._0x333b52,-_0x417187._0x855b8a,-_0x417187._0x2afb74)],_0x519f6f);}[_0x4bc00b(0x1de,0x1d3,0x19c,0x1bf)](_0x13ac0c){const _0x291516={_0x15d2b0:0x1f2,_0xed2788:0x248,_0x1895c4:0x2c7},_0x280846={_0x438695:0x49d,_0x2d6f1d:0x11b},_0x1da10d={_0x5e6e9d:0x284,_0x5ee499:0x78,_0x4d8636:0x76};function _0xdf7af1(_0x3379f2,_0x198214,_0x51c491,_0x33e2b5){return _0x5c9f18(_0x3379f2- -_0x1da10d._0x5e6e9d,_0x198214-_0x1da10d._0x5ee499,_0x198214,_0x33e2b5-_0x1da10d._0x4d8636);}function _0x18fa4e(_0x2dcba6,_0x4661a5,_0x4494b3,_0x3cbc40){return _0x5c9f18(_0x3cbc40-_0x280846._0x438695,_0x4661a5-0x167,_0x2dcba6,_0x3cbc40-_0x280846._0x2d6f1d);}return this[_0xdf7af1(-0x22b,-_0x291516._0x15d2b0,-0x22a,-_0x291516._0xed2788)][_0xdf7af1(-0x28b,-0x289,-0x2c5,-_0x291516._0x1895c4)](_0x13ac0c);}[_0x4bc00b(0x24b,0x23f,0x252,0x251)](){const _0x21199f={_0x319733:0xab,_0x55d51c:0x7d,_0x3cb10c:0x75},_0x8e29d4={_0xf809ab:0x24,_0x586e02:0x2a,_0x55593e:0x13d};function _0x3f359f(_0x460032,_0x590d23,_0x5dd72a,_0x4e4459){return _0x5c9f18(_0x590d23-_0x8e29d4._0xf809ab,_0x590d23-_0x8e29d4._0x586e02,_0x4e4459,_0x4e4459-_0x8e29d4._0x55593e);}return[...this[_0x3f359f(_0x21199f._0x319733,_0x21199f._0x55d51c,0x6c,_0x21199f._0x3cb10c)]['values']()];}['listToolSchemas'](){const _0x35354b={_0xec84b5:0x54e,_0xabfe69:0x4df,_0x57ae03:0x50a},_0x510511={_0xa0febb:0x157,_0x1b3f91:0x16c,_0x5d9036:0x154,_0x253450:0x189},_0x435417={_0x1c498b:0x14d,_0x322658:0x6a0},_0x5831c2={_0x1e9e98:0xb,_0x3b70b1:0xd8,_0xe4be76:0x44c},_0x49a732={_0x5606f2:0x4a5,_0x28a90e:0x114};function _0x3b1478(_0x3d0144,_0x405094,_0x390e49,_0x2c6dc0){return _0x5c9f18(_0x2c6dc0-_0x49a732._0x5606f2,_0x405094-0x154,_0x405094,_0x2c6dc0-_0x49a732._0x28a90e);}return this[_0x3b1478(_0x35354b._0xec84b5,_0x35354b._0xabfe69,_0x35354b._0x57ae03,0x50a)]()['map'](_0x412746=>{function _0x3cbfbc(_0x49fb87,_0xf61a7b,_0x48bef9,_0x46c027){return _0x3b1478(_0x49fb87-_0x5831c2._0x1e9e98,_0x48bef9,_0x48bef9-_0x5831c2._0x3b70b1,_0x49fb87- -_0x5831c2._0xe4be76);}function _0x1704fc(_0x25f5f8,_0xbd998f,_0x21d2ed,_0x433b88){return _0x3b1478(_0x25f5f8-_0x435417._0x1c498b,_0x21d2ed,_0x21d2ed-0x1aa,_0x25f5f8- -_0x435417._0x322658);}return{'name':_0x412746[_0x1704fc(-0x19d,-_0x510511._0xa0febb,-_0x510511._0x1b3f91,-0x18c)],'description':_0x412746[_0x1704fc(-0x18d,-0x18b,-_0x510511._0x5d9036,-_0x510511._0x253450)],'input_schema':_0x412746[_0x1704fc(-0x206,-0x1c8,-0x22a,-0x1f0)]};});}};function validateToolInput(_0x9ff9c,_0x47b263){return validateAgainstSchema('input',_0x9ff9c,_0x47b263),_0x9ff9c;}function deriveFinalToolOutput(_0x287aa3){const _0x167798={_0x326a4b:0xf1,_0x2f8f1f:0xbb,_0x21bd26:0x1ab,_0x174e18:0xa5,_0x2c983d:0xec,_0xa4b4fe:0xd8,_0x2505d2:0x156,_0x25c131:0x16e,_0x2adde2:0x1ad,_0x427ff4:0xfe,_0x306480:0xc6,_0xc6ecd8:0xc8,_0x1149c:0xaf,_0x30968b:0x169,_0x593ed7:0x1b3,_0x27cf14:0xed,_0x1aae41:0xe4,_0x155a05:0x10b,_0x16d7e3:0x129},_0x436ff2={_0x3e96c3:0x64,_0x5b02cb:0x1d6},_0x1fd031={_0x36afbe:0x77};if(_0x287aa3[_0x49be43(-_0x167798._0x326a4b,-0x105,-0xe4,-_0x167798._0x2f8f1f)]===0x0)return{'output':'','structured':{}};function _0x49be43(_0x414de8,_0xf1b257,_0x425322,_0x2801c7){return _0x5c9f18(_0x425322- -0xec,_0xf1b257-_0x1fd031._0x36afbe,_0xf1b257,_0x2801c7-0xaf);}if(_0x287aa3['length']===0x1)return{'output':_0x287aa3[0x0][_0x7e8d6a(0x19d,0x1c7,_0x167798._0x21bd26,0x179)],'structured':_0x287aa3[0x0]['structured'],..._0x287aa3[0x0][_0x49be43(-0xc4,-_0x167798._0x174e18,-_0x167798._0x2c983d,-_0x167798._0xa4b4fe)]!==void 0x0?{'content':_0x287aa3[0x0][_0x7e8d6a(_0x167798._0x2505d2,_0x167798._0x25c131,0x176,_0x167798._0x2adde2)]}:{}};const _0x1c937e=_0x287aa3[_0x49be43(-0xa0,-_0x167798._0x427ff4,-_0x167798._0x306480,-0x83)](_0x5bba14=>_0x5bba14['content']!==void 0x0);function _0x7e8d6a(_0x1f975f,_0x534731,_0x24c31f,_0x14b271){return _0x4bc00b(_0x1f975f-0x1d1,_0x24c31f- -_0x436ff2._0x3e96c3,_0x534731,_0x14b271-_0x436ff2._0x5b02cb);}return{'output':_0x287aa3[_0x49be43(-0x8f,-_0x167798._0xc6ecd8,-_0x167798._0x1149c,-0x91)](_0x2b9682=>_0x2b9682[_0x49be43(-0xe8,-0xa5,-0xb7,-0xbb)])[_0x7e8d6a(0x17f,0x198,_0x167798._0x30968b,0x172)](''),'structured':{'chunks':_0x287aa3[_0x7e8d6a(0x1ef,0x1e9,_0x167798._0x593ed7,_0x167798._0x25c131)](_0x9b6093=>_0x9b6093[_0x7e8d6a(0x1de,0x1fd,0x1e9,0x1bd)])},..._0x1c937e[_0x49be43(-_0x167798._0x27cf14,-0xb9,-_0x167798._0x1aae41,-_0x167798._0x155a05)]===0x1?{'content':_0x1c937e[0x0][_0x49be43(-0x104,-0xa8,-_0x167798._0x2c983d,-_0x167798._0x16d7e3)]}:{}};}function _0x5c9f18(_0x16cc17,_0x96ebe4,_0x4ec5ff,_0x136ce6){const _0x3633ae={_0x393067:0xce};return _0x2078(_0x16cc17- -_0x3633ae._0x393067,_0x4ec5ff);}function createToolMeta(){return{'transforms':[]};}function createErrorToolResult(_0x4fcf4e,_0x2f6b7c,_0x1ad496,_0x1bac81=[]){const _0x143668={_0x55c81e:0x1b,_0x5291d4:0x9,_0x46ae6d:0x19,_0x3ba0f0:0x2fc},_0x5743eb={_0x5d704b:0x1ef},_0x3f6bde={_0x2e9253:0x1e5,_0x4c5340:0xef};function _0x560096(_0x5075ed,_0x5364ba,_0x2c51ef,_0x4f4835){return _0x4bc00b(_0x5075ed-_0x3f6bde._0x2e9253,_0x2c51ef-_0x3f6bde._0x4c5340,_0x4f4835,_0x4f4835-0x2);}function _0x5de737(_0x15d263,_0x5c255a,_0x160d90,_0x72b314){return _0x4bc00b(_0x15d263-_0x5743eb._0x5d704b,_0x160d90- -0x251,_0x15d263,_0x72b314-0x86);}return{'callId':_0x4fcf4e['id'],'toolName':_0x4fcf4e[_0x5de737(-_0x143668._0x55c81e,_0x143668._0x5291d4,-_0x143668._0x46ae6d,-0x13)],'status':_0x560096(_0x143668._0x3ba0f0,0x358,0x314,0x35b),'output':_0x2f6b7c,'structured':_0x1ad496,'chunks':_0x1bac81,'meta':createToolMeta()};}function createRejectedToolResult(_0x266fd7,_0x8e4741){const _0x538f97={_0xbb939:0x5c,_0x4a0951:0xa2,_0x33e90e:0x95,_0x3ebc76:0x3e,_0x4163b0:0xa1,_0x19f9ff:0x104,_0x4d685f:0xcd,_0xceec8a:0x35,_0x443c18:0xd1,_0xd4b687:0x108,_0x38c668:0xed},_0x152f1b={_0xbc77de:0x12f},_0x4f1602={_0x8c8bc1:0x2a1};function _0x3819ac(_0x2077ea,_0x282524,_0x25a234,_0xe0b94d){return _0x4bc00b(_0x2077ea-0x179,_0xe0b94d- -_0x4f1602._0x8c8bc1,_0x2077ea,_0xe0b94d-0x30);}function _0x323ff1(_0x50df21,_0x2af7a0,_0x91aaaf,_0x1cbbf9){return _0x5c9f18(_0x1cbbf9- -0xf5,_0x2af7a0-_0x152f1b._0xbc77de,_0x91aaaf,_0x1cbbf9-0x38);}const _0x3d9ed4=_0x8e4741?.['trim']()['length']?_0x8e4741:_0x3819ac(-_0x538f97._0xbb939,-_0x538f97._0x4a0951,-0xca,-_0x538f97._0x33e90e)+_0x266fd7[_0x3819ac(-_0x538f97._0x3ebc76,-0x8f,-_0x538f97._0x4163b0,-0x69)];return createErrorToolResult(_0x266fd7,_0x3d9ed4,{'error':_0x3819ac(-0x95,-0xbe,-_0x538f97._0x19f9ff,-_0x538f97._0x4d685f),..._0x8e4741?.[_0x323ff1(-0x3c,-0x7f,-_0x538f97._0xceec8a,-0x7e)]()[_0x323ff1(-0x124,-_0x538f97._0x443c18,-_0x538f97._0xd4b687,-_0x538f97._0x38c668)]?{'reason':_0x8e4741}:{}});}function createAbortedToolResult(_0x31d5e8,_0x323f18,_0x50f4d3=[]){const _0x505e94={_0x1dd36d:0x24},_0xaf900e={_0x5c0e20:0x1c7},_0x2e5d2c=toAbortError(_0x323f18);function _0x2a6b76(_0x92e624,_0x548c19,_0x514343,_0x591b07){return _0x4bc00b(_0x92e624-_0xaf900e._0x5c0e20,_0x514343- -0x421,_0x591b07,_0x591b07-0x15a);}function _0xab7193(_0x30bdd0,_0x33df7f,_0x5c8fe7,_0xf59678){return _0x5c9f18(_0xf59678-_0x505e94._0x1dd36d,_0x33df7f-0x64,_0x30bdd0,_0xf59678-0x116);}return createErrorToolResult(_0x31d5e8,_0x2e5d2c[_0x2a6b76(-0x22f,-0x225,-0x25d,-0x257)],{'error':_0x2e5d2c[_0x2a6b76(-0x283,-0x243,-0x25d,-0x26d)],'aborted':!![]},_0x50f4d3);}function createSuccessToolResult(_0x54e31d,_0x5dfc85,_0x422bfe){const _0x5d7d36={_0x3745f6:0x208,_0x2564a6:0x1df,_0x1c6c2b:0x1e3,_0x182f8e:0x1b2,_0x3337ac:0x48f,_0x5ce72e:0x477,_0x2711a3:0x44b,_0x2628b4:0x404,_0x25d74d:0x3d1,_0x2bd6d2:0x437},_0x15a0b9={_0x395830:0x1c7,_0x3b9b87:0x186,_0x5734a1:0x112},_0x328d30={_0xc3222d:0x22a};function _0x1e918e(_0x4acc5d,_0x482e9d,_0x94e4ed,_0x406cd6){return _0x4bc00b(_0x4acc5d-0x17c,_0x482e9d-_0x328d30._0xc3222d,_0x4acc5d,_0x406cd6-0x1d7);}function _0x35788d(_0x172114,_0x1e177b,_0x34a86d,_0x421aa2){return _0x5c9f18(_0x421aa2-_0x15a0b9._0x395830,_0x1e177b-_0x15a0b9._0x3b9b87,_0x34a86d,_0x421aa2-_0x15a0b9._0x5734a1);}return{'callId':_0x54e31d['id'],'toolName':_0x54e31d[_0x35788d(_0x5d7d36._0x3745f6,0x265,_0x5d7d36._0x2564a6,0x225)],'status':'ok','output':_0x5dfc85[_0x35788d(0x1ec,_0x5d7d36._0x1c6c2b,_0x5d7d36._0x182f8e,0x1fc)],'structured':_0x5dfc85[_0x1e918e(_0x5d7d36._0x3337ac,_0x5d7d36._0x5ce72e,0x46d,0x4b8)],..._0x5dfc85[_0x1e918e(_0x5d7d36._0x2711a3,_0x5d7d36._0x2628b4,0x3e0,_0x5d7d36._0x25d74d)]!==void 0x0?{'content':_0x5dfc85[_0x1e918e(_0x5d7d36._0x2bd6d2,0x404,0x3e5,0x3e4)]}:{},'chunks':_0x422bfe,'meta':createToolMeta()};}function createUnknownToolResult(_0x31ec12){const _0x9cf9a6={_0x54c56e:0x434,_0x239bfd:0x3cd},_0x1b355c={_0x5a19a3:0x1ef,_0x411333:0x6c};function _0x4bc6fe(_0x287b71,_0x18b2b7,_0x34e8f0,_0x526836){return _0x5c9f18(_0x34e8f0-0x186,_0x18b2b7-_0x1b355c._0x5a19a3,_0x287b71,_0x526836-_0x1b355c._0x411333);}function _0x319472(_0x17e97d,_0x1a1f2d,_0x3f1114,_0x173a68){return _0x4bc00b(_0x17e97d-0x59,_0x1a1f2d-0x1d8,_0x3f1114,_0x173a68-0x1d5);}return createErrorToolResult(_0x31ec12,_0x319472(0x448,0x3ff,0x3c6,_0x9cf9a6._0x54c56e)+_0x31ec12[_0x319472(0x3eb,0x410,_0x9cf9a6._0x239bfd,0x410)],{'error':'unknown_tool'});}function isDispatchDecision(_0x156a00){const _0x20e4b3={_0x1c9b82:0xa,_0x79c269:0x21,_0x5b80c6:0x9e,_0x207188:0x172,_0x5ca078:0x172},_0x4690a2={_0x25fafa:0xbd},_0x39244c={_0x1308a4:0x1d0};function _0x537069(_0x2fb98b,_0x2180f4,_0x342bfc,_0x39b731){return _0x5c9f18(_0x2fb98b- -0x5f,_0x2180f4-0x69,_0x39b731,_0x39b731-_0x39244c._0x1308a4);}if(typeof _0x156a00!=='object'||_0x156a00===null)return![];function _0x308236(_0x28c07f,_0xe136c9,_0x5be35c,_0x4b0034){return _0x4bc00b(_0x28c07f-0x13b,_0x4b0034- -_0x4690a2._0x25fafa,_0x5be35c,_0x4b0034-0x110);}return _0x156a00[_0x537069(-_0x20e4b3._0x1c9b82,_0x20e4b3._0x79c269,-0xf,-0x27)]===_0x537069(-0x60,-0x8e,-0x80,-_0x20e4b3._0x5b80c6)||_0x156a00[_0x308236(0x197,_0x20e4b3._0x207188,0x140,_0x20e4b3._0x5ca078)]==='run';}function normalizeExecutionError(_0x334bfb){const _0x43861e={_0x5693c6:0x487,_0x3b744f:0x3db,_0x222035:0x3d5,_0x5d8aa8:0x405,_0xd50577:0x400},_0x22eb95={_0xa9c200:0xfd,_0x21aaa4:0x3ae};if(_0x334bfb instanceof ToolExecutionError)return{'errorMessage':_0x334bfb['message'],'structured':{'error':_0x334bfb['message'],..._0x334bfb[_0x403789(0x47b,_0x43861e._0x5693c6,0x45e,0x49a)]}};if(_0x334bfb instanceof Error)return{'errorMessage':_0x334bfb[_0x403789(_0x43861e._0x3b744f,0x403,_0x43861e._0x222035,0x3c3)],'structured':{'error':_0x334bfb[_0x403789(_0x43861e._0x5d8aa8,_0x43861e._0xd50577,0x3d5,0x3f3)]}};const _0x3698ef=String(_0x334bfb);function _0x21b5c5(_0x4ebfdd,_0x5d0ccd,_0x17583d,_0x37488e){return _0x4bc00b(_0x4ebfdd-_0x22eb95._0xa9c200,_0x5d0ccd- -_0x22eb95._0x21aaa4,_0x17583d,_0x37488e-0x71);}function _0x403789(_0x5c5df9,_0x3459df,_0x4a2e1f,_0x8a4f4b){return _0x4bc00b(_0x5c5df9-0xb3,_0x4a2e1f-0x211,_0x8a4f4b,_0x8a4f4b-0xc2);}return{'errorMessage':_0x3698ef,'structured':{'error':_0x3698ef}};}async function emitEvent(_0x13c4f2,_0x1ca79d,_0x380d48){await _0x13c4f2?.(_0x1ca79d,_0x380d48);}async function resolveDispatchDecision(_0x482a2b,_0x369890,_0x488e0a){const _0x41dc88={_0x196948:0x223,_0x1f1303:0x20b,_0x2a8c0d:0x250,_0x30751a:0x1f1,_0x4095dd:0x21b,_0x524fcc:0x201,_0x4f5b03:0x247,_0x219d50:0x23f,_0x36e08e:0x24f,_0x2ec84a:0x24e,_0x10d16a:0x220},_0x416164={_0x3ddb1f:0x45d},_0x1b7373={_0x29a0e2:0xd6,_0x3c1e21:0x27,_0xf5209c:0x3b,_0x3aaf9b:0x91,_0x54b021:0x74,_0x4cc2d1:0x4a},_0x1d5df0={_0x5c2c00:0x1eb,_0x1ae3a2:0x1a0,_0xb498f7:0x19a},_0x1430cc={_0x1d8cbe:0x1b4},_0x2bcbf9={_0x4d7bcb:0x12e,_0xeea457:0x124,_0x54d807:0x128,_0x130ee9:0x141,_0xe795ef:0x12d,_0x5001c4:0x145,_0x5b8bfc:0x140,_0x31a3a7:0x13d,_0x54f788:0x150,_0xfc857d:0x107,_0x35566a:0x123,_0x9972f2:0xff,_0x275af4:0xf2},_0x29053c={_0x21c3aa:0x1a1};if(!_0x482a2b)return{'action':_0x1ea57c(-_0x41dc88._0x196948,-_0x41dc88._0x1f1303,-_0x41dc88._0x2a8c0d,-0x1c8)};function _0x54f811(_0x5bb38e,_0x4056b7,_0x304747,_0x583e3d){return _0x5c9f18(_0x304747- -0x23c,_0x4056b7-_0x29053c._0x21c3aa,_0x5bb38e,_0x583e3d-0xc3);}const _0x48029c=Promise[_0x1ea57c(-_0x41dc88._0x30751a,-_0x41dc88._0x4095dd,-_0x41dc88._0x524fcc,-0x1da)]()[_0x1ea57c(-_0x41dc88._0x4f5b03,-_0x41dc88._0x219d50,-0x22b,-0x1ff)](()=>_0x482a2b(_0x369890,_0x488e0a));if(!_0x488e0a['signal']){const _0x4d1612=await _0x48029c;return isDispatchDecision(_0x4d1612)?_0x4d1612:{'action':_0x1ea57c(-_0x41dc88._0x36e08e,-_0x41dc88._0x1f1303,-0x255,-_0x41dc88._0x2ec84a)};}const _0x285d4f=new Promise((_0x18a546,_0x30e8e9)=>{const _0x23bb35=()=>{function _0x49fe13(_0x2ec6eb,_0x136461,_0x5b6931,_0x1dda23){return _0x2078(_0x5b6931- -0x20c,_0x136461);}_0x488e0a[_0x545e09(_0x2bcbf9._0x4d7bcb,0x12f,_0x2bcbf9._0xeea457,0x152)]?.[_0x545e09(_0x2bcbf9._0x54d807,0x171,0x10d,_0x2bcbf9._0x130ee9)](_0x545e09(_0x2bcbf9._0xe795ef,_0x2bcbf9._0x5001c4,_0x2bcbf9._0x5b8bfc,_0x2bcbf9._0x31a3a7),_0x23bb35);function _0x545e09(_0x206f43,_0x296680,_0x3d1976,_0x331330){return _0x2078(_0x206f43-0x55,_0x331330);}_0x30e8e9(toAbortError(_0x488e0a[_0x545e09(0x12e,_0x2bcbf9._0x54f788,_0x2bcbf9._0xfc857d,_0x2bcbf9._0x35566a)]?.[_0x49fe13(-_0x2bcbf9._0x9972f2,-0x11c,-_0x2bcbf9._0x275af4,-0x11a)]));};function _0x303a5f(_0x113f88,_0x3d979f,_0x14092b,_0xef0f45){return _0x54f811(_0x113f88,_0x3d979f-_0x1430cc._0x1d8cbe,_0xef0f45-0x1b5,_0xef0f45-0x150);}if(_0x488e0a['signal']?.[_0x303a5f(-0x12,0x1a,0x1c,-0x1b)]){_0x30e8e9(toAbortError(_0x488e0a[_0xd8b6b4(-_0x1b7373._0x29a0e2,-0x7b,-0x91,-0xb7)][_0x303a5f(-0x7b,-_0x1b7373._0x3c1e21,-0x14,-_0x1b7373._0xf5209c)]));return;}function _0xd8b6b4(_0x27c1df,_0x4cfb15,_0x3365e1,_0x11765b){return _0x54f811(_0x27c1df,_0x4cfb15-_0x1d5df0._0x5c2c00,_0x3365e1-_0x1d5df0._0x1ae3a2,_0x11765b-_0x1d5df0._0xb498f7);}_0x488e0a[_0xd8b6b4(-_0x1b7373._0x3aaf9b,-_0x1b7373._0x54b021,-_0x1b7373._0x3aaf9b,-0x9a)]?.['addEventListener'](_0xd8b6b4(-_0x1b7373._0x4cc2d1,-0x79,-0x92,-0xa5),_0x23bb35,{'once':!![]});});function _0x1ea57c(_0x311f9b,_0x566fcb,_0x5c1dbf,_0x4b9962){return _0x4bc00b(_0x311f9b-0x1aa,_0x566fcb- -_0x416164._0x3ddb1f,_0x4b9962,_0x4b9962-0x29);}const _0x1e65eb=await Promise[_0x54f811(-0x1f7,-0x23e,-_0x41dc88._0x10d16a,-0x203)]([_0x48029c,_0x285d4f]);return isDispatchDecision(_0x1e65eb)?_0x1e65eb:{'action':'run'};}async function executeToolCall(_0x249a32,_0xd5a025,_0x372447,_0xb9f0ad,_0xb9e59){const _0x38d9cf={_0x1398d0:0x20e,_0x136653:0x1fe,_0x2fc973:0x183,_0x246352:0x1bf,_0x2a58aa:0x16e,_0x4ab667:0x16a,_0xffcc5c:0x1af,_0x2a2c1a:0x1f1,_0x5e20f4:0x1fd,_0x1fafb6:0x1cc,_0x4e96fa:0x12f,_0x3de483:0x196,_0x13df98:0x15c,_0x407ebd:0x134,_0x247ca5:0x15f,_0x5ad28d:0x198,_0x54ec58:0x17a,_0x51df38:0x172,_0xcaaf58:0x231,_0x3a1f33:0x1d7,_0x411240:0x1fc,_0x326ec3:0x1d1,_0x3a9f20:0x1de,_0x49b3fa:0x1fc,_0x114e6a:0x152,_0xf1294:0x171,_0x3e3a86:0x17b,_0x1c5041:0x19e,_0x214d1b:0x187,_0x56c72e:0x21f,_0x279a10:0x1ef,_0x4813ac:0x19d,_0x47a9c4:0x145,_0x1f6ab6:0x157,_0x355e08:0x176,_0x9d6b50:0x147,_0x114b52:0x1bd,_0x434919:0x17b,_0x1eed13:0x1ab,_0x7dfbe1:0x1bf,_0x59966d:0x185,_0x28af42:0x1a3,_0x2dccc2:0x1f3,_0x14bda9:0x1e6},_0x5cafab={_0x33fecb:0x126,_0x20dc94:0x157,_0x1ad933:0x126},_0x3d76be={_0x20891b:0x1b3},_0x2cd20f={_0x249253:0x8},_0x2fe202={..._0x372447,'toolCallId':_0xd5a025['id']};throwIfAborted(_0x2fe202['signal']);const _0x413f9e=await resolveDispatchDecision(_0xb9f0ad,_0xd5a025,_0x2fe202);throwIfAborted(_0x2fe202['signal']);if(_0x413f9e[_0x2ef02c(0x1b8,0x1de,0x1c6,0x1bc)]==='reject'){const _0x121351=createRejectedToolResult(_0xd5a025,_0x413f9e['reason']);return await emitEvent(_0xb9e59,{'type':'tool_rejected','toolCall':_0xd5a025,'result':_0x121351},_0x2fe202),_0x121351;}const _0x5353e8=_0x249a32[_0x4cc478(-0x20b,-0x1f8,-0x1cd,-_0x38d9cf._0x1398d0)](_0xd5a025['name']);function _0x2ef02c(_0x463e77,_0x27b81f,_0x3a6bc9,_0x6481fa){return _0x4bc00b(_0x463e77-_0x2cd20f._0x249253,_0x6481fa- -0x73,_0x27b81f,_0x6481fa-0xb5);}function _0x4cc478(_0x57e8e7,_0x10d8c2,_0x124eb6,_0x51477a){return _0x4bc00b(_0x57e8e7-0x26,_0x51477a- -0x3e1,_0x10d8c2,_0x51477a-_0x3d76be._0x20891b);}if(!_0x5353e8){const _0x555ab1=createUnknownToolResult(_0xd5a025);return await emitEvent(_0xb9e59,{'type':_0x2ef02c(0x1e2,_0x38d9cf._0x136653,_0x38d9cf._0x2fc973,_0x38d9cf._0x246352),'toolCall':_0xd5a025,'result':_0x555ab1},_0x2fe202),_0x555ab1;}throwIfAborted(_0x2fe202[_0x2ef02c(_0x38d9cf._0x2a58aa,_0x38d9cf._0x4ab667,_0x38d9cf._0xffcc5c,0x172)]),await emitEvent(_0xb9e59,{'type':_0x4cc478(-_0x38d9cf._0x2a2c1a,-0x1ab,-_0x38d9cf._0x5e20f4,-_0x38d9cf._0x1fafb6),'toolCall':_0xd5a025},_0x2fe202);try{throwIfAborted(_0x2fe202['signal']);const _0x4943cb=validateToolInput(_0xd5a025['input'],_0x5353e8[_0x2ef02c(_0x38d9cf._0x4e96fa,0x169,_0x38d9cf._0x3de483,_0x38d9cf._0x13df98)]),_0x24198b=await _0x5353e8[_0x2ef02c(_0x38d9cf._0x407ebd,_0x38d9cf._0x247ca5,_0x38d9cf._0x5ad28d,_0x38d9cf._0x54ec58)](_0x4943cb,_0x2fe202),_0x1e9be1=[],_0x5f584f=addAbortListener(_0x2fe202[_0x2ef02c(0x1a5,_0x38d9cf._0x13df98,0x14a,_0x38d9cf._0x51df38)],()=>{const _0x3c4aed={_0x593a88:0x182,_0x5b4534:0x141};function _0x377657(_0x55f4ad,_0x330b39,_0x2164e2,_0x27d591){return _0x2ef02c(_0x55f4ad-_0x3c4aed._0x593a88,_0x2164e2,_0x2164e2-_0x3c4aed._0x5b4534,_0x330b39- -0x2b);}void _0x24198b['return'](void 0x0)[_0x377657(_0x5cafab._0x33fecb,_0x5cafab._0x20dc94,0x119,_0x5cafab._0x1ad933)](()=>{});});try{throwIfAborted(_0x2fe202[_0x4cc478(-0x211,-_0x38d9cf._0xcaaf58,-_0x38d9cf._0x3a1f33,-_0x38d9cf._0x411240)]);let _0x2e962e=await _0x24198b['next']();while(!_0x2e962e['done']){throwIfAborted(_0x2fe202[_0x4cc478(-_0x38d9cf._0x326ec3,-0x228,-_0x38d9cf._0x3a9f20,-_0x38d9cf._0x49b3fa)]);const _0x4f1d22=normalizeToolOutputValue(_0x2e962e[_0x2ef02c(0x171,_0x38d9cf._0x114e6a,_0x38d9cf._0xf1294,_0x38d9cf._0x3e3a86)]);_0x1e9be1[_0x2ef02c(_0x38d9cf._0x1c5041,_0x38d9cf._0x214d1b,0x1a8,0x1ae)](_0x4f1d22),await emitEvent(_0xb9e59,{'type':_0x4cc478(-0x223,-_0x38d9cf._0x56c72e,-0x234,-_0x38d9cf._0x279a10),'toolCall':_0xd5a025,'chunk':_0x4f1d22},_0x2fe202),throwIfAborted(_0x2fe202[_0x2ef02c(0x197,_0x38d9cf._0x4813ac,0x181,0x172)]),_0x2e962e=await _0x24198b['next']();}throwIfAborted(_0x2fe202[_0x2ef02c(_0x38d9cf._0x47a9c4,_0x38d9cf._0x1f6ab6,0x12e,_0x38d9cf._0x51df38)]);const _0x3045a5=_0x2e962e[_0x2ef02c(_0x38d9cf._0x355e08,_0x38d9cf._0x9d6b50,_0x38d9cf._0x114b52,_0x38d9cf._0x434919)]===void 0x0?deriveFinalToolOutput(_0x1e9be1):normalizeToolOutputValue(_0x2e962e['value']),_0x5cdad2=createSuccessToolResult(_0xd5a025,_0x3045a5,_0x1e9be1);return await emitEvent(_0xb9e59,{'type':_0x2ef02c(0x183,_0x38d9cf._0x1eed13,0x1be,_0x38d9cf._0x7dfbe1),'toolCall':_0xd5a025,'result':_0x5cdad2},_0x2fe202),_0x5cdad2;}catch(_0x6627ca){if(isAbortError(_0x6627ca)){const _0x2ef6f8=createAbortedToolResult(_0xd5a025,_0x6627ca,_0x1e9be1);return await emitEvent(_0xb9e59,{'type':'tool_completed','toolCall':_0xd5a025,'result':_0x2ef6f8},_0x2fe202),_0x2ef6f8;}const {errorMessage:_0x1c4b3e,structured:_0x2229b0}=normalizeExecutionError(_0x6627ca),_0x2f59ef=createErrorToolResult(_0xd5a025,_0x1c4b3e,_0x2229b0,_0x1e9be1);return await emitEvent(_0xb9e59,{'type':_0x2ef02c(_0x38d9cf._0x59966d,0x17c,_0x38d9cf._0x28af42,_0x38d9cf._0x246352),'toolCall':_0xd5a025,'result':_0x2f59ef},_0x2fe202),_0x2f59ef;}finally{_0x5f584f();}}catch(_0x47b63b){if(isAbortError(_0x47b63b)){const _0x232604=createAbortedToolResult(_0xd5a025,_0x47b63b);return await emitEvent(_0xb9e59,{'type':'tool_completed','toolCall':_0xd5a025,'result':_0x232604},_0x2fe202),_0x232604;}const {errorMessage:_0x31fcfd,structured:_0x51d799}=normalizeExecutionError(_0x47b63b),_0x416743=createErrorToolResult(_0xd5a025,_0x31fcfd,_0x51d799);return await emitEvent(_0xb9e59,{'type':_0x4cc478(-_0x38d9cf._0x2dccc2,-0x1cd,-_0x38d9cf._0x14bda9,-0x1af),'toolCall':_0xd5a025,'result':_0x416743},_0x2fe202),_0x416743;}}function createInternalToolRuntime(_0x4fd9bd=[],_0x5393e9={}){const _0x4fff2c={_0x5ee058:0x4fe,_0x325f03:0x4f2},_0x456163={_0x2fe52c:0x482,_0x195047:0x489,_0x3c71fa:0x4c6,_0x13495f:0x4fc};let _0x31c3dd=new ToolRegistry(_0x4fd9bd);return{'listToolSchemas'(){return _0x31c3dd['listToolSchemas']();},'setTools'(_0xeabfd3){_0x31c3dd=new ToolRegistry(_0xeabfd3);},async 'executeCalls'(_0x1e782b,_0x38081a){const _0x4d9c0d={_0x5c6dbd:0x36,_0x5d78ce:0x4d,_0xf1a8f9:0xf3,_0x10ee01:0xab},_0x11bf79={_0x4127e3:0x3d4};function _0x4dabbc(_0xa197c4,_0x4d16f7,_0x2fe007,_0x3bf975){return _0x2078(_0x4d16f7-_0x11bf79._0x4127e3,_0xa197c4);}function _0x4ac172(_0x157301,_0x2837d7,_0x106f18,_0xa3b66b){return _0x2078(_0x157301- -0x3ca,_0x2837d7);}return await Promise[_0x4dabbc(_0x456163._0x2fe52c,_0x456163._0x195047,0x4a6,0x47a)](_0x1e782b[_0x4dabbc(0x4ec,0x4df,_0x456163._0x3c71fa,_0x456163._0x13495f)](async _0x23da7c=>{const _0x2056dc={_0x3201ac:0x404,_0x17ab09:0x190};function _0x4fd4f1(_0x206058,_0x2240d3,_0x55a5b8,_0xf6b020){return _0x4ac172(_0x206058-_0x2056dc._0x3201ac,_0xf6b020,_0x55a5b8-0x34,_0xf6b020-_0x2056dc._0x17ab09);}function _0x79cc91(_0x2c02e7,_0xe82535,_0x31c640,_0x124a9d){return _0x4ac172(_0x124a9d-0x310,_0x2c02e7,_0x31c640-0x190,_0x124a9d-0x1da);}return await executeToolCall(_0x31c3dd,_0x23da7c,_0x38081a,_0x5393e9[_0x79cc91(_0x4d9c0d._0x5c6dbd,0x8d,0x38,_0x4d9c0d._0x5d78ce)],_0x5393e9[_0x4fd4f1(_0x4d9c0d._0xf1a8f9,_0x4d9c0d._0x10ee01,0x100,0x129)]);}));},async 'execute'(_0x53eef1,_0x53cef1){const _0x1a0a9a={_0x4b98f9:0x3c0};function _0x57cac0(_0x5a2060,_0x5a3ebf,_0x133924,_0x4136c1){return _0x2078(_0x5a2060-_0x1a0a9a._0x4b98f9,_0x5a3ebf);}const [_0x4d8991]=await this[_0x57cac0(0x4c1,_0x4fff2c._0x5ee058,_0x4fff2c._0x325f03,0x499)]([_0x53eef1],_0x53cef1);return _0x4d8991;}};}function getOrderedObserverExtensions(_0x10972d,_0x4cfb6e){const _0x270e3a={_0x52009d:0xdb},_0x463096={_0x4bea36:0x1ab,_0x4d146e:0x191,_0x2cc08c:0x19d,_0x59c5bb:0x18f,_0x4de465:0x1ca,_0x20ff2b:0x1e7,_0xad4753:0x1bc},_0x4d2de5={_0x247e72:0x2e3,_0x51c7fb:0x7b};function _0x41c598(_0x59b2e9,_0x7c6632,_0x817f8,_0x5d1f86){return _0x4bc00b(_0x59b2e9-0x47,_0x5d1f86- -_0x4d2de5._0x247e72,_0x7c6632,_0x5d1f86-_0x4d2de5._0x51c7fb);}function _0x2de89d(_0x4b0622,_0x121a44,_0x20beed,_0x4c5c83){return _0x5c9f18(_0x121a44-0x12d,_0x121a44-0x159,_0x20beed,_0x4c5c83-0x18b);}return _0x10972d[_0x41c598(-_0x270e3a._0x52009d,-0xcc,-0x11e,-0xe3)](_0xf404b5=>{const _0x3921a7={_0x1760d6:0x142,_0x934b6d:0xb1},_0x480306={_0x3be36e:0x152};function _0x1b07ec(_0xa59c32,_0x306ef1,_0x4500df,_0x7b82b9){return _0x41c598(_0xa59c32-_0x480306._0x3be36e,_0x7b82b9,_0x4500df-0x9,_0xa59c32- -0xe5);}function _0x286d7c(_0xbf4d21,_0x1c6705,_0x536fc1,_0x350a4c){return _0x41c598(_0xbf4d21-0x46,_0xbf4d21,_0x536fc1-_0x3921a7._0x1760d6,_0x536fc1-_0x3921a7._0x934b6d);}return _0xf404b5[_0x1b07ec(-_0x463096._0x4bea36,-0x161,-0x1b0,-0x1f4)]!==![]&&_0xf404b5[_0x1b07ec(-_0x463096._0x4d146e,-_0x463096._0x2cc08c,-_0x463096._0x59c5bb,-0x18e)]===_0x4cfb6e&&_0xf404b5[_0x1b07ec(-_0x463096._0x4de465,-_0x463096._0x20ff2b,-0x1eb,-_0x463096._0xad4753)]==='observer';})[_0x2de89d(0x119,0x14f,0x11d,0x172)]((_0xa6bdd1,_0x3e9585)=>_0xa6bdd1['order']-_0x3e9585[_0x2de89d(0x187,0x176,0x1ad,0x142)]);}function getOrderedTransformerExtensions(_0x3f2d69,_0x50f3df){const _0x4cb91b={_0x244a9a:0x4d5,_0x45845a:0x4a6,_0x106ac8:0x4b2,_0x47ac4f:0x50f,_0x1c6c6c:0x4d1},_0x4aa452={_0x25cf60:0x271,_0x27b247:0x275,_0x1849c2:0x273,_0xc4ce2c:0x60,_0x3f917c:0x294,_0x4d91ca:0x2a6,_0x4336b7:0xc0,_0x44c26a:0xe9,_0x14d4d8:0x8f},_0x5cccdb={_0x3b8530:0x5d,_0x23c616:0xf4},_0x9deaf7={_0x34b452:0xbe,_0x2ab521:0x62};function _0x39ae76(_0x3fb421,_0x157a41,_0x9cd303,_0x3934c1){return _0x5c9f18(_0x3fb421-0x4af,_0x157a41-_0x9deaf7._0x34b452,_0x9cd303,_0x3934c1-_0x9deaf7._0x2ab521);}function _0x417617(_0xf6cd4e,_0x2b7850,_0x348694,_0x2fdca5){return _0x4bc00b(_0xf6cd4e-0x1bf,_0xf6cd4e-0x25f,_0x2fdca5,_0x2fdca5-0x5a);}return _0x3f2d69[_0x39ae76(_0x4cb91b._0x244a9a,_0x4cb91b._0x45845a,_0x4cb91b._0x106ac8,_0x4cb91b._0x47ac4f)](_0x564a54=>{const _0xdc077b={_0x56c97f:0x767,_0x8687d8:0x9,_0x4238c6:0x74};function _0x4e543f(_0x2ccdc9,_0x2375f3,_0x2d3735,_0x18136a){return _0x39ae76(_0x18136a- -0x586,_0x2375f3-_0x5cccdb._0x3b8530,_0x2d3735,_0x18136a-_0x5cccdb._0x23c616);}function _0x2d2a36(_0x34508e,_0xf051e4,_0x49a960,_0x4912eb){return _0x39ae76(_0xf051e4- -_0xdc077b._0x56c97f,_0xf051e4-_0xdc077b._0x8687d8,_0x4912eb,_0x4912eb-_0xdc077b._0x4238c6);}return _0x564a54[_0x2d2a36(-_0x4aa452._0x25cf60,-_0x4aa452._0x27b247,-_0x4aa452._0x1849c2,-0x235)]!==![]&&_0x564a54[_0x4e543f(-_0x4aa452._0xc4ce2c,-0x68,-0x9e,-0x7a)]===_0x50f3df&&_0x564a54[_0x2d2a36(-0x2c1,-_0x4aa452._0x3f917c,-_0x4aa452._0x4d91ca,-0x291)]===_0x4e543f(-_0x4aa452._0x4336b7,-_0x4aa452._0x44c26a,-_0x4aa452._0x14d4d8,-0xb9);})[_0x39ae76(_0x4cb91b._0x1c6c6c,0x51a,0x4d7,0x501)]((_0x11ea97,_0x4e2fbf)=>_0x11ea97[_0x39ae76(0x4f8,0x50d,0x4d1,0x4b7)]-_0x4e2fbf[_0x39ae76(0x4f8,0x4da,0x4d1,0x4df)]);}function createExtensionRegistry(){const _0x1522c8={_0x665d28:0x42d},_0x5287a8={_0x5788ac:0x21a,_0x4a5b04:0x203},_0x30775d={_0x4e7048:0x35f},_0xbb194c=[];return{'register'(_0xebbd21){function _0x22149c(_0x1ec76b,_0x50d985,_0x5eabae,_0x2bfe5d){return _0x2078(_0x5eabae- -_0x30775d._0x4e7048,_0x1ec76b);}_0xbb194c[_0x22149c(-0x257,-_0x5287a8._0x5788ac,-0x24a,-_0x5287a8._0x4a5b04)](_0xebbd21);},async 'runTransformers'(_0xdec8e9,_0x11dd44,_0xa292d1){let _0x502bcb=_0x11dd44;for(const _0x845df of getOrderedTransformerExtensions(_0xbb194c,_0xdec8e9)){_0x502bcb=await _0x845df['run'](_0x502bcb,_0xa292d1);}return _0x502bcb;},async 'runObservers'(_0x4a81d0,_0x324869,_0xba292d){function _0x4394bf(_0x29388f,_0x31336a,_0x2680dd,_0x67ab8e){return _0x2078(_0x31336a-0x2a0,_0x29388f);}for(const _0x278fbd of getOrderedObserverExtensions(_0xbb194c,_0x4a81d0)){await _0x278fbd[_0x4394bf(_0x1522c8._0x665d28,0x3e6,0x3b8,0x3c4)](_0x324869,_0xba292d);}}};}function makeExtensionContext(_0x3f1e38){return{'state':_0x3f1e38};}function _0x4bc00b(_0x55e2e6,_0x4600eb,_0x5ab7cd,_0x55f728){const _0x2655c0={_0x572a7c:0x10c};return _0x2078(_0x4600eb-_0x2655c0._0x572a7c,_0x5ab7cd);}async function runStage(_0x51b6ed,_0x37dca9,_0x4b5449,_0x555a64){const _0x5074ae={_0x467685:0x417,_0x5b4523:0x145},_0xd3b908={_0x2c5646:0xdd};function _0x2287ee(_0x4ae059,_0x2a223f,_0x2c3ec0,_0x1496b4){return _0x4bc00b(_0x4ae059-0x77,_0x4ae059-0x20f,_0x2a223f,_0x1496b4-0x97);}const _0x233c20=await _0x51b6ed[_0x2287ee(0x3db,0x39a,0x39f,_0x5074ae._0x467685)](_0x37dca9,_0x4b5449,_0x555a64);await _0x51b6ed[_0x377461(0x13e,0x119,0x158,_0x5074ae._0x5b4523)](_0x37dca9,_0x233c20,_0x555a64);function _0x377461(_0x2d7198,_0x17f853,_0x586620,_0x1caf03){return _0x5c9f18(_0x17f853-0xa3,_0x17f853-_0xd3b908._0x2c5646,_0x1caf03,_0x1caf03-0xba);}return _0x233c20;}async function emitEvent2(_0x1b3711,_0x521ada,_0x56dbc4){await _0x1b3711?.(_0x521ada,_0x56dbc4);}function _0x2078(_0x51279a,_0x1ac0f2){_0x51279a=_0x51279a-0xb5;const _0x4f634c=_0x4f63();let _0x20783e=_0x4f634c[_0x51279a];if(_0x2078['ukGcHY']===undefined){var _0x48406a=function(_0x512cbc){const _0x135437='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x53e4f3='',_0xc3caee='';for(let _0xcf3319=0x0,_0x12f3da,_0x516ed6,_0x4afc5d=0x0;_0x516ed6=_0x512cbc['charAt'](_0x4afc5d++);~_0x516ed6&&(_0x12f3da=_0xcf3319%0x4?_0x12f3da*0x40+_0x516ed6:_0x516ed6,_0xcf3319++%0x4)?_0x53e4f3+=String['fromCharCode'](0xff&_0x12f3da>>(-0x2*_0xcf3319&0x6)):0x0){_0x516ed6=_0x135437['indexOf'](_0x516ed6);}for(let _0x176710=0x0,_0x82ea1=_0x53e4f3['length'];_0x176710<_0x82ea1;_0x176710++){_0xc3caee+='%'+('00'+_0x53e4f3['charCodeAt'](_0x176710)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xc3caee);};_0x2078['eUPZeN']=_0x48406a,_0x2078['fgIfXk']={},_0x2078['ukGcHY']=!![];}const _0xe8c3f8=_0x4f634c[0x0],_0x10f7ce=_0x51279a+_0xe8c3f8,_0x25989f=_0x2078['fgIfXk'][_0x10f7ce];return!_0x25989f?(_0x20783e=_0x2078['eUPZeN'](_0x20783e),_0x2078['fgIfXk'][_0x10f7ce]=_0x20783e):_0x20783e=_0x25989f,_0x20783e;}function replaceToolUseBlocks(_0x3509a6,_0x2fd4b1){const _0x3eb54a={_0x22ea44:0x23c,_0x4361aa:0x255,_0x413cbe:0x244,_0x5609f7:0x1f2,_0x55e131:0x1ff,_0x32d5dc:0x218},_0x20e04a={_0x5c3e47:0x404,_0x4faa89:0x41e,_0x510582:0x46e,_0x20e8d5:0x484,_0x1a6aaf:0x47a},_0x4c5ec1={_0x2fd2c1:0x81},_0x4abade={_0x2b9a91:0xf0,_0x4a800c:0xee,_0x3d8730:0x65f},_0x2be80a={_0x4f029e:0xaf,_0x351cc3:0x19f},_0x398f44={_0x51bad4:0x9e,_0x27ebfb:0x188};let _0x128454=0x0;function _0x8781df(_0x368048,_0x26cb73,_0x32f674,_0x3d2a4d){return _0x4bc00b(_0x368048-_0x398f44._0x51bad4,_0x3d2a4d-_0x398f44._0x27ebfb,_0x32f674,_0x3d2a4d-0x34);}function _0xd193aa(_0x3bd3ad,_0x37a146,_0x414238,_0x4e3d59){return _0x5c9f18(_0x4e3d59- -0x255,_0x37a146-_0x2be80a._0x4f029e,_0x37a146,_0x4e3d59-_0x2be80a._0x351cc3);}return{..._0x3509a6,'content':_0x3509a6[_0xd193aa(-_0x3eb54a._0x22ea44,-0x21c,-0x285,-_0x3eb54a._0x4361aa)][_0xd193aa(-_0x3eb54a._0x413cbe,-_0x3eb54a._0x5609f7,-_0x3eb54a._0x55e131,-_0x3eb54a._0x32d5dc)](_0x4fbef6=>{if(_0x4fbef6[_0x2c2c38(_0x20e04a._0x5c3e47,0x3e7,_0x20e04a._0x4faa89,0x419)]!==_0x2c2c38(_0x20e04a._0x510582,0x469,_0x20e04a._0x20e8d5,_0x20e04a._0x1a6aaf))return _0x4fbef6;function _0x2c2c38(_0x462187,_0x59c9fa,_0x42e5cb,_0x46f87f){return _0xd193aa(_0x462187-_0x4abade._0x2b9a91,_0x462187,_0x42e5cb-_0x4abade._0x4a800c,_0x46f87f-_0x4abade._0x3d8730);}function _0x16d799(_0x3caa89,_0x3c5a71,_0x409208,_0x162d53){return _0xd193aa(_0x3caa89-0x148,_0x3caa89,_0x409208-_0x4c5ec1._0x2fd2c1,_0x162d53-0x6a2);}const _0x1f390f=_0x2fd4b1[_0x128454];return _0x128454+=0x1,structuredClone(_0x1f390f);})};}function createAssistantMessageId(_0xe63772,_0x29c3f0){const _0x3835f4={_0x8323f:0x22e},_0x40e13a={_0x4d5d46:0xa8};function _0x2d3634(_0x398bb8,_0x31f28b,_0x55b5da,_0x366b5d){return _0x5c9f18(_0x366b5d- -0x258,_0x31f28b-_0x40e13a._0x4d5d46,_0x31f28b,_0x366b5d-0x12a);}return _0xe63772+_0x2d3634(-_0x3835f4._0x8323f,-0x1e4,-0x1ac,-0x1ef)+_0x29c3f0;}function createReasoningMessageId(_0x1e5dee){const _0x1f51b2={_0x5f41a5:0x2de,_0x57d237:0x323,_0x3c713e:0x31e},_0x133357={_0x27a258:0x2e0,_0x245ab2:0x76,_0x494566:0x1b7};function _0x1c66b0(_0x14a4d5,_0x4df41f,_0x32b778,_0x40081c){return _0x5c9f18(_0x14a4d5-_0x133357._0x27a258,_0x4df41f-_0x133357._0x245ab2,_0x32b778,_0x40081c-_0x133357._0x494566);}return _0x1e5dee+_0x1c66b0(_0x1f51b2._0x5f41a5,_0x1f51b2._0x57d237,_0x1f51b2._0x3c713e,0x2d1);}function withMessageId(_0x5ea04e,_0x62e9a9){if(_0x5ea04e['id']===_0x62e9a9)return _0x5ea04e;return{..._0x5ea04e,'id':_0x62e9a9};}function createAssistantChunkEvent(_0x41830c,_0x47ff39){const _0x351036={_0x1be4ae:0x1fd,_0x471a15:0x1ed,_0x3c1572:0x1c7,_0x3a6f02:0x158,_0x47c8fb:0x136,_0x2826db:0x164,_0x59fcfc:0x345,_0x3d998c:0x33c,_0x3df4ac:0x320,_0x3be6ee:0x1f2,_0xe75b8b:0x181,_0x3ea6bc:0x1ca,_0xd7ac91:0x387,_0x3298dd:0x3a5,_0x1f1ff9:0x337,_0x594850:0x2f2,_0x6f9939:0x2c7,_0x4afe86:0x2fa,_0x2484e0:0x30e,_0x224b09:0x363,_0x53f0a4:0x328},_0x55e988={_0x32554c:0x114};function _0x11ba15(_0x21a702,_0x214588,_0x4c78eb,_0x154bc7){return _0x4bc00b(_0x21a702-0xa8,_0x154bc7- -0x3b0,_0x21a702,_0x154bc7-0x62);}if(_0x41830c[_0x11ba15(-_0x351036._0x1be4ae,-_0x351036._0x471a15,-0x20b,-_0x351036._0x3c1572)]!==_0x11ba15(-_0x351036._0x3a6f02,-_0x351036._0x47c8fb,-0x12a,-_0x351036._0x2826db))return void 0x0;function _0x47076b(_0x8c9aec,_0x50f3b9,_0x582d34,_0x504742){return _0x4bc00b(_0x8c9aec-0x95,_0x582d34-_0x55e988._0x32554c,_0x50f3b9,_0x504742-0x123);}if(_0x41830c['text']===void 0x0)return void 0x0;return{'type':_0x47076b(0x380,_0x351036._0x59fcfc,_0x351036._0x3d998c,_0x351036._0x3df4ac),'index':_0x41830c[_0x11ba15(-_0x351036._0x3be6ee,-0x212,-_0x351036._0xe75b8b,-_0x351036._0x3ea6bc)]??0x0,'messageId':_0x47ff39,'chunk':{'type':_0x47076b(_0x351036._0xd7ac91,_0x351036._0x3298dd,0x360,_0x351036._0x1f1ff9),'index':_0x41830c[_0x47076b(_0x351036._0x594850,_0x351036._0x6f9939,_0x351036._0x4afe86,_0x351036._0x2484e0)]??0x0,'text':_0x41830c[_0x47076b(0x2ee,_0x351036._0x224b09,_0x351036._0x53f0a4,0x2fd)]}};}function _0x4f63(){const _0x11989c=['CMfUzg9T','oIbLEhbLy3rLzcbVyMPLy3q','C3rYzwfTAw5N','oIbLEhbLy3rLzcbHCNjHEq','B3bLBMfPx3jLyxnVBMLUz19ZDw1Tyxj5x2rLBhrH','C3LZDgvTuhjVBxb0','CMvXDwLYzwq','yM9VBgvHBG','Dg9VBf91C2vFy2H1BMS','Bw9KzwXFCMvZCg9UC2u','vg9VBcbLEgvJDxrPB24GCMvQzwn0zwqGzM9Yia','zxHLy3v0zunHBgXZ','qwDLBNqUC2vUzcbYzxf1AxjLCYbHig1LC3nHz2uGD2HLBIbUBYbKzwzHDwX0ig1LC3nHz2uGAxmGy29UzMLNDxjLza','B3v0Chv0','Dg9VBf9Yzxn1Bhq','C2vUza','DhvYBKLUzgv4','B25uB29Sq2fSBa','Dgv4Da','Dg9VBf9ZDgfYDgvK','C29Tzq','BwfW','Dg9VBfj1BNrPBwu','B3v0Chv0sw5KzxG','ywz0zxjuDxjUq29TCgXLDgu','zgvWCW','y29TCgXLDgu','zw5HyMXLza','DgHLBG','C3LZDgvT','Dg9VBf9JywXS','ChvZAa','yMvMB3jLvg9VBev4zwn1DgLVBG','B3jKzxi','CMvNAxn0zxi','zxjYB3i','CMvHC29U','vw5RBM93BIb0B29SoIa','yxnZAxn0yw50x2nODw5R','yMvMB3jLrMLUywXpDxrWDxq','zgvMyxvSDe1LC3nHz2u','C2v0','C2vZC2LVBKLK','yMvMB3jLqxnZAxn0yw50qxbWzw5K','x3n5C3rLBvbYB21WDa','ywn0Aw9U','y29UDgvUDeLUzgv4','mty4ogDstu1HtG','Dg9VBf9JB21WBgv0zwq','Dg9VBhncEu5HBwu','DhvYBL9JB21WBgv0zq','sw52ywXPzcb0B29SigLUChv0igf0ia','DgHPBMTPBMC','C3rHz2u','BMfTzq','oIbLEhbLy3rLzcbIB29SzwfU','mJbhzeLUDvu','B2jQzwn0','C2v0u3LZDgvTuhjVBxb0','Dg9VBf91C2vFBwvZC2fNzq','Aw5WDxrezwX0yq','BgLZDa','BwvZC2fNzxm','mtHItuPRtvu','CMvZB2X2zq','oMfZC2LZDgfUDdO','DxnLCL9TzxnZywDL','CMvZzxrnzxnZywDLCW','ywjVCNrLza','C3rHDhvZ','zgvZy3jPChrPB24','BM93','Dg9VBf91C2u','BNvTyMvY','y29UDgvUDf9KzwX0yq','C3rYDwn0DxjLza','yxnZAxn0yw50twvZC2fNzuLK','zxH0zw5ZAw9UCW','CNvUt2jZzxj2zxjZ','DhjPBq','CNvU','C3vTBwfYEuLUzgv4','ywXS','zg9Uzq','yxjYyxK','BwvZC2fNzq','B25fDMvUDa','zw50CMLLCW','mtGWnZa4C2H1D2nU','Bw9KzwXFCMvXDwvZDa','CMvHC29UAw5NtwvZC2fNzuLK','ChjVCgvYDgLLCW','y2HHDe1VzgvS','CNvUvhjHBNnMB3jTzxjZ','AM9PBG','C2vZC2LVBI0','Aw5WDxrty2HLBwe','zM9YrwfJAa','C3rYzwfT','AxnbCNjHEq','z2v0','Dg9VBf9YzwPLy3rLza','Dg9VBf91C2vFzgvSDge','oIbLEhbLy3rLzcbUDw1Izxi','mJeZotm2q3HXrg5T','oNjLyxnVBMLUzW','CMvQzwn0','y29UDgvUDa','AxrLBuLK','CMvHC29UAw5Nx21LC3nHz2u','DxnLCG','DhvYBKLK','CMvTB3zLrxzLBNrmAxn0zw5LCG','BgfZDfjLC3bVBNnL','mZaZmdG3mg96t3vNBW','BgvUz3rO','C2v0q2HHDe1VzgvS','ywjVCNq','C2LNBMfS','Aw5KzxG','C3rYAw5NAwz5','mtu0nteZotbJzgriEMC','DhLWzq','y29TCgXLDgvK','B3bLBMfPx3jLyxnVBMLUz19KzwX0yq','B25vC2vYtwvZC2fNzq','zxHLy3v0zq','DMfSDwu','mtyWoda5meflvu5Zsa','zMLUywXnzxnZywDL','yw50AhjVCgLJx3rOAw5RAw5Nx2rLBhrH','Dg9VBf9VDxrWDxrFy2H1BMS','mJy1otu1mg9SDgzOtW','CMvNAxn0CNK','y2f0y2G','CMfJzq','CMvHC29UAw5Nx2nODw5R','DhjHBNnMB3jTzxi','mZG5nJjQtLDtEeW','C3rYAw5N','zgvSDge','C29YDa','C2v0vg9VBhm','A2LUza','vg9VBev4zwn1DgLVBKvYCM9Y','zMLSDgvY','AxrLBxm'];_0x4f63=function(){return _0x11989c;};return _0x4f63();}function createToolUseChunkEvent(_0x391cfd,_0x7a3af2){const _0x3cf867={_0x507853:0xe5,_0x1bbb55:0xcf,_0x41190d:0xa9,_0x5e1b40:0xa0,_0x3d3df6:0xfc,_0x145934:0x467,_0x4f1fc5:0x454,_0x48c6e2:0x45d,_0x315e8b:0x454,_0x3f3314:0x421,_0x12150a:0x423},_0x263205={_0x6a95ba:0x22,_0x159c68:0x117,_0x497aba:0x5b},_0x24a736={_0xec0466:0x1cf,_0x35e74d:0x216,_0x2b9f24:0x155};if(_0x391cfd['type']!==_0x8725ea(0xbe,_0x3cf867._0x507853,0xf7,0x102))return void 0x0;function _0x5c749b(_0x1bb969,_0x2ec6c6,_0x477103,_0x19c9c2){return _0x4bc00b(_0x1bb969-_0x24a736._0xec0466,_0x2ec6c6-_0x24a736._0x35e74d,_0x1bb969,_0x19c9c2-_0x24a736._0x2b9f24);}function _0x8725ea(_0x1561a3,_0x49e66f,_0x319416,_0x799a4){return _0x4bc00b(_0x1561a3-_0x263205._0x6a95ba,_0x1561a3- -_0x263205._0x159c68,_0x799a4,_0x799a4-_0x263205._0x497aba);}return{'type':_0x5c749b(0x3da,0x420,0x441,0x3d7),'index':_0x391cfd['index']??0x0,'messageId':_0x7a3af2,'chunk':{'type':'tool_use_delta','id':_0x391cfd['id']??'','index':_0x391cfd[_0x8725ea(_0x3cf867._0x1bbb55,_0x3cf867._0x41190d,0x86,_0x3cf867._0x5e1b40)]??0x0,..._0x391cfd[_0x8725ea(0x121,0x114,0x131,_0x3cf867._0x3d3df6)]!==void 0x0?{'name':_0x391cfd['name']}:{},..._0x391cfd[_0x5c749b(_0x3cf867._0x145934,_0x3cf867._0x4f1fc5,0x478,0x492)]!==void 0x0?{'inputDelta':_0x391cfd[_0x5c749b(_0x3cf867._0x48c6e2,_0x3cf867._0x315e8b,_0x3cf867._0x3f3314,_0x3cf867._0x12150a)]}:{}}};}function resolveReasoningEventIndex(_0x2af82f){const _0x27ecab={_0x1d215c:0x36,_0x1674a5:0x5e,_0x57da23:0x39c,_0x26a46d:0x3c7,_0x4ba885:0x61,_0x1e4da3:0x60,_0x38a1fa:0x58},_0x29ad99={_0x4511cf:0x1c1,_0x1b512d:0x191},_0xaf5a2f={_0x2ee68f:0xf4,_0x1dc3a8:0x30};function _0x32d548(_0x2315fd,_0x78f429,_0x3aacce,_0x52a2f5){return _0x4bc00b(_0x2315fd-_0xaf5a2f._0x2ee68f,_0x52a2f5-0x197,_0x2315fd,_0x52a2f5-_0xaf5a2f._0x1dc3a8);}function _0x107b68(_0x46ca16,_0x56b794,_0x4dae46,_0x5775c1){return _0x4bc00b(_0x46ca16-0x116,_0x56b794- -_0x29ad99._0x4511cf,_0x5775c1,_0x5775c1-_0x29ad99._0x1b512d);}return _0x2af82f[_0x107b68(-0x5,0x25,_0x27ecab._0x1d215c,_0x27ecab._0x1674a5)]??_0x2af82f[_0x32d548(0x3bf,_0x27ecab._0x57da23,0x3a2,_0x27ecab._0x26a46d)]??_0x2af82f[_0x107b68(0x70,0x92,_0x27ecab._0x4ba885,0xd8)]??_0x2af82f[_0x107b68(_0x27ecab._0x1e4da3,_0x27ecab._0x38a1fa,0x45,0x64)]??0x0;}function createReasoningChunkEvent(_0x4c4131,_0x2a42b1){const _0x20d918={_0x2cc16f:0x2c2,_0x5d3a45:0x3de,_0x54fb78:0x3a2,_0x45e286:0x3c5,_0x36ccd7:0x3ff,_0x20eb51:0x425,_0x58ed1b:0x281,_0x2287dd:0x285,_0x57498b:0x2b6,_0x506e29:0x2bc,_0x1fcfc8:0x2c6,_0x5f2e63:0x2c4,_0x5a6c80:0x31f,_0x10bb2d:0x2d3,_0xa63584:0x2fb,_0x11cbc4:0x30b,_0xf0de4c:0x2f6,_0x27584b:0x2c6,_0x232f27:0x3f2,_0x41b82d:0x402,_0x475986:0x3d6,_0x90db5e:0x2f0,_0x1ca041:0x2be,_0x3e0b50:0x2d1,_0x46124f:0x2c6,_0x1faf88:0x3fb,_0x59db9e:0x440,_0x3002db:0x3bf,_0x5ecf40:0x2d1},_0x106049={_0x732966:0x1df},_0x25ad69={_0xa626b:0x2a5,_0x7eea3d:0xca,_0x234ca0:0x91};function _0x407582(_0x3fd9b0,_0x265ced,_0x37671c,_0x48ee3c){return _0x5c9f18(_0x48ee3c-_0x25ad69._0xa626b,_0x265ced-_0x25ad69._0x7eea3d,_0x37671c,_0x48ee3c-_0x25ad69._0x234ca0);}function _0x1a71b7(_0x5220ca,_0xef329d,_0x3bfb8f,_0x3c3139){return _0x4bc00b(_0x5220ca-0x4e,_0x3c3139-_0x106049._0x732966,_0x3bfb8f,_0x3c3139-0x7d);}switch(_0x4c4131['type']){case'anthropic_thinking_delta':return{'type':_0x407582(0x29b,0x300,0x285,_0x20d918._0x2cc16f),'index':resolveReasoningEventIndex(_0x4c4131),'messageId':_0x2a42b1,'chunk':{'type':_0x1a71b7(0x40e,_0x20d918._0x5d3a45,0x3e5,0x3d0),'index':_0x4c4131[_0x1a71b7(0x39a,0x3a6,_0x20d918._0x54fb78,_0x20d918._0x45e286)]??0x0,'thinking':_0x4c4131['thinking']??''},'text':_0x4c4131[_0x1a71b7(0x3e1,_0x20d918._0x36ccd7,_0x20d918._0x20eb51,0x415)]??''};case _0x407582(_0x20d918._0x58ed1b,_0x20d918._0x2287dd,0x2c6,_0x20d918._0x57498b):return{'type':_0x407582(_0x20d918._0x506e29,_0x20d918._0x1fcfc8,_0x20d918._0x5f2e63,0x2c2),'index':resolveReasoningEventIndex(_0x4c4131),'messageId':_0x2a42b1,'chunk':{'type':'openai_reasoning_delta','contentIndex':_0x4c4131[_0x407582(0x32e,_0x20d918._0x5a6c80,_0x20d918._0x10bb2d,_0x20d918._0xa63584)]??0x0,'delta':_0x4c4131[_0x407582(_0x20d918._0x11cbc4,0x288,0x2c2,_0x20d918._0x1fcfc8)]??'','itemId':_0x4c4131['itemId']??'','outputIndex':_0x4c4131['outputIndex']??0x0},'text':_0x4c4131[_0x407582(0x30e,0x2d4,_0x20d918._0xf0de4c,_0x20d918._0x27584b)]??''};case _0x407582(0x2ca,0x317,0x313,0x2d1):return{'type':_0x1a71b7(_0x20d918._0x232f27,0x3f3,_0x20d918._0x41b82d,_0x20d918._0x475986),'index':resolveReasoningEventIndex(_0x4c4131),'messageId':_0x2a42b1,'chunk':{'type':_0x407582(_0x20d918._0x90db5e,0x2bc,_0x20d918._0x1ca041,_0x20d918._0x3e0b50),'delta':_0x4c4131[_0x407582(0x30e,0x2ef,_0x20d918._0x5f2e63,_0x20d918._0x46124f)]??'','itemId':_0x4c4131[_0x1a71b7(_0x20d918._0x1faf88,0x376,0x3df,0x3ba)]??'','outputIndex':_0x4c4131[_0x1a71b7(_0x20d918._0x59db9e,0x3c7,_0x20d918._0x3002db,0x3f8)]??0x0,'summaryIndex':_0x4c4131['summaryIndex']??0x0},'text':_0x4c4131[_0x407582(0x2b6,_0x20d918._0x5ecf40,_0x20d918._0x57498b,0x2c6)]??''};default:return void 0x0;}}function isAbortedToolResult(_0x3fe212){const _0x545366={_0x3aab8d:0x1db,_0x53d1b2:0x196,_0x195479:0x1e1,_0x2db179:0x216,_0x29220d:0x238,_0xb09ff5:0x239},_0x43d78e={_0x26ecb7:0x6c,_0x5d04b3:0x10},_0x4cece5={_0x97f6f9:0xe,_0x42aeac:0x6a};function _0x39a2a1(_0x32f8ad,_0x5e52ad,_0x3cd012,_0x20b595){return _0x4bc00b(_0x32f8ad-0x9d,_0x32f8ad- -_0x4cece5._0x97f6f9,_0x5e52ad,_0x20b595-_0x4cece5._0x42aeac);}function _0x31e0f8(_0x259228,_0x309d99,_0x521292,_0xc1f797){return _0x4bc00b(_0x259228-0x31,_0x309d99- -_0x43d78e._0x26ecb7,_0x521292,_0xc1f797-_0x43d78e._0x5d04b3);}return _0x3fe212[_0x31e0f8(0x21a,_0x545366._0x3aab8d,0x1ad,_0x545366._0x53d1b2)]==='error'&&_0x3fe212[_0x31e0f8(0x1b0,_0x545366._0x195479,_0x545366._0x2db179,0x1c3)][_0x39a2a1(_0x545366._0x29220d,_0x545366._0xb09ff5,0x24d,0x21e)]===!![];}async function executeModelRequest(_0xc7fd71,_0x4b5638,_0x22a0ea,_0x53c921,_0xdfedc4){const _0x89fb99={_0x5229a0:0x425,_0x4496e6:0x49c,_0x5b29ae:0x46e,_0x227769:0x411,_0x434a61:0x451,_0x5824e5:0x45c,_0xfbdf24:0x4bc,_0x40cc63:0x444,_0x37453d:0x44e,_0x2e64c6:0x36b,_0x410407:0x330,_0x49d952:0x309,_0x38a47e:0x326,_0x5a0169:0x433,_0x34fcc3:0x468,_0x1dad4f:0x487,_0xb754b0:0x4a8,_0x309401:0x41f,_0x44444e:0x405,_0x22a9c1:0x350,_0x2599ca:0x466,_0x2a1c77:0x46c,_0x444653:0x4ae,_0x50a1b1:0x30a,_0x5078d2:0x34c,_0x3d3882:0x36e,_0x583e85:0x445,_0x1706ba:0x448,_0x2c2527:0x41a,_0x329463:0x4ad,_0x24b620:0x4d1,_0x1cd45e:0x426,_0x40f9e2:0x448,_0x50a9ed:0x2ff,_0xf0f8d6:0x30c},_0x391398={_0xaf0631:0x45d,_0x1323ca:0x44};throwIfAborted(_0x4b5638[_0x532a26(_0x89fb99._0x5229a0,_0x89fb99._0x4496e6,0x468,0x443)]);if(!_0x4b5638['streaming']||!_0x22a0ea[_0x532a26(_0x89fb99._0x5b29ae,_0x89fb99._0x227769,0x44e,0x437)]['stream'])return await _0x22a0ea[_0x532a26(0x427,_0x89fb99._0x434a61,0x44e,0x453)][_0x532a26(0x4b3,_0x89fb99._0x5824e5,0x49f,_0x89fb99._0xfbdf24)](_0xc7fd71,{'signal':_0x4b5638[_0x532a26(0x484,0x490,0x468,0x453)]});function _0x532a26(_0x3b07e9,_0x383eb8,_0x37cdd4,_0x30ce4f){return _0x5c9f18(_0x37cdd4-_0x391398._0xaf0631,_0x383eb8-0x1a2,_0x30ce4f,_0x30ce4f-_0x391398._0x1323ca);}let _0x51051a;for await(const _0x3c7e26 of _0x22a0ea[_0x532a26(_0x89fb99._0x40cc63,0x415,_0x89fb99._0x37453d,0x45a)][_0x4bc992(_0x89fb99._0x2e64c6,_0x89fb99._0x410407,_0x89fb99._0x49d952,_0x89fb99._0x38a47e)](_0xc7fd71,{'signal':_0x4b5638[_0x532a26(0x459,_0x89fb99._0x5a0169,_0x89fb99._0x34fcc3,_0x89fb99._0x1dad4f)]})){throwIfAborted(_0x4b5638[_0x532a26(0x489,_0x89fb99._0xb754b0,0x468,_0x89fb99._0x309401)]);if(_0x3c7e26['type']===_0x532a26(0x443,_0x89fb99._0x44444e,0x445,0x418)){_0x51051a=_0x3c7e26['response'];continue;}const _0x3c8b69=createReasoningChunkEvent(_0x3c7e26,_0xdfedc4[_0x4bc992(_0x89fb99._0x22a9c1,0x32c,0x359,0x31e)]);if(_0x3c8b69&&_0x3c8b69[_0x532a26(0x472,_0x89fb99._0x2599ca,_0x89fb99._0x2a1c77,_0x89fb99._0x444653)]===_0x4bc992(0x355,_0x89fb99._0x50a1b1,0x352,_0x89fb99._0x5078d2)&&_0x3c8b69['text'][_0x4bc992(0x363,0x333,_0x89fb99._0x3d3882,0x337)]>0x0){await emitEvent2(_0x22a0ea[_0x532a26(_0x89fb99._0x583e85,0x407,_0x89fb99._0x1706ba,_0x89fb99._0x2c2527)],_0x3c8b69,_0x53c921);continue;}const _0x21871b=createAssistantChunkEvent(_0x3c7e26,_0xdfedc4[_0x532a26(_0x89fb99._0x329463,0x4fe,_0x89fb99._0x24b620,0x4c8)]);if(_0x21871b){await emitEvent2(_0x22a0ea[_0x532a26(0x413,_0x89fb99._0x1cd45e,_0x89fb99._0x40f9e2,0x483)],_0x21871b,_0x53c921);continue;}const _0x1fad59=createToolUseChunkEvent(_0x3c7e26,_0xdfedc4['assistantMessageId']);_0x1fad59&&await emitEvent2(_0x22a0ea[_0x4bc992(_0x89fb99._0x50a9ed,_0x89fb99._0xf0f8d6,0x351,0x31a)],_0x1fad59,_0x53c921);}if(!_0x51051a)throw new Error('Model\x20stream\x20ended\x20without\x20a\x20final\x20response');function _0x4bc992(_0x409489,_0xbb782e,_0x24ba29,_0x540c61){return _0x5c9f18(_0x540c61-0x32f,_0xbb782e-0x1f,_0x24ba29,_0x540c61-0x186);}return _0x51051a;}function makeTurnGuards(_0x4fa7ad,_0x2f071b,_0x18bad3,_0x5a02c5,_0x222e42){return{async 'stage'(_0x18979d,_0x53030b){return throwIfAborted(_0x4fa7ad),await runStage(_0x2f071b,_0x18979d,_0x53030b,_0x5a02c5);},async 'emit'(_0x6de1dc){throwIfAborted(_0x4fa7ad),await emitEvent2(_0x18bad3,_0x6de1dc,_0x222e42);},async 'stageUnchecked'(_0x130b86,_0x26cecd){return await runStage(_0x2f071b,_0x130b86,_0x26cecd,_0x5a02c5);},async 'emitUnchecked'(_0x2e784d){await emitEvent2(_0x18bad3,_0x2e784d,_0x222e42);}};}async function runTurn(_0x4a797d,_0x495946){const _0x8e9c13={_0x41a498:0x250,_0x2d3a51:0x227,_0x4a648d:0x24e,_0x4d48f2:0x22e,_0x1c7fe8:0x98,_0x5c5a04:0xad,_0x184bc7:0xe6,_0x1f618f:0xca,_0x2d5ccb:0xa1,_0x3d1780:0x1f4,_0xbdd702:0x21d,_0xba4e5b:0x1d3,_0x387024:0x21c,_0x53cdb9:0xad,_0xbdfc0a:0xc9,_0x2be729:0xe7,_0x2ec350:0x1f9,_0xb68481:0x1ed,_0x5a42f0:0x23f,_0x2fceeb:0x269,_0x4e58fd:0x25c,_0x197a33:0x1ac,_0x3e3017:0x197,_0x6175e8:0xb1,_0x41919f:0x39,_0x36007b:0x115,_0x31da4f:0x248,_0x15617c:0x265,_0x2fd0d2:0x21c,_0x465528:0x23c,_0x2000fb:0x18b,_0x3c1466:0x1d3,_0x1334e5:0x1dc,_0x5e3b4a:0x21a,_0xd9d614:0x202,_0xa04589:0xb6,_0x360b74:0x9d,_0x5c98f0:0x130,_0x263bc2:0x24b,_0x4f88e6:0x228,_0x29ad5c:0x208,_0xc57858:0x1eb,_0x523b1e:0x223,_0x5170d9:0x22f,_0xceff31:0x219,_0x13b4b9:0x264,_0x1ad375:0x273,_0x2d3edf:0x1fc,_0xd07139:0x1b3,_0x5d91e5:0x222,_0x195ab4:0xe8,_0x29e009:0x1b9,_0x951282:0x1a8,_0x4f6949:0x1f2,_0x5b57f6:0x90,_0x25f616:0x96,_0x111368:0xdd,_0x2c18c3:0x223,_0x430000:0x242,_0x738d0d:0x1b1,_0x4f94c4:0x9a,_0xf45478:0xa4,_0x55468d:0x1e3,_0x54ac0d:0x21f,_0x5706ed:0x1d9,_0x179803:0x70,_0x1a35d4:0x6f,_0x43da85:0x7a,_0xe8ac41:0xda,_0x409b7b:0xd0,_0x414e0f:0xac,_0x32d2bb:0xf6,_0x31f30a:0x116,_0x1f60a8:0x148,_0x54810f:0x146,_0x19d2e2:0x80,_0x1006da:0x76,_0xa7b24f:0x216,_0x5c2d3d:0x1eb,_0x38b731:0x19b,_0x288c69:0x1f5,_0x489a17:0xa3,_0x3837f7:0xe9,_0x4453e5:0x6b,_0x3f4e94:0x7e,_0x5d8676:0xc2,_0x3c4880:0x9f,_0x481705:0x7b,_0x45902e:0x204,_0x4d2567:0x1cd},_0x2825c0={_0x1e6a0c:0x20},_0x37adef=_0x4a797d[_0x36d05f(-_0x8e9c13._0x41a498,-0x22e,-_0x8e9c13._0x2d3a51,-_0x8e9c13._0x4a648d)]??new AbortController()[_0x36d05f(-0x213,-_0x8e9c13._0x4d48f2,-0x229,-_0x8e9c13._0x4d48f2)],_0x571396={'sessionId':_0x4a797d[_0x308c67(-_0x8e9c13._0x1c7fe8,-_0x8e9c13._0x5c5a04,-0xae,-_0x8e9c13._0x1c7fe8)],'turnId':_0x4a797d[_0x308c67(-_0x8e9c13._0x184bc7,-_0x8e9c13._0x1f618f,-_0x8e9c13._0x2d5ccb,-0xaa)],'system':normalizeSystem(_0x4a797d[_0x36d05f(-0x1cf,-_0x8e9c13._0x3d1780,-_0x8e9c13._0xbdd702,-0x1e4)]),'messages':(_0x4a797d[_0x36d05f(-0x1c5,-_0x8e9c13._0xba4e5b,-_0x8e9c13._0x387024,-0x1ea)]??[])[_0x308c67(-_0x8e9c13._0x53cdb9,-0x81,-_0x8e9c13._0xbdfc0a,-_0x8e9c13._0x2be729)](normalizeMessage),'lastResponse':void 0x0,'toolResults':[],'finalMessage':void 0x0};function _0x308c67(_0x56d0f1,_0x2c84ef,_0x11fac6,_0x5d9c9e){return _0x5c9f18(_0x56d0f1- -0xea,_0x2c84ef-0x1d7,_0x11fac6,_0x5d9c9e-0xa4);}function _0x36d05f(_0x1d4f3e,_0x1c6411,_0x40adcd,_0x1659d0){return _0x5c9f18(_0x1c6411- -0x239,_0x1c6411-0xc2,_0x1659d0,_0x1659d0-_0x2825c0._0x1e6a0c);}const _0x21e7f9=makeExtensionContext(_0x571396),_0x1cf8b1={'sessionId':_0x571396[_0x36d05f(-0x1af,-0x1e7,-0x20c,-0x22e)],'turnId':_0x571396['turnId'],'state':_0x571396,'signal':_0x37adef},{stage:_0x886e1a,emit:_0x5cb9cd,stageUnchecked:_0xd5a7ed,emitUnchecked:_0x201aba}=makeTurnGuards(_0x37adef,_0x495946[_0x36d05f(-_0x8e9c13._0x2ec350,-0x21f,-_0x8e9c13._0xb68481,-_0x8e9c13._0x5a42f0)],_0x495946[_0x36d05f(-0x23f,-0x24e,-0x24f,-_0x8e9c13._0x2fceeb)],_0x21e7f9,_0x1cf8b1);let _0x4bfc0c=0x0;try{const _0x3a19da=await _0x886e1a(_0x36d05f(-_0x8e9c13._0x2ec350,-_0x8e9c13._0x2d3a51,-_0x8e9c13._0x4e58fd,-0x1df),normalizeMessage(_0x4a797d['message']));_0x571396[_0x36d05f(-_0x8e9c13._0x197a33,-0x1d3,-_0x8e9c13._0x3e3017,-0x1a4)]['push'](_0x3a19da),await _0x5cb9cd({'type':_0x308c67(-0x80,-_0x8e9c13._0x6175e8,-0xb0,-_0x8e9c13._0x41919f),'message':_0x3a19da});while(!![]){throwIfAborted(_0x37adef),_0x4bfc0c+=0x1;const _0x108c77=createAssistantMessageId(_0x571396[_0x308c67(-0xe6,-0xad,-_0x8e9c13._0x36007b,-0xea)],_0x4bfc0c),_0x3ec7fb=createReasoningMessageId(_0x108c77);let _0x5c3664={'model':_0x495946[_0x36d05f(-0x209,-_0x8e9c13._0x31da4f,-0x256,-_0x8e9c13._0x15617c)]['model'],'maxTokens':_0x495946[_0x36d05f(-0x23f,-0x248,-0x216,-_0x8e9c13._0x2fd0d2)]['maxTokens']??0x4000,'system':structuredClone(_0x571396[_0x36d05f(-_0x8e9c13._0x465528,-0x1f4,-0x1e1,-0x20d)]),'messages':structuredClone(_0x571396[_0x36d05f(-_0x8e9c13._0x2000fb,-_0x8e9c13._0x3c1466,-_0x8e9c13._0x1334e5,-_0x8e9c13._0x5e3b4a)]),'tools':_0x495946[_0x36d05f(-0x1d9,-0x1fb,-0x21f,-_0x8e9c13._0xd9d614)]['listToolSchemas'](),'metadata':{'sessionId':_0x571396['sessionId'],'turnId':_0x571396[_0x308c67(-0xe6,-_0x8e9c13._0xa04589,-_0x8e9c13._0x360b74,-_0x8e9c13._0x5c98f0)]}};_0x5c3664=await _0x886e1a('beforeModelRequest',_0x5c3664),await _0x5cb9cd({'type':_0x36d05f(-0x258,-_0x8e9c13._0x263bc2,-0x237,-0x249),'request':_0x5c3664});let _0x58646a=await executeModelRequest(_0x5c3664,_0x4a797d,_0x495946,_0x1cf8b1,{'assistantMessageId':_0x108c77,'reasoningMessageId':_0x3ec7fb});_0x58646a=await _0x886e1a('afterModelResponse',_0x58646a),await _0x5cb9cd({'type':_0x36d05f(-_0x8e9c13._0x4f88e6,-_0x8e9c13._0x29ad5c,-_0x8e9c13._0xc57858,-_0x8e9c13._0x523b1e),'response':_0x58646a}),_0x571396[_0x36d05f(-0x222,-0x233,-0x238,-0x23d)]=_0x58646a;let _0x273622=await _0x886e1a(_0x36d05f(-_0x8e9c13._0x5170d9,-0x1e6,-0x1e0,-_0x8e9c13._0xceff31),withMessageId(responseToAssistantMessage(_0x58646a),_0x108c77));_0x273622=withMessageId(_0x273622,_0x108c77);const _0x4cab62=getToolUseBlocks(_0x273622),_0x28d973=await Promise[_0x36d05f(-_0x8e9c13._0x13b4b9,-0x252,-0x240,-_0x8e9c13._0x1ad375)](_0x4cab62[_0x36d05f(-0x1f4,-_0x8e9c13._0x2d3edf,-_0x8e9c13._0xd07139,-_0x8e9c13._0x5d91e5)](_0x30732a=>_0x886e1a(_0x308c67(-0xa2,-0xdb,-0x61,-0x87),_0x30732a)));_0x28d973['length']>0x0&&(_0x273622=replaceToolUseBlocks(_0x273622,_0x28d973));const _0x3f80e2=withMessageId(_0x273622,_0x108c77);_0x273622=_0x3f80e2;const _0x22870d=createReasoningMessage(_0x273622),_0x2726b9=createAssistantTextMessage(_0x273622),_0x6be923=createToolUseMessage(_0x273622);_0x22870d&&await _0x5cb9cd({'type':_0x308c67(-_0x8e9c13._0x195ab4,-0xc0,-0xe3,-0x125),'message':withMessageId(_0x22870d,_0x3ec7fb)});_0x2726b9&&await _0x5cb9cd({'type':'assistant_message','message':withMessageId(_0x2726b9,_0x108c77)});_0x6be923&&await _0x5cb9cd({'type':_0x36d05f(-_0x8e9c13._0x29e009,-0x1d6,-_0x8e9c13._0x951282,-0x1ee),'message':withMessageId(_0x6be923,_0x108c77)});_0x571396['messages'][_0x36d05f(-0x1b6,-_0x8e9c13._0x4f6949,-0x20a,-0x1aa)](_0x3f80e2);for(const _0x42e24c of _0x28d973){await _0x5cb9cd({'type':_0x308c67(-0xa4,-_0x8e9c13._0x5b57f6,-0xe3,-_0x8e9c13._0x25f616),'toolCall':_0x42e24c});}if(_0x28d973[_0x36d05f(-0x240,-0x231,-0x241,-0x26f)]===0x0){const _0x19c7ac=await _0x886e1a(_0x308c67(-0x9b,-_0x8e9c13._0x111368,-0xa9,-0xe0),_0x273622),_0x50a4d1=withMessageId(_0x19c7ac,_0x108c77);return _0x571396[_0x36d05f(-0x23f,-_0x8e9c13._0x2c18c3,-_0x8e9c13._0x430000,-0x258)]=_0x50a4d1,_0x571396[_0x36d05f(-0x1ac,-0x1d3,-0x1b5,-_0x8e9c13._0x738d0d)][_0x571396[_0x308c67(-0x84,-0xb7,-_0x8e9c13._0x4f94c4,-_0x8e9c13._0xf45478)]['length']-0x1]=_0x50a4d1,await _0x5cb9cd({'type':'final_message','message':_0x50a4d1}),throwIfAborted(_0x37adef),await _0x495946[_0x36d05f(-_0x8e9c13._0x55468d,-_0x8e9c13._0x54ac0d,-0x1d8,-_0x8e9c13._0x5706ed)]['runObservers'](_0x308c67(-0xaa,-_0x8e9c13._0x179803,-_0x8e9c13._0x1a35d4,-0x8b),_0x571396,_0x21e7f9),await _0x5cb9cd({'type':_0x308c67(-0x90,-0xa5,-0x6c,-_0x8e9c13._0x43da85),'state':_0x571396}),{'status':_0x308c67(-_0x8e9c13._0xe8ac41,-0x113,-0x121,-_0x8e9c13._0x409b7b),'finalMessage':_0x50a4d1,'state':_0x571396};}let _0x317866=await _0x495946[_0x308c67(-_0x8e9c13._0x414e0f,-_0x8e9c13._0x32d2bb,-0x9b,-0xae)]['executeCalls'](_0x28d973,_0x1cf8b1);const _0x55073c=_0x317866[_0x36d05f(-0x1f3,-0x1fd,-0x230,-0x1c7)](isAbortedToolResult),_0x4db978=_0x55073c?_0xd5a7ed:_0x886e1a,_0x337a28=_0x55073c?_0x201aba:_0x5cb9cd;_0x317866=await Promise[_0x308c67(-0x103,-_0x8e9c13._0x31f30a,-_0x8e9c13._0x1f60a8,-_0x8e9c13._0x54810f)](_0x317866[_0x308c67(-0xad,-_0x8e9c13._0xf45478,-_0x8e9c13._0x19d2e2,-_0x8e9c13._0x1006da)](_0x358d6d=>_0x4db978('afterToolResult',_0x358d6d))),_0x571396['toolResults']['push'](..._0x317866);for(const _0x28e42b of _0x317866){await _0x337a28({'type':_0x36d05f(-0x1d9,-0x203,-0x1ce,-_0x8e9c13._0xa7b24f),'result':_0x28e42b});}const _0x2fc8c4=await _0x4db978('beforeToolResultAppend',createToolResultUserMessage(_0x317866));await _0x337a28({'type':'tool_result_message','message':_0x2fc8c4}),_0x571396[_0x36d05f(-_0x8e9c13._0x5c2d3d,-0x1d3,-_0x8e9c13._0x38b731,-_0x8e9c13._0x288c69)][_0x308c67(-_0x8e9c13._0x489a17,-0xa8,-_0x8e9c13._0x3837f7,-_0x8e9c13._0x4453e5)](_0x2fc8c4);if(_0x55073c)return{'status':_0x308c67(-_0x8e9c13._0x3f4e94,-0x3d,-_0x8e9c13._0x5d8676,-_0x8e9c13._0x3c4880),'state':_0x571396};}}catch(_0xc233a9){if(!_0x37adef[_0x308c67(-_0x8e9c13._0x3f4e94,-0x65,-_0x8e9c13._0x481705,-0x58)])throw _0xc233a9;return{'status':_0x36d05f(-_0x8e9c13._0x45902e,-_0x8e9c13._0x4d2567,-0x191,-0x1e3),'state':_0x571396};}}function createSessionId(){const _0xe98402={_0x3b1d53:0x28d,_0x18bf07:0x2a1,_0x37fd9b:0x2ff,_0x546e3b:0xfd,_0x478d2c:0xcb,_0x35bf82:0xcb},_0x5e656c={_0x3c6fb7:0xa3,_0x548f13:0xdd,_0x2519b1:0x26},_0xc85ad6={_0x3f074f:0x290,_0x5b0ed4:0xee,_0x1f70b8:0xc2};function _0x2369a6(_0x4fb012,_0x16dde6,_0x3b6896,_0x5b1317){return _0x5c9f18(_0x4fb012-_0xc85ad6._0x3f074f,_0x16dde6-_0xc85ad6._0x5b0ed4,_0x16dde6,_0x5b1317-_0xc85ad6._0x1f70b8);}function _0x1b5be5(_0x5b0f7d,_0xabda72,_0x2feed8,_0x7bba03){return _0x5c9f18(_0x7bba03-_0x5e656c._0x3c6fb7,_0xabda72-_0x5e656c._0x548f13,_0xabda72,_0x7bba03-_0x5e656c._0x2519b1);}return _0x2369a6(0x284,_0xe98402._0x3b1d53,_0xe98402._0x18bf07,0x2c4)+Date[_0x2369a6(_0xe98402._0x37fd9b,0x2d6,0x2ca,0x33d)]()+'-'+Math[_0x1b5be5(_0xe98402._0x546e3b,0x8b,_0xe98402._0x478d2c,_0xe98402._0x35bf82)]()['toString'](0x10)['slice'](0x2,0xa);}function createTurnId(_0x33548e){return'turn-'+_0x33548e;}function createDefaultMessage(_0x5a6854){if(_0x5a6854===void 0x0)return void 0x0;return normalizeUserInput(_0x5a6854);}function normalizeUserInput(_0x18b46c){const _0x3ab5be={_0x104753:0x1fb,_0x5805e0:0x1db,_0x3ca204:0x1d4,_0x5c1a0c:0x1de,_0x164524:0x215,_0x138a58:0x1f6},_0x1ac4c0={_0x3331af:0x1db},_0x80ce4b={_0x335618:0x74};function _0xb0d7c5(_0x40c963,_0x4b613a,_0xc8c913,_0x4d8e0a){return _0x4bc00b(_0x40c963-0x5e,_0x4d8e0a-_0x80ce4b._0x335618,_0x4b613a,_0x4d8e0a-0x156);}if(typeof _0x18b46c===_0x2b62ce(_0x3ab5be._0x104753,0x23a,_0x3ab5be._0x5805e0,_0x3ab5be._0x3ca204))return{'role':_0x2b62ce(_0x3ab5be._0x5c1a0c,0x1a6,0x1f9,0x1a6),'content':[{'type':_0x2b62ce(_0x3ab5be._0x164524,0x239,0x1f4,_0x3ab5be._0x138a58),'text':_0x18b46c}]};function _0x2b62ce(_0x1fbc86,_0x5bcd0e,_0x1f7a8c,_0x2c8e47){return _0x5c9f18(_0x1fbc86-_0x1ac4c0._0x3331af,_0x5bcd0e-0x1a,_0x1f7a8c,_0x2c8e47-0x1bd);}return normalizeMessage(_0x18b46c);}function resolveChatModel(_0x31ca86){if(!_0x31ca86['chatModel'])throw new Error('Agent\x20requires\x20a\x20chatModel');return _0x31ca86['chatModel'];}function createRegistry(_0x2c3c7f){const _0x270531={_0x12b7c6:0xad,_0x2622d7:0xae,_0x4da160:0x198},_0xf5244d={_0x38ff8a:0x182};if(_0x2c3c7f[_0xcc4f96(-0xcc,-0x100,-_0x270531._0x12b7c6,-_0x270531._0x2622d7)])return _0x2c3c7f[_0x1f3b7e(-0x207,-0x223,-0x238,-0x263)];const _0x5ca815=createExtensionRegistry();function _0xcc4f96(_0x141b3b,_0x1e4ad7,_0xb94a8e,_0x14e972){return _0x4bc00b(_0x141b3b-_0xf5244d._0x38ff8a,_0x141b3b- -0x2c0,_0x1e4ad7,_0x14e972-0x9a);}const _0x523ad8=_0x2c3c7f[_0x1f3b7e(-0x1a6,-0x1c8,-0x1de,-_0x270531._0x4da160)]??[];for(const _0x52236e of _0x523ad8){_0x5ca815['register'](_0x52236e);}function _0x1f3b7e(_0x2174a9,_0x397f55,_0xbc30a1,_0x23f3f6){return _0x4bc00b(_0x2174a9-0xdb,_0x397f55- -0x417,_0xbc30a1,_0x23f3f6-0x86);}return _0x5ca815;}var Agent=class{['deps'];[_0x4bc00b(0x202,0x22c,0x1fb,0x24c)];[_0x5c9f18(0x54,0x6f,0x2e,0x7c)];[_0x4bc00b(0x24f,0x240,0x226,0x278)];[_0x4bc00b(0x254,0x22a,0x23f,0x231)];[_0x4bc00b(0x1cf,0x212,0x1df,0x1f7)];constructor(_0xa7bfd6={}){const _0x1c6fa7={_0x2f0cb2:0x19d,_0x474993:0x1ef,_0x589aee:0x186,_0x3eb1e9:0x1df,_0x505e08:0x1bb,_0x320339:0x278,_0x3a132d:0x2df,_0x22401d:0x2b9,_0x210482:0x23a,_0x165425:0x2ba,_0x100d0d:0x2c5,_0x5d6dc6:0x279,_0x1c78dd:0x2d3,_0xa6c429:0x2a9,_0x5af6f2:0x1bf,_0x5034ef:0x2b2,_0x102851:0x2fc,_0x55eed1:0x2b5,_0x5e3dfd:0x2a5},_0x4afab8={_0x1c8592:0x8e,_0x100bbb:0x4c0},_0xab9ab1={_0x38c6ec:0x3e9};this[_0xcce580(-0x199,-0x1dc,-0x19f,-0x1bd)]=_0xa7bfd6[_0xcce580(-_0x1c6fa7._0x2f0cb2,-_0x1c6fa7._0x474993,-0x1fd,-0x1bd)]??createSessionId();function _0xcce580(_0x2f428f,_0x48d10f,_0x38ff11,_0x3072d1){return _0x4bc00b(_0x2f428f-0x119,_0x3072d1- -_0xab9ab1._0x38c6ec,_0x2f428f,_0x3072d1-0x14c);}this['turnIndex']=0x0,this[_0xcce580(-0x1ed,-_0x1c6fa7._0x589aee,-_0x1c6fa7._0x3eb1e9,-_0x1c6fa7._0x505e08)]=_0xa7bfd6[_0x363fc3(-0x2fd,-_0x1c6fa7._0x320339,-_0x1c6fa7._0x3a132d,-_0x1c6fa7._0x22401d)]??'';function _0x363fc3(_0x2bcce2,_0x11f2ab,_0x5d1275,_0x505bee){return _0x4bc00b(_0x2bcce2-_0x4afab8._0x1c8592,_0x505bee- -_0x4afab8._0x100bbb,_0x2bcce2,_0x505bee-0xed);}this['messages']=(_0xa7bfd6[_0x363fc3(-_0x1c6fa7._0x210482,-0x259,-_0x1c6fa7._0x165425,-0x280)]??[])[_0x363fc3(-_0x1c6fa7._0x100d0d,-_0x1c6fa7._0x5d6dc6,-_0x1c6fa7._0x1c78dd,-_0x1c6fa7._0xa6c429)](normalizeMessage),this[_0xcce580(-0x1cd,-0x1b6,-0x1d2,-_0x1c6fa7._0x5af6f2)]=createDefaultMessage(_0xa7bfd6[_0x363fc3(-0x333,-0x30e,-_0x1c6fa7._0x5034ef,-_0x1c6fa7._0x102851)]);const _0x1959ce=createInternalToolRuntime(_0xa7bfd6['tools']??[],{'onEvent':_0xa7bfd6['onEvent'],'onToolCall':_0xa7bfd6['onToolCall']});this[_0x363fc3(-0x26b,-0x278,-_0x1c6fa7._0x55eed1,-_0x1c6fa7._0x5e3dfd)]={'registry':createRegistry(_0xa7bfd6),'chatModel':resolveChatModel(_0xa7bfd6),'toolRuntime':_0x1959ce,'onEvent':_0xa7bfd6['onEvent']};}get[_0x4bc00b(0x1d6,0x207,0x20d,0x1bf)](){const _0x76f2fe={_0x22d258:0x20,_0x485299:0x58},_0x24e1f3={_0x41256b:0x7e};function _0x5ee964(_0x355e24,_0x4d51e1,_0x424ce8,_0x43cc81){return _0x4bc00b(_0x355e24-_0x24e1f3._0x41256b,_0x424ce8- -0x1d6,_0x43cc81,_0x43cc81-0x1da);}return this[_0x5ee964(_0x76f2fe._0x22d258,0x58,_0x76f2fe._0x485299,0x3a)];}[_0x4bc00b(0x246,0x1fd,0x1ec,0x22d)](_0x54174c=[]){const _0x53d8e6={_0x2c03c9:0x56,_0x38f8bb:0x4a,_0x270033:0x38,_0x5d73ae:0x36,_0x529fef:0x7a},_0x3a6143={_0x3ff898:0xee};function _0x3a09ee(_0x2928f9,_0x133692,_0x5ce2ef,_0x30be5a){return _0x5c9f18(_0x30be5a- -0x77,_0x133692-0x1df,_0x5ce2ef,_0x30be5a-_0x3a6143._0x3ff898);}function _0x24f67c(_0x123c44,_0x56d8e4,_0x3d5787,_0x57a5d4){return _0x4bc00b(_0x123c44-0x111,_0x123c44- -0x3f5,_0x56d8e4,_0x57a5d4-0xfd);}this[_0x3a09ee(-_0x53d8e6._0x2c03c9,-_0x53d8e6._0x38f8bb,-_0x53d8e6._0x270033,-_0x53d8e6._0x5d73ae)][_0x3a09ee(-0x6,-0x1c,-_0x53d8e6._0x529fef,-0x39)]['setTools'](_0x54174c);}[_0x4bc00b(0x24b,0x23c,0x279,0x25f)](_0x2fa511,_0x361493={}){const _0x7177f1={_0x2fcaad:0x111,_0x26dd96:0xe0,_0xce3392:0x121,_0x1a1bbd:0xe8,_0x1d06f0:0xf2},_0x4dbc62={_0x4d2c69:0xd8},_0x2f73a3={_0x374aba:0xaf,_0x27716d:0x8f};function _0x37cebf(_0x598744,_0x264a03,_0x499eb3,_0x3f3716){return _0x4bc00b(_0x598744-_0x2f73a3._0x374aba,_0x499eb3- -0x2fa,_0x264a03,_0x3f3716-_0x2f73a3._0x27716d);}function _0x21d258(_0x1c30de,_0x49ed4a,_0x27e303,_0xd1d301){return _0x5c9f18(_0x49ed4a-_0x4dbc62._0x4d2c69,_0x49ed4a-0xa4,_0x27e303,_0xd1d301-0x125);}this['_systemPrompt']=_0x2fa511,_0x361493[_0x21d258(0x169,0x143,0x15b,_0x7177f1._0x2fcaad)]===!![]&&(this['messages']=[],this[_0x37cebf(-_0x7177f1._0x26dd96,-_0x7177f1._0xce3392,-_0x7177f1._0x1a1bbd,-_0x7177f1._0x1d06f0)]=0x0);}[_0x5c9f18(0x9,0x8,-0x3d,0x49)](_0x2ee200){const _0x5cb580={_0x45e2b7:0x2a0},_0x346ccb={_0x41683b:0x47a},_0x438489={_0x1c1bc3:0x10d,_0x1f82e3:0x4f};function _0x46b94b(_0x27d799,_0x4597ab,_0x2da871,_0x3e7fac){return _0x5c9f18(_0x3e7fac-_0x438489._0x1c1bc3,_0x4597ab-_0x438489._0x1f82e3,_0x2da871,_0x3e7fac-0x3e);}function _0x4be300(_0x235920,_0x2f40aa,_0x33c634,_0x5cc27d){return _0x4bc00b(_0x235920-0xaa,_0x235920- -_0x346ccb._0x41683b,_0x5cc27d,_0x5cc27d-0x114);}this[_0x4be300(-0x25f,-_0x5cb580._0x45e2b7,-0x223,-0x233)][_0x4be300(-0x2af,-0x297,-0x2ea,-0x2f5)]=_0x2ee200;}async[_0x5c9f18(0x37,0x5d,0x14,0x68)](_0xd8c474=this[_0x4bc00b(0x270,0x22a,0x269,0x24e)],_0x5e8ff2={}){const _0x3943ab={_0x3aadab:0x498,_0x4bff3d:0x48b,_0x47ffdd:0x481,_0x15fef7:0xb,_0x12362d:0x3a,_0x3925c6:0x20,_0x9eabcf:0x43,_0x4c6881:0x463,_0x3025e6:0x44b,_0x19020f:0x455,_0x369ca8:0x40f,_0x518e14:0x3c,_0x2313be:0xc,_0xbf4209:0x47,_0xe5b5ec:0x424},_0x558274={_0x4e3718:0x251,_0x270453:0xf6},_0x53d1b8={_0x252d23:0xac};if(!_0xd8c474)throw new Error(_0x452947(0x45f,_0x3943ab._0x3aadab,_0x3943ab._0x4bff3d,_0x3943ab._0x47ffdd));this[_0xd96f67(-0x68,_0x3943ab._0x15fef7,-_0x3943ab._0x12362d,-0x4c)]+=0x1;const _0x52b8c9=await runTurn({'sessionId':this[_0xd96f67(-0x5d,0xf,-_0x3943ab._0x3925c6,-_0x3943ab._0x9eabcf)],'turnId':createTurnId(this[_0x452947(0x463,_0x3943ab._0x4c6881,0x42f,_0x3943ab._0x3025e6)]),'streaming':_0x5e8ff2[_0x452947(_0x3943ab._0x19020f,0x471,0x44b,_0x3943ab._0x369ca8)],'signal':_0x5e8ff2['signal'],'system':this['systemPrompt'],'messages':this[_0xd96f67(-0xd,_0x3943ab._0x518e14,-_0x3943ab._0x2313be,-_0x3943ab._0xbf4209)],'message':normalizeUserInput(_0xd8c474)},this['deps']);function _0xd96f67(_0x36ab2d,_0x463cae,_0x3acc07,_0x2218bc){return _0x5c9f18(_0x3acc07- -0x72,_0x463cae-0x4d,_0x463cae,_0x2218bc-_0x53d1b8._0x252d23);}function _0x452947(_0x24d987,_0x456b3b,_0xc7b0de,_0x495ace){return _0x4bc00b(_0x24d987-0x134,_0x24d987-_0x558274._0x4e3718,_0x456b3b,_0x495ace-_0x558274._0x270453);}return this[_0x452947(0x491,0x460,0x4bf,0x4db)]=_0x52b8c9['state']['messages'][_0x452947(0x468,0x464,_0x3943ab._0xe5b5ec,0x446)](normalizeMessage),_0x52b8c9;}};export{normalizeToolOutputValue,createToolOutput,ToolExecutionError,defineTool,ToolRegistry,validateToolInput,deriveFinalToolOutput,createInternalToolRuntime,createExtensionRegistry,runTurn,Agent};