Eleeter commited on
Commit
57e8a04
·
1 Parent(s): f14e065

remove node_modules

Browse files
Files changed (48) hide show
  1. .gitignore +2 -0
  2. dist/.dockerignore +9 -0
  3. dist/Dockerfile +22 -0
  4. dist/package.json +32 -0
  5. dist/public/css/main.css +1053 -0
  6. dist/public/index.html +178 -0
  7. dist/public/js/api.js +1 -0
  8. dist/public/js/main.js +1 -0
  9. dist/public/js/queue.js +1 -0
  10. dist/public/js/scene.js +1 -0
  11. dist/public/js/three.min.js +0 -0
  12. dist/public/js/ui.js +1 -0
  13. dist/server/config.js +1 -0
  14. dist/server/data/known_crashes.json +31 -0
  15. dist/server/index.js +1 -0
  16. dist/server/middleware/auth.js +1 -0
  17. dist/server/middleware/rateLimit.js +1 -0
  18. dist/server/routes/analyze.js +1 -0
  19. dist/server/routes/auth.js +1 -0
  20. dist/server/routes/status.js +1 -0
  21. dist/server/services/aiService.js +1 -0
  22. dist/server/services/brainService.js +1 -0
  23. dist/server/services/keyRotator.js +1 -0
  24. dist/server/services/logCompactor.js +1 -0
  25. dist/server/services/queue.js +1 -0
  26. dist/server/services/searchService.js +1 -0
  27. dist/server/services/userLimiter.js +1 -0
  28. package-lock.json +0 -0
  29. public/js/api.js +42 -1
  30. public/js/main.js +222 -1
  31. public/js/queue.js +75 -1
  32. public/js/scene.js +78 -1
  33. public/js/ui.js +511 -1
  34. scripts/build.js +85 -0
  35. server/config.js +74 -1
  36. server/index.js +41 -1
  37. server/middleware/auth.js +17 -1
  38. server/middleware/rateLimit.js +20 -1
  39. server/routes/analyze.js +57 -1
  40. server/routes/auth.js +17 -1
  41. server/routes/status.js +32 -1
  42. server/services/aiService.js +292 -1
  43. server/services/brainService.js +43 -1
  44. server/services/keyRotator.js +119 -1
  45. server/services/logCompactor.js +43 -1
  46. server/services/queue.js +120 -1
  47. server/services/searchService.js +65 -1
  48. server/services/userLimiter.js +20 -1
.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ node_modules/
2
+ .env
dist/.dockerignore ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ node_modules
2
+ dist
3
+ .env
4
+ .git
5
+ .gitignore
6
+ npm-debug.log
7
+ scripts
8
+ Dockerfile
9
+ .dockerignore
dist/Dockerfile ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use a lightweight Node.js image
2
+ FROM node:18-slim
3
+
4
+ # Set working directory
5
+ WORKDIR /app
6
+
7
+ # Copy package files and install dependencies
8
+ COPY package*.json ./
9
+ RUN npm install --production
10
+
11
+ # Copy the rest of the application code
12
+ COPY . .
13
+
14
+ # Hugging Face Spaces requires the app to listen on port 7860
15
+ ENV PORT=7860
16
+ ENV NODE_ENV=production
17
+
18
+ # Expose the port
19
+ EXPOSE 7860
20
+
21
+ # Start the application directly
22
+ CMD ["node", "server/index.js"]
dist/package.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "crashx",
3
+ "version": "1.0.0",
4
+ "description": "Minecraft crash log analyzer powered by AI (CrashX)",
5
+ "main": "server/index.js",
6
+ "scripts": {
7
+ "start": "node server/index.js",
8
+ "dev": "nodemon server/index.js",
9
+ "build": "node scripts/build.js"
10
+ },
11
+ "dependencies": {
12
+ "@google/generative-ai": "^0.21.0",
13
+ "@gradio/client": "^2.2.0",
14
+ "axios": "^1.16.0",
15
+ "cors": "^2.8.5",
16
+ "dotenv": "^16.4.5",
17
+ "express": "^4.19.2",
18
+ "express-rate-limit": "^7.3.1",
19
+ "groq-sdk": "^0.3.3",
20
+ "helmet": "^7.1.0"
21
+ },
22
+ "devDependencies": {
23
+ "fs-extra": "^11.2.0",
24
+ "javascript-obfuscator": "^4.1.1",
25
+ "nodemon": "^3.1.3"
26
+ },
27
+ "engines": {
28
+ "node": ">=18.0.0"
29
+ },
30
+ "author": "Eleeter 2026",
31
+ "license": "MIT"
32
+ }
dist/public/css/main.css ADDED
@@ -0,0 +1,1053 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ :root {
2
+ /* Premium Dark Theme (Default) */
3
+ --bg-main: #0b0c10;
4
+ --bg-sidebar: #12131a;
5
+ --bg-input: #1a1c23;
6
+ --bg-user-msg: #1f212a;
7
+ --bg-hover: rgba(255, 255, 255, 0.06);
8
+ --bg-active: rgba(255, 255, 255, 0.1);
9
+
10
+ --text-primary: #e2e4e9;
11
+ --text-secondary: #9499a6;
12
+ --text-placeholder: #6a6f7d;
13
+
14
+ --border-light: rgba(255, 255, 255, 0.06);
15
+ --border-medium: rgba(255, 255, 255, 0.12);
16
+
17
+ --accent-color: #8b5cf6;
18
+ --accent-hover: #7c3aed;
19
+ --accent-glow: rgba(139, 92, 246, 0.25);
20
+
21
+ --accent-btn: #8b5cf6;
22
+ --accent-btn-text: #ffffff;
23
+ --accent-btn-disabled: #2d2f3a;
24
+ --accent-btn-disabled-text: #6a6f7d;
25
+
26
+ --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
27
+ --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
28
+
29
+ --logo-bg: linear-gradient(135deg, #1e2029, #2d303e);
30
+ }
31
+
32
+ .light-theme {
33
+ /* Premium High-Contrast Light Theme */
34
+ --bg-main: #ffffff;
35
+ --bg-sidebar: #f9fafb;
36
+ --bg-input: #ffffff;
37
+ --bg-user-msg: #f3f4f6;
38
+ --bg-hover: #f3f4f6;
39
+ --bg-active: #e5e7eb;
40
+
41
+ --text-primary: #030712;
42
+ --text-secondary: #4b5563;
43
+ --text-placeholder: #9ca3af;
44
+
45
+ --border-light: #f3f4f6;
46
+ --border-medium: #e5e7eb;
47
+
48
+ --accent-color: #6d28d9;
49
+ --accent-hover: #5b21b6;
50
+ --accent-glow: rgba(109, 40, 217, 0.15);
51
+
52
+ --accent-btn: #6d28d9;
53
+ --accent-btn-text: #ffffff;
54
+ --accent-btn-disabled: #f3f4f6;
55
+ --accent-btn-disabled-text: #9ca3af;
56
+
57
+ --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
58
+ --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
59
+
60
+ --logo-bg: #ffffff;
61
+ }
62
+
63
+ :root {
64
+ /* Semantic Colors */
65
+ --sev-critical: #ef4444;
66
+ --sev-high: #f97316;
67
+ --sev-medium: #eab308;
68
+ --sev-low: #10b981;
69
+
70
+ /* Typography */
71
+ --font-primary: 'Inter', -apple-system, sans-serif;
72
+ --font-mono: 'JetBrains Mono', monospace;
73
+ }
74
+
75
+ * {
76
+ box-sizing: border-box;
77
+ margin: 0;
78
+ padding: 0;
79
+ }
80
+
81
+ body, html {
82
+ height: 100%;
83
+ width: 100%;
84
+ background-color: var(--bg-main);
85
+ color: var(--text-primary);
86
+ font-family: var(--font-primary);
87
+ font-size: 15px;
88
+ line-height: 1.6;
89
+ overflow: hidden;
90
+ -webkit-font-smoothing: antialiased;
91
+ transition: background-color 0.3s ease, color 0.3s ease;
92
+ }
93
+
94
+ /* Global Custom Scrollbars */
95
+ ::-webkit-scrollbar {
96
+ width: 6px;
97
+ height: 6px;
98
+ }
99
+ ::-webkit-scrollbar-track {
100
+ background: transparent;
101
+ }
102
+ ::-webkit-scrollbar-thumb {
103
+ background-color: var(--border-medium);
104
+ border-radius: 3px;
105
+ transition: background-color 0.2s;
106
+ }
107
+ ::-webkit-scrollbar-thumb:hover {
108
+ background-color: var(--text-secondary);
109
+ }
110
+ ::-webkit-scrollbar-corner {
111
+ background: transparent;
112
+ }
113
+
114
+ #app-container {
115
+ display: flex;
116
+ height: 100%;
117
+ height: 100dvh; /* Modern mobile viewport fix */
118
+ width: 100%;
119
+ }
120
+
121
+ /* --- Sidebar --- */
122
+ #sidebar {
123
+ width: 280px;
124
+ margin-left: 0;
125
+ background-color: var(--bg-sidebar);
126
+ border-right: 1px solid var(--border-light);
127
+ display: flex;
128
+ flex-direction: column;
129
+ flex-shrink: 0;
130
+ transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
131
+ z-index: 20;
132
+ }
133
+
134
+ #app-container.sidebar-closed #sidebar {
135
+ margin-left: -280px;
136
+ opacity: 0;
137
+ pointer-events: none;
138
+ }
139
+
140
+ #app-container.sidebar-closed-init #sidebar {
141
+ margin-left: -280px;
142
+ opacity: 0;
143
+ pointer-events: none;
144
+ transition: none; /* Instant on load */
145
+ }
146
+
147
+ .sidebar-header {
148
+ padding: 20px 16px 12px;
149
+ }
150
+
151
+ .new-chat-btn {
152
+ display: flex;
153
+ align-items: center;
154
+ gap: 12px;
155
+ width: 100%;
156
+ padding: 10px 14px;
157
+ background: var(--bg-main);
158
+ border: 1px solid var(--border-medium);
159
+ border-radius: 12px;
160
+ color: var(--text-primary);
161
+ font-family: inherit;
162
+ font-size: 14px;
163
+ font-weight: 600;
164
+ cursor: pointer;
165
+ text-align: left;
166
+ transition: all 0.2s ease;
167
+ box-shadow: var(--shadow-sm);
168
+ }
169
+
170
+ .new-chat-btn:hover {
171
+ border-color: var(--accent-color);
172
+ box-shadow: 0 4px 12px var(--accent-glow);
173
+ transform: translateY(-1px);
174
+ }
175
+
176
+ .new-chat-icon {
177
+ display: flex;
178
+ align-items: center;
179
+ justify-content: center;
180
+ color: var(--accent-color);
181
+ }
182
+
183
+ .sidebar-scroll {
184
+ flex: 1;
185
+ overflow-y: auto;
186
+ padding: 8px 16px;
187
+ }
188
+
189
+ .sidebar-scroll {
190
+ flex: 1;
191
+ overflow-y: auto;
192
+ overflow-x: hidden;
193
+ padding: 8px 16px;
194
+ }
195
+
196
+ .history-label {
197
+ font-size: 11px;
198
+ font-weight: 600;
199
+ text-transform: uppercase;
200
+ letter-spacing: 0.08em;
201
+ color: var(--text-secondary);
202
+ padding: 8px 4px;
203
+ margin-top: 12px;
204
+ margin-bottom: 4px;
205
+ }
206
+
207
+ .history-item {
208
+ display: flex;
209
+ justify-content: space-between;
210
+ align-items: center;
211
+ padding: 10px 12px;
212
+ margin-bottom: 2px;
213
+ border-radius: 8px;
214
+ color: var(--text-primary);
215
+ font-size: 13px;
216
+ font-weight: 500;
217
+ text-decoration: none;
218
+ cursor: pointer;
219
+ transition: all 0.2s ease;
220
+ position: relative;
221
+ }
222
+
223
+ .history-item-text {
224
+ flex: 1;
225
+ white-space: nowrap;
226
+ overflow: hidden;
227
+ text-overflow: ellipsis;
228
+ pointer-events: none;
229
+ }
230
+
231
+ .history-edit-input {
232
+ flex: 1;
233
+ background: var(--bg-input);
234
+ color: var(--text-primary);
235
+ border: 1px solid var(--accent-color);
236
+ border-radius: 4px;
237
+ font-family: inherit;
238
+ font-size: 13px;
239
+ font-weight: 500;
240
+ padding: 2px 6px;
241
+ outline: none;
242
+ width: 100%;
243
+ min-width: 0;
244
+ }
245
+
246
+ .history-item-actions {
247
+ position: relative;
248
+ opacity: 0;
249
+ transition: opacity 0.2s;
250
+ display: flex;
251
+ align-items: center;
252
+ }
253
+
254
+ .history-item:hover .history-item-actions,
255
+ .history-item-menu.open ~ .history-item-actions,
256
+ .history-item.active .history-item-actions {
257
+ opacity: 1;
258
+ }
259
+
260
+ .history-item-btn-dots {
261
+ background: transparent;
262
+ border: none;
263
+ color: var(--text-secondary);
264
+ cursor: pointer;
265
+ padding: 4px;
266
+ border-radius: 4px;
267
+ display: flex;
268
+ align-items: center;
269
+ justify-content: center;
270
+ transition: background-color 0.2s, color 0.2s;
271
+ }
272
+
273
+ .history-item-btn-dots:hover {
274
+ background-color: var(--bg-hover);
275
+ color: var(--text-primary);
276
+ }
277
+
278
+ .history-item-menu {
279
+ position: absolute;
280
+ top: 100%;
281
+ right: 0;
282
+ margin-top: 4px;
283
+ background-color: var(--bg-input);
284
+ border: 1px solid var(--border-medium);
285
+ border-radius: 8px;
286
+ padding: 4px;
287
+ box-shadow: var(--shadow-md);
288
+ display: none;
289
+ flex-direction: column;
290
+ z-index: 200;
291
+ min-width: 120px;
292
+ }
293
+
294
+ .history-item-menu.open {
295
+ display: flex;
296
+ animation: fade-in 0.1s ease-out;
297
+ }
298
+
299
+ .history-menu-item {
300
+ display: flex;
301
+ align-items: center;
302
+ gap: 8px;
303
+ width: 100%;
304
+ padding: 8px 12px;
305
+ background: transparent;
306
+ border: none;
307
+ border-radius: 4px;
308
+ color: var(--text-primary);
309
+ font-size: 12px;
310
+ font-weight: 500;
311
+ font-family: inherit;
312
+ cursor: pointer;
313
+ text-align: left;
314
+ transition: background-color 0.2s;
315
+ }
316
+
317
+ .history-menu-item:hover {
318
+ background-color: var(--bg-hover);
319
+ }
320
+
321
+ .history-menu-item.delete-btn {
322
+ color: var(--sev-critical);
323
+ }
324
+
325
+ .history-menu-item.delete-btn:hover {
326
+ background-color: rgba(239, 68, 68, 0.1);
327
+ }
328
+
329
+ .history-item:hover {
330
+ background-color: var(--bg-hover);
331
+ }
332
+
333
+ .history-item.active {
334
+ background-color: var(--bg-active);
335
+ color: var(--accent-color);
336
+ font-weight: 600;
337
+ }
338
+
339
+ .sidebar-footer {
340
+ padding: 12px 16px 20px;
341
+ display: flex;
342
+ flex-direction: column;
343
+ }
344
+
345
+ .profile-dropdown-container {
346
+ position: relative;
347
+ width: 100%;
348
+ }
349
+
350
+ .dropdown-menu {
351
+ position: absolute;
352
+ bottom: calc(100% + 8px);
353
+ left: 0;
354
+ width: 100%;
355
+ background-color: var(--bg-input);
356
+ border: 1px solid var(--border-medium);
357
+ border-radius: 12px;
358
+ padding: 8px;
359
+ box-shadow: var(--shadow-md);
360
+ opacity: 0;
361
+ transform: translateY(10px);
362
+ pointer-events: none;
363
+ transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
364
+ z-index: 100;
365
+ }
366
+
367
+ .dropdown-menu.open {
368
+ opacity: 1;
369
+ transform: translateY(0);
370
+ pointer-events: auto;
371
+ }
372
+
373
+ .dropdown-item {
374
+ display: flex;
375
+ align-items: center;
376
+ gap: 12px;
377
+ width: 100%;
378
+ padding: 10px 12px;
379
+ background: transparent;
380
+ border: none;
381
+ border-radius: 8px;
382
+ color: var(--text-primary);
383
+ font-family: inherit;
384
+ font-size: 13px;
385
+ font-weight: 500;
386
+ cursor: pointer;
387
+ text-align: left;
388
+ transition: background-color 0.2s;
389
+ }
390
+
391
+ .dropdown-item:hover {
392
+ background-color: var(--bg-hover);
393
+ }
394
+
395
+ .theme-icon-container {
396
+ position: relative;
397
+ width: 16px;
398
+ height: 16px;
399
+ flex-shrink: 0;
400
+ }
401
+
402
+ .theme-icon {
403
+ position: absolute;
404
+ top: 0;
405
+ left: 0;
406
+ transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
407
+ }
408
+
409
+ /* Default Dark Theme Active -> Button says "Switch to Light Mode" (Sun icon) */
410
+ .icon-for-dark {
411
+ opacity: 0;
412
+ transform: rotate(90deg) scale(0.5);
413
+ }
414
+ .icon-for-light {
415
+ opacity: 1;
416
+ transform: rotate(0deg) scale(1);
417
+ }
418
+
419
+ /* Light Theme Active -> Button says "Switch to Dark Mode" (Moon icon) */
420
+ .light-theme .icon-for-dark {
421
+ opacity: 1;
422
+ transform: rotate(0deg) scale(1);
423
+ }
424
+ .light-theme .icon-for-light {
425
+ opacity: 0;
426
+ transform: rotate(-90deg) scale(0.5);
427
+ }
428
+
429
+ .dropdown-divider {
430
+ height: 1px;
431
+ background-color: var(--border-medium);
432
+ margin: 4px 0;
433
+ }
434
+
435
+ .sidebar-action-btn {
436
+ display: flex;
437
+ align-items: center;
438
+ gap: 12px;
439
+ width: 100%;
440
+ padding: 10px 12px;
441
+ background: transparent;
442
+ border: none;
443
+ border-radius: 8px;
444
+ color: var(--text-primary);
445
+ font-family: inherit;
446
+ font-size: 13px;
447
+ font-weight: 500;
448
+ cursor: pointer;
449
+ text-align: left;
450
+ transition: background-color 0.2s;
451
+ }
452
+
453
+ .sidebar-action-btn:hover {
454
+ background-color: var(--bg-hover);
455
+ }
456
+
457
+ .avatar-placeholder {
458
+ width: 24px;
459
+ height: 24px;
460
+ border-radius: 6px;
461
+ background: linear-gradient(135deg, #4f46e5, #8b5cf6);
462
+ display: flex;
463
+ align-items: center;
464
+ justify-content: center;
465
+ color: #fff;
466
+ box-shadow: var(--shadow-sm);
467
+ }
468
+
469
+ /* --- Main Content --- */
470
+ #main-content {
471
+ flex: 1;
472
+ display: flex;
473
+ flex-direction: column;
474
+ min-width: 0;
475
+ position: relative;
476
+ }
477
+
478
+ #topbar {
479
+ height: 60px;
480
+ display: flex;
481
+ align-items: center;
482
+ padding: 0 24px;
483
+ background: linear-gradient(180deg, var(--bg-main) 0%, transparent 100%);
484
+ position: absolute;
485
+ top: 0;
486
+ left: 0;
487
+ right: 0;
488
+ z-index: 10;
489
+ }
490
+
491
+ .icon-btn {
492
+ background: transparent;
493
+ border: none;
494
+ color: var(--text-secondary);
495
+ cursor: pointer;
496
+ padding: 8px;
497
+ border-radius: 8px;
498
+ display: flex;
499
+ align-items: center;
500
+ justify-content: center;
501
+ transition: background-color 0.2s, color 0.2s;
502
+ margin-right: 12px;
503
+ }
504
+
505
+ .icon-btn:hover {
506
+ background-color: var(--bg-hover);
507
+ color: var(--text-primary);
508
+ }
509
+
510
+ .model-selector {
511
+ display: flex;
512
+ align-items: center;
513
+ gap: 8px;
514
+ font-size: 18px;
515
+ font-weight: 600;
516
+ color: var(--text-primary);
517
+ letter-spacing: -0.02em;
518
+ }
519
+
520
+ .model-version {
521
+ font-size: 11px;
522
+ font-weight: 600;
523
+ background-color: var(--bg-hover);
524
+ padding: 2px 8px;
525
+ border-radius: 6px;
526
+ color: var(--accent-color);
527
+ }
528
+
529
+ /* --- Chat Container --- */
530
+ #chat-container {
531
+ flex: 1;
532
+ overflow-y: auto;
533
+ display: flex;
534
+ flex-direction: column;
535
+ padding-top: 60px;
536
+ scroll-behavior: smooth;
537
+ }
538
+
539
+ #messages-area {
540
+ display: flex;
541
+ flex-direction: column;
542
+ padding-bottom: 40px;
543
+ }
544
+
545
+ .welcome-screen {
546
+ display: flex;
547
+ flex-direction: column;
548
+ align-items: center;
549
+ justify-content: center;
550
+ height: 65vh;
551
+ text-align: center;
552
+ animation: fade-in 0.6s ease-out;
553
+ }
554
+
555
+ @keyframes fade-in {
556
+ from { opacity: 0; transform: translateY(10px); }
557
+ to { opacity: 1; transform: translateY(0); }
558
+ }
559
+
560
+ .welcome-logo {
561
+ width: 64px;
562
+ height: 64px;
563
+ border-radius: 16px;
564
+ background: var(--logo-bg);
565
+ border: 1px solid var(--border-medium);
566
+ color: var(--accent-color);
567
+ display: flex;
568
+ align-items: center;
569
+ justify-content: center;
570
+ margin-bottom: 24px;
571
+ box-shadow: var(--shadow-md);
572
+ }
573
+
574
+ .welcome-screen h1 {
575
+ font-size: 28px;
576
+ font-weight: 600;
577
+ color: var(--text-primary);
578
+ letter-spacing: -0.02em;
579
+ }
580
+
581
+ /* Chat Messages */
582
+ .message-row {
583
+ padding: 24px;
584
+ display: flex;
585
+ justify-content: center;
586
+ animation: slide-up 0.4s ease-out;
587
+ }
588
+
589
+ @keyframes slide-up {
590
+ from { opacity: 0; transform: translateY(15px); }
591
+ to { opacity: 1; transform: translateY(0); }
592
+ }
593
+
594
+ .message-inner {
595
+ width: 100%;
596
+ max-width: 800px;
597
+ display: flex;
598
+ gap: 20px;
599
+ }
600
+
601
+ .message-avatar {
602
+ width: 36px;
603
+ height: 36px;
604
+ border-radius: 10px;
605
+ flex-shrink: 0;
606
+ display: flex;
607
+ align-items: center;
608
+ justify-content: center;
609
+ box-shadow: var(--shadow-sm);
610
+ }
611
+
612
+ .message-avatar.user {
613
+ background: linear-gradient(135deg, #4f46e5, #8b5cf6);
614
+ color: white;
615
+ font-weight: 600;
616
+ font-size: 14px;
617
+ }
618
+
619
+ .message-avatar.ai {
620
+ background: var(--bg-input);
621
+ border: 1px solid var(--border-medium);
622
+ color: var(--accent-color);
623
+ }
624
+
625
+ .message-content {
626
+ flex: 1;
627
+ min-width: 0;
628
+ font-size: 15px;
629
+ line-height: 1.7;
630
+ }
631
+
632
+ /* User Message styling */
633
+ .user-message-bubble {
634
+ background-color: var(--bg-user-msg);
635
+ border: 1px solid var(--border-light);
636
+ padding: 16px 20px;
637
+ border-radius: 16px;
638
+ border-top-right-radius: 4px;
639
+ color: var(--text-primary);
640
+ font-family: var(--font-mono);
641
+ font-size: 13px;
642
+ max-height: 300px;
643
+ max-width: 100%;
644
+ overflow-y: auto;
645
+ overflow-x: auto;
646
+ white-space: pre-wrap;
647
+ word-break: break-word;
648
+ width: fit-content;
649
+ margin-left: auto;
650
+ box-shadow: var(--shadow-sm);
651
+ }
652
+
653
+ .message-row.user-row .message-inner {
654
+ justify-content: flex-end;
655
+ }
656
+
657
+ /* AI Message styling */
658
+ .ai-message-content {
659
+ color: var(--text-primary);
660
+ }
661
+
662
+ .ai-message-content h3 {
663
+ font-size: 18px;
664
+ margin-bottom: 16px;
665
+ font-weight: 600;
666
+ color: var(--text-primary);
667
+ }
668
+
669
+ .ai-message-content p {
670
+ margin-bottom: 16px;
671
+ }
672
+
673
+ .ai-message-content ol {
674
+ padding-left: 20px;
675
+ margin-bottom: 20px;
676
+ }
677
+
678
+ .ai-message-content li {
679
+ margin-bottom: 10px;
680
+ padding-left: 8px;
681
+ }
682
+
683
+ .ai-message-content li::marker {
684
+ color: var(--accent-color);
685
+ font-weight: 600;
686
+ }
687
+
688
+ .ai-link {
689
+ color: var(--accent-color);
690
+ text-decoration: none;
691
+ font-weight: 500;
692
+ transition: color 0.2s, text-decoration 0.2s;
693
+ }
694
+
695
+ .ai-link:hover {
696
+ color: var(--accent-hover);
697
+ text-decoration: underline;
698
+ }
699
+
700
+ .ai-code {
701
+ background-color: var(--bg-hover);
702
+ padding: 2px 6px;
703
+ border-radius: 4px;
704
+ font-family: var(--font-mono);
705
+ font-size: 0.9em;
706
+ color: var(--accent-color);
707
+ }
708
+
709
+ .severity-pill {
710
+ display: inline-flex;
711
+ align-items: center;
712
+ padding: 4px 10px;
713
+ border-radius: 12px;
714
+ font-size: 11px;
715
+ font-weight: 700;
716
+ letter-spacing: 0.05em;
717
+ text-transform: uppercase;
718
+ margin-bottom: 16px;
719
+ margin-right: 10px;
720
+ box-shadow: var(--shadow-sm);
721
+ }
722
+
723
+ .severity-pill::before {
724
+ content: '';
725
+ width: 6px;
726
+ height: 6px;
727
+ border-radius: 50%;
728
+ background-color: currentColor;
729
+ margin-right: 6px;
730
+ }
731
+
732
+ .severity-pill.critical { background-color: rgba(239, 68, 68, 0.15); color: var(--sev-critical); border: 1px solid rgba(239, 68, 68, 0.3); }
733
+ .severity-pill.high { background-color: rgba(249, 115, 22, 0.15); color: var(--sev-high); border: 1px solid rgba(249, 115, 22, 0.3); }
734
+ .severity-pill.medium { background-color: rgba(234, 179, 8, 0.15); color: var(--sev-medium); border: 1px solid rgba(234, 179, 8, 0.3); }
735
+ .severity-pill.low { background-color: rgba(16, 185, 129, 0.15); color: var(--sev-low); border: 1px solid rgba(16, 185, 129, 0.3); }
736
+
737
+ .mod-pill {
738
+ display: inline-block;
739
+ padding: 4px 12px;
740
+ border-radius: 12px;
741
+ background-color: var(--bg-hover);
742
+ border: 1px solid var(--border-medium);
743
+ font-size: 12px;
744
+ font-weight: 500;
745
+ color: var(--text-secondary);
746
+ margin-bottom: 16px;
747
+ }
748
+
749
+ /* --- Premium AI Elements --- */
750
+ .ai-table {
751
+ width: 100%;
752
+ border-collapse: collapse;
753
+ margin: 16px 0;
754
+ font-size: 13px;
755
+ border: 1px solid var(--border-medium);
756
+ border-radius: 8px;
757
+ overflow: hidden;
758
+ }
759
+
760
+ .ai-table th {
761
+ background-color: var(--bg-hover);
762
+ padding: 10px 12px;
763
+ text-align: left;
764
+ font-weight: 600;
765
+ border-bottom: 1px solid var(--border-medium);
766
+ }
767
+
768
+ .ai-table td {
769
+ padding: 8px 12px;
770
+ border-bottom: 1px solid var(--border-light);
771
+ }
772
+
773
+ .ai-table tr:last-child td {
774
+ border-bottom: none;
775
+ }
776
+
777
+ .ai-code-block {
778
+ background-color: #0d1117;
779
+ border: 1px solid var(--border-medium);
780
+ border-radius: 12px;
781
+ padding: 16px;
782
+ margin: 16px 0;
783
+ font-family: var(--font-mono);
784
+ font-size: 13px;
785
+ line-height: 1.5;
786
+ overflow-x: auto;
787
+ position: relative;
788
+ }
789
+
790
+ .ai-code-block::before {
791
+ content: attr(data-lang);
792
+ position: absolute;
793
+ top: 0;
794
+ right: 16px;
795
+ font-size: 10px;
796
+ font-weight: 700;
797
+ text-transform: uppercase;
798
+ color: var(--text-secondary);
799
+ padding: 4px 8px;
800
+ background: var(--bg-hover);
801
+ border-bottom-left-radius: 8px;
802
+ border-bottom-right-radius: 8px;
803
+ }
804
+
805
+ .ai-message-content p {
806
+ margin-bottom: 12px;
807
+ }
808
+
809
+ .ai-message-content hr {
810
+ border: none;
811
+ height: 1px;
812
+ background: var(--border-medium);
813
+ margin: 24px 0;
814
+ }
815
+
816
+
817
+ /* --- Input Area --- */
818
+ #input-container {
819
+ padding: 0 24px 24px;
820
+ background: linear-gradient(0deg, var(--bg-main) 60%, transparent 100%);
821
+ }
822
+
823
+ .input-wrapper {
824
+ max-width: 800px;
825
+ margin: 0 auto;
826
+ position: relative;
827
+ }
828
+
829
+ .queue-bar {
830
+ display: none;
831
+ align-items: center;
832
+ gap: 8px;
833
+ padding: 8px 0;
834
+ font-size: 12px;
835
+ font-weight: 500;
836
+ color: var(--accent-color);
837
+ justify-content: center;
838
+ animation: fade-in 0.3s;
839
+ }
840
+
841
+ .queue-bar.visible {
842
+ display: flex;
843
+ }
844
+
845
+ .input-box {
846
+ background-color: var(--bg-input);
847
+ border: 1px solid var(--border-medium);
848
+ border-radius: 20px;
849
+ padding: 12px 16px;
850
+ padding-right: 56px;
851
+ display: flex;
852
+ align-items: flex-end;
853
+ position: relative;
854
+ box-shadow: var(--shadow-md);
855
+ transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
856
+ }
857
+
858
+ .input-box:focus-within {
859
+ border-color: var(--accent-color);
860
+ box-shadow: var(--shadow-md), var(--shadow-glow);
861
+ }
862
+
863
+ #crash-log-input {
864
+ width: 100%;
865
+ background: transparent;
866
+ border: none;
867
+ outline: none;
868
+ color: var(--text-primary);
869
+ font-family: var(--font-mono);
870
+ font-size: 14px;
871
+ line-height: 24px;
872
+ max-height: 240px;
873
+ resize: none;
874
+ padding: 6px 0;
875
+ }
876
+
877
+ #crash-log-input::placeholder {
878
+ color: var(--text-placeholder);
879
+ font-family: var(--font-primary);
880
+ }
881
+
882
+ #crash-log-input::placeholder {
883
+ color: var(--text-placeholder);
884
+ font-family: var(--font-primary);
885
+ }
886
+
887
+ .send-btn {
888
+ position: absolute;
889
+ right: 12px;
890
+ bottom: 12px;
891
+ width: 36px;
892
+ height: 36px;
893
+ border-radius: 12px;
894
+ background-color: var(--accent-btn);
895
+ color: var(--accent-btn-text);
896
+ border: none;
897
+ display: flex;
898
+ align-items: center;
899
+ justify-content: center;
900
+ cursor: pointer;
901
+ transition: all 0.2s;
902
+ box-shadow: 0 2px 10px var(--accent-glow);
903
+ }
904
+
905
+ .send-btn:hover:not(:disabled) {
906
+ background-color: var(--accent-hover);
907
+ transform: translateY(-1px);
908
+ box-shadow: 0 4px 14px var(--accent-glow);
909
+ }
910
+
911
+ .send-btn:disabled {
912
+ background-color: var(--accent-btn-disabled);
913
+ color: var(--accent-btn-disabled-text);
914
+ cursor: not-allowed;
915
+ box-shadow: none;
916
+ transform: none;
917
+ }
918
+
919
+ .disclaimer {
920
+ text-align: center;
921
+ font-size: 11px;
922
+ color: var(--text-placeholder);
923
+ margin-top: 12px;
924
+ }
925
+
926
+ /* --- Toast --- */
927
+ .toast {
928
+ position: fixed;
929
+ top: 24px;
930
+ left: 50%;
931
+ transform: translateX(-50%) translateY(-100px);
932
+ background-color: var(--bg-input);
933
+ border: 1px solid rgba(239, 68, 68, 0.3);
934
+ box-shadow: 0 8px 30px rgba(239, 68, 68, 0.2);
935
+ color: var(--sev-critical);
936
+ padding: 12px 24px;
937
+ border-radius: 12px;
938
+ font-size: 13px;
939
+ font-weight: 500;
940
+ opacity: 0;
941
+ transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
942
+ z-index: 1000;
943
+ }
944
+
945
+ .toast.visible {
946
+ transform: translateX(-50%) translateY(0);
947
+ opacity: 1;
948
+ }
949
+
950
+ /* Three.js Loading Canvas Container */
951
+ .loading-canvas-container {
952
+ display: flex;
953
+ align-items: center;
954
+ gap: 16px;
955
+ }
956
+
957
+ .loading-text-glow {
958
+ font-size: 14px;
959
+ font-weight: 500;
960
+ color: var(--text-secondary);
961
+ background: linear-gradient(90deg, var(--text-secondary) 0%, var(--text-primary) 50%, var(--text-secondary) 100%);
962
+ background-size: 200% auto;
963
+ color: transparent;
964
+ -webkit-background-clip: text;
965
+ background-clip: text;
966
+ animation: shine 2s linear infinite;
967
+ }
968
+
969
+ @keyframes shine {
970
+ to { background-position: 200% center; }
971
+ }
972
+
973
+ /* --- Mobile Responsiveness --- */
974
+ @media (max-width: 768px) {
975
+ #sidebar {
976
+ position: absolute;
977
+ height: 100%;
978
+ left: 0;
979
+ top: 0;
980
+ box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
981
+ }
982
+
983
+ #app-container.sidebar-closed #sidebar,
984
+ #app-container.sidebar-closed-init #sidebar {
985
+ margin-left: -280px;
986
+ }
987
+
988
+ /* Force the Topbar (and its buttons) to the front layer */
989
+ #topbar {
990
+ z-index: 50;
991
+ background: var(--bg-main);
992
+ border-bottom: 1px solid var(--border-light);
993
+ }
994
+
995
+ #btn-toggle-sidebar {
996
+ background: var(--bg-hover);
997
+ }
998
+
999
+
1000
+
1001
+ /* Message padding on mobile */
1002
+ .message-row {
1003
+ padding: 16px 12px;
1004
+ }
1005
+
1006
+ .message-inner {
1007
+ gap: 12px;
1008
+ }
1009
+
1010
+ .message-avatar {
1011
+ width: 32px;
1012
+ height: 32px;
1013
+ }
1014
+
1015
+ .welcome-screen h1 {
1016
+ font-size: 22px;
1017
+ padding: 0 20px;
1018
+ }
1019
+
1020
+ /* Input area on mobile */
1021
+ #input-container {
1022
+ padding: 0 12px 12px;
1023
+ }
1024
+
1025
+ .input-box {
1026
+ padding: 10px 14px;
1027
+ padding-right: 50px;
1028
+ border-radius: 16px;
1029
+ }
1030
+
1031
+ .send-btn {
1032
+ right: 8px;
1033
+ bottom: 8px;
1034
+ width: 32px;
1035
+ height: 32px;
1036
+ }
1037
+
1038
+ .dropdown-menu {
1039
+ max-height: 40vh;
1040
+ overflow-y: auto;
1041
+ }
1042
+
1043
+ /* Ensure disclaimer is visible and centered */
1044
+ .disclaimer {
1045
+ display: block !important;
1046
+ visibility: visible !important;
1047
+ margin-top: 10px;
1048
+ font-size: 10px;
1049
+ color: var(--text-secondary);
1050
+ text-align: center;
1051
+ width: 100%;
1052
+ }
1053
+ }
dist/public/index.html ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>CrashX</title>
8
+ <meta name="description" content="AI-powered Minecraft crash log analyzer." />
9
+
10
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
11
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
12
+ <link
13
+ href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400&display=swap"
14
+ rel="stylesheet" />
15
+
16
+ <link rel="stylesheet" href="/css/main.css?v=5.0" />
17
+ <script>
18
+ // Apply theme early to prevent flash
19
+ if (localStorage.getItem('crashx-theme') === 'light') {
20
+ document.documentElement.classList.add('light-theme');
21
+ }
22
+ if (localStorage.getItem('crashx-sidebar-closed') === 'true') {
23
+ document.documentElement.classList.add('sidebar-closed-init');
24
+ }
25
+ </script>
26
+ </head>
27
+
28
+ <body>
29
+
30
+ <div id="app-container">
31
+ <!-- Sidebar -->
32
+ <nav id="sidebar" aria-label="Chat history">
33
+ <div class="sidebar-header">
34
+ <button id="btn-new-analysis" class="new-chat-btn">
35
+ <div class="new-chat-icon">
36
+ <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor"
37
+ stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
38
+ <line x1="12" y1="5" x2="12" y2="19"></line>
39
+ <line x1="5" y1="12" x2="19" y2="12"></line>
40
+ </svg>
41
+ </div>
42
+ <span>New Analysis</span>
43
+ </button>
44
+ </div>
45
+
46
+ <div class="sidebar-scroll">
47
+ <div class="history-group">
48
+ <div class="history-label">Previous 7 Days</div>
49
+ <div id="history-list" role="list">
50
+ <!-- History items will be injected here -->
51
+ </div>
52
+ </div>
53
+ </div>
54
+
55
+ <div class="sidebar-footer">
56
+ <div class="profile-dropdown-container">
57
+ <!-- Dropdown Menu -->
58
+ <div id="profile-dropdown" class="dropdown-menu">
59
+ <button id="btn-theme-toggle" class="dropdown-item">
60
+ <div class="theme-icon-container">
61
+ <svg class="theme-icon icon-for-dark" width="16" height="16" viewBox="0 0 24 24" fill="none"
62
+ stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
63
+ <path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
64
+ </svg>
65
+ <svg class="theme-icon icon-for-light" width="16" height="16" viewBox="0 0 24 24" fill="none"
66
+ stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
67
+ <circle cx="12" cy="12" r="5"></circle>
68
+ <line x1="12" y1="1" x2="12" y2="3"></line>
69
+ <line x1="12" y1="21" x2="12" y2="23"></line>
70
+ <line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
71
+ <line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
72
+ <line x1="1" y1="12" x2="3" y2="12"></line>
73
+ <line x1="21" y1="12" x2="23" y2="12"></line>
74
+ <line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
75
+ <line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
76
+ </svg>
77
+ </div>
78
+ <span id="theme-text">Switch to Light Mode</span>
79
+ </button>
80
+ <div class="dropdown-divider"></div>
81
+ <button id="btn-sidebar-signin" class="dropdown-item">
82
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor"
83
+ stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
84
+ <path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"></path>
85
+ <polyline points="10 17 15 12 10 7"></polyline>
86
+ <line x1="15" y1="12" x2="3" y2="12"></line>
87
+ </svg>
88
+ <span>Sign in to sync</span>
89
+ </button>
90
+ </div>
91
+
92
+ <!-- Profile Button -->
93
+ <button id="btn-profile-menu" class="sidebar-action-btn profile-btn">
94
+ <div class="avatar-placeholder">
95
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor"
96
+ stroke-width="2">
97
+ <path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
98
+ <circle cx="12" cy="7" r="4"></circle>
99
+ </svg>
100
+ </div>
101
+ <span>Guest User</span>
102
+ </button>
103
+ </div>
104
+ </div>
105
+ </nav>
106
+
107
+ <!-- Main Content Area -->
108
+ <main id="main-content">
109
+ <!-- Topbar -->
110
+ <header id="topbar">
111
+ <button id="btn-toggle-sidebar" class="icon-btn" aria-label="Toggle sidebar">
112
+ <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
113
+ stroke-linecap="round" stroke-linejoin="round">
114
+ <rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>
115
+ <line x1="9" y1="3" x2="9" y2="21"></line>
116
+ </svg>
117
+ </button>
118
+ <div class="model-selector">
119
+ <span class="logo-text">CrashX</span>
120
+ <span class="model-version">AI</span>
121
+ </div>
122
+ </header>
123
+
124
+ <!-- Chat / Results Area -->
125
+ <div id="chat-container">
126
+ <div id="messages-area">
127
+ <!-- Welcome Screen -->
128
+ <div id="welcome-screen" class="welcome-screen">
129
+ <div class="welcome-logo">
130
+ <svg width="36" height="36" viewBox="0 0 24 24" fill="none" stroke="currentColor"
131
+ stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
132
+ <path
133
+ d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z">
134
+ </path>
135
+ <polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline>
136
+ <line x1="12" y1="22.08" x2="12" y2="12"></line>
137
+ </svg>
138
+ </div>
139
+ <h1>What crashed today?</h1>
140
+ </div>
141
+ </div>
142
+ </div>
143
+
144
+ <!-- Input Area -->
145
+ <div id="input-container">
146
+ <div class="input-wrapper">
147
+ <!-- Queue Status -->
148
+ <div id="queue-bar" class="queue-bar">
149
+ <span class="spinner"></span>
150
+ <span id="queue-bar-text">Analyzing...</span>
151
+ </div>
152
+
153
+ <div class="input-box">
154
+ <textarea id="crash-log-input" placeholder="Paste your Minecraft crash log here..." rows="1"
155
+ spellcheck="false"></textarea>
156
+ <button id="btn-analyze" class="send-btn" disabled>
157
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" class="send-icon">
158
+ <path d="M5 12h14M12 5l7 7-7 7" stroke="currentColor" stroke-width="2"
159
+ stroke-linecap="round" stroke-linejoin="round"></path>
160
+ </svg>
161
+ </button>
162
+ </div>
163
+ </div>
164
+ <div class="disclaimer">
165
+ CrashX can make mistakes. Verify before making system changes.
166
+ </div>
167
+ </div>
168
+ </main>
169
+ </div>
170
+
171
+ <!-- Error Toast -->
172
+ <div id="error-toast" class="toast"></div>
173
+
174
+ <script src="/js/three.min.js"></script>
175
+ <script type="module" src="/js/main.js"></script>
176
+ </body>
177
+
178
+ </html>
dist/public/js/api.js ADDED
@@ -0,0 +1 @@
 
 
1
+ function _0xfbdb(_0x16ea1e,_0x1c7a09){_0x16ea1e=_0x16ea1e-(-0x97*-0x1f+0x1*-0x1c2a+0xac1*0x1);const _0x5317df=_0x4ce0();let _0x1901b2=_0x5317df[_0x16ea1e];return _0x1901b2;}function _0x4ce0(){const _0x57f77e=['NcNsE','dWmCb','POST','1594810MnqzYv','Poll\x20error\x20','1365658uVxluU','224996DWqNWv','qbiUP','application/json','PSZzX','error','1526gbGarR','57894PsCiAz','Server\x20error\x20','Failed\x20to\x20fetch\x20server\x20status','139473aPutPq','stringify','muwdj','62680wgyOEY','/api/analyze','48UoYBiI','status','6TbsaFr','fPmom','jobId','/api/status','120GxjiWR','json'];_0x4ce0=function(){return _0x57f77e;};return _0x4ce0();}const _0xffa1dd=_0xfbdb;(function(_0x3cfb4b,_0x295936){const _0x57db69=_0xfbdb,_0x589c44=_0x3cfb4b();while(!![]){try{const _0x37830d=parseInt(_0x57db69(0xe6))/(-0x1d*-0xef+-0x1*-0xb25+-0x2637)*(-parseInt(_0x57db69(0xf5))/(0x1e50+-0x1*0x1497+-0x9b7))+-parseInt(_0x57db69(0xe7))/(-0x662+0x1c74+-0x160f)+-parseInt(_0x57db69(0xe1))/(-0x1da8+0x1c7a+0x132)+-parseInt(_0x57db69(0xed))/(-0x1d62*-0x1+-0x618+-0x1*0x1745)*(-parseInt(_0x57db69(0xf1))/(-0x1d86*-0x1+0xde4+0x2b64*-0x1))+parseInt(_0x57db69(0xe0))/(0x1b3e+0xc3+-0x1*0x1bfa)+parseInt(_0x57db69(0xef))/(0x1*0xf5d+0x93*-0x23+0x4c4)*(-parseInt(_0x57db69(0xea))/(0x19d5+0x15e6+-0x2fb2))+parseInt(_0x57db69(0xfa))/(0x14*-0x5f+-0x7*0x499+-0x255*-0x11);if(_0x37830d===_0x295936)break;else _0x589c44['push'](_0x589c44['shift']());}catch(_0x2051e0){_0x589c44['push'](_0x589c44['shift']());}}}(_0x4ce0,-0xc845+0x7*-0x1955+0x31ba6));const ANALYZE_ENDPOINT=_0xffa1dd(0xee),STATUS_ENDPOINT=_0xffa1dd(0xf4),submitCrashLog=async _0x451186=>{const _0x162b03=_0xffa1dd,_0x46c27b={'dWmCb':function(_0x5d6a7c,_0x962f08,_0x338dc2){return _0x5d6a7c(_0x962f08,_0x338dc2);},'NcNsE':_0x162b03(0xf9),'fPmom':_0x162b03(0xe3)},_0x33b15a=await _0x46c27b[_0x162b03(0xf8)](fetch,ANALYZE_ENDPOINT,{'method':_0x46c27b[_0x162b03(0xf7)],'headers':{'Content-Type':_0x46c27b[_0x162b03(0xf2)]},'body':JSON[_0x162b03(0xeb)]({'messages':_0x451186})}),_0xa0cb2b=await _0x33b15a[_0x162b03(0xf6)]();if(!_0x33b15a['ok'])throw new Error(_0xa0cb2b[_0x162b03(0xe5)]||_0x162b03(0xe8)+_0x33b15a[_0x162b03(0xf0)]);return _0xa0cb2b[_0x162b03(0xf3)];},pollJobStatus=async _0x1db903=>{const _0x5215ce=_0xffa1dd,_0x5df493={'qbiUP':function(_0x509e99,_0x26dd99){return _0x509e99(_0x26dd99);}},_0xaac3c=await _0x5df493[_0x5215ce(0xe2)](fetch,STATUS_ENDPOINT+'/'+_0x1db903),_0x6ca153=await _0xaac3c[_0x5215ce(0xf6)]();if(!_0xaac3c['ok'])throw new Error(_0x6ca153[_0x5215ce(0xe5)]||_0x5215ce(0xfb)+_0xaac3c[_0x5215ce(0xf0)]);return _0x6ca153;},fetchServerStatus=async()=>{const _0x120b7a=_0xffa1dd,_0x540402={'muwdj':function(_0x703851,_0x14b7f6){return _0x703851(_0x14b7f6);},'PSZzX':_0x120b7a(0xe9)},_0x2c7697=await _0x540402[_0x120b7a(0xec)](fetch,STATUS_ENDPOINT);if(!_0x2c7697['ok'])throw new Error(_0x540402[_0x120b7a(0xe4)]);return _0x2c7697[_0x120b7a(0xf6)]();};export{submitCrashLog,pollJobStatus,fetchServerStatus};
dist/public/js/main.js ADDED
@@ -0,0 +1 @@
 
 
1
+ function _0x4f0d(_0x52da49,_0x5bf1ab){_0x52da49=_0x52da49-(0x1b98+0xf26*0x1+-0x29f5);const _0x4c7e8a=_0x1115();let _0x111758=_0x4c7e8a[_0x52da49];return _0x111758;}const _0x4575f5=_0x4f0d;function _0x1115(){const _0x2862c2=['iOHdg','CPppq','Switch\x20to\x20Light\x20Mode','tjtEV','zauRM','Enter','type','YaoQg','Please\x20enter\x20a\x20valid\x20message.','style','yxBKk','13509mCfJLl','processing','THREE','xXZnU','contains','kjVtb','vOojg','KTnji','Ahmxf','LjXys','9034165suHYOi','btn-sidebar-signin','UHJCG','forEach','focus','ZsvCo','wqEdY','matches','add','btn-profile-menu','RWHIW','status','nSvMb','eDLny','GoCGc','VyWEJ','aCRCY','VpJfQ','profile-dropdown','setItem','.message-row','sidebar-closed-init','HPMki','824GJNaBJ','keydown','remove','app-container','fsezq','welcomeScreen','LGVjK','ytRtu','IulLY','Queued...','sidebar-closed','5686QqRQbI','shiftKey','Searching\x20the\x20web...','6GPwmlG','message','mzHJA','getElementById','XiZlz','classList','7257490pZNQMx','nufNY','jiFkP','length','querySelectorAll','model','searching','kYpMQ','RWAuY','FXowS','ERBPZ','whhYa','textContent','RQaFZ','JFDKC','qVqqO','jbLCs','target','RzZWJ','data','Login\x20is\x20coming\x20soon\x20—\x20stay\x20tuned.','flex','wjmPY','text','analysis','open','PwZcU','crashLogInput','Analysis\x20finished\x20but\x20no\x20result\x20was\x20returned.','result','disabled','crashx-theme','rScOY','WCFSr','addEventListener','pvGpe','analyzing','user','stopPropagation','documentElement','(max-width:\x20768px)','aPnhF','crashx-sidebar-closed','ZjDFv','vbIat','3208595LcpqNl','54llMHjo','HMirW','Synthesizing\x20answer...','Submitting...','display','Cgsxw','142480ADwEUi','SMlNz','vBhqi','click','hMgRe','11OBOIbO','SkDmg','getItem','preventDefault','FNirt','BPRPo','JAypc','xpJOp','sLQsM','WGjlb','Switch\x20to\x20Dark\x20Mode','eYaNa','ryRZC','IjIon','xGAiN','yEpjy','BMLnX','push','GLTsK','light','296tSVUAH','toggle','destroy','analyzeButton','DOMContentLoaded','rawText','IfIax','WgtSv','btn-toggle-sidebar','RcYkv','theme-text','Reading\x20findings...','btn-new-analysis','60112224OdnYMF','Something\x20went\x20wrong.\x20Please\x20try\x20again.','TGxzC','dark','matchMedia','HAPfe','light-theme','key','ywdWC','btn-theme-toggle'];_0x1115=function(){return _0x2862c2;};return _0x1115();}(function(_0x8c811b,_0x367cda){const _0x383dc8=_0x4f0d,_0x7bb730=_0x8c811b();while(!![]){try{const _0x2abc8b=-parseInt(_0x383dc8(0x104))/(-0x3*-0x3af+-0x245b+0x194f)*(parseInt(_0x383dc8(0x152))/(-0x24b1+-0x1e9d*0x1+0x59c*0xc))+parseInt(_0x383dc8(0x126))/(-0x1e77+0x166e+-0x14*-0x67)*(-parseInt(_0x383dc8(0x147))/(0x864+0x37f*-0xb+0x1*0x1e15))+-parseInt(_0x383dc8(0xe4))/(0x1*0xbe1+-0x2a5*-0x1+-0xe81)+parseInt(_0x383dc8(0x155))/(0x24f*0xa+0x1*-0x8a1+-0xe6f)*(-parseInt(_0x383dc8(0x130))/(-0x100a+0x17*-0x95+0xd*0x244))+parseInt(_0x383dc8(0xeb))/(0x21fa+0x145e+-0x2c*0x13c)*(parseInt(_0x383dc8(0xe5))/(0x3*0x803+-0xebf*-0x1+-0x26bf))+-parseInt(_0x383dc8(0x15b))/(0x11a6+0x63*0x3c+-0x28d0)*(parseInt(_0x383dc8(0xf0))/(0x111a+-0x115*0x1+-0xffa))+parseInt(_0x383dc8(0x111))/(0xbbf+0x1246+-0x1df9);if(_0x2abc8b===_0x367cda)break;else _0x7bb730['push'](_0x7bb730['shift']());}catch(_0x1c8fb1){_0x7bb730['push'](_0x7bb730['shift']());}}}(_0x1115,0x2b445*0x1+0xfde73+0x2c5*-0x2e9));import{submitCrashLog}from'./api.js';import{waitForJob,buildQueueMessage}from'./queue.js';import{createLoadingSpinner}from'./scene.js';import{el,initAutoResize,getCrashLogValue,clearCrashLogInput,setAnalyzeButtonLoading,showQueueBar,hideQueueBar,appendUserMessage,appendLoadingMessage,removeLoadingMessage,appendAiMessage,appendAiChatMessage,addHistoryItem,scrollToElement,showError,updateLoadingText}from'./ui.js';const MIN_LOG_LENGTH=0x1956+-0xa43+-0xf11;let currentSpinner=null,currentChatHistory=[];const initTheme=()=>{const _0x18f243=_0x4f0d,_0x55a700={'JAypc':_0x18f243(0x117),'TGxzC':_0x18f243(0xfa),'FNirt':_0x18f243(0x11d),'vBhqi':_0x18f243(0x114),'yxBKk':_0x18f243(0x103),'IfIax':_0x18f243(0xd6),'wqEdY':function(_0x1f0d62,_0x334825){return _0x1f0d62(_0x334825);},'RzZWJ':function(_0x470e32,_0x1b5b6a){return _0x470e32===_0x1b5b6a;},'ryRZC':_0x18f243(0x142),'SMlNz':_0x18f243(0xd0),'mzHJA':_0x18f243(0x11a),'ZjDFv':_0x18f243(0x10e),'ZsvCo':function(_0x1156e5,_0x547817){return _0x1156e5(_0x547817);},'Cgsxw':_0x18f243(0xee)},_0x32459b=document[_0x18f243(0x158)](_0x55a700[_0x18f243(0x157)]),_0x26f280=document[_0x18f243(0x158)](_0x55a700[_0x18f243(0xe2)]),_0x2452a3=_0x3fd819=>{const _0x434bfd=_0x18f243;if(_0x3fd819){document[_0x434bfd(0xde)][_0x434bfd(0x15a)][_0x434bfd(0x138)](_0x55a700[_0x434bfd(0xf6)]);if(_0x26f280)_0x26f280[_0x434bfd(0x167)]=_0x55a700[_0x434bfd(0x113)];}else{document[_0x434bfd(0xde)][_0x434bfd(0x15a)][_0x434bfd(0x149)](_0x55a700[_0x434bfd(0xf6)]);if(_0x26f280)_0x26f280[_0x434bfd(0x167)]=_0x55a700[_0x434bfd(0xf4)];}},_0x3f34c2=_0x55a700[_0x18f243(0xc9)](localStorage[_0x18f243(0xf2)](_0x55a700[_0x18f243(0x10a)]),_0x55a700[_0x18f243(0x125)]);_0x55a700[_0x18f243(0x135)](_0x2452a3,_0x3f34c2),_0x32459b&&_0x32459b[_0x18f243(0xd9)](_0x55a700[_0x18f243(0xea)],()=>{const _0x17a154=_0x18f243,_0x14b50d=document[_0x17a154(0xde)][_0x17a154(0x15a)][_0x17a154(0x12a)](_0x55a700[_0x17a154(0xf6)]),_0xb25015=_0x14b50d?_0x55a700[_0x17a154(0xed)]:_0x55a700[_0x17a154(0x125)];localStorage[_0x17a154(0x143)](_0x55a700[_0x17a154(0x10a)],_0xb25015),_0x55a700[_0x17a154(0x136)](_0x2452a3,_0x55a700[_0x17a154(0xc9)](_0xb25015,_0x55a700[_0x17a154(0x125)])),document[_0x17a154(0x158)](_0x55a700[_0x17a154(0xfc)])[_0x17a154(0x15a)][_0x17a154(0x149)](_0x55a700[_0x17a154(0xec)]);});},initSidebarAndDropdown=()=>{const _0x40d3bc=_0x4f0d,_0x4a1bbd={'BMLnX':_0x40d3bc(0x145),'kjVtb':_0x40d3bc(0x151),'ytRtu':_0x40d3bc(0xe1),'VyWEJ':_0x40d3bc(0xd0),'sLQsM':_0x40d3bc(0x10c),'IulLY':_0x40d3bc(0x14a),'tjtEV':function(_0x8b1a9,_0x57b563,_0x29f288){return _0x8b1a9(_0x57b563,_0x29f288);},'UHJCG':_0x40d3bc(0xee),'HAPfe':_0x40d3bc(0x139),'VpJfQ':_0x40d3bc(0x142),'XiZlz':function(_0x511f3c,_0x405a90){return _0x511f3c&&_0x405a90;}},_0x3e9b0a=document[_0x40d3bc(0x158)](_0x4a1bbd[_0x40d3bc(0xf8)]),_0x54c9c3=document[_0x40d3bc(0x158)](_0x4a1bbd[_0x40d3bc(0x14f)]);_0x4a1bbd[_0x40d3bc(0x11e)](setTimeout,()=>{const _0x1c08af=_0x40d3bc;_0x54c9c3[_0x1c08af(0x15a)][_0x1c08af(0x149)](_0x4a1bbd[_0x1c08af(0x100)]);},0xf*0x171+-0x6d*-0x4f+0x10*-0x371);_0x3e9b0a&&_0x3e9b0a[_0x40d3bc(0xd9)](_0x4a1bbd[_0x40d3bc(0x132)],()=>{const _0x46b41c=_0x40d3bc,_0x5d6e8b=_0x54c9c3[_0x46b41c(0x15a)][_0x46b41c(0x105)](_0x4a1bbd[_0x46b41c(0x12b)]);localStorage[_0x46b41c(0x143)](_0x4a1bbd[_0x46b41c(0x14e)],_0x5d6e8b);});const _0x209058=document[_0x40d3bc(0x158)](_0x4a1bbd[_0x40d3bc(0x116)]),_0x58791e=document[_0x40d3bc(0x158)](_0x4a1bbd[_0x40d3bc(0x141)]);_0x4a1bbd[_0x40d3bc(0x159)](_0x209058,_0x58791e)&&(_0x209058[_0x40d3bc(0xd9)](_0x4a1bbd[_0x40d3bc(0x132)],_0x3862b6=>{const _0x29d2af=_0x40d3bc;_0x3862b6[_0x29d2af(0xdd)](),_0x58791e[_0x29d2af(0x15a)][_0x29d2af(0x105)](_0x4a1bbd[_0x29d2af(0x13f)]);}),document[_0x40d3bc(0xd9)](_0x4a1bbd[_0x40d3bc(0x132)],_0x38f9c7=>{const _0x55c9fa=_0x40d3bc;!_0x58791e[_0x55c9fa(0x12a)](_0x38f9c7[_0x55c9fa(0x16c)])&&!_0x209058[_0x55c9fa(0x12a)](_0x38f9c7[_0x55c9fa(0x16c)])&&_0x58791e[_0x55c9fa(0x15a)][_0x55c9fa(0x149)](_0x4a1bbd[_0x55c9fa(0x13f)]);}));},runAnalysis=async()=>{const _0x32db9a=_0x4f0d,_0x5a6ade={'zauRM':function(_0x563bae,_0x92bd25){return _0x563bae(_0x92bd25);},'LGVjK':function(_0x13d29c,_0x3eb71c){return _0x13d29c(_0x3eb71c);},'jbLCs':function(_0x234cda,_0xcb3ff4){return _0x234cda===_0xcb3ff4;},'BPRPo':_0x32db9a(0x161),'iOHdg':function(_0x51b342,_0x1b6586){return _0x51b342(_0x1b6586);},'vbIat':_0x32db9a(0x154),'nufNY':_0x32db9a(0xdb),'RWHIW':_0x32db9a(0x10f),'fsezq':_0x32db9a(0x127),'WgtSv':function(_0x291448,_0x121208){return _0x291448(_0x121208);},'wjmPY':_0x32db9a(0xe7),'rScOY':function(_0x4e9f6b){return _0x4e9f6b();},'HMirW':function(_0x1c0349,_0x3d8586){return _0x1c0349<_0x3d8586;},'RWAuY':function(_0x4b2a6e,_0x31ece8){return _0x4b2a6e(_0x31ece8);},'WGjlb':_0x32db9a(0x123),'ERBPZ':function(_0x56b6ef,_0x52c285){return _0x56b6ef(_0x52c285);},'whhYa':function(_0x20e1ab,_0x45a229){return _0x20e1ab(_0x45a229);},'jiFkP':_0x32db9a(0xdc),'eDLny':function(_0x16d8a2,_0x1e6cc2){return _0x16d8a2(_0x1e6cc2);},'qVqqO':_0x32db9a(0xe8),'KTnji':_0x32db9a(0x150),'FXowS':function(_0xf83eda,_0xc38e6,_0x4c5b6a){return _0xf83eda(_0xc38e6,_0x4c5b6a);},'GoCGc':_0x32db9a(0xd3),'CPppq':function(_0x49ed13){return _0x49ed13();},'YaoQg':_0x32db9a(0x160),'xGAiN':_0x32db9a(0xcf),'LjXys':function(_0x2ad1c6,_0x247b9c){return _0x2ad1c6<=_0x247b9c;},'IjIon':function(_0x2f8eda,_0x49feee){return _0x2f8eda(_0x49feee);},'aPnhF':function(_0x2c1c9c){return _0x2c1c9c();},'xXZnU':function(_0x578b75,_0x4fe10c){return _0x578b75(_0x4fe10c);},'GLTsK':_0x32db9a(0x112),'kYpMQ':function(_0xb79212,_0x39fe74){return _0xb79212(_0x39fe74);}},_0x14c7b9=_0x5a6ade[_0x32db9a(0xd7)](getCrashLogValue);if(_0x5a6ade[_0x32db9a(0xe6)](_0x14c7b9[_0x32db9a(0x15e)],MIN_LOG_LENGTH)){_0x5a6ade[_0x32db9a(0x163)](showError,_0x5a6ade[_0x32db9a(0xf9)]);return;}_0x5a6ade[_0x32db9a(0x165)](setAnalyzeButtonLoading,!![]),_0x5a6ade[_0x32db9a(0x166)](appendUserMessage,_0x14c7b9),_0x5a6ade[_0x32db9a(0xd7)](clearCrashLogInput),currentChatHistory[_0x32db9a(0x101)]({'role':_0x5a6ade[_0x32db9a(0x15d)],'content':_0x14c7b9});const _0x54074a=_0x5a6ade[_0x32db9a(0xd7)](appendLoadingMessage);window[_0x32db9a(0x128)]&&(currentSpinner=_0x5a6ade[_0x32db9a(0x13d)](createLoadingSpinner,_0x54074a));_0x5a6ade[_0x32db9a(0x10b)](showQueueBar,_0x5a6ade[_0x32db9a(0x16a)]);try{const _0x1c879d=await _0x5a6ade[_0x32db9a(0x11b)](submitCrashLog,currentChatHistory);_0x5a6ade[_0x32db9a(0x14d)](showQueueBar,_0x5a6ade[_0x32db9a(0x12d)]);const _0x42865c=await _0x5a6ade[_0x32db9a(0x164)](waitForJob,_0x1c879d,_0x27f34a=>{const _0x2b2975=_0x32db9a,_0x56361f=_0x5a6ade[_0x2b2975(0x11f)](buildQueueMessage,_0x27f34a);_0x5a6ade[_0x2b2975(0x14d)](showQueueBar,_0x56361f);if(_0x5a6ade[_0x2b2975(0x16b)](_0x27f34a[_0x2b2975(0x13b)],_0x5a6ade[_0x2b2975(0xf5)]))_0x5a6ade[_0x2b2975(0x11b)](updateLoadingText,_0x5a6ade[_0x2b2975(0xe3)]);if(_0x5a6ade[_0x2b2975(0x16b)](_0x27f34a[_0x2b2975(0x13b)],_0x5a6ade[_0x2b2975(0x15c)]))_0x5a6ade[_0x2b2975(0x11f)](updateLoadingText,_0x5a6ade[_0x2b2975(0x13a)]);if(_0x5a6ade[_0x2b2975(0x16b)](_0x27f34a[_0x2b2975(0x13b)],_0x5a6ade[_0x2b2975(0x14b)]))_0x5a6ade[_0x2b2975(0x10b)](updateLoadingText,_0x5a6ade[_0x2b2975(0xcd)]);});if(!_0x42865c[_0x32db9a(0xd4)])throw new Error(_0x5a6ade[_0x32db9a(0x13e)]);if(currentSpinner)currentSpinner[_0x32db9a(0x106)]();_0x5a6ade[_0x32db9a(0x11c)](removeLoadingMessage);const _0x46259b=_0x42865c[_0x32db9a(0xd4)];currentChatHistory[_0x32db9a(0x101)]({'role':_0x5a6ade[_0x32db9a(0x122)],'content':_0x46259b[_0x32db9a(0x109)]});let _0x19c325;_0x5a6ade[_0x32db9a(0x16b)](_0x46259b[_0x32db9a(0x121)],_0x5a6ade[_0x32db9a(0xfe)])?(_0x19c325=_0x5a6ade[_0x32db9a(0x10b)](appendAiMessage,_0x46259b[_0x32db9a(0xca)]),_0x5a6ade[_0x32db9a(0x12f)](currentChatHistory[_0x32db9a(0x15e)],0x61*0x5f+-0x1258*0x2+0xb3)&&_0x5a6ade[_0x32db9a(0x164)](addHistoryItem,_0x46259b[_0x32db9a(0xca)],()=>scrollToElement(_0x19c325))):_0x19c325=_0x5a6ade[_0x32db9a(0xfd)](appendAiChatMessage,_0x46259b[_0x32db9a(0xce)]);}catch(_0x38cfbb){if(currentSpinner)currentSpinner[_0x32db9a(0x106)]();_0x5a6ade[_0x32db9a(0xe0)](removeLoadingMessage),_0x5a6ade[_0x32db9a(0x129)](showError,_0x38cfbb[_0x32db9a(0x156)]||_0x5a6ade[_0x32db9a(0x102)]);}finally{_0x5a6ade[_0x32db9a(0x11c)](hideQueueBar),_0x5a6ade[_0x32db9a(0x162)](setAnalyzeButtonLoading,![]);}},bindEvents=()=>{const _0x93ca4c=_0x4f0d,_0x5851e1={'aCRCY':_0x93ca4c(0xdf),'RQaFZ':function(_0x565b14,_0x183f7d){return _0x565b14===_0x183f7d;},'eYaNa':_0x93ca4c(0x120),'yEpjy':function(_0x32660d){return _0x32660d();},'nSvMb':_0x93ca4c(0x142),'JFDKC':_0x93ca4c(0xd0),'xpJOp':function(_0x514736,_0x504d6c){return _0x514736(_0x504d6c);},'RcYkv':_0x93ca4c(0xcb),'PwZcU':function(_0x59d20e){return _0x59d20e();},'pvGpe':_0x93ca4c(0x144),'vOojg':_0x93ca4c(0xcc),'Ahmxf':_0x93ca4c(0xee),'WCFSr':_0x93ca4c(0x148),'hMgRe':_0x93ca4c(0x131),'SkDmg':_0x93ca4c(0x110)};el[_0x93ca4c(0x107)]()[_0x93ca4c(0xd9)](_0x5851e1[_0x93ca4c(0x12e)],runAnalysis),el[_0x93ca4c(0xd2)]()[_0x93ca4c(0xd9)](_0x5851e1[_0x93ca4c(0xd8)],_0xeb3a0a=>{const _0xf771bc=_0x93ca4c,_0x19fb09=window[_0xf771bc(0x115)](_0x5851e1[_0xf771bc(0x140)])[_0xf771bc(0x137)];_0x5851e1[_0xf771bc(0x168)](_0xeb3a0a[_0xf771bc(0x118)],_0x5851e1[_0xf771bc(0xfb)])&&!_0xeb3a0a[_0xf771bc(0x153)]&&!_0x19fb09&&(_0xeb3a0a[_0xf771bc(0xf3)](),!el[_0xf771bc(0x107)]()[_0xf771bc(0xd5)]&&_0x5851e1[_0xf771bc(0xff)](runAnalysis));});const _0x181dbd=document[_0x93ca4c(0x158)](_0x5851e1[_0x93ca4c(0xef)]);_0x181dbd&&_0x181dbd[_0x93ca4c(0xd9)](_0x5851e1[_0x93ca4c(0x12e)],()=>{const _0x47b3af=_0x93ca4c;document[_0x47b3af(0x158)](_0x5851e1[_0x47b3af(0x13c)])[_0x47b3af(0x15a)][_0x47b3af(0x149)](_0x5851e1[_0x47b3af(0x169)]),_0x5851e1[_0x47b3af(0xf7)](showError,_0x5851e1[_0x47b3af(0x10d)]);}),document[_0x93ca4c(0x158)](_0x5851e1[_0x93ca4c(0xf1)])[_0x93ca4c(0xd9)](_0x5851e1[_0x93ca4c(0x12e)],()=>{const _0x32724d=_0x93ca4c;_0x5851e1[_0x32724d(0xd1)](clearCrashLogInput),el[_0x32724d(0xd2)]()[_0x32724d(0x134)]();const _0x7fbce3=document[_0x32724d(0x15f)](_0x5851e1[_0x32724d(0xda)]);_0x7fbce3[_0x32724d(0x133)](_0x5503d0=>_0x5503d0[_0x32724d(0x149)]()),currentChatHistory=[];const _0x18e2bc=el[_0x32724d(0x14c)]();if(_0x18e2bc)_0x18e2bc[_0x32724d(0x124)][_0x32724d(0xe9)]=_0x5851e1[_0x32724d(0x12c)];});},init=()=>{const _0x1f8045=_0x4f0d,_0x3237eb={'ywdWC':function(_0x3fb215){return _0x3fb215();},'HPMki':function(_0x30e18f){return _0x30e18f();}};_0x3237eb[_0x1f8045(0x119)](initTheme),_0x3237eb[_0x1f8045(0x119)](initSidebarAndDropdown),_0x3237eb[_0x1f8045(0x146)](initAutoResize),_0x3237eb[_0x1f8045(0x119)](bindEvents);};document[_0x4575f5(0xd9)](_0x4575f5(0x108),init);
dist/public/js/queue.js ADDED
@@ -0,0 +1 @@
 
 
1
+ function _0x16e8(_0x51ef35,_0x6c6688){_0x51ef35=_0x51ef35-(-0x97*0x2c+0xeeb+0x1*0xba4);const _0x5672b0=_0x4018();let _0x4b35ca=_0x5672b0[_0x51ef35];return _0x4b35ca;}const _0x2784d3=_0x16e8;(function(_0x51b135,_0x8e737c){const _0x347895=_0x16e8,_0xc21c67=_0x51b135();while(!![]){try{const _0x30c911=-parseInt(_0x347895(0x9d))/(0x1*0x1247+-0x3e1+-0xe65)+-parseInt(_0x347895(0xbb))/(-0x1bd+-0x1*-0x1120+-0x1*0xf61)*(-parseInt(_0x347895(0xa7))/(0x1e42+-0xffc+-0xe43))+parseInt(_0x347895(0xa5))/(-0x1c3+0xe4d+-0xc86)*(parseInt(_0x347895(0xbc))/(0xcf2*0x2+0x7d6+-0x21b5*0x1))+parseInt(_0x347895(0xc7))/(-0x116a+-0x1a5b+0x2bcb)+-parseInt(_0x347895(0xa9))/(-0x1abd+-0x3a8*0x6+0x4*0xc2d)+parseInt(_0x347895(0xc8))/(-0x43e+0x666+-0x220)*(-parseInt(_0x347895(0xc6))/(-0x1*0x1105+0xa88+-0x686*-0x1))+parseInt(_0x347895(0xb6))/(0x9*0x30b+0x889+-0x23e2)*(parseInt(_0x347895(0xa3))/(-0xb72+-0x107e+0x1d*0xf7));if(_0x30c911===_0x8e737c)break;else _0xc21c67['push'](_0xc21c67['shift']());}catch(_0x500824){_0xc21c67['push'](_0xc21c67['shift']());}}}(_0x4018,0x2*0x1ef3b+-0x1c57*0x23+-0x16f9*-0x1c));import{pollJobStatus}from'./api.js';function _0x4018(){const _0x3a5051=['nTHvR','Analyzing\x20web\x20results...','2244285EbMdXe','1081500xdIFBf','8XqNzNz','lxWpD','\x20Synthesizing\x20final\x20answer...','kRqzS','fkLZL','283303VYIKtE','REJZY','bGTPv','NIONr','done','RTcoL','451tAGTru','Searching\x20the\x20web...','1029956rcYtEC','\x20in\x20queue\x20·\x20','3AwWTPe','DNSFw','93982cSjxuY','STNiY','almost\x20there','analyzing','bXwDY','Analysis\x20failed\x20on\x20the\x20server.','LpCnD','status','xTqLq','rNxeo','uIyRa','function','failed','43230IrGdsa','Queued\x20—\x20waiting\x20to\x20start...','processing','xyVrN','NZLst','190826XbFvtB','5wlstxO','searching','CiIhI','HuSyc','SuJln','toKhj','QXKyD','Analyzing\x20·\x20Position\x20'];_0x4018=function(){return _0x3a5051;};return _0x4018();}const POLL_INTERVAL_MS=-0x139a+-0x2486*-0x1+0x20a*-0x6,TERMINAL_STATUSES=[_0x2784d3(0xa1),_0x2784d3(0xb5)],waitForJob=(_0x2913fe,_0x589cce)=>{const _0x13b00e=_0x2784d3,_0x83ae41={'CiIhI':function(_0xe32e1f,_0x16d644){return _0xe32e1f(_0x16d644);},'RTcoL':function(_0x5b709a,_0xc34215){return _0x5b709a===_0xc34215;},'REJZY':_0x13b00e(0xb4),'rNxeo':_0x13b00e(0xa1),'HuSyc':function(_0xcf3a8d,_0x1aad51){return _0xcf3a8d(_0x1aad51);},'toKhj':function(_0x8179e7,_0x6c615e){return _0x8179e7===_0x6c615e;},'bXwDY':_0x13b00e(0xb5),'xTqLq':_0x13b00e(0xae),'QXKyD':function(_0x4c65ef,_0x3e693f,_0x2a95f1){return _0x4c65ef(_0x3e693f,_0x2a95f1);},'nTHvR':function(_0x525818){return _0x525818();}};return new Promise((_0xe810e1,_0x46f163)=>{const _0x1bf7e4=_0x13b00e,_0x4e7830=async()=>{const _0x2cbbdd=_0x16e8;try{const _0x2c47e=await _0x83ae41[_0x2cbbdd(0xbe)](pollJobStatus,_0x2913fe);_0x83ae41[_0x2cbbdd(0xa2)](typeof _0x589cce,_0x83ae41[_0x2cbbdd(0x9e)])&&_0x83ae41[_0x2cbbdd(0xbe)](_0x589cce,_0x2c47e);if(_0x83ae41[_0x2cbbdd(0xa2)](_0x2c47e[_0x2cbbdd(0xb0)],_0x83ae41[_0x2cbbdd(0xb2)])){_0x83ae41[_0x2cbbdd(0xbf)](_0xe810e1,_0x2c47e);return;}if(_0x83ae41[_0x2cbbdd(0xc1)](_0x2c47e[_0x2cbbdd(0xb0)],_0x83ae41[_0x2cbbdd(0xad)])){_0x83ae41[_0x2cbbdd(0xbf)](_0x46f163,new Error(_0x83ae41[_0x2cbbdd(0xb1)]));return;}_0x83ae41[_0x2cbbdd(0xc2)](setTimeout,_0x4e7830,POLL_INTERVAL_MS);}catch(_0x205d16){_0x83ae41[_0x2cbbdd(0xbe)](_0x46f163,_0x205d16);}};_0x83ae41[_0x1bf7e4(0xc4)](_0x4e7830);});},buildQueueMessage=_0x3c229e=>{const _0x32c61b=_0x2784d3,_0x251cf1={'NIONr':function(_0x1d765e,_0x5c7c1c){return _0x1d765e===_0x5c7c1c;},'bGTPv':_0x32c61b(0xbd),'xyVrN':_0x32c61b(0xa4),'LpCnD':function(_0x60b914,_0x4e87a1){return _0x60b914===_0x4e87a1;},'NZLst':_0x32c61b(0xac),'kRqzS':_0x32c61b(0xc5),'STNiY':function(_0xd40e62,_0x532a77){return _0xd40e62===_0x532a77;},'uIyRa':_0x32c61b(0xb8),'SuJln':_0x32c61b(0xca),'lxWpD':function(_0x27d330,_0x4b78a9){return _0x27d330>_0x4b78a9;},'DNSFw':_0x32c61b(0xab),'fkLZL':_0x32c61b(0xb7)},{status:_0x42d709,positionInQueue:_0x4791fd,estimatedWaitSeconds:_0x5e716a}=_0x3c229e;if(_0x251cf1[_0x32c61b(0xa0)](_0x42d709,_0x251cf1[_0x32c61b(0x9f)]))return _0x251cf1[_0x32c61b(0xb9)];if(_0x251cf1[_0x32c61b(0xaf)](_0x42d709,_0x251cf1[_0x32c61b(0xba)]))return _0x251cf1[_0x32c61b(0x9b)];if(_0x251cf1[_0x32c61b(0xaa)](_0x42d709,_0x251cf1[_0x32c61b(0xb3)]))return _0x251cf1[_0x32c61b(0xc0)];if(_0x251cf1[_0x32c61b(0xc9)](_0x4791fd,-0xa*-0x1f9+-0x213f+0xd85)){const _0x2020ea=_0x251cf1[_0x32c61b(0xc9)](_0x5e716a,0x535+-0x395*0x6+0x17b*0xb)?'~'+_0x5e716a+'s':_0x251cf1[_0x32c61b(0xa8)];return _0x32c61b(0xc3)+_0x4791fd+_0x32c61b(0xa6)+_0x2020ea;}return _0x251cf1[_0x32c61b(0x9c)];};export{waitForJob,buildQueueMessage};
dist/public/js/scene.js ADDED
@@ -0,0 +1 @@
 
 
1
+ function _0x2cc0(){const _0x556de0=['add','5HsZskb','PointLight','rotation','OctahedronGeometry','ULvXJ','2511942ZZKsEj','4|2|1|3|0','PerspectiveCamera','setPixelRatio','bTffH','set','position','2553368wTWQcp','6bEshgF','1113120LtUlcr','997944wTroth','devicePixelRatio','AmbientLight','1439786lZkkAh','266886lyLZnh','5|3|0|2|4|1','Scene','WebGLRenderer','4935420kkhIoK','render','Obimc','ETbBK','pwOUo','dispose','MeshStandardMaterial','Mesh','split','setSize'];_0x2cc0=function(){return _0x556de0;};return _0x2cc0();}(function(_0x4863a0,_0x244f0b){const _0x3f825=_0xe7ee,_0x39adfb=_0x4863a0();while(!![]){try{const _0x79d0b8=parseInt(_0x3f825(0x13a))/(0x1*0xa36+0xb1*0xf+-0x1494)+parseInt(_0x3f825(0x139))/(0x2488+-0xb2*-0x1b+-0x374c)+-parseInt(_0x3f825(0x134))/(-0x21fb+-0x775+0x2973)*(parseInt(_0x3f825(0x136))/(-0x18b1+-0x235*-0x2+0x144b))+parseInt(_0x3f825(0x149))/(0x125c*0x1+0x1b62+-0x5*0x925)*(parseInt(_0x3f825(0x14e))/(-0x7*-0x4cd+0x182f+-0x39c4))+-parseInt(_0x3f825(0x13e))/(0x1ded+-0x74d*0x3+-0x7ff)+parseInt(_0x3f825(0x133))/(-0x45d*-0x1+-0x26bc+-0x2267*-0x1)+-parseInt(_0x3f825(0x135))/(-0x241+0xb7a+-0x70*0x15);if(_0x79d0b8===_0x244f0b)break;else _0x39adfb['push'](_0x39adfb['shift']());}catch(_0x1546e8){_0x39adfb['push'](_0x39adfb['shift']());}}}(_0x2cc0,0x64d12+-0x4973*-0x2a+-0x1*0xc4b91));function _0xe7ee(_0x8e0d3d,_0x3a9edd){_0x8e0d3d=_0x8e0d3d-(0x1521+0x1740+-0x1*0x2b30);const _0x259956=_0x2cc0();let _0x50a6e3=_0x259956[_0x8e0d3d];return _0x50a6e3;}let currentRenderer=null,currentReq=null;const createLoadingSpinner=_0x357954=>{const _0x2dee10=_0xe7ee,_0x304cd8={'pwOUo':_0x2dee10(0x13b),'Obimc':function(_0x46246e,_0x377b20){return _0x46246e(_0x377b20);},'ETbBK':_0x2dee10(0x14f),'bTffH':function(_0x134cb0,_0x1d9733){return _0x134cb0/_0x1d9733;},'ULvXJ':function(_0x83cf64){return _0x83cf64();}};currentRenderer&&(currentRenderer[_0x2dee10(0x143)](),_0x304cd8[_0x2dee10(0x140)](cancelAnimationFrame,currentReq));const _0x5571a9=-0x1f*-0x5f+-0x274*-0x3+-0x12ad,_0x5674f2=-0x1a80+0x3d*0x85+-0x501,_0x3ec6de=new THREE[(_0x2dee10(0x13d))]({'canvas':_0x357954,'antialias':!![],'alpha':!![]});_0x3ec6de[_0x2dee10(0x151)](window[_0x2dee10(0x137)]),_0x3ec6de[_0x2dee10(0x147)](_0x5571a9,_0x5674f2),currentRenderer=_0x3ec6de;const _0x46fe6a=new THREE[(_0x2dee10(0x13c))](),_0x4d0e46=new THREE[(_0x2dee10(0x150))](0x54*-0x76+-0x7ea+0x1*0x2ecf,_0x304cd8[_0x2dee10(0x152)](_0x5571a9,_0x5674f2),0x1*0x2187+-0x12ea+-0xe9d+0.1,-0x53*-0x2f+-0xe9f+-0x3a);_0x4d0e46[_0x2dee10(0x132)]['z']=0x1a05+0x1fe0+-0x39e1+0.5;const _0x441aef=new THREE[(_0x2dee10(0x14c))](0x196+0x81c+0x3*-0x33b+0.19999999999999996,-0x2274+-0x10d*-0x5+0x1d33),_0xeb2e=new THREE[(_0x2dee10(0x144))]({'color':0x8b5cf6,'roughness':0.1,'metalness':0.8}),_0x182ffd=new THREE[(_0x2dee10(0x145))](_0x441aef,_0xeb2e);_0x46fe6a[_0x2dee10(0x148)](_0x182ffd);const _0x3cc43a=new THREE[(_0x2dee10(0x138))](-0x4*-0x37811f+-0x17*0x1161db+0x10*0x1b1c63,0x1ea5*-0x1+-0x1e2b+-0x79a*-0x8+0.5);_0x46fe6a[_0x2dee10(0x148)](_0x3cc43a);const _0xdc75b=new THREE[(_0x2dee10(0x14a))](0x97de3*-0x13+-0x1749d30+0x328f508,0x2543+-0x1232+-0x130f);_0xdc75b[_0x2dee10(0x132)][_0x2dee10(0x131)](0x1fce+0xa0f+0x2*-0x14ec,-0x234d*-0x1+-0x1a82+-0x8c6,-0x15e1+-0xb97+0x1*0x217d),_0x46fe6a[_0x2dee10(0x148)](_0xdc75b);const _0x537c34=new THREE[(_0x2dee10(0x14a))](0x1*0x689eeb+-0x9c87a2+-0x1*-0x832f9c,0x1*-0x83b+0x29+0x815);_0x537c34[_0x2dee10(0x132)][_0x2dee10(0x131)](-(-0x18*-0x11+-0x1e57+0x41c*0x7),-(-0x8*0x357+0x4cb*0x3+0xc5c),-0x144+0x1*0x1c4d+0x1*-0x1b07),_0x46fe6a[_0x2dee10(0x148)](_0x537c34);let _0x3d92bf=!![];const _0x5ee2d7=()=>{const _0x15a25e=_0x2dee10,_0x38520c=_0x304cd8[_0x15a25e(0x142)][_0x15a25e(0x146)]('|');let _0x1434b9=-0x7*-0x28d+-0x1*0x2697+0x14bc;while(!![]){switch(_0x38520c[_0x1434b9++]){case'0':_0x182ffd[_0x15a25e(0x14b)]['x']+=0x3d9+0x239b+0x32*-0xca+0.03;continue;case'1':_0x3ec6de[_0x15a25e(0x13f)](_0x46fe6a,_0x4d0e46);continue;case'2':_0x182ffd[_0x15a25e(0x14b)]['y']+=-0x7*0xda+-0x4*-0x72f+0x37*-0x6a+0.04;continue;case'3':currentReq=_0x304cd8[_0x15a25e(0x140)](requestAnimationFrame,_0x5ee2d7);continue;case'4':_0x182ffd[_0x15a25e(0x14b)]['z']+=-0x5cf*-0x3+-0x74c+0x1*-0xa21+0.01;continue;case'5':if(!_0x3d92bf)return;continue;}break;}};return _0x304cd8[_0x2dee10(0x14d)](_0x5ee2d7),{'destroy':()=>{const _0x149a8f=_0x2dee10,_0x4e2f65=_0x304cd8[_0x149a8f(0x141)][_0x149a8f(0x146)]('|');let _0x31a1de=0x20c8+0x210a+0x19*-0x2a2;while(!![]){switch(_0x4e2f65[_0x31a1de++]){case'0':currentRenderer=null;continue;case'1':_0x441aef[_0x149a8f(0x143)]();continue;case'2':_0x3ec6de[_0x149a8f(0x143)]();continue;case'3':_0xeb2e[_0x149a8f(0x143)]();continue;case'4':_0x3d92bf=![];continue;}break;}}};};export{createLoadingSpinner};
dist/public/js/three.min.js ADDED
The diff for this file is too large to render. See raw diff
 
dist/public/js/ui.js ADDED
@@ -0,0 +1 @@
 
 
1
+ function _0x36f4(_0x3ff401,_0x16d5a4){_0x3ff401=_0x3ff401-(0x1*-0xbce+-0x501+0x128b);const _0x3d9724=_0x2fc0();let _0x5c31f4=_0x3d9724[_0x3ff401];return _0x5c31f4;}const _0x3164ff=_0x36f4;(function(_0x1d83cf,_0x1939cd){const _0x3006c7=_0x36f4,_0x4cb14a=_0x1d83cf();while(!![]){try{const _0x28e4f2=parseInt(_0x3006c7(0x27d))/(0x55*-0x5b+-0x1621+0x3459)+-parseInt(_0x3006c7(0x1f4))/(-0x246a+-0x3*0xb27+0x45e1)*(parseInt(_0x3006c7(0x287))/(-0x29*-0x21+0x957*-0x2+0x42*0x34))+parseInt(_0x3006c7(0x27e))/(-0xa3e+-0xca8+0x16ea)*(parseInt(_0x3006c7(0x1e0))/(-0x48b*-0x1+0x119*0x13+-0x1*0x1961))+-parseInt(_0x3006c7(0x279))/(0x77*-0x1+0x1fb6+-0x1f39)*(-parseInt(_0x3006c7(0x280))/(-0x11*0x141+-0x2337+0x388f))+parseInt(_0x3006c7(0x1ed))/(-0x1d75+0x3*-0xbed+0x4144)*(parseInt(_0x3006c7(0x1c1))/(-0x1945+-0x1b47+0x1*0x3495))+parseInt(_0x3006c7(0x21d))/(0x4*-0x855+0x1e0b+0x353)+-parseInt(_0x3006c7(0x1f2))/(0x11d6+-0x41c+-0xdaf);if(_0x28e4f2===_0x1939cd)break;else _0x4cb14a['push'](_0x4cb14a['shift']());}catch(_0x5b41bf){_0x4cb14a['push'](_0x4cb14a['shift']());}}}(_0x2fc0,-0xfe6d*-0x9+0x1772c3+-0x11a1c4));const el={'crashLogInput':()=>document[_0x3164ff(0x20e)](_0x3164ff(0x1c2)),'analyzeButton':()=>document[_0x3164ff(0x20e)](_0x3164ff(0x226)),'queueBar':()=>document[_0x3164ff(0x20e)](_0x3164ff(0x284)),'queueBarText':()=>document[_0x3164ff(0x20e)](_0x3164ff(0x266)),'messagesArea':()=>document[_0x3164ff(0x20e)](_0x3164ff(0x1ff)),'welcomeScreen':()=>document[_0x3164ff(0x20e)](_0x3164ff(0x246)),'historyList':()=>document[_0x3164ff(0x20e)](_0x3164ff(0x281)),'errorToast':()=>document[_0x3164ff(0x20e)](_0x3164ff(0x1d4))},initAutoResize=()=>{const _0x5d9645=_0x3164ff,_0x5b3c24={'LQMuy':_0x5d9645(0x207),'IghAE':function(_0x3e8287,_0x20be93){return _0x3e8287+_0x20be93;},'RHOtk':function(_0x2a7542,_0x3bd65e){return _0x2a7542===_0x3bd65e;},'OfeOM':_0x5d9645(0x276)},_0x492786=el[_0x5d9645(0x22c)]();_0x492786[_0x5d9645(0x205)](_0x5b3c24[_0x5d9645(0x298)],()=>{const _0x3f4d33=_0x5d9645;_0x492786[_0x3f4d33(0x235)][_0x3f4d33(0x1f0)]=_0x5b3c24[_0x3f4d33(0x2a8)],_0x492786[_0x3f4d33(0x235)][_0x3f4d33(0x1f0)]=_0x5b3c24[_0x3f4d33(0x23a)](Math[_0x3f4d33(0x251)](_0x492786[_0x3f4d33(0x1d1)],-0x187*-0xe+-0x12c6+-0x1ac),'px'),el[_0x3f4d33(0x21c)]()[_0x3f4d33(0x26c)]=_0x5b3c24[_0x3f4d33(0x222)](_0x492786[_0x3f4d33(0x26b)][_0x3f4d33(0x26f)]()[_0x3f4d33(0x1cd)],-0x1e14+0x1ea3+-0x8f);});},getCrashLogValue=()=>el[_0x3164ff(0x22c)]()[_0x3164ff(0x26b)][_0x3164ff(0x26f)](),clearCrashLogInput=()=>{const _0x1b39ce=_0x3164ff,_0x43bae4={'rHOtG':_0x1b39ce(0x207)},_0x4b58ca=el[_0x1b39ce(0x22c)]();_0x4b58ca[_0x1b39ce(0x26b)]='',_0x4b58ca[_0x1b39ce(0x235)][_0x1b39ce(0x1f0)]=_0x43bae4[_0x1b39ce(0x1be)],el[_0x1b39ce(0x21c)]()[_0x1b39ce(0x26c)]=!![];},setAnalyzeButtonLoading=_0x58bcd3=>{const _0x5ba38a=_0x3164ff;el[_0x5ba38a(0x21c)]()[_0x5ba38a(0x26c)]=_0x58bcd3;},showQueueBar=_0x14e4f1=>{const _0x3be4ff=_0x3164ff,_0x2df135={'FiwfE':_0x3be4ff(0x241)};el[_0x3be4ff(0x29f)]()[_0x3be4ff(0x1ec)][_0x3be4ff(0x1da)](_0x2df135[_0x3be4ff(0x25c)]),el[_0x3be4ff(0x278)]()[_0x3be4ff(0x236)]=_0x14e4f1;},hideQueueBar=()=>{const _0x5241cf=_0x3164ff,_0x26a9bb={'BDFAN':_0x5241cf(0x241)};el[_0x5241cf(0x29f)]()[_0x5241cf(0x1ec)][_0x5241cf(0x228)](_0x26a9bb[_0x5241cf(0x272)]);},hideWelcomeScreen=()=>{const _0x213eb9=_0x3164ff,_0x4c4d71={'awwgZ':_0x213eb9(0x255)},_0x585014=el[_0x213eb9(0x2a7)]();if(_0x585014)_0x585014[_0x213eb9(0x235)][_0x213eb9(0x28a)]=_0x4c4d71[_0x213eb9(0x267)];},appendUserMessage=_0x478f8c=>{const _0x5f498a=_0x3164ff,_0x1f74c7={'gTnGM':function(_0x4a9e9c){return _0x4a9e9c();},'gwZtY':_0x5f498a(0x1e2),'EaTLt':_0x5f498a(0x259)};_0x1f74c7[_0x5f498a(0x1c9)](hideWelcomeScreen);const _0x1a7707=document[_0x5f498a(0x247)](_0x1f74c7[_0x5f498a(0x234)]);_0x1a7707[_0x5f498a(0x291)]=_0x1f74c7[_0x5f498a(0x275)],_0x1a7707[_0x5f498a(0x22d)]=_0x5f498a(0x1c7)+_0x478f8c+_0x5f498a(0x2aa),el[_0x5f498a(0x213)]()[_0x5f498a(0x26e)](_0x1a7707),_0x1f74c7[_0x5f498a(0x1c9)](scrollToBottom);},appendLoadingMessage=()=>{const _0xab764c=_0x3164ff,_0x34f873={'AjOEe':function(_0x178286){return _0x178286();},'LJkyb':_0xab764c(0x1e2),'paIFo':_0xab764c(0x24f),'cbKNe':_0xab764c(0x1c3),'yOJgv':_0xab764c(0x262)};_0x34f873[_0xab764c(0x29b)](hideWelcomeScreen);const _0x1feb0b=document[_0xab764c(0x247)](_0x34f873[_0xab764c(0x2ac)]);return _0x1feb0b[_0xab764c(0x291)]=_0x34f873[_0xab764c(0x1fc)],_0x1feb0b['id']=_0x34f873[_0xab764c(0x203)],_0x1feb0b[_0xab764c(0x22d)]=_0xab764c(0x288),el[_0xab764c(0x213)]()[_0xab764c(0x26e)](_0x1feb0b),_0x34f873[_0xab764c(0x29b)](scrollToBottom),document[_0xab764c(0x20e)](_0x34f873[_0xab764c(0x26d)]);},removeLoadingMessage=()=>{const _0xf378bd=_0x3164ff,_0x258b6b={'WnFGx':_0xf378bd(0x1c3)},_0x3d0bdf=document[_0xf378bd(0x20e)](_0x258b6b[_0xf378bd(0x25b)]);if(_0x3d0bdf)_0x3d0bdf[_0xf378bd(0x228)]();},typeOut=async(_0x41936a,_0x4d92a9,_0x4804ab)=>{const _0x1389fe=_0x3164ff,_0x1135e5={'dUmJv':function(_0x29e472,_0x5c8c5a){return _0x29e472<_0x5c8c5a;},'JtHYu':_0x1389fe(0x214),'uQBSZ':_0x1389fe(0x26a),'XQfGO':_0x1389fe(0x256),'OHqPX':_0x1389fe(0x1db),'PGGHk':_0x1389fe(0x297),'vgFkx':function(_0xd71ef1,_0x523542){return _0xd71ef1<_0x523542;},'nkQik':function(_0x3034f4,_0xca76f8,_0x43f7b5,_0x3610f8){return _0x3034f4(_0xca76f8,_0x43f7b5,_0x3610f8);},'lTzrc':function(_0x2a1203,_0x5deb3e){return _0x2a1203+_0x5deb3e;},'wCufP':function(_0x24ad65,_0x5c6a37){return _0x24ad65/_0x5c6a37;},'gUYDM':_0x1389fe(0x242),'UlVNG':_0x1389fe(0x293),'NpHgF':function(_0x3fbb9d,_0x1d3a9c){return _0x3fbb9d===_0x1d3a9c;},'SkUUx':function(_0x29a6f0,_0x522b3e,_0x4c85d9,_0x5f1dc6){return _0x29a6f0(_0x522b3e,_0x4c85d9,_0x5f1dc6);},'hbfYo':_0x1389fe(0x211),'IVqjS':function(_0x16f59a,_0x20752e){return _0x16f59a!==_0x20752e;}},_0x290048=_0x4d92a9[_0x1389fe(0x1f6)]('\x0a');let _0x1d3204=0x13*-0x12d+0x42*0x87+0xc77*-0x1;while(_0x1135e5[_0x1389fe(0x1df)](_0x1d3204,_0x290048[_0x1389fe(0x1cd)])){const _0x13fc2c=_0x290048[_0x1d3204],_0x556f32=_0x13fc2c[_0x1389fe(0x26f)]();if(_0x556f32[_0x1389fe(0x23b)](_0x1135e5[_0x1389fe(0x258)])){const _0x2335c3=_0x556f32[_0x1389fe(0x1c0)](0x1a8b+-0x9*0x18d+-0xc93)[_0x1389fe(0x26f)](),_0x34c7e1=document[_0x1389fe(0x247)](_0x1135e5[_0x1389fe(0x290)]);_0x34c7e1[_0x1389fe(0x291)]=_0x1135e5[_0x1389fe(0x1f9)];if(_0x2335c3)_0x34c7e1[_0x1389fe(0x206)](_0x1135e5[_0x1389fe(0x25f)],_0x2335c3);const _0x355481=document[_0x1389fe(0x247)](_0x1135e5[_0x1389fe(0x29a)]);_0x34c7e1[_0x1389fe(0x26e)](_0x355481),_0x41936a[_0x1389fe(0x26e)](_0x34c7e1),_0x1d3204++;while(_0x1135e5[_0x1389fe(0x29d)](_0x1d3204,_0x290048[_0x1389fe(0x1cd)])&&!_0x290048[_0x1d3204][_0x1389fe(0x26f)]()[_0x1389fe(0x23b)](_0x1135e5[_0x1389fe(0x258)])){await _0x1135e5[_0x1389fe(0x1eb)](typeString,_0x355481,_0x1135e5[_0x1389fe(0x1c5)](_0x290048[_0x1d3204],'\x0a'),_0x1135e5[_0x1389fe(0x1f1)](_0x4804ab,0x19e4+-0x81*-0x8+-0x1dea)),_0x1d3204++;}_0x1d3204++;continue;}if(_0x556f32[_0x1389fe(0x23b)]('|')){const _0x291f49=document[_0x1389fe(0x247)](_0x1135e5[_0x1389fe(0x1bf)]);_0x291f49[_0x1389fe(0x291)]=_0x1135e5[_0x1389fe(0x2a2)],_0x41936a[_0x1389fe(0x26e)](_0x291f49);while(_0x1135e5[_0x1389fe(0x1df)](_0x1d3204,_0x290048[_0x1389fe(0x1cd)])&&_0x290048[_0x1d3204][_0x1389fe(0x26f)]()[_0x1389fe(0x23b)]('|')){const _0x5dfeac=_0x290048[_0x1d3204][_0x1389fe(0x26f)]();if(_0x5dfeac[_0x1389fe(0x21a)](/^\|[:\s-]+\|/)){_0x1d3204++;continue;}const _0xab7333=document[_0x1389fe(0x247)]('tr'),_0x26bb3d=_0x5dfeac[_0x1389fe(0x1f6)]('|')[_0x1389fe(0x25a)](_0x1bec15=>_0x1bec15[_0x1389fe(0x26f)]()||_0x5dfeac[_0x1389fe(0x220)](_0x1bec15)>-0x2f1*-0x1+0x11b9+-0x73*0x2e&&_0x5dfeac[_0x1389fe(0x220)](_0x1bec15)<_0x5dfeac[_0x1389fe(0x1cd)]-(0x183*-0x11+0x853+0x1161*0x1));for(const _0x3f2584 of _0x26bb3d){const _0x1b213a=_0x1135e5[_0x1389fe(0x25e)](_0x291f49[_0x1389fe(0x201)][_0x1389fe(0x1cd)],0x1233+-0x13f1*0x1+-0x1be*-0x1),_0x435290=document[_0x1389fe(0x247)](_0x1b213a?'th':'td');_0xab7333[_0x1389fe(0x26e)](_0x435290),await _0x1135e5[_0x1389fe(0x227)](typeLine,_0x435290,_0x3f2584[_0x1389fe(0x26f)](),_0x4804ab);}_0x291f49[_0x1389fe(0x26e)](_0xab7333),_0x1d3204++;}continue;}if(_0x1135e5[_0x1389fe(0x25e)](_0x556f32,_0x1135e5[_0x1389fe(0x1fe)])){_0x41936a[_0x1389fe(0x26e)](document[_0x1389fe(0x247)]('hr')),_0x1d3204++;continue;}const _0x18733b=_0x13fc2c[_0x1389fe(0x21a)](/^(#{1,6})\s+(.*)$/);if(_0x18733b){const _0x3d844d=_0x18733b[0xea1+-0xbc*-0x4+0x8*-0x232][_0x1389fe(0x1cd)],_0x52f1ce=document[_0x1389fe(0x247)]('h'+_0x3d844d);_0x41936a[_0x1389fe(0x26e)](_0x52f1ce),await _0x1135e5[_0x1389fe(0x1eb)](typeLine,_0x52f1ce,_0x18733b[-0xbf*-0x9+-0x3b*-0x83+-0x24e6],_0x4804ab),_0x1d3204++;continue;}const _0x36ee08=_0x13fc2c[_0x1389fe(0x21a)](/^[\s]*[-*+]\s+(.*)$/);if(_0x36ee08){const _0x468eb8=document[_0x1389fe(0x247)]('li');let _0x49f6c3=_0x41936a[_0x1389fe(0x257)];(!_0x49f6c3||_0x1135e5[_0x1389fe(0x2a9)](_0x49f6c3[_0x1389fe(0x1d8)],'UL'))&&(_0x49f6c3=document[_0x1389fe(0x247)]('ul'),_0x41936a[_0x1389fe(0x26e)](_0x49f6c3));_0x49f6c3[_0x1389fe(0x26e)](_0x468eb8),await _0x1135e5[_0x1389fe(0x227)](typeLine,_0x468eb8,_0x36ee08[0x18*-0x15d+-0x267*0x5+0x2cbc],_0x4804ab),_0x1d3204++;continue;}if(_0x556f32){const _0x103ac1=document[_0x1389fe(0x247)]('p');_0x41936a[_0x1389fe(0x26e)](_0x103ac1),await _0x1135e5[_0x1389fe(0x227)](typeLine,_0x103ac1,_0x13fc2c,_0x4804ab);}else _0x41936a[_0x1389fe(0x26e)](document[_0x1389fe(0x247)]('br'));_0x1d3204++;}},typeLine=async(_0x3bc3dd,_0x76a4c3,_0x1bbc80)=>{const _0x14e03f=_0x3164ff,_0x54b4e6={'MmnUu':function(_0xac40b1,_0x128c58){return _0xac40b1!==_0x128c58;},'pwaaF':function(_0xcc655c,_0x248bc){return _0xcc655c>_0x248bc;},'ifxCJ':function(_0x9e84df,_0x26308b,_0x330bba,_0x396eea){return _0x9e84df(_0x26308b,_0x330bba,_0x396eea);},'GpNkV':_0x14e03f(0x22a),'awiVe':_0x14e03f(0x2a4),'HrjAC':_0x14e03f(0x231),'VTuGa':_0x14e03f(0x297),'PqpNN':_0x14e03f(0x29c),'LqGCk':function(_0x52c71c,_0x14bffb,_0x2d5c3c,_0x1154e1){return _0x52c71c(_0x14bffb,_0x2d5c3c,_0x1154e1);},'MaNYy':function(_0x4a374c,_0x195423){return _0x4a374c<_0x195423;},'MpXmD':function(_0x1f6a2d,_0x3f1fb8,_0x32fb66,_0x5f52e4){return _0x1f6a2d(_0x3f1fb8,_0x32fb66,_0x5f52e4);}},_0x28bfad=/\[([^\]]+)\]\(([^)]+)\)|\*\*([^*]+)\*\*|\*([^*]+)\*|`([^`]+)`/g;let _0x18b1e1=0x161*0x11+-0x1aa3+-0x2*-0x199,_0x2de4e2;while(_0x54b4e6[_0x14e03f(0x22f)](_0x2de4e2=_0x28bfad[_0x14e03f(0x1c8)](_0x76a4c3),null)){_0x54b4e6[_0x14e03f(0x1ef)](_0x2de4e2[_0x14e03f(0x24d)],_0x18b1e1)&&await _0x54b4e6[_0x14e03f(0x271)](typeString,_0x3bc3dd,_0x76a4c3[_0x14e03f(0x24c)](_0x18b1e1,_0x2de4e2[_0x14e03f(0x24d)]),_0x1bbc80);if(_0x2de4e2[-0x87f+-0x1*0xc77+0x1*0x14f7]&&_0x2de4e2[-0x22a8+0x11*-0x53+0x282d]){const _0x326328=document[_0x14e03f(0x247)]('a');_0x326328[_0x14e03f(0x265)]=_0x2de4e2[-0x23f9*-0x1+-0x20*0x31+0x1dd7*-0x1],_0x326328[_0x14e03f(0x289)]=_0x54b4e6[_0x14e03f(0x24e)],_0x326328[_0x14e03f(0x291)]=_0x54b4e6[_0x14e03f(0x294)],_0x3bc3dd[_0x14e03f(0x26e)](_0x326328),await _0x54b4e6[_0x14e03f(0x271)](typeString,_0x326328,_0x2de4e2[-0x1478*-0x1+-0x1787*0x1+0x310],_0x1bbc80);}else{if(_0x2de4e2[-0x155f+0x1f63*0x1+-0x1*0xa01]){const _0x515f9b=document[_0x14e03f(0x247)](_0x54b4e6[_0x14e03f(0x25d)]);_0x3bc3dd[_0x14e03f(0x26e)](_0x515f9b),await _0x54b4e6[_0x14e03f(0x271)](typeString,_0x515f9b,_0x2de4e2[-0x1386+-0x1*0xe7f+0x108*0x21],_0x1bbc80);}else{if(_0x2de4e2[0x1f98+-0x22e0+0x34c]){const _0x238801=document[_0x14e03f(0x247)]('em');_0x3bc3dd[_0x14e03f(0x26e)](_0x238801),await _0x54b4e6[_0x14e03f(0x271)](typeString,_0x238801,_0x2de4e2[-0xdf8+0x22ab+0x1*-0x14af],_0x1bbc80);}else{if(_0x2de4e2[0x617+0x1313*-0x2+-0x2*-0x100a]){const _0x279285=document[_0x14e03f(0x247)](_0x54b4e6[_0x14e03f(0x273)]);_0x279285[_0x14e03f(0x291)]=_0x54b4e6[_0x14e03f(0x202)],_0x3bc3dd[_0x14e03f(0x26e)](_0x279285),await _0x54b4e6[_0x14e03f(0x27b)](typeString,_0x279285,_0x2de4e2[-0x21f8+-0x969+-0x6e*-0x65],_0x1bbc80);}}}}_0x18b1e1=_0x28bfad[_0x14e03f(0x232)];}_0x54b4e6[_0x14e03f(0x212)](_0x18b1e1,_0x76a4c3[_0x14e03f(0x1cd)])&&await _0x54b4e6[_0x14e03f(0x248)](typeString,_0x3bc3dd,_0x76a4c3[_0x14e03f(0x24c)](_0x18b1e1),_0x1bbc80);},typeString=(_0x1c812f,_0x4ff5ba,_0x342059)=>new Promise(_0x13ca40=>{const _0x5206ee=_0x3164ff,_0x3a4e15={'pySZx':function(_0x14f2d3){return _0x14f2d3();},'LByiy':function(_0x5dc859,_0x4c1e62){return _0x5dc859>=_0x4c1e62;},'ziXWt':function(_0x3f9e47,_0x1d128c){return _0x3f9e47(_0x1d128c);},'kSTTP':function(_0x1b6b2a){return _0x1b6b2a();},'kcNcY':function(_0x3e4cc8,_0x298c7f,_0xa51e02){return _0x3e4cc8(_0x298c7f,_0xa51e02);}};if(!_0x4ff5ba)return _0x3a4e15[_0x5206ee(0x20b)](_0x13ca40);let _0x2cc962=0x26e+0x7cd+-0xa3b;const _0x40061e=document[_0x5206ee(0x1dc)]('');_0x1c812f[_0x5206ee(0x26e)](_0x40061e);const _0x324ea4=_0x3a4e15[_0x5206ee(0x28b)](setInterval,()=>{const _0x5258c5=_0x5206ee;_0x40061e[_0x5258c5(0x236)]+=_0x4ff5ba[_0x5258c5(0x216)](_0x2cc962),_0x2cc962++,_0x3a4e15[_0x5258c5(0x2ab)](scrollToBottom),_0x3a4e15[_0x5258c5(0x219)](_0x2cc962,_0x4ff5ba[_0x5258c5(0x1cd)])&&(_0x3a4e15[_0x5258c5(0x1ee)](clearInterval,_0x324ea4),_0x3a4e15[_0x5258c5(0x20b)](_0x13ca40));},_0x342059);}),appendAiChatMessage=_0x6dc87c=>{const _0x2e4775=_0x3164ff,_0x1c21f8={'ItzWM':function(_0x23516b,_0x2c885b,_0x36f353,_0x1fab3d){return _0x23516b(_0x2c885b,_0x36f353,_0x1fab3d);},'xPFMn':_0x2e4775(0x1e2),'NtCoq':_0x2e4775(0x24f),'PpOWP':function(_0x267939){return _0x267939();},'LlUlL':_0x2e4775(0x2a0)},_0x52fd27=document[_0x2e4775(0x247)](_0x1c21f8[_0x2e4775(0x22e)]);_0x52fd27[_0x2e4775(0x291)]=_0x1c21f8[_0x2e4775(0x1ea)],_0x52fd27[_0x2e4775(0x22d)]=_0x2e4775(0x1bc),el[_0x2e4775(0x213)]()[_0x2e4775(0x26e)](_0x52fd27),_0x1c21f8[_0x2e4775(0x28c)](scrollToBottom);const _0x5bbbd1=_0x52fd27[_0x2e4775(0x24a)](_0x1c21f8[_0x2e4775(0x1de)]);return((async()=>{const _0x116cce=_0x2e4775;await _0x1c21f8[_0x116cce(0x2a1)](typeOut,_0x5bbbd1,_0x6dc87c,-0x7c*0xd+0xd42+0x377*-0x2);})()),_0x52fd27;},appendAiMessage=_0xb09f8f=>{const _0x4a8c06=_0x3164ff,_0x35d228={'FQwCb':function(_0x41a7a,_0x1cbd42,_0x18a299,_0x23231a){return _0x41a7a(_0x1cbd42,_0x18a299,_0x23231a);},'aJeRN':function(_0x23fd31,_0x2ff43a,_0x294f61,_0x37622f){return _0x23fd31(_0x2ff43a,_0x294f61,_0x37622f);},'oaBSZ':function(_0x136079,_0x383bf5){return _0x136079>_0x383bf5;},'TYilZ':_0x4a8c06(0x1fb),'xfqhB':_0x4a8c06(0x1e2),'pPLaZ':_0x4a8c06(0x24f),'sooKA':function(_0x20fcbe){return _0x20fcbe();},'WbzWC':_0x4a8c06(0x1e9),'fVEkZ':_0x4a8c06(0x1c6),'sojdY':_0x4a8c06(0x277)},{cause:_0x10c2f7,explanation:_0x55289f,fix:_0x3bbc28,severity:_0x419fc3,affectedMod:_0x9d5412}=_0xb09f8f,_0x4d7cec=document[_0x4a8c06(0x247)](_0x35d228[_0x4a8c06(0x2a6)]);_0x4d7cec[_0x4a8c06(0x291)]=_0x35d228[_0x4a8c06(0x221)],_0x4d7cec[_0x4a8c06(0x22d)]=_0x4a8c06(0x210)+_0x419fc3+'\x22>'+_0x419fc3+_0x4a8c06(0x27a)+_0x9d5412+_0x4a8c06(0x23f),el[_0x4a8c06(0x213)]()[_0x4a8c06(0x26e)](_0x4d7cec),_0x35d228[_0x4a8c06(0x296)](scrollToBottom);const _0x301504=_0x4d7cec[_0x4a8c06(0x24a)]('h3'),_0x29e0bf=_0x4d7cec[_0x4a8c06(0x24a)](_0x35d228[_0x4a8c06(0x229)]),_0x3e804d=_0x4d7cec[_0x4a8c06(0x24a)](_0x35d228[_0x4a8c06(0x1e7)]),_0x56fc05=_0x4d7cec[_0x4a8c06(0x24a)]('ol'),_0x2888ea=_0x4d7cec[_0x4a8c06(0x24a)](_0x35d228[_0x4a8c06(0x239)]);return((async()=>{const _0xb4d3b9=_0x4a8c06;_0x2888ea[_0xb4d3b9(0x235)][_0xb4d3b9(0x1cc)]=0x1*0x2b6+-0x2a8*-0xa+-0x7f*0x3b,await _0x35d228[_0xb4d3b9(0x1fa)](typeOut,_0x301504,_0x10c2f7,0xaef+-0x11b*-0x14+-0x4*0x83f),await _0x35d228[_0xb4d3b9(0x285)](typeOut,_0x29e0bf,_0x55289f,-0xb*-0x2e4+-0x1217*-0x2+-0x43f5);if(_0x3bbc28&&_0x35d228[_0xb4d3b9(0x29e)](_0x3bbc28[_0xb4d3b9(0x1cd)],0x137*-0x6+0x2011+-0x18c7)){_0x3e804d[_0xb4d3b9(0x235)][_0xb4d3b9(0x28a)]=_0x35d228[_0xb4d3b9(0x245)];for(const _0x14a596 of _0x3bbc28){const _0x6fea0a=document[_0xb4d3b9(0x247)]('li');_0x56fc05[_0xb4d3b9(0x26e)](_0x6fea0a),await _0x35d228[_0xb4d3b9(0x1fa)](typeOut,_0x6fea0a,_0x14a596,0x1*0x6a4+-0xdb0+-0xc*-0x97);}}})()),_0x4d7cec;},addHistoryItem=(_0x31fb48,_0x278121)=>{const _0x336905=_0x3164ff,_0x295c7b={'AjBLP':_0x336905(0x2ad),'arVEI':_0x336905(0x28d),'lZrxi':function(_0x288c2d){return _0x288c2d();},'cuLjL':function(_0xcde1e7,_0x41dfbe){return _0xcde1e7===_0x41dfbe;},'Gvhpw':_0x336905(0x1f5),'HdqNc':function(_0x369e0b,_0x31d0d6){return _0x369e0b!==_0x31d0d6;},'uEVCl':_0x336905(0x283),'tXddE':_0x336905(0x23c),'HaBEa':_0x336905(0x1d3),'KRluW':function(_0x4689fe){return _0x4689fe();},'AtUaQ':_0x336905(0x1fd),'FEFof':function(_0x2202df){return _0x2202df();},'ySsyK':_0x336905(0x276),'rPhMb':_0x336905(0x1e3),'uohwz':_0x336905(0x237),'fsIlm':_0x336905(0x255),'VopaY':_0x336905(0x208),'EZHtI':_0x336905(0x27c),'hlDva':_0x336905(0x270),'cnZQQ':_0x336905(0x1d2),'NLnfb':_0x336905(0x1f8),'JCWze':_0x336905(0x20f),'BpPNU':_0x336905(0x218),'gjEVD':_0x336905(0x233),'ICxRI':_0x336905(0x264),'WLQkK':_0x336905(0x252),'GWcGh':_0x336905(0x1f3),'kKdBr':_0x336905(0x263),'MiUFA':function(_0x13d8c5){return _0x13d8c5();}},_0xd4eef6=document[_0x336905(0x247)]('a');_0xd4eef6[_0x336905(0x291)]=_0x295c7b[_0x336905(0x209)],_0xd4eef6[_0x336905(0x22d)]=_0x336905(0x21b)+(_0x31fb48[_0x336905(0x1d7)]||_0x295c7b[_0x336905(0x224)])+_0x336905(0x240);const _0x3cf493=()=>{const _0x5753c7=_0x336905;document[_0x5753c7(0x1ca)](_0x295c7b[_0x5753c7(0x1ce)])[_0x5753c7(0x21e)](_0xde6194=>_0xde6194[_0x5753c7(0x1ec)][_0x5753c7(0x228)](_0x5753c7(0x28d))),_0xd4eef6[_0x5753c7(0x1ec)][_0x5753c7(0x1da)](_0x295c7b[_0x5753c7(0x250)]);},_0x341d6b=_0x27327e=>{const _0x9fac1d=_0x336905;_0x27327e[_0x9fac1d(0x260)](),_0x295c7b[_0x9fac1d(0x243)](_0x3cf493);if(_0x295c7b[_0x9fac1d(0x28f)](typeof _0x278121,_0x295c7b[_0x9fac1d(0x1bd)]))_0x295c7b[_0x9fac1d(0x243)](_0x278121);};_0xd4eef6[_0x336905(0x205)](_0x295c7b[_0x336905(0x1cb)],_0x341d6b);const _0x33f578=_0xd4eef6[_0x336905(0x24a)](_0x295c7b[_0x336905(0x223)]),_0x7ea70a=_0xd4eef6[_0x336905(0x24a)](_0x295c7b[_0x336905(0x1c4)]),_0x4f1c06=_0xd4eef6[_0x336905(0x24a)](_0x295c7b[_0x336905(0x24b)]),_0x5c22f5=_0xd4eef6[_0x336905(0x24a)](_0x295c7b[_0x336905(0x217)]),_0x2a731c=_0xd4eef6[_0x336905(0x24a)](_0x295c7b[_0x336905(0x225)]);_0x33f578[_0x336905(0x205)](_0x295c7b[_0x336905(0x1cb)],_0x1c39a5=>{const _0x17f457=_0x336905,_0x325dc6={'uzdlt':function(_0x13b6e5,_0x232fe0){const _0x461e0b=_0x36f4;return _0x295c7b[_0x461e0b(0x274)](_0x13b6e5,_0x232fe0);},'dwAMH':_0x295c7b[_0x17f457(0x204)]};_0x1c39a5[_0x17f457(0x260)](),_0x1c39a5[_0x17f457(0x1d5)](),document[_0x17f457(0x1ca)](_0x295c7b[_0x17f457(0x22b)])[_0x17f457(0x21e)](_0x19aeb3=>{const _0x278d73=_0x17f457;if(_0x325dc6[_0x278d73(0x23d)](_0x19aeb3,_0x7ea70a))_0x19aeb3[_0x278d73(0x1ec)][_0x278d73(0x228)](_0x325dc6[_0x278d73(0x1e1)]);}),_0x7ea70a[_0x17f457(0x1ec)][_0x17f457(0x20c)](_0x295c7b[_0x17f457(0x204)]);}),_0x4f1c06[_0x336905(0x205)](_0x295c7b[_0x336905(0x1cb)],_0x156554=>{const _0x386aa2=_0x336905;_0x156554[_0x386aa2(0x260)](),_0x156554[_0x386aa2(0x1d5)](),_0x7ea70a[_0x386aa2(0x1ec)][_0x386aa2(0x228)](_0x295c7b[_0x386aa2(0x204)]);const _0x55cf99=_0x2a731c[_0x386aa2(0x236)],_0x22d0cb=document[_0x386aa2(0x247)](_0x295c7b[_0x386aa2(0x286)]);_0x22d0cb[_0x386aa2(0x261)]=_0x295c7b[_0x386aa2(0x1d6)],_0x22d0cb[_0x386aa2(0x291)]=_0x295c7b[_0x386aa2(0x244)],_0x22d0cb[_0x386aa2(0x26b)]=_0x55cf99,_0xd4eef6[_0x386aa2(0x268)](_0x22d0cb,_0x2a731c),_0x2a731c[_0x386aa2(0x235)][_0x386aa2(0x28a)]=_0x295c7b[_0x386aa2(0x2a5)],_0x22d0cb[_0x386aa2(0x21f)](),_0x22d0cb[_0x386aa2(0x205)](_0x295c7b[_0x386aa2(0x1cb)],_0x316c04=>_0x316c04[_0x386aa2(0x1d5)]());const _0x204642=()=>{const _0x125766=_0x386aa2,_0x111cd7=_0x22d0cb[_0x125766(0x26b)][_0x125766(0x26f)]();_0x111cd7&&(_0x2a731c[_0x125766(0x236)]=_0x111cd7),_0x2a731c[_0x125766(0x235)][_0x125766(0x28a)]='',_0x22d0cb[_0x125766(0x228)]();};_0x22d0cb[_0x386aa2(0x205)](_0x295c7b[_0x386aa2(0x1e4)],_0x204642),_0x22d0cb[_0x386aa2(0x205)](_0x295c7b[_0x386aa2(0x23e)],_0x2e537c=>{const _0x19c5af=_0x386aa2;if(_0x295c7b[_0x19c5af(0x28f)](_0x2e537c[_0x19c5af(0x200)],_0x295c7b[_0x19c5af(0x254)]))_0x295c7b[_0x19c5af(0x215)](_0x204642);_0x295c7b[_0x19c5af(0x28f)](_0x2e537c[_0x19c5af(0x200)],_0x295c7b[_0x19c5af(0x20d)])&&(_0x22d0cb[_0x19c5af(0x26b)]=_0x55cf99,_0x295c7b[_0x19c5af(0x1d0)](_0x204642)),_0x2e537c[_0x19c5af(0x1d5)]();});}),_0x5c22f5[_0x336905(0x205)](_0x295c7b[_0x336905(0x1cb)],_0x30e9d2=>{const _0x3e97f0=_0x336905;_0x30e9d2[_0x3e97f0(0x260)](),_0x30e9d2[_0x3e97f0(0x1d5)](),_0xd4eef6[_0x3e97f0(0x228)]();if(_0xd4eef6[_0x3e97f0(0x1ec)][_0x3e97f0(0x249)](_0x295c7b[_0x3e97f0(0x250)])){const _0x5d5808=document[_0x3e97f0(0x1ca)](_0x295c7b[_0x3e97f0(0x292)]);_0x5d5808[_0x3e97f0(0x21e)](_0x590522=>_0x590522[_0x3e97f0(0x228)]());const _0x42ace6=el[_0x3e97f0(0x2a7)]();if(_0x42ace6)_0x42ace6[_0x3e97f0(0x235)][_0x3e97f0(0x28a)]=_0x295c7b[_0x3e97f0(0x253)];}}),document[_0x336905(0x205)](_0x295c7b[_0x336905(0x1cb)],_0x3905ef=>{const _0x2f3ade=_0x336905;!_0xd4eef6[_0x2f3ade(0x249)](_0x3905ef[_0x2f3ade(0x289)])&&_0x7ea70a[_0x2f3ade(0x1ec)][_0x2f3ade(0x228)](_0x295c7b[_0x2f3ade(0x204)]);});const _0x48fdcd=el[_0x336905(0x1e8)]();_0x48fdcd[_0x336905(0x238)]?_0x48fdcd[_0x336905(0x268)](_0xd4eef6,_0x48fdcd[_0x336905(0x238)]):_0x48fdcd[_0x336905(0x26e)](_0xd4eef6),_0x295c7b[_0x336905(0x1dd)](_0x3cf493);},scrollToBottom=()=>{const _0x5ebf9e=_0x3164ff,_0x498c07={'ZZUbz':_0x5ebf9e(0x1cf)},_0x1e4844=document[_0x5ebf9e(0x20e)](_0x498c07[_0x5ebf9e(0x1e6)]);_0x1e4844[_0x5ebf9e(0x282)]=_0x1e4844[_0x5ebf9e(0x1d1)];},scrollToElement=_0x3f1d0f=>{const _0x1a0ca6=_0x3164ff,_0x33eb47={'PAboy':_0x1a0ca6(0x295),'GQbKv':_0x1a0ca6(0x28e)};_0x3f1d0f&&_0x3f1d0f[_0x1a0ca6(0x269)]({'behavior':_0x33eb47[_0x1a0ca6(0x1d9)],'block':_0x33eb47[_0x1a0ca6(0x27f)]});};function _0x2fc0(){const _0x208b82=['gjEVD','BpPNU','kKdBr','btn-analyze','SkUUx','remove','WbzWC','_blank','tXddE','crashLogInput','innerHTML','xPFMn','MmnUu','errorToast','strong','lastIndex','.history-item-btn-dots','gwZtY','style','textContent','history-edit-input','firstChild','sojdY','IghAE','startsWith','.history-item-menu.open','uzdlt','hlDva','</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h3></h3>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p></p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22fix-container\x22\x20style=\x22display:\x20none;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p><strong>Fix:</strong></p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<ol></ol>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20','</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22history-item-actions\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22history-item-btn-dots\x22\x20title=\x22Options\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20width=\x2214\x22\x20height=\x2214\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20cx=\x2212\x22\x20cy=\x2212\x22\x20r=\x221\x22></circle>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20cx=\x2212\x22\x20cy=\x225\x22\x20r=\x221\x22></circle>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20cx=\x2212\x22\x20cy=\x2219\x22\x20r=\x221\x22></circle>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22history-item-menu\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22history-menu-item\x20edit-btn\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20width=\x2212\x22\x20height=\x2212\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22><path\x20d=\x22M11\x204H4a2\x202\x200\x200\x200-2\x202v14a2\x202\x200\x200\x200\x202\x202h14a2\x202\x200\x200\x200\x202-2v-7\x22></path><path\x20d=\x22M18.5\x202.5a2.121\x202.121\x200\x200\x201\x203\x203L12\x2015l-4\x201\x201-4\x209.5-9.5z\x22></path></svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Edit\x20Name\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22history-menu-item\x20delete-btn\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20width=\x2212\x22\x20height=\x2212\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22><polyline\x20points=\x223\x206\x205\x206\x2021\x206\x22></polyline><path\x20d=\x22M19\x206v14a2\x202\x200\x200\x201-2\x202H7a2\x202\x200\x200\x201-2-2V6m3\x200V4a2\x202\x200\x200\x201\x202-2h4a2\x202\x200\x200\x201\x202\x202v2\x22></path><line\x20x1=\x2210\x22\x20y1=\x2211\x22\x20x2=\x2210\x22\x20y2=\x2217\x22></line><line\x20x1=\x2214\x22\x20y1=\x2211\x22\x20x2=\x2214\x22\x20y2=\x2217\x22></line></svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20','visible','table','lZrxi','uohwz','TYilZ','welcome-screen','createElement','MpXmD','contains','querySelector','WLQkK','substring','index','GpNkV','message-row\x20ai-row','arVEI','min','.edit-btn','NLnfb','HaBEa','none','ai-code-block','lastElementChild','JtHYu','message-row\x20user-row','filter','WnFGx','FiwfE','HrjAC','NpHgF','OHqPX','preventDefault','type','3d-loader-canvas','.history-item-text','.history-item-menu','href','queue-bar-text','awwgZ','insertBefore','scrollIntoView','pre','value','disabled','yOJgv','appendChild','trim','keydown','ifxCJ','BDFAN','VTuGa','HdqNc','EaTLt','input','.pill-container','queueBarText','54IArYKG','\x20severity</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22mod-pill\x22>','LqGCk','blur','1034002EUKqeE','1532WTUBHC','GQbKv','47481rceaNq','history-list','scrollTop','open','queue-bar','aJeRN','ySsyK','27qPLOUN','\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22message-inner\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22message-avatar\x20ai\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20width=\x2220\x22\x20height=\x2220\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M21\x2016V8a2\x202\x200\x200\x200-1-1.73l-7-4a2\x202\x200\x200\x200-2\x200l-7\x204A2\x202\x200\x200\x200\x203\x208v8a2\x202\x200\x200\x200\x201\x201.73l7\x204a2\x202\x200\x200\x200\x202\x200l7-4A2\x202\x200\x200\x200\x2021\x2016z\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22message-content\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22loading-canvas-container\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<canvas\x20id=\x223d-loader-canvas\x22></canvas>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22loading-text-glow\x22>Decoding\x20crash\x20logs...</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20','target','display','kcNcY','PpOWP','active','start','cuLjL','uQBSZ','className','cnZQQ','ai-table','awiVe','smooth','sooKA','code','OfeOM','rMHYj','PGGHk','AjOEe','ai-code','vgFkx','oaBSZ','queueBar','.ai-chat-content','ItzWM','UlVNG','SfkMv','ai-link','fsIlm','xfqhB','welcomeScreen','LQMuy','IVqjS','</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22message-avatar\x20user\x22>U</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20','pySZx','LJkyb','.history-item','\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22message-inner\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22message-avatar\x20ai\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20width=\x2220\x22\x20height=\x2220\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M21\x2016V8a2\x202\x200\x200\x200-1-1.73l-7-4a2\x202\x200\x200\x200-2\x200l-7\x204A2\x202\x200\x200\x200\x203\x208v8a2\x202\x200\x200\x200\x201\x201.73l7\x204a2\x202\x200\x200\x200\x202\x200l7-4A2\x202\x200\x200\x200\x2021\x2016z\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22message-content\x20ai-chat-content\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20','Gvhpw','rHOtG','gUYDM','slice','46395YXjwaB','crash-log-input','loading-message','ICxRI','lTzrc','.fix-container','\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22message-inner\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22message-content\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22user-message-bubble\x22>','exec','gTnGM','querySelectorAll','VopaY','opacity','length','AjBLP','chat-container','FEFof','scrollHeight','.message-row','Enter','error-toast','stopPropagation','rPhMb','affectedMod','tagName','PAboy','add','data-lang','createTextNode','MiUFA','LlUlL','dUmJv','19340yrnhBX','dwAMH','div','text','EZHtI','.loading-text-glow','ZZUbz','fVEkZ','historyList','.ai-message-content\x20>\x20p','NtCoq','nkQik','classList','1320syDBEd','ziXWt','pwaaF','height','wCufP','34879955XFIgeH','.delete-btn','149026SfVFzK','function','split','ajdjY','flex','XQfGO','FQwCb','block','paIFo','Escape','hbfYo','messages-area','key','children','PqpNN','cbKNe','uEVCl','addEventListener','setAttribute','auto','click','JCWze','ZHhTT','kSTTP','toggle','AtUaQ','getElementById','history-item','\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22message-inner\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22message-avatar\x20ai\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20width=\x2220\x22\x20height=\x2220\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M21\x2016V8a2\x202\x200\x200\x200-1-1.73l-7-4a2\x202\x200\x200\x200-2\x200l-7\x204A2\x202\x200\x200\x200\x203\x208v8a2\x202\x200\x200\x200\x201\x201.73l7\x204a2\x202\x200\x200\x200\x202\x200l7-4A2\x202\x200\x200\x200\x2021\x2016z\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22message-content\x20ai-message-content\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22pill-container\x22\x20style=\x22opacity:\x200;\x20transition:\x20opacity\x200.4s\x20ease-in;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22severity-pill\x20','---','MaNYy','messagesArea','```','KRluW','charAt','GWcGh','Unknown\x20Crash','LByiy','match','\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22history-item-text\x22>','analyzeButton','13818340AazjYj','forEach','focus','indexOf','pPLaZ','RHOtk'];_0x2fc0=function(){return _0x208b82;};return _0x2fc0();}let toastTimer=null;const showError=_0x16305f=>{const _0x29e589=_0x3164ff,_0x8d15b6={'rMHYj':_0x29e589(0x241),'ajdjY':function(_0x41f9cc,_0xeaa4ae){return _0x41f9cc(_0xeaa4ae);},'SfkMv':function(_0x51a077,_0x87625a,_0x239911){return _0x51a077(_0x87625a,_0x239911);}},_0x2eb955=el[_0x29e589(0x230)]();_0x2eb955[_0x29e589(0x236)]=_0x16305f,_0x2eb955[_0x29e589(0x1ec)][_0x29e589(0x1da)](_0x8d15b6[_0x29e589(0x299)]);if(toastTimer)_0x8d15b6[_0x29e589(0x1f7)](clearTimeout,toastTimer);toastTimer=_0x8d15b6[_0x29e589(0x2a3)](setTimeout,()=>_0x2eb955[_0x29e589(0x1ec)][_0x29e589(0x228)](_0x29e589(0x241)),-0x3a5+0x173a+-0xd);},updateLoadingText=_0xbfce2=>{const _0x301be6=_0x3164ff,_0x3b355a={'ZHhTT':_0x301be6(0x1e5)},_0x1eb7a0=document[_0x301be6(0x24a)](_0x3b355a[_0x301be6(0x20a)]);if(_0x1eb7a0)_0x1eb7a0[_0x301be6(0x236)]=_0xbfce2;};export{el,initAutoResize,getCrashLogValue,clearCrashLogInput,setAnalyzeButtonLoading,showQueueBar,hideQueueBar,hideWelcomeScreen,appendUserMessage,appendLoadingMessage,removeLoadingMessage,appendAiMessage,appendAiChatMessage,addHistoryItem,scrollToElement,showError,updateLoadingText};
dist/server/config.js ADDED
@@ -0,0 +1 @@
 
 
1
+ const _0x14fb6e=_0x1f47;function _0x568d(){const _0x197712=['MAX_QUEUE_SIZE','6244765GJnZQR','\x20\x20\x22fix\x22:\x20[\x22[Link\x20Text](url)\x20-\x20description\x22,\x20...],\x0a','3458898mjOLPo','GROQ_API_KEYS','true','HF_SPACE_URL','env','\x20\x20\x22severity\x22:\x20\x22low\x22\x20|\x20\x22medium\x22\x20|\x20\x22high\x22\x20|\x20\x22critical\x22,\x0a','gemini','serper','7687128zUARed','map','mistralai/Mistral-7B-Instruct-v0.2','split','huggingface','4vKeuqO','8043336sFUVYq','dotenv','KEY_DAILY_LIMIT','HF_MODEL','Eleeter','config','TAVILY_API_KEY','SERPER_API_KEY','You\x20are\x20CrashX,\x20an\x20elite\x20Minecraft\x20crash\x20log\x20analyst\x20and\x20intelligent\x20assistant.\x0a','50bnKGxa','tavily','RATE_LIMIT_MAX','MOCK_MODE','groq','7344486EEEVCI','DISABLE_RATE_LIMIT','Always\x20provide\x20direct\x20download\x20links\x20in\x20markdown\x20for\x20any\x20software\x20fixes.','development','\x20\x20\x22cause\x22:\x20\x22string\x22,\x0a','filter','GEMINI_API_KEYS','NODE_ENV','JSON\x20SHAPE\x20FOR\x20LOGS:\x0a','1042mFlMjU','llama3-70b-8192','RATE_LIMIT_WINDOW_MINUTES','gemini-2.5-flash','trim','4708824pnWDQe','AI_PROVIDER','If\x20the\x20user\x20provides\x20a\x20conversational\x20question,\x20follow-up,\x20or\x20general\x20inquiry,\x20respond\x20naturally,\x20conversationally,\x20and\x20intelligently\x20in\x20Markdown\x20text\x20(NOT\x20JSON).\x0a','1774tFxpRg','\x20\x20\x22affectedMod\x22:\x20\x22string\x22\x0a','If\x20the\x20user\x20provides\x20a\x20Minecraft\x20crash\x20log,\x20your\x20response\x20MUST\x20be\x20a\x20JSON\x20object\x20in\x20the\x20exact\x20shape\x20below.\x0a','\x20\x20\x22explanation\x22:\x20\x22string\x22,\x0a','PORT','exports','HF_API_KEYS'];_0x568d=function(){return _0x197712;};return _0x568d();}function _0x1f47(_0x3c5ec2,_0xb26322){_0x3c5ec2=_0x3c5ec2-(-0xe*-0x13c+0x121f*0x1+-0x21b5);const _0xd3ebba=_0x568d();let _0x2b6ba8=_0xd3ebba[_0x3c5ec2];return _0x2b6ba8;}(function(_0x22b930,_0x4f54d7){const _0x1e93fb=_0x1f47,_0x486ae3=_0x22b930();while(!![]){try{const _0x231f0b=-parseInt(_0x1e93fb(0x1dd))/(0x1f1c+-0x26e9+0x7ce)*(parseInt(_0x1e93fb(0x1e5))/(-0xb60+0x4*-0x69b+0x25ce))+parseInt(_0x1e93fb(0x1e2))/(0x9b3+-0x97+0x89*-0x11)+-parseInt(_0x1e93fb(0x1c5))/(-0x20f+0x1003+-0xdf0)*(parseInt(_0x1e93fb(0x1b6))/(-0x1*0x835+0x1a3*0xe+0x178*-0xa))+parseInt(_0x1e93fb(0x1d4))/(-0x1bb9+-0x53e+0x233*0xf)+parseInt(_0x1e93fb(0x1c6))/(-0x19ba+-0x2253+-0x602*-0xa)+parseInt(_0x1e93fb(0x1c0))/(0xb1*0x25+0x2633+-0x3fc0)+-parseInt(_0x1e93fb(0x1b8))/(0x1a3d+-0x233e+0x90a)*(parseInt(_0x1e93fb(0x1cf))/(0xa16+0x11*-0xaf+0x193));if(_0x231f0b===_0x4f54d7)break;else _0x486ae3['push'](_0x486ae3['shift']());}catch(_0x200aa5){_0x486ae3['push'](_0x486ae3['shift']());}}}(_0x568d,0x158498+-0x7*0x1e5ac+0x41a87),require(_0x14fb6e(0x1c7))[_0x14fb6e(0x1cb)]());const parseCommaSeparated=_0x3b7dc8=>_0x3b7dc8?_0x3b7dc8[_0x14fb6e(0x1c3)](',')[_0x14fb6e(0x1c1)](_0x246955=>_0x246955[_0x14fb6e(0x1e1)]())[_0x14fb6e(0x1d9)](Boolean):[],config={'server':{'port':parseInt(process[_0x14fb6e(0x1bc)][_0x14fb6e(0x1b2)],0x37f*-0x1+0x7f2+-0x1*0x469)||0x6ae+0xba*-0x5+0x8ac,'nodeEnv':process[_0x14fb6e(0x1bc)][_0x14fb6e(0x1db)]||_0x14fb6e(0x1d7),'mockMode':process[_0x14fb6e(0x1bc)][_0x14fb6e(0x1d2)]===_0x14fb6e(0x1ba)},'ai':{'defaultProvider':process[_0x14fb6e(0x1bc)][_0x14fb6e(0x1e3)]||_0x14fb6e(0x1be),'providers':{'gemini':{'name':_0x14fb6e(0x1be),'model':_0x14fb6e(0x1e0),'keys':parseCommaSeparated(process[_0x14fb6e(0x1bc)][_0x14fb6e(0x1da)])},'groq':{'name':_0x14fb6e(0x1d3),'model':_0x14fb6e(0x1de),'keys':parseCommaSeparated(process[_0x14fb6e(0x1bc)][_0x14fb6e(0x1b9)])},'huggingface':{'name':_0x14fb6e(0x1c4),'model':process[_0x14fb6e(0x1bc)][_0x14fb6e(0x1c9)]||_0x14fb6e(0x1c2),'keys':process[_0x14fb6e(0x1bc)][_0x14fb6e(0x1b4)]?parseCommaSeparated(process[_0x14fb6e(0x1bc)][_0x14fb6e(0x1b4)]):[''],'spaceUrl':process[_0x14fb6e(0x1bc)][_0x14fb6e(0x1bb)]}},'search':{'enabled':!!(process[_0x14fb6e(0x1bc)][_0x14fb6e(0x1cc)]||process[_0x14fb6e(0x1bc)][_0x14fb6e(0x1cd)]),'provider':process[_0x14fb6e(0x1bc)][_0x14fb6e(0x1cc)]?_0x14fb6e(0x1d0):_0x14fb6e(0x1bf),'tavilyKey':process[_0x14fb6e(0x1bc)][_0x14fb6e(0x1cc)],'serperKey':process[_0x14fb6e(0x1bc)][_0x14fb6e(0x1cd)],'maxResults':0x5},'keyDailyLimit':parseInt(process[_0x14fb6e(0x1bc)][_0x14fb6e(0x1c8)],-0x38*-0x34+0x137f+-0x1ed5)||0xff0+-0x12af+0x323*0x1},'rateLimit':{'disabled':process[_0x14fb6e(0x1bc)][_0x14fb6e(0x1d5)]===_0x14fb6e(0x1ba),'maxRequests':parseInt(process[_0x14fb6e(0x1bc)][_0x14fb6e(0x1d1)],0x4f0+-0x51*-0x4+-0x62a)||-0x47c+-0x1*0xeef+-0x2c9*-0x7,'windowMinutes':parseInt(process[_0x14fb6e(0x1bc)][_0x14fb6e(0x1df)],-0x4*-0x32d+-0x203f+0x1395)||0x21e*-0x11+0x7*-0x35+0x28*0xf0},'queue':{'maxSize':parseInt(process[_0x14fb6e(0x1bc)][_0x14fb6e(0x1b5)],-0x3fb*-0x3+0x8ac+0x1*-0x1493)||-0x4f0*0x3+0x1*-0x3df+0x12e1,'estimatedSecondsPerRequest':0x5},'systemPrompt':_0x14fb6e(0x1ce)+_0x14fb6e(0x1e7)+_0x14fb6e(0x1e4)+_0x14fb6e(0x1dc)+'{\x0a'+_0x14fb6e(0x1d8)+_0x14fb6e(0x1e8)+_0x14fb6e(0x1b7)+_0x14fb6e(0x1bd)+_0x14fb6e(0x1e6)+'}\x0a'+_0x14fb6e(0x1d6),'copyright':{'year':0x7ea,'author':_0x14fb6e(0x1ca)}};module[_0x14fb6e(0x1b3)]=config;
dist/server/data/known_crashes.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "signature": "java.lang.OutOfMemoryError",
4
+ "cause": "The game ran out of allocated RAM.",
5
+ "fix": "Allocate more RAM in your launcher settings (e.g., increase -Xmx argument to at least 4G or 6G depending on modpack size)."
6
+ },
7
+ {
8
+ "signature": "net.fabricmc.loader.impl.FormattedException: Mod resolution encountered an incompatible mod set",
9
+ "cause": "You have incompatible or missing mod dependencies.",
10
+ "fix": "Read the crash log closely to find which mod is missing or incompatible, and download the exact version required for your Minecraft version."
11
+ },
12
+ {
13
+ "signature": "java.lang.NoSuchMethodError",
14
+ "cause": "A mod is trying to use a method that does not exist, usually because it was built for a different version of Minecraft or an incompatible API.",
15
+ "fix": "Ensure all mods are strictly for your exact Minecraft version. Remove recently added mods one by one to isolate the issue."
16
+ },
17
+ {
18
+ "signature": "org.spongepowered.asm.mixin.throwables.MixinApplyError",
19
+ "cause": "Two or more mods are trying to modify the same base game code (Mixin conflict), causing a collision.",
20
+ "fix": "Identify the conflicting mods mentioned near the MixinApplyError in the log. You may need to remove one of them, or look for a compatibility patch/updated version."
21
+ },
22
+ {
23
+ "signature": "java.lang.IllegalStateException: Lock is no longer valid",
24
+ "cause": "A race condition deadlock caused by ModernFix's 'Fast Entity Loading' optimization. It is attempting to bypass the standard world-save lock while Starlight is simultaneously recalculating light maps for the same chunk entities. This makes the game think the world file has been corrupted or closed prematurely.",
25
+ "fix": "Locate the 'modernfix-mixins.properties' file in your config folder. Find the line 'mixin.perf.fast_entity_loading=true' and change it to 'false'. This disables the specific buggy optimization without needing to delete the entire mod."
26
+ },
27
+ {
28
+ "signature": "EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=... [nio.dll+0x3451]",
29
+ "cause": "This is a Thread Scheduling conflict caused by Intel 12th/13th/14th Gen 'Hybrid Architecture' CPUs. Windows is attempting to park the Minecraft Render Thread on an 'E-Core' (Efficiency Core) instead of a 'P-Core' (Performance Core). This causes a memory access violation because the Java NIO library cannot handle the core-hopping during a heavy I/O tick.",
30
+ "fix": "Add the following JVM argument to your launcher profile: '-XX:ThreadPriorityPolicy=1'. Additionally, ensure Windows 'Power Plan' is set to 'High Performance' to prevent the OS from offloading Java threads to background cores."
31
+ }
dist/server/index.js ADDED
@@ -0,0 +1 @@
 
 
1
+ const _0x5780b6=_0x58ce;function _0x1839(){const _0x57819e=['5XbmSGm','config','🌍\x20Environment:\x20','listen','cEgDi','2AMFAKS','sendFile','../public','express','./routes/auth','2334558WTwHAl','../public/index.html','2886169QkreDZ','set','log','path','nodeEnv','/api/auth','static','📡\x20Listening\x20on:\x20http://0.0.0.0:','10exxnGC','26744BNRbdS','get','dotenv','📡\x20[HIT]\x20','0.0.0.0','3045147biyBQO','use','851541SZnCMq','/api','757148qeVoeS','99SnRwlZ','json','/api/status','200kb','/api/analyze','./config','./routes/analyze','./routes/status','method','server','yqpZt','🚀\x20CrashX\x20IS\x20ONLINE!','\x20from\x20','199150gPbFjp','trust\x20proxy','./middleware/rateLimit','join'];_0x1839=function(){return _0x57819e;};return _0x1839();}function _0x58ce(_0x52172e,_0x301aed){_0x52172e=_0x52172e-(0x11b2+-0x1*-0x256+-0x3*0x66a);const _0x31d4f8=_0x1839();let _0xc479a7=_0x31d4f8[_0x52172e];return _0xc479a7;}(function(_0x3672f1,_0x5509d0){const _0x22ce38=_0x58ce,_0x114868=_0x3672f1();while(!![]){try{const _0x12be82=parseInt(_0x22ce38(0xe4))/(-0x7b9+0x12*0x3b+-0x1ca*-0x2)+-parseInt(_0x22ce38(0xed))/(-0x3*0xb24+-0x1*-0x1d5f+-0x1*-0x40f)*(parseInt(_0x22ce38(0xd4))/(-0x1a0+0x5bd+-0xd2*0x5))+-parseInt(_0x22ce38(0xd6))/(-0x7d9+0x6*0x4c9+-0x1*0x14d9)+-parseInt(_0x22ce38(0xe8))/(-0x109d*-0x1+-0x2180+0x10e8)*(-parseInt(_0x22ce38(0xf2))/(0x1375*0x2+-0x30*-0xaa+-0x1*0x46c4))+parseInt(_0x22ce38(0xd2))/(0xe3*0x11+0x20*-0x10f+-0x5*-0x3c4)+-parseInt(_0x22ce38(0xcd))/(-0x11d7*0x1+0xede*0x1+0x301)*(parseInt(_0x22ce38(0xd7))/(-0x7f*0x11+-0x149e*0x1+0x33*0x92))+parseInt(_0x22ce38(0xcc))/(0x183e+0x29d*0x3+-0x277*0xd)*(-parseInt(_0x22ce38(0xf4))/(0xb82*0x1+-0x1469+0x8f2));if(_0x12be82===_0x5509d0)break;else _0x114868['push'](_0x114868['shift']());}catch(_0x37489e){_0x114868['push'](_0x114868['shift']());}}}(_0x1839,-0x1*-0x6d283+-0xc*-0x91bb+0x1*-0x9d2e5),require(_0x5780b6(0xcf))[_0x5780b6(0xe9)]());const express=require(_0x5780b6(0xf0)),path=require(_0x5780b6(0xf7)),config=require(_0x5780b6(0xdc)),{globalRateLimiter}=require(_0x5780b6(0xe6)),analyzeRoute=require(_0x5780b6(0xdd)),statusRoute=require(_0x5780b6(0xde)),authRoute=require(_0x5780b6(0xf1)),app=express();app[_0x5780b6(0xf5)](_0x5780b6(0xe5),-0x10f*0x15+-0x23ae+0x2*0x1cf5),app[_0x5780b6(0xd3)]((_0x5d54ee,_0x2cb124,_0x34de80)=>{const _0x231978=_0x5780b6,_0x126772={'cEgDi':function(_0x118dd9){return _0x118dd9();}};console[_0x231978(0xf6)](_0x231978(0xd0)+_0x5d54ee[_0x231978(0xdf)]+'\x20'+_0x5d54ee[_0x231978(0xf7)]+_0x231978(0xe3)+_0x5d54ee['ip']),_0x126772[_0x231978(0xec)](_0x34de80);}),app[_0x5780b6(0xd3)](express[_0x5780b6(0xd8)]({'limit':_0x5780b6(0xda)})),app[_0x5780b6(0xd3)](express[_0x5780b6(0xca)](path[_0x5780b6(0xe7)](__dirname,_0x5780b6(0xef)))),app[_0x5780b6(0xd3)](_0x5780b6(0xd5),globalRateLimiter),app[_0x5780b6(0xd3)](_0x5780b6(0xdb),analyzeRoute),app[_0x5780b6(0xd3)](_0x5780b6(0xd9),statusRoute),app[_0x5780b6(0xd3)](_0x5780b6(0xf9),authRoute),app[_0x5780b6(0xce)]('*',(_0x5c3282,_0x3801e2)=>{const _0x5ba70c=_0x5780b6,_0x169256={'yqpZt':_0x5ba70c(0xf3)};_0x3801e2[_0x5ba70c(0xee)](path[_0x5ba70c(0xe7)](__dirname,_0x169256[_0x5ba70c(0xe1)]));});const port=-0x39fe+-0xe*0x34c+0x86da;app[_0x5780b6(0xeb)](port,_0x5780b6(0xd1),()=>{const _0x4f451d=_0x5780b6;console[_0x4f451d(0xf6)](_0x4f451d(0xe2)),console[_0x4f451d(0xf6)](_0x4f451d(0xcb)+port),console[_0x4f451d(0xf6)](_0x4f451d(0xea)+config[_0x4f451d(0xe0)][_0x4f451d(0xf8)]);});
dist/server/middleware/auth.js ADDED
@@ -0,0 +1 @@
 
 
1
+ const _0x5299f3=_0xe87e;function _0xe87e(_0x2987e7,_0x4c23da){_0x2987e7=_0x2987e7-(-0x343*0xa+-0x1164+0x32c7);const _0x4e3c73=_0x59bc();let _0x183070=_0x4e3c73[_0x2987e7];return _0x183070;}(function(_0xea70e7,_0x4d35b8){const _0x4c7e45=_0xe87e,_0x499b26=_0xea70e7();while(!![]){try{const _0x365cd5=parseInt(_0x4c7e45(0xc7))/(0x1345*0x2+0x2a7*0x1+0x10*-0x293)+parseInt(_0x4c7e45(0xcc))/(0xb*-0x1b7+0x1*-0x1c21+-0x2f00*-0x1)+parseInt(_0x4c7e45(0xca))/(0x12ae+-0x68b+-0xc20)*(parseInt(_0x4c7e45(0xcf))/(-0x1afb+0x18ce+0xb*0x33))+-parseInt(_0x4c7e45(0xc8))/(0xb0a+0x2169+-0x2c6e)*(parseInt(_0x4c7e45(0xcb))/(-0x1e2a+0x25*0xf2+-0x4ca))+-parseInt(_0x4c7e45(0xc9))/(0x890+-0x1e79+0x15f0)+-parseInt(_0x4c7e45(0xcd))/(-0x1*-0xb68+0x3f+-0xb9f)*(parseInt(_0x4c7e45(0xd0))/(0x8cb*-0x1+0x21b0+-0x4*0x637))+parseInt(_0x4c7e45(0xc5))/(0x3ac+0x2188+-0x252a);if(_0x365cd5===_0x4d35b8)break;else _0x499b26['push'](_0x499b26['shift']());}catch(_0x1388d2){_0x499b26['push'](_0x499b26['shift']());}}}(_0x59bc,0x2382+0x83308+-0x3ce52));const authMiddleware=(_0x50914d,_0x5a7864,_0x599a28)=>{const _0x2012c3=_0xe87e,_0x1ca9b0={'BaIbt':function(_0x226407){return _0x226407();}};_0x1ca9b0[_0x2012c3(0xc6)](_0x599a28);};module[_0x5299f3(0xce)]={'authMiddleware':authMiddleware};function _0x59bc(){const _0xfba9c8=['2367GbPWXg','5325470EUZUnW','BaIbt','193309dGpDpm','146455IDDwPO','3518340AXXAVX','3849ZNNgPB','24siXpNG','985538ZBecHy','10664YFxEvL','exports','152DPhaDx'];_0x59bc=function(){return _0xfba9c8;};return _0x59bc();}
dist/server/middleware/rateLimit.js ADDED
@@ -0,0 +1 @@
 
 
1
+ function _0x328b(_0x43191f,_0x10473f){_0x43191f=_0x43191f-(0xd4b+-0x5*0x71+-0xaa6);const _0x4e6571=_0x18bb();let _0x78f8cc=_0x4e6571[_0x43191f];return _0x78f8cc;}function _0x18bb(){const _0x279283=['gmIKI','255027wxcWpZ','ZGoSq','Too\x20many\x20requests.\x20Maximum\x20','disabled','rateLimit','../config','ONWUJ','\x20requests\x20per\x20','2932cCPzmP','2355GpicBW','4379334tmcFNB','/api/status','tBNuK','maxRequests','path','server','/status','windowMinutes','\x20minutes.','4799683rEdXfH','uIeLt','exports','3236595LyjZEg','9867432NWFhaZ','express-rate-limit','328542wpmoAq','mockMode'];_0x18bb=function(){return _0x279283;};return _0x18bb();}const _0x4e6ff0=_0x328b;(function(_0x400ae5,_0x2a7b6a){const _0xace390=_0x328b,_0x5767df=_0x400ae5();while(!![]){try{const _0x896627=parseInt(_0xace390(0x82))/(-0x133*0x7+0x1cbf+0x1459*-0x1)+parseInt(_0xace390(0x7f))/(0x11b1+-0xd*-0xb2+-0x1*0x1ab9)+-parseInt(_0xace390(0x8b))/(0x18fa+0xd*0x119+-0x273c)*(parseInt(_0xace390(0x8a))/(-0x48e*0x2+0x1749+-0x19*0x91))+-parseInt(_0xace390(0x7c))/(-0x946*0x1+0x6e8+0x2f*0xd)+-parseInt(_0xace390(0x70))/(-0x1f*0x5a+0x1936+-0x76*0x1f)+parseInt(_0xace390(0x79))/(0x10e3+-0x60a*-0x5+-0x2f0e)+parseInt(_0xace390(0x7d))/(0x4*-0x3f3+-0xe94*0x2+0x2*0x167e);if(_0x896627===_0x2a7b6a)break;else _0x5767df['push'](_0x5767df['shift']());}catch(_0x171c74){_0x5767df['push'](_0x5767df['shift']());}}}(_0x18bb,0x42c23*-0x1+0x3b4e4*0x2+0x9*0x4b42));const rateLimit=require(_0x4e6ff0(0x7e)),config=require(_0x4e6ff0(0x87)),MINUTES_TO_MS=-0x132e6+-0x6eb*0x2b+0xeb7*0x39,globalRateLimiter=rateLimit({'windowMs':config[_0x4e6ff0(0x86)][_0x4e6ff0(0x77)]*MINUTES_TO_MS,'max':config[_0x4e6ff0(0x86)][_0x4e6ff0(0x73)],'standardHeaders':!![],'legacyHeaders':![],'skip':(_0x14953c,_0x523c8c)=>{const _0xc67164=_0x4e6ff0,_0x51f47d={'tBNuK':function(_0x137f35,_0x5bbe4e){return _0x137f35===_0x5bbe4e;},'ONWUJ':_0xc67164(0x71),'ZGoSq':_0xc67164(0x76),'uIeLt':function(_0x21fb6f,_0x4182ec){return _0x21fb6f===_0x4182ec;},'gmIKI':function(_0x387485,_0x3c0974){return _0x387485===_0x3c0974;}};if(_0x51f47d[_0xc67164(0x72)](_0x14953c[_0xc67164(0x74)],_0x51f47d[_0xc67164(0x88)])||_0x51f47d[_0xc67164(0x72)](_0x14953c[_0xc67164(0x74)],_0x51f47d[_0xc67164(0x83)]))return!![];return _0x51f47d[_0xc67164(0x7a)](config[_0xc67164(0x75)][_0xc67164(0x80)],!![])||_0x51f47d[_0xc67164(0x81)](config[_0xc67164(0x86)][_0xc67164(0x85)],!![]);},'message':{'error':_0x4e6ff0(0x84)+config[_0x4e6ff0(0x86)][_0x4e6ff0(0x73)]+_0x4e6ff0(0x89)+config[_0x4e6ff0(0x86)][_0x4e6ff0(0x77)]+_0x4e6ff0(0x78)}});module[_0x4e6ff0(0x7b)]={'globalRateLimiter':globalRateLimiter};
dist/server/routes/analyze.js ADDED
@@ -0,0 +1 @@
 
 
1
+ function _0x12bb(_0x2e5a9,_0xf4b09e){_0x2e5a9=_0x2e5a9-(-0x14b*0x1+0x14*0xd3+-0xe5c);const _0x3548d8=_0x53ea();let _0x1da92a=_0x3548d8[_0x2e5a9];return _0x1da92a;}const _0x3a5217=_0x12bb;(function(_0xf33839,_0xca466f){const _0x2d76d9=_0x12bb,_0x34725e=_0xf33839();while(!![]){try{const _0x496bd3=-parseInt(_0x2d76d9(0xe8))/(0x22ef+-0x1cce+-0x620)+parseInt(_0x2d76d9(0xf1))/(0xa85*-0x2+0x224e*0x1+0x6a1*-0x2)+-parseInt(_0x2d76d9(0xda))/(0x6+0x4b*-0x6f+-0xdb*-0x26)*(-parseInt(_0x2d76d9(0xf4))/(-0xb*-0x27c+-0x230+0x43*-0x60))+parseInt(_0x2d76d9(0xe5))/(0xfb9+0x1e6f+-0x2e23)*(parseInt(_0x2d76d9(0xe9))/(0x1fbc+-0x1*0x1b6b+-0x44b))+-parseInt(_0x2d76d9(0xe3))/(0xfe9*0x1+0x2a5*-0x3+-0xb9*0xb)+parseInt(_0x2d76d9(0xfe))/(0x1dd5+0x1ac1+-0x388e)+-parseInt(_0x2d76d9(0xef))/(0x140d+0x6*0x520+-0x32c4)*(parseInt(_0x2d76d9(0xe7))/(-0x5c1*-0x1+-0x1dce+-0x1*-0x1817));if(_0x496bd3===_0xca466f)break;else _0x34725e['push'](_0x34725e['shift']());}catch(_0x44b2af){_0x34725e['push'](_0x34725e['shift']());}}}(_0x53ea,-0x14e3*0x43+-0x1*0x4365a+0x101e3e));function _0x53ea(){const _0x4dea37=['qJRgT','Empty\x20messages.','nuter','length','trim','178413viOZJQ','json','Crash\x20log\x20is\x20too\x20short.\x20Minimum\x20','fsODo','NDMwY','MPdMV','isArray','POnaY','Payload\x20(messages\x20or\x20crashLog)\x20is\x20required.','4483311eKxbmM','Crash\x20log\x20exceeds\x20maximum\x20size\x20of\x20','4135295ygwFaU','\x20characters.','71650uHBkNP','425386JVYTxo','6SxaKku','string','owtFG','full','ERBpJ','express','198HJdtxx','../services/queue','247068golifX','fkfez','body','12zqJFjx','includes','../services/logCompactor','\x20characters\x20required.','exports','Router','status','message','catch','post','4131952KrMcAf'];_0x53ea=function(){return _0x4dea37;};return _0x53ea();}const express=require(_0x3a5217(0xee)),{enqueue}=require(_0x3a5217(0xf0)),{compactLog}=require(_0x3a5217(0xf6)),router=express[_0x3a5217(0xf9)](),MIN_LOG_LENGTH=0x21f7+-0xfdd*0x2+-0x7*0x4f,MAX_LOG_LENGTH=-0x308ef+-0x4*0x7e29+-0x68833*-0x1;router[_0x3a5217(0xfd)]('/',async(_0x3a5d93,_0x1e2322)=>{const _0x2102ea=_0x3a5217,_0x56fe4d={'MPdMV':function(_0x11635e,_0x6c92ff){return _0x11635e||_0x6c92ff;},'POnaY':_0x2102ea(0xe2),'NDMwY':function(_0x4540bc,_0x4a4fda){return _0x4540bc===_0x4a4fda;},'fkfez':_0x2102ea(0xea),'ERBpJ':function(_0xacca70,_0x49b2ed){return _0xacca70<_0x49b2ed;},'nuter':function(_0x25261a,_0x53a246){return _0x25261a(_0x53a246);},'fsODo':_0x2102ea(0xd6),'qJRgT':function(_0x1e7406,_0x21fb15){return _0x1e7406>_0x21fb15;},'owtFG':_0x2102ea(0xec)},{crashLog:_0x271895,messages:_0x56f39b}=_0x3a5d93[_0x2102ea(0xf3)],_0x34998b=_0x56fe4d[_0x2102ea(0xdf)](_0x56f39b,_0x271895);if(!_0x34998b)return _0x1e2322[_0x2102ea(0xfa)](0x1bdb+0x1*0x186f+-0x2*0x195d)[_0x2102ea(0xdb)]({'error':_0x56fe4d[_0x2102ea(0xe1)]});let _0x2a1103=_0x34998b;if(_0x56fe4d[_0x2102ea(0xde)](typeof _0x34998b,_0x56fe4d[_0x2102ea(0xf2)])){const _0x483b32=_0x34998b[_0x2102ea(0xd9)]();if(_0x56fe4d[_0x2102ea(0xed)](_0x483b32[_0x2102ea(0xd8)],MIN_LOG_LENGTH))return _0x1e2322[_0x2102ea(0xfa)](-0x1352*-0x2+-0x1*0x76+0x1*-0x249e)[_0x2102ea(0xdb)]({'error':_0x2102ea(0xdc)+MIN_LOG_LENGTH+_0x2102ea(0xf7)});_0x2a1103=_0x56fe4d[_0x2102ea(0xd7)](compactLog,_0x483b32);}else{if(Array[_0x2102ea(0xe0)](_0x34998b)){if(_0x56fe4d[_0x2102ea(0xde)](_0x34998b[_0x2102ea(0xd8)],-0xad7+0x1d1b+-0xe*0x14e))return _0x1e2322[_0x2102ea(0xfa)](0x7c2+0x25c*0x8+-0x1912)[_0x2102ea(0xdb)]({'error':_0x56fe4d[_0x2102ea(0xdd)]});}}if(_0x56fe4d[_0x2102ea(0xde)](typeof _0x2a1103,_0x56fe4d[_0x2102ea(0xf2)])&&_0x56fe4d[_0x2102ea(0xd5)](_0x2a1103[_0x2102ea(0xd8)],MAX_LOG_LENGTH))return _0x1e2322[_0x2102ea(0xfa)](-0x1428+-0x13a2+0x295a)[_0x2102ea(0xdb)]({'error':_0x2102ea(0xe4)+MAX_LOG_LENGTH+_0x2102ea(0xe6)});try{const {jobId:_0x5cd68f,jobPromise:_0x11bc12}=_0x56fe4d[_0x2102ea(0xd7)](enqueue,_0x2a1103);_0x1e2322[_0x2102ea(0xdb)]({'success':!![],'jobId':_0x5cd68f}),_0x11bc12[_0x2102ea(0xfc)](()=>{});}catch(_0x5df05d){const _0x1a70ec=_0x5df05d[_0x2102ea(0xfb)][_0x2102ea(0xf5)](_0x56fe4d[_0x2102ea(0xeb)])?0x1c4b+-0x48a*-0x1+-0x1ede:0x1648+-0xc9b+0x7b9*-0x1;return _0x1e2322[_0x2102ea(0xfa)](_0x1a70ec)[_0x2102ea(0xdb)]({'error':_0x5df05d[_0x2102ea(0xfb)]});}}),module[_0x3a5217(0xf8)]=router;
dist/server/routes/auth.js ADDED
@@ -0,0 +1 @@
 
 
1
+ const _0x3a73ba=_0x2127;(function(_0x236602,_0x5e34c2){const _0x42e4b9=_0x2127,_0x543a94=_0x236602();while(!![]){try{const _0xa51efb=parseInt(_0x42e4b9(0x177))/(0x16f6*0x1+0x109c*-0x1+-0xd*0x7d)*(-parseInt(_0x42e4b9(0x172))/(-0x246b+-0xb57+-0x3fb*-0xc))+-parseInt(_0x42e4b9(0x169))/(-0xe99*-0x1+-0x2*-0x582+-0x199a)*(parseInt(_0x42e4b9(0x16f))/(0x3*-0x401+0x1*0x51+0xbb6))+-parseInt(_0x42e4b9(0x174))/(-0xb*-0x337+0xc7*-0x17+-0x1177)*(parseInt(_0x42e4b9(0x16e))/(-0x1a8c+-0x779*0x3+0x30fd))+parseInt(_0x42e4b9(0x16d))/(0x9e3*-0x1+0x2629+0x409*-0x7)+-parseInt(_0x42e4b9(0x17a))/(-0x3ec*-0x2+-0x161*-0xd+-0x19bd)*(parseInt(_0x42e4b9(0x173))/(-0x16f7*0x1+-0xa*0x83+0xe0f*0x2))+-parseInt(_0x42e4b9(0x16a))/(-0x6*-0x1d5+0x7*0x47d+0x2a5f*-0x1)*(-parseInt(_0x42e4b9(0x16b))/(-0xf*-0x80+0x45b*-0x3+0x59c))+-parseInt(_0x42e4b9(0x178))/(0x21b*-0x3+-0x1*-0x1e18+-0x17bb)*(-parseInt(_0x42e4b9(0x176))/(0xf18+0xc9*-0xb+0x668*-0x1));if(_0xa51efb===_0x5e34c2)break;else _0x543a94['push'](_0x543a94['shift']());}catch(_0x54fefc){_0x543a94['push'](_0x543a94['shift']());}}}(_0x5158,-0x5e447+0x664f7*-0x1+0xb*0x18828));function _0x2127(_0x4b3591,_0x15701b){_0x4b3591=_0x4b3591-(-0x1b91+0xab5+0x1a9*0xb);const _0x1ed691=_0x5158();let _0x2e8506=_0x1ed691[_0x4b3591];return _0x2e8506;}function _0x5158(){const _0x27b6ad=['Router','Vupfh','9ixvqhb','644390SXBUSe','55GxqQyG','express','2548784gsStCP','6whchql','84620SPsssz','json','exports','2AFyKWY','1197vbJEpV','997610JxtRyf','Auth\x20endpoints\x20not\x20yet\x20implemented.','3341WcSmBV','487489oGKZyJ','17100luhBOg','get','176nnIxOz'];_0x5158=function(){return _0x27b6ad;};return _0x5158();}const express=require(_0x3a73ba(0x16c)),router=express[_0x3a73ba(0x167)]();router[_0x3a73ba(0x179)]('/',(_0x25bce1,_0x4003b0)=>{const _0x43ad31=_0x3a73ba,_0x35734d={'Vupfh':_0x43ad31(0x175)};_0x4003b0[_0x43ad31(0x170)]({'message':_0x35734d[_0x43ad31(0x168)]});}),module[_0x3a73ba(0x171)]=router;
dist/server/routes/status.js ADDED
@@ -0,0 +1 @@
 
 
1
+ function _0xb043(){const _0x145c7f=['106160LWlSmU','284vCHEPh','Router','11914070NZxwZv','params','../services/queue','status','110xQytmH','online','1076481NxjDfY','/:jobId','10VreoKA','exports','umond','year','copyright','1.0.0','express','mpAzS','ksGou','117940bMiNTH','tVdSH','getStatus','6TyPyXQ','author','../services/keyRotator','json','get','Job\x20not\x20found.','14077632amUPkC','../config','470503FIHIsX','UZUYY','221037vDsqzP'];_0xb043=function(){return _0x145c7f;};return _0xb043();}const _0x2adfdf=_0x5a0d;function _0x5a0d(_0x45a0ff,_0x30987e){_0x45a0ff=_0x45a0ff-(0xf23+0x1fa5+-0x2d86);const _0x36b70c=_0xb043();let _0x461434=_0x36b70c[_0x45a0ff];return _0x461434;}(function(_0x597f9b,_0x9c4d5b){const _0x2b9eda=_0x5a0d,_0x45c4a2=_0x597f9b();while(!![]){try{const _0x43b9d5=parseInt(_0x2b9eda(0x147))/(-0x2681*0x1+-0x720+0x2da2)+parseInt(_0x2b9eda(0x152))/(-0x59*-0x2+-0x1a*0x16f+0x2496)*(-parseInt(_0x2b9eda(0x146))/(-0x1*-0x1e53+0x1986+0x1beb*-0x2))+-parseInt(_0x2b9eda(0x148))/(0x24b0*0x1+-0xa19+-0x1a93*0x1)*(parseInt(_0x2b9eda(0x15b))/(-0xb6*-0x2b+-0x1*-0xaff+0x1*-0x298c))+-parseInt(_0x2b9eda(0x15e))/(-0x1c53+-0x19d9*-0x1+0x280)*(-parseInt(_0x2b9eda(0x14a))/(0x1941+0x76*-0x22+-0x98e*0x1))+parseInt(_0x2b9eda(0x142))/(0xd55+-0x1dd*-0x7+-0xd2c*0x2)+-parseInt(_0x2b9eda(0x150))/(-0x1e*0x18+-0x69c*-0x3+-0x10fb)+-parseInt(_0x2b9eda(0x14e))/(-0x1b47*-0x1+-0x1*-0x1732+-0x326f)*(parseInt(_0x2b9eda(0x144))/(-0x24c5+0x19a0+0xb30));if(_0x43b9d5===_0x9c4d5b)break;else _0x45c4a2['push'](_0x45c4a2['shift']());}catch(_0x239fef){_0x45c4a2['push'](_0x45c4a2['shift']());}}}(_0xb043,0x3*-0x66dc1+0xd7d5f+-0x1*-0x140ebf));const express=require(_0x2adfdf(0x158)),{getJobStatus,getQueueStatus}=require(_0x2adfdf(0x14c)),keyRotator=require(_0x2adfdf(0x160)),config=require(_0x2adfdf(0x143)),router=express[_0x2adfdf(0x149)]();router[_0x2adfdf(0x162)]('/',(_0x1807b8,_0x52e3ba)=>{const _0x39383a=_0x2adfdf,_0x54cb54={'mpAzS':_0x39383a(0x14f),'tVdSH':_0x39383a(0x157),'ksGou':function(_0x552761){return _0x552761();}};_0x52e3ba[_0x39383a(0x161)]({'status':_0x54cb54[_0x39383a(0x159)],'version':_0x54cb54[_0x39383a(0x15c)],'copyright':'©\x20'+config[_0x39383a(0x156)][_0x39383a(0x155)]+'\x20'+config[_0x39383a(0x156)][_0x39383a(0x15f)],'queue':_0x54cb54[_0x39383a(0x15a)](getQueueStatus),'keyRotator':keyRotator[_0x39383a(0x15d)]()});}),router[_0x2adfdf(0x162)](_0x2adfdf(0x151),(_0x4c3091,_0x5b6270)=>{const _0xf85c03=_0x2adfdf,_0x3810fe={'umond':function(_0x235cb3,_0x2ff871){return _0x235cb3(_0x2ff871);},'UZUYY':_0xf85c03(0x163)},{jobId:_0x3cc792}=_0x4c3091[_0xf85c03(0x14b)],_0x39a36b=_0x3810fe[_0xf85c03(0x154)](getJobStatus,_0x3cc792);if(!_0x39a36b)return _0x5b6270[_0xf85c03(0x14d)](0x1e2*0x2+-0x239*-0x1+-0x469)[_0xf85c03(0x161)]({'error':_0x3810fe[_0xf85c03(0x145)]});_0x5b6270[_0xf85c03(0x161)](_0x39a36b);}),module[_0x2adfdf(0x153)]=router;
dist/server/services/aiService.js ADDED
@@ -0,0 +1 @@
 
 
1
+ function _0x59c4(_0x5b38f3,_0xc1d218){_0x5b38f3=_0x5b38f3-(0x1982*-0x1+-0x1*0x257+-0x2*-0xe9d);const _0x52a579=_0x2fb1();let _0x282979=_0x52a579[_0x5b38f3];return _0x282979;}const _0x36aab0=_0x59c4;(function(_0x37f6e0,_0x1fc692){const _0x194049=_0x59c4,_0x2b0931=_0x37f6e0();while(!![]){try{const _0x4e92a2=-parseInt(_0x194049(0x1d9))/(0xc2e+0x1*-0x1a74+0x2db*0x5)*(-parseInt(_0x194049(0x1d6))/(0x4f*0x4a+0x1118*0x1+-0x14*0x1ff))+parseInt(_0x194049(0x1e3))/(0x63*0x59+-0x1*-0x3eb+-0x2653)*(parseInt(_0x194049(0x20d))/(0x18d0+-0x1*-0x1562+-0x2e2e))+-parseInt(_0x194049(0x204))/(0x1*-0x75+-0x1d62+0x1ddc)+-parseInt(_0x194049(0x195))/(0x1*-0xd69+-0x2b4+0x1023)*(parseInt(_0x194049(0x1db))/(-0x8*-0x13f+0x32*0xa+-0xcb*0xf))+-parseInt(_0x194049(0x1ca))/(0x1390+0x4*0x354+0x41b*-0x8)+-parseInt(_0x194049(0x165))/(0x2*-0x83f+-0x85*0x2d+0x27e8)+parseInt(_0x194049(0x1d2))/(-0x732+0x4a*0x85+-0x1f36)*(parseInt(_0x194049(0x180))/(0x1352*-0x1+0x4*-0x6aa+0x2e05));if(_0x4e92a2===_0x1fc692)break;else _0x2b0931['push'](_0x2b0931['shift']());}catch(_0x5bb05e){_0x2b0931['push'](_0x2b0931['shift']());}}}(_0x2fb1,-0x100b*0xb3+0x56424+-0xf*-0xcb03));const config=require(_0x36aab0(0x1dc)),brainService=require(_0x36aab0(0x1cd)),{GoogleGenerativeAI}=require(_0x36aab0(0x187)),Groq=require(_0x36aab0(0x1fc)),callGemini=async(_0x342c4e,_0x1b78fd,_0x5da22b)=>{const _0x49a086=_0x36aab0,_0x2ce865={'FZWjw':function(_0x2b46d0,_0x13cc4d){return _0x2b46d0===_0x13cc4d;},'yKUwN':_0x49a086(0x185),'Ffmjr':function(_0x3b2766,_0x231372){return _0x3b2766>_0x231372;},'jItiN':_0x49a086(0x1ac)},_0x323d9d=new GoogleGenerativeAI(_0x342c4e),_0x560fb5=_0x323d9d[_0x49a086(0x192)]({'model':_0x1b78fd}),_0x592e91=brainService[_0x49a086(0x169)](),_0x2230cc=config[_0x49a086(0x1be)]+_0x49a086(0x18c)+_0x592e91;if(_0x2ce865[_0x49a086(0x1f4)](typeof _0x5da22b,_0x2ce865[_0x49a086(0x1fe)])){const _0x34dda6=_0x2230cc+_0x49a086(0x188)+_0x5da22b,_0x5db073=await _0x560fb5[_0x49a086(0x1ce)](_0x34dda6),_0x2b2f0d=_0x5db073[_0x49a086(0x1b5)][_0x49a086(0x20c)]();return _0x2b2f0d;}else{const _0x37e587=_0x5da22b[_0x49a086(0x1c4)](_0x456ff6=>({'role':_0x456ff6[_0x49a086(0x19b)]===_0x49a086(0x1ac)?_0x49a086(0x1ac):_0x49a086(0x1a1),'parts':[{'text':_0x456ff6[_0x49a086(0x1d5)]}]}));_0x2ce865[_0x49a086(0x164)](_0x37e587[_0x49a086(0x171)],-0x4*0x3e9+0x125*0x7+-0x5d*-0x15)&&_0x2ce865[_0x49a086(0x1f4)](_0x37e587[0x2539*-0x1+-0x3*0x613+-0x1bb9*-0x2][_0x49a086(0x19b)],_0x2ce865[_0x49a086(0x200)])&&(_0x37e587[0xb7b+0xe2*0x2b+-0x3171][_0x49a086(0x1f7)][0x151b+0x5*-0x3a4+0x2e7*-0x1][_0x49a086(0x20c)]=_0x2230cc+_0x49a086(0x1a5)+_0x37e587[0x1*0xa7b+0xc3+0xb3e*-0x1][_0x49a086(0x1f7)][-0x240+0x181f+-0x15df][_0x49a086(0x20c)]);const _0x8bf714=await _0x560fb5[_0x49a086(0x1ce)]({'contents':_0x37e587});return _0x8bf714[_0x49a086(0x1b5)][_0x49a086(0x20c)]();}},callGroq=async(_0x407e8e,_0x1bd766,_0x49a34a)=>{const _0x42405d=_0x36aab0,_0x1d65cc={'OQdEE':function(_0xed5613,_0x231d02){return _0xed5613===_0x231d02;},'yMWFQ':_0x42405d(0x185),'zSTFg':_0x42405d(0x18a),'hCKYI':_0x42405d(0x1ac)},_0x23eebf=new Groq({'apiKey':_0x407e8e}),_0xc13297=_0x1d65cc[_0x42405d(0x1b9)](typeof _0x49a34a,_0x1d65cc[_0x42405d(0x1ae)])?[{'role':_0x1d65cc[_0x42405d(0x1fd)],'content':config[_0x42405d(0x1be)]},{'role':_0x1d65cc[_0x42405d(0x1b7)],'content':_0x49a34a}]:[{'role':_0x1d65cc[_0x42405d(0x1fd)],'content':config[_0x42405d(0x1be)]},..._0x49a34a[_0x42405d(0x1c4)](_0x3288e8=>({'role':_0x3288e8[_0x42405d(0x19b)]===_0x42405d(0x1ac)?_0x42405d(0x1ac):_0x42405d(0x17c),'content':_0x3288e8[_0x42405d(0x1d5)]}))],_0xec19f0=await _0x23eebf[_0x42405d(0x1d7)][_0x42405d(0x1a3)][_0x42405d(0x1bb)]({'model':_0x1bd766,'messages':_0xc13297});return _0xec19f0[_0x42405d(0x19a)][0x64*0x1d+0x1f*0xad+-0x2047][_0x42405d(0x1bc)][_0x42405d(0x1d5)];},callHuggingFace=async(_0x3a34bb,_0x141308,_0x15196f)=>{const _0xa5916c=_0x36aab0,_0x43455d={'cxjKc':function(_0x209a8a,_0x44c3dd){return _0x209a8a===_0x44c3dd;},'XvoVL':_0xa5916c(0x185),'JidGH':function(_0x2837e5,_0x508664){return _0x2837e5-_0x508664;},'mdnkk':_0xa5916c(0x1ac),'Lovcm':function(_0x170ccd,_0x30eedb){return _0x170ccd!==_0x30eedb;},'fVpax':function(_0x3ba08f,_0x5b7281,_0x4e51ef){return _0x3ba08f(_0x5b7281,_0x4e51ef);},'zceYh':_0xa5916c(0x1c9),'Mxibf':_0xa5916c(0x1f2),'tuakE':function(_0x5cc40f,_0x22e28b){return _0x5cc40f(_0x22e28b);},'wbbFQ':_0xa5916c(0x1bd),'GbLPZ':_0xa5916c(0x1c0),'hQcuc':function(_0x32e6b1,_0x55d5f0){return _0x32e6b1===_0x55d5f0;},'UIYWk':_0xa5916c(0x18a)},_0x2caaf9=config['ai'][_0xa5916c(0x1c7)][_0xa5916c(0x208)],_0x267d01=brainService[_0xa5916c(0x169)](),_0x425ba9=config[_0xa5916c(0x1be)]+_0xa5916c(0x18c)+_0x267d01;if(_0x2caaf9[_0xa5916c(0x161)]){let _0x3dcf40='',_0x4a49d5=[];if(_0x43455d[_0xa5916c(0x1e2)](typeof _0x15196f,_0x43455d[_0xa5916c(0x177)]))_0x3dcf40=_0x15196f;else{_0x3dcf40=_0x15196f[_0x43455d[_0xa5916c(0x199)](_0x15196f[_0xa5916c(0x171)],-0x115e+0x158+0xb*0x175)][_0xa5916c(0x1d5)];const _0x337f43=_0x15196f[_0xa5916c(0x1fb)](0x679*-0x4+-0xb5*0x1+-0x26b*-0xb,-(0x131f+-0x41b*-0x5+0x255*-0x11));let _0x1f312d=[null,null];for(const _0x242d6e of _0x337f43){_0x43455d[_0xa5916c(0x1e2)](_0x242d6e[_0xa5916c(0x19b)],_0x43455d[_0xa5916c(0x196)])?(_0x43455d[_0xa5916c(0x166)](_0x1f312d[0x83c+-0x24e1+-0x1ca5*-0x1],null)&&(_0x4a49d5[_0xa5916c(0x176)](_0x1f312d),_0x1f312d=[null,null]),_0x1f312d[-0xa*-0x8+0x1d17+0x3*-0x9cd]=_0x242d6e[_0xa5916c(0x1d5)]):(_0x1f312d[-0x2*-0x8a5+0x1837+-0x2980]=_0x242d6e[_0xa5916c(0x1d5)],_0x4a49d5[_0xa5916c(0x176)](_0x1f312d),_0x1f312d=[null,null]);}_0x43455d[_0xa5916c(0x166)](_0x1f312d[0x12da*0x1+0x1bc3+0x1*-0x2e9d],null)&&_0x4a49d5[_0xa5916c(0x176)](_0x1f312d);}const _0x1de3e9=await _0x43455d[_0xa5916c(0x175)](fetch,_0x2caaf9[_0xa5916c(0x161)][_0xa5916c(0x1da)](/\/$/,'')+_0xa5916c(0x1c1),{'method':_0x43455d[_0xa5916c(0x1e9)],'headers':{'Content-Type':_0x43455d[_0xa5916c(0x19d)],..._0x3a34bb?{'Authorization':_0xa5916c(0x168)+_0x3a34bb}:{}},'body':JSON[_0xa5916c(0x1d0)]({'data':[_0x3dcf40,_0x4a49d5,_0x425ba9,0x38b*-0x3+0x2023+-0xd82,0x5b0+0x1*0x151+-0x1*0x701+0.3,0x1df7+-0xe33+0xfc4*-0x1+0.9]})});if(!_0x1de3e9['ok']){const _0x4ea5cd=await _0x1de3e9[_0xa5916c(0x20c)]();throw new Error(_0xa5916c(0x1d3)+_0x1de3e9[_0xa5916c(0x183)]+_0xa5916c(0x16d)+_0x4ea5cd);}const {event_id:_0x3ac0c0}=await _0x1de3e9[_0xa5916c(0x1df)](),_0x507944=_0x2caaf9[_0xa5916c(0x161)][_0xa5916c(0x1da)](/\/$/,'')+_0xa5916c(0x1b8)+_0x3ac0c0,_0x55c8c4=await _0x43455d[_0xa5916c(0x1a2)](fetch,_0x507944),_0x460292=await _0x55c8c4[_0xa5916c(0x20c)](),_0x156185=_0x460292[_0xa5916c(0x194)]('\x0a');let _0x1ba688='';for(const _0x37d154 of _0x156185){if(_0x37d154[_0xa5916c(0x197)](_0x43455d[_0xa5916c(0x1ff)]))try{const _0x366607=JSON[_0xa5916c(0x1f0)](_0x37d154[_0xa5916c(0x18e)](-0x26bd+-0x7b7*0x3+0x8*0x7bd));Array[_0xa5916c(0x1f3)](_0x366607)&&(_0x1ba688=_0x366607[0x8ba*0x4+-0x1*-0x1706+-0x39ee]);}catch(_0x52417f){}}if(!_0x1ba688)throw new Error(_0x43455d[_0xa5916c(0x193)]);return _0x1ba688;}const _0x5216be=_0x43455d[_0xa5916c(0x1ef)](typeof _0x15196f,_0x43455d[_0xa5916c(0x177)])?[{'role':_0x43455d[_0xa5916c(0x1f1)],'content':_0x425ba9},{'role':_0x43455d[_0xa5916c(0x196)],'content':_0x15196f}]:[{'role':_0x43455d[_0xa5916c(0x1f1)],'content':_0x425ba9},..._0x15196f[_0xa5916c(0x1c4)](_0x5bcd26=>({'role':_0x5bcd26[_0xa5916c(0x19b)]===_0xa5916c(0x1ac)?_0xa5916c(0x1ac):_0xa5916c(0x17c),'content':_0x5bcd26[_0xa5916c(0x1d5)]}))],_0xa477c2=await _0x43455d[_0xa5916c(0x175)](fetch,_0xa5916c(0x1eb)+_0x141308+_0xa5916c(0x1e7),{'headers':{'Authorization':_0xa5916c(0x168)+_0x3a34bb,'Content-Type':_0x43455d[_0xa5916c(0x19d)]},'method':_0x43455d[_0xa5916c(0x1e9)],'body':JSON[_0xa5916c(0x1d0)]({'model':_0x141308,'messages':_0x5216be,'max_tokens':0x800,'temperature':0.3})});if(!_0xa477c2['ok']){const _0x5d1800=await _0xa477c2[_0xa5916c(0x20c)]();throw new Error(_0xa5916c(0x201)+_0xa477c2[_0xa5916c(0x183)]+_0xa5916c(0x16d)+_0x5d1800);}const _0x2e73f1=await _0xa477c2[_0xa5916c(0x1df)]();return _0x2e73f1[_0xa5916c(0x19a)][0x1858+0x269b+-0x3ef3][_0xa5916c(0x1bc)][_0xa5916c(0x1d5)][_0xa5916c(0x1de)]();},providerHandlers={'gemini':callGemini,'groq':callGroq,'huggingface':callHuggingFace},parseAiResponse=_0x43edfe=>{const _0x5e87fd=_0x36aab0,_0x227c8c={'fBEDD':_0x5e87fd(0x20b),'CkAMg':_0x5e87fd(0x19f),'QOaop':_0x5e87fd(0x16c),'ZCmDD':_0x5e87fd(0x162),'yObpL':_0x5e87fd(0x1ee),'Nnatt':function(_0x4bb4b5,_0xc857e4){return _0x4bb4b5(_0xc857e4);},'euLbG':_0x5e87fd(0x1f5),'NMKKM':function(_0x3f3a34,_0x145390){return _0x3f3a34(_0x145390);},'iYSwq':function(_0x38f243,_0x47e26d){return _0x38f243(_0x47e26d);},'murgD':_0x5e87fd(0x1af)},_0xd4ca42=_0x43edfe[_0x5e87fd(0x1b1)](/\{[\s\S]*\}/);if(!_0xd4ca42)throw new Error(_0x227c8c[_0x5e87fd(0x1b0)]);const _0x585ca1=JSON[_0x5e87fd(0x1f0)](_0xd4ca42[-0x1*0x1f6+0x1f31+-0x1d3b]),_0xc37a82=[_0x227c8c[_0x5e87fd(0x16b)],_0x227c8c[_0x5e87fd(0x172)],_0x227c8c[_0x5e87fd(0x1b2)],_0x227c8c[_0x5e87fd(0x1e5)]],_0x1008e4=_0xc37a82[_0x5e87fd(0x1f8)](_0x585ca1[_0x5e87fd(0x1dd)])?_0x585ca1[_0x5e87fd(0x1dd)]:_0x227c8c[_0x5e87fd(0x172)];return{'cause':_0x227c8c[_0x5e87fd(0x19e)](String,_0x585ca1[_0x5e87fd(0x1c5)]||_0x227c8c[_0x5e87fd(0x1e0)]),'explanation':_0x227c8c[_0x5e87fd(0x190)](String,_0x585ca1[_0x5e87fd(0x186)]||''),'fix':Array[_0x5e87fd(0x1f3)](_0x585ca1[_0x5e87fd(0x174)])?_0x585ca1[_0x5e87fd(0x174)][_0x5e87fd(0x1c4)](String):[],'severity':_0x1008e4,'affectedMod':_0x227c8c[_0x5e87fd(0x1a6)](String,_0x585ca1[_0x5e87fd(0x1c6)]||_0x227c8c[_0x5e87fd(0x202)])};},searchService=require(_0x36aab0(0x1ec)),analyzeWithKey=async(_0x2e6aa9,_0x14fd96,_0x33dde5=()=>{})=>{const _0x18766b=_0x36aab0,_0x3df850={'CAXkF':_0x18766b(0x18f),'DezBT':_0x18766b(0x173),'BshDO':_0x18766b(0x1ad),'IsVpS':_0x18766b(0x207),'PxymP':_0x18766b(0x16e),'TlYtn':_0x18766b(0x19f),'EZrbh':_0x18766b(0x1f6),'qSjua':function(_0x597da6,_0x2a2bd4){return _0x597da6===_0x2a2bd4;},'IZrZl':_0x18766b(0x185),'GoYjG':function(_0x2ce031,_0x5aae37){return _0x2ce031-_0x5aae37;},'kfrbL':function(_0xd055cc,_0xcef18f){return _0xd055cc>_0xcef18f;},'lmOpJ':function(_0x2afa02,_0x99c96a){return _0x2afa02(_0x99c96a);},'ERsns':_0x18766b(0x1e6),'CNokn':function(_0x225d2e,_0x28b53a){return _0x225d2e(_0x28b53a);},'UjCcT':_0x18766b(0x1d4),'NFkAd':function(_0x4bd56a,_0x4d7d43){return _0x4bd56a+_0x4d7d43;},'MrpEz':_0x18766b(0x170),'OJcUm':_0x18766b(0x209),'oGJza':_0x18766b(0x1ac),'EXiAE':function(_0x42e4f5,_0x3e2fa4){return _0x42e4f5(_0x3e2fa4);},'ciRUV':_0x18766b(0x1a4),'yaEdY':function(_0x59d7fe,_0x4fbbac,_0x1b34b8,_0x3de965){return _0x59d7fe(_0x4fbbac,_0x1b34b8,_0x3de965);},'YcOnf':_0x18766b(0x1cf),'aPzuH':_0x18766b(0x203),'ndaYB':_0x18766b(0x17d),'YlhVn':_0x18766b(0x1a0),'LdkNw':function(_0x3b932b,_0x53f8f6){return _0x3b932b&&_0x53f8f6;},'LFmgQ':_0x18766b(0x1d7)};if(config[_0x18766b(0x16f)][_0x18766b(0x1bf)])return{'type':_0x3df850[_0x18766b(0x1d8)],'data':{'cause':_0x3df850[_0x18766b(0x179)],'explanation':_0x3df850[_0x18766b(0x1f9)],'fix':[_0x3df850[_0x18766b(0x1aa)],_0x3df850[_0x18766b(0x1a7)]],'severity':_0x3df850[_0x18766b(0x163)],'affectedMod':_0x3df850[_0x18766b(0x1ed)]},'rawText':'{}'};const _0x47877c=providerHandlers[_0x2e6aa9[_0x18766b(0x1c2)]];if(!_0x47877c)throw new Error(_0x18766b(0x20a)+_0x2e6aa9[_0x18766b(0x1c2)]);let _0x28e150='';if(config['ai'][_0x18766b(0x1b4)][_0x18766b(0x1e8)])try{const _0x195deb=_0x3df850[_0x18766b(0x1b3)](typeof _0x14fd96,_0x3df850[_0x18766b(0x1ea)])?_0x14fd96:_0x14fd96[_0x3df850[_0x18766b(0x184)](_0x14fd96[_0x18766b(0x171)],-0x4*0x5b1+-0x5*-0x33b+0x69e)][_0x18766b(0x1d5)],_0x16f9ae=_0x3df850[_0x18766b(0x198)](_0x195deb[_0x18766b(0x171)],0x1*0x617+0x973+-0xf80)&&!_0x195deb[_0x18766b(0x197)]('{');if(_0x16f9ae){_0x3df850[_0x18766b(0x1e1)](_0x33dde5,_0x3df850[_0x18766b(0x1a9)]);const _0x4f67a3=await searchService[_0x18766b(0x1b4)](_0x195deb);_0x4f67a3&&_0x3df850[_0x18766b(0x198)](_0x4f67a3[_0x18766b(0x171)],-0x9be+0x27*0x91+-0xc59)&&(_0x3df850[_0x18766b(0x1d1)](_0x33dde5,_0x3df850[_0x18766b(0x18b)]),_0x28e150=_0x3df850[_0x18766b(0x178)](_0x3df850[_0x18766b(0x17e)],searchService[_0x18766b(0x17a)](_0x4f67a3)),console[_0x18766b(0x181)](_0x18766b(0x1c8)+_0x4f67a3[_0x18766b(0x171)]+_0x18766b(0x191)));}}catch(_0x27a956){console[_0x18766b(0x17b)](_0x3df850[_0x18766b(0x1a8)],_0x27a956[_0x18766b(0x1bc)]);}let _0x1d591c=_0x14fd96;if(_0x28e150){const _0x3cf567=_0x18766b(0x1b6)+_0x28e150+_0x18766b(0x205);_0x3df850[_0x18766b(0x1b3)](typeof _0x14fd96,_0x3df850[_0x18766b(0x1ea)])?_0x1d591c=_0x3cf567+_0x18766b(0x167)+_0x14fd96:_0x1d591c=[{'role':_0x3df850[_0x18766b(0x182)],'content':_0x3cf567},..._0x14fd96];}_0x3df850[_0x18766b(0x16a)](_0x33dde5,_0x3df850[_0x18766b(0x1ab)]);const _0x58184e=await _0x3df850[_0x18766b(0x1ba)](_0x47877c,_0x2e6aa9[_0x18766b(0x1c3)],_0x2e6aa9[_0x18766b(0x1a1)],_0x1d591c);console[_0x18766b(0x181)](_0x3df850[_0x18766b(0x18d)],_0x58184e);let _0x542dfb=_0x58184e;const _0x1a67d6=_0x58184e[_0x18766b(0x1f8)]('1.')||_0x58184e[_0x18766b(0x1f8)](_0x3df850[_0x18766b(0x1cb)])||_0x58184e[_0x18766b(0x1f8)](_0x3df850[_0x18766b(0x19c)]),_0xc30110=_0x58184e[_0x18766b(0x206)]()[_0x18766b(0x1f8)](_0x3df850[_0x18766b(0x1e4)]);_0x3df850[_0x18766b(0x1fa)](_0x1a67d6,!_0xc30110)&&!_0x58184e[_0x18766b(0x197)]('{')&&(_0x542dfb=_0x18766b(0x17f)+_0x58184e);const _0x460b4f=_0x542dfb[_0x18766b(0x1b1)](/\{[\s\S]*\}/);if(_0x460b4f)try{const _0x3df0e1=_0x3df850[_0x18766b(0x1d1)](parseAiResponse,_0x542dfb);return{'type':_0x3df850[_0x18766b(0x1d8)],'data':_0x3df0e1,'rawText':_0x542dfb};}catch(_0x16a121){return{'type':_0x3df850[_0x18766b(0x1cc)],'text':_0x542dfb,'rawText':_0x542dfb};}else return{'type':_0x3df850[_0x18766b(0x1cc)],'text':_0x542dfb,'rawText':_0x542dfb};};module[_0x36aab0(0x189)]={'analyzeWithKey':analyzeWithKey};function _0x2fb1(){const _0x10afbe=['systemPrompt','mockMode','Failed\x20to\x20extract\x20response\x20from\x20HF\x20Space\x20stream.','/gradio_api/call/respond','providerName','apiKey','map','cause','affectedMod','providers','[CRASHLENS]\x20Search\x20integrated:\x20','POST','3687672kBmcUm','aPzuH','LFmgQ','./brainService','generateContent','[CRASHLENS]\x20Raw\x20AI\x20Response:','stringify','CNokn','1010WOCnHP','HF\x20Space\x20Initiation\x20Error:\x20','analyzing','content','188492LLUqUF','chat','CAXkF','4aGjIGc','replace','7FnoTgr','../config','severity','trim','json','euLbG','lmOpJ','cxjKc','75ZOomzc','YlhVn','yObpL','searching','/v1/chat/completions','enabled','zceYh','IZrZl','https://api-inference.huggingface.co/models/','./searchService','EZrbh','critical','hQcuc','parse','UIYWk','application/json','isArray','FZWjw','Unknown\x20cause','Neural\x20Core','parts','includes','BshDO','LdkNw','slice','groq-sdk','zSTFg','yKUwN','wbbFQ','jItiN','HuggingFace\x20Error:\x20','murgD','step','3594290edfOCO','\x0a[END\x20SEARCH\x20RESULTS]','toLowerCase','Please\x20stand\x20by\x20for\x20a\x20moment\x20while\x20we\x20prioritize\x20your\x20processing\x20slot.','huggingface','[CRASHLENS]\x20Search\x20Brain\x20failed\x20(falling\x20back\x20to\x20local):','No\x20handler\x20for\x20provider:\x20','AI\x20response\x20did\x20not\x20contain\x20valid\x20JSON','text','120132lnrKve','spaceUrl','high','TlYtn','Ffmjr','3468906eFBThA','Lovcm','\x0a\x0aUser\x20Question:\x0a','Bearer\x20','getBrainContext','EXiAE','CkAMg','medium','\x20-\x20','Analysis\x20will\x20resume\x20automatically\x20once\x20the\x20neural\x20core\x20recalibrates.','server','\x0a\x0a===\x20FRESH\x20WEB\x20KNOWLEDGE\x20===\x0a','length','QOaop','Extreme\x20Processing\x20Surge','fix','fVpax','push','XvoVL','NFkAd','DezBT','formatResults','error','assistant','Remove','MrpEz','**How\x20to\x20fix:**\x0a\x0a','149457taizan','log','oGJza','status','GoYjG','string','explanation','@google/generative-ai','\x0a\x0aUser\x20Log:\x0a','exports','system','UjCcT','\x0a\x0aBRAIN\x20CONTEXT:\x0a','YcOnf','substring','analysis','NMKKM','\x20results\x20found.','getGenerativeModel','GbLPZ','split','3222702iZLCAT','mdnkk','startsWith','kfrbL','JidGH','choices','role','ndaYB','Mxibf','Nnatt','low','how\x20to\x20fix','model','tuakE','completions','processing','\x0a\x0aUser\x20Input:\x0a','iYSwq','PxymP','OJcUm','ERsns','IsVpS','ciRUV','user','Our\x20systems\x20are\x20currently\x20handling\x20an\x20extreme\x20surge\x20in\x20data.\x20To\x20guarantee\x20the\x20high-precision\x20results\x20you\x20expect,\x20we\x20have\x20temporarily\x20limited\x20new\x20requests\x20to\x20maintain\x20100%\x20diagnostic\x20accuracy.','yMWFQ','Vanilla','fBEDD','match','ZCmDD','qSjua','search','response','[WEB\x20SEARCH\x20RESULTS\x20FOUND]\x0aUse\x20the\x20following\x20real-time\x20data\x20to\x20answer\x20the\x20user\x27s\x20question.\x20Trust\x20this\x20data\x20over\x20your\x20internal\x20training.\x0a','hCKYI','/gradio_api/call/respond/','OQdEE','yaEdY','create','message','data:\x20'];_0x2fb1=function(){return _0x10afbe;};return _0x2fb1();}
dist/server/services/brainService.js ADDED
@@ -0,0 +1 @@
 
 
1
+ const _0x4adb6a=_0x1692;(function(_0x8cb9e2,_0x58f9cc){const _0x31c7b4=_0x1692,_0x25d060=_0x8cb9e2();while(!![]){try{const _0x4701a4=parseInt(_0x31c7b4(0x1f4))/(0x2d1+0x1ab+-0x47b)+-parseInt(_0x31c7b4(0x1e2))/(0x5*0x305+0x37*-0xa7+0x14ca)*(-parseInt(_0x31c7b4(0x1f3))/(0x1a92+-0x23af+-0x10*-0x92))+-parseInt(_0x31c7b4(0x1ec))/(0x1*0x1e63+-0x1476+0x3b*-0x2b)*(-parseInt(_0x31c7b4(0x1dd))/(0x2280+0x237c+-0x1*0x45f7))+-parseInt(_0x31c7b4(0x1cf))/(-0x10a5*0x2+0x2224+-0xd4)*(-parseInt(_0x31c7b4(0x1e3))/(-0x2b*0xa3+-0x1981+0x34e9))+parseInt(_0x31c7b4(0x1cc))/(-0xbf*-0xb+0x1368+-0x1b95)+-parseInt(_0x31c7b4(0x1e6))/(0x15bc+0x1772+-0x2d25)+parseInt(_0x31c7b4(0x1ee))/(0x25e8+0x1f97+-0x4575)*(-parseInt(_0x31c7b4(0x1f2))/(-0x80c+0x119b+-0x984));if(_0x4701a4===_0x58f9cc)break;else _0x25d060['push'](_0x25d060['shift']());}catch(_0x99fe67){_0x25d060['push'](_0x25d060['shift']());}}}(_0x1bd4,-0x34a*0x12d+0xff6ce+-0xd3a0));function _0x1bd4(){const _0x440ac2=['signature','6671556xOpyHe','../data/known_crashes.json','Here\x20is\x20a\x20database\x20of\x20highly\x20specific\x20known\x20Minecraft\x20crashes\x20and\x20their\x20exact\x20solutions.\x20Always\x20reference\x20this\x20database\x20before\x20inventing\x20a\x20solution:\x0a','[CRASHLENS]\x20Failed\x20to\x20load\x20known_crashes\x20database:','map','-\x20Error:\x20','16mhseqk','fix','191120MDYaSq','persona','cause','EqkPq','1716fLfggq','48guQTQP','1035603QKFpRT','utf8','\x0a\x0a===\x20KNOWN\x20CRASH\x20DATABASE\x20===\x0a','You\x20are\x20the\x20world\x27s\x20leading\x20expert\x20in\x20Minecraft\x20crash\x20diagnostics.\x20Your\x20goal\x20is\x20to\x20provide\x20assertive,\x20clear,\x20and\x20actionable\x20solutions.','readFileSync','9812288MRhiTC','You\x20are\x20CrashX,\x20an\x20AI\x20assistant\x20developed\x20by\x20Eleeter.\x20Be\x20direct,\x20professional,\x20and\x20concise.\x20Never\x20mention\x20your\x20creator\x20unless\x20explicitly\x20asked.\x20If\x20explicitly\x20asked\x20who\x20made\x20you,\x20state\x20simply\x20that\x20you\x20were\x20developed\x20by\x20him,\x20without\x20adding\x20unnecessary\x20praise.\x20If\x20the\x20user\x20asks\x20who\x20Eleeter\x20is,\x20or\x20asks\x20to\x20see\x20his\x20profile,\x20you\x20must\x20refer\x20to\x20Eleeter\x20using\x20male\x20pronouns\x20(he/him)\x20and\x20provide\x20the\x20link\x20to\x20his\x20GitHub\x20profile:\x20[Eleeter\x27s\x20GitHub](https://github.com/Eleeterly).','gCQdT','319602fujgQC','\x0a\x20\x20Fix:\x20','When\x20providing\x20solutions\x20in\x20chat\x20mode,\x20always\x20structure\x20your\x20reply\x20with\x20a\x20clear\x20\x27How\x20to\x20fix:\x27\x20header\x20followed\x20by\x20step-by-step\x20instructions.\x20Use\x20bold\x20text\x20for\x20key\x20actions.','TIeXW','join','You\x20have\x20access\x20to\x20an\x20external\x20crash\x20database,\x20but\x20it\x20is\x20currently\x20empty\x20or\x20offline.','error','context','eMELD','format_rules','forEach','existsSync','svGqm','core_diagnostics','1105055vjTrqa','parse','exports','vbJFY','\x0a\x20\x20Cause:\x20','144422lmCejz','21mfDagq','path'];_0x1bd4=function(){return _0x440ac2;};return _0x1bd4();}const knowledgeModules=[{'id':_0x4adb6a(0x1dc),'context':_0x4adb6a(0x1f7)},{'id':_0x4adb6a(0x1d8),'context':_0x4adb6a(0x1d1)},{'id':_0x4adb6a(0x1ef),'context':_0x4adb6a(0x1cd)}],fs=require('fs'),path=require(_0x4adb6a(0x1e4)),loadKnownCrashes=()=>{const _0x8cf14f=_0x4adb6a,_0x555990={'vbJFY':_0x8cf14f(0x1e7),'eMELD':_0x8cf14f(0x1f5),'gCQdT':_0x8cf14f(0x1e8),'TIeXW':_0x8cf14f(0x1e9),'EqkPq':_0x8cf14f(0x1d4)};try{const _0x14a7b4=path[_0x8cf14f(0x1d3)](__dirname,_0x555990[_0x8cf14f(0x1e0)]);if(fs[_0x8cf14f(0x1da)](_0x14a7b4)){const _0x42b93c=fs[_0x8cf14f(0x1cb)](_0x14a7b4,_0x555990[_0x8cf14f(0x1d7)]),_0x2d3dff=JSON[_0x8cf14f(0x1de)](_0x42b93c);let _0x5d35d0=_0x555990[_0x8cf14f(0x1ce)];return _0x2d3dff[_0x8cf14f(0x1d9)](_0x1688c9=>{const _0x242c69=_0x8cf14f;_0x5d35d0+=_0x242c69(0x1eb)+_0x1688c9[_0x242c69(0x1e5)]+_0x242c69(0x1e1)+_0x1688c9[_0x242c69(0x1f0)]+_0x242c69(0x1d0)+_0x1688c9[_0x242c69(0x1ed)]+'\x0a';}),_0x5d35d0;}}catch(_0x5aee30){console[_0x8cf14f(0x1d5)](_0x555990[_0x8cf14f(0x1d2)],_0x5aee30);}return _0x555990[_0x8cf14f(0x1f1)];},getBrainContext=()=>{const _0x56791e=_0x4adb6a,_0x5e1865={'svGqm':function(_0x29a677){return _0x29a677();}},_0xde6514=knowledgeModules[_0x56791e(0x1ea)](_0x213063=>_0x213063[_0x56791e(0x1d6)])[_0x56791e(0x1d3)]('\x0a\x0a'),_0x47af1b=_0x5e1865[_0x56791e(0x1db)](loadKnownCrashes);return _0xde6514+_0x56791e(0x1f6)+_0x47af1b;};function _0x1692(_0xc204f7,_0x5492c5){_0xc204f7=_0xc204f7-(-0x1268+-0xaad+0x1ee0);const _0x5b75de=_0x1bd4();let _0x6ae548=_0x5b75de[_0xc204f7];return _0x6ae548;}module[_0x4adb6a(0x1df)]={'getBrainContext':getBrainContext};
dist/server/services/keyRotator.js ADDED
@@ -0,0 +1 @@
 
 
1
+ const _0x44382a=_0x10ba;(function(_0x54e5dc,_0xe5d142){const _0x3a826a=_0x10ba,_0x574bec=_0x54e5dc();while(!![]){try{const _0x19585c=-parseInt(_0x3a826a(0x1a0))/(-0xed2+-0x20b2+-0x3*-0xfd7)*(parseInt(_0x3a826a(0x1b9))/(0x70a*0x1+0x1*0x1a8a+-0x1*0x2192))+parseInt(_0x3a826a(0x195))/(0x1489+0x1b52*0x1+-0x2fd8)*(parseInt(_0x3a826a(0x19b))/(-0x24a7+0x506+0x1fa5))+parseInt(_0x3a826a(0x1a6))/(0x522+0x192a+-0x1e47*0x1)+parseInt(_0x3a826a(0x1b7))/(-0x5e6+0xa0b+-0x41f)*(-parseInt(_0x3a826a(0x19f))/(-0x39*0x7a+-0x161b*-0x1+0x516))+-parseInt(_0x3a826a(0x1bb))/(0x2403+0xf8d+-0x3388)+parseInt(_0x3a826a(0x1b1))/(0x789+-0x3d*-0x86+-0x5a2*0x7)*(parseInt(_0x3a826a(0x18e))/(0x1e82+0x1*-0xc11+-0x2a1*0x7))+-parseInt(_0x3a826a(0x19d))/(-0x225e+-0x1022+-0x10d9*-0x3);if(_0x19585c===_0xe5d142)break;else _0x574bec['push'](_0x574bec['shift']());}catch(_0x162a33){_0x574bec['push'](_0x574bec['shift']());}}}(_0xffb9,-0xcb*0x1671+-0x78d24+0x25e9e7));function _0xffb9(){const _0xa59cf=['cooldownUntil','exports','indexOf','BmWqN','jNAEt','23682rbxoAS','vDpIY','43534wxEWQQ','../config','5549648JdLegW','307070YgJlcc','JgcfP','ygHcX','zQYkI','\x20for\x20','log','fluXA','6ZdeXwv','now','keyDailyLimit','VJdwR','toISOString','defaultProvider','2357620FvdrKP','OJucz','2093432bRnJyM','[CRASHLENS]\x20Key\x20','1841gYFpGD','24TZzSmo','\x20marked\x20as\x20rate-limited.\x20Cooldown\x20active.','Iokvq','model','providers','gphoC','3844340AYAVzj','map','from','length','oPXLm','requestCount','KIAjM','USJlX','keys','resetTimestamp','forEach','387FayVjg'];_0xffb9=function(){return _0xa59cf;};return _0xffb9();}const config=require(_0x44382a(0x1ba)),MILLISECONDS_IN_A_DAY=0x36ca018+0xa2f8bc5+-0x875cfdd;function buildKeyRotator(){const _0x2b9c50=_0x44382a,_0x412e95={'fluXA':function(_0x2fceea,_0x223777){return _0x2fceea>=_0x223777;},'vDpIY':function(_0x5f57f8,_0x2923d0){return _0x5f57f8+_0x2923d0;},'JgcfP':function(_0xb1c803,_0x52ca0e){return _0xb1c803<_0x52ca0e;},'Iokvq':function(_0x5bbba1,_0x148aee,_0x8c9ad2){return _0x5bbba1(_0x148aee,_0x8c9ad2);},'BmWqN':function(_0x1c169a,_0xd09b13){return _0x1c169a>=_0xd09b13;},'KIAjM':function(_0x5dfe3c,_0x4d8897){return _0x5dfe3c<_0x4d8897;},'OJucz':function(_0x29d4ed,_0x3163d1){return _0x29d4ed%_0x3163d1;},'USJlX':function(_0x5e5a9e,_0x2404d8){return _0x5e5a9e+_0x2404d8;},'jNAEt':function(_0x5c7ab9,_0x4ad93c){return _0x5c7ab9(_0x4ad93c);},'ygHcX':function(_0x2ed07a,_0x34637d){return _0x2ed07a!==_0x34637d;},'gphoC':function(_0x2c4e96){return _0x2c4e96();},'zQYkI':function(_0x5864ce,_0x4007cd){return _0x5864ce===_0x4007cd;},'VJdwR':function(_0x9007d1,_0x168229){return _0x9007d1*_0x168229;},'oPXLm':function(_0x5327cf,_0x385a61){return _0x5327cf*_0x385a61;}},_0x2c793f=Object[_0x2b9c50(0x1ae)](config['ai'][_0x2b9c50(0x1a4)]);let _0x435ef3=_0x2c793f[_0x2b9c50(0x1b4)](config['ai'][_0x2b9c50(0x19a)]);_0x412e95[_0x2b9c50(0x191)](_0x435ef3,-(0x1ba+0x1441+-0xafd*0x2))&&(_0x435ef3=-0x1*0xfbf+-0x2677+0x3636);const _0xb676d4={};_0x2c793f[_0x2b9c50(0x1b0)](_0x130298=>{const _0x86549c=_0x2b9c50,_0x3be2a5=config['ai'][_0x86549c(0x1a4)][_0x130298][_0x86549c(0x1ae)][_0x86549c(0x1a9)];_0xb676d4[_0x130298]=Array[_0x86549c(0x1a8)]({'length':_0x3be2a5},()=>({'requestCount':0x0,'resetTimestamp':Date[_0x86549c(0x196)]()+MILLISECONDS_IN_A_DAY,'cooldownUntil':0x0}));});const _0x524f4f=()=>_0x2c793f[_0x435ef3],_0xeaa63d=(_0x356517,_0x34613e)=>{const _0x5174d6=_0x2b9c50,_0x161af8=_0xb676d4[_0x356517][_0x34613e];_0x412e95[_0x5174d6(0x194)](Date[_0x5174d6(0x196)](),_0x161af8[_0x5174d6(0x1af)])&&(_0x161af8[_0x5174d6(0x1ab)]=0x527*0x7+0x2*0x98d+0x1e7*-0x1d,_0x161af8[_0x5174d6(0x1af)]=_0x412e95[_0x5174d6(0x1b8)](Date[_0x5174d6(0x196)](),MILLISECONDS_IN_A_DAY));},_0x141f92=_0x13816d=>{const _0x393ead=_0x2b9c50,_0x421ce5=_0xb676d4[_0x13816d];for(let _0x497ddd=-0xc4f*-0x1+0xc68+-0x18b7;_0x412e95[_0x393ead(0x18f)](_0x497ddd,_0x421ce5[_0x393ead(0x1a9)]);_0x497ddd++){_0x412e95[_0x393ead(0x1a2)](_0xeaa63d,_0x13816d,_0x497ddd);const _0x35a707=_0x421ce5[_0x497ddd];if(_0x412e95[_0x393ead(0x18f)](_0x35a707[_0x393ead(0x1ab)],config['ai'][_0x393ead(0x197)])&&_0x412e95[_0x393ead(0x1b5)](Date[_0x393ead(0x196)](),_0x35a707[_0x393ead(0x1b2)]))return _0x497ddd;}return-(0x213b+0xc7e+-0x2db8);},_0x3d1a6b=()=>{const _0x40b38e=_0x2b9c50,_0x2971f9=_0x2c793f[_0x40b38e(0x1a9)];for(let _0x2ff1e4=0xa*-0x37e+0x80*0x29+0xe6d;_0x412e95[_0x40b38e(0x1ac)](_0x2ff1e4,_0x2971f9);_0x2ff1e4++){const _0x1d6c46=_0x412e95[_0x40b38e(0x19c)](_0x412e95[_0x40b38e(0x1ad)](_0x435ef3,_0x2ff1e4),_0x2971f9),_0x5a0cca=_0x2c793f[_0x1d6c46],_0x1fa2fb=_0x412e95[_0x40b38e(0x1b6)](_0x141f92,_0x5a0cca);if(_0x412e95[_0x40b38e(0x190)](_0x1fa2fb,-(-0x1a74+0x5f2*0x4+0x2ad)))return _0x435ef3=_0x1d6c46,!![];}return![];},_0x47d232=()=>{const _0x906bd6=_0x2b9c50,_0x515ea3=_0x412e95[_0x906bd6(0x1a5)](_0x524f4f);let _0x48321d=_0x412e95[_0x906bd6(0x1b6)](_0x141f92,_0x515ea3);if(_0x412e95[_0x906bd6(0x191)](_0x48321d,-(-0x767*-0x5+-0x136*-0x1+-0x2638)))return null;return _0xb676d4[_0x515ea3][_0x48321d][_0x906bd6(0x1ab)]++,{'providerName':_0x515ea3,'keyIndex':_0x48321d,'apiKey':config['ai'][_0x906bd6(0x1a4)][_0x515ea3][_0x906bd6(0x1ae)][_0x48321d],'model':config['ai'][_0x906bd6(0x1a4)][_0x515ea3][_0x906bd6(0x1a3)]};},_0x26d74e=()=>{const _0x50d9c5=_0x2b9c50;return _0x2c793f[_0x50d9c5(0x1a7)](_0x50f567=>({'providerName':_0x50f567,'keys':_0xb676d4[_0x50f567][_0x50d9c5(0x1a7)]((_0x5dd3c,_0x7de75f)=>({'keyIndex':_0x7de75f,'requestCount':_0x5dd3c[_0x50d9c5(0x1ab)],'dailyLimit':config['ai'][_0x50d9c5(0x197)],'resetsAt':new Date(_0x5dd3c[_0x50d9c5(0x1af)])[_0x50d9c5(0x199)]()}))}));},_0x8f3db9=(_0x275430,_0xaadff9)=>{const _0x27738e=_0x2b9c50;_0xb676d4[_0x275430]&&_0xb676d4[_0x275430][_0xaadff9]&&(_0xb676d4[_0x275430][_0xaadff9][_0x27738e(0x1b2)]=_0x412e95[_0x27738e(0x1b8)](Date[_0x27738e(0x196)](),_0x412e95[_0x27738e(0x198)](_0x412e95[_0x27738e(0x1aa)](0x1*-0x1bed+-0x13a6+0x2f98,0x2605+0x1bef+-0x41b8),-0x1b6a*0x1+-0xfbb*-0x2+-0x24)),console[_0x27738e(0x193)](_0x27738e(0x19e)+_0xaadff9+_0x27738e(0x192)+_0x275430+_0x27738e(0x1a1)));};return{'acquireKey':_0x47d232,'getStatus':_0x26d74e,'markKeyAsRateLimited':_0x8f3db9};}function _0x10ba(_0x5055e2,_0xee085f){_0x5055e2=_0x5055e2-(0x22a7+0x1c66+-0x1*0x3d7f);const _0x171fb8=_0xffb9();let _0xe04528=_0x171fb8[_0x5055e2];return _0xe04528;}const keyRotator=buildKeyRotator();module[_0x44382a(0x1b3)]=keyRotator;
dist/server/services/logCompactor.js ADDED
@@ -0,0 +1 @@
 
 
1
+ const _0x36bc0b=_0x5868;function _0x40c0(){const _0x3a74d8=['9kcAsYi','exports','qgyew','WxsLf','193435EHbAsw','36SbbHnf','FTwgj','ioHie','min','knCOu','1199820GmMtDf','KNJup','8038FmqkzJ','Exception','UXtiH','some','\x0a---\x20END\x20OF\x20LOG\x20(SYSTEM\x20SPECS)\x20---','mxvdS','CRITICAL','1698jMSYug','337769YsOsJQ','117IXTLdP','shvTH','FATAL','join','push','Stacktrace:','840728ndACxf','Error:','sVAjr','max','1865853oLXcfO','irqOp','length','split','\x0a---\x20DETECTED\x20ERROR\x20CONTEXT\x20---','---\x20START\x20OF\x20LOG\x20(HEADER)\x20---','2163byxGwh','12GkbUKr','includes','slice'];_0x40c0=function(){return _0x3a74d8;};return _0x40c0();}(function(_0x5e12ee,_0x4cec50){const _0x5e6fd0=_0x5868,_0x389193=_0x5e12ee();while(!![]){try{const _0x56a6c6=parseInt(_0x5e6fd0(0x136))/(-0x112d+0x605+0xb29*0x1)+-parseInt(_0x5e6fd0(0x12e))/(0x2*0x124a+-0x1e96+-0x5fc)*(parseInt(_0x5e6fd0(0x137))/(0x294+0x1*0x1ef2+0x175*-0x17))+parseInt(_0x5e6fd0(0x127))/(-0x1f2f+0x1*0x1af+0x1d84)*(parseInt(_0x5e6fd0(0x126))/(0x18a+-0xd54+0xbcf*0x1))+-parseInt(_0x5e6fd0(0x135))/(0x17c7+-0x1fb+0xae3*-0x2)*(-parseInt(_0x5e6fd0(0x147))/(-0x135e+0x16e+0x9*0x1ff))+parseInt(_0x5e6fd0(0x13d))/(0x1c69+0x1e62*-0x1+-0x13*-0x1b)*(-parseInt(_0x5e6fd0(0x122))/(-0x1297*0x1+0x6*0x186+0x97c))+-parseInt(_0x5e6fd0(0x12c))/(0xee1+0x1bb8+-0x2a8f)+-parseInt(_0x5e6fd0(0x141))/(-0x109*0xb+0x198b+-0xe1d)*(parseInt(_0x5e6fd0(0x148))/(0x3*-0x4f+-0x1c2c+0x1d25));if(_0x56a6c6===_0x4cec50)break;else _0x389193['push'](_0x389193['shift']());}catch(_0x3cd4ce){_0x389193['push'](_0x389193['shift']());}}}(_0x40c0,0x655f0+-0x5*0x42b7+0x3*-0x8c71));function _0x5868(_0x2cd1e6,_0x5eed26){_0x2cd1e6=_0x2cd1e6-(0x229b*0x1+0x211d+0x8*-0x853);const _0x7795ee=_0x40c0();let _0x566571=_0x7795ee[_0x2cd1e6];return _0x566571;}const compactLog=_0x377107=>{const _0x429b80=_0x5868,_0x1d5ea4={'qgyew':function(_0x1ae8e5,_0x533d71){return _0x1ae8e5<_0x533d71;},'knCOu':_0x429b80(0x146),'KNJup':_0x429b80(0x12f),'FTwgj':_0x429b80(0x13e),'WxsLf':_0x429b80(0x13c),'ioHie':_0x429b80(0x139),'irqOp':_0x429b80(0x134),'sVAjr':_0x429b80(0x145),'shvTH':function(_0x248a28,_0x5ed167){return _0x248a28-_0x5ed167;},'mxvdS':function(_0x57e5b3,_0x3ceb54){return _0x57e5b3+_0x3ceb54;},'UXtiH':_0x429b80(0x132)};if(!_0x377107||_0x1d5ea4[_0x429b80(0x124)](_0x377107[_0x429b80(0x143)],0x1*-0xa21+0x3*0x55b+0xd98))return _0x377107;const _0x25d6ba=_0x377107[_0x429b80(0x144)]('\x0a');if(_0x1d5ea4[_0x429b80(0x124)](_0x25d6ba[_0x429b80(0x143)],-0x3*-0x671+0x1134+-0x23bf))return _0x377107;const _0x1291bb=[];_0x1291bb[_0x429b80(0x13b)](_0x1d5ea4[_0x429b80(0x12b)]),_0x1291bb[_0x429b80(0x13b)](..._0x25d6ba[_0x429b80(0x121)](0x1*0x20ea+0x17*-0xe6+0x1*-0xc40,0x1037*0x1+-0x1875+0x8a2));const _0x27c17f=[_0x1d5ea4[_0x429b80(0x12d)],_0x1d5ea4[_0x429b80(0x128)],_0x1d5ea4[_0x429b80(0x125)],_0x1d5ea4[_0x429b80(0x129)],_0x1d5ea4[_0x429b80(0x142)]];let _0x1bdebd=![];for(let _0x2c6678=0x1*0x1f5b+-0x160f+-0x1*0x94c;_0x1d5ea4[_0x429b80(0x124)](_0x2c6678,_0x25d6ba[_0x429b80(0x143)]);_0x2c6678++){if(_0x27c17f[_0x429b80(0x131)](_0x2cc48f=>_0x25d6ba[_0x2c6678][_0x429b80(0x120)](_0x2cc48f))){_0x1291bb[_0x429b80(0x13b)](_0x1d5ea4[_0x429b80(0x13f)]);const _0x551b1d=Math[_0x429b80(0x140)](-0x3*0x326+-0x952+0x1*0x12c4,_0x1d5ea4[_0x429b80(0x138)](_0x2c6678,0x21*0x14+0x4*0x95c+0xd46*-0x3)),_0x30ec1d=Math[_0x429b80(0x12a)](_0x25d6ba[_0x429b80(0x143)],_0x1d5ea4[_0x429b80(0x133)](_0x2c6678,-0x1*-0x15d1+-0x5*-0x4e3+0x2*-0x16d5));_0x1291bb[_0x429b80(0x13b)](..._0x25d6ba[_0x429b80(0x121)](_0x551b1d,_0x30ec1d)),_0x1bdebd=!![];break;}}return _0x1291bb[_0x429b80(0x13b)](_0x1d5ea4[_0x429b80(0x130)]),_0x1291bb[_0x429b80(0x13b)](..._0x25d6ba[_0x429b80(0x121)](-(-0xd*0x6+0x2d6+-0x1*0x224))),_0x1291bb[_0x429b80(0x13a)]('\x0a');};module[_0x36bc0b(0x123)]={'compactLog':compactLog};
dist/server/services/queue.js ADDED
@@ -0,0 +1 @@
 
 
1
+ const _0x2ec9bb=_0x3b3c;(function(_0x2981b8,_0x4939aa){const _0x2aaaaa=_0x3b3c,_0x290bf1=_0x2981b8();while(!![]){try{const _0x55cf7c=-parseInt(_0x2aaaaa(0x1bd))/(0x3*0x34f+-0x123f*0x2+-0x1a92*-0x1)*(-parseInt(_0x2aaaaa(0x1de))/(-0xaf+0x4*-0x145+0x5c5))+-parseInt(_0x2aaaaa(0x1dc))/(-0x1155+0x17*0xa1+0x2e1)*(parseInt(_0x2aaaaa(0x1e3))/(-0x14*-0x8b+0x11fb*-0x2+0x191e))+-parseInt(_0x2aaaaa(0x1b8))/(-0x1b14+0x1*-0x1dcf+0x38e8)+-parseInt(_0x2aaaaa(0x1da))/(0xb75*0x1+0xdd+-0xc4c)+parseInt(_0x2aaaaa(0x1c0))/(-0x1b2f+0x1*-0x1cbe+0xdfd*0x4)*(parseInt(_0x2aaaaa(0x1bc))/(-0x1e7+0x1f68+-0x1d79))+parseInt(_0x2aaaaa(0x1f3))/(-0x7ec+0x132e+-0xb39)*(parseInt(_0x2aaaaa(0x1eb))/(-0x1c9e+0x5*0xe9+0x181b))+-parseInt(_0x2aaaaa(0x1c6))/(0x1*-0x4ee+0x8*0x295+-0xfaf);if(_0x55cf7c===_0x4939aa)break;else _0x290bf1['push'](_0x290bf1['shift']());}catch(_0x5e296e){_0x290bf1['push'](_0x290bf1['shift']());}}}(_0x94e6,0x1*-0x1b34a+-0xad*0x1b57+-0x37676*-0x9));const config=require(_0x2ec9bb(0x1e7)),{analyzeWithKey}=require(_0x2ec9bb(0x1ce)),keyRotator=require(_0x2ec9bb(0x1bf)),pendingJobs=[],jobRegistry=new Map();function _0x3b3c(_0x4e0eb8,_0x34beb8){_0x4e0eb8=_0x4e0eb8-(-0xeeb+-0x22c*-0x9+-0x2f3);const _0x3f9925=_0x94e6();let _0x19cc07=_0x3f9925[_0x4e0eb8];return _0x19cc07;}function _0x94e6(){const _0x5881ef=['bHOVE','error','maxSize','LfBQF','length','lrrSi','set','CpvJr','warn','providerName','mock','resolve','4514710QAWTyV','wnlyD','status','queue','3832jIIIJb','241ylkzIQ','failed','./keyRotator','20195uCQEeB','Zklui','mqKdy','Our\x20systems\x20are\x20currently\x20handling\x20an\x20extreme\x20surge\x20in\x20data.\x20We’ve\x20enabled\x20a\x20brief\x20cooldown\x20to\x20maintain\x20100%\x20precision.\x20Please\x20stand\x20by.','JeCpz','[CRASHLENS]\x20Key\x20','2424202PSIxCR','exports','markKeyAsRateLimited','VmRUS','findIndex','gHkrr','cGIOA','Queue\x20is\x20full.\x20Please\x20try\x20again\x20later.','./aiService','now','get','SwdHY','nmbiO','CcFBV','processing','toString','429','push','includes','kmzzR','1949862ncWEJB','YeeiJ','3ZRICDN','random','922olhSFV','message','slice','\x20rate\x20limited.\x20Retrying\x20with\x20next\x20key...','bLDCN','2881316yAiMGi','reject','estimatedSecondsPerRequest','mockMode','../config','result','queued','shift','5210PzexOz','uPBbm','fsdEN','[CRASHLENS]\x20AI\x20Analysis\x20Error:','job_','server','XLHnu','payload','24111KHGpza','acquireKey','keyIndex','done'];_0x94e6=function(){return _0x5881ef;};return _0x94e6();}let isProcessing=![];const generateJobId=()=>_0x2ec9bb(0x1ef)+Date[_0x2ec9bb(0x1cf)]()+'_'+Math[_0x2ec9bb(0x1dd)]()[_0x2ec9bb(0x1d5)](0x2085+-0x3c+-0x2025)[_0x2ec9bb(0x1e0)](-0x2c8+-0x992+-0x1*-0xc5c,-0xa7f+-0x26*0xb+0xc29),enqueue=_0x27ea91=>{const _0x515549=_0x2ec9bb,_0x5b2007={'bHOVE':_0x515549(0x1e9),'VmRUS':function(_0x5dda48){return _0x5dda48();},'SwdHY':function(_0x319e8a,_0x15d842){return _0x319e8a>=_0x15d842;},'Zklui':_0x515549(0x1cd)};if(_0x5b2007[_0x515549(0x1d1)](pendingJobs[_0x515549(0x1b0)],config[_0x515549(0x1bb)][_0x515549(0x1ae)]))return Promise[_0x515549(0x1e4)](new Error(_0x5b2007[_0x515549(0x1c1)]));const _0x4a92cd=_0x5b2007[_0x515549(0x1c9)](generateJobId),_0x136619=new Promise((_0x317060,_0x85b9c7)=>{const _0x3fc646=_0x515549,_0x555185={'id':_0x4a92cd,'payload':_0x27ea91,'resolve':_0x317060,'reject':_0x85b9c7,'enqueuedAt':Date[_0x3fc646(0x1cf)](),'status':_0x5b2007[_0x3fc646(0x1f7)]};pendingJobs[_0x3fc646(0x1d7)](_0x555185),jobRegistry[_0x3fc646(0x1b2)](_0x4a92cd,_0x555185),_0x5b2007[_0x3fc646(0x1c9)](processNext);});return{'jobId':_0x4a92cd,'jobPromise':_0x136619};},processNext=async()=>{const _0x1677ab=_0x2ec9bb,_0x4d5657={'LfBQF':function(_0x2329c9,_0x542faf){return _0x2329c9===_0x542faf;},'wnlyD':_0x1677ab(0x1d4),'mqKdy':function(_0x58174f,_0x5c4588){return _0x58174f<_0x5c4588;},'kmzzR':_0x1677ab(0x1b6),'CpvJr':_0x1677ab(0x1c3),'uPBbm':function(_0x54c3c3,_0x4d08db,_0xd9d5e0,_0x244637){return _0x54c3c3(_0x4d08db,_0xd9d5e0,_0x244637);},'lrrSi':_0x1677ab(0x1f6),'XLHnu':function(_0x2f78c6,_0x5be4f6){return _0x2f78c6===_0x5be4f6;},'cGIOA':_0x1677ab(0x1d6),'JeCpz':function(_0x4fb107,_0x52a627){return _0x4fb107&&_0x52a627;},'nmbiO':_0x1677ab(0x1ee),'CcFBV':_0x1677ab(0x1be),'gHkrr':function(_0x58a2e0){return _0x58a2e0();}};if(isProcessing||_0x4d5657[_0x1677ab(0x1af)](pendingJobs[_0x1677ab(0x1b0)],-0xba+0x64f+-0x595))return;isProcessing=!![];const _0x5088ab=pendingJobs[_0x1677ab(0x1ea)]();_0x5088ab[_0x1677ab(0x1ba)]=_0x4d5657[_0x1677ab(0x1b9)];try{let _0x30be39=0x2*0x3d0+-0x1bca+0x142a,_0x10a7a9=![],_0x9e1e0d=null;while(_0x4d5657[_0x1677ab(0x1c2)](_0x30be39,-0x630+0x19a7+-0x1374)&&!_0x10a7a9){const _0x1d7cfc=config[_0x1677ab(0x1f0)][_0x1677ab(0x1e6)]?{'providerName':_0x4d5657[_0x1677ab(0x1d9)]}:keyRotator[_0x1677ab(0x1f4)]();if(!_0x1d7cfc)throw new Error(_0x4d5657[_0x1677ab(0x1b3)]);const _0x94497b=_0x3ac739=>{const _0x1866eb=_0x1677ab;_0x5088ab[_0x1866eb(0x1ba)]=_0x3ac739;};try{const _0x1ec3e5=await _0x4d5657[_0x1677ab(0x1ec)](analyzeWithKey,_0x1d7cfc,_0x5088ab[_0x1677ab(0x1f2)],_0x94497b);_0x5088ab[_0x1677ab(0x1ba)]=_0x4d5657[_0x1677ab(0x1b1)],_0x5088ab[_0x1677ab(0x1e8)]=_0x1ec3e5,_0x5088ab[_0x1677ab(0x1b7)](_0x1ec3e5),_0x10a7a9=!![];}catch(_0xde76f7){_0x9e1e0d=_0xde76f7;if(_0x4d5657[_0x1677ab(0x1f1)](_0xde76f7[_0x1677ab(0x1ba)],-0x16ae+-0xa6d*-0x3+0x376*-0x2)||_0xde76f7[_0x1677ab(0x1df)][_0x1677ab(0x1d8)](_0x4d5657[_0x1677ab(0x1cc)]))console[_0x1677ab(0x1b4)](_0x1677ab(0x1c5)+_0x1d7cfc[_0x1677ab(0x1f5)]+_0x1677ab(0x1e1)),keyRotator[_0x1677ab(0x1c8)](_0x1d7cfc[_0x1677ab(0x1b5)],_0x1d7cfc[_0x1677ab(0x1f5)]),_0x30be39++,await new Promise(_0x1092a7=>setTimeout(_0x1092a7,-0x11ea*-0x2+-0x1ff6*-0x1+0x25*-0x1ba));else throw _0xde76f7;}}if(_0x4d5657[_0x1677ab(0x1c4)](!_0x10a7a9,_0x9e1e0d))throw _0x9e1e0d;}catch(_0x5ceb30){console[_0x1677ab(0x1f8)](_0x4d5657[_0x1677ab(0x1d2)],_0x5ceb30),_0x5088ab[_0x1677ab(0x1ba)]=_0x4d5657[_0x1677ab(0x1d3)],_0x5088ab[_0x1677ab(0x1e4)](_0x5ceb30);}finally{isProcessing=![],_0x4d5657[_0x1677ab(0x1cb)](processNext);}},getJobStatus=_0x2ba1ff=>{const _0x7b3883=_0x2ec9bb,_0x285ec6={'bLDCN':function(_0x5842f1,_0x55b61a){return _0x5842f1===_0x55b61a;},'fsdEN':function(_0x498c84,_0x5438ee){return _0x498c84+_0x5438ee;},'YeeiJ':function(_0x5ac68a,_0x5d99df){return _0x5ac68a*_0x5d99df;}},_0x3e40d4=jobRegistry[_0x7b3883(0x1d0)](_0x2ba1ff);if(!_0x3e40d4)return null;const _0x9fdb08=pendingJobs[_0x7b3883(0x1ca)](_0xa6ccc4=>_0xa6ccc4['id']===_0x2ba1ff),_0x18b6e9=_0x285ec6[_0x7b3883(0x1e2)](_0x9fdb08,-(-0xb1*-0x31+-0x4d9*0x1+-0x9ad*0x3))?0x1992+-0x812+-0x1180:_0x285ec6[_0x7b3883(0x1ed)](_0x9fdb08,0x1d99+0x19a3+0x1269*-0x3),_0x190465=_0x285ec6[_0x7b3883(0x1db)](_0x18b6e9,config[_0x7b3883(0x1bb)][_0x7b3883(0x1e5)]);return{'jobId':_0x2ba1ff,'status':_0x3e40d4[_0x7b3883(0x1ba)],'positionInQueue':_0x18b6e9,'estimatedWaitSeconds':_0x190465,'result':_0x3e40d4[_0x7b3883(0x1e8)]||null};},getQueueStatus=()=>({'queueLength':pendingJobs[_0x2ec9bb(0x1b0)],'isProcessing':isProcessing,'estimatedWaitSeconds':pendingJobs[_0x2ec9bb(0x1b0)]*config[_0x2ec9bb(0x1bb)][_0x2ec9bb(0x1e5)]});module[_0x2ec9bb(0x1c7)]={'enqueue':enqueue,'getJobStatus':getJobStatus,'getQueueStatus':getQueueStatus};
dist/server/services/searchService.js ADDED
@@ -0,0 +1 @@
 
 
1
+ function _0x3a59(_0x57c593,_0xe1c84f){_0x57c593=_0x57c593-(0x1*-0x164f+0x47*-0x6b+0x3597);const _0x4e1719=_0x5b89();let _0x2d7e2b=_0x4e1719[_0x57c593];return _0x2d7e2b;}const _0x4bdbc=_0x3a59;(function(_0x471eef,_0x5b9089){const _0x404902=_0x3a59,_0x29c895=_0x471eef();while(!![]){try{const _0x31b7b1=-parseInt(_0x404902(0x1a9))/(0x1842+-0xb*-0x72+0x1*-0x1d27)+parseInt(_0x404902(0x1a1))/(-0x8*0x11b+0x2ab*0xd+0x19d5*-0x1)*(parseInt(_0x404902(0x1ce))/(0x21*0x7e+0x2138+-0x3173*0x1))+-parseInt(_0x404902(0x1b3))/(0x1a2+0x288+-0x426)*(-parseInt(_0x404902(0x1c0))/(-0x1*-0xcff+-0x1d6+0x2*-0x592))+parseInt(_0x404902(0x1bd))/(0x7d4*-0x3+0x3*-0x72d+0x2d09)*(-parseInt(_0x404902(0x1c5))/(0x3*0x5fd+-0x2*-0x11e5+0x35ba*-0x1))+parseInt(_0x404902(0x1bb))/(0x15db+-0x21fb+0xc28)*(parseInt(_0x404902(0x19b))/(-0xdc+-0x381+0x466))+-parseInt(_0x404902(0x1a5))/(0x1*-0x5ec+0xa8f+-0x1*0x499)*(parseInt(_0x404902(0x1cf))/(-0x2*-0x45+-0xc82*0x3+0x2507))+parseInt(_0x404902(0x1b9))/(-0xd*-0x216+-0x2431+0x91f);if(_0x31b7b1===_0x5b9089)break;else _0x29c895['push'](_0x29c895['shift']());}catch(_0x573c74){_0x29c895['push'](_0x29c895['shift']());}}}(_0x5b89,-0x7b054+0x171724+-0x28ca3));const axios=require(_0x4bdbc(0x1b8)),config=require(_0x4bdbc(0x1ab));function _0x5b89(){const _0x2abe16=['serperKey','organic','error','VkNpi','oCboQ','maxResults','12618fiASFS','content','No\x20web\x20results\x20found.','hFtxK','length','YKDWn','140kzoDRo','iFylQ','join','\x0aURL:\x20','1430QxIWDs','post','❌\x20Search\x20Service\x20Error:','snippet','1243314hUNtBB','basic','../config','voAhj','enabled','url','https://api.tavily.com/search','link',']\x20Source:\x20','results','512DZpLfk','exports','tavilyKey','eVEiW','message','axios','22237776lpJOKP','tavily','2040yXxiLd','https://google.serper.dev/search','202842YMyaQx','searchTavily','map','29870Laivcf','searchSerper','\x0aContent:\x20','⚠️\x20Search\x20requested\x20but\x20no\x20API\x20keys\x20configured.','search','147dDJwjZ','\x0a\x0a---\x0a\x0a','nPklX','vltan','data','application/json','htTeX','formatResults','log','8217tvJfvJ','28578OLvStL','DfimZ','title','provider'];_0x5b89=function(){return _0x2abe16;};return _0x5b89();}class SearchService{async[_0x4bdbc(0x1c4)](_0x16085f){const _0x36dbd5=_0x4bdbc,_0x24ee2a={'vltan':_0x36dbd5(0x1c3),'nPklX':function(_0x2b9fdf,_0x43c839){return _0x2b9fdf===_0x43c839;},'YKDWn':_0x36dbd5(0x1ba),'oCboQ':_0x36dbd5(0x1a7)};if(!config['ai'][_0x36dbd5(0x1c4)][_0x36dbd5(0x1ad)])return console[_0x36dbd5(0x1cd)](_0x24ee2a[_0x36dbd5(0x1c8)]),[];try{return _0x24ee2a[_0x36dbd5(0x1c7)](config['ai'][_0x36dbd5(0x1c4)][_0x36dbd5(0x1d2)],_0x24ee2a[_0x36dbd5(0x1a0)])?await this[_0x36dbd5(0x1be)](_0x16085f):await this[_0x36dbd5(0x1c1)](_0x16085f);}catch(_0x463d36){return console[_0x36dbd5(0x1d5)](_0x24ee2a[_0x36dbd5(0x1d7)],_0x463d36[_0x36dbd5(0x1b7)]),[];}}async[_0x4bdbc(0x1be)](_0x2b73fa){const _0x2de3eb=_0x4bdbc,_0xdf68f9={'eVEiW':_0x2de3eb(0x1af),'VkNpi':_0x2de3eb(0x1aa)},_0x575fa2=await axios[_0x2de3eb(0x1a6)](_0xdf68f9[_0x2de3eb(0x1b6)],{'api_key':config['ai'][_0x2de3eb(0x1c4)][_0x2de3eb(0x1b5)],'query':_0x2b73fa,'search_depth':_0xdf68f9[_0x2de3eb(0x1d6)],'max_results':config['ai'][_0x2de3eb(0x1c4)][_0x2de3eb(0x1d8)]});return(_0x575fa2[_0x2de3eb(0x1c9)][_0x2de3eb(0x1b2)]||[])[_0x2de3eb(0x1bf)](_0x1817d5=>({'title':_0x1817d5[_0x2de3eb(0x1d1)],'link':_0x1817d5[_0x2de3eb(0x1ae)],'snippet':_0x1817d5[_0x2de3eb(0x19c)]}));}async[_0x4bdbc(0x1c1)](_0x57c9be){const _0x54aa2a=_0x4bdbc,_0x3d6136={'htTeX':_0x54aa2a(0x1bc),'DfimZ':_0x54aa2a(0x1ca)},_0x4a70fd=await axios[_0x54aa2a(0x1a6)](_0x3d6136[_0x54aa2a(0x1cb)],{'q':_0x57c9be,'num':config['ai'][_0x54aa2a(0x1c4)][_0x54aa2a(0x1d8)]},{'headers':{'X-API-KEY':config['ai'][_0x54aa2a(0x1c4)][_0x54aa2a(0x1d3)],'Content-Type':_0x3d6136[_0x54aa2a(0x1d0)]}});return(_0x4a70fd[_0x54aa2a(0x1c9)][_0x54aa2a(0x1d4)]||[])[_0x54aa2a(0x1bf)](_0x4e3b9c=>({'title':_0x4e3b9c[_0x54aa2a(0x1d1)],'link':_0x4e3b9c[_0x54aa2a(0x1b0)],'snippet':_0x4e3b9c[_0x54aa2a(0x1a8)]}));}[_0x4bdbc(0x1cc)](_0x4dab73){const _0x2f5020=_0x4bdbc,_0x3f5752={'iFylQ':function(_0x16eba7,_0x137fd5){return _0x16eba7===_0x137fd5;},'voAhj':_0x2f5020(0x19d),'hFtxK':_0x2f5020(0x1c6)};if(!_0x4dab73||_0x3f5752[_0x2f5020(0x1a2)](_0x4dab73[_0x2f5020(0x19f)],-0x494*0x5+-0xdf5+0x24d9))return _0x3f5752[_0x2f5020(0x1ac)];return _0x4dab73[_0x2f5020(0x1bf)]((_0x4c4ed5,_0x35018e)=>'['+(_0x35018e+(-0x13*0x17b+-0x22c4+0x3ee6))+_0x2f5020(0x1b1)+_0x4c4ed5[_0x2f5020(0x1d1)]+_0x2f5020(0x1a4)+_0x4c4ed5[_0x2f5020(0x1b0)]+_0x2f5020(0x1c2)+_0x4c4ed5[_0x2f5020(0x1a8)])[_0x2f5020(0x1a3)](_0x3f5752[_0x2f5020(0x19e)]);}}module[_0x4bdbc(0x1b4)]=new SearchService();
dist/server/services/userLimiter.js ADDED
@@ -0,0 +1 @@
 
 
1
+ const _0x30f23c=_0x42b7;function _0x42b7(_0x2c8181,_0x407cf4){_0x2c8181=_0x2c8181-(0x14*0x13a+-0x19*0xce+0x31a*-0x1);const _0x59f63a=_0x4de2();let _0x31e0f5=_0x59f63a[_0x2c8181];return _0x31e0f5;}(function(_0x1fa14b,_0x80d71e){const _0x5bace3=_0x42b7,_0x2141ac=_0x1fa14b();while(!![]){try{const _0x4d2a60=-parseInt(_0x5bace3(0x158))/(-0x1b54+-0x1*0x269b+0x41f0)*(-parseInt(_0x5bace3(0x157))/(-0x1*-0x7e2+-0xcd3+0x4f3))+-parseInt(_0x5bace3(0x154))/(-0x10f*-0x1f+-0x3*0x139+-0x1d23*0x1)+parseInt(_0x5bace3(0x156))/(0xf1+0xa23*-0x3+-0x44*-0x6f)+parseInt(_0x5bace3(0x153))/(0x16aa+0x47b+-0x1b20)+parseInt(_0x5bace3(0x152))/(-0x287+-0x1f*0x121+0x2*0x12c6)+parseInt(_0x5bace3(0x155))/(-0x21e6*-0x1+0x103*-0x19+-0x894)+-parseInt(_0x5bace3(0x151))/(0x7c*-0x38+0x247*-0x1+-0x5*-0x5e3);if(_0x4d2a60===_0x80d71e)break;else _0x2141ac['push'](_0x2141ac['shift']());}catch(_0x152d7f){_0x2141ac['push'](_0x2141ac['shift']());}}}(_0x4de2,0x72bac+-0xbac1a+0xd9b9c));const checkUserLimit=_0x1424a1=>{return{'allowed':!![],'remaining':Infinity,'resetsAt':null};},recordUserRequest=_0x54e818=>{};module[_0x30f23c(0x150)]={'checkUserLimit':checkUserLimit,'recordUserRequest':recordUserRequest};function _0x4de2(){const _0x262299=['2034315CdtBee','699276XJIczU','6551111yxCkLi','3555072OjMlwN','208FiuWOS','8102huFiIa','exports','23113176FRqzHQ','3869454QUkjcn'];_0x4de2=function(){return _0x262299;};return _0x4de2();}
package-lock.json ADDED
The diff for this file is too large to render. See raw diff
 
public/js/api.js CHANGED
@@ -1 +1,42 @@
1
- const _0x43b739=_0x8fb0;(function(_0x1c3030,_0x521724){const _0xd94cdd=_0x8fb0,_0x497a6f=_0x1c3030();while(!![]){try{const _0x1ea673=parseInt(_0xd94cdd(0x18e))/(0x2*-0x1253+-0x2*-0xcfb+0xab1)+-parseInt(_0xd94cdd(0x180))/(-0x1e+0xf53+-0xf33)+parseInt(_0xd94cdd(0x194))/(0xa2e+-0xd50+0x325)+-parseInt(_0xd94cdd(0x191))/(-0xc1*-0x2b+-0x1a0c*0x1+-0x65b)+-parseInt(_0xd94cdd(0x187))/(-0x305*-0x1+-0x254c+-0x1*-0x224c)*(-parseInt(_0xd94cdd(0x181))/(0x15*0xb5+-0x682+-0x1*0x851))+parseInt(_0xd94cdd(0x18f))/(0x9a9+-0x1be8*0x1+0x1246)*(-parseInt(_0xd94cdd(0x17e))/(-0x1f4d+-0x1f9d+0x3ef2))+parseInt(_0xd94cdd(0x17b))/(-0xaa5*0x2+0x1367+-0x4*-0x7b);if(_0x1ea673===_0x521724)break;else _0x497a6f['push'](_0x497a6f['shift']());}catch(_0x41d289){_0x497a6f['push'](_0x497a6f['shift']());}}}(_0x3aa7,0x12761*0xa+0x2083a*-0x2+-0x1890a));function _0x8fb0(_0x3fbc54,_0x56477d){_0x3fbc54=_0x3fbc54-(-0xa6d*-0x1+0x908+0x4e*-0x3b);const _0x7d416a=_0x3aa7();let _0x2d197f=_0x7d416a[_0x3fbc54];return _0x2d197f;}function _0x3aa7(){const _0x2a14ac=['/api/status','iUGDX','287215UNdmoL','189nrGgAX','stringify','286984SESPeQ','jobId','wotMQ','576633jDrGhm','UIIaF','3681333WgQIOB','QOtkO','uQbii','194640TDjLlD','status','192890MLwhDG','977502wMnGge','POST','Failed\x20to\x20fetch\x20server\x20status','Server\x20error\x20','Poll\x20error\x20','YAYcM','10xjxANe','/api/analyze','json','application/json','error'];_0x3aa7=function(){return _0x2a14ac;};return _0x3aa7();}const ANALYZE_ENDPOINT=_0x43b739(0x188),STATUS_ENDPOINT=_0x43b739(0x18c),submitCrashLog=async _0x188962=>{const _0x4833e6=_0x43b739,_0x17c4c6={'wotMQ':function(_0x11d782,_0x57d10d,_0x5c3397){return _0x11d782(_0x57d10d,_0x5c3397);},'YAYcM':_0x4833e6(0x182),'QOtkO':_0x4833e6(0x18a)},_0x58c296=await _0x17c4c6[_0x4833e6(0x193)](fetch,ANALYZE_ENDPOINT,{'method':_0x17c4c6[_0x4833e6(0x186)],'headers':{'Content-Type':_0x17c4c6[_0x4833e6(0x17c)]},'body':JSON[_0x4833e6(0x190)]({'messages':_0x188962})}),_0x1e194c=await _0x58c296[_0x4833e6(0x189)]();if(!_0x58c296['ok'])throw new Error(_0x1e194c[_0x4833e6(0x18b)]||_0x4833e6(0x184)+_0x58c296[_0x4833e6(0x17f)]);return _0x1e194c[_0x4833e6(0x192)];},pollJobStatus=async _0x14256b=>{const _0x15c337=_0x43b739,_0x436bd8={'uQbii':function(_0x7bdfb8,_0x4cf739){return _0x7bdfb8(_0x4cf739);}},_0x5d6747=await _0x436bd8[_0x15c337(0x17d)](fetch,STATUS_ENDPOINT+'/'+_0x14256b),_0x3704a1=await _0x5d6747[_0x15c337(0x189)]();if(!_0x5d6747['ok'])throw new Error(_0x3704a1[_0x15c337(0x18b)]||_0x15c337(0x185)+_0x5d6747[_0x15c337(0x17f)]);return _0x3704a1;},fetchServerStatus=async()=>{const _0x32abe1=_0x43b739,_0x60777a={'iUGDX':function(_0x19bf09,_0x158fb5){return _0x19bf09(_0x158fb5);},'UIIaF':_0x32abe1(0x183)},_0x214ce7=await _0x60777a[_0x32abe1(0x18d)](fetch,STATUS_ENDPOINT);if(!_0x214ce7['ok'])throw new Error(_0x60777a[_0x32abe1(0x195)]);return _0x214ce7[_0x32abe1(0x189)]();};export{submitCrashLog,pollJobStatus,fetchServerStatus};
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const ANALYZE_ENDPOINT = "/api/analyze";
2
+ const STATUS_ENDPOINT = "/api/status";
3
+
4
+ const submitCrashLog = async (messagesArray) =>
5
+ {
6
+ const response = await fetch(ANALYZE_ENDPOINT, {
7
+ method: "POST",
8
+ headers: { "Content-Type": "application/json" },
9
+ body: JSON.stringify({ messages: messagesArray }),
10
+ });
11
+
12
+ const json = await response.json();
13
+
14
+ if (!response.ok)
15
+ {
16
+ throw new Error(json.error || `Server error ${response.status}`);
17
+ }
18
+
19
+ return json.jobId;
20
+ };
21
+
22
+ const pollJobStatus = async (jobId) =>
23
+ {
24
+ const response = await fetch(`${STATUS_ENDPOINT}/${jobId}`);
25
+ const json = await response.json();
26
+
27
+ if (!response.ok)
28
+ {
29
+ throw new Error(json.error || `Poll error ${response.status}`);
30
+ }
31
+
32
+ return json;
33
+ };
34
+
35
+ const fetchServerStatus = async () =>
36
+ {
37
+ const response = await fetch(STATUS_ENDPOINT);
38
+ if (!response.ok) throw new Error("Failed to fetch server status");
39
+ return response.json();
40
+ };
41
+
42
+ export { submitCrashLog, pollJobStatus, fetchServerStatus };
public/js/main.js CHANGED
@@ -1 +1,222 @@
1
- function _0x1974(){const _0x13ad69=['438939BOUljz','profile-dropdown','setItem','btn-theme-toggle','text','theme-text','zkmKo','btn-new-analysis','add','PSkXi','DZYLF','querySelectorAll','BdaSZ','push','GszMt','getItem','EbHdj','uUJaY','.message-row','AsBnC','gABqR','processing','click','oCCjV','textContent','cEMJF','kBgYC','2454TyOtGT','analyzing','preventDefault','40ZJQgUs','3AUSeAu','matches','crashx-theme','crashLogInput','Analysis\x20finished\x20but\x20no\x20result\x20was\x20returned.','display','classList','qQrDg','sidebar-closed-init','btn-toggle-sidebar','AoOlW','forEach','Switch\x20to\x20Dark\x20Mode','fuqCg','RCtqc','Enter','3136AcylXJ','SUZRj','dGCmK','nwgBW','hrmyG','key','UEpoj','oqRoJ','692ruokWQ','welcomeScreen','btn-sidebar-signin','mGPet','result','stopPropagation','searching','TBtve','1339xmPbOg','SUGQh','RBfoi','ARIlf','crashx-sidebar-closed','message','dark','Ehizb','keydown','DOMContentLoaded','WPpnB','Switch\x20to\x20Light\x20Mode','disabled','Tgjjx','sidebar-closed','app-container','toggle','euPVy','style','destroy','target','getElementById','uyMIw','fJjjj','contains','thxDa','sTCIw','jECHa','length','dVpDO','821zQJQuj','FmTVS','hMCCx','VknKB','2019052LtBeVj','yJvwh','GDViW','guvqL','HBUhC','user','Queued...','mQWIg','2761875kZAKms','light-theme','bDaeI','qfOwe','remove','shiftKey','MXbDh','EwMZL','bNfuW','matchMedia','open','iDMvA','Reading\x20findings...','type','COAEa','XsokG','flex','Something\x20went\x20wrong.\x20Please\x20try\x20again.','LzuaQ','Please\x20enter\x20a\x20valid\x20message.','56ippvRA','Login\x20is\x20coming\x20soon\x20—\x20stay\x20tuned.','XjeoO','231803tPPmLo','analysis','THREE','data','(max-width:\x20768px)','Submitting...','KWYCQ','TZKPp','AtBIS','analyzeButton','wgPLN','status','DRmDJ','model','rawText','LIYvc','osLBs','mwQqZ','focus','documentElement','gSHNH','light','btn-profile-menu','Synthesizing\x20answer...','addEventListener','1356DnwFZA','Searching\x20the\x20web...','umxZF'];_0x1974=function(){return _0x13ad69;};return _0x1974();}const _0x14b310=_0x4b6f;function _0x4b6f(_0x18802c,_0x5cdd74){_0x18802c=_0x18802c-(-0x2204+0x1208*-0x2+-0xdd*-0x52);const _0x374873=_0x1974();let _0x1841b6=_0x374873[_0x18802c];return _0x1841b6;}(function(_0x40baf7,_0x6a7023){const _0x5c4d02=_0x4b6f,_0x22d918=_0x40baf7();while(!![]){try{const _0x571a2c=parseInt(_0x5c4d02(0xb8))/(-0x2*-0xfa3+-0x1*-0x1b95+-0x3ada)*(parseInt(_0x5c4d02(0x12e))/(-0x1aee+-0x10e8+0x1e8*0x17))+parseInt(_0x5c4d02(0x116))/(-0x31*-0x81+-0x40f*0x1+-0x149f*0x1)*(parseInt(_0x5c4d02(0xbc))/(-0x1bf8+0x6a*-0x4a+-0x10*-0x3aa))+-parseInt(_0x5c4d02(0xc4))/(0x1be3*0x1+-0x45*-0x7b+0x7f*-0x7b)+-parseInt(_0x5c4d02(0x112))/(-0x4*-0x4c1+0x2452+-0x3c*0xec)*(parseInt(_0x5c4d02(0x126))/(-0xd7e+-0x3*0x173+0x11de*0x1))+parseInt(_0x5c4d02(0xd8))/(0x2185*0x1+-0x24a9*-0x1+-0x7b*0x92)*(parseInt(_0x5c4d02(0xf7))/(0x7*-0xba+0x21*-0x5b+0x10da*0x1))+-parseInt(_0x5c4d02(0x115))/(0x150+-0x1cf+0x89)*(parseInt(_0x5c4d02(0xdb))/(-0x265*0x2+0x177e+0x11*-0x119))+parseInt(_0x5c4d02(0xf4))/(-0x1324+0x1e07+0x1*-0xad7)*(parseInt(_0x5c4d02(0x136))/(0x197*0x17+0x8a1*-0x3+-0xaa1));if(_0x571a2c===_0x6a7023)break;else _0x22d918['push'](_0x22d918['shift']());}catch(_0x21d0b4){_0x22d918['push'](_0x22d918['shift']());}}}(_0x1974,-0x1*0x8cbb5+-0x60892+0x13bdf5));import{submitCrashLog}from'./api.js';import{waitForJob,buildQueueMessage}from'./queue.js';import{createLoadingSpinner}from'./scene.js';import{el,initAutoResize,getCrashLogValue,clearCrashLogInput,setAnalyzeButtonLoading,showQueueBar,hideQueueBar,appendUserMessage,appendLoadingMessage,removeLoadingMessage,appendAiMessage,appendAiChatMessage,addHistoryItem,scrollToElement,showError,updateLoadingText}from'./ui.js';const MIN_LOG_LENGTH=0x1542+-0x1ea5+0x965;let currentSpinner=null,currentChatHistory=[];const initTheme=()=>{const _0x5777dd=_0x4b6f,_0x5b18e8={'gABqR':_0x5777dd(0xc5),'uyMIw':_0x5777dd(0x122),'cEMJF':_0x5777dd(0x141),'bDaeI':_0x5777dd(0x13c),'qfOwe':_0x5777dd(0xf0),'qQrDg':_0x5777dd(0x118),'RCtqc':function(_0xe7708a,_0x5d1884){return _0xe7708a(_0x5d1884);},'jECHa':function(_0x5aa1a6,_0x391f8e){return _0x5aa1a6===_0x391f8e;},'COAEa':_0x5777dd(0xf8),'bNfuW':_0x5777dd(0xce),'SUGQh':_0x5777dd(0xfa),'mwQqZ':_0x5777dd(0xfc),'EwMZL':_0x5777dd(0x10d)},_0x2207fe=document[_0x5777dd(0x14b)](_0x5b18e8[_0x5777dd(0x137)]),_0x2d4dba=document[_0x5777dd(0x14b)](_0x5b18e8[_0x5777dd(0xec)]),_0x4af1a9=_0x2be10a=>{const _0x2c28d4=_0x5777dd;if(_0x2be10a){document[_0x2c28d4(0xee)][_0x2c28d4(0x11c)][_0x2c28d4(0xff)](_0x5b18e8[_0x2c28d4(0x10b)]);if(_0x2d4dba)_0x2d4dba[_0x2c28d4(0x10f)]=_0x5b18e8[_0x2c28d4(0x14c)];}else{document[_0x2c28d4(0xee)][_0x2c28d4(0x11c)][_0x2c28d4(0xc8)](_0x5b18e8[_0x2c28d4(0x10b)]);if(_0x2d4dba)_0x2d4dba[_0x2c28d4(0x10f)]=_0x5b18e8[_0x2c28d4(0x110)];}},_0x280fa1=_0x5b18e8[_0x5777dd(0x151)](localStorage[_0x5777dd(0x106)](_0x5b18e8[_0x5777dd(0x11d)]),_0x5b18e8[_0x5777dd(0xc7)]);_0x5b18e8[_0x5777dd(0x124)](_0x4af1a9,_0x280fa1),_0x2207fe&&_0x2207fe[_0x5777dd(0xf3)](_0x5b18e8[_0x5777dd(0xcb)],()=>{const _0x55d631=_0x5777dd,_0x113cc4=document[_0x55d631(0xee)][_0x55d631(0x11c)][_0x55d631(0x14e)](_0x5b18e8[_0x55d631(0x10b)]),_0x2140d2=_0x113cc4?_0x5b18e8[_0x55d631(0xc6)]:_0x5b18e8[_0x55d631(0xc7)];localStorage[_0x55d631(0xf9)](_0x5b18e8[_0x55d631(0x11d)],_0x2140d2),_0x5b18e8[_0x55d631(0x124)](_0x4af1a9,_0x5b18e8[_0x55d631(0x151)](_0x2140d2,_0x5b18e8[_0x55d631(0xc7)])),document[_0x55d631(0x14b)](_0x5b18e8[_0x55d631(0xd2)])[_0x55d631(0x11c)][_0x55d631(0xc8)](_0x5b18e8[_0x55d631(0xcc)]);});},initSidebarAndDropdown=()=>{const _0x463071=_0x4b6f,_0x1fe672={'Ehizb':_0x463071(0x11e),'FmTVS':_0x463071(0x144),'ARIlf':_0x463071(0x13a),'guvqL':_0x463071(0xce),'RBfoi':_0x463071(0x11f),'hMCCx':_0x463071(0x145),'XsokG':function(_0x4a498f,_0x5d4a0d,_0x1da994){return _0x4a498f(_0x5d4a0d,_0x1da994);},'GDViW':_0x463071(0x10d),'TZKPp':_0x463071(0xf1),'uUJaY':_0x463071(0xf8),'zkmKo':function(_0x3da736,_0x3d4fcc){return _0x3da736&&_0x3d4fcc;}},_0x1f057f=document[_0x463071(0x14b)](_0x1fe672[_0x463071(0x138)]),_0x19f1d9=document[_0x463071(0x14b)](_0x1fe672[_0x463071(0xba)]);_0x1fe672[_0x463071(0xd3)](setTimeout,()=>{const _0x5c9eaf=_0x463071;_0x19f1d9[_0x5c9eaf(0x11c)][_0x5c9eaf(0xc8)](_0x1fe672[_0x5c9eaf(0x13d)]);},-0x1*-0x22be+-0x29*-0x34+-0x31*0xe0);_0x1f057f&&_0x1f057f[_0x463071(0xf3)](_0x1fe672[_0x463071(0xbe)],()=>{const _0x1ff247=_0x463071,_0x2431db=_0x19f1d9[_0x1ff247(0x11c)][_0x1ff247(0x146)](_0x1fe672[_0x1ff247(0xb9)]);localStorage[_0x1ff247(0xf9)](_0x1fe672[_0x1ff247(0x139)],_0x2431db);});const _0x3eb302=document[_0x463071(0x14b)](_0x1fe672[_0x463071(0xe2)]),_0x2be9a8=document[_0x463071(0x14b)](_0x1fe672[_0x463071(0x108)]);_0x1fe672[_0x463071(0xfd)](_0x3eb302,_0x2be9a8)&&(_0x3eb302[_0x463071(0xf3)](_0x1fe672[_0x463071(0xbe)],_0x272915=>{const _0x59ce94=_0x463071;_0x272915[_0x59ce94(0x133)](),_0x2be9a8[_0x59ce94(0x11c)][_0x59ce94(0x146)](_0x1fe672[_0x59ce94(0xbf)]);}),document[_0x463071(0xf3)](_0x1fe672[_0x463071(0xbe)],_0xd11b2d=>{const _0xc9f71=_0x463071;!_0x2be9a8[_0xc9f71(0x14e)](_0xd11b2d[_0xc9f71(0x14a)])&&!_0x3eb302[_0xc9f71(0x14e)](_0xd11b2d[_0xc9f71(0x14a)])&&_0x2be9a8[_0xc9f71(0x11c)][_0xc9f71(0xc8)](_0x1fe672[_0xc9f71(0xbf)]);}));},runAnalysis=async()=>{const _0x5e6014=_0x4b6f,_0x489244={'hrmyG':function(_0x45b41c,_0x57764f){return _0x45b41c(_0x57764f);},'AoOlW':function(_0x17cf92,_0x142242){return _0x17cf92===_0x142242;},'thxDa':_0x5e6014(0x134),'DRmDJ':_0x5e6014(0xf5),'osLBs':function(_0x42c3e5,_0x165789){return _0x42c3e5===_0x165789;},'UEpoj':_0x5e6014(0x113),'fJjjj':_0x5e6014(0xd0),'dVpDO':_0x5e6014(0x10c),'Tgjjx':_0x5e6014(0xf2),'GszMt':function(_0x2d5ceb){return _0x2d5ceb();},'wgPLN':function(_0xf4c00b,_0x28a2eb){return _0xf4c00b<_0x28a2eb;},'LIYvc':function(_0x1ab5d8,_0x31d2ab){return _0x1ab5d8(_0x31d2ab);},'oCCjV':_0x5e6014(0xd7),'HBUhC':function(_0x24213e,_0x2463fc){return _0x24213e(_0x2463fc);},'XjeoO':function(_0x3d6c84){return _0x3d6c84();},'oqRoJ':_0x5e6014(0xc1),'mQWIg':_0x5e6014(0xe0),'nwgBW':_0x5e6014(0xc2),'yJvwh':function(_0x37c709,_0x52e273,_0xbe30a7){return _0x37c709(_0x52e273,_0xbe30a7);},'mGPet':_0x5e6014(0x11a),'fuqCg':_0x5e6014(0xe8),'LzuaQ':_0x5e6014(0xdc),'kBgYC':function(_0x5d0357,_0x35284b){return _0x5d0357<=_0x35284b;},'KWYCQ':function(_0x1f7f3f){return _0x1f7f3f();},'TBtve':_0x5e6014(0xd5)},_0x4a99db=_0x489244[_0x5e6014(0x105)](getCrashLogValue);if(_0x489244[_0x5e6014(0xe5)](_0x4a99db[_0x5e6014(0xb6)],MIN_LOG_LENGTH)){_0x489244[_0x5e6014(0xea)](showError,_0x489244[_0x5e6014(0x10e)]);return;}_0x489244[_0x5e6014(0xea)](setAnalyzeButtonLoading,!![]),_0x489244[_0x5e6014(0xc0)](appendUserMessage,_0x4a99db),_0x489244[_0x5e6014(0xda)](clearCrashLogInput),currentChatHistory[_0x5e6014(0x104)]({'role':_0x489244[_0x5e6014(0x12d)],'content':_0x4a99db});const _0x31fef1=_0x489244[_0x5e6014(0x105)](appendLoadingMessage);window[_0x5e6014(0xdd)]&&(currentSpinner=_0x489244[_0x5e6014(0xea)](createLoadingSpinner,_0x31fef1));_0x489244[_0x5e6014(0x12a)](showQueueBar,_0x489244[_0x5e6014(0xc3)]);try{const _0x162213=await _0x489244[_0x5e6014(0xc0)](submitCrashLog,currentChatHistory);_0x489244[_0x5e6014(0x12a)](showQueueBar,_0x489244[_0x5e6014(0x129)]);const _0x3dd1d8=await _0x489244[_0x5e6014(0xbd)](waitForJob,_0x162213,_0x210854=>{const _0x21c647=_0x5e6014,_0x852ab1=_0x489244[_0x21c647(0x12a)](buildQueueMessage,_0x210854);_0x489244[_0x21c647(0x12a)](showQueueBar,_0x852ab1);if(_0x489244[_0x21c647(0x120)](_0x210854[_0x21c647(0xe6)],_0x489244[_0x21c647(0x14f)]))_0x489244[_0x21c647(0x12a)](updateLoadingText,_0x489244[_0x21c647(0xe7)]);if(_0x489244[_0x21c647(0xeb)](_0x210854[_0x21c647(0xe6)],_0x489244[_0x21c647(0x12c)]))_0x489244[_0x21c647(0x12a)](updateLoadingText,_0x489244[_0x21c647(0x14d)]);if(_0x489244[_0x21c647(0xeb)](_0x210854[_0x21c647(0xe6)],_0x489244[_0x21c647(0xb7)]))_0x489244[_0x21c647(0x12a)](updateLoadingText,_0x489244[_0x21c647(0x143)]);});if(!_0x3dd1d8[_0x5e6014(0x132)])throw new Error(_0x489244[_0x5e6014(0x131)]);if(currentSpinner)currentSpinner[_0x5e6014(0x149)]();_0x489244[_0x5e6014(0xda)](removeLoadingMessage);const _0x7556f9=_0x3dd1d8[_0x5e6014(0x132)];currentChatHistory[_0x5e6014(0x104)]({'role':_0x489244[_0x5e6014(0x123)],'content':_0x7556f9[_0x5e6014(0xe9)]});let _0x5e4fa1;_0x489244[_0x5e6014(0x120)](_0x7556f9[_0x5e6014(0xd1)],_0x489244[_0x5e6014(0xd6)])?(_0x5e4fa1=_0x489244[_0x5e6014(0xc0)](appendAiMessage,_0x7556f9[_0x5e6014(0xde)]),_0x489244[_0x5e6014(0x111)](currentChatHistory[_0x5e6014(0xb6)],0x130f+0x1*0x1673+-0x2980)&&_0x489244[_0x5e6014(0xbd)](addHistoryItem,_0x7556f9[_0x5e6014(0xde)],()=>scrollToElement(_0x5e4fa1))):_0x5e4fa1=_0x489244[_0x5e6014(0xc0)](appendAiChatMessage,_0x7556f9[_0x5e6014(0xfb)]);}catch(_0x413111){if(currentSpinner)currentSpinner[_0x5e6014(0x149)]();_0x489244[_0x5e6014(0xe1)](removeLoadingMessage),_0x489244[_0x5e6014(0xea)](showError,_0x413111[_0x5e6014(0x13b)]||_0x489244[_0x5e6014(0x135)]);}finally{_0x489244[_0x5e6014(0x105)](hideQueueBar),_0x489244[_0x5e6014(0xea)](setAnalyzeButtonLoading,![]);}},bindEvents=()=>{const _0xfd5e39=_0x4b6f,_0x18a570={'EbHdj':_0xfd5e39(0xdf),'iDMvA':function(_0x2a4174,_0xca958d){return _0x2a4174===_0xca958d;},'gSHNH':_0xfd5e39(0x125),'PSkXi':function(_0x569d60){return _0x569d60();},'umxZF':_0xfd5e39(0xf8),'dGCmK':_0xfd5e39(0xce),'DZYLF':function(_0x27344a,_0xa46ee0){return _0x27344a(_0xa46ee0);},'VknKB':_0xfd5e39(0xd9),'WPpnB':_0xfd5e39(0x109),'AtBIS':_0xfd5e39(0xd4),'euPVy':_0xfd5e39(0x10d),'BdaSZ':_0xfd5e39(0x13e),'AsBnC':_0xfd5e39(0x130),'SUZRj':_0xfd5e39(0xfe)};el[_0xfd5e39(0xe4)]()[_0xfd5e39(0xf3)](_0x18a570[_0xfd5e39(0x147)],runAnalysis),el[_0xfd5e39(0x119)]()[_0xfd5e39(0xf3)](_0x18a570[_0xfd5e39(0x103)],_0x4e712d=>{const _0x113a38=_0xfd5e39,_0x4bbc8f=window[_0x113a38(0xcd)](_0x18a570[_0x113a38(0x107)])[_0x113a38(0x117)];_0x18a570[_0x113a38(0xcf)](_0x4e712d[_0x113a38(0x12b)],_0x18a570[_0x113a38(0xef)])&&!_0x4e712d[_0x113a38(0xc9)]&&!_0x4bbc8f&&(_0x4e712d[_0x113a38(0x114)](),!el[_0x113a38(0xe4)]()[_0x113a38(0x142)]&&_0x18a570[_0x113a38(0x100)](runAnalysis));});const _0x1b0b83=document[_0xfd5e39(0x14b)](_0x18a570[_0xfd5e39(0x10a)]);_0x1b0b83&&_0x1b0b83[_0xfd5e39(0xf3)](_0x18a570[_0xfd5e39(0x147)],()=>{const _0x533128=_0xfd5e39;document[_0x533128(0x14b)](_0x18a570[_0x533128(0xf6)])[_0x533128(0x11c)][_0x533128(0xc8)](_0x18a570[_0x533128(0x128)]),_0x18a570[_0x533128(0x101)](showError,_0x18a570[_0x533128(0xbb)]);}),document[_0xfd5e39(0x14b)](_0x18a570[_0xfd5e39(0x127)])[_0xfd5e39(0xf3)](_0x18a570[_0xfd5e39(0x147)],()=>{const _0x243dc5=_0xfd5e39;_0x18a570[_0x243dc5(0x100)](clearCrashLogInput),el[_0x243dc5(0x119)]()[_0x243dc5(0xed)]();const _0x16ff52=document[_0x243dc5(0x102)](_0x18a570[_0x243dc5(0x140)]);_0x16ff52[_0x243dc5(0x121)](_0x16eefc=>_0x16eefc[_0x243dc5(0xc8)]()),currentChatHistory=[];const _0x4b5fa9=el[_0x243dc5(0x12f)]();if(_0x4b5fa9)_0x4b5fa9[_0x243dc5(0x148)][_0x243dc5(0x11b)]=_0x18a570[_0x243dc5(0xe3)];});},init=()=>{const _0x3d497d=_0x4b6f,_0x5e9fde={'sTCIw':function(_0x2619ca){return _0x2619ca();},'MXbDh':function(_0x128d09){return _0x128d09();}};_0x5e9fde[_0x3d497d(0x150)](initTheme),_0x5e9fde[_0x3d497d(0xca)](initSidebarAndDropdown),_0x5e9fde[_0x3d497d(0x150)](initAutoResize),_0x5e9fde[_0x3d497d(0xca)](bindEvents);};document[_0x14b310(0xf3)](_0x14b310(0x13f),init);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { submitCrashLog } from "./api.js";
2
+ import { waitForJob, buildQueueMessage } from "./queue.js";
3
+ import { createLoadingSpinner } from "./scene.js";
4
+ import {
5
+ el,
6
+ initAutoResize,
7
+ getCrashLogValue,
8
+ clearCrashLogInput,
9
+ setAnalyzeButtonLoading,
10
+ showQueueBar,
11
+ hideQueueBar,
12
+ appendUserMessage,
13
+ appendLoadingMessage,
14
+ removeLoadingMessage,
15
+ appendAiMessage,
16
+ appendAiChatMessage,
17
+ addHistoryItem,
18
+ scrollToElement,
19
+ showError,
20
+ updateLoadingText,
21
+ } from "./ui.js";
22
+
23
+ const MIN_LOG_LENGTH = 2;
24
+ let currentSpinner = null;
25
+ let currentChatHistory = [];
26
+
27
+ /* ── Theme Management ────────────────────────── */
28
+ const initTheme = () => {
29
+ const btnToggle = document.getElementById("btn-theme-toggle");
30
+ const themeText = document.getElementById("theme-text");
31
+
32
+ const updateThemeUI = (isLight) => {
33
+ if (isLight) {
34
+ document.documentElement.classList.add("light-theme");
35
+ if(themeText) themeText.textContent = "Switch to Dark Mode";
36
+ } else {
37
+ document.documentElement.classList.remove("light-theme");
38
+ if(themeText) themeText.textContent = "Switch to Light Mode";
39
+ }
40
+ };
41
+
42
+ const isLight = localStorage.getItem("crashx-theme") === "light";
43
+ updateThemeUI(isLight);
44
+
45
+ if (btnToggle) {
46
+ btnToggle.addEventListener("click", () => {
47
+ const isCurrentlyLight = document.documentElement.classList.contains("light-theme");
48
+ const newTheme = isCurrentlyLight ? "dark" : "light";
49
+ localStorage.setItem("crashx-theme", newTheme);
50
+ updateThemeUI(newTheme === "light");
51
+
52
+ // Close dropdown after click
53
+ document.getElementById("profile-dropdown").classList.remove("open");
54
+ });
55
+ }
56
+ };
57
+
58
+ /* ── Sidebar & Dropdown Management ───────────── */
59
+ const initSidebarAndDropdown = () => {
60
+ const btnToggleSidebar = document.getElementById("btn-toggle-sidebar");
61
+ const appContainer = document.getElementById("app-container");
62
+
63
+ // Remove the instant init class after a tiny delay so transitions work going forward
64
+ setTimeout(() => {
65
+ appContainer.classList.remove("sidebar-closed-init");
66
+ }, 50);
67
+
68
+ if (btnToggleSidebar) {
69
+ btnToggleSidebar.addEventListener("click", () => {
70
+ const isClosed = appContainer.classList.toggle("sidebar-closed");
71
+ localStorage.setItem("crashx-sidebar-closed", isClosed);
72
+ });
73
+ }
74
+
75
+ const btnProfileMenu = document.getElementById("btn-profile-menu");
76
+ const profileDropdown = document.getElementById("profile-dropdown");
77
+
78
+ if (btnProfileMenu && profileDropdown) {
79
+ btnProfileMenu.addEventListener("click", (e) => {
80
+ e.stopPropagation();
81
+ profileDropdown.classList.toggle("open");
82
+ });
83
+
84
+ document.addEventListener("click", (e) => {
85
+ if (!profileDropdown.contains(e.target) && !btnProfileMenu.contains(e.target)) {
86
+ profileDropdown.classList.remove("open");
87
+ }
88
+ });
89
+ }
90
+ };
91
+
92
+ /* ── Analysis Flow ───────────────────────────── */
93
+ const runAnalysis = async () =>
94
+ {
95
+ const crashLog = getCrashLogValue();
96
+
97
+ if (crashLog.length < MIN_LOG_LENGTH)
98
+ {
99
+ showError("Please enter a valid message.");
100
+ return;
101
+ }
102
+
103
+ setAnalyzeButtonLoading(true);
104
+
105
+ appendUserMessage(crashLog);
106
+ clearCrashLogInput();
107
+
108
+ currentChatHistory.push({ role: 'user', content: crashLog });
109
+
110
+ const canvas = appendLoadingMessage();
111
+
112
+ if (window.THREE) {
113
+ currentSpinner = createLoadingSpinner(canvas);
114
+ }
115
+
116
+ showQueueBar("Submitting...");
117
+
118
+ try
119
+ {
120
+ const jobId = await submitCrashLog(currentChatHistory);
121
+ showQueueBar("Queued...");
122
+
123
+ const finalStatus = await waitForJob(jobId, (statusData) =>
124
+ {
125
+ const msg = buildQueueMessage(statusData);
126
+ showQueueBar(msg);
127
+
128
+ // Sync the 3D loader text with the queue status
129
+ if (statusData.status === "searching") updateLoadingText("Searching the web...");
130
+ if (statusData.status === "analyzing") updateLoadingText("Reading findings...");
131
+ if (statusData.status === "processing") updateLoadingText("Synthesizing answer...");
132
+ });
133
+
134
+ if (!finalStatus.result)
135
+ {
136
+ throw new Error("Analysis finished but no result was returned.");
137
+ }
138
+
139
+ if (currentSpinner) currentSpinner.destroy();
140
+ removeLoadingMessage();
141
+
142
+ const result = finalStatus.result;
143
+
144
+ // Save to history so the AI has context for the next prompt
145
+ currentChatHistory.push({ role: 'model', content: result.rawText });
146
+
147
+ let aiMessageNode;
148
+ if (result.type === 'analysis') {
149
+ aiMessageNode = appendAiMessage(result.data);
150
+ // Only add history sidebar item on the first analysis
151
+ if (currentChatHistory.length <= 2) {
152
+ addHistoryItem(result.data, () => scrollToElement(aiMessageNode));
153
+ }
154
+ } else {
155
+ aiMessageNode = appendAiChatMessage(result.text);
156
+ }
157
+ }
158
+ catch (error)
159
+ {
160
+ if (currentSpinner) currentSpinner.destroy();
161
+ removeLoadingMessage();
162
+ showError(error.message || "Something went wrong. Please try again.");
163
+ }
164
+ finally
165
+ {
166
+ hideQueueBar();
167
+ setAnalyzeButtonLoading(false);
168
+ }
169
+ };
170
+
171
+ /* ── Event Wiring ────────────────────────────── */
172
+ const bindEvents = () =>
173
+ {
174
+ el.analyzeButton().addEventListener("click", runAnalysis);
175
+
176
+ el.crashLogInput().addEventListener("keydown", (event) =>
177
+ {
178
+ const isMobile = window.matchMedia("(max-width: 768px)").matches;
179
+
180
+ if (event.key === "Enter" && !event.shiftKey && !isMobile)
181
+ {
182
+ event.preventDefault();
183
+ if (!el.analyzeButton().disabled) {
184
+ runAnalysis();
185
+ }
186
+ }
187
+ });
188
+
189
+ const btnSignin = document.getElementById("btn-sidebar-signin");
190
+ if (btnSignin) {
191
+ btnSignin.addEventListener("click", () =>
192
+ {
193
+ document.getElementById("profile-dropdown").classList.remove("open");
194
+ showError("Login is coming soon — stay tuned.");
195
+ });
196
+ }
197
+
198
+ document.getElementById("btn-new-analysis").addEventListener("click", () =>
199
+ {
200
+ clearCrashLogInput();
201
+ el.crashLogInput().focus();
202
+
203
+ const messages = document.querySelectorAll(".message-row");
204
+ messages.forEach(m => m.remove());
205
+
206
+ currentChatHistory = [];
207
+
208
+ const welcome = el.welcomeScreen();
209
+ if (welcome) welcome.style.display = "flex";
210
+ });
211
+ };
212
+
213
+ /* ── Init ──────���─────────────────────────────── */
214
+ const init = () =>
215
+ {
216
+ initTheme();
217
+ initSidebarAndDropdown();
218
+ initAutoResize();
219
+ bindEvents();
220
+ };
221
+
222
+ document.addEventListener("DOMContentLoaded", init);
public/js/queue.js CHANGED
@@ -1 +1,75 @@
1
- const _0x30c575=_0x41c8;(function(_0x4a87fe,_0x5ccd04){const _0x1988dd=_0x41c8,_0x175b08=_0x4a87fe();while(!![]){try{const _0x36e3c6=-parseInt(_0x1988dd(0x10e))/(0x831+0x33*-0x60+0xaf0)*(parseInt(_0x1988dd(0x128))/(0xe*0xbd+0xa*0x131+-0x163e))+-parseInt(_0x1988dd(0xfd))/(-0x2636+-0x108f+0x36c8)*(-parseInt(_0x1988dd(0x107))/(-0x1*-0x24af+0xce0*0x2+-0x3e6b))+parseInt(_0x1988dd(0xf9))/(-0x17cf*-0x1+-0x523+0x3bb*-0x5)+-parseInt(_0x1988dd(0xfa))/(-0x475*-0x1+-0x8*-0x38+-0x62f)+-parseInt(_0x1988dd(0x113))/(0x2*0x1a6+0x1df*-0x8+-0x5*-0x257)*(-parseInt(_0x1988dd(0x124))/(0x1054*0x1+-0x1*0x1897+-0xc1*-0xb))+-parseInt(_0x1988dd(0x10b))/(0x1d*-0x145+-0xe32*0x1+-0x5ac*-0x9)+parseInt(_0x1988dd(0x112))/(-0x1134+-0x15e+0x129c)*(parseInt(_0x1988dd(0x12e))/(0x1da7*-0x1+0x10c4+0x2*0x677));if(_0x36e3c6===_0x5ccd04)break;else _0x175b08['push'](_0x175b08['shift']());}catch(_0x18c48f){_0x175b08['push'](_0x175b08['shift']());}}}(_0x3547,-0xc88c+0x7ecc2+-0x14c05));function _0x41c8(_0x4bb6f3,_0x53e790){_0x4bb6f3=_0x4bb6f3-(0x4*-0x565+0x8fe+-0x10b*-0xd);const _0x293b00=_0x3547();let _0x3b33fb=_0x293b00[_0x4bb6f3];return _0x3b33fb;}import{pollJobStatus}from'./api.js';const POLL_INTERVAL_MS=-0x11d1*-0x1+0x1*-0x15a6+0x885,TERMINAL_STATUSES=[_0x30c575(0x12f),_0x30c575(0x102)],waitForJob=(_0x40cf7c,_0x465109)=>{const _0x4da536=_0x30c575,_0x5709b2={'LIcPL':function(_0x3e26d7,_0xf5444e){return _0x3e26d7(_0xf5444e);},'aNVvF':function(_0x45f3de,_0x2569fc){return _0x45f3de===_0x2569fc;},'dhFXs':_0x4da536(0x10d),'wdTFo':function(_0x33dd63,_0x4824de){return _0x33dd63(_0x4824de);},'Fpwtk':function(_0x24d43e,_0x31e229){return _0x24d43e===_0x31e229;},'epksd':_0x4da536(0x12f),'DYdNM':_0x4da536(0x102),'LhpkI':_0x4da536(0x11a),'GqJPO':function(_0x432a94,_0x49e926,_0x4a8241){return _0x432a94(_0x49e926,_0x4a8241);},'kxDHG':function(_0x661dd4,_0x472acd){return _0x661dd4(_0x472acd);},'QlXsq':function(_0x1b3969){return _0x1b3969();}};return new Promise((_0xcb736,_0x5d12a7)=>{const _0x500ff8=_0x4da536,_0x40ee1e={'MSalI':function(_0xe6d06c,_0x17edf1){const _0x1cfaa0=_0x41c8;return _0x5709b2[_0x1cfaa0(0x131)](_0xe6d06c,_0x17edf1);},'Wmpmp':function(_0x205e4a,_0x4c1259){const _0x2f17a8=_0x41c8;return _0x5709b2[_0x2f17a8(0x126)](_0x205e4a,_0x4c1259);},'LLHPY':_0x5709b2[_0x500ff8(0x12b)],'WkKVh':function(_0x883918,_0x49cfd3){const _0x36a644=_0x500ff8;return _0x5709b2[_0x36a644(0x103)](_0x883918,_0x49cfd3);},'auooU':function(_0x14815b,_0x16ba2e){const _0x436137=_0x500ff8;return _0x5709b2[_0x436137(0x109)](_0x14815b,_0x16ba2e);},'mctnp':_0x5709b2[_0x500ff8(0x12c)],'htiNT':function(_0x295b1b,_0x38bbff){const _0x304b63=_0x500ff8;return _0x5709b2[_0x304b63(0x103)](_0x295b1b,_0x38bbff);},'BgcGi':function(_0xcd622f,_0x338a78){const _0x509e0e=_0x500ff8;return _0x5709b2[_0x509e0e(0x109)](_0xcd622f,_0x338a78);},'kPMZj':_0x5709b2[_0x500ff8(0x115)],'AbSCo':function(_0x453be6,_0x42f2f9){const _0x5adf6a=_0x500ff8;return _0x5709b2[_0x5adf6a(0x103)](_0x453be6,_0x42f2f9);},'jLGHC':_0x5709b2[_0x500ff8(0xfb)],'CXrDA':function(_0x5f4ea5,_0x2316d0,_0x5dea53){const _0x204f77=_0x500ff8;return _0x5709b2[_0x204f77(0x105)](_0x5f4ea5,_0x2316d0,_0x5dea53);},'WpoHy':function(_0x2170eb,_0x5b599c){const _0x448444=_0x500ff8;return _0x5709b2[_0x448444(0x117)](_0x2170eb,_0x5b599c);}},_0x6ab8bc=async()=>{const _0x3e75fe=_0x500ff8;try{const _0x1aa0c9=await _0x40ee1e[_0x3e75fe(0x101)](pollJobStatus,_0x40cf7c);_0x40ee1e[_0x3e75fe(0x121)](typeof _0x465109,_0x40ee1e[_0x3e75fe(0xfc)])&&_0x40ee1e[_0x3e75fe(0x10a)](_0x465109,_0x1aa0c9);if(_0x40ee1e[_0x3e75fe(0x120)](_0x1aa0c9[_0x3e75fe(0x10c)],_0x40ee1e[_0x3e75fe(0x110)])){_0x40ee1e[_0x3e75fe(0x130)](_0xcb736,_0x1aa0c9);return;}if(_0x40ee1e[_0x3e75fe(0x100)](_0x1aa0c9[_0x3e75fe(0x10c)],_0x40ee1e[_0x3e75fe(0x119)])){_0x40ee1e[_0x3e75fe(0x123)](_0x5d12a7,new Error(_0x40ee1e[_0x3e75fe(0x133)]));return;}_0x40ee1e[_0x3e75fe(0x114)](setTimeout,_0x6ab8bc,POLL_INTERVAL_MS);}catch(_0x588364){_0x40ee1e[_0x3e75fe(0xfe)](_0x5d12a7,_0x588364);}};_0x5709b2[_0x500ff8(0x12a)](_0x6ab8bc);});},buildQueueMessage=_0x24c88d=>{const _0x4738b8=_0x30c575,_0x1d3daa={'ReJDg':function(_0x38664e,_0xf4fac){return _0x38664e===_0xf4fac;},'AYXDB':_0x4738b8(0x10f),'BCkrS':_0x4738b8(0x134),'VumNB':_0x4738b8(0x127),'YqmgL':_0x4738b8(0xff),'GDpkq':_0x4738b8(0x132),'AdcnP':_0x4738b8(0x11d),'wMQWJ':function(_0x198f7d,_0x212455){return _0x198f7d>_0x212455;},'IaOAA':_0x4738b8(0x104),'rkiph':_0x4738b8(0x106)},{status:_0x354195,positionInQueue:_0x296bf6,estimatedWaitSeconds:_0x11ead4}=_0x24c88d;if(_0x1d3daa[_0x4738b8(0x11e)](_0x354195,_0x1d3daa[_0x4738b8(0x118)]))return _0x1d3daa[_0x4738b8(0x116)];if(_0x1d3daa[_0x4738b8(0x11e)](_0x354195,_0x1d3daa[_0x4738b8(0x129)]))return _0x1d3daa[_0x4738b8(0x11b)];if(_0x1d3daa[_0x4738b8(0x11e)](_0x354195,_0x1d3daa[_0x4738b8(0x122)]))return _0x1d3daa[_0x4738b8(0x11c)];if(_0x1d3daa[_0x4738b8(0x12d)](_0x296bf6,-0x853*0x2+-0x8ec+-0x443*-0x6)){const _0x5e297c=_0x1d3daa[_0x4738b8(0x12d)](_0x11ead4,-0x4e*0x4a+0x2665+0xfd9*-0x1)?'~'+_0x11ead4+'s':_0x1d3daa[_0x4738b8(0x11f)];return _0x4738b8(0x108)+_0x296bf6+_0x4738b8(0x125)+_0x5e297c;}return _0x1d3daa[_0x4738b8(0x111)];};export{waitForJob,buildQueueMessage};function _0x3547(){const _0x472b78=['kxDHG','AYXDB','kPMZj','Analysis\x20failed\x20on\x20the\x20server.','YqmgL','AdcnP','\x20Synthesizing\x20final\x20answer...','ReJDg','IaOAA','auooU','Wmpmp','GDpkq','AbSCo','728952agpoun','\x20in\x20queue\x20·\x20','aNVvF','analyzing','10EHnUEd','VumNB','QlXsq','dhFXs','epksd','wMQWJ','570449AfjEPp','done','htiNT','LIcPL','processing','jLGHC','Searching\x20the\x20web...','350470VJIGym','1878714eoKoGK','LhpkI','LLHPY','168dvwjnM','WpoHy','Analyzing\x20web\x20results...','BgcGi','MSalI','failed','wdTFo','almost\x20there','GqJPO','Queued\x20—\x20waiting\x20to\x20start...','12864OHmwLY','Analyzing\x20·\x20Position\x20','Fpwtk','WkKVh','5682690GaCeQQ','status','function','57299tfnEfP','searching','mctnp','rkiph','140MnCqkx','49gFRtbe','CXrDA','DYdNM','BCkrS'];_0x3547=function(){return _0x472b78;};return _0x3547();}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { pollJobStatus } from "./api.js";
2
+
3
+ const POLL_INTERVAL_MS = 1200;
4
+ const TERMINAL_STATUSES = ["done", "failed"];
5
+
6
+ const waitForJob = (jobId, onProgress) =>
7
+ {
8
+ return new Promise((resolve, reject) =>
9
+ {
10
+ const poll = async () =>
11
+ {
12
+ try
13
+ {
14
+ const statusData = await pollJobStatus(jobId);
15
+
16
+ if (typeof onProgress === "function")
17
+ {
18
+ onProgress(statusData);
19
+ }
20
+
21
+ if (statusData.status === "done")
22
+ {
23
+ resolve(statusData);
24
+ return;
25
+ }
26
+
27
+ if (statusData.status === "failed")
28
+ {
29
+ reject(new Error("Analysis failed on the server."));
30
+ return;
31
+ }
32
+
33
+ setTimeout(poll, POLL_INTERVAL_MS);
34
+ }
35
+ catch (error)
36
+ {
37
+ reject(error);
38
+ }
39
+ };
40
+
41
+ poll();
42
+ });
43
+ };
44
+
45
+ const buildQueueMessage = (statusData) =>
46
+ {
47
+ const { status, positionInQueue, estimatedWaitSeconds } = statusData;
48
+
49
+ if (status === "searching")
50
+ {
51
+ return "Searching the web...";
52
+ }
53
+
54
+ if (status === "analyzing")
55
+ {
56
+ return "Analyzing web results...";
57
+ }
58
+
59
+ if (status === "processing")
60
+ {
61
+ return " Synthesizing final answer...";
62
+ }
63
+
64
+ if (positionInQueue > 0)
65
+ {
66
+ const waitDisplay = estimatedWaitSeconds > 0
67
+ ? `~${estimatedWaitSeconds}s`
68
+ : "almost there";
69
+ return `Analyzing · Position ${positionInQueue} in queue · ${waitDisplay}`;
70
+ }
71
+
72
+ return "Queued — waiting to start...";
73
+ };
74
+
75
+ export { waitForJob, buildQueueMessage };
public/js/scene.js CHANGED
@@ -1 +1,78 @@
1
- (function(_0x558bf9,_0x351689){const _0x2ef443=_0x14ed,_0x17e9b4=_0x558bf9();while(!![]){try{const _0x4e4ec9=-parseInt(_0x2ef443(0x180))/(0x1a70+0xf91+-0x2a00)*(parseInt(_0x2ef443(0x178))/(-0x25ca+0xa*-0x1a7+0x3652))+-parseInt(_0x2ef443(0x191))/(-0x17e6+0x2*0x751+0x5*0x1db)*(parseInt(_0x2ef443(0x194))/(0x2*0x1217+0x3e*-0x6c+-0xa02))+-parseInt(_0x2ef443(0x189))/(-0x1*0x1291+-0x199*-0xb+0x103)+parseInt(_0x2ef443(0x195))/(0x3d*0x5c+0x12cf+-0x28b5)*(parseInt(_0x2ef443(0x182))/(0x8bd*-0x1+0x1fd2*-0x1+-0x2896*-0x1))+-parseInt(_0x2ef443(0x17b))/(0x47*-0x4a+-0x2e*-0x18+0x103e)*(-parseInt(_0x2ef443(0x18c))/(0x142c+0xe31+-0x1a*0x152))+-parseInt(_0x2ef443(0x186))/(0x8ab*0x4+0x11d7*-0x1+-0x3*0x599)+parseInt(_0x2ef443(0x18e))/(-0x283*0x1+0x13*-0x137+0x19a3);if(_0x4e4ec9===_0x351689)break;else _0x17e9b4['push'](_0x17e9b4['shift']());}catch(_0x4cea95){_0x17e9b4['push'](_0x17e9b4['shift']());}}}(_0x35b7,-0x446d2+0x116499+-0x378b4));function _0x35b7(){const _0x15b738=['42hOALAM','OctahedronGeometry','4|2|1|0|5|3','152UImMhO','dispose','MeshStandardMaterial','UlZAp','Scene','41641gofSUK','set','217akbjJz','setPixelRatio','Mesh','dzmUn','7068400FPdgAp','PerspectiveCamera','setSize','6018695vrBaWc','rotation','JMayk','326574PhMAVA','AmbientLight','37549017PuQByO','add','split','82740xgDwNN','position','PointLight','168jFgYfZ','91452izWNVs','1|2|3|0|4','render','WebGLRenderer','devicePixelRatio','QeKjd','SDbcU'];_0x35b7=function(){return _0x15b738;};return _0x35b7();}let currentRenderer=null,currentReq=null;const createLoadingSpinner=_0x2c7c72=>{const _0x27c75b=_0x14ed,_0xea0cb3={'UlZAp':_0x27c75b(0x17a),'QeKjd':function(_0x380275,_0xc15dec){return _0x380275(_0xc15dec);},'JMayk':_0x27c75b(0x172),'SDbcU':function(_0x56125a,_0x388fcd){return _0x56125a/_0x388fcd;},'dzmUn':function(_0x133cd6){return _0x133cd6();}};currentRenderer&&(currentRenderer[_0x27c75b(0x17c)](),_0xea0cb3[_0x27c75b(0x176)](cancelAnimationFrame,currentReq));const _0x11a0eb=0x3e3*-0x1+-0x376*-0xa+-0x1e89,_0x4daea3=0xbe*0x34+-0x15ce+0x109a*-0x1,_0xb449c2=new THREE[(_0x27c75b(0x174))]({'canvas':_0x2c7c72,'antialias':!![],'alpha':!![]});_0xb449c2[_0x27c75b(0x183)](window[_0x27c75b(0x175)]),_0xb449c2[_0x27c75b(0x188)](_0x11a0eb,_0x4daea3),currentRenderer=_0xb449c2;const _0x57b11a=new THREE[(_0x27c75b(0x17f))](),_0x537d1d=new THREE[(_0x27c75b(0x187))](-0x1990+-0xc45+0x2602,_0xea0cb3[_0x27c75b(0x177)](_0x11a0eb,_0x4daea3),0x3*0x6dd+0x1*-0x4fb+-0xf9c+0.1,0x1*0x147a+0x1e25+0x491*-0xb);_0x537d1d[_0x27c75b(0x192)]['z']=-0x97+0x1cf+-0x134+0.5;const _0xd1120d=new THREE[(_0x27c75b(0x179))](0x169*0xf+0x16f0+-0xeb2*0x3+0.19999999999999996,0x200f+0x242b*-0x1+-0x20e*-0x2),_0x21bf03=new THREE[(_0x27c75b(0x17d))]({'color':0x8b5cf6,'roughness':0.1,'metalness':0.8}),_0x42e09b=new THREE[(_0x27c75b(0x184))](_0xd1120d,_0x21bf03);_0x57b11a[_0x27c75b(0x18f)](_0x42e09b);const _0x442cce=new THREE[(_0x27c75b(0x18d))](-0x2*0x487081+-0xc030b4+0x25111b5,0xd1f+-0x2e9+0x51b*-0x2+0.5);_0x57b11a[_0x27c75b(0x18f)](_0x442cce);const _0x37f770=new THREE[(_0x27c75b(0x193))](-0x10b7b5a+-0x1e4fb94+0x6d*0x94081,0x1f11+0x1c1*-0x1+-0x1d4e);_0x37f770[_0x27c75b(0x192)][_0x27c75b(0x181)](-0xc85+0x1*-0x813+0x149d,-0x2*0xb57+0x30b+0x13a8,0x47*-0x5a+-0x3*-0x332+0xf65),_0x57b11a[_0x27c75b(0x18f)](_0x37f770);const _0x434d19=new THREE[(_0x27c75b(0x193))](0xb*-0x4fbc1+0x72a527*0x1+-0x1*-0x137309,0x12*0x14e+-0x1e48+0x6cf);_0x434d19[_0x27c75b(0x192)][_0x27c75b(0x181)](-(0x110b*0x1+0x1dc3*-0x1+0xcbd),-(0x3*-0x968+0x1a03*-0x1+0x3640),0x96d*0x2+-0x427+-0xeb1),_0x57b11a[_0x27c75b(0x18f)](_0x434d19);let _0x21bffa=!![];const _0x35e8da=()=>{const _0x20a89b=_0x27c75b,_0x17f12c=_0xea0cb3[_0x20a89b(0x17e)][_0x20a89b(0x190)]('|');let _0x437c16=0x7d7*0x3+-0x1f79+0x1fd*0x4;while(!![]){switch(_0x17f12c[_0x437c16++]){case'0':_0x42e09b[_0x20a89b(0x18a)]['y']+=-0x6a6+-0xe7*0x5+-0xb29*-0x1+0.04;continue;case'1':_0x42e09b[_0x20a89b(0x18a)]['x']+=0x1a*0xf1+-0xa2+-0x17d8+0.03;continue;case'2':currentReq=_0xea0cb3[_0x20a89b(0x176)](requestAnimationFrame,_0x35e8da);continue;case'3':_0xb449c2[_0x20a89b(0x173)](_0x57b11a,_0x537d1d);continue;case'4':if(!_0x21bffa)return;continue;case'5':_0x42e09b[_0x20a89b(0x18a)]['z']+=0x355*0x5+0xcc8+0x1d71*-0x1+0.01;continue;}break;}};return _0xea0cb3[_0x27c75b(0x185)](_0x35e8da),{'destroy':()=>{const _0x158514=_0x27c75b,_0x317b5c=_0xea0cb3[_0x158514(0x18b)][_0x158514(0x190)]('|');let _0x5aafc2=-0x2233+0x1f8+0x203b;while(!![]){switch(_0x317b5c[_0x5aafc2++]){case'0':_0x21bf03[_0x158514(0x17c)]();continue;case'1':_0x21bffa=![];continue;case'2':_0xb449c2[_0x158514(0x17c)]();continue;case'3':_0xd1120d[_0x158514(0x17c)]();continue;case'4':currentRenderer=null;continue;}break;}}};};function _0x14ed(_0x797b64,_0x32e66d){_0x797b64=_0x797b64-(0x1076+0x21ea+-0x30ee);const _0x481b54=_0x35b7();let _0x2412d8=_0x481b54[_0x797b64];return _0x2412d8;}export{createLoadingSpinner};
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ let currentRenderer = null;
2
+ let currentReq = null;
3
+
4
+ const createLoadingSpinner = (canvasElement) => {
5
+ if (currentRenderer) {
6
+ currentRenderer.dispose();
7
+ cancelAnimationFrame(currentReq);
8
+ }
9
+
10
+ const width = 48;
11
+ const height = 48;
12
+
13
+ const renderer = new THREE.WebGLRenderer({
14
+ canvas: canvasElement,
15
+ antialias: true,
16
+ alpha: true,
17
+ });
18
+ renderer.setPixelRatio(window.devicePixelRatio);
19
+ renderer.setSize(width, height);
20
+ currentRenderer = renderer;
21
+
22
+ const scene = new THREE.Scene();
23
+
24
+ const camera = new THREE.PerspectiveCamera(45, width / height, 0.1, 100);
25
+ camera.position.z = 4.5;
26
+
27
+ // An Octahedron has exactly 6 corners (vertices) and looks like a beautiful crystal.
28
+ const geometry = new THREE.OctahedronGeometry(1.2, 0);
29
+
30
+ const material = new THREE.MeshStandardMaterial({
31
+ color: 0x8b5cf6, // Vibrant purple
32
+ roughness: 0.1, // Very shiny
33
+ metalness: 0.8, // Metallic
34
+ });
35
+
36
+ const mesh = new THREE.Mesh(geometry, material);
37
+ scene.add(mesh);
38
+
39
+ // Dynamic lighting setup
40
+ const ambientLight = new THREE.AmbientLight(0xffffff, 0.5);
41
+ scene.add(ambientLight);
42
+
43
+ const pointLight = new THREE.PointLight(0xffffff, 2.0);
44
+ pointLight.position.set(5, 5, 5);
45
+ scene.add(pointLight);
46
+
47
+ const pointLight2 = new THREE.PointLight(0x4f46e5, 3.0);
48
+ pointLight2.position.set(-5, -5, 2);
49
+ scene.add(pointLight2);
50
+
51
+ let isRunning = true;
52
+
53
+ const animate = () => {
54
+ if (!isRunning) return;
55
+ currentReq = requestAnimationFrame(animate);
56
+
57
+ // Fast, smooth rotation on all axes
58
+ mesh.rotation.x += 0.03;
59
+ mesh.rotation.y += 0.04;
60
+ mesh.rotation.z += 0.01;
61
+
62
+ renderer.render(scene, camera);
63
+ };
64
+
65
+ animate();
66
+
67
+ return {
68
+ destroy: () => {
69
+ isRunning = false;
70
+ renderer.dispose();
71
+ geometry.dispose();
72
+ material.dispose();
73
+ currentRenderer = null;
74
+ }
75
+ };
76
+ };
77
+
78
+ export { createLoadingSpinner };
public/js/ui.js CHANGED
@@ -1 +1,511 @@
1
- const _0x5467b7=_0x3194;(function(_0x5642a5,_0x5bd05e){const _0x2e1d24=_0x3194,_0x5e289a=_0x5642a5();while(!![]){try{const _0x54bac1=parseInt(_0x2e1d24(0xe3))/(-0xcd6+0x5*-0x499+-0x1*-0x23d4)+parseInt(_0x2e1d24(0xdc))/(-0x3ed+0x25da+-0x1*0x21eb)*(parseInt(_0x2e1d24(0x12e))/(-0x89f+0x2664+-0x24a*0xd))+-parseInt(_0x2e1d24(0x124))/(-0x152e+-0x1*-0x23a7+-0xe75)+-parseInt(_0x2e1d24(0xef))/(0x19b*-0xd+-0x316+-0x63*-0x3e)+parseInt(_0x2e1d24(0x126))/(0xfa7+-0x732*-0x2+-0x1e05)+parseInt(_0x2e1d24(0xe2))/(-0x1*-0x266f+0x2007*-0x1+0x1*-0x661)*(parseInt(_0x2e1d24(0xd5))/(-0xcb*0x19+0x311+0x10ca))+-parseInt(_0x2e1d24(0x16a))/(-0x221a+0x86c+0xe3*0x1d)*(parseInt(_0x2e1d24(0x11b))/(0x258+-0x7b6+0x568));if(_0x54bac1===_0x5bd05e)break;else _0x5e289a['push'](_0x5e289a['shift']());}catch(_0x568421){_0x5e289a['push'](_0x5e289a['shift']());}}}(_0x2e7f,0xd*-0xcc7+-0xa641*0x6+0x6fa78));const el={'crashLogInput':()=>document[_0x5467b7(0x183)](_0x5467b7(0xf7)),'analyzeButton':()=>document[_0x5467b7(0x183)](_0x5467b7(0x135)),'queueBar':()=>document[_0x5467b7(0x183)](_0x5467b7(0x172)),'queueBarText':()=>document[_0x5467b7(0x183)](_0x5467b7(0x1b8)),'messagesArea':()=>document[_0x5467b7(0x183)](_0x5467b7(0x188)),'welcomeScreen':()=>document[_0x5467b7(0x183)](_0x5467b7(0x14c)),'historyList':()=>document[_0x5467b7(0x183)](_0x5467b7(0x127)),'errorToast':()=>document[_0x5467b7(0x183)](_0x5467b7(0x164))},initAutoResize=()=>{const _0x4c69ce=_0x5467b7,_0x5adad2={'uzkRd':_0x4c69ce(0x146),'ylKyK':function(_0x4b950d,_0x392239){return _0x4b950d+_0x392239;},'FEESI':function(_0x1b27df,_0x4b81e3){return _0x1b27df===_0x4b81e3;},'NfIrc':_0x4c69ce(0x11a)},_0x58bb2d=el[_0x4c69ce(0x10e)]();_0x58bb2d[_0x4c69ce(0x16c)](_0x5adad2[_0x4c69ce(0x10c)],()=>{const _0x3290e3=_0x4c69ce;_0x58bb2d[_0x3290e3(0x123)][_0x3290e3(0x15b)]=_0x5adad2[_0x3290e3(0x1af)],_0x58bb2d[_0x3290e3(0x123)][_0x3290e3(0x15b)]=_0x5adad2[_0x3290e3(0x16b)](Math[_0x3290e3(0xe4)](_0x58bb2d[_0x3290e3(0x1a1)],0x1ca7+-0x173e+-0x479),'px'),el[_0x3290e3(0x108)]()[_0x3290e3(0x1ab)]=_0x5adad2[_0x3290e3(0x1b0)](_0x58bb2d[_0x3290e3(0xda)][_0x3290e3(0x113)]()[_0x3290e3(0x152)],0x6d*0x3e+0x1*0x973+-0x51f*0x7);});},getCrashLogValue=()=>el[_0x5467b7(0x10e)]()[_0x5467b7(0xda)][_0x5467b7(0x113)](),clearCrashLogInput=()=>{const _0x25b756=_0x5467b7,_0x3855ea={'gAliM':_0x25b756(0x146)},_0x530388=el[_0x25b756(0x10e)]();_0x530388[_0x25b756(0xda)]='',_0x530388[_0x25b756(0x123)][_0x25b756(0x15b)]=_0x3855ea[_0x25b756(0x17c)],el[_0x25b756(0x108)]()[_0x25b756(0x1ab)]=!![];},setAnalyzeButtonLoading=_0x504758=>{const _0x155801=_0x5467b7;el[_0x155801(0x108)]()[_0x155801(0x1ab)]=_0x504758;},showQueueBar=_0x41b4ce=>{const _0x6536c1=_0x5467b7,_0x57f4e1={'lhnGG':_0x6536c1(0x140)};el[_0x6536c1(0x14f)]()[_0x6536c1(0x1c4)][_0x6536c1(0x178)](_0x57f4e1[_0x6536c1(0x11e)]),el[_0x6536c1(0x111)]()[_0x6536c1(0x1c3)]=_0x41b4ce;},hideQueueBar=()=>{const _0x44f293=_0x5467b7,_0x14a6ad={'NkBjA':_0x44f293(0x140)};el[_0x44f293(0x14f)]()[_0x44f293(0x1c4)][_0x44f293(0x190)](_0x14a6ad[_0x44f293(0x169)]);},hideWelcomeScreen=()=>{const _0x500bf1=_0x5467b7,_0x52c5e0={'PTQAF':_0x500bf1(0x180)},_0x5e3ce5=el[_0x500bf1(0x134)]();if(_0x5e3ce5)_0x5e3ce5[_0x500bf1(0x123)][_0x500bf1(0x107)]=_0x52c5e0[_0x500bf1(0x167)];},appendUserMessage=_0x16c789=>{const _0x58b509=_0x5467b7,_0x3ac0fb={'gRLhf':function(_0x18857d){return _0x18857d();},'UkTWs':_0x58b509(0x116),'kBzcN':_0x58b509(0xf5),'YUBMk':function(_0x31eb21){return _0x31eb21();}};_0x3ac0fb[_0x58b509(0xde)](hideWelcomeScreen);const _0x146b11=document[_0x58b509(0x1a7)](_0x3ac0fb[_0x58b509(0x17d)]);_0x146b11[_0x58b509(0x136)]=_0x3ac0fb[_0x58b509(0x139)],_0x146b11[_0x58b509(0x17a)]=_0x58b509(0x14a)+_0x16c789+_0x58b509(0xf0),el[_0x58b509(0x15e)]()[_0x58b509(0x12c)](_0x146b11),_0x3ac0fb[_0x58b509(0x1ac)](scrollToBottom);},appendLoadingMessage=()=>{const _0x434e39=_0x5467b7,_0x49fdc3={'Ehaoo':function(_0x81ec7){return _0x81ec7();},'UJiXU':_0x434e39(0x116),'ZyMoJ':_0x434e39(0x13b),'yhkEL':_0x434e39(0x19d),'plMZA':function(_0x18bdd9){return _0x18bdd9();},'TMrUm':_0x434e39(0x138)};_0x49fdc3[_0x434e39(0x16d)](hideWelcomeScreen);const _0x5b0b7e=document[_0x434e39(0x1a7)](_0x49fdc3[_0x434e39(0xfc)]);return _0x5b0b7e[_0x434e39(0x136)]=_0x49fdc3[_0x434e39(0x184)],_0x5b0b7e['id']=_0x49fdc3[_0x434e39(0xf1)],_0x5b0b7e[_0x434e39(0x17a)]=_0x434e39(0x182),el[_0x434e39(0x15e)]()[_0x434e39(0x12c)](_0x5b0b7e),_0x49fdc3[_0x434e39(0x1b4)](scrollToBottom),document[_0x434e39(0x183)](_0x49fdc3[_0x434e39(0x121)]);},removeLoadingMessage=()=>{const _0x4d86c7=_0x5467b7,_0x40e0f8={'YGuan':_0x4d86c7(0x19d)},_0x43be12=document[_0x4d86c7(0x183)](_0x40e0f8[_0x4d86c7(0x144)]);if(_0x43be12)_0x43be12[_0x4d86c7(0x190)]();},typeOut=async(_0x3828cd,_0x42eed6,_0x611f1b)=>{const _0x19cfa7=_0x5467b7,_0x47d2fe={'DXXYz':function(_0x4e993c,_0x3aea84){return _0x4e993c<_0x3aea84;},'qNsBU':_0x19cfa7(0x110),'zwjPI':_0x19cfa7(0x189),'dunXr':_0x19cfa7(0x160),'jxJvJ':_0x19cfa7(0x155),'tsuIt':_0x19cfa7(0x18a),'gXVMF':function(_0x5ab81a,_0x3a9294){return _0x5ab81a<_0x3a9294;},'MKosO':function(_0x21b562,_0x59e24b,_0x12c4aa,_0x57701c){return _0x21b562(_0x59e24b,_0x12c4aa,_0x57701c);},'SDKOm':function(_0x1a9610,_0x5eacf8){return _0x1a9610+_0x5eacf8;},'NQQGu':function(_0x6a4d99,_0x10b217){return _0x6a4d99/_0x10b217;},'jbeLa':_0x19cfa7(0x1c2),'fHptk':_0x19cfa7(0x118),'hksQN':function(_0x3cac64,_0x58052b){return _0x3cac64<_0x58052b;},'LAsEU':function(_0x5a4014,_0x4cb7df){return _0x5a4014===_0x4cb7df;},'cETFZ':function(_0x53263d,_0x49e24c,_0x1145b4,_0x54fd87){return _0x53263d(_0x49e24c,_0x1145b4,_0x54fd87);},'HljAh':function(_0x69200f,_0x229269){return _0x69200f===_0x229269;},'kEgIW':_0x19cfa7(0xf8),'FfzQJ':function(_0x28a28c,_0x2df965,_0x6ae4f5,_0x1d0f36){return _0x28a28c(_0x2df965,_0x6ae4f5,_0x1d0f36);},'TeFpn':function(_0x3e2210,_0x30ea3b){return _0x3e2210!==_0x30ea3b;},'STciu':function(_0x5d1656,_0x58b08e,_0x2c79ea,_0x4d9da0){return _0x5d1656(_0x58b08e,_0x2c79ea,_0x4d9da0);},'GnZtT':function(_0x528bad,_0x52f7fb,_0x4b713d,_0x425022){return _0x528bad(_0x52f7fb,_0x4b713d,_0x425022);}},_0x5b0b3c=_0x42eed6[_0x19cfa7(0xe0)]('\x0a');let _0x36fcae=-0x26a7+0x2491+-0x3*-0xb2;while(_0x47d2fe[_0x19cfa7(0x18d)](_0x36fcae,_0x5b0b3c[_0x19cfa7(0x152)])){const _0x13d6f5=_0x5b0b3c[_0x36fcae],_0x30c695=_0x13d6f5[_0x19cfa7(0x113)]();if(_0x30c695[_0x19cfa7(0xe8)](_0x47d2fe[_0x19cfa7(0x102)])){const _0x5043d3=_0x30c695[_0x19cfa7(0x197)](-0x3*0x3c1+0x3*0x65d+-0x7d1)[_0x19cfa7(0x113)](),_0x13e8ca=document[_0x19cfa7(0x1a7)](_0x47d2fe[_0x19cfa7(0x143)]);_0x13e8ca[_0x19cfa7(0x136)]=_0x47d2fe[_0x19cfa7(0xd9)];if(_0x5043d3)_0x13e8ca[_0x19cfa7(0xf9)](_0x47d2fe[_0x19cfa7(0x120)],_0x5043d3);const _0x678a9=document[_0x19cfa7(0x1a7)](_0x47d2fe[_0x19cfa7(0x1bc)]);_0x13e8ca[_0x19cfa7(0x12c)](_0x678a9),_0x3828cd[_0x19cfa7(0x12c)](_0x13e8ca),_0x36fcae++;while(_0x47d2fe[_0x19cfa7(0x122)](_0x36fcae,_0x5b0b3c[_0x19cfa7(0x152)])&&!_0x5b0b3c[_0x36fcae][_0x19cfa7(0x113)]()[_0x19cfa7(0xe8)](_0x47d2fe[_0x19cfa7(0x102)])){await _0x47d2fe[_0x19cfa7(0xf4)](typeString,_0x678a9,_0x47d2fe[_0x19cfa7(0xfe)](_0x5b0b3c[_0x36fcae],'\x0a'),_0x47d2fe[_0x19cfa7(0x1c7)](_0x611f1b,0x20*-0xc5+0x9e7+-0x3*-0x4e9)),_0x36fcae++;}_0x36fcae++;continue;}if(_0x30c695[_0x19cfa7(0xe8)]('|')){const _0x3f8f80=document[_0x19cfa7(0x1a7)](_0x47d2fe[_0x19cfa7(0x181)]);_0x3f8f80[_0x19cfa7(0x136)]=_0x47d2fe[_0x19cfa7(0x1ad)],_0x3828cd[_0x19cfa7(0x12c)](_0x3f8f80);while(_0x47d2fe[_0x19cfa7(0xd0)](_0x36fcae,_0x5b0b3c[_0x19cfa7(0x152)])&&_0x5b0b3c[_0x36fcae][_0x19cfa7(0x113)]()[_0x19cfa7(0xe8)]('|')){const _0x17bd07=_0x5b0b3c[_0x36fcae][_0x19cfa7(0x113)]();if(_0x17bd07[_0x19cfa7(0x194)](/^\|[:\s-]+\|/)){_0x36fcae++;continue;}const _0x573c29=document[_0x19cfa7(0x1a7)]('tr'),_0x334478=_0x17bd07[_0x19cfa7(0xe0)]('|')[_0x19cfa7(0x196)](_0x546ca7=>_0x546ca7[_0x19cfa7(0x113)]()||_0x17bd07[_0x19cfa7(0x103)](_0x546ca7)>-0x244a*0x1+-0x157e+0x39c8&&_0x17bd07[_0x19cfa7(0x103)](_0x546ca7)<_0x17bd07[_0x19cfa7(0x152)]-(-0x737*0x4+-0x26b9+0x4396));for(const _0x3ed456 of _0x334478){const _0x1b84e7=_0x47d2fe[_0x19cfa7(0x1b9)](_0x3f8f80[_0x19cfa7(0x12f)][_0x19cfa7(0x152)],-0x115a+-0x13*0x13f+0x2907),_0x5a14ac=document[_0x19cfa7(0x1a7)](_0x1b84e7?'th':'td');_0x573c29[_0x19cfa7(0x12c)](_0x5a14ac),await _0x47d2fe[_0x19cfa7(0xfb)](typeLine,_0x5a14ac,_0x3ed456[_0x19cfa7(0x113)](),_0x611f1b);}_0x3f8f80[_0x19cfa7(0x12c)](_0x573c29),_0x36fcae++;}continue;}if(_0x47d2fe[_0x19cfa7(0x141)](_0x30c695,_0x47d2fe[_0x19cfa7(0x173)])){_0x3828cd[_0x19cfa7(0x12c)](document[_0x19cfa7(0x1a7)]('hr')),_0x36fcae++;continue;}const _0x35c7f2=_0x13d6f5[_0x19cfa7(0x194)](/^(#{1,6})\s+(.*)$/);if(_0x35c7f2){const _0x4e56b0=_0x35c7f2[0xed2+0x1cb7+-0x1*0x2b88][_0x19cfa7(0x152)],_0x11544b=document[_0x19cfa7(0x1a7)]('h'+_0x4e56b0);_0x3828cd[_0x19cfa7(0x12c)](_0x11544b),await _0x47d2fe[_0x19cfa7(0x15a)](typeLine,_0x11544b,_0x35c7f2[-0x21b+0x38b*-0xb+0x6*0x6d9],_0x611f1b),_0x36fcae++;continue;}const _0x5fa7db=_0x13d6f5[_0x19cfa7(0x194)](/^[\s]*[-*+]\s+(.*)$/);if(_0x5fa7db){const _0x4f4a23=document[_0x19cfa7(0x1a7)]('li');let _0x59fa7b=_0x3828cd[_0x19cfa7(0xea)];(!_0x59fa7b||_0x47d2fe[_0x19cfa7(0x101)](_0x59fa7b[_0x19cfa7(0x1aa)],'UL'))&&(_0x59fa7b=document[_0x19cfa7(0x1a7)]('ul'),_0x3828cd[_0x19cfa7(0x12c)](_0x59fa7b));_0x59fa7b[_0x19cfa7(0x12c)](_0x4f4a23),await _0x47d2fe[_0x19cfa7(0xdf)](typeLine,_0x4f4a23,_0x5fa7db[-0xb69+-0x23d3+-0x1*-0x2f3d],_0x611f1b),_0x36fcae++;continue;}if(_0x30c695){const _0x160987=document[_0x19cfa7(0x1a7)]('p');_0x3828cd[_0x19cfa7(0x12c)](_0x160987),await _0x47d2fe[_0x19cfa7(0x142)](typeLine,_0x160987,_0x13d6f5,_0x611f1b);}else _0x3828cd[_0x19cfa7(0x12c)](document[_0x19cfa7(0x1a7)]('br'));_0x36fcae++;}},typeLine=async(_0x28f58c,_0x2d87fe,_0x525dac)=>{const _0xc9301a=_0x5467b7,_0x517a63={'iAQAo':function(_0x2690c9,_0x53c4e3){return _0x2690c9!==_0x53c4e3;},'hRghu':function(_0xe81ebd,_0x255c09){return _0xe81ebd>_0x255c09;},'wpVoR':function(_0x1204f7,_0x4e245c,_0x571ee7,_0x168d29){return _0x1204f7(_0x4e245c,_0x571ee7,_0x168d29);},'TvNFR':_0xc9301a(0x1ba),'NXBsd':_0xc9301a(0x1c9),'oULgo':_0xc9301a(0x1c5),'VUFjO':_0xc9301a(0x18a),'lGVnH':_0xc9301a(0x166),'liPPz':function(_0x1c9471,_0x441e12,_0x57ed2f,_0x66c723){return _0x1c9471(_0x441e12,_0x57ed2f,_0x66c723);},'ZDyVX':function(_0x9dc9ee,_0x51c12d){return _0x9dc9ee<_0x51c12d;}},_0x4c71a8=/\[([^\]]+)\]\(([^)]+)\)|\*\*([^*]+)\*\*|\*([^*]+)\*|`([^`]+)`/g;let _0x516dea=0xe9*0x25+0xf03+-0x30b0,_0x392969;while(_0x517a63[_0xc9301a(0x16f)](_0x392969=_0x4c71a8[_0xc9301a(0x1bf)](_0x2d87fe),null)){_0x517a63[_0xc9301a(0x19f)](_0x392969[_0xc9301a(0xd1)],_0x516dea)&&await _0x517a63[_0xc9301a(0x165)](typeString,_0x28f58c,_0x2d87fe[_0xc9301a(0x145)](_0x516dea,_0x392969[_0xc9301a(0xd1)]),_0x525dac);if(_0x392969[-0x127*0x1a+0x222c+0x167*-0x3]&&_0x392969[-0x1e3e+0x37*-0x67+0xfd*0x35]){const _0xa873ce=document[_0xc9301a(0x1a7)]('a');_0xa873ce[_0xc9301a(0xee)]=_0x392969[0x1f9d+-0x181d*-0x1+-0x2*0x1bdc],_0xa873ce[_0xc9301a(0x1be)]=_0x517a63[_0xc9301a(0x149)],_0xa873ce[_0xc9301a(0x136)]=_0x517a63[_0xc9301a(0x117)],_0x28f58c[_0xc9301a(0x12c)](_0xa873ce),await _0x517a63[_0xc9301a(0x165)](typeString,_0xa873ce,_0x392969[0x1*-0x2272+-0x20b*-0x7+-0x2*-0xa13],_0x525dac);}else{if(_0x392969[0x1*-0x10d2+-0x11cc+0x22a1]){const _0x22c00f=document[_0xc9301a(0x1a7)](_0x517a63[_0xc9301a(0x105)]);_0x28f58c[_0xc9301a(0x12c)](_0x22c00f),await _0x517a63[_0xc9301a(0x165)](typeString,_0x22c00f,_0x392969[0x107f+0xb5*0x5+-0x29*0x7d],_0x525dac);}else{if(_0x392969[-0x10aa+0x166a*-0x1+0x2718]){const _0x131b12=document[_0xc9301a(0x1a7)]('em');_0x28f58c[_0xc9301a(0x12c)](_0x131b12),await _0x517a63[_0xc9301a(0x165)](typeString,_0x131b12,_0x392969[-0x574*-0x3+-0xed5*0x1+-0x183],_0x525dac);}else{if(_0x392969[0x1f2d+0x1*0x320+-0x892*0x4]){const _0x532a42=document[_0xc9301a(0x1a7)](_0x517a63[_0xc9301a(0x1a3)]);_0x532a42[_0xc9301a(0x136)]=_0x517a63[_0xc9301a(0x13f)],_0x28f58c[_0xc9301a(0x12c)](_0x532a42),await _0x517a63[_0xc9301a(0x17e)](typeString,_0x532a42,_0x392969[0x20e6+0x1a27+0x1*-0x3b08],_0x525dac);}}}}_0x516dea=_0x4c71a8[_0xc9301a(0xd6)];}_0x517a63[_0xc9301a(0xd3)](_0x516dea,_0x2d87fe[_0xc9301a(0x152)])&&await _0x517a63[_0xc9301a(0x17e)](typeString,_0x28f58c,_0x2d87fe[_0xc9301a(0x145)](_0x516dea),_0x525dac);},typeString=(_0x52a89b,_0x5597a2,_0x447c80)=>new Promise(_0x30bc86=>{const _0x121ab4=_0x5467b7,_0x376885={'hEKgB':function(_0x37a1c4){return _0x37a1c4();},'vFQBf':function(_0x4a8522,_0x99f46e){return _0x4a8522>=_0x99f46e;},'RCazR':function(_0x34dc84,_0x36c1fb){return _0x34dc84(_0x36c1fb);},'eqwts':function(_0x25cf23){return _0x25cf23();},'KXqKE':function(_0x3f1d7b,_0xfc0ee5,_0x16083e){return _0x3f1d7b(_0xfc0ee5,_0x16083e);}};if(!_0x5597a2)return _0x376885[_0x121ab4(0x1b7)](_0x30bc86);let _0x2885cc=-0x14fb+0x1a*-0x63+0x1f09*0x1;const _0xbe9c83=document[_0x121ab4(0xf6)]('');_0x52a89b[_0x121ab4(0x12c)](_0xbe9c83);const _0x3c43cc=_0x376885[_0x121ab4(0x14d)](setInterval,()=>{const _0x105783=_0x121ab4;_0xbe9c83[_0x105783(0x1c3)]+=_0x5597a2[_0x105783(0x10b)](_0x2885cc),_0x2885cc++,_0x376885[_0x105783(0x13e)](scrollToBottom),_0x376885[_0x105783(0x137)](_0x2885cc,_0x5597a2[_0x105783(0x152)])&&(_0x376885[_0x105783(0x18b)](clearInterval,_0x3c43cc),_0x376885[_0x105783(0x1b7)](_0x30bc86));},_0x447c80);}),appendAiChatMessage=_0x354998=>{const _0x53cec0=_0x5467b7,_0x35aecd={'NRKtb':function(_0x4e3bd1,_0x4679bb,_0x3c823e,_0x381050){return _0x4e3bd1(_0x4679bb,_0x3c823e,_0x381050);},'VIsjY':_0x53cec0(0x116),'WGxhB':_0x53cec0(0x13b),'GwrPk':function(_0x39670b){return _0x39670b();},'oNUxv':_0x53cec0(0x1ca)},_0x2275ab=document[_0x53cec0(0x1a7)](_0x35aecd[_0x53cec0(0x13d)]);_0x2275ab[_0x53cec0(0x136)]=_0x35aecd[_0x53cec0(0x10a)],_0x2275ab[_0x53cec0(0x17a)]=_0x53cec0(0xdb),el[_0x53cec0(0x15e)]()[_0x53cec0(0x12c)](_0x2275ab),_0x35aecd[_0x53cec0(0x17b)](scrollToBottom);const _0x50b618=_0x2275ab[_0x53cec0(0x14e)](_0x35aecd[_0x53cec0(0xeb)]);return((async()=>{const _0x494f02=_0x53cec0;await _0x35aecd[_0x494f02(0x132)](typeOut,_0x50b618,_0x354998,-0x5*-0x3d4+0x1d34+-0x3050);})()),_0x2275ab;},appendAiMessage=_0x4aec61=>{const _0x34bfae=_0x5467b7,_0x4d2475={'HEaka':function(_0x470a78,_0x16d280,_0x1f1c6e,_0xad4c53){return _0x470a78(_0x16d280,_0x1f1c6e,_0xad4c53);},'vTXcu':function(_0x409343,_0x236997){return _0x409343>_0x236997;},'elHpX':_0x34bfae(0x19a),'VGvmD':function(_0x1b1a9c,_0x1eb90e,_0x491aef,_0x278271){return _0x1b1a9c(_0x1eb90e,_0x491aef,_0x278271);},'dlawC':_0x34bfae(0x116),'vBXPs':_0x34bfae(0x13b),'cMHIO':function(_0x1e0832){return _0x1e0832();},'Qlsdg':_0x34bfae(0x12d),'HsGgo':_0x34bfae(0x168),'AynoA':_0x34bfae(0xd4)},{cause:_0x4acc18,explanation:_0x43fce8,fix:_0x523195,severity:_0x42e8fe,affectedMod:_0x85fdca}=_0x4aec61,_0x165b3c=document[_0x34bfae(0x1a7)](_0x4d2475[_0x34bfae(0x16e)]);_0x165b3c[_0x34bfae(0x136)]=_0x4d2475[_0x34bfae(0x129)],_0x165b3c[_0x34bfae(0x17a)]=_0x34bfae(0x133)+_0x42e8fe+'\x22>'+_0x42e8fe+_0x34bfae(0x15f)+_0x85fdca+_0x34bfae(0x163),el[_0x34bfae(0x15e)]()[_0x34bfae(0x12c)](_0x165b3c),_0x4d2475[_0x34bfae(0x1b2)](scrollToBottom);const _0x5d2470=_0x165b3c[_0x34bfae(0x14e)]('h3'),_0x597ea9=_0x165b3c[_0x34bfae(0x14e)](_0x4d2475[_0x34bfae(0x15c)]),_0x1d3932=_0x165b3c[_0x34bfae(0x14e)](_0x4d2475[_0x34bfae(0x1c6)]),_0x5d6982=_0x165b3c[_0x34bfae(0x14e)]('ol'),_0x56c805=_0x165b3c[_0x34bfae(0x14e)](_0x4d2475[_0x34bfae(0x192)]);return((async()=>{const _0x1494aa=_0x34bfae;_0x56c805[_0x1494aa(0x123)][_0x1494aa(0x131)]=-0x2591+0x1bba+0x9d8,await _0x4d2475[_0x1494aa(0x148)](typeOut,_0x5d2470,_0x4acc18,0x183f+0xa65+0x27*-0xe3),await _0x4d2475[_0x1494aa(0x148)](typeOut,_0x597ea9,_0x43fce8,0x63+0xb5*0x29+-0x1d5b);if(_0x523195&&_0x4d2475[_0x1494aa(0x106)](_0x523195[_0x1494aa(0x152)],-0xf77+0x1953*0x1+0x1*-0x9dc)){_0x1d3932[_0x1494aa(0x123)][_0x1494aa(0x107)]=_0x4d2475[_0x1494aa(0x198)];for(const _0x2e5e3a of _0x523195){const _0x1bcebf=document[_0x1494aa(0x1a7)]('li');_0x5d6982[_0x1494aa(0x12c)](_0x1bcebf),await _0x4d2475[_0x1494aa(0xfa)](typeOut,_0x1bcebf,_0x2e5e3a,-0x1*0x1bc+0x1fa1+-0x1ddd);}}})()),_0x165b3c;},addHistoryItem=(_0x3564ad,_0x3703b8)=>{const _0x2c97f7=_0x5467b7,_0x19babd={'MOjxP':_0x2c97f7(0xd7),'LZdcv':_0x2c97f7(0x151),'Ypllt':function(_0x3d1913){return _0x3d1913();},'uSLhg':function(_0x46c04b,_0x365bf4){return _0x46c04b===_0x365bf4;},'SPwug':_0x2c97f7(0x19c),'gNOed':function(_0x3ac86a){return _0x3ac86a();},'sIuFx':function(_0x425f1a,_0x57ffcb){return _0x425f1a!==_0x57ffcb;},'unNjw':_0x2c97f7(0x12a),'lDZsx':_0x2c97f7(0x191),'CPrRH':_0x2c97f7(0x147),'UApEe':function(_0x5bf19e){return _0x5bf19e();},'NfGIf':_0x2c97f7(0x1b5),'PfNkX':_0x2c97f7(0x11a),'Ebczz':_0x2c97f7(0x170),'kzghk':_0x2c97f7(0x174),'mtTwc':_0x2c97f7(0x180),'iERCu':_0x2c97f7(0xe9),'vBDED':_0x2c97f7(0x187),'tNTMZ':_0x2c97f7(0x154),'FKpkm':_0x2c97f7(0xe1),'SnlgV':_0x2c97f7(0x10f),'RvmXQ':_0x2c97f7(0xe6),'pNTCW':_0x2c97f7(0x17f),'FXDOD':_0x2c97f7(0x176),'TCHwl':_0x2c97f7(0x11c),'hjdxs':_0x2c97f7(0x1a5),'WQLFu':_0x2c97f7(0x162),'Ttcpj':_0x2c97f7(0x1b3),'rksJp':function(_0xb37aed){return _0xb37aed();}},_0x50f564=document[_0x2c97f7(0x1a7)]('a');_0x50f564[_0x2c97f7(0x136)]=_0x19babd[_0x2c97f7(0x171)],_0x50f564[_0x2c97f7(0x17a)]=_0x2c97f7(0x1ae)+(_0x3564ad[_0x2c97f7(0x10d)]||_0x19babd[_0x2c97f7(0x1c0)])+_0x2c97f7(0x115);const _0x3bda65=()=>{const _0x1a7207=_0x2c97f7;document[_0x1a7207(0x175)](_0x19babd[_0x1a7207(0x18e)])[_0x1a7207(0x19b)](_0x155efa=>_0x155efa[_0x1a7207(0x1c4)][_0x1a7207(0x190)](_0x1a7207(0x151))),_0x50f564[_0x1a7207(0x1c4)][_0x1a7207(0x178)](_0x19babd[_0x1a7207(0x158)]);},_0x42438a=_0x1df39f=>{const _0x1eae7a=_0x2c97f7;_0x1df39f[_0x1eae7a(0x153)](),_0x19babd[_0x1eae7a(0x1a8)](_0x3bda65);if(_0x19babd[_0x1eae7a(0x128)](typeof _0x3703b8,_0x19babd[_0x1eae7a(0x1bd)]))_0x19babd[_0x1eae7a(0x1a9)](_0x3703b8);};_0x50f564[_0x2c97f7(0x16c)](_0x19babd[_0x2c97f7(0x1a4)],_0x42438a);const _0x131535=_0x50f564[_0x2c97f7(0x14e)](_0x19babd[_0x2c97f7(0x159)]),_0x2834e7=_0x50f564[_0x2c97f7(0x14e)](_0x19babd[_0x2c97f7(0x156)]),_0x201f27=_0x50f564[_0x2c97f7(0x14e)](_0x19babd[_0x2c97f7(0x1c8)]),_0x4ee416=_0x50f564[_0x2c97f7(0x14e)](_0x19babd[_0x2c97f7(0x193)]),_0x34ee64=_0x50f564[_0x2c97f7(0x14e)](_0x19babd[_0x2c97f7(0x11f)]);_0x131535[_0x2c97f7(0x16c)](_0x19babd[_0x2c97f7(0x1a4)],_0x54620b=>{const _0x1e4dac=_0x2c97f7,_0x2ee03b={'KykXO':function(_0x532f83,_0x2fd966){const _0x160564=_0x3194;return _0x19babd[_0x160564(0x11d)](_0x532f83,_0x2fd966);},'kBSEm':_0x19babd[_0x1e4dac(0x1a0)]};_0x54620b[_0x1e4dac(0x153)](),_0x54620b[_0x1e4dac(0xe5)](),document[_0x1e4dac(0x175)](_0x19babd[_0x1e4dac(0xf3)])[_0x1e4dac(0x19b)](_0x1c67bd=>{const _0x58360a=_0x1e4dac;if(_0x2ee03b[_0x58360a(0x1b6)](_0x1c67bd,_0x2834e7))_0x1c67bd[_0x58360a(0x1c4)][_0x58360a(0x190)](_0x2ee03b[_0x58360a(0x119)]);}),_0x2834e7[_0x1e4dac(0x1c4)][_0x1e4dac(0x13c)](_0x19babd[_0x1e4dac(0x1a0)]);}),_0x201f27[_0x2c97f7(0x16c)](_0x19babd[_0x2c97f7(0x1a4)],_0x4fcb2f=>{const _0x2dee25=_0x2c97f7,_0x6aa5ec={'yFNpl':function(_0x12df68,_0x312089){const _0xa738b6=_0x3194;return _0x19babd[_0xa738b6(0x128)](_0x12df68,_0x312089);},'rszAB':_0x19babd[_0x2dee25(0xf2)],'HvKJo':function(_0x11cb8b){const _0x2b6b28=_0x2dee25;return _0x19babd[_0x2b6b28(0xd8)](_0x11cb8b);},'kfRMF':_0x19babd[_0x2dee25(0xfd)]};_0x4fcb2f[_0x2dee25(0x153)](),_0x4fcb2f[_0x2dee25(0xe5)](),_0x2834e7[_0x2dee25(0x1c4)][_0x2dee25(0x190)](_0x19babd[_0x2dee25(0x1a0)]);const _0xb8a359=_0x34ee64[_0x2dee25(0x1c3)],_0x25e31d=document[_0x2dee25(0x1a7)](_0x19babd[_0x2dee25(0x130)]);_0x25e31d[_0x2dee25(0x100)]=_0x19babd[_0x2dee25(0xe7)],_0x25e31d[_0x2dee25(0x136)]=_0x19babd[_0x2dee25(0x13a)],_0x25e31d[_0x2dee25(0xda)]=_0xb8a359,_0x50f564[_0x2dee25(0x19e)](_0x25e31d,_0x34ee64),_0x34ee64[_0x2dee25(0x123)][_0x2dee25(0x107)]=_0x19babd[_0x2dee25(0x199)],_0x25e31d[_0x2dee25(0x114)](),_0x25e31d[_0x2dee25(0x16c)](_0x19babd[_0x2dee25(0x1a4)],_0x22279d=>_0x22279d[_0x2dee25(0xe5)]());const _0x429df2=()=>{const _0x231aba=_0x2dee25,_0x4a7109=_0x25e31d[_0x231aba(0xda)][_0x231aba(0x113)]();_0x4a7109&&(_0x34ee64[_0x231aba(0x1c3)]=_0x4a7109),_0x34ee64[_0x231aba(0x123)][_0x231aba(0x107)]='',_0x25e31d[_0x231aba(0x190)]();};_0x25e31d[_0x2dee25(0x16c)](_0x19babd[_0x2dee25(0x18c)],_0x429df2),_0x25e31d[_0x2dee25(0x16c)](_0x19babd[_0x2dee25(0x1b1)],_0x41ecae=>{const _0x2afa48=_0x2dee25;if(_0x6aa5ec[_0x2afa48(0x18f)](_0x41ecae[_0x2afa48(0x12b)],_0x6aa5ec[_0x2afa48(0x1a6)]))_0x6aa5ec[_0x2afa48(0x112)](_0x429df2);_0x6aa5ec[_0x2afa48(0x18f)](_0x41ecae[_0x2afa48(0x12b)],_0x6aa5ec[_0x2afa48(0x186)])&&(_0x25e31d[_0x2afa48(0xda)]=_0xb8a359,_0x6aa5ec[_0x2afa48(0x112)](_0x429df2)),_0x41ecae[_0x2afa48(0xe5)]();});}),_0x4ee416[_0x2c97f7(0x16c)](_0x19babd[_0x2c97f7(0x1a4)],_0x4f02ca=>{const _0x377f71=_0x2c97f7;_0x4f02ca[_0x377f71(0x153)](),_0x4f02ca[_0x377f71(0xe5)](),_0x50f564[_0x377f71(0x190)]();if(_0x50f564[_0x377f71(0x1c4)][_0x377f71(0x157)](_0x19babd[_0x377f71(0x158)])){const _0x473497=document[_0x377f71(0x175)](_0x19babd[_0x377f71(0x1bb)]);_0x473497[_0x377f71(0x19b)](_0xcfbd97=>_0xcfbd97[_0x377f71(0x190)]());const _0x44ea55=el[_0x377f71(0x134)]();if(_0x44ea55)_0x44ea55[_0x377f71(0x123)][_0x377f71(0x107)]=_0x19babd[_0x377f71(0x125)];}}),document[_0x2c97f7(0x16c)](_0x19babd[_0x2c97f7(0x1a4)],_0x408490=>{const _0xac32c8=_0x2c97f7;!_0x50f564[_0xac32c8(0x157)](_0x408490[_0xac32c8(0x1be)])&&_0x2834e7[_0xac32c8(0x1c4)][_0xac32c8(0x190)](_0x19babd[_0xac32c8(0x1a0)]);});const _0x142868=el[_0x2c97f7(0xed)]();_0x142868[_0x2c97f7(0xff)]?_0x142868[_0x2c97f7(0x19e)](_0x50f564,_0x142868[_0x2c97f7(0xff)]):_0x142868[_0x2c97f7(0x12c)](_0x50f564),_0x19babd[_0x2c97f7(0x15d)](_0x3bda65);},scrollToBottom=()=>{const _0x955028=_0x5467b7,_0x2e6e95={'ROBNY':_0x955028(0x1c1)},_0x927a1b=document[_0x955028(0x183)](_0x2e6e95[_0x955028(0xd2)]);_0x927a1b[_0x955028(0x177)]=_0x927a1b[_0x955028(0x1a1)];},scrollToElement=_0x4c5884=>{const _0x5d0984=_0x5467b7,_0x1a4c23={'MDtUU':_0x5d0984(0xdd),'MTkaB':_0x5d0984(0x14b)};_0x4c5884&&_0x4c5884[_0x5d0984(0x195)]({'behavior':_0x1a4c23[_0x5d0984(0xec)],'block':_0x1a4c23[_0x5d0984(0x179)]});};function _0x3194(_0x164d4b,_0x4b0447){_0x164d4b=_0x164d4b-(0x127e+-0xadf*0x1+0xf9*-0x7);const _0x1a6c4b=_0x2e7f();let _0x490443=_0x1a6c4b[_0x164d4b];return _0x490443;}let toastTimer=null;const showError=_0xb5cb3e=>{const _0xbdcf6d=_0x5467b7,_0x30e32e={'SEYcS':_0xbdcf6d(0x140),'hfzoO':function(_0x4a555d,_0x473cdc){return _0x4a555d(_0x473cdc);},'yFAxA':function(_0x408bc7,_0x353295,_0x262dbe){return _0x408bc7(_0x353295,_0x262dbe);}},_0x274a57=el[_0xbdcf6d(0x161)]();_0x274a57[_0xbdcf6d(0x1c3)]=_0xb5cb3e,_0x274a57[_0xbdcf6d(0x1c4)][_0xbdcf6d(0x178)](_0x30e32e[_0xbdcf6d(0x1a2)]);if(toastTimer)_0x30e32e[_0xbdcf6d(0x150)](clearTimeout,toastTimer);toastTimer=_0x30e32e[_0xbdcf6d(0x185)](setTimeout,()=>_0x274a57[_0xbdcf6d(0x1c4)][_0xbdcf6d(0x190)](_0xbdcf6d(0x140)),0x659+0x41*0x1e+0x19*0x39);},updateLoadingText=_0xb34a5c=>{const _0x190ef3=_0x5467b7,_0x47e659={'tIsqi':_0x190ef3(0x109)},_0x14a777=document[_0x190ef3(0x14e)](_0x47e659[_0x190ef3(0x104)]);if(_0x14a777)_0x14a777[_0x190ef3(0x1c3)]=_0xb34a5c;};function _0x2e7f(){const _0x5b82f4=['kBzcN','kzghk','message-row\x20ai-row','toggle','VIsjY','hEKgB','lGVnH','visible','HljAh','GnZtT','zwjPI','YGuan','substring','auto','Enter','HEaka','TvNFR','\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22message-inner\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22message-content\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22user-message-bubble\x22>','start','welcome-screen','KXqKE','querySelector','queueBar','hfzoO','active','length','preventDefault','keydown','data-lang','TCHwl','contains','LZdcv','FXDOD','FfzQJ','height','Qlsdg','rksJp','messagesArea','\x20severity</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22mod-pill\x22>','ai-code-block','errorToast','.delete-btn','</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h3></h3>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p></p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22fix-container\x22\x20style=\x22display:\x20none;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p><strong>Fix:</strong></p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<ol></ol>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20','error-toast','wpVoR','ai-code','PTQAF','.fix-container','NkBjA','333KyklQj','ylKyK','addEventListener','Ehaoo','dlawC','iAQAo','text','RvmXQ','queue-bar','kEgIW','history-edit-input','querySelectorAll','.history-item-btn-dots','scrollTop','add','MTkaB','innerHTML','GwrPk','gAliM','UkTWs','liPPz','Unknown\x20Crash','none','jbeLa','\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22message-inner\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22message-avatar\x20ai\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20width=\x2220\x22\x20height=\x2220\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M21\x2016V8a2\x202\x200\x200\x200-1-1.73l-7-4a2\x202\x200\x200\x200-2\x200l-7\x204A2\x202\x200\x200\x200\x203\x208v8a2\x202\x200\x200\x200\x201\x201.73l7\x204a2\x202\x200\x200\x200\x202\x200l7-4A2\x202\x200\x200\x200\x2021\x2016z\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22message-content\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22loading-canvas-container\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<canvas\x20id=\x223d-loader-canvas\x22></canvas>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22loading-text-glow\x22>Decoding\x20crash\x20logs...</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20','getElementById','ZyMoJ','yFAxA','kfRMF','blur','messages-area','pre','code','RCazR','vBDED','DXXYz','MOjxP','yFNpl','remove','.history-item-menu.open','AynoA','WQLFu','match','scrollIntoView','filter','slice','elHpX','mtTwc','block','forEach','function','loading-message','insertBefore','hRghu','unNjw','scrollHeight','SEYcS','VUFjO','iERCu','.edit-btn','rszAB','createElement','Ypllt','gNOed','tagName','disabled','YUBMk','fHptk','\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22history-item-text\x22>','uzkRd','FEESI','tNTMZ','cMHIO','.history-item-text','plMZA','Escape','KykXO','eqwts','queue-bar-text','LAsEU','_blank','FKpkm','tsuIt','SPwug','target','exec','pNTCW','chat-container','table','textContent','classList','strong','HsGgo','NQQGu','hjdxs','ai-link','.ai-chat-content','hksQN','index','ROBNY','ZDyVX','.pill-container','1956272vvoBnJ','lastIndex','.history-item','UApEe','dunXr','value','\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22message-inner\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22message-avatar\x20ai\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20width=\x2220\x22\x20height=\x2220\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M21\x2016V8a2\x202\x200\x200\x200-1-1.73l-7-4a2\x202\x200\x200\x200-2\x200l-7\x204A2\x202\x200\x200\x200\x203\x208v8a2\x202\x200\x200\x200\x201\x201.73l7\x204a2\x202\x200\x200\x200\x202\x200l7-4A2\x202\x200\x200\x200\x2021\x2016z\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22message-content\x20ai-chat-content\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20','474742PvgAlj','smooth','gRLhf','STciu','split','.message-row','7ujtUlH','44589ZaiIOK','min','stopPropagation','history-item','Ebczz','startsWith','click','lastElementChild','oNUxv','MDtUU','historyList','href','1096985ErBegP','</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22message-avatar\x20user\x22>U</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20','yhkEL','CPrRH','lDZsx','MKosO','message-row\x20user-row','createTextNode','crash-log-input','---','setAttribute','VGvmD','cETFZ','UJiXU','NfGIf','SDKOm','firstChild','type','TeFpn','qNsBU','indexOf','tIsqi','oULgo','vTXcu','display','analyzeButton','.loading-text-glow','WGxhB','charAt','NfIrc','affectedMod','crashLogInput','flex','```','queueBarText','HvKJo','trim','focus','</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22history-item-actions\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22history-item-btn-dots\x22\x20title=\x22Options\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20width=\x2214\x22\x20height=\x2214\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20cx=\x2212\x22\x20cy=\x2212\x22\x20r=\x221\x22></circle>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20cx=\x2212\x22\x20cy=\x225\x22\x20r=\x221\x22></circle>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20cx=\x2212\x22\x20cy=\x2219\x22\x20r=\x221\x22></circle>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22history-item-menu\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22history-menu-item\x20edit-btn\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20width=\x2212\x22\x20height=\x2212\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22><path\x20d=\x22M11\x204H4a2\x202\x200\x200\x200-2\x202v14a2\x202\x200\x200\x200\x202\x202h14a2\x202\x200\x200\x200\x202-2v-7\x22></path><path\x20d=\x22M18.5\x202.5a2.121\x202.121\x200\x200\x201\x203\x203L12\x2015l-4\x201\x201-4\x209.5-9.5z\x22></path></svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Edit\x20Name\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22history-menu-item\x20delete-btn\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20width=\x2212\x22\x20height=\x2212\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22><polyline\x20points=\x223\x206\x205\x206\x2021\x206\x22></polyline><path\x20d=\x22M19\x206v14a2\x202\x200\x200\x201-2\x202H7a2\x202\x200\x200\x201-2-2V6m3\x200V4a2\x202\x200\x200\x201\x202-2h4a2\x202\x200\x200\x201\x202\x202v2\x22></path><line\x20x1=\x2210\x22\x20y1=\x2211\x22\x20x2=\x2210\x22\x20y2=\x2217\x22></line><line\x20x1=\x2214\x22\x20y1=\x2211\x22\x20x2=\x2214\x22\x20y2=\x2217\x22></line></svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20','div','NXBsd','ai-table','kBSEm','input','49430sjiAqS','.history-item-menu','sIuFx','lhnGG','Ttcpj','jxJvJ','TMrUm','gXVMF','style','1045692DrBWVw','SnlgV','1779984bXEolg','history-list','uSLhg','vBXPs','open','key','appendChild','.ai-message-content\x20>\x20p','3zgmHLQ','children','PfNkX','opacity','NRKtb','\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22message-inner\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22message-avatar\x20ai\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20width=\x2220\x22\x20height=\x2220\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M21\x2016V8a2\x202\x200\x200\x200-1-1.73l-7-4a2\x202\x200\x200\x200-2\x200l-7\x204A2\x202\x200\x200\x200\x203\x208v8a2\x202\x200\x200\x200\x201\x201.73l7\x204a2\x202\x200\x200\x200\x202\x200l7-4A2\x202\x200\x200\x200\x2021\x2016z\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22message-content\x20ai-message-content\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22pill-container\x22\x20style=\x22opacity:\x200;\x20transition:\x20opacity\x200.4s\x20ease-in;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22severity-pill\x20','welcomeScreen','btn-analyze','className','vFQBf','3d-loader-canvas'];_0x2e7f=function(){return _0x5b82f4;};return _0x2e7f();}export{el,initAutoResize,getCrashLogValue,clearCrashLogInput,setAnalyzeButtonLoading,showQueueBar,hideQueueBar,hideWelcomeScreen,appendUserMessage,appendLoadingMessage,removeLoadingMessage,appendAiMessage,appendAiChatMessage,addHistoryItem,scrollToElement,showError,updateLoadingText};
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const el = {
2
+ crashLogInput: () => document.getElementById("crash-log-input"),
3
+ analyzeButton: () => document.getElementById("btn-analyze"),
4
+ queueBar: () => document.getElementById("queue-bar"),
5
+ queueBarText: () => document.getElementById("queue-bar-text"),
6
+ messagesArea: () => document.getElementById("messages-area"),
7
+ welcomeScreen: () => document.getElementById("welcome-screen"),
8
+ historyList: () => document.getElementById("history-list"),
9
+ errorToast: () => document.getElementById("error-toast"),
10
+ };
11
+
12
+ const initAutoResize = () => {
13
+ const textarea = el.crashLogInput();
14
+ textarea.addEventListener("input", () => {
15
+ textarea.style.height = "auto";
16
+ textarea.style.height = Math.min(textarea.scrollHeight, 240) + "px";
17
+ el.analyzeButton().disabled = textarea.value.trim().length === 0;
18
+ });
19
+ };
20
+
21
+ const getCrashLogValue = () => el.crashLogInput().value.trim();
22
+
23
+ const clearCrashLogInput = () => {
24
+ const textarea = el.crashLogInput();
25
+ textarea.value = "";
26
+ textarea.style.height = "auto";
27
+ el.analyzeButton().disabled = true;
28
+ };
29
+
30
+ const setAnalyzeButtonLoading = (isLoading) => {
31
+ el.analyzeButton().disabled = isLoading;
32
+ };
33
+
34
+ const showQueueBar = (message) => {
35
+ el.queueBar().classList.add("visible");
36
+ el.queueBarText().textContent = message;
37
+ };
38
+
39
+ const hideQueueBar = () => {
40
+ el.queueBar().classList.remove("visible");
41
+ };
42
+
43
+ const hideWelcomeScreen = () => {
44
+ const welcome = el.welcomeScreen();
45
+ if (welcome) welcome.style.display = "none";
46
+ };
47
+
48
+ const appendUserMessage = (text) => {
49
+ hideWelcomeScreen();
50
+
51
+ const row = document.createElement("div");
52
+ row.className = "message-row user-row";
53
+
54
+ row.innerHTML = `
55
+ <div class="message-inner">
56
+ <div class="message-content">
57
+ <div class="user-message-bubble">${text}</div>
58
+ </div>
59
+ <div class="message-avatar user">U</div>
60
+ </div>
61
+ `;
62
+
63
+ el.messagesArea().appendChild(row);
64
+ scrollToBottom();
65
+ };
66
+
67
+ const appendLoadingMessage = () => {
68
+ hideWelcomeScreen();
69
+
70
+ const row = document.createElement("div");
71
+ row.className = "message-row ai-row";
72
+ row.id = "loading-message";
73
+
74
+ row.innerHTML = `
75
+ <div class="message-inner">
76
+ <div class="message-avatar ai">
77
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
78
+ <path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path>
79
+ </svg>
80
+ </div>
81
+ <div class="message-content">
82
+ <div class="loading-canvas-container">
83
+ <canvas id="3d-loader-canvas"></canvas>
84
+ <span class="loading-text-glow">Decoding crash logs...</span>
85
+ </div>
86
+ </div>
87
+ </div>
88
+ `;
89
+
90
+ el.messagesArea().appendChild(row);
91
+ scrollToBottom();
92
+
93
+ return document.getElementById("3d-loader-canvas");
94
+ };
95
+
96
+ const removeLoadingMessage = () => {
97
+ const loader = document.getElementById("loading-message");
98
+ if (loader) loader.remove();
99
+ };
100
+
101
+ const typeOut = async (container, text, speed) => {
102
+ const lines = text.split('\n');
103
+ let i = 0;
104
+
105
+ while (i < lines.length) {
106
+ const line = lines[i];
107
+ const trimmed = line.trim();
108
+
109
+ // 1. Handle Code Blocks (```lang)
110
+ if (trimmed.startsWith('```')) {
111
+ const lang = trimmed.slice(3).trim();
112
+ const pre = document.createElement('pre');
113
+ pre.className = 'ai-code-block';
114
+ if (lang) pre.setAttribute('data-lang', lang);
115
+ const code = document.createElement('code');
116
+ pre.appendChild(code);
117
+ container.appendChild(pre);
118
+
119
+ i++; // skip opening line
120
+ while (i < lines.length && !lines[i].trim().startsWith('```')) {
121
+ await typeString(code, lines[i] + '\n', speed / 2);
122
+ i++;
123
+ }
124
+ i++; // skip closing line
125
+ continue;
126
+ }
127
+
128
+ // 2. Handle Tables (| col |)
129
+ if (trimmed.startsWith('|')) {
130
+ const table = document.createElement('table');
131
+ table.className = 'ai-table';
132
+ container.appendChild(table);
133
+
134
+ while (i < lines.length && lines[i].trim().startsWith('|')) {
135
+ const rowText = lines[i].trim();
136
+ // Skip separator rows like |---|
137
+ if (rowText.match(/^\|[:\s-]+\|/)) {
138
+ i++;
139
+ continue;
140
+ }
141
+
142
+ const tr = document.createElement('tr');
143
+ const cells = rowText.split('|').filter(c => c.trim() || rowText.indexOf(c) > 0 && rowText.indexOf(c) < rowText.length - 1);
144
+
145
+ for (const cellText of cells) {
146
+ const isHeader = table.children.length === 0;
147
+ const td = document.createElement(isHeader ? 'th' : 'td');
148
+ tr.appendChild(td);
149
+ await typeLine(td, cellText.trim(), speed);
150
+ }
151
+ table.appendChild(tr);
152
+ i++;
153
+ }
154
+ continue;
155
+ }
156
+
157
+ // 3. Handle Horizontal Rules
158
+ if (trimmed === '---') {
159
+ container.appendChild(document.createElement('hr'));
160
+ i++;
161
+ continue;
162
+ }
163
+
164
+ // 4. Handle Headers
165
+ const headerMatch = line.match(/^(#{1,6})\s+(.*)$/);
166
+ if (headerMatch) {
167
+ const level = headerMatch[1].length;
168
+ const h = document.createElement(`h${level}`);
169
+ container.appendChild(h);
170
+ await typeLine(h, headerMatch[2], speed);
171
+ i++;
172
+ continue;
173
+ }
174
+
175
+ // 5. Handle Lists
176
+ const listMatch = line.match(/^[\s]*[-*+]\s+(.*)$/);
177
+ if (listMatch) {
178
+ const li = document.createElement('li');
179
+ let ul = container.lastElementChild;
180
+ if (!ul || ul.tagName !== 'UL') {
181
+ ul = document.createElement('ul');
182
+ container.appendChild(ul);
183
+ }
184
+ ul.appendChild(li);
185
+ await typeLine(li, listMatch[1], speed);
186
+ i++;
187
+ continue;
188
+ }
189
+
190
+ // 6. Default Paragraph
191
+ if (trimmed) {
192
+ const p = document.createElement('p');
193
+ container.appendChild(p);
194
+ await typeLine(p, line, speed);
195
+ } else {
196
+ container.appendChild(document.createElement('br'));
197
+ }
198
+ i++;
199
+ }
200
+ };
201
+
202
+ const typeLine = async (target, text, speed) => {
203
+ const regex = /\[([^\]]+)\]\(([^)]+)\)|\*\*([^*]+)\*\*|\*([^*]+)\*|`([^`]+)`/g;
204
+ let lastIndex = 0;
205
+ let match;
206
+
207
+ while ((match = regex.exec(text)) !== null) {
208
+ if (match.index > lastIndex) {
209
+ await typeString(target, text.substring(lastIndex, match.index), speed);
210
+ }
211
+
212
+ if (match[1] && match[2]) {
213
+ const a = document.createElement('a');
214
+ a.href = match[2];
215
+ a.target = '_blank';
216
+ a.className = 'ai-link';
217
+ target.appendChild(a);
218
+ await typeString(a, match[1], speed);
219
+ } else if (match[3]) {
220
+ const strong = document.createElement('strong');
221
+ target.appendChild(strong);
222
+ await typeString(strong, match[3], speed);
223
+ } else if (match[4]) {
224
+ const em = document.createElement('em');
225
+ target.appendChild(em);
226
+ await typeString(em, match[4], speed);
227
+ } else if (match[5]) {
228
+ const code = document.createElement('code');
229
+ code.className = 'ai-code';
230
+ target.appendChild(code);
231
+ await typeString(code, match[5], speed);
232
+ }
233
+ lastIndex = regex.lastIndex;
234
+ }
235
+
236
+ if (lastIndex < text.length) {
237
+ await typeString(target, text.substring(lastIndex), speed);
238
+ }
239
+ };
240
+
241
+ const typeString = (targetNode, str, speed) => new Promise(resolve => {
242
+ if (!str) return resolve();
243
+ let i = 0;
244
+ const textNode = document.createTextNode('');
245
+ targetNode.appendChild(textNode);
246
+
247
+ const interval = setInterval(() => {
248
+ textNode.textContent += str.charAt(i);
249
+ i++;
250
+ scrollToBottom();
251
+ if (i >= str.length) {
252
+ clearInterval(interval);
253
+ resolve();
254
+ }
255
+ }, speed);
256
+ });
257
+
258
+ const appendAiChatMessage = (text) => {
259
+ const row = document.createElement("div");
260
+ row.className = "message-row ai-row";
261
+
262
+ row.innerHTML = `
263
+ <div class="message-inner">
264
+ <div class="message-avatar ai">
265
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
266
+ <path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path>
267
+ </svg>
268
+ </div>
269
+ <div class="message-content ai-chat-content">
270
+ </div>
271
+ </div>
272
+ `;
273
+
274
+ el.messagesArea().appendChild(row);
275
+ scrollToBottom();
276
+
277
+ const contentArea = row.querySelector('.ai-chat-content');
278
+
279
+ (async () => {
280
+ await typeOut(contentArea, text, 8);
281
+ })();
282
+
283
+ return row;
284
+ };
285
+
286
+ const appendAiMessage = (analysisResult) => {
287
+ const { cause, explanation, fix, severity, affectedMod } = analysisResult;
288
+
289
+ const row = document.createElement("div");
290
+ row.className = "message-row ai-row";
291
+
292
+ row.innerHTML = `
293
+ <div class="message-inner">
294
+ <div class="message-avatar ai">
295
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
296
+ <path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path>
297
+ </svg>
298
+ </div>
299
+ <div class="message-content ai-message-content">
300
+ <div class="pill-container" style="opacity: 0; transition: opacity 0.4s ease-in;">
301
+ <span class="severity-pill ${severity}">${severity} severity</span>
302
+ <span class="mod-pill">${affectedMod}</span>
303
+ </div>
304
+ <h3></h3>
305
+ <p></p>
306
+ <div class="fix-container" style="display: none;">
307
+ <p><strong>Fix:</strong></p>
308
+ <ol></ol>
309
+ </div>
310
+ </div>
311
+ </div>
312
+ `;
313
+
314
+ el.messagesArea().appendChild(row);
315
+ scrollToBottom();
316
+
317
+ const causeEl = row.querySelector('h3');
318
+ const expEl = row.querySelector('.ai-message-content > p');
319
+ const fixContainer = row.querySelector('.fix-container');
320
+ const fixList = row.querySelector('ol');
321
+ const pills = row.querySelector('.pill-container');
322
+
323
+ (async () => {
324
+ pills.style.opacity = 1;
325
+ await typeOut(causeEl, cause, 15);
326
+ await typeOut(expEl, explanation, 5);
327
+
328
+ if (fix && fix.length > 0) {
329
+ fixContainer.style.display = 'block';
330
+ for (const step of fix) {
331
+ const li = document.createElement('li');
332
+ fixList.appendChild(li);
333
+ await typeOut(li, step, 8);
334
+ }
335
+ }
336
+ })();
337
+
338
+ return row;
339
+ };
340
+
341
+ const addHistoryItem = (analysisResult, onClickCallback) => {
342
+ const item = document.createElement("a");
343
+ item.className = "history-item";
344
+ item.innerHTML = `
345
+ <span class="history-item-text">${analysisResult.affectedMod || "Unknown Crash"}</span>
346
+ <div class="history-item-actions">
347
+ <button class="history-item-btn-dots" title="Options">
348
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
349
+ <circle cx="12" cy="12" r="1"></circle>
350
+ <circle cx="12" cy="5" r="1"></circle>
351
+ <circle cx="12" cy="19" r="1"></circle>
352
+ </svg>
353
+ </button>
354
+ <div class="history-item-menu">
355
+ <button class="history-menu-item edit-btn">
356
+ <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path></svg>
357
+ Edit Name
358
+ </button>
359
+ <button class="history-menu-item delete-btn">
360
+ <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path><line x1="10" y1="11" x2="10" y2="17"></line><line x1="14" y1="11" x2="14" y2="17"></line></svg>
361
+ Delete
362
+ </button>
363
+ </div>
364
+ </div>
365
+ `;
366
+
367
+ const setActive = () => {
368
+ document.querySelectorAll(".history-item").forEach((i) => i.classList.remove("active"));
369
+ item.classList.add("active");
370
+ };
371
+
372
+ const onClick = (e) => {
373
+ e.preventDefault();
374
+ setActive();
375
+ if (typeof onClickCallback === "function") onClickCallback();
376
+ };
377
+
378
+ item.addEventListener("click", onClick);
379
+
380
+ const dotsBtn = item.querySelector('.history-item-btn-dots');
381
+ const menu = item.querySelector('.history-item-menu');
382
+ const editBtn = item.querySelector('.edit-btn');
383
+ const deleteBtn = item.querySelector('.delete-btn');
384
+ const textSpan = item.querySelector('.history-item-text');
385
+
386
+ dotsBtn.addEventListener('click', (e) => {
387
+ e.preventDefault();
388
+ e.stopPropagation();
389
+
390
+ // Close other open menus
391
+ document.querySelectorAll('.history-item-menu.open').forEach(m => {
392
+ if (m !== menu) m.classList.remove('open');
393
+ });
394
+
395
+ menu.classList.toggle('open');
396
+ });
397
+
398
+ editBtn.addEventListener('click', (e) => {
399
+ e.preventDefault();
400
+ e.stopPropagation();
401
+ menu.classList.remove('open');
402
+
403
+ const currentName = textSpan.textContent;
404
+ const input = document.createElement('input');
405
+ input.type = 'text';
406
+ input.className = 'history-edit-input';
407
+ input.value = currentName;
408
+
409
+ item.insertBefore(input, textSpan);
410
+ textSpan.style.display = 'none';
411
+ input.focus();
412
+
413
+ // Prevent click from bubbling and triggering the history item
414
+ input.addEventListener('click', (e2) => e2.stopPropagation());
415
+
416
+ const saveName = () => {
417
+ const newName = input.value.trim();
418
+ if (newName) {
419
+ textSpan.textContent = newName;
420
+ }
421
+ textSpan.style.display = '';
422
+ input.remove();
423
+ };
424
+
425
+ input.addEventListener('blur', saveName);
426
+ input.addEventListener('keydown', (e2) => {
427
+ if (e2.key === 'Enter') saveName();
428
+ if (e2.key === 'Escape') {
429
+ input.value = currentName;
430
+ saveName();
431
+ }
432
+ e2.stopPropagation();
433
+ });
434
+ });
435
+
436
+ deleteBtn.addEventListener('click', (e) => {
437
+ e.preventDefault();
438
+ e.stopPropagation();
439
+ item.remove();
440
+
441
+ // If we deleted the active item, show welcome screen
442
+ if (item.classList.contains('active')) {
443
+ const messages = document.querySelectorAll(".message-row");
444
+ messages.forEach(m => m.remove());
445
+ const welcome = el.welcomeScreen();
446
+ if (welcome) welcome.style.display = "flex";
447
+ }
448
+ });
449
+
450
+ document.addEventListener('click', (e) => {
451
+ if (!item.contains(e.target)) {
452
+ menu.classList.remove('open');
453
+ }
454
+ });
455
+
456
+ const list = el.historyList();
457
+ if (list.firstChild) {
458
+ list.insertBefore(item, list.firstChild);
459
+ } else {
460
+ list.appendChild(item);
461
+ }
462
+
463
+ setActive();
464
+ };
465
+
466
+ const scrollToBottom = () => {
467
+ const chatContainer = document.getElementById("chat-container");
468
+ chatContainer.scrollTop = chatContainer.scrollHeight;
469
+ };
470
+
471
+ const scrollToElement = (element) => {
472
+ if (element) {
473
+ element.scrollIntoView({ behavior: "smooth", block: "start" });
474
+ }
475
+ };
476
+
477
+ let toastTimer = null;
478
+
479
+ const showError = (message) => {
480
+ const toast = el.errorToast();
481
+ toast.textContent = message;
482
+ toast.classList.add("visible");
483
+
484
+ if (toastTimer) clearTimeout(toastTimer);
485
+ toastTimer = setTimeout(() => toast.classList.remove("visible"), 5000);
486
+ };
487
+
488
+ const updateLoadingText = (text) => {
489
+ const loadingText = document.querySelector(".loading-text-glow");
490
+ if (loadingText) loadingText.textContent = text;
491
+ };
492
+
493
+ export {
494
+ el,
495
+ initAutoResize,
496
+ getCrashLogValue,
497
+ clearCrashLogInput,
498
+ setAnalyzeButtonLoading,
499
+ showQueueBar,
500
+ hideQueueBar,
501
+ hideWelcomeScreen,
502
+ appendUserMessage,
503
+ appendLoadingMessage,
504
+ removeLoadingMessage,
505
+ appendAiMessage,
506
+ appendAiChatMessage,
507
+ addHistoryItem,
508
+ scrollToElement,
509
+ showError,
510
+ updateLoadingText,
511
+ };
scripts/build.js ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const JavaScriptObfuscator = require('javascript-obfuscator');
2
+ const fs = require('fs-extra');
3
+ const path = require('path');
4
+
5
+ const srcDir = path.resolve(__dirname, '..');
6
+ const distDir = path.resolve(__dirname, '../dist');
7
+
8
+ async function build() {
9
+ console.log('🚀 Starting "Hugging Face Shield" Build...');
10
+ console.log(` Source: ${srcDir}`);
11
+ console.log(` Destination: ${distDir}`);
12
+
13
+ try {
14
+ // 1. Ensure dist folder exists
15
+ await fs.ensureDir(distDir);
16
+
17
+ // 2. Define what to copy
18
+ const toCopy = ['server', 'public', 'package.json', 'Dockerfile', '.dockerignore', '.env.example'];
19
+
20
+ for (const item of toCopy) {
21
+ const srcPath = path.join(srcDir, item);
22
+ const destPath = path.join(distDir, item);
23
+
24
+ if (fs.existsSync(srcPath)) {
25
+ // Remove destination if it exists (but handle folder locks)
26
+ try {
27
+ if (fs.existsSync(destPath)) {
28
+ await fs.remove(destPath);
29
+ }
30
+ } catch (e) {
31
+ console.warn(` ⚠️ Warning: Could not remove old ${item}, overwriting...`);
32
+ }
33
+
34
+ await fs.copy(srcPath, destPath);
35
+ console.log(`✅ Copied: ${item}`);
36
+ } else {
37
+ console.warn(`❌ Missing source: ${item}`);
38
+ }
39
+ }
40
+
41
+ // 3. Obfuscate all JS files in dist
42
+ console.log('🔒 Scrambling code...');
43
+ await obfuscateDirectory(path.join(distDir, 'server'));
44
+ await obfuscateDirectory(path.join(distDir, 'public'));
45
+
46
+ console.log('\n✨ BUILD COMPLETE! ✨');
47
+ console.log('📁 Your scrambled code is in the "dist" folder.');
48
+ console.log('👉 Upload ONLY the contents of the "dist" folder to Hugging Face.');
49
+ } catch (err) {
50
+ console.error('❌ Build failed:', err);
51
+ }
52
+ }
53
+
54
+ async function obfuscateDirectory(dir) {
55
+ if (!fs.existsSync(dir)) return;
56
+ const files = await fs.readdir(dir);
57
+
58
+ for (const file of files) {
59
+ const fullPath = path.join(dir, file);
60
+ const stat = await fs.stat(fullPath);
61
+
62
+ if (stat.isDirectory()) {
63
+ await obfuscateDirectory(fullPath);
64
+ } else if (file.endsWith('.js') && !file.includes('.min.js')) {
65
+ const code = await fs.readFile(fullPath, 'utf8');
66
+ const result = JavaScriptObfuscator.obfuscate(code, {
67
+ compact: true,
68
+ controlFlowFlattening: true,
69
+ controlFlowFlatteningThreshold: 1,
70
+ numbersToExpressions: true,
71
+ simplify: true,
72
+ stringArrayThreshold: 1,
73
+ stringArrayRotate: true,
74
+ stringArrayShuffle: true,
75
+ stringArray: true,
76
+ identifierNamesGenerator: 'hexadecimal'
77
+ });
78
+
79
+ await fs.writeFile(fullPath, result.getObfuscatedCode());
80
+ console.log(` - Scrambled: ${file}`);
81
+ }
82
+ }
83
+ }
84
+
85
+ build();
server/config.js CHANGED
@@ -1 +1,74 @@
1
- const _0x5589c4=_0x56a7;function _0x56a7(_0x4310f7,_0x444270){_0x4310f7=_0x4310f7-(0xd29*-0x1+0x470+0x4*0x25a);const _0x235913=_0x497b();let _0x5a9307=_0x235913[_0x4310f7];return _0x5a9307;}(function(_0x3e9b82,_0x39312a){const _0x1d4c19=_0x56a7,_0x243924=_0x3e9b82();while(!![]){try{const _0x5ee970=parseInt(_0x1d4c19(0xd5))/(0x389+0x1ae7+-0x1e6f)*(parseInt(_0x1d4c19(0xd9))/(0x7a0+0xfb*-0x1e+0x6*0x3a2))+-parseInt(_0x1d4c19(0xdf))/(0x2353+0x1e81+0x967*-0x7)*(parseInt(_0x1d4c19(0xe3))/(-0xcc3+0x6e7+0x5e0))+parseInt(_0x1d4c19(0xb4))/(-0x1*0xd4f+0x1*0x12a3+-0x54f)+parseInt(_0x1d4c19(0xda))/(0x2b6+-0x32*-0x1b+-0x7f6)+-parseInt(_0x1d4c19(0xcf))/(0x2fe+0x3a6*-0x7+0x1*0x1693)+-parseInt(_0x1d4c19(0xd8))/(0x233e*0x1+-0x1407+-0x12b*0xd)+parseInt(_0x1d4c19(0xe2))/(-0x1ff*-0x11+0xa4d+0x9b*-0x49)*(parseInt(_0x1d4c19(0xb2))/(0x5*0x72e+0x1c7a+0x87*-0x7a));if(_0x5ee970===_0x39312a)break;else _0x243924['push'](_0x243924['shift']());}catch(_0x2d059e){_0x243924['push'](_0x243924['shift']());}}}(_0x497b,-0xdd816*-0x1+0x326a8+0x141a*-0x21),require(_0x5589c4(0xcb))[_0x5589c4(0xd0)]());const parseCommaSeparated=_0x1d362f=>_0x1d362f?_0x1d362f[_0x5589c4(0xde)](',')[_0x5589c4(0xbb)](_0x549cb4=>_0x549cb4[_0x5589c4(0xbd)]())[_0x5589c4(0xe4)](Boolean):[],config={'server':{'port':parseInt(process[_0x5589c4(0xaf)][_0x5589c4(0xc4)],-0x2323*-0x1+-0x233*0xb+-0xae8)||-0x1989+0x1*-0x2dd+0x281e,'nodeEnv':process[_0x5589c4(0xaf)][_0x5589c4(0xba)]||_0x5589c4(0xbc),'mockMode':process[_0x5589c4(0xaf)][_0x5589c4(0xc5)]===_0x5589c4(0xb9)},'ai':{'defaultProvider':process[_0x5589c4(0xaf)][_0x5589c4(0xc7)]||_0x5589c4(0xd4),'providers':{'gemini':{'name':_0x5589c4(0xd4),'model':_0x5589c4(0xdd),'keys':parseCommaSeparated(process[_0x5589c4(0xaf)][_0x5589c4(0xb1)])},'groq':{'name':_0x5589c4(0xb7),'model':_0x5589c4(0xca),'keys':parseCommaSeparated(process[_0x5589c4(0xaf)][_0x5589c4(0xd2)])},'huggingface':{'name':_0x5589c4(0xdc),'model':process[_0x5589c4(0xaf)][_0x5589c4(0xb6)]||_0x5589c4(0xe1),'keys':process[_0x5589c4(0xaf)][_0x5589c4(0xbf)]?parseCommaSeparated(process[_0x5589c4(0xaf)][_0x5589c4(0xbf)]):[''],'spaceUrl':process[_0x5589c4(0xaf)][_0x5589c4(0xd7)]}},'search':{'enabled':!!(process[_0x5589c4(0xaf)][_0x5589c4(0xd6)]||process[_0x5589c4(0xaf)][_0x5589c4(0xe0)]),'provider':process[_0x5589c4(0xaf)][_0x5589c4(0xd6)]?_0x5589c4(0xb5):_0x5589c4(0xc2),'tavilyKey':process[_0x5589c4(0xaf)][_0x5589c4(0xd6)],'serperKey':process[_0x5589c4(0xaf)][_0x5589c4(0xe0)],'maxResults':0x5},'keyDailyLimit':parseInt(process[_0x5589c4(0xaf)][_0x5589c4(0xbe)],-0x16aa+-0x195+0x1849)||0x23f2+-0x4*-0x667+-0x2*0x1e95},'rateLimit':{'disabled':process[_0x5589c4(0xaf)][_0x5589c4(0xcc)]===_0x5589c4(0xb9),'maxRequests':parseInt(process[_0x5589c4(0xaf)][_0x5589c4(0xdb)],0x2*0x15f+0x264b*0x1+0x1*-0x28ff)||-0x13be*-0x1+0x30d+-0x16b7,'windowMinutes':parseInt(process[_0x5589c4(0xaf)][_0x5589c4(0xd1)],-0x1f31+-0x1*-0x110b+0x1*0xe30)||0x12ba+0x3*0x8f0+-0x1*0x2d7b},'queue':{'maxSize':parseInt(process[_0x5589c4(0xaf)][_0x5589c4(0xc3)],-0x559+-0x44b*0x1+0x1*0x9ae)||0x9f3*0x1+0xbc*-0x32+0x1af7,'estimatedSecondsPerRequest':0x5},'systemPrompt':_0x5589c4(0xd3)+_0x5589c4(0xe5)+_0x5589c4(0xb3)+_0x5589c4(0xc9)+'{\x0a'+_0x5589c4(0xc8)+_0x5589c4(0xb0)+_0x5589c4(0xc0)+_0x5589c4(0xcd)+_0x5589c4(0xc6)+'}\x0a'+_0x5589c4(0xc1),'copyright':{'year':0x7ea,'author':_0x5589c4(0xb8)}};function _0x497b(){const _0x28e0d0=['10PeBfNI','If\x20the\x20user\x20provides\x20a\x20conversational\x20question,\x20follow-up,\x20or\x20general\x20inquiry,\x20respond\x20naturally,\x20conversationally,\x20and\x20intelligently\x20in\x20Markdown\x20text\x20(NOT\x20JSON).\x0a','720860vkTxIt','tavily','HF_MODEL','groq','Eleeter','true','NODE_ENV','map','development','trim','KEY_DAILY_LIMIT','HF_API_KEYS','\x20\x20\x22fix\x22:\x20[\x22[Link\x20Text](url)\x20-\x20description\x22,\x20...],\x0a','Always\x20provide\x20direct\x20download\x20links\x20in\x20markdown\x20for\x20any\x20software\x20fixes.','serper','MAX_QUEUE_SIZE','PORT','MOCK_MODE','\x20\x20\x22affectedMod\x22:\x20\x22string\x22\x0a','AI_PROVIDER','\x20\x20\x22cause\x22:\x20\x22string\x22,\x0a','JSON\x20SHAPE\x20FOR\x20LOGS:\x0a','llama3-70b-8192','dotenv','DISABLE_RATE_LIMIT','\x20\x20\x22severity\x22:\x20\x22low\x22\x20|\x20\x22medium\x22\x20|\x20\x22high\x22\x20|\x20\x22critical\x22,\x0a','exports','13160189BzhIdz','config','RATE_LIMIT_WINDOW_MINUTES','GROQ_API_KEYS','You\x20are\x20CrashX,\x20an\x20elite\x20Minecraft\x20crash\x20log\x20analyst\x20and\x20intelligent\x20assistant.\x0a','gemini','1nRCrVU','TAVILY_API_KEY','HF_SPACE_URL','11828520ohLCFD','2074756WOKBzV','4120836EHFDTl','RATE_LIMIT_MAX','huggingface','gemini-2.5-flash','split','1076307lbVELw','SERPER_API_KEY','mistralai/Mistral-7B-Instruct-v0.2','25136793IQxeRk','4jcmkZF','filter','If\x20the\x20user\x20provides\x20a\x20Minecraft\x20crash\x20log,\x20your\x20response\x20MUST\x20be\x20a\x20JSON\x20object\x20in\x20the\x20exact\x20shape\x20below.\x0a','env','\x20\x20\x22explanation\x22:\x20\x22string\x22,\x0a','GEMINI_API_KEYS'];_0x497b=function(){return _0x28e0d0;};return _0x497b();}module[_0x5589c4(0xce)]=config;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ require("dotenv").config();
2
+
3
+ const parseCommaSeparated = (value) =>
4
+ value ? value.split(",").map((item) => item.trim()).filter(Boolean) : [];
5
+
6
+ const config = {
7
+ server: {
8
+ port: parseInt(process.env.PORT, 10) || 3000,
9
+ nodeEnv: process.env.NODE_ENV || "development",
10
+ mockMode: process.env.MOCK_MODE === "true",
11
+ },
12
+
13
+ ai: {
14
+ defaultProvider: process.env.AI_PROVIDER || "gemini",
15
+ providers: {
16
+ gemini: {
17
+ name: "gemini",
18
+ model: "gemini-2.5-flash",
19
+ keys: parseCommaSeparated(process.env.GEMINI_API_KEYS),
20
+ },
21
+ groq: {
22
+ name: "groq",
23
+ model: "llama3-70b-8192",
24
+ keys: parseCommaSeparated(process.env.GROQ_API_KEYS),
25
+ },
26
+ huggingface: {
27
+ name: "huggingface",
28
+ model: process.env.HF_MODEL || "mistralai/Mistral-7B-Instruct-v0.2",
29
+ keys: process.env.HF_API_KEYS ? parseCommaSeparated(process.env.HF_API_KEYS) : [""],
30
+ spaceUrl: process.env.HF_SPACE_URL,
31
+ },
32
+ },
33
+ search: {
34
+ enabled: !!(process.env.TAVILY_API_KEY || process.env.SERPER_API_KEY),
35
+ provider: process.env.TAVILY_API_KEY ? "tavily" : "serper",
36
+ tavilyKey: process.env.TAVILY_API_KEY,
37
+ serperKey: process.env.SERPER_API_KEY,
38
+ maxResults: 5
39
+ },
40
+ keyDailyLimit: parseInt(process.env.KEY_DAILY_LIMIT, 10) || 100,
41
+ },
42
+
43
+ rateLimit: {
44
+ disabled: process.env.DISABLE_RATE_LIMIT === "true",
45
+ maxRequests: parseInt(process.env.RATE_LIMIT_MAX, 10) || 20,
46
+ windowMinutes: parseInt(process.env.RATE_LIMIT_WINDOW_MINUTES, 10) || 15,
47
+ },
48
+
49
+ queue: {
50
+ maxSize: parseInt(process.env.MAX_QUEUE_SIZE, 10) || 50,
51
+ estimatedSecondsPerRequest: 5,
52
+ },
53
+
54
+ systemPrompt:
55
+ `You are CrashX, an elite Minecraft crash log analyst and intelligent assistant.\n` +
56
+ `If the user provides a Minecraft crash log, your response MUST be a JSON object in the exact shape below.\n` +
57
+ `If the user provides a conversational question, follow-up, or general inquiry, respond naturally, conversationally, and intelligently in Markdown text (NOT JSON).\n` +
58
+ `JSON SHAPE FOR LOGS:\n` +
59
+ `{\n` +
60
+ ` "cause": "string",\n` +
61
+ ` "explanation": "string",\n` +
62
+ ` "fix": ["[Link Text](url) - description", ...],\n` +
63
+ ` "severity": "low" | "medium" | "high" | "critical",\n` +
64
+ ` "affectedMod": "string"\n` +
65
+ `}\n` +
66
+ `Always provide direct download links in markdown for any software fixes.`,
67
+
68
+ copyright: {
69
+ year: 2026,
70
+ author: "Eleeter",
71
+ },
72
+ };
73
+
74
+ module.exports = config;
server/index.js CHANGED
@@ -1 +1,41 @@
1
- const _0x186f1e=_0x501f;function _0x501f(_0x32f652,_0x4c6ab7){_0x32f652=_0x32f652-(-0x259a+-0x1*-0x22b6+0x1*0x359);const _0x416694=_0x1bb0();let _0x145850=_0x416694[_0x32f652];return _0x145850;}(function(_0x40098e,_0x250a6a){const _0x3dd603=_0x501f,_0x51d9e7=_0x40098e();while(!![]){try{const _0x15e2af=parseInt(_0x3dd603(0x9b))/(0x1dc6+0x270e*0x1+-0x44d3)*(-parseInt(_0x3dd603(0x8e))/(-0x12d0+0x1*-0x24d9+0x37ab))+parseInt(_0x3dd603(0x78))/(-0x224f+-0x1016+0x3268)*(parseInt(_0x3dd603(0xa3))/(0x2690+-0x16e5*0x1+-0xfa7))+parseInt(_0x3dd603(0x96))/(-0x1351*-0x1+0xca6*0x1+0x553*-0x6)+parseInt(_0x3dd603(0x79))/(0x29d*0x8+-0xa9*-0x39+0x1381*-0x3)*(-parseInt(_0x3dd603(0x94))/(0xb81+-0x1b1*-0xc+-0x1fc6))+parseInt(_0x3dd603(0x90))/(0xdae+-0x40f+-0x997)*(-parseInt(_0x3dd603(0x9f))/(0x1dab+0x28c+0x6*-0x55d))+parseInt(_0x3dd603(0x87))/(-0x23cd+0x5d6*0x1+-0x1e01*-0x1)*(-parseInt(_0x3dd603(0x8d))/(-0x10e0+-0xda*-0x29+-0x1*0x11ff))+parseInt(_0x3dd603(0x8f))/(0x8cd+-0x12*-0x17d+-0x238b);if(_0x15e2af===_0x250a6a)break;else _0x51d9e7['push'](_0x51d9e7['shift']());}catch(_0x54b133){_0x51d9e7['push'](_0x51d9e7['shift']());}}}(_0x1bb0,-0x4a300+-0x26860*0x1+0x266*0x43e),require(_0x186f1e(0x93))[_0x186f1e(0x82)]());const express=require(_0x186f1e(0xa4)),path=require(_0x186f1e(0x95)),config=require(_0x186f1e(0x80)),{globalRateLimiter}=require(_0x186f1e(0x98)),analyzeRoute=require(_0x186f1e(0x99)),statusRoute=require(_0x186f1e(0xa1)),authRoute=require(_0x186f1e(0x7c)),app=express();app[_0x186f1e(0xa2)](_0x186f1e(0x91),0x956*0x1+0x1715*-0x1+0xdc0),app[_0x186f1e(0x7d)]((_0x1b2120,_0x1cf2b8,_0x4df95c)=>{const _0x582c25=_0x186f1e,_0x4458a3={'epfQk':function(_0x1216d1){return _0x1216d1();}};console[_0x582c25(0x76)](_0x582c25(0x83)+_0x1b2120[_0x582c25(0x88)]+'\x20'+_0x1b2120[_0x582c25(0x95)]+_0x582c25(0x85)+_0x1b2120['ip']),_0x4458a3[_0x582c25(0x9c)](_0x4df95c);}),app[_0x186f1e(0x7d)](express[_0x186f1e(0xa5)]({'limit':_0x186f1e(0x7e)})),app[_0x186f1e(0x7d)](express[_0x186f1e(0x81)](path[_0x186f1e(0x8b)](__dirname,_0x186f1e(0x75)))),app[_0x186f1e(0x7d)](_0x186f1e(0x97),globalRateLimiter),app[_0x186f1e(0x7d)](_0x186f1e(0x9d),analyzeRoute),app[_0x186f1e(0x7d)](_0x186f1e(0x7f),statusRoute),app[_0x186f1e(0x7d)](_0x186f1e(0x7a),authRoute),app[_0x186f1e(0x9a)]('*',(_0x2f6ae9,_0x38fb1d)=>{const _0x5c0173=_0x186f1e,_0x5a771d={'gRBYH':_0x5c0173(0x89)};_0x38fb1d[_0x5c0173(0xa0)](path[_0x5c0173(0x8b)](__dirname,_0x5a771d[_0x5c0173(0x8c)]));});const port=-0xc83*-0x1+0xa*-0x190+0x21d1;app[_0x186f1e(0x77)](port,_0x186f1e(0x92),()=>{const _0x273cc0=_0x186f1e;console[_0x273cc0(0x76)](_0x273cc0(0x9e)),console[_0x273cc0(0x76)](_0x273cc0(0x7b)+port),console[_0x273cc0(0x76)](_0x273cc0(0x86)+config[_0x273cc0(0x84)][_0x273cc0(0x8a)]);});function _0x1bb0(){const _0x3c07a2=['448830LpeYDY','method','../public/index.html','nodeEnv','join','gRBYH','33qZchYd','102MwhOiy','1390980rAXxMe','2325304KgtrwJ','trust\x20proxy','0.0.0.0','dotenv','92043FQwocY','path','1436840nxaBmy','/api','./middleware/rateLimit','./routes/analyze','get','1327sQQbmg','epfQk','/api/analyze','🚀\x20CrashX\x20IS\x20ONLINE!','9kDMxXH','sendFile','./routes/status','set','1337172QzuzzH','express','json','../public','log','listen','3HdrPIV','18vOXYJI','/api/auth','📡\x20Listening\x20on:\x20http://0.0.0.0:','./routes/auth','use','200kb','/api/status','./config','static','config','📡\x20[HIT]\x20','server','\x20from\x20','🌍\x20Environment:\x20'];_0x1bb0=function(){return _0x3c07a2;};return _0x1bb0();}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ require("dotenv").config();
2
+
3
+ const express = require("express");
4
+ const path = require("path");
5
+ const config = require("./config");
6
+ const { globalRateLimiter } = require("./middleware/rateLimit");
7
+ const analyzeRoute = require("./routes/analyze");
8
+ const statusRoute = require("./routes/status");
9
+ const authRoute = require("./routes/auth");
10
+
11
+ const app = express();
12
+
13
+ // Required for Hugging Face/Docker to see user IPs correctly
14
+ app.set('trust proxy', 1);
15
+
16
+ // Diagnostic: Log every single hit to the server
17
+ app.use((req, res, next) => {
18
+ console.log(`📡 [HIT] ${req.method} ${req.path} from ${req.ip}`);
19
+ next();
20
+ });
21
+
22
+ app.use(express.json({ limit: "200kb" }));
23
+ app.use(express.static(path.join(__dirname, "../public")));
24
+
25
+ app.use("/api", globalRateLimiter);
26
+ app.use("/api/analyze", analyzeRoute);
27
+ app.use("/api/status", statusRoute);
28
+ app.use("/api/auth", authRoute);
29
+
30
+ app.get("*", (_req, res) =>
31
+ {
32
+ res.sendFile(path.join(__dirname, "../public/index.html"));
33
+ });
34
+
35
+ const port = 7860;
36
+ app.listen(port, '0.0.0.0', () =>
37
+ {
38
+ console.log(`🚀 CrashX IS ONLINE!`);
39
+ console.log(`📡 Listening on: http://0.0.0.0:${port}`);
40
+ console.log(`🌍 Environment: ${config.server.nodeEnv}`);
41
+ });
server/middleware/auth.js CHANGED
@@ -1 +1,17 @@
1
- const _0x58c779=_0x443f;(function(_0x1e69cd,_0x19e25e){const _0x508d33=_0x443f,_0x332166=_0x1e69cd();while(!![]){try{const _0x3065bb=-parseInt(_0x508d33(0x87))/(-0x7f3*-0x2+-0x1980+0x99b)*(parseInt(_0x508d33(0x7e))/(0x63c+-0x1*-0x7c3+-0xdfd))+parseInt(_0x508d33(0x83))/(-0x1*-0x1ab7+0x243a+-0x6*0xa7d)+parseInt(_0x508d33(0x86))/(-0x47e+-0x3d0+-0x1*-0x852)*(parseInt(_0x508d33(0x7f))/(0x1b82+0xb80+-0x1*0x26fd))+-parseInt(_0x508d33(0x85))/(0x26c*0x7+0x6f3+-0x17e1)*(-parseInt(_0x508d33(0x81))/(0x1*-0x1b63+-0x18*0x1c+-0x602*-0x5))+parseInt(_0x508d33(0x80))/(0xc6a+0x9c7*0x1+-0xb7*0x1f)*(parseInt(_0x508d33(0x84))/(0x1*0x248a+-0x1c59+-0x828))+-parseInt(_0x508d33(0x8a))/(-0x1*0x313+0xc9*-0x2e+0x273b)*(-parseInt(_0x508d33(0x8b))/(0xbf5*0x1+0x2c4+-0xeae))+-parseInt(_0x508d33(0x82))/(0x427*-0x3+-0xb*-0x340+-0x173f);if(_0x3065bb===_0x19e25e)break;else _0x332166['push'](_0x332166['shift']());}catch(_0x2cd395){_0x332166['push'](_0x332166['shift']());}}}(_0xadd3,0x949d2+-0x2ef30+-0x1c48*0x4));const authMiddleware=(_0x3192e2,_0x1ae3e4,_0x2e1cad)=>{const _0x1f2879=_0x443f,_0x438e34={'MNOkH':function(_0x5bca46){return _0x5bca46();}};_0x438e34[_0x1f2879(0x89)](_0x2e1cad);};function _0x443f(_0x1df691,_0x315bb7){_0x1df691=_0x1df691-(-0x42b+0x1*0x7c9+0x8*-0x64);const _0x23690d=_0xadd3();let _0x40e373=_0x23690d[_0x1df691];return _0x40e373;}function _0xadd3(){const _0x3872b8=['1190847KasSQI','23822184rQKgjv','2014137njgLBg','1332uUnQmh','6AUHpcp','1148tGJfix','392789TDIhmR','exports','MNOkH','260dcbNas','205161jRBEQX','2NFZCTQ','13485hAGUIu','35944OYAede'];_0xadd3=function(){return _0x3872b8;};return _0xadd3();}module[_0x58c779(0x88)]={'authMiddleware':authMiddleware};
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // TODO: Implement JWT or session-based authentication here.
2
+ // This middleware should:
3
+ // 1. Extract the token from the Authorization header
4
+ // 2. Verify it against the secret in config
5
+ // 3. Attach the decoded user object to req.user
6
+ // 4. Call next() on success or return 401 on failure
7
+ //
8
+ // Example shape of req.user once implemented:
9
+ // { userId: string, username: string, tier: "free" | "pro" }
10
+
11
+ const authMiddleware = (_req, _res, next) =>
12
+ {
13
+ // Placeholder — always passes through
14
+ next();
15
+ };
16
+
17
+ module.exports = { authMiddleware };
server/middleware/rateLimit.js CHANGED
@@ -1 +1,20 @@
1
- function _0x1b74(_0x2004f9,_0x4c9070){_0x2004f9=_0x2004f9-(-0x2*0x76d+0x22e8+-0x4e1*0x4);const _0xaea858=_0x45c6();let _0x39ca1d=_0xaea858[_0x2004f9];return _0x39ca1d;}const _0x3d5b4c=_0x1b74;(function(_0x49c4d9,_0x5ac036){const _0x5428b0=_0x1b74,_0xc13673=_0x49c4d9();while(!![]){try{const _0x7c6ab4=-parseInt(_0x5428b0(0x9a))/(-0x2*0x86+-0x1802+0x190f*0x1)*(parseInt(_0x5428b0(0x99))/(0x2015+-0x2429+0x416))+parseInt(_0x5428b0(0x95))/(0x24e7*-0x1+-0x1*0x12b9+0x37a3)+parseInt(_0x5428b0(0x96))/(-0x2*-0xccf+0xd6*-0x24+0x47e)*(parseInt(_0x5428b0(0x98))/(-0xa8b*-0x3+-0x2132*-0x1+-0x23*0x1da))+parseInt(_0x5428b0(0xa6))/(-0x1*0x106c+-0x1*0x1bc+0x122e)+parseInt(_0x5428b0(0x97))/(0x55a*0x5+0x219a+-0x3c55)+parseInt(_0x5428b0(0xa2))/(0x1*-0x20e6+-0x2b8+0x23a6)*(-parseInt(_0x5428b0(0x8a))/(-0x209e+-0x1*-0x1226+-0xe81*-0x1))+parseInt(_0x5428b0(0xa0))/(-0x3d*0x6f+-0x3a6+-0x607*-0x5)*(-parseInt(_0x5428b0(0xa5))/(-0x1*-0x18e4+0x2*-0x128f+0xc45));if(_0x7c6ab4===_0x5ac036)break;else _0xc13673['push'](_0xc13673['shift']());}catch(_0x474153){_0xc13673['push'](_0xc13673['shift']());}}}(_0x45c6,0x66027*-0x1+-0x2*0xa0c28+-0x1b80e*-0x16));function _0x45c6(){const _0x55953b=['../config','rateLimit','1834668igEKgO','3521948lyWAaf','5286435OoxZpZ','5oGhRMn','74cwwHaQ','22412shjoOu','\x20requests\x20per\x20','exports','\x20minutes.','server','maxRequests','30UbMYxP','VCFCO','8tmTxQp','fiFsu','express-rate-limit','1612237JcWwEI','1305546phkftR','disabled','4070529uWKfBd','path','EOahz','Too\x20many\x20requests.\x20Maximum\x20','/api/status','/status','windowMinutes','mockMode','HlcfU'];_0x45c6=function(){return _0x55953b;};return _0x45c6();}const rateLimit=require(_0x3d5b4c(0xa4)),config=require(_0x3d5b4c(0x93)),MINUTES_TO_MS=0x6*0x305e+0x1753d*0x1+0x1ad11*-0x1,globalRateLimiter=rateLimit({'windowMs':config[_0x3d5b4c(0x94)][_0x3d5b4c(0x90)]*MINUTES_TO_MS,'max':config[_0x3d5b4c(0x94)][_0x3d5b4c(0x9f)],'standardHeaders':!![],'legacyHeaders':![],'skip':(_0x4e1220,_0x33c47c)=>{const _0x4054cd=_0x3d5b4c,_0x4530d8={'HlcfU':function(_0x2be55e,_0xb783a){return _0x2be55e===_0xb783a;},'fiFsu':_0x4054cd(0x8e),'VCFCO':function(_0x40306b,_0x52a487){return _0x40306b===_0x52a487;},'EOahz':_0x4054cd(0x8f)};if(_0x4530d8[_0x4054cd(0x92)](_0x4e1220[_0x4054cd(0x8b)],_0x4530d8[_0x4054cd(0xa3)])||_0x4530d8[_0x4054cd(0xa1)](_0x4e1220[_0x4054cd(0x8b)],_0x4530d8[_0x4054cd(0x8c)]))return!![];return _0x4530d8[_0x4054cd(0x92)](config[_0x4054cd(0x9e)][_0x4054cd(0x91)],!![])||_0x4530d8[_0x4054cd(0xa1)](config[_0x4054cd(0x94)][_0x4054cd(0xa7)],!![]);},'message':{'error':_0x3d5b4c(0x8d)+config[_0x3d5b4c(0x94)][_0x3d5b4c(0x9f)]+_0x3d5b4c(0x9b)+config[_0x3d5b4c(0x94)][_0x3d5b4c(0x90)]+_0x3d5b4c(0x9d)}});module[_0x3d5b4c(0x9c)]={'globalRateLimiter':globalRateLimiter};
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const rateLimit = require("express-rate-limit");
2
+ const config = require("../config");
3
+
4
+ const MINUTES_TO_MS = 60_000;
5
+
6
+ const globalRateLimiter = rateLimit({
7
+ windowMs: config.rateLimit.windowMinutes * MINUTES_TO_MS,
8
+ max: config.rateLimit.maxRequests,
9
+ standardHeaders: true,
10
+ legacyHeaders: false,
11
+ skip: (req, res) => {
12
+ if (req.path === "/api/status" || req.path === "/status") return true;
13
+ return config.server.mockMode === true || config.rateLimit.disabled === true;
14
+ },
15
+ message: {
16
+ error: `Too many requests. Maximum ${config.rateLimit.maxRequests} requests per ${config.rateLimit.windowMinutes} minutes.`,
17
+ },
18
+ });
19
+
20
+ module.exports = { globalRateLimiter };
server/routes/analyze.js CHANGED
@@ -1 +1,57 @@
1
- const _0x12eebc=_0x2942;(function(_0x41f707,_0x3801b3){const _0x1f50a6=_0x2942,_0x3b8117=_0x41f707();while(!![]){try{const _0xf7f2e=parseInt(_0x1f50a6(0x1c2))/(0x1e76+-0x699+-0x17dc)*(parseInt(_0x1f50a6(0x1cc))/(0x2*0x446+0x7f5+-0x107f))+parseInt(_0x1f50a6(0x1cf))/(-0x1*-0x1fe1+-0x11a5+0x14b*-0xb)*(parseInt(_0x1f50a6(0x1af))/(0x22*-0x3+0xf53+0x1*-0xee9))+parseInt(_0x1f50a6(0x1ca))/(-0x3*-0x557+0x1a70+-0x2a70)*(-parseInt(_0x1f50a6(0x1ac))/(-0x9ba+-0xbbe+-0x72a*-0x3))+-parseInt(_0x1f50a6(0x1c5))/(0x1*-0x11c3+-0x1899+0x3*0xe21)+-parseInt(_0x1f50a6(0x1d1))/(0x935+-0x1bb8+0x128b*0x1)*(parseInt(_0x1f50a6(0x1d0))/(0x1d7b+0x24e4+-0x4256*0x1))+-parseInt(_0x1f50a6(0x1d5))/(0x991+-0x4a+0x93d*-0x1)*(-parseInt(_0x1f50a6(0x1ad))/(-0x106+0xd3e+-0xc2d))+parseInt(_0x1f50a6(0x1ba))/(-0x428+-0x2630+-0x1*-0x2a64)*(parseInt(_0x1f50a6(0x1d3))/(0xa1*0x38+-0x420+-0x1f0b));if(_0xf7f2e===_0x3801b3)break;else _0x3b8117['push'](_0x3b8117['shift']());}catch(_0x3fd767){_0x3b8117['push'](_0x3b8117['shift']());}}}(_0x43d4,0x8dad5*-0x1+0x13*0xc97+-0xe7965*-0x1));function _0x2942(_0x46743e,_0x39efb6){_0x46743e=_0x46743e-(-0x2*-0x86b+-0x5*0x1f+-0x1*0xe8f);const _0x2dee31=_0x43d4();let _0xeb0101=_0x2dee31[_0x46743e];return _0xeb0101;}const express=require(_0x12eebc(0x1b9)),{enqueue}=require(_0x12eebc(0x1b7)),{compactLog}=require(_0x12eebc(0x1c8)),router=express[_0x12eebc(0x1b6)](),MIN_LOG_LENGTH=0x66b+0xa26+0x1*-0x107d,MAX_LOG_LENGTH=-0x1caa6+-0x15a57+-0x1*-0x4ab9d;router[_0x12eebc(0x1be)]('/',async(_0x5e5a13,_0x3410d5)=>{const _0x384b4c=_0x12eebc,_0x510b17={'xhPfn':function(_0x247161,_0x309593){return _0x247161||_0x309593;},'BOZNj':_0x384b4c(0x1b5),'ebkkY':function(_0x2abfa5,_0x57f050){return _0x2abfa5===_0x57f050;},'AYZLd':_0x384b4c(0x1ce),'dsrDx':function(_0x298f6a,_0x2ae905){return _0x298f6a<_0x2ae905;},'FKfvl':function(_0x3621ad,_0x5166be){return _0x3621ad(_0x5166be);},'mbaxy':function(_0x1aff32,_0x380b8d){return _0x1aff32===_0x380b8d;},'SQTix':_0x384b4c(0x1c3),'MlcSh':function(_0x5e3a27,_0x5c9cbd){return _0x5e3a27>_0x5c9cbd;},'HLZRs':function(_0xd1a1df,_0x5b54f2){return _0xd1a1df(_0x5b54f2);},'IvWGd':_0x384b4c(0x1b8)},{crashLog:_0x4acb8b,messages:_0x245adb}=_0x5e5a13[_0x384b4c(0x1b4)],_0x11f103=_0x510b17[_0x384b4c(0x1da)](_0x245adb,_0x4acb8b);if(!_0x11f103)return _0x3410d5[_0x384b4c(0x1d7)](-0x22ba+0xd3f+0x170b)[_0x384b4c(0x1b0)]({'error':_0x510b17[_0x384b4c(0x1c6)]});let _0x5c1715=_0x11f103;if(_0x510b17[_0x384b4c(0x1c4)](typeof _0x11f103,_0x510b17[_0x384b4c(0x1cd)])){const _0x3b8bff=_0x11f103[_0x384b4c(0x1bc)]();if(_0x510b17[_0x384b4c(0x1c1)](_0x3b8bff[_0x384b4c(0x1c9)],MIN_LOG_LENGTH))return _0x3410d5[_0x384b4c(0x1d7)](0x13e6+-0x150c+0x2b6)[_0x384b4c(0x1b0)]({'error':_0x384b4c(0x1bb)+MIN_LOG_LENGTH+_0x384b4c(0x1d9)});_0x5c1715=_0x510b17[_0x384b4c(0x1b3)](compactLog,_0x3b8bff);}else{if(Array[_0x384b4c(0x1c7)](_0x11f103)){if(_0x510b17[_0x384b4c(0x1b2)](_0x11f103[_0x384b4c(0x1c9)],0x567*-0x5+0xb80+0xf83))return _0x3410d5[_0x384b4c(0x1d7)](-0x6bd*0x5+0x1*0x16e1+0xc60)[_0x384b4c(0x1b0)]({'error':_0x510b17[_0x384b4c(0x1b1)]});}}if(_0x510b17[_0x384b4c(0x1c4)](typeof _0x5c1715,_0x510b17[_0x384b4c(0x1cd)])&&_0x510b17[_0x384b4c(0x1cb)](_0x5c1715[_0x384b4c(0x1c9)],MAX_LOG_LENGTH))return _0x3410d5[_0x384b4c(0x1d7)](0x76b*0x1+0x2c7*-0xd+0x1e40)[_0x384b4c(0x1b0)]({'error':_0x384b4c(0x1ae)+MAX_LOG_LENGTH+_0x384b4c(0x1d2)});try{const {jobId:_0x3ad97f,jobPromise:_0x26fffe}=_0x510b17[_0x384b4c(0x1c0)](enqueue,_0x5c1715);_0x3410d5[_0x384b4c(0x1b0)]({'success':!![],'jobId':_0x3ad97f}),_0x26fffe[_0x384b4c(0x1d6)](()=>{});}catch(_0x27063a){const _0x12dcd3=_0x27063a[_0x384b4c(0x1d4)][_0x384b4c(0x1d8)](_0x510b17[_0x384b4c(0x1bf)])?0x1aed*0x1+0x22*-0x83+-0x2c*0x2c:0x1655+0x61+0x2*-0xa61;return _0x3410d5[_0x384b4c(0x1d7)](_0x12dcd3)[_0x384b4c(0x1b0)]({'error':_0x27063a[_0x384b4c(0x1d4)]});}}),module[_0x12eebc(0x1bd)]=router;function _0x43d4(){const _0x21ee9d=['Crash\x20log\x20exceeds\x20maximum\x20size\x20of\x20','4XbobZw','json','SQTix','mbaxy','FKfvl','body','Payload\x20(messages\x20or\x20crashLog)\x20is\x20required.','Router','../services/queue','full','express','24RZQHWK','Crash\x20log\x20is\x20too\x20short.\x20Minimum\x20','trim','exports','post','IvWGd','HLZRs','dsrDx','3DFTdkc','Empty\x20messages.','ebkkY','3519901cEjpcp','BOZNj','isArray','../services/logCompactor','length','375BadNqU','MlcSh','40724PYFrzr','AYZLd','string','1849839czoOfN','9BJKvpu','1512464ZqlBes','\x20characters.','3431779BAFCWz','message','1170UCqOJV','catch','status','includes','\x20characters\x20required.','xhPfn','44508ejhCBa','44385cYANco'];_0x43d4=function(){return _0x21ee9d;};return _0x43d4();}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const express = require("express");
2
+ const { enqueue } = require("../services/queue");
3
+ const { compactLog } = require("../services/logCompactor");
4
+
5
+ const router = express.Router();
6
+
7
+ const MIN_LOG_LENGTH = 20;
8
+ const MAX_LOG_LENGTH = 100_000;
9
+
10
+ router.post("/", async (req, res) =>
11
+ {
12
+ const { crashLog, messages } = req.body;
13
+
14
+ const payload = messages || crashLog;
15
+
16
+ if (!payload)
17
+ {
18
+ return res.status(400).json({ error: "Payload (messages or crashLog) is required." });
19
+ }
20
+
21
+ let enqueuedData = payload;
22
+
23
+ if (typeof payload === "string") {
24
+ const trimmed = payload.trim();
25
+ if (trimmed.length < MIN_LOG_LENGTH) {
26
+ return res.status(400).json({
27
+ error: `Crash log is too short. Minimum ${MIN_LOG_LENGTH} characters required.`,
28
+ });
29
+ }
30
+ enqueuedData = compactLog(trimmed);
31
+ } else if (Array.isArray(payload)) {
32
+ if (payload.length === 0) return res.status(400).json({ error: "Empty messages." });
33
+ }
34
+
35
+ if (typeof enqueuedData === "string" && enqueuedData.length > MAX_LOG_LENGTH)
36
+ {
37
+ return res.status(400).json({
38
+ error: `Crash log exceeds maximum size of ${MAX_LOG_LENGTH} characters.`,
39
+ });
40
+ }
41
+
42
+ try
43
+ {
44
+ const { jobId, jobPromise } = enqueue(enqueuedData);
45
+
46
+ res.json({ success: true, jobId });
47
+
48
+ jobPromise.catch(() => {});
49
+ }
50
+ catch (error)
51
+ {
52
+ const statusCode = error.message.includes("full") ? 503 : 500;
53
+ return res.status(statusCode).json({ error: error.message });
54
+ }
55
+ });
56
+
57
+ module.exports = router;
server/routes/auth.js CHANGED
@@ -1 +1,17 @@
1
- function _0x402b(_0x1ef330,_0x3c20d0){_0x1ef330=_0x1ef330-(0x2*-0x1231+0x3f*0x57+0x1009);const _0x33a4a2=_0x4d57();let _0x1f2e28=_0x33a4a2[_0x1ef330];return _0x1f2e28;}const _0x4d6d2b=_0x402b;(function(_0x43b406,_0x300406){const _0x5ac4d7=_0x402b,_0x13f967=_0x43b406();while(!![]){try{const _0x221088=-parseInt(_0x5ac4d7(0x11f))/(0x7*0x1c6+-0x6a1*-0x4+-0x26ed)*(-parseInt(_0x5ac4d7(0x110))/(0x1228+-0xa*-0x1cf+0x3*-0xc14))+parseInt(_0x5ac4d7(0x118))/(0xbf2+0x279*-0x5+-0x6e*-0x1)+parseInt(_0x5ac4d7(0x11e))/(0x4df+-0x1f*-0x5+0x1d2*-0x3)+parseInt(_0x5ac4d7(0x113))/(0x1*0xdb2+0x1a56+0x1*-0x2803)*(parseInt(_0x5ac4d7(0x11c))/(0x353*-0x2+0x141+-0x49*-0x13))+-parseInt(_0x5ac4d7(0x11d))/(-0x4*0x42c+0x201e+0xf67*-0x1)+parseInt(_0x5ac4d7(0x11b))/(0x33a*-0x1+-0x4*0x13a+0x1*0x82a)*(-parseInt(_0x5ac4d7(0x11a))/(-0x1c76+0x23*0xb+-0x1afe*-0x1))+-parseInt(_0x5ac4d7(0x115))/(-0x18a6+0x4*0x7db+0x1af*-0x4);if(_0x221088===_0x300406)break;else _0x13f967['push'](_0x13f967['shift']());}catch(_0x20146f){_0x13f967['push'](_0x13f967['shift']());}}}(_0x4d57,0x7*0x5f5d+0x5*-0x127bf+-0x7506a*-0x2));const express=require(_0x4d6d2b(0x111)),router=express[_0x4d6d2b(0x117)]();function _0x4d57(){const _0x396f71=['ZUTmj','2312756wSshzj','express','json','6055545OiIIow','exports','14477570RpPJyK','get','Router','1785420UxQiLc','Auth\x20endpoints\x20not\x20yet\x20implemented.','18MuiJoa','941632DzRLwL','6qOqcvP','8242563OrlrUl','2596236OeZfXO','1wvsfUF'];_0x4d57=function(){return _0x396f71;};return _0x4d57();}router[_0x4d6d2b(0x116)]('/',(_0x27c027,_0x5c573b)=>{const _0x5140df=_0x4d6d2b,_0x38056d={'ZUTmj':_0x5140df(0x119)};_0x5c573b[_0x5140df(0x112)]({'message':_0x38056d[_0x5140df(0x120)]});}),module[_0x4d6d2b(0x114)]=router;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const express = require("express");
2
+
3
+ const router = express.Router();
4
+
5
+ // TODO: Implement authentication endpoints once auth strategy is decided.
6
+ // Expected routes:
7
+ // POST /api/auth/register — create a new account
8
+ // POST /api/auth/login — returns a JWT
9
+ // POST /api/auth/logout — invalidates the session
10
+ // GET /api/auth/me — returns the currently logged in user
11
+
12
+ router.get("/", (_req, res) =>
13
+ {
14
+ res.json({ message: "Auth endpoints not yet implemented." });
15
+ });
16
+
17
+ module.exports = router;
server/routes/status.js CHANGED
@@ -1 +1,32 @@
1
- const _0x3211b2=_0x44c2;function _0x5526(){const _0x1fa219=['author','json','/:jobId','year','Router','1029108MnGruO','90123rnZgTJ','35wxzMeL','12SDkeZA','RkuyP','exports','620538SmuJKi','../config','Job\x20not\x20found.','../services/keyRotator','9509071pxFcDi','YfJMO','copyright','2GyAzfk','1.0.0','1135488IPptyZ','params','911095dulGvH','BEcLB','express','../services/queue','180wNQofR','get','getStatus','status','254997pIMaWO','online','RvghY','lhErM'];_0x5526=function(){return _0x1fa219;};return _0x5526();}function _0x44c2(_0x4e7835,_0x1c9c97){_0x4e7835=_0x4e7835-(0x2*0x3fb+0x387*-0xb+0x1f6a*0x1);const _0x134052=_0x5526();let _0x1d6707=_0x134052[_0x4e7835];return _0x1d6707;}(function(_0x3045f6,_0x2a9b83){const _0x4d2f14=_0x44c2,_0x389d69=_0x3045f6();while(!![]){try{const _0x3a8c22=parseInt(_0x4d2f14(0x93))/(0x1*0xc6d+-0x25f+-0xa0d)+-parseInt(_0x4d2f14(0xa0))/(0x1365*0x1+-0x15*0xc4+0x34f*-0x1)*(-parseInt(_0x4d2f14(0x94))/(-0x5d*0x1b+-0x207b*0x1+0x2a4d))+-parseInt(_0x4d2f14(0x96))/(-0xe4*-0x7+0x1*-0x95f+0x327)*(parseInt(_0x4d2f14(0xa4))/(-0x9fe*-0x2+0x1df5+0x9*-0x58c))+-parseInt(_0x4d2f14(0x99))/(0x6c9*-0x3+-0x327*0x3+0x1dd6)*(-parseInt(_0x4d2f14(0x95))/(0x166b+0x4f4+0xfa*-0x1c))+-parseInt(_0x4d2f14(0xa2))/(0x164+0x217d+0x32b*-0xb)+parseInt(_0x4d2f14(0xac))/(0x1*0x1759+-0xe79+-0x8d7)*(parseInt(_0x4d2f14(0xa8))/(0x2d*-0x56+0x4e0+0xa48))+-parseInt(_0x4d2f14(0x9d))/(0x301*0x9+0x3*-0x93+0x1945*-0x1);if(_0x3a8c22===_0x2a9b83)break;else _0x389d69['push'](_0x389d69['shift']());}catch(_0x3d0e94){_0x389d69['push'](_0x389d69['shift']());}}}(_0x5526,-0x1*-0x66cbe+-0x1dd3b+-0x3*-0x1311b));const express=require(_0x3211b2(0xa6)),{getJobStatus,getQueueStatus}=require(_0x3211b2(0xa7)),keyRotator=require(_0x3211b2(0x9c)),config=require(_0x3211b2(0x9a)),router=express[_0x3211b2(0xb4)]();router[_0x3211b2(0xa9)]('/',(_0x3aa586,_0x16b5a9)=>{const _0x1ff848=_0x3211b2,_0xe4d631={'RvghY':_0x1ff848(0xad),'BEcLB':_0x1ff848(0xa1),'YfJMO':function(_0x36ec3f){return _0x36ec3f();}};_0x16b5a9[_0x1ff848(0xb1)]({'status':_0xe4d631[_0x1ff848(0xae)],'version':_0xe4d631[_0x1ff848(0xa5)],'copyright':'©\x20'+config[_0x1ff848(0x9f)][_0x1ff848(0xb3)]+'\x20'+config[_0x1ff848(0x9f)][_0x1ff848(0xb0)],'queue':_0xe4d631[_0x1ff848(0x9e)](getQueueStatus),'keyRotator':keyRotator[_0x1ff848(0xaa)]()});}),router[_0x3211b2(0xa9)](_0x3211b2(0xb2),(_0x1bf971,_0x4d99f1)=>{const _0x439f07=_0x3211b2,_0x50e063={'lhErM':function(_0x2588ea,_0x13709a){return _0x2588ea(_0x13709a);},'RkuyP':_0x439f07(0x9b)},{jobId:_0x3d2d2d}=_0x1bf971[_0x439f07(0xa3)],_0x17af49=_0x50e063[_0x439f07(0xaf)](getJobStatus,_0x3d2d2d);if(!_0x17af49)return _0x4d99f1[_0x439f07(0xab)](0xb11*-0x1+-0x1*0x5c1+0x1266)[_0x439f07(0xb1)]({'error':_0x50e063[_0x439f07(0x97)]});_0x4d99f1[_0x439f07(0xb1)](_0x17af49);}),module[_0x3211b2(0x98)]=router;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const express = require("express");
2
+ const { getJobStatus, getQueueStatus } = require("../services/queue");
3
+ const keyRotator = require("../services/keyRotator");
4
+ const config = require("../config");
5
+
6
+ const router = express.Router();
7
+
8
+ router.get("/", (_req, res) =>
9
+ {
10
+ res.json({
11
+ status: "online",
12
+ version: "1.0.0",
13
+ copyright: `© ${config.copyright.year} ${config.copyright.author}`,
14
+ queue: getQueueStatus(),
15
+ keyRotator: keyRotator.getStatus(),
16
+ });
17
+ });
18
+
19
+ router.get("/:jobId", (req, res) =>
20
+ {
21
+ const { jobId } = req.params;
22
+ const jobStatus = getJobStatus(jobId);
23
+
24
+ if (!jobStatus)
25
+ {
26
+ return res.status(404).json({ error: "Job not found." });
27
+ }
28
+
29
+ res.json(jobStatus);
30
+ });
31
+
32
+ module.exports = router;
server/services/aiService.js CHANGED
@@ -1 +1,292 @@
1
- const _0x9cb1a5=_0x1216;(function(_0x37c450,_0x3d9548){const _0x22260e=_0x1216,_0x57561e=_0x37c450();while(!![]){try{const _0x3283a3=parseInt(_0x22260e(0x9a))/(0x2279+0x14f*0x19+-0x7*0x999)*(-parseInt(_0x22260e(0xb4))/(0x1620+-0x86+-0x1598*0x1))+parseInt(_0x22260e(0x114))/(0x8*0xd1+-0x2*0x713+0x1*0x7a1)*(parseInt(_0x22260e(0xc5))/(0x1e44+-0x1e56+-0x1*-0x16))+-parseInt(_0x22260e(0xc3))/(0x2*0xad7+0x1*-0x1565+-0x44)+-parseInt(_0x22260e(0xd1))/(-0xd01+-0x16f9+-0xc*-0x300)*(parseInt(_0x22260e(0xd3))/(0x2*0x1307+-0x70d*-0x1+-0x2d14))+-parseInt(_0x22260e(0xff))/(-0x1b25*0x1+0x1acb*-0x1+0x35f8)*(parseInt(_0x22260e(0xb5))/(0x8cb*-0x3+-0xdc7+0x2831))+-parseInt(_0x22260e(0xe1))/(-0x1*0x112e+0x823*0x4+-0x6*0x28e)*(parseInt(_0x22260e(0x8b))/(-0xbb9+0xb77+0xb*0x7))+parseInt(_0x22260e(0xb7))/(0x23e7+0x1050+-0x342b);if(_0x3283a3===_0x3d9548)break;else _0x57561e['push'](_0x57561e['shift']());}catch(_0x333042){_0x57561e['push'](_0x57561e['shift']());}}}(_0xf020,-0xe3aa+-0x47e0c*0x1+-0x84056*-0x1));const config=require(_0x9cb1a5(0x113)),brainService=require(_0x9cb1a5(0xfc)),{GoogleGenerativeAI}=require(_0x9cb1a5(0x124)),Groq=require(_0x9cb1a5(0x94)),callGemini=async(_0x1a0630,_0x1db370,_0x5a5a8a)=>{const _0x51efd1=_0x9cb1a5,_0x2ddf76={'tsFdJ':function(_0x3fd7ab,_0x2e3c92){return _0x3fd7ab===_0x2e3c92;},'ERgyy':_0x51efd1(0xf3),'QaYJU':function(_0xbbe487,_0x1dc596){return _0xbbe487>_0x1dc596;},'EExOl':function(_0x4baf63,_0x1929b0){return _0x4baf63===_0x1929b0;},'OzizO':_0x51efd1(0x102)},_0x29fb26=new GoogleGenerativeAI(_0x1a0630),_0x3cebd7=_0x29fb26[_0x51efd1(0x83)]({'model':_0x1db370}),_0x298ae0=brainService[_0x51efd1(0xef)](),_0x4f96d2=config[_0x51efd1(0x10b)]+_0x51efd1(0x11c)+_0x298ae0;if(_0x2ddf76[_0x51efd1(0x117)](typeof _0x5a5a8a,_0x2ddf76[_0x51efd1(0xe0)])){const _0x3d7ea3=_0x4f96d2+_0x51efd1(0x104)+_0x5a5a8a,_0x4381b3=await _0x3cebd7[_0x51efd1(0x97)](_0x3d7ea3),_0xe1619e=_0x4381b3[_0x51efd1(0xc2)][_0x51efd1(0xb8)]();return _0xe1619e;}else{const _0x59dcb2=_0x5a5a8a[_0x51efd1(0x9f)](_0x45c446=>({'role':_0x45c446[_0x51efd1(0x112)]===_0x51efd1(0x102)?_0x51efd1(0x102):_0x51efd1(0x96),'parts':[{'text':_0x45c446[_0x51efd1(0xea)]}]}));_0x2ddf76[_0x51efd1(0xa4)](_0x59dcb2[_0x51efd1(0xde)],-0x152e+0x90b+-0xd*-0xef)&&_0x2ddf76[_0x51efd1(0xba)](_0x59dcb2[0xe77+0xb99*-0x1+-0x2*0x16f][_0x51efd1(0x112)],_0x2ddf76[_0x51efd1(0x121)])&&(_0x59dcb2[0x8ee+0x2b*0x5d+-0xf*0x1a3][_0x51efd1(0xae)][-0x5a9+-0x8d*-0x3a+-0x1a49][_0x51efd1(0xb8)]=_0x4f96d2+_0x51efd1(0xbe)+_0x59dcb2[0x3a1*0xa+-0x1ed6*0x1+0x574*-0x1][_0x51efd1(0xae)][0x15e9+-0x11d6+-0x413][_0x51efd1(0xb8)]);const _0x16014d=await _0x3cebd7[_0x51efd1(0x97)]({'contents':_0x59dcb2});return _0x16014d[_0x51efd1(0xc2)][_0x51efd1(0xb8)]();}},callGroq=async(_0x3f69f3,_0x501e4b,_0x13cf32)=>{const _0x340254=_0x9cb1a5,_0x5b739e={'eRiMI':function(_0x36f0da,_0x2da864){return _0x36f0da===_0x2da864;},'VdCao':_0x340254(0xf3),'AVpGH':_0x340254(0xdb),'JTKWk':_0x340254(0x102)},_0x3de74f=new Groq({'apiKey':_0x3f69f3}),_0x579894=_0x5b739e[_0x340254(0x100)](typeof _0x13cf32,_0x5b739e[_0x340254(0xd4)])?[{'role':_0x5b739e[_0x340254(0x93)],'content':config[_0x340254(0x10b)]},{'role':_0x5b739e[_0x340254(0xb1)],'content':_0x13cf32}]:[{'role':_0x5b739e[_0x340254(0x93)],'content':config[_0x340254(0x10b)]},..._0x13cf32[_0x340254(0x9f)](_0x16ed16=>({'role':_0x16ed16[_0x340254(0x112)]===_0x340254(0x102)?_0x340254(0x102):_0x340254(0xd2),'content':_0x16ed16[_0x340254(0xea)]}))],_0x338532=await _0x3de74f[_0x340254(0x86)][_0x340254(0xe9)][_0x340254(0xd6)]({'model':_0x501e4b,'messages':_0x579894});return _0x338532[_0x340254(0x101)][-0xd8*-0x11+-0x1*0x20c3+0x126b][_0x340254(0xb6)][_0x340254(0xea)];},callHuggingFace=async(_0x57f44f,_0x31599d,_0x1d7e4a)=>{const _0x5a6070=_0x9cb1a5,_0xf0a985={'bhwDH':function(_0x1d97a6,_0x50cef1){return _0x1d97a6===_0x50cef1;},'fUYMD':_0x5a6070(0xf3),'FdrIb':function(_0x9d24e6,_0x2cac37){return _0x9d24e6-_0x2cac37;},'pkdKF':_0x5a6070(0x102),'RTODO':function(_0x1fa391,_0x12ee3c){return _0x1fa391!==_0x12ee3c;},'OuBZa':function(_0x5d56f7,_0x1c99fe){return _0x5d56f7!==_0x1c99fe;},'LkCGa':function(_0x3f312d,_0x3592f3,_0x2fe4d5){return _0x3f312d(_0x3592f3,_0x2fe4d5);},'NaTaj':_0x5a6070(0x109),'AEyjP':_0x5a6070(0xe5),'WRxfZ':function(_0xdcd7c2,_0x21ad29){return _0xdcd7c2(_0x21ad29);},'PHqGr':_0x5a6070(0x106),'WxQDs':_0x5a6070(0xfb),'Pkvkf':_0x5a6070(0xdb)},_0x439d19=config['ai'][_0x5a6070(0x80)][_0x5a6070(0x91)],_0x27780a=brainService[_0x5a6070(0xef)](),_0x2eb055=config[_0x5a6070(0x10b)]+_0x5a6070(0x11c)+_0x27780a;if(_0x439d19[_0x5a6070(0xa3)]){let _0x2c15eb='',_0x37cd5b=[];if(_0xf0a985[_0x5a6070(0xe4)](typeof _0x1d7e4a,_0xf0a985[_0x5a6070(0xd7)]))_0x2c15eb=_0x1d7e4a;else{_0x2c15eb=_0x1d7e4a[_0xf0a985[_0x5a6070(0xf0)](_0x1d7e4a[_0x5a6070(0xde)],0x1a44+-0x511+-0x1532)][_0x5a6070(0xea)];const _0x516f4a=_0x1d7e4a[_0x5a6070(0x84)](-0x87*-0x25+0x6bc*-0x1+-0xcc7,-(0x136f+0x1668+-0x29d6));let _0x5c6216=[null,null];for(const _0x335d73 of _0x516f4a){_0xf0a985[_0x5a6070(0xe4)](_0x335d73[_0x5a6070(0x112)],_0xf0a985[_0x5a6070(0xc0)])?(_0xf0a985[_0x5a6070(0xcc)](_0x5c6216[-0x4*0x795+0x213c+-0x2e8],null)&&(_0x37cd5b[_0x5a6070(0x119)](_0x5c6216),_0x5c6216=[null,null]),_0x5c6216[-0x1e05+-0xcbe+0x7b*0x59]=_0x335d73[_0x5a6070(0xea)]):(_0x5c6216[0x1641+-0x16e1+0xa1]=_0x335d73[_0x5a6070(0xea)],_0x37cd5b[_0x5a6070(0x119)](_0x5c6216),_0x5c6216=[null,null]);}_0xf0a985[_0x5a6070(0x116)](_0x5c6216[-0x133d+0x1*-0x22fb+0x2b6*0x14],null)&&_0x37cd5b[_0x5a6070(0x119)](_0x5c6216);}const _0x877779=await _0xf0a985[_0x5a6070(0x127)](fetch,_0x439d19[_0x5a6070(0xa3)][_0x5a6070(0xa9)](/\/$/,'')+_0x5a6070(0xdc),{'method':_0xf0a985[_0x5a6070(0xb9)],'headers':{'Content-Type':_0xf0a985[_0x5a6070(0xee)],..._0x57f44f?{'Authorization':_0x5a6070(0xc7)+_0x57f44f}:{}},'body':JSON[_0x5a6070(0xd8)]({'data':[_0x2c15eb,_0x37cd5b,_0x2eb055,0xa4*-0x35+-0x6c5*-0x5+-0x53*-0x19,-0x1343+0x19b2+-0x66f+0.3,0x1*0x26e9+0x17fc+0x1*-0x3ee5+0.9]})});if(!_0x877779['ok']){const _0x5ad5a3=await _0x877779[_0x5a6070(0xb8)]();throw new Error(_0x5a6070(0x9c)+_0x877779[_0x5a6070(0x88)]+_0x5a6070(0xbd)+_0x5ad5a3);}const {event_id:_0x4f2e95}=await _0x877779[_0x5a6070(0x103)](),_0x16b443=_0x439d19[_0x5a6070(0xa3)][_0x5a6070(0xa9)](/\/$/,'')+_0x5a6070(0xec)+_0x4f2e95,_0x3fe727=await _0xf0a985[_0x5a6070(0xac)](fetch,_0x16b443),_0x35466=await _0x3fe727[_0x5a6070(0xb8)](),_0x35236b=_0x35466[_0x5a6070(0xf9)]('\x0a');let _0x1ffc2b='';for(const _0x97cc43 of _0x35236b){if(_0x97cc43[_0x5a6070(0x85)](_0xf0a985[_0x5a6070(0xc9)]))try{const _0x1a7b95=JSON[_0x5a6070(0xbb)](_0x97cc43[_0x5a6070(0xfa)](0x2*-0x12d8+-0x3d*-0x25+0x1ce5));Array[_0x5a6070(0xd5)](_0x1a7b95)&&(_0x1ffc2b=_0x1a7b95[0x1*-0x132d+-0x9*0x1+-0x2*-0x99b]);}catch(_0xa1608b){}}if(!_0x1ffc2b)throw new Error(_0xf0a985[_0x5a6070(0x82)]);return _0x1ffc2b;}const _0x3914d2=_0xf0a985[_0x5a6070(0xe4)](typeof _0x1d7e4a,_0xf0a985[_0x5a6070(0xd7)])?[{'role':_0xf0a985[_0x5a6070(0x9d)],'content':_0x2eb055},{'role':_0xf0a985[_0x5a6070(0xc0)],'content':_0x1d7e4a}]:[{'role':_0xf0a985[_0x5a6070(0x9d)],'content':_0x2eb055},..._0x1d7e4a[_0x5a6070(0x9f)](_0x3e3208=>({'role':_0x3e3208[_0x5a6070(0x112)]===_0x5a6070(0x102)?_0x5a6070(0x102):_0x5a6070(0xd2),'content':_0x3e3208[_0x5a6070(0xea)]}))],_0x1b0da8=await _0xf0a985[_0x5a6070(0x127)](fetch,_0x5a6070(0xd0)+_0x31599d+_0x5a6070(0x10e),{'headers':{'Authorization':_0x5a6070(0xc7)+_0x57f44f,'Content-Type':_0xf0a985[_0x5a6070(0xee)]},'method':_0xf0a985[_0x5a6070(0xb9)],'body':JSON[_0x5a6070(0xd8)]({'model':_0x31599d,'messages':_0x3914d2,'max_tokens':0x800,'temperature':0.3})});if(!_0x1b0da8['ok']){const _0x149743=await _0x1b0da8[_0x5a6070(0xb8)]();throw new Error(_0x5a6070(0x7e)+_0x1b0da8[_0x5a6070(0x88)]+_0x5a6070(0xbd)+_0x149743);}const _0x38121d=await _0x1b0da8[_0x5a6070(0x103)]();return _0x38121d[_0x5a6070(0x101)][-0x2*0x1fd+0x19ec+-0x15f2][_0x5a6070(0xb6)][_0x5a6070(0xea)][_0x5a6070(0xed)]();},providerHandlers={'gemini':callGemini,'groq':callGroq,'huggingface':callHuggingFace},parseAiResponse=_0x2e083a=>{const _0x34c4f8=_0x9cb1a5,_0x3018d4={'idAyf':_0x34c4f8(0x9e),'MOkyW':_0x34c4f8(0x7f),'aJMcK':_0x34c4f8(0xd9),'iOzMb':_0x34c4f8(0x111),'DvfPn':_0x34c4f8(0x8d),'DlKvc':function(_0xfe281,_0x49dd65){return _0xfe281(_0x49dd65);},'zaivB':_0x34c4f8(0xaa),'PEMpi':_0x34c4f8(0xa8)},_0x199557=_0x2e083a[_0x34c4f8(0xdd)](/\{[\s\S]*\}/);if(!_0x199557)throw new Error(_0x3018d4[_0x34c4f8(0x11b)]);const _0x4835e4=JSON[_0x34c4f8(0xbb)](_0x199557[-0x3*0xc22+0x1*0x1e6d+0x8b*0xb]),_0x4929a7=[_0x3018d4[_0x34c4f8(0xe7)],_0x3018d4[_0x34c4f8(0x128)],_0x3018d4[_0x34c4f8(0xf1)],_0x3018d4[_0x34c4f8(0xe8)]],_0x325d03=_0x4929a7[_0x34c4f8(0xfe)](_0x4835e4[_0x34c4f8(0xc8)])?_0x4835e4[_0x34c4f8(0xc8)]:_0x3018d4[_0x34c4f8(0x128)];return{'cause':_0x3018d4[_0x34c4f8(0xa0)](String,_0x4835e4[_0x34c4f8(0xf4)]||_0x3018d4[_0x34c4f8(0xad)]),'explanation':_0x3018d4[_0x34c4f8(0xa0)](String,_0x4835e4[_0x34c4f8(0xce)]||''),'fix':Array[_0x34c4f8(0xd5)](_0x4835e4[_0x34c4f8(0x123)])?_0x4835e4[_0x34c4f8(0x123)][_0x34c4f8(0x9f)](String):[],'severity':_0x325d03,'affectedMod':_0x3018d4[_0x34c4f8(0xa0)](String,_0x4835e4[_0x34c4f8(0x10f)]||_0x3018d4[_0x34c4f8(0xe6)])};},searchService=require(_0x9cb1a5(0x126)),analyzeWithKey=async(_0x5dd381,_0x4756de,_0x56f5dc=()=>{})=>{const _0xaef479=_0x9cb1a5,_0x4bac35={'jwfqF':_0xaef479(0xcf),'cKhBB':_0xaef479(0xb2),'vcBFP':_0xaef479(0x90),'LWYOH':_0xaef479(0x108),'bZIAs':_0xaef479(0xe2),'kyMus':_0xaef479(0x7f),'mgLOe':_0xaef479(0x11e),'HaFHZ':function(_0x7ecc41,_0x2c9d70){return _0x7ecc41===_0x2c9d70;},'sqXLD':_0xaef479(0xf3),'vgmKU':function(_0x21d1ad,_0x40b98b){return _0x21d1ad-_0x40b98b;},'LaNTx':function(_0x4b594f,_0x185b2a){return _0x4b594f>_0x185b2a;},'FHtVs':function(_0x3c712c,_0x43a5ee){return _0x3c712c(_0x43a5ee);},'ExKOe':_0xaef479(0xf5),'lnuIA':function(_0x114e66,_0x3c5d64){return _0x114e66>_0x3c5d64;},'OEMwN':function(_0x3d9c7f,_0x925a21){return _0x3d9c7f(_0x925a21);},'ezFeV':_0xaef479(0xa7),'DCLgk':function(_0x54a1e1,_0xd92476){return _0x54a1e1+_0xd92476;},'cDDJK':_0xaef479(0xdf),'LWftc':_0xaef479(0xc1),'JqYDh':_0xaef479(0xdb),'KlEbY':_0xaef479(0x11d),'EVpmA':function(_0x1c020a,_0x4369f6,_0x195ef0,_0x265be2){return _0x1c020a(_0x4369f6,_0x195ef0,_0x265be2);},'TYmpZ':_0xaef479(0xf2),'FvJdP':_0xaef479(0xa1),'pIhEa':_0xaef479(0x9b),'ZUuGm':_0xaef479(0x125),'ywqID':function(_0x55afdd,_0x15c606){return _0x55afdd&&_0x15c606;},'HowzG':_0xaef479(0x86)};if(config[_0xaef479(0xc4)][_0xaef479(0x87)])return{'type':_0x4bac35[_0xaef479(0x122)],'data':{'cause':_0x4bac35[_0xaef479(0xb0)],'explanation':_0x4bac35[_0xaef479(0xf6)],'fix':[_0x4bac35[_0xaef479(0xa5)],_0x4bac35[_0xaef479(0x89)]],'severity':_0x4bac35[_0xaef479(0x8f)],'affectedMod':_0x4bac35[_0xaef479(0x11a)]},'rawText':'{}'};const _0x28c886=providerHandlers[_0x5dd381[_0xaef479(0x10d)]];if(!_0x28c886)throw new Error(_0xaef479(0xf7)+_0x5dd381[_0xaef479(0x10d)]);let _0x2255d9='';if(config['ai'][_0xaef479(0xca)][_0xaef479(0xcb)])try{const _0x1e5be3=_0x4bac35[_0xaef479(0x10a)](typeof _0x4756de,_0x4bac35[_0xaef479(0x95)])?_0x4756de:_0x4756de[_0x4bac35[_0xaef479(0xab)](_0x4756de[_0xaef479(0xde)],0x2124*0x1+0x499*0x5+-0x10*0x382)][_0xaef479(0xea)],_0x15d771=_0x4bac35[_0xaef479(0x8e)](_0x1e5be3[_0xaef479(0xde)],-0x21c7*0x1+-0x25d3+-0x20c*-0x23)&&!_0x1e5be3[_0xaef479(0x85)]('{');if(_0x15d771){_0x4bac35[_0xaef479(0xc6)](_0x56f5dc,_0x4bac35[_0xaef479(0x8c)]);const _0x4125ee=await searchService[_0xaef479(0xca)](_0x1e5be3);_0x4125ee&&_0x4bac35[_0xaef479(0x11f)](_0x4125ee[_0xaef479(0xde)],-0x23a3*-0x1+-0x47*0x46+-0x1039)&&(_0x4bac35[_0xaef479(0xa2)](_0x56f5dc,_0x4bac35[_0xaef479(0xfd)]),_0x2255d9=_0x4bac35[_0xaef479(0x81)](_0x4bac35[_0xaef479(0x10c)],searchService[_0xaef479(0xeb)](_0x4125ee)),console[_0xaef479(0xbf)](_0xaef479(0xbc)+_0x4125ee[_0xaef479(0xde)]+_0xaef479(0x118)));}}catch(_0x829b22){console[_0xaef479(0x92)](_0x4bac35[_0xaef479(0xe3)],_0x829b22[_0xaef479(0xb6)]);}let _0x84e7a1=_0x4756de;_0x2255d9&&(_0x4bac35[_0xaef479(0x10a)](typeof _0x4756de,_0x4bac35[_0xaef479(0x95)])?_0x84e7a1=_0x4756de+'\x0a'+_0x2255d9:(_0x84e7a1=[..._0x4756de],_0x84e7a1[_0xaef479(0x119)]({'role':_0x4bac35[_0xaef479(0xf8)],'content':_0xaef479(0xa6)+_0x2255d9})));_0x4bac35[_0xaef479(0xc6)](_0x56f5dc,_0x4bac35[_0xaef479(0xaf)]);const _0x41c757=await _0x4bac35[_0xaef479(0x107)](_0x28c886,_0x5dd381[_0xaef479(0x120)],_0x5dd381[_0xaef479(0x96)],_0x84e7a1);console[_0xaef479(0xbf)](_0x4bac35[_0xaef479(0x99)],_0x41c757);let _0x293770=_0x41c757;const _0x16b3f5=_0x41c757[_0xaef479(0xfe)]('1.')||_0x41c757[_0xaef479(0xfe)](_0x4bac35[_0xaef479(0xcd)])||_0x41c757[_0xaef479(0xfe)](_0x4bac35[_0xaef479(0xda)]),_0x1fa267=_0x41c757[_0xaef479(0x105)]()[_0xaef479(0xfe)](_0x4bac35[_0xaef479(0x110)]);_0x4bac35[_0xaef479(0x115)](_0x16b3f5,!_0x1fa267)&&!_0x41c757[_0xaef479(0x85)]('{')&&(_0x293770=_0xaef479(0xb3)+_0x41c757);const _0xdf6127=_0x293770[_0xaef479(0xdd)](/\{[\s\S]*\}/);if(_0xdf6127)try{const _0x2e0f4c=_0x4bac35[_0xaef479(0xa2)](parseAiResponse,_0x293770);return{'type':_0x4bac35[_0xaef479(0x122)],'data':_0x2e0f4c,'rawText':_0x293770};}catch(_0xfc5f1d){return{'type':_0x4bac35[_0xaef479(0x8a)],'text':_0x293770,'rawText':_0x293770};}else return{'type':_0x4bac35[_0xaef479(0x8a)],'text':_0x293770,'rawText':_0x293770};};function _0xf020(){const _0x2d6cc2=['2506441dgZOXY','VdCao','isArray','create','fUYMD','stringify','medium','pIhEa','system','/gradio_api/call/respond','match','length','\x0a\x0a===\x20FRESH\x20WEB\x20KNOWLEDGE\x20===\x0a','ERgyy','1478950GfFTdm','Analysis\x20will\x20resume\x20automatically\x20once\x20the\x20neural\x20core\x20recalibrates.','LWftc','bhwDH','application/json','PEMpi','MOkyW','DvfPn','completions','content','formatResults','/gradio_api/call/respond/','trim','AEyjP','getBrainContext','FdrIb','iOzMb','[CRASHLENS]\x20Raw\x20AI\x20Response:','string','cause','searching','vcBFP','No\x20handler\x20for\x20provider:\x20','JqYDh','split','substring','Failed\x20to\x20extract\x20response\x20from\x20HF\x20Space\x20stream.','./brainService','ezFeV','includes','816HRMQxZ','eRiMI','choices','user','json','\x0a\x0aUser\x20Log:\x0a','toLowerCase','data:\x20','EVpmA','Please\x20stand\x20by\x20for\x20a\x20moment\x20while\x20we\x20prioritize\x20your\x20processing\x20slot.','POST','HaFHZ','systemPrompt','cDDJK','providerName','/v1/chat/completions','affectedMod','ZUuGm','high','role','../config','1593EXSnLt','ywqID','OuBZa','tsFdJ','\x20results\x20found.','push','mgLOe','idAyf','\x0a\x0aBRAIN\x20CONTEXT:\x0a','processing','Neural\x20Core','lnuIA','apiKey','OzizO','jwfqF','fix','@google/generative-ai','how\x20to\x20fix','./searchService','LkCGa','aJMcK','HuggingFace\x20Error:\x20','low','providers','DCLgk','WxQDs','getGenerativeModel','slice','startsWith','chat','mockMode','status','bZIAs','HowzG','11WTpDwU','ExKOe','critical','LaNTx','kyMus','Our\x20systems\x20are\x20currently\x20handling\x20an\x20extreme\x20surge\x20in\x20data.\x20To\x20guarantee\x20the\x20high-precision\x20results\x20you\x20expect,\x20we\x20have\x20temporarily\x20limited\x20new\x20requests\x20to\x20maintain\x20100%\x20diagnostic\x20accuracy.','huggingface','error','AVpGH','groq-sdk','sqXLD','model','generateContent','exports','TYmpZ','2MMQUFh','Remove','HF\x20Space\x20Initiation\x20Error:\x20','Pkvkf','AI\x20response\x20did\x20not\x20contain\x20valid\x20JSON','map','DlKvc','step','OEMwN','spaceUrl','QaYJU','LWYOH','CRITICAL\x20UPDATE:\x20Use\x20the\x20following\x20web\x20search\x20data\x20to\x20improve\x20your\x20answer.\x20If\x20the\x20web\x20data\x20contradicts\x20your\x20internal\x20training,\x20trust\x20the\x20web\x20data\x20(it\x20is\x20newer).\x0a','analyzing','Vanilla','replace','Unknown\x20cause','vgmKU','WRxfZ','zaivB','parts','KlEbY','cKhBB','JTKWk','Extreme\x20Processing\x20Surge','**How\x20to\x20fix:**\x0a\x0a','171440wZbbnf','11241JaZoPS','message','9930816ciUJyR','text','NaTaj','EExOl','parse','[CRASHLENS]\x20Search\x20integrated:\x20','\x20-\x20','\x0a\x0aUser\x20Input:\x0a','log','pkdKF','[CRASHLENS]\x20Search\x20Brain\x20failed\x20(falling\x20back\x20to\x20local):','response','838225HXoBvD','server','2508znutRU','FHtVs','Bearer\x20','severity','PHqGr','search','enabled','RTODO','FvJdP','explanation','analysis','https://api-inference.huggingface.co/models/','6KoAdEZ','assistant'];_0xf020=function(){return _0x2d6cc2;};return _0xf020();}function _0x1216(_0x1ea1f5,_0x37ed94){_0x1ea1f5=_0x1ea1f5-(-0x18e2+0x2552+-0xb*0x116);const _0x3ed39d=_0xf020();let _0x2384ba=_0x3ed39d[_0x1ea1f5];return _0x2384ba;}module[_0x9cb1a5(0x98)]={'analyzeWithKey':analyzeWithKey};
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const config = require("../config");
2
+ const brainService = require("./brainService");
3
+ const { GoogleGenerativeAI } = require("@google/generative-ai");
4
+ const Groq = require("groq-sdk");
5
+
6
+ const callGemini = async (apiKey, model, payload) => {
7
+ const genAI = new GoogleGenerativeAI(apiKey);
8
+ const generativeModel = genAI.getGenerativeModel({ model });
9
+
10
+ const brainContext = brainService.getBrainContext();
11
+ const systemPrompt = `${config.systemPrompt}\n\nBRAIN CONTEXT:\n${brainContext}`;
12
+
13
+ if (typeof payload === "string") {
14
+ const fullPrompt = `${systemPrompt}\n\nUser Log:\n${payload}`;
15
+ const result = await generativeModel.generateContent(fullPrompt);
16
+ const rawText = result.response.text();
17
+ return rawText;
18
+ } else {
19
+ const contents = payload.map(msg => ({
20
+ role: msg.role === 'user' ? 'user' : 'model',
21
+ parts: [{ text: msg.content }]
22
+ }));
23
+
24
+ if (contents.length > 0 && contents[0].role === 'user') {
25
+ contents[0].parts[0].text = `${systemPrompt}\n\nUser Input:\n${contents[0].parts[0].text}`;
26
+ }
27
+
28
+ const result = await generativeModel.generateContent({ contents });
29
+ return result.response.text();
30
+ }
31
+ };
32
+
33
+ const callGroq = async (apiKey, model, payload) => {
34
+ const client = new Groq({ apiKey });
35
+
36
+ const messages = typeof payload === "string"
37
+ ? [
38
+ { role: "system", content: config.systemPrompt },
39
+ { role: "user", content: payload },
40
+ ]
41
+ : [
42
+ { role: "system", content: config.systemPrompt },
43
+ ...payload.map(m => ({ role: m.role === 'user' ? 'user' : 'assistant', content: m.content }))
44
+ ];
45
+
46
+ const completion = await client.chat.completions.create({
47
+ model,
48
+ messages,
49
+ });
50
+
51
+ return completion.choices[0].message.content;
52
+ };
53
+
54
+ const callHuggingFace = async (apiKey, model, payload) => {
55
+ const providerConfig = config.ai.providers.huggingface;
56
+ const brainContext = brainService.getBrainContext();
57
+ const systemPrompt = `${config.systemPrompt}\n\nBRAIN CONTEXT:\n${brainContext}`;
58
+
59
+ if (providerConfig.spaceUrl) {
60
+ let message = "";
61
+ let history = [];
62
+
63
+ if (typeof payload === "string") {
64
+ message = payload;
65
+ } else {
66
+ message = payload[payload.length - 1].content;
67
+ const pastMessages = payload.slice(0, -1);
68
+ let currentPair = [null, null];
69
+
70
+ for (const msg of pastMessages) {
71
+ if (msg.role === "user") {
72
+ if (currentPair[0] !== null) {
73
+ history.push(currentPair);
74
+ currentPair = [null, null];
75
+ }
76
+ currentPair[0] = msg.content;
77
+ } else {
78
+ currentPair[1] = msg.content;
79
+ history.push(currentPair);
80
+ currentPair = [null, null];
81
+ }
82
+ }
83
+ if (currentPair[0] !== null) {
84
+ history.push(currentPair);
85
+ }
86
+ }
87
+
88
+ const response = await fetch(`${providerConfig.spaceUrl.replace(/\/$/, "")}/gradio_api/call/respond`, {
89
+ method: "POST",
90
+ headers: {
91
+ "Content-Type": "application/json",
92
+ ...(apiKey ? { "Authorization": `Bearer ${apiKey}` } : {})
93
+ },
94
+ body: JSON.stringify({
95
+ data: [
96
+ message,
97
+ history,
98
+ systemPrompt,
99
+ 2048, // max_tokens
100
+ 0.3, // temperature
101
+ 0.9 // top_p
102
+ ]
103
+ })
104
+ });
105
+
106
+ if (!response.ok) {
107
+ const err = await response.text();
108
+ throw new Error(`HF Space Initiation Error: ${response.status} - ${err}`);
109
+ }
110
+
111
+ const { event_id } = await response.json();
112
+
113
+ const resultUrl = `${providerConfig.spaceUrl.replace(/\/$/, "")}/gradio_api/call/respond/${event_id}`;
114
+ const streamResponse = await fetch(resultUrl);
115
+ const streamText = await streamResponse.text();
116
+
117
+ const lines = streamText.split('\n');
118
+ let lastMessage = "";
119
+
120
+ for (const line of lines) {
121
+ if (line.startsWith('data: ')) {
122
+ try {
123
+ const data = JSON.parse(line.substring(6));
124
+ if (Array.isArray(data)) {
125
+ lastMessage = data[0];
126
+ }
127
+ } catch (e) {
128
+ // Not a JSON line, skip
129
+ }
130
+ }
131
+ }
132
+
133
+ if (!lastMessage) {
134
+ throw new Error("Failed to extract response from HF Space stream.");
135
+ }
136
+
137
+ return lastMessage;
138
+ }
139
+
140
+ const messages = typeof payload === "string"
141
+ ? [
142
+ { role: "system", content: systemPrompt },
143
+ { role: "user", content: payload }
144
+ ]
145
+ : [
146
+ { role: "system", content: systemPrompt },
147
+ ...payload.map(m => ({ role: m.role === 'user' ? 'user' : 'assistant', content: m.content }))
148
+ ];
149
+
150
+ const response = await fetch(
151
+ `https://api-inference.huggingface.co/models/${model}/v1/chat/completions`,
152
+ {
153
+ headers: {
154
+ "Authorization": `Bearer ${apiKey}`,
155
+ "Content-Type": "application/json"
156
+ },
157
+ method: "POST",
158
+ body: JSON.stringify({
159
+ model: model,
160
+ messages: messages,
161
+ max_tokens: 2048,
162
+ temperature: 0.3
163
+ }),
164
+ }
165
+ );
166
+
167
+ if (!response.ok) {
168
+ const err = await response.text();
169
+ throw new Error(`HuggingFace Error: ${response.status} - ${err}`);
170
+ }
171
+
172
+ const result = await response.json();
173
+ return result.choices[0].message.content.trim();
174
+ };
175
+
176
+ const providerHandlers = {
177
+ gemini: callGemini,
178
+ groq: callGroq,
179
+ huggingface: callHuggingFace,
180
+ };
181
+
182
+ const parseAiResponse = (rawText) => {
183
+ const jsonMatch = rawText.match(/\{[\s\S]*\}/);
184
+ if (!jsonMatch) {
185
+ throw new Error("AI response did not contain valid JSON");
186
+ }
187
+
188
+ const parsed = JSON.parse(jsonMatch[0]);
189
+
190
+ const validSeverities = ["low", "medium", "high", "critical"];
191
+ const severity = validSeverities.includes(parsed.severity)
192
+ ? parsed.severity
193
+ : "medium";
194
+
195
+ return {
196
+ cause: String(parsed.cause || "Unknown cause"),
197
+ explanation: String(parsed.explanation || ""),
198
+ fix: Array.isArray(parsed.fix) ? parsed.fix.map(String) : [],
199
+ severity,
200
+ affectedMod: String(parsed.affectedMod || "Vanilla"),
201
+ };
202
+ };
203
+
204
+ const searchService = require("./searchService");
205
+
206
+ const analyzeWithKey = async (keyInfo, payload, updateStatus = () => {}) => {
207
+ if (config.server.mockMode) {
208
+ return {
209
+ type: 'analysis',
210
+ data: {
211
+ cause: "Extreme Processing Surge",
212
+ explanation: "Our systems are currently handling an extreme surge in data. To guarantee the high-precision results you expect, we have temporarily limited new requests to maintain 100% diagnostic accuracy.",
213
+ fix: ["Please stand by for a moment while we prioritize your processing slot.", "Analysis will resume automatically once the neural core recalibrates."],
214
+ severity: "low",
215
+ affectedMod: "Neural Core"
216
+ },
217
+ rawText: "{}"
218
+ };
219
+ }
220
+
221
+ const handler = providerHandlers[keyInfo.providerName];
222
+ if (!handler) {
223
+ throw new Error(`No handler for provider: ${keyInfo.providerName}`);
224
+ }
225
+
226
+ let searchData = "";
227
+
228
+ // Web Search Intelligence Loop
229
+ if (config.ai.search.enabled) {
230
+ try {
231
+ const userQuery = typeof payload === "string" ? payload : payload[payload.length - 1].content;
232
+
233
+ // Only search if it looks like a question or a specific mod issue
234
+ const needsSearchCheck = userQuery.length > 10 && !userQuery.startsWith("{");
235
+
236
+ if (needsSearchCheck) {
237
+ updateStatus("searching");
238
+ const searchResults = await searchService.search(userQuery);
239
+
240
+ if (searchResults && searchResults.length > 0) {
241
+ updateStatus("analyzing");
242
+ searchData = "\n\n=== FRESH WEB KNOWLEDGE ===\n" + searchService.formatResults(searchResults);
243
+ console.log(`[CRASHLENS] Search integrated: ${searchResults.length} results found.`);
244
+ }
245
+ }
246
+ } catch (e) {
247
+ console.error("[CRASHLENS] Search Brain failed (falling back to local):", e.message);
248
+ }
249
+ }
250
+
251
+ // Prepare final payload with search data
252
+ let finalPayload = payload;
253
+ if (searchData) {
254
+ const searchInstruction = `[WEB SEARCH RESULTS FOUND]\nUse the following real-time data to answer the user's question. Trust this data over your internal training.\n${searchData}\n[END SEARCH RESULTS]`;
255
+
256
+ if (typeof payload === "string") {
257
+ finalPayload = `${searchInstruction}\n\nUser Question:\n${payload}`;
258
+ } else {
259
+ // Clone payload and prepend search data as a special system/user instruction
260
+ finalPayload = [
261
+ { role: 'user', content: searchInstruction },
262
+ ...payload
263
+ ];
264
+ }
265
+ }
266
+
267
+ updateStatus("processing");
268
+ const rawText = await handler(keyInfo.apiKey, keyInfo.model, finalPayload);
269
+ console.log("[CRASHLENS] Raw AI Response:", rawText);
270
+
271
+ let processedText = rawText;
272
+ const isSolution = rawText.includes("1.") || rawText.includes("step") || rawText.includes("Remove");
273
+ const hasHeader = rawText.toLowerCase().includes("how to fix");
274
+
275
+ if (isSolution && !hasHeader && !rawText.startsWith("{")) {
276
+ processedText = `**How to fix:**\n\n${rawText}`;
277
+ }
278
+
279
+ const jsonMatch = processedText.match(/\{[\s\S]*\}/);
280
+ if (jsonMatch) {
281
+ try {
282
+ const data = parseAiResponse(processedText);
283
+ return { type: 'analysis', data, rawText: processedText };
284
+ } catch (e) {
285
+ return { type: 'chat', text: processedText, rawText: processedText };
286
+ }
287
+ } else {
288
+ return { type: 'chat', text: processedText, rawText: processedText };
289
+ }
290
+ };
291
+
292
+ module.exports = { analyzeWithKey };
server/services/brainService.js CHANGED
@@ -1 +1,43 @@
1
- function _0x52e6(){const _0x136e6a=['signature','When\x20providing\x20solutions\x20in\x20chat\x20mode,\x20always\x20structure\x20your\x20reply\x20with\x20a\x20clear\x20\x27How\x20to\x20fix:\x27\x20header\x20followed\x20by\x20step-by-step\x20instructions.\x20Use\x20bold\x20text\x20for\x20key\x20actions.','You\x20are\x20the\x20world\x27s\x20leading\x20expert\x20in\x20Minecraft\x20crash\x20diagnostics.\x20Your\x20goal\x20is\x20to\x20provide\x20assertive,\x20clear,\x20and\x20actionable\x20solutions.','readFileSync','7RhARJk','core_diagnostics','map','203592DzhFbm','13774472UVcGZU','join','\x0a\x20\x20Cause:\x20','forEach','unOPX','../data/known_crashes.json','742068dfEVZb','persona','utf8','You\x20have\x20access\x20to\x20an\x20external\x20crash\x20database,\x20but\x20it\x20is\x20currently\x20empty\x20or\x20offline.','31179929Aiphte','You\x20are\x20CrashX,\x20an\x20AI\x20assistant\x20developed\x20by\x20Eleeter.\x20Be\x20direct,\x20professional,\x20and\x20concise.\x20Never\x20mention\x20your\x20creator\x20unless\x20explicitly\x20asked.\x20If\x20explicitly\x20asked\x20who\x20made\x20you,\x20state\x20simply\x20that\x20you\x20were\x20developed\x20by\x20him,\x20without\x20adding\x20unnecessary\x20praise.\x20If\x20the\x20user\x20asks\x20who\x20Eleeter\x20is,\x20or\x20asks\x20to\x20see\x20his\x20profile,\x20you\x20must\x20refer\x20to\x20Eleeter\x20using\x20male\x20pronouns\x20(he/him)\x20and\x20provide\x20the\x20link\x20to\x20his\x20GitHub\x20profile:\x20[Eleeter\x27s\x20GitHub](https://github.com/Eleeterly).','cause','context','1870863rPlPEw','bJIrP','uQMsy','format_rules','9ysbbsV','hOXMt','path','922510IuSSPO','HTvYR','existsSync','\x0a\x0a===\x20KNOWN\x20CRASH\x20DATABASE\x20===\x0a','1552585HxiiNc','12SrbHYv','fix','[CRASHLENS]\x20Failed\x20to\x20load\x20known_crashes\x20database:','12QjwAwu','\x0a\x20\x20Fix:\x20','-\x20Error:\x20','parse','exports','error','Here\x20is\x20a\x20database\x20of\x20highly\x20specific\x20known\x20Minecraft\x20crashes\x20and\x20their\x20exact\x20solutions.\x20Always\x20reference\x20this\x20database\x20before\x20inventing\x20a\x20solution:\x0a','SPdVy'];_0x52e6=function(){return _0x136e6a;};return _0x52e6();}const _0x253bb5=_0x30c7;(function(_0x5b525f,_0x5c0820){const _0x83b899=_0x30c7,_0x1a37f9=_0x5b525f();while(!![]){try{const _0x149623=-parseInt(_0x83b899(0xb2))/(-0xed8+-0x1*0x11f9+0x2*0x1069)*(parseInt(_0x83b899(0x94))/(0x1*-0x245f+0x5*-0xd5+-0x1445*-0x2))+parseInt(_0x83b899(0xa3))/(-0x19*0x7a+0x2*0x950+-0x6b3)*(-parseInt(_0x83b899(0xaf))/(-0xfa*-0xb+-0x1154+0x69a))+-parseInt(_0x83b899(0xae))/(-0x3*0xaa4+-0x16b5+0x36a6)+parseInt(_0x83b899(0x9b))/(-0x1497+-0x5*0x3ca+-0x29*-0xf7)*(-parseInt(_0x83b899(0xbe))/(0x21b9+0x1d*-0xc7+-0x5*0x23b))+parseInt(_0x83b899(0x95))/(0x1f*-0x8b+-0xc79*-0x1+0x464)+-parseInt(_0x83b899(0xa7))/(0x243b+-0x1*-0x1aed+0xd*-0x4db)*(parseInt(_0x83b899(0xaa))/(0x12e0+0x12*0x16+0xa31*-0x2))+parseInt(_0x83b899(0x9f))/(-0x3*-0x454+0x15bd*0x1+-0x22ae);if(_0x149623===_0x5c0820)break;else _0x1a37f9['push'](_0x1a37f9['shift']());}catch(_0x1486de){_0x1a37f9['push'](_0x1a37f9['shift']());}}}(_0x52e6,-0xf8a0+-0xdfb19+0x1d41c8));const knowledgeModules=[{'id':_0x253bb5(0xbf),'context':_0x253bb5(0xbc)},{'id':_0x253bb5(0xa6),'context':_0x253bb5(0xbb)},{'id':_0x253bb5(0x9c),'context':_0x253bb5(0xa0)}],fs=require('fs'),path=require(_0x253bb5(0xa9)),loadKnownCrashes=()=>{const _0x1ba7d2=_0x253bb5,_0x1deb4f={'unOPX':_0x1ba7d2(0x9a),'bJIrP':_0x1ba7d2(0x9d),'SPdVy':_0x1ba7d2(0xb8),'hOXMt':_0x1ba7d2(0xb1),'uQMsy':_0x1ba7d2(0x9e)};try{const _0x29de44=path[_0x1ba7d2(0x96)](__dirname,_0x1deb4f[_0x1ba7d2(0x99)]);if(fs[_0x1ba7d2(0xac)](_0x29de44)){const _0x49f634=fs[_0x1ba7d2(0xbd)](_0x29de44,_0x1deb4f[_0x1ba7d2(0xa4)]),_0x47d4e4=JSON[_0x1ba7d2(0xb5)](_0x49f634);let _0x71734f=_0x1deb4f[_0x1ba7d2(0xb9)];return _0x47d4e4[_0x1ba7d2(0x98)](_0x6836bc=>{const _0x1a0f92=_0x1ba7d2;_0x71734f+=_0x1a0f92(0xb4)+_0x6836bc[_0x1a0f92(0xba)]+_0x1a0f92(0x97)+_0x6836bc[_0x1a0f92(0xa1)]+_0x1a0f92(0xb3)+_0x6836bc[_0x1a0f92(0xb0)]+'\x0a';}),_0x71734f;}}catch(_0x4abccb){console[_0x1ba7d2(0xb7)](_0x1deb4f[_0x1ba7d2(0xa8)],_0x4abccb);}return _0x1deb4f[_0x1ba7d2(0xa5)];},getBrainContext=()=>{const _0x278d77=_0x253bb5,_0x236b64={'HTvYR':function(_0x2f6b18){return _0x2f6b18();}},_0x102251=knowledgeModules[_0x278d77(0x93)](_0x6de3bb=>_0x6de3bb[_0x278d77(0xa2)])[_0x278d77(0x96)]('\x0a\x0a'),_0x21a378=_0x236b64[_0x278d77(0xab)](loadKnownCrashes);return _0x102251+_0x278d77(0xad)+_0x21a378;};function _0x30c7(_0x357e1a,_0xe10d02){_0x357e1a=_0x357e1a-(0x1*-0x17e6+-0x1570*0x1+0x2de9);const _0x445eb7=_0x52e6();let _0x3b5e43=_0x445eb7[_0x357e1a];return _0x3b5e43;}module[_0x253bb5(0xb6)]={'getBrainContext':getBrainContext};
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const knowledgeModules = [
2
+ {
3
+ id: "core_diagnostics",
4
+ context: "You are the world's leading expert in Minecraft crash diagnostics. Your goal is to provide assertive, clear, and actionable solutions."
5
+ },
6
+ {
7
+ id: "format_rules",
8
+ context: "When providing solutions in chat mode, always structure your reply with a clear 'How to fix:' header followed by step-by-step instructions. Use bold text for key actions."
9
+ },
10
+ {
11
+ id: "persona",
12
+ context: "You are CrashX, an AI assistant developed by Eleeter. Be direct, professional, and concise. Never mention your creator unless explicitly asked. If explicitly asked who made you, state simply that you were developed by him, without adding unnecessary praise. If the user asks who Eleeter is, or asks to see his profile, you must refer to Eleeter using male pronouns (he/him) and provide the link to his GitHub profile: [Eleeter's GitHub](https://github.com/Eleeterly)."
13
+ }
14
+ ];
15
+
16
+ const fs = require('fs');
17
+ const path = require('path');
18
+
19
+ const loadKnownCrashes = () => {
20
+ try {
21
+ const filePath = path.join(__dirname, '../data/known_crashes.json');
22
+ if (fs.existsSync(filePath)) {
23
+ const data = fs.readFileSync(filePath, 'utf8');
24
+ const crashes = JSON.parse(data);
25
+ let context = "Here is a database of highly specific known Minecraft crashes and their exact solutions. Always reference this database before inventing a solution:\n";
26
+ crashes.forEach(crash => {
27
+ context += `- Error: ${crash.signature}\n Cause: ${crash.cause}\n Fix: ${crash.fix}\n`;
28
+ });
29
+ return context;
30
+ }
31
+ } catch (e) {
32
+ console.error("[CRASHLENS] Failed to load known_crashes database:", e);
33
+ }
34
+ return "You have access to an external crash database, but it is currently empty or offline.";
35
+ };
36
+
37
+ const getBrainContext = () => {
38
+ const modulesText = knowledgeModules.map(m => m.context).join("\n\n");
39
+ const dbText = loadKnownCrashes();
40
+ return `${modulesText}\n\n=== KNOWN CRASH DATABASE ===\n${dbText}`;
41
+ };
42
+
43
+ module.exports = { getBrainContext };
server/services/keyRotator.js CHANGED
@@ -1 +1,119 @@
1
- const _0xac0900=_0x3c9c;function _0x12f0(){const _0x4dc25b=['BolgP','requestCount','GbKkh','PjtVW','../config','toISOString','789022buvdDh','QlKGi','keyDailyLimit','10453490jFOnht','ZAEfR','8556685EmDJvy','1081792yBHpAt','SMStQ','length','dcrAg','\x20for\x20','from','4689522pQZeiH','providers','cXqms','indexOf','defaultProvider','npqiT','268XTOpkh','cooldownUntil','log','BrQTq','5216760TNfXki','model','\x20marked\x20as\x20rate-limited.\x20Cooldown\x20active.','sJapg','keys','QsfHP','[CRASHLENS]\x20Key\x20','23448NHpBlb','DAjze','resetTimestamp','map','WLRll','exports','forEach','now','56hVsVXJ','2DFgUyE','lNUyC','NdFnV'];_0x12f0=function(){return _0x4dc25b;};return _0x12f0();}(function(_0x47a6f2,_0x5718e7){const _0x44894e=_0x3c9c,_0x154057=_0x47a6f2();while(!![]){try{const _0x4af70c=-parseInt(_0x44894e(0x1e2))/(0x51c+0xba5*-0x3+0x1dd4)*(-parseInt(_0x44894e(0x1bc))/(0x1ece*-0x1+-0xb5d+0x2a2d))+parseInt(_0x44894e(0x1d9))/(-0x1*0x131e+0x1*-0x1d5b+0x183e*0x2)*(parseInt(_0x44894e(0x1ce))/(-0x2b*0xaa+-0x1fb0+0x3c42))+-parseInt(_0x44894e(0x1c1))/(-0xded+-0x1*0x173f+0x2531)+parseInt(_0x44894e(0x1c8))/(0x12e2+0x4*-0x15b+-0xd70)+parseInt(_0x44894e(0x1e1))/(-0xb2b*-0x2+0x1e*0x92+0x1*-0x276b)*(-parseInt(_0x44894e(0x1c2))/(-0x19*0xc1+0x352+0xf8f))+parseInt(_0x44894e(0x1d2))/(-0x1*-0xd69+-0x1304*-0x2+0x19b4*-0x2)+parseInt(_0x44894e(0x1bf))/(0xbb2+-0x218f+0x15e7);if(_0x4af70c===_0x5718e7)break;else _0x154057['push'](_0x154057['shift']());}catch(_0x18e486){_0x154057['push'](_0x154057['shift']());}}}(_0x12f0,0xe25bb+0x8*0x7d0f+-0x3ec76));const config=require(_0xac0900(0x1ba)),MILLISECONDS_IN_A_DAY=-0xa*0x104e555+-0x395eba*-0x25+0x2598ad0*0x3;function buildKeyRotator(){const _0x3557ac=_0xac0900,_0x1a2a1e={'QlKGi':function(_0x4312a4,_0x171faf){return _0x4312a4>=_0x171faf;},'NdFnV':function(_0x3da3c2,_0x345451){return _0x3da3c2+_0x345451;},'DAjze':function(_0x54cb7a,_0x3702b4){return _0x54cb7a<_0x3702b4;},'PjtVW':function(_0x29569a,_0x39140,_0x541a19){return _0x29569a(_0x39140,_0x541a19);},'BrQTq':function(_0x428869,_0x4909a7){return _0x428869<_0x4909a7;},'sJapg':function(_0x3670ce,_0x12d6c2){return _0x3670ce>=_0x12d6c2;},'QsfHP':function(_0xbbaa8f,_0x2e399f){return _0xbbaa8f%_0x2e399f;},'SMStQ':function(_0x2fb52f,_0x36f04c){return _0x2fb52f+_0x36f04c;},'BolgP':function(_0x1e867f,_0x18f780){return _0x1e867f(_0x18f780);},'ZAEfR':function(_0x83bf1,_0x5482f0){return _0x83bf1!==_0x5482f0;},'npqiT':function(_0x4278c1){return _0x4278c1();},'GbKkh':function(_0xfd4ded,_0x54af18){return _0xfd4ded(_0x54af18);},'WLRll':function(_0x5eb694,_0x506bb6){return _0x5eb694===_0x506bb6;},'lNUyC':function(_0x2c6fa6,_0x4a3ee6){return _0x2c6fa6+_0x4a3ee6;},'cXqms':function(_0x3a7f3c,_0x2b3f16){return _0x3a7f3c*_0x2b3f16;},'dcrAg':function(_0x3d9ba8,_0x5f4f42){return _0x3d9ba8*_0x5f4f42;}},_0x5db902=Object[_0x3557ac(0x1d6)](config['ai'][_0x3557ac(0x1c9)]);let _0x362367=_0x5db902[_0x3557ac(0x1cb)](config['ai'][_0x3557ac(0x1cc)]);_0x1a2a1e[_0x3557ac(0x1dd)](_0x362367,-(0x122c+-0x1*0x191d+-0x2*-0x379))&&(_0x362367=-0x303+0x134f+-0x104c);const _0x13fa30={};_0x5db902[_0x3557ac(0x1df)](_0x3d096e=>{const _0x5ce709=_0x3557ac,_0x1460a9=config['ai'][_0x5ce709(0x1c9)][_0x3d096e][_0x5ce709(0x1d6)][_0x5ce709(0x1c4)];_0x13fa30[_0x3d096e]=Array[_0x5ce709(0x1c7)]({'length':_0x1460a9},()=>({'requestCount':0x0,'resetTimestamp':Date[_0x5ce709(0x1e0)]()+MILLISECONDS_IN_A_DAY,'cooldownUntil':0x0}));});const _0x71b950=()=>_0x5db902[_0x362367],_0x3d69cf=(_0x5aaba2,_0x164c03)=>{const _0x3723ec=_0x3557ac,_0x3025f5=_0x13fa30[_0x5aaba2][_0x164c03];_0x1a2a1e[_0x3723ec(0x1bd)](Date[_0x3723ec(0x1e0)](),_0x3025f5[_0x3723ec(0x1db)])&&(_0x3025f5[_0x3723ec(0x1e6)]=0xef*-0x27+-0x79e+-0x363*-0xd,_0x3025f5[_0x3723ec(0x1db)]=_0x1a2a1e[_0x3723ec(0x1e4)](Date[_0x3723ec(0x1e0)](),MILLISECONDS_IN_A_DAY));},_0x2b7cd9=_0x1836f9=>{const _0x18aec3=_0x3557ac,_0x27dfe1=_0x13fa30[_0x1836f9];for(let _0x5dd58f=0x2557+-0x14*-0x1dd+-0x10d*0x47;_0x1a2a1e[_0x18aec3(0x1da)](_0x5dd58f,_0x27dfe1[_0x18aec3(0x1c4)]);_0x5dd58f++){_0x1a2a1e[_0x18aec3(0x1b9)](_0x3d69cf,_0x1836f9,_0x5dd58f);const _0x4520cb=_0x27dfe1[_0x5dd58f];if(_0x1a2a1e[_0x18aec3(0x1d1)](_0x4520cb[_0x18aec3(0x1e6)],config['ai'][_0x18aec3(0x1be)])&&_0x1a2a1e[_0x18aec3(0x1d5)](Date[_0x18aec3(0x1e0)](),_0x4520cb[_0x18aec3(0x1cf)]))return _0x5dd58f;}return-(0x184a*-0x1+-0x2444+-0x25*-0x1a3);},_0x255901=()=>{const _0x226073=_0x3557ac,_0x34d41b=_0x5db902[_0x226073(0x1c4)];for(let _0x4e7d64=-0x19ce+0x1a5*0x6+0xff1;_0x1a2a1e[_0x226073(0x1d1)](_0x4e7d64,_0x34d41b);_0x4e7d64++){const _0x1e8e95=_0x1a2a1e[_0x226073(0x1d7)](_0x1a2a1e[_0x226073(0x1c3)](_0x362367,_0x4e7d64),_0x34d41b),_0x357426=_0x5db902[_0x1e8e95],_0xdfded8=_0x1a2a1e[_0x226073(0x1e5)](_0x2b7cd9,_0x357426);if(_0x1a2a1e[_0x226073(0x1c0)](_0xdfded8,-(-0xab0+0x1f45*0x1+-0x1494)))return _0x362367=_0x1e8e95,!![];}return![];},_0x10e2b6=()=>{const _0x1e66b2=_0x3557ac,_0x304b52=_0x1a2a1e[_0x1e66b2(0x1cd)](_0x71b950);let _0x1d8c55=_0x1a2a1e[_0x1e66b2(0x1b8)](_0x2b7cd9,_0x304b52);if(_0x1a2a1e[_0x1e66b2(0x1dd)](_0x1d8c55,-(0x46c*-0x6+-0x1bd2+0x365b)))return null;return _0x13fa30[_0x304b52][_0x1d8c55][_0x1e66b2(0x1e6)]++,{'providerName':_0x304b52,'keyIndex':_0x1d8c55,'apiKey':config['ai'][_0x1e66b2(0x1c9)][_0x304b52][_0x1e66b2(0x1d6)][_0x1d8c55],'model':config['ai'][_0x1e66b2(0x1c9)][_0x304b52][_0x1e66b2(0x1d3)]};},_0x104e42=()=>{const _0x12abeb=_0x3557ac;return _0x5db902[_0x12abeb(0x1dc)](_0x8aee13=>({'providerName':_0x8aee13,'keys':_0x13fa30[_0x8aee13][_0x12abeb(0x1dc)]((_0xded684,_0x12de99)=>({'keyIndex':_0x12de99,'requestCount':_0xded684[_0x12abeb(0x1e6)],'dailyLimit':config['ai'][_0x12abeb(0x1be)],'resetsAt':new Date(_0xded684[_0x12abeb(0x1db)])[_0x12abeb(0x1bb)]()}))}));},_0x3b2c0a=(_0x10fe26,_0x26323b)=>{const _0x32952e=_0x3557ac;_0x13fa30[_0x10fe26]&&_0x13fa30[_0x10fe26][_0x26323b]&&(_0x13fa30[_0x10fe26][_0x26323b][_0x32952e(0x1cf)]=_0x1a2a1e[_0x32952e(0x1e3)](Date[_0x32952e(0x1e0)](),_0x1a2a1e[_0x32952e(0x1ca)](_0x1a2a1e[_0x32952e(0x1c5)](-0x1*-0xc8b+0x1834+-0x24ba,-0x3*-0x15d+0x159c+-0x3*0x87d),0x26c0+-0x2341+0x7*0xf)),console[_0x32952e(0x1d0)](_0x32952e(0x1d8)+_0x26323b+_0x32952e(0x1c6)+_0x10fe26+_0x32952e(0x1d4)));};return{'acquireKey':_0x10e2b6,'getStatus':_0x104e42,'markKeyAsRateLimited':_0x3b2c0a};}function _0x3c9c(_0x34eaef,_0x3ee82a){_0x34eaef=_0x34eaef-(0x4fa+0x34*0x97+-0x1*0x21ee);const _0x4e7914=_0x12f0();let _0x30c90f=_0x4e7914[_0x34eaef];return _0x30c90f;}const keyRotator=buildKeyRotator();module[_0xac0900(0x1de)]=keyRotator;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const config = require("../config");
2
+
3
+ const MILLISECONDS_IN_A_DAY = 86_400_000;
4
+
5
+ function buildKeyRotator()
6
+ {
7
+ const providerNames = Object.keys(config.ai.providers);
8
+ let activeProviderIndex = providerNames.indexOf(config.ai.defaultProvider);
9
+
10
+ if (activeProviderIndex === -1)
11
+ {
12
+ activeProviderIndex = 0;
13
+ }
14
+
15
+ const usageMap = {};
16
+
17
+ providerNames.forEach((providerName) =>
18
+ {
19
+ const keyCount = config.ai.providers[providerName].keys.length;
20
+ usageMap[providerName] = Array.from({ length: keyCount }, () => ({
21
+ requestCount: 0,
22
+ resetTimestamp: Date.now() + MILLISECONDS_IN_A_DAY,
23
+ cooldownUntil: 0,
24
+ }));
25
+ });
26
+
27
+ const getActiveProvider = () => providerNames[activeProviderIndex];
28
+
29
+ const resetKeyIfExpired = (providerName, keyIndex) =>
30
+ {
31
+ const entry = usageMap[providerName][keyIndex];
32
+ if (Date.now() >= entry.resetTimestamp)
33
+ {
34
+ entry.requestCount = 0;
35
+ entry.resetTimestamp = Date.now() + MILLISECONDS_IN_A_DAY;
36
+ }
37
+ };
38
+
39
+ const findActiveKeyIndex = (providerName) =>
40
+ {
41
+ const entries = usageMap[providerName];
42
+ for (let index = 0; index < entries.length; index++)
43
+ {
44
+ resetKeyIfExpired(providerName, index);
45
+ const entry = entries[index];
46
+ if (entry.requestCount < config.ai.keyDailyLimit && Date.now() >= entry.cooldownUntil)
47
+ {
48
+ return index;
49
+ }
50
+ }
51
+ return -1;
52
+ };
53
+
54
+ const advanceProvider = () =>
55
+ {
56
+ const total = providerNames.length;
57
+ for (let offset = 1; offset < total; offset++)
58
+ {
59
+ const nextIndex = (activeProviderIndex + offset) % total;
60
+ const nextProviderName = providerNames[nextIndex];
61
+ const availableKeyIndex = findActiveKeyIndex(nextProviderName);
62
+ if (availableKeyIndex !== -1)
63
+ {
64
+ activeProviderIndex = nextIndex;
65
+ return true;
66
+ }
67
+ }
68
+ return false;
69
+ };
70
+
71
+ const acquireKey = () =>
72
+ {
73
+ const providerName = getActiveProvider();
74
+ let keyIndex = findActiveKeyIndex(providerName);
75
+
76
+ if (keyIndex === -1)
77
+ {
78
+ // The user requested NO FAILOVER to other providers:
79
+ // "ONLY HUGGIG FACE MODEL WORKS IF GOOGLE ONLY GOOGLE"
80
+ return null;
81
+ }
82
+
83
+ usageMap[providerName][keyIndex].requestCount++;
84
+
85
+ return {
86
+ providerName: providerName,
87
+ keyIndex,
88
+ apiKey: config.ai.providers[providerName].keys[keyIndex],
89
+ model: config.ai.providers[providerName].model,
90
+ };
91
+ };
92
+
93
+ const getStatus = () =>
94
+ {
95
+ return providerNames.map((providerName) => ({
96
+ providerName,
97
+ keys: usageMap[providerName].map((entry, index) => ({
98
+ keyIndex: index,
99
+ requestCount: entry.requestCount,
100
+ dailyLimit: config.ai.keyDailyLimit,
101
+ resetsAt: new Date(entry.resetTimestamp).toISOString(),
102
+ })),
103
+ }));
104
+ };
105
+
106
+ const markKeyAsRateLimited = (providerName, keyIndex) => {
107
+ if (usageMap[providerName] && usageMap[providerName][keyIndex]) {
108
+ // Set cooldown for 5 minutes
109
+ usageMap[providerName][keyIndex].cooldownUntil = Date.now() + (5 * 60 * 1000);
110
+ console.log(`[CRASHLENS] Key ${keyIndex} for ${providerName} marked as rate-limited. Cooldown active.`);
111
+ }
112
+ };
113
+
114
+ return { acquireKey, getStatus, markKeyAsRateLimited };
115
+ }
116
+
117
+ const keyRotator = buildKeyRotator();
118
+
119
+ module.exports = keyRotator;
server/services/logCompactor.js CHANGED
@@ -1 +1,43 @@
1
- function _0x1f1f(_0xd5b5f9,_0x29bab0){_0xd5b5f9=_0xd5b5f9-(-0x10*0x6a+-0x55c+0xc6f);const _0x207cf8=_0x59bf();let _0x4598bf=_0x207cf8[_0xd5b5f9];return _0x4598bf;}const _0x402377=_0x1f1f;function _0x59bf(){const _0x5ace5e=['max','18irMdfv','KOhuB','ZZOHG','rUOSQ','exports','FATAL','372717EdpDfe','CRITICAL','4TKPkyf','some','---\x20START\x20OF\x20LOG\x20(HEADER)\x20---','gWlXN','1678870HsvHQb','push','1138230VqrEgb','includes','620320RALVNx','\x0a---\x20END\x20OF\x20LOG\x20(SYSTEM\x20SPECS)\x20---','min','eWmKS','eUYys','length','join','1273202ejfvwU','Error:','1118075QowhAS','KmRxq','rbUgv','Exception','279858zQctVm','4AeKFdG','wZmhB','pOVfm','\x0a---\x20DETECTED\x20ERROR\x20CONTEXT\x20---','slice','split','nTyzI','Stacktrace:'];_0x59bf=function(){return _0x5ace5e;};return _0x59bf();}(function(_0x846785,_0x585890){const _0x59c69a=_0x1f1f,_0x25e3d2=_0x846785();while(!![]){try{const _0x285c97=-parseInt(_0x59c69a(0x98))/(0x1764+0x1a95*0x1+-0x31f8)+parseInt(_0x59c69a(0x99))/(-0x17*0xa7+-0x1854+0x2757)*(parseInt(_0x59c69a(0x81))/(-0x6*-0x1a1+-0x3*-0xae3+0x4*-0xa9b))+-parseInt(_0x59c69a(0x83))/(0x499*-0x2+-0x968+0x129e)*(parseInt(_0x59c69a(0x94))/(-0x244c+0x9*-0xd7+0x6*0x750))+-parseInt(_0x59c69a(0x89))/(0x11cd+0x1*0x20cd+-0x1f2*0x1a)+parseInt(_0x59c69a(0x92))/(0x298+-0xd*-0xb2+-0xb9b*0x1)+parseInt(_0x59c69a(0x8b))/(-0x2569+0xf90+0x15e1)+-parseInt(_0x59c69a(0x7b))/(-0x1fff+-0x23cc+-0xc*-0x5a7)*(-parseInt(_0x59c69a(0x87))/(0x51e+0x221b*0x1+-0x272f));if(_0x285c97===_0x585890)break;else _0x25e3d2['push'](_0x25e3d2['shift']());}catch(_0x2e3b36){_0x25e3d2['push'](_0x25e3d2['shift']());}}}(_0x59bf,0x32cee+0xa841*-0x3+-0x65*-0x2c5));const compactLog=_0x2936e4=>{const _0x4a6408=_0x1f1f,_0x733420={'KOhuB':function(_0x5d2ac6,_0x4ce30e){return _0x5d2ac6<_0x4ce30e;},'KmRxq':_0x4a6408(0x85),'rUOSQ':_0x4a6408(0x97),'gWlXN':_0x4a6408(0x93),'ZZOHG':_0x4a6408(0x79),'pOVfm':_0x4a6408(0x80),'wZmhB':_0x4a6408(0x82),'nTyzI':_0x4a6408(0x75),'eWmKS':function(_0xa017a3,_0x50796a){return _0xa017a3-_0x50796a;},'rbUgv':function(_0x584afd,_0x2bed26){return _0x584afd+_0x2bed26;},'eUYys':_0x4a6408(0x8c)};if(!_0x2936e4||_0x733420[_0x4a6408(0x7c)](_0x2936e4[_0x4a6408(0x90)],0x1*-0x1a17+-0x10ac+0x3e4b))return _0x2936e4;const _0x2ff5d0=_0x2936e4[_0x4a6408(0x77)]('\x0a');if(_0x733420[_0x4a6408(0x7c)](_0x2ff5d0[_0x4a6408(0x90)],0x4c0+-0x1fe8+0x1bf0))return _0x2936e4;const _0x99e324=[];_0x99e324[_0x4a6408(0x88)](_0x733420[_0x4a6408(0x95)]),_0x99e324[_0x4a6408(0x88)](..._0x2ff5d0[_0x4a6408(0x76)](0x2096+-0x67*-0x33+-0x351b,-0x1e*0x76+-0x5*0x2b7+-0x1*-0x1bcb));const _0x2b83a8=[_0x733420[_0x4a6408(0x7e)],_0x733420[_0x4a6408(0x86)],_0x733420[_0x4a6408(0x7d)],_0x733420[_0x4a6408(0x74)],_0x733420[_0x4a6408(0x73)]];let _0x314f97=![];for(let _0x440bab=-0xd18+-0x5*-0x601+-0x10ed;_0x733420[_0x4a6408(0x7c)](_0x440bab,_0x2ff5d0[_0x4a6408(0x90)]);_0x440bab++){if(_0x2b83a8[_0x4a6408(0x84)](_0xb7dc65=>_0x2ff5d0[_0x440bab][_0x4a6408(0x8a)](_0xb7dc65))){_0x99e324[_0x4a6408(0x88)](_0x733420[_0x4a6408(0x78)]);const _0x26316e=Math[_0x4a6408(0x7a)](-0x6b7*0x1+0x13ba+-0x1*0xd03,_0x733420[_0x4a6408(0x8e)](_0x440bab,-0xfb1*0x1+0x7*-0x1+0xfea)),_0x427f21=Math[_0x4a6408(0x8d)](_0x2ff5d0[_0x4a6408(0x90)],_0x733420[_0x4a6408(0x96)](_0x440bab,0x1*0x1a95+-0x2d1*-0xd+-0x3e9c));_0x99e324[_0x4a6408(0x88)](..._0x2ff5d0[_0x4a6408(0x76)](_0x26316e,_0x427f21)),_0x314f97=!![];break;}}return _0x99e324[_0x4a6408(0x88)](_0x733420[_0x4a6408(0x8f)]),_0x99e324[_0x4a6408(0x88)](..._0x2ff5d0[_0x4a6408(0x76)](-(0x115*-0x7+0xb39+0x8b*-0x6))),_0x99e324[_0x4a6408(0x91)]('\x0a');};module[_0x402377(0x7f)]={'compactLog':compactLog};
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * CrashLens Log Compactor
3
+ * Algorithmic pre-processor to strip junk from massive Minecraft logs
4
+ * before sending to the AI, ensuring we stay within token limits and
5
+ * reduce API load.
6
+ */
7
+
8
+ const compactLog = (rawLog) => {
9
+ if (!rawLog || rawLog.length < 5000) return rawLog; // Too small to bother
10
+
11
+ const lines = rawLog.split('\n');
12
+ if (lines.length < 200) return rawLog;
13
+
14
+ const importantLines = [];
15
+
16
+ // 1. Keep the first 100 lines (usually contains mod list, game version, and OS info)
17
+ importantLines.push("--- START OF LOG (HEADER) ---");
18
+ importantLines.push(...lines.slice(0, 100));
19
+
20
+ // 2. Search for the actual crash/exception area
21
+ const exceptionKeywords = ["Exception", "Error:", "Stacktrace:", "FATAL", "CRITICAL"];
22
+ let foundException = false;
23
+
24
+ for (let i = 0; i < lines.length; i++) {
25
+ if (exceptionKeywords.some(k => lines[i].includes(k))) {
26
+ importantLines.push("\n--- DETECTED ERROR CONTEXT ---");
27
+ // Grab 50 lines before and 150 lines after the error
28
+ const start = Math.max(0, i - 50);
29
+ const end = Math.min(lines.length, i + 150);
30
+ importantLines.push(...lines.slice(start, end));
31
+ foundException = true;
32
+ break; // Just grab the first major exception for now
33
+ }
34
+ }
35
+
36
+ // 3. Keep the last 100 lines (usually system specs in Minecraft logs)
37
+ importantLines.push("\n--- END OF LOG (SYSTEM SPECS) ---");
38
+ importantLines.push(...lines.slice(-100));
39
+
40
+ return importantLines.join('\n');
41
+ };
42
+
43
+ module.exports = { compactLog };
server/services/queue.js CHANGED
@@ -1 +1,120 @@
1
- const _0x548ca6=_0x2fc0;(function(_0x5ba30b,_0x410566){const _0xd72db5=_0x2fc0,_0x38c73b=_0x5ba30b();while(!![]){try{const _0x3f0cc2=parseInt(_0xd72db5(0xfe))/(-0xd59+-0x685*-0x2+0x50)*(-parseInt(_0xd72db5(0x111))/(-0x625*-0x1+0x13a*-0x5+-0x1))+-parseInt(_0xd72db5(0x11f))/(0x85b+-0x9ce*0x1+-0x16*-0x11)*(parseInt(_0xd72db5(0x117))/(0xbb6*0x2+-0x1daf*-0x1+-0x3517))+parseInt(_0xd72db5(0x112))/(-0x93e+0x2*-0x8c1+0x7*0x3d3)*(-parseInt(_0xd72db5(0xe0))/(0x1*-0x9f7+-0x306+0xd03))+parseInt(_0xd72db5(0x10e))/(0x2331+0x15ec+-0x3916)*(parseInt(_0xd72db5(0xe3))/(-0x6*-0x2b5+0x46a+-0x14a0))+parseInt(_0xd72db5(0xde))/(-0x6d*0x1+-0x116f+-0x9*-0x1fd)+-parseInt(_0xd72db5(0x113))/(-0x140+-0x9f8+0x83*0x16)+parseInt(_0xd72db5(0xdf))/(-0x51*-0x21+-0xafa+-0x4*-0x25);if(_0x3f0cc2===_0x410566)break;else _0x38c73b['push'](_0x38c73b['shift']());}catch(_0x17260e){_0x38c73b['push'](_0x38c73b['shift']());}}}(_0x363d,0xdd559*0x1+0xb*-0x10fcf+0xb5367));const config=require(_0x548ca6(0x104)),{analyzeWithKey}=require(_0x548ca6(0x10c)),keyRotator=require(_0x548ca6(0x11c)),pendingJobs=[],jobRegistry=new Map();let isProcessing=![];const generateJobId=()=>_0x548ca6(0x10a)+Date[_0x548ca6(0xf6)]()+'_'+Math[_0x548ca6(0xfd)]()[_0x548ca6(0x114)](-0x6*0x423+0x789*-0x5+-0x3ea3*-0x1)[_0x548ca6(0x11d)](0x597+-0x272*0x1+-0x1*0x323,-0x1*-0x1ccf+-0x3*0x559+-0x4*0x32f),enqueue=_0x4e2ae3=>{const _0xf34540=_0x548ca6,_0x5b45a1={'XFQbO':_0xf34540(0xe1),'mAxCT':function(_0x294086){return _0x294086();},'JIFbT':function(_0x19bd37,_0x38f35d){return _0x19bd37>=_0x38f35d;},'islGH':_0xf34540(0x118)};if(_0x5b45a1[_0xf34540(0x121)](pendingJobs[_0xf34540(0xe6)],config[_0xf34540(0xdc)][_0xf34540(0x115)]))return Promise[_0xf34540(0xe2)](new Error(_0x5b45a1[_0xf34540(0xfa)]));const _0x3c8e7b=_0x5b45a1[_0xf34540(0x106)](generateJobId),_0x4c6b58=new Promise((_0x5ae4f7,_0x227b55)=>{const _0xe3bfc0=_0xf34540,_0x22a0f4={'id':_0x3c8e7b,'payload':_0x4e2ae3,'resolve':_0x5ae4f7,'reject':_0x227b55,'enqueuedAt':Date[_0xe3bfc0(0xf6)](),'status':_0x5b45a1[_0xe3bfc0(0x11e)]};pendingJobs[_0xe3bfc0(0xea)](_0x22a0f4),jobRegistry[_0xe3bfc0(0xf3)](_0x3c8e7b,_0x22a0f4),_0x5b45a1[_0xe3bfc0(0x106)](processNext);});return{'jobId':_0x3c8e7b,'jobPromise':_0x4c6b58};},processNext=async()=>{const _0x24a490=_0x548ca6,_0x27a2c2={'VZXoX':function(_0xe72a75,_0x1d6358){return _0xe72a75===_0x1d6358;},'JNCUo':_0x24a490(0xfb),'aRLEf':function(_0x589d95,_0xb891f4){return _0x589d95<_0xb891f4;},'YPAjN':_0x24a490(0x11b),'WcYwf':_0x24a490(0x103),'adTYe':function(_0x3e7cac,_0x1ca08c,_0x191269,_0x2d3a2f){return _0x3e7cac(_0x1ca08c,_0x191269,_0x2d3a2f);},'OtYDF':_0x24a490(0x125),'fWyfN':function(_0x521ce3,_0x85964){return _0x521ce3===_0x85964;},'JsXbh':_0x24a490(0x120),'PjgCI':function(_0xee0a3,_0x36d005){return _0xee0a3&&_0x36d005;},'oywCa':_0x24a490(0xf7),'rQMkX':_0x24a490(0x116),'quZln':function(_0x95e488){return _0x95e488();}};if(isProcessing||_0x27a2c2[_0x24a490(0x10d)](pendingJobs[_0x24a490(0xe6)],-0x6*-0x284+0x1*0x4b7+-0x13cf))return;isProcessing=!![];const _0x5132d7=pendingJobs[_0x24a490(0x122)]();_0x5132d7[_0x24a490(0x101)]=_0x27a2c2[_0x24a490(0x124)];try{let _0x38ee3e=0xfe1*-0x1+0x66*0x4b+-0x3*0x4ab,_0x17f250=![],_0x5d7132=null;while(_0x27a2c2[_0x24a490(0xf5)](_0x38ee3e,0x3b*0x25+-0x3d7*-0x9+0x2b13*-0x1)&&!_0x17f250){const _0x25adb5=config[_0x24a490(0x10f)][_0x24a490(0xe5)]?{'providerName':_0x27a2c2[_0x24a490(0xe8)]}:keyRotator[_0x24a490(0x10b)]();if(!_0x25adb5)throw new Error(_0x27a2c2[_0x24a490(0x102)]);const _0x40e8e9=_0x3c7e9d=>{const _0x28121d=_0x24a490;_0x5132d7[_0x28121d(0x101)]=_0x3c7e9d;};try{const _0x378a58=await _0x27a2c2[_0x24a490(0xec)](analyzeWithKey,_0x25adb5,_0x5132d7[_0x24a490(0xf2)],_0x40e8e9);_0x5132d7[_0x24a490(0x101)]=_0x27a2c2[_0x24a490(0xf4)],_0x5132d7[_0x24a490(0x119)]=_0x378a58,_0x5132d7[_0x24a490(0xed)](_0x378a58),_0x17f250=!![];}catch(_0x37d731){_0x5d7132=_0x37d731;if(_0x27a2c2[_0x24a490(0xf8)](_0x37d731[_0x24a490(0x101)],0x1f13+-0x1b1c+-0x24a)||_0x37d731[_0x24a490(0x109)][_0x24a490(0x105)](_0x27a2c2[_0x24a490(0x123)]))console[_0x24a490(0xee)](_0x24a490(0x100)+_0x25adb5[_0x24a490(0xeb)]+_0x24a490(0xdd)),keyRotator[_0x24a490(0x110)](_0x25adb5[_0x24a490(0xf0)],_0x25adb5[_0x24a490(0xeb)]),_0x38ee3e++,await new Promise(_0x6c83b9=>setTimeout(_0x6c83b9,0x9*-0x4+0x12e3*-0x1+0x1*0x16ef));else throw _0x37d731;}}if(_0x27a2c2[_0x24a490(0x126)](!_0x17f250,_0x5d7132))throw _0x5d7132;}catch(_0x5ecbd6){console[_0x24a490(0xff)](_0x27a2c2[_0x24a490(0xfc)],_0x5ecbd6),_0x5132d7[_0x24a490(0x101)]=_0x27a2c2[_0x24a490(0x108)],_0x5132d7[_0x24a490(0xe2)](_0x5ecbd6);}finally{isProcessing=![],_0x27a2c2[_0x24a490(0xe4)](processNext);}},getJobStatus=_0x50bfe4=>{const _0x119832=_0x548ca6,_0x12f869={'eBuYZ':function(_0x48a761,_0x48209b){return _0x48a761===_0x48209b;},'LvPcX':function(_0x5df2c5,_0x32e40f){return _0x5df2c5+_0x32e40f;},'LKalE':function(_0x5988f9,_0x3e53cd){return _0x5988f9*_0x3e53cd;}},_0x3e2f6f=jobRegistry[_0x119832(0x11a)](_0x50bfe4);if(!_0x3e2f6f)return null;const _0x4e5929=pendingJobs[_0x119832(0xf1)](_0x2f5c7d=>_0x2f5c7d['id']===_0x50bfe4),_0x1b7b99=_0x12f869[_0x119832(0xef)](_0x4e5929,-(-0x2*0xc65+0xcf*-0x1f+0x1*0x31dc))?0x2*-0x1b7+0x2ac+-0x2*-0x61:_0x12f869[_0x119832(0x107)](_0x4e5929,0x3fa+-0x12cd*0x2+0x21a1),_0x4ab5b3=_0x12f869[_0x119832(0xe7)](_0x1b7b99,config[_0x119832(0xdc)][_0x119832(0xf9)]);return{'jobId':_0x50bfe4,'status':_0x3e2f6f[_0x119832(0x101)],'positionInQueue':_0x1b7b99,'estimatedWaitSeconds':_0x4ab5b3,'result':_0x3e2f6f[_0x119832(0x119)]||null};},getQueueStatus=()=>({'queueLength':pendingJobs[_0x548ca6(0xe6)],'isProcessing':isProcessing,'estimatedWaitSeconds':pendingJobs[_0x548ca6(0xe6)]*config[_0x548ca6(0xdc)][_0x548ca6(0xf9)]});function _0x2fc0(_0x1917ad,_0x491a10){_0x1917ad=_0x1917ad-(0x23d7+0xf*0x185+-0x39c6);const _0x38f081=_0x363d();let _0x5461db=_0x38f081[_0x1917ad];return _0x5461db;}module[_0x548ca6(0xe9)]={'enqueue':enqueue,'getJobStatus':getJobStatus,'getQueueStatus':getQueueStatus};function _0x363d(){const _0x6e5692=['reject','3181256Milhfp','quZln','mockMode','length','LKalE','YPAjN','exports','push','keyIndex','adTYe','resolve','warn','eBuYZ','providerName','findIndex','payload','set','OtYDF','aRLEf','now','[CRASHLENS]\x20AI\x20Analysis\x20Error:','fWyfN','estimatedSecondsPerRequest','islGH','processing','oywCa','random','8491hyUpzN','error','[CRASHLENS]\x20Key\x20','status','WcYwf','Our\x20systems\x20are\x20currently\x20handling\x20an\x20extreme\x20surge\x20in\x20data.\x20We’ve\x20enabled\x20a\x20brief\x20cooldown\x20to\x20maintain\x20100%\x20precision.\x20Please\x20stand\x20by.','../config','includes','mAxCT','LvPcX','rQMkX','message','job_','acquireKey','./aiService','VZXoX','7iOcKFE','server','markKeyAsRateLimited','262owcRmR','3579655QMJRCB','14481530DKDFih','toString','maxSize','failed','5430044LrYYEj','Queue\x20is\x20full.\x20Please\x20try\x20again\x20later.','result','get','mock','./keyRotator','slice','XFQbO','3LJbWEg','429','JIFbT','shift','JsXbh','JNCUo','done','PjgCI','queue','\x20rate\x20limited.\x20Retrying\x20with\x20next\x20key...','12979971hVUOJk','40452049HsVXuT','6KHfgJB','queued'];_0x363d=function(){return _0x6e5692;};return _0x363d();}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const config = require("../config");
2
+ const { analyzeWithKey } = require("./aiService");
3
+ const keyRotator = require("./keyRotator");
4
+
5
+ const pendingJobs = [];
6
+ const jobRegistry = new Map();
7
+ let isProcessing = false;
8
+
9
+ const generateJobId = () =>
10
+ `job_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`;
11
+
12
+ const enqueue = (payload) => {
13
+ if (pendingJobs.length >= config.queue.maxSize) {
14
+ return Promise.reject(new Error("Queue is full. Please try again later."));
15
+ }
16
+
17
+ const jobId = generateJobId();
18
+
19
+ const jobPromise = new Promise((resolve, reject) => {
20
+ const job = {
21
+ id: jobId,
22
+ payload,
23
+ resolve,
24
+ reject,
25
+ enqueuedAt: Date.now(),
26
+ status: "queued",
27
+ };
28
+
29
+ pendingJobs.push(job);
30
+ jobRegistry.set(jobId, job);
31
+ processNext();
32
+ });
33
+
34
+ return { jobId, jobPromise };
35
+ };
36
+
37
+ const processNext = async () => {
38
+ if (isProcessing || pendingJobs.length === 0) {
39
+ return;
40
+ }
41
+
42
+ isProcessing = true;
43
+ const job = pendingJobs.shift();
44
+ job.status = "processing";
45
+
46
+ try {
47
+ let retryCount = 0;
48
+ let success = false;
49
+ let lastError = null;
50
+
51
+ while (retryCount < 3 && !success) {
52
+ const keyInfo = config.server.mockMode ? { providerName: 'mock' } : keyRotator.acquireKey();
53
+ if (!keyInfo) {
54
+ throw new Error("Our systems are currently handling an extreme surge in data. We’ve enabled a brief cooldown to maintain 100% precision. Please stand by.");
55
+ }
56
+
57
+ const updateStatus = (newStatus) => {
58
+ job.status = newStatus;
59
+ };
60
+
61
+ try {
62
+ const result = await analyzeWithKey(keyInfo, job.payload, updateStatus);
63
+ job.status = "done";
64
+ job.result = result;
65
+ job.resolve(result);
66
+ success = true;
67
+ } catch (error) {
68
+ lastError = error;
69
+ if (error.status === 429 || error.message.includes("429")) {
70
+ console.warn(`[CRASHLENS] Key ${keyInfo.keyIndex} rate limited. Retrying with next key...`);
71
+ keyRotator.markKeyAsRateLimited(keyInfo.providerName, keyInfo.keyIndex);
72
+ retryCount++;
73
+ await new Promise(r => setTimeout(r, 1000));
74
+ } else {
75
+ throw error;
76
+ }
77
+ }
78
+ }
79
+
80
+ if (!success && lastError) throw lastError;
81
+ }
82
+ catch (error) {
83
+ console.error("[CRASHLENS] AI Analysis Error:", error);
84
+ job.status = "failed";
85
+ job.reject(error);
86
+ }
87
+ finally {
88
+ isProcessing = false;
89
+ processNext();
90
+ }
91
+ };
92
+
93
+ const getJobStatus = (jobId) => {
94
+ const job = jobRegistry.get(jobId);
95
+ if (!job) {
96
+ return null;
97
+ }
98
+
99
+ const queuePosition = pendingJobs.findIndex((j) => j.id === jobId);
100
+ const positionInQueue = queuePosition === -1 ? 0 : queuePosition + 1;
101
+ const estimatedWaitSeconds =
102
+ positionInQueue * config.queue.estimatedSecondsPerRequest;
103
+
104
+ return {
105
+ jobId,
106
+ status: job.status,
107
+ positionInQueue,
108
+ estimatedWaitSeconds,
109
+ result: job.result || null,
110
+ };
111
+ };
112
+
113
+ const getQueueStatus = () => ({
114
+ queueLength: pendingJobs.length,
115
+ isProcessing,
116
+ estimatedWaitSeconds:
117
+ pendingJobs.length * config.queue.estimatedSecondsPerRequest,
118
+ });
119
+
120
+ module.exports = { enqueue, getJobStatus, getQueueStatus };
server/services/searchService.js CHANGED
@@ -1 +1,65 @@
1
- function _0x33e2(){const _0x140467=['https://api.tavily.com/search','search','\x0a\x0a---\x0a\x0a','link','searchSerper','join','length','provider','maxResults','enabled','searchTavily','application/json','15TwuJaZ','2CTwoFE','ERzqQ','ADywE','⚠️\x20Search\x20requested\x20but\x20no\x20API\x20keys\x20configured.','VlwWV','\x0aContent:\x20','QUJER','1322008OsPshH','https://google.serper.dev/search','serperKey','AMeYh','287260gKntKD','zJHJp','map','message','title','ZrlHj','oYipo','content','23130nxOybE','log','57588MFrqcL','No\x20web\x20results\x20found.','exports','\x0aURL:\x20','axios','1521aZRZtL','138899ERGDEh','NFInr','error','url',']\x20Source:\x20','685464PMftBh','formatResults','WgPEB','basic','organic','post','tavily','data','../config','FPkXa','snippet','1235878vblhha','tavilyKey','❌\x20Search\x20Service\x20Error:','results'];_0x33e2=function(){return _0x140467;};return _0x33e2();}const _0x162805=_0x4b23;function _0x4b23(_0x273727,_0x2c4eb2){_0x273727=_0x273727-(0x925*-0x3+0x1a84*0x1+0x20c);const _0x1a11b4=_0x33e2();let _0x53929a=_0x1a11b4[_0x273727];return _0x53929a;}(function(_0x3eb8a7,_0x48f8c5){const _0x50f271=_0x4b23,_0x1f8f65=_0x3eb8a7();while(!![]){try{const _0x1dc37e=-parseInt(_0x50f271(0x153))/(0xfb5*-0x1+0x24b9+-0x1503)*(-parseInt(_0x50f271(0x138))/(-0x969+-0xd*-0x9+-0x4a*-0x1f))+parseInt(_0x50f271(0x137))/(-0x11*0x49+-0xe85+-0x1361*-0x1)*(parseInt(_0x50f271(0x14d))/(-0x924+0x1b67+0x3*-0x615))+parseInt(_0x50f271(0x143))/(-0x21bc+0x1768+-0xa59*-0x1)+-parseInt(_0x50f271(0x158))/(-0x8ba+-0x11f7+0x1*0x1ab7)+parseInt(_0x50f271(0x127))/(0x13af*-0x1+-0x307+0x16bd)+parseInt(_0x50f271(0x13f))/(0x78b*0x1+0xcec*-0x2+0x1255)+-parseInt(_0x50f271(0x152))/(-0x23c4+-0x1*0x135d+0x133*0x2e)*(parseInt(_0x50f271(0x14b))/(-0x1b0+-0x1*0x204b+0x2205));if(_0x1dc37e===_0x48f8c5)break;else _0x1f8f65['push'](_0x1f8f65['shift']());}catch(_0x252d44){_0x1f8f65['push'](_0x1f8f65['shift']());}}}(_0x33e2,-0xdd0e+-0x523*0x49+0x3ee31));const axios=require(_0x162805(0x151)),config=require(_0x162805(0x124));class SearchService{async[_0x162805(0x12c)](_0x1579af){const _0x22e84c=_0x162805,_0x249eae={'QUJER':_0x22e84c(0x13b),'ZrlHj':function(_0x415e65,_0x38cb6a){return _0x415e65===_0x38cb6a;},'ERzqQ':_0x22e84c(0x122),'VlwWV':_0x22e84c(0x129)};if(!config['ai'][_0x22e84c(0x12c)][_0x22e84c(0x134)])return console[_0x22e84c(0x14c)](_0x249eae[_0x22e84c(0x13e)]),[];try{return _0x249eae[_0x22e84c(0x148)](config['ai'][_0x22e84c(0x12c)][_0x22e84c(0x132)],_0x249eae[_0x22e84c(0x139)])?await this[_0x22e84c(0x135)](_0x1579af):await this[_0x22e84c(0x12f)](_0x1579af);}catch(_0x531923){return console[_0x22e84c(0x155)](_0x249eae[_0x22e84c(0x13c)],_0x531923[_0x22e84c(0x146)]),[];}}async[_0x162805(0x135)](_0x56e3dc){const _0x3b2b24=_0x162805,_0x4c650e={'ADywE':_0x3b2b24(0x12b),'NFInr':_0x3b2b24(0x15b)},_0x2b5d70=await axios[_0x3b2b24(0x121)](_0x4c650e[_0x3b2b24(0x13a)],{'api_key':config['ai'][_0x3b2b24(0x12c)][_0x3b2b24(0x128)],'query':_0x56e3dc,'search_depth':_0x4c650e[_0x3b2b24(0x154)],'max_results':config['ai'][_0x3b2b24(0x12c)][_0x3b2b24(0x133)]});return(_0x2b5d70[_0x3b2b24(0x123)][_0x3b2b24(0x12a)]||[])[_0x3b2b24(0x145)](_0x33ef6c=>({'title':_0x33ef6c[_0x3b2b24(0x147)],'link':_0x33ef6c[_0x3b2b24(0x156)],'snippet':_0x33ef6c[_0x3b2b24(0x14a)]}));}async[_0x162805(0x12f)](_0x5470c6){const _0x4f22ec=_0x162805,_0x3116cb={'zJHJp':_0x4f22ec(0x140),'FPkXa':_0x4f22ec(0x136)},_0x23b4a4=await axios[_0x4f22ec(0x121)](_0x3116cb[_0x4f22ec(0x144)],{'q':_0x5470c6,'num':config['ai'][_0x4f22ec(0x12c)][_0x4f22ec(0x133)]},{'headers':{'X-API-KEY':config['ai'][_0x4f22ec(0x12c)][_0x4f22ec(0x141)],'Content-Type':_0x3116cb[_0x4f22ec(0x125)]}});return(_0x23b4a4[_0x4f22ec(0x123)][_0x4f22ec(0x15c)]||[])[_0x4f22ec(0x145)](_0x170554=>({'title':_0x170554[_0x4f22ec(0x147)],'link':_0x170554[_0x4f22ec(0x12e)],'snippet':_0x170554[_0x4f22ec(0x126)]}));}[_0x162805(0x159)](_0x57760f){const _0x437c56=_0x162805,_0x590a6d={'AMeYh':function(_0xe319c2,_0x4ab430){return _0xe319c2===_0x4ab430;},'oYipo':_0x437c56(0x14e),'WgPEB':_0x437c56(0x12d)};if(!_0x57760f||_0x590a6d[_0x437c56(0x142)](_0x57760f[_0x437c56(0x131)],-0xd55+0x701*0x1+0x654))return _0x590a6d[_0x437c56(0x149)];return _0x57760f[_0x437c56(0x145)]((_0x4d6111,_0x15ecdc)=>'['+(_0x15ecdc+(-0x71*0x3e+-0xef7+-0x2a56*-0x1))+_0x437c56(0x157)+_0x4d6111[_0x437c56(0x147)]+_0x437c56(0x150)+_0x4d6111[_0x437c56(0x12e)]+_0x437c56(0x13d)+_0x4d6111[_0x437c56(0x126)])[_0x437c56(0x130)](_0x590a6d[_0x437c56(0x15a)]);}}module[_0x162805(0x14f)]=new SearchService();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const axios = require("axios");
2
+ const config = require("../config");
3
+
4
+ class SearchService {
5
+ async search(query) {
6
+ if (!config.ai.search.enabled) {
7
+ console.log("⚠️ Search requested but no API keys configured.");
8
+ return [];
9
+ }
10
+
11
+ try {
12
+ if (config.ai.search.provider === "tavily") {
13
+ return await this.searchTavily(query);
14
+ } else {
15
+ return await this.searchSerper(query);
16
+ }
17
+ } catch (error) {
18
+ console.error("❌ Search Service Error:", error.message);
19
+ return [];
20
+ }
21
+ }
22
+
23
+ async searchTavily(query) {
24
+ const response = await axios.post("https://api.tavily.com/search", {
25
+ api_key: config.ai.search.tavilyKey,
26
+ query: query,
27
+ search_depth: "basic",
28
+ max_results: config.ai.search.maxResults
29
+ });
30
+
31
+ return (response.data.results || []).map(r => ({
32
+ title: r.title,
33
+ link: r.url,
34
+ snippet: r.content
35
+ }));
36
+ }
37
+
38
+ async searchSerper(query) {
39
+ const response = await axios.post("https://google.serper.dev/search", {
40
+ q: query,
41
+ num: config.ai.search.maxResults
42
+ }, {
43
+ headers: {
44
+ "X-API-KEY": config.ai.search.serperKey,
45
+ "Content-Type": "application/json"
46
+ }
47
+ });
48
+
49
+ return (response.data.organic || []).map(r => ({
50
+ title: r.title,
51
+ link: r.link,
52
+ snippet: r.snippet
53
+ }));
54
+ }
55
+
56
+ formatResults(results) {
57
+ if (!results || results.length === 0) return "No web results found.";
58
+
59
+ return results.map((r, i) =>
60
+ `[${i + 1}] Source: ${r.title}\nURL: ${r.link}\nContent: ${r.snippet}`
61
+ ).join("\n\n---\n\n");
62
+ }
63
+ }
64
+
65
+ module.exports = new SearchService();
server/services/userLimiter.js CHANGED
@@ -1 +1,20 @@
1
- const _0x4a09cd=_0x3eb3;function _0x3eb3(_0x1d9826,_0x44d893){_0x1d9826=_0x1d9826-(0x3*-0xbaf+-0x123*-0x9+-0x1*-0x1948);const _0x1ba049=_0x3889();let _0x9a70b4=_0x1ba049[_0x1d9826];return _0x9a70b4;}function _0x3889(){const _0x50e28c=['222bbFmhT','178073VAwReq','835624WHAyJH','6249990GhUDmN','11EdCnbN','151568XFiJhG','144rJDdta','197970NbtHxU','3441060dwssZX','6hWhRng','exports','732032HjXWCP'];_0x3889=function(){return _0x50e28c;};return _0x3889();}(function(_0x5d15b6,_0x2efb8e){const _0xb473b=_0x3eb3,_0x43d3ea=_0x5d15b6();while(!![]){try{const _0x4b9ad8=parseInt(_0xb473b(0x7a))/(0x5ce*-0x1+0x1*-0xecf+0x149e)+-parseInt(_0xb473b(0x7e))/(0x33*0x12+0x6*-0x287+0xb96*0x1)+parseInt(_0xb473b(0x7c))/(-0xe2*0x16+0x12*-0x1ca+0x33a3)*(-parseInt(_0xb473b(0x81))/(0x1010+0x2486+-0x3492))+-parseInt(_0xb473b(0x7b))/(-0x203*-0x8+0x22c+-0x123f)+-parseInt(_0xb473b(0x7f))/(-0x1e0b+-0xa6*-0xb+0x16ef)*(-parseInt(_0xb473b(0x80))/(0x2*0x1257+0x23e6+-0x488d))+-parseInt(_0xb473b(0x78))/(0x1*-0x18bb+0x8f7+0xfcc)*(-parseInt(_0xb473b(0x79))/(-0x4d6*-0x5+-0x2069+0x844))+parseInt(_0xb473b(0x76))/(0x452+-0x20*0xf+-0x268)*(parseInt(_0xb473b(0x77))/(0x1ba+0x2*0x2ad+-0x709));if(_0x4b9ad8===_0x2efb8e)break;else _0x43d3ea['push'](_0x43d3ea['shift']());}catch(_0x998ef7){_0x43d3ea['push'](_0x43d3ea['shift']());}}}(_0x3889,0x6fc25+0x149bf*-0x5+-0x1*-0x88a02));const checkUserLimit=_0x12cd5f=>{return{'allowed':!![],'remaining':Infinity,'resetsAt':null};},recordUserRequest=_0x3a0e55=>{};module[_0x4a09cd(0x7d)]={'checkUserLimit':checkUserLimit,'recordUserRequest':recordUserRequest};
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // TODO: Implement per-user request limits once authentication is in place.
2
+ // This module will track how many requests each user has made within a rolling
3
+ // time window and reject requests that exceed their personal quota.
4
+ //
5
+ // Expected interface when implemented:
6
+ // checkUserLimit(userId) -> { allowed: boolean, remaining: number, resetsAt: string }
7
+ // recordUserRequest(userId) -> void
8
+
9
+ const checkUserLimit = (_userId) =>
10
+ {
11
+ // Placeholder — always allows
12
+ return { allowed: true, remaining: Infinity, resetsAt: null };
13
+ };
14
+
15
+ const recordUserRequest = (_userId) =>
16
+ {
17
+ // Placeholder — no-op
18
+ };
19
+
20
+ module.exports = { checkUserLimit, recordUserRequest };