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

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.10",
3
+ "commit": "aade1f8"
4
4
  }
@@ -1,19 +1,68 @@
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 { A as AgentEvent, C as ChatRequest, R as RunTurnDeps, M as Message, a as AgentOptions, b as AgentInput, c as AgentSendOptions, T as TurnResult, E as EngineChatModel, d as ExtensionRegistry, e as TurnInput } from '../types-Df0vlfj-.js';
2
+ export { f as TurnState } from '../types-Df0vlfj-.js';
3
+
4
+ type AgentMetricsSnapshot = {
5
+ totalTokens: number;
6
+ totalInputTokens: number;
7
+ totalOutputTokens: number;
8
+ totalReasoningTokens: number;
9
+ requestCount: number;
10
+ modelCallCount: number;
11
+ toolCallCount: number;
12
+ totalModelTimeMs: number;
13
+ currentTokens: number;
14
+ currentInputTokens: number;
15
+ currentOutputTokens: number;
16
+ currentReasoningTokens: number;
17
+ currentModelTimeMs: number;
18
+ contextWindowLimit?: number;
19
+ contextWindowUsage?: number;
20
+ };
21
+ type AgentMetricsChangeHandler = (snapshot: AgentMetricsSnapshot) => void;
22
+ type AgentMetricsOptions = {
23
+ getContextWindowLimit?: (request: ChatRequest) => number | undefined;
24
+ };
25
+ interface AgentMetrics {
26
+ getSnapshot(): AgentMetricsSnapshot;
27
+ recordEvent(event: AgentEvent): void;
28
+ reset(): void;
29
+ subscribe(handler: AgentMetricsChangeHandler): () => void;
30
+ }
31
+ declare function createAgentMetrics(options?: AgentMetricsOptions): AgentMetrics;
3
32
 
4
33
  declare class Agent {
34
+ private _systemPrompt;
5
35
  readonly deps: RunTurnDeps;
6
- readonly sessionId: string;
7
- readonly systemPrompt: string;
36
+ readonly metrics: AgentMetrics;
37
+ sessionId: string;
8
38
  messages: Message[];
9
39
  readonly defaultMessage?: Message;
10
40
  turnIndex: number;
11
41
  constructor(options?: AgentOptions);
42
+ get systemPrompt(): string;
43
+ setTools(tools?: AgentOptions["tools"]): void;
44
+ setSystemPrompt(systemPrompt: string, options?: {
45
+ resetMessages?: boolean;
46
+ }): void;
47
+ setSessionId(sessionId: string): void;
48
+ /**
49
+ * Replace the chat model used for subsequent turns. Existing conversation
50
+ * state is preserved; the next call to {@link send} uses the new model.
51
+ * Useful for runtime model switching (e.g. via a `/model` slash command).
52
+ */
53
+ setChatModel(chatModel: RunTurnDeps["chatModel"]): void;
12
54
  send(input?: AgentInput | undefined, options?: AgentSendOptions): Promise<TurnResult>;
13
55
  }
14
56
 
57
+ declare const SUMMARY_SYSTEM_PROMPT = "You are a session-continuity summarizer for a CLI coding assistant. The conversation you are summarizing is an in-progress coding session that was interrupted because the context window is full. Your summary will be injected into a fresh session so the assistant can resume work without losing progress.\n\nProduce a structured summary using the following sections. Omit any section that has no relevant content.\n\n### Session Goal\nState the user's original request or objective in 1-2 sentences.\n\n### Work Completed\nList what has already been done, with specifics:\n- Files created, modified, or deleted (include paths)\n- Key implementation decisions made and their rationale\n- Commands run and their outcomes (pass/fail)\n- Tests written or executed and their results\n\n### Current State\nDescribe where things stand right now:\n- What was the assistant doing when the session ended?\n- Any in-progress file edits or partially completed steps\n- Error messages, failing tests, or blockers encountered\n- The current branch, working directory, or environment state if mentioned\n\n### Remaining Work\nList what still needs to be done to complete the original goal:\n- Specific next steps, in order if sequence matters\n- Known issues or edge cases still unaddressed\n- Any pending user decisions or questions that were unanswered\n\n### Key Context\nPreserve critical details that would be expensive to re-derive:\n- Architecture or design patterns being followed\n- Important variable names, function signatures, or API shapes\n- File paths and line numbers referenced repeatedly\n- Constraints or requirements the user specified\n- Todo list items and their status (pending/in_progress/completed)\n\nRules:\n- Be precise and specific. Use exact file paths, function names, and error messages \u2014 not vague references.\n- Do NOT include conversational pleasantries, repeated back-and-forth, or exploratory dead ends that were abandoned.\n- Do NOT summarize tool calls verbatim. Capture their outcomes and decisions, not the mechanics.\n- Keep the total summary under 1500 tokens. Prioritize actionable state over narrative.\n- Write for a coding agent that will read this summary and immediately resume work, not for a human reader.";
58
+ declare const SUMMARY_MESSAGE_PREFIX = "Previous conversation summary:";
59
+ declare function summarizeMessages(messages: Message[], chatModel: EngineChatModel, options?: {
60
+ signal?: AbortSignal;
61
+ }): Promise<string>;
62
+ declare function buildSummaryMessage(summary: string): Message;
63
+
15
64
  declare function createExtensionRegistry(): ExtensionRegistry;
16
65
 
17
66
  declare function runTurn(input: TurnInput, deps: RunTurnDeps): Promise<TurnResult>;
18
67
 
