@roxybrowser/openapi 1.0.5-beta.1 → 1.0.7

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.
Files changed (47) hide show
  1. package/README.md +228 -228
  2. package/lib/index.js +93 -1670
  3. package/lib/index.js.map +1 -1
  4. package/lib/modules/account.d.ts +491 -0
  5. package/lib/modules/account.d.ts.map +1 -0
  6. package/lib/modules/account.js +442 -0
  7. package/lib/modules/account.js.map +1 -0
  8. package/lib/modules/browser.d.ts +3011 -0
  9. package/lib/modules/browser.d.ts.map +1 -0
  10. package/lib/modules/browser.js +1076 -0
  11. package/lib/modules/browser.js.map +1 -0
  12. package/lib/modules/other.d.ts +102 -0
  13. package/lib/modules/other.d.ts.map +1 -0
  14. package/lib/modules/other.js +194 -0
  15. package/lib/modules/other.js.map +1 -0
  16. package/lib/modules/proxy.d.ts +576 -0
  17. package/lib/modules/proxy.d.ts.map +1 -0
  18. package/lib/modules/proxy.js +713 -0
  19. package/lib/modules/proxy.js.map +1 -0
  20. package/lib/types.d.ts +860 -155
  21. package/lib/types.d.ts.map +1 -1
  22. package/lib/types.js +4 -4
  23. package/lib/types.js.map +1 -1
  24. package/lib/utils/error-analyzer.d.ts.map +1 -1
  25. package/lib/utils/error-analyzer.js +17 -15
  26. package/lib/utils/error-analyzer.js.map +1 -1
  27. package/lib/utils/index.d.ts +24 -0
  28. package/lib/utils/index.d.ts.map +1 -0
  29. package/lib/utils/index.js +45 -0
  30. package/lib/utils/index.js.map +1 -0
  31. package/package.json +50 -50
  32. package/lib/browser/browser-creator.d.ts +0 -54
  33. package/lib/browser/browser-creator.d.ts.map +0 -1
  34. package/lib/browser/browser-creator.js +0 -263
  35. package/lib/browser/browser-creator.js.map +0 -1
  36. package/lib/proxy/proxy-manager.d.ts +0 -67
  37. package/lib/proxy/proxy-manager.d.ts.map +0 -1
  38. package/lib/proxy/proxy-manager.js +0 -278
  39. package/lib/proxy/proxy-manager.js.map +0 -1
  40. package/lib/proxy/proxy-validator.d.ts +0 -66
  41. package/lib/proxy/proxy-validator.d.ts.map +0 -1
  42. package/lib/proxy/proxy-validator.js +0 -273
  43. package/lib/proxy/proxy-validator.js.map +0 -1
  44. package/lib/roxy-client.d.ts +0 -117
  45. package/lib/roxy-client.d.ts.map +0 -1
  46. package/lib/roxy-client.js +0 -467
  47. package/lib/roxy-client.js.map +0 -1