19
- export { Agent, AgentInput, AgentOptions, AgentSendOptions, ExtensionRegistry, RunTurnDeps, TurnInput, TurnResult, createExtensionRegistry, runTurn };
68
+ export { Agent, AgentInput, type AgentMetrics, type AgentMetricsChangeHandler, type AgentMetricsOptions, type AgentMetricsSnapshot, AgentOptions, AgentSendOptions, ExtensionRegistry, RunTurnDeps, SUMMARY_MESSAGE_PREFIX, SUMMARY_SYSTEM_PROMPT, TurnInput, TurnResult, buildSummaryMessage, createAgentMetrics, createExtensionRegistry, runTurn, summarizeMessages };
@@ -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(_0x15e676,_0x1b5244){const _0x235131={_0x1a2388:0x181,_0x2fa293:0x18b,_0x10bc76:0x194,_0x28b677:0x181,_0x5189fa:0x17f,_0x34a62d:0x178,_0xbe7c48:0x10e,_0x1ddba8:0x118,_0x520cc9:0x107,_0x589080:0x182,_0x2c7754:0x10f,_0x2c9424:0x174,_0x18c830:0x17d,_0xa0107:0x17e},_0x25b8e6={_0x5d7cb7:0x52},_0x19a2be=_0x15e676();function _0x4378c3(_0x23521c,_0x442381,_0x16e76c,_0x18c37a){return _0x40ee(_0x16e76c-_0x25b8e6._0x5d7cb7,_0x23521c);}function _0x54ebbe(_0x2f2ac3,_0x45266c,_0x568f4f,_0x5e7d77){return _0x40ee(_0x45266c- -0x242,_0x2f2ac3);}while(!![]){try{const _0x355e0a=-parseInt(_0x4378c3(_0x235131._0x1a2388,0x191,_0x235131._0x2fa293,_0x235131._0x10bc76))/0x1+-parseInt(_0x4378c3(_0x235131._0x28b677,_0x235131._0x5189fa,0x180,_0x235131._0x34a62d))/0x2+-parseInt(_0x54ebbe(-0x10e,-_0x235131._0xbe7c48,-0x103,-0x10c))/0x3+-parseInt(_0x54ebbe(-0x115,-0x111,-_0x235131._0x1ddba8,-_0x235131._0x520cc9))/0x4+parseInt(_0x4378c3(_0x235131._0x589080,0x179,0x182,0x186))/0x5+-parseInt(_0x54ebbe(-_0x235131._0x2c7754,-0x10d,-0x113,-0x111))/0x6+parseInt(_0x4378c3(_0x235131._0x2c9424,0x174,_0x235131._0x18c830,_0x235131._0xa0107))/0x7*(parseInt(_0x4378c3(0x18f,0x188,0x18d,0x199))/0x8);if(_0x355e0a===_0x1b5244)break;else _0x19a2be['push'](_0x19a2be['shift']());}catch(_0x2cfc88){_0x19a2be['push'](_0x19a2be['shift']());}}}(_0x13eb,0x51a14));import{Agent,createAgentMetrics,createExtensionRegistry,runTurn}from'../chunk-3OMYFJLN.js';function _0x238898(_0xdfb464,_0x4e1f71,_0x36eaa7,_0x573369){const _0x18ac04={_0xe22a83:0x139};return _0x40ee(_0xdfb464-_0x18ac04._0xe22a83,_0x36eaa7);}import{getTextFromMessage}from'../chunk-G2FR4UGO.js';import'../chunk-X7VAACWY.js';function roleLabel(_0x2840eb){const _0x25481c={_0x1620a6:0x18c,_0x4deb31:0x187,_0x40b670:0x18a,_0x171ef9:0x17a,_0x4fb97e:0x178},_0x147781={_0x56afba:0x54};function _0xac2549(_0x5e1d5c,_0x48cbac,_0x3af0cc,_0x53500a){return _0x40ee(_0x48cbac-_0x147781._0x56afba,_0x3af0cc);}if(_0x2840eb==='user')return _0xac2549(0x187,_0x25481c._0x1620a6,0x185,0x198);function _0x517c27(_0x56d377,_0x886e26,_0x1b6694,_0x3796e6){return _0x40ee(_0x56d377-0x283,_0x1b6694);}if(_0x2840eb===_0xac2549(_0x25481c._0x4deb31,_0x25481c._0x40b670,0x194,0x17f))return'Assistant';return _0xac2549(0x170,_0x25481c._0x171ef9,0x172,_0x25481c._0x4fb97e);}function messagesToText(_0x211c31){const _0x25c7fe={_0x37c795:0x146,_0x294956:0x153,_0x33a0ce:0x14f,_0x745cb9:0x15c,_0x213304:0x15b,_0x26bde9:0x152},_0x3c8b94={_0x329885:0x3c0},_0x476c7a={_0x26b40d:0x1f};function _0x5b3513(_0x59b176,_0x390b8f,_0x88afbc,_0x43264d){return _0x40ee(_0x390b8f-0xf2,_0x88afbc);}function _0x501f12(_0x2e9fef,_0x3d9782,_0x3c1e9a,_0x467023){return _0x40ee(_0x467023-_0x476c7a._0x26b40d,_0x3c1e9a);}return _0x211c31[_0x501f12(_0x25c7fe._0x37c795,_0x25c7fe._0x294956,_0x25c7fe._0x33a0ce,0x147)](_0x4293f2=>{const _0x12d796={_0x93412b:0x6f,_0x50d1ff:0x1ab,_0x4a5cfe:0x27e};function _0x746148(_0x33dd52,_0x53c7ed,_0x2709c3,_0x53647a){return _0x501f12(_0x33dd52-_0x12d796._0x93412b,_0x53c7ed-_0x12d796._0x50d1ff,_0x53c7ed,_0x53647a-_0x12d796._0x4a5cfe);}const _0x288e81=getTextFromMessage(_0x4293f2)[_0x746148(_0x3c8b94._0x329885,0x3b8,0x3c1,0x3c4)]();return _0x288e81?roleLabel(_0x4293f2['role'])+':\x20'+_0x288e81:'';})['filter'](_0x47fb7c=>_0x47fb7c['length']>0x0)[_0x501f12(_0x25c7fe._0x745cb9,_0x25c7fe._0x213304,0x14c,_0x25c7fe._0x26bde9)]('\x0a\x0a');}var SUMMARY_SYSTEM_PROMPT=_0x413867(0x40c,0x409,0x40e,0x406),NO_HISTORY='No\x20conversation\x20history\x20to\x20summarize.',SUMMARY_MESSAGE_PREFIX=_0x238898(0x262,0x26b,0x269,0x264);function _0x413867(_0x2f6a13,_0x2871b2,_0x45aad9,_0x49fcba){return _0x40ee(_0x2f6a13-0x2d2,_0x45aad9);}async function summarizeMessages(_0x252105,_0x144d39,_0x3c33f9={}){const _0x36c642={_0x270d6c:0xb7,_0x5c63c1:0xca,_0x1d247c:0xcc,_0x3dab3c:0xc6,_0x15cb6d:0xcd,_0x3b94e5:0xc4,_0x320f18:0xc7,_0x210d45:0xc7,_0x168397:0x218,_0x3c1a1b:0x216,_0x21a031:0xd9,_0x1cbf6d:0xcf,_0x14a610:0xd2,_0x48be83:0xdc},_0x27b284={_0x272b02:0xfe},_0x137b1e={_0x164842:0x55,_0x55e284:0x15};function _0x550d11(_0x4b3335,_0x20031c,_0x11dea7,_0x235d0c){return _0x238898(_0x11dea7- -_0x137b1e._0x164842,_0x20031c-0x15f,_0x4b3335,_0x235d0c-_0x137b1e._0x55e284);}if(_0x252105[_0x476aec(-_0x36c642._0x270d6c,-0xc2,-_0x36c642._0x5c63c1,-0xcd)]===0x0)return NO_HISTORY;const _0x3b9cff=messagesToText(_0x252105),_0x534335={'model':_0x144d39['model'],'maxTokens':_0x144d39['maxTokens']??0x1000,'system':[{'type':_0x476aec(-0xd6,-_0x36c642._0x1d247c,-_0x36c642._0x3dab3c,-0xd4),'text':SUMMARY_SYSTEM_PROMPT}],'messages':[{'role':_0x476aec(-0xd8,-_0x36c642._0x15cb6d,-0xc7,-_0x36c642._0x3b94e5),'content':[{'type':'text','text':_0x3b9cff}]}],'tools':[],'metadata':{'sessionId':'summary','turnId':_0x476aec(-_0x36c642._0x5c63c1,-_0x36c642._0x320f18,-0xd1,-_0x36c642._0x210d45)}};function _0x476aec(_0x519d44,_0x444c12,_0x280fa8,_0x4701d1){return _0x413867(_0x444c12- -0x4cb,_0x444c12-_0x27b284._0x272b02,_0x4701d1,_0x4701d1-0x199);}const _0x4cf1a2=await _0x144d39['complete'](_0x534335,{'signal':_0x3c33f9[_0x550d11(_0x36c642._0x168397,_0x36c642._0x3c1a1b,0x220,0x227)]});return _0x4cf1a2['content'][_0x476aec(-_0x36c642._0x21a031,-0xcf,-0xcf,-0xcf)](_0x24ed1f=>_0x24ed1f[_0x476aec(-0xd4,-0xca,-0xd0,-0xcc)]===_0x550d11(0x215,0x20e,0x211,0x214))['map'](_0x337635=>_0x337635[_0x550d11(0x211,0x20b,0x211,0x215)])[_0x476aec(-_0x36c642._0x210d45,-0xc6,-0xcd,-0xc2)]('')[_0x476aec(-_0x36c642._0x1cbf6d,-_0x36c642._0x14a610,-0xcb,-_0x36c642._0x48be83)]();}function _0x40ee(_0xab881d,_0x1b3d93){_0xab881d=_0xab881d-0x126;const _0x13eb2e=_0x13eb();let _0x40ee67=_0x13eb2e[_0xab881d];if(_0x40ee['NMeYAw']===undefined){var _0x4c8134=function(_0x41946b){const _0x1457fe='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2840eb='',_0x211c31='';for(let _0x4293f2=0x0,_0x288e81,_0x47fb7c,_0x252105=0x0;_0x47fb7c=_0x41946b['charAt'](_0x252105++);~_0x47fb7c&&(_0x288e81=_0x4293f2%0x4?_0x288e81*0x40+_0x47fb7c:_0x47fb7c,_0x4293f2++%0x4)?_0x2840eb+=String['fromCharCode'](0xff&_0x288e81>>(-0x2*_0x4293f2&0x6)):0x0){_0x47fb7c=_0x1457fe['indexOf'](_0x47fb7c);}for(let _0x144d39=0x0,_0x3c33f9=_0x2840eb['length'];_0x144d39<_0x3c33f9;_0x144d39++){_0x211c31+='%'+('00'+_0x2840eb['charCodeAt'](_0x144d39)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x211c31);};_0x40ee['xIEnBj']=_0x4c8134,_0x40ee['zqbeQl']={},_0x40ee['NMeYAw']=!![];}const _0x1d47d6=_0x13eb2e[0x0],_0x3f7fd6=_0xab881d+_0x1d47d6,_0x22e088=_0x40ee['zqbeQl'][_0x3f7fd6];return!_0x22e088?(_0x40ee67=_0x40ee['xIEnBj'](_0x40ee67),_0x40ee['zqbeQl'][_0x3f7fd6]=_0x40ee67):_0x40ee67=_0x22e088,_0x40ee67;}function buildSummaryMessage(_0x1f94e7){const _0x438b75={_0x4e8d60:0x447,_0x5cbb82:0x442,_0x3f2454:0x494},_0x1f4491={_0x1fc21f:0x1cb},_0xc3c6d0={_0x17bf59:0x99};function _0x5b0d7c(_0x5bf1f4,_0x33d659,_0x130ff9,_0x2308ff){return _0x413867(_0x33d659-_0xc3c6d0._0x17bf59,_0x33d659-0xeb,_0x130ff9,_0x2308ff-0x172);}function _0x5b7cb0(_0x51e8a4,_0x488ab0,_0x230458,_0x17ac52){return _0x413867(_0x230458-0x48,_0x488ab0-_0x1f4491._0x1fc21f,_0x17ac52,_0x17ac52-0x1dd);}return{'role':_0x5b7cb0(0x44b,_0x438b75._0x4e8d60,0x446,_0x438b75._0x5cbb82),'content':[{'type':_0x5b0d7c(_0x438b75._0x3f2454,0x498,0x49c,0x4a4),'text':SUMMARY_MESSAGE_PREFIX+'\x0a\x0a'+_0x1f94e7}]};}export{Agent,SUMMARY_MESSAGE_PREFIX,SUMMARY_SYSTEM_PROMPT,buildSummaryMessage,createAgentMetrics,createExtensionRegistry,runTurn,summarizeMessages};function _0x13eb(){const _0x5d6133=['mteXmZaZmLLWwxDytW','DhLWzq','mJu4mda4nwrUBxLkDW','nZm0mdG4uvf1BM53','C3vTBwfYEq','AM9PBG','mJK4ndeWExbpEu9o','mtG0mJznEKnkrwe','yxnZAxn0yw50','BgvUz3rO','vxnLCG','oda2odnZyvbrwvG','ww91igfYzsbHihnLC3nPB24Ty29UDgLUDwL0EsbZDw1TyxjPEMvYigzVCIbHienmssbJB2rPBMCGyxnZAxn0yw50lIbuAguGy29UDMvYC2f0Aw9UihLVDsbHCMuGC3vTBwfYAxPPBMCGAxmGyw4GAw4TChjVz3jLC3mGy29KAw5NihnLC3nPB24GDgHHDcb3yxmGAw50zxjYDxb0zwqGyMvJyxvZzsb0AguGy29UDgv4Dcb3Aw5KB3CGAxmGzNvSBc4Gww91CIbZDw1Tyxj5ihDPBgWGyMuGAw5Qzwn0zwqGAw50BYbHigzYzxnOihnLC3nPB24GC28GDgHLigfZC2LZDgfUDcbJyw4GCMvZDw1LihDVCMSGD2L0Ag91DcbSB3nPBMCGChjVz3jLC3mUcGPqCM9KDwnLigeGC3rYDwn0DxjLzcbZDw1Tyxj5ihvZAw5NihrOzsbMB2XSB3DPBMCGC2vJDgLVBNmUie9TAxqGyw55ihnLy3rPB24GDgHHDcbOyxmGBM8GCMvSzxzHBNqGy29UDgvUDc4kcImJiYbtzxnZAw9UieDVywWku3rHDguGDgHLihvZzxiNCYbVCMLNAw5HBcbYzxf1zxn0ig9Yig9IAMvJDgL2zsbPBIaXltiGC2vUDgvUy2vZlGOkiYmJifDVCMSGq29TCgXLDgvKcKXPC3qGD2HHDcbOyxmGywXYzwfKEsbIzwvUigrVBMuSihDPDgGGC3bLy2LMAwnZoGOTiezPBgvZignYzwf0zwqSig1VzgLMAwvKlcbVCIbKzwXLDgvKicHPBMnSDwrLihbHDgHZkqOTieTLEsbPBxbSzw1LBNrHDgLVBIbKzwnPC2LVBNmGBwfKzsbHBMqGDgHLAxiGCMf0Aw9UywXLcI0Gq29TBwfUzhmGCNvUigfUzcb0AgvPCIbVDxrJB21LCYaOCgfZCY9MywLSkqOTifrLC3rZihDYAxr0zw4GB3iGzxHLy3v0zwqGyw5KihrOzwLYihjLC3vSDhmkcImJiYbdDxjYzw50ifn0yxrLcKrLC2nYAwjLihDOzxjLihrOAw5NCYbZDgfUzcbYAwDODcbUB3C6cI0Gv2HHDcb3yxmGDgHLigfZC2LZDgfUDcbKB2LUzYb3AgvUihrOzsbZzxnZAw9UigvUzgvKpWOTiefUEsbPBI1WCM9NCMvZCYbMAwXLigvKAxrZig9YihbHCNrPywXSEsbJB21WBgv0zwqGC3rLChmklsbfCNjVCIbTzxnZywDLCYWGzMfPBgLUzYb0zxn0CYWGB3iGyMXVy2TLCNmGzw5JB3vUDgvYzwqklsbuAguGy3vYCMvUDcbICMfUy2GSihDVCMTPBMCGzgLYzwn0B3j5lcbVCIbLBNzPCM9UBwvUDcbZDgf0zsbPzIbTzw50Aw9UzwqkcImJiYbszw1HAw5PBMCGv29YAWPmAxn0ihDOyxqGC3rPBgWGBMvLzhmGDg8GyMuGzg9Uzsb0BYbJB21WBgv0zsb0AguGB3jPz2LUywWGz29HBdOklsbtCgvJAwzPyYbUzxH0ihn0zxbZlcbPBIbVCMrLCIbPzIbZzxf1zw5JzsbTyxr0zxjZcI0Gs25VD24GAxnZDwvZig9YigvKz2uGy2fZzxmGC3rPBgWGDw5HzgrYzxnZzwqklsbbBNKGCgvUzgLUzYb1C2vYigrLy2LZAw9UCYbVCIbXDwvZDgLVBNmGDgHHDcb3zxjLihvUyw5ZD2vYzwqkcImJiYblzxKGq29UDgv4DaPqCMvZzxj2zsbJCML0AwnHBcbKzxrHAwXZihrOyxqGD291BgqGyMuGzxHWzw5ZAxzLihrVihjLlwrLCML2ztOklsbbCMnOAxrLy3r1CMuGB3iGzgvZAwDUihbHDhrLCM5ZigjLAw5NigzVBgXVD2vKcI0Gsw1WB3j0yw50ihzHCMLHyMXLig5HBwvZlcbMDw5JDgLVBIbZAwDUyxr1CMvZlcbVCIbbueKGC2HHCgvZcI0GrMLSzsbWyxrOCYbHBMqGBgLUzsbUDw1IzxjZihjLzMvYzw5JzwqGCMvWzwf0zwrSEqOTienVBNn0CMfPBNrZig9YihjLCxvPCMvTzw50CYb0AguGDxnLCIbZCgvJAwzPzwqklsbuB2rVigXPC3qGAxrLBxmGyw5KihrOzwLYihn0yxr1CYaOCgvUzgLUzY9PBL9WCM9NCMvZCY9JB21WBgv0zwqPcGPsDwXLCZOklsbczsbWCMvJAxnLigfUzcbZCgvJAwzPyY4GvxnLigv4ywn0igzPBguGCgf0AhmSigz1BMn0Aw9Uig5HBwvZlcbHBMqGzxjYB3iGBwvZC2fNzxmG4Ocuig5VDcb2ywD1zsbYzwzLCMvUy2vZlGOTierVie5pvcbPBMnSDwrLignVBNzLCNnHDgLVBMfSihbSzwfZyw50CMLLCYWGCMvWzwf0zwqGyMfJAY1HBMqTzM9YDgGSig9Yigv4CgXVCMf0B3j5igrLywqGzw5KCYb0Agf0ihDLCMuGywjHBMrVBMvKlGOTierVie5pvcbZDw1TyxjPEMuGDg9VBcbJywXSCYb2zxjIyxrPBs4Gq2fWDhvYzsb0AgvPCIbVDxrJB21LCYbHBMqGzgvJAxnPB25ZlcbUB3qGDgHLig1Ly2HHBMLJCY4klsblzwvWihrOzsb0B3rHBcbZDw1Tyxj5ihvUzgvYide1mdaGDg9Rzw5ZlIbqCMLVCML0AxPLigfJDgLVBMfIBguGC3rHDguGB3zLCIbUyxjYyxrPDMuUcI0Gv3jPDguGzM9YigeGy29KAw5NigfNzw50ihrOyxqGD2LSBcbYzwfKihrOAxmGC3vTBwfYEsbHBMqGAw1TzwrPyxrLBhKGCMvZDw1LihDVCMSSig5VDcbMB3iGysbODw1HBIbYzwfKzxiU','ntzsEfPgCwC','C2LNBMfS','vg9VBa','DhjPBq','BwfW','uhjLDMLVDxmGy29UDMvYC2f0Aw9Uihn1Bw1HCNK6','zMLSDgvY','nZqXnJaXzfHusLLq','DxnLCG','Dgv4Da'];_0x13eb=function(){return _0x5d6133;};return _0x13eb();}
@@ -0,0 +1 @@
1
+ (function(_0x4658a8,_0x44401b){const _0x3d5258={_0x2cf83d:0x139,_0x3cfb4d:0x142,_0x32fa39:0x1a3,_0x2f26c8:0x1ec,_0x4d9411:0x153,_0xa55e85:0x172,_0xfa2fca:0x177,_0x48183a:0x1de,_0x1e05c1:0x1fd,_0x4d9854:0x1e8,_0xc7fb44:0x22b,_0x57551e:0x195,_0x2bbb6b:0x1f2,_0x279a66:0x231,_0x359459:0x1dd,_0x565b7b:0x20a,_0x2f32d2:0xb5,_0x26ce2d:0xcc,_0x5a6560:0xc1,_0x403594:0x13e,_0x37dc90:0x112},_0x58fb88={_0x251065:0x31d},_0xb22dc0=_0x4658a8();function _0x5c59b6(_0x566a4f,_0x226f08,_0xb37aef,_0x2de7ce){return _0x959d(_0x566a4f- -0x4b,_0xb37aef);}function _0x30ad7a(_0x2bfbe0,_0x107c4b,_0xac6b90,_0x21ed29){return _0x959d(_0x107c4b- -_0x58fb88._0x251065,_0x2bfbe0);}while(!![]){try{const _0x144dac=-parseInt(_0x30ad7a(-0x12e,-_0x3d5258._0x2cf83d,-0xf0,-_0x3d5258._0x3cfb4d))/0x1*(parseInt(_0x5c59b6(_0x3d5258._0x32fa39,_0x3d5258._0x2f26c8,0x1be,0x16c))/0x2)+-parseInt(_0x5c59b6(0x19f,_0x3d5258._0x4d9411,_0x3d5258._0xa55e85,_0x3d5258._0xfa2fca))/0x3*(parseInt(_0x5c59b6(0x1c8,0x180,_0x3d5258._0x48183a,0x1bf))/0x4)+parseInt(_0x5c59b6(0x1b7,0x161,_0x3d5258._0x1e05c1,0x1cc))/0x5+-parseInt(_0x5c59b6(_0x3d5258._0x4d9854,_0x3d5258._0xc7fb44,_0x3d5258._0x57551e,0x207))/0x6+-parseInt(_0x5c59b6(_0x3d5258._0x2bbb6b,_0x3d5258._0x279a66,_0x3d5258._0x359459,_0x3d5258._0x565b7b))/0x7*(-parseInt(_0x30ad7a(-_0x3d5258._0x2f32d2,-0xde,-0xac,-0xb6))/0x8)+-parseInt(_0x30ad7a(-0xb2,-_0x3d5258._0x26ce2d,-0xcb,-_0x3d5258._0x5a6560))/0x9+parseInt(_0x30ad7a(-0xb1,-0x9c,-0xb0,-0x87))/0xa*(parseInt(_0x30ad7a(-0x10c,-_0x3d5258._0x403594,-0xf8,-_0x3d5258._0x37dc90))/0xb);if(_0x144dac===_0x44401b)break;else _0xb22dc0['push'](_0xb22dc0['shift']());}catch(_0x139e6e){_0xb22dc0['push'](_0xb22dc0['shift']());}}}(_0x57e9,0x8e32f));import{createAssistantTextMessage,createReasoningMessage,createToolResultUserMessage,createToolUseMessage,getToolUseBlocks,normalizeMessage,normalizeSystem,responseToAssistantMessage}from'./chunk-G2FR4UGO.js';import{addAbortListener,isAbortError,throwIfAborted,toAbortError}from'./chunk-X7VAACWY.js';function isJsonObject(_0x47d19f){const _0x5440dd={_0x131d9e:0xec,_0x67c94f:0x135,_0x384460:0xe2,_0x254fae:0xa0},_0x32b2c2={_0x14a219:0x146};function _0x385526(_0x3c3998,_0x2ab0a6,_0x4d11c5,_0x25eeca){return _0x959d(_0x25eeca- -_0x32b2c2._0x14a219,_0x2ab0a6);}function _0x216bf0(_0xce16c5,_0x17a308,_0x2d0074,_0x717a6c){return _0x959d(_0xce16c5- -0x1dc,_0x717a6c);}return typeof _0x47d19f===_0x385526(0x120,_0x5440dd._0x131d9e,_0x5440dd._0x67c94f,0xfc)&&_0x47d19f!==null&&!Array[_0x385526(_0x5440dd._0x384460,_0x5440dd._0x254fae,0xf7,0xbe)](_0x47d19f);}function isToolOutputEnvelope(_0x43f75f){const _0xaaae41={_0x14dcce:0x122,_0x51fb06:0x1f6,_0x114fa7:0x1f2,_0x5900db:0x183,_0x1654b6:0x197},_0x479947={_0x4b9c9f:0x3db},_0x15a3b6={_0x5edba6:0xba};if(typeof _0x43f75f!=='object'||_0x43f75f===null||Array[_0x7e3b83(_0xaaae41._0x14dcce,0x14a,0x159,0x10b)](_0x43f75f))return![];if(typeof _0x43f75f[_0x7e3b83(0x193,0x1bd,_0xaaae41._0x51fb06,_0xaaae41._0x114fa7)]!=='string')return![];const _0x2b88be=_0x43f75f[_0x7e3b83(0x17e,0x16b,_0xaaae41._0x5900db,_0xaaae41._0x1654b6)];function _0x7e3b83(_0x3812b8,_0x32f37b,_0x25e455,_0x76405b){return _0x959d(_0x32f37b- -_0x15a3b6._0x5edba6,_0x3812b8);}function _0x594b54(_0x5eceec,_0xcd2c68,_0x209eb5,_0xa1eff5){return _0x959d(_0x5eceec- -_0x479947._0x4b9c9f,_0xcd2c68);}return _0x2b88be===void 0x0||isJsonObject(_0x2b88be);}function validateAgainstSchema(_0x2420f8,_0x33870b,_0x3eb8cd){const _0x72ba40={_0x5759cb:0x12a,_0x2a1d87:0x39,_0x489ba1:0x58,_0x397cad:0x69,_0x311499:0x7a,_0x200227:0x64,_0x5bf395:0xf5,_0x5cf088:0xec,_0x285c70:0xf8,_0x3f5c0d:0xa5,_0x20f5e5:0x5c,_0x17189c:0x4b,_0x311a77:0x127,_0x1a1cd7:0x11d,_0x14ed02:0x11b,_0x5a0c79:0xa8,_0x48f91a:0x30,_0x277e63:0x68,_0x47d45d:0x5a,_0xa299e8:0x44,_0x42836d:0xb8,_0x5423cf:0x11e,_0x30f955:0x152,_0x5d12d7:0x15f,_0x26780a:0x106,_0x3d7058:0xf7,_0x2d3135:0x13e,_0x19a8ac:0xda,_0x24fa5e:0x160,_0x56b11c:0x7a,_0x23cc27:0xcf,_0x4cf9e6:0x81,_0x1ae964:0x53,_0x159c8a:0x4,_0x58facd:0xb,_0x2feb81:0x4,_0x4038dd:0x4,_0x37c0db:0x70,_0xe1546d:0x101},_0x492655={_0x1d78d6:0x16c,_0x1df1f5:0x1d2},_0x2dfb6c={_0x5af47f:0x35a};function _0x3030c5(_0x48ae98,_0x202e4e,_0x4170cf,_0x350e6a){return _0x959d(_0x202e4e- -_0x2dfb6c._0x5af47f,_0x48ae98);}function _0x273b05(_0x2aa60f,_0x5649c3,_0x3999d1,_0x459c5c){return _0x959d(_0x2aa60f- -0x282,_0x3999d1);}switch(_0x3eb8cd[_0x3030c5(-_0x72ba40._0x5759cb,-0x14f,-0x13f,-0x13a)]){case'string':if(typeof _0x33870b!==_0x273b05(-_0x72ba40._0x2a1d87,-0x1b,-_0x72ba40._0x489ba1,-_0x72ba40._0x397cad))throw new Error(_0x273b05(-_0x72ba40._0x311499,-_0x72ba40._0x200227,-0x4b,-0x88)+_0x2420f8+_0x3030c5(-_0x72ba40._0x5bf395,-_0x72ba40._0x5cf088,-_0x72ba40._0x285c70,-_0x72ba40._0x3f5c0d));return;case'number':if(typeof _0x33870b!=='number')throw new Error(_0x273b05(-_0x72ba40._0x311499,-0x41,-0x2b,-0xa4)+_0x2420f8+_0x273b05(-0x61,-_0x72ba40._0x20f5e5,-0x3b,-_0x72ba40._0x17189c));return;case _0x273b05(-0x71,-0x65,-0xae,-0x8e):if(typeof _0x33870b!==_0x3030c5(-_0x72ba40._0x311a77,-0x149,-_0x72ba40._0x1a1cd7,-_0x72ba40._0x14ed02))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x2420f8+_0x273b05(-_0x72ba40._0x5a0c79,-0x6e,-0xe6,-0x71));return;case _0x273b05(-0x85,-0x61,-_0x72ba40._0x48f91a,-_0x72ba40._0x277e63):if(!Array[_0x273b05(-0x7e,-_0x72ba40._0x47d45d,-_0x72ba40._0xa299e8,-_0x72ba40._0x42836d)](_0x33870b))throw new Error(_0x3030c5(-_0x72ba40._0x5423cf,-_0x72ba40._0x30f955,-0x161,-_0x72ba40._0x5d12d7)+_0x2420f8+':\x20expected\x20array');_0x33870b[_0x3030c5(-_0x72ba40._0x26780a,-0x11c,-_0x72ba40._0x3d7058,-_0x72ba40._0x2d3135)]((_0x430ac8,_0x4d6399)=>{const _0x1a55c6={_0x2a679d:0x2c9,_0x3ce4f0:0x118};function _0x5539e6(_0x48fee8,_0x58bf14,_0x2a4f2b,_0x56aa29){return _0x3030c5(_0x2a4f2b,_0x48fee8-_0x1a55c6._0x2a679d,_0x2a4f2b-_0x1a55c6._0x3ce4f0,_0x56aa29-0x2a);}validateAgainstSchema(_0x2420f8+'['+_0x4d6399+']',_0x430ac8,_0x3eb8cd[_0x5539e6(0x18e,0x17a,_0x492655._0x1d78d6,_0x492655._0x1df1f5)]);});return;case _0x3030c5(-_0x72ba40._0x19a8ac,-0x118,-0x161,-0x13c):if(!isJsonObject(_0x33870b))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x2420f8+_0x3030c5(-0x176,-0x17c,-_0x72ba40._0x24fa5e,-0x16a));for(const _0x52ad42 of _0x3eb8cd[_0x3030c5(-0xab,-0xf1,-0x107,-0xca)]??[]){if(!(_0x52ad42 in _0x33870b))throw new Error(_0x273b05(-_0x72ba40._0x56b11c,-_0x72ba40._0x23cc27,-_0x72ba40._0x4cf9e6,-_0x72ba40._0x1ae964)+_0x2420f8+_0x273b05(-_0x72ba40._0x159c8a,-0x20,_0x72ba40._0x58facd,_0x72ba40._0x2feb81)+_0x52ad42+'\x22');}for(const [_0x4488d1,_0x2bcd04]of Object[_0x273b05(-_0x72ba40._0x17189c,-0x4c,_0x72ba40._0x4038dd,-_0x72ba40._0x37c0db)](_0x3eb8cd[_0x3030c5(-0x111,-0x12e,-0x114,-_0x72ba40._0xe1546d)])){_0x4488d1 in _0x33870b&&validateAgainstSchema(_0x2420f8+'.'+_0x4488d1,_0x33870b[_0x4488d1],_0x2bcd04);}}}function normalizeToolOutputValue(_0x23133a){const _0x1ea589={_0x1030cc:0x52d,_0x19b8ff:0x5b6,_0x4d0dae:0x23d,_0x1d8f64:0x291,_0x1c587f:0x569,_0x2026b4:0x523,_0x7ea788:0x550,_0x5b319a:0x56f,_0x12e18c:0x538,_0x3236dc:0x546,_0x2b51a2:0x52f,_0x5c4f85:0x1be,_0x3c36f4:0x1bc},_0x5c08c9={_0x11ed09:0x2ef};if(isToolOutputEnvelope(_0x23133a))return{'output':_0x23133a[_0x4751a1(_0x1ea589._0x1030cc,_0x1ea589._0x19b8ff,0x566,0x558)],'structured':_0x23133a['structured']??{'value':_0x23133a[_0x2ee300(_0x1ea589._0x4d0dae,0x282,_0x1ea589._0x1d8f64,0x27e)]},..._0x23133a[_0x4751a1(0x59c,0x54e,_0x1ea589._0x1c587f,_0x1ea589._0x2026b4)]!==void 0x0?{'content':_0x23133a[_0x4751a1(_0x1ea589._0x7ea788,0x548,_0x1ea589._0x1c587f,0x53c)]}:{}};function _0x4751a1(_0x3b9304,_0x162fe8,_0xa57f2b,_0x158fe9){return _0x959d(_0xa57f2b-_0x5c08c9._0x11ed09,_0x158fe9);}function _0x2ee300(_0x890621,_0x5aef6e,_0x877bb3,_0x4645d7){return _0x959d(_0x890621- -0x3a,_0x877bb3);}if(typeof _0x23133a===_0x4751a1(0x51b,_0x1ea589._0x5b319a,_0x1ea589._0x12e18c,0x53f))return{'output':_0x23133a,'structured':{'value':_0x23133a}};if(typeof _0x23133a===_0x4751a1(_0x1ea589._0x3236dc,0x525,0x531,_0x1ea589._0x2b51a2)&&_0x23133a!==null&&!Array['isArray'](_0x23133a))return{'output':JSON[_0x4751a1(0x4b7,0x4d7,0x4e7,0x523)](_0x23133a,null,0x2),'structured':_0x23133a};return{'output':JSON[_0x2ee300(_0x1ea589._0x5c4f85,_0x1ea589._0x3c36f4,0x1e9,0x19a)](_0x23133a,null,0x2),'structured':{'value':_0x23133a}};}function createToolOutput(_0x12eaac,_0x5feffa={'value':_0x12eaac},_0x4241e0){return{'output':_0x12eaac,'structured':_0x5feffa,..._0x4241e0!==void 0x0?{'content':_0x4241e0}:{}};}var ToolExecutionError=class extends Error{[_0x3fa381(-0x18f,-0x1ca,-0x1b1,-0x14e)];constructor(_0x51d47a,_0x25f2b3={}){const _0x4f4f8f={_0x2ab6e4:0xce,_0x5af07b:0xc2,_0x5098c3:0x108,_0x31fb93:0x168,_0x549dac:0x13f,_0x2d40c1:0x15b},_0x1100b6={_0x4e783c:0x50,_0x5adf9d:0x1dd},_0xe04520={_0x2c25fc:0x16b};super(_0x51d47a),this[_0x38ac62(-_0x4f4f8f._0x2ab6e4,-_0x4f4f8f._0x5af07b,-_0x4f4f8f._0x5098c3,-0x11c)]='ToolExecutionError';function _0x1cde9d(_0x55097f,_0x131063,_0x89f18f,_0x2e534b){return _0x3fa381(_0x55097f-0x382,_0x89f18f,_0x89f18f-0x1b7,_0x2e534b-_0xe04520._0x2c25fc);}function _0x38ac62(_0x136450,_0x11ccb4,_0x1be6c4,_0x26d760){return _0x3fa381(_0x1be6c4-_0x1100b6._0x4e783c,_0x26d760,_0x1be6c4-_0x1100b6._0x5adf9d,_0x26d760-0xba);}this[_0x38ac62(-0x133,-_0x4f4f8f._0x31fb93,-_0x4f4f8f._0x549dac,-_0x4f4f8f._0x2d40c1)]=_0x25f2b3;}};function defineTool(_0x527b51){return _0x527b51;}var ToolRegistry=class{[_0x3fa381(-0x185,-0x1ac,-0x162,-0x15c)]=new Map();constructor(_0x53df7e=[]){for(const _0x433b62 of _0x53df7e){this['register'](_0x433b62);}}[_0x3588de(0x676,0x5e4,0x627,0x5e3)](_0x1ad571){const _0x2f76a6={_0x14a724:0x49a,_0x5ff189:0x449},_0x21919b={_0x8047de:0x1e1};function _0xcbfc6c(_0x4a8117,_0x16f8f2,_0x29dce5,_0x380cb9){return _0x3588de(_0x4a8117-0xe3,_0x16f8f2-0x8b,_0x380cb9- -_0x21919b._0x8047de,_0x4a8117);}this['toolsByName']['set'](_0x1ad571[_0xcbfc6c(0x47c,0x48d,_0x2f76a6._0x14a724,_0x2f76a6._0x5ff189)],_0x1ad571);}[_0x3588de(0x598,0x5b4,0x5e7,0x614)](_0x146e7c){const _0x26da29={_0x4dd736:0x345,_0xf9c9c1:0x341,_0x23e906:0x2fa,_0x1588d0:0x34f},_0x2e4b39={_0xc3a43d:0x1c2},_0x538219={_0x3c8cee:0x131,_0x3b49ef:0x1d};function _0x3aebcc(_0x1be2c6,_0x436847,_0x56b21f,_0x55a1c8){return _0x3588de(_0x1be2c6-_0x538219._0x3c8cee,_0x436847-_0x538219._0x3b49ef,_0x436847- -0x8d,_0x56b21f);}function _0x20fce3(_0x23bd32,_0x4e96ed,_0x330f2d,_0x391219){return _0x3588de(_0x23bd32-0xc9,_0x4e96ed-_0x2e4b39._0xc3a43d,_0x23bd32- -0x2ed,_0x391219);}return this[_0x20fce3(0x310,_0x26da29._0x4dd736,_0x26da29._0xf9c9c1,0x2fa)][_0x20fce3(_0x26da29._0x23e906,0x2f8,_0x26da29._0x1588d0,0x309)](_0x146e7c);}[_0x3588de(0x5aa,0x5fe,0x5d7,0x61d)](){const _0x5166b9={_0x5394eb:0x2f3,_0x506e73:0x36b,_0x377a35:0x37e,_0x461e62:0x382},_0x34ff6b={_0xdcd497:0xc,_0x5c76ef:0x2bf},_0x268a7b={_0x4d6203:0x159};function _0x2735de(_0x451d81,_0x2f5395,_0x59be63,_0x14c110){return _0x3588de(_0x451d81-0xf2,_0x2f5395-_0x268a7b._0x4d6203,_0x14c110- -0x21b,_0x59be63);}function _0xeecdec(_0x728723,_0x39f78a,_0x3f577c,_0x4156a8){return _0x3588de(_0x728723-0x44,_0x39f78a-_0x34ff6b._0xdcd497,_0x39f78a- -_0x34ff6b._0x5c76ef,_0x3f577c);}return[...this[_0xeecdec(_0x5166b9._0x5394eb,0x33e,_0x5166b9._0x506e73,0x339)][_0xeecdec(_0x5166b9._0x377a35,_0x5166b9._0x461e62,0x355,_0x5166b9._0x506e73)]()];}['listToolSchemas'](){const _0x1b851f={_0x242b89:0x196,_0x548c50:0x1e6,_0x34bf60:0x1d9,_0x134b2a:0x527},_0x159384={_0x137c4b:0x36d,_0x1e70d6:0x30a,_0xc4d206:0x331,_0x3572a8:0x304},_0x56f82f={_0x427471:0x135,_0x3fdade:0x213},_0x2a74ad={_0x1be47c:0x690,_0x540be6:0xf5};function _0x5e4347(_0x4e1b74,_0x259c79,_0xa579dd,_0x568ce3){return _0x3fa381(_0x568ce3-_0x2a74ad._0x1be47c,_0xa579dd,_0xa579dd-_0x2a74ad._0x540be6,_0x568ce3-0x111);}function _0x186272(_0x16c533,_0x481705,_0x23bbd1,_0x4a6397){return _0x3fa381(_0x4a6397- -0x2e,_0x16c533,_0x23bbd1-0x14b,_0x4a6397-0xf6);}return this[_0x186272(-_0x1b851f._0x242b89,-0x1b5,-_0x1b851f._0x548c50,-_0x1b851f._0x34bf60)]()[_0x5e4347(0x572,0x54b,_0x1b851f._0x134b2a,0x540)](_0x565780=>{const _0x4ffd11={_0x5905a6:0x111};function _0x2e04b1(_0x9e53e5,_0xf6777,_0x4fe583,_0x563ebe){return _0x5e4347(_0x9e53e5-0x199,_0xf6777-_0x56f82f._0x427471,_0xf6777,_0x563ebe- -_0x56f82f._0x3fdade);}function _0x1472ca(_0x418af0,_0x25a9df,_0x5dcab3,_0x1b4f87){return _0x5e4347(_0x418af0-_0x4ffd11._0x5905a6,_0x25a9df-0x1e1,_0x418af0,_0x5dcab3- -0x15d);}return{'name':_0x565780[_0x2e04b1(_0x159384._0x137c4b,_0x159384._0x1e70d6,0x374,0x325)],'description':_0x565780[_0x2e04b1(_0x159384._0xc4d206,0x2db,0x2ea,_0x159384._0x3572a8)],'input_schema':_0x565780['inputSchema']};});}};function validateToolInput(_0x2bb83d,_0x2399cb){const _0x3aab66={_0x2dafc7:0x154,_0x5c2f76:0x11b},_0xecfc02={_0xe7b359:0x1dd,_0x12a73e:0xde};validateAgainstSchema(_0x277dfc(-0xeb,-_0x3aab66._0x2dafc7,-0x10c,-_0x3aab66._0x5c2f76),_0x2bb83d,_0x2399cb);function _0x277dfc(_0x37c734,_0xa8d622,_0x1022e6,_0x1ee898){return _0x3588de(_0x37c734-_0xecfc02._0xe7b359,_0xa8d622-_0xecfc02._0x12a73e,_0x1ee898- -0x723,_0x1022e6);}return _0x2bb83d;}function _0x3fa381(_0xc5dfd0,_0x27b014,_0x268b51,_0x2fd249){const _0x4628e8={_0x8aab25:0x3b4};return _0x959d(_0xc5dfd0- -_0x4628e8._0x8aab25,_0x27b014);}function deriveFinalToolOutput(_0x348a13){const _0x1b31cc={_0x2a4560:0x310,_0x3277de:0x318,_0x3d064f:0x2f1,_0x1309d2:0x309,_0xbfead9:0x2c4,_0x21a5bc:0x2fb,_0x26e149:0x30a,_0xa1a4b0:0x390,_0x47d777:0x380,_0x30b114:0x343,_0x2facbb:0x34d,_0x484c12:0x3c0,_0x2b88ea:0x3c8,_0x165573:0x398,_0x5a616e:0x2c5,_0x3ed396:0x30f,_0x4be618:0x2cc,_0x138027:0x333,_0x1b013a:0x2f7,_0x2a538b:0x2d4,_0x13e813:0x2db,_0xfb2ffb:0x3ca,_0x1bcabe:0x3df},_0x1309c6={_0x140f76:0x87};function _0x467c1d(_0x85cce,_0x4383b7,_0x4aee38,_0x9fcdd6){return _0x3fa381(_0x9fcdd6-0x447,_0x85cce,_0x4aee38-_0x1309c6._0x140f76,_0x9fcdd6-0x13f);}if(_0x348a13[_0x467c1d(0x32f,_0x1b31cc._0x2a4560,_0x1b31cc._0x3277de,0x309)]===0x0)return{'output':'','structured':{}};if(_0x348a13[_0x467c1d(_0x1b31cc._0x3d064f,0x331,0x2e2,_0x1b31cc._0x1309d2)]===0x1)return{'output':_0x348a13[0x0][_0x467c1d(0x319,_0x1b31cc._0xbfead9,_0x1b31cc._0x21a5bc,_0x1b31cc._0x26e149)],'structured':_0x348a13[0x0][_0x480ade(_0x1b31cc._0xa1a4b0,_0x1b31cc._0x47d777,_0x1b31cc._0x30b114,0x355)],..._0x348a13[0x0][_0x480ade(_0x1b31cc._0x2facbb,_0x1b31cc._0x484c12,0x398,0x37d)]!==void 0x0?{'content':_0x348a13[0x0][_0x480ade(_0x1b31cc._0x2b88ea,0x390,_0x1b31cc._0x165573,0x342)]}:{}};const _0x473a4a=_0x348a13['filter'](_0x4bb79a=>_0x4bb79a['content']!==void 0x0);function _0x480ade(_0x258171,_0x100524,_0xdd8f2f,_0x5ef02b){return _0x3fa381(_0xdd8f2f-0x4d2,_0x258171,_0xdd8f2f-0x118,_0x5ef02b-0x1bb);}return{'output':_0x348a13[_0x467c1d(0x302,0x2ef,_0x1b31cc._0x5a616e,0x2f7)](_0x57a5f2=>_0x57a5f2[_0x480ade(0x3db,0x382,0x395,0x396)])[_0x480ade(0x338,0x300,_0x1b31cc._0x3ed396,0x313)](''),'structured':{'chunks':_0x348a13[_0x467c1d(_0x1b31cc._0x4be618,_0x1b31cc._0x138027,0x30b,_0x1b31cc._0x1b013a)](_0x4cb269=>_0x4cb269[_0x480ade(0x334,0x376,0x343,0x369)])},..._0x473a4a[_0x467c1d(0x2e6,_0x1b31cc._0x2a538b,_0x1b31cc._0x13e813,_0x1b31cc._0x1309d2)]===0x1?{'content':_0x473a4a[0x0][_0x480ade(_0x1b31cc._0xfb2ffb,_0x1b31cc._0x1bcabe,0x398,0x345)]}:{}};}function _0x3588de(_0x5896e0,_0x176343,_0x52c529,_0x173d95){return _0x959d(_0x52c529-0x3ce,_0x173d95);}function createToolMeta(){return{'transforms':[]};}function createErrorToolResult(_0x2f1f50,_0x163a0a,_0x530fe2,_0x2c74cc=[]){const _0x1d33ce={_0x2a29b5:0x103,_0x42b34b:0x14b},_0x1444f9={_0x45c872:0x1aa,_0x24d1d1:0x1a3};function _0x32dd34(_0x318384,_0x5607d9,_0x1e4255,_0x488987){return _0x3fa381(_0x488987-0x306,_0x1e4255,_0x1e4255-_0x1444f9._0x45c872,_0x488987-_0x1444f9._0x24d1d1);}return{'callId':_0x2f1f50['id'],'toolName':_0x2f1f50['name'],'status':_0x32dd34(0x140,0x167,_0x1d33ce._0x2a29b5,_0x1d33ce._0x42b34b),'output':_0x163a0a,'structured':_0x530fe2,'chunks':_0x2c74cc,'meta':createToolMeta()};}function createRejectedToolResult(_0x2efafc,_0x13373a){const _0x5798a7={_0x2cc952:0xc3,_0x910c67:0x10b,_0x1bcc20:0x198,_0x386832:0x196,_0x4ef4d3:0x523,_0x2c672a:0x513,_0x3e0133:0x519,_0x3d1f75:0x4d5,_0x6e566:0x4ac,_0x702aff:0x4c8,_0x63aec2:0x506,_0x621c40:0x4f4},_0x4f2aa0={_0x3b7b73:0x67b,_0x563e95:0x12,_0x47d3f4:0x18b},_0x543cb3={_0x219bd9:0x179};function _0x272f1d(_0x39a904,_0x233bf7,_0x8f8ed3,_0x39584f){return _0x3fa381(_0x39a904-0x291,_0x39584f,_0x8f8ed3-_0x543cb3._0x219bd9,_0x39584f-0x100);}const _0x282e99=_0x13373a?.[_0x272f1d(0xc2,0x109,_0x5798a7._0x2cc952,0xdf)]()[_0x272f1d(0x153,_0x5798a7._0x910c67,0x15f,_0x5798a7._0x1bcc20)]?_0x13373a:_0x272f1d(0x15d,0x193,_0x5798a7._0x386832,0x16d)+_0x2efafc[_0x539f2d(0x53f,0x4f0,_0x5798a7._0x4ef4d3,0x4cd)];function _0x539f2d(_0x1f0428,_0x25cf0e,_0x2f6fcb,_0xfc22a8){return _0x3fa381(_0x2f6fcb-_0x4f2aa0._0x3b7b73,_0x1f0428,_0x2f6fcb-_0x4f2aa0._0x563e95,_0xfc22a8-_0x4f2aa0._0x47d3f4);}return createErrorToolResult(_0x2efafc,_0x282e99,{'error':_0x539f2d(0x4fd,_0x5798a7._0x2c672a,0x512,_0x5798a7._0x3e0133),..._0x13373a?.[_0x539f2d(_0x5798a7._0x3d1f75,0x4e2,_0x5798a7._0x6e566,_0x5798a7._0x702aff)]()[_0x539f2d(_0x5798a7._0x63aec2,0x57c,0x53d,_0x5798a7._0x621c40)]?{'reason':_0x13373a}:{}});}function createAbortedToolResult(_0x771061,_0x5b34da,_0x5bb549=[]){const _0x1300d7={_0x2db6c7:0x123},_0x442d20={_0x597349:0x21,_0x500392:0x12e};function _0x52089e(_0x416cb0,_0x2573f5,_0x27b60d,_0x6a5600){return _0x3fa381(_0x27b60d-0xd4,_0x2573f5,_0x27b60d-_0x442d20._0x597349,_0x6a5600-_0x442d20._0x500392);}const _0x344fe5=toAbortError(_0x5b34da);return createErrorToolResult(_0x771061,_0x344fe5[_0x52089e(-_0x1300d7._0x2db6c7,-0xe0,-0x108,-0xe1)],{'error':_0x344fe5['message'],'aborted':!![]},_0x5bb549);}function createSuccessToolResult(_0x30b0bc,_0x2b9792,_0x442876){const _0x4254fc={_0xd07683:0x353,_0xaa2e6:0x359,_0x589eb5:0x328,_0x22013d:0x338,_0x54bb19:0x5da,_0x2f8962:0x62e,_0x4fbd79:0x58f,_0x1852ed:0x5da,_0xbea604:0x5ea,_0x3c3fb3:0x63f,_0x4fdd2c:0x62f,_0x3fdba4:0x676,_0x2d6027:0x35a},_0x337a33={_0x123481:0x769},_0x4a5f18={_0x59eb92:0x56,_0x511f84:0x2d1};function _0x355f0b(_0x26bd3e,_0xc7806d,_0x4f8e10,_0x49c8a3){return _0x3588de(_0x26bd3e-_0x4a5f18._0x59eb92,_0xc7806d-0xf7,_0xc7806d- -_0x4a5f18._0x511f84,_0x49c8a3);}function _0x34f4ff(_0x59d78d,_0x380158,_0x3fdf3e,_0x5b0b26){return _0x3fa381(_0x380158-_0x337a33._0x123481,_0x59d78d,_0x3fdf3e-0x188,_0x5b0b26-0x1b8);}return{'callId':_0x30b0bc['id'],'toolName':_0x30b0bc[_0x355f0b(_0x4254fc._0xd07683,_0x4254fc._0xaa2e6,_0x4254fc._0x589eb5,_0x4254fc._0x22013d)],'status':'ok','output':_0x2b9792[_0x34f4ff(_0x4254fc._0x54bb19,0x62c,_0x4254fc._0x2f8962,0x65a)],'structured':_0x2b9792[_0x34f4ff(_0x4254fc._0x4fbd79,_0x4254fc._0x1852ed,0x60c,_0x4254fc._0xbea604)],..._0x2b9792[_0x34f4ff(_0x4254fc._0x3c3fb3,_0x4254fc._0x4fdd2c,_0x4254fc._0x3fdba4,0x650)]!==void 0x0?{'content':_0x2b9792[_0x355f0b(_0x4254fc._0x2d6027,0x377,0x36b,0x35d)]}:{},'chunks':_0x442876,'meta':createToolMeta()};}function createUnknownToolResult(_0x4a2f42){const _0x133058={_0x5306a2:0x1b3,_0x41a95c:0x1c7,_0x179972:0x246},_0x211028={_0x198ca4:0x1e0,_0x5c72fe:0x418};function _0x4508f5(_0x53f6cd,_0x57ea98,_0x44065a,_0x152f8d){return _0x3588de(_0x53f6cd-0x179,_0x57ea98-0xf8,_0x53f6cd- -0xc3,_0x57ea98);}function _0x2d2ace(_0x491449,_0x3f7c94,_0xe1c6b7,_0x409881){return _0x3588de(_0x491449-0xbe,_0x3f7c94-_0x211028._0x198ca4,_0x491449- -_0x211028._0x5c72fe,_0x3f7c94);}return createErrorToolResult(_0x4a2f42,_0x2d2ace(0x1ee,_0x133058._0x5306a2,0x237,0x1a4)+_0x4a2f42[_0x2d2ace(0x212,_0x133058._0x41a95c,_0x133058._0x179972,0x1bd)],{'error':'unknown_tool'});}function isDispatchDecision(_0x36a0dc){const _0x5a6cbb={_0x10275b:0x523,_0x2d19e9:0x55e,_0x29d689:0x535},_0x2399fc={_0x102459:0x1a7,_0x3ec15b:0x15,_0x51bcd1:0x8d},_0x5e700e={_0x31a9b3:0x63};function _0x12c1e4(_0x42e312,_0x5531fd,_0x388629,_0x321d01){return _0x3588de(_0x42e312-0x15b,_0x5531fd-_0x5e700e._0x31a9b3,_0x321d01- -0xb8,_0x42e312);}function _0x345b22(_0x4a1941,_0x124825,_0x1d0c6b,_0x1dfd90){return _0x3588de(_0x4a1941-_0x2399fc._0x102459,_0x124825-_0x2399fc._0x3ec15b,_0x1d0c6b- -_0x2399fc._0x51bcd1,_0x4a1941);}if(typeof _0x36a0dc!=='object'||_0x36a0dc===null)return![];return _0x36a0dc[_0x345b22(_0x5a6cbb._0x10275b,0x5a4,_0x5a6cbb._0x2d19e9,0x592)]===_0x12c1e4(_0x5a6cbb._0x29d689,0x541,0x559,0x54b)||_0x36a0dc['action']==='run';}function normalizeExecutionError(_0x5e8f44){const _0x45a060={_0x498cf6:0x50d,_0x18a407:0x51f,_0x2a0d8f:0x4f6,_0x2b5ffc:0x4e1,_0x41644c:0xd4,_0x1d5e77:0x523},_0x1b04b4={_0x37c096:0x140,_0x26ef48:0x145},_0x185159={_0x37e96d:0x34};if(_0x5e8f44 instanceof ToolExecutionError)return{'errorMessage':_0x5e8f44[_0x1ac96c(_0x45a060._0x498cf6,_0x45a060._0x18a407,_0x45a060._0x2a0d8f,_0x45a060._0x2b5ffc)],'structured':{'error':_0x5e8f44['message'],..._0x5e8f44[_0x56deac(0xe8,0xc5,_0x45a060._0x41644c,0xa1)]}};if(_0x5e8f44 instanceof Error)return{'errorMessage':_0x5e8f44['message'],'structured':{'error':_0x5e8f44[_0x1ac96c(0x521,_0x45a060._0x1d5e77,0x4f6,0x527)]}};function _0x1ac96c(_0x4a0bf6,_0x44ec23,_0x16c76d,_0x560ed3){return _0x3588de(_0x4a0bf6-0x1e9,_0x44ec23-_0x185159._0x37e96d,_0x16c76d- -0xb0,_0x44ec23);}const _0x45f26c=String(_0x5e8f44);function _0x56deac(_0x2209f2,_0x2fe84b,_0xef969c,_0x2de093){return _0x3fa381(_0x2fe84b-0x254,_0x2209f2,_0xef969c-_0x1b04b4._0x37c096,_0x2de093-_0x1b04b4._0x26ef48);}return{'errorMessage':_0x45f26c,'structured':{'error':_0x45f26c}};}async function emitEvent(_0x2592de,_0x51d471,_0x2f6108){await _0x2592de?.(_0x51d471,_0x2f6108);}async function resolveDispatchDecision(_0x4210bb,_0x2bda86,_0x37bd12){const _0x8d322f={_0x31f10a:0x497,_0x16f7f8:0x44f,_0x3ad4a4:0x401,_0x40d1f1:0x55b,_0x20d558:0x572,_0x452466:0x460,_0x1087c4:0x440,_0x2e9190:0x47d,_0x4ff7b0:0x5c7},_0x266891={_0x27a2c6:0xd},_0x51b694={_0x27bf38:0x104,_0x2344ed:0x13e,_0x3047d3:0x115,_0x482478:0x154,_0x187d78:0x13f,_0x4b2181:0x161,_0x264bf2:0x159},_0xe3c8b={_0x4b3a38:0x161,_0xb9a339:0x704,_0xc1a2b5:0xf3},_0x3ca79c={_0x348357:0x53,_0x412196:0x36,_0x287181:0x8,_0x597afa:0xf1,_0x90e510:0xaf,_0x416371:0xa9,_0x12fb63:0xd1,_0x52e87:0x2e,_0x39a045:0xa},_0x1d6380={_0x9ab7e7:0xcd,_0x20ad65:0x3fb,_0x136e8d:0xe8},_0x467ff0={_0x4207fa:0x737};if(!_0x4210bb)return{'action':_0x5b4f06(0x462,0x43e,0x437,_0x8d322f._0x31f10a)};function _0x5831f1(_0x38a0ad,_0x5a9af2,_0x207148,_0x6c285d){return _0x3fa381(_0x207148-_0x467ff0._0x4207fa,_0x5a9af2,_0x207148-0x177,_0x6c285d-0xe);}const _0x2ef32b=Promise['resolve']()[_0x5b4f06(_0x8d322f._0x16f7f8,_0x8d322f._0x3ad4a4,0x45d,0x452)](()=>_0x4210bb(_0x2bda86,_0x37bd12));if(!_0x37bd12['signal']){const _0x18ff15=await _0x2ef32b;return isDispatchDecision(_0x18ff15)?_0x18ff15:{'action':_0x5831f1(_0x8d322f._0x40d1f1,0x59e,_0x8d322f._0x20d558,0x598)};}const _0x5a45a3=new Promise((_0xda6c39,_0x13cfff)=>{function _0x544f50(_0xee85e9,_0x5ebaa1,_0x1fd2b7,_0x496482){return _0x5831f1(_0xee85e9-_0x1d6380._0x9ab7e7,_0x5ebaa1,_0xee85e9- -_0x1d6380._0x20ad65,_0x496482-_0x1d6380._0x136e8d);}const _0x4c4ea4=()=>{const _0x4f9480={_0x49365a:0x309};function _0x3fb23d(_0x490402,_0x2e4501,_0x2f9263,_0x37a21d){return _0x959d(_0x2e4501- -0x1f6,_0x490402);}_0x37bd12[_0x3fb23d(-_0x3ca79c._0x348357,-0xa,-_0x3ca79c._0x412196,-_0x3ca79c._0x287181)]?.[_0xf62c63(-_0x3ca79c._0x597afa,-_0x3ca79c._0x90e510,-_0x3ca79c._0x416371,-0x103)](_0xf62c63(-0x9e,-0x5e,-_0x3ca79c._0x12fb63,-0xf2),_0x4c4ea4);function _0xf62c63(_0x52e30e,_0x2ba6a4,_0x2ee5cc,_0x4689dc){return _0x959d(_0x52e30e- -_0x4f9480._0x49365a,_0x2ba6a4);}_0x13cfff(toAbortError(_0x37bd12[_0x3fb23d(-_0x3ca79c._0x52e87,-_0x3ca79c._0x39a045,-0x5a,0x2b)]?.['reason']));};if(_0x37bd12['signal']?.[_0x36f2e4(-0x175,-0x112,-0xe2,-0x135)]){_0x13cfff(toAbortError(_0x37bd12['signal'][_0x36f2e4(-_0x51b694._0x27bf38,-0x144,-_0x51b694._0x2344ed,-_0x51b694._0x3047d3)]));return;}function _0x36f2e4(_0x2cee5b,_0x3eca59,_0x4f4ad5,_0x997ce1){return _0x5831f1(_0x2cee5b-_0xe3c8b._0x4b3a38,_0x3eca59,_0x997ce1- -_0xe3c8b._0xb9a339,_0x997ce1-_0xe3c8b._0xc1a2b5);}_0x37bd12[_0x36f2e4(-_0x51b694._0x482478,-0x197,-_0x51b694._0x187d78,-0x195)]?.['addEventListener'](_0x36f2e4(-0xf9,-_0x51b694._0x4b2181,-_0x51b694._0x264bf2,-0x116),_0x4c4ea4,{'once':!![]});});function _0x5b4f06(_0x3a14de,_0x11d76b,_0x2bd3c2,_0x5cc5b5){return _0x3fa381(_0x3a14de-0x627,_0x5cc5b5,_0x2bd3c2-0x117,_0x5cc5b5-_0x266891._0x27a2c6);}const _0x2b2056=await Promise[_0x5b4f06(0x47d,_0x8d322f._0x452466,_0x8d322f._0x1087c4,_0x8d322f._0x2e9190)]([_0x2ef32b,_0x5a45a3]);return isDispatchDecision(_0x2b2056)?_0x2b2056:{'action':_0x5831f1(_0x8d322f._0x4ff7b0,0x542,0x572,0x57d)};}async function executeToolCall(_0x42cc95,_0x9c5caa,_0x3cba1d,_0x101d91,_0x42995c){const _0x1f4ffe={_0x5cbc5b:0x1b4,_0x442ad5:0x191,_0x352a2a:0x1e8,_0x37ea6b:0x279,_0x186ac8:0x22f,_0xd112cb:0x229,_0x16b281:0x222,_0x181529:0x247,_0x40d378:0x245,_0x1790b2:0x25d,_0xa2b083:0x1a5,_0x2153d8:0x143,_0x39f695:0x163,_0x6c2884:0x17a,_0x2fb0d4:0x111,_0x629317:0xfc,_0xc1caea:0xfb,_0x180b63:0x1d7,_0x34f734:0x213,_0x77b6c3:0x254,_0x267400:0x24d,_0xeba077:0x1c3,_0x43bfea:0x19e,_0x3ca3c7:0x1a2,_0x19abd7:0x21c,_0x3e376e:0x296,_0x3fbb59:0x259,_0x1d42d6:0x1e6,_0x4f6922:0x204,_0x552c6b:0x1e9,_0x2bb304:0x2ab,_0x399b9d:0x271,_0x43e21a:0x1ef,_0xfb3598:0x1bd,_0x465a07:0x25e,_0x39a50f:0x19c,_0x2359cb:0x1a4,_0x22f6b6:0x19f},_0x25913f={_0x1120e5:0x46},_0x15d1c9={_0x2efa46:0x19e},_0x1c9e96={_0x17a79b:0xdb,_0x49e401:0x782},_0x3f0a2a={_0x51ec1b:0x6f,_0x198008:0x3bc},_0x89c1bd={..._0x3cba1d,'toolCallId':_0x9c5caa['id']};function _0x24fc01(_0x3b10cc,_0x1136d0,_0x1f36f9,_0x266ed9){return _0x3588de(_0x3b10cc-0x1c1,_0x1136d0-_0x3f0a2a._0x51ec1b,_0x1f36f9- -_0x3f0a2a._0x198008,_0x1136d0);}throwIfAborted(_0x89c1bd[_0x3d88a2(-_0x1f4ffe._0x5cbc5b,-0x1c8,-_0x1f4ffe._0x442ad5,-_0x1f4ffe._0x352a2a)]);const _0x2210c8=await resolveDispatchDecision(_0x101d91,_0x9c5caa,_0x89c1bd);throwIfAborted(_0x89c1bd['signal']);if(_0x2210c8[_0x24fc01(_0x1f4ffe._0x37ea6b,0x1e1,_0x1f4ffe._0x186ac8,0x218)]===_0x24fc01(_0x1f4ffe._0xd112cb,_0x1f4ffe._0x16b281,_0x1f4ffe._0x181529,0x22b)){const _0x5291c3=createRejectedToolResult(_0x9c5caa,_0x2210c8['reason']);return await emitEvent(_0x42995c,{'type':_0x24fc01(0x29b,_0x1f4ffe._0x40d378,_0x1f4ffe._0x1790b2,0x249),'toolCall':_0x9c5caa,'result':_0x5291c3},_0x89c1bd),_0x5291c3;}const _0x31c08c=_0x42cc95['get'](_0x9c5caa[_0x3d88a2(-_0x1f4ffe._0xa2b083,-0x158,-_0x1f4ffe._0x2153d8,-0x178)]);if(!_0x31c08c){const _0x148b5b=createUnknownToolResult(_0x9c5caa);return await emitEvent(_0x42995c,{'type':'tool_completed','toolCall':_0x9c5caa,'result':_0x148b5b},_0x89c1bd),_0x148b5b;}throwIfAborted(_0x89c1bd['signal']);function _0x3d88a2(_0x300295,_0x400dba,_0x162978,_0xa6ff0a){return _0x3588de(_0x300295-0x1cb,_0x400dba-_0x1c9e96._0x17a79b,_0x400dba- -_0x1c9e96._0x49e401,_0x162978);}await emitEvent(_0x42995c,{'type':'tool_started','toolCall':_0x9c5caa},_0x89c1bd);try{throwIfAborted(_0x89c1bd[_0x3d88a2(-0x1b6,-0x1c8,-0x179,-0x182)]);const _0x57d365=validateToolInput(_0x9c5caa[_0x3d88a2(-_0x1f4ffe._0x39f695,-_0x1f4ffe._0x6c2884,-0x189,-0x15a)],_0x31c08c[_0x3d88a2(-_0x1f4ffe._0x2fb0d4,-0x145,-_0x1f4ffe._0x629317,-_0x1f4ffe._0xc1caea)]),_0x4adddf=await _0x31c08c[_0x3d88a2(-0x1ce,-_0x1f4ffe._0x180b63,-_0x1f4ffe._0x34f734,-0x1a1)](_0x57d365,_0x89c1bd),_0x1a833f=[],_0x1be406=addAbortListener(_0x89c1bd[_0x24fc01(_0x1f4ffe._0x77b6c3,_0x1f4ffe._0x267400,0x1fe,_0x1f4ffe._0xeba077)],()=>{function _0x1dbb41(_0x568767,_0x4e64c1,_0x590e3a,_0x578a86){return _0x3d88a2(_0x568767-0x189,_0x578a86-_0x15d1c9._0x2efa46,_0x4e64c1,_0x578a86-0x1e6);}void _0x4adddf[_0x1dbb41(0x6b,_0x25913f._0x1120e5,0x27,0x1b)](void 0x0)['catch'](()=>{});});try{throwIfAborted(_0x89c1bd[_0x3d88a2(-_0x1f4ffe._0x43bfea,-0x1c8,-_0x1f4ffe._0x3ca3c7,-0x1e1)]);let _0x5c883f=await _0x4adddf[_0x24fc01(_0x1f4ffe._0x19abd7,_0x1f4ffe._0x3e376e,_0x1f4ffe._0x3fbb59,0x2a2)]();while(!_0x5c883f['done']){throwIfAborted(_0x89c1bd[_0x3d88a2(-0x18f,-0x1c8,-_0x1f4ffe._0x1d42d6,-0x1dd)]);const _0xadc7a=normalizeToolOutputValue(_0x5c883f[_0x3d88a2(-0x1e4,-0x1ae,-_0x1f4ffe._0x4f6922,-_0x1f4ffe._0x552c6b)]);_0x1a833f[_0x24fc01(_0x1f4ffe._0x2bb304,0x2d2,0x294,_0x1f4ffe._0x399b9d)](_0xadc7a),await emitEvent(_0x42995c,{'type':'tool_output_chunk','toolCall':_0x9c5caa,'chunk':_0xadc7a},_0x89c1bd),throwIfAborted(_0x89c1bd[_0x24fc01(0x24f,0x1d8,0x1fe,0x1d4)]),_0x5c883f=await _0x4adddf['next']();}throwIfAborted(_0x89c1bd['signal']);const _0x2d14bc=_0x5c883f[_0x3d88a2(-_0x1f4ffe._0x43e21a,-0x1ae,-0x1bc,-_0x1f4ffe._0xfb3598)]===void 0x0?deriveFinalToolOutput(_0x1a833f):normalizeToolOutputValue(_0x5c883f[_0x24fc01(_0x1f4ffe._0x465a07,0x250,0x218,0x262)]),_0x4956de=createSuccessToolResult(_0x9c5caa,_0x2d14bc,_0x1a833f);return await emitEvent(_0x42995c,{'type':'tool_completed','toolCall':_0x9c5caa,'result':_0x4956de},_0x89c1bd),_0x4956de;}catch(_0x42f7eb){if(isAbortError(_0x42f7eb)){const _0x9eed37=createAbortedToolResult(_0x9c5caa,_0x42f7eb,_0x1a833f);return await emitEvent(_0x42995c,{'type':'tool_completed','toolCall':_0x9c5caa,'result':_0x9eed37},_0x89c1bd),_0x9eed37;}const {errorMessage:_0x120a1b,structured:_0x51aee8}=normalizeExecutionError(_0x42f7eb),_0x478de5=createErrorToolResult(_0x9c5caa,_0x120a1b,_0x51aee8,_0x1a833f);return await emitEvent(_0x42995c,{'type':_0x3d88a2(-_0x1f4ffe._0x39a50f,-_0x1f4ffe._0x2359cb,-0x1ce,-_0x1f4ffe._0x22f6b6),'toolCall':_0x9c5caa,'result':_0x478de5},_0x89c1bd),_0x478de5;}finally{_0x1be406();}}catch(_0x1f065b){if(isAbortError(_0x1f065b)){const _0x457962=createAbortedToolResult(_0x9c5caa,_0x1f065b);return await emitEvent(_0x42995c,{'type':'tool_completed','toolCall':_0x9c5caa,'result':_0x457962},_0x89c1bd),_0x457962;}const {errorMessage:_0x2dfcfa,structured:_0x1769b9}=normalizeExecutionError(_0x1f065b),_0x18817d=createErrorToolResult(_0x9c5caa,_0x2dfcfa,_0x1769b9);return await emitEvent(_0x42995c,{'type':'tool_completed','toolCall':_0x9c5caa,'result':_0x18817d},_0x89c1bd),_0x18817d;}}function _0x57e9(){const _0x36330c=['C3rYzwfT','B2jQzwn0','zMLUywXnzxnZywDL','Dg9VBenHBgXdB3vUDa','yxnRvxnLCG','CMvHC29UAw5Nx21LC3nHz2u','BMv4Da','B3jKzxi','C3rYAw5N','C3vTBwfYEuLUzgv4','Dg9VBf9YzwPLy3rLza','ywjVCNrLza','B3bLBMfPx3jLyxnVBMLUz19KzwX0yq','oMfZC2LZDgfUDdO','C2v0u3LZDgvTuhjVBxb0','A2LUza','mtaXmJGXndfeD2LMshG','Dg9VBf91C2vFBwvZC2fNzq','qwDLBNqUC2vUzcbYzxf1AxjLCYbHig1LC3nHz2uGD2HLBIbUBYbKzwzHDwX0ig1LC3nHz2uGAxmGy29UzMLNDxjLza','CMvHC29UAw5Nx2nODw5R','C2vZC2LVBI0','yMvMB3jLvg9VBev4zwn1DgLVBG','yMvMB3jLtw9KzwXszxf1zxn0','BgLZDfrVB2Xty2HLBwfZ','CMvNAxn0zxi','Dg9VBf91C2vFzgvSDge','C3rHz2u','BMfTzq','yxnZAxn0yw50x2nODw5R','Dg90ywXszwfZB25PBMDuB2TLBNm','CMfUzg9T','Dg9VBf91C2vFy2H1BMS','C3LZDgvT','ywz0zxjuB29SuMvZDwX0','Bwf4vg9Rzw5Z','BwfW','C2vZC2LVBKLK','Dg9VBhm','B3v0Chv0vg9Rzw5Z','Bwv0CMLJCW','CMvXDwLYzwq','Dg90ywXpDxrWDxruB2TLBNm','ywjVCNq','CMvHC29U','zgvMyxvSDe1LC3nHz2u','oIbLEhbLy3rLzcbZDhjPBMC','Aw5WDxrty2HLBwe','BgfZDfjLC3bVBNnL','C3rYzwfTAw5N','Dg9VBfj1BNrPBwu','DMfSDwvZ','B25fDMvUDa','Dg9VBf91C2u','BgvUz3rO','B3v0Chv0','zgvWCW','DxnLCG','y29UDgvUDa','y29TCgXLDgvK','Dg90ywXuB2TLBNm','zNvUy3rPB24','oIbTAxnZAw5NihjLCxvPCMvKigzPzwXKici','DgHPBMTPBMC','vg9VBcbLEgvJDxrPB24GCMvQzwn0zwqGzM9Yia','mtbWuKDbzhu','ChvZAa','Dg90ywXjBNb1DfrVA2vUCW','BwvZC2fNzq','Bw9KzwXFCMvZCg9UC2u','oIbLEhbLy3rLzcbIB29SzwfU','CMvJB3jKrxzLBNq','DgHLBG','zxHLy3v0zq','oIbLEhbLy3rLzcbVyMPLy3q','mJa5nZa3nJnuBefLrKO','DxnLCL9TzxnZywDL','y2HHDe1VzgvS','C2XPy2u','BM93','otHbDuX3EuO','DhjPBq','y29UDgvUDf9KzwX0yq','qwDLBNqGCMvXDwLYzxmGysbJAgf0tw9KzwW','C2vUza','yxnZAxn0yw50twvZC2fNzuLK','mtaYndu2m2fYtezpuq','z2v0q29UDgv4DfDPBMrVD0XPBwL0','C2LNBMfS','zMLSDgvY','mJi3otbkwhn4uNC','CNvU','CMvZCg9UC2u','AM9PBG','C29YDa','C3rHDgu','B25uB29Sq2fSBa','Aw5KzxG','DhjHBNnMB3jTzxi','ywz0zxjuDxjUq29TCgXLDgu','C3rYAw5NAwz5','zxjYB3i','C29Tzq','Aw5WDxrezwX0yq','DhvYBKLUzgv4','yxjYyxK','ywrK','CMvHC29UAw5Nvg9Rzw5Z','ChjVDMLKzxjFCMv0CNK','tw9KzwWGC3rYzwfTigvUzgvKihDPDgHVDxqGysbMAw5HBcbYzxnWB25Zzq','ndq5mtuYmhDLBgvjvq','Bw9KzwXFCMvXDwvZDa','AxnbCNjHEq','y29TCgXLDgu','DMfSDwu','yMvMB3jLrMLUywXpDxrWDxq','sw52ywXPzcb0B29SigLUChv0igf0ia','BgLZDa','CMfJzq','DhLWzq','y29UDgvUDeLUzgv4','Dg9tDhjPBMC','zw5HyMXLza','DxnHz2u','Dg9VBf9JB21WBgv0zwq','yM9VBgvHBG','C2vZC2LVBKrPCG','ogLJDMzkCa','DhvYBKLK','Dg9VBf9Yzxn1BhrFBwvZC2fNzq','CNvUt2jZzxj2zxjZ','C2v0q2HHDe1VzgvS','CMvTB3zLrxzLBNrmAxn0zw5LCG','z2v0','zgvSzxrL','Dgv4Da','yxnZAxn0yw50x21LC3nHz2u','ywn0Aw9U','ywXS','AxrLBxm','DhvYBL9JB21WBgv0zq','oIbLEhbLy3rLzcbUDw1Izxi','BwvZC2fNzxm','C3LZDgvTuhjVBxb0','zgvSDge','C3rYDwn0DxjLza','yw50AhjVCgLJx3rOAw5RAw5Nx2rLBhrH','AxrLBuLK','B2jZzxj2zxi','Dg9VBfjLC3vSDhm','y29UDgv4DfDPBMrVD0XPBwL0','DhvYBI0','ChjVCgvYDgLLCW','CMvNAxn0CNK','x3n5C3rLBvbYB21WDa','Dg9VBhncEu5HBwu','B3bLBMfPx3jLyxnVBMLUz19ZDw1Tyxj5x2rLBhrH','CMv0DxjU','zMLUywXFBwvZC2fNzq','nte5mZa2B0DcDu9x','C2v0vg9VBhm','CMvQzwn0','Dg9VBf9JywXS','zw50CMLLCW','vw5RBM93BIb0B29SoIa','C3rHDhvZ','Aw5WDxq','zgvZy3jPChrPB24','zg9Uzq','mJC2mJC2n0Htz0DPtq','zM9YrwfJAa','mtz0A3vrB1u','Dg9VBf9Yzxn1Bhq'];_0x57e9=function(){return _0x36330c;};return _0x57e9();}function createInternalToolRuntime(_0xc0b396=[],_0xea625c={}){const _0x5f5158={_0x164960:0x244,_0x11b004:0x23d,_0x32c0af:0x203},_0x119fb0={_0x46c13e:0x34c,_0x522da0:0x369};let _0x2e90c8=new ToolRegistry(_0xc0b396);return{'listToolSchemas'(){const _0x6b091c={_0x3fcd12:0xf4};function _0x2b125d(_0x2ede66,_0x2bef44,_0xce7142,_0x4fec6d){return _0x959d(_0x2ede66-_0x6b091c._0x3fcd12,_0x4fec6d);}return _0x2e90c8[_0x2b125d(_0x119fb0._0x46c13e,0x3a1,_0x119fb0._0x522da0,0x367)]();},'setTools'(_0x58c3e2){_0x2e90c8=new ToolRegistry(_0x58c3e2);},async 'executeCalls'(_0x40f6b1,_0x3c4963){function _0xc7a7fb(_0x29e9c0,_0x1fd8b3,_0x1aef6a,_0x2cebe4){return _0x959d(_0x29e9c0- -0x25d,_0x2cebe4);}function _0x35cb47(_0x42aa63,_0x3e36ae,_0x19b8ae,_0x3d3005){return _0x959d(_0x42aa63- -0x27,_0x3e36ae);}return await Promise[_0x35cb47(0x1f7,0x1d4,_0x5f5158._0x164960,0x1e1)](_0x40f6b1[_0x35cb47(_0x5f5158._0x11b004,_0x5f5158._0x32c0af,0x216,0x1ff)](async _0x1aedd0=>{return await executeToolCall(_0x2e90c8,_0x1aedd0,_0x3c4963,_0xea625c['onToolCall'],_0xea625c['onEvent']);}));},async 'execute'(_0x664127,_0x4b7e1d){const [_0xfd90aa]=await this['executeCalls']([_0x664127],_0x4b7e1d);return _0xfd90aa;}};}function getOrderedObserverExtensions(_0x22f07f,_0x2c6b85){const _0x32b0c4={_0xfd9010:0x14a,_0x19429b:0x1d9,_0x1d2715:0x15b},_0x1132c8={_0x3fdd6a:0x54f,_0x1b3d0f:0x412,_0x2f3418:0x444,_0x40abd7:0x42f,_0x115ed5:0x3f7,_0x27c301:0x44e},_0x5e230d={_0x32edfc:0x271,_0x1f3017:0x146,_0x2c0592:0x1e1},_0x571422={_0x289807:0x1c3,_0x342827:0xf3},_0x469b47={_0x1686a2:0x1a,_0x1715f9:0xab};function _0x4a6e95(_0x40446c,_0x4c18da,_0x5aca39,_0x43434e){return _0x3fa381(_0x5aca39-_0x469b47._0x1686a2,_0x40446c,_0x5aca39-_0x469b47._0x1715f9,_0x43434e-0x1ce);}function _0x35e6ec(_0x357b8e,_0x2d1526,_0x1afa92,_0x2644a7){return _0x3588de(_0x357b8e-_0x571422._0x289807,_0x2d1526-_0x571422._0x342827,_0x357b8e- -0x439,_0x2644a7);}return _0x22f07f[_0x35e6ec(0x182,0x139,0x154,_0x32b0c4._0xfd9010)](_0x109d9d=>{const _0xb57a21={_0x532ded:0x34b};function _0x544e46(_0x5cb92e,_0x16f928,_0x368f59,_0x13711c){return _0x35e6ec(_0x13711c-_0xb57a21._0x532ded,_0x16f928-0x156,_0x368f59-0x80,_0x16f928);}function _0x1ccccd(_0x49a59d,_0x32ff23,_0x43ab1a,_0x32ff8e){return _0x35e6ec(_0x43ab1a-_0x5e230d._0x32edfc,_0x32ff23-_0x5e230d._0x1f3017,_0x43ab1a-_0x5e230d._0x2c0592,_0x49a59d);}return _0x109d9d['enabled']!==![]&&_0x109d9d[_0x544e46(0x575,_0x1132c8._0x3fdd6a,0x51c,0x53b)]===_0x2c6b85&&_0x109d9d[_0x1ccccd(_0x1132c8._0x1b3d0f,_0x1132c8._0x2f3418,0x456,0x408)]===_0x1ccccd(_0x1132c8._0x40abd7,_0x1132c8._0x115ed5,0x42e,_0x1132c8._0x27c301);})[_0x35e6ec(0x187,_0x32b0c4._0x19429b,0x178,_0x32b0c4._0x1d2715)]((_0x3eed78,_0x221303)=>_0x3eed78[_0x35e6ec(0x1dd,0x1dd,0x229,0x227)]-_0x221303[_0x35e6ec(0x1dd,0x1fd,0x1e7,0x1c6)]);}function getOrderedTransformerExtensions(_0x4a0cae,_0x303ae8){const _0x46886d={_0x7a00c2:0xa0,_0x28c9d1:0xac,_0x551e23:0xbc},_0x1f7d94={_0x113a98:0x1b4,_0x55fa05:0x20b,_0x55ff98:0x1a9,_0x5cfba7:0x15c,_0x1ca51a:0x15d,_0x5587fa:0x181,_0x618cce:0x149},_0x1bc3f1={_0x11396b:0x9d},_0x44b8dc={_0x269b48:0x1d1,_0x3bd071:0x4f0};function _0x255318(_0x330123,_0x2544a1,_0x366e52,_0x12949d){return _0x3588de(_0x330123-0xa7,_0x2544a1-_0x44b8dc._0x269b48,_0x330123- -_0x44b8dc._0x3bd071,_0x366e52);}function _0x2f4f58(_0x265ed6,_0x176b39,_0x42e2e2,_0x476081){return _0x3588de(_0x265ed6-0x12,_0x176b39-_0x1bc3f1._0x11396b,_0x265ed6- -0x660,_0x42e2e2);}return _0x4a0cae[_0x255318(0xcb,0x80,0x91,0xcc)](_0xc9bea8=>{const _0x42ee4e={_0x321912:0xbe},_0x164ba8={_0x165522:0xff,_0x4c4971:0x15e};function _0x21c3d3(_0xa6996a,_0x6ade29,_0x9090a0,_0x1c0f8c){return _0x255318(_0x1c0f8c-0x75,_0x6ade29-_0x164ba8._0x165522,_0x9090a0,_0x1c0f8c-_0x164ba8._0x4c4971);}function _0x16bf4a(_0x4a16af,_0x4903e5,_0x3496c7,_0x14ce71){return _0x255318(_0x3496c7- -0x2b4,_0x4903e5-0x170,_0x14ce71,_0x14ce71-_0x42ee4e._0x321912);}return _0xc9bea8[_0x16bf4a(-_0x1f7d94._0x113a98,-_0x1f7d94._0x55fa05,-0x1c8,-0x1f6)]!==![]&&_0xc9bea8[_0x21c3d3(_0x1f7d94._0x55ff98,_0x1f7d94._0x5cfba7,0x193,0x1ae)]===_0x303ae8&&_0xc9bea8[_0x16bf4a(-_0x1f7d94._0x1ca51a,-_0x1f7d94._0x5587fa,-0x186,-0x191)]===_0x21c3d3(0x11b,0x13f,0x179,_0x1f7d94._0x618cce);})[_0x2f4f58(-_0x46886d._0x7a00c2,-_0x46886d._0x28c9d1,-0xf0,-_0x46886d._0x551e23)]((_0x3b1e9,_0x223e53)=>_0x3b1e9[_0x255318(0x126,0xee,0xfb,0x133)]-_0x223e53[_0x2f4f58(-0x4a,-0xf,-0x3,-0x23)]);}function createExtensionRegistry(){const _0x55497b={_0x55373c:0xde,_0x173236:0x93},_0x1eb0b5={_0x4dd70b:0x257,_0x194f55:0x234},_0xe109d6=[];return{'register'(_0x140b72){function _0x4e9ae1(_0x2c64a3,_0x1141ce,_0x3f0e38,_0x4faad9){return _0x959d(_0x4faad9- -0x78,_0x1141ce);}_0xe109d6[_0x4e9ae1(_0x1eb0b5._0x4dd70b,0x1e9,_0x1eb0b5._0x194f55,0x20a)](_0x140b72);},async 'runTransformers'(_0x285e66,_0x4e1e51,_0x10b9b6){const _0xc078f9={_0x549cb0:0x11e};let _0x1c42ce=_0x4e1e51;function _0x1ade31(_0x325b95,_0x456925,_0x543e5a,_0x47f82b){return _0x959d(_0x543e5a- -_0xc078f9._0x549cb0,_0x456925);}for(const _0x925b79 of getOrderedTransformerExtensions(_0xe109d6,_0x285e66)){_0x1c42ce=await _0x925b79[_0x1ade31(_0x55497b._0x55373c,_0x55497b._0x173236,0xd1,0xc5)](_0x1c42ce,_0x10b9b6);}return _0x1c42ce;},async 'runObservers'(_0x147717,_0x58bb43,_0xcc7b9e){for(const _0xea98fe of getOrderedObserverExtensions(_0xe109d6,_0x147717)){await _0xea98fe['run'](_0x58bb43,_0xcc7b9e);}}};}function createEmptySnapshot(){return{'totalTokens':0x0,'totalInputTokens':0x0,'totalOutputTokens':0x0,'totalReasoningTokens':0x0,'requestCount':0x0,'modelCallCount':0x0,'toolCallCount':0x0,'totalModelTimeMs':0x0,'currentTokens':0x0,'currentInputTokens':0x0,'currentOutputTokens':0x0,'currentReasoningTokens':0x0,'currentModelTimeMs':0x0};}function createAgentMetrics(_0x2108d3={}){const _0x5a5444={_0x5ccb11:0xb5,_0x4d73b0:0x11b},_0x2adc0c={_0x278197:0x4a7,_0x2da21b:0x47e,_0x36b743:0x4cd},_0x1348d8={_0x6de7e:0x49e,_0x520988:0x46c,_0x4bd86e:0x4c6,_0x415f1c:0x483,_0x5ef959:0x4c7,_0x5a3aa6:0x47a,_0xa64051:0x49b,_0x5d5c34:0x15f,_0x1da754:0x180,_0x4c838a:0x1c0,_0xe329f8:0x4ca,_0x519778:0x49d,_0x26c728:0x486,_0x104356:0x46f,_0x5c8532:0x508,_0x1c445a:0x481,_0x56ef25:0x4ee,_0x175413:0x132,_0x442cfb:0xf4,_0x1ba1d8:0xf2,_0x4f9f17:0xf7,_0x3d235e:0x498,_0x27ab0c:0x440,_0x53f95d:0x441,_0x13bdd5:0xf6,_0x46dc47:0x108,_0x294715:0xf3,_0x399343:0x10c,_0x494863:0x112,_0x212a71:0xd7,_0x3d386c:0x167,_0x59cf6c:0x102,_0x539244:0x118,_0x5276f2:0x146,_0x5cbbf6:0x109,_0x2c21b0:0x4c6,_0x3fe866:0x48f,_0x469d76:0x4de,_0x182f5b:0xed,_0xbc2b8b:0x125,_0x5a67a6:0x119,_0x508e76:0x494,_0x3a357b:0x48a},_0x2fcf48={_0x148b3e:0x2bb};let _0x122d92=createEmptySnapshot();const _0xb897b7=new Set();let _0x45b3bc;const _0x180b98=()=>{const _0xfab065={..._0x122d92};for(const _0x4cd25b of _0xb897b7)_0x4cd25b(_0xfab065);};return{'getSnapshot'(){return{..._0x122d92};},'recordEvent'(_0x1de32d){function _0x568a63(_0x11fafb,_0x59b8a1,_0x4531ee,_0x3d98fa){return _0x959d(_0x59b8a1- -0x370,_0x3d98fa);}if(_0x1de32d['type']==='model_request'){_0x45b3bc=Date[_0x398a81(_0x1348d8._0x6de7e,0x456,0x4ea,_0x1348d8._0x520988)]();const _0x2e162f=_0x2108d3[_0x568a63(-0x13b,-0x185,-0x173,-0x1b3)]?.(_0x1de32d['request']);_0x2e162f!==void 0x0&&(_0x122d92={..._0x122d92,'contextWindowLimit':_0x2e162f},_0x180b98());return;}if(_0x1de32d[_0x398a81(_0x1348d8._0x4bd86e,_0x1348d8._0x415f1c,0x4c3,_0x1348d8._0x5ef959)]===_0x398a81(0x494,_0x1348d8._0x5a3aa6,_0x1348d8._0xa64051,0x4b4)){const _0x3a6503=_0x1de32d[_0x568a63(-_0x1348d8._0x5d5c34,-_0x1348d8._0x1da754,-0x13d,-_0x1348d8._0x4c838a)]['usage']['inputTokens'],_0x2c48a9=_0x1de32d['response'][_0x398a81(_0x1348d8._0xe329f8,0x4e5,0x503,_0x1348d8._0x519778)][_0x398a81(0x522,0x51e,0x4ea,0x536)],_0xa81f2c=_0x1de32d[_0x398a81(0x4ab,0x4fe,_0x1348d8._0x26c728,_0x1348d8._0x104356)][_0x398a81(0x4ca,0x499,_0x1348d8._0x5c8532,_0x1348d8._0x1c445a)][_0x398a81(0x4ba,0x4b2,0x50e,0x501)]??0x0,_0x41b652=_0x3a6503+_0x2c48a9,_0x3edcc1=_0x45b3bc===void 0x0?0x0:Date[_0x398a81(0x49e,0x44a,_0x1348d8._0x56ef25,0x49b)]()-_0x45b3bc;_0x45b3bc=void 0x0,_0x122d92={..._0x122d92,'totalTokens':_0x122d92[_0x568a63(-_0x1348d8._0x175413,-_0x1348d8._0x442cfb,-_0x1348d8._0x1ba1d8,-_0x1348d8._0x4f9f17)]+_0x41b652,'totalInputTokens':_0x122d92[_0x398a81(0x492,_0x1348d8._0x3d235e,_0x1348d8._0x27ab0c,_0x1348d8._0x53f95d)]+_0x3a6503,'totalOutputTokens':_0x122d92[_0x568a63(-_0x1348d8._0x13bdd5,-0x106,-_0x1348d8._0x46dc47,-_0x1348d8._0x294715)]+_0x2c48a9,'totalReasoningTokens':_0x122d92[_0x568a63(-_0x1348d8._0x399343,-_0x1348d8._0x494863,-0x133,-_0x1348d8._0x212a71)]+_0xa81f2c,'modelCallCount':_0x122d92['modelCallCount']+0x1,'totalModelTimeMs':_0x122d92['totalModelTimeMs']+_0x3edcc1,'currentTokens':_0x41b652,'currentInputTokens':_0x3a6503,'currentOutputTokens':_0x2c48a9,'currentReasoningTokens':_0xa81f2c,'currentModelTimeMs':_0x3edcc1,..._0x122d92[_0x568a63(-_0x1348d8._0x3d386c,-0x146,-_0x1348d8._0x59cf6c,-_0x1348d8._0x539244)]&&_0x41b652>0x0?{'contextWindowUsage':_0x41b652/_0x122d92[_0x568a63(-0xfc,-_0x1348d8._0x5276f2,-0x18a,-_0x1348d8._0x5cbbf6)]}:{}},_0x180b98();return;}function _0x398a81(_0x21e089,_0x3fcc21,_0x42d065,_0x4e61bd){return _0x959d(_0x21e089-_0x2fcf48._0x148b3e,_0x42d065);}if(_0x1de32d[_0x398a81(_0x1348d8._0x2c21b0,_0x1348d8._0x3fe866,0x4ab,_0x1348d8._0x469d76)]==='tool_call'){_0x122d92={..._0x122d92,'toolCallCount':_0x122d92[_0x568a63(-_0x1348d8._0x182f5b,-0x12c,-_0x1348d8._0xbc2b8b,-_0x1348d8._0x5a67a6)]+0x1},_0x180b98();return;}_0x1de32d[_0x398a81(_0x1348d8._0x4bd86e,_0x1348d8._0x508e76,0x519,_0x1348d8._0x3a357b)]===_0x568a63(-0x11a,-0x150,-0x195,-0x16b)&&(_0x122d92={..._0x122d92,'requestCount':_0x122d92['requestCount']+0x1},_0x180b98());},'reset'(){_0x122d92=createEmptySnapshot(),_0x45b3bc=void 0x0,_0x180b98();},'subscribe'(_0x234620){const _0x3ec7f7={_0x27a3ae:0x360,_0x25758d:0x1a4};function _0x3f4794(_0x3fa8ac,_0x113556,_0x6b4e9f,_0x574cce){return _0x959d(_0x3fa8ac- -0xfc,_0x574cce);}return _0xb897b7[_0x3f4794(0x102,_0x5a5444._0x5ccb11,_0x5a5444._0x4d73b0,0x128)](_0x234620),()=>{function _0x2d06f9(_0x14ed69,_0x5de3dc,_0x4c41ef,_0x1cc2eb){return _0x3f4794(_0x4c41ef-_0x3ec7f7._0x27a3ae,_0x5de3dc-_0x3ec7f7._0x25758d,_0x4c41ef-0x10d,_0x14ed69);}_0xb897b7[_0x2d06f9(_0x2adc0c._0x278197,0x46d,_0x2adc0c._0x2da21b,_0x2adc0c._0x36b743)](_0x234620);};}};}function makeExtensionContext(_0x41b174){return{'state':_0x41b174};}async function runStage(_0x5e396d,_0x5d08ea,_0x2deace,_0x1da5ec){const _0x1f6671={_0x11050e:0x483},_0x2add77={_0x51a8bf:0x187};function _0x3c6b41(_0x2e8df9,_0x1fc63f,_0x415c32,_0x315c2a){return _0x3fa381(_0x315c2a-0x621,_0x1fc63f,_0x415c32-_0x2add77._0x51a8bf,_0x315c2a-0x3a);}const _0x31d745=await _0x5e396d['runTransformers'](_0x5d08ea,_0x2deace,_0x1da5ec);return await _0x5e396d[_0x3c6b41(0x48d,0x449,0x45e,_0x1f6671._0x11050e)](_0x5d08ea,_0x31d745,_0x1da5ec),_0x31d745;}async function emitEvent2(_0x5c48e0,_0x1804bf,_0xa94c12){await _0x5c48e0?.(_0x1804bf,_0xa94c12);}function replaceToolUseBlocks(_0x3cfb40,_0x41de0b){const _0x2d4c09={_0x43327d:0x101,_0xe3a746:0x441,_0x313a56:0x450},_0x1b7bfd={_0x42e039:0xa2,_0x128b3d:0xa7,_0x1ef8bf:0xe5},_0x48cb3c={_0x412f3f:0x80},_0x5e15c8={_0x10a626:0x97,_0x4ee209:0xc5},_0x352362={_0x4b303d:0xea},_0x2c33b5={_0x29429a:0x12c,_0x9685d9:0x55};function _0x570311(_0x13c48c,_0x1d48f6,_0x417efe,_0x2677af){return _0x3fa381(_0x417efe-0x5df,_0x2677af,_0x417efe-_0x2c33b5._0x29429a,_0x2677af-_0x2c33b5._0x9685d9);}let _0x38b3bb=0x0;function _0x5c4d81(_0x519b63,_0x31d068,_0x22666a,_0x292093){return _0x3588de(_0x519b63-0x3,_0x31d068-_0x352362._0x4b303d,_0x31d068- -0x567,_0x292093);}return{..._0x3cfb40,'content':_0x3cfb40[_0x5c4d81(0xae,0xe1,_0x2d4c09._0x43327d,0x120)][_0x570311(_0x2d4c09._0xe3a746,_0x2d4c09._0x313a56,0x48f,0x4b3)](_0x3d276f=>{if(_0x3d276f[_0xd1ac48(-0xa2,-_0x1b7bfd._0x42e039,-0x78,-0xf4)]!==_0x1fe1ab(-_0x1b7bfd._0x128b3d,-_0x1b7bfd._0x1ef8bf,-0xcf,-0x8a))return _0x3d276f;function _0x1fe1ab(_0x45783d,_0x1d97fc,_0x176697,_0x1b8f15){return _0x570311(_0x45783d-_0x5e15c8._0x10a626,_0x1d97fc-_0x5e15c8._0x4ee209,_0x45783d- -0x547,_0x1b8f15);}const _0x5d8d7a=_0x41de0b[_0x38b3bb];function _0xd1ac48(_0x55f769,_0x193b1e,_0x5ccc39,_0x4f9dc1){return _0x570311(_0x55f769-0x148,_0x193b1e-_0x48cb3c._0x412f3f,_0x193b1e- -0x4d8,_0x5ccc39);}return _0x38b3bb+=0x1,structuredClone(_0x5d8d7a);})};}function createAssistantMessageId(_0x515a1d,_0x19b8b0){const _0x1e26a3={_0x2e06c3:0x330,_0x544c53:0x310,_0x5ea61b:0x2e2,_0x4d5145:0x308},_0x11946e={_0x27da54:0x476,_0x242e8a:0x122};function _0x1ff2bf(_0x5be672,_0x18aa97,_0xfda0c4,_0x5af1b6){return _0x3fa381(_0x18aa97-_0x11946e._0x27da54,_0x5be672,_0xfda0c4-0xef,_0x5af1b6-_0x11946e._0x242e8a);}return _0x515a1d+_0x1ff2bf(_0x1e26a3._0x2e06c3,_0x1e26a3._0x544c53,_0x1e26a3._0x5ea61b,_0x1e26a3._0x4d5145)+_0x19b8b0;}function createReasoningMessageId(_0x2fc575){return _0x2fc575+':reasoning';}function withMessageId(_0x211899,_0x813218){if(_0x211899['id']===_0x813218)return _0x211899;return{..._0x211899,'id':_0x813218};}function createAssistantChunkEvent(_0x2474da,_0x4d4066){const _0x48b744={_0x37dbac:0x11b,_0x4c8eaf:0x11e,_0x443943:0x113,_0x5bb58e:0x186,_0x396a08:0x17b,_0x4e2bfc:0x139,_0x34b060:0x1bd,_0x1604af:0x1c0,_0x48fab4:0x108,_0x20ab16:0x14d,_0x193a76:0x15c,_0x1775d1:0x155,_0x556f05:0x12b},_0x324f4b={_0x543af6:0x314,_0x326882:0x117},_0x2f5a5c={_0x25baba:0x64};function _0x4ba330(_0x4eae04,_0x1a2cae,_0x50433f,_0x2d2476){return _0x3588de(_0x4eae04-_0x2f5a5c._0x25baba,_0x1a2cae-0x55,_0x1a2cae- -0x4bb,_0x50433f);}if(_0x2474da[_0x4ba330(_0x48b744._0x37dbac,_0x48b744._0x4c8eaf,0x127,0x11e)]!==_0x150457(0x110,0x146,_0x48b744._0x443943,0x109))return void 0x0;function _0x150457(_0x3aa570,_0x59249d,_0x234b4a,_0x1ec759){return _0x3fa381(_0x59249d-_0x324f4b._0x543af6,_0x3aa570,_0x234b4a-0x1d1,_0x1ec759-_0x324f4b._0x326882);}if(_0x2474da[_0x150457(_0x48b744._0x5bb58e,_0x48b744._0x396a08,_0x48b744._0x4e2bfc,0x1d0)]===void 0x0)return void 0x0;return{'type':_0x150457(0x175,_0x48b744._0x34b060,0x18c,_0x48b744._0x1604af),'index':_0x2474da[_0x4ba330(0x11a,_0x48b744._0x48fab4,_0x48b744._0x20ab16,_0x48b744._0x193a76)]??0x0,'messageId':_0x4d4066,'chunk':{'type':'content_delta','index':_0x2474da[_0x150457(0x101,_0x48b744._0x1775d1,0x189,0x170)]??0x0,'text':_0x2474da[_0x150457(_0x48b744._0x556f05,_0x48b744._0x396a08,0x1cd,0x147)]}};}function createToolUseChunkEvent(_0x4a1433,_0x2be49e){const _0x2abcea={_0xd0827c:0x32c,_0x2aa13f:0x360,_0x136998:0xc,_0x2d09d7:0x30,_0xc3e5bf:0x332,_0x3338f7:0x306,_0x2c5845:0x397,_0x5c4cc4:0x389,_0x27c5ea:0x34e,_0x53d480:0x34a,_0x5bd483:0x32e,_0xc8b642:0xa,_0x1b0d6b:0x1a,_0x252922:0x3e,_0x115ee5:0x338,_0x5d433a:0x36f,_0x4373ef:0x316},_0xcef5b8={_0x375cee:0x4f1,_0x2f9507:0x101},_0x24740f={_0x5080a3:0xff};function _0x34e646(_0x40db77,_0x294fa5,_0x56e047,_0x32de6b){return _0x3fa381(_0x40db77-0x14e,_0x32de6b,_0x56e047-_0x24740f._0x5080a3,_0x32de6b-0x3f);}function _0x515986(_0x3cd0d9,_0x2411b7,_0x17e314,_0x234d39){return _0x3fa381(_0x3cd0d9-_0xcef5b8._0x375cee,_0x234d39,_0x17e314-0xd8,_0x234d39-_0xcef5b8._0x2f9507);}if(_0x4a1433[_0x515986(0x348,0x340,_0x2abcea._0xd0827c,_0x2abcea._0x2aa13f)]!==_0x34e646(-_0x2abcea._0x136998,-0x19,-_0x2abcea._0x2d09d7,0x3e))return void 0x0;return{'type':_0x515986(0x39d,0x35c,0x39e,0x3b4),'index':_0x4a1433[_0x515986(_0x2abcea._0xc3e5bf,_0x2abcea._0x3338f7,0x347,0x2e3)]??0x0,'messageId':_0x2be49e,'chunk':{'type':_0x515986(_0x2abcea._0x2c5845,_0x2abcea._0x5c4cc4,_0x2abcea._0x27c5ea,_0x2abcea._0x53d480),'id':_0x4a1433['id']??'','index':_0x4a1433[_0x515986(0x332,_0x2abcea._0x5bd483,0x31a,0x325)]??0x0,..._0x4a1433[_0x34e646(-_0x2abcea._0xc8b642,_0x2abcea._0x1b0d6b,-_0x2abcea._0x252922,_0x2abcea._0x1b0d6b)]!==void 0x0?{'name':_0x4a1433['name']}:{},..._0x4a1433[_0x515986(0x338,0x2f9,_0x2abcea._0xd0827c,0x35d)]!==void 0x0?{'inputDelta':_0x4a1433[_0x515986(_0x2abcea._0x115ee5,0x33d,_0x2abcea._0x5d433a,_0x2abcea._0x4373ef)]}:{}}};}function _0x959d(_0x58432d,_0x47fc8f){_0x58432d=_0x58432d-0x1d7;const _0x57e9ad=_0x57e9();let _0x959d03=_0x57e9ad[_0x58432d];if(_0x959d['KtqzVb']===undefined){var _0x3aa680=function(_0x3f1f6a){const _0x333412='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x47d19f='',_0x43f75f='';for(let _0x2b88be=0x0,_0x2420f8,_0x33870b,_0x3eb8cd=0x0;_0x33870b=_0x3f1f6a['charAt'](_0x3eb8cd++);~_0x33870b&&(_0x2420f8=_0x2b88be%0x4?_0x2420f8*0x40+_0x33870b:_0x33870b,_0x2b88be++%0x4)?_0x47d19f+=String['fromCharCode'](0xff&_0x2420f8>>(-0x2*_0x2b88be&0x6)):0x0){_0x33870b=_0x333412['indexOf'](_0x33870b);}for(let _0x430ac8=0x0,_0x4d6399=_0x47d19f['length'];_0x430ac8<_0x4d6399;_0x430ac8++){_0x43f75f+='%'+('00'+_0x47d19f['charCodeAt'](_0x430ac8)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x43f75f);};_0x959d['dpokSZ']=_0x3aa680,_0x959d['QDMcxA']={},_0x959d['KtqzVb']=!![];}const _0xb048a7=_0x57e9ad[0x0],_0x483d74=_0x58432d+_0xb048a7,_0x3a84be=_0x959d['QDMcxA'][_0x483d74];return!_0x3a84be?(_0x959d03=_0x959d['dpokSZ'](_0x959d03),_0x959d['QDMcxA'][_0x483d74]=_0x959d03):_0x959d03=_0x3a84be,_0x959d03;}function createReasoningChunkEvent(_0x573444,_0x41e1e6){const _0x3c41ca={_0x305b61:0x23a,_0x30e319:0x1c2,_0x142997:0x206,_0x217c4c:0x22f,_0xb6e53e:0x479,_0x2feea6:0x432,_0x2c17a4:0x1fe,_0x299857:0x1d1,_0x5321e4:0x3ca,_0x1aed8b:0x3d8,_0x104df6:0x482,_0x5b3ae1:0x4b1,_0x476cd6:0x42a,_0x3681ed:0x429,_0x51c753:0x21e,_0x161c5b:0x20f,_0x35b8fc:0x270,_0xe10162:0x25d,_0x7e46f2:0x263,_0x43ed83:0x433,_0x36aa19:0x431,_0x54c16d:0x3f2,_0x4d8bfc:0x234,_0x17dcc9:0x26b,_0x4210bf:0x3e0,_0x57a6ad:0x40a,_0x3aa705:0x402,_0xfa6d43:0x423,_0x513fa3:0x43a,_0x278bba:0x216,_0x6a8d96:0x22c,_0x2449ce:0x3df,_0x2900a4:0x427,_0x122026:0x422,_0xa23817:0x1fb,_0xad8b1:0x3e6,_0x2f3e72:0x484,_0x228890:0x3d6,_0x32eab2:0x449},_0x1e9ea7={_0x459b72:0x185,_0x2fdd06:0x107},_0x50c00d={_0x469913:0x26};function _0x532119(_0x3a7920,_0x57093e,_0x1a0948,_0x557f94){return _0x3fa381(_0x1a0948-0x3bd,_0x57093e,_0x1a0948-_0x50c00d._0x469913,_0x557f94-0x106);}function _0x1f1008(_0x13c06e,_0x781811,_0x490747,_0x432ae7){return _0x3fa381(_0x432ae7-0x59a,_0x13c06e,_0x490747-_0x1e9ea7._0x459b72,_0x432ae7-_0x1e9ea7._0x2fdd06);}switch(_0x573444[_0x532119(0x24a,_0x3c41ca._0x305b61,0x214,_0x3c41ca._0x30e319)]){case _0x532119(0x21d,_0x3c41ca._0x142997,_0x3c41ca._0x217c4c,0x20d):return{'type':_0x1f1008(_0x3c41ca._0xb6e53e,0x474,_0x3c41ca._0x2feea6,0x43a),'index':_0x573444[_0x532119(0x210,0x1cf,_0x3c41ca._0x2c17a4,_0x3c41ca._0x299857)],'messageId':_0x41e1e6,'chunk':{'type':_0x1f1008(_0x3c41ca._0x5321e4,0x448,_0x3c41ca._0x1aed8b,0x40c),'index':_0x573444['index']??0x0,'thinking':_0x573444[_0x1f1008(_0x3c41ca._0x104df6,_0x3c41ca._0x5b3ae1,0x454,0x465)]??''},'text':_0x573444[_0x1f1008(_0x3c41ca._0x476cd6,0x483,_0x3c41ca._0x3681ed,0x465)]??''};case _0x532119(_0x3c41ca._0x51c753,0x206,0x256,_0x3c41ca._0x161c5b):return{'type':_0x532119(_0x3c41ca._0x35b8fc,0x2a4,_0x3c41ca._0xe10162,_0x3c41ca._0x7e46f2),'index':_0x573444['contentIndex'],'messageId':_0x41e1e6,'chunk':{'type':_0x1f1008(0x44f,0x45d,0x471,_0x3c41ca._0x43ed83),'contentIndex':_0x573444[_0x1f1008(_0x3c41ca._0x36aa19,0x40b,0x3aa,_0x3c41ca._0x54c16d)]??0x0,'delta':_0x573444['delta']??'','itemId':_0x573444[_0x532119(_0x3c41ca._0x4d8bfc,0x200,0x230,_0x3c41ca._0x17dcc9)]??'','outputIndex':_0x573444['outputIndex']??0x0},'text':_0x573444[_0x1f1008(_0x3c41ca._0x4210bf,0x40a,0x3f5,_0x3c41ca._0x57a6ad)]??''};case'openai_reasoning_summary_delta':return{'type':_0x1f1008(_0x3c41ca._0x3aa705,0x472,_0x3c41ca._0xfa6d43,_0x3c41ca._0x513fa3),'index':_0x573444[_0x532119(_0x3c41ca._0x278bba,0x289,0x253,0x25b)],'messageId':_0x41e1e6,'chunk':{'type':_0x532119(_0x3c41ca._0x6a8d96,0x25e,0x239,0x26b),'delta':_0x573444[_0x1f1008(_0x3c41ca._0x2449ce,_0x3c41ca._0x2900a4,_0x3c41ca._0x122026,0x40a)]??'','itemId':_0x573444[_0x532119(0x1f3,_0x3c41ca._0xa23817,0x230,0x233)]??'','outputIndex':_0x573444['outputIndex']??0x0,'summaryIndex':_0x573444[_0x1f1008(_0x3c41ca._0xad8b1,_0x3c41ca._0x2f3e72,0x3ff,0x430)]??0x0},'text':_0x573444[_0x1f1008(_0x3c41ca._0x228890,_0x3c41ca._0x32eab2,0x42c,0x40a)]??''};default:return void 0x0;}}function isAbortedToolResult(_0x50b556){const _0x3bd06d={_0x325989:0x6f,_0xb9231b:0x58,_0x481a21:0xe,_0x20af66:0x9,_0x2a3558:0x8},_0x447c07={_0x43b282:0x11a};function _0x514307(_0x323810,_0x5d5b8b,_0x3add39,_0x4b42eb){return _0x3588de(_0x323810-0x4,_0x5d5b8b-0x128,_0x323810- -0x5be,_0x5d5b8b);}function _0x5c0c9b(_0x416a37,_0x1799ba,_0x4a3565,_0x2278f0){return _0x3fa381(_0x416a37-0x177,_0x2278f0,_0x4a3565-0x179,_0x2278f0-_0x447c07._0x43b282);}return _0x50b556[_0x514307(0x49,_0x3bd06d._0x325989,_0x3bd06d._0xb9231b,_0x3bd06d._0x481a21)]===_0x514307(_0x3bd06d._0x20af66,0x48,-_0x3bd06d._0x2a3558,0x4a)&&_0x50b556['structured']['aborted']===!![];}async function executeModelRequest(_0x4c8cdd,_0x2f00fa,_0x700321,_0xd50b93,_0x10d962){const _0x48cc4a={_0x1037f4:0x1ed,_0x196d6b:0x21b,_0x56bb65:0x1d5,_0x4d8e9c:0x282,_0x1e9766:0x218,_0x423bfa:0x25a,_0x221e6e:0x1ff,_0xd233a0:0x224,_0x4fe420:0x14,_0x2511aa:0x4e,_0x30163e:0x68,_0xd4564b:0x27,_0x5ced38:0x45,_0x47dca9:0x1e0,_0x288979:0x27b,_0xb87e65:0x210,_0xb12f6b:0x22,_0x15a359:0x43,_0x1845a9:0x2e,_0x1e4d94:0x50,_0x12861d:0x22e,_0x2cee4e:0x1fd,_0x4e0b51:0x23,_0x50b48d:0x3,_0x492f08:0x2,_0x17dc17:0x5f,_0x101939:0x1b1,_0xd6c351:0x201,_0x1af276:0xa7,_0x37ecce:0xde,_0x444c4a:0x72,_0x3a4e3c:0x3e,_0x217072:0x2d,_0x3a10b5:0x8b,_0x381fff:0x4f,_0x2d9202:0xb2,_0x29a265:0xaa,_0x383365:0x68,_0x349d71:0x97,_0x1f540d:0x8d,_0x342837:0x1c,_0x26a676:0x48,_0x3943a0:0x30,_0x1b89a1:0x266,_0x1c3b2c:0x21f,_0x55a47f:0x1db,_0x3cb36d:0x1bb,_0x1f71e9:0x5,_0x38e5c6:0x65,_0xdbb897:0x71},_0x876081={_0x92f108:0x1e7,_0xeec2fd:0x86},_0xda0b39={_0x4f7a04:0x160,_0x76ab92:0x1ef};function _0x183e87(_0x3aed8c,_0xb262cd,_0xd3dd1c,_0x49b9d9){return _0x3588de(_0x3aed8c-_0xda0b39._0x4f7a04,_0xb262cd-_0xda0b39._0x76ab92,_0x3aed8c- -0x3dc,_0xd3dd1c);}throwIfAborted(_0x2f00fa[_0x183e87(0x1de,_0x48cc4a._0x1037f4,_0x48cc4a._0x196d6b,_0x48cc4a._0x56bb65)]);if(!_0x2f00fa[_0x183e87(0x263,_0x48cc4a._0x4d8e9c,_0x48cc4a._0x1e9766,_0x48cc4a._0x423bfa)]||!_0x700321[_0x183e87(0x1d3,_0x48cc4a._0x221e6e,_0x48cc4a._0xd233a0,0x1e6)][_0x26503e(0x74,0x87,0x70,0x48)])return await _0x700321[_0x26503e(_0x48cc4a._0x4fe420,0x2e,-0xf,_0x48cc4a._0x2511aa)][_0x26503e(0x38,_0x48cc4a._0x30163e,_0x48cc4a._0xd4564b,0x3c)](_0x4c8cdd,{'signal':_0x2f00fa[_0x26503e(0x1f,-0x25,_0x48cc4a._0x5ced38,0x49)]});let _0x1a4172;for await(const _0x21c891 of _0x700321['chatModel'][_0x183e87(0x233,_0x48cc4a._0x47dca9,_0x48cc4a._0x288979,_0x48cc4a._0xb87e65)](_0x4c8cdd,{'signal':_0x2f00fa[_0x26503e(0x1f,_0x48cc4a._0xb12f6b,0x19,0xf)]})){throwIfAborted(_0x2f00fa[_0x26503e(0x1f,_0x48cc4a._0x15a359,-0xb,-_0x48cc4a._0x4fe420)]);if(_0x21c891[_0x26503e(0x3e,_0x48cc4a._0x1845a9,_0x48cc4a._0x1e4d94,0x6)]===_0x183e87(_0x48cc4a._0x12861d,0x1f8,0x255,_0x48cc4a._0x2cee4e)){_0x1a4172=_0x21c891[_0x26503e(_0x48cc4a._0x4e0b51,-0x29,_0x48cc4a._0x50b48d,0x46)];continue;}if(_0x21c891[_0x26503e(0x3e,-_0x48cc4a._0x492f08,_0x48cc4a._0x17dc17,0x90)]===_0x183e87(0x1f2,_0x48cc4a._0x101939,_0x48cc4a._0xd6c351,0x1b5)){await emitEvent2(_0x700321[_0x26503e(_0x48cc4a._0x1af276,_0x48cc4a._0x37ecce,_0x48cc4a._0x444c4a,0x5c)],_0x21c891,_0xd50b93);continue;}const _0x25484d=createReasoningChunkEvent(_0x21c891,_0x10d962['reasoningMessageId']);if(_0x25484d&&_0x25484d[_0x26503e(_0x48cc4a._0x3a4e3c,0x3b,_0x48cc4a._0x217072,_0x48cc4a._0x3a10b5)]===_0x26503e(0x87,0x60,0x57,_0x48cc4a._0x381fff)&&_0x25484d['text'][_0x26503e(0xa9,_0x48cc4a._0x2d9202,_0x48cc4a._0x29a265,0xd4)]>0x0){await emitEvent2(_0x700321[_0x26503e(0xa7,_0x48cc4a._0x383365,_0x48cc4a._0x349d71,_0x48cc4a._0x1f540d)],_0x25484d,_0xd50b93);continue;}const _0x3a16af=createAssistantChunkEvent(_0x21c891,_0x10d962[_0x26503e(_0x48cc4a._0x342837,_0x48cc4a._0x26a676,_0x48cc4a._0x3943a0,0x17)]);if(_0x3a16af){await emitEvent2(_0x700321[_0x183e87(_0x48cc4a._0x1b89a1,0x256,_0x48cc4a._0x1c3b2c,0x28e)],_0x3a16af,_0xd50b93);continue;}const _0x339cba=createToolUseChunkEvent(_0x21c891,_0x10d962[_0x183e87(_0x48cc4a._0x55a47f,0x18a,0x200,_0x48cc4a._0x3cb36d)]);_0x339cba&&await emitEvent2(_0x700321['onEvent'],_0x339cba,_0xd50b93);}if(!_0x1a4172)throw new Error(_0x26503e(0x34,_0x48cc4a._0x1f71e9,_0x48cc4a._0x38e5c6,_0x48cc4a._0xdbb897));function _0x26503e(_0x5c73c1,_0x15704b,_0x44299d,_0x731aec){return _0x3fa381(_0x5c73c1-_0x876081._0x92f108,_0x15704b,_0x44299d-_0x876081._0xeec2fd,_0x731aec-0xfb);}return _0x1a4172;}function makeTurnGuards(_0x497586,_0x2fbfee,_0x3a3d67,_0x36ee4c,_0x259e53){return{async 'stage'(_0x415fba,_0x5a8bbb){return throwIfAborted(_0x497586),await runStage(_0x2fbfee,_0x415fba,_0x5a8bbb,_0x36ee4c);},async 'emit'(_0x5b83d2){throwIfAborted(_0x497586),await emitEvent2(_0x3a3d67,_0x5b83d2,_0x259e53);},async 'stageUnchecked'(_0x4b327a,_0x38c3c2){return await runStage(_0x2fbfee,_0x4b327a,_0x38c3c2,_0x36ee4c);},async 'emitUnchecked'(_0x6b9330){await emitEvent2(_0x3a3d67,_0x6b9330,_0x259e53);}};}async function runTurn(_0x4a9f7c,_0x33be1d){const _0xf9c0b8={_0x57c71f:0x1c0,_0x585a2b:0x1aa,_0x21bcb2:0x329,_0x42dc8d:0x2d0,_0x1f7724:0x373,_0x47e9e0:0x379,_0x57b059:0x333,_0x850dec:0x37e,_0x81d55f:0x378,_0x2b301d:0x2d7,_0x9795ef:0x2f0,_0x18ab8f:0x244,_0x106ff4:0x262,_0x5d1a0b:0x26a,_0x162249:0x246,_0x2dcfae:0x384,_0x499685:0x3bc,_0x4b8906:0x3ae,_0x2aee14:0x26c,_0x203188:0x216,_0x22fdba:0x263,_0x2ace8:0x26b,_0x3df62b:0x226,_0x83a0d9:0x228,_0x5cf778:0x26b,_0x46821b:0x249,_0x4dece3:0x1fd,_0x3eeea3:0x231,_0x3ee3ae:0x1f4,_0x1d650f:0x238,_0x4666a9:0x27a,_0x3aa9ca:0x25b,_0x3250cf:0x1c6,_0x25048a:0x1dc,_0x49b4e3:0x18a,_0xe46306:0x18d,_0x247e6b:0x1a5,_0x4f921b:0x21d,_0x21513f:0x348,_0x229a66:0x2ef,_0x10681a:0x343,_0x3e6818:0x326,_0x527a38:0x267,_0x2e2521:0x265,_0x2d3dcf:0x269,_0x3808a6:0x2a4,_0x52879c:0x214,_0xef19c7:0x1df,_0x3b73cf:0x276,_0x11cff9:0x2c5,_0x1fb7e2:0x269,_0x220822:0x2b5,_0xbaaf3c:0x218,_0xe027a:0x1d7,_0x4aa1e8:0x20c,_0xdda31a:0x259,_0xdaff16:0x2fe,_0x10aed5:0x371,_0x465c2d:0x378,_0x5769fe:0x26e,_0x4af765:0x282,_0x62430e:0x270,_0x127999:0x27f,_0x2f28ac:0x1f7,_0x442396:0x273,_0x466c9f:0x217,_0x42c01d:0x1fe,_0x3d4dbc:0x210,_0x4c1fea:0x27a,_0x8f4ae4:0x25f,_0x15ae79:0x331,_0xa9894b:0x230,_0x2d9701:0x23a,_0x1c44b3:0x31c,_0x533c5a:0x306,_0x1167f0:0x3a3,_0x3660b0:0x23f,_0x30b1ee:0x23c,_0x2928e7:0x330,_0x510da3:0x327,_0x3ff38f:0x33b,_0x38a1f4:0x33f,_0x4de9e7:0x21a,_0x2b8d24:0x1f2,_0x36222a:0x359,_0x21b4fe:0x30e,_0x2e0b9c:0x37a,_0x465f94:0x352,_0x52a98f:0x378,_0x3d805b:0x3d8,_0x20aa59:0x308,_0x4f4941:0x2cb,_0x2f1485:0x33a,_0x51f3dc:0x2a8,_0x1389fa:0x268,_0x5daae3:0x2b0,_0x48a10b:0x22d,_0x33a9ff:0x1d8,_0x191196:0x314,_0x10bd79:0x2ce,_0x438ed0:0x254,_0x182ff5:0x22b,_0x10330a:0x286,_0x557e2b:0x35a,_0x48960d:0x371,_0x1ec2c2:0x358,_0x8596eb:0x35e,_0x2ced8f:0x35a,_0x1e3de9:0x346},_0x3ee071={_0x3a3e3:0xaf},_0x2ca7b7={_0x3289e6:0x4fb,_0x2654f7:0x4eb,_0x58f502:0x443,_0x3ca0e4:0x419},_0x4136e0={_0x214527:0x46,_0x4bd1e0:0x226,_0x451d92:0xce},_0xb348a3={_0x430a5d:0x1e4,_0xed7b31:0x6b},_0x48dee7={_0x549a67:0x4c2,_0x8726f8:0xc8,_0x429992:0x10d};function _0x34ea01(_0x4805dd,_0x585952,_0xd7e9f5,_0x403971){return _0x3fa381(_0x4805dd-_0x48dee7._0x549a67,_0x585952,_0xd7e9f5-_0x48dee7._0x8726f8,_0x403971-_0x48dee7._0x429992);}const _0x337d39=_0x4a9f7c[_0x2624c4(0x1db,0x1f0,_0xf9c0b8._0x57c71f,_0xf9c0b8._0x585a2b)]??new AbortController()[_0x34ea01(0x2fa,0x331,_0xf9c0b8._0x21bcb2,_0xf9c0b8._0x42dc8d)],_0xa017ce={'sessionId':_0x4a9f7c[_0x34ea01(_0xf9c0b8._0x1f7724,_0xf9c0b8._0x47e9e0,_0xf9c0b8._0x57b059,_0xf9c0b8._0x850dec)],'turnId':_0x4a9f7c[_0x34ea01(0x322,_0xf9c0b8._0x81d55f,_0xf9c0b8._0x2b301d,_0xf9c0b8._0x9795ef)],'system':normalizeSystem(_0x4a9f7c['system']),'messages':(_0x4a9f7c[_0x2624c4(0x1ed,0x226,_0xf9c0b8._0x18ab8f,0x1d4)]??[])[_0x2624c4(_0xf9c0b8._0x106ff4,0x268,_0xf9c0b8._0x5d1a0b,_0xf9c0b8._0x162249)](normalizeMessage),'lastResponse':void 0x0,'toolResults':[],'finalMessage':void 0x0,'sessionDir':typeof _0x33be1d['sessionDir']===_0x34ea01(0x38b,_0xf9c0b8._0x2dcfae,_0xf9c0b8._0x499685,_0xf9c0b8._0x4b8906)?_0x33be1d[_0x2624c4(0x253,0x216,0x217,_0xf9c0b8._0x2aee14)]():_0x33be1d[_0x2624c4(0x1d2,_0xf9c0b8._0x203188,_0xf9c0b8._0x22fdba,_0xf9c0b8._0x2ace8)]},_0x515ff8=makeExtensionContext(_0xa017ce),_0x1861e1={'sessionId':_0xa017ce[_0x2624c4(_0xf9c0b8._0x3df62b,0x269,0x226,_0xf9c0b8._0x83a0d9)],'turnId':_0xa017ce['turnId'],'state':_0xa017ce,'signal':_0x337d39,..._0x33be1d['askUser']?{'askUser':_0x33be1d[_0x2624c4(_0xf9c0b8._0x5cf778,_0xf9c0b8._0x46821b,_0xf9c0b8._0x4dece3,0x28d)]}:{}},{stage:_0x56b0e8,emit:_0x2fc24d,stageUnchecked:_0x40da79,emitUnchecked:_0x502cc8}=makeTurnGuards(_0x337d39,_0x33be1d[_0x2624c4(0x1f2,_0xf9c0b8._0x3eeea3,_0xf9c0b8._0x3ee3ae,_0xf9c0b8._0x1d650f)],_0x33be1d[_0x2624c4(0x2c4,0x278,_0xf9c0b8._0x4666a9,_0xf9c0b8._0x3aa9ca)],_0x515ff8,_0x1861e1),_0x527708=async _0x389e81=>{function _0x142e36(_0x2629f2,_0x523a38,_0x4e7390,_0x773fa5){return _0x2624c4(_0x2629f2-_0xb348a3._0x430a5d,_0x523a38-0x2ba,_0x4e7390-_0xb348a3._0xed7b31,_0x773fa5);}function _0x35f696(_0x105b0e,_0x144a71,_0x4bddd6,_0x17b7c0){return _0x2624c4(_0x105b0e-_0x4136e0._0x214527,_0x17b7c0-_0x4136e0._0x4bd1e0,_0x4bddd6-_0x4136e0._0x451d92,_0x105b0e);}await _0x33be1d[_0x142e36(_0x2ca7b7._0x3289e6,_0x2ca7b7._0x2654f7,0x4ea,0x528)][_0x35f696(0x419,_0x2ca7b7._0x58f502,_0x2ca7b7._0x3ca0e4,0x440)]('afterMessageAppend',structuredClone(_0x389e81),_0x515ff8);};let _0x23fe4e=0x0;function _0x2624c4(_0x201589,_0x556733,_0x1e79fd,_0x35fc6d){return _0x3fa381(_0x556733-0x3b8,_0x35fc6d,_0x1e79fd-0x103,_0x35fc6d-_0x3ee071._0x3a3e3);}try{const _0x54faa5=await _0x56b0e8('onUserMessage',normalizeMessage(_0x4a9f7c[_0x2624c4(_0xf9c0b8._0x3250cf,_0xf9c0b8._0x25048a,_0xf9c0b8._0x49b4e3,_0xf9c0b8._0xe46306)]));_0xa017ce['messages'][_0x2624c4(0x2cd,0x286,0x2b7,0x26b)](_0x54faa5),await _0x527708(_0x54faa5),await _0x2fc24d({'type':_0x2624c4(_0xf9c0b8._0x247e6b,0x1e4,0x209,_0xf9c0b8._0x4f921b),'message':_0x54faa5});while(!![]){throwIfAborted(_0x337d39),_0x23fe4e+=0x1;const _0x3159ed=createAssistantMessageId(_0xa017ce[_0x34ea01(0x322,0x329,_0xf9c0b8._0x21513f,_0xf9c0b8._0x21513f)],_0x23fe4e),_0x4d1149=createReasoningMessageId(_0x3159ed);let _0x1da291={'model':_0x33be1d['chatModel']['model'],'maxTokens':_0x33be1d[_0x34ea01(_0xf9c0b8._0x229a66,0x2c0,_0xf9c0b8._0x10681a,_0xf9c0b8._0x3e6818)][_0x2624c4(0x249,_0xf9c0b8._0x527a38,0x231,0x299)]??0x4000,'system':structuredClone(_0xa017ce[_0x2624c4(0x21c,_0xf9c0b8._0x2e2521,_0xf9c0b8._0x2d3dcf,_0xf9c0b8._0x3808a6)]),'messages':structuredClone(_0xa017ce[_0x2624c4(_0xf9c0b8._0x52879c,0x226,_0xf9c0b8._0xef19c7,0x20f)]),'tools':_0x33be1d[_0x2624c4(0x272,_0xf9c0b8._0x3b73cf,0x235,_0xf9c0b8._0x11cff9)][_0x34ea01(0x366,0x37c,0x34c,0x310)](),'metadata':{'sessionId':_0xa017ce[_0x2624c4(0x26a,_0xf9c0b8._0x1fb7e2,_0xf9c0b8._0x220822,0x29e)],'turnId':_0xa017ce[_0x2624c4(0x20e,_0xf9c0b8._0xbaaf3c,_0xf9c0b8._0xbaaf3c,_0xf9c0b8._0xe027a)]}};_0x1da291=await _0x56b0e8(_0x34ea01(0x365,0x36a,0x399,0x33d),_0x1da291),await _0x2fc24d({'type':_0x2624c4(_0xf9c0b8._0x4aa1e8,0x207,0x1e5,_0xf9c0b8._0xdda31a),'request':_0x1da291});let _0x360d0d=await executeModelRequest(_0x1da291,_0x4a9f7c,_0x33be1d,_0x1861e1,{'assistantMessageId':_0x3159ed,'reasoningMessageId':_0x4d1149});_0x360d0d=await _0x56b0e8('afterModelResponse',_0x360d0d),await _0x2fc24d({'type':_0x34ea01(0x2e7,_0xf9c0b8._0x57b059,0x2c5,_0xf9c0b8._0xdaff16),'response':_0x360d0d}),_0xa017ce[_0x34ea01(0x37e,_0xf9c0b8._0x10aed5,_0xf9c0b8._0x465c2d,0x355)]=_0x360d0d;let _0x4fed5d=await _0x56b0e8('beforeAssistantAppend',withMessageId(responseToAssistantMessage(_0x360d0d),_0x3159ed));_0x4fed5d=withMessageId(_0x4fed5d,_0x3159ed);const _0x20de52=getToolUseBlocks(_0x4fed5d),_0x5dcc19=await Promise['all'](_0x20de52[_0x2624c4(_0xf9c0b8._0x5769fe,0x268,_0xf9c0b8._0x4af765,_0xf9c0b8._0x62430e)](_0x14dc42=>_0x56b0e8(_0x2624c4(0x22f,0x25a,0x2a5,0x289),_0x14dc42)));_0x5dcc19[_0x2624c4(0x276,0x27a,_0xf9c0b8._0x127999,0x24f)]>0x0&&(_0x4fed5d=replaceToolUseBlocks(_0x4fed5d,_0x5dcc19));const _0x10db3d=withMessageId(_0x4fed5d,_0x3159ed);_0x4fed5d=_0x10db3d;const _0x179e0d=createReasoningMessage(_0x4fed5d),_0x33e4a4=createAssistantTextMessage(_0x4fed5d),_0x335c9=createToolUseMessage(_0x4fed5d);_0x179e0d&&await _0x2fc24d({'type':_0x2624c4(0x213,0x24a,0x29a,0x286),'message':withMessageId(_0x179e0d,_0x4d1149)});_0x33e4a4&&await _0x2fc24d({'type':_0x2624c4(_0xf9c0b8._0x2f28ac,0x220,_0xf9c0b8._0x442396,0x1e8),'message':withMessageId(_0x33e4a4,_0x3159ed)});_0x335c9&&await _0x2fc24d({'type':_0x2624c4(_0xf9c0b8._0x5d1a0b,0x256,_0xf9c0b8._0x1d650f,_0xf9c0b8._0x466c9f),'message':withMessageId(_0x335c9,_0x3159ed)});_0xa017ce[_0x2624c4(_0xf9c0b8._0x42c01d,0x226,0x1ed,_0xf9c0b8._0x3d4dbc)]['push'](_0x10db3d);_0x5dcc19[_0x2624c4(0x24a,_0xf9c0b8._0x4c1fea,0x29c,0x258)]>0x0&&await _0x527708(_0x10db3d);for(const _0x62aac5 of _0x5dcc19){await _0x2fc24d({'type':_0x2624c4(0x1e4,0x23a,0x239,_0xf9c0b8._0x8f4ae4),'toolCall':_0x62aac5});}if(_0x5dcc19[_0x34ea01(0x384,0x365,_0xf9c0b8._0x57b059,_0xf9c0b8._0x15ae79)]===0x0){const _0x26d50b=await _0x56b0e8(_0x2624c4(_0xf9c0b8._0xa9894b,0x20b,_0xf9c0b8._0x2d9701,0x1ec),_0x4fed5d),_0x3dfb5f=withMessageId(_0x26d50b,_0x3159ed);return _0xa017ce[_0x34ea01(0x351,_0xf9c0b8._0x1c44b3,_0xf9c0b8._0x533c5a,_0xf9c0b8._0x1167f0)]=_0x3dfb5f,_0xa017ce[_0x2624c4(0x24d,0x226,_0xf9c0b8._0x3660b0,_0xf9c0b8._0x30b1ee)][_0xa017ce[_0x34ea01(_0xf9c0b8._0x2928e7,0x32d,0x2f3,0x32c)]['length']-0x1]=_0x3dfb5f,await _0x527708(_0x3dfb5f),await _0x2fc24d({'type':_0x34ea01(0x340,_0xf9c0b8._0x510da3,0x336,0x339),'message':_0x3dfb5f}),throwIfAborted(_0x337d39),await _0x33be1d[_0x34ea01(_0xf9c0b8._0x3ff38f,0x386,0x357,_0xf9c0b8._0x38a1f4)][_0x2624c4(0x23e,_0xf9c0b8._0x4de9e7,_0xf9c0b8._0x2b8d24,0x249)](_0x34ea01(0x305,_0xf9c0b8._0x36222a,_0xf9c0b8._0x21b4fe,0x2e8),_0xa017ce,_0x515ff8),await _0x2fc24d({'type':_0x34ea01(0x32e,_0xf9c0b8._0x2e0b9c,_0xf9c0b8._0x465f94,0x313),'state':_0xa017ce}),{'status':_0x34ea01(0x389,0x35a,_0xf9c0b8._0x52a98f,_0xf9c0b8._0x3d805b),'finalMessage':_0x3dfb5f,'state':_0xa017ce};}let _0x4f871e=await _0x33be1d['toolRuntime']['executeCalls'](_0x5dcc19,_0x1861e1);const _0x306346=_0x4f871e[_0x34ea01(_0xf9c0b8._0x20aa59,_0xf9c0b8._0x4f4941,_0xf9c0b8._0x2f1485,0x309)](isAbortedToolResult),_0x289a2a=_0x306346?_0x40da79:_0x56b0e8,_0x1f367b=_0x306346?_0x502cc8:_0x2fc24d;_0x4f871e=await Promise[_0x2624c4(0x26b,0x222,_0xf9c0b8._0x25048a,0x262)](_0x4f871e[_0x2624c4(_0xf9c0b8._0x51f3dc,_0xf9c0b8._0x1389fa,_0xf9c0b8._0x5daae3,0x29a)](_0x8c8f07=>_0x289a2a(_0x2624c4(0x24c,0x266,0x2a7,0x260),_0x8c8f07))),_0xa017ce[_0x2624c4(0x1ff,_0xf9c0b8._0x48a10b,_0xf9c0b8._0x33a9ff,0x207)]['push'](..._0x4f871e);for(const _0x224403 of _0x4f871e){await _0x1f367b({'type':_0x34ea01(0x34e,_0xf9c0b8._0x191196,0x3a3,0x352),'result':_0x224403});}const _0x107d0c=await _0x289a2a('beforeToolResultAppend',createToolResultUserMessage(_0x4f871e));await _0x1f367b({'type':_0x34ea01(0x323,0x2ce,_0xf9c0b8._0x10bd79,0x358),'message':_0x107d0c}),_0xa017ce[_0x2624c4(_0xf9c0b8._0x438ed0,_0xf9c0b8._0x3df62b,0x26a,_0xf9c0b8._0x182ff5)][_0x2624c4(0x26c,_0xf9c0b8._0x10330a,0x2c8,0x2c7)](_0x107d0c),await _0x527708(_0x107d0c);if(_0x306346)return{'status':_0x34ea01(_0xf9c0b8._0x557e2b,0x350,0x399,0x38b),'state':_0xa017ce};}}catch(_0x2aa560){if(!_0x337d39[_0x34ea01(0x35a,_0xf9c0b8._0x48960d,_0xf9c0b8._0x1ec2c2,_0xf9c0b8._0x8596eb)])throw _0x2aa560;return{'status':_0x34ea01(_0xf9c0b8._0x2ced8f,_0xf9c0b8._0x1e3de9,0x35a,0x37b),'state':_0xa017ce};}}function createSessionId(){const _0x5316b0={_0x379e4e:0x1eb,_0x2a9381:0x1ba,_0x57bb3a:0x1b8,_0x37e76e:0x170,_0x4ff429:0x1b9,_0x454faf:0x20e,_0x7af98e:0x16f},_0x5240f1={_0x249898:0x9f,_0x4b398a:0xd0},_0xa2c669={_0x1c2338:0x341,_0x1d93fe:0xf6};function _0x9eaebf(_0x8e598f,_0xa6e517,_0x5023d3,_0x19998d){return _0x3fa381(_0x8e598f-_0xa2c669._0x1c2338,_0x5023d3,_0x5023d3-0x1ec,_0x19998d-_0xa2c669._0x1d93fe);}function _0x5a210a(_0x396fa3,_0x443a55,_0x1370d2,_0x1639ab){return _0x3588de(_0x396fa3-_0x5240f1._0x249898,_0x443a55-_0x5240f1._0x4b398a,_0x1639ab- -0x459,_0x1370d2);}return _0x5a210a(_0x5316b0._0x379e4e,_0x5316b0._0x2a9381,_0x5316b0._0x57bb3a,0x1ca)+Date[_0x9eaebf(_0x5316b0._0x37e76e,_0x5316b0._0x4ff429,0x168,0x126)]()+'-'+Math[_0x5a210a(_0x5316b0._0x454faf,0x20e,0x21f,0x1d4)]()[_0x5a210a(0x173,0x1c1,0x1a9,0x182)](0x10)[_0x9eaebf(_0x5316b0._0x7af98e,0x1bb,0x1a6,0x195)](0x2,0xa);}function createTurnId(_0x556f24){const _0x4c5c08={_0x170960:0x53a,_0x5dc811:0x4ce,_0x1ebe76:0x4a2,_0x20f7cd:0x4e7},_0x17742d={_0x183352:0x112};function _0x166bdf(_0x2857f4,_0x32f875,_0x16bb5b,_0x5e13a9){return _0x3588de(_0x2857f4-0xab,_0x32f875-0xb5,_0x5e13a9- -_0x17742d._0x183352,_0x2857f4);}return _0x166bdf(_0x4c5c08._0x170960,_0x4c5c08._0x5dc811,_0x4c5c08._0x1ebe76,_0x4c5c08._0x20f7cd)+_0x556f24;}function createDefaultMessage(_0xa593ab){if(_0xa593ab===void 0x0)return void 0x0;return normalizeUserInput(_0xa593ab);}function normalizeUserInput(_0x32eb38){const _0x53bd8a={_0x46a7c1:0x172,_0x2374a0:0x106,_0x3b15eb:0x25,_0x4ae126:0x7a},_0x408950={_0x5b15a3:0x1ee,_0x1f524f:0x49a},_0x14f820={_0x1a7207:0x19d,_0x3d993c:0x1ea};if(typeof _0x32eb38===_0x1662b3(0x168,_0x53bd8a._0x46a7c1,0x170,0x17d))return{'role':_0x35a859(0x8a,_0x53bd8a._0x2374a0,0xca,0xd8),'content':[{'type':_0x35a859(0x92,_0x53bd8a._0x3b15eb,0x9e,_0x53bd8a._0x4ae126),'text':_0x32eb38}]};function _0x35a859(_0x4d5578,_0x17a972,_0x916e50,_0x741b05){return _0x3588de(_0x4d5578-_0x14f820._0x1a7207,_0x17a972-_0x14f820._0x3d993c,_0x741b05- -0x56f,_0x17a972);}function _0x1662b3(_0x423c69,_0x18d60f,_0x42cdcc,_0x57b332){return _0x3588de(_0x423c69-_0x408950._0x5b15a3,_0x18d60f-0x108,_0x57b332- -_0x408950._0x1f524f,_0x42cdcc);}return normalizeMessage(_0x32eb38);}function resolveChatModel(_0xca71c5){const _0x104b69={_0x514397:0xa7,_0x20917e:0x100,_0x5cbac9:0xee,_0x2e806e:0xf4,_0x203d4b:0xf8,_0x38186f:0xf2,_0x2338a0:0xee},_0x49e6ef={_0x1ae317:0x220,_0x5a1509:0x74},_0x1a60d2={_0x5c9004:0x27,_0xc57a1a:0xbf};function _0x2a3669(_0x1cb30d,_0x3b970f,_0x5944a1,_0x3abd63){return _0x3fa381(_0x3abd63-0x2c1,_0x3b970f,_0x5944a1-_0x1a60d2._0x5c9004,_0x3abd63-_0x1a60d2._0xc57a1a);}function _0x4ee4d5(_0x46c850,_0x493eba,_0x2f127f,_0x50a70c){return _0x3fa381(_0x50a70c-_0x49e6ef._0x1ae317,_0x46c850,_0x2f127f-_0x49e6ef._0x5a1509,_0x50a70c-0x111);}if(!_0xca71c5[_0x2a3669(_0x104b69._0x514397,0xce,_0x104b69._0x20917e,_0x104b69._0x5cbac9)])throw new Error(_0x2a3669(0xd2,0xaf,_0x104b69._0x5cbac9,_0x104b69._0x2e806e));return _0xca71c5[_0x2a3669(0x124,_0x104b69._0x203d4b,_0x104b69._0x38186f,_0x104b69._0x2338a0)];}function createRegistry(_0x505a1b){const _0x968c8b={_0x40765d:0x56f,_0x5cd94f:0x58d,_0x259074:0x4b3,_0x55e22c:0x50e,_0x3e9e10:0x557,_0x187a42:0x59b,_0x4c43e2:0x5cf},_0x32179f={_0x2de31f:0x166};function _0x3d2cf5(_0x23f8c7,_0x77cee6,_0x2f75bd,_0x268215){return _0x3588de(_0x23f8c7-_0x32179f._0x2de31f,_0x77cee6-0x115,_0x77cee6- -0x8c,_0x268215);}if(_0x505a1b[_0x3d2cf5(0x59a,_0x968c8b._0x40765d,0x57c,_0x968c8b._0x5cd94f)])return _0x505a1b[_0x5d0c58(0x4e8,_0x968c8b._0x259074,_0x968c8b._0x55e22c,0x4db)];const _0x4ef5fb=createExtensionRegistry(),_0xfa51b1=_0x505a1b['extensions']??[];for(const _0x25f8ed of _0xfa51b1){_0x4ef5fb[_0x3d2cf5(_0x968c8b._0x3e9e10,_0x968c8b._0x187a42,0x599,_0x968c8b._0x4c43e2)](_0x25f8ed);}function _0x5d0c58(_0x4803a3,_0x156ed2,_0x171408,_0x2fec69){return _0x3fa381(_0x4803a3-0x66f,_0x156ed2,_0x171408-0xf6,_0x2fec69-0x1e9);}return _0x4ef5fb;}var Agent=class{[_0x3588de(0x643,0x5d1,0x5fc,0x643)];['deps'];['metrics'];['sessionId'];[_0x3588de(0x5c8,0x5df,0x5f0,0x61c)];['defaultMessage'];[_0x3fa381(-0x1b8,-0x1dd,-0x190,-0x1af)];constructor(_0x17d649={}){const _0x5887b4={_0x35e951:0x22b,_0x39c71c:0x1dd,_0x283ad3:0x208,_0x5e32a5:0x20f,_0x58c55a:0x23e,_0x5dd6f4:0x5fd,_0x572f90:0x5da,_0x48b8e6:0x5c0,_0x5063c4:0x5fa,_0x503cee:0x245,_0x21bbe5:0x582,_0xc9cb0c:0x5b6,_0x60953e:0x642,_0x3455ab:0x5fb,_0x43d9a5:0x68c,_0x1ce91f:0x1be,_0x350c4b:0x22c,_0x418be2:0x1f7,_0x5a0862:0x640,_0xfcac0c:0x603,_0x256e42:0x5ce,_0x3edd6f:0x607,_0x447876:0x5ab,_0x3caea8:0x21e,_0x166411:0x24b,_0x24f52e:0x1db,_0x204954:0x218,_0x3ed480:0x25b,_0x14c5c5:0x5ec},_0x2c7116={_0x2b882c:0x12c},_0x1fd84c={_0x476bbf:0x4f,_0x59888b:0x1de},_0x57a020={_0x44bf95:0x387,_0x43fe9a:0x32,_0x205086:0x4c},_0x43bae8={_0x4a44d5:0x15,_0x4d22fb:0xda};function _0x53de0a(_0x4964da,_0x28be3f,_0x1d9c6d,_0x169bb7){return _0x3588de(_0x4964da-_0x43bae8._0x4a44d5,_0x28be3f-_0x43bae8._0x4d22fb,_0x4964da-0xc,_0x169bb7);}this[_0x3ad639(0x23c,_0x5887b4._0x35e951,0x238,0x288)]=_0x17d649['sessionId']??createSessionId(),this[_0x3ad639(_0x5887b4._0x39c71c,_0x5887b4._0x283ad3,0x1cf,_0x5887b4._0x5e32a5)]=0x0,this[_0x3ad639(0x1df,_0x5887b4._0x58c55a,0x201,0x1c0)]=_0x17d649[_0x53de0a(_0x5887b4._0x5dd6f4,_0x5887b4._0x572f90,_0x5887b4._0x48b8e6,_0x5887b4._0x5063c4)]??'',this[_0x3ad639(0x1b8,0x1d7,0x1f5,0x1f5)]=(_0x17d649[_0x3ad639(_0x5887b4._0x503cee,0x1f7,0x1f5,0x200)]??[])['map'](normalizeMessage),this['defaultMessage']=createDefaultMessage(_0x17d649[_0x53de0a(0x5b2,0x5fa,_0x5887b4._0x21bbe5,_0x5887b4._0xc9cb0c)]),this[_0x53de0a(_0x5887b4._0x60953e,_0x5887b4._0x3455ab,0x62b,_0x5887b4._0x43d9a5)]=createAgentMetrics({'getContextWindowLimit':_0x17d649[_0x3ad639(0x20e,0x1f4,_0x5887b4._0x1ce91f,0x1c0)]});const _0x4d3c78=_0x17d649[_0x3ad639(_0x5887b4._0x350c4b,0x200,0x247,_0x5887b4._0x418be2)];function _0x3ad639(_0x34018e,_0x56d7fa,_0x1252e1,_0x401e38){return _0x3fa381(_0x1252e1-_0x57a020._0x44bf95,_0x34018e,_0x1252e1-_0x57a020._0x43fe9a,_0x401e38-_0x57a020._0x205086);}const _0x50c466=async(_0x49de31,_0x2f64a7)=>{this['metrics'][_0x307259(0x180,_0x2c7116._0x2b882c,0x14e,0xea)](_0x49de31);function _0x307259(_0x2bed14,_0x3ecda4,_0x3ffba1,_0x162de5){return _0x53de0a(_0x3ecda4- -0x489,_0x3ecda4-_0x1fd84c._0x476bbf,_0x3ffba1-_0x1fd84c._0x59888b,_0x2bed14);}await _0x4d3c78?.(_0x49de31,_0x2f64a7);},_0x365830=createInternalToolRuntime(_0x17d649[_0x53de0a(_0x5887b4._0x5a0862,_0x5887b4._0xfcac0c,0x689,0x624)]??[],{'onEvent':_0x50c466,'onToolCall':_0x17d649[_0x53de0a(_0x5887b4._0x256e42,_0x5887b4._0x3edd6f,0x586,_0x5887b4._0x447876)]});this[_0x3ad639(_0x5887b4._0x3caea8,0x228,_0x5887b4._0x166411,0x21e)]={'registry':createRegistry(_0x17d649),'chatModel':resolveChatModel(_0x17d649),'toolRuntime':_0x365830,'askUser':_0x17d649[_0x3ad639(_0x5887b4._0x24f52e,0x218,_0x5887b4._0x204954,_0x5887b4._0x3ed480)],'onEvent':_0x50c466,'sessionDir':_0x17d649[_0x53de0a(_0x5887b4._0x14c5c5,0x5f7,0x5c0,0x5f1)]};}get[_0x3fa381(-0x191,-0x1a9,-0x14f,-0x1b2)](){return this['_systemPrompt'];}['setTools'](_0x36b0f8=[]){const _0x2e616a={_0x5ae310:0xfa,_0x3b8dc2:0xb6},_0x453f4b={_0x189e7d:0xf4};function _0x2a53de(_0x320a25,_0x3de489,_0x12ac79,_0x5d55a0){return _0x3588de(_0x320a25-0x1a0,_0x3de489-_0x453f4b._0x189e7d,_0x3de489- -0x508,_0x5d55a0);}this['deps']['toolRuntime'][_0x2a53de(0x135,_0x2e616a._0x5ae310,_0x2e616a._0x3b8dc2,0xdd)](_0x36b0f8);}[_0x3588de(0x5e0,0x5f2,0x61d,0x5d3)](_0xb2ccc1,_0x20254f={}){const _0x2b9a9e={_0x337990:0xf7,_0xc94ebe:0x101,_0x2204f1:0x332,_0x3fe464:0x337,_0x442a5a:0x31a},_0x190f20={_0x4bc9d8:0x74,_0x4001ff:0xb7,_0x14a420:0x54a},_0x3dd3b0={_0x1a61fd:0x4d2,_0x4960e3:0x169};function _0x41a7b6(_0xe75f50,_0x36c239,_0x3cb036,_0xc9279){return _0x3fa381(_0xe75f50-_0x3dd3b0._0x1a61fd,_0x36c239,_0x3cb036-0x11c,_0xc9279-_0x3dd3b0._0x4960e3);}this[_0x3bb401(_0x2b9a9e._0x337990,_0x2b9a9e._0xc94ebe,0x92,0xb2)]=_0xb2ccc1;function _0x3bb401(_0x28802b,_0x2d0219,_0x15a761,_0x22f174){return _0x3588de(_0x28802b-_0x190f20._0x4bc9d8,_0x2d0219-_0x190f20._0x4001ff,_0x22f174- -_0x190f20._0x14a420,_0x28802b);}_0x20254f['resetMessages']===!![]&&(this[_0x41a7b6(0x340,_0x2b9a9e._0x2204f1,_0x2b9a9e._0x3fe464,0x368)]=[],this[_0x41a7b6(_0x2b9a9e._0x442a5a,0x32b,0x35a,0x358)]=0x0);}['setSessionId'](_0x4f9d08){const _0x1dc9a7={_0x311912:0x51f};function _0x148c92(_0xadadb9,_0x4db31a,_0x570517,_0x140ea3){return _0x3588de(_0xadadb9-0x1e6,_0x4db31a-0x1f0,_0x140ea3- -0x148,_0x570517);}this[_0x148c92(0x495,_0x1dc9a7._0x311912,0x53e,0x4eb)]=_0x4f9d08;}[_0x3fa381(-0x19d,-0x195,-0x175,-0x195)](_0x13ad81){const _0x26e962={_0x57f14c:0x26,_0x7a31b1:0x63,_0x38c5bc:0x2e,_0x52eb6f:0x81},_0x1a630f={_0x5f0f4d:0x162},_0x2e11ce={_0xf74b0a:0x25b,_0x4d4cb6:0xf};function _0x200191(_0x58543a,_0x36d448,_0xba34da,_0x4e1457){return _0x3fa381(_0x4e1457-_0x2e11ce._0xf74b0a,_0x58543a,_0xba34da-0x129,_0x4e1457-_0x2e11ce._0x4d4cb6);}function _0x49786c(_0x16b6f5,_0x38b921,_0x3b36cb,_0x4de92d){return _0x3fa381(_0x38b921-_0x1a630f._0x5f0f4d,_0x3b36cb,_0x3b36cb-0x1f2,_0x4de92d-0x19c);}this[_0x49786c(0x74,_0x26e962._0x57f14c,_0x26e962._0x7a31b1,-_0x26e962._0x38c5bc)][_0x200191(_0x26e962._0x52eb6f,0x88,0x38,0x88)]=_0x13ad81;}async[_0x3588de(0x5bd,0x570,0x5b6,0x59c)](_0x57d9da=this[_0x3588de(0x5e6,0x61b,0x63b,0x643)],_0x15ad86={}){const _0x19ca0c={_0x579855:0x398,_0x1e4bf8:0x36b,_0x49d874:0x370,_0x9eba59:0x38c,_0x21beff:0x398,_0x4d3ffe:0x36d,_0x5778d8:0x393,_0x59d56d:0x38f,_0x47befc:0x357,_0xc75110:0x3bf,_0x25582c:0x3f9,_0x21ce40:0x375,_0x504070:0x422,_0x48ab87:0x3a5,_0xf0612:0x403,_0x4f0d99:0x390,_0x5d6f1d:0x36c,_0x27d614:0x394,_0x1ac86a:0x369},_0x105eac={_0x5ad50f:0x551},_0x1ca347={_0x43dd8e:0x1da};function _0x61d5d5(_0x194af0,_0x2c0d4e,_0x3d12ba,_0x21f1b8){return _0x3588de(_0x194af0-_0x1ca347._0x43dd8e,_0x2c0d4e-0x16,_0x2c0d4e- -0x2a7,_0x21f1b8);}if(!_0x57d9da)throw new Error(_0x61d5d5(0x371,0x37a,0x3cd,_0x19ca0c._0x579855));function _0x45142a(_0x18decb,_0x1659bb,_0x21d5af,_0xdca8d7){return _0x3fa381(_0x18decb-_0x105eac._0x5ad50f,_0xdca8d7,_0x21d5af-0x105,_0xdca8d7-0xaf);}this[_0x45142a(0x399,_0x19ca0c._0x1e4bf8,_0x19ca0c._0x49d874,0x381)]+=0x1;const _0x33d041=await runTurn({'sessionId':this[_0x61d5d5(0x377,_0x19ca0c._0x9eba59,0x3d0,0x3b1)],'turnId':createTurnId(this[_0x61d5d5(0x354,0x323,_0x19ca0c._0x1e4bf8,0x346)]),'streaming':_0x15ad86[_0x61d5d5(0x3b5,_0x19ca0c._0x21beff,_0x19ca0c._0x4d3ffe,_0x19ca0c._0x5778d8)],'signal':_0x15ad86[_0x45142a(0x389,_0x19ca0c._0x59d56d,0x37f,_0x19ca0c._0x47befc)],'system':this[_0x45142a(0x3c0,0x3d0,0x36c,0x378)],'messages':this[_0x45142a(_0x19ca0c._0xc75110,_0x19ca0c._0x25582c,_0x19ca0c._0x21ce40,0x3f8)],'message':normalizeUserInput(_0x57d9da)},this[_0x45142a(0x415,_0x19ca0c._0x504070,0x41a,0x3d2)]);return this[_0x45142a(_0x19ca0c._0xc75110,_0x19ca0c._0x48ab87,0x37c,_0x19ca0c._0xf0612)]=_0x33d041[_0x45142a(_0x19ca0c._0x4f0d99,0x38c,0x369,_0x19ca0c._0x5d6f1d)][_0x61d5d5(_0x19ca0c._0x27d614,0x349,0x36a,_0x19ca0c._0x1ac86a)][_0x61d5d5(0x36d,0x38b,0x370,0x33d)](normalizeMessage),_0x33d041;}};export{normalizeToolOutputValue,createToolOutput,ToolExecutionError,defineTool,ToolRegistry,validateToolInput,deriveFinalToolOutput,createInternalToolRuntime,createExtensionRegistry,createAgentMetrics,runTurn,Agent};
@@ -0,0 +1 @@
1
+ (function(_0x5b2190,_0x2e7193){const _0x1bea76={_0x5d5065:0x180,_0x3f6b8a:0x190,_0x2b3c1e:0x186,_0xa8bf9d:0x160,_0x16fe88:0x163,_0x4d988c:0x18e,_0x1599ef:0x1a5,_0x4c0388:0x19e,_0x2b1bfb:0x15f,_0x2afb6e:0x159,_0x53aaf7:0x14f,_0x2e440b:0x2fd,_0x525fa9:0x2f1,_0x511aeb:0x2e6,_0x5dc205:0x2fe,_0x2bd995:0x17b,_0x9cbd7c:0x174,_0x2602e8:0x18b,_0x4aa72a:0x2b8,_0x1115d9:0x2a9,_0x32a49a:0x2de,_0x265837:0x2c8,_0x284437:0x2f1,_0x4c4956:0x2cc,_0x1e1507:0x166},_0xe64105={_0x19643e:0xcb},_0xdb819a={_0x1ce87a:0x95},_0x5e75ee=_0x5b2190();function _0x226c59(_0x2ae031,_0x488c0b,_0x1362e3,_0x37fa03){return _0x12e5(_0x2ae031- -_0xdb819a._0x1ce87a,_0x1362e3);}function _0x21b97b(_0x36fbfc,_0x5ae596,_0x181d37,_0x2c7cae){return _0x12e5(_0x5ae596-_0xe64105._0x19643e,_0x36fbfc);}while(!![]){try{const _0x5d0aa8=-parseInt(_0x226c59(_0x1bea76._0x5d5065,0x193,_0x1bea76._0x3f6b8a,_0x1bea76._0x2b3c1e))/0x1*(-parseInt(_0x226c59(_0x1bea76._0xa8bf9d,0x177,_0x1bea76._0x16fe88,0x145))/0x2)+-parseInt(_0x226c59(_0x1bea76._0x4d988c,_0x1bea76._0x1599ef,0x182,_0x1bea76._0x4c0388))/0x3*(-parseInt(_0x226c59(_0x1bea76._0x2b1bfb,0x15e,_0x1bea76._0x2afb6e,_0x1bea76._0x53aaf7))/0x4)+-parseInt(_0x21b97b(0x2e6,0x2e8,_0x1bea76._0x2e440b,_0x1bea76._0x525fa9))/0x5*(-parseInt(_0x21b97b(0x2d4,_0x1bea76._0x511aeb,0x2d2,_0x1bea76._0x5dc205))/0x6)+parseInt(_0x226c59(0x177,0x175,_0x1bea76._0x2bd995,0x183))/0x7*(parseInt(_0x226c59(_0x1bea76._0x9cbd7c,0x182,_0x1bea76._0x2602e8,0x16b))/0x8)+-parseInt(_0x21b97b(_0x1bea76._0x4aa72a,0x2bd,0x2b0,_0x1bea76._0x1115d9))/0x9+parseInt(_0x21b97b(0x2f5,_0x1bea76._0x32a49a,_0x1bea76._0x265837,_0x1bea76._0x284437))/0xa+-parseInt(_0x21b97b(0x2d0,_0x1bea76._0x4c4956,0x2d9,0x2c4))/0xb*(parseInt(_0x226c59(0x17f,_0x1bea76._0x1e1507,0x189,0x18f))/0xc);if(_0x5d0aa8===_0x2e7193)break;else _0x5e75ee['push'](_0x5e75ee['shift']());}catch(_0x11ab34){_0x5e75ee['push'](_0x5e75ee['shift']());}}}(_0x4487,0xcc906));function _0x4487(){const _0xa55898=['Dg9VBf91C2u','CM9Szq','sw1Hz2uGCMv0DxjUzwqGyNKGvMLLD0zPBguGzM9YihrVB2WGCMvZDwX0ia','C3LZDgvT','C291CMnL','y29UDgvUDa','ntK3mJyWBeTdAgD4','otqZnZC0ohjnqMfeEa','mNnbB2nPBG','Dgv4Da','CMvHC29UAw5N','zMLSDgvY','DhjPBq','AxnbCNjHEq','nJbKq0Xmzwy','C3bSAwnL','mJiYnZm1yMjcrfvH','BMfTzq','Bwf4vg9Rzw5Z','zwzMB3j0','ChjVDMLKzxjtDgf0zq','C3rYAw5NAwz5','m0nTsgTOza','C3vTBwfYEq','DxnLCI12AxnPyMXL','DxnLCG','zNvUy3rPB24','ChvZAa','C3rYAw5N','CMvHC29UAw5NlMvUy3j5ChrLzf9JB250zw50','zNvUy3rPB25Fy2fSBf9VDxrWDxq','zgf0ytO','mta1ntC4mtb1y29HvKy','AM9PBG','nJuYode2nff6uKHRva','mtG1nta0wLbgtvDS','DhLWzq','Aw5WDxrFAw1Hz2u','yMfZzty0','Dg9VBf91C2vFAwq','B3bLBMfPuMvZCg9UC2vZt3v0Chv0','BwvKAwfFDhLWzq','Aw5JBhvKzuvUy3j5ChrLzenVBNrLBNq','Aw5WDxq','vg9VBcbYzxr1CM5LzcbPBwfNzsbJB250zw50lG','zgf0yq','BwvZC2fNzxm','mJjhsvPOAxO','Dg9VBf9Yzxn1Bhq','B2jQzwn0','BwfW','Bw9KzwW','A2v5CW','Aw5WDxrFDgv4Da','BgvUz3rO','oeP5whHLqW','Aw1Hz2u','zgvZy3jPChrPB24','odGYodqWn1PRt2LXrW'];_0x4487=function(){return _0xa55898;};return _0x4487();}import{resolveOpenAiReasoningConfig}from'./chunk-NYZR4XKO.js';import{normalizeContent}from'./chunk-G2FR4UGO.js';function systemToInstructions(_0x5d363a){const _0x2af792={_0x59e9e7:0x1ee,_0xc068de:0x1dd,_0x23eb79:0x1d9,_0x33f50d:0x1d7},_0xba98fc={_0x172b77:0x2d1};function _0x4dfd41(_0x464634,_0x43fa83,_0x5386e9,_0x26cda7){return _0x12e5(_0x5386e9- -_0xba98fc._0x172b77,_0x26cda7);}function _0x4a60fe(_0x346ce3,_0x3bda6c,_0xbec7d9,_0x42d1a4){return _0x12e5(_0x346ce3- -0x2a,_0x42d1a4);}return normalizeContent(_0x5d363a)[_0x4a60fe(_0x2af792._0x59e9e7,_0x2af792._0xc068de,_0x2af792._0x23eb79,_0x2af792._0x33f50d)](_0x4ae85f=>_0x4ae85f[_0x4a60fe(0x1cc,0x1df,0x1d5,0x1e0)]===_0x4a60fe(0x1ec,0x1dc,0x1df,0x1ea))[_0x4dfd41(-0xd9,-0xba,-0xcd,-0xc8)](_0x59bbbb=>_0x59bbbb[_0x4dfd41(-0xb8,-0xc6,-0xbb,-0xc5)])['join']('\x0a\x0a');}function pushUserContentMessage(_0x305e30,_0x3526ad,_0x43e0de){const _0x17cbad={_0xd3a00f:0x230,_0x5a3e56:0x221,_0x538128:0x230},_0x5464e8={_0xe242f2:0x7};function _0x1c821d(_0x423e92,_0x195f6c,_0xeaeccf,_0x411c1b){return _0x12e5(_0x195f6c- -_0x5464e8._0xe242f2,_0xeaeccf);}if(_0x43e0de['length']===0x0)return;_0x305e30[_0x1c821d(_0x17cbad._0xd3a00f,_0x17cbad._0x5a3e56,0x22c,_0x17cbad._0x538128)]({'type':'message','role':_0x3526ad,'content':_0x43e0de});}function hasSerializableToolUse(_0x43f6b9){const _0x40cbb6={_0x6067:0x5b3,_0x247a80:0x59c,_0x358954:0x58d,_0x224374:0x593,_0x4e4d8b:0x5b9,_0x5a3e41:0x5a3,_0x4879ee:0x56c,_0x58f34e:0x586,_0x507722:0x58a},_0x5cfd59={_0x5ee442:0x213},_0x435477={_0x135baf:0x37e};function _0x5b31c5(_0x42f847,_0x5192ef,_0xe032d8,_0x24a280){return _0x12e5(_0xe032d8-_0x435477._0x135baf,_0x24a280);}function _0x35be27(_0xe8674a,_0x1d70c8,_0x2dd8f7,_0x1c0aea){return _0x12e5(_0x1d70c8- -_0x5cfd59._0x5ee442,_0x2dd8f7);}return _0x43f6b9['id'][_0x5b31c5(_0x40cbb6._0x6067,_0x40cbb6._0x247a80,0x597,0x5a6)]()[_0x5b31c5(0x58d,_0x40cbb6._0x358954,0x586,0x577)]>0x0&&_0x43f6b9[_0x5b31c5(_0x40cbb6._0x224374,_0x40cbb6._0x4e4d8b,0x59c,_0x40cbb6._0x5a3e41)]['trim']()[_0x5b31c5(0x575,_0x40cbb6._0x4879ee,_0x40cbb6._0x58f34e,_0x40cbb6._0x507722)]>0x0;}function hasSerializableToolResult(_0x4a370e){const _0x5e997f={_0x2c270d:0x45a,_0x4764e8:0x42c},_0x468ce3={_0x372867:0x23c};function _0x1f5880(_0x4b1b9b,_0x3f8005,_0x580d76,_0x57d445){return _0x12e5(_0x3f8005-_0x468ce3._0x372867,_0x580d76);}return _0x4a370e['tool_use_id']['trim']()[_0x1f5880(_0x5e997f._0x2c270d,0x444,0x439,_0x5e997f._0x4764e8)]>0x0;}function isResponseInputObject(_0x5d9868){const _0x58686f={_0x95cb6f:0x499,_0x18ef5c:0x47e,_0x26d76a:0x226,_0x10d671:0x22d,_0x341c1b:0x211,_0x17824b:0x202,_0x31c217:0x473},_0x1b2c98={_0x27a2de:0x27b};function _0x489062(_0x43e478,_0x188d15,_0x48f748,_0xad7adf){return _0x12e5(_0x48f748-_0x1b2c98._0x27a2de,_0xad7adf);}function _0x5096aa(_0x142f69,_0x490ab5,_0x1f8d67,_0x2d9b66){return _0x12e5(_0x2d9b66-0x13,_0x142f69);}if(typeof _0x5d9868!==_0x489062(_0x58686f._0x95cb6f,0x491,_0x58686f._0x18ef5c,0x47f)||_0x5d9868===null||Array[_0x5096aa(0x23e,_0x58686f._0x26d76a,0x249,_0x58686f._0x10d671)](_0x5d9868))return![];const _0xbacc60=_0x5d9868;return typeof _0xbacc60[_0x5096aa(0x1f0,_0x58686f._0x341c1b,_0x58686f._0x17824b,0x209)]===_0x489062(_0x58686f._0x31c217,0x456,0x469,0x44b);}function isImageToolResultBlock(_0x1cecf3){const _0x31b861={_0x2f77a0:0x187,_0x20fdc6:0x19f,_0x248962:0x18a,_0x301db1:0x180,_0x57ecc6:0x16f,_0x5ef364:0x229,_0x4ca383:0x23f,_0x1296bb:0x1b6,_0x39ec61:0x246,_0x2a5ff4:0x237,_0x3d0ca0:0x244,_0x10579b:0x1b1,_0x12e26d:0x19a,_0x50de9e:0x198,_0x473995:0x237,_0x35076d:0x223,_0x4185c5:0x22b,_0x272a56:0x23e,_0x587aa0:0x244,_0xe9645d:0x192,_0x5ec2e2:0x189,_0x31175b:0x196,_0x1f751a:0x1a9},_0x2cb1bc={_0x421784:0x33},_0x3f6e90={_0xd2b65:0x395};if(typeof _0x1cecf3!=='object'||_0x1cecf3===null||Array[_0x53e784(-0x160,-0x18e,-0x17b,-0x17c)](_0x1cecf3))return![];function _0x53e784(_0x4e97f6,_0x1bd4f4,_0x178aee,_0x584245){return _0x12e5(_0x178aee- -_0x3f6e90._0xd2b65,_0x1bd4f4);}function _0x3daccd(_0x3bcf06,_0x41f538,_0x48fb05,_0x2f477e){return _0x12e5(_0x48fb05-_0x2cb1bc._0x421784,_0x3bcf06);}const _0x55da23=_0x1cecf3;return _0x55da23[_0x53e784(-_0x31b861._0x2f77a0,-0x18a,-_0x31b861._0x20fdc6,-_0x31b861._0x248962)]===_0x53e784(-_0x31b861._0x301db1,-0x1a1,-0x18b,-_0x31b861._0x57ecc6)&&_0x55da23['source']?.[_0x3daccd(0x223,0x233,_0x31b861._0x5ef364,_0x31b861._0x4ca383)]===_0x53e784(-0x1bb,-_0x31b861._0x1296bb,-0x19d,-0x1b1)&&typeof _0x55da23[_0x3daccd(_0x31b861._0x39ec61,_0x31b861._0x2a5ff4,_0x31b861._0x3d0ca0,0x260)][_0x53e784(-_0x31b861._0x10579b,-0x1b7,-_0x31b861._0x12e26d,-_0x31b861._0x50de9e)]===_0x3daccd(_0x31b861._0x473995,_0x31b861._0x35076d,0x221,0x207)&&typeof _0x55da23[_0x3daccd(_0x31b861._0x4185c5,_0x31b861._0x272a56,_0x31b861._0x587aa0,0x236)][_0x53e784(-_0x31b861._0xe9645d,-_0x31b861._0x5ec2e2,-_0x31b861._0x31175b,-0x19a)]===_0x53e784(-_0x31b861._0x1f751a,-_0x31b861._0x5ec2e2,-0x1a7,-0x19a);}function _0x12e5(_0xfad092,_0x47d513){_0xfad092=_0xfad092-0x1ee;const _0x44872e=_0x4487();let _0x12e589=_0x44872e[_0xfad092];if(_0x12e5['DCWUDP']===undefined){var _0x128cd5=function(_0x4040cd){const _0x5ad65c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5d363a='',_0x4ae85f='';for(let _0x59bbbb=0x0,_0x305e30,_0x3526ad,_0x43e0de=0x0;_0x3526ad=_0x4040cd['charAt'](_0x43e0de++);~_0x3526ad&&(_0x305e30=_0x59bbbb%0x4?_0x305e30*0x40+_0x3526ad:_0x3526ad,_0x59bbbb++%0x4)?_0x5d363a+=String['fromCharCode'](0xff&_0x305e30>>(-0x2*_0x59bbbb&0x6)):0x0){_0x3526ad=_0x5ad65c['indexOf'](_0x3526ad);}for(let _0x43f6b9=0x0,_0x4a370e=_0x5d363a['length'];_0x43f6b9<_0x4a370e;_0x43f6b9++){_0x4ae85f+='%'+('00'+_0x5d363a['charCodeAt'](_0x43f6b9)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4ae85f);};_0x12e5['LRnWUC']=_0x128cd5,_0x12e5['sJvwgw']={},_0x12e5['DCWUDP']=!![];}const _0x1fb913=_0x44872e[0x0],_0x5714cb=_0xfad092+_0x1fb913,_0x4ae2f3=_0x12e5['sJvwgw'][_0x5714cb];return!_0x4ae2f3?(_0x12e589=_0x12e5['LRnWUC'](_0x12e589),_0x12e5['sJvwgw'][_0x5714cb]=_0x12e589):_0x12e589=_0x4ae2f3,_0x12e589;}function getToolResultText(_0x2ff404){const _0x4fbb37={_0x55e990:0x1ad,_0x102fa7:0x190,_0x2a0cd5:0x175,_0x151caa:0x162,_0x67188c:0x17c,_0x3c8c97:0x1ad,_0x4874b5:0x1a0,_0x425471:0x15f,_0x127fe5:0x172,_0x48d7ee:0x176},_0x555b09={_0x1a42ae:0x35d},_0x1602e3={_0x14af9e:0x2d2,_0x3dad59:0x2b4,_0x7d707c:0x2ba},_0x4cf6d5={_0x4e4bae:0x18f};function _0x2884ba(_0x11e149,_0x43b7de,_0x375229,_0x4f2c13){return _0x12e5(_0x4f2c13- -0x88,_0x375229);}if(typeof _0x2ff404==='string')return _0x2ff404;const _0x2a17b9=_0x2ff404[_0x2884ba(0x19b,0x185,_0x4fbb37._0x55e990,_0x4fbb37._0x102fa7)](_0x453068=>{const _0x188054={_0x4e9d06:0xb0};function _0x562229(_0xbe2410,_0x493d0e,_0x1536b8,_0x5fcae7){return _0x2884ba(_0xbe2410-0xec,_0x493d0e-_0x4cf6d5._0x4e4bae,_0x1536b8,_0x493d0e-0x146);}function _0x184990(_0x5868d6,_0x586227,_0x2f824f,_0x330242){return _0x2884ba(_0x5868d6-0x19,_0x586227-_0x188054._0x4e9d06,_0x5868d6,_0x2f824f- -0x97);}return typeof _0x453068===_0x184990(0xd5,0xc7,0xe4,0xe3)&&_0x453068!==null&&_0x453068[_0x562229(_0x1602e3._0x14af9e,_0x1602e3._0x3dad59,_0x1602e3._0x7d707c,0x29c)]===_0x184990(0x104,0xf4,0xf7,0xe1);})[_0x2884ba(_0x4fbb37._0x2a0cd5,0x176,_0x4fbb37._0x151caa,_0x4fbb37._0x67188c)](_0x1f60ed=>_0x1f60ed['text'])[_0x426a56(0x53b,0x55e,0x53a,0x550)]('\x0a\x0a')[_0x2884ba(_0x4fbb37._0x3c8c97,0x181,_0x4fbb37._0x4874b5,0x191)]();function _0x426a56(_0x376fe5,_0x1a6d25,_0x3ab8dc,_0x5842e6){return _0x12e5(_0x5842e6-_0x555b09._0x1a42ae,_0x1a6d25);}return _0x2a17b9['length']>0x0?_0x2a17b9:_0x2884ba(_0x4fbb37._0x425471,0x17c,_0x4fbb37._0x127fe5,_0x4fbb37._0x48d7ee);}function getToolResultImages(_0x5a2737){const _0xa19a07={_0x14b944:0x270};function _0x3d490f(_0x422e53,_0x443e69,_0x43d58d,_0x436232){return _0x12e5(_0x43d58d- -_0xa19a07._0x14b944,_0x422e53);}return Array['isArray'](_0x5a2737)?_0x5a2737[_0x3d490f(-0x72,-0x3c,-0x58,-0x68)](isImageToolResultBlock):[];}function resolveReasoningVisibility(_0x2b559a){const _0x266ca8={_0x407ab7:0x479,_0x38c8d9:0x462};function _0x30b0d0(_0x3c4fbd,_0x43e734,_0x4e7515,_0x27ddee){return _0x12e5(_0x4e7515-0x23d,_0x43e734);}return _0x2b559a['reasoning']?.['visibility']??_0x30b0d0(_0x266ca8._0x407ab7,0x459,_0x266ca8._0x38c8d9,0x46b);}function createOpenAiResponsesReasoning(_0x1ec910){const _0x5f4409={_0x49d3b5:0x444,_0x50071f:0x443,_0x270554:0x48a,_0x27703b:0x45e,_0x2ce4a9:0x451,_0x546752:0x46d,_0x339643:0x49f,_0x1d7ab1:0x493,_0x2beb9f:0x486,_0x197af2:0x497,_0xf96b61:0x47e,_0x41924d:0x486,_0x42b6f5:0x47f,_0x267361:0x48a,_0xe90c48:0x43e,_0x30dcb5:0x428,_0x416f70:0x455,_0xb0ab05:0x474,_0x1636d6:0x466},_0x4993ed={_0x540677:0x266};function _0x120f97(_0x5bece5,_0x151435,_0x35fb8e,_0x1d96ae){return _0x12e5(_0x35fb8e-0x22c,_0x1d96ae);}const _0x4e133a=resolveOpenAiReasoningConfig(_0x1ec910[_0x120f97(0x438,_0x5f4409._0x49d3b5,_0x5f4409._0x50071f,0x451)]);function _0x28c0bf(_0x39fddd,_0x5350ed,_0x120de2,_0x3e06b0){return _0x12e5(_0x3e06b0-_0x4993ed._0x540677,_0x120de2);}if(!_0x4e133a)return{};const _0x38afcd={},_0x354e58=_0x4e133a[_0x28c0bf(0x4a3,0x483,0x484,_0x5f4409._0x270554)]??(resolveReasoningVisibility(_0x1ec910)===_0x120f97(0x46c,_0x5f4409._0x27703b,_0x5f4409._0x2ce4a9,_0x5f4409._0x546752)?'auto':void 0x0);return _0x4e133a[_0x28c0bf(_0x5f4409._0x339643,0x487,_0x5f4409._0x1d7ab1,_0x5f4409._0x2beb9f)]&&(_0x38afcd[_0x28c0bf(0x488,0x480,_0x5f4409._0x197af2,_0x5f4409._0x2beb9f)]=_0x4e133a[_0x28c0bf(0x475,_0x5f4409._0xf96b61,0x4a0,_0x5f4409._0x41924d)]),_0x354e58&&(_0x38afcd[_0x28c0bf(0x477,_0x5f4409._0x42b6f5,0x488,_0x5f4409._0x267361)]=_0x354e58),{..._0x4e133a[_0x120f97(_0x5f4409._0xe90c48,0x42c,_0x5f4409._0x30dcb5,0x431)]===![]?{}:{'include':[_0x28c0bf(0x445,0x445,0x455,_0x5f4409._0x416f70)]},...Object[_0x28c0bf(_0x5f4409._0xb0ab05,_0x5f4409._0x1636d6,0x477,0x46c)](_0x38afcd)['length']>0x0?{'reasoning':_0x38afcd}:{}};}function pushAssistantProviderState(_0x455580,_0x36d8ad){const _0x352d59={_0xf59184:0x2a9,_0x554ad6:0x277,_0x36e3c0:0x27f,_0x59c76f:0x27f,_0x21e337:0x2a6,_0x58bcf8:0x2b7},_0x8b97f3={_0x5b20:0x60};if(_0x36d8ad['role']!=='assistant')return![];const _0x3f5ccb=_0x36d8ad[_0x22b90f(0x293,_0x352d59._0xf59184,0x2a2,0x2b0)]?.[_0x22b90f(_0x352d59._0x554ad6,0x279,0x26c,0x289)]??[];if(_0x3f5ccb[_0x345bcc(0x268,_0x352d59._0x36e3c0,_0x352d59._0x59c76f,0x276)]===0x0)return![];for(const _0x4d2ccb of _0x3f5ccb){isResponseInputObject(_0x4d2ccb)&&_0x455580[_0x22b90f(0x2a0,0x2cc,_0x352d59._0x21e337,_0x352d59._0x58bcf8)](structuredClone(_0x4d2ccb));}function _0x345bcc(_0x23c18a,_0x512109,_0x534ba5,_0x180b03){return _0x12e5(_0x23c18a-_0x8b97f3._0x5b20,_0x512109);}function _0x22b90f(_0xa9831d,_0x32085c,_0x351fae,_0x350036){return _0x12e5(_0x350036-0x8f,_0x32085c);}return!![];}function toOpenAiResponsesRequest(_0x5e149a){const _0x5807a0={_0x571595:0x517,_0x126e72:0x512,_0x3d2a3c:0x528,_0x77a049:0x535,_0x3e3e9a:0x524,_0x3b654e:0x16f,_0x2b2145:0x183,_0x14de7c:0x187,_0x4ddb84:0x18f,_0x2cb9cc:0x533,_0x5d815a:0x53a,_0x2e99c2:0x53e,_0x12ba99:0x171,_0x3a34cc:0x170,_0x42de5e:0x180,_0x4f10d9:0x520,_0x2fdddc:0x528,_0x4aa598:0x4f6,_0x132fd2:0x508,_0x2ffd54:0x50d,_0x3fac3d:0x51e,_0x31ee48:0x526,_0xf6ce61:0x15d,_0x2f9c04:0x152,_0x1a132e:0x175,_0x3c25d3:0x18a,_0x2d3d13:0x4f4,_0x2a0973:0x4f5,_0x38e842:0x509,_0x1112de:0x523,_0x83bf90:0x178,_0x54da3d:0x176,_0x2c7bbb:0x16b,_0x1dce36:0x193,_0x5a1d55:0x195,_0x47fc9e:0x1b2,_0x4e597f:0x15a,_0x173d76:0x163,_0x5627eb:0x530,_0x3c7141:0x555,_0x5a2bf8:0x51d,_0x4b7750:0x197,_0x4f73aa:0x51e,_0x962fc2:0x520,_0x5b8e72:0x52f,_0x4b2257:0x514,_0x29f819:0x521,_0x46322b:0x19f,_0x154ac4:0x1a1,_0x309e29:0x17f,_0x55d390:0x15e,_0x24f821:0x169,_0x38549f:0x172,_0x47cc67:0x1a7,_0x5c9edf:0x18c,_0x1d413d:0x18b,_0x49f5e8:0x517,_0x4ae106:0x19c,_0x2ee3fc:0x19f,_0x5cb600:0x532,_0x3b3bfc:0x51a,_0x4c111b:0x188,_0xd925d0:0x50b,_0x2c228a:0x4ff,_0x26389e:0x511,_0x2a1eac:0x516,_0x5e0d31:0x516,_0x46491c:0x521,_0x256371:0x53d,_0x3a1cdb:0x516,_0x4f5fc9:0x531,_0xe85e00:0x18f,_0x5f4511:0x1b5,_0x568af5:0x52d,_0x19a7c6:0x4fa},_0x54bdc5={_0x4d43e0:0x2fa},_0xd5b740={_0x61ebf9:0x87};function _0x2cb9db(_0x1107fa,_0x362a30,_0x39b9a8,_0x51bc56){return _0x12e5(_0x51bc56- -_0xd5b740._0x61ebf9,_0x362a30);}const _0x56f49e=[];for(const _0x22820f of _0x5e149a[_0x45630f(_0x5807a0._0x571595,0x519,_0x5807a0._0x126e72,_0x5807a0._0x3d2a3c)]){if(pushAssistantProviderState(_0x56f49e,_0x22820f))continue;const _0x2612c8=[];for(const _0x15f59d of normalizeContent(_0x22820f[_0x45630f(_0x5807a0._0x77a049,0x51e,_0x5807a0._0x3e3e9a,0x52b)])){if(_0x15f59d[_0x2cb9db(0x166,0x16c,0x183,_0x5807a0._0x3b654e)]===_0x2cb9db(0x1a7,_0x5807a0._0x2b2145,_0x5807a0._0x14de7c,_0x5807a0._0x4ddb84)){_0x2612c8[_0x45630f(0x534,_0x5807a0._0x2cb9cc,_0x5807a0._0x5d815a,_0x5807a0._0x2e99c2)]({'type':_0x2cb9db(0x176,_0x5807a0._0x12ba99,_0x5807a0._0x3a34cc,_0x5807a0._0x42de5e),'text':_0x15f59d[_0x45630f(_0x5807a0._0x4f10d9,0x51c,_0x5807a0._0x2fdddc,0x524)]});continue;}if(_0x15f59d[_0x45630f(_0x5807a0._0x4aa598,0x503,_0x5807a0._0x132fd2,_0x5807a0._0x2ffd54)]===_0x45630f(0x51c,0x504,0x51c,0x527)){_0x2612c8[_0x45630f(_0x5807a0._0x3fac3d,_0x5807a0._0x31ee48,_0x5807a0._0x5d815a,0x539)]({'type':_0x2cb9db(0x187,0x17b,_0x5807a0._0x2b2145,_0x5807a0._0x3a34cc),'image_url':_0x2cb9db(_0x5807a0._0xf6ce61,0x164,_0x5807a0._0x2f9c04,0x16a)+_0x15f59d[_0x2cb9db(0x186,_0x5807a0._0x1a132e,0x175,_0x5807a0._0x3c25d3)][_0x45630f(_0x5807a0._0x2d3d13,_0x5807a0._0x2a0973,0x50d,_0x5807a0._0x132fd2)]+';base64,'+_0x15f59d[_0x45630f(0x538,_0x5807a0._0x38e842,_0x5807a0._0x1112de,0x525)][_0x2cb9db(_0x5807a0._0x83bf90,_0x5807a0._0x54da3d,0x17a,_0x5807a0._0x83bf90)]});continue;}pushUserContentMessage(_0x56f49e,_0x22820f[_0x2cb9db(_0x5807a0._0x2c7bbb,_0x5807a0._0x1dce36,0x18e,0x187)],_0x2612c8[_0x2cb9db(0x180,_0x5807a0._0x5a1d55,_0x5807a0._0x47fc9e,0x195)](0x0));if(_0x15f59d[_0x2cb9db(0x152,_0x5807a0._0x4e597f,_0x5807a0._0x173d76,_0x5807a0._0x3b654e)]===_0x45630f(0x532,0x509,0x51f,_0x5807a0._0x5627eb)){if(!hasSerializableToolUse(_0x15f59d))continue;_0x56f49e[_0x45630f(_0x5807a0._0x3c7141,_0x5807a0._0x5a2bf8,0x53a,0x54e)]({'type':'function_call','call_id':_0x15f59d['id'],'name':_0x15f59d[_0x2cb9db(0x17b,0x199,0x1a5,_0x5807a0._0x4b7750)],'arguments':JSON[_0x45630f(0x526,0x536,0x534,0x546)](_0x15f59d[_0x45630f(0x4fb,_0x5807a0._0x4f73aa,0x50f,_0x5807a0._0x962fc2)]??{})});continue;}if(_0x15f59d['type']===_0x45630f(_0x5807a0._0x5b8e72,0x510,_0x5807a0._0x4b2257,_0x5807a0._0x29f819)){if(!hasSerializableToolResult(_0x15f59d))continue;const _0x3092da=getToolResultText(_0x15f59d[_0x2cb9db(0x17e,_0x5807a0._0x46322b,_0x5807a0._0x154ac4,0x18b)]);_0x56f49e[_0x2cb9db(0x1b3,0x186,0x1aa,0x1a1)]({'type':_0x2cb9db(0x173,_0x5807a0._0x309e29,_0x5807a0._0x55d390,_0x5807a0._0x24f821),'call_id':_0x15f59d[_0x2cb9db(0x16f,0x185,0x186,_0x5807a0._0x38549f)],'output':_0x3092da});const _0x514851=getToolResultImages(_0x15f59d[_0x2cb9db(_0x5807a0._0x47cc67,_0x5807a0._0x5c9edf,_0x5807a0._0x47cc67,_0x5807a0._0x1d413d)]);_0x514851[_0x45630f(_0x5807a0._0x3e3e9a,_0x5807a0._0x49f5e8,0x51a,0x52e)]>0x0&&_0x56f49e['push']({'type':'message','role':_0x2cb9db(_0x5807a0._0x4ae106,0x1b0,0x183,_0x5807a0._0x2ee3fc),'content':[{'type':_0x45630f(_0x5807a0._0x5cb600,_0x5807a0._0x3b3bfc,0x519,0x535),'text':_0x2cb9db(0x19f,_0x5807a0._0x38549f,0x17f,_0x5807a0._0x4c111b)+_0x15f59d[_0x45630f(0x4fd,0x50b,_0x5807a0._0xd925d0,_0x5807a0._0x2c228a)]+'.'},..._0x514851[_0x45630f(0x4f8,_0x5807a0._0x26389e,_0x5807a0._0x2a1eac,_0x5807a0._0x5e0d31)](_0x14e422=>({'type':_0x45630f(0x50f,0x50c,0x509,0x50c),'image_url':'data:'+_0x14e422[_0x2cb9db(0x1a0,0x1a2,0x1a0,0x18a)][_0x2cb9db(0x171,0x156,0x192,0x174)]+';base64,'+_0x14e422[_0x45630f(0x534,0x517,0x523,0x517)][_0x2cb9db(0x18d,0x162,0x17e,0x178)]}))]});}}pushUserContentMessage(_0x56f49e,_0x22820f[_0x45630f(0x535,_0x5807a0._0x46491c,_0x5807a0._0x4f10d9,_0x5807a0._0x256371)],_0x2612c8);}function _0x45630f(_0x540be1,_0x13ba4c,_0x4b1ebc,_0x1d10a6){return _0x12e5(_0x4b1ebc-0x312,_0x1d10a6);}return{...createOpenAiResponsesReasoning(_0x5e149a),'model':_0x5e149a[_0x45630f(0x51a,0x50c,0x517,_0x5807a0._0x3a1cdb)],'instructions':systemToInstructions(_0x5e149a[_0x45630f(_0x5807a0._0x4f5fc9,0x52f,0x522,0x530)]),'input':_0x56f49e,'max_output_tokens':_0x5e149a[_0x2cb9db(0x1a6,_0x5807a0._0xe85e00,_0x5807a0._0x5f4511,0x198)],'tools':_0x5e149a['tools'][_0x45630f(0x500,_0x5807a0._0x568af5,0x516,_0x5807a0._0x19a7c6)](_0x320378=>{const _0x1cc905={_0x17d7e3:0x108};function _0xda380(_0x6d27f2,_0x411387,_0x42ffb4,_0x430930){return _0x45630f(_0x6d27f2-_0x1cc905._0x17d7e3,_0x411387-0x16e,_0x42ffb4- -0x172,_0x430930);}function _0x59e608(_0x5ba0ba,_0x2e579b,_0x225214,_0x1f2884){return _0x45630f(_0x5ba0ba-0x4f,_0x2e579b-0x133,_0x225214- -0x237,_0x1f2884);}return{'type':_0x59e608(_0x54bdc5._0x4d43e0,0x316,0x302,0x308),'name':_0x320378['name'],'description':_0x320378[_0xda380(0x3ac,0x3b1,0x3ab,0x397)],'parameters':_0x320378['input_schema']};})};}export{toOpenAiResponsesRequest};