@@ -1,66 +0,0 @@
1
- /**
2
- * Proxy Validation Utilities
3
- *
4
- * Advanced proxy validation and testing tools for RoxyBrowser MCP
5
- */
6
- import { ProxyInfo } from '../types.js';
7
- import { ProxyValidationResult } from './proxy-manager.js';
8
- export interface ProxyListValidationResult {
9
- validProxies: ProxyInfo[];
10
- invalidProxies: Array<{
11
- proxy: ProxyInfo;
12
- errors: string[];
13
- }>;
14
- totalCount: number;
15
- validCount: number;
16
- invalidCount: number;
17
- summary: string;
18
- }
19
- export interface ProxyBenchmarkResult {
20
- proxy: ProxyInfo;
21
- responseTime: number;
22
- success: boolean;
23
- error?: string;
24
- location?: string;
25
- anonymityLevel?: 'transparent' | 'anonymous' | 'elite';
26
- }
27
- export declare class ProxyValidator {
28
- /**
29
- * Validate a list of proxies
30
- */
31
- static validateProxyList(proxies: ProxyInfo[]): ProxyListValidationResult;
32
- /**
33
- * Parse and validate proxy string in various formats
34
- */
35
- static parseAndValidateProxyString(proxyString: string): {
36
- proxy: ProxyInfo | null;
37
- validation: ProxyValidationResult | null;
38
- error?: string;
39
- };
40
- /**
41
- * Test multiple proxies and rank by performance
42
- */
43
- static benchmarkProxies(proxies: ProxyInfo[], options?: {
44
- timeout?: number;
45
- retries?: number;
46
- testUrl?: string;
47
- }): Promise<ProxyBenchmarkResult[]>;
48
- /**
49
- * Generate proxy health report
50
- */
51
- static generateProxyHealthReport(validationResult: ProxyListValidationResult, benchmarkResults?: ProxyBenchmarkResult[]): string;
52
- /**
53
- * Get proxy recommendations based on use case
54
- */
55
- static getProxyRecommendations(useCase: 'social_media' | 'ecommerce' | 'scraping' | 'general'): {
56
- recommendedTypes: string[];
57
- settings: Partial<ProxyInfo>;
58
- tips: string[];
59
- };
60
- /**
61
- * Private helper methods
62
- */
63
- private static parseAlternativeFormats;
64
- private static simulateProxyTest;
65
- }
66
- //# sourceMappingURL=proxy-validator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"proxy-validator.d.ts","sourceRoot":"","sources":["../../src/proxy/proxy-validator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAgB,qBAAqB,EAAmB,MAAM,oBAAoB,CAAC;AAE1F,MAAM,WAAW,yBAAyB;IACxC,YAAY,EAAE,SAAS,EAAE,CAAC;IAC1B,cAAc,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,SAAS,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAC;IAC9D,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,SAAS,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,aAAa,GAAG,WAAW,GAAG,OAAO,CAAC;CACxD;AAED,qBAAa,cAAc;IACzB;;OAEG;IACH,MAAM,CAAC,iBAAiB,CAAC,OAAO,EAAE,SAAS,EAAE,GAAG,yBAAyB;IA8BzE;;OAEG;IACH,MAAM,CAAC,2BAA2B,CAAC,WAAW,EAAE,MAAM,GAAG;QACvD,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;QACxB,UAAU,EAAE,qBAAqB,GAAG,IAAI,CAAC;QACzC,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB;IA+BD;;OAEG;WACU,gBAAgB,CAC3B,OAAO,EAAE,SAAS,EAAE,EACpB,OAAO,GAAE;QACP,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;KACb,GACL,OAAO,CAAC,oBAAoB,EAAE,CAAC;IAmDlC;;OAEG;IACH,MAAM,CAAC,yBAAyB,CAC9B,gBAAgB,EAAE,yBAAyB,EAC3C,gBAAgB,CAAC,EAAE,oBAAoB,EAAE,GACxC,MAAM;IAiDT;;OAEG;IACH,MAAM,CAAC,uBAAuB,CAAC,OAAO,EAAE,cAAc,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,GAAG;QAC9F,gBAAgB,EAAE,MAAM,EAAE,CAAC;QAC3B,QAAQ,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;QAC7B,IAAI,EAAE,MAAM,EAAE,CAAC;KAChB;IA+DD;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,uBAAuB;mBAmBjB,iBAAiB;CAqCvC"}
@@ -1,273 +0,0 @@
1
- /**
2
- * Proxy Validation Utilities
3
- *
4
- * Advanced proxy validation and testing tools for RoxyBrowser MCP
5
- */
6
- import { ProxyManager } from './proxy-manager.js';
7
- export class ProxyValidator {
8
- /**
9
- * Validate a list of proxies
10
- */
11
- static validateProxyList(proxies) {
12
- const validProxies = [];
13
- const invalidProxies = [];
14
- for (const proxy of proxies) {
15
- const validation = ProxyManager.validateProxy(proxy);
16
- if (validation.valid) {
17
- validProxies.push(proxy);
18
- }
19
- else {
20
- invalidProxies.push({ proxy, errors: validation.errors });
21
- }
22
- }
23
- const validCount = validProxies.length;
24
- const invalidCount = invalidProxies.length;
25
- const totalCount = proxies.length;
26
- const summary = `${validCount}/${totalCount} proxies are valid (${((validCount / totalCount) * 100).toFixed(1)}%)`;
27
- return {
28
- validProxies,
29
- invalidProxies,
30
- totalCount,
31
- validCount,
32
- invalidCount,
33
- summary,
34
- };
35
- }
36
- /**
37
- * Parse and validate proxy string in various formats
38
- */
39
- static parseAndValidateProxyString(proxyString) {
40
- try {
41
- // Try to parse proxy string
42
- const proxy = ProxyManager.parseProxyUrl(proxyString);
43
- if (!proxy) {
44
- // Try alternative formats
45
- const altProxy = this.parseAlternativeFormats(proxyString);
46
- if (!altProxy) {
47
- return {
48
- proxy: null,
49
- validation: null,
50
- error: 'Unable to parse proxy string format',
51
- };
52
- }
53
- const validation = ProxyManager.validateProxy(altProxy);
54
- return { proxy: altProxy, validation };
55
- }
56
- const validation = ProxyManager.validateProxy(proxy);
57
- return { proxy, validation };
58
- }
59
- catch (error) {
60
- return {
61
- proxy: null,
62
- validation: null,
63
- error: error instanceof Error ? error.message : 'Unknown parsing error',
64
- };
65
- }
66
- }
67
- /**
68
- * Test multiple proxies and rank by performance
69
- */
70
- static async benchmarkProxies(proxies, options = {}) {
71
- const { timeout = 10000, retries = 1, testUrl = 'http://httpbin.org/ip' } = options;
72
- const results = [];
73
- for (const proxy of proxies) {
74
- let bestResult = null;
75
- for (let attempt = 0; attempt <= retries; attempt++) {
76
- const startTime = Date.now();
77
- try {
78
- // Simulate proxy test (in real implementation, you'd use actual HTTP requests)
79
- const testResult = await this.simulateProxyTest(proxy, testUrl, timeout);
80
- const responseTime = Date.now() - startTime;
81
- const result = {
82
- proxy,
83
- responseTime,
84
- success: testResult.success,
85
- location: testResult.location,
86
- anonymityLevel: testResult.anonymityLevel,
87
- };
88
- if (!bestResult || (result.success && result.responseTime < bestResult.responseTime)) {
89
- bestResult = result;
90
- }
91
- if (result.success)
92
- break; // Stop retrying on success
93
- }
94
- catch (error) {
95
- bestResult = {
96
- proxy,
97
- responseTime: timeout,
98
- success: false,
99
- error: error instanceof Error ? error.message : 'Test failed',
100
- };
101
- }
102
- }
103
- if (bestResult) {
104
- results.push(bestResult);
105
- }
106
- }
107
- // Sort by success and response time
108
- return results.sort((a, b) => {
109
- if (a.success && !b.success)
110
- return -1;
111
- if (!a.success && b.success)
112
- return 1;
113
- return a.responseTime - b.responseTime;
114
- });
115
- }
116
- /**
117
- * Generate proxy health report
118
- */
119
- static generateProxyHealthReport(validationResult, benchmarkResults) {
120
- let report = `## Proxy Health Report\n\n`;
121
- report += `**Total Proxies:** ${validationResult.totalCount}\n`;
122
- report += `**Valid:** ${validationResult.validCount}\n`;
123
- report += `**Invalid:** ${validationResult.invalidCount}\n`;
124
- report += `**Success Rate:** ${((validationResult.validCount / validationResult.totalCount) * 100).toFixed(1)}%\n\n`;
125
- if (validationResult.invalidCount > 0) {
126
- report += `### ❌ Invalid Proxies (${validationResult.invalidCount})\n\n`;
127
- validationResult.invalidProxies.forEach((invalid, index) => {
128
- const proxy = invalid.proxy;
129
- report += `${index + 1}. **${proxy.host}:${proxy.port}** (${proxy.proxyCategory})\n`;
130
- invalid.errors.forEach(error => {
131
- report += ` • ${error}\n`;
132
- });
133
- report += '\n';
134
- });
135
- }
136
- if (benchmarkResults && benchmarkResults.length > 0) {
137
- report += `### 🚀 Performance Results\n\n`;
138
- const workingProxies = benchmarkResults.filter(r => r.success);
139
- const failedProxies = benchmarkResults.filter(r => !r.success);
140
- if (workingProxies.length > 0) {
141
- report += `**✅ Working Proxies (${workingProxies.length}):**\n\n`;
142
- workingProxies.slice(0, 10).forEach((result, index) => {
143
- report += `${index + 1}. **${result.proxy.host}:${result.proxy.port}** - ${result.responseTime}ms`;
144
- if (result.location)
145
- report += ` (${result.location})`;
146
- if (result.anonymityLevel)
147
- report += ` [${result.anonymityLevel}]`;
148
- report += '\n';
149
- });
150
- report += '\n';
151
- }
152
- if (failedProxies.length > 0) {
153
- report += `**❌ Failed Proxies (${failedProxies.length}):**\n\n`;
154
- failedProxies.slice(0, 5).forEach((result, index) => {
155
- report += `${index + 1}. **${result.proxy.host}:${result.proxy.port}** - ${result.error}\n`;
156
- });
157
- if (failedProxies.length > 5) {
158
- report += `... and ${failedProxies.length - 5} more\n`;
159
- }
160
- }
161
- }
162
- return report;
163
- }
164
- /**
165
- * Get proxy recommendations based on use case
166
- */
167
- static getProxyRecommendations(useCase) {
168
- const recommendations = {
169
- social_media: {
170
- recommendedTypes: ['SOCKS5', 'HTTP'],
171
- settings: {
172
- proxyMethod: 'custom',
173
- ipType: 'IPV4',
174
- checkChannel: 'IP-API',
175
- },
176
- tips: [
177
- 'Use residential proxies for better success rates',
178
- 'Rotate proxies frequently to avoid detection',
179
- 'Ensure proxy location matches target audience',
180
- 'Test proxy anonymity level regularly',
181
- ],
182
- },
183
- ecommerce: {
184
- recommendedTypes: ['HTTP', 'HTTPS'],
185
- settings: {
186
- proxyMethod: 'custom',
187
- ipType: 'IPV4',
188
- checkChannel: 'IPRust.io',
189
- },
190
- tips: [
191
- 'Use dedicated proxies for account security',
192
- 'Prefer HTTPS proxies for sensitive operations',
193
- 'Test proxy stability before bulk operations',
194
- 'Keep proxy sessions long for shopping carts',
195
- ],
196
- },
197
- scraping: {
198
- recommendedTypes: ['SOCKS5', 'HTTP'],
199
- settings: {
200
- proxyMethod: 'custom',
201
- ipType: 'IPV4',
202
- checkChannel: 'IP123.in',
203
- },
204
- tips: [
205
- 'Use high-anonymity proxies',
206
- 'Implement proxy rotation strategy',
207
- 'Monitor proxy ban rates',
208
- 'Use different proxy pools for different sites',
209
- ],
210
- },
211
- general: {
212
- recommendedTypes: ['HTTP', 'SOCKS5'],
213
- settings: {
214
- proxyMethod: 'custom',
215
- ipType: 'IPV4',
216
- checkChannel: 'IP-API',
217
- },
218
- tips: [
219
- 'Test proxy speed and reliability',
220
- 'Use geographically relevant proxies',
221
- 'Keep backup proxies available',
222
- 'Monitor proxy uptime statistics',
223
- ],
224
- },
225
- };
226
- return recommendations[useCase] || recommendations.general;
227
- }
228
- /**
229
- * Private helper methods
230
- */
231
- static parseAlternativeFormats(proxyString) {
232
- // Format: host:port:username:password
233
- const parts = proxyString.split(':');
234
- if (parts.length >= 2) {
235
- const [host, port, username, password] = parts;
236
- return {
237
- proxyMethod: 'custom',
238
- proxyCategory: 'HTTP',
239
- protocol: 'HTTP',
240
- ipType: 'IPV4',
241
- host,
242
- port,
243
- proxyUserName: username,
244
- proxyPassword: password,
245
- };
246
- }
247
- return null;
248
- }
249
- static async simulateProxyTest(proxy, testUrl, timeout) {
250
- // Simulate proxy test with basic validation
251
- const isValid = proxy.host && proxy.port && proxy.proxyCategory !== 'noproxy';
252
- if (!isValid) {
253
- throw new Error('Invalid proxy configuration');
254
- }
255
- // Simulate network delay
256
- await new Promise(resolve => setTimeout(resolve, Math.random() * 1000));
257
- // Simulate success/failure based on proxy configuration quality
258
- const hasAuth = !!(proxy.proxyUserName && proxy.proxyPassword);
259
- const isGoodType = ['SOCKS5', 'HTTPS'].includes(proxy.proxyCategory || '');
260
- const successRate = hasAuth ? 0.9 : 0.7;
261
- const typeBonus = isGoodType ? 0.1 : 0;
262
- const success = Math.random() < (successRate + typeBonus);
263
- if (!success) {
264
- throw new Error('Proxy connection failed');
265
- }
266
- return {
267
- success: true,
268
- location: 'Simulated Location',
269
- anonymityLevel: hasAuth ? 'elite' : 'anonymous',
270
- };
271
- }
272
- }
273
- //# sourceMappingURL=proxy-validator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"proxy-validator.js","sourceRoot":"","sources":["../../src/proxy/proxy-validator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,YAAY,EAA0C,MAAM,oBAAoB,CAAC;AAoB1F,MAAM,OAAO,cAAc;IACzB;;OAEG;IACH,MAAM,CAAC,iBAAiB,CAAC,OAAoB;QAC3C,MAAM,YAAY,GAAgB,EAAE,CAAC;QACrC,MAAM,cAAc,GAAkD,EAAE,CAAC;QAEzE,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;YAC5B,MAAM,UAAU,GAAG,YAAY,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;YAErD,IAAI,UAAU,CAAC,KAAK,EAAE,CAAC;gBACrB,YAAY,CAAC,IAAI,CAA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yBAAyB,CAAC,CAAC;QAC7C,CAAC;QAED,OAAO;YACL,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,oBAAoB;YAC9B,cAAc,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW;SAChD,CAAC;IACJ,CAAC;CACF"}
@@ -1,117 +0,0 @@
1
- /**
2
- * RoxyBrowser API Client
3
- *
4
- * HTTP client for RoxyBrowser REST API with authentication and error handling
5
- */
6
- import { RoxyClientConfig, WorkspaceListResponse, BrowserListResponse, BrowserListParams, BrowserOpenParams, BrowserOpenResult, BrowserCloseParams, BrowserCreateConfig, BrowserCreateBatchResult, AccountListParams, AccountListResponse, LabelItem, ConnectionInfoItem } from "./types.js";
7
- export declare class RoxyClient {
8
- readonly config: Required<RoxyClientConfig>;
9
- constructor(config: RoxyClientConfig);
10
- /**
11
- * Make authenticated HTTP request to RoxyBrowser API
12
- */
13
- private makeRequest;
14
- /**
15
- * Get list of workspaces and projects
16
- */
17
- getWorkspaces(pageIndex?: number, pageSize?: number): Promise<WorkspaceListResponse>;
18
- /**
19
- * Get list of browsers in workspace/project
20
- */
21
- getBrowsers(params: BrowserListParams): Promise<BrowserListResponse>;
22
- /**
23
- * Open a single browser
24
- */
25
- openBrowser(params: BrowserOpenParams): Promise<BrowserOpenResult>;
26
- /**
27
- * Open multiple browsers in batch with enhanced error handling and retry logic
28
- */
29
- openBrowsers(workspaceId: number, dirIds: string[], args?: string[], options?: {
30
- maxRetries?: number;
31
- retryDelay?: number;
32
- }): Promise<{
33
- successes: BrowserOpenResult[];
34
- failures: Array<{
35
- dirId: string;
36
- error: string;
37
- errorCode?: number;
38
- retryable: boolean;
39
- }>;
40
- }>;
41
- /**
42
- * Close a single browser
43
- */
44
- closeBrowser(params: BrowserCloseParams): Promise<void>;
45
- /**
46
- * Close multiple browsers in batch
47
- */
48
- closeBrowsers(dirIds: string[]): Promise<Array<{
49
- dirId: string;
50
- success: boolean;
51
- error?: string;
52
- }>>;
53
- /**
54
- * Create a single browser
55
- */
56
- createBrowser(config: BrowserCreateConfig): Promise<{
57
- dirId: string;
58
- }>;
59
- /**
60
- * Create multiple browsers in batch
61
- */
62
- createBrowsers(configs: BrowserCreateConfig[]): Promise<BrowserCreateBatchResult>;
63
- /**
64
- * Get browser details by ID
65
- */
66
- getBrowserDetail(workspaceId: number, dirId: string): Promise<any>;
67
- /**
68
- * Update/modify existing browser
69
- */
70
- updateBrowser(config: BrowserCreateConfig & {
71
- dirId: string;
72
- }): Promise<void>;
73
- /**
74
- * Delete browsers
75
- */
76
- deleteBrowsers(workspaceId: number, dirIds: string[]): Promise<void>;
77
- /**
78
- * Random fingerprint for browser
79
- */
80
- randomBrowserFingerprint(workspaceId: number, dirId: string): Promise<void>;
81
- /**
82
- * Clear browser local cache
83
- */
84
- clearBrowserLocalCache(dirIds: string[]): Promise<void>;
85
- /**
86
- * Clear browser server cache
87
- */
88
- clearBrowserServerCache(workspaceId: number, dirIds: string[]): Promise<void>;
89
- /**
90
- * Get account list
91
- */
92
- getAccounts(params: AccountListParams): Promise<AccountListResponse>;
93
- /**
94
- * Get label list
95
- */
96
- getLabels(workspaceId: number): Promise<LabelItem[]>;
97
- /**
98
- * Get connection info for opened browsers
99
- */
100
- getConnectionInfo(dirIds?: string[]): Promise<ConnectionInfoItem[]>;
101
- /**
102
- * Test API connectivity with detailed diagnostics
103
- */
104
- testConnection(): Promise<boolean>;
105
- /**
106
- * Perform comprehensive API diagnostics
107
- */
108
- performDiagnostics(): Promise<{
109
- connected: boolean;
110
- apiVersion?: string;
111
- authentication: boolean;
112
- workspaceAccess: boolean;
113
- errors: string[];
114
- recommendations: string[];
115
- }>;
116
- }
117
- //# sourceMappingURL=roxy-client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"roxy-client.d.ts","sourceRoot":"","sources":["../src/roxy-client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,gBAAgB,EAEhB,qBAAqB,EACrB,mBA